Version: 0.6.0
server.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Server)
3  * Purpose: wxGISServer class. Main server class
4  * Author: Bishop (aka Barishnikov Dmitriy), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2008-2012 Bishop
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 #pragma once
22 
23 #include "wxgissrv/srv_framework/framework.h"
24 #include "wxgis/core/app.h"
25 #include "wxgissrv/srv_framework/rxobjectserver.h"
26 #include "wxgis/net/servernet.h"
27 
28 #include <wx/ffile.h>
29 
34 class WXDLLIMPEXP_GIS_FRW wxGISServer : public IApplication
35 {
36  DECLARE_CLASS(wxGISServer)
37 public:
38  wxGISServer( void );
39  virtual ~wxGISServer(void);
40  //
41  void Exit(void);
42  //IApplication
43  virtual bool CreateApp(void);
44  virtual void OnAppOptions(void);
45  virtual void OnAppAbout(void);
46  virtual wxString GetAppName(void) const;
47  virtual wxString GetAppVersionString(void) const;
48  virtual bool SetupLog(const wxString &sLogPath);
49  virtual bool SetupSys(const wxString &sSysPath);
50  virtual bool SetupLoc(const wxString &sLoc, const wxString &sLocPath);
51  virtual void SetDebugMode(bool bDebugMode);
52 protected:
53  wxFFile m_LogFile;
54  wxLocale* m_pLocale; // locale we'll be using
55  char* m_pszOldLocale;
56  wxRxCatalog* m_pCatalog;
57  wxGISNetworkService* m_pNetworkService;
58 };
59 
60 /*
61 #include "wxgissrv/srv_framework/network.h"
62 #include "wxgissrv/srv_framework/auth.h"
63 #include "wxgissrv/srv_framework/catalog.h"
64 #include "wxgissrv/srv_framework/plugin.h"
65 #include "wxgis/networking/processor.h"
66 /*
70 WXDLLIMPEXP_GIS_FRW IServerApplication* GetApplication();
71 
72 class WXDLLIMPEXP_GIS_FRW wxGISServer :
73  public IServerApplication,
74  public wxGISNetMessageProcessor,
75  public wxGISWorkPlugin
76 {
77 public:
78  wxGISServer(void);
79  virtual ~wxGISServer(void);
80  virtual bool Start(wxString sAppName, wxString sConfigDir, wxCmdLineParser& parser);
81  virtual void Stop(void);
82  // IServerApplication
83  virtual IGISConfig* GetConfig(void);
84  virtual void PutInMessage(WXGISMSG msg);
85  virtual void PutOutMessage(WXGISMSG msg);
86  virtual void SetAuth(AUTHRESPOND stUserInfo);
87  virtual AUTHRESPOND GetAuth(long nID);
88 protected:
89  virtual bool SetupSys(wxString sSysPath);
90  virtual void SetDebugMode(bool bDebugMode);
91  virtual bool SetupLog(wxString sLogPath, wxString sNamePrefix);
92 protected:
93  wxGISNetworkService* m_pNetService;
94  wxGISAuthService* m_pAuthService;
95  wxRxCatalog* m_pCatalogService;//catalog of server objects
96 };
97 */
98 
A Server side Network Service.
Definition: servernet.h:49
The main Server class.
Definition: server.h:34
Definition: app.h:32
The root of Remote GxObjects (RxObjects).
Definition: rxobjectclient.h:75