44 std::stringstream urlBuilder;
45 urlBuilder <<
"http://" <<
sConfig.net.apiServer <<
":" << (
sConfig.net.apiServerPort) <<
"/";
46 _url = urlBuilder.str();
70 if( pAPICommandCall->find(
"service" ) == pAPICommandCall->end() )
72 sLog.Error(
"APIserver::GetXML()",
"Cannot find 'service' specifier in pAPICommandCall packet" );
73 return std::tr1::shared_ptr<std::vector<char> >(
new std::vector<char>() );
84 std::tr1::shared_ptr<std::vector<char> > ret = std::tr1::shared_ptr<std::vector<char> >(
new std::vector<char>());
94 return std::tr1::shared_ptr<std::vector<char> >(
new std::vector<char>() );
118 _io = std::unique_ptr<boost::asio::io_context>(
new boost::asio::io_context());
static const char *const FallbackURL
#define sConfig
A macro for easier access to the singleton.
std::map< std::string, APIServiceManager * > m_APIServiceManagers
std::tr1::shared_ptr< std::vector< char > > GetXML(const APICommandCall *pAPICommandCall)
Handles listening for new clients.
std::unique_ptr< boost::asio::detail::thread > _ioThread
std::map< std::string, std::string > APICommandCall
#define sLog
Evaluates to a NewLog instance.
Generic Base Class used to derive classes for specific service handlers (character, corporation, etc)
std::unique_ptr< boost::asio::io_context > _io
void CreateServices(const PyServiceMgr &services)
std::tr1::shared_ptr< std::string > m_xmlString
Lock(boost::asio::detail::mutex &mutex)
boost::asio::detail::mutex & _mutex
std::unique_ptr< APIServerListener > _listener