/* */ #ifndef D_RPC_HELPER_H #define D_RPC_HELPER_H #include "common.h" #include #include #include "SharedHandle.h" namespace aria2 { class ValueBase; class Dict; class DownloadEngine; namespace rpc { struct RpcRequest; struct RpcResponse; #ifdef ENABLE_XML_RPC RpcRequest xmlParseMemory(const char* xml, size_t size); #endif // ENABLE_XML_RPC // Creates error response. The |code| is the JSON-RPC error code. The // |msg| is the error message. The |id| is the id of the request . RpcResponse createJsonRpcErrorResponse(int code, const std::string& msg, const SharedHandle& id); // Processes JSON-RPC request |jsondict| and returns the result. RpcResponse processJsonRpcRequest(const Dict* jsondict, DownloadEngine* e); } // namespace rpc } // namespace aria2 #endif // D_RPC_HELPER_H