39 #define REQ_RESP_TYPES_MACRO( runtime_str, type, reqjson, resp_message_ptr, handler) \
41 if (runtime_str == type::name) \
43 type::Request reqvar; \
44 type::Response *respvar = new type::Response(); \
46 reqvar.fromJson(reqjson); \
48 handler(reqvar, *respvar); \
50 resp_message_ptr = respvar; \
rapidjson::Value & getID()
static FullMessage * timeoutMessage()
FullMessage(FullMessage &&rhs) noexcept
rapidjson::Value & getMessage()
static FullMessage responseMessage(Message *message)
rapidjson::Value getMessageCopy()
std::string getRequestType() const
static FullMessage requestMessage(const std::string &request, Message *message)
cryptonote::rpc::error getError()
void setID(rapidjson::Value &id)
static const char * STATUS_FAILED
static const char * STATUS_OK
static const char * STATUS_BAD_JSON
static const char * STATUS_RETRY
virtual void fromJson(rapidjson::Value &val)
std::string error_details
virtual rapidjson::Value toJson(rapidjson::Document &doc) const
static const char * STATUS_BAD_REQUEST
std::string message("Message requiring signing")
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.
std::string BAD_REQUEST(const std::string &request)
std::string BAD_JSON(const std::string &error_details)
Holds cryptonote related classes and helpers.
const T & move(const T &t)