aboutsummaryrefslogtreecommitdiff
path: root/include/Database.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-02-13 00:46:46 +0100
committerdec05eba <dec05eba@protonmail.com>2020-08-18 23:25:12 +0200
commit00a2777fc154537fe9fc9cfac082a29f70bf6b75 (patch)
tree8c8a1489afe9d430cfdb1a19c63341d320f7543e /include/Database.hpp
parenta9a7ecaa25e6bc11062e21affd458e2de78747ff (diff)
Add database storage (in memory), need to store it on disk later
Diffstat (limited to 'include/Database.hpp')
-rw-r--r--include/Database.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/Database.hpp b/include/Database.hpp
index bfc3021..0104a6e 100644
--- a/include/Database.hpp
+++ b/include/Database.hpp
@@ -4,6 +4,7 @@
#include "Key.hpp"
#include "StagedObject.hpp"
#include "DataView.hpp"
+#include "DatabaseStorage.hpp"
#include <opendht/dhtrunner.h>
#include <vector>
#include <ntp/NtpClient.hpp>
@@ -12,6 +13,7 @@
namespace odhtdb
{
class Group;
+ class LocalUser;
class Database
{
@@ -21,7 +23,7 @@ namespace odhtdb
void seed();
void create(const Key &key, Group *primaryAdminGroup);
- void add(const Key &key, DataView data);
+ void add(const Key &key, DataView data, LocalUser *creator);
void commit();
private:
void commitStagedCreateObject(const StagedCreateObject &stagedObject);
@@ -35,5 +37,6 @@ namespace odhtdb
dht::DhtRunner node;
std::vector<StagedCreateObject> stagedCreateObjects;
std::vector<StagedAddObject> stagedAddObjects;
+ DatabaseStorage databaseStorage;
};
}