EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PetitionerService.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: Zhur
24  Updates: Allan
25 */
26 
27 #include "eve-server.h"
28 
29 #include "PyServiceCD.h"
31 
32 
34 
36 : PyService(mgr, "petitioner"),
37  m_dispatch(new Dispatcher(this))
38 {
39  _SetCallDispatcher(m_dispatch);
40 
41  PyCallable_REG_CALL(PetitionerService, GetCategories);
42  PyCallable_REG_CALL(PetitionerService, GetCategoryHierarchicalInfo);
43  PyCallable_REG_CALL(PetitionerService, GetUnreadMessages);
44 }
45 
47  delete m_dispatch;
48 }
49 
50 
51 /*
52  *
53  *
54  catCountry = sm.RemoteSvc('petitioner').GetUserCatalogCountry()
55 
56  can = sm.RemoteSvc('petitioner').MayPetition(categoryID, OocCharacterID)
57 
58  self.properties = sm.RemoteSvc('petitioner').GetCategoryProperties(self.category[0])
59  populationInfo = sm.RemoteSvc('petitioner').PropertyPopulationInfo(property.inputInfo, self.OocCharacterID)
60  populationRecords = sm.RemoteSvc('petitioner').GetClientPickerInfo(filterString, elementName)
61  queues = sm.RemoteSvc('petitioner').GetQueues()
62 
63  self.categories = sm.RemoteSvc('petitioner').GetCategories()
64  sm.RemoteSvc('petitioner').CreatePetition(subject, petition, categoryID, retval, OocCharacterID, combatLog=combatLog, chatLog=chatLog):
65  sm.RemoteSvc('petitioner').CreatePetition(subject, petition, categoryID, None, self.OocCharacterID, chatLog, combatLog, propertyList)
66 
67  sm.RemoteSvc('petitioner').MarkAsRead(messageID)
68 
69  newMessages = sm.RemoteSvc('petitioner').GetUnreadMessages()
70  self.NewMessage(newMessages[0].petitionID, newMessages[0].text, newMessages[0].messageID)
71 
72  self.mine = sm.RemoteSvc('petitioner').GetMyPetitionsEx()
73 
74  sm.RemoteSvc('petitioner').EscalatePetition(petitionid, escalatesTo)
75  sm.RemoteSvc('petitioner').ClaimPetition(p.petitionID)
76  sm.RemoteSvc('petitioner').UnClaimPetition(petitionid)
77  mp = sm.RemoteSvc('petitioner').GetClaimedPetitions()
78  for p in mp:
79  if p.petitionerID not in owners:
80 
81 
82  parentCategoryDict, childCategoryDict, descriptionDict, self.billingCategories = sm.RemoteSvc('petitioner').GetCategoryHierarchicalInfo()
83 
84  sm.RemoteSvc('petitioner').UpdatePetitionRating(p.petitionID, responseTimeRating, helpfulnessRating, attitudeRating, newComment)
85 
86  sm.RemoteSvc('petitioner').AddPetitionRating(p.petitionID, responseTimeRating, helpfulnessRating, attitudeRating, newComment, wnd.sr.ratingtime)
87 
88 
89  mp = sm.RemoteSvc('petitioner').GetPetitionQueue(queueID)
90  for p in mp:
91  if p.petitionerID and p.petitionerID not in owners:
92  *
93 
94  pmsgs = sm.RemoteSvc('petitioner').GetPetitionMessages(p.petitionID)
95  for pm in pmsgs:
96  if pm.senderID is not None and pm.senderID not in owners:
97  *
98 
99  plogs = sm.RemoteSvc('petitioner').GetLog(p.petitionID)
100  texts = sm.RemoteSvc('petitioner').GetEvents()
101  *
102 
103  sm.RemoteSvc('petitioner').PetitioneeChat(petitionid, message, comment)
104  sm.RemoteSvc('petitioner').PetitionerChat(petitionid, message)
105 
106 
107  sm.RemoteSvc('petitioner').CancelPetition(petitionid)
108  sm.RemoteSvc('petitioner').ClosePetition(petitionid)
109  */
110 
111 
112 PyResult PetitionerService::Handle_GetCategories( PyCallArgs& call )
113 {
114  uint8 size = call.tuple->size();
115  sLog.White( "PetitionerService::Handle_GetCategories()", "size=%u ", size );
116 
117  PyList* result = new PyList();
118  result->AddItemString( "Test Cat" );
119  result->AddItemString( "Test Cat2" );
120 
121  return result;
122 }
123 
124 PyResult PetitionerService::Handle_GetCategoryHierarchicalInfo( PyCallArgs& call )
125 {
126  uint8 size = call.tuple->size();
127  sLog.White( "PetitionerService::Handle_GetCategoryHierarchicalInfo()", "size=%u ", size );
128 
129  return new PyList();
130 }
131 
132 //00:28:58 L PetitionerService::Handle_GetUnreadMessages(): size=0
133 PyResult PetitionerService::Handle_GetUnreadMessages( PyCallArgs& call )
134 {
135  //unknown...
136  return new PyList();
137 }
Dispatcher *const m_dispatch
unsigned __int8 uint8
Definition: eve-compat.h:46
size_t size() const
Definition: PyRep.h:591
#define sLog
Evaluates to a NewLog instance.
Definition: LogNew.h:250
#define PyCallable_REG_CALL(c, m)
Definition: PyServiceCD.h:78
void AddItemString(const char *str)
Definition: PyRep.h:705
PyCallable_Make_InnerDispatcher(PetitionerService) PetitionerService
Dispatcher *const m_dispatch
Python list.
Definition: PyRep.h:639
PyTuple * tuple
Definition: PyCallable.h:50