blob: 223436ccfd66ba0f0f085c4f4ecf33702818b0da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#ifndef DAEMONCONFIG_H
#define DAEMONCONFIG_H
#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, const HostMap &);
std::string root;
std::string name;
HostSet replicate;
};
typedef SmartPointer<Export> ExportPtr;
typedef std::map<std::string, ExportPtr> ExportMap;
DaemonConfig(xmlNodePtr);
static SmartPointer<DaemonConfig> Load(const char * path);
ExportMap exports;
HostMap hosts;
HostPtr self;
};
typedef SmartPointer<DaemonConfig> DaemonConfigPtr;
#endif
|