EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
LPService.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, Allan
24 */
25 
26 #include "eve-server.h"
27 
28 #include "PyServiceCD.h"
29 #include "corporation/LPService.h"
30 
32 
34 : PyService(mgr, "LPSvc"),
35  m_dispatch(new Dispatcher(this))
36 {
37  _SetCallDispatcher(m_dispatch);
38 
39  PyCallable_REG_CALL(LPService, TakeOffer);
40  PyCallable_REG_CALL(LPService, ExchangeConcordLP);
41  PyCallable_REG_CALL(LPService, GetLPExchangeRates);
42  PyCallable_REG_CALL(LPService, GetLPsForCharacter);
43  PyCallable_REG_CALL(LPService, GetLPForCharacterCorp);
44  PyCallable_REG_CALL(LPService, GetAvailableOffersFromCorp);
45 
46 }
47 
49 {
50  delete m_dispatch;
51 }
52 
53 PyResult LPService::Handle_TakeOffer( PyCallArgs& call )
54 {
57  sLog.White( "LPService::Handle_TakeOffer()", "size= %u", call.tuple->size() );
58 
59  call.Dump(SERVICE__CALL_DUMP);
60  return new PyList;
61 }
62 
63 PyResult LPService::Handle_ExchangeConcordLP( PyCallArgs& call )
64 {
67  sLog.White( "LPService::Handle_ExchangeConcordLP()", "size= %u", call.tuple->size() );
68 
69  call.Dump(SERVICE__CALL_DUMP);
70  return new PyList;
71 }
72 
73 //17:09:54 L LPService::Handle_GetLPExchangeRates(): size= 0
74 PyResult LPService::Handle_GetLPExchangeRates( PyCallArgs& call )
75 {
85  return new PyList;
86 }
87 
88 //18:46:38 L CharMgrService::Handle_GetLPForCharacterCorp(): size= 1, 0=Integer(1000049)
89 PyResult LPService::Handle_GetLPForCharacterCorp( PyCallArgs& call )
90 {
103  return new PyInt( 0 );
104 }
105 
106 // //06:01:19 LPService::Handle_GetLPsForCharacter(): size= 0
107 PyResult LPService::Handle_GetLPsForCharacter( PyCallArgs& call )
108 {
109  //no args
110  sLog.White( "LPService::Handle_GetLPsForCharacter()", "size= %u", call.tuple->size() );
111 
112  //call.Dump(SERVICE__CALL_DUMP);
113  return new PyList;
114 }
115 
116 //18:55:57 L CharMgrService::Handle_GetAvailableOffersFromCorp(): size=2, 0=Integer(), 1=Boolean()
117 PyResult LPService::Handle_GetAvailableOffersFromCorp( PyCallArgs& call )
118 {
130 /*
131  [PyList 326 items]
132  [PyObjectData Name: util.KeyVal]
133  [PyDict 6 kvp]
134  [PyString "typeID"]
135  [PyInt 23047]
136  [PyString "iskCost"]
137  [PyInt 2400000]
138  [PyString "reqItems"]
139  [PyList 1 items]
140  [PyTuple 2 items]
141  [PyInt 234]
142  [PyInt 5000]
143  [PyString "offerID"]
144  [PyInt 3584]
145  [PyString "qty"]
146  [PyInt 5000]
147  [PyString "lpCost"]
148  [PyInt 2400]
149  [PyObjectData Name: util.KeyVal]
150  [PyDict 6 kvp]
151  [PyString "typeID"]
152  [PyInt 23033]
153  [PyString "iskCost"]
154  [PyInt 1600000]
155  [PyString "reqItems"]
156  [PyList 1 items]
157  [PyTuple 2 items]
158  [PyInt 226]
159  [PyInt 5000]
160  [PyString "offerID"]
161  [PyInt 3585]
162  [PyString "qty"]
163  [PyInt 5000]
164  [PyString "lpCost"]
165  [PyInt 1600]
166  */
167  return new PyList;
168 }
169 
170 
PyCallable_Make_InnerDispatcher(LPService) LPService
Definition: LPService.cpp:31
Dispatcher *const m_dispatch
size_t size() const
Definition: PyRep.h:591
#define sLog
Evaluates to a NewLog instance.
Definition: LogNew.h:250
Python integer.
Definition: PyRep.h:231
#define PyCallable_REG_CALL(c, m)
Definition: PyServiceCD.h:78
void Dump(LogType type) const
Definition: PyCallable.cpp:81
Dispatcher *const m_dispatch
Definition: LPService.h:39
Python list.
Definition: PyRep.h:639
PyTuple * tuple
Definition: PyCallable.h:50