forked from ethereum/aleth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDBFace.h
35 lines (30 loc) · 1.57 KB
/
DBFace.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!
*/
#ifndef JSONRPC_CPP_STUB_DEV_RPC_DBFACE_H_
#define JSONRPC_CPP_STUB_DEV_RPC_DBFACE_H_
#include "ModularServer.h"
namespace dev {
namespace rpc {
class DBFace : public ServerInterface<DBFace>
{
public:
DBFace()
{
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);
this->bindAndAddMethod(jsonrpc::Procedure("db_get", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::DBFace::db_getI);
}
inline virtual void db_putI(const Json::Value &request, Json::Value &response)
{
response = this->db_put(request[0u].asString(), request[1u].asString(), request[2u].asString());
}
inline virtual void db_getI(const Json::Value &request, Json::Value &response)
{
response = this->db_get(request[0u].asString(), request[1u].asString());
}
virtual bool db_put(const std::string& param1, const std::string& param2, const std::string& param3) = 0;
virtual std::string db_get(const std::string& param1, const std::string& param2) = 0;
};
}
}
#endif //JSONRPC_CPP_STUB_DEV_RPC_DBFACE_H_