Concord - C Discord API library
A Discord API wrapper library written in C
discord_ret Struct Reference

Request's return context. More...

#include <discord-response.h>

Data Fields

void * data
 
void(* cleanup )(struct discord *client, void *data)
 
const void * keep
 
bool high_priority
 
void(* fail )(struct discord *client, struct discord_response *resp)
 
void(* done )(struct discord *client, struct discord_response *resp)
 
bool sync
 

Detailed Description

Request's return context.

Examples
slash-commands2.c, and webhook.c.

Field Documentation

◆ data

void* discord_ret::data

user arbitrary data to be passed to done or fail callbacks

◆ cleanup

void(* discord_ret::cleanup) (struct discord *client, void *data)

cleanup method to be called for data, once its no longer being referenced

◆ keep

const void* discord_ret::keep

Concord callback parameter the client wish to keep reference

◆ high_priority

bool discord_ret::high_priority

if true then request will be prioritized over already enqueued requests

◆ fail

void(* discord_ret::fail) (struct discord *client, struct discord_response *resp)

optional callback to be executed on a failed request

◆ done

void(* discord_ret::done) (struct discord *client, struct discord_response *resp)

optional callback to be executed on a successful request

◆ sync

bool discord_ret::sync

if true, request will block the thread and perform on-spot

Examples
webhook.c.

The documentation for this struct was generated from the following file: