NetFace.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!
  3. */
  4. #ifndef JSONRPC_CPP_STUB_DEV_RPC_NETFACE_H_
  5. #define JSONRPC_CPP_STUB_DEV_RPC_NETFACE_H_
  6. #include "ModularServer.h"
  7. namespace dev {
  8. namespace rpc {
  9. class NetFace : public ServerInterface<NetFace>
  10. {
  11. public:
  12. NetFace()
  13. {
  14. this->bindAndAddMethod(jsonrpc::Procedure("net_version", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, NULL), &dev::rpc::NetFace::net_versionI);
  15. this->bindAndAddMethod(jsonrpc::Procedure("net_peerCount", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, NULL), &dev::rpc::NetFace::net_peerCountI);
  16. this->bindAndAddMethod(jsonrpc::Procedure("net_listening", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, NULL), &dev::rpc::NetFace::net_listeningI);
  17. }
  18. inline virtual void net_versionI(const Json::Value &request, Json::Value &response)
  19. {
  20. (void)request;
  21. response = this->net_version();
  22. }
  23. inline virtual void net_peerCountI(const Json::Value &request, Json::Value &response)
  24. {
  25. (void)request;
  26. response = this->net_peerCount();
  27. }
  28. inline virtual void net_listeningI(const Json::Value &request, Json::Value &response)
  29. {
  30. (void)request;
  31. response = this->net_listening();
  32. }
  33. virtual std::string net_version() = 0;
  34. virtual std::string net_peerCount() = 0;
  35. virtual bool net_listening() = 0;
  36. };
  37. }
  38. }
  39. #endif //JSONRPC_CPP_STUB_DEV_RPC_NETFACE_H_