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; \
std::string error_details
static const char * STATUS_BAD_JSON
std::string BAD_REQUEST(const std::string &request)
virtual rapidjson::Value toJson(rapidjson::Document &doc) const
static const char * STATUS_FAILED
rapidjson::Value & getID()
Holds cryptonote related classes and helpers.
std::string getRequestType() const
static const char * STATUS_BAD_REQUEST
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.
virtual void fromJson(rapidjson::Value &val)
static FullMessage requestMessage(const std::string &request, Message *message)
static FullMessage * timeoutMessage()
std::string message("Message requiring signing")
static const char * STATUS_RETRY
const T & move(const T &t)
cryptonote::rpc::error getError()
static FullMessage responseMessage(Message *message)
void setID(rapidjson::Value &id)
rapidjson::Value & getMessage()
static const char * STATUS_OK
FullMessage(FullMessage &&rhs) noexcept
rapidjson::Value getMessageCopy()
std::string BAD_JSON(const std::string &error_details)