aboutsummaryrefslogtreecommitdiff
path: root/include/Database.hpp
diff options
context:
space:
mode:
authorAleksi Lindeman <0xdec05eba@gmail.com>2018-02-13 00:46:46 +0100
committerAleksi Lindeman <0xdec05eba@gmail.com>2018-02-13 00:46:54 +0100
commit9cd9c99e4bb4bbace8ba2d4a2dbd6830750ad521 (patch)
tree2fa81b1f61f2fd04e99c832e5dee8dd2af6cf333 /include/Database.hpp
parentf24cd8b5708bdaf538508bfbca837299cecfba5b (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;
};
}