Orca
A bot framework that is easy to reason about, easy to debug, and easy to use.
invite.h
Go to the documentation of this file.
1 /* This file is generated from specs/discord/invite.json, Please don't edit it. */
12 enum discord_invite_target_user_types {
13  DISCORD_INVITE_STREAM = 1,
14 };
15 extern char* discord_invite_target_user_types_to_string(enum discord_invite_target_user_types);
16 extern enum discord_invite_target_user_types discord_invite_target_user_types_from_string(char*);
17 extern bool discord_invite_target_user_types_has(enum discord_invite_target_user_types, char*);
18 
26  /* specs/discord/invite.json:22:20
27  '{ "name": "code", "type":{ "base":"char", "dec":"*" }, "comment":"@todo fixed size limit"}' */
28  char *code; // @todo fixed size limit
29 
30  /* specs/discord/invite.json:23:20
31  '{ "name": "guild", "type":{ "base":"struct discord_guild", "dec":"*"}, "comment":"partial guild object"}' */
32  struct discord_guild *guild; // partial guild object
33 
34  /* specs/discord/invite.json:24:20
35  '{ "name": "channel", "type":{ "base":"struct discord_channel", "dec":"*"}, "comment":"partial channel object"}' */
36  struct discord_channel *channel; // partial channel object
37 
38  /* specs/discord/invite.json:25:20
39  '{ "name": "inviter", "type":{ "base":"struct discord_user", "dec":"*"}}' */
40  struct discord_user *inviter;
41 
42  /* specs/discord/invite.json:26:20
43  '{ "name": "target_user", "type":{ "base":"struct discord_user", "dec":"*"}, "comment":"partial user object"}' */
44  struct discord_user *target_user; // partial user object
45 
46  /* specs/discord/invite.json:27:20
47  '{ "name": "target_user_type", "type":{ "base":"int", "int_alias":"enum discord_invite_target_user_types" }}' */
48  enum discord_invite_target_user_types target_user_type;
49 
50  /* specs/discord/invite.json:28:20
51  '{ "name": "approximate_presence_count", "type":{ "base":"int" }}' */
52  int approximate_presence_count;
53 
54  /* specs/discord/invite.json:29:20
55  '{ "name": "approximate_member_count", "type":{ "base":"int" }}' */
56  int approximate_member_count;
57 
58  // The following is metadata used to
59  // 1. control which field should be extracted/injected
60  // 2. record which field is presented(defined) in JSON
61  // 3. record which field is null in JSON
63  struct {
64  bool enable_arg_switches;
65  bool enable_record_defined;
66  bool enable_record_null;
67  void *arg_switches[8];
68  void *record_defined[8];
69  void *record_null[8];
70  } __M; // metadata
72 };
73 extern void discord_invite_cleanup_v(void *p);
74 extern void discord_invite_cleanup(struct discord_invite *p);
75 extern void discord_invite_init_v(void *p);
76 extern void discord_invite_init(struct discord_invite *p);
77 extern struct discord_invite * discord_invite_alloc();
78 extern void discord_invite_free_v(void *p);
79 extern void discord_invite_free(struct discord_invite *p);
80 extern void discord_invite_from_json_v(char *json, size_t len, void *p);
81 extern void discord_invite_from_json(char *json, size_t len, struct discord_invite *p);
82 extern size_t discord_invite_to_json_v(char *json, size_t len, void *p);
83 extern size_t discord_invite_to_json(char *json, size_t len, struct discord_invite *p);
84 extern size_t discord_invite_to_query_v(char *json, size_t len, void *p);
85 extern size_t discord_invite_to_query(char *json, size_t len, struct discord_invite *p);
86 extern void discord_invite_list_free_v(void **p);
87 extern void discord_invite_list_free(struct discord_invite **p);
88 extern void discord_invite_list_from_json_v(char *str, size_t len, void *p);
89 extern void discord_invite_list_from_json(char *str, size_t len, struct discord_invite ***p);
90 extern size_t discord_invite_list_to_json_v(char *str, size_t len, void *p);
91 extern size_t discord_invite_list_to_json(char *str, size_t len, struct discord_invite **p);
92 
100  /* specs/discord/invite.json:39:20
101  '{ "name": "user", "type":{ "base":"int" }}' */
102  int user;
103 
104  /* specs/discord/invite.json:40:20
105  '{ "name": "max_uses", "type":{ "base":"int" }}' */
106  int max_uses;
107 
108  /* specs/discord/invite.json:41:20
109  '{ "name": "max_age", "type":{ "base":"int" }}' */
110  int max_age;
111 
112  /* specs/discord/invite.json:42:20
113  '{ "name": "temporary", "type":{ "base":"int" }}' */
114  int temporary;
115 
116  /* specs/discord/invite.json:43:20
117  '{ "name": "created_at", "type":{ "base":"char", "dec":"*", "converter":"iso8601"}}' */
118  u64_unix_ms_t created_at;
119 
120  // The following is metadata used to
121  // 1. control which field should be extracted/injected
122  // 2. record which field is presented(defined) in JSON
123  // 3. record which field is null in JSON
125  struct {
126  bool enable_arg_switches;
127  bool enable_record_defined;
128  bool enable_record_null;
129  void *arg_switches[5];
130  void *record_defined[5];
131  void *record_null[5];
132  } __M; // metadata
134 };
135 extern void discord_invite_metadata_cleanup_v(void *p);
136 extern void discord_invite_metadata_cleanup(struct discord_invite_metadata *p);
137 extern void discord_invite_metadata_init_v(void *p);
138 extern void discord_invite_metadata_init(struct discord_invite_metadata *p);
139 extern struct discord_invite_metadata * discord_invite_metadata_alloc();
140 extern void discord_invite_metadata_free_v(void *p);
141 extern void discord_invite_metadata_free(struct discord_invite_metadata *p);
142 extern void discord_invite_metadata_from_json_v(char *json, size_t len, void *p);
143 extern void discord_invite_metadata_from_json(char *json, size_t len, struct discord_invite_metadata *p);
144 extern size_t discord_invite_metadata_to_json_v(char *json, size_t len, void *p);
145 extern size_t discord_invite_metadata_to_json(char *json, size_t len, struct discord_invite_metadata *p);
146 extern size_t discord_invite_metadata_to_query_v(char *json, size_t len, void *p);
147 extern size_t discord_invite_metadata_to_query(char *json, size_t len, struct discord_invite_metadata *p);
148 extern void discord_invite_metadata_list_free_v(void **p);
149 extern void discord_invite_metadata_list_free(struct discord_invite_metadata **p);
150 extern void discord_invite_metadata_list_from_json_v(char *str, size_t len, void *p);
151 extern void discord_invite_metadata_list_from_json(char *str, size_t len, struct discord_invite_metadata ***p);
152 extern size_t discord_invite_metadata_list_to_json_v(char *str, size_t len, void *p);
153 extern size_t discord_invite_metadata_list_to_json(char *str, size_t len, struct discord_invite_metadata **p);
discord_invite_metadata
Invite Metadata Structure.
Definition: invite.h:99
discord_guild
Guild Structure.
Definition: guild.h:17
u64_unix_ms_t
uint64_t u64_unix_ms_t
unix time in ms
Definition: discord.h:26
discord_channel
Channel Structure.
Definition: channel.h:31
discord_invite
Invite Structure.
Definition: invite.h:25
discord_user
User Structure.
Definition: user.h:45