Fabcoin Core  0.16.2
P2P Digital Currency
AdminUtilsFace.h
Go to the documentation of this file.
1 
5 #ifndef JSONRPC_CPP_STUB_DEV_RPC_ADMINUTILSFACE_H_
6 #define JSONRPC_CPP_STUB_DEV_RPC_ADMINUTILSFACE_H_
7 
8 #include "ModularServer.h"
9 
10 namespace dev {
11  namespace rpc {
12  class AdminUtilsFace : public ServerInterface<AdminUtilsFace>
13  {
14  public:
16  {
17  this->bindAndAddMethod(jsonrpc::Procedure("admin_setVerbosity", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_INTEGER,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminUtilsFace::admin_setVerbosityI);
18  this->bindAndAddMethod(jsonrpc::Procedure("admin_verbosity", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::AdminUtilsFace::admin_verbosityI);
19  this->bindAndAddMethod(jsonrpc::Procedure("admin_exit", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminUtilsFace::admin_exitI);
20  }
21 
22  inline virtual void admin_setVerbosityI(const Json::Value &request, Json::Value &response)
23  {
24  response = this->admin_setVerbosity(request[0u].asInt(), request[1u].asString());
25  }
26  inline virtual void admin_verbosityI(const Json::Value &request, Json::Value &response)
27  {
28  response = this->admin_verbosity(request[0u].asInt());
29  }
30  inline virtual void admin_exitI(const Json::Value &request, Json::Value &response)
31  {
32  response = this->admin_exit(request[0u].asString());
33  }
34  virtual bool admin_setVerbosity(int param1, const std::string& param2) = 0;
35  virtual bool admin_verbosity(int param1) = 0;
36  virtual bool admin_exit(const std::string& param1) = 0;
37  };
38 
39  }
40 }
41 #endif //JSONRPC_CPP_STUB_DEV_RPC_ADMINUTILSFACE_H_
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
Definition: Arith256.cpp:15
virtual void admin_verbosityI(const Json::Value &request, Json::Value &response)
virtual void admin_exitI(const Json::Value &request, Json::Value &response)
void bindAndAddMethod(jsonrpc::Procedure const &_proc, MethodPointer _pointer)
Definition: ModularServer.h:59
Config::Value_type Value
virtual void admin_setVerbosityI(const Json::Value &request, Json::Value &response)
virtual bool admin_verbosity(int param1)=0
virtual bool admin_setVerbosity(int param1, const std::string &param2)=0
virtual bool admin_exit(const std::string &param1)=0
std::string asString(bytes const &_b)
Converts byte array to a string containing the same (binary) data.
Definition: CommonData.h:79