8#ifndef DISCORD_RESPONSE_H
9#define DISCORD_RESPONSE_H
29#define DISCORD_RET_DEFAULT_FIELDS \
34 void (*cleanup)(struct discord * client, void *data); \
41 void (*fail)(struct discord * client, struct discord_response * resp)
43#define DISCORD_RETURN(_type) \
45 struct discord_ret_##_type { \
46 DISCORD_RET_DEFAULT_FIELDS; \
48 void (*done)(struct discord * client, \
49 struct discord_response *resp, \
50 const struct discord_##_type *ret); \
55 struct discord_##_type *sync; \
68#define DISCORD_SYNC_FLAG ((void *)-1)
#define DISCORD_RETURN(_type)
Definition: discord-response.h:41
#define DISCORD_RET_DEFAULT_FIELDS
Macro containing common fields for struct discord_ret* datatypes.
Definition: discord-response.h:29
CCORDcode
Definition: error.h:12
The response for the completed request.
Definition: discord-response.h:12
const void * keep
Definition: discord-response.h:16
void * data
Definition: discord-response.h:14
CCORDcode code
Definition: discord-response.h:18
Request's return context.
Definition: discord-response.h:54
bool sync
Definition: discord-response.h:59
void(* done)(struct discord *client, struct discord_response *resp)
Definition: discord-response.h:57
The Discord client handler.
Definition: discord-internal.h:1182