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
pull/1/head
Tatsuhiro Tsujikawa 2009-05-09 13:00:47 +00:00
parent b2605588b7
commit 45249392fd
2 changed files with 17 additions and 1 deletions

View File

@ -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.

View File

@ -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()) {