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

The Discord client handler. More...

#include <discord-internal.h>

Collaboration diagram for discord:
[legend]

Data Fields

struct reflectc * registry
 
struct logmod_loggerlogger
 
struct logmod_logger table [64]
 
struct logmod logmod
 
struct discord_config config
 
unsigned pid
 
bool is_original
 
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
 
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
 
struct ccord_szbuf file
 

Detailed Description

Field Documentation

◆ registry

struct reflectc* discord::registry

the registry for all wrapped discord data types

Note
keep as first member for casting to struct reflectc
See also
Data Wrap

◆ logger

struct logmod_logger* discord::logger

DISCORD logging module

◆ table

struct logmod_logger discord::table[64]

LogMod loggers table

◆ logmod

struct logmod discord::logmod

LogMod handler

◆ config

struct discord_config discord::config

the configuration handler

◆ pid

unsigned discord::pid

the id of the process where this modules was created

◆ is_original

bool discord::is_original

whether this is the original client or a clone

◆ io_poller

struct io_poller* discord::io_poller

the io poller for listening to file descriptors

◆ commands

struct discord_message_commands discord::commands

the user's message commands

See also
discord_set_on_command()

◆ refcounter

struct discord_refcounter discord::refcounter

user's data reference counter for automatic cleanup

◆ rest

struct discord_rest discord::rest

the handle for interfacing with Discord's REST API

◆ gw

struct discord_gateway discord::gw

the handle for interfacing with Discord's Gateway API

◆ self

struct discord_user discord::self

the client's user structure

◆ cache

struct discord_cache discord::cache

the handle for registering and retrieving Discord data

◆ shutdown_fd

int discord::shutdown_fd

fd that gets triggered when discord_shutdown_all() is called

◆ internal

struct discord_timers discord::internal

◆ user

struct discord_timers discord::user

◆ 

struct { ... } discord::timers

◆ on_idle

void(* discord::on_idle) (struct discord *client)

triggers when idle

◆ on_cycle

void(* discord::on_cycle) (struct discord *client)

triggers once per loop cycle

◆ data

void* discord::data

user arbitrary data

See also
discord_set_data()

◆ count

int discord::count

amount of worker-threads currently being used by client

◆ lock

pthread_mutex_t discord::lock

synchronize count between workers

◆ cond

pthread_cond_t discord::cond

notify of count decrement

◆ 

struct { ... } * discord::workers

keep tab of amount of worker threads being used by client

◆ file

struct ccord_szbuf discord::file

config.json file contents if client was initialized with discord_from_json()


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