Electroneum
Loading...
Searching...
No Matches
message.h File Reference
#include "rapidjson/document.h"
#include "rpc/message_data_structs.h"
#include <string>
Include dependency graph for message.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  cryptonote::rpc::Message
class  cryptonote::rpc::FullMessage

Namespaces

namespace  cryptonote
 Holds cryptonote related classes and helpers.
namespace  cryptonote::rpc

Macros

#define REQ_RESP_TYPES_MACRO(runtime_str, type, reqjson, resp_message_ptr, handler)

Functions

std::string cryptonote::rpc::BAD_REQUEST (const std::string &request)
std::string cryptonote::rpc::BAD_REQUEST (const std::string &request, rapidjson::Value &id)
std::string cryptonote::rpc::BAD_JSON (const std::string &error_details)

Macro Definition Documentation

◆ REQ_RESP_TYPES_MACRO

#define REQ_RESP_TYPES_MACRO ( runtime_str,
type,
reqjson,
resp_message_ptr,
handler )
Value:
\
if (runtime_str == type::name) \
{ \
type::Request reqvar; \
type::Response *respvar = new type::Response(); \
\
reqvar.fromJson(reqjson); \
\
handler(reqvar, *respvar); \
\
resp_message_ptr = respvar; \
}

Definition at line 39 of file message.h.

39#define REQ_RESP_TYPES_MACRO( runtime_str, type, reqjson, resp_message_ptr, handler) \
40 \
41 if (runtime_str == type::name) \
42 { \
43 type::Request reqvar; \
44 type::Response *respvar = new type::Response(); \
45 \
46 reqvar.fromJson(reqjson); \
47 \
48 handler(reqvar, *respvar); \
49 \
50 resp_message_ptr = respvar; \
51 }