diff options
author | randomdan <randomdan@localhost> | 2010-03-02 19:02:23 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2010-03-02 19:02:23 +0000 |
commit | 24384005a5fdd0e7ce2fc8d24841479310b53c47 (patch) | |
tree | b0fd6e00f1653a17ad4d0dfa51e995b478929002 /netfs/daemonConfig.h | |
parent | A few fixes and mark requests for replication (diff) | |
download | netfs-24384005a5fdd0e7ce2fc8d24841479310b53c47.tar.bz2 netfs-24384005a5fdd0e7ce2fc8d24841479310b53c47.tar.xz netfs-24384005a5fdd0e7ce2fc8d24841479310b53c47.zip |
Config with basic site map
Diffstat (limited to 'netfs/daemonConfig.h')
-rw-r--r-- | netfs/daemonConfig.h | 19 |
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; |