ts3plugin_sys/
public_errors.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_erros.h and public_erros_rare.h
6
7use ::std::fmt;
8
9#[repr(u32)]
10#[derive(Debug, PartialEq, Eq, Clone, Copy)]
11pub enum Error {
12	/// General
13	/// Indicates success.
14	Ok                                          = 0x0000,
15	Undefined                                   = 0x0001,
16	/// The attempted operation is not available in this context
17	NotImplemented                              = 0x0002,
18	/// Indicates success, but no change occurred. Returned for example upon flushing (e.g. using `ts3client_flushChannelUpdates`) when all indicated changes already matched the current state.
19	OkNoUpdate                                  = 0x0003,
20	DontNotify                                  = 0x0004,
21	LibTimeLimitReached                         = 0x0005,
22	/// Not enough system memory to perform operation
23	OutOfMemory                                 = 0x0006,
24	Canceled                                    = 0x0007,
25
26	/// Dunno
27	CommandNotFound                             = 0x0100,
28	/// Unspecified failure to create a listening port
29	UnableToBindNetworkPort                     = 0x0101,
30	/// Failure to initialize a listening port for FileTransfer
31	NoNetworkPortAvailable                      = 0x0102,
32	/// Specified port is already in use by a different application
33	PortAlreadyInUse                            = 0x103,
34
35	/// Client
36	/// Client no longer connected
37	ClientInvalidId                             = 0x0200,
38	/// Client name is already in use. Client names must be unique
39	ClientNicknameInuse                         = 0x0201,
40	/// Too many clients on the server
41	ClientProtocolLimitReached                  = 0x0203,
42	/// Function called for normal clients that is only available for query clients or vice versa
43	ClientInvalidType                           = 0x0204,
44	/// Attempting to subscribe to a channel already subsribed to
45	ClientAlreadySubscribed                     = 0x0205,
46	ClientNotLoggedIn                           = 0x0206,
47	/// Identity not valid or insufficient security level
48	ClientCouldNotValidateIdentity              = 0x0207,
49	ClientInvalidPassword                       = 0x0208,
50	ClientTooManyClonesConnected                = 0x0209,
51	/// Server requires newer client version as determined by the min_client_version properties
52	ClientVersionOutdated                       = 0x020a,
53	ClientIsOnline                              = 0x020b,
54	/// Triggered flood protection. Further information is supplied in the extra message if applicable.
55	ClientIsFlooding                            = 0x020c,
56	ClientHacked                                = 0x020d,
57	ClientCannotVerifyNow                       = 0x020e,
58	ClientLoginNotPermitted                     = 0x020f,
59	/// Action is only available on subscribed channels
60	ClientNotSubscripted                        = 0x0210,
61
62	/// Channel
63	/// Channel does not exist on the server (any longer)
64	ChannelInvalidId                            = 0x0300,
65	/// Too many channels on the server
66	ChannelProtocolLimitReached                 = 0x0301,
67	/// Attempting to move a client or channel to its current channel
68	ChannelAlreadyIn                            = 0x0302,
69	/// Channel name is already taken by another channel. Channel names must be unique
70	ChannelnameInuse                            = 0x0303,
71	/// Attempting to delete a channel with clients or sub channels in it
72	ChannelNotEmpty                             = 0x0304,
73	/// Default channel cannot be deleted. Set a new default channel first (see `ts3client_setChannelVariableAsInt` or `ts3server_setChannelVariableAsInt` )
74	ChannelCannotDeleteDefault                  = 0x0305,
75	/// Attempt to set a non permanent channel as default channel. Set channel to permanent first (see `ts3client_setChannelVariableAsInt` or `ts3server_setChannelVariableAsInt` )
76	ChannelDefaultRequirePermanent              = 0x0306,
77	/// Invalid combination of `ChannelProperties`, trying to remove `CHANNEL_FLAG_DEFAULT` or set a password on the default channel
78	ChannelInvalidFlags                         = 0x0307,
79	/// Attempt to move a permanent channel into a non-permanent one, or set a channel to be permanent that is a sub channel of a non-permanent one
80	ChannelParentNotPermanent                   = 0x0308,
81	/// Channel is full as determined by its `CHANNEL_MAXCLIENTS` setting
82	ChannelMaxclientsReached                    = 0x0309,
83	/// Channel tree is full as determined by its `CHANNEL_MAXFAMILYCLIENTS` setting
84	ChannelMaxfamilyReached                     = 0x030a,
85	/// Invalid value for the `CHANNEL_ORDER` property. The specified channel must exist on the server and be on the same level.
86	ChannelInvalidOrder                         = 0x030b,
87	/// Invalid `CHANNEL_FILEPATH` set for the channel
88	ChannelNoFiletransferSupported              = 0x030c,
89	/// Channel has a password not matching the password supplied in the call
90	ChannelInvalidPassword                      = 0x030d,
91	ChannelIsPrivateChannel                     = 0x030e,
92	ChannelInvalidSecurityHash                  = 0x030f,
93
94	/// Server
95	/// Chosen virtual server does not exist or is offline
96	ServerInvalidId                             = 0x0400,
97	/// attempting to delete a server that is running. Stop the server before deleting it.
98	ServerRunning                               = 0x0401,
99	/// Client disconnected because the server is going offline
100	ServerIsShuttingDown                        = 0x0402,
101	/// Given in the onConnectStatusChange event when the server has reached its maximum number of clients as defined by the \ref VIRTUALSERVER_MAXCLIENTS property
102	ServerMaxclientsReached                     = 0x0403,
103	/// Specified server password is wrong. Provide the correct password in the \ref ts3client_startConnection / \ref ts3client_startConnectionWithChannelID call.
104	ServerInvalidPassword                       = 0x0404,
105	ServerDeploymentActive                      = 0x0405,
106	ServerUnableToStopOwnServer                 = 0x0406,
107	/// Server is in virtual status. The attempted action is not possible in this state. Start the virtual server first.
108	ServerIsVirtual                             = 0x0407,
109	ServerWrongMachineid                        = 0x0408,
110	/// Attempting to stop a server that is not online.
111	ServerIsNotRunning                          = 0x0409,
112	ServerIsBooting                             = 0x040a,
113	ServerStatusInvalid                         = 0x040b,
114	ServerModalQuit                             = 0x040c,
115	/// Attempt to connect to an outdated server version. The server needs to be updated.
116	ServerVersionOutdated                       = 0x040d,
117	/// This server is already running within the instance. Each virtual server may only exist once.
118	ServerDuplicatedRunning                     = 0x040e,
119	ServerTimeDifferenceTooLarge                = 0x040f,
120	ServerBlacklisted                           = 0x0410,
121	ServerShutdown                              = 0x0411,
122
123	/// Database
124	Database                                    = 0x0500,
125	DatabaseEmptyResult                         = 0x0501,
126	DatabaseDuplicateEntry                      = 0x0502,
127	DatabaseNoModifications                     = 0x0503,
128	DatabaseConstraint                          = 0x0504,
129	DatabaseReinvoke                            = 0x0505,
130
131	/// Parameter
132	ParameterQuote                              = 0x0600,
133	/// Attempt to flush changes without previously calling set*VariableAs* since the last flush
134	ParameterInvalidCount                       = 0x0601,
135	/// At least one of the supplied parameters did not meet the criteria for that parameter
136	ParameterInvalid                            = 0x0602,
137	/// Failure to supply all the necessary parameters
138	ParameterNotFount                           = 0x0603,
139	/// Invalid type supplied for a parameter, such as passing a string (ie. "five") that expects a number.
140	ParameterConvert                            = 0x0604,
141	/// Value out of allowed range. Such as strings are too long/short or numeric values outside allowed range
142	ParameterInvalidSize                        = 0x0605,
143	/// Neglecting to specify a required parameter
144	ParameterMissing                            = 0x0606,
145	/// Attempting to deploy a modified snapshot
146	ParameterChecksum                           = 0x0607,
147
148	/// Unsorted, needs further investigation
149	/// Failure to create default channel
150	VsCritical                                  = 0x0700,
151	/// Generic error with the connection.
152	ConnectionLost                              = 0x0701,
153	/// Attempting to call functions with a serverConnectionHandler that is not connected. You can use \ref ts3client_getConnectionStatus to check whether the connection handler is connected to a server
154	NotConnected                                = 0x0702,
155	/// Attempting to query connection information (bandwidth usage, ping, etc) without requesting them first using \ref ts3client_requestConnectionInfo
156	NoCachedConnectionInfo                      = 0x0703,
157	/// Requested information is not currently available. You may have to call \ref ts3client_requestClientVariables or \ref ts3client_requestServerVariables
158	CurrentlyNotPossible                        = 0x0704,
159	/// No TeamSpeak server running on the specified IP address and port
160	FailedConnectionInitialisation              = 0x0705,
161	/// Failure to resolve the specified hostname to an IP address
162	CouldNotResolveHostname                     = 0x0706,
163	/// Attempting to perform actions on a non-existent server connection handler
164	InvalidServerConnectionoHandlerId           = 0x0707,
165	/// Not used
166	CouldNotInitialiseInputManager              = 0x0708,
167	/// Calling client library functions without successfully calling \ref ts3client_initClientLib before
168	ClientlibraryNotInitialised                 = 0x0709,
169	/// Calling server library functions without successfully calling \ref ts3server_initServerLib before
170	ServerlibraryNotInitialised                 = 0x070a,
171	/// Using a whisper list that contain more clients than the servers \ref VIRTUALSERVER_MIN_CLIENTS_IN_CHANNEL_BEFORE_FORCED_SILENCE property
172	WhisperTooManyTargets                       = 0x070b,
173	/// The active whisper list is empty or no clients matched the whisper list (e.g. all channels in the list are empty)
174	WhisperNoTargets                            = 0x070c,
175	/// Invalid or unsupported protocol (e.g. attempting an IPv6 connection on an IPv4 only machine)
176	ConnectionIpProtocolMissing                 = 0x070d,
177	// 0x070e is reserved
178	IllegalServerLicense                        = 0x070f,
179
180	/// File transfer
181	/// Invalid UTF8 string or not a valid file
182	FileInvalidName                             = 0x0800,
183	/// Permissions prevent opening the file
184	FileInvalidPermissions                      = 0x0801,
185	/// Target path already exists as a directory
186	FileAlreadyExists                           = 0x0802,
187	/// Attempt to access or move non existing file
188	FileNotFound                                = 0x0803,
189	/// Generic file input / output error
190	FileIoError                                 = 0x0804,
191	/// Attempt to get information about a file transfer after it has already been cleaned up. File transfer information is not available indefinitely after the transfer completed
192	FileInvalidTransferId                       = 0x0805,
193	/// specified path contains invalid characters or does not start with "/"
194	FileInvalidPath                             = 0x0806,
195	/// Not used
196	FileNoFilesAvailable                        = 0x0807,
197	/// File overwrite and resume are mutually exclusive. Only one or neither can be 1.
198	FileOverwriteExcludesResume                 = 0x0808,
199	/// Attempt to write more bytes than claimed file size.
200	FileInvalidSize                             = 0x0809,
201	/// File is currently not available, try again later.
202	FileAlreadyInUse                            = 0x080a,
203	/// Generic failure in file transfer connection / other party did not conform to file transfer protocol
204	FileCouldNotOpenConnection                  = 0x080b,
205	/// Operating system reports hard disk is full. May be caused by quota limitations.
206	FileNoSpaceLeftOnDevice                     = 0x080c,
207	/// File is too large for the file system of the target device.
208	FileExceedsFileSystemMaximumSize            = 0x080d,
209	/// Not used
210	FileTransferConnectionTimeout               = 0x080e,
211	/// File input / output timeout or connection failure
212	FileConnectionLost                          = 0x080f,
213	/// Not used
214	FileExceedsSuppliedSize                     = 0x0810,
215	/// Indicates successful completion
216	FileTransferComplete                        = 0x0811,
217	/// Transfer was cancelled through @ref ts3client_haltTransfer
218	FileTransferCanceled                        = 0x0812,
219	/// Transfer failed because the server is shutting down, or network connection issues
220	FileTransferInterrupted                     = 0x0813,
221	/// Transfer terminated due to server bandwidth quota being exceeded. No client can transfer files.
222	FileTransferServerQuotaExceeded             = 0x0814,
223	/// Attempt to transfer more data than allowed by this clients' bandwidth quota. Other clients may continue to transfer files.
224	FileTransferClientQuotaExceeded             = 0x0815,
225	/// Not used
226	FileTransferReset                           = 0x0816,
227	/// Too many file transfers are in progress. Try again later
228	FileTransferLimitReached                    = 0x0817,
229	/// TODO: Invalid storage class for HTTP FileTransfer (what is a storage class?)
230	FileInvalidStorageClass                     = 0x0818,
231	/// Avatar image exceeds maximum width or height accepted by the server.
232	FileInvalidDimension                        = 0x0819,
233	/// Transfer failed because the channel quota was exceeded. Uploading to this channel is not possible, but other channels may be fine.
234	FileTransferChannelQuotaExceeded            = 0x081a,
235
236	/// Sound
237	/// Cannot set or query pre processor variables with preprocessing disabled
238	SoundPreprocessorDisabled                   = 0x09_00,
239	SoundInternalPreprocessor                   = 0x09_01,
240	SoundInternalEncoder                        = 0x09_02,
241	SoundInternalPlayback                       = 0x09_03,
242	/// No audio capture devices are available
243	SoundNoCaptureDeviceAvailable               = 0x09_04,
244	/// No audio playback devices are available
245	SoundNoPlaybackDeviceAvailable              = 0x09_05,
246	/// Error accessing audio device, or audio device does not support the requested mode
247	SoundCouldNotOpenCaptureDevice              = 0x09_06,
248	/// Error accessing audio device, or audio device does not support the requested mode
249	SoundCouldNotOpenPlaybackDevice             = 0x09_07,
250	/// Attempt to open a sound device on a connection handler which already has an open device. Close the already open device first using \ref ts3client_closeCaptureDevice or \ref ts3client_closePlaybackDevice
251	SoundHandlerHasDevice                       = 0x09_08,
252	/// Attempt to use a device for capture that does not support capturing audio
253	SoundInvalidCaptureDevice                   = 0x09_09,
254	/// Attempt to use a device for playback that does not support playback of audio
255	SoundInvalidPlaybackDevice                  = 0x09_0a,
256	/// Attempt to use a non WAV file in \ref ts3client_playWaveFile or \ref ts3client_playWaveFileHandle
257	SoundInvalidWave                            = 0x09_0b,
258	/// Unsupported wave file used in \ref ts3client_playWaveFile or \ref ts3client_playWaveFileHandle.
259	SoundUnsupportedWave                        = 0x09_0c,
260	/// Failure to open the specified sound file
261	SoundOpenWave                               = 0x09_0d,
262	SoundInternalCapture                        = 0x09_0e,
263	/// Attempt to unregister a custom device that is being used. Close the device first using \ref ts3client_closeCaptureDevice or \ref ts3client_closePlaybackDevice
264	SoundDeviceInUse                            = 0x09_0f,
265	/// Attempt to register a custom device with a device id that has already been used in a previous call. Device ids must be unique.
266	SoundDeviceAlreadyRegisterred               = 0x09_10,
267	/// Attempt to open, close, unregister or use a device which is not known. Custom devices must be registered before being used (see \ref ts3client_registerCustomDevice)
268	SoundUnknownDevice                          = 0x09_11,
269	SoundUnsupportedFrequency                   = 0x09_12,
270	/// Invalid device audio channel count, must be > 0
271	SoundInvalidChannelCount                    = 0x09_13,
272	/// Failure to read sound samples from an opened wave file. Is this a valid wave file?
273	SoundReadWave                               = 0x09_14,
274	/// for internal purposes only
275	SoundNeedMoreData                           = 0x09_15,
276	/// for internal purposes only
277	SoundDeviceBusy                             = 0x09_16,
278	/// Indicates there is currently no data for playback, e.g. nobody is speaking right now.
279	SoundNoData                                 = 0x09_17,
280	/// Opening a device with an unsupported channel count
281	SoundChannelMaskMismatch                    = 0x09_18,
282
283	/// Permissions
284	PermissionsInvalidGroupId                   = 0x0a_00,
285	PermissionsDuplicateEntry                   = 0x0a_01,
286	PermissionsInvalidPermId                    = 0x0a_02,
287	PermissionsEmptyResult                      = 0x0a_03,
288	PermissionsDefaultGroupForbidden            = 0x0a_04,
289	PermissionsInvalidSize                      = 0x0a_05,
290	PermissionsInvalidValue                     = 0x0a_06,
291	PermissionsGroupNotEmpty                    = 0x0a_07,
292	/// Not enough permissions to perform the requested activity
293	PermissionsClientInsufficient               = 0x0a_08,
294	PermissionsInsufficientGroupPower           = 0x0a_09,
295	PermissionsInsufficientPermissionPower      = 0x0a_0a,
296	PermissionsTemplateGroupIsUsed              = 0x0a_0b,
297	/// Permissions to use sound device not granted by operating system, e.g. Windows denied microphone access.
298	Permissions                                 = 0x0a_0c,
299	PermissionUsedByIntegration                 = 0x0a_0d,
300
301	/// Accounting
302	/// Attempt to use more virtual servers than allowed by the license
303	AccountingVirtualserverLimitReached         = 0x0b_00,
304	/// Attempt to set more slots than allowed by the license
305	AccountingSlotLimitReached                  = 0x0b_01,
306	/// Not used
307	AccountingLicenseFileNotFound               = 0x0b_02,
308	/// License expired or not valid yet
309	AccountingLicenseDateNotOk                  = 0x0b_03,
310	/// Failure to communicate with accounting backend
311	AccountingUnableToConnectToServer           = 0x0b_04,
312	/// Failure to write update license file
313	AccountingUnknownError                      = 0x0b_05,
314	/// Not used
315	AcountingServerError                        = 0x0b_06,
316	/// More than one process of the server is running
317	AccountingInstanceLimitReached              = 0x0b_07,
318	/// Shared memory access failure.
319	AccountingInstanceCheckError                = 0x0b_08,
320	/// License is not a TeamSpeak license
321	AccountingLicenseFileInvalid                = 0x0b_09,
322	/// A copy of this server is already running in another instance. Each server may only exist once.
323	AccountingRunningElsewhere                  = 0x0b_0a,
324	/// A copy of this server is running already in this process. Each server may only exist once.
325	AccountingInstanceDuplicated                = 0x0b_0b,
326	/// Attempt to start a server that is already running
327	AccountingAlreadyStarted                    = 0x0b_0c,
328	AccountingNotStarted                        = 0x0b_0d,
329	/// Starting instance / virtual servers too often in too short a time period
330	AccountingToManyStarts                      = 0x0b_0e,
331
332	/// Messages
333	MessageInvalidId                            = 0x0c_00,
334
335	/// Ban
336	BanInvalidId                                = 0x0d_00,
337	ConnectFailedBanned                         = 0x0d_01,
338	RenameFailedBanned                          = 0x0d_02,
339	BanFlooding                                 = 0x0d_03,
340
341	/// Text to speech
342	TtsUnableToInitialize                       = 0x0e_00,
343
344	/// Privilege key
345	PrivilegeKeyInvalid                         = 0x0f_00,
346
347	/// Voip
348	VoipPjsua                                   = 0x10_00,
349	VoipAlreadyInitialized                      = 0x10_01,
350	VoipTooManyAccounts                         = 0x10_02,
351	VoipInvalidAccount                          = 0x10_03,
352	VoipInternalError                           = 0x10_04,
353	VoipInvalidConnectionId                     = 0x10_05,
354	VoipCannotAnswerInitiatedCall               = 0x10_06,
355	VoipNotInitialized                          = 0x10_07,
356
357	/// Provisioning server
358	ProvisioningInvalidPassword                 = 0x11_00,
359	ProvisioningInvalidRequest                  = 0x11_01,
360	ProvisioningNoSlotsAvailable                = 0x11_02,
361	ProvisioningPoolMissing                     = 0x11_03,
362	ProvisioningPoolUnkown                      = 0x11_04,
363	ProvisioningUnknownIpLocation               = 0x11_05,
364	ProvisioningInternalTriedExceeded           = 0x11_06,
365	ProvisioningTooManySlotsRequested           = 0x11_07,
366	ProvisioningTooManyReserved                 = 0x11_08,
367	ProvisioningCouldNotConnect                 = 0x11_09,
368	ProvisioningAuthServerNotConnected          = 0x11_10,
369	ProvisioningAuthDataTooLarge                = 0x11_11,
370	ProvisioningAlreadyInitialized              = 0x11_12,
371	ProvisioningNotInitialized                  = 0x11_13,
372	ProvisioningConnecting                      = 0x11_14,
373	ProvisioningAlreadyConnected                = 0x11_15,
374	ProvisioningNotConnected                    = 0x11_16,
375	ProvisioningIoError                         = 0x11_17,
376	ProvisioningInvalidTimeout                  = 0x11_18,
377	ProvisioningTs3severNotFound                = 0x11_19,
378	ProvisioningNoPermission                    = 0x11_1A,
379
380	/// Mytsid - client
381	InvalidMytsidData                           = 0x12_00,
382	InvalidIntegration                          = 0x12_01,
383	MytsidNeeded                                = 0x12_02,
384
385	/// Ed25519
386	Ed25519RngFail                              = 0x13_00,
387	Ed25519SignatureInvalid                     = 0x13_01,
388	Ed25519InvalidKey                           = 0x13_02,
389	Ed25519UnableToCreateValidKey               = 0x13_03,
390	Ed25519OutOfMemory                          = 0x13_04,
391	Ed25519Exists                               = 0x13_05,
392	Ed25519ReadBeyondEof                        = 0x13_06,
393	Ed25519WriteBeyondEof                       = 0x13_07,
394	Ed25519Version                              = 0x13_08,
395	Ed25519Invalid                              = 0x13_09,
396	Ed25519InvalidDate                          = 0x13_0a,
397	Ed25519Unauthorized                         = 0x13_0b,
398	Ed25519InvalidType                          = 0x13_0c,
399	Ed25519AddressNomatch                       = 0x13_0d,
400	Ed25519NotValidYet                          = 0x13_0e,
401	Ed25519Expired                              = 0x13_0f,
402	Ed25519IndexOutOfRange                      = 0x13_10,
403	Ed25519InvalidSize                          = 0x13_11,
404
405	// Api key
406	ApikeyOutofscope                            = 0x14_00,
407	ApikeyCryptoError                           = 0x14_01,
408	ApikeyInvalid                               = 0x14_02,
409	ApikeyInvalidId                             = 0x14_03,
410	ApikeyMissing                               = 0x14_04,
411
412	// Homebase
413	HomebaseNoSlotsAvailable                    = 0x15_00,
414}
415
416impl fmt::Display for Error {
417	fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
418		fmt::Debug::fmt(self, f)
419	}
420}
421
422impl ::std::error::Error for Error {
423	fn description(&self) -> &str {
424		"TeamSpeak error"
425	}
426}