Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoin-cli.cpp
Show First 20 Lines • Show All 234 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
/** | /** | ||||
* Class that handles the conversion from a command-line to a JSON-RPC request, | * Class that handles the conversion from a command-line to a JSON-RPC request, | ||||
* as well as converting back to a JSON object that can be shown as result. | * as well as converting back to a JSON object that can be shown as result. | ||||
*/ | */ | ||||
class BaseRequestHandler { | class BaseRequestHandler { | ||||
public: | public: | ||||
virtual ~BaseRequestHandler() {} | |||||
virtual UniValue PrepareRequest(const std::string &method, | virtual UniValue PrepareRequest(const std::string &method, | ||||
const std::vector<std::string> &args) = 0; | const std::vector<std::string> &args) = 0; | ||||
virtual UniValue ProcessReply(const UniValue &batch_in) = 0; | virtual UniValue ProcessReply(const UniValue &batch_in) = 0; | ||||
}; | }; | ||||
/** Process getinfo requests */ | /** Process getinfo requests */ | ||||
class GetinfoRequestHandler : public BaseRequestHandler { | class GetinfoRequestHandler : public BaseRequestHandler { | ||||
public: | public: | ||||
▲ Show 20 Lines • Show All 367 Lines • Show Last 20 Lines |