mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
ldb access from api
This commit is contained in:
parent
c30ce74fe0
commit
79bb03513b
@ -171,6 +171,20 @@ class WebThreeStubClient
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string get(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||||
|
{
|
||||||
|
Json::Value p;
|
||||||
|
p.append(param1);
|
||||||
|
p.append(param2);
|
||||||
|
|
||||||
|
Json::Value result = this->client->CallMethod("get",p);
|
||||||
|
if (result.isString())
|
||||||
|
return result.asString();
|
||||||
|
else
|
||||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Json::Value getMessages(const int& param1) throw (jsonrpc::JsonRpcException)
|
Json::Value getMessages(const int& param1) throw (jsonrpc::JsonRpcException)
|
||||||
{
|
{
|
||||||
Json::Value p;
|
Json::Value p;
|
||||||
@ -184,6 +198,20 @@ class WebThreeStubClient
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string getString(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||||
|
{
|
||||||
|
Json::Value p;
|
||||||
|
p.append(param1);
|
||||||
|
p.append(param2);
|
||||||
|
|
||||||
|
Json::Value result = this->client->CallMethod("getString",p);
|
||||||
|
if (result.isString())
|
||||||
|
return result.asString();
|
||||||
|
else
|
||||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
bool listening() throw (jsonrpc::JsonRpcException)
|
bool listening() throw (jsonrpc::JsonRpcException)
|
||||||
{
|
{
|
||||||
Json::Value p;
|
Json::Value p;
|
||||||
@ -258,6 +286,36 @@ class WebThreeStubClient
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool put(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
|
||||||
|
{
|
||||||
|
Json::Value p;
|
||||||
|
p.append(param1);
|
||||||
|
p.append(param2);
|
||||||
|
p.append(param3);
|
||||||
|
|
||||||
|
Json::Value result = this->client->CallMethod("put",p);
|
||||||
|
if (result.isBool())
|
||||||
|
return result.asBool();
|
||||||
|
else
|
||||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool putString(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException)
|
||||||
|
{
|
||||||
|
Json::Value p;
|
||||||
|
p.append(param1);
|
||||||
|
p.append(param2);
|
||||||
|
p.append(param3);
|
||||||
|
|
||||||
|
Json::Value result = this->client->CallMethod("putString",p);
|
||||||
|
if (result.isBool())
|
||||||
|
return result.asBool();
|
||||||
|
else
|
||||||
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
bool setCoinbase(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
bool setCoinbase(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||||
{
|
{
|
||||||
Json::Value p;
|
Json::Value p;
|
||||||
|
Loading…
Reference in New Issue
Block a user