mirror of
https://github.com/aria2/aria2.git
synced 2025-04-07 06:27:37 +03:00
2010-01-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added aria2.getSessionInfo XML-RPC method. This method returns a struct containing Session ID, which is generated each time when aria2 is invoked. * doc/aria2c.1.txt * doc/xmlrpc/aria2rpc * src/DownloadEngine.cc * src/DownloadEngine.h * src/XmlRpcMethodFactory.cc * src/XmlRpcMethodImpl.cc * src/XmlRpcMethodImpl.h * test/XmlRpcMethodTest.cc
This commit is contained in:
parent
87b18019b4
commit
f2722cb870
11 changed files with 95 additions and 2 deletions
|
@ -115,6 +115,7 @@ const std::string KEY_VERSION = "version";
|
|||
const std::string KEY_ENABLED_FEATURES = "enabledFeatures";
|
||||
const std::string KEY_METHOD_NAME = "methodName";
|
||||
const std::string KEY_PARAMS = "params";
|
||||
const std::string KEY_SESSION_ID = "sessionId";
|
||||
}
|
||||
|
||||
static BDE createGIDResponse(int32_t gid)
|
||||
|
@ -789,6 +790,14 @@ BDE ChangePositionXmlRpcMethod::process
|
|||
return result;
|
||||
}
|
||||
|
||||
BDE GetSessionInfoXmlRpcMethod::process
|
||||
(const XmlRpcRequest& req, DownloadEngine* e)
|
||||
{
|
||||
BDE result = BDE::dict();
|
||||
result[KEY_SESSION_ID] = util::toHex(e->getSessionId());
|
||||
return result;
|
||||
}
|
||||
|
||||
BDE SystemMulticallXmlRpcMethod::process
|
||||
(const XmlRpcRequest& req, DownloadEngine* e)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue