|
|
@ -20,27 +20,33 @@ namespace util |
|
|
|
class Daemon_Singleton_Private; |
|
|
|
class Daemon_Singleton_Private; |
|
|
|
class Daemon_Singleton |
|
|
|
class Daemon_Singleton |
|
|
|
{ |
|
|
|
{ |
|
|
|
public: |
|
|
|
public: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual bool init (int argc, char* argv[], std::shared_ptr<std::ostream> logstream); |
|
|
|
|
|
|
|
virtual bool init (int argc, char* argv[]); |
|
|
|
|
|
|
|
virtual bool start (); |
|
|
|
|
|
|
|
virtual bool stop (); |
|
|
|
|
|
|
|
virtual void run () {}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual void setDataDir (std::string path); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isDaemon; |
|
|
|
|
|
|
|
bool running; |
|
|
|
|
|
|
|
|
|
|
|
virtual bool init(int argc, char* argv[], std::shared_ptr<std::ostream> logstream); |
|
|
|
protected: |
|
|
|
virtual bool init(int argc, char* argv[]); |
|
|
|
|
|
|
|
virtual bool start(); |
|
|
|
|
|
|
|
virtual bool stop(); |
|
|
|
|
|
|
|
virtual void run () {}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isDaemon; |
|
|
|
Daemon_Singleton (); |
|
|
|
bool running; |
|
|
|
virtual ~Daemon_Singleton (); |
|
|
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
bool IsService () const; |
|
|
|
|
|
|
|
|
|
|
|
Daemon_Singleton(); |
|
|
|
// d-pointer for httpServer, httpProxy, etc.
|
|
|
|
virtual ~Daemon_Singleton(); |
|
|
|
class Daemon_Singleton_Private; |
|
|
|
|
|
|
|
Daemon_Singleton_Private &d; |
|
|
|
|
|
|
|
|
|
|
|
bool IsService () const; |
|
|
|
private: |
|
|
|
|
|
|
|
|
|
|
|
// d-pointer for httpServer, httpProxy, etc.
|
|
|
|
std::string DaemonDataDir; |
|
|
|
class Daemon_Singleton_Private; |
|
|
|
|
|
|
|
Daemon_Singleton_Private &d; |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
#if defined(QT_GUI_LIB) // check if QT
|
|
|
|
#if defined(QT_GUI_LIB) // check if QT
|
|
|
|