Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / server / src / patchman_service / spa_module_itf.h
blob4660dc5dbe24aa882752a4b6c8802720a0c1f3af
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 SPA_MODULE_ITF_H
22 #define SPA_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 #ifndef NLNET_INTERFACE_GET_MODULE
32 # define NLNET_INTERFACE_GET_MODULE NLNET::IModule *getModuleInstance() { return this; }
33 #endif
34 namespace PATCHMAN
38 /////////////////////////////////////////////////////////////////
39 // WARNING : this is a generated file, don't change it !
40 /////////////////////////////////////////////////////////////////
41 class CServerPatchApplierSkel
43 protected:
44 CServerPatchApplierSkel()
46 // do early run time check for message table
47 getMessageHandlers();
49 virtual ~CServerPatchApplierSkel()
55 private:
56 typedef void (CServerPatchApplierSkel::*TMessageHandler)(NLNET::IModuleProxy *sender, const NLNET::CMessage &message);
57 typedef std::map<std::string, TMessageHandler> TMessageHandlerMap;
60 const TMessageHandlerMap &getMessageHandlers() const;
62 protected:
63 bool onDispatchMessage(NLNET::IModuleProxy *sender, const NLNET::CMessage &message);
65 private:
67 void installVersion_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
69 void launchVersion_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
71 void executeCommand_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message);
73 public:
74 /////////////////////////////////////////////////////////////////
75 // WARNING : this is a generated file, don't change it !
76 /////////////////////////////////////////////////////////////////
78 //
79 virtual void installVersion(NLNET::IModuleProxy *sender, const NLMISC::CSString &domainName, uint32 version) =0;
80 //
81 virtual void launchVersion(NLNET::IModuleProxy *sender, const NLMISC::CSString &domainName, uint32 version) =0;
82 //
83 // Message sent by SPM to tell us to execute a comman locally
84 virtual void executeCommand(NLNET::IModuleProxy *sender, const NLMISC::CSString &cmdline, const NLMISC::CSString &originator) =0;
89 /////////////////////////////////////////////////////////////////
90 // WARNING : this is a generated file, don't change it !
91 /////////////////////////////////////////////////////////////////
92 class CServerPatchApplierProxy
94 /// Smart pointer on the module proxy
95 NLNET::TModuleProxyPtr _ModuleProxy;
97 // Pointer on the local module that implement the interface (if the proxy is for a local module)
98 NLNET::TModulePtr _LocalModule;
99 // Direct pointer on the server implementation interface for collocated module
100 CServerPatchApplierSkel *_LocalModuleSkel;
103 public:
104 CServerPatchApplierProxy(NLNET::IModuleProxy *proxy)
107 _ModuleProxy = proxy;
109 // initialize collocated servant interface
110 if (proxy->getModuleDistance() == 0)
112 _LocalModule = proxy->getLocalModule();
113 nlassert(_LocalModule != NULL);
114 _LocalModuleSkel = dynamic_cast < CServerPatchApplierSkel* > (_LocalModule.getPtr());
115 nlassert(_LocalModuleSkel != NULL);
117 else
118 _LocalModuleSkel = 0;
121 virtual ~CServerPatchApplierProxy()
125 NLNET::IModuleProxy *getModuleProxy()
127 return _ModuleProxy;
131 void installVersion(NLNET::IModule *sender, const NLMISC::CSString &domainName, uint32 version);
133 void launchVersion(NLNET::IModule *sender, const NLMISC::CSString &domainName, uint32 version);
135 // Message sent by SPM to tell us to execute a comman locally
136 void executeCommand(NLNET::IModule *sender, const NLMISC::CSString &cmdline, const NLMISC::CSString &originator);
138 // Message serializer. Return the message received in reference for easier integration
139 static const NLNET::CMessage &buildMessageFor_installVersion(NLNET::CMessage &__message, const NLMISC::CSString &domainName, uint32 version);
141 // Message serializer. Return the message received in reference for easier integration
142 static const NLNET::CMessage &buildMessageFor_launchVersion(NLNET::CMessage &__message, const NLMISC::CSString &domainName, uint32 version);
144 // Message serializer. Return the message received in reference for easier integration
145 static const NLNET::CMessage &buildMessageFor_executeCommand(NLNET::CMessage &__message, const NLMISC::CSString &cmdline, const NLMISC::CSString &originator);
154 #endif