mirror of https://github.com/aria2/aria2
2009-09-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated doc. * src/XmlRpcMethod.hpull/1/head
parent
aefb035bb1
commit
0cde950b6f
|
@ -1,3 +1,8 @@
|
|||
2009-09-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Updated doc.
|
||||
* src/XmlRpcMethod.h
|
||||
|
||||
2009-09-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Help category now starts with "#" to distinguish a category from
|
||||
|
|
|
@ -54,12 +54,22 @@ namespace xmlrpc {
|
|||
struct XmlRpcRequest;
|
||||
struct XmlRpcResponse;
|
||||
|
||||
// This class offers abstract implementation of processing XML-RPC
|
||||
// request. You have to inherit this class and implement process()
|
||||
// method to add new XML-RPC API.
|
||||
//
|
||||
// There is XmlRpcMethodFactory class which instantiates XmlRpcMethod
|
||||
// subclass. If you add new XmlRpcMethod subclass, don't forget to add
|
||||
// it to XmlRpcMethodFactory.
|
||||
class XmlRpcMethod {
|
||||
protected:
|
||||
SharedHandle<OptionParser> _optionParser;
|
||||
|
||||
Logger* _logger;
|
||||
|
||||
// Subclass must implement this function to fulfil XmlRpcRequest
|
||||
// req. The return value of this method is used as a return value
|
||||
// of XML-RPC request.
|
||||
virtual BDE process(const XmlRpcRequest& req, DownloadEngine* e) = 0;
|
||||
|
||||
void gatherRequestOption(const SharedHandle<Option>& option,
|
||||
|
@ -75,6 +85,8 @@ public:
|
|||
|
||||
virtual ~XmlRpcMethod() {}
|
||||
|
||||
// Do work to fulfill XmlRpcRequest req and returns its result as
|
||||
// XmlRpcResponse. This method delegates to process() method.
|
||||
XmlRpcResponse execute(const XmlRpcRequest& req, DownloadEngine* e);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue