summaryrefslogtreecommitdiff
path: root/p2pvr/lib/daemonBase.h
blob: 3cf9b1976515289aad13b3d4474092fec9dcba5e (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
#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