EvEmu
0.8.4
11 September 2021
|
Generic Base Class used to derive classes for specific service handlers (character, corporation, etc) More...
#include "APIServiceManager.h"
Public Member Functions | |
APIServiceManager (const PyServiceMgr &services) | |
PyServiceMgr & | services () |
virtual std::tr1::shared_ptr < std::string > | ProcessCall (const APICommandCall *pAPICommandCall) |
std::tr1::shared_ptr< std::string > | BuildErrorXMLResponse (std::string errorCode, std::string errorMessage) |
Protected Member Functions | |
bool | _AuthenticateUserNamePassword (std::string userName, std::string password) |
bool | _AuthenticateFullAPIQuery (std::string userID, std::string apiKey) |
bool | _AuthenticateLimitedAPIQuery (std::string userID, std::string apiKey) |
void | _BuildXMLHeader () |
void | _CloseXMLHeader (uint32 cacheStyle) |
void | _BuildXMLRowSet (std::string name, std::string key, const std::vector< std::string > *columns) |
void | _CloseXMLRowSet () |
void | _BuildXMLRow (const std::vector< std::string > *columns) |
void | _BuildXMLTag (std::string name) |
void | _BuildXMLTag (std::string name, const std::vector< std::pair< std::string, std::string > > *params) |
void | _BuildXMLTag (std::string name, const std::vector< std::pair< std::string, std::string > > *params, std::string value) |
void | _CloseXMLTag () |
void | _BuildSingleXMLTag (std::string name, std::string param) |
void | _BuildErrorXMLTag (std::string code, std::string param) |
std::tr1::shared_ptr< std::string > | _GetXMLDocumentString () |
Protected Attributes | |
APIServiceDB | m_db |
PyServiceMgr | m_services |
TiXmlDocument | _XmlDoc |
TiXmlElement * | _pXmlDocOuterTag |
std::string | _CurrentRowSetColumnString |
std::stack< TiXmlElement * > * | _pXmlElementStack |
Generic Base Class used to derive classes for specific service handlers (character, corporation, etc)
This class implements basic functions to build the xml documents needed to be returned from the specific service handlers for the API Server. It is used as the base class for polymorphism container in APIServer::GetXML() call to route the API Command Call package to the appropriate service handler using the service category.
Definition at line 73 of file APIServiceManager.h.
APIServiceManager::APIServiceManager | ( | const PyServiceMgr & | services | ) |
Definition at line 30 of file APIServiceManager.cpp.
References _CurrentRowSetColumnString, _pXmlDocOuterTag, and _pXmlElementStack.
|
protected |
Definition at line 162 of file APIServiceManager.cpp.
References APIServiceDB::GetApiAccountInfoUsingUserID(), and m_db.
|
protected |
Definition at line 176 of file APIServiceManager.cpp.
References APIServiceDB::GetApiAccountInfoUsingUserID(), and m_db.
|
protected |
Definition at line 142 of file APIServiceManager.cpp.
References PasswordModule::GeneratePassHash(), and services().
Referenced by APIAccountManager::_APIKeyRequest().
|
protected |
Definition at line 316 of file APIServiceManager.cpp.
References _pXmlDocOuterTag, and _pXmlElementStack.
Referenced by BuildErrorXMLResponse(), and ProcessCall().
|
protected |
Definition at line 305 of file APIServiceManager.cpp.
References _pXmlDocOuterTag, and _pXmlElementStack.
Referenced by APIAccountManager::_AccountStatus(), APIAccountManager::_APIKeyRequest(), APICharacterManager::_CharacterSheet(), _CloseXMLHeader(), APIServerManager::_ServerStatus(), and APICharacterManager::_SkillInTraining().
|
protected |
Definition at line 190 of file APIServiceManager.cpp.
References _pXmlDocOuterTag, _pXmlElementStack, _XmlDoc, currentTime, Win32TimeNow(), and Win32TimeToString().
Referenced by APIAccountManager::_AccountStatus(), APIAccountManager::_APIKeyRequest(), APIAccountManager::_Characters(), APICharacterManager::_CharacterSheet(), APIServerManager::_ServerStatus(), APICharacterManager::_SkillInTraining(), APICharacterManager::_SkillQueue(), BuildErrorXMLResponse(), and ProcessCall().
|
protected |
Definition at line 259 of file APIServiceManager.cpp.
References _CurrentRowSetColumnString, and _pXmlElementStack.
Referenced by APIAccountManager::_Characters(), APICharacterManager::_CharacterSheet(), and APICharacterManager::_SkillQueue().
|
protected |
Definition at line 233 of file APIServiceManager.cpp.
References _CurrentRowSetColumnString, and _pXmlElementStack.
Referenced by APIAccountManager::_Characters(), APICharacterManager::_CharacterSheet(), and APICharacterManager::_SkillQueue().
|
protected |
Definition at line 280 of file APIServiceManager.cpp.
References _pXmlElementStack.
Referenced by APIAccountManager::_AccountStatus(), _BuildXMLTag(), APIAccountManager::_Characters(), APICharacterManager::_CharacterSheet(), APIServerManager::_ServerStatus(), APICharacterManager::_SkillInTraining(), and APICharacterManager::_SkillQueue().
|
protected |
Definition at line 286 of file APIServiceManager.cpp.
References _pXmlElementStack.
|
protected |
Definition at line 299 of file APIServiceManager.cpp.
References _BuildXMLTag(), and _pXmlElementStack.
|
protected |
Definition at line 214 of file APIServiceManager.cpp.
References _BuildSingleXMLTag(), EVEAPI::CacheStyles::Long, EVEAPI::CacheStyles::Modified, EVEAPI::CacheStyles::Short, Win32Time_Minute, Win32TimeNow(), and Win32TimeToString().
Referenced by APIAccountManager::_AccountStatus(), APIAccountManager::_APIKeyRequest(), APIAccountManager::_Characters(), APICharacterManager::_CharacterSheet(), APIServerManager::_ServerStatus(), APICharacterManager::_SkillInTraining(), APICharacterManager::_SkillQueue(), BuildErrorXMLResponse(), and ProcessCall().
|
protected |
Definition at line 254 of file APIServiceManager.cpp.
References _CloseXMLTag().
Referenced by APIAccountManager::_Characters(), APICharacterManager::_CharacterSheet(), and APICharacterManager::_SkillQueue().
|
protected |
Definition at line 328 of file APIServiceManager.cpp.
References _pXmlDocOuterTag, and _pXmlElementStack.
Referenced by APIAccountManager::_AccountStatus(), APIAccountManager::_Characters(), APICharacterManager::_CharacterSheet(), _CloseXMLRowSet(), APIServerManager::_ServerStatus(), APICharacterManager::_SkillInTraining(), and APICharacterManager::_SkillQueue().
|
protected |
Definition at line 345 of file APIServiceManager.cpp.
References _XmlDoc.
Referenced by APIAccountManager::_AccountStatus(), APIAccountManager::_APIKeyRequest(), APIAccountManager::_Characters(), APICharacterManager::_CharacterSheet(), APIServerManager::_ServerStatus(), APICharacterManager::_SkillInTraining(), APICharacterManager::_SkillQueue(), BuildErrorXMLResponse(), and ProcessCall().
std::tr1::shared_ptr< std::string > APIServiceManager::BuildErrorXMLResponse | ( | std::string | errorCode, |
std::string | errorMessage | ||
) |
Definition at line 131 of file APIServiceManager.cpp.
References _BuildErrorXMLTag(), _BuildXMLHeader(), _CloseXMLHeader(), _GetXMLDocumentString(), and EVEAPI::CacheStyles::Modified.
Referenced by APIAccountManager::_AccountStatus(), APIAccountManager::_APIKeyRequest(), APIAccountManager::_Characters(), APICharacterManager::_CharacterSheet(), APICharacterManager::_SkillInTraining(), APICharacterManager::_SkillQueue(), APIActiveObjectManager::ProcessCall(), APIAccountManager::ProcessCall(), and APICharacterManager::ProcessCall().
|
virtual |
Reimplemented in APIAccountManager, APICharacterManager, APIActiveObjectManager, APIAdminManager, APICorporationManager, APIEveSystemManager, APIMapManager, and APIServerManager.
Definition at line 38 of file APIServiceManager.cpp.
References _BuildErrorXMLTag(), _BuildXMLHeader(), _CloseXMLHeader(), _GetXMLDocumentString(), EVEAPI::CacheStyles::Modified, and sLog.
|
inline |
Definition at line 77 of file APIServiceManager.h.
References m_services.
Referenced by _AuthenticateUserNamePassword(), and APIServerManager::_ServerStatus().
|
protected |
Definition at line 107 of file APIServiceManager.h.
Referenced by _BuildXMLRow(), _BuildXMLRowSet(), and APIServiceManager().
|
protected |
Definition at line 106 of file APIServiceManager.h.
Referenced by _BuildErrorXMLTag(), _BuildSingleXMLTag(), _BuildXMLHeader(), _CloseXMLTag(), and APIServiceManager().
|
protected |
Definition at line 108 of file APIServiceManager.h.
Referenced by _BuildErrorXMLTag(), _BuildSingleXMLTag(), _BuildXMLHeader(), _BuildXMLRow(), _BuildXMLRowSet(), _BuildXMLTag(), _CloseXMLTag(), and APIServiceManager().
|
protected |
Definition at line 105 of file APIServiceManager.h.
Referenced by _BuildXMLHeader(), and _GetXMLDocumentString().
|
protected |
Definition at line 102 of file APIServiceManager.h.
Referenced by APIAccountManager::_AccountStatus(), APIAccountManager::_APIKeyRequest(), _AuthenticateFullAPIQuery(), _AuthenticateLimitedAPIQuery(), and APIAccountManager::_Characters().
|
protected |
Definition at line 103 of file APIServiceManager.h.
Referenced by services().