Documentation useful when developing or debugging Concord itself.
More...
Documentation useful when developing or debugging Concord itself.
◆ CLIENT
get client from its nested field
- Parameters
-
| [in] | _ptr | the nested field pointer |
| [in] | _path | the path to the discord client from the nested field POV |
◆ CCORD_EXPECT
| #define CCORD_EXPECT |
( |
|
_client, |
|
|
|
_expect, |
|
|
|
_code, |
|
|
|
_reason |
|
) |
| |
Value: do { \
if (!(_expect)) { \
logmod_log(ERROR, (_client)->logger, \
"Expected: " #_expect " | %s (%s)", \
return _code; \
} \
} while (0)
const char * discord_code_as_string(CCORDcode code)
Return the value of CCORDcode as a string.
const char * discord_strerror(CCORDcode code, struct discord *client)
Return the meaning of CCORDcode.
log and return code if expect condition is false
- Parameters
-
| [in] | _client | the Discord client |
| [in] | _expect | the expected outcome |
| [in] | _code | return CCORDcode error code |
| [in] | _reason | for return |
- Returns
- the provided CCORDcode
code parameter
◆ CCORD_DATA_TO_JSON
| #define CCORD_DATA_TO_JSON |
( |
|
_client, |
|
|
|
_type, |
|
|
|
_body, |
|
|
|
_params |
|
) |
| |
Value: do { \
struct reflectc_wrap *w_params = \
reflectc_from_##_type((_client)->registry, _params, NULL); \
&(_body)->size); \
reflectc_cleanup((_client)->registry, w_params); \
logmod_log(ERROR, (_client)->logger, \
"Expected: CCORD_OK == discord_data_wrap_to_json | " \
"%s (%s)", \
return code; \
} \
} while (0)
#define CCORD_OK
Definition: concord-error.h:60
CCORDcode discord_data_wrap_to_json(const struct reflectc_wrap *member, char *p_buf[], size_t *p_bufsize)
Transform a wrapped Discord data type into a JSON string.
log and return code if function call doesn't returns CCORD_OK
- Parameters
-
| [in] | _client | the Discord client |
| [in] | _type | the datatype to be converted to JSON |
| [out] | _body | the JSON body buffer |
| [in] | _params | the parameters to be converted to JSON |
- Returns
- the returned CCORDcode
code parameter
◆ DISCORD_ENDPT_LEN
| #define DISCORD_ENDPT_LEN 512 |
URL endpoint threshold length
◆ DISCORD_ROUTE_LEN
| #define DISCORD_ROUTE_LEN 256 |
Route's unique key threshold length