mirror of https://github.com/aria2/aria2
2009-05-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added "uris" key to the response of tellStatus command. Added "connections" key to the response of tellStatus and tellActive command. * src/XmlRpcMethodImpl.ccpull/1/head
parent
b2605588b7
commit
45249392fd
|
@ -1,3 +1,10 @@
|
|||
2009-05-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Added "uris" key to the response of tellStatus command. Added
|
||||
"connections" key to the response of tellStatus and tellActive
|
||||
command.
|
||||
* src/XmlRpcMethodImpl.cc
|
||||
|
||||
2009-05-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Renamed TellActiveStatusXmlRpcMethod as TellActiveXmlRpcMethod.
|
||||
|
|
|
@ -172,7 +172,7 @@ static void gatherProgressCommon
|
|||
TransferStat stat = group->calculateStat();
|
||||
entryDict["downloadSpeed"] = BDE(Util::uitos(stat.getDownloadSpeed()));
|
||||
entryDict["uploadSpeed"] = BDE(Util::uitos(stat.getUploadSpeed()));
|
||||
|
||||
entryDict["connections"] = group->getNumConnection();
|
||||
SharedHandle<PieceStorage> ps = group->getPieceStorage();
|
||||
if(!ps.isNull()) {
|
||||
if(ps->getBitfieldLength() > 0) {
|
||||
|
@ -229,6 +229,15 @@ static void gatherProgress
|
|||
{
|
||||
gatherProgressCommon(entryDict, group);
|
||||
|
||||
BDE uriList = BDE::list();
|
||||
std::deque<std::string> uris;
|
||||
group->getURIs(uris);
|
||||
for(std::deque<std::string>::const_iterator i = uris.begin(); i != uris.end();
|
||||
++i) {
|
||||
uriList << *i;
|
||||
}
|
||||
entryDict["uris"] = uriList;
|
||||
|
||||
SharedHandle<BtContext> btctx =
|
||||
dynamic_pointer_cast<BtContext>(group->getDownloadContext());
|
||||
if(!btctx.isNull()) {
|
||||
|
|
Loading…
Reference in New Issue