EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
UserService.cpp
Go to the documentation of this file.
1 /*
2  ------------------------------------------------------------------------------------
3  LICENSE:
4  ------------------------------------------------------------------------------------
5  This file is part of EVEmu: EVE Online Server Emulator
6  Copyright 2006 - 2021 The EVEmu Team
7  For the latest information visit https://evemu.dev
8  ------------------------------------------------------------------------------------
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License along with
19  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20  Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21  http://www.gnu.org/copyleft/lesser.txt.
22  ------------------------------------------------------------------------------------
23  Author: Bloody.Rabbit
24 */
25 
26 #include "eve-server.h"
27 
28 #include "PyServiceCD.h"
29 #include "account/UserService.h"
30 
32 
34 : PyService(mgr, "movementServer"),
35 m_dispatch(new Dispatcher(this))
36 {
37  _SetCallDispatcher(m_dispatch);
38 
39  PyCallable_REG_CALL(MovementService, ResolveNodeID);
40 }
41 
43  delete m_dispatch;
44 }
45 
46 PyResult MovementService::Handle_ResolveNodeID( PyCallArgs& call )
47 {
48  sLog.Yellow( "MovementService", "Handle_ResolveNodeID" );
49  call.Dump(CHARACTER__DEBUG);
50 
51  return new PyInt(888444);
52 }
53 
55 
57 : PyService(mgr, "userSvc"),
58  m_dispatch(new Dispatcher(this))
59 {
60  _SetCallDispatcher(m_dispatch);
61 
62  PyCallable_REG_CALL(UserService, GetRedeemTokens);
63  PyCallable_REG_CALL(UserService, ReverseRedeem);
64  PyCallable_REG_CALL(UserService, GetCreateDate);
65  PyCallable_REG_CALL(UserService, ReportISKSpammer);
66  PyCallable_REG_CALL(UserService, ReportBot);
67  PyCallable_REG_CALL(UserService, ApplyPilotLicence);
68 }
69 
71  delete m_dispatch;
72 }
73 
74 PyResult UserService::Handle_GetRedeemTokens( PyCallArgs& call )
75 {
76  /*
77  sLog.Yellow( "UserService", "Handle_GetRedeemTokens" );
78  call.Dump(SERVICE__CALL_DUMP);
79  * ==================== Sent from Client 84 bytes
80  *
81  * [PyObjectData Name: macho.CallReq]
82  * [PyTuple 7 items]
83  * [PyInt 6]
84  * [PyObjectData Name: macho.MachoAddress]
85  * [PyTuple 4 items]
86  * [PyInt 2]
87  * [PyInt 0]
88  * [PyIntegerVar 13]
89  * [PyNone]
90  * [PyObjectData Name: macho.MachoAddress]
91  * [PyTuple 3 items]
92  * [PyInt 8]
93  * [PyString "userSvc"]
94  * [PyNone]
95  * [PyInt 5654387]
96  * [PyTuple 1 items]
97  * [PyTuple 2 items]
98  * [PyInt 0]
99  * [PySubStream 31 bytes]
100  * [PyTuple 4 items]
101  * [PyInt 1]
102  * [PyString "GetRedeemTokens"]
103  * [PyTuple 0 items]
104  * [PyDict 1 kvp]
105  * [PyString "machoVersion"]
106  * [PyInt 1]
107  * [PyNone]
108  * [PyNone]
109  *
110  *
111  *
112  * ==================== Sent from Server 200 bytes [Compressed]
113  *
114  * [PyObjectData Name: macho.CallRsp]
115  * [PyTuple 7 items]
116  * [PyInt 7]
117  * [PyObjectData Name: macho.MachoAddress]
118  * [PyTuple 3 items]
119  * [PyInt 8]
120  * [PyString "userSvc"]
121  * [PyNone]
122  * [PyObjectData Name: macho.MachoAddress]
123  * [PyTuple 4 items]
124  * [PyInt 2]
125  * [PyIntegerVar 241241000001103]
126  * [PyIntegerVar 13]
127  * [PyNone]
128  * [PyInt 5654387]
129  * [PyTuple 1 items]
130  * [PySubStream 173 bytes]
131  * [PyObjectEx Type2]
132  * [PyTuple 2 items]
133  * [PyTuple 1 items]
134  * [PyToken dbutil.CRowset]
135  * [PyDict 1 kvp]
136  * [PyString "header"]
137  * [PyObjectEx Normal]
138  * [PyTuple 2 items]
139  * [PyToken blue.DBRowDescriptor]
140  * [PyTuple 1 items]
141  * [PyTuple 10 items]
142  * [PyTuple 2 items]
143  * [PyString "tokenID"]
144  * [PyInt 3]
145  * [PyTuple 2 items]
146  * [PyString "massTokenID"]
147  * [PyInt 3]
148  * [PyTuple 2 items]
149  * [PyString "typeID"]
150  * [PyInt 3]
151  * [PyTuple 2 items]
152  * [PyString "quantity"]
153  * [PyInt 3]
154  * [PyTuple 2 items]
155  * [PyString "label"]
156  * [PyInt 130]
157  * [PyTuple 2 items]
158  * [PyString "description"]
159  * [PyInt 130]
160  * [PyTuple 2 items]
161  * [PyString "dateTime"]
162  * [PyInt 64]
163  * [PyTuple 2 items]
164  * [PyString "expireDateTime"]
165  * [PyInt 64]
166  * [PyTuple 2 items]
167  * [PyString "availableDateTime"]
168  * [PyInt 64]
169  * [PyTuple 2 items]
170  * [PyString "stationID"]
171  * [PyInt 3]
172  * [PyNone]
173  * [PyNone]
174  *
175  */
176 
177  return new PyList();
178 }
179 
180 PyResult UserService::Handle_ReverseRedeem( PyCallArgs& call )
181 {
182  //sm.RemoteSvc('userSvc').ReverseRedeem(item.itemID)
183  sLog.Yellow( "UserService", "Handle_ReverseRedeem" );
184  call.Dump(CHARACTER__DEBUG);
185 
186  return nullptr;
187 
188  /* {'messageKey': 'ReverseRedeemingCompleted', 'dataID': 17877681, 'suppressable': False, 'bodyID': 257344, 'messageType': 'info', 'urlAudio': '', 'urlIcon': '', 'titleID': 257343, 'messageID': 2917}
189  * {'messageKey': 'ReverseRedeemingFatalError', 'dataID': 17877443, 'suppressable': False, 'bodyID': 257253, 'messageType': 'error', 'urlAudio': '', 'urlIcon': '', 'titleID': 257252, 'messageID': 2918}
190  * {'messageKey': 'ReverseRedeemingIllegalType', 'dataID': 17877511, 'suppressable': False, 'bodyID': 257279, 'messageType': 'info', 'urlAudio': '', 'urlIcon': '', 'titleID': 257278, 'messageID': 2913}
191  * {'messageKey': 'ReverseRedeemingOnlyInStation', 'dataID': 17877516, 'suppressable': False, 'bodyID': 257281, 'messageType': 'info', 'urlAudio': '', 'urlIcon': '', 'titleID': 257280, 'messageID': 2911}
192  * {'messageKey': 'ReverseRedeemingYouDoNotOwnItem', 'dataID': 17877433, 'suppressable': False, 'bodyID': 257249, 'messageType': 'info', 'urlAudio': '', 'urlIcon': '', 'titleID': 257248, 'messageID': 2914}
193  */
194 }
195 
196 PyResult UserService::Handle_GetCreateDate( PyCallArgs& call )
197 {
198  return new PyLong(call.client->GetChar()->createDateTime());
199 }
200 
201 PyResult UserService::Handle_ReportISKSpammer( PyCallArgs& call )
202 {
203  // sm.RemoteSvc('userSvc').ReportISKSpammer(charID, channelID, spamEntries)
204  sLog.Yellow( "UserService", "Handle_ReportISKSpammer" );
205  call.Dump(CHARACTER__DEBUG);
206 
207  return nullptr;
208 }
209 
210 PyResult UserService::Handle_ReportBot( PyCallArgs& call )
211 {
212  sLog.Yellow( "UserService", "Handle_ReportBot" );
213  call.Dump(CHARACTER__DEBUG);
214 
215  return nullptr;
216 }
217 
218 PyResult UserService::Handle_ApplyPilotLicence( PyCallArgs& call )
219 {
220  //sm.RemoteSvc('userSvc').ApplyPilotLicence(itemID, justQuery=True)
221  sLog.Yellow( "UserService", "Handle_ApplyPilotLicence" );
222  call.Dump(CHARACTER__DEBUG);
223 
224  return nullptr;
225 }
Dispatcher *const m_dispatch
PyCallable_Make_InnerDispatcher(MovementService) MovementService
Definition: UserService.cpp:31
CharacterRef GetChar() const
Definition: Client.h:164
#define sLog
Evaluates to a NewLog instance.
Definition: LogNew.h:250
Dispatcher *const m_dispatch
Definition: UserService.h:39
Python integer.
Definition: PyRep.h:231
int64 createDateTime() const
Definition: Character.h:339
Client *const client
Definition: PyCallable.h:49
#define PyCallable_REG_CALL(c, m)
Definition: PyServiceCD.h:78
void Dump(LogType type) const
Definition: PyCallable.cpp:81
Python list.
Definition: PyRep.h:639
Python long integer.
Definition: PyRep.h:261
Dispatcher *const m_dispatch
Definition: UserService.h:58