Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
db_size_api_plugin.cpp File Reference
Include dependency graph for db_size_api_plugin.cpp:

Go to the source code of this file.

Namespaces

namespace  sysio
 

Macros

#define CALL_WITH_400(api_name, api_handle, call_name, INVOKE, http_response_code)
 
#define INVOKE_R_V(api_handle, call_name)
 

Macro Definition Documentation

◆ CALL_WITH_400

#define CALL_WITH_400 ( api_name,
api_handle,
call_name,
INVOKE,
http_response_code )
Value:
{std::string("/v1/" #api_name "/" #call_name), \
[api_handle](string, string body, url_response_callback cb) mutable { \
try { \
body = parse_params<std::string, http_params_types::no_params>(body); \
INVOKE \
cb(http_response_code, fc::variant(result)); \
} catch (...) { \
http_plugin::handle_exception(#api_name, #call_name, body, cb); \
} \
}}
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Definition variant.hpp:191

Definition at line 12 of file db_size_api_plugin.cpp.

12#define CALL_WITH_400(api_name, api_handle, call_name, INVOKE, http_response_code) \
13{std::string("/v1/" #api_name "/" #call_name), \
14 [api_handle](string, string body, url_response_callback cb) mutable { \
15 try { \
16 body = parse_params<std::string, http_params_types::no_params>(body); \
17 INVOKE \
18 cb(http_response_code, fc::variant(result)); \
19 } catch (...) { \
20 http_plugin::handle_exception(#api_name, #call_name, body, cb); \
21 } \
22 }}

◆ INVOKE_R_V

#define INVOKE_R_V ( api_handle,
call_name )
Value:
auto result = api_handle->call_name();

Definition at line 24 of file db_size_api_plugin.cpp.

24#define INVOKE_R_V(api_handle, call_name) \
25 auto result = api_handle->call_name();