EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
InfoGatheringMgr.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: ozatomic
24 */
25 
26 #include "eve-server.h"
27 
28 #include "PyServiceCD.h"
30 
32 
34 : PyService(mgr, "infoGatheringMgr"),
35  m_dispatch(new Dispatcher(this))
36 {
37  _SetCallDispatcher(m_dispatch);
38 
39  PyCallable_REG_CALL(InfoGatheringMgr, GetStateAndConfig);
40  PyCallable_REG_CALL(InfoGatheringMgr, LogInfoEventsFromClient);
41 
42 }
43 
45  delete m_dispatch;
46 }
47 
48 PyResult InfoGatheringMgr::Handle_GetStateAndConfig(PyCallArgs &call) {
49 
50  PyDict *rsp = new PyDict();
51 
52  rsp->SetItemString("clientWorkerInterval", new PyInt(600000)); //Default From packetlogs is 600000
53  rsp->SetItemString("isEnabled", new PyInt(0)); //0 = Disabled, 1 = Enabled. Set to 0 becuase jsut gettting rid of exception.
54 
55  rsp->SetItemString("infoTypeAggregates", PyStatic.NewNone());
56  rsp->SetItemString("infoTypesOncePerRun", PyStatic.NewNone());
57  rsp->SetItemString("infoTypeParameters", PyStatic.NewNone());
58 
59  PyList *infoTypes = new PyList();
60  infoTypes->AddItemInt(999); //Adding a value that was not in live so when its checks list it will always return false for now.
61 
62  rsp->SetItemString("infoTypes", new PyObjectEx_Type1( new PyToken("__builtin__.set"), new_tuple(infoTypes)));
63 
64  return new PyObject( "util.KeyVal", rsp );
65 }
66 
67 PyResult InfoGatheringMgr::Handle_LogInfoEventsFromClient(PyCallArgs &call) {
68  return PyStatic.NewNone();
69 }
70 
71 /*
72  * ==================== Sent from Client 95 bytes
73  *
74  * [PyObjectData Name: macho.CallReq]
75  * [PyTuple 7 items]
76  * [PyInt 6]
77  * [PyObjectData Name: macho.MachoAddress]
78  * [PyTuple 4 items]
79  * [PyInt 2]
80  * [PyInt 0]
81  * [PyIntegerVar 103]
82  * [PyNone]
83  * [PyObjectData Name: macho.MachoAddress]
84  * [PyTuple 3 items]
85  * [PyInt 8]
86  * [PyString "infoGatheringMgr"]
87  * [PyNone]
88  * [PyInt 5654387]
89  * [PyTuple 1 items]
90  * [PyTuple 2 items]
91  * [PyInt 0]
92  * [PySubStream 33 bytes]
93  * [PyTuple 4 items]
94  * [PyInt 1]
95  * [PyString "GetStateAndConfig"]
96  * [PyTuple 0 items]
97  * [PyDict 1 kvp]
98  * [PyString "machoVersion"]
99  * [PyInt 1]
100  * [PyNone]
101  * [PyNone]
102  *
103  *
104  * ==================== Sent from Server 463 bytes [Compressed]
105  *
106  * [PyObjectData Name: macho.CallRsp]
107  * [PyTuple 7 items]
108  * [PyInt 7]
109  * [PyObjectData Name: macho.MachoAddress]
110  * [PyTuple 3 items]
111  * [PyInt 8]
112  * [PyString "infoGatheringMgr"]
113  * [PyNone]
114  * [PyObjectData Name: macho.MachoAddress]
115  * [PyTuple 4 items]
116  * [PyInt 2]
117  * [PyIntegerVar 77871000001103]
118  * [PyIntegerVar 103]
119  * [PyNone]
120  * [PyInt 5654387]
121  * [PyTuple 1 items]
122  * [PySubStream 907 bytes]
123  * [PyObjectData Name: util.KeyVal]
124  * [PyDict 6 kvp]
125  * [PyString "clientWorkerInterval"]
126  * [PyInt 600000]
127  * [PyString "isEnabled"]
128  * [PyInt 1]
129  * [PyString "infoTypeAggregates"]
130  * [PyDict 19 kvp]
131  * [PyInt 2]
132  * [PyObjectEx Normal]
133  * [PyTuple 2 items]
134  * [PyToken __builtin__.set]
135  * [PyTuple 1 items]
136  * [PyList 3 items]
137  * [PyInt 1]
138  * [PyInt 2]
139  * [PyInt 3]
140  * [PyInt 3]
141  * [PyObjectEx Normal]
142  * [PyTuple 2 items]
143  * [PyToken __builtin__.set]
144  * [PyTuple 1 items]
145  * [PyList 3 items]
146  * [PyInt 1]
147  * [PyInt 2]
148  * [PyInt 6]
149  * [PyInt 4]
150  * [PyObjectEx Normal]
151  * [PyTuple 2 items]
152  * [PyToken __builtin__.set]
153  * [PyTuple 1 items]
154  * [PyList 3 items]
155  * [PyInt 1]
156  * [PyInt 2]
157  * [PyInt 6]
158  * [PyInt 5]
159  * [PyObjectEx Normal]
160  * [PyTuple 2 items]
161  * [PyToken __builtin__.set]
162  * [PyTuple 1 items]
163  * [PyList 3 items]
164  * [PyInt 1]
165  * [PyInt 2]
166  * [PyInt 6]
167  * [PyInt 6]
168  * [PyObjectEx Normal]
169  * [PyTuple 2 items]
170  * [PyToken __builtin__.set]
171  * [PyTuple 1 items]
172  * [PyList 4 items]
173  * [PyInt 1]
174  * [PyInt 2]
175  * [PyInt 3]
176  * [PyInt 4]
177  * [PyInt 7]
178  * [PyObjectEx Normal]
179  * [PyTuple 2 items]
180  * [PyToken __builtin__.set]
181  * [PyTuple 1 items]
182  * [PyList 1 items]
183  * [PyInt 1]
184  * [PyInt 8]
185  * [PyObjectEx Normal]
186  * [PyTuple 2 items]
187  * [PyToken __builtin__.set]
188  * [PyTuple 1 items]
189  * [PyList 2 items]
190  * [PyInt 1]
191  * [PyInt 4]
192  * [PyInt 9]
193  * [PyObjectEx Normal]
194  * [PyTuple 2 items]
195  * [PyToken __builtin__.set]
196  * [PyTuple 1 items]
197  * [PyList 2 items]
198  * [PyInt 1]
199  * [PyInt 4]
200  * [PyInt 12]
201  * [PyObjectEx Normal]
202  * [PyTuple 2 items]
203  * [PyToken __builtin__.set]
204  * [PyTuple 1 items]
205  * [PyList 3 items]
206  * [PyInt 1]
207  * [PyInt 2]
208  * [PyInt 3]
209  * [PyInt 13]
210  * [PyObjectEx Normal]
211  * [PyTuple 2 items]
212  * [PyToken __builtin__.set]
213  * [PyTuple 1 items]
214  * [PyList 3 items]
215  * [PyInt 1]
216  * [PyInt 2]
217  * [PyInt 3]
218  * [PyInt 14]
219  * [PyObjectEx Normal]
220  * [PyTuple 2 items]
221  * [PyToken __builtin__.set]
222  * [PyTuple 1 items]
223  * [PyList 3 items]
224  * [PyInt 1]
225  * [PyInt 2]
226  * [PyInt 3]
227  * [PyInt 17]
228  * [PyObjectEx Normal]
229  * [PyTuple 2 items]
230  * [PyToken __builtin__.set]
231  * [PyTuple 1 items]
232  * [PyList 1 items]
233  * [PyInt 1]
234  * [PyInt 18]
235  * [PyObjectEx Normal]
236  * [PyTuple 2 items]
237  * [PyToken __builtin__.set]
238  * [PyTuple 1 items]
239  * [PyList 2 items]
240  * [PyInt 1]
241  * [PyInt 3]
242  * [PyInt 19]
243  * [PyObjectEx Normal]
244  * [PyTuple 2 items]
245  * [PyToken __builtin__.set]
246  * [PyTuple 1 items]
247  * [PyList 2 items]
248  * [PyInt 1]
249  * [PyInt 2]
250  * [PyInt 20]
251  * [PyObjectEx Normal]
252  * [PyTuple 2 items]
253  * [PyToken __builtin__.set]
254  * [PyTuple 1 items]
255  * [PyList 2 items]
256  * [PyInt 1]
257  * [PyInt 3]
258  * [PyInt 21]
259  * [PyObjectEx Normal]
260  * [PyTuple 2 items]
261  * [PyToken __builtin__.set]
262  * [PyTuple 1 items]
263  * [PyList 2 items]
264  * [PyInt 1]
265  * [PyInt 3]
266  * [PyInt 22]
267  * [PyObjectEx Normal]
268  * [PyTuple 2 items]
269  * [PyToken __builtin__.set]
270  * [PyTuple 1 items]
271  * [PyList 5 items]
272  * [PyInt 1]
273  * [PyInt 2]
274  * [PyInt 3]
275  * [PyInt 4]
276  * [PyInt 5]
277  * [PyInt 25]
278  * [PyObjectEx Normal]
279  * [PyTuple 2 items]
280  * [PyToken __builtin__.set]
281  * [PyTuple 1 items]
282  * [PyList 1 items]
283  * [PyInt 6]
284  * [PyInt 26]
285  * [PyObjectEx Normal]
286  * [PyTuple 2 items]
287  * [PyToken __builtin__.set]
288  * [PyTuple 1 items]
289  * [PyList 1 items]
290  * [PyInt 1]
291  * [PyString "infoTypesOncePerRun"]
292  * [PyObjectEx Normal]
293  * [PyTuple 2 items]
294  * [PyToken __builtin__.set]
295  * [PyTuple 1 items]
296  * [PyList 0 items]
297  * [PyString "infoTypeParameters"]
298  * [PyDict 22 kvp]
299  * [PyInt 2]
300  * [PyObjectEx Normal]
301  * [PyTuple 2 items]
302  * [PyToken __builtin__.set]
303  * [PyTuple 1 items]
304  * [PyList 5 items]
305  * [PyInt 0]
306  * [PyInt 1]
307  * [PyInt 2]
308  * [PyInt 3]
309  * [PyInt 4]
310  * [PyInt 3]
311  * [PyObjectEx Normal]
312  * [PyTuple 2 items]
313  * [PyToken __builtin__.set]
314  * [PyTuple 1 items]
315  * [PyList 5 items]
316  * [PyInt 0]
317  * [PyInt 1]
318  * [PyInt 2]
319  * [PyInt 3]
320  * [PyInt 6]
321  * [PyInt 4]
322  * [PyObjectEx Normal]
323  * [PyTuple 2 items]
324  * [PyToken __builtin__.set]
325  * [PyTuple 1 items]
326  * [PyList 5 items]
327  * [PyInt 0]
328  * [PyInt 1]
329  * [PyInt 2]
330  * [PyInt 3]
331  * [PyInt 6]
332  * [PyInt 5]
333  * [PyObjectEx Normal]
334  * [PyTuple 2 items]
335  * [PyToken __builtin__.set]
336  * [PyTuple 1 items]
337  * [PyList 5 items]
338  * [PyInt 0]
339  * [PyInt 1]
340  * [PyInt 2]
341  * [PyInt 3]
342  * [PyInt 6]
343  * [PyInt 6]
344  * [PyObjectEx Normal]
345  * [PyTuple 2 items]
346  * [PyToken __builtin__.set]
347  * [PyTuple 1 items]
348  * [PyList 6 items]
349  * [PyInt 0]
350  * [PyInt 1]
351  * [PyInt 2]
352  * [PyInt 3]
353  * [PyInt 4]
354  * [PyInt 5]
355  * [PyInt 7]
356  * [PyObjectEx Normal]
357  * [PyTuple 2 items]
358  * [PyToken __builtin__.set]
359  * [PyTuple 1 items]
360  * [PyList 3 items]
361  * [PyInt 0]
362  * [PyInt 1]
363  * [PyInt 3]
364  * [PyInt 8]
365  * [PyObjectEx Normal]
366  * [PyTuple 2 items]
367  * [PyToken __builtin__.set]
368  * [PyTuple 1 items]
369  * [PyList 4 items]
370  * [PyInt 0]
371  * [PyInt 1]
372  * [PyInt 3]
373  * [PyInt 4]
374  * [PyInt 9]
375  * [PyObjectEx Normal]
376  * [PyTuple 2 items]
377  * [PyToken __builtin__.set]
378  * [PyTuple 1 items]
379  * [PyList 4 items]
380  * [PyInt 0]
381  * [PyInt 1]
382  * [PyInt 3]
383  * [PyInt 4]
384  * [PyInt 12]
385  * [PyObjectEx Normal]
386  * [PyTuple 2 items]
387  * [PyToken __builtin__.set]
388  * [PyTuple 1 items]
389  * [PyList 5 items]
390  * [PyInt 0]
391  * [PyInt 1]
392  * [PyInt 2]
393  * [PyInt 3]
394  * [PyInt 4]
395  * [PyInt 13]
396  * [PyObjectEx Normal]
397  * [PyTuple 2 items]
398  * [PyToken __builtin__.set]
399  * [PyTuple 1 items]
400  * [PyList 5 items]
401  * [PyInt 0]
402  * [PyInt 1]
403  * [PyInt 2]
404  * [PyInt 3]
405  * [PyInt 9]
406  * [PyInt 14]
407  * [PyObjectEx Normal]
408  * [PyTuple 2 items]
409  * [PyToken __builtin__.set]
410  * [PyTuple 1 items]
411  * [PyList 5 items]
412  * [PyInt 0]
413  * [PyInt 1]
414  * [PyInt 2]
415  * [PyInt 3]
416  * [PyInt 9]
417  * [PyInt 15]
418  * [PyObjectEx Normal]
419  * [PyTuple 2 items]
420  * [PyToken __builtin__.set]
421  * [PyTuple 1 items]
422  * [PyList 6 items]
423  * [PyInt 0]
424  * [PyInt 1]
425  * [PyInt 2]
426  * [PyInt 3]
427  * [PyInt 4]
428  * [PyInt 5]
429  * [PyInt 16]
430  * [PyObjectEx Normal]
431  * [PyTuple 2 items]
432  * [PyToken __builtin__.set]
433  * [PyTuple 1 items]
434  * [PyList 8 items]
435  * [PyInt 0]
436  * [PyInt 1]
437  * [PyInt 2]
438  * [PyInt 3]
439  * [PyInt 4]
440  * [PyInt 5]
441  * [PyInt 9]
442  * [PyInt 10]
443  * [PyInt 17]
444  * [PyObjectEx Normal]
445  * [PyTuple 2 items]
446  * [PyToken __builtin__.set]
447  * [PyTuple 1 items]
448  * [PyList 5 items]
449  * [PyInt 0]
450  * [PyInt 1]
451  * [PyInt 3]
452  * [PyInt 4]
453  * [PyInt 5]
454  * [PyInt 18]
455  * [PyObjectEx Normal]
456  * [PyTuple 2 items]
457  * [PyToken __builtin__.set]
458  * [PyTuple 1 items]
459  * [PyList 4 items]
460  * [PyInt 0]
461  * [PyInt 1]
462  * [PyInt 3]
463  * [PyInt 4]
464  * [PyInt 19]
465  * [PyObjectEx Normal]
466  * [PyTuple 2 items]
467  * [PyToken __builtin__.set]
468  * [PyTuple 1 items]
469  * [PyList 6 items]
470  * [PyInt 0]
471  * [PyInt 1]
472  * [PyInt 2]
473  * [PyInt 3]
474  * [PyInt 4]
475  * [PyInt 5]
476  * [PyInt 20]
477  * [PyObjectEx Normal]
478  * [PyTuple 2 items]
479  * [PyToken __builtin__.set]
480  * [PyTuple 1 items]
481  * [PyList 4 items]
482  * [PyInt 0]
483  * [PyInt 1]
484  * [PyInt 3]
485  * [PyInt 4]
486  * [PyInt 21]
487  * [PyObjectEx Normal]
488  * [PyTuple 2 items]
489  * [PyToken __builtin__.set]
490  * [PyTuple 1 items]
491  * [PyList 4 items]
492  * [PyInt 0]
493  * [PyInt 1]
494  * [PyInt 3]
495  * [PyInt 4]
496  * [PyInt 22]
497  * [PyObjectEx Normal]
498  * [PyTuple 2 items]
499  * [PyToken __builtin__.set]
500  * [PyTuple 1 items]
501  * [PyList 7 items]
502  * [PyInt 0]
503  * [PyInt 1]
504  * [PyInt 2]
505  * [PyInt 3]
506  * [PyInt 4]
507  * [PyInt 5]
508  * [PyInt 9]
509  * [PyInt 24]
510  * [PyObjectEx Normal]
511  * [PyTuple 2 items]
512  * [PyToken __builtin__.set]
513  * [PyTuple 1 items]
514  * [PyList 4 items]
515  * [PyInt 0]
516  * [PyInt 1]
517  * [PyInt 2]
518  * [PyInt 3]
519  * [PyInt 25]
520  * [PyObjectEx Normal]
521  * [PyTuple 2 items]
522  * [PyToken __builtin__.set]
523  * [PyTuple 1 items]
524  * [PyList 4 items]
525  * [PyInt 0]
526  * [PyInt 1]
527  * [PyInt 6]
528  * [PyInt 9]
529  * [PyInt 26]
530  * [PyObjectEx Normal]
531  * [PyTuple 2 items]
532  * [PyToken __builtin__.set]
533  * [PyTuple 1 items]
534  * [PyList 3 items]
535  * [PyInt 0]
536  * [PyInt 1]
537  * [PyInt 3]
538  * [PyString "infoTypes"]
539  * [PyObjectEx Normal]
540  * [PyTuple 2 items]
541  * [PyToken __builtin__.set]
542  * [PyTuple 1 items]
543  * [PyList 22 items]
544  * [PyInt 2]
545  * [PyInt 3]
546  * [PyInt 4]
547  * [PyInt 5]
548  * [PyInt 6]
549  * [PyInt 7]
550  * [PyInt 8]
551  * [PyInt 9]
552  * [PyInt 12]
553  * [PyInt 13]
554  * [PyInt 14]
555  * [PyInt 15]
556  * [PyInt 16]
557  * [PyInt 17]
558  * [PyInt 18]
559  * [PyInt 19]
560  * [PyInt 20]
561  * [PyInt 21]
562  * [PyInt 22]
563  * [PyInt 24]
564  * [PyInt 25]
565  * [PyInt 26]
566  * [PyNone]
567  * [PyNone]
568  *
569  */
Dispatcher *const m_dispatch
Python's dictionary.
Definition: PyRep.h:719
virtual ~InfoGatheringMgr()
Python object.
Definition: PyRep.h:826
PyTuple * new_tuple(int64 arg1)
Definition: PyRep.cpp:1160
Python integer.
Definition: PyRep.h:231
#define PyStatic
Definition: PyRep.h:1209
void AddItemInt(int32 intval)
Definition: PyRep.h:702
#define PyCallable_REG_CALL(c, m)
Definition: PyServiceCD.h:78
Python token (eg. class name).
Definition: PyRep.h:522
Wrapper class for PyObjectEx of type 1.
Definition: PyRep.h:911
Dispatcher *const m_dispatch
PyCallable_Make_InnerDispatcher(InfoGatheringMgr) InfoGatheringMgr
Python list.
Definition: PyRep.h:639
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
Definition: PyRep.h:812