33 lines
810 B
C++
33 lines
810 B
C++
#ifndef _WATCHDOG_WATCHDOGSERVICE_HPP_
|
|
#define _WATCHDOG_WATCHDOGSERVICE_HPP_
|
|
#ifndef _WATCHDOG_SERVICE_HPP_
|
|
#include <watchdog/service.hpp>
|
|
#endif
|
|
#ifndef _THREAD_MESSAGETHREAD_HPP_
|
|
#include <thread/mthread.hpp>
|
|
#endif
|
|
#ifndef _THREAD_THREADCALLBACK_HPP_
|
|
#include <thread/tcallbck.hpp>
|
|
#endif
|
|
|
|
class WatchDogService : public Service, private MessageThread
|
|
{
|
|
public:
|
|
WatchDogService();
|
|
virtual ~WatchDogService();
|
|
protected:
|
|
virtual bool initialize(void);
|
|
virtual void controlStop(void);
|
|
virtual void controlPause(void);
|
|
virtual void controlContinue(void);
|
|
virtual void controlInterrogate(void);
|
|
virtual void controlShutdown(void);
|
|
private:
|
|
DWORD threadHandler(ThreadMessage &threadMessage);
|
|
void thHandleStart();
|
|
|
|
ThreadCallback<WatchDogService> mThreadHandler;
|
|
Event mServiceEvent;
|
|
};
|
|
#endif
|