summaryrefslogtreecommitdiff
path: root/netfs/daemonConfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'netfs/daemonConfig.h')
-rw-r--r--netfs/daemonConfig.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/netfs/daemonConfig.h b/netfs/daemonConfig.h
index d15fade..223436c 100644
--- a/netfs/daemonConfig.h
+++ b/netfs/daemonConfig.h
@@ -3,17 +3,31 @@
#include <string>
#include <map>
+#include <set>
#include "smartpointer.h"
#include "xml.h"
class DaemonConfig : public virtual IsRefCounted {
public:
+ class Host : public virtual IsRefCounted {
+ public:
+ Host(xmlNodePtr);
+
+ std::string tcpPort;
+ std::string name;
+ bool self;
+ };
+ typedef SmartPointer<Host> HostPtr;
+ typedef std::map<std::string, HostPtr> HostMap;
+ typedef std::set<HostPtr> HostSet;
+
class Export : public virtual IsRefCounted {
public:
- Export(xmlNodePtr);
+ Export(xmlNodePtr, const HostMap &);
std::string root;
std::string name;
+ HostSet replicate;
};
typedef SmartPointer<Export> ExportPtr;
typedef std::map<std::string, ExportPtr> ExportMap;
@@ -22,8 +36,9 @@ class DaemonConfig : public virtual IsRefCounted {
static SmartPointer<DaemonConfig> Load(const char * path);
- std::string tcpPort;
ExportMap exports;
+ HostMap hosts;
+ HostPtr self;
};
typedef SmartPointer<DaemonConfig> DaemonConfigPtr;