TestFace.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. * This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!
  3. */
  4. #ifndef JSONRPC_CPP_STUB_DEV_RPC_TESTFACE_H_
  5. #define JSONRPC_CPP_STUB_DEV_RPC_TESTFACE_H_
  6. #include "ModularServer.h"
  7. namespace dev {
  8. namespace rpc {
  9. class TestFace : public ServerInterface<TestFace>
  10. {
  11. public:
  12. TestFace()
  13. {
  14. this->bindAndAddMethod(jsonrpc::Procedure("test_setChainParams", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_OBJECT, NULL), &dev::rpc::TestFace::test_setChainParamsI);
  15. this->bindAndAddMethod(jsonrpc::Procedure("test_mineBlocks", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::TestFace::test_mineBlocksI);
  16. this->bindAndAddMethod(jsonrpc::Procedure("test_modifyTimestamp", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::TestFace::test_modifyTimestampI);
  17. this->bindAndAddMethod(jsonrpc::Procedure("test_addBlock", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::TestFace::test_addBlockI);
  18. this->bindAndAddMethod(jsonrpc::Procedure("test_rewindToBlock", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::TestFace::test_rewindToBlockI);
  19. }
  20. inline virtual void test_setChainParamsI(const Json::Value &request, Json::Value &response)
  21. {
  22. response = this->test_setChainParams(request[0u]);
  23. }
  24. inline virtual void test_mineBlocksI(const Json::Value &request, Json::Value &response)
  25. {
  26. response = this->test_mineBlocks(request[0u].asInt());
  27. }
  28. inline virtual void test_modifyTimestampI(const Json::Value &request, Json::Value &response)
  29. {
  30. response = this->test_modifyTimestamp(request[0u].asInt());
  31. }
  32. inline virtual void test_addBlockI(const Json::Value &request, Json::Value &response)
  33. {
  34. response = this->test_addBlock(request[0u].asString());
  35. }
  36. inline virtual void test_rewindToBlockI(const Json::Value &request, Json::Value &response)
  37. {
  38. response = this->test_rewindToBlock(request[0u].asInt());
  39. }
  40. virtual bool test_setChainParams(const Json::Value& param1) = 0;
  41. virtual bool test_mineBlocks(int param1) = 0;
  42. virtual bool test_modifyTimestamp(int param1) = 0;
  43. virtual bool test_addBlock(const std::string& param1) = 0;
  44. virtual bool test_rewindToBlock(int param1) = 0;
  45. };
  46. }
  47. }
  48. #endif //JSONRPC_CPP_STUB_DEV_RPC_TESTFACE_H_