23 #include "wxgis/core/core.h"
24 #include "wxgis/core/app.h"
25 #include "wxgis/core/config.h"
28 #include <wx/filename.h>
31 #include <wx/datetime.h>
33 #include <wx/dynload.h>
34 #include <wx/dynlib.h>
35 #include <wx/cmdline.h>
49 typedef std::map<wxString, wxDynamicLibrary*> LIBMAP;
50 virtual void LoadLib(
const wxString &sPath,
bool bStore =
true);
52 virtual void LoadLibs(
const wxXmlNode* pRootNode);
53 virtual void SerializeLibs();
54 virtual void UnLoadLibs();
56 wxArrayString m_asNoStore;
88 virtual bool Initialize(
const wxString &sAppName,
const wxString &sLogFilePrefix);
89 virtual void Uninitialize();
91 virtual bool SetupSys(
const wxString &sSysPath);
92 virtual void SetDebugMode(
bool bDebugMode);
93 virtual bool SetupLog(
const wxString &sLogPath,
const wxString &sNamePrefix);
94 virtual bool SetupLoc(
const wxString &sLoc,
const wxString &sLocPath);
95 virtual wxString GetDecimalPoint(
void)
const{
return m_sDecimalPoint;};
96 virtual bool CreateApp(
void) {
return true;};
100 wxString m_sDecimalPoint;
122 class WXDLLIMPEXP_GIS_CORE wxGISService
126 virtual ~wxGISService(
void);
127 virtual void LogMessage(wxString msg,
int level);
129 static void WINAPI ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);
130 static void WINAPI Handler(DWORD dwOpcode);
131 virtual bool IsInstalled();
132 virtual bool Install(
const wxString &args,
const wxString &user = wxEmptyString,
const wxString &password = wxEmptyString);
133 virtual bool Uninstall();
134 virtual void Run() = 0;
135 virtual bool Initialize() = 0;
136 virtual void OnStop();
137 virtual void OnPause();
138 virtual void OnContinue();
139 virtual void OnInterrogate();
140 virtual void OnShutdown();
142 virtual void Daemonize(
void);
146 virtual bool StartService();
147 virtual void SetStatus(DWORD dwState);
152 wxString m_sServiceName;
153 wxString m_sServiceDisplayName;
154 bool m_bServiceIsRunning;
156 SERVICE_STATUS m_ServiceStatus;
157 SERVICE_STATUS_HANDLE m_hServiceStatusHandle;
158 HANDLE m_hEventSource;
162 static wxGISService* m_pThis;