1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
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.
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; }
42 /////////////////////////////////////////////////////////////////
43 // WARNING : this is a generated file, don't change it !
44 /////////////////////////////////////////////////////////////////
45 class CServerPatchManagerSkel
48 CServerPatchManagerSkel()
50 // do early run time check for message table
53 virtual ~CServerPatchManagerSkel()
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;
67 bool onDispatchMessage(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&message
);
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
);
86 /////////////////////////////////////////////////////////////////
87 // WARNING : this is a generated file, don't change it !
88 /////////////////////////////////////////////////////////////////
91 // Message sent by SPT module to request a refresh of state info etc
92 virtual void requestRefresh(NLNET::IModuleProxy
*sender
) =0;
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;
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
;
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
);
148 _LocalModuleSkel
= 0;
151 virtual ~CServerPatchManagerProxy()
155 NLNET::IModuleProxy
*getModuleProxy()
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
218 CDeploymentConfigurationSynchroniserSkel()
220 // do early run time check for message table
221 getMessageHandlers();
223 virtual ~CDeploymentConfigurationSynchroniserSkel()
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;
237 bool onDispatchMessage(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&message
);
241 void requestSync_skel(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&__message
);
243 void sync_skel(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&__message
);
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
;
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
);
289 _LocalModuleSkel
= 0;
292 virtual ~CDeploymentConfigurationSynchroniserProxy()
296 NLNET::IModuleProxy
*getModuleProxy()
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
);