23 #include "wxgis/base.h"
24 #include "wxgissrv/srv_framework/server.h"
30 virtual bool Install() = 0;
31 virtual bool Uninstall() = 0;
32 virtual void Run() = 0;
33 virtual void OnStop() = 0;
34 virtual long GetExitCode() = 0;
37 #ifdef __WXMSW__ //Win
39 #define EVMSG_INSTALLED 0x00000064L
40 #define EVMSG_REMOVED 0x00000065L
41 #define EVMSG_NOTREMOVED 0x00000066L
42 #define EVMSG_CTRLHANDLERNOTINSTALLED 0x00000067L
43 #define EVMSG_FAILEDINIT 0x00000068L
44 #define EVMSG_STARTED 0x00000069L
45 #define EVMSG_BADREQUEST 0x0000006AL
46 #define EVMSG_DEBUG 0x0000006BL
47 #define EVMSG_STOPPED 0x0000006CL
49 #define SERVICE_CONTROL_USER 128
60 wxGISNTService(wxString sServiceName);
61 virtual ~wxGISNTService();
63 virtual bool IsInstalled();
64 virtual bool Install();
65 virtual bool Uninstall();
67 virtual void OnStop();
69 virtual bool StartService();
70 virtual void LogEvent(WORD wType, DWORD dwID,
const TCHAR* pszS1 = NULL,
const TCHAR* pszS2 = NULL,
const TCHAR* pszS3 = NULL);
71 virtual void SetStatus(DWORD dwState);
72 virtual bool Initialize();
73 virtual bool OnInit();
74 virtual void OnInterrogate();
75 virtual void OnPause();
76 virtual void OnContinue();
77 virtual void OnShutdown();
78 virtual bool OnUserControl(DWORD dwOpcode);
79 virtual long GetExitCode(){
return m_Status.dwWin32ExitCode;};
82 static void WINAPI ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);
83 static void WINAPI Handler(DWORD dwOpcode);
86 wxString m_sServiceName;
89 SERVICE_STATUS_HANDLE m_hServiceStatus;
90 SERVICE_STATUS m_Status;
92 static wxGISNTService* m_pThis;
95 HANDLE m_hEventSource;
98 #define wxGISService wxGISNTService
The main Server class.
Definition: server.h:34