|
Concord - C Discord API library
A Discord API wrapper library written in C
|
The Discord client handler. More...
#include <discord-internal.h>
Data Fields | |
| struct logconf | conf |
| bool | is_original |
| char * | token |
| struct io_poller * | io_poller |
| struct discord_message_commands | commands |
| struct discord_refcounter | refcounter |
| struct discord_rest | rest |
| struct discord_gateway | gw |
| struct discord_user | self |
| struct discord_cache | cache |
| int | shutdown_fd |
| struct { | |
| struct discord_timers internal | |
| struct discord_timers user | |
| } | timers |
| struct { | |
| void(* cb )(struct discord *client) | |
| unsigned id | |
| } | wakeup_timer |
| void(* | on_idle )(struct discord *client) |
| void(* | on_cycle )(struct discord *client) |
| void * | data |
| struct { | |
| int count | |
| pthread_mutex_t lock | |
| pthread_cond_t cond | |
| } * | workers |
The Discord client handler.
Used to access/perform public functions from discord.h
| struct logconf discord::conf |
DISCORD logging module
| bool discord::is_original |
whether this is the original client or a clone
| char* discord::token |
the bot token
| struct io_poller* discord::io_poller |
the io poller for listening to file descriptors
| struct discord_message_commands discord::commands |
the user's message commands
| struct discord_refcounter discord::refcounter |
user's data reference counter for automatic cleanup
| struct discord_rest discord::rest |
the handle for interfacing with Discord's REST API
| struct discord_gateway discord::gw |
the handle for interfacing with Discord's Gateway API
| struct discord_user discord::self |
the client's user structure
| struct discord_cache discord::cache |
the handle for registering and retrieving Discord data
| int discord::shutdown_fd |
fd that gets triggered when ccord_shutdown_async is called
| struct discord_timers discord::internal |
| struct discord_timers discord::user |
| struct { ... } discord::timers |
| void(* discord::cb) (struct discord *client) |
callback to be triggered on timer's timeout
| unsigned discord::id |
the id of the wake timer
| struct { ... } discord::wakeup_timer |
wakeup timer handle
| void(* discord::on_idle) (struct discord *client) |
triggers when idle
| void(* discord::on_cycle) (struct discord *client) |
triggers once per loop cycle
| void* discord::data |
user arbitrary data
| int discord::count |
amount of worker-threads currently being used by client
| pthread_mutex_t discord::lock |
synchronize count between workers
| pthread_cond_t discord::cond |
notify of count decrement
| struct { ... } * discord::workers |
keep tab of amount of worker threads being used by client