Concord - C Discord API library
A Discord API wrapper library written in C
user.h File Reference

Generated code. More...

#include <stddef.h>
#include <stdbool.h>
#include <inttypes.h>
#include "carray.h"
#include "cog-utils.h"
#include "types.h"
#include "jsmn.h"
#include "jsmn-find.h"
#include "json-build.h"
Include dependency graph for user.h:

Go to the source code of this file.

Data Structures

struct  discord_user
 
struct  discord_users
 
struct  discord_connection
 
struct  discord_connections
 
struct  discord_modify_current_user
 
struct  discord_get_current_user_guilds
 
struct  discord_create_dm
 
struct  discord_create_group_dm
 

Macros

#define DISCORD_USER_NONE   0
 
#define DISCORD_USER_STAFF   1 << 0
 
#define DISCORD_USER_PARTNER   1 << 1
 
#define DISCORD_USER_HYPESQUAD   1 << 2
 
#define DISCORD_USER_BUG_HUNTER_LEVEL_1   1 << 3
 
#define DISCORD_USER_HYPESQUAD_ONLINE_HOUSE_1   1 << 6
 
#define DISCORD_USER_HYPESQUAD_ONLINE_HOUSE_2   1 << 7
 
#define DISCORD_USER_HYPESQUAD_ONLINE_HOUSE_3   1 << 8
 
#define DISCORD_USER_PREMIUM_EARLY_SUPPORTER   1 << 9
 
#define DISCORD_USER_TEAM_PSEUDO_USER   1 << 10
 
#define DISCORD_USER_BUG_HUNTER_LEVEL_2   1 << 14
 
#define DISCORD_USER_VERIFIED_BOT   1 << 16
 
#define DISCORD_USER_VERIFIED_DEVELOPER   1 << 17
 
#define DISCORD_USER_CERTIFIED_MODERATOR   1 << 18
 
#define DISCORD_USER_BOT_HTTP_INTERACTIONS   1 << 19
 
#define JSMN_STRICT
 
#define JSMN_HEADER
 
#define JSONB_HEADER
 

Enumerations

enum  discord_premium_types { DISCORD_PREMIUM_NONE = 0 , DISCORD_PREMIUM_NITRO_CLASSIC = 1 , DISCORD_PREMIUM_NITRO = 2 }
 
enum  discord_visibility_types { DISCORD_VISIBILITY_NONE = 0 , DISCORD_VISIBILITY_EVERYONE = 1 }
 

Functions

void discord_user_init (struct discord_user *self)
 
void discord_user_cleanup (struct discord_user *self)
 
void discord_users_cleanup (struct discord_users *self)
 
void discord_connections_cleanup (struct discord_connections *self)
 
void discord_modify_current_user_init (struct discord_modify_current_user *self)
 
void discord_modify_current_user_cleanup (struct discord_modify_current_user *self)
 
void discord_create_dm_init (struct discord_create_dm *self)
 
void discord_create_dm_cleanup (struct discord_create_dm *self)
 
void discord_create_group_dm_init (struct discord_create_group_dm *self)
 
void discord_create_group_dm_cleanup (struct discord_create_group_dm *self)
 
long discord_user_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_user *self)
 
size_t discord_user_from_json (const char buf[], size_t size, struct discord_user *self)
 
long discord_users_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_users *self)
 
size_t discord_users_from_json (const char buf[], size_t size, struct discord_users *self)
 
long discord_connections_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_connections *self)
 
size_t discord_connections_from_json (const char buf[], size_t size, struct discord_connections *self)
 
long discord_modify_current_user_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_modify_current_user *self)
 
size_t discord_modify_current_user_from_json (const char buf[], size_t size, struct discord_modify_current_user *self)
 
long discord_create_dm_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_create_dm *self)
 
size_t discord_create_dm_from_json (const char buf[], size_t size, struct discord_create_dm *self)
 
long discord_create_group_dm_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_create_group_dm *self)
 
size_t discord_create_group_dm_from_json (const char buf[], size_t size, struct discord_create_group_dm *self)
 
jsonbcode discord_user_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_user *self)
 
size_t discord_user_to_json (char buf[], size_t size, const struct discord_user *self)
 
jsonbcode discord_users_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_users *self)
 
size_t discord_users_to_json (char buf[], size_t size, const struct discord_users *self)
 
jsonbcode discord_connections_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_connections *self)
 
size_t discord_connections_to_json (char buf[], size_t size, const struct discord_connections *self)
 
jsonbcode discord_modify_current_user_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_modify_current_user *self)
 
size_t discord_modify_current_user_to_json (char buf[], size_t size, const struct discord_modify_current_user *self)
 
jsonbcode discord_create_dm_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_create_dm *self)
 
size_t discord_create_dm_to_json (char buf[], size_t size, const struct discord_create_dm *self)
 
jsonbcode discord_create_group_dm_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_create_group_dm *self)
 
size_t discord_create_group_dm_to_json (char buf[], size_t size, const struct discord_create_group_dm *self)
 

Detailed Description

Generated code.

Author
Cogmasters

Macro Definition Documentation

◆ JSMN_STRICT

#define JSMN_STRICT

◆ JSMN_HEADER

#define JSMN_HEADER

◆ JSONB_HEADER

#define JSONB_HEADER

Enumeration Type Documentation

◆ discord_premium_types

Enumerator
DISCORD_PREMIUM_NONE 
DISCORD_PREMIUM_NITRO_CLASSIC 
DISCORD_PREMIUM_NITRO 

◆ discord_visibility_types

Enumerator
DISCORD_VISIBILITY_NONE 

invisible to everyone except the user themselves

DISCORD_VISIBILITY_EVERYONE 

visible to everyone

Function Documentation

◆ discord_user_init()

void discord_user_init ( struct discord_user self)

◆ discord_user_cleanup()

void discord_user_cleanup ( struct discord_user self)

◆ discord_users_cleanup()

void discord_users_cleanup ( struct discord_users self)

◆ discord_connections_cleanup()

void discord_connections_cleanup ( struct discord_connections self)

◆ discord_modify_current_user_init()

void discord_modify_current_user_init ( struct discord_modify_current_user self)

◆ discord_modify_current_user_cleanup()

void discord_modify_current_user_cleanup ( struct discord_modify_current_user self)

◆ discord_create_dm_init()

void discord_create_dm_init ( struct discord_create_dm self)

◆ discord_create_dm_cleanup()

void discord_create_dm_cleanup ( struct discord_create_dm self)

◆ discord_create_group_dm_init()

void discord_create_group_dm_init ( struct discord_create_group_dm self)

◆ discord_create_group_dm_cleanup()

void discord_create_group_dm_cleanup ( struct discord_create_group_dm self)

◆ discord_user_from_jsmnf()

long discord_user_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_user self 
)

◆ discord_user_from_json()

size_t discord_user_from_json ( const char  buf[],
size_t  size,
struct discord_user self 
)

◆ discord_users_from_jsmnf()

long discord_users_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_users self 
)

◆ discord_users_from_json()

size_t discord_users_from_json ( const char  buf[],
size_t  size,
struct discord_users self 
)

◆ discord_connections_from_jsmnf()

long discord_connections_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_connections self 
)

◆ discord_connections_from_json()

size_t discord_connections_from_json ( const char  buf[],
size_t  size,
struct discord_connections self 
)

◆ discord_modify_current_user_from_jsmnf()

long discord_modify_current_user_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_modify_current_user self 
)

◆ discord_modify_current_user_from_json()

size_t discord_modify_current_user_from_json ( const char  buf[],
size_t  size,
struct discord_modify_current_user self 
)

◆ discord_create_dm_from_jsmnf()

long discord_create_dm_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_create_dm self 
)

◆ discord_create_dm_from_json()

size_t discord_create_dm_from_json ( const char  buf[],
size_t  size,
struct discord_create_dm self 
)

◆ discord_create_group_dm_from_jsmnf()

long discord_create_group_dm_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_create_group_dm self 
)

◆ discord_create_group_dm_from_json()

size_t discord_create_group_dm_from_json ( const char  buf[],
size_t  size,
struct discord_create_group_dm self 
)

◆ discord_user_to_jsonb()

jsonbcode discord_user_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_user self 
)

◆ discord_user_to_json()

size_t discord_user_to_json ( char  buf[],
size_t  size,
const struct discord_user self 
)

◆ discord_users_to_jsonb()

jsonbcode discord_users_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_users self 
)

◆ discord_users_to_json()

size_t discord_users_to_json ( char  buf[],
size_t  size,
const struct discord_users self 
)

◆ discord_connections_to_jsonb()

jsonbcode discord_connections_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_connections self 
)

◆ discord_connections_to_json()

size_t discord_connections_to_json ( char  buf[],
size_t  size,
const struct discord_connections self 
)

◆ discord_modify_current_user_to_jsonb()

jsonbcode discord_modify_current_user_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_modify_current_user self 
)

◆ discord_modify_current_user_to_json()

size_t discord_modify_current_user_to_json ( char  buf[],
size_t  size,
const struct discord_modify_current_user self 
)

◆ discord_create_dm_to_jsonb()

jsonbcode discord_create_dm_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_create_dm self 
)

◆ discord_create_dm_to_json()

size_t discord_create_dm_to_json ( char  buf[],
size_t  size,
const struct discord_create_dm self 
)

◆ discord_create_group_dm_to_jsonb()

jsonbcode discord_create_group_dm_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_create_group_dm self 
)

◆ discord_create_group_dm_to_json()

size_t discord_create_group_dm_to_json ( char  buf[],
size_t  size,
const struct discord_create_group_dm self 
)