diff options
Diffstat (limited to 'src/rpc/server.h')
-rw-r--r-- | src/rpc/server.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rpc/server.h b/src/rpc/server.h index 4e0aa2c6d6..d8b5097035 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -41,14 +41,16 @@ struct UniValueType { UniValue::VType type; }; -class JSONRequest +class JSONRPCRequest { public: UniValue id; std::string strMethod; UniValue params; + bool fHelp; + std::string URI; - JSONRequest() { id = NullUniValue; } + JSONRPCRequest() { id = NullUniValue; } void parse(const UniValue& valRequest); }; @@ -122,7 +124,7 @@ void RPCUnsetTimerInterface(RPCTimerInterface *iface); */ void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64_t nSeconds); -typedef UniValue(*rpcfn_type)(const UniValue& params, bool fHelp); +typedef UniValue(*rpcfn_type)(const JSONRPCRequest& jsonRequest); class CRPCCommand { @@ -147,12 +149,11 @@ public: /** * Execute a method. - * @param method Method to execute - * @param params UniValue Array of arguments (JSON objects) + * @param request The JSONRPCRequest to execute * @returns Result of the call. * @throws an exception (UniValue) when an error happens. */ - UniValue execute(const std::string &method, const UniValue ¶ms) const; + UniValue execute(const JSONRPCRequest &request) const; /** * Returns a list of registered commands |