summaryrefslogtreecommitdiff
path: root/src/HttpServerBodyCommand.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-03-10 00:56:37 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-03-10 00:56:37 +0900
commit8a9fa9a692e15396285cd0a4d993eb7882ae6898 (patch)
tree6d29e7b59ef0f3123f3b3ac25c6c3688d3fa06a6 /src/HttpServerBodyCommand.h
parentbc7ac15d7e71b83c501b6863111f9cafa7f83028 (diff)
Added JSON-RPC 2.0 batch call.
Diffstat (limited to 'src/HttpServerBodyCommand.h')
-rw-r--r--src/HttpServerBodyCommand.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/HttpServerBodyCommand.h b/src/HttpServerBodyCommand.h
index a8215dda..b4503a8c 100644
--- a/src/HttpServerBodyCommand.h
+++ b/src/HttpServerBodyCommand.h
@@ -38,6 +38,8 @@
#include "Command.h"
#include "SharedHandle.h"
#include "TimerA2.h"
+#include "ValueBase.h"
+#include "XmlRpcResponse.h"
namespace aria2 {
@@ -51,6 +53,20 @@ private:
SharedHandle<SocketCore> socket_;
SharedHandle<HttpServer> httpServer_;
Timer timeoutTimer_;
+ void sendJsonRpcErrorResponse
+ (const std::string& httpStatus,
+ int code,
+ const std::string& message,
+ const SharedHandle<ValueBase>& id,
+ const std::string& callback);
+ void sendJsonRpcResponse
+ (const xmlrpc::XmlRpcResponse& res,
+ const std::string& callback);
+ void sendJsonRpcBatchResponse
+ (const std::vector<xmlrpc::XmlRpcResponse>& results,
+ const std::string& callback);
+ xmlrpc::XmlRpcResponse processJsonRpcRequest(const Dict* jsondict);
+ void addHttpServerResponseCommand();
public:
HttpServerBodyCommand(cuid_t cuid,
const SharedHandle<HttpServer>& httpServer,