summaryrefslogtreecommitdiff
path: root/controller/JSONDB.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-12-15 15:08:47 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-12-15 15:08:47 -0800
commita54c2b438c0abc574039055ecfc70dd829e2cade (patch)
tree0d606a4713382b7c11dddcab3bd3d09f17d2e915 /controller/JSONDB.hpp
parent890f6f0d35cc715f759cb3014c536a8801bd0c99 (diff)
downloadinfinitytier-a54c2b438c0abc574039055ecfc70dd829e2cade.tar.gz
infinitytier-a54c2b438c0abc574039055ecfc70dd829e2cade.zip
Basic support for streaming of changes via stdout from controller.
Diffstat (limited to 'controller/JSONDB.hpp')
-rw-r--r--controller/JSONDB.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/controller/JSONDB.hpp b/controller/JSONDB.hpp
index bd1ae5a5..40113655 100644
--- a/controller/JSONDB.hpp
+++ b/controller/JSONDB.hpp
@@ -19,6 +19,7 @@
#ifndef ZT_JSONDB_HPP
#define ZT_JSONDB_HPP
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -41,7 +42,8 @@ namespace ZeroTier {
class JSONDB
{
public:
- JSONDB(const std::string &basePath) :
+ JSONDB(const std::string &basePath,FILE *feed) :
+ _feed(feed),
_basePath(basePath)
{
_reload(_basePath);
@@ -106,6 +108,7 @@ private:
inline bool operator!=(const _E &e) const { return (obj != e.obj); }
};
+ FILE *_feed;
std::string _basePath;
std::map<std::string,_E> _db;
};