Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / server / src / patchman_service / spm_module_itf.h
blob1a9572a3697e37e72fbaff3a8327089f23984571
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 /////////////////////////////////////////////////////////////////
18 // WARNING : this is a generated file, don't change it !
19 /////////////////////////////////////////////////////////////////
21 #ifndef SPM_MODULE_ITF_H
22 #define SPM_MODULE_ITF_H
23 #include "nel/net/message.h"
24 #include "nel/net/module.h"
25 #include "nel/net/module_message.h"
26 #include "nel/net/module_gateway.h"
27 #include "nel/misc/string_conversion.h"
29 #include "nel/misc/sstring.h"
31 #include "nel/net/module_message.h"
33 #include "server_patch_types.h"
35 #ifndef NLNET_INTERFACE_GET_MODULE
36 # define NLNET_INTERFACE_GET_MODULE NLNET::IModule *getModuleInstance() { return this; }
37 #endif
38 namespace PATCHMAN
42 /////////////////////////////////////////////////////////////////
43 // WARNING : this is a generated file, don't change it !
44 /////////////////////////////////////////////////////////////////
45 class CServerPatchManagerSkel
47 protected:
48 CServerPatchManagerSkel()
50 // do early run time check for message table
51 getMessageHandlers();
53 virtual ~CServerPatchManagerSkel()
59 private:
60 typedef void (CServerPatchManagerSkel::*TMessageHandler)(NLNET::IModuleProxy *sender, const NLNET::CMessage &message);
61 typedef std::map<std::string, TMessageHandler> TMessageHandlerMap;
64 const TMessageHandlerMap &getMessageHandlers() const;
66 protected:
67 bool onDispatchMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &message);
69 private:
71 void requestRefresh_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
73 void setInstallVersion_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
75 void setLaunchVersion_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
77 void declareState_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
79 void declareVersionName_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
81 void executeCommandOnSPA_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
83 void spaExecutedCommandResult_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
85 public:
86 /////////////////////////////////////////////////////////////////
87 // WARNING : this is a generated file, don't change it !
88 /////////////////////////////////////////////////////////////////
90 //
91 // Message sent by SPT module to request a refresh of state info etc
92 virtual void requestRefresh(NLNET::IModuleProxy *sender) =0;
93 //
94 // Message sent by SPT module to request a change of install version for a given domain
95 // This message is forwarded to all SPA modules of the given domain
96 virtual void setInstallVersion(NLNET::IModuleProxy *sender, const NLMISC::CSString &domain, uint32 version) =0;
97 //
98 // Message sent by SPT module to request a change of launch version for a given domain
99 // This message is forwarded to all SPA modules of the given domain
100 virtual void setLaunchVersion(NLNET::IModuleProxy *sender, const NLMISC::CSString &domain, uint32 version) =0;
102 // Message sent by RE / RR / SPA type modules to declare their states
103 // This message is forwarded to all connected SPT modules
104 virtual void declareState(NLNET::IModuleProxy *sender, const NLMISC::CSString &state) =0;
106 // Message sent by SPT module to define a new named version
107 virtual void declareVersionName(NLNET::IModuleProxy *sender, const NLMISC::CSString &versionName, uint32 clientVersion, uint32 serverVersion) =0;
109 // Message sent by SPT module to request execution of a command on one or more modules
110 // Note that the 'target' parameter may be a wildcard
111 virtual void executeCommandOnSPA(NLNET::IModuleProxy *sender, const NLMISC::CSString &target, const NLMISC::CSString &commandline) =0;
113 // Message sent by SPA with result of command issuued via executeCommandOnSPA()
114 virtual void spaExecutedCommandResult(NLNET::IModuleProxy *sender, const NLMISC::CSString &originator, const NLMISC::CSString &commandline, const NLMISC::CSString &result) =0;
119 /////////////////////////////////////////////////////////////////
120 // WARNING : this is a generated file, don't change it !
121 /////////////////////////////////////////////////////////////////
122 class CServerPatchManagerProxy
124 /// Smart pointer on the module proxy
125 NLNET::TModuleProxyPtr _ModuleProxy;
127 // Pointer on the local module that implement the interface (if the proxy is for a local module)
128 NLNET::TModulePtr _LocalModule;
129 // Direct pointer on the server implementation interface for collocated module
130 CServerPatchManagerSkel *_LocalModuleSkel;
133 public:
134 CServerPatchManagerProxy(NLNET::IModuleProxy *proxy)
137 _ModuleProxy = proxy;
139 // initialize collocated servant interface
140 if (proxy->getModuleDistance() == 0)
142 _LocalModule = proxy->getLocalModule();
143 nlassert(_LocalModule != NULL);
144 _LocalModuleSkel = dynamic_cast < CServerPatchManagerSkel* > (_LocalModule.getPtr());
145 nlassert(_LocalModuleSkel != NULL);
147 else
148 _LocalModuleSkel = 0;
151 virtual ~CServerPatchManagerProxy()
155 NLNET::IModuleProxy *getModuleProxy()
157 return _ModuleProxy;
161 // Message sent by SPT module to request a refresh of state info etc
162 void requestRefresh(NLNET::IModule *sender);
164 // Message sent by SPT module to request a change of install version for a given domain
165 // This message is forwarded to all SPA modules of the given domain
166 void setInstallVersion(NLNET::IModule *sender, const NLMISC::CSString &domain, uint32 version);
168 // Message sent by SPT module to request a change of launch version for a given domain
169 // This message is forwarded to all SPA modules of the given domain
170 void setLaunchVersion(NLNET::IModule *sender, const NLMISC::CSString &domain, uint32 version);
172 // Message sent by RE / RR / SPA type modules to declare their states
173 // This message is forwarded to all connected SPT modules
174 void declareState(NLNET::IModule *sender, const NLMISC::CSString &state);
176 // Message sent by SPT module to define a new named version
177 void declareVersionName(NLNET::IModule *sender, const NLMISC::CSString &versionName, uint32 clientVersion, uint32 serverVersion);
179 // Message sent by SPT module to request execution of a command on one or more modules
180 // Note that the 'target' parameter may be a wildcard
181 void executeCommandOnSPA(NLNET::IModule *sender, const NLMISC::CSString &target, const NLMISC::CSString &commandline);
183 // Message sent by SPA with result of command issuued via executeCommandOnSPA()
184 void spaExecutedCommandResult(NLNET::IModule *sender, const NLMISC::CSString &originator, const NLMISC::CSString &commandline, const NLMISC::CSString &result);
186 // Message serializer. Return the message received in reference for easier integration
187 static const NLNET::CMessage &buildMessageFor_requestRefresh(NLNET::CMessage &__message);
189 // Message serializer. Return the message received in reference for easier integration
190 static const NLNET::CMessage &buildMessageFor_setInstallVersion(NLNET::CMessage &__message, const NLMISC::CSString &domain, uint32 version);
192 // Message serializer. Return the message received in reference for easier integration
193 static const NLNET::CMessage &buildMessageFor_setLaunchVersion(NLNET::CMessage &__message, const NLMISC::CSString &domain, uint32 version);
195 // Message serializer. Return the message received in reference for easier integration
196 static const NLNET::CMessage &buildMessageFor_declareState(NLNET::CMessage &__message, const NLMISC::CSString &state);
198 // Message serializer. Return the message received in reference for easier integration
199 static const NLNET::CMessage &buildMessageFor_declareVersionName(NLNET::CMessage &__message, const NLMISC::CSString &versionName, uint32 clientVersion, uint32 serverVersion);
201 // Message serializer. Return the message received in reference for easier integration
202 static const NLNET::CMessage &buildMessageFor_executeCommandOnSPA(NLNET::CMessage &__message, const NLMISC::CSString &target, const NLMISC::CSString &commandline);
204 // Message serializer. Return the message received in reference for easier integration
205 static const NLNET::CMessage &buildMessageFor_spaExecutedCommandResult(NLNET::CMessage &__message, const NLMISC::CSString &originator, const NLMISC::CSString &commandline, const NLMISC::CSString &result);
212 /////////////////////////////////////////////////////////////////
213 // WARNING : this is a generated file, don't change it !
214 /////////////////////////////////////////////////////////////////
215 class CDeploymentConfigurationSynchroniserSkel
217 protected:
218 CDeploymentConfigurationSynchroniserSkel()
220 // do early run time check for message table
221 getMessageHandlers();
223 virtual ~CDeploymentConfigurationSynchroniserSkel()
229 private:
230 typedef void (CDeploymentConfigurationSynchroniserSkel::*TMessageHandler)(NLNET::IModuleProxy *sender, const NLNET::CMessage &message);
231 typedef std::map<std::string, TMessageHandler> TMessageHandlerMap;
234 const TMessageHandlerMap &getMessageHandlers() const;
236 protected:
237 bool onDispatchMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &message);
239 private:
241 void requestSync_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
243 void sync_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
245 public:
246 /////////////////////////////////////////////////////////////////
247 // WARNING : this is a generated file, don't change it !
248 /////////////////////////////////////////////////////////////////
251 // Request for a copy of another module's CDeploymentConfiguration singleton
252 virtual void requestSync(NLNET::IModuleProxy *sender) =0;
254 // A copy of the data from the CDeploymentConfiguration singleton
255 virtual void sync(NLNET::IModuleProxy *sender, const NLNET::TBinBuffer &dataBlob) =0;
260 /////////////////////////////////////////////////////////////////
261 // WARNING : this is a generated file, don't change it !
262 /////////////////////////////////////////////////////////////////
263 class CDeploymentConfigurationSynchroniserProxy
265 /// Smart pointer on the module proxy
266 NLNET::TModuleProxyPtr _ModuleProxy;
268 // Pointer on the local module that implement the interface (if the proxy is for a local module)
269 NLNET::TModulePtr _LocalModule;
270 // Direct pointer on the server implementation interface for collocated module
271 CDeploymentConfigurationSynchroniserSkel *_LocalModuleSkel;
274 public:
275 CDeploymentConfigurationSynchroniserProxy(NLNET::IModuleProxy *proxy)
278 _ModuleProxy = proxy;
280 // initialize collocated servant interface
281 if (proxy->getModuleDistance() == 0)
283 _LocalModule = proxy->getLocalModule();
284 nlassert(_LocalModule != NULL);
285 _LocalModuleSkel = dynamic_cast < CDeploymentConfigurationSynchroniserSkel* > (_LocalModule.getPtr());
286 nlassert(_LocalModuleSkel != NULL);
288 else
289 _LocalModuleSkel = 0;
292 virtual ~CDeploymentConfigurationSynchroniserProxy()
296 NLNET::IModuleProxy *getModuleProxy()
298 return _ModuleProxy;
302 // Request for a copy of another module's CDeploymentConfiguration singleton
303 void requestSync(NLNET::IModule *sender);
305 // A copy of the data from the CDeploymentConfiguration singleton
306 void sync(NLNET::IModule *sender, const NLNET::TBinBuffer &dataBlob);
308 // Message serializer. Return the message received in reference for easier integration
309 static const NLNET::CMessage &buildMessageFor_requestSync(NLNET::CMessage &__message);
311 // Message serializer. Return the message received in reference for easier integration
312 static const NLNET::CMessage &buildMessageFor_sync(NLNET::CMessage &__message, const NLNET::TBinBuffer &dataBlob);
321 #endif