2009-05-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

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
pull/1/head
Tatsuhiro Tsujikawa 2009-05-22 13:48:52 +00:00
parent 48a7e5868f
commit 5bad3a1c91
4 changed files with 8 additions and 40 deletions

View File

@ -1,3 +1,11 @@
2009-05-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
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 <t-tujikawa@users.sourceforge.net>
Added the ability to execute command when download starts and

View File

@ -54,8 +54,6 @@ XmlRpcMethodFactory::create(const std::string& methodName)
return SharedHandle<XmlRpcMethod>(new RemoveXmlRpcMethod());
} else if(methodName == "aria2.tellStatus") {
return SharedHandle<XmlRpcMethod>(new TellStatusXmlRpcMethod());
} else if(methodName == "aria2.tellAll") {
return SharedHandle<XmlRpcMethod>(new TellAllXmlRpcMethod());
} else if(methodName == "aria2.getUris") {
return SharedHandle<XmlRpcMethod>(new GetUrisXmlRpcMethod());
} else if(methodName == "aria2.getFiles") {

View File

@ -457,39 +457,6 @@ BDE TellActiveXmlRpcMethod::process
return list;
}
BDE TellAllXmlRpcMethod::process
(const XmlRpcRequest& req, DownloadEngine* e)
{
BDE list = BDE::list();
const std::deque<SharedHandle<RequestGroup> >& groups =
e->_requestGroupMan->getRequestGroups();
for(std::deque<SharedHandle<RequestGroup> >::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<SharedHandle<RequestGroup> >& waiting =
e->_requestGroupMan->getReservedGroups();
for(std::deque<SharedHandle<RequestGroup> >::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<SharedHandle<DownloadResult> >& stopped =
e->_requestGroupMan->getDownloadResults();
for(std::deque<SharedHandle<DownloadResult> >::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)
{

View File

@ -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);