Gav Wood
10 years ago
5 changed files with 51 additions and 5 deletions
@ -0,0 +1,28 @@ |
|||||
|
/**
|
||||
|
* This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY! |
||||
|
*/ |
||||
|
|
||||
|
#ifndef JSONRPC_CPP_STUB_PHONEHOME_H_ |
||||
|
#define JSONRPC_CPP_STUB_PHONEHOME_H_ |
||||
|
|
||||
|
#include <jsonrpccpp/client.h> |
||||
|
|
||||
|
class PhoneHome : public jsonrpc::Client |
||||
|
{ |
||||
|
public: |
||||
|
PhoneHome(jsonrpc::IClientConnector &conn, jsonrpc::clientVersion_t type = jsonrpc::JSONRPC_CLIENT_V2) : jsonrpc::Client(conn, type) {} |
||||
|
|
||||
|
int report_benchmark(const std::string& param1, int param2) throw (jsonrpc::JsonRpcException) |
||||
|
{ |
||||
|
Json::Value p; |
||||
|
p.append(param1); |
||||
|
p.append(param2); |
||||
|
Json::Value result = this->CallMethod("report_benchmark",p); |
||||
|
if (result.isInt()) |
||||
|
return result.asInt(); |
||||
|
else |
||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
#endif //JSONRPC_CPP_STUB_PHONEHOME_H_
|
@ -0,0 +1,3 @@ |
|||||
|
[ |
||||
|
{ "name": "report_benchmark", "params": [ "", 0 ], "order": [], "returns": 0 } |
||||
|
] |
@ -0,0 +1,4 @@ |
|||||
|
[ |
||||
|
{ "name": "eth_getWork", "params": [], "order": [], "returns": []}, |
||||
|
{ "name": "eth_submitWork", "params": ["", ""], "order": [], "returns": true} |
||||
|
] |
Loading…
Reference in new issue