/* */ #ifndef D_RPC_HELPER_H #define D_RPC_HELPER_H #include "common.h" #include #include #include #include "RpcRequest.h" namespace aria2 { class ValueBase; class Dict; class DownloadEngine; namespace rpc { 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, std::unique_ptr id); // Processes JSON-RPC request |jsondict| and returns the result. RpcResponse processJsonRpcRequest(Dict* jsondict, DownloadEngine* e); } // namespace rpc } // namespace aria2 #endif // D_RPC_HELPER_H