diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/odhtdb/Database.hpp | 3 | ||||
-rw-r--r-- | include/odhtdb/DatabaseStorage.hpp | 4 | ||||
-rw-r--r-- | include/odhtdb/env.hpp | 4 |
3 files changed, 4 insertions, 7 deletions
diff --git a/include/odhtdb/Database.hpp b/include/odhtdb/Database.hpp index a8833fc..846ddaa 100644 --- a/include/odhtdb/Database.hpp +++ b/include/odhtdb/Database.hpp @@ -12,9 +12,6 @@ #include "DatabaseNode.hpp" #include "Encryption.hpp" #include "OwnedMemory.hpp" -#ifdef DEBUG -#undef DEBUG -#endif #include <opendht/dhtrunner.h> #include <vector> #include <ntp/NtpClient.hpp> diff --git a/include/odhtdb/DatabaseStorage.hpp b/include/odhtdb/DatabaseStorage.hpp index a2789f7..a9e04ef 100644 --- a/include/odhtdb/DatabaseStorage.hpp +++ b/include/odhtdb/DatabaseStorage.hpp @@ -10,6 +10,7 @@ #include <stdexcept> #include <boost/filesystem/path.hpp> #include <sibs/SafeDeserializer.hpp> +#include <opendht/crypto.h> namespace odhtdb { @@ -106,6 +107,8 @@ namespace odhtdb // Return users in node, or nullptr if no node with id @nodeHash exists const Signature::MapPublicKey<UserData*>* getUsersData(const Hash &nodeHash) const; + const dht::crypto::Identity& getIdentity() const; + // Update storage state (remove quarantine objects if they are too old, etc) void update(); private: @@ -126,5 +129,6 @@ namespace odhtdb boost::filesystem::path dataFilePath; boost::filesystem::path metadataFilePath; u8 passwordSalt[PASSWORD_SALT_LEN]; + std::pair<std::shared_ptr<dht::crypto::PrivateKey>, std::shared_ptr<dht::crypto::Certificate>> identity; }; } diff --git a/include/odhtdb/env.hpp b/include/odhtdb/env.hpp index bafc750..abaedd8 100644 --- a/include/odhtdb/env.hpp +++ b/include/odhtdb/env.hpp @@ -57,7 +57,3 @@ #if !defined(OS_TYPE) #error "System not supported. Only Windows and linux systems supported right now" #endif - -#if !defined(DEBUG) && !defined(NDEBUG) -#define DEBUG -#endif |