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 SPT_MODULE_ITF_H
22 #define SPT_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 "server_patch_types.h"
33 #ifndef NLNET_INTERFACE_GET_MODULE
34 # define NLNET_INTERFACE_GET_MODULE NLNET::IModule *getModuleInstance() { return this; }
40 /////////////////////////////////////////////////////////////////
41 // WARNING : this is a generated file, don't change it !
42 /////////////////////////////////////////////////////////////////
43 class CServerPatchTerminalSkel
46 CServerPatchTerminalSkel()
48 // do early run time check for message table
51 virtual ~CServerPatchTerminalSkel()
58 typedef void (CServerPatchTerminalSkel::*TMessageHandler
)(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&message
);
59 typedef std::map
<std::string
, TMessageHandler
> TMessageHandlerMap
;
62 const TMessageHandlerMap
&getMessageHandlers() const;
65 bool onDispatchMessage(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&message
);
69 void declareState_skel(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&__message
);
71 void declareModuleDown_skel(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&__message
);
73 void declareVersionName_skel(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&__message
);
75 void declareDomainInfo_skel(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&__message
);
77 void ackVersionChange_skel(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&__message
);
79 void onSPAExecutedCommandAck_skel(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&__message
);
81 void onSPAExecutedCommandResult_skel(NLNET::IModuleProxy
*sender
, const NLNET::CMessage
&__message
);
84 /////////////////////////////////////////////////////////////////
85 // WARNING : this is a generated file, don't change it !
86 /////////////////////////////////////////////////////////////////
89 // Message sent by SPM module to declare the state of a named module
90 // This message is sent by the SPM for each connected SP / RE / RR type module on connection of SPT to SPM
91 // This message is also sent by the SPM for each type the SPM receives a state update from a SP / RE / RR type module
92 virtual void declareState(NLNET::IModuleProxy
*sender
, const NLMISC::CSString
&moduleName
, const NLMISC::CSString
&state
) =0;
94 // Message sent by SPM module to declare module down for a connected SPA / RE / RR type module
95 virtual void declareModuleDown(NLNET::IModuleProxy
*sender
, const NLMISC::CSString
&moduleName
) =0;
97 // Message sent by SPM module to define a named version
98 virtual void declareVersionName(NLNET::IModuleProxy
*sender
, const NLMISC::CSString
&versionName
, uint32 clientVersion
, uint32 serverVersion
) =0;
100 // Message sent by SPM module to give info on a named domain
101 virtual void declareDomainInfo(NLNET::IModuleProxy
*sender
, const NLMISC::CSString
&domainName
, uint32 installVersion
, uint32 launchVersion
) =0;
103 // Message sent by SPM module to acknowledge a version change attempt
104 virtual void ackVersionChange(NLNET::IModuleProxy
*sender
, const NLMISC::CSString
&domainName
, bool success
, const NLMISC::CSString
&comment
) =0;
106 // Message sent by SPA with result of command issuued via executeCommandOnSPA()
107 virtual void onSPAExecutedCommandAck(NLNET::IModuleProxy
*sender
, const NLMISC::CSString
&result
) =0;
109 // Message sent by SPA with result of command issuued via executeCommandOnSPA()
110 virtual void onSPAExecutedCommandResult(NLNET::IModuleProxy
*sender
, const NLMISC::CSString
&originator
, const NLMISC::CSString
&commandline
, const NLMISC::CSString
&result
) =0;
115 /////////////////////////////////////////////////////////////////
116 // WARNING : this is a generated file, don't change it !
117 /////////////////////////////////////////////////////////////////
118 class CServerPatchTerminalProxy
120 /// Smart pointer on the module proxy
121 NLNET::TModuleProxyPtr _ModuleProxy
;
123 // Pointer on the local module that implement the interface (if the proxy is for a local module)
124 NLNET::TModulePtr _LocalModule
;
125 // Direct pointer on the server implementation interface for collocated module
126 CServerPatchTerminalSkel
*_LocalModuleSkel
;
130 CServerPatchTerminalProxy(NLNET::IModuleProxy
*proxy
)
133 _ModuleProxy
= proxy
;
135 // initialize collocated servant interface
136 if (proxy
->getModuleDistance() == 0)
138 _LocalModule
= proxy
->getLocalModule();
139 nlassert(_LocalModule
!= NULL
);
140 _LocalModuleSkel
= dynamic_cast < CServerPatchTerminalSkel
* > (_LocalModule
.getPtr());
141 nlassert(_LocalModuleSkel
!= NULL
);
144 _LocalModuleSkel
= 0;
147 virtual ~CServerPatchTerminalProxy()
151 NLNET::IModuleProxy
*getModuleProxy()
157 // Message sent by SPM module to declare the state of a named module
158 // This message is sent by the SPM for each connected SP / RE / RR type module on connection of SPT to SPM
159 // This message is also sent by the SPM for each type the SPM receives a state update from a SP / RE / RR type module
160 void declareState(NLNET::IModule
*sender
, const NLMISC::CSString
&moduleName
, const NLMISC::CSString
&state
);
162 // Message sent by SPM module to declare module down for a connected SPA / RE / RR type module
163 void declareModuleDown(NLNET::IModule
*sender
, const NLMISC::CSString
&moduleName
);
165 // Message sent by SPM module to define a named version
166 void declareVersionName(NLNET::IModule
*sender
, const NLMISC::CSString
&versionName
, uint32 clientVersion
, uint32 serverVersion
);
168 // Message sent by SPM module to give info on a named domain
169 void declareDomainInfo(NLNET::IModule
*sender
, const NLMISC::CSString
&domainName
, uint32 installVersion
, uint32 launchVersion
);
171 // Message sent by SPM module to acknowledge a version change attempt
172 void ackVersionChange(NLNET::IModule
*sender
, const NLMISC::CSString
&domainName
, bool success
, const NLMISC::CSString
&comment
);
174 // Message sent by SPA with result of command issuued via executeCommandOnSPA()
175 void onSPAExecutedCommandAck(NLNET::IModule
*sender
, const NLMISC::CSString
&result
);
177 // Message sent by SPA with result of command issuued via executeCommandOnSPA()
178 void onSPAExecutedCommandResult(NLNET::IModule
*sender
, const NLMISC::CSString
&originator
, const NLMISC::CSString
&commandline
, const NLMISC::CSString
&result
);
180 // Message serializer. Return the message received in reference for easier integration
181 static const NLNET::CMessage
&buildMessageFor_declareState(NLNET::CMessage
&__message
, const NLMISC::CSString
&moduleName
, const NLMISC::CSString
&state
);
183 // Message serializer. Return the message received in reference for easier integration
184 static const NLNET::CMessage
&buildMessageFor_declareModuleDown(NLNET::CMessage
&__message
, const NLMISC::CSString
&moduleName
);
186 // Message serializer. Return the message received in reference for easier integration
187 static const NLNET::CMessage
&buildMessageFor_declareVersionName(NLNET::CMessage
&__message
, const NLMISC::CSString
&versionName
, uint32 clientVersion
, uint32 serverVersion
);
189 // Message serializer. Return the message received in reference for easier integration
190 static const NLNET::CMessage
&buildMessageFor_declareDomainInfo(NLNET::CMessage
&__message
, const NLMISC::CSString
&domainName
, uint32 installVersion
, uint32 launchVersion
);
192 // Message serializer. Return the message received in reference for easier integration
193 static const NLNET::CMessage
&buildMessageFor_ackVersionChange(NLNET::CMessage
&__message
, const NLMISC::CSString
&domainName
, bool success
, const NLMISC::CSString
&comment
);
195 // Message serializer. Return the message received in reference for easier integration
196 static const NLNET::CMessage
&buildMessageFor_onSPAExecutedCommandAck(NLNET::CMessage
&__message
, const NLMISC::CSString
&result
);
198 // Message serializer. Return the message received in reference for easier integration
199 static const NLNET::CMessage
&buildMessageFor_onSPAExecutedCommandResult(NLNET::CMessage
&__message
, const NLMISC::CSString
&originator
, const NLMISC::CSString
&commandline
, const NLMISC::CSString
&result
);