Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / server / src / patchman_service / module_admin_itf.cpp
blob8e2a2a34d13b6a7da445dfb05f673f5575a61ffe
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 #include "module_admin_itf.h"
23 namespace PATCHMAN
26 /////////////////////////////////////////////////////////////////
27 // WARNING : this is a generated file, don't change it !
28 /////////////////////////////////////////////////////////////////
31 const CFileReceiverSkel::TMessageHandlerMap &CFileReceiverSkel::getMessageHandlers() const
33 static TMessageHandlerMap handlers;
34 static bool init = false;
36 if (!init)
38 std::pair < TMessageHandlerMap::iterator, bool > res;
40 res = handlers.insert(std::make_pair(std::string("FR_SETUP_SUBS"), &CFileReceiverSkel::setupSubscriptions_skel));
41 // if this assert, you have a doubly message name in your interface definition !
42 nlassert(res.second);
44 res = handlers.insert(std::make_pair(std::string("FR_FILE_INFO"), &CFileReceiverSkel::cbFileInfo_skel));
45 // if this assert, you have a doubly message name in your interface definition !
46 nlassert(res.second);
48 res = handlers.insert(std::make_pair(std::string("FR_FILE_DATA"), &CFileReceiverSkel::cbFileData_skel));
49 // if this assert, you have a doubly message name in your interface definition !
50 nlassert(res.second);
52 res = handlers.insert(std::make_pair(std::string("FR_FILE_ERR"), &CFileReceiverSkel::cbFileDataFailure_skel));
53 // if this assert, you have a doubly message name in your interface definition !
54 nlassert(res.second);
56 init = true;
59 return handlers;
61 bool CFileReceiverSkel::fwdOnProcessModuleMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &message)
63 const TMessageHandlerMap &mh = getMessageHandlers();
65 TMessageHandlerMap::const_iterator it(mh.find(message.getName()));
67 if (it == mh.end())
69 return false;
72 TMessageHandler cmd = it->second;
73 (this->*cmd)(sender, message);
75 return true;
79 void CFileReceiverSkel::setupSubscriptions_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
81 H_AUTO(CFileReceiverSkel_setupSubscriptions_FR_SETUP_SUBS);
82 setupSubscriptions(sender);
85 void CFileReceiverSkel::cbFileInfo_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
87 H_AUTO(CFileReceiverSkel_cbFileInfo_FR_FILE_INFO);
88 TFileInfoVector files;
89 nlRead(__message, serialCont, files);
90 cbFileInfo(sender, files);
93 void CFileReceiverSkel::cbFileData_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
95 H_AUTO(CFileReceiverSkel_cbFileData_FR_FILE_DATA);
96 std::string fileName;
97 nlRead(__message, serial, fileName);
98 uint32 startOffset;
99 nlRead(__message, serial, startOffset);
100 NLNET::TBinBuffer data;
101 nlRead(__message, serial, data);
102 cbFileData(sender, fileName, startOffset, data);
105 void CFileReceiverSkel::cbFileDataFailure_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
107 H_AUTO(CFileReceiverSkel_cbFileDataFailure_FR_FILE_ERR);
108 std::string fileName;
109 nlRead(__message, serial, fileName);
110 cbFileDataFailure(sender, fileName);
113 void CFileReceiverProxy::setupSubscriptions(NLNET::IModule *sender)
115 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
117 // immediate local synchronous dispatching
118 _LocalModuleSkel->setupSubscriptions(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender));
120 else
122 // send the message for remote dispatching and execution or local queing
123 NLNET::CMessage __message;
125 buildMessageFor_setupSubscriptions(__message);
127 _ModuleProxy->sendModuleMessage(sender, __message);
131 void CFileReceiverProxy::cbFileInfo(NLNET::IModule *sender, const TFileInfoVector &files)
133 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
135 // immediate local synchronous dispatching
136 _LocalModuleSkel->cbFileInfo(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), files);
138 else
140 // send the message for remote dispatching and execution or local queing
141 NLNET::CMessage __message;
143 buildMessageFor_cbFileInfo(__message, files);
145 _ModuleProxy->sendModuleMessage(sender, __message);
149 void CFileReceiverProxy::cbFileData(NLNET::IModule *sender, const std::string &fileName, uint32 startOffset, const NLNET::TBinBuffer &data)
151 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
153 // immediate local synchronous dispatching
154 _LocalModuleSkel->cbFileData(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), fileName, startOffset, data);
156 else
158 // send the message for remote dispatching and execution or local queing
159 NLNET::CMessage __message;
161 buildMessageFor_cbFileData(__message, fileName, startOffset, data);
163 _ModuleProxy->sendModuleMessage(sender, __message);
167 void CFileReceiverProxy::cbFileDataFailure(NLNET::IModule *sender, const std::string &fileName)
169 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
171 // immediate local synchronous dispatching
172 _LocalModuleSkel->cbFileDataFailure(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), fileName);
174 else
176 // send the message for remote dispatching and execution or local queing
177 NLNET::CMessage __message;
179 buildMessageFor_cbFileDataFailure(__message, fileName);
181 _ModuleProxy->sendModuleMessage(sender, __message);
185 // Message serializer. Return the message received in reference for easier integration
186 const NLNET::CMessage &CFileReceiverProxy::buildMessageFor_setupSubscriptions(NLNET::CMessage &__message)
188 __message.setType("FR_SETUP_SUBS");
191 return __message;
194 // Message serializer. Return the message received in reference for easier integration
195 const NLNET::CMessage &CFileReceiverProxy::buildMessageFor_cbFileInfo(NLNET::CMessage &__message, const TFileInfoVector &files)
197 __message.setType("FR_FILE_INFO");
198 nlWrite(__message, serialCont, const_cast < TFileInfoVector& > (files));
201 return __message;
204 // Message serializer. Return the message received in reference for easier integration
205 const NLNET::CMessage &CFileReceiverProxy::buildMessageFor_cbFileData(NLNET::CMessage &__message, const std::string &fileName, uint32 startOffset, const NLNET::TBinBuffer &data)
207 __message.setType("FR_FILE_DATA");
208 nlWrite(__message, serial, const_cast < std::string& > (fileName));
209 nlWrite(__message, serial, startOffset);
210 nlWrite(__message, serial, const_cast < NLNET::TBinBuffer& > (data));
213 return __message;
216 // Message serializer. Return the message received in reference for easier integration
217 const NLNET::CMessage &CFileReceiverProxy::buildMessageFor_cbFileDataFailure(NLNET::CMessage &__message, const std::string &fileName)
219 __message.setType("FR_FILE_ERR");
220 nlWrite(__message, serial, const_cast < std::string& > (fileName));
223 return __message;
226 /////////////////////////////////////////////////////////////////
227 // WARNING : this is a generated file, don't change it !
228 /////////////////////////////////////////////////////////////////
231 const CFileRepositorySkel::TMessageHandlerMap &CFileRepositorySkel::getMessageHandlers() const
233 static TMessageHandlerMap handlers;
234 static bool init = false;
236 if (!init)
238 std::pair < TMessageHandlerMap::iterator, bool > res;
240 res = handlers.insert(std::make_pair(std::string("FR_REQUEST_INFO"), &CFileRepositorySkel::requestFileInfo_skel));
241 // if this assert, you have a doubly message name in your interface definition !
242 nlassert(res.second);
244 res = handlers.insert(std::make_pair(std::string("FR_REQUEST_DATA"), &CFileRepositorySkel::requestFileData_skel));
245 // if this assert, you have a doubly message name in your interface definition !
246 nlassert(res.second);
248 res = handlers.insert(std::make_pair(std::string("FR_GET_INFO"), &CFileRepositorySkel::getInfo_skel));
249 // if this assert, you have a doubly message name in your interface definition !
250 nlassert(res.second);
252 res = handlers.insert(std::make_pair(std::string("FR_SUBSCRIBE"), &CFileRepositorySkel::subscribe_skel));
253 // if this assert, you have a doubly message name in your interface definition !
254 nlassert(res.second);
256 res = handlers.insert(std::make_pair(std::string("FR_UNSUBSCRIBE"), &CFileRepositorySkel::unsubscribe_skel));
257 // if this assert, you have a doubly message name in your interface definition !
258 nlassert(res.second);
260 res = handlers.insert(std::make_pair(std::string("FR_UNSUBSCRIBE_ALL"), &CFileRepositorySkel::unsubscribeAll_skel));
261 // if this assert, you have a doubly message name in your interface definition !
262 nlassert(res.second);
264 init = true;
267 return handlers;
269 bool CFileRepositorySkel::fwdOnProcessModuleMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &message)
271 const TMessageHandlerMap &mh = getMessageHandlers();
273 TMessageHandlerMap::const_iterator it(mh.find(message.getName()));
275 if (it == mh.end())
277 return false;
280 TMessageHandler cmd = it->second;
281 (this->*cmd)(sender, message);
283 return true;
287 void CFileRepositorySkel::requestFileInfo_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
289 H_AUTO(CFileRepositorySkel_requestFileInfo_FR_REQUEST_INFO);
290 NLMISC::CSString fileName;
291 nlRead(__message, serial, fileName);
292 requestFileInfo(sender, fileName);
295 void CFileRepositorySkel::requestFileData_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
297 H_AUTO(CFileRepositorySkel_requestFileData_FR_REQUEST_DATA);
298 NLMISC::CSString fileName;
299 nlRead(__message, serial, fileName);
300 uint32 startOffset;
301 nlRead(__message, serial, startOffset);
302 uint32 numBytes;
303 nlRead(__message, serial, numBytes);
304 requestFileData(sender, fileName, startOffset, numBytes);
307 void CFileRepositorySkel::getInfo_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
309 H_AUTO(CFileRepositorySkel_getInfo_FR_GET_INFO);
310 NLMISC::CSString fileSpec;
311 nlRead(__message, serial, fileSpec);
312 getInfo(sender, fileSpec);
315 void CFileRepositorySkel::subscribe_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
317 H_AUTO(CFileRepositorySkel_subscribe_FR_SUBSCRIBE);
318 NLMISC::CSString fileSpec;
319 nlRead(__message, serial, fileSpec);
320 subscribe(sender, fileSpec);
323 void CFileRepositorySkel::unsubscribe_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
325 H_AUTO(CFileRepositorySkel_unsubscribe_FR_UNSUBSCRIBE);
326 NLMISC::CSString fileSpec;
327 nlRead(__message, serial, fileSpec);
328 unsubscribe(sender, fileSpec);
331 void CFileRepositorySkel::unsubscribeAll_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
333 H_AUTO(CFileRepositorySkel_unsubscribeAll_FR_UNSUBSCRIBE_ALL);
334 unsubscribeAll(sender);
336 // Request info concerning a particular file
337 void CFileRepositoryProxy::requestFileInfo(NLNET::IModule *sender, const NLMISC::CSString &fileName)
339 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
341 // immediate local synchronous dispatching
342 _LocalModuleSkel->requestFileInfo(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), fileName);
344 else
346 // send the message for remote dispatching and execution or local queing
347 NLNET::CMessage __message;
349 buildMessageFor_requestFileInfo(__message, fileName);
351 _ModuleProxy->sendModuleMessage(sender, __message);
354 // Request a data block for a particular file
355 void CFileRepositoryProxy::requestFileData(NLNET::IModule *sender, const NLMISC::CSString &fileName, uint32 startOffset, uint32 numBytes)
357 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
359 // immediate local synchronous dispatching
360 _LocalModuleSkel->requestFileData(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), fileName, startOffset, numBytes);
362 else
364 // send the message for remote dispatching and execution or local queing
365 NLNET::CMessage __message;
367 buildMessageFor_requestFileData(__message, fileName, startOffset, numBytes);
369 _ModuleProxy->sendModuleMessage(sender, __message);
372 // Ask for the info concerning files matching given filespec
373 void CFileRepositoryProxy::getInfo(NLNET::IModule *sender, const NLMISC::CSString &fileSpec)
375 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
377 // immediate local synchronous dispatching
378 _LocalModuleSkel->getInfo(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), fileSpec);
380 else
382 // send the message for remote dispatching and execution or local queing
383 NLNET::CMessage __message;
385 buildMessageFor_getInfo(__message, fileSpec);
387 _ModuleProxy->sendModuleMessage(sender, __message);
390 // Ask for the info concerning files matching given filespec to be forwarded to me now
391 // and for updates to be sent to me as they are generated
392 void CFileRepositoryProxy::subscribe(NLNET::IModule *sender, const NLMISC::CSString &fileSpec)
394 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
396 // immediate local synchronous dispatching
397 _LocalModuleSkel->subscribe(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), fileSpec);
399 else
401 // send the message for remote dispatching and execution or local queing
402 NLNET::CMessage __message;
404 buildMessageFor_subscribe(__message, fileSpec);
406 _ModuleProxy->sendModuleMessage(sender, __message);
409 // Cancel subscription for given filespec
410 void CFileRepositoryProxy::unsubscribe(NLNET::IModule *sender, const NLMISC::CSString &fileSpec)
412 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
414 // immediate local synchronous dispatching
415 _LocalModuleSkel->unsubscribe(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), fileSpec);
417 else
419 // send the message for remote dispatching and execution or local queing
420 NLNET::CMessage __message;
422 buildMessageFor_unsubscribe(__message, fileSpec);
424 _ModuleProxy->sendModuleMessage(sender, __message);
427 // Cancel all subscriptions for given filespec
428 void CFileRepositoryProxy::unsubscribeAll(NLNET::IModule *sender)
430 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
432 // immediate local synchronous dispatching
433 _LocalModuleSkel->unsubscribeAll(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender));
435 else
437 // send the message for remote dispatching and execution or local queing
438 NLNET::CMessage __message;
440 buildMessageFor_unsubscribeAll(__message);
442 _ModuleProxy->sendModuleMessage(sender, __message);
446 // Message serializer. Return the message received in reference for easier integration
447 const NLNET::CMessage &CFileRepositoryProxy::buildMessageFor_requestFileInfo(NLNET::CMessage &__message, const NLMISC::CSString &fileName)
449 __message.setType("FR_REQUEST_INFO");
450 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (fileName));
453 return __message;
456 // Message serializer. Return the message received in reference for easier integration
457 const NLNET::CMessage &CFileRepositoryProxy::buildMessageFor_requestFileData(NLNET::CMessage &__message, const NLMISC::CSString &fileName, uint32 startOffset, uint32 numBytes)
459 __message.setType("FR_REQUEST_DATA");
460 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (fileName));
461 nlWrite(__message, serial, startOffset);
462 nlWrite(__message, serial, numBytes);
465 return __message;
468 // Message serializer. Return the message received in reference for easier integration
469 const NLNET::CMessage &CFileRepositoryProxy::buildMessageFor_getInfo(NLNET::CMessage &__message, const NLMISC::CSString &fileSpec)
471 __message.setType("FR_GET_INFO");
472 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (fileSpec));
475 return __message;
478 // Message serializer. Return the message received in reference for easier integration
479 const NLNET::CMessage &CFileRepositoryProxy::buildMessageFor_subscribe(NLNET::CMessage &__message, const NLMISC::CSString &fileSpec)
481 __message.setType("FR_SUBSCRIBE");
482 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (fileSpec));
485 return __message;
488 // Message serializer. Return the message received in reference for easier integration
489 const NLNET::CMessage &CFileRepositoryProxy::buildMessageFor_unsubscribe(NLNET::CMessage &__message, const NLMISC::CSString &fileSpec)
491 __message.setType("FR_UNSUBSCRIBE");
492 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (fileSpec));
495 return __message;
498 // Message serializer. Return the message received in reference for easier integration
499 const NLNET::CMessage &CFileRepositoryProxy::buildMessageFor_unsubscribeAll(NLNET::CMessage &__message)
501 __message.setType("FR_UNSUBSCRIBE_ALL");
504 return __message;
507 /////////////////////////////////////////////////////////////////
508 // WARNING : this is a generated file, don't change it !
509 /////////////////////////////////////////////////////////////////
512 const CAdministeredModuleBaseSkel::TMessageHandlerMap &CAdministeredModuleBaseSkel::getMessageHandlers() const
514 static TMessageHandlerMap handlers;
515 static bool init = false;
517 if (!init)
519 std::pair < TMessageHandlerMap::iterator, bool > res;
521 res = handlers.insert(std::make_pair(std::string("ADMIN_EXEC"), &CAdministeredModuleBaseSkel::executeCommand_skel));
522 // if this assert, you have a doubly message name in your interface definition !
523 nlassert(res.second);
525 res = handlers.insert(std::make_pair(std::string("ADMIN_SETNEXT"), &CAdministeredModuleBaseSkel::installVersion_skel));
526 // if this assert, you have a doubly message name in your interface definition !
527 nlassert(res.second);
529 res = handlers.insert(std::make_pair(std::string("ADMIN_SETLIVE"), &CAdministeredModuleBaseSkel::launchVersion_skel));
530 // if this assert, you have a doubly message name in your interface definition !
531 nlassert(res.second);
533 init = true;
536 return handlers;
538 bool CAdministeredModuleBaseSkel::fwdOnProcessModuleMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &message)
540 const TMessageHandlerMap &mh = getMessageHandlers();
542 TMessageHandlerMap::const_iterator it(mh.find(message.getName()));
544 if (it == mh.end())
546 return false;
549 TMessageHandler cmd = it->second;
550 (this->*cmd)(sender, message);
552 return true;
556 void CAdministeredModuleBaseSkel::executeCommand_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
558 H_AUTO(CAdministeredModuleBaseSkel_executeCommand_ADMIN_EXEC);
559 NLMISC::CSString originator;
560 nlRead(__message, serial, originator);
561 NLMISC::CSString cmdline;
562 nlRead(__message, serial, cmdline);
563 executeCommand(sender, originator, cmdline);
566 void CAdministeredModuleBaseSkel::installVersion_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
568 H_AUTO(CAdministeredModuleBaseSkel_installVersion_ADMIN_SETNEXT);
569 NLMISC::CSString domainName;
570 nlRead(__message, serial, domainName);
571 uint32 version;
572 nlRead(__message, serial, version);
573 installVersion(sender, domainName, version);
576 void CAdministeredModuleBaseSkel::launchVersion_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
578 H_AUTO(CAdministeredModuleBaseSkel_launchVersion_ADMIN_SETLIVE);
579 NLMISC::CSString domainName;
580 nlRead(__message, serial, domainName);
581 uint32 version;
582 nlRead(__message, serial, version);
583 launchVersion(sender, domainName, version);
586 // Message sent by SPM module to request execution of a command
587 void CAdministeredModuleBaseProxy::executeCommand(NLNET::IModule *sender, const NLMISC::CSString &originator, const NLMISC::CSString &cmdline)
589 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
591 // immediate local synchronous dispatching
592 _LocalModuleSkel->executeCommand(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), originator, cmdline);
594 else
596 // send the message for remote dispatching and execution or local queing
597 NLNET::CMessage __message;
599 buildMessageFor_executeCommand(__message, originator, cmdline);
601 _ModuleProxy->sendModuleMessage(sender, __message);
605 void CAdministeredModuleBaseProxy::installVersion(NLNET::IModule *sender, const NLMISC::CSString &domainName, uint32 version)
607 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
609 // immediate local synchronous dispatching
610 _LocalModuleSkel->installVersion(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), domainName, version);
612 else
614 // send the message for remote dispatching and execution or local queing
615 NLNET::CMessage __message;
617 buildMessageFor_installVersion(__message, domainName, version);
619 _ModuleProxy->sendModuleMessage(sender, __message);
623 void CAdministeredModuleBaseProxy::launchVersion(NLNET::IModule *sender, const NLMISC::CSString &domainName, uint32 version)
625 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
627 // immediate local synchronous dispatching
628 _LocalModuleSkel->launchVersion(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), domainName, version);
630 else
632 // send the message for remote dispatching and execution or local queing
633 NLNET::CMessage __message;
635 buildMessageFor_launchVersion(__message, domainName, version);
637 _ModuleProxy->sendModuleMessage(sender, __message);
641 // Message serializer. Return the message received in reference for easier integration
642 const NLNET::CMessage &CAdministeredModuleBaseProxy::buildMessageFor_executeCommand(NLNET::CMessage &__message, const NLMISC::CSString &originator, const NLMISC::CSString &cmdline)
644 __message.setType("ADMIN_EXEC");
645 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (originator));
646 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (cmdline));
649 return __message;
652 // Message serializer. Return the message received in reference for easier integration
653 const NLNET::CMessage &CAdministeredModuleBaseProxy::buildMessageFor_installVersion(NLNET::CMessage &__message, const NLMISC::CSString &domainName, uint32 version)
655 __message.setType("ADMIN_SETNEXT");
656 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (domainName));
657 nlWrite(__message, serial, version);
660 return __message;
663 // Message serializer. Return the message received in reference for easier integration
664 const NLNET::CMessage &CAdministeredModuleBaseProxy::buildMessageFor_launchVersion(NLNET::CMessage &__message, const NLMISC::CSString &domainName, uint32 version)
666 __message.setType("ADMIN_SETLIVE");
667 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (domainName));
668 nlWrite(__message, serial, version);
671 return __message;
674 /////////////////////////////////////////////////////////////////
675 // WARNING : this is a generated file, don't change it !
676 /////////////////////////////////////////////////////////////////
679 const CServerPatchTerminalSkel::TMessageHandlerMap &CServerPatchTerminalSkel::getMessageHandlers() const
681 static TMessageHandlerMap handlers;
682 static bool init = false;
684 if (!init)
686 std::pair < TMessageHandlerMap::iterator, bool > res;
688 res = handlers.insert(std::make_pair(std::string("SPT_STATE"), &CServerPatchTerminalSkel::declareState_skel));
689 // if this assert, you have a doubly message name in your interface definition !
690 nlassert(res.second);
692 res = handlers.insert(std::make_pair(std::string("SPT_MODULEDOWN"), &CServerPatchTerminalSkel::declareModuleDown_skel));
693 // if this assert, you have a doubly message name in your interface definition !
694 nlassert(res.second);
696 res = handlers.insert(std::make_pair(std::string("SPT_VERSION_NAME"), &CServerPatchTerminalSkel::declareVersionName_skel));
697 // if this assert, you have a doubly message name in your interface definition !
698 nlassert(res.second);
700 res = handlers.insert(std::make_pair(std::string("SPT_DOMAIN_INFO"), &CServerPatchTerminalSkel::declareDomainInfo_skel));
701 // if this assert, you have a doubly message name in your interface definition !
702 nlassert(res.second);
704 res = handlers.insert(std::make_pair(std::string("SPT_VERSION_ACK"), &CServerPatchTerminalSkel::ackVersionChange_skel));
705 // if this assert, you have a doubly message name in your interface definition !
706 nlassert(res.second);
708 res = handlers.insert(std::make_pair(std::string("SPT_SETNEXT"), &CServerPatchTerminalSkel::setInstallVersion_skel));
709 // if this assert, you have a doubly message name in your interface definition !
710 nlassert(res.second);
712 res = handlers.insert(std::make_pair(std::string("SPT_SETLIVE"), &CServerPatchTerminalSkel::setLaunchVersion_skel));
713 // if this assert, you have a doubly message name in your interface definition !
714 nlassert(res.second);
716 res = handlers.insert(std::make_pair(std::string("SPT_EXEC_ACK"), &CServerPatchTerminalSkel::executedCommandAck_skel));
717 // if this assert, you have a doubly message name in your interface definition !
718 nlassert(res.second);
720 res = handlers.insert(std::make_pair(std::string("SPT_EXEC_RESULT"), &CServerPatchTerminalSkel::executedCommandResult_skel));
721 // if this assert, you have a doubly message name in your interface definition !
722 nlassert(res.second);
724 init = true;
727 return handlers;
729 bool CServerPatchTerminalSkel::fwdOnProcessModuleMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &message)
731 const TMessageHandlerMap &mh = getMessageHandlers();
733 TMessageHandlerMap::const_iterator it(mh.find(message.getName()));
735 if (it == mh.end())
737 return false;
740 TMessageHandler cmd = it->second;
741 (this->*cmd)(sender, message);
743 return true;
747 void CServerPatchTerminalSkel::declareState_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
749 H_AUTO(CServerPatchTerminalSkel_declareState_SPT_STATE);
750 NLMISC::CSString moduleName;
751 nlRead(__message, serial, moduleName);
752 NLMISC::CSString state;
753 nlRead(__message, serial, state);
754 declareState(sender, moduleName, state);
757 void CServerPatchTerminalSkel::declareModuleDown_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
759 H_AUTO(CServerPatchTerminalSkel_declareModuleDown_SPT_MODULEDOWN);
760 NLMISC::CSString moduleName;
761 nlRead(__message, serial, moduleName);
762 declareModuleDown(sender, moduleName);
765 void CServerPatchTerminalSkel::declareVersionName_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
767 H_AUTO(CServerPatchTerminalSkel_declareVersionName_SPT_VERSION_NAME);
768 NLMISC::CSString versionName;
769 nlRead(__message, serial, versionName);
770 uint32 clientVersion;
771 nlRead(__message, serial, clientVersion);
772 uint32 serverVersion;
773 nlRead(__message, serial, serverVersion);
774 declareVersionName(sender, versionName, clientVersion, serverVersion);
777 void CServerPatchTerminalSkel::declareDomainInfo_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
779 H_AUTO(CServerPatchTerminalSkel_declareDomainInfo_SPT_DOMAIN_INFO);
780 NLMISC::CSString domainName;
781 nlRead(__message, serial, domainName);
782 uint32 installVersion;
783 nlRead(__message, serial, installVersion);
784 uint32 launchVersion;
785 nlRead(__message, serial, launchVersion);
786 declareDomainInfo(sender, domainName, installVersion, launchVersion);
789 void CServerPatchTerminalSkel::ackVersionChange_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
791 H_AUTO(CServerPatchTerminalSkel_ackVersionChange_SPT_VERSION_ACK);
792 NLMISC::CSString domainName;
793 nlRead(__message, serial, domainName);
794 bool success;
795 nlRead(__message, serial, success);
796 NLMISC::CSString comment;
797 nlRead(__message, serial, comment);
798 ackVersionChange(sender, domainName, success, comment);
801 void CServerPatchTerminalSkel::setInstallVersion_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
803 H_AUTO(CServerPatchTerminalSkel_setInstallVersion_SPT_SETNEXT);
804 NLMISC::CSString domain;
805 nlRead(__message, serial, domain);
806 uint32 version;
807 nlRead(__message, serial, version);
808 setInstallVersion(sender, domain, version);
811 void CServerPatchTerminalSkel::setLaunchVersion_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
813 H_AUTO(CServerPatchTerminalSkel_setLaunchVersion_SPT_SETLIVE);
814 NLMISC::CSString domain;
815 nlRead(__message, serial, domain);
816 uint32 version;
817 nlRead(__message, serial, version);
818 setLaunchVersion(sender, domain, version);
821 void CServerPatchTerminalSkel::executedCommandAck_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
823 H_AUTO(CServerPatchTerminalSkel_executedCommandAck_SPT_EXEC_ACK);
824 NLMISC::CSString result;
825 nlRead(__message, serial, result);
826 executedCommandAck(sender, result);
829 void CServerPatchTerminalSkel::executedCommandResult_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
831 H_AUTO(CServerPatchTerminalSkel_executedCommandResult_SPT_EXEC_RESULT);
832 NLMISC::CSString originator;
833 nlRead(__message, serial, originator);
834 NLMISC::CSString commandline;
835 nlRead(__message, serial, commandline);
836 NLMISC::CSString result;
837 nlRead(__message, serial, result);
838 executedCommandResult(sender, originator, commandline, result);
841 // Message sent by SPM module to declare the state of a named module
842 // This message is sent by the SPM for each connected SP / RE / RR type module on connection of SPT to SPM
843 // This message is also sent by the SPM for each type the SPM receives a state update from a SP / RE / RR type module
844 void CServerPatchTerminalProxy::declareState(NLNET::IModule *sender, const NLMISC::CSString &moduleName, const NLMISC::CSString &state)
846 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
848 // immediate local synchronous dispatching
849 _LocalModuleSkel->declareState(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), moduleName, state);
851 else
853 // send the message for remote dispatching and execution or local queing
854 NLNET::CMessage __message;
856 buildMessageFor_declareState(__message, moduleName, state);
858 _ModuleProxy->sendModuleMessage(sender, __message);
862 // Message sent by SPM module to declare module down for a connected SPA / SPR / SPB type module
863 void CServerPatchTerminalProxy::declareModuleDown(NLNET::IModule *sender, const NLMISC::CSString &moduleName)
865 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
867 // immediate local synchronous dispatching
868 _LocalModuleSkel->declareModuleDown(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), moduleName);
870 else
872 // send the message for remote dispatching and execution or local queing
873 NLNET::CMessage __message;
875 buildMessageFor_declareModuleDown(__message, moduleName);
877 _ModuleProxy->sendModuleMessage(sender, __message);
881 // Message sent by SPM module to define a named version
882 void CServerPatchTerminalProxy::declareVersionName(NLNET::IModule *sender, const NLMISC::CSString &versionName, uint32 clientVersion, uint32 serverVersion)
884 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
886 // immediate local synchronous dispatching
887 _LocalModuleSkel->declareVersionName(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), versionName, clientVersion, serverVersion);
889 else
891 // send the message for remote dispatching and execution or local queing
892 NLNET::CMessage __message;
894 buildMessageFor_declareVersionName(__message, versionName, clientVersion, serverVersion);
896 _ModuleProxy->sendModuleMessage(sender, __message);
900 // Message sent by SPM module to give info on a named domain
901 void CServerPatchTerminalProxy::declareDomainInfo(NLNET::IModule *sender, const NLMISC::CSString &domainName, uint32 installVersion, uint32 launchVersion)
903 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
905 // immediate local synchronous dispatching
906 _LocalModuleSkel->declareDomainInfo(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), domainName, installVersion, launchVersion);
908 else
910 // send the message for remote dispatching and execution or local queing
911 NLNET::CMessage __message;
913 buildMessageFor_declareDomainInfo(__message, domainName, installVersion, launchVersion);
915 _ModuleProxy->sendModuleMessage(sender, __message);
919 // Message sent by SPM module to acknowledge a version change attempt
920 void CServerPatchTerminalProxy::ackVersionChange(NLNET::IModule *sender, const NLMISC::CSString &domainName, bool success, const NLMISC::CSString &comment)
922 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
924 // immediate local synchronous dispatching
925 _LocalModuleSkel->ackVersionChange(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), domainName, success, comment);
927 else
929 // send the message for remote dispatching and execution or local queing
930 NLNET::CMessage __message;
932 buildMessageFor_ackVersionChange(__message, domainName, success, comment);
934 _ModuleProxy->sendModuleMessage(sender, __message);
938 // Message sent by SPM to inform us of the current installed version for a given domain
939 void CServerPatchTerminalProxy::setInstallVersion(NLNET::IModule *sender, const NLMISC::CSString &domain, uint32 version)
941 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
943 // immediate local synchronous dispatching
944 _LocalModuleSkel->setInstallVersion(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), domain, version);
946 else
948 // send the message for remote dispatching and execution or local queing
949 NLNET::CMessage __message;
951 buildMessageFor_setInstallVersion(__message, domain, version);
953 _ModuleProxy->sendModuleMessage(sender, __message);
957 // Message sent by SPM to inform us of the current live version for a given domain
958 void CServerPatchTerminalProxy::setLaunchVersion(NLNET::IModule *sender, const NLMISC::CSString &domain, uint32 version)
960 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
962 // immediate local synchronous dispatching
963 _LocalModuleSkel->setLaunchVersion(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), domain, version);
965 else
967 // send the message for remote dispatching and execution or local queing
968 NLNET::CMessage __message;
970 buildMessageFor_setLaunchVersion(__message, domain, version);
972 _ModuleProxy->sendModuleMessage(sender, __message);
976 // Message sent by SPM with result of command issuued via executeCommandOnModules()
977 void CServerPatchTerminalProxy::executedCommandAck(NLNET::IModule *sender, const NLMISC::CSString &result)
979 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
981 // immediate local synchronous dispatching
982 _LocalModuleSkel->executedCommandAck(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), result);
984 else
986 // send the message for remote dispatching and execution or local queing
987 NLNET::CMessage __message;
989 buildMessageFor_executedCommandAck(__message, result);
991 _ModuleProxy->sendModuleMessage(sender, __message);
995 // Message sent by SPM with result of command issuued via executeCommandOnModules()
996 void CServerPatchTerminalProxy::executedCommandResult(NLNET::IModule *sender, const NLMISC::CSString &originator, const NLMISC::CSString &commandline, const NLMISC::CSString &result)
998 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
1000 // immediate local synchronous dispatching
1001 _LocalModuleSkel->executedCommandResult(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), originator, commandline, result);
1003 else
1005 // send the message for remote dispatching and execution or local queing
1006 NLNET::CMessage __message;
1008 buildMessageFor_executedCommandResult(__message, originator, commandline, result);
1010 _ModuleProxy->sendModuleMessage(sender, __message);
1014 // Message serializer. Return the message received in reference for easier integration
1015 const NLNET::CMessage &CServerPatchTerminalProxy::buildMessageFor_declareState(NLNET::CMessage &__message, const NLMISC::CSString &moduleName, const NLMISC::CSString &state)
1017 __message.setType("SPT_STATE");
1018 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (moduleName));
1019 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (state));
1022 return __message;
1025 // Message serializer. Return the message received in reference for easier integration
1026 const NLNET::CMessage &CServerPatchTerminalProxy::buildMessageFor_declareModuleDown(NLNET::CMessage &__message, const NLMISC::CSString &moduleName)
1028 __message.setType("SPT_MODULEDOWN");
1029 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (moduleName));
1032 return __message;
1035 // Message serializer. Return the message received in reference for easier integration
1036 const NLNET::CMessage &CServerPatchTerminalProxy::buildMessageFor_declareVersionName(NLNET::CMessage &__message, const NLMISC::CSString &versionName, uint32 clientVersion, uint32 serverVersion)
1038 __message.setType("SPT_VERSION_NAME");
1039 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (versionName));
1040 nlWrite(__message, serial, clientVersion);
1041 nlWrite(__message, serial, serverVersion);
1044 return __message;
1047 // Message serializer. Return the message received in reference for easier integration
1048 const NLNET::CMessage &CServerPatchTerminalProxy::buildMessageFor_declareDomainInfo(NLNET::CMessage &__message, const NLMISC::CSString &domainName, uint32 installVersion, uint32 launchVersion)
1050 __message.setType("SPT_DOMAIN_INFO");
1051 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (domainName));
1052 nlWrite(__message, serial, installVersion);
1053 nlWrite(__message, serial, launchVersion);
1056 return __message;
1059 // Message serializer. Return the message received in reference for easier integration
1060 const NLNET::CMessage &CServerPatchTerminalProxy::buildMessageFor_ackVersionChange(NLNET::CMessage &__message, const NLMISC::CSString &domainName, bool success, const NLMISC::CSString &comment)
1062 __message.setType("SPT_VERSION_ACK");
1063 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (domainName));
1064 nlWrite(__message, serial, success);
1065 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (comment));
1068 return __message;
1071 // Message serializer. Return the message received in reference for easier integration
1072 const NLNET::CMessage &CServerPatchTerminalProxy::buildMessageFor_setInstallVersion(NLNET::CMessage &__message, const NLMISC::CSString &domain, uint32 version)
1074 __message.setType("SPT_SETNEXT");
1075 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (domain));
1076 nlWrite(__message, serial, version);
1079 return __message;
1082 // Message serializer. Return the message received in reference for easier integration
1083 const NLNET::CMessage &CServerPatchTerminalProxy::buildMessageFor_setLaunchVersion(NLNET::CMessage &__message, const NLMISC::CSString &domain, uint32 version)
1085 __message.setType("SPT_SETLIVE");
1086 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (domain));
1087 nlWrite(__message, serial, version);
1090 return __message;
1093 // Message serializer. Return the message received in reference for easier integration
1094 const NLNET::CMessage &CServerPatchTerminalProxy::buildMessageFor_executedCommandAck(NLNET::CMessage &__message, const NLMISC::CSString &result)
1096 __message.setType("SPT_EXEC_ACK");
1097 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (result));
1100 return __message;
1103 // Message serializer. Return the message received in reference for easier integration
1104 const NLNET::CMessage &CServerPatchTerminalProxy::buildMessageFor_executedCommandResult(NLNET::CMessage &__message, const NLMISC::CSString &originator, const NLMISC::CSString &commandline, const NLMISC::CSString &result)
1106 __message.setType("SPT_EXEC_RESULT");
1107 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (originator));
1108 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (commandline));
1109 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (result));
1112 return __message;
1115 /////////////////////////////////////////////////////////////////
1116 // WARNING : this is a generated file, don't change it !
1117 /////////////////////////////////////////////////////////////////
1120 const CServerPatchManagerSkel::TMessageHandlerMap &CServerPatchManagerSkel::getMessageHandlers() const
1122 static TMessageHandlerMap handlers;
1123 static bool init = false;
1125 if (!init)
1127 std::pair < TMessageHandlerMap::iterator, bool > res;
1129 res = handlers.insert(std::make_pair(std::string("SPM_REGISTER"), &CServerPatchManagerSkel::registerAdministeredModule_skel));
1130 // if this assert, you have a doubly message name in your interface definition !
1131 nlassert(res.second);
1133 res = handlers.insert(std::make_pair(std::string("SPM_REFRESH"), &CServerPatchManagerSkel::requestRefresh_skel));
1134 // if this assert, you have a doubly message name in your interface definition !
1135 nlassert(res.second);
1137 res = handlers.insert(std::make_pair(std::string("SPM_SETNEXT"), &CServerPatchManagerSkel::setInstallVersion_skel));
1138 // if this assert, you have a doubly message name in your interface definition !
1139 nlassert(res.second);
1141 res = handlers.insert(std::make_pair(std::string("SPM_SETLIVE"), &CServerPatchManagerSkel::setLaunchVersion_skel));
1142 // if this assert, you have a doubly message name in your interface definition !
1143 nlassert(res.second);
1145 res = handlers.insert(std::make_pair(std::string("SPM_STATE"), &CServerPatchManagerSkel::declareState_skel));
1146 // if this assert, you have a doubly message name in your interface definition !
1147 nlassert(res.second);
1149 res = handlers.insert(std::make_pair(std::string("SPM_VERSION_NAME"), &CServerPatchManagerSkel::declareVersionName_skel));
1150 // if this assert, you have a doubly message name in your interface definition !
1151 nlassert(res.second);
1153 res = handlers.insert(std::make_pair(std::string("SPM_EXEC"), &CServerPatchManagerSkel::executeCommandOnModules_skel));
1154 // if this assert, you have a doubly message name in your interface definition !
1155 nlassert(res.second);
1157 res = handlers.insert(std::make_pair(std::string("SPM_EXEC_RESULT"), &CServerPatchManagerSkel::executedCommandResult_skel));
1158 // if this assert, you have a doubly message name in your interface definition !
1159 nlassert(res.second);
1161 init = true;
1164 return handlers;
1166 bool CServerPatchManagerSkel::fwdOnProcessModuleMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &message)
1168 const TMessageHandlerMap &mh = getMessageHandlers();
1170 TMessageHandlerMap::const_iterator it(mh.find(message.getName()));
1172 if (it == mh.end())
1174 return false;
1177 TMessageHandler cmd = it->second;
1178 (this->*cmd)(sender, message);
1180 return true;
1184 void CServerPatchManagerSkel::registerAdministeredModule_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
1186 H_AUTO(CServerPatchManagerSkel_registerAdministeredModule_SPM_REGISTER);
1187 bool requireApplierUpdates;
1188 nlRead(__message, serial, requireApplierUpdates);
1189 bool requireTerminalUpdates;
1190 nlRead(__message, serial, requireTerminalUpdates);
1191 bool requireDepCfgUpdates;
1192 nlRead(__message, serial, requireDepCfgUpdates);
1193 bool isAdministered;
1194 nlRead(__message, serial, isAdministered);
1195 registerAdministeredModule(sender, requireApplierUpdates, requireTerminalUpdates, requireDepCfgUpdates, isAdministered);
1198 void CServerPatchManagerSkel::requestRefresh_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
1200 H_AUTO(CServerPatchManagerSkel_requestRefresh_SPM_REFRESH);
1201 requestRefresh(sender);
1204 void CServerPatchManagerSkel::setInstallVersion_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
1206 H_AUTO(CServerPatchManagerSkel_setInstallVersion_SPM_SETNEXT);
1207 NLMISC::CSString domain;
1208 nlRead(__message, serial, domain);
1209 uint32 version;
1210 nlRead(__message, serial, version);
1211 setInstallVersion(sender, domain, version);
1214 void CServerPatchManagerSkel::setLaunchVersion_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
1216 H_AUTO(CServerPatchManagerSkel_setLaunchVersion_SPM_SETLIVE);
1217 NLMISC::CSString domain;
1218 nlRead(__message, serial, domain);
1219 uint32 version;
1220 nlRead(__message, serial, version);
1221 setLaunchVersion(sender, domain, version);
1224 void CServerPatchManagerSkel::declareState_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
1226 H_AUTO(CServerPatchManagerSkel_declareState_SPM_STATE);
1227 NLMISC::CSString state;
1228 nlRead(__message, serial, state);
1229 declareState(sender, state);
1232 void CServerPatchManagerSkel::declareVersionName_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
1234 H_AUTO(CServerPatchManagerSkel_declareVersionName_SPM_VERSION_NAME);
1235 NLMISC::CSString versionName;
1236 nlRead(__message, serial, versionName);
1237 uint32 clientVersion;
1238 nlRead(__message, serial, clientVersion);
1239 uint32 serverVersion;
1240 nlRead(__message, serial, serverVersion);
1241 declareVersionName(sender, versionName, clientVersion, serverVersion);
1244 void CServerPatchManagerSkel::executeCommandOnModules_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
1246 H_AUTO(CServerPatchManagerSkel_executeCommandOnModules_SPM_EXEC);
1247 NLMISC::CSString target;
1248 nlRead(__message, serial, target);
1249 NLMISC::CSString commandline;
1250 nlRead(__message, serial, commandline);
1251 executeCommandOnModules(sender, target, commandline);
1254 void CServerPatchManagerSkel::executedCommandResult_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
1256 H_AUTO(CServerPatchManagerSkel_executedCommandResult_SPM_EXEC_RESULT);
1257 NLMISC::CSString originator;
1258 nlRead(__message, serial, originator);
1259 NLMISC::CSString commandline;
1260 nlRead(__message, serial, commandline);
1261 NLMISC::CSString result;
1262 nlRead(__message, serial, result);
1263 executedCommandResult(sender, originator, commandline, result);
1266 // Message sent by an administered module to register
1267 void CServerPatchManagerProxy::registerAdministeredModule(NLNET::IModule *sender, bool requireApplierUpdates, bool requireTerminalUpdates, bool requireDepCfgUpdates, bool isAdministered)
1269 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
1271 // immediate local synchronous dispatching
1272 _LocalModuleSkel->registerAdministeredModule(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), requireApplierUpdates, requireTerminalUpdates, requireDepCfgUpdates, isAdministered);
1274 else
1276 // send the message for remote dispatching and execution or local queing
1277 NLNET::CMessage __message;
1279 buildMessageFor_registerAdministeredModule(__message, requireApplierUpdates, requireTerminalUpdates, requireDepCfgUpdates, isAdministered);
1281 _ModuleProxy->sendModuleMessage(sender, __message);
1285 // Message sent by SPT module to request a refresh of state info etc
1286 void CServerPatchManagerProxy::requestRefresh(NLNET::IModule *sender)
1288 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
1290 // immediate local synchronous dispatching
1291 _LocalModuleSkel->requestRefresh(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender));
1293 else
1295 // send the message for remote dispatching and execution or local queing
1296 NLNET::CMessage __message;
1298 buildMessageFor_requestRefresh(__message);
1300 _ModuleProxy->sendModuleMessage(sender, __message);
1304 // Message sent by SPT module to request a change of install version for a given domain
1305 // This message is forwarded to all SPA modules of the given domain
1306 void CServerPatchManagerProxy::setInstallVersion(NLNET::IModule *sender, const NLMISC::CSString &domain, uint32 version)
1308 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
1310 // immediate local synchronous dispatching
1311 _LocalModuleSkel->setInstallVersion(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), domain, version);
1313 else
1315 // send the message for remote dispatching and execution or local queing
1316 NLNET::CMessage __message;
1318 buildMessageFor_setInstallVersion(__message, domain, version);
1320 _ModuleProxy->sendModuleMessage(sender, __message);
1324 // Message sent by SPT module to request a change of launch version for a given domain
1325 // This message is forwarded to all SPA modules of the given domain
1326 void CServerPatchManagerProxy::setLaunchVersion(NLNET::IModule *sender, const NLMISC::CSString &domain, uint32 version)
1328 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
1330 // immediate local synchronous dispatching
1331 _LocalModuleSkel->setLaunchVersion(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), domain, version);
1333 else
1335 // send the message for remote dispatching and execution or local queing
1336 NLNET::CMessage __message;
1338 buildMessageFor_setLaunchVersion(__message, domain, version);
1340 _ModuleProxy->sendModuleMessage(sender, __message);
1344 // Message sent by SPR / SPB / SPA type modules to declare their states
1345 // This message is forwarded to all connected SPT modules
1346 void CServerPatchManagerProxy::declareState(NLNET::IModule *sender, const NLMISC::CSString &state)
1348 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
1350 // immediate local synchronous dispatching
1351 _LocalModuleSkel->declareState(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), state);
1353 else
1355 // send the message for remote dispatching and execution or local queing
1356 NLNET::CMessage __message;
1358 buildMessageFor_declareState(__message, state);
1360 _ModuleProxy->sendModuleMessage(sender, __message);
1364 // Message sent by SPT module to define a new named version
1365 void CServerPatchManagerProxy::declareVersionName(NLNET::IModule *sender, const NLMISC::CSString &versionName, uint32 clientVersion, uint32 serverVersion)
1367 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
1369 // immediate local synchronous dispatching
1370 _LocalModuleSkel->declareVersionName(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), versionName, clientVersion, serverVersion);
1372 else
1374 // send the message for remote dispatching and execution or local queing
1375 NLNET::CMessage __message;
1377 buildMessageFor_declareVersionName(__message, versionName, clientVersion, serverVersion);
1379 _ModuleProxy->sendModuleMessage(sender, __message);
1383 // Message sent by SPT module to request execution of a command on one or more modules
1384 // Note that the 'target' parameter may be a wildcard
1385 void CServerPatchManagerProxy::executeCommandOnModules(NLNET::IModule *sender, const NLMISC::CSString &target, const NLMISC::CSString &commandline)
1387 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
1389 // immediate local synchronous dispatching
1390 _LocalModuleSkel->executeCommandOnModules(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), target, commandline);
1392 else
1394 // send the message for remote dispatching and execution or local queing
1395 NLNET::CMessage __message;
1397 buildMessageFor_executeCommandOnModules(__message, target, commandline);
1399 _ModuleProxy->sendModuleMessage(sender, __message);
1403 // Message with result of command issuued via executeCommandOnSPA()
1404 void CServerPatchManagerProxy::executedCommandResult(NLNET::IModule *sender, const NLMISC::CSString &originator, const NLMISC::CSString &commandline, const NLMISC::CSString &result)
1406 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
1408 // immediate local synchronous dispatching
1409 _LocalModuleSkel->executedCommandResult(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), originator, commandline, result);
1411 else
1413 // send the message for remote dispatching and execution or local queing
1414 NLNET::CMessage __message;
1416 buildMessageFor_executedCommandResult(__message, originator, commandline, result);
1418 _ModuleProxy->sendModuleMessage(sender, __message);
1422 // Message serializer. Return the message received in reference for easier integration
1423 const NLNET::CMessage &CServerPatchManagerProxy::buildMessageFor_registerAdministeredModule(NLNET::CMessage &__message, bool requireApplierUpdates, bool requireTerminalUpdates, bool requireDepCfgUpdates, bool isAdministered)
1425 __message.setType("SPM_REGISTER");
1426 nlWrite(__message, serial, requireApplierUpdates);
1427 nlWrite(__message, serial, requireTerminalUpdates);
1428 nlWrite(__message, serial, requireDepCfgUpdates);
1429 nlWrite(__message, serial, isAdministered);
1432 return __message;
1435 // Message serializer. Return the message received in reference for easier integration
1436 const NLNET::CMessage &CServerPatchManagerProxy::buildMessageFor_requestRefresh(NLNET::CMessage &__message)
1438 __message.setType("SPM_REFRESH");
1441 return __message;
1444 // Message serializer. Return the message received in reference for easier integration
1445 const NLNET::CMessage &CServerPatchManagerProxy::buildMessageFor_setInstallVersion(NLNET::CMessage &__message, const NLMISC::CSString &domain, uint32 version)
1447 __message.setType("SPM_SETNEXT");
1448 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (domain));
1449 nlWrite(__message, serial, version);
1452 return __message;
1455 // Message serializer. Return the message received in reference for easier integration
1456 const NLNET::CMessage &CServerPatchManagerProxy::buildMessageFor_setLaunchVersion(NLNET::CMessage &__message, const NLMISC::CSString &domain, uint32 version)
1458 __message.setType("SPM_SETLIVE");
1459 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (domain));
1460 nlWrite(__message, serial, version);
1463 return __message;
1466 // Message serializer. Return the message received in reference for easier integration
1467 const NLNET::CMessage &CServerPatchManagerProxy::buildMessageFor_declareState(NLNET::CMessage &__message, const NLMISC::CSString &state)
1469 __message.setType("SPM_STATE");
1470 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (state));
1473 return __message;
1476 // Message serializer. Return the message received in reference for easier integration
1477 const NLNET::CMessage &CServerPatchManagerProxy::buildMessageFor_declareVersionName(NLNET::CMessage &__message, const NLMISC::CSString &versionName, uint32 clientVersion, uint32 serverVersion)
1479 __message.setType("SPM_VERSION_NAME");
1480 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (versionName));
1481 nlWrite(__message, serial, clientVersion);
1482 nlWrite(__message, serial, serverVersion);
1485 return __message;
1488 // Message serializer. Return the message received in reference for easier integration
1489 const NLNET::CMessage &CServerPatchManagerProxy::buildMessageFor_executeCommandOnModules(NLNET::CMessage &__message, const NLMISC::CSString &target, const NLMISC::CSString &commandline)
1491 __message.setType("SPM_EXEC");
1492 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (target));
1493 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (commandline));
1496 return __message;
1499 // Message serializer. Return the message received in reference for easier integration
1500 const NLNET::CMessage &CServerPatchManagerProxy::buildMessageFor_executedCommandResult(NLNET::CMessage &__message, const NLMISC::CSString &originator, const NLMISC::CSString &commandline, const NLMISC::CSString &result)
1502 __message.setType("SPM_EXEC_RESULT");
1503 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (originator));
1504 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (commandline));
1505 nlWrite(__message, serial, const_cast < NLMISC::CSString& > (result));
1508 return __message;
1511 /////////////////////////////////////////////////////////////////
1512 // WARNING : this is a generated file, don't change it !
1513 /////////////////////////////////////////////////////////////////
1516 const CDeploymentConfigurationSynchroniserSkel::TMessageHandlerMap &CDeploymentConfigurationSynchroniserSkel::getMessageHandlers() const
1518 static TMessageHandlerMap handlers;
1519 static bool init = false;
1521 if (!init)
1523 std::pair < TMessageHandlerMap::iterator, bool > res;
1525 res = handlers.insert(std::make_pair(std::string("DEPCFG_REQUEST"), &CDeploymentConfigurationSynchroniserSkel::requestSync_skel));
1526 // if this assert, you have a doubly message name in your interface definition !
1527 nlassert(res.second);
1529 res = handlers.insert(std::make_pair(std::string("DEPCFG_SYNC"), &CDeploymentConfigurationSynchroniserSkel::sync_skel));
1530 // if this assert, you have a doubly message name in your interface definition !
1531 nlassert(res.second);
1533 init = true;
1536 return handlers;
1538 bool CDeploymentConfigurationSynchroniserSkel::fwdOnProcessModuleMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &message)
1540 const TMessageHandlerMap &mh = getMessageHandlers();
1542 TMessageHandlerMap::const_iterator it(mh.find(message.getName()));
1544 if (it == mh.end())
1546 return false;
1549 TMessageHandler cmd = it->second;
1550 (this->*cmd)(sender, message);
1552 return true;
1556 void CDeploymentConfigurationSynchroniserSkel::requestSync_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
1558 H_AUTO(CDeploymentConfigurationSynchroniserSkel_requestSync_DEPCFG_REQUEST);
1559 requestSync(sender);
1562 void CDeploymentConfigurationSynchroniserSkel::sync_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
1564 H_AUTO(CDeploymentConfigurationSynchroniserSkel_sync_DEPCFG_SYNC);
1565 NLNET::TBinBuffer dataBlob;
1566 nlRead(__message, serial, dataBlob);
1567 sync(sender, dataBlob);
1570 // Request for a copy of another module's CDeploymentConfiguration singleton
1571 void CDeploymentConfigurationSynchroniserProxy::requestSync(NLNET::IModule *sender)
1573 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
1575 // immediate local synchronous dispatching
1576 _LocalModuleSkel->requestSync(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender));
1578 else
1580 // send the message for remote dispatching and execution or local queing
1581 NLNET::CMessage __message;
1583 buildMessageFor_requestSync(__message);
1585 _ModuleProxy->sendModuleMessage(sender, __message);
1589 // A copy of the data from the CDeploymentConfiguration singleton
1590 void CDeploymentConfigurationSynchroniserProxy::sync(NLNET::IModule *sender, const NLNET::TBinBuffer &dataBlob)
1592 if (_LocalModuleSkel && _LocalModule->isImmediateDispatchingSupported())
1594 // immediate local synchronous dispatching
1595 _LocalModuleSkel->sync(_ModuleProxy->getModuleGateway()->getPluggedModuleProxy(sender), dataBlob);
1597 else
1599 // send the message for remote dispatching and execution or local queing
1600 NLNET::CMessage __message;
1602 buildMessageFor_sync(__message, dataBlob);
1604 _ModuleProxy->sendModuleMessage(sender, __message);
1608 // Message serializer. Return the message received in reference for easier integration
1609 const NLNET::CMessage &CDeploymentConfigurationSynchroniserProxy::buildMessageFor_requestSync(NLNET::CMessage &__message)
1611 __message.setType("DEPCFG_REQUEST");
1614 return __message;
1617 // Message serializer. Return the message received in reference for easier integration
1618 const NLNET::CMessage &CDeploymentConfigurationSynchroniserProxy::buildMessageFor_sync(NLNET::CMessage &__message, const NLNET::TBinBuffer &dataBlob)
1620 __message.setType("DEPCFG_SYNC");
1621 nlWrite(__message, serial, const_cast < NLNET::TBinBuffer& > (dataBlob));
1624 return __message;