Monero
Loading...
Searching...
No Matches
jsonrpc_structs.h
Go to the documentation of this file.
1#ifndef JSONRPC_STRUCTS_H
2#define JSONRPC_STRUCTS_H
3
4#include <string>
5#include <cstdint>
8
9namespace epee
10{
11 namespace json_rpc
12 {
13 template<typename t_param>
30
31 struct error
32 {
34 std::string message;
35
36 error(): code(0) {}
37
40 KV_SERIALIZE(message)
42 };
43
49
55
56 template<typename t_param, typename t_error>
73
74 template<typename t_param>
89
90 template<typename t_error>
91 struct response<dummy_result, t_error>
92 {
93 std::string jsonrpc;
94 t_error error;
96
97 response(): error{}, id{} {}
98
100 KV_SERIALIZE(jsonrpc)
101 KV_SERIALIZE(id)
104 };
105
107 }
108}
109
110#endif /* JSONRPC_STRUCTS_H */
#define KV_SERIALIZE(varialble)
Definition keyvalue_serialization.h:120
#define END_KV_SERIALIZE_MAP()
Definition keyvalue_serialization.h:118
#define BEGIN_KV_SERIALIZE_MAP()
Definition keyvalue_serialization.h:43
Definition jsonrpc_structs.h:12
response< dummy_result, error > error_response
Definition jsonrpc_structs.h:106
boost::variant< uint64_t, uint32_t, uint16_t, uint8_t, int64_t, int32_t, int16_t, int8_t, double, bool, std::string, section, array_entry > storage_entry
Definition portable_storage_base.h:161
TODO: (mj-xmr) This will be reduced in an another PR.
Definition byte_slice.h:40
const portMappingElt code
Definition portlistingparse.c:22
tools::wallet2::message_signature_result_t result
Definition signature.cpp:62
signed __int64 int64_t
Definition stdint.h:135
Definition jsonrpc_structs.h:45
Definition jsonrpc_structs.h:51
Definition jsonrpc_structs.h:32
int64_t code
Definition jsonrpc_structs.h:33
std::string message
Definition jsonrpc_structs.h:34
error()
Definition jsonrpc_structs.h:36
request()
Definition jsonrpc_structs.h:21
std::string method
Definition jsonrpc_structs.h:17
epee::serialization::storage_entry id
Definition jsonrpc_structs.h:18
std::string jsonrpc
Definition jsonrpc_structs.h:16
t_param params
Definition jsonrpc_structs.h:19
std::string jsonrpc
Definition jsonrpc_structs.h:93
response()
Definition jsonrpc_structs.h:97
t_error error
Definition jsonrpc_structs.h:94
epee::serialization::storage_entry id
Definition jsonrpc_structs.h:95
epee::serialization::storage_entry id
Definition jsonrpc_structs.h:79
response()
Definition jsonrpc_structs.h:81
t_param result
Definition jsonrpc_structs.h:78
std::string jsonrpc
Definition jsonrpc_structs.h:77
Definition jsonrpc_structs.h:58
response()
Definition jsonrpc_structs.h:64
epee::serialization::storage_entry id
Definition jsonrpc_structs.h:61
dummy_result result
Definition jsonrpc_structs.h:60
error error
Definition jsonrpc_structs.h:62
std::string jsonrpc
Definition jsonrpc_structs.h:59