mirror of https://github.com/aria2/aria2
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.hpull/1/head
parent
48a7e5868f
commit
5bad3a1c91
|
@ -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>
|
2009-05-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Added the ability to execute command when download starts and
|
Added the ability to execute command when download starts and
|
||||||
|
|
|
@ -54,8 +54,6 @@ XmlRpcMethodFactory::create(const std::string& methodName)
|
||||||
return SharedHandle<XmlRpcMethod>(new RemoveXmlRpcMethod());
|
return SharedHandle<XmlRpcMethod>(new RemoveXmlRpcMethod());
|
||||||
} else if(methodName == "aria2.tellStatus") {
|
} else if(methodName == "aria2.tellStatus") {
|
||||||
return SharedHandle<XmlRpcMethod>(new TellStatusXmlRpcMethod());
|
return SharedHandle<XmlRpcMethod>(new TellStatusXmlRpcMethod());
|
||||||
} else if(methodName == "aria2.tellAll") {
|
|
||||||
return SharedHandle<XmlRpcMethod>(new TellAllXmlRpcMethod());
|
|
||||||
} else if(methodName == "aria2.getUris") {
|
} else if(methodName == "aria2.getUris") {
|
||||||
return SharedHandle<XmlRpcMethod>(new GetUrisXmlRpcMethod());
|
return SharedHandle<XmlRpcMethod>(new GetUrisXmlRpcMethod());
|
||||||
} else if(methodName == "aria2.getFiles") {
|
} else if(methodName == "aria2.getFiles") {
|
||||||
|
|
|
@ -457,39 +457,6 @@ BDE TellActiveXmlRpcMethod::process
|
||||||
return list;
|
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
|
BDE PurgeDownloadResultXmlRpcMethod::process
|
||||||
(const XmlRpcRequest& req, DownloadEngine* e)
|
(const XmlRpcRequest& req, DownloadEngine* e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,11 +91,6 @@ protected:
|
||||||
virtual BDE process(const XmlRpcRequest& req, DownloadEngine* e);
|
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 {
|
class ChangeOptionXmlRpcMethod:public XmlRpcMethod {
|
||||||
protected:
|
protected:
|
||||||
virtual BDE process(const XmlRpcRequest& req, DownloadEngine* e);
|
virtual BDE process(const XmlRpcRequest& req, DownloadEngine* e);
|
||||||
|
|
Loading…
Reference in New Issue