ts3plugin_sys/
public_definitions.rs

1#![allow(dead_code)]
2// Uses lots of alignment which rustfmt destroys
3#![cfg_attr(rustfmt, rustfmt::skip)]
4
5//! This file contains the definitions of public_definitions.h and public_rare_definitions.h
6
7use std;
8use std::os::raw::*;
9
10/// channel name maximum length in characters
11pub const MAX_SIZE_CHANNEL_NAME:                     usize = 40;
12/// virtual server name maximum length in characters
13pub const MAX_SIZE_VIRTUALSERVER_NAME:               usize = 40;
14/// client display name length limit in characters
15pub const MAX_SIZE_CLIENT_NICKNAME:                  usize = 40;
16/// client display name minimum length in characters
17pub const MIN_SIZE_CLIENT_NICKNAME:                  usize =  3;
18/// length limit in characters for kick, move, etc reasons
19pub const MAX_SIZE_REASON_MESSAGE:                   usize = 80;
20pub const MAX_SIZE_CLIENT_NICKNAME_NONSDK:           usize = 30;
21pub const MIN_SIZE_CLIENT_NICKNAME_NONSDK:           usize =  3;
22pub const MAX_SIZE_AWAY_MESSAGE:                     usize = 80;
23pub const MAX_SIZE_GROUP_NAME:                       usize = 30;
24pub const MAX_SIZE_TALK_REQUEST_MESSAGE:             usize = 50;
25pub const MAX_SIZE_COMPLAIN_MESSAGE:                 usize = 200;
26pub const MAX_SIZE_CLIENT_DESCRIPTION:               usize = 200;
27pub const MAX_SIZE_HOST_MESSAGE:                     usize = 200;
28pub const MAX_SIZE_HOSTBUTTON_TOOLTIP:               usize = 50;
29pub const MAX_SIZE_POKE_MESSAGE:                     usize = 100;
30pub const MAX_SIZE_OFFLINE_MESSAGE:                  usize = 4096;
31pub const MAX_SIZE_OFFLINE_MESSAGE_SUBJECT:          usize = 200;
32pub const MAX_SIZE_USER_TAG:                         usize = 100;
33
34/// text message length limit, measured in bytes (utf8 encoded)
35pub const MAX_SIZE_TEXTMESSAGE:                      usize = 8192;
36/// // channel topic lengt limith, measured in bytes (utf8 encoded)
37pub const MAX_SIZE_CHANNEL_TOPIC:                    usize =  255;
38/// channel description length limit, measured in bytes (utf8 encoded)
39pub const MAX_SIZE_CHANNEL_DESCRIPTION:              usize = 8192;
40/// server welcome message length limit measured in bytes (utf8 encoded)
41pub const MAX_SIZE_VIRTUALSERVER_WELCOMEMESSAGE:     usize = 1024;
42pub const MAX_SIZE_VIRTUALSERVER_HOSTBANNER_GFX_URL: usize = 2000;
43pub const SIZE_MYTSID:                               usize = 44;
44
45/// Minimum amount of seconds before a clientID that was in use can be assigned to a new client
46pub const MIN_SECONDS_CLIENTID_REUSE:                usize = 300;
47pub const MAX_VARIABLES_EXPORT_COUNT:                usize = 64;
48
49#[repr(C)]
50#[derive(Debug, PartialEq, Eq, Clone, Copy)]
51pub enum Visibility {
52	/// Client joined from an unsubscribed channel, or joined the server.
53	Enter = 0,
54	/// Client switched from one subscribed channel to a different subscribed channel.
55	Retain,
56	/// Client switches to an unsubscribed channel, or disconnected from server.
57	Leave,
58}
59
60#[repr(C)]
61#[derive(Debug, PartialEq, Eq, Clone, Copy)]
62pub enum ConnectStatus {
63	/// There is no activity to the server, this is the default value
64	Disconnected = 0,
65	/// We are trying to connect, we haven't got a clientID yet, we haven't been accepted by the server
66	Connecting,
67	/// The server has accepted us, we can talk and hear and we got a clientID, but we don't have the channels and clients yet, we can get server infos (welcome msg etc.)
68	Connected,
69	/// We are connected and we are visible
70	ConnectionEstablishing,
71	/// We are connected and we have the client and channels available
72	ConnectionEstablished,
73}
74
75#[repr(C)]
76#[derive(Debug, PartialEq, Eq, Clone, Copy)]
77pub enum LocalTestMode {
78	Off = 0,
79	VoiceLocalOnly,
80	VoiceLocalAndRemote,
81	TalkStatusChangesOnly,
82}
83
84bitflags! {
85/// Speaker locations used by some sound callbacks
86#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]
87pub struct Speaker: c_uint {
88	const SPEAKER_FRONT_LEFT            = 0x00001;
89	const SPEAKER_FRONT_RIGHT           = 0x00002;
90	const SPEAKER_FRONT_CENTER          = 0x00004;
91	const SPEAKER_LOW_FREQUENCY         = 0x00008;
92	const SPEAKER_BACK_LEFT             = 0x00010;
93	const SPEAKER_BACK_RIGHT            = 0x00020;
94	const SPEAKER_FRONT_LEFT_OF_CENTER  = 0x00040;
95	const SPEAKER_FRONT_RIGHT_OF_CENTER = 0x00080;
96	const SPEAKER_BACK_CENTER           = 0x00100;
97	const SPEAKER_SIDE_LEFT             = 0x00200;
98	const SPEAKER_SIDE_RIGHT            = 0x00400;
99	const SPEAKER_TOP_CENTER            = 0x00800;
100	const SPEAKER_TOP_FRONT_LEFT        = 0x01000;
101	const SPEAKER_TOP_FRONT_CENTER      = 0x02000;
102	const SPEAKER_TOP_FRONT_RIGHT       = 0x04000;
103	const SPEAKER_TOP_BACK_LEFT         = 0x08000;
104	const SPEAKER_TOP_BACK_CENTER       = 0x10000;
105	const SPEAKER_TOP_BACK_RIGHT        = 0x20000;
106	const SPEAKER_HEADPHONES_LEFT       = 0x10000000;
107	const SPEAKER_HEADPHONES_RIGHT      = 0x20000000;
108	const SPEAKER_MONO                  = 0x40000000;
109}}
110
111#[repr(C)]
112#[derive(Debug, PartialEq, Eq, Clone, Copy)]
113pub enum TalkStatus {
114	/// client is not talking
115	NotTalking           = 0,
116	/// client is talking
117	Talking              = 1,
118	/// client is talking while the microphone is muted (only valid for own client)
119	TalkingWhileDisabled = 2,
120}
121
122#[repr(C)]
123#[derive(Debug, PartialEq, Eq, Clone, Copy)]
124pub enum CodecType {
125	/// (deprecated) Mono,   16bit,  8kHz, bitrate dependent on the quality setting
126	SpeexNarrowband = 0,
127	/// (deprecated) Mono,   16bit, 16kHz, bitrate dependent on the quality setting
128	SpeexWideband,
129	/// (deprecated) Mono,   16bit, 32kHz, bitrate dependent on the quality setting
130	SpeexUltrawideband,
131	/// (deprecated) Mono,   16bit, 48kHz, bitrate dependent on the quality setting
132	CeltMono,
133	/// Mono,   16bit, 48kHz, bitrate dependent on the quality setting, optimized for voice
134	OpusVoice,
135	/// Stereo, 16bit, 48kHz, bitrate dependent on the quality setting, optimized for music
136	OpusMusic,
137}
138
139#[repr(C)]
140#[derive(Debug, PartialEq, Eq, Clone, Copy)]
141pub enum CodecEncryptionMode {
142	/// voice data encryption decided per channel
143	PerChannel = 0,
144	/// voice data encryption disabled
145	ForcedOff,
146	/// voice data encryption enabled
147	ForcedOn,
148}
149
150#[repr(C)]
151#[derive(Debug, PartialEq, Eq, Clone, Copy)]
152pub enum TextMessageTargetMode {
153	/// Message is a private message to another client
154	Client = 1,
155	/// Message is sent to a channel, received by all clients in that channel at the time
156	Channel,
157	/// Message is sent to every client on the server
158	Server,
159	Max,
160}
161
162#[repr(C)]
163#[derive(Debug, PartialEq, Eq, Clone, Copy)]
164pub enum MuteInputStatus {
165	/// Microphone is not muted, audio is sent to the server
166	None = 0,
167	/// Microphone is muted, no audio is transmitted to the server
168	Muted,
169}
170
171#[repr(C)]
172#[derive(Debug, PartialEq, Eq, Clone, Copy)]
173pub enum MuteOutputStatus {
174	/// Speaker is active, server is sending us audio
175	None = 0,
176	/// Speaker is muted, server is not sending audio to us
177	Muted,
178}
179
180#[repr(C)]
181#[derive(Debug, PartialEq, Eq, Clone, Copy)]
182pub enum HardwareInputStatus {
183	/// no capture device opened
184	Disabled = 0,
185	/// capture device open
186	Enabled,
187}
188
189#[repr(C)]
190#[derive(Debug, PartialEq, Eq, Clone, Copy)]
191pub enum HardwareOutputStatus {
192	/// no playback device opened
193	Disabled = 0,
194	/// playback device open
195	Enabled,
196}
197
198#[repr(C)]
199#[derive(Debug, PartialEq, Eq, Clone, Copy)]
200pub enum InputDeactivationStatus {
201	/// Audio is captured from the capture device.
202	Active      = 0,
203	/// No audio is captured from the capture device.
204	Deactivated = 1,
205}
206
207#[repr(C)]
208#[derive(Debug, PartialEq, Eq, Clone, Copy)]
209pub enum ReasonIdentifier {
210	/// No reason data
211	None                              = 0,
212	/// client was moved
213	Moved                             = 1,
214	/// No reason data
215	Subscription                      = 2,
216	/// reasonmsg = reason
217	LostConnection                    = 3,
218	/// {SectionInvoker} reasonmsg=reason; {SectionInvoker} is only added server->client
219	KickChannel                       = 4,
220	/// {SectionInvoker} reasonmsg=reason; {SectionInvoker} is only added server->client
221	KickServer                        = 5,
222	/// {SectionInvoker} reasonmsg=reason bantime=time; {SectionInvoker} is only added server->client
223	KickServerBan                     = 6,
224	/// reasonmsg = reason
225	Serverstop                        = 7,
226	/// reasonmsg = reason
227	Clientdisconnect                  = 8,
228	/// No reason data
229	Channelupdate                     = 9,
230	/// {SectionInvoker}
231	Channeledit                       = 10,
232	/// reasonmsg = reason
233	ClientdisconnectServerShutdown    = 11,
234}
235
236#[repr(C)]
237#[derive(Debug, PartialEq, Eq, Clone, Copy)]
238pub enum ProtocolEncryptionCipher {
239	Aes128 = 0,
240	Aes256,
241	EndMarker,
242}
243
244#[repr(C)]
245#[derive(Debug, PartialEq, Eq, Clone, Copy)]
246pub enum ChannelProperties {
247	/// String.  Read/Write. Name of the channel. Always available.
248	Name = 0,
249	/// String.  Read/Write. Short single line text describing what the channel is about. Always available.
250	Topic,
251	/// String.  Read/Write. Arbitrary text (up to 8k bytes) with information about the channel.
252	/// Must be requested (`ts3client_requestChannelDescription`)
253	Description,
254	/// String.  Read/Write. Password of the channel. Read access is limited to the server. Clients
255	/// will only ever see the last password they attempted to use when joining the channel. Always available.
256	Password,
257	/// Integer. Read/Write. The codec this channel is using. One of the values from the `CodecType`
258	/// enum. Always available.
259	Codec,
260	/// Integer. Read/Write. The quality setting of the channel. Valid values are 0 to 10 inclusive.
261	/// Higher value means better voice quality but also more bandwidth usage. Always available.
262	CodecQuality,
263	/// Integer. Read/Write. The number of clients that can be in the channel simultaneously.
264	/// Always available.
265	MaxClients,
266	/// Integer. Read/Write. The total number of clients that can be in this channel and all
267	/// sub channels of this channel. Always available.
268	MaxFamilyClients,
269	/// UInt64.  Read/Write. The ID of the channel below which this channel should be displayed. If 0
270	/// the channel is sorted at the top of the current level. Always available.
271	Order,
272	/// Integer. Read/Write. Boolean (1/0) indicating whether the channel remains when empty.
273	/// Permanent channels are stored to the database and available after server restart. SDK
274	/// users will need to take care of restoring channel at server start on their own.
275	/// Mutually exclusive with `CHANNEL_FLAG_SEMI_PERMANENT`. Always available.
276	FlagPermanent,
277	/// Integer. Read/Write. Boolean (1/0) indicating whether the channel remains when
278	/// empty. Semi permanent channels are not stored to disk and gone after server
279	/// restart but remain while empty. Mutually exclusive with 
280	/// `CHANNEL_FLAG_PERMANENT.`` Always available.
281	FlagSemiPermanent,
282	/// Integer. Read/Write. Boolean (1/0). The default channel is the channel that all clients
283	/// are located in when they join the server, unless the client explicitly specified a
284	/// different channel when connecting and is allowed to join their preferred channel. Only
285	/// one channel on the server can have this flag set. The default channel must have 
286	/// `CHANNEL_FLAG_PERMANENT` set. Always available.
287	FlagDefault,
288	/// Integer. Read/Write. Boolean (1/0) indicating whether this channel is password protected.
289	/// When removing or setting `CHANNEL_PASSWORD` you also need to adjust this flag.
290	FlagPassword,
291	/// (deprecated) Integer. Read/Write. Allows to increase packet size, reducing
292	/// bandwith at the cost of higher latency of voice transmission. Valid values are
293	/// 1-10 inclusive. 1 is the default and offers the lowest latency. Always available.
294	CodecLatencyFactor,
295	/// Integer. Read/Write. Boolean (1/0). If 0 voice data is encrypted, if 1 the voice
296	/// data is not encrypted. Only used if the server 
297	/// `VIRTUALSERVER_CODEC_ENCRYPTION_MODE` is set to `CODEC_ENCRYPTION_PER_CHANNEL`.
298	/// Always available.
299	CodecIsUnencrypted,
300	/// String.  Read/Write. SDK Only, not used by TeamSpeak. This channels security hash. When
301	/// a client joins their `CLIENT_SECURITY_HASH` is compared to this value, to allow or
302	/// deny the client access to the channel. Used to enforce clients joining the server with
303	/// specific identity and `CLIENT_META_DATA`. See SDK Documentation about this feature
304	/// for further details. Always available.
305	SecuritySalt,
306	/// UInt64.  Read/Write. Number of seconds deletion of temporary channels is delayed after
307	/// the last client leaves the channel. Channel is only deleted if empty when the delete
308	/// delay expired. Always available.
309	DeleteDelay,
310	/// String.  Read only.  An identifier that uniquely identifies a channel. Available in
311	/// Server >= 3.10.0
312	UniqueIdentifier,
313
314	/// Rare properties
315	Dummy3,
316	Dummy4,
317	Dummy5,
318	Dummy6,
319	Dummy7,
320	/// Available for all channels that are "in view", always up-to-date
321	FlagMaxClientsUnlimited,
322	/// Available for all channels that are "in view", always up-to-date
323	FlagMaxFamilyClientsUnlimited,
324	/// Available for all channels that are "in view", always up-to-date
325	FlagMaxFamilyClientsInherited,
326	/// Only available client side, stores whether we are subscribed to this channel
327	FlagAreSubscribed,
328	/// Not available client side, the folder used for file-transfers for this channel
329	Filepath,
330	/// Available for all channels that are "in view", always up-to-date
331	NeededTalkPower,
332	/// Available for all channels that are "in view", always up-to-date
333	ForcedSilence,
334	/// Available for all channels that are "in view", always up-to-date
335	NamePhonetic,
336	/// Available for all channels that are "in view", always up-to-date
337	IconId,
338	/// Available for all channels that are "in view", always up-to-date
339	BannerGfxUrl,
340	/// Available for all channels that are "in view", always up-to-date
341	BannerMode,
342	PermissionHints,
343	/// Storage space that is allowed to be used by this channels files (in MiB)
344	StorageQuota,
345	Endmarker,
346
347	/// (for clientlibv2) expected delete time in monotonic clock seconds or 0 if nothing is expected
348	DeleteDelayDeadline = 127,
349}
350
351#[repr(C)]
352#[derive(Debug, PartialEq, Eq, Clone, Copy)]
353pub enum ClientProperties {
354	/// String.  Read only.  Public Identity, can be used to identify a client
355	/// installation. Remains identical as long as the client keeps using the same
356	/// identity. Available for visible clients.
357	UniqueIdentifier = 0,
358	/// String.  Read/Write. Display name of the client. Available for visible clients.
359	Nickname,
360	/// String.  Read only.  Version String of the client used. For clients other than ourself this
361	/// needs to be requested (`ts3client_requestClientVariables`).
362	Version,
363	/// String.  Read only.  Operating system used by the client. For other clients other than ourself
364	/// this needs to be requested (`ts3client_requestClientVariables`).
365	Platform,
366	/// Integer. Read only.  Whether the client is talking. Available on clients that are either
367	/// whispering to us, or in our channel.
368	FlagTalking,
369	/// Integer. Read/Write. Microphone mute status. Available for visible clients. One of the
370	/// values from the `MuteInputStatus` enum.
371	InputMuted,
372	/// Integer. Read only.  Speaker mute status. Speaker mute implies microphone mute. Available
373	/// for visible clients. One of the values from the `MuteOutputStatus` enum.
374	OutputMuted,
375	/// Integer. Read only.  Speaker mute status. Microphone may be active. Available for
376	/// visible clients. One of the values from the `MuteOutputStatus` enum.
377	OutputOnlyMuted,
378	/// Integer. Read only.  Indicates whether a capture device is open. Available for visible
379	/// clients. One of the values from the `HardwareInputStatus` enum.
380	InputHardware,
381	/// Integer. Read only.  Indicates whether a playback device is open. Available for visible
382	/// clients. One of the values from the `HardwareOutputStatus` enum.
383	OutputHardware,
384	/// Integer. Read/Write. Not available server side. Local microphone mute status.
385	/// Available only for own client. Used to implement Push To Talk. One of the values from
386	/// the `InputDeactivationStatus` enum.
387	InputDeactivated,
388	/// UInt64.  Read only.  Seconds since last activity. Available only for own client.
389	IdleTime,
390	/// String.  Read only.  User specified channel they joined when connecting to the server.
391	/// Available only for own client.
392	DefaultChannel,
393	/// String.  Read only.  User specified channel password for the channel they
394	/// attempted to join when connecting to the server. Available only for own
395	/// client.
396	DefaultChannelPassword,
397	/// String.  Read only.  User specified server password. Available only for own client.
398	ServerPassword,
399	/// String.  Read/Write. Can be used to store up to 4096 bytes of information on clients. Not
400	/// used by TeamSpeak. Available for visible clients.
401	MetaData,
402	/// Integer. Read only.  Not available server side. Indicates whether we have muted the client
403	/// using `ts3client_requestMuteClients`. Available for visible clients other than ourselves.
404	IsMuted,
405	/// Integer. Read only.  Indicates whether the client is recording incoming audio. Available
406	/// for visible clients.
407	IsRecording,
408	/// Integer. Read only.  Volume adjustment for this client as set by
409	/// `ts3client_setClientVolumeModifier`. Available for visible clients.
410	VolumeModificator,
411	/// String.  Read only.  TeamSpeak internal signature.
412	VersionSign,
413	/// String.  Read/Write. This clients security hash. Not used by TeamSpeak, SDK only. Hash is
414	/// provided by an outside source. A channel will use the security salt + other client data
415	/// to calculate a hash, which must be the same as the one provided here. See SDK
416	/// documentation about Client / Channel Security Hashes for more details.
417	SecurityHash,
418	/// String.  Read only.  SDK only. List of available ciphers this client can use.
419	EncryptionCiphers,
420
421	/// Rare properties
422	Dummy4,
423	Dummy5,
424	Dummy6,
425	Dummy7,
426	Dummy8,
427	Dummy9,
428	/// Internal use
429	KeyOffset,
430	/// Internal use
431	LastVarRequest,
432	/// Used for serverquery clients, makes no sense on normal clients currently
433	LoginName,
434	/// Used for serverquery clients, makes no sense on normal clients currently
435	LoginPassword,
436	/// Automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds database client id
437	DatabaseId,
438	/// Automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds database client id
439	ChannelGroupId,
440	/// Automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds all servergroups client belongs too
441	Servergroups,
442	/// This needs to be requested (=> requestClientVariables), first time this client connected to this server
443	Created,
444	/// This needs to be requested (=> requestClientVariables), last time this client connected to this server
445	Lastconnected,
446	/// This needs to be requested (=> requestClientVariables), how many times this client connected to this server
447	Totalconnections,
448	/// Automatically up-to-date for any client "in view", this clients away status
449	Away,
450	/// Automatically up-to-date for any client "in view", this clients away status
451	AwayMessage,
452	/// Automatically up-to-date for any client "in view", determines if this is a real client or a server-query connection
453	Type,
454	/// Automatically up-to-date for any client "in view", this client got an avatar
455	FlagAvatar,
456	/// Automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds database client id
457	TalkPower,
458	/// Automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds timestamp where client requested to talk
459	TalkRequest,
460	/// Automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds matter for the request
461	TalkRequestMsg,
462	/// Automatically up-to-date for any client "in view"
463	Description,
464	/// Automatically up-to-date for any client "in view"
465	IsTalker,
466	/// This needs to be requested (=> requestClientVariables)
467	MonthBytesUploaded,
468	/// This needs to be requested (=> requestClientVariables)
469	MonthBytesDownloaded,
470	/// This needs to be requested (=> requestClientVariables)
471	TotalBytesUploaded,
472	/// This needs to be requested (=> requestClientVariables)
473	TotalBytesDownloaded,
474	/// Automatically up-to-date for any client "in view"
475	IsPrioritySpeaker,
476	/// Automatically up-to-date for any client "in view"
477	UnreadMessages,
478	/// Automatically up-to-date for any client "in view"
479	NicknamePhonetic,
480	/// Automatically up-to-date for any client "in view"
481	NeededServerqueryViewPower,
482	/// Only usable for ourself, the default token we used to connect on our last connection attempt
483	DefaultToken,
484	/// Automatically up-to-date for any client "in view"
485	IconId,
486	/// Automatically up-to-date for any client "in view"
487	IsChannelCommander,
488	/// Automatically up-to-date for any client "in view"
489	Country,
490	/// Automatically up-to-date for any client "in view", only valid with PERMISSION feature, contains channel_id where the channel_group_id is set from
491	ChannelGroupInheritedChannelId,
492	/// Automatically up-to-date for any client "in view", stores icons for partner badges
493	Badges,
494	/// Automatically up-to-date for any client "in view"
495	MyteamspeakId,
496	/// Automatically up-to-date for any client "in view"
497	Integrations,
498	/// Stores info from the myts server and contains the subscription info
499	ActiveIntegrationsInfo,
500	MytsAvatar,
501	SignedBadges,
502	PermissionHints,
503	/// automatically up-to-date for any client "in view", stores public chat user tag
504	UserTag,
505	Endmarker,
506
507	/// (for clientlibv2) unique hardware id
508	HwId = 127,
509}
510
511#[repr(C)]
512#[derive(Debug, PartialEq, Eq, Clone, Copy)]
513pub enum VirtualServerProperties {
514	/// String.  Read only.  Unique identifier for a virtual server, does not
515	/// change on server restart. Available if `ts3client_getConnectionStatus`
516	/// is >= `STATUS_CONNECTED`.
517	UniqueIdentifier = 0,
518	/// String.  Read/Write. The virtual server display name. Available if
519	/// `ts3client_getConnectionStatus` is >= `STATUS_CONNECTED`.
520	Name,
521	/// String.  Read/Write. The welcome message displayed to clients on connect.
522	/// Available if `ts3client_getConnectionStatus` is >= `STATUS_CONNECTED`. Not
523	/// updated automatically when changed, updates need to be requested (
524	/// `ts3client_requestServerVariables`).
525	Welcomemessage,
526	/// String.  Read only.  The operating system the server is running on. Available if
527	/// `ts3client_getConnectionStatus` is >= `STATUS_CONNECTED`.
528	Platform,
529	/// String.  Read only.  The server software version string. Available if
530	/// `ts3client_getConnectionStatus` is >= `STATUS_CONNECTED`.
531	Version,
532	/// UInt64.  Read/Write. The maximum number of clients that can be connected
533	/// simultaneously. Only available on request (`ts3client_requestServerVariables`).
534	MaxClients,
535	/// String.  Read/Write. The server password. Read access is limited to the server. Clients
536	/// will only get the password they supplied when connecting. Available if
537	/// `ts3client_getConnectionStatus` is >= `STATUS_CONNECTED`.
538	Password,
539	/// UInt64.  Read only.  The current number of clients connected to the server,
540	/// including query connections. Only available on request (\ref
541	/// ts3client_requestServerVariables).
542	ClientsOnline,
543	/// UInt64.  Read only.  The current number of channels on the server. Only
544	/// available on request (`ts3client_requestServerVariables`).
545	ChannelsOnline,
546	/// Integer. Read only.  The time this virtual server was created as unix timestamp.
547	/// Available if `ts3client_getConnectionStatus` is >= `STATUS_CONNECTED`.
548	Created,
549	/// UInt64.  Read only.  Number of seconds that have passed since the virtual server was
550	/// started. Only available on request (`ts3client_requestServerVariables`).
551	Uptime,
552	/// Integer. Read/Write. Boolean (1/0) that specifies if voice data is encrypted
553	/// during transfer. One of the values from the `CodecEncryptionMode` enum.
554	/// Available if `ts3client_getConnectionStatus` is >= `STATUS_CONNECTED`.
555	CodecEncryptionMode,
556	/// String.  Read/Write. Comma separated list of available ciphers to encrypt the
557	/// connection. The server will use the first cipher in the list that is also
558	/// listed in the `CLIENT_ENCRYPTION_CIPHERS` of the connecting client.
559	/// Clients will fail to connect if no match is found. Always available.
560	EncryptionCiphers,
561
562	/// Rare properties
563	Dummy1,
564	Dummy2,
565	Dummy3,
566	Dummy4,
567	Dummy5,
568	Dummy6,
569	Dummy7,
570	Dummy8,
571	/// Internal use
572	Keypair,
573	/// Available when connected, not updated while connected
574	Hostmessage,
575	/// Available when connected, not updated while connected
576	HostmessageMode,
577	/// String.  Read only.  The path to the base directory used to store files
578	/// transferred using file transfer. Available only on the server. Is set by
579	/// `ts3server_enableFileManager`
580	Filebase,
581	/// The client permissions server group that a new client gets assigned
582	DefaultServerGroup,
583	/// The channel permissions group that a new client gets assigned when joining a channel
584	DefaultChannelGroup,
585	/// Only available on request (=> requestServerVariables)
586	FlagPassword,
587	/// The channel permissions group that a client gets assigned when creating a channel
588	DefaultChannelAdminGroup,
589	/// UInt64.  Read/Write. Maximum traffic in bytes the server can
590	/// use for file transfer downloads. Only available on request
591	/// (`ts3client_requestServerVariables`).
592	MaxDownloadTotalBandwidth,
593	/// UInt64.  Read/Write. Maximum traffic in bytes the server can
594	/// use for file transfer uploads. Only available on request
595	/// (`ts3client_requestServerVariables`).
596	MaxUploadTotalBandwidth,
597	/// Available when connected, always up-to-date
598	HostbannerUrl,
599	/// Available when connected, always up-to-date
600	HostbannerGfxUrl,
601	/// Available when connected, always up-to-date
602	HostbannerGfxInterval,
603	/// Only available on request (=> requestServerVariables)
604	ComplainAutobanCount,
605	/// Only available on request (=> requestServerVariables)
606	ComplainAutobanTime,
607	/// Only available on request (=> requestServerVariables)
608	ComplainRemoveTime,
609	/// Only available on request (=> requestServerVariables)
610	MinClientsInChannelBeforeForcedSilence,
611	/// Available when connected, always up-to-date
612	PrioritySpeakerDimmModificator,
613	/// Available when connected
614	Id,
615	/// Only available on request (=> requestServerVariables)
616	AntifloodPointsTickReduce,
617	/// Only available on request (=> requestServerVariables)
618	AntifloodPointsNeededCommandBlock,
619	/// Only available on request (=> requestServerVariables)
620	AntifloodPointsNeededIpBlock,
621	/// Only available on request (=> requestServerVariables)
622	ClientConnections,
623	/// Only available on request (=> requestServerVariables)
624	QueryClientConnections,
625	/// Available when connected, always up-to-date
626	HostbuttonTooltip,
627	/// Available when connected, always up-to-date
628	HostbuttonUrl,
629	/// Available when connected, always up-to-date
630	HostbuttonGfxUrl,
631	/// Only available on request (=> requestServerVariables)
632	QueryclientsOnline,
633	/// Only available on request (=> requestServerVariables)
634	DownloadQuota,
635	/// Only available on request (=> requestServerVariables)
636	UploadQuota,
637	/// Only available on request (=> requestServerVariables)
638	MonthBytesDownloaded,
639	/// Only available on request (=> requestServerVariables)
640	MonthBytesUploaded,
641	/// Only available on request (=> requestServerVariables)
642	TotalBytesDownloaded,
643	/// Only available on request (=> requestServerVariables)
644	TotalBytesUploaded,
645	/// Only available on request (=> requestServerVariables)
646	Port,
647	/// Only available on request (=> requestServerVariables)
648	Autostart,
649	/// Only available on request (=> requestServerVariables)
650	MachineId,
651	/// Only available on request (=> requestServerVariables)
652	NeededIdentitySecurityLevel,
653	/// Only available on request (=> requestServerVariables)
654	LogClient,
655	/// Only available on request (=> requestServerVariables)
656	LogQuery,
657	/// Only available on request (=> requestServerVariables)
658	LogChannel,
659	/// Only available on request (=> requestServerVariables)
660	LogPermissions,
661	/// Only available on request (=> requestServerVariables)
662	LogServer,
663	/// Integer. Read/Write. Boolean (1/0) indicating whether to include file
664	/// transfer activities (uploading or downloading of files) in the server log.
665	/// Always available.
666	LogFiletransfer,
667	/// Only available on request (=> requestServerVariables)
668	MinClientVersion,
669	/// Available when connected, always up-to-date
670	NamePhonetic,
671	/// Available when connected, always up-to-date
672	IconId,
673	/// Available when connected, always up-to-date
674	ReservedSlots,
675	/// Only available on request (=> requestServerVariables)
676	TotalPacketlossSpeech,
677	/// Only available on request (=> requestServerVariables)
678	TotalPacketlossKeepalive,
679	/// Only available on request (=> requestServerVariables)
680	TotalPacketlossControl,
681	/// Only available on request (=> requestServerVariables)
682	TotalPacketlossTotal,
683	/// Only available on request (=> requestServerVariables)
684	TotalPing,
685	/// Internal use | contains only ONE binded ip
686	Ip,
687	/// Only available on request (=> requestServerVariables)
688	WeblistEnabled,
689	/// Internal use
690	AutogeneratedPrivilegekey,
691	/// Available when connected
692	AskForPrivilegekey,
693	/// Available when connected, always up-to-date
694	HostbannerMode,
695	/// Available when connected, always up-to-date
696	ChannelTempDeleteDelayDefault,
697	/// Only available on request (=> requestServerVariables)
698	MinAndroidVersion,
699	/// Only available on request (=> requestServerVariables)
700	MinIosVersion,
701	/// Only available on request (=> requestServerVariables)
702	MinWinphoneVersion,
703	/// Available when connected, always up-to-date
704	Nickname,
705	/// Internal use, contains base64 encoded token data
706	AccountingToken,
707	/// Internal use
708	ProtocolVerifyKeypair,
709	/// Only available on request (=> requestServerVariables)
710	AntifloodPointsNeededPluginBlock,
711	/// available when connected, not updated while connected
712	CapabilityExtensions,
713	/// Allowed filetransfer storage on this server (including chat attachments) in megabytes
714	StorageQuota,
715	/// internal use
716	WebrtcCertificate,
717	/// internal use
718	WebrtcPrivateKey,
719	/// the uuid of the server (uuid v5 of VIRTUALSERVER_UNIQUE_IDENTIFIER)
720	Uuid,
721	/// The domain which is responsible for this teamspeak server (which hosts its .well-known file)
722	AdministrativeDomain,
723	/// The canonical name under which the server is reachable
724	CanonicalName,
725	/// Only clients that have a valid mytsid can connect
726	MytsidConnectOnly,
727	/// How many matrix homebases this virtual server supports. -1 = no limit
728	MaxHomebases,
729	/// Allowed filetransfer storage for homebase attachments in megabytes
730	HomebaseStorageQuota,
731	Endmarker,
732}
733
734#[repr(C)]
735#[derive(Debug, PartialEq, Eq, Clone, Copy)]
736pub enum ConnectionProperties {
737	/// UInt64. Round trip latency for the connection based on the last 5 seconds. On the server
738	/// this is the average across all connected clients for the last 5 seconds.
739	Ping = 0,
740	/// Double. Standard deviation for the round trip latency in `CONNECTION_PING`
741	PingDeviation,
742	/// UInt64. Seconds the client has been connected.
743	ConnectedTime,
744	/// UInt64. Time in seconds since the last activity (voice transmission, switching channels,
745	/// changing mic / speaker mute status) of the client.
746	IdleTime,
747	/// String. IP of this client (as seen from the server side)
748	ClientIp,
749	/// UInt64. Client side port of this client (as seen from the server side)
750	ClientPort,
751	/// String. The IP or hostname used to connect to the server. Only available on yourself.
752	ServerIp,
753	/// UInt64. The server port connected to. Only available on yourself.
754	ServerPort,
755	/// UInt64. The number of voice packets transmitted by the client.
756	PacketsSentSpeech,
757	/// UInt64. The number of keep alive packets transmitted by the client.
758	PacketsSentKeepalive,
759	/// UInt64. The number of command & control packets transmitted by the client.
760	PacketsSentControl,
761	/// UInt64. Total number of packets transmitted by the client. Equal to the sum of
762	/// `CONNECTION_PACKETS_SENT_SPEECH`, `CONNECTION_PACKETS_SENT_KEEPALIVE` and
763	/// `CONNECTION_PACKETS_SENT_CONTROL`
764	PacketsSentTotal,
765	/// UInt64. Outgoing traffic used for voice data by the client.
766	BytesSentSpeech,
767	/// UInt64. Outgoing traffic used for keeping the connection alive by the client.
768	BytesSentKeepalive,
769	/// UInt64. Outgoing traffic used for command & control data by the client.
770	BytesSentControl,
771	/// UInt64. Total outgoing traffic to the server by this client. Equal to the sum of
772	/// `CONNECTION_BYTES_SENT_SPEECH`, `CONNECTION_BYTES_SENT_KEEPALIVE` and
773	/// `CONNECTION_BYTES_SENT_CONTROL`
774	BytesSentTotal,
775	/// UInt64. Number of voice packets received by the client.
776	PacketsReceivedSpeech,
777	/// UInt64. Number of keep alive packets received by the client.
778	PacketsReceivedKeepalive,
779	/// UInt64. Number of command & control packets received by the client.
780	PacketsReceivedControl,
781	/// UInt64. Total number of packets received by the client. Equal to the sum of
782	/// `CONNECTION_PACKETS_RECEIVED_SPEECH`,
783	/// `CONNECTION_PACKETS_RECEIVED_KEEPALIVE` and
784	/// `CONNECTION_PACKETS_RECEIVED_CONTROL`
785	PacketsReceivedTotal,
786	/// UInt64. Incoming traffic used by the client for voice data.
787	BytesReceivedSpeech,
788	/// UInt64. Incoming traffic used by the client to keep the connection alive.
789	BytesReceivedKeepalive,
790	/// UInt64. Incoming traffic used by the client for command & control data.
791	BytesReceivedControl,
792	/// UInt64. Total incoming traffic used by the client. Equal to the sum of
793	/// `CONNECTION_BYTES_RECEIVED_SPEECH`, `CONNECTION_BYTES_RECEIVED_KEEPALIVE` and
794	/// `CONNECTION_BYTES_RECEIVED_CONTROL`
795	BytesReceivedTotal,
796	/// Double. Percentage points of voice packets for the client that did not arrive at
797	/// the client or server averaged across the last 5 seconds.
798	PacketlossSpeech,
799	/// Double. Percentage points of keep alive packets for the client that did not
800	/// arrive at the client or server averaged across the last 5 seconds.
801	PacketlossKeepalive,
802	/// Double. Percentage points of command & control packets for the client that did
803	/// not arrive at the client or server averaged across the last 5 seconds.
804	PacketlossControl,
805	/// Double. Cumulative chance in percentage points with which a packet round trip
806	/// failed because a packet was lost
807	PacketlossTotal,
808	/// Double. Probability with which a voice packet sent by the server
809	/// was not received by the client.
810	Server2ClientPacketlossSpeech,
811	/// Double. Probability with which a keepalive packet sent by the
812	/// server was not received by the client.
813	Server2ClientPacketlossKeepalive,
814	/// Double. Probability with which a control packet sent by the server
815	/// was not received by the client.
816	Server2ClientPacketlossControl,
817	/// Double. Probability with which a packet sent by the server was not
818	/// received by the client.
819	Server2ClientPacketlossTotal,
820	/// Double. Probability with which a speech packet sent by the client
821	/// was not received by the server.
822	Client2ServerPacketlossSpeech,
823	/// Double. Probability with which a keepalive packet sent by the
824	/// client was not received by the server.
825	Client2ServerPacketlossKeepalive,
826	/// Double. Probability with which a control packet sent by the client
827	/// was not received by the server.
828	Client2ServerPacketlossControl,
829	/// Double. Probability with which a packet sent by the client was not
830	/// received by the server.
831	Client2ServerPacketlossTotal,
832	/// UInt64. Number of bytes sent for speech data in the last second.
833	BandwidthSentLastSecondSpeech,
834	/// UInt64. Number of bytes sent for keepalive data in the last second.
835	BandwidthSentLastSecondKeepalive,
836	/// UInt64. Number of bytes sent for control data in the last second.
837	BandwidthSentLastSecondControl,
838	/// UInt64. Number of bytes sent in the last second.
839	BandwidthSentLastSecondTotal,
840	/// UInt64. Bytes per second sent for speech data, averaged over the
841	/// last minute.
842	BandwidthSentLastMinuteSpeech,
843	/// UInt64. Bytes per second sent for keepalive data, averaged
844	/// over the last minute.
845	BandwidthSentLastMinuteKeepalive,
846	/// UInt64. Bytes per second sent for control data, averaged over
847	/// the last minute.
848	BandwidthSentLastMinuteControl,
849	/// UInt64. Bytes per second sent, averaged over the last minute.
850	BandwidthSentLastMinuteTotal,
851	/// UInt64. Number of bytes received for speech data in the last second.
852	BandwidthReceivedLastSecondSpeech,
853	/// UInt64. Number of bytes received for keepalive data in the
854	/// last second.
855	BandwidthReceivedLastSecondKeepalive,
856	/// UInt64. Number of bytes received for control data in the
857	/// last second.
858	BandwidthReceivedLastSecondControl,
859	/// UInt64. Number of bytes received in the last second.
860	BandwidthReceivedLastSecondTotal,
861	/// UInt64. Bytes per second received for speech data, averaged
862	/// over the last minute.
863	BandwidthReceivedLastMinuteSpeech,
864	/// UInt64. Bytes per second received for keepalive data,
865	/// averaged over the last minute.
866	BandwidthReceivedLastMinuteKeepalive,
867	/// UInt64. Bytes per second received for control data, averaged
868	/// over the last minute.
869	BandwidthReceivedLastMinuteControl,
870	/// UInt64. Bytes per second received, averaged over the last minute.
871	BandwidthReceivedLastMinuteTotal,
872
873	/// Rare properties
874	Dummy0,
875	Dummy1,
876	Dummy2,
877	Dummy3,
878	Dummy4,
879	Dummy5,
880	Dummy6,
881	Dummy7,
882	Dummy8,
883	Dummy9,
884	/// UInt64. Current file transfer upstream activity in bytes per second.
885	/// Only available on request (`ts3client_requestServerConnectionInfo`).
886	FileTransferBandwidthSent,
887	/// UInt64. Current file transfer downstream activity in bytes per
888	/// second. Only available on request (
889	/// `ts3client_requestServerConnectionInfo`).
890	FiletransferBandwidthReceived,
891	/// UInt64. Total downstream traffic, in bytes, used for file
892	/// transfer since the server was started. Only available on request
893	/// (\ref ts3client_requestServerConnectionInfo).
894	FiletransferBytesReceivedTotal,
895	/// UInt64. Total upstream traffic, in bytes, used for file transfer
896	/// since the server was started. Only available on request (
897	/// `ts3client_requestServerConnectionInfo`).
898	FiletransferBytesSentTotal,
899	Endmarker,
900}
901
902#[repr(C)]
903#[derive(Debug, PartialEq, Eq, Clone, Copy)]
904pub enum LogTypes {
905	/// Logging is disabled
906	None         =  0,
907	/// Log to regular log file
908	File         =  1,
909	/// Log to standard output / error
910	Console      =  2,
911	/// User defined logging. Will call the `ServerLibFunctions.onUserLoggingMessageEvent` callback for every message to be logged
912	Userlogging  =  4,
913	/// Not used
914	NoNetlogging =  8,
915	/// Log to database (deprecated, server only, no effect in SDK)
916	Database     = 16,
917	/// Log to syslog (only available on Linux)
918	Syslog       = 32,
919}
920
921#[derive(Clone, Copy, Debug)]
922#[repr(C)]
923pub enum LogLevel {
924	/// These messages stop the program
925	Critical = 0,
926	/// Everything that is really bad, but not so bad we need to shut down
927	Error,
928	/// Everything that *might* be bad
929	Warning,
930	/// Output that might help find a problem
931	Debug,
932	/// Informational output, like "starting database version x.y.z"
933	Info,
934	/// Developer only output (will not be displayed in release mode)
935	Devel,
936}
937
938/// Describes a client position in 3 dimensional space, used for 3D Sound.
939#[repr(C)]
940pub struct Ts3Vector {
941	/// X co-ordinate in 3D space
942	pub x: c_float,
943	/// Y co-ordinate in 3D space
944	pub y: c_float,
945	/// Z co-ordinate in 3D space
946	pub z: c_float,
947}
948
949#[repr(C)]
950#[derive(Debug, PartialEq, Eq, Clone, Copy)]
951pub enum GroupWhisperType {
952	/// Whisper list consists of server groups
953	Servergroup      = 0,
954	/// Whisper list consists of channel groups
955	Channelgroup     = 1,
956	/// whisper to channel commanders
957	Channelcommander = 2,
958	/// whisper to all clients
959	Allclients       = 3,
960	Endmarker,
961}
962
963#[repr(C)]
964#[derive(Debug, PartialEq, Eq, Clone, Copy)]
965pub enum GroupWhisperTargetMode {
966	All                   = 0,
967	/// Whisper the current channel of the client
968	Currentchannel        = 1,
969	/// Whisper the parent channel of whatever channel the client is currently in
970	Parentchannel         = 2,
971	/// Whipser to the parent channel and all their parent channels as well
972	Allparentchannel      = 3,
973	/// Whisper to the current channel and all its sub channels
974	Channelfamily         = 4,
975	/// Whisper to the current channel, all its parent and sub channels.
976	Ancestorchannelfamily = 5,
977	/// Whisper to all sub channels of the current channel of the client
978	Subchannels           = 6,
979	Endmarker,
980}
981
982#[repr(C)]
983#[derive(Debug, PartialEq, Eq, Clone, Copy)]
984pub enum MonoSoundDestination {
985	/// Send mono sound to all available speakers
986	All               = 0,
987	/// Send mono sound to front center speaker if available
988	FrontCenter       = 1,
989	/// Send mono sound to front left/right speakers if available
990	FrontLeftAndRight = 2,
991}
992
993#[repr(C)]
994#[derive(Debug, PartialEq, Eq, Clone, Copy)]
995pub enum SecuritySaltOptions {
996	/// Put nickname into security hash
997	CheckNickname = 1,
998	/// Put (game)meta data into security hash
999	CheckMetaData = 2,
1000}
1001
1002/// This enum is used to disable client commands on the server
1003#[repr(C)]
1004#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1005pub enum ClientCommand {
1006	/// disable client connection info request (client bandwidth usage, ip, port, ping)
1007	RequestConnectionInfo       = 0,
1008	/// disable moving clients
1009	RequestClientMove           = 1,
1010	/// disable muting other clients
1011	RequestXXMuteClients        = 2,
1012	/// disable kicking clients
1013	RequestClientKickFromXXX    = 3,
1014	/// disable creating channels
1015	FlushChannelCreation        = 4,
1016	/// disable editing channels
1017	FlushChannelUpdate          = 5,
1018	/// disable moving channels
1019	RequestChannelMove          = 6,
1020	/// disable deleting channels
1021	RequestChannelDelete        = 7,
1022	/// disable channel descriptions
1023	RequestChannelDescription   = 8,
1024	/// disable being able to see clients in channels other than the current channel the client is in
1025	RequestChannelXXSubscripeXX = 9,
1026	/// disable server connection info request (server bandwidth usage, ip, port, ping)
1027	RequestServerConnectionInfo = 10,
1028	/// disable text messaging
1029	RequestSendXXXTextMsg       = 11,
1030	/// disable file transfer
1031	FileTransfer                = 12,
1032	Endmarker,
1033}
1034
1035/// Access Control List
1036#[repr(C)]
1037#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1038pub enum ACLType {
1039	None      = 0,
1040	WhiteList = 1,
1041	BlackList = 2,
1042}
1043
1044/// File transfer actions
1045#[repr(C)]
1046#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1047pub enum FileTransferAction {
1048	/// The virtual server is created. result->channelPath can be changed to create a different directory than the default 'virtualserver_x' where x is the virtual server.
1049	InitServer  = 0,
1050	/// A channel is created. result->channelPath can be changed to create a different directory then the default 'channel_x' where x is the channel id.
1051	InitChannel = 1,
1052	/// A file is being uploaded. All values in the result struct can be modified.
1053	Upload      = 2,
1054	/// A file is being downloaded. All values in the result struct can be modified.
1055	Download    = 3,
1056	/// A file is being deleted. All values in the result struct can be modified.
1057	Delete      = 4,
1058	/// A directory is being created in a channel. All values in the result struct can be modified.
1059	CreateDir   = 5,
1060	/// A file or folder is being renamed. The callback will be called twice! Once for the old and then for the new name. All values in the result struct can be modified.
1061	Rename      = 6,
1062	/// A directory listing is requested. All values in the result struct can be modified.
1063	FileList    = 7,
1064	/// Information of a file is requested. All values in the result struct can be modified.
1065	FileInfo    = 8,
1066}
1067
1068/// File transfer status
1069#[repr(C)]
1070#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1071pub enum FileTransferState {
1072	/// File transfer is establishing connection.
1073	Initialising = 0,
1074	/// File transfer is in progress
1075	Active,
1076	/// File transfer has finished
1077	Finished,
1078}
1079
1080/// File transfer type
1081#[repr(C)]
1082#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1083pub enum FileListType {
1084	/// The file entry is a directory
1085	Directory = 0,
1086	/// The file entry is a regular file
1087	File,
1088}
1089
1090/// Some structs to handle variables in callbacks
1091#[repr(C)]
1092pub struct VariablesExportItem {
1093	/// Whether or not there is any data in this item. Ignore this item if this is 0.
1094	pub item_is_valid:   u8,
1095	/// The value in proposed is set. If 0 ignore proposed
1096	pub proposed_is_set: u8,
1097	/// Current value (stored in memory)
1098	pub current:         *const c_char,
1099	/// New value to change to (const, so no updates please)
1100	pub proposed:        *const c_char,
1101}
1102
1103#[repr(C)]
1104pub struct VariablesExport {
1105	pub items: [VariablesExportItem; MAX_VARIABLES_EXPORT_COUNT],
1106}
1107
1108#[repr(C)]
1109pub struct ClientMiniExport {
1110	/// id of the client
1111	pub id:       u16,
1112	/// the channel the client is in
1113	pub channel:  u64,
1114	/// client public identity
1115	pub ident:    *const c_char,
1116	/// client display name
1117	pub nickname: *const c_char,
1118}
1119
1120/// Structure used to describe a file transfer in the \ref ServerLibFunctions.onTransformFilePath callback.
1121/// This describes the original values, and also contains hints for length limitations of the result parameter
1122/// of the callback.
1123/// Important: Which values of the struct can be modified is defined by the action value of the original parameter.
1124#[repr(C)]
1125pub struct TransformFilePathExport {
1126	/// The channel id of the file. 0 if action is \ref FT_INIT_SERVER
1127	pub channel:                        u64,
1128	/// utf8 encoded c string containing the original file name as intended by the client.
1129	pub filename:                       *const c_char,
1130	/// The action to be performed. One of the values from the \ref FTAction enum. Defines which values of the result struct can be modified.
1131	pub action:                         c_int,
1132	/// The maximum length the file name can be rewritten to.
1133	pub transformed_file_name_max_size: c_int,
1134	/// The maximum length the path can be rewritten to.
1135	pub channel_path_max_size:          c_int,
1136}
1137
1138/// Structure to rewrite the file transfer file name and path in the \ref ServerLibFunctions.onTransformFilePath callback.
1139/// The lengths are limited as described in the original parameter.
1140/// Important: Which values of the struct can be modified is defined by the action value of the original parameter.
1141#[repr(C)]
1142pub struct TransformFilePathExportReturns {
1143	/// pointer to target file name. Fill the memory pointed to with an utf8 encoded c string containing the new file name. Limited to original->transformedFileNameMaxSize bytes.
1144	pub transformed_file_name: *mut c_char,
1145	/// pointer to memory for new path. Fill the memory pointed to with an utf8 encoded c string containing the new path. Limited to original->channelPathMaxSize bytes.
1146	pub channel_path:          *mut c_char,
1147	/// boolean (1/0). Whether to log this file transfer to the log. Action is not logged regardless of this value if the servers \ref VIRTUALSERVER_LOG_FILETRANSFER property is 0.
1148	pub log_file_action:       c_int,
1149}
1150
1151#[repr(C)]
1152pub struct FileTransferCallbackExport {
1153	/// the client who started the file transfer
1154	pub client_id:          u16,
1155	/// local identifier of the transfer that has completed
1156	pub transfer_id:        u16,
1157	/// remote identifier of the transfer that has completed
1158	pub remote_transfer_id: u16,
1159	/// status of the transfer. One of the values from the \ref FileTransferState enum
1160	pub status:             c_uint,
1161	/// utf8 encoded c string containing a human readable description of the status
1162	pub status_message:     *const c_char,
1163	/// size in bytes of the complete file to be transferred
1164	pub remote_file_size:   u64,
1165	/// number of bytes transferred. Same as remotefileSize when the transfer completed entirely.
1166	pub bytes:              u64,
1167	/// boolean. 1 if the server is sending the file. 0 if the server is receiving the file.
1168	pub is_sender:          c_int,
1169}
1170
1171pub const BANDWIDTH_LIMIT_UNLIMITED: u64 = std::u64::MAX;
1172
1173#[repr(C)]
1174#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1175pub enum GroupShowNameTreeMode {
1176	/// Dont group show name
1177	None = 0,
1178	/// Show group name before client name
1179	Before,
1180	/// Show group name behind client name
1181	Behind,
1182}
1183
1184#[repr(C)]
1185#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1186pub enum PluginTargetMode {
1187	/// Send plugincmd to all clients in current channel
1188	CurrentChannel = 0,
1189	/// Send plugincmd to all clients on server
1190	Server,
1191	/// Send plugincmd to all given client ids
1192	Client,
1193	/// Send plugincmd to all subscribed clients in current channel
1194	CurrentChannelSubscribedClients,
1195	Max,
1196}
1197
1198#[repr(C)]
1199#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1200pub enum ServerBinding {
1201	Virtualserver = 0,
1202	Serverquery   = 1,
1203	Filetransfer  = 2,
1204}
1205
1206#[repr(C)]
1207#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1208pub enum HostmessageMode {
1209	/// Dont display anything
1210	None = 0,
1211	/// Display message inside log
1212	Log,
1213	/// Display message inside a modal dialog
1214	Modal,
1215	/// Display message inside a modal dialog and quit/close server/connection
1216	Modalquit,
1217}
1218
1219#[repr(C)]
1220#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1221pub enum HostbannerMode {
1222	/// Do not adjust
1223	NoAdjust = 0,
1224	/// Do not adjust
1225	AdjustIgnoreAspect,
1226	/// Do not adjust
1227	AdjustKeepAspect,
1228}
1229
1230
1231#[repr(C)]
1232#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1233pub enum ClientType {
1234	Normal = 0,
1235	Serverquery,
1236}
1237
1238#[repr(C)]
1239#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1240pub enum AwayStatus {
1241	None = 0,
1242	Zzz,
1243}
1244
1245#[repr(C)]
1246#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1247pub enum CommandLinePropertiesRare {
1248	Nothing = 0,
1249	Endmarker,
1250}
1251
1252#[repr(C)]
1253#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1254pub enum ServerInstancePropertiesRare {
1255	DatabaseVersion = 0,
1256	FiletransferPort,
1257	ServerEntropy,
1258	MonthlyTimestamp,
1259	MaxDownloadTotalBandwidth,
1260	MaxUploadTotalBandwidth,
1261	GuestServerqueryGroup,
1262	/// How many commands we can issue while in the SERVERINSTANCE_SERVERQUERY_FLOOD_TIME window
1263	ServerqueryFloodCommands,
1264	/// Time window in seconds for max command execution check
1265	ServerqueryFloodTime,
1266	/// How many seconds someone get banned if he floods
1267	ServerqueryBanTime,
1268	TemplateServeradminGroup,
1269	TemplateServerdefaultGroup,
1270	TemplateChanneladminGroup,
1271	TemplateChannelDefaultGroup,
1272	PermissionsVersion,
1273	PendingConnectionsPerIp,
1274	ServerqueryMaxConnectionsPerIp,
1275	/// How many matrix homebase users this instance can have. -1 for no limit
1276	MaxHomebases,
1277	Endmarker,
1278}
1279
1280#[repr(C)]
1281#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1282pub enum LicenseIssue {
1283	Blacklisted,
1284	Greylisted,
1285}
1286
1287bitflags! {
1288pub struct BBCodeTags: u32 {
1289	const BBCODE_B           = 0x00000001;
1290	const BBCODE_I           = 0x00000002;
1291	const BBCODE_U           = 0x00000004;
1292	const BBCODE_S           = 0x00000008;
1293	const BBCODE_SUP         = 0x00000010;
1294	const BBCODE_SUB         = 0x00000020;
1295	const BBCODE_COLOR       = 0x00000040;
1296	const BBCODE_SIZE        = 0x00000080;
1297	const BBCODE_GROUP_TEXT  = 0x000000FF;
1298
1299	const BBCODE_LEFT        = 0x00001000;
1300	const BBCODE_RIGHT       = 0x00002000;
1301	const BBCODE_CENTER      = 0x00004000;
1302	const BBCODE_GROUP_ALIGN = 0x00007000;
1303
1304	const BBCODE_URL         = 0x00010000;
1305	const BBCODE_IMAGE       = 0x00020000;
1306	const BBCODE_HR          = 0x00040000;
1307
1308	const BBCODE_LIST        = 0x00100000;
1309	const BBCODE_LISTITEM    = 0x00200000;
1310	const BBCODE_GROUP_LIST  = 0x00300000;
1311
1312	const BBCODE_TABLE       = 0x00400000;
1313	const BBCODE_TR          = 0x00800000;
1314	const BBCODE_TH          = 0x01000000;
1315	const BBCODE_TD          = 0x02000000;
1316	const BBCODE_GROUP_TABLE = 0x03C00000;
1317
1318	const BBCODE_DEF_SIMPLE     = Self::BBCODE_B.bits() | Self::BBCODE_I.bits()
1319		| Self::BBCODE_U.bits() | Self::BBCODE_S.bits() | Self::BBCODE_SUP.bits()
1320		| Self::BBCODE_SUB.bits() | Self::BBCODE_COLOR.bits()
1321		| Self::BBCODE_URL.bits();
1322	const BBCODE_DEF_SIMPLE_IMG = Self::BBCODE_DEF_SIMPLE.bits()
1323		| Self::BBCODE_IMAGE.bits();
1324	const BBCODE_DEF_EXTENDED   = Self::BBCODE_GROUP_TEXT.bits()
1325		| Self::BBCODE_GROUP_ALIGN.bits() | Self::BBCODE_URL.bits()
1326		| Self::BBCODE_IMAGE.bits() | Self::BBCODE_HR.bits()
1327		| Self::BBCODE_GROUP_LIST.bits() | Self::BBCODE_GROUP_TABLE.bits();
1328}}
1329
1330bitflags! {
1331pub struct MytsDataUnsetFlags: u32 {
1332	const BADGES = 1;
1333	const AVATAR = 2;
1334}}
1335
1336
1337// As they are only typedefs and I didn't found any usage, I'll just leave them here for now
1338//typedef int(*ExtraBBCodeValidator)(void* userparam, const char* tag, const char* paramValue, int paramValueSize, const char* childValue, int childValueSize);
1339//typedef const char* (*ExtraBBCodeParamTransform)(void* userparam, const char* tag, const char* paramValue);