From 5bad3a1c91c27306c81db15a214d3b87911e6a1a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 22 May 2009 13:48:52 +0000 Subject: [PATCH] 2009-05-22 Tatsuhiro Tsujikawa Removed tellAll XML-RPC command because its reponse tends to be big if stopped/waiting downloads pile up. * src/XmlRpcMethodFactory.cc * src/XmlRpcMethodImpl.cc * src/XmlRpcMethodImpl.h --- ChangeLog | 8 ++++++++ src/XmlRpcMethodFactory.cc | 2 -- src/XmlRpcMethodImpl.cc | 33 --------------------------------- src/XmlRpcMethodImpl.h | 5 ----- 4 files changed, 8 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index 998fdb08..f770bfbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-05-22 Tatsuhiro Tsujikawa + + Removed tellAll XML-RPC command because its reponse tends to be + big if stopped/waiting downloads pile up. + * src/XmlRpcMethodFactory.cc + * src/XmlRpcMethodImpl.cc + * src/XmlRpcMethodImpl.h + 2009-05-22 Tatsuhiro Tsujikawa Added the ability to execute command when download starts and diff --git a/src/XmlRpcMethodFactory.cc b/src/XmlRpcMethodFactory.cc index f8cb80d6..ac9fa57b 100644 --- a/src/XmlRpcMethodFactory.cc +++ b/src/XmlRpcMethodFactory.cc @@ -54,8 +54,6 @@ XmlRpcMethodFactory::create(const std::string& methodName) return SharedHandle(new RemoveXmlRpcMethod()); } else if(methodName == "aria2.tellStatus") { return SharedHandle(new TellStatusXmlRpcMethod()); - } else if(methodName == "aria2.tellAll") { - return SharedHandle(new TellAllXmlRpcMethod()); } else if(methodName == "aria2.getUris") { return SharedHandle(new GetUrisXmlRpcMethod()); } else if(methodName == "aria2.getFiles") { diff --git a/src/XmlRpcMethodImpl.cc b/src/XmlRpcMethodImpl.cc index d69af3ae..b2356312 100644 --- a/src/XmlRpcMethodImpl.cc +++ b/src/XmlRpcMethodImpl.cc @@ -457,39 +457,6 @@ BDE TellActiveXmlRpcMethod::process return list; } -BDE TellAllXmlRpcMethod::process -(const XmlRpcRequest& req, DownloadEngine* e) -{ - BDE list = BDE::list(); - const std::deque >& groups = - e->_requestGroupMan->getRequestGroups(); - for(std::deque >::const_iterator i = - groups.begin(); i != groups.end(); ++i) { - BDE entryDict = BDE::dict(); - entryDict["status"] = BDE_ACTIVE; - gatherProgress(entryDict, *i, e); - list << entryDict; - } - const std::deque >& waiting = - e->_requestGroupMan->getReservedGroups(); - for(std::deque >::const_iterator i = - waiting.begin(); i != waiting.end(); ++i) { - BDE entryDict = BDE::dict(); - entryDict["status"] = BDE_WAITING; - gatherProgress(entryDict, *i, e); - list << entryDict; - } - const std::deque >& stopped = - e->_requestGroupMan->getDownloadResults(); - for(std::deque >::const_iterator i = - stopped.begin(); i != stopped.end(); ++i) { - BDE entryDict = BDE::dict(); - gatherStoppedDownload(entryDict, *i); - list << entryDict; - } - return list; -} - BDE PurgeDownloadResultXmlRpcMethod::process (const XmlRpcRequest& req, DownloadEngine* e) { diff --git a/src/XmlRpcMethodImpl.h b/src/XmlRpcMethodImpl.h index bf7e4fa9..05d53dc0 100644 --- a/src/XmlRpcMethodImpl.h +++ b/src/XmlRpcMethodImpl.h @@ -91,11 +91,6 @@ protected: virtual BDE process(const XmlRpcRequest& req, DownloadEngine* e); }; -class TellAllXmlRpcMethod:public XmlRpcMethod { -protected: - virtual BDE process(const XmlRpcRequest& req, DownloadEngine* e); -}; - class ChangeOptionXmlRpcMethod:public XmlRpcMethod { protected: virtual BDE process(const XmlRpcRequest& req, DownloadEngine* e);