AdminNetFace.h 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /**
  2. * This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!
  3. */
  4. #ifndef JSONRPC_CPP_STUB_DEV_RPC_ADMINNETFACE_H_
  5. #define JSONRPC_CPP_STUB_DEV_RPC_ADMINNETFACE_H_
  6. #include "ModularServer.h"
  7. namespace dev {
  8. namespace rpc {
  9. class AdminNetFace : public ServerInterface<AdminNetFace>
  10. {
  11. public:
  12. AdminNetFace()
  13. {
  14. this->bindAndAddMethod(jsonrpc::Procedure("admin_net_start", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminNetFace::admin_net_startI);
  15. this->bindAndAddMethod(jsonrpc::Procedure("admin_net_stop", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminNetFace::admin_net_stopI);
  16. this->bindAndAddMethod(jsonrpc::Procedure("admin_net_connect", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminNetFace::admin_net_connectI);
  17. this->bindAndAddMethod(jsonrpc::Procedure("admin_net_peers", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_ARRAY, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminNetFace::admin_net_peersI);
  18. this->bindAndAddMethod(jsonrpc::Procedure("admin_net_nodeInfo", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminNetFace::admin_net_nodeInfoI);
  19. this->bindAndAddMethod(jsonrpc::Procedure("admin_nodeInfo", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, NULL), &dev::rpc::AdminNetFace::admin_nodeInfoI);
  20. this->bindAndAddMethod(jsonrpc::Procedure("admin_peers", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, NULL), &dev::rpc::AdminNetFace::admin_peersI);
  21. this->bindAndAddMethod(jsonrpc::Procedure("admin_addPeer", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminNetFace::admin_addPeerI);
  22. }
  23. inline virtual void admin_net_startI(const Json::Value &request, Json::Value &response)
  24. {
  25. response = this->admin_net_start(request[0u].asString());
  26. }
  27. inline virtual void admin_net_stopI(const Json::Value &request, Json::Value &response)
  28. {
  29. response = this->admin_net_stop(request[0u].asString());
  30. }
  31. inline virtual void admin_net_connectI(const Json::Value &request, Json::Value &response)
  32. {
  33. response = this->admin_net_connect(request[0u].asString(), request[1u].asString());
  34. }
  35. inline virtual void admin_net_peersI(const Json::Value &request, Json::Value &response)
  36. {
  37. response = this->admin_net_peers(request[0u].asString());
  38. }
  39. inline virtual void admin_net_nodeInfoI(const Json::Value &request, Json::Value &response)
  40. {
  41. response = this->admin_net_nodeInfo(request[0u].asString());
  42. }
  43. inline virtual void admin_nodeInfoI(const Json::Value &request, Json::Value &response)
  44. {
  45. (void)request;
  46. response = this->admin_nodeInfo();
  47. }
  48. inline virtual void admin_peersI(const Json::Value &request, Json::Value &response)
  49. {
  50. (void)request;
  51. response = this->admin_peers();
  52. }
  53. inline virtual void admin_addPeerI(const Json::Value &request, Json::Value &response)
  54. {
  55. response = this->admin_addPeer(request[0u].asString());
  56. }
  57. virtual bool admin_net_start(const std::string& param1) = 0;
  58. virtual bool admin_net_stop(const std::string& param1) = 0;
  59. virtual bool admin_net_connect(const std::string& param1, const std::string& param2) = 0;
  60. virtual Json::Value admin_net_peers(const std::string& param1) = 0;
  61. virtual Json::Value admin_net_nodeInfo(const std::string& param1) = 0;
  62. virtual Json::Value admin_nodeInfo() = 0;
  63. virtual Json::Value admin_peers() = 0;
  64. virtual bool admin_addPeer(const std::string& param1) = 0;
  65. };
  66. }
  67. }
  68. #endif //JSONRPC_CPP_STUB_DEV_RPC_ADMINNETFACE_H_