forked from ethereum/aleth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNetFace.h
44 lines (39 loc) · 1.76 KB
/
NetFace.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
36
37
38
39
40
41
42
43
44
/**
* This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!
*/
#ifndef JSONRPC_CPP_STUB_DEV_RPC_NETFACE_H_
#define JSONRPC_CPP_STUB_DEV_RPC_NETFACE_H_
#include "ModularServer.h"
namespace dev {
namespace rpc {
class NetFace : public ServerInterface<NetFace>
{
public:
NetFace()
{
this->bindAndAddMethod(jsonrpc::Procedure("net_version", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, NULL), &dev::rpc::NetFace::net_versionI);
this->bindAndAddMethod(jsonrpc::Procedure("net_peerCount", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, NULL), &dev::rpc::NetFace::net_peerCountI);
this->bindAndAddMethod(jsonrpc::Procedure("net_listening", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, NULL), &dev::rpc::NetFace::net_listeningI);
}
inline virtual void net_versionI(const Json::Value &request, Json::Value &response)
{
(void)request;
response = this->net_version();
}
inline virtual void net_peerCountI(const Json::Value &request, Json::Value &response)
{
(void)request;
response = this->net_peerCount();
}
inline virtual void net_listeningI(const Json::Value &request, Json::Value &response)
{
(void)request;
response = this->net_listening();
}
virtual std::string net_version() = 0;
virtual std::string net_peerCount() = 0;
virtual bool net_listening() = 0;
};
}
}
#endif //JSONRPC_CPP_STUB_DEV_RPC_NETFACE_H_