diff options
author | Alexander Blair <snipa@jagtech.io> | 2020-03-12 01:13:48 -0700 |
---|---|---|
committer | Alexander Blair <snipa@jagtech.io> | 2020-03-12 01:13:49 -0700 |
commit | 820ab9fdea6ede11aced3726f3998558f8677ad6 (patch) | |
tree | 2b8df276eff7637e4c9dd20f5acd9a55e12deea7 /src/rpc/daemon_messages.h | |
parent | Merge pull request #6268 (diff) | |
parent | Various improvements to the ZMQ JSON-RPC handling: (diff) | |
download | monero-820ab9fdea6ede11aced3726f3998558f8677ad6.tar.xz |
Merge pull request #6273
0f78b06e Various improvements to the ZMQ JSON-RPC handling: (Lee Clagett)
Diffstat (limited to 'src/rpc/daemon_messages.h')
-rw-r--r-- | src/rpc/daemon_messages.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/rpc/daemon_messages.h b/src/rpc/daemon_messages.h index c0d9aed0a..bb5059cdc 100644 --- a/src/rpc/daemon_messages.h +++ b/src/rpc/daemon_messages.h @@ -28,6 +28,8 @@ #pragma once +#include <rapidjson/stringbuffer.h> +#include <rapidjson/writer.h> #include <unordered_map> #include <vector> @@ -40,26 +42,25 @@ #define BEGIN_RPC_MESSAGE_CLASS(classname) \ class classname \ { \ - public: \ - static const char* const name; + public: #define BEGIN_RPC_MESSAGE_REQUEST \ - class Request : public Message \ + class Request final : public Message \ { \ public: \ Request() { } \ ~Request() { } \ - rapidjson::Value toJson(rapidjson::Document& doc) const; \ - void fromJson(rapidjson::Value& val); + void doToJson(rapidjson::Writer<rapidjson::StringBuffer>& dest) const override final; \ + void fromJson(const rapidjson::Value& val) override final; #define BEGIN_RPC_MESSAGE_RESPONSE \ - class Response : public Message \ + class Response final : public Message \ { \ public: \ Response() { } \ ~Response() { } \ - rapidjson::Value toJson(rapidjson::Document& doc) const; \ - void fromJson(rapidjson::Value& val); + void doToJson(rapidjson::Writer<rapidjson::StringBuffer>& dest) const override final; \ + void fromJson(const rapidjson::Value& val) override final; #define END_RPC_MESSAGE_REQUEST }; #define END_RPC_MESSAGE_RESPONSE }; |