Concord - C Discord API library
A Discord API wrapper library written in C
application.h
Go to the documentation of this file.
1
6#ifndef API_APPLICATION_H
7#define API_APPLICATION_H
8/* Allow symbols usage without GENCODECS_ prefix */
9#include <stddef.h>
10#include <stdbool.h>
11#include <inttypes.h>
12#include "carray.h"
13#include "cog-utils.h"
14#include "types.h"
15/* Custom JSON encoding macros */
16/* Custom JSON decoding macros */
17/* Custom field macros */
18/* if GENCODECS_READ is not specified then generate for all files */
19/*****************************************************************************
20 * Application Datatypes
21 * **************************************************************************/
25#define DISCORD_APPLICATION_GATEWAY_PRESENCE 1 << 12
26#define DISCORD_APPLICATION_GATEWAY_PRESENCE_LIMITED 1 << 13
27#define DISCORD_APPLICATION_GATEWAY_GUILD_MEMBERS 1 << 14
28#define DISCORD_APPLICATION_GATEWAY_GUILD_MEMBERS_LIMITED 1 << 15
29#define DISCORD_APPLICATION_VERIFICATION_PENDING_GUILD_LIMIT 1 << 16
30#define DISCORD_APPLICATION_EMBEDDED 1 << 17
31#define DISCORD_APPLICATION_GATEWAY_MESSAGE_CONTENT 1 << 18
32#define DISCORD_APPLICATION_GATEWAY_MESSAGE_CONTENT_LIMITED 1 << 19
39 char * name;
41 char * icon;
47
60
63 char * summary;
66 char * verify_key;
71
80 char * slug;
85};
89 struct strings * scopes;
92};
93#include <stddef.h>
94#include <stdbool.h>
95#define JSMN_STRICT
96#define JSMN_HEADER
97#include "jsmn.h"
98#include "jsmn-find.h"
99#define JSONB_HEADER
100#include "json-build.h"
101#include <inttypes.h>
102#include "carray.h"
103#include "cog-utils.h"
104#include "types.h"
105
106
107
108
109
110
111
112
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
140
141
142
143
144
145
146
147
148
149
150
151long discord_application_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_application *self); size_t discord_application_from_json(const char buf[], size_t size, struct discord_application *self);
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177long discord_install_params_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_install_params *self); size_t discord_install_params_from_json(const char buf[], size_t size, struct discord_install_params *self);
178
179
180
181
182
183
184
185
186
187
188
189jsonbcode discord_application_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_application *self); size_t discord_application_to_json(char buf[], size_t size, const struct discord_application *self);
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215jsonbcode discord_install_params_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_install_params *self); size_t discord_install_params_to_json(char buf[], size_t size, const struct discord_install_params *self);
216
217
218
219#endif /* API_APPLICATION_H */
long discord_application_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_application *self)
void discord_application_cleanup(struct discord_application *self)
void discord_install_params_cleanup(struct discord_install_params *self)
long discord_install_params_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_install_params *self)
size_t discord_install_params_from_json(const char buf[], size_t size, struct discord_install_params *self)
jsonbcode discord_install_params_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_install_params *self)
void discord_application_init(struct discord_application *self)
jsonbcode discord_application_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_application *self)
size_t discord_install_params_to_json(char buf[], size_t size, const struct discord_install_params *self)
void discord_install_params_init(struct discord_install_params *self)
size_t discord_application_to_json(char buf[], size_t size, const struct discord_application *self)
size_t discord_application_from_json(const char buf[], size_t size, struct discord_application *self)
uint64_t u64snowflake
Snowflake datatype.
Definition: types.h:28
uint64_t u64bitmask
Bitmask primitive.
Definition: types.h:35
jsonbcode
json-builder return codes
Definition: json-build.h:34
Definition: application.h:35
u64snowflake primary_sku_id
Definition: application.h:77
struct discord_team * team
Definition: application.h:70
char * description
Definition: application.h:43
char * cover_image
Definition: application.h:82
bool bot_public
Definition: application.h:49
u64snowflake id
Definition: application.h:37
char * privacy_policy_url
Definition: application.h:56
char * terms_of_service_url
Definition: application.h:54
struct strings * rpc_origins
Definition: application.h:46
char * icon
Definition: application.h:41
u64bitmask flags
Definition: application.h:84
bool bot_require_code_grant
Definition: application.h:52
char * slug
Definition: application.h:80
u64snowflake guild_id
Definition: application.h:74
struct discord_user * owner
Definition: application.h:59
char * verify_key
Definition: application.h:66
char * summary
Definition: application.h:63
char * name
Definition: application.h:39
Definition: application.h:87
u64bitmask permissions
Definition: application.h:91
struct strings * scopes
Definition: application.h:89
Definition: teams.h:27
Definition: user.h:69
Handle for building a JSON string.
Definition: json-build.h:61
Definition: custom.h:20
int size
Definition: custom.h:20