summaryrefslogtreecommitdiff
path: root/p2pvr/daemonbase/daemonBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'p2pvr/daemonbase/daemonBase.h')
-rw-r--r--p2pvr/daemonbase/daemonBase.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/p2pvr/daemonbase/daemonBase.h b/p2pvr/daemonbase/daemonBase.h
new file mode 100644
index 0000000..3cf9b19
--- /dev/null
+++ b/p2pvr/daemonbase/daemonBase.h
@@ -0,0 +1,31 @@
+#ifndef DAEMONBASE_H
+#define DAEMONBASE_H
+
+#include <Ice/Communicator.h>
+#include <Ice/Initialize.h>
+#include <daemon.h>
+#include <options.h>
+
+class DaemonBase : public Daemon {
+ public:
+ DaemonBase(int argc, char ** argv);
+ ~DaemonBase();
+
+ void run() const;
+ void shutdown() const;
+ INITOPTIONS;
+
+ protected:
+ virtual void addServants(const Ice::ObjectAdapterPtr &, const IceUtil::TimerPtr &) const = 0;
+ static Ice::InitializationData initData();
+ Ice::StringSeq & args(int, char **);
+
+ Ice::StringSeq _args;
+ Ice::CommunicatorPtr ic;
+
+ static std::string Adapter;
+ static std::string Endpoint;
+};
+
+#endif
+