Fabcoin Core  0.16.2
P2P Digital Currency
Web3Face.h
Go to the documentation of this file.
1 
5 #ifndef JSONRPC_CPP_STUB_DEV_RPC_WEB3FACE_H_
6 #define JSONRPC_CPP_STUB_DEV_RPC_WEB3FACE_H_
7 
8 #include "ModularServer.h"
9 
10 namespace dev {
11  namespace rpc {
12  class Web3Face : public ServerInterface<Web3Face>
13  {
14  public:
16  {
17  this->bindAndAddMethod(jsonrpc::Procedure("web3_sha3", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::Web3Face::web3_sha3I);
18  this->bindAndAddMethod(jsonrpc::Procedure("web3_clientVersion", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, NULL), &dev::rpc::Web3Face::web3_clientVersionI);
19  }
20 
21  inline virtual void web3_sha3I(const Json::Value &request, Json::Value &response)
22  {
23  response = this->web3_sha3(request[0u].asString());
24  }
25  inline virtual void web3_clientVersionI(const Json::Value &request, Json::Value &response)
26  {
27  (void)request;
28  response = this->web3_clientVersion();
29  }
30  virtual std::string web3_sha3(const std::string& param1) = 0;
31  virtual std::string web3_clientVersion() = 0;
32  };
33 
34  }
35 }
36 #endif //JSONRPC_CPP_STUB_DEV_RPC_WEB3FACE_H_
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
Definition: Arith256.cpp:15
virtual std::string web3_clientVersion()=0
void bindAndAddMethod(jsonrpc::Procedure const &_proc, MethodPointer _pointer)
Definition: ModularServer.h:59
virtual void web3_sha3I(const Json::Value &request, Json::Value &response)
Definition: Web3Face.h:21
virtual void web3_clientVersionI(const Json::Value &request, Json::Value &response)
Definition: Web3Face.h:25
Config::Value_type Value
virtual std::string web3_sha3(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