86 Call_SingleIntegerArg
args;
87 if (!args.Decode(&call.
tuple)) {
88 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
117 Call_SingleIntegerArg
args;
118 if (!args.Decode(&call.
tuple)) {
119 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
128 _log(CORP__CALL,
"CorporationService::Handle_GetRecruitmentAdRegistryData()");
129 call.
Dump(CORP__CALL_DUMP);
136 args->
Dump(CORP__RSP_DUMP,
"");
142 _log(CORP__CALL,
"CorporationService::Handle_GetRecruitmentAdsByCriteria()");
143 call.
Dump(CORP__CALL_DUMP);
145 Call_GetRecruitmentAdsByCriteria
args;
146 if (!args.Decode(&call.
tuple)) {
147 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
154 PyResult CorporationService::Handle_GetRecruitmentAdsForCorporation(
PyCallArgs& call )
157 _log(CORP__CALL,
"CorporationService::Handle_GetRecruitmentAdsForCorporation()");
158 call.
Dump(CORP__CALL_DUMP);
175 std::string reason =
"DESC: Medal Creation by ";
188 Call_CreateMedal
args;
189 if (!args.Decode(&call.
tuple)) {
190 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
194 if (args.title.size() > 30)
196 if (args.description.size() < 3)
197 throw UserError (
"MedalDescriptionTooShort");
198 if (args.description.size() > 150)
199 throw UserError (
"MedalDescriptionTooLong");
212 std::vector<Corp::MedalData> dataList;
216 list = (*itr)->AsList();
224 dataList.push_back( data );
241 _log(CORP__CALL,
"CorporationService::Handle_GetMedalsReceived()");
242 call.
Dump(CORP__CALL_DUMP);
244 Call_SingleIntegerArg arg;
245 if (!arg.Decode(&call.
tuple)) {
246 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
254 res->
Dump(CORP__RSP_DUMP,
"");
260 _log(CORP__CALL,
"CorporationService::Handle_GetMedalDetails()");
261 call.
Dump(CORP__CALL_DUMP);
263 Call_SingleIntegerArg arg;
264 if (!arg.Decode(&call.
tuple)) {
265 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
275 _log(CORP__CALL,
"CorporationService::Handle_GetAllCorpMedals()");
276 call.
Dump(CORP__CALL_DUMP);
278 Call_SingleIntegerArg arg;
279 if (!arg.Decode(&call.
tuple)) {
280 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
288 res->
Dump(CORP__RSP_DUMP,
"");
296 _log(CORP__CALL,
"CorporationService::Handle_GetRecipientsOfMedal()");
297 call.
Dump(CORP__CALL_DUMP);
299 Call_SingleIntegerArg arg;
300 if (!arg.Decode(&call.
tuple)) {
301 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
325 _log(CORP__CALL,
"CorporationService::Handle_GiveMedalToCharacters()");
326 call.
Dump(CORP__CALL_DUMP);
328 Call_AwardMedal
args;
329 if (!args.Decode(&call.
tuple)) {
330 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
335 std::vector< uint32 > charVec;
340 cost *= charVec.size();
343 std::string reason =
"DESC: Awarding Medal by ";
361 _log(CORP__CALL,
"CorporationService::Handle_GetMedalStatuses()");
362 call.
Dump(CORP__CALL_DUMP);
368 res->
Dump(CORP__RSP_DUMP,
"");
397 _log(CORP__CALL,
"CorporationService::Handle_SetMedalStatus()");
398 call.
Dump(CORP__CALL_DUMP);
#define sConfig
A macro for easier access to the singleton.
Dispatcher *const m_dispatch
PyCallable_Make_InnerDispatcher(CorporationService) CorporationService
PyObjectEx * GetMedalDetails(int32 medalID)
static std::string StringContent(PyRep *pRep)
void SendErrorMsg(const char *fmt,...)
#define _log(type, fmt,...)
PyRep * GetMedalsReceivedDetails(int32 charID)
PyRep * GetRecipientsOfMedal(int32 medalID)
PyRep * GetMedalsReceived(int32 charID)
void SendInfoModalMsg(const char *fmt,...)
int32 GetCharacterID() const
int32 GetCorporationID() const
storage_type::const_iterator const_iterator
const char * GetName() const
void Dump(FILE *into, const char *pfx) const
Dumps object to file.
void GiveMedalToCharacters(uint32 issuerID, uint32 corpID, int32 medalID, std::vector< uint32 > &charVec, std::string &reason)
#define is_log_enabled(type)
virtual ~CorporationService()
uint16 CreateMedal(uint32 ownerID, uint32 creatorID, std::string &title, std::string &description)
#define codelog(type, fmt,...)
void SetItem(size_t index, PyRep *object)
Stores Python object.
PyRep * GetAllCorpMedals(uint32 corpID)
static void TranserFunds(uint32 fromID, uint32 toID, double amount, std::string reason="", uint8 entryTypeID=Journal::EntryType::Undefined, uint32 referenceID=0, uint16 fromKey=Account::KeyType::Cash, uint16 toKey=Account::KeyType::Cash, Client *pClient=nullptr)
const char * GetName() const
PyRep * GetCorpMedalData(uint32 corpID)
Python object "ccp_exceptions.UserError".
#define PyCallable_REG_CALL(c, m)
PyRep * GetMedalStatuses()
PyRep * GetMktInfo(uint32 corpID)
void Dump(LogType type) const
PyObject * GetEmploymentRecord(uint32 charID)
int32 GetStationID() const
PyRep * GetAdRegistryData(int64 typeMask=0, bool inAlliance=false, int16 minMembers=0, uint16 maxMembers=12602)
static int64 IntegerValue(PyRep *pRep)
Dispatcher *const m_dispatch
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
void SaveMedalData(int64 medalID, std::vector< Corp::MedalData > &dataList)