diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/odhtdb/Database.hpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/odhtdb/Database.hpp b/include/odhtdb/Database.hpp index 61365a0..ca713bd 100644 --- a/include/odhtdb/Database.hpp +++ b/include/odhtdb/Database.hpp @@ -46,6 +46,8 @@ namespace odhtdb public: DatabaseAddException(const std::string &errMsg) : std::runtime_error(errMsg) {} }; + + class Database; struct DatabaseCreateNodeRequest { @@ -56,13 +58,15 @@ namespace odhtdb const Signature::PublicKey *creatorPublicKey; const DataView groupId; bool loadedFromCache; + const Database *database; - DatabaseCreateNodeRequest(const Hash *_nodeHash, u64 _timestamp, const Signature::PublicKey *_creatorPublicKey, const DataView &_groupId) : + DatabaseCreateNodeRequest(const Hash *_nodeHash, u64 _timestamp, const Signature::PublicKey *_creatorPublicKey, const DataView &_groupId, const Database *_database) : nodeHash(_nodeHash), timestamp(_timestamp), creatorPublicKey(_creatorPublicKey), groupId(_groupId), - loadedFromCache(false) + loadedFromCache(false), + database(_database) { } @@ -78,14 +82,16 @@ namespace odhtdb const Signature::PublicKey *creatorPublicKey; const DataView decryptedData; bool loadedFromCache; + const Database *database; - DatabaseAddNodeRequest(const Hash *_nodeHash, const Hash *_requestHash, u64 _timestamp, const Signature::PublicKey *_creatorPublicKey, const DataView &_decryptedData) : + DatabaseAddNodeRequest(const Hash *_nodeHash, const Hash *_requestHash, u64 _timestamp, const Signature::PublicKey *_creatorPublicKey, const DataView &_decryptedData, const Database *_database) : nodeHash(_nodeHash), requestHash(_requestHash), timestamp(_timestamp), creatorPublicKey(_creatorPublicKey), decryptedData(_decryptedData), - loadedFromCache(false) + loadedFromCache(false), + database(_database) { } @@ -102,15 +108,17 @@ namespace odhtdb const Signature::PublicKey *userToAddPublicKey; const DataView groupToAddUserTo; bool loadedFromCache; + const Database *database; - DatabaseAddUserRequest(const Hash *_nodeHash, const Hash *_requestHash, u64 _timestamp, const Signature::PublicKey *_creatorPublicKey, const Signature::PublicKey *_userToAddPublicKey, const DataView &_groupToAddUserTo) : + DatabaseAddUserRequest(const Hash *_nodeHash, const Hash *_requestHash, u64 _timestamp, const Signature::PublicKey *_creatorPublicKey, const Signature::PublicKey *_userToAddPublicKey, const DataView &_groupToAddUserTo, const Database *_database) : nodeHash(_nodeHash), requestHash(_requestHash), timestamp(_timestamp), creatorPublicKey(_creatorPublicKey), userToAddPublicKey(_userToAddPublicKey), groupToAddUserTo(_groupToAddUserTo), - loadedFromCache(false) + loadedFromCache(false), + database(_database) { } |