5 #ifndef JSONRPC_CPP_STUB_DEV_RPC_DBFACE_H_ 6 #define JSONRPC_CPP_STUB_DEV_RPC_DBFACE_H_ 17 this->
bindAndAddMethod(jsonrpc::Procedure(
"db_put", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN,
"param1",jsonrpc::JSON_STRING,
"param2",jsonrpc::JSON_STRING,
"param3",jsonrpc::JSON_STRING, NULL), &
dev::rpc::DBFace::db_putI);
29 virtual bool db_put(
const std::string& param1,
const std::string& param2,
const std::string& param3) = 0;
30 virtual std::string
db_get(
const std::string& param1,
const std::string& param2) = 0;
35 #endif //JSONRPC_CPP_STUB_DEV_RPC_DBFACE_H_
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
void bindAndAddMethod(jsonrpc::Procedure const &_proc, MethodPointer _pointer)
virtual std::string db_get(const std::string ¶m1, const std::string ¶m2)=0
virtual void db_putI(const Json::Value &request, Json::Value &response)
virtual bool db_put(const std::string ¶m1, const std::string ¶m2, const std::string ¶m3)=0
virtual void db_getI(const Json::Value &request, Json::Value &response)
std::string asString(bytes const &_b)
Converts byte array to a string containing the same (binary) data.