Bitcoin ABC 0.30.7
P2P Digital Currency
|
RPC command dispatcher. More...
#include <server.h>
Public Member Functions | |
CRPCTable () | |
std::string | help (const Config &config, const std::string &name, const JSONRPCRequest &helpreq) const |
UniValue | execute (const Config &config, const JSONRPCRequest &request) const |
Execute a method. More... | |
std::vector< std::string > | listCommands () const |
Returns a list of registered commands. More... | |
UniValue | dumpArgMap (const Config &config, const JSONRPCRequest &request) const |
Return all named arguments that need to be converted by the client from string to another JSON type. More... | |
void | appendCommand (const std::string &name, const CRPCCommand *pcmd) |
Appends a CRPCCommand to the dispatch table. More... | |
bool | removeCommand (const std::string &name, const CRPCCommand *pcmd) |
Private Attributes | |
std::map< std::string, std::vector< const CRPCCommand * > > | mapCommands |
CRPCTable::CRPCTable | ( | ) |
void CRPCTable::appendCommand | ( | const std::string & | name, |
const CRPCCommand * | pcmd | ||
) |
Appends a CRPCCommand to the dispatch table.
Precondition: RPC server is not running
Commands with different method names but the same unique_id will be considered aliases, and only the first registered method name will show up in the help text command listing. Aliased commands do not have to have the same behavior. Server and client code can distinguish between calls based on method name, and aliased commands can also register different names, types, and numbers of parameters.
Definition at line 327 of file server.cpp.
UniValue CRPCTable::dumpArgMap | ( | const Config & | config, |
const JSONRPCRequest & | request | ||
) | const |
Return all named arguments that need to be converted by the client from string to another JSON type.
Definition at line 631 of file server.cpp.
UniValue CRPCTable::execute | ( | const Config & | config, |
const JSONRPCRequest & | request | ||
) | const |
Execute a method.
request | The JSONRPCRequest to execute |
an | exception (UniValue) when an error happens. |
Definition at line 582 of file server.cpp.
std::string CRPCTable::help | ( | const Config & | config, |
const std::string & | name, | ||
const JSONRPCRequest & | helpreq | ||
) | const |
Definition at line 121 of file server.cpp.
std::vector< std::string > CRPCTable::listCommands | ( | ) | const |
Returns a list of registered commands.
Definition at line 623 of file server.cpp.
bool CRPCTable::removeCommand | ( | const std::string & | name, |
const CRPCCommand * | pcmd | ||
) |
Definition at line 335 of file server.cpp.
|
private |