31 #include <rapidjson/writer.h>
32 #include <unordered_map>
35 #include "byte_stream.h"
42 #define BEGIN_RPC_MESSAGE_CLASS(classname) \
47 #define BEGIN_RPC_MESSAGE_REQUEST \
48 class Request final : public Message \
53 void doToJson(rapidjson::Writer<epee::byte_stream>& dest) const override final; \
54 void fromJson(const rapidjson::Value& val) override final;
56 #define BEGIN_RPC_MESSAGE_RESPONSE \
57 class Response final : public Message \
62 void doToJson(rapidjson::Writer<epee::byte_stream>& dest) const override final; \
63 void fromJson(const rapidjson::Value& val) override final;
65 #define END_RPC_MESSAGE_REQUEST };
66 #define END_RPC_MESSAGE_RESPONSE };
67 #define END_RPC_MESSAGE_CLASS };
72 #define RPC_MESSAGE_MEMBER(type, name) type name = {}
123 using txes_map = std::unordered_map<crypto::hash, transaction_info>;