summaryrefslogtreecommitdiff
path: root/controller/JSONDB.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'controller/JSONDB.hpp')
-rw-r--r--controller/JSONDB.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/controller/JSONDB.hpp b/controller/JSONDB.hpp
index 7131b0c1..44f4d7f5 100644
--- a/controller/JSONDB.hpp
+++ b/controller/JSONDB.hpp
@@ -37,11 +37,12 @@
#include "../node/Mutex.hpp"
#include "../ext/json/json.hpp"
#include "../osdep/OSUtils.hpp"
-#include "../osdep/Http.hpp"
#include "../osdep/Thread.hpp"
namespace ZeroTier {
+class EmbeddedNetworkController;
+
/**
* Hierarchical JSON store that persists into the filesystem or via HTTP
*/
@@ -59,7 +60,7 @@ public:
uint64_t mostRecentDeauthTime;
};
- JSONDB(const std::string &basePath);
+ JSONDB(const std::string &basePath,EmbeddedNetworkController *parent);
~JSONDB();
/**
@@ -156,13 +157,13 @@ public:
throw();
private:
- bool _add(const nlohmann::json &j);
+ bool _addOrUpdate(const nlohmann::json &j);
bool _load(const std::string &p);
void _recomputeSummaryInfo(const uint64_t networkId);
std::string _genPath(const std::string &n,bool create);
+ EmbeddedNetworkController *const _parent;
std::string _basePath;
- InetAddress _httpAddr;
int _rawInput,_rawOutput;
Mutex _rawLock;