EvEmu
0.8.4
11 September 2021
|
#include "TradeService.h"
Classes | |
struct | ActiveSession |
Public Member Functions | |
TradeService (PyServiceMgr *mgr) | |
virtual | ~TradeService () |
uint32 | GetTradeSessionID () |
void | InitiateTrade (Client *pClient, PyRep *resp) |
void | RemoveActiveSession (uint32 myID) |
void | CancelTrade (Client *pClient) |
void | TransferContainerContents (SystemManager *pSysMgr, InventoryItemRef itemRef, uint32 newOwnerID) |
![]() | |
PyService (PyServiceMgr *mgr, const char *serviceName) | |
virtual | ~PyService () |
virtual PyResult | Call (const std::string &method, PyCallArgs &args) |
const char * | GetName () const |
![]() | |
PyCallable () | |
virtual | ~PyCallable () |
Public Attributes | |
std::map< uint32, ActiveSession > | m_activeSessions |
Protected Member Functions | |
virtual PyBoundObject * | CreateBoundObject (Client *pClient, const PyRep *bind_args) |
PyCallable_DECL_CALL (InitiateTrade) | |
![]() | |
PyObject * | _BuildCachedReturn (PySubStream **result, const char *sessionInfo, CacheCheckTime check) |
virtual PyResult | Handle_MachoResolveObject (PyCallArgs &call) |
virtual PyResult | Handle_MachoBindObject (PyCallArgs &call) |
![]() | |
void | _SetCallDispatcher (CallDispatcher *d) |
Protected Attributes | |
Dispatcher *const | m_dispatch |
PyServiceMgr * | m_SvcMgr |
uint32 | m_SessionID |
![]() | |
PyServiceMgr *const | m_manager |
Additional Inherited Members | |
![]() | |
enum | CacheCheckTime { check_Always = 0, check_Never, check_in_year, check_in_6_months, check_in_3_months, check_in_1_month, check_in_1_week, check_in_1_day, check_in_12_hours, check_in_6_hours, check_in_3_hours, check_in_2_hours, check_in_1_hour, check_in_30_minutes, check_in_15_minutes, check_in_5_minutes, check_in_1_minute, check_in_30_seconds, check_in_15_seconds, check_in_5_seconds, check_in_1_second, _checkCount } |
![]() | |
static const char *const | s_checkTimeStrings [_checkCount] |
Definition at line 36 of file TradeService.h.
TradeService::TradeService | ( | PyServiceMgr * | mgr | ) |
Definition at line 98 of file TradeService.cpp.
References PyCallable::_SetCallDispatcher(), InitiateTrade(), m_dispatch, m_SessionID, m_SvcMgr, minTradeCont, and PyCallable_REG_CALL.
|
virtual |
void TradeService::CancelTrade | ( | Client * | pClient | ) |
Definition at line 678 of file TradeService.cpp.
References TradeBound::CancelTrade(), Client::ClearTradeSession(), TradeSession::Session::containerID, Client::GetTradeSession(), TradeSession::Session::herID, PyService::m_manager, TradeSession::m_tradeSession, TradeSession::Session::myID, PyIncRef, RemoveActiveSession(), SafeDelete(), Client::SendNotification(), sEntityList, and PyTuple::SetItem().
Referenced by Client::UndockFromStation(), and Client::~Client().
|
protectedvirtual |
Reimplemented from PyService.
Definition at line 113 of file TradeService.cpp.
References _log, args, PyRep::Clone(), codelog, TradeSession::Session::containerID, TradeService::ActiveSession::contID, TradeSession::Session::fileTime, PyService::GetName(), GetTradeSessionID(), TradeService::ActiveSession::herID, TradeSession::Session::herID, TradeSession::Session::herMoney, TradeSession::Session::herState, m_activeSessions, PyService::m_manager, TradeSession::m_tradeSession, TradeService::ActiveSession::myID, TradeSession::Session::myID, TradeSession::Session::myMoney, TradeSession::Session::myState, TradeService::ActiveSession::ourTS, Client::SetTradeSession(), TradeSession::Session::stationID, and EVEDB::invTypes::TradeSession.
uint32 TradeService::GetTradeSessionID | ( | ) |
Definition at line 700 of file TradeService.cpp.
References m_SessionID, maxTradeCont, and minTradeCont.
Referenced by CreateBoundObject().
Definition at line 665 of file TradeService.cpp.
References Client::GetCharacterID(), Client::SendNotification(), and PyTuple::SetItem().
Referenced by TradeService().
|
protected |
void TradeService::RemoveActiveSession | ( | uint32 | myID | ) |
Definition at line 674 of file TradeService.cpp.
References m_activeSessions.
Referenced by CancelTrade().
void TradeService::TransferContainerContents | ( | SystemManager * | pSysMgr, |
InventoryItemRef | itemRef, | ||
uint32 | newOwnerID | ||
) |
Definition at line 598 of file TradeService.cpp.
References InventoryItem::categoryID(), ShipDB::DeleteInsuranceByShipID(), RefPtr< X >::get(), SystemManager::GetContainerFromInventory(), Inventory::GetInventoryMap(), InventoryItem::GetMyInventory(), SystemManager::GetShipFromInventory(), CargoContainer::IsEmpty(), InventoryItem::itemID(), EVEDB::invCategories::Ship, and sItemFactory.
Referenced by TradeBound::ExchangeItems().
std::map<uint32, ActiveSession> TradeService::m_activeSessions |
Definition at line 56 of file TradeService.h.
Referenced by CreateBoundObject(), and RemoveActiveSession().
|
protected |
Definition at line 59 of file TradeService.h.
Referenced by TradeService(), and ~TradeService().
|
protected |
Definition at line 67 of file TradeService.h.
Referenced by GetTradeSessionID(), and TradeService().
|
protected |
Definition at line 61 of file TradeService.h.
Referenced by TradeService().