From 2f70a38502659dbcfe29c5a055a69840da57b37a Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Thu, 5 Mar 2015 20:32:18 +0100 Subject: [PATCH] shh_changed -> shh_getFilterChanges --- libweb3jsonrpc/WebThreeStubServerBase.cpp | 2 +- libweb3jsonrpc/WebThreeStubServerBase.h | 3 +-- libweb3jsonrpc/abstractwebthreestubserver.h | 8 ++++---- libweb3jsonrpc/spec.json | 2 +- test/webthreestubclient.h | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/libweb3jsonrpc/WebThreeStubServerBase.cpp b/libweb3jsonrpc/WebThreeStubServerBase.cpp index fb719062d..2133d9b83 100644 --- a/libweb3jsonrpc/WebThreeStubServerBase.cpp +++ b/libweb3jsonrpc/WebThreeStubServerBase.cpp @@ -1037,7 +1037,7 @@ bool WebThreeStubServerBase::shh_uninstallFilter(string const& _filterId) return true; } -Json::Value WebThreeStubServerBase::shh_changed(string const& _filterId) +Json::Value WebThreeStubServerBase::shh_getFilterChanges(string const& _filterId) { int id; diff --git a/libweb3jsonrpc/WebThreeStubServerBase.h b/libweb3jsonrpc/WebThreeStubServerBase.h index a3e961012..380d4f481 100644 --- a/libweb3jsonrpc/WebThreeStubServerBase.h +++ b/libweb3jsonrpc/WebThreeStubServerBase.h @@ -122,8 +122,7 @@ public: virtual std::string shh_addToGroup(std::string const& _group, std::string const& _who); virtual std::string shh_newFilter(Json::Value const& _json); virtual bool shh_uninstallFilter(std::string const& _filterId); - - virtual Json::Value shh_changed(std::string const& _filterId); + virtual Json::Value shh_getFilterChanges(std::string const& _filterId); virtual Json::Value shh_getMessages(std::string const& _filterId); void setAccounts(std::vector const& _accounts); diff --git a/libweb3jsonrpc/abstractwebthreestubserver.h b/libweb3jsonrpc/abstractwebthreestubserver.h index 61635f6e0..de11a8de9 100644 --- a/libweb3jsonrpc/abstractwebthreestubserver.h +++ b/libweb3jsonrpc/abstractwebthreestubserver.h @@ -63,7 +63,7 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServerbindAndAddMethod(jsonrpc::Procedure("shh_addToGroup", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::shh_addToGroupI); this->bindAndAddMethod(jsonrpc::Procedure("shh_newFilter", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_OBJECT, NULL), &AbstractWebThreeStubServer::shh_newFilterI); this->bindAndAddMethod(jsonrpc::Procedure("shh_uninstallFilter", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::shh_uninstallFilterI); - this->bindAndAddMethod(jsonrpc::Procedure("shh_changed", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_ARRAY, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::shh_changedI); + this->bindAndAddMethod(jsonrpc::Procedure("shh_getFilterChanges", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_ARRAY, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::shh_getFilterChangesI); this->bindAndAddMethod(jsonrpc::Procedure("shh_getMessages", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_ARRAY, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::shh_getMessagesI); } @@ -282,9 +282,9 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServershh_uninstallFilter(request[0u].asString()); } - inline virtual void shh_changedI(const Json::Value &request, Json::Value &response) + inline virtual void shh_getFilterChangesI(const Json::Value &request, Json::Value &response) { - response = this->shh_changed(request[0u].asString()); + response = this->shh_getFilterChanges(request[0u].asString()); } inline virtual void shh_getMessagesI(const Json::Value &request, Json::Value &response) { @@ -341,7 +341,7 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServerCallMethod("shh_changed",p); + Json::Value result = this->CallMethod("shh_getFilterChanges",p); if (result.isArray()) return result; else