Compare commits

...

2 Commits

Author SHA1 Message Date
6bf4676bc1 updated sdk and fixed build errors 2023-08-05 22:01:47 +02:00
72a9b50298 minor adjustments 2020-04-26 16:25:58 +02:00
26 changed files with 6667 additions and 1222 deletions

42
.clang-format Normal file
View File

@@ -0,0 +1,42 @@
---
Language: Cpp
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: 'true'
AlignConsecutiveDeclarations: 'true'
AlignEscapedNewlinesLeft: 'false'
AlignOperands: 'true'
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AllowShortBlocksOnASingleLine: 'true'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
BinPackArguments: 'true'
BinPackParameters: 'true'
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Linux
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializersBeforeComma: 'true'
Cpp11BracedListStyle: 'true'
DerivePointerAlignment: 'true'
ExperimentalAutoDetectBinPacking: 'false'
IndentCaseLabels: 'true'
IndentWidth: '4'
ColumnLimit: 256
ReflowComments: 'false'
NamespaceIndentation: Inner
PointerAlignment: Left
SortIncludes: 'true'
SpaceAfterCStyleCast: 'false'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: 'false'
SpacesInAngles: 'false'
SpacesInCStyleCastParentheses: 'false'
SpacesInContainerLiterals: 'false'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
Standard: Cpp11
TabWidth: '4'
UseTab: Never

22
.qmake.stash Normal file
View File

@@ -0,0 +1,22 @@
QMAKE_CXX.QT_COMPILER_STDCXX = 199711L
QMAKE_CXX.QMAKE_MSC_VER = 1929
QMAKE_CXX.QMAKE_MSC_FULL_VER = 192930148
QMAKE_CXX.COMPILER_MACROS = \
QT_COMPILER_STDCXX \
QMAKE_MSC_VER \
QMAKE_MSC_FULL_VER
QMAKE_CXX.INCDIRS = \
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\ATLMFC\\include" \
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\include" \
"C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\include\\um" \
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.16299.0\\ucrt" \
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.16299.0\\shared" \
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.16299.0\\um" \
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.16299.0\\winrt" \
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.16299.0\\cppwinrt"
QMAKE_CXX.LIBDIRS = \
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\ATLMFC\\lib\\x64" \
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\lib\\x64" \
"C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\lib\\um\\x64" \
"C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.16299.0\\ucrt\\x64" \
"C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.16299.0\\um\\x64"

2
.travis.yml Normal file
View File

@@ -0,0 +1,2 @@
language: C
script: make

16
Makefile Normal file
View File

@@ -0,0 +1,16 @@
#
# Makefile to build TeamSpeak 3 Client Test Plugin
#
CFLAGS = -c -O2 -Wall -fPIC
all: test_plugin
test_plugin: plugin.o
gcc -o test_plugin.so -shared plugin.o
plugin.o: ./src/plugin.c
gcc -Iinclude src/plugin.c $(CFLAGS)
clean:
rm -rf *.o test_plugin.so

593
Makefile.Debug Normal file

File diff suppressed because one or more lines are too long

593
Makefile.Release Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,18 @@
# TS_WIFILED
# TeamSpeak 3 Client Plugin SDK: Helper Repository
Welcome to the official helper repository for creating native plugins for the TeamSpeak 3 Client. This repository includes example code and SDK header files to assist in the development of your plugin.
## Quick Start Guide
To get started, it's highly recommended that you base your plugin on the provided test plugin. This test plugin includes the necessary special functions that your plugin must export. If certain optional functions are not needed for your project, feel free to remove them. For more details, please refer to the code comments.
## Additional Resources
To expand your knowledge and get support, we recommend visiting the following resources:
- [TeamSpeak Community Forums](https://community.teamspeak.com): Connect with other developers and TeamSpeak users.
- [TeamSpeak SDK Downloads](https://www.teamspeak.com/downloads#sdk): Access the latest version of our SDK and other development resources.
## Copyright Information
This repository is protected under copyright law. Copyright © TeamSpeak Systems GmbH. All rights reserved.

View File

@@ -8,22 +8,11 @@ enum PluginConfigureOffer {
PLUGIN_OFFERS_CONFIGURE_QT_THREAD /* Plugin does implement ts3plugin_configure and requests to run this function in the Qt GUI thread */
};
enum PluginMessageTarget {
PLUGIN_MESSAGE_TARGET_SERVER = 0,
PLUGIN_MESSAGE_TARGET_CHANNEL
};
enum PluginMessageTarget { PLUGIN_MESSAGE_TARGET_SERVER = 0, PLUGIN_MESSAGE_TARGET_CHANNEL };
enum PluginItemType {
PLUGIN_SERVER = 0,
PLUGIN_CHANNEL,
PLUGIN_CLIENT
};
enum PluginItemType { PLUGIN_SERVER = 0, PLUGIN_CHANNEL, PLUGIN_CLIENT };
enum PluginMenuType {
PLUGIN_MENU_TYPE_GLOBAL = 0,
PLUGIN_MENU_TYPE_CHANNEL,
PLUGIN_MENU_TYPE_CLIENT
};
enum PluginMenuType { PLUGIN_MENU_TYPE_GLOBAL = 0, PLUGIN_MENU_TYPE_CHANNEL, PLUGIN_MENU_TYPE_CLIENT };
#define PLUGIN_MENU_BUFSZ 128
@@ -57,18 +46,8 @@ struct PluginBookmarkList{
struct PluginBookmarkItem items[1]; //should be 0 but compiler complains
};
enum PluginGuiProfile{
PLUGIN_GUI_SOUND_CAPTURE = 0,
PLUGIN_GUI_SOUND_PLAYBACK,
PLUGIN_GUI_HOTKEY,
PLUGIN_GUI_SOUNDPACK,
PLUGIN_GUI_IDENTITY
};
enum PluginGuiProfile { PLUGIN_GUI_SOUND_CAPTURE = 0, PLUGIN_GUI_SOUND_PLAYBACK, PLUGIN_GUI_HOTKEY, PLUGIN_GUI_SOUNDPACK, PLUGIN_GUI_IDENTITY };
enum PluginConnectTab{
PLUGIN_CONNECT_TAB_NEW = 0,
PLUGIN_CONNECT_TAB_CURRENT,
PLUGIN_CONNECT_TAB_NEW_IF_CURRENT_CONNECTED
};
enum PluginConnectTab { PLUGIN_CONNECT_TAB_NEW = 0, PLUGIN_CONNECT_TAB_CURRENT, PLUGIN_CONNECT_TAB_NEW_IF_CURRENT_CONNECTED };
#endif

View File

@@ -2,22 +2,22 @@
#define TEAMLOG_LOGTYPES_H
enum LogTypes {
LogType_NONE = 0x0000,
LogType_FILE = 0x0001,
LogType_CONSOLE = 0x0002,
LogType_USERLOGGING = 0x0004,
LogType_NO_NETLOGGING = 0x0008,
LogType_DATABASE = 0x0010,
LogType_SYSLOG = 0x0020,
LogType_NONE = 0x0000, ///< Logging is disabled
LogType_FILE = 0x0001, ///< Log to regular log file
LogType_CONSOLE = 0x0002, ///< Log to standard output / error
LogType_USERLOGGING = 0x0004, ///< User defined logging. Will call the \ref ServerLibFunctions.onUserLoggingMessageEvent callback for every message to be logged
LogType_NO_NETLOGGING = 0x0008, ///< Not used
LogType_DATABASE = 0x0010, ///< Log to database (deprecated, server only, no effect in SDK)
LogType_SYSLOG = 0x0020, ///< Log to syslog (only available on Linux)
};
enum LogLevel {
LogLevel_CRITICAL = 0, //these messages stop the program
LogLevel_ERROR, //everything that is really bad, but not so bad we need to shut down
LogLevel_WARNING, //everything that *might* be bad
LogLevel_DEBUG, //output that might help find a problem
LogLevel_INFO, //informational output, like "starting database version x.y.z"
LogLevel_DEVEL //developer only output (will not be displayed in release mode)
LogLevel_CRITICAL = 0, ///< these messages stop the program
LogLevel_ERROR, ///< everything that is really bad, but not so bad we need to shut down
LogLevel_WARNING, ///< everything that *might* be bad
LogLevel_DEBUG, ///< output that might help find a problem
LogLevel_INFO, ///< informational output, like "starting database version x.y.z"
LogLevel_DEVEL ///< developer only output (will not be displayed in release mode)
};
#endif //TEAMLOG_LOGTYPES_H

File diff suppressed because it is too large Load Diff

View File

@@ -3,98 +3,117 @@
#include "teamlog/logtypes.h"
//limited length, measured in characters
#define TS3_MAX_SIZE_CHANNEL_NAME 40
#define TS3_MAX_SIZE_VIRTUALSERVER_NAME 64
#define TS3_MAX_SIZE_CLIENT_NICKNAME 64
#define TS3_MIN_SIZE_CLIENT_NICKNAME 3
#define TS3_MAX_SIZE_REASON_MESSAGE 80
#define TS3_MAX_SIZE_CHANNEL_NAME 40 // channel name maximum length in characters
#define TS3_MAX_SIZE_VIRTUALSERVER_NAME 64 // virtual server name maximum length in characters
#define TS3_MAX_SIZE_CLIENT_NICKNAME 64 // client display name length limit in characters
#define TS3_MIN_SIZE_CLIENT_NICKNAME 3 // client display name minimum length in characters
#define TS3_MAX_SIZE_REASON_MESSAGE 80 // length limit in characters for kick, move, etc reasons
//limited length, measured in bytes (utf8 encoded)
#define TS3_MAX_SIZE_TEXTMESSAGE 8192
#define TS3_MAX_SIZE_CHANNEL_TOPIC 255
#define TS3_MAX_SIZE_CHANNEL_DESCRIPTION 8192
#define TS3_MAX_SIZE_TEXTMESSAGE 8192 // text message length limit, measured in bytes (utf8 encoded)
#define TS3_MAX_SIZE_CHANNEL_TOPIC 255 // channel topic lengt limith, measured in bytes (utf8 encoded)
#define TS3_MAX_SIZE_CHANNEL_DESCRIPTION 8192 // channel description length limit, measured in bytes (utf8 encoded)
// server welcome message length limit measured in bytes (utf8 encoded)
#define TS3_MAX_SIZE_VIRTUALSERVER_WELCOMEMESSAGE 1024
#define TS3_SIZE_MYTSID 44
// minimum amount of seconds before a clientID that was in use can be assigned to a new client
#define TS3_MIN_SECONDS_CLIENTID_REUSE 300
#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32)
typedef unsigned __int16 anyID;
typedef unsigned __int64 uint64;
#ifndef EXPORTDLL
#ifdef BUILDING_DLL
#define EXPORTDLL __declspec(dllexport)
#else
#define EXPORTDLL
#endif
#endif
#else
#include <stdint.h>
typedef uint16_t anyID;
typedef uint64_t uint64;
#ifndef EXPORTDLL
#ifdef BUILDING_DLL
#define EXPORTDLL __attribute__((visibility("default")))
#else
#define EXPORTDLL
#endif
#endif
#endif
enum Visibility {
ENTER_VISIBILITY = 0, ///< Client joined from an unsubscribed channel, or joined the server.
RETAIN_VISIBILITY, ///< Client switched from one subscribed channel to a different subscribed channel.
LEAVE_VISIBILITY ///< Client switches to an unsubscribed channel, or disconnected from server.
};
enum ConnectStatus {
STATUS_DISCONNECTED = 0, ///< There is no activity to the server, this is the default value
STATUS_CONNECTING, ///< We are trying to connect, we haven't got a client id yet, we haven't been accepted by the server
STATUS_CONNECTED, ///< The server has accepted us, we can talk and hear and we have a client id, but we don't
///< have the channels and clients yet, we can get server infos (welcome msg etc.)
STATUS_CONNECTION_ESTABLISHING, ///< we are connected and we are visible
STATUS_CONNECTION_ESTABLISHED, ///< we are connected and we have the client and channels available
};
enum LocalTestMode { TEST_MODE_OFF = 0, TEST_MODE_VOICE_LOCAL_ONLY, TEST_MODE_VOICE_LOCAL_AND_REMOTE, TEST_MODE_TALK_STATUS_CHANGES_ONLY };
enum TalkStatus {
STATUS_NOT_TALKING = 0,
STATUS_TALKING = 1,
STATUS_TALKING_WHILE_DISABLED = 2,
STATUS_NOT_TALKING = 0, ///< client is not talking
STATUS_TALKING = 1, ///< client is talking
STATUS_TALKING_WHILE_DISABLED = 2, ///< client is talking while the microphone is muted (only valid for own client)
};
enum CodecType {
CODEC_SPEEX_NARROWBAND = 0, //mono, 16bit, 8kHz, bitrate dependent on the quality setting
CODEC_SPEEX_WIDEBAND, //mono, 16bit, 16kHz, bitrate dependent on the quality setting
CODEC_SPEEX_ULTRAWIDEBAND, //mono, 16bit, 32kHz, bitrate dependent on the quality setting
CODEC_CELT_MONO, //mono, 16bit, 48kHz, bitrate dependent on the quality setting
CODEC_OPUS_VOICE, //mono, 16bit, 48khz, bitrate dependent on the quality setting, optimized for voice
CODEC_OPUS_MUSIC, //stereo, 16bit, 48khz, bitrate dependent on the quality setting, optimized for music
CODEC_SPEEX_NARROWBAND = 0, ///< (deprecated) mono, 16bit, 8kHz, bitrate dependent on the quality setting
CODEC_SPEEX_WIDEBAND, ///< (deprecated) mono, 16bit, 16kHz, bitrate dependent on the quality setting
CODEC_SPEEX_ULTRAWIDEBAND, ///< (deprecated) mono, 16bit, 32kHz, bitrate dependent on the quality setting
CODEC_CELT_MONO, ///< (deprecated) mono, 16bit, 48kHz, bitrate dependent on the quality setting
CODEC_OPUS_VOICE, ///< mono, 16bit, 48khz, bitrate dependent on the quality setting, optimized for voice
CODEC_OPUS_MUSIC, ///< stereo, 16bit, 48khz, bitrate dependent on the quality setting, optimized for music
};
enum CodecEncryptionMode {
CODEC_ENCRYPTION_PER_CHANNEL = 0,
CODEC_ENCRYPTION_FORCED_OFF,
CODEC_ENCRYPTION_FORCED_ON,
CODEC_ENCRYPTION_PER_CHANNEL = 0, ///< voice data encryption decided per channel
CODEC_ENCRYPTION_FORCED_OFF, ///< voice data encryption disabled
CODEC_ENCRYPTION_FORCED_ON, ///< voice data encryption enabled
};
enum TextMessageTargetMode {
TextMessageTarget_CLIENT=1,
TextMessageTarget_CHANNEL,
TextMessageTarget_SERVER,
TextMessageTarget_CLIENT = 1, ///< Message is a private message to another client
TextMessageTarget_CHANNEL, ///< Message is sent to a channel, received by all clients in that channel at the time
TextMessageTarget_SERVER, ///< Message is sent to every client on the server
TextMessageTarget_MAX
};
enum MuteInputStatus {
MUTEINPUT_NONE = 0,
MUTEINPUT_MUTED,
MUTEINPUT_NONE = 0, ///< Microphone is not muted, audio is sent to the server
MUTEINPUT_MUTED, ///< Microphone is muted, no audio is transmitted to the server
};
enum MuteOutputStatus {
MUTEOUTPUT_NONE = 0,
MUTEOUTPUT_MUTED,
MUTEOUTPUT_NONE = 0, ///< Speaker is active, server is sending us audio
MUTEOUTPUT_MUTED, ///< Speaker is muted, server is not sending audio to us
};
enum HardwareInputStatus {
HARDWAREINPUT_DISABLED = 0,
HARDWAREINPUT_ENABLED,
HARDWAREINPUT_DISABLED = 0, ///< no capture device opened
HARDWAREINPUT_ENABLED, ///< capture device open
};
enum HardwareOutputStatus {
HARDWAREOUTPUT_DISABLED = 0,
HARDWAREOUTPUT_ENABLED,
HARDWAREOUTPUT_DISABLED = 0, ///< no playback device opened
HARDWAREOUTPUT_ENABLED, ///< playback device open
};
enum InputDeactivationStatus {
INPUT_ACTIVE = 0,
INPUT_DEACTIVATED = 1,
INPUT_ACTIVE = 0, ///< Audio is captured from the capture device.
INPUT_DEACTIVATED = 1, ///< No audio is captured from the capture device.
};
enum ReasonIdentifier {
REASON_NONE = 0, //no reason data
REASON_MOVED = 1, //{SectionInvoker}
REASON_NONE = 0, ///< no reason data
REASON_MOVED = 1, ///< client was moved
REASON_SUBSCRIPTION = 2, // no reason data
REASON_LOST_CONNECTION = 3, // reasonmsg=reason
REASON_KICK_CHANNEL = 4, //{SectionInvoker} reasonmsg=reason //{SectionInvoker} is only added server->client
@@ -107,220 +126,369 @@ enum ReasonIdentifier {
REASON_CLIENTDISCONNECT_SERVER_SHUTDOWN = 11, // reasonmsg=reason
};
enum Protocol_Encryption_Cipher { AES_128 = 0, AES_256, PROTOCOL_ENCRYPTION_CIPHER_END_MARKER };
enum ChannelProperties {
CHANNEL_NAME = 0, //Available for all channels that are "in view", always up-to-date
CHANNEL_TOPIC, //Available for all channels that are "in view", always up-to-date
CHANNEL_DESCRIPTION, //Must be requested (=> requestChannelDescription)
CHANNEL_PASSWORD, //not available client side
CHANNEL_CODEC, //Available for all channels that are "in view", always up-to-date
CHANNEL_CODEC_QUALITY, //Available for all channels that are "in view", always up-to-date
CHANNEL_MAXCLIENTS, //Available for all channels that are "in view", always up-to-date
CHANNEL_MAXFAMILYCLIENTS, //Available for all channels that are "in view", always up-to-date
CHANNEL_ORDER, //Available for all channels that are "in view", always up-to-date
CHANNEL_FLAG_PERMANENT, //Available for all channels that are "in view", always up-to-date
CHANNEL_FLAG_SEMI_PERMANENT, //Available for all channels that are "in view", always up-to-date
CHANNEL_FLAG_DEFAULT, //Available for all channels that are "in view", always up-to-date
CHANNEL_FLAG_PASSWORD, //Available for all channels that are "in view", always up-to-date
CHANNEL_CODEC_LATENCY_FACTOR, //Available for all channels that are "in view", always up-to-date
CHANNEL_CODEC_IS_UNENCRYPTED, //Available for all channels that are "in view", always up-to-date
CHANNEL_SECURITY_SALT, //Not available client side, not used in teamspeak, only SDK. Sets the options+salt for security hash.
CHANNEL_DELETE_DELAY, //How many seconds to wait before deleting this channel
CHANNEL_NAME = 0, ///< String. Read/Write. Name of the channel. Always available.
CHANNEL_TOPIC, ///< String. Read/Write. Short single line text describing what the channel is about. Always available.
CHANNEL_DESCRIPTION, ///< String. Read/Write. Arbitrary text (up to 8k bytes) with information about the channel.
///< Must be requested (\ref ts3client_requestChannelDescription)
CHANNEL_PASSWORD, ///< String. Read/Write. Password of the channel. Read access is limited to the server. Clients
///< will only ever see the last password they attempted to use when joining the channel. Always available.
CHANNEL_CODEC, ///< Integer. Read/Write. The codec this channel is using. One of the values from the \ref CodecType
///< enum. Always available.
CHANNEL_CODEC_QUALITY, ///< Integer. Read/Write. The quality setting of the channel. Valid values are 0 to 10 inclusive.
///< Higher value means better voice quality but also more bandwidth usage. Always available.
CHANNEL_MAXCLIENTS, ///< Integer. Read/Write. The number of clients that can be in the channel simultaneously.
///< Always available.
CHANNEL_MAXFAMILYCLIENTS, ///< Integer. Read/Write. The total number of clients that can be in this channel and all
///< sub channels of this channel. Always available.
CHANNEL_ORDER, ///< UInt64. Read/Write. The ID of the channel below which this channel should be displayed. If 0
///< the channel is sorted at the top of the current level. Always available.
CHANNEL_FLAG_PERMANENT, ///< Integer. Read/Write. Boolean (1/0) indicating whether the channel remains when empty.
///< Permanent channels are stored to the database and available after server restart. SDK
///< users will need to take care of restoring channel at server start on their own.
///< Mutually exclusive with \ref CHANNEL_FLAG_SEMI_PERMANENT. Always available.
CHANNEL_FLAG_SEMI_PERMANENT, ///< Integer. Read/Write. Boolean (1/0) indicating whether the channel remains when
///< empty. Semi permanent channels are not stored to disk and gone after server
///< restart but remain while empty. Mutually exclusive with \ref
///< CHANNEL_FLAG_PERMANENT. Always available.
CHANNEL_FLAG_DEFAULT, ///< Integer. Read/Write. Boolean (1/0). The default channel is the channel that all clients
///< are located in when they join the server, unless the client explicitly specified a
///< different channel when connecting and is allowed to join their preferred channel. Only
///< one channel on the server can have this flag set. The default channel must have \ref
///< CHANNEL_FLAG_PERMANENT set. Always available.
CHANNEL_FLAG_PASSWORD, ///< Integer. Read/Write. Boolean (1/0) indicating whether this channel is password protected.
///< When removing or setting \ref CHANNEL_PASSWORD you also need to adjust this flag.
CHANNEL_CODEC_LATENCY_FACTOR, ///< (deprecated) Integer. Read/Write. Allows to increase packet size, reducing
///< bandwith at the cost of higher latency of voice transmission. Valid values are
///< 1-10 inclusive. 1 is the default and offers the lowest latency. Always available.
CHANNEL_CODEC_IS_UNENCRYPTED, ///< Integer. Read/Write. Boolean (1/0). If 0 voice data is encrypted, if 1 the voice
///< data is not encrypted. Only used if the server \ref
///< VIRTUALSERVER_CODEC_ENCRYPTION_MODE is set to \ref CODEC_ENCRYPTION_PER_CHANNEL.
///< Always available.
CHANNEL_SECURITY_SALT, ///< String. Read/Write. SDK Only, not used by TeamSpeak. This channels security hash. When
///< a client joins their \ref CLIENT_SECURITY_HASH is compared to this value, to allow or
///< deny the client access to the channel. Used to enforce clients joining the server with
///< specific identity and \ref CLIENT_META_DATA. See SDK Documentation about this feature
///< for further details. Always available.
CHANNEL_DELETE_DELAY, ///< UInt64. Read/Write. Number of seconds deletion of temporary channels is delayed after
///< the last client leaves the channel. Channel is only deleted if empty when the delete
///< delay expired. Always available.
CHANNEL_UNIQUE_IDENTIFIER, ///< String. Read only. An identifier that uniquely identifies a channel. Available in
///< Server >= 3.10.0
CHANNEL_ENDMARKER,
};
enum ClientProperties {
CLIENT_UNIQUE_IDENTIFIER = 0, //automatically up-to-date for any client "in view", can be used to identify this particular client installation
CLIENT_NICKNAME, //automatically up-to-date for any client "in view"
CLIENT_VERSION, //for other clients than ourself, this needs to be requested (=> requestClientVariables)
CLIENT_PLATFORM, //for other clients than ourself, this needs to be requested (=> requestClientVariables)
CLIENT_FLAG_TALKING, //automatically up-to-date for any client that can be heard (in room / whisper)
CLIENT_INPUT_MUTED, //automatically up-to-date for any client "in view", this clients microphone mute status
CLIENT_OUTPUT_MUTED, //automatically up-to-date for any client "in view", this clients headphones/speakers/mic combined mute status
CLIENT_OUTPUTONLY_MUTED, //automatically up-to-date for any client "in view", this clients headphones/speakers only mute status
CLIENT_INPUT_HARDWARE, //automatically up-to-date for any client "in view", this clients microphone hardware status (is the capture device opened?)
CLIENT_OUTPUT_HARDWARE, //automatically up-to-date for any client "in view", this clients headphone/speakers hardware status (is the playback device opened?)
CLIENT_INPUT_DEACTIVATED, //only usable for ourself, not propagated to the network
CLIENT_IDLE_TIME, //internal use
CLIENT_DEFAULT_CHANNEL, //only usable for ourself, the default channel we used to connect on our last connection attempt
CLIENT_DEFAULT_CHANNEL_PASSWORD, //internal use
CLIENT_SERVER_PASSWORD, //internal use
CLIENT_META_DATA, //automatically up-to-date for any client "in view", not used by TeamSpeak, free storage for sdk users
CLIENT_IS_MUTED, //only make sense on the client side locally, "1" if this client is currently muted by us, "0" if he is not
CLIENT_IS_RECORDING, //automatically up-to-date for any client "in view"
CLIENT_VOLUME_MODIFICATOR, //internal use
CLIENT_VERSION_SIGN, //sign
CLIENT_SECURITY_HASH, //SDK use, not used by teamspeak. Hash is provided by an outside source. A channel will use the security salt + other client data to calculate a hash, which must be the same as the one provided here.
CLIENT_ENCRYPTION_CIPHERS, //internal use
CLIENT_UNIQUE_IDENTIFIER = 0, ///< String. Read only. Public Identity, can be used to identify a client
///< installation. Remains identical as long as the client keeps using the same
///< identity. Available for visible clients.
CLIENT_NICKNAME, ///< String. Read/Write. Display name of the client. Available for visible clients.
CLIENT_VERSION, ///< String. Read only. Version String of the client used. For clients other than ourself this
///< needs to be requested (\ref ts3client_requestClientVariables).
CLIENT_PLATFORM, ///< String. Read only. Operating system used by the client. For other clients other than ourself
///< this needs to be requested (\ref ts3client_requestClientVariables).
CLIENT_FLAG_TALKING, ///< Integer. Read only. Whether the client is talking. Available on clients that are either
///< whispering to us, or in our channel.
CLIENT_INPUT_MUTED, ///< Integer. Read/Write. Microphone mute status. Available for visible clients. One of the
///< values from the \ref MuteInputStatus enum.
CLIENT_OUTPUT_MUTED, ///< Integer. Read only. Speaker mute status. Speaker mute implies microphone mute. Available
///< for visible clients. One of the values from the \ref MuteOutputStatus enum.
CLIENT_OUTPUTONLY_MUTED, ///< Integer. Read only. Speaker mute status. Microphone may be active. Available for
///< visible clients. One of the values from the \ref MuteOutputStatus enum.
CLIENT_INPUT_HARDWARE, ///< Integer. Read only. Indicates whether a capture device is open. Available for visible
///< clients. One of the values from the \ref HardwareInputStatus enum.
CLIENT_OUTPUT_HARDWARE, ///< Integer. Read only. Indicates whether a playback device is open. Available for visible
///< clients. One of the values from the \ref HardwareOutputStatus enum.
CLIENT_INPUT_DEACTIVATED, ///< Integer. Read/Write. Not available server side. Local microphone mute status.
///< Available only for own client. Used to implement Push To Talk. One of the values from
///< the \ref InputDeactivationStatus enum.
CLIENT_IDLE_TIME, ///< UInt64. Read only. Seconds since last activity. Available only for own client.
CLIENT_DEFAULT_CHANNEL, ///< String. Read only. User specified channel they joined when connecting to the server.
///< Available only for own client.
CLIENT_DEFAULT_CHANNEL_PASSWORD, ///< String. Read only. User specified channel password for the channel they
///< attempted to join when connecting to the server. Available only for own
///< client.
CLIENT_SERVER_PASSWORD, ///< String. Read only. User specified server password. Available only for own client.
CLIENT_META_DATA, ///< String. Read/Write. Can be used to store up to 4096 bytes of information on clients. Not
///< used by TeamSpeak. Available for visible clients.
CLIENT_IS_MUTED, ///< Integer. Read only. Not available server side. Indicates whether we have muted the client
///< using \ref ts3client_requestMuteClients. Available for visible clients other than ourselves.
CLIENT_IS_RECORDING, ///< Integer. Read only. Indicates whether the client is recording incoming audio. Available
///< for visible clients.
CLIENT_VOLUME_MODIFICATOR, ///< Integer. Read only. Volume adjustment for this client as set by \ref
///< ts3client_setClientVolumeModifier. Available for visible clients.
CLIENT_VERSION_SIGN, ///< String. Read only. TeamSpeak internal signature.
CLIENT_SECURITY_HASH, ///< String. Read/Write. This clients security hash. Not used by TeamSpeak, SDK only. Hash is
///< provided by an outside source. A channel will use the security salt + other client data
///< to calculate a hash, which must be the same as the one provided here. See SDK
///< documentation about Client / Channel Security Hashes for more details.
CLIENT_ENCRYPTION_CIPHERS, ///< String. Read only. SDK only. List of available ciphers this client can use.
CLIENT_ENDMARKER,
};
enum VirtualServerProperties {
VIRTUALSERVER_UNIQUE_IDENTIFIER = 0, //available when connected, can be used to identify this particular server installation
VIRTUALSERVER_NAME, //available and always up-to-date when connected
VIRTUALSERVER_WELCOMEMESSAGE, //available when connected, (=> requestServerVariables)
VIRTUALSERVER_PLATFORM, //available when connected
VIRTUALSERVER_VERSION, //available when connected
VIRTUALSERVER_MAXCLIENTS, //only available on request (=> requestServerVariables), stores the maximum number of clients that may currently join the server
VIRTUALSERVER_PASSWORD, //not available to clients, the server password
VIRTUALSERVER_CLIENTS_ONLINE, //only available on request (=> requestServerVariables),
VIRTUALSERVER_CHANNELS_ONLINE, //only available on request (=> requestServerVariables),
VIRTUALSERVER_CREATED, //available when connected, stores the time when the server was created
VIRTUALSERVER_UPTIME, //only available on request (=> requestServerVariables), the time since the server was started
VIRTUALSERVER_CODEC_ENCRYPTION_MODE, //available and always up-to-date when connected
VIRTUALSERVER_ENCRYPTION_CIPHERS, //internal use
VIRTUALSERVER_UNIQUE_IDENTIFIER = 0, ///< String. Read only. Unique identifier for a virtual server, does not
///< change on server restart. Available if \ref ts3client_getConnectionStatus
///< is >= \ref STATUS_CONNECTED.
VIRTUALSERVER_NAME, ///< String. Read/Write. The virtual server display name. Available if \ref
///< ts3client_getConnectionStatus is >= \ref STATUS_CONNECTED.
VIRTUALSERVER_WELCOMEMESSAGE, ///< String. Read/Write. The welcome message displayed to clients on connect.
///< Available if \ref ts3client_getConnectionStatus is >= \ref STATUS_CONNECTED. Not
///< updated automatically when changed, updates need to be requested (\ref
///< ts3client_requestServerVariables).
VIRTUALSERVER_PLATFORM, ///< String. Read only. The operating system the server is running on. Available if \ref
///< ts3client_getConnectionStatus is >= \ref STATUS_CONNECTED.
VIRTUALSERVER_VERSION, ///< String. Read only. The server software version string. Available if \ref
///< ts3client_getConnectionStatus is >= \ref STATUS_CONNECTED.
VIRTUALSERVER_MAXCLIENTS, ///< UInt64. Read/Write. The maximum number of clients that can be connected
///< simultaneously. Only available on request (\ref ts3client_requestServerVariables).
VIRTUALSERVER_PASSWORD, ///< String. Read/Write. The server password. Read access is limited to the server. Clients
///< will only get the password they supplied when connecting. Available if \ref
///< ts3client_getConnectionStatus is >= \ref STATUS_CONNECTED.
VIRTUALSERVER_CLIENTS_ONLINE, ///< UInt64. Read only. The current number of clients connected to the server,
///< including query connections. Only available on request (\ref
///< ts3client_requestServerVariables).
VIRTUALSERVER_CHANNELS_ONLINE, ///< UInt64. Read only. The current number of channels on the server. Only
///< available on request (\ref ts3client_requestServerVariables).
VIRTUALSERVER_CREATED, ///< Integer. Read only. The time this virtual server was created as unix timestamp.
///< Available if \ref ts3client_getConnectionStatus is >= \ref STATUS_CONNECTED.
VIRTUALSERVER_UPTIME, ///< UInt64. Read only. Number of seconds that have passed since the virtual server was
///< started. Only available on request (\ref ts3client_requestServerVariables).
VIRTUALSERVER_CODEC_ENCRYPTION_MODE, ///< Integer. Read/Write. Boolean (1/0) that specifies if voice data is encrypted
///< during transfer. One of the values from the \ref CodecEncryptionMode enum.
///< Available if \ref ts3client_getConnectionStatus is >= \ref STATUS_CONNECTED.
VIRTUALSERVER_ENCRYPTION_CIPHERS, ///< String. Read/Write. Comma separated list of available ciphers to encrypt the
///< connection. The server will use the first cipher in the list that is also
///< listed in the \ref CLIENT_ENCRYPTION_CIPHERS of the connecting client.
///< Clients will fail to connect if no match is found. Always available.
VIRTUALSERVER_ENDMARKER,
VIRTUALSERVER_FILEBASE = 24, ///< String. Read only. The path to the base directory used to store files
///< transferred using file transfer. Available only on the server. Is set by \ref
///< ts3server_enableFileManager
VIRTUALSERVER_MAX_DOWNLOAD_TOTAL_BANDWIDTH = 29, ///< UInt64. Read/Write. Maximum traffic in bytes the server can
///< use for file transfer downloads. Only available on request
///< (\ref ts3client_requestServerVariables).
VIRTUALSERVER_MAX_UPLOAD_TOTAL_BANDWIDTH = 30, ///< UInt64. Read/Write. Maximum traffic in bytes the server can use
///< for file transfer uploads. Only available on request (=>
///< requestServerVariables)
VIRTUALSERVER_LOG_FILETRANSFER = 64 ///< Integer. Read/Write. Boolean (1/0) indicating whether to include file
///< transfer activities (uploading or downloading of files) in the server log.
///< Always available.
};
/**
* Various connection properties.
* These are all read only, and except for your own client must be requested using \ref ts3client_requestConnectionInfo
*/
enum ConnectionProperties {
CONNECTION_PING = 0, //average latency for a round trip through and back this connection
CONNECTION_PING_DEVIATION, //standard deviation of the above average latency
CONNECTION_CONNECTED_TIME, //how long the connection exists already
CONNECTION_IDLE_TIME, //how long since the last action of this client
CONNECTION_CLIENT_IP, //IP of this client (as seen from the server side)
CONNECTION_CLIENT_PORT, //Port of this client (as seen from the server side)
CONNECTION_SERVER_IP, //IP of the server (seen from the client side) - only available on yourself, not for remote clients, not available server side
CONNECTION_SERVER_PORT, //Port of the server (seen from the client side) - only available on yourself, not for remote clients, not available server side
CONNECTION_PACKETS_SENT_SPEECH, //how many Speech packets were sent through this connection
CONNECTION_PACKETS_SENT_KEEPALIVE,
CONNECTION_PACKETS_SENT_CONTROL,
CONNECTION_PACKETS_SENT_TOTAL, //how many packets were sent totally (this is PACKETS_SENT_SPEECH + PACKETS_SENT_KEEPALIVE + PACKETS_SENT_CONTROL)
CONNECTION_BYTES_SENT_SPEECH,
CONNECTION_BYTES_SENT_KEEPALIVE,
CONNECTION_BYTES_SENT_CONTROL,
CONNECTION_BYTES_SENT_TOTAL,
CONNECTION_PACKETS_RECEIVED_SPEECH,
CONNECTION_PACKETS_RECEIVED_KEEPALIVE,
CONNECTION_PACKETS_RECEIVED_CONTROL,
CONNECTION_PACKETS_RECEIVED_TOTAL,
CONNECTION_BYTES_RECEIVED_SPEECH,
CONNECTION_BYTES_RECEIVED_KEEPALIVE,
CONNECTION_BYTES_RECEIVED_CONTROL,
CONNECTION_BYTES_RECEIVED_TOTAL,
CONNECTION_PACKETLOSS_SPEECH,
CONNECTION_PACKETLOSS_KEEPALIVE,
CONNECTION_PACKETLOSS_CONTROL,
CONNECTION_PACKETLOSS_TOTAL, //the probability with which a packet round trip failed because a packet was lost
CONNECTION_SERVER2CLIENT_PACKETLOSS_SPEECH, //the probability with which a speech packet failed from the server to the client
CONNECTION_SERVER2CLIENT_PACKETLOSS_KEEPALIVE,
CONNECTION_SERVER2CLIENT_PACKETLOSS_CONTROL,
CONNECTION_SERVER2CLIENT_PACKETLOSS_TOTAL,
CONNECTION_CLIENT2SERVER_PACKETLOSS_SPEECH,
CONNECTION_CLIENT2SERVER_PACKETLOSS_KEEPALIVE,
CONNECTION_CLIENT2SERVER_PACKETLOSS_CONTROL,
CONNECTION_CLIENT2SERVER_PACKETLOSS_TOTAL,
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_SPEECH, //howmany bytes of speech packets we sent during the last second
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_KEEPALIVE,
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_CONTROL,
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_TOTAL,
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_SPEECH, //howmany bytes/s of speech packets we sent in average during the last minute
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_KEEPALIVE,
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_CONTROL,
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_TOTAL,
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_SPEECH,
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_KEEPALIVE,
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_CONTROL,
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_TOTAL,
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_SPEECH,
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_KEEPALIVE,
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_CONTROL,
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_TOTAL,
CONNECTION_ENDMARKER,
CONNECTION_PING = 0, ///< UInt64. Round trip latency for the connection based on the last 5 seconds. On the server
///< this is the average across all connected clients for the last 5 seconds.
CONNECTION_PING_DEVIATION, ///< Double. Standard deviation for the round trip latency in \ref CONNECTION_PING
CONNECTION_CONNECTED_TIME, ///< UInt64. Seconds the client has been connected.
CONNECTION_IDLE_TIME, ///< UInt64. Time in seconds since the last activity (voice transmission, switching channels,
///< changing mic / speaker mute status) of the client.
CONNECTION_CLIENT_IP, ///< String. IP of this client (as seen from the server side)
CONNECTION_CLIENT_PORT, ///< UInt64. Client side port of this client (as seen from the server side)
CONNECTION_SERVER_IP, ///< String. The IP or hostname used to connect to the server. Only available on yourself.
CONNECTION_SERVER_PORT, ///< UInt64. The server port connected to. Only available on yourself.
CONNECTION_PACKETS_SENT_SPEECH, ///< UInt64. The number of voice packets transmitted by the client.
CONNECTION_PACKETS_SENT_KEEPALIVE, ///< UInt64. The number of keep alive packets transmitted by the client.
CONNECTION_PACKETS_SENT_CONTROL, ///< UInt64. The number of command & control packets transmitted by the client.
CONNECTION_PACKETS_SENT_TOTAL, ///< UInt64. Total number of packets transmitted by the client. Equal to the sum of
///< \ref CONNECTION_PACKETS_SENT_SPEECH, \ref CONNECTION_PACKETS_SENT_KEEPALIVE and
///< \ref CONNECTION_PACKETS_SENT_CONTROL
CONNECTION_BYTES_SENT_SPEECH, ///< UInt64. Outgoing traffic used for voice data by the client.
CONNECTION_BYTES_SENT_KEEPALIVE, ///< UInt64. Outgoing traffic used for keeping the connection alive by the client.
CONNECTION_BYTES_SENT_CONTROL, ///< UInt64. Outgoing traffic used for command & control data by the client.
CONNECTION_BYTES_SENT_TOTAL, ///< UInt64. Total outgoing traffic to the server by this client. Equal to the sum of
///< \ref CONNECTION_BYTES_SENT_SPEECH, \ref CONNECTION_BYTES_SENT_KEEPALIVE and \ref
///< CONNECTION_BYTES_SENT_CONTROL
CONNECTION_PACKETS_RECEIVED_SPEECH, ///< UInt64. Number of voice packets received by the client.
CONNECTION_PACKETS_RECEIVED_KEEPALIVE, ///< UInt64. Number of keep alive packets received by the client.
CONNECTION_PACKETS_RECEIVED_CONTROL, ///< UInt64. Number of command & control packets received by the client.
CONNECTION_PACKETS_RECEIVED_TOTAL, ///< UInt64. Total number of packets received by the client. Equal to the sum of
///< \ref CONNECTION_PACKETS_RECEIVED_SPEECH, \ref
///< CONNECTION_PACKETS_RECEIVED_KEEPALIVE and \ref
///< CONNECTION_PACKETS_RECEIVED_CONTROL
CONNECTION_BYTES_RECEIVED_SPEECH, ///< UInt64. Incoming traffic used by the client for voice data.
CONNECTION_BYTES_RECEIVED_KEEPALIVE, ///< UInt64. Incoming traffic used by the client to keep the connection alive.
CONNECTION_BYTES_RECEIVED_CONTROL, ///< UInt64. Incoming traffic used by the client for command & control data.
CONNECTION_BYTES_RECEIVED_TOTAL, ///< UInt64. Total incoming traffic used by the client. Equal to the sum of \ref
///< CONNECTION_BYTES_RECEIVED_SPEECH, \ref CONNECTION_BYTES_RECEIVED_KEEPALIVE and
///< \ref CONNECTION_BYTES_RECEIVED_CONTROL
CONNECTION_PACKETLOSS_SPEECH, ///< Double. Percentage points of voice packets for the client that did not arrive at
///< the client or server averaged across the last 5 seconds.
CONNECTION_PACKETLOSS_KEEPALIVE, ///< Double. Percentage points of keep alive packets for the client that did not
///< arrive at the client or server averaged across the last 5 seconds.
CONNECTION_PACKETLOSS_CONTROL, ///< Double. Percentage points of command & control packets for the client that did
///< not arrive at the client or server averaged across the last 5 seconds.
CONNECTION_PACKETLOSS_TOTAL, ///< Double. Cumulative chance in percentage points with which a packet round trip
///< failed because a packet was lost
CONNECTION_SERVER2CLIENT_PACKETLOSS_SPEECH, ///< Double. Probability with which a voice packet sent by the server
///< was not received by the client.
CONNECTION_SERVER2CLIENT_PACKETLOSS_KEEPALIVE, ///< Double. Probability with which a keepalive packet sent by the
///< server was not received by the client.
CONNECTION_SERVER2CLIENT_PACKETLOSS_CONTROL, ///< Double. Probability with which a control packet sent by the server
///< was not received by the client.
CONNECTION_SERVER2CLIENT_PACKETLOSS_TOTAL, ///< Double. Probability with which a packet sent by the server was not
///< received by the client.
CONNECTION_CLIENT2SERVER_PACKETLOSS_SPEECH, ///< Double. Probability with which a speech packet sent by the client
///< was not received by the server.
CONNECTION_CLIENT2SERVER_PACKETLOSS_KEEPALIVE, ///< Double. Probability with which a keepalive packet sent by the
///< client was not received by the server.
CONNECTION_CLIENT2SERVER_PACKETLOSS_CONTROL, ///< Double. Probability with which a control packet sent by the client
///< was not received by the server.
CONNECTION_CLIENT2SERVER_PACKETLOSS_TOTAL, ///< Double. Probability with which a packet sent by the client was not
///< received by the server.
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_SPEECH, ///< UInt64. Number of bytes sent for speech data in the last second.
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_KEEPALIVE, ///< UInt64. Number of bytes sent for keepalive data in the last second.
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_CONTROL, ///< UInt64. Number of bytes sent for control data in the last second.
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_TOTAL, ///< UInt64. Number of bytes sent in the last second.
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_SPEECH, ///< UInt64. Bytes per second sent for speech data, averaged over the
///< last minute.
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_KEEPALIVE, ///< UInt64. Bytes per second sent for keepalive data, averaged
///< over the last minute.
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_CONTROL, ///< UInt64. Bytes per second sent for control data, averaged over
///< the last minute.
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_TOTAL, ///< UInt64. Bytes per second sent, averaged over the last minute.
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_SPEECH, ///< UInt64. Number of bytes received for speech data in the last second.
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_KEEPALIVE, ///< UInt64. Number of bytes received for keepalive data in the
///< last second.
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_CONTROL, ///< UInt64. Number of bytes received for control data in the
///< last second.
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_TOTAL, ///< UInt64. Number of bytes received in the last second.
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_SPEECH, ///< UInt64. Bytes per second received for speech data, averaged
///< over the last minute.
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_KEEPALIVE, ///< UInt64. Bytes per second received for keepalive data,
///< averaged over the last minute.
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_CONTROL, ///< UInt64. Bytes per second received for control data, averaged
///< over the last minute.
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_TOTAL, ///< UInt64. Bytes per second received, averaged over the last minute.
CONNECTION_DUMMY_0,
CONNECTION_DUMMY_1,
CONNECTION_DUMMY_2,
CONNECTION_DUMMY_3,
CONNECTION_DUMMY_4,
CONNECTION_DUMMY_5,
CONNECTION_DUMMY_6,
CONNECTION_DUMMY_7,
CONNECTION_DUMMY_8,
CONNECTION_DUMMY_9,
CONNECTION_FILETRANSFER_BANDWIDTH_SENT, ///< UInt64. Current file transfer upstream activity in bytes per second.
///< Only available on request (\ref ts3client_requestServerConnectionInfo).
CONNECTION_FILETRANSFER_BANDWIDTH_RECEIVED, ///< UInt64. Current file transfer downstream activity in bytes per
///< second. Only available on request (\ref
///< ts3client_requestServerConnectionInfo).
CONNECTION_FILETRANSFER_BYTES_RECEIVED_TOTAL, ///< UInt64. Total downstream traffic, in bytes, used for file
///< transfer since the server was started. Only available on request
///< (\ref ts3client_requestServerConnectionInfo).
CONNECTION_FILETRANSFER_BYTES_SENT_TOTAL, ///< UInt64. Total upstream traffic, in bytes, used for file transfer
///< since the server was started. Only available on request (\ref
///< ts3client_requestServerConnectionInfo).
CONNECTION_ENDMARKER
};
/**
* Describes a client position in 3 dimensional space, used for 3D Sound.
*/
typedef struct {
float x; /* X co-ordinate in 3D space. */
float y; /* Y co-ordinate in 3D space. */
float z; /* Z co-ordinate in 3D space. */
float x; ///< X co-ordinate in 3D space.
float y; ///< Y co-ordinate in 3D space.
float z; ///< Z co-ordinate in 3D space.
} TS3_VECTOR;
enum GroupWhisperType {
GROUPWHISPERTYPE_SERVERGROUP = 0,
GROUPWHISPERTYPE_CHANNELGROUP = 1,
GROUPWHISPERTYPE_CHANNELCOMMANDER = 2,
GROUPWHISPERTYPE_ALLCLIENTS = 3,
GROUPWHISPERTYPE_SERVERGROUP = 0, ///< Whisper list consists of server groups
GROUPWHISPERTYPE_CHANNELGROUP = 1, ///< Whisper list consists of channel groups
GROUPWHISPERTYPE_CHANNELCOMMANDER = 2, ///< whisper to channel commanders
GROUPWHISPERTYPE_ALLCLIENTS = 3, ///< whisper to all clients
GROUPWHISPERTYPE_ENDMARKER,
};
enum GroupWhisperTargetMode {
GROUPWHISPERTARGETMODE_ALL = 0,
GROUPWHISPERTARGETMODE_CURRENTCHANNEL = 1,
GROUPWHISPERTARGETMODE_PARENTCHANNEL = 2,
GROUPWHISPERTARGETMODE_ALLPARENTCHANNELS = 3,
GROUPWHISPERTARGETMODE_CHANNELFAMILY = 4,
GROUPWHISPERTARGETMODE_ANCESTORCHANNELFAMILY = 5,
GROUPWHISPERTARGETMODE_SUBCHANNELS = 6,
GROUPWHISPERTARGETMODE_CURRENTCHANNEL = 1, ///< Whisper the current channel of the client
GROUPWHISPERTARGETMODE_PARENTCHANNEL = 2, ///< Whisper the parent channel of whatever channel the client is currently in
GROUPWHISPERTARGETMODE_ALLPARENTCHANNELS = 3, ///< Whipser to the parent channel and all their parent channels as well
GROUPWHISPERTARGETMODE_CHANNELFAMILY = 4, ///< Whisper to the current channel and all its sub channels
GROUPWHISPERTARGETMODE_ANCESTORCHANNELFAMILY = 5, ///< Whisper to the current channel, all its parent and sub channels.
GROUPWHISPERTARGETMODE_SUBCHANNELS = 6, ///< Whisper to all sub channels of the current channel of the client
GROUPWHISPERTARGETMODE_ENDMARKER,
};
enum MonoSoundDestination {
MONO_SOUND_DESTINATION_ALL =0, /* Send mono sound to all available speakers */
MONO_SOUND_DESTINATION_FRONT_CENTER =1, /* Send mono sound to front center speaker if available */
MONO_SOUND_DESTINATION_FRONT_LEFT_AND_RIGHT =2 /* Send mono sound to front left/right speakers if available */
MONO_SOUND_DESTINATION_ALL = 0, ///< Send mono sound to all available speakers
MONO_SOUND_DESTINATION_FRONT_CENTER = 1, ///< Send mono sound to front center speaker if available
MONO_SOUND_DESTINATION_FRONT_LEFT_AND_RIGHT = 2 ///< Send mono sound to front left/right speakers if available
};
enum SecuritySaltOptions {
SECURITY_SALT_CHECK_NICKNAME = 1, /* put nickname into security hash */
SECURITY_SALT_CHECK_META_DATA = 2 /* put (game)meta data into security hash */
SECURITY_SALT_CHECK_NICKNAME = 1, ///< put nickname into security hash
SECURITY_SALT_CHECK_META_DATA = 2 ///< put meta data into security hash
};
/*this enum is used to disable client commands on the server*/
enum ClientCommand {
CLIENT_COMMAND_requestConnectionInfo = 0,
CLIENT_COMMAND_requestClientMove = 1,
CLIENT_COMMAND_requestXXMuteClients = 2,
CLIENT_COMMAND_requestClientKickFromXXX = 3,
CLIENT_COMMAND_flushChannelCreation = 4,
CLIENT_COMMAND_flushChannelUpdates = 5,
CLIENT_COMMAND_requestChannelMove = 6,
CLIENT_COMMAND_requestChannelDelete = 7,
CLIENT_COMMAND_requestChannelDescription = 8,
CLIENT_COMMAND_requestChannelXXSubscribeXXX = 9,
CLIENT_COMMAND_requestServerConnectionInfo = 10,
CLIENT_COMMAND_requestSendXXXTextMsg = 11,
CLIENT_COMMAND_filetransfers = 12,
CLIENT_COMMAND_requestConnectionInfo = 0, ///< disable client connection info request (client bandwidth usage, ip,
///< port, ping)
CLIENT_COMMAND_requestClientMove = 1, ///< disable moving clients
CLIENT_COMMAND_requestXXMuteClients = 2, ///< disable muting other clients
CLIENT_COMMAND_requestClientKickFromXXX = 3, ///< disable kicking clients
CLIENT_COMMAND_flushChannelCreation = 4, ///< disable creating channels
CLIENT_COMMAND_flushChannelUpdates = 5, ///< disable editing channels
CLIENT_COMMAND_requestChannelMove = 6, ///< disable moving channels
CLIENT_COMMAND_requestChannelDelete = 7, ///< disable deleting channels
CLIENT_COMMAND_requestChannelDescription = 8, ///< disable channel descriptions
CLIENT_COMMAND_requestChannelXXSubscribeXXX = 9, ///< disable being able to see clients in channels other than the
///< current channel the client is in
CLIENT_COMMAND_requestServerConnectionInfo = 10, ///< disable server connection info request (server bandwidth
///< usage, ip, port, ping)
CLIENT_COMMAND_requestSendXXXTextMsg = 11, ///< disable text messaging
CLIENT_COMMAND_filetransfers = 12, ///< disable file transfer
CLIENT_COMMAND_ENDMARKER
};
/* Access Control List*/
enum ACLType{
ACL_NONE = 0,
ACL_WHITE_LIST = 1,
ACL_BLACK_LIST = 2
};
enum ACLType { ACL_NONE = 0, ACL_WHITE_LIST = 1, ACL_BLACK_LIST = 2 };
/* file transfer actions*/
enum FTAction {
FT_INIT_SERVER = 0,
FT_INIT_CHANNEL = 1,
FT_UPLOAD = 2,
FT_DOWNLOAD = 3,
FT_DELETE = 4,
FT_CREATEDIR = 5,
FT_RENAME = 6,
FT_FILELIST = 7,
FT_FILEINFO = 8
FT_INIT_SERVER = 0, ///< 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.
FT_INIT_CHANNEL = 1, ///< 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.
FT_UPLOAD = 2, ///< A file is being uploaded. All values in the result struct can be modified.
FT_DOWNLOAD = 3, ///< A file is being downloaded. All values in the result struct can be modified.
FT_DELETE = 4, ///< A file is being deleted. All values in the result struct can be modified.
FT_CREATEDIR = 5, ///< A directory is being created in a channel. All values in the result struct can be modified.
FT_RENAME = 6, ///< 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.
FT_FILELIST = 7, ///< A directory listing is requested. All values in the result struct can be modified.
FT_FILEINFO = 8 ///< Information of a file is requested. All values in the result struct can be modified.
};
/* file transfer status */
enum FileTransferState {
FILETRANSFER_INITIALISING = 0,
FILETRANSFER_ACTIVE,
FILETRANSFER_FINISHED,
FILETRANSFER_INITIALISING = 0, ///< File transfer is establishing connection.
FILETRANSFER_ACTIVE, ///< File transfer is in progress
FILETRANSFER_FINISHED, ///< File transfer has finished
};
/* file transfer types */
enum {
FileListType_Directory = 0,
FileListType_File,
enum FileTransferType {
FileListType_Directory = 0, ///< The file entry is a directory
FileListType_File, ///< The file entry is a regular file
};
/* some structs to handle variables in callbacks */
#define MAX_VARIABLES_EXPORT_COUNT 64
struct VariablesExportItem {
unsigned char itemIsValid; /* This item has valid values. ignore this item if 0 */
unsigned char proposedIsSet; /* The value in proposed is set. if 0 ignore proposed */
const char* current; /* current value (stored in memory) */
const char* proposed; /* New value to change to (const, so no updates please) */
unsigned char itemIsValid; ///< Whether or not there is any data in this item. Ignore this item if this is 0.
unsigned char proposedIsSet; ///< The value in proposed is set. If 0 ignore proposed
const char* current; ///< current value (stored in memory)
const char* proposed; ///< New value to change to (const, so no updates please)
};
struct VariablesExport {
@@ -328,41 +496,61 @@ struct VariablesExport{
};
struct ClientMiniExport {
anyID ID;
uint64 channel;
const char* ident;
const char* nickname;
anyID ID; ///< id of the client
uint64 channel; ///< the channel the client is in
const char* ident; ///< client public identity
const char* nickname; ///< client display name
};
/**
* Structure used to describe a file transfer in the \ref ServerLibFunctions.onTransformFilePath callback.
* This describes the original values, and also contains hints for length limitations of the result parameter
* of the callback.
* \verbatim embed:rst
.. important::
Which values of the struct can be modified is defined by the action value of the original parameter.
\endverbatim
*/
struct TransformFilePathExport {
uint64 channel;
const char* filename;
int action;
int transformedFileNameMaxSize;
int channelPathMaxSize;
uint64 channel; ///< The channel id of the file. 0 if action is \ref FT_INIT_SERVER
const char* filename; ///< utf8 encoded c string containing the original file name as intended by the client.
int action; ///< The action to be performed. One of the values from the \ref FTAction enum. Defines which values of
///< the result struct can be modified.
int transformedFileNameMaxSize; ///< The maximum length the file name can be rewritten to.
int channelPathMaxSize; ///< The maximum length the path can be rewritten to.
};
/**
* Structure to rewrite the file transfer file name and path in the \ref ServerLibFunctions.onTransformFilePath callback.
* The lengths are limited as described in the original parameter.
* \verbatim embed:rst
.. important::
Which values of the struct can be modified is defined by the action value of the original parameter.
\endverbatim
*/
struct TransformFilePathExportReturns {
char* transformedFileName;
char* channelPath;
int logFileAction;
char* transformedFileName; ///< 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.
char* channelPath; ///< 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.
int logFileAction; ///< 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.
};
struct FileTransferCallbackExport {
anyID clientID;
anyID transferID;
anyID remoteTransferID;
unsigned int status;
const char* statusMessage;
uint64 remotefileSize;
uint64 bytes;
int isSender;
anyID clientID; ///< the client who started the file transfer
anyID transferID; ///< local identifier of the transfer that has completed
anyID remoteTransferID; ///< remote identifier of the transfer that has completed
unsigned int status; ///< status of the transfer. One of the values from the \ref FileTransferState enum
const char* statusMessage; ///< utf8 encoded c string containing a human readable description of the status
uint64 remotefileSize; ///< size in bytes of the complete file to be transferred
uint64 bytes; ///< number of bytes transferred. Same as remotefileSize when the transfer completed entirely.
int isSender; ///< boolean. 1 if the server is sending the file. 0 if the server is receiving the file.
};
/*define for file transfer bandwith limits*/
#define BANDWIDTH_LIMIT_UNLIMITED 0xFFFFFFFFFFFFFFFFll
/*defines for speaker locations used by some sound callbacks*/
#ifndef SPEAKER_FRONT_LEFT
#define SPEAKER_FRONT_LEFT 0x1

View File

@@ -5,170 +5,175 @@
enum Ts3ErrorType {
//general
ERROR_ok = 0x0000,
ERROR_ok = 0x0000, ///< Indicates success.
ERROR_undefined = 0x0001,
ERROR_not_implemented = 0x0002,
ERROR_ok_no_update = 0x0003,
ERROR_not_implemented = 0x0002, ///< The attempted operation is not available in this context
ERROR_ok_no_update = 0x0003, ///< Indicates success, but no change occurred. Returned for example upon flushing (e.g. using \ref ts3client_flushChannelUpdates) when all indicated changes already matched the current state.
ERROR_dont_notify = 0x0004,
ERROR_lib_time_limit_reached = 0x0005,
ERROR_out_of_memory = 0x0006,
ERROR_out_of_memory = 0x0006, ///< Not enough system memory to perform operation
ERROR_canceled = 0x0007,
//dunno
ERROR_command_not_found = 0x0100,
ERROR_unable_to_bind_network_port = 0x0101,
ERROR_no_network_port_available = 0x0102,
ERROR_port_already_in_use = 0x0103,
ERROR_unable_to_bind_network_port = 0x0101, ///< Unspecified failure to create a listening port
ERROR_no_network_port_available = 0x0102, ///< Failure to initialize a listening port for FileTransfer
ERROR_port_already_in_use = 0x0103, ///< Specified port is already in use by a different application
//client
ERROR_client_invalid_id = 0x0200,
ERROR_client_nickname_inuse = 0x0201,
ERROR_client_protocol_limit_reached = 0x0203,
ERROR_client_invalid_type = 0x0204,
ERROR_client_already_subscribed = 0x0205,
ERROR_client_invalid_id = 0x0200, ///< Client no longer connected
ERROR_client_nickname_inuse = 0x0201, ///< Client name is already in use. Client names must be unique
ERROR_client_protocol_limit_reached = 0x0203, ///< Too many clients on the server
ERROR_client_invalid_type = 0x0204, ///< Function called for normal clients that is only available for query clients or vice versa
ERROR_client_already_subscribed = 0x0205, ///< Attempting to subscribe to a channel already subscribed to
ERROR_client_not_logged_in = 0x0206,
ERROR_client_could_not_validate_identity = 0x0207,
ERROR_client_version_outdated = 0x020a,
ERROR_client_is_flooding = 0x020c,
ERROR_client_could_not_validate_identity = 0x0207, ///< Identity not valid or insufficient security level
ERROR_client_invalid_password = 0x0208,
ERROR_client_version_outdated = 0x020a, ///< Server requires newer client version as determined by the min_client_version properties
ERROR_client_is_flooding = 0x020c, ///< Triggered flood protection. Further information is supplied in the extra message if applicable.
ERROR_client_hacked = 0x020d,
ERROR_client_cannot_verify_now = 0x020e,
ERROR_client_login_not_permitted = 0x020f,
ERROR_client_not_subscribed = 0x0210,
ERROR_client_not_subscribed = 0x0210, ///< Action is only available on subscribed channels
//channel
ERROR_channel_invalid_id = 0x0300,
ERROR_channel_protocol_limit_reached = 0x0301,
ERROR_channel_already_in = 0x0302,
ERROR_channel_name_inuse = 0x0303,
ERROR_channel_not_empty = 0x0304,
ERROR_channel_can_not_delete_default = 0x0305,
ERROR_channel_default_require_permanent = 0x0306,
ERROR_channel_invalid_flags = 0x0307,
ERROR_channel_parent_not_permanent = 0x0308,
ERROR_channel_maxclients_reached = 0x0309,
ERROR_channel_maxfamily_reached = 0x030a,
ERROR_channel_invalid_order = 0x030b,
ERROR_channel_no_filetransfer_supported = 0x030c,
ERROR_channel_invalid_password = 0x030d,
ERROR_channel_invalid_security_hash = 0x030f, //note 0x030e is defined in public_rare_errors;
ERROR_channel_invalid_id = 0x0300, ///< Channel does not exist on the server (any longer)
ERROR_channel_protocol_limit_reached = 0x0301, ///< Too many channels on the server
ERROR_channel_already_in = 0x0302, ///< Attempting to move a client or channel to its current channel
ERROR_channel_name_inuse = 0x0303, ///< Channel name is already taken by another channel. Channel names must be unique
ERROR_channel_not_empty = 0x0304, ///< Attempting to delete a channel with clients or sub channels in it
ERROR_channel_can_not_delete_default = 0x0305, ///< Default channel cannot be deleted. Set a new default channel first (see \ref ts3client_setChannelVariableAsInt or \ref ts3server_setChannelVariableAsInt )
ERROR_channel_default_require_permanent = 0x0306, ///< Attempt to set a non permanent channel as default channel. Set channel to permanent first (see \ref ts3client_setChannelVariableAsInt or \ref ts3server_setChannelVariableAsInt )
ERROR_channel_invalid_flags = 0x0307, ///< Invalid combination of \ref ChannelProperties, trying to remove \ref CHANNEL_FLAG_DEFAULT or set a password on the default channel
ERROR_channel_parent_not_permanent = 0x0308, ///< 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
ERROR_channel_maxclients_reached = 0x0309, ///< Channel is full as determined by its \ref CHANNEL_MAXCLIENTS setting
ERROR_channel_maxfamily_reached = 0x030a, ///< Channel tree is full as determined by its \ref CHANNEL_MAXFAMILYCLIENTS setting
ERROR_channel_invalid_order = 0x030b, ///< Invalid value for the \ref CHANNEL_ORDER property. The specified channel must exist on the server and be on the same level.
ERROR_channel_no_filetransfer_supported = 0x030c, ///< Invalid \ref CHANNEL_FILEPATH set for the channel
ERROR_channel_invalid_password = 0x030d, ///< Channel has a password not matching the password supplied in the call
// used in public_rare_errors = 0x030e,
ERROR_channel_invalid_security_hash = 0x030f,
//server
ERROR_server_invalid_id = 0x0400,
ERROR_server_running = 0x0401,
ERROR_server_is_shutting_down = 0x0402,
ERROR_server_maxclients_reached = 0x0403,
ERROR_server_invalid_password = 0x0404,
ERROR_server_is_virtual = 0x0407,
ERROR_server_is_not_running = 0x0409,
ERROR_server_is_booting = 0x040a,
ERROR_server_invalid_id = 0x0400, ///< Chosen virtual server does not exist or is offline
ERROR_server_running = 0x0401, ///< attempting to delete a server that is running. Stop the server before deleting it.
ERROR_server_is_shutting_down = 0x0402, ///< Client disconnected because the server is going offline
ERROR_server_maxclients_reached = 0x0403, ///< Given in the onConnectStatusChange event when the server has reached its maximum number of clients as defined by the \ref VIRTUALSERVER_MAXCLIENTS property
ERROR_server_invalid_password = 0x0404, ///< Specified server password is wrong. Provide the correct password in the \ref ts3client_startConnection / \ref ts3client_startConnectionWithChannelID call.
ERROR_server_is_virtual = 0x0407, ///< Server is in virtual status. The attempted action is not possible in this state. Start the virtual server first.
ERROR_server_is_not_running = 0x0409, ///< Attempting to stop a server that is not online.
ERROR_server_is_booting = 0x040a, // Not used
ERROR_server_status_invalid = 0x040b,
ERROR_server_version_outdated = 0x040d,
ERROR_server_duplicate_running = 0x040e,
ERROR_server_version_outdated = 0x040d, ///< Attempt to connect to an outdated server version. The server needs to be updated.
ERROR_server_duplicate_running = 0x040e, ///< This server is already running within the instance. Each virtual server may only exist once.
//parameter
ERROR_parameter_quote = 0x0600,
ERROR_parameter_invalid_count = 0x0601,
ERROR_parameter_invalid = 0x0602,
ERROR_parameter_not_found = 0x0603,
ERROR_parameter_convert = 0x0604,
ERROR_parameter_invalid_size = 0x0605,
ERROR_parameter_missing = 0x0606,
ERROR_parameter_checksum = 0x0607,
ERROR_parameter_quote = 0x0600, // Not used
ERROR_parameter_invalid_count = 0x0601, ///< Attempt to flush changes without previously calling set*VariableAs* since the last flush
ERROR_parameter_invalid = 0x0602, ///< At least one of the supplied parameters did not meet the criteria for that parameter
ERROR_parameter_not_found = 0x0603, ///< Failure to supply all the necessary parameters
ERROR_parameter_convert = 0x0604, ///< Invalid type supplied for a parameter, such as passing a string (ie. "five") that expects a number.
ERROR_parameter_invalid_size = 0x0605, ///< Value out of allowed range. Such as strings are too long/short or numeric values outside allowed range
ERROR_parameter_missing = 0x0606, ///< Neglecting to specify a required parameter
ERROR_parameter_checksum = 0x0607, ///< Attempting to deploy a modified snapshot
//unsorted, need further investigation
ERROR_vs_critical = 0x0700,
ERROR_connection_lost = 0x0701,
ERROR_not_connected = 0x0702,
ERROR_no_cached_connection_info = 0x0703,
ERROR_currently_not_possible = 0x0704,
ERROR_failed_connection_initialisation = 0x0705,
ERROR_could_not_resolve_hostname = 0x0706,
ERROR_invalid_server_connection_handler_id = 0x0707,
ERROR_could_not_initialise_input_manager = 0x0708,
ERROR_clientlibrary_not_initialised = 0x0709,
ERROR_serverlibrary_not_initialised = 0x070a,
ERROR_whisper_too_many_targets = 0x070b,
ERROR_whisper_no_targets = 0x070c,
ERROR_connection_ip_protocol_missing = 0x070d,
//reserved = 0x070e,
ERROR_vs_critical = 0x0700, ///< Failure to create default channel
ERROR_connection_lost = 0x0701, ///< Generic error with the connection.
ERROR_not_connected = 0x0702, ///< 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
ERROR_no_cached_connection_info = 0x0703, ///< Attempting to query connection information (bandwidth usage, ping, etc) without requesting them first using \ref ts3client_requestConnectionInfo
ERROR_currently_not_possible = 0x0704, ///< Requested information is not currently available. You may have to call \ref ts3client_requestClientVariables or \ref ts3client_requestServerVariables
ERROR_failed_connection_initialisation = 0x0705, ///< No TeamSpeak server running on the specified IP address and port
ERROR_could_not_resolve_hostname = 0x0706, ///< Failure to resolve the specified hostname to an IP address
ERROR_invalid_server_connection_handler_id = 0x0707, ///< Attempting to perform actions on a non-existent server connection handler
ERROR_could_not_initialise_input_manager = 0x0708, // Not used
ERROR_clientlibrary_not_initialised = 0x0709, ///< Calling client library functions without successfully calling \ref ts3client_initClientLib before
ERROR_serverlibrary_not_initialised = 0x070a, ///< Calling server library functions without successfully calling \ref ts3server_initServerLib before
ERROR_whisper_too_many_targets = 0x070b, ///< Using a whisper list that contain more clients than the servers \ref VIRTUALSERVER_MIN_CLIENTS_IN_CHANNEL_BEFORE_FORCED_SILENCE property
ERROR_whisper_no_targets = 0x070c, ///< The active whisper list is empty or no clients matched the whisper list (e.g. all channels in the list are empty)
ERROR_connection_ip_protocol_missing = 0x070d, ///< Invalid or unsupported protocol (e.g. attempting an IPv6 connection on an IPv4 only machine)
ERROR_handshake_failed = 0x070e,
ERROR_illegal_server_license = 0x070f,
//file transfer
ERROR_file_invalid_name = 0x0800,
ERROR_file_invalid_permissions = 0x0801,
ERROR_file_already_exists = 0x0802,
ERROR_file_not_found = 0x0803,
ERROR_file_io_error = 0x0804,
ERROR_file_invalid_transfer_id = 0x0805,
ERROR_file_invalid_path = 0x0806,
ERROR_file_no_files_available = 0x0807,
ERROR_file_overwrite_excludes_resume = 0x0808,
ERROR_file_invalid_size = 0x0809,
ERROR_file_already_in_use = 0x080a,
ERROR_file_could_not_open_connection = 0x080b,
ERROR_file_no_space_left_on_device = 0x080c,
ERROR_file_exceeds_file_system_maximum_size = 0x080d,
ERROR_file_transfer_connection_timeout = 0x080e,
ERROR_file_connection_lost = 0x080f,
ERROR_file_exceeds_supplied_size = 0x0810,
ERROR_file_transfer_complete = 0x0811,
ERROR_file_transfer_canceled = 0x0812,
ERROR_file_transfer_interrupted = 0x0813,
ERROR_file_transfer_server_quota_exceeded = 0x0814,
ERROR_file_transfer_client_quota_exceeded = 0x0815,
ERROR_file_transfer_reset = 0x0816,
ERROR_file_transfer_limit_reached = 0x0817,
ERROR_file_invalid_name = 0x0800, ///< Invalid UTF8 string or not a valid file
ERROR_file_invalid_permissions = 0x0801, ///< Permissions prevent opening the file
ERROR_file_already_exists = 0x0802, ///< Target path already exists as a directory
ERROR_file_not_found = 0x0803, ///< Attempt to access or move non existing file
ERROR_file_io_error = 0x0804, ///< Generic file input / output error
ERROR_file_invalid_transfer_id = 0x0805, ///< 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
ERROR_file_invalid_path = 0x0806, ///< specified path contains invalid characters or does not start with "/"
ERROR_file_no_files_available = 0x0807, // Not used
ERROR_file_overwrite_excludes_resume = 0x0808, ///< File overwrite and resume are mutually exclusive. Only one or neither can be 1.
ERROR_file_invalid_size = 0x0809, ///< Attempt to write more bytes than claimed file size.
ERROR_file_already_in_use = 0x080a, ///< File is currently not available, try again later.
ERROR_file_could_not_open_connection = 0x080b, ///< Generic failure in file transfer connection / other party did not conform to file transfer protocol
ERROR_file_no_space_left_on_device = 0x080c, ///< Operating system reports hard disk is full. May be caused by quota limitations.
ERROR_file_exceeds_file_system_maximum_size = 0x080d, ///< File is too large for the file system of the target device.
ERROR_file_transfer_connection_timeout = 0x080e, // Not used
ERROR_file_connection_lost = 0x080f, ///< File input / output timeout or connection failure
ERROR_file_exceeds_supplied_size = 0x0810, // Not used
ERROR_file_transfer_complete = 0x0811, ///< Indicates successful completion
ERROR_file_transfer_canceled = 0x0812, ///< Transfer was cancelled through @ref ts3client_haltTransfer
ERROR_file_transfer_interrupted = 0x0813, ///< Transfer failed because the server is shutting down, or network connection issues
ERROR_file_transfer_server_quota_exceeded = 0x0814, ///< Transfer terminated due to server bandwidth quota being exceeded. No client can transfer files.
ERROR_file_transfer_client_quota_exceeded = 0x0815, ///< Attempt to transfer more data than allowed by this clients' bandwidth quota. Other clients may continue to transfer files.
ERROR_file_transfer_reset = 0x0816, // Not used
ERROR_file_transfer_limit_reached = 0x0817, ///< Too many file transfers are in progress. Try again later
ERROR_file_invalid_storage_class = 0x0818, // TODO: Invalid storage class for HTTP FileTransfer (what is a storage class?)
ERROR_file_invalid_dimension = 0x0819, ///< Avatar image exceeds maximum width or height accepted by the server.
ERROR_file_transfer_channel_quota_exceeded = 0x081a, ///< Transfer failed because the channel quota was exceeded. Uploading to this channel is not possible, but other channels may be fine.
//sound
ERROR_sound_preprocessor_disabled = 0x0900,
ERROR_sound_preprocessor_disabled = 0x0900, ///< Cannot set or query pre processor variables with preprocessing disabled
ERROR_sound_internal_preprocessor = 0x0901,
ERROR_sound_internal_encoder = 0x0902,
ERROR_sound_internal_playback = 0x0903,
ERROR_sound_no_capture_device_available = 0x0904,
ERROR_sound_no_playback_device_available = 0x0905,
ERROR_sound_could_not_open_capture_device = 0x0906,
ERROR_sound_could_not_open_playback_device = 0x0907,
ERROR_sound_handler_has_device = 0x0908,
ERROR_sound_invalid_capture_device = 0x0909,
ERROR_sound_invalid_playback_device = 0x090a,
ERROR_sound_invalid_wave = 0x090b,
ERROR_sound_unsupported_wave = 0x090c,
ERROR_sound_open_wave = 0x090d,
ERROR_sound_no_capture_device_available = 0x0904, ///< No audio capture devices are available
ERROR_sound_no_playback_device_available = 0x0905, ///< No audio playback devices are available
ERROR_sound_could_not_open_capture_device = 0x0906, ///< Error accessing audio device, or audio device does not support the requested mode
ERROR_sound_could_not_open_playback_device = 0x0907, ///< Error accessing audio device, or audio device does not support the requested mode
ERROR_sound_handler_has_device = 0x0908, ///< 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
ERROR_sound_invalid_capture_device = 0x0909, ///< Attempt to use a device for capture that does not support capturing audio
ERROR_sound_invalid_playback_device = 0x090a, ///< Attempt to use a device for playback that does not support playback of audio
ERROR_sound_invalid_wave = 0x090b, ///< Attempt to use a non WAV file in \ref ts3client_playWaveFile or \ref ts3client_playWaveFileHandle
ERROR_sound_unsupported_wave = 0x090c, ///< Unsupported wave file used in \ref ts3client_playWaveFile or \ref ts3client_playWaveFileHandle.
ERROR_sound_open_wave = 0x090d, ///< Failure to open the specified sound file
ERROR_sound_internal_capture = 0x090e,
ERROR_sound_device_in_use = 0x090f,
ERROR_sound_device_already_registerred = 0x0910,
ERROR_sound_unknown_device = 0x0911,
ERROR_sound_device_in_use = 0x090f, ///< Attempt to unregister a custom device that is being used. Close the device first using \ref ts3client_closeCaptureDevice or \ref ts3client_closePlaybackDevice
ERROR_sound_device_already_registerred = 0x0910, ///< Attempt to register a custom device with a device id that has already been used in a previous call. Device ids must be unique.
ERROR_sound_unknown_device = 0x0911, ///< 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)
ERROR_sound_unsupported_frequency = 0x0912,
ERROR_sound_invalid_channel_count = 0x0913,
ERROR_sound_read_wave = 0x0914,
ERROR_sound_invalid_channel_count = 0x0913, ///< Invalid device audio channel count, must be > 0
ERROR_sound_read_wave = 0x0914, ///< Failure to read sound samples from an opened wave file. Is this a valid wave file?
ERROR_sound_need_more_data = 0x0915, // for internal purposes only
ERROR_sound_device_busy = 0x0916, // for internal purposes only
ERROR_sound_no_data = 0x0917,
ERROR_sound_channel_mask_mismatch = 0x0918,
ERROR_sound_no_data = 0x0917, ///< Indicates there is currently no data for playback, e.g. nobody is speaking right now.
ERROR_sound_channel_mask_mismatch = 0x0918, ///< Opening a device with an unsupported channel count
//permissions
ERROR_permissions_client_insufficient = 0x0a08,
ERROR_permissions = 0x0a0c,
ERROR_permissions_client_insufficient = 0x0a08, ///< Not enough permissions to perform the requested activity
ERROR_permissions = 0x0a0c, ///< Permissions to use sound device not granted by operating system, e.g. Windows denied microphone access.
//accounting
ERROR_accounting_virtualserver_limit_reached = 0x0b00,
ERROR_accounting_slot_limit_reached = 0x0b01,
ERROR_accounting_license_file_not_found = 0x0b02,
ERROR_accounting_license_date_not_ok = 0x0b03,
ERROR_accounting_unable_to_connect_to_server = 0x0b04,
ERROR_accounting_unknown_error = 0x0b05,
ERROR_accounting_server_error = 0x0b06,
ERROR_accounting_instance_limit_reached = 0x0b07,
ERROR_accounting_instance_check_error = 0x0b08,
ERROR_accounting_license_file_invalid = 0x0b09,
ERROR_accounting_running_elsewhere = 0x0b0a,
ERROR_accounting_instance_duplicated = 0x0b0b,
ERROR_accounting_already_started = 0x0b0c,
ERROR_accounting_virtualserver_limit_reached = 0x0b00, ///< Attempt to use more virtual servers than allowed by the license
ERROR_accounting_slot_limit_reached = 0x0b01, ///< Attempt to set more slots than allowed by the license
ERROR_accounting_license_file_not_found = 0x0b02, // Not used
ERROR_accounting_license_date_not_ok = 0x0b03, ///< License expired or not valid yet
ERROR_accounting_unable_to_connect_to_server = 0x0b04, ///< Failure to communicate with accounting backend
ERROR_accounting_unknown_error = 0x0b05, ///< Failure to write update license file
ERROR_accounting_server_error = 0x0b06, // Not used
ERROR_accounting_instance_limit_reached = 0x0b07, ///< More than one process of the server is running
ERROR_accounting_instance_check_error = 0x0b08, ///< Shared memory access failure.
ERROR_accounting_license_file_invalid = 0x0b09, ///< License is not a TeamSpeak license
ERROR_accounting_running_elsewhere = 0x0b0a, ///< A copy of this server is already running in another instance. Each server may only exist once.
ERROR_accounting_instance_duplicated = 0x0b0b, ///< A copy of this server is running already in this process. Each server may only exist once.
ERROR_accounting_already_started = 0x0b0c, ///< Attempt to start a server that is already running
ERROR_accounting_not_started = 0x0b0d,
ERROR_accounting_to_many_starts = 0x0b0e,
ERROR_accounting_to_many_starts = 0x0b0e, ///< Starting instance / virtual servers too often in too short a time period
//provisioning server
/// @cond HAS_PROVISIONING
ERROR_provisioning_invalid_password = 0x1100,
ERROR_provisioning_invalid_request = 0x1101,
ERROR_provisioning_no_slots_available = 0x1102,
@@ -190,5 +195,6 @@ enum Ts3ErrorType {
ERROR_provisioning_invalid_timeout = 0x1118,
ERROR_provisioning_ts3server_not_found = 0x1119,
ERROR_provisioning_no_permission = 0x111A,
/// @endcond
};
#endif

View File

@@ -5,7 +5,6 @@
enum Ts3RareErrorType {
//client
ERROR_client_invalid_password = 0x0208,
ERROR_client_too_many_clones_connected = 0x0209,
ERROR_client_is_online = 0x020b,
@@ -43,6 +42,7 @@ enum Ts3RareErrorType {
ERROR_server_modal_quit = 0x040c,
ERROR_server_time_difference_too_large = 0x040f,
ERROR_server_blacklisted = 0x0410,
ERROR_server_shutdown = 0x0411,
//messages
ERROR_message_invalid_id = 0x0c00,
@@ -69,6 +69,11 @@ enum Ts3RareErrorType {
ERROR_voip_cannot_answer_initiated_call = 0x1006,
ERROR_voip_not_initialized = 0x1007,
//mytsid - client
ERROR_invalid_mytsid_data = 0x1200,
ERROR_invalid_integration = 0x1201,
ERROR_mytsid_needed = 0x1202,
//ed25519
ERROR_ed25519_rng_fail = 0x1300,
ERROR_ed25519_signature_invalid = 0x1301,
@@ -89,9 +94,15 @@ enum Ts3RareErrorType {
ERROR_ed25519_index_out_of_range = 0x1310,
ERROR_ed25519_invalid_size = 0x1311,
//mytsid - client
ERROR_invalid_mytsid_data = 0x1200,
ERROR_invalid_integration = 0x1201,
//api key
ERROR_apikey_outofscope = 0x1400,
ERROR_apikey_crypto_error = 0x1401,
ERROR_apikey_invalid = 0x1402,
ERROR_apikey_invalid_id = 0x1403,
ERROR_apikey_missing = 0x1404,
//homebase
ERROR_homebase_no_slots_available = 0x1500,
};
#endif

View File

@@ -16,12 +16,12 @@
#define TS3_MAX_SIZE_POKE_MESSAGE 100
#define TS3_MAX_SIZE_OFFLINE_MESSAGE 4096
#define TS3_MAX_SIZE_OFFLINE_MESSAGE_SUBJECT 200
#define TS3_MAX_SIZE_USER_TAG 100
//limited length, measured in bytes (utf8 encoded)
#define TS3_MAX_SIZE_PLUGIN_COMMAND 1024 * 8
#define TS3_MAX_SIZE_VIRTUALSERVER_HOSTBANNER_GFX_URL 2000
enum GroupShowNameTreeMode {
GroupShowNameTreeMode_NONE = 0, //dont group show name
GroupShowNameTreeMode_BEFORE, //show group name before client name
@@ -73,13 +73,14 @@ enum CommandLinePropertiesRare {
COMMANDLINE_VOICE_IP,
COMMANDLINE_THREADS_VOICE_UDP,
COMMANDLINE_LICENSEPATH,
#ifndef SDK
COMMANDLINE_YAMLFILE,
#ifndef TEAMSPEAK_SDK
COMMANDLINE_FILETRANSFER_PORT,
COMMANDLINE_FILETRANSFER_IP,
COMMANDLINE_QUERY_PORT,
COMMANDLINE_QUERY_IP,
COMMANDLINE_QUERY_IP_WHITELIST,
COMMANDLINE_QUERY_IP_BLACKLIST,
COMMANDLINE_QUERY_IP_ALLOWLIST,
COMMANDLINE_QUERY_IP_DENYLIST,
COMMANDLINE_CLEAR_DATABASE,
COMMANDLINE_SERVERADMIN_PASSWORD,
COMMANDLINE_DBPLUGIN,
@@ -98,7 +99,9 @@ enum CommandLinePropertiesRare {
COMMANDLINE_LOGAPPEND,
COMMANDLINE_QUERY_SKIPBRUTEFORCECHECK,
COMMANDLINE_QUERY_BUFFER_MB,
#endif
COMMANDLINE_HTTP_PROXY,
#ifndef TEAMSPEAK_SDK
COMMANDLINE_LICENSE_ACCEPTED,
COMMANDLINE_SERVERQUERYDOCS_PATH,
COMMANDLINE_QUERY_SSH_IP,
@@ -110,7 +113,20 @@ enum CommandLinePropertiesRare {
COMMANDLINE_CRASHDUMPSPATH,
COMMANDLINE_DAEMON,
COMMANDLINE_PID_FILE,
COMMANDLINE_HINTS_ENABLED,
COMMANDLINE_QUERY_HTTP_IP,
COMMANDLINE_QUERY_HTTP_PORT,
COMMANDLINE_QUERY_HTTPS_IP,
COMMANDLINE_QUERY_HTTPS_PORT,
COMMANDLINE_QUERY_HTTPS_CERTIFICATE_FILE,
COMMANDLINE_QUERY_HTTPS_PRIVATE_KEY_FILE,
COMMANDLINE_QUERY_POOL_SIZE,
COMMANDLINE_MMDBPATH,
COMMANDLINE_LOGQUERYTIMINGINTERVAL,
COMMANDLINE_EVENT_TO_DB_LOGGING,
COMMANDLINE_ADMINISTRATIVE_DOMAIN,
#endif
COMMANDLINE_WEBRTC_SERVER_ENABLED,
#else
COMMANDLINE_NOTHING = 0,
#endif
@@ -135,6 +151,7 @@ enum ServerInstancePropertiesRare {
SERVERINSTANCE_PERMISSIONS_VERSION,
SERVERINSTANCE_PENDING_CONNECTIONS_PER_IP,
SERVERINSTANCE_SERVERQUERY_MAX_CONNECTIONS_PER_IP,
SERVERINSTANCE_MAX_HOMEBASES, //How many matrix homebase users this instance can have. -1 for no limit
SERVERINSTANCE_ENDMARKER_RARE,
};
@@ -150,14 +167,14 @@ enum VirtualServerPropertiesRare {
VIRTUALSERVER_KEYPAIR, //internal use
VIRTUALSERVER_HOSTMESSAGE, //available when connected, not updated while connected
VIRTUALSERVER_HOSTMESSAGE_MODE, //available when connected, not updated while connected
VIRTUALSERVER_FILEBASE, //not available to clients, stores the folder used for file transfers
VIRTUALSERVER_DEFAULT_SERVER_GROUP, //the client permissions server group that a new client gets assigned
// VIRTUALSERVER_FILEBASE, // Moved to VirtualServerProperties due to SDK usage
VIRTUALSERVER_DEFAULT_SERVER_GROUP = 25, //the client permissions server group that a new client gets assigned
VIRTUALSERVER_DEFAULT_CHANNEL_GROUP, //the channel permissions group that a new client gets assigned when joining a channel
VIRTUALSERVER_FLAG_PASSWORD, //only available on request (=> requestServerVariables)
VIRTUALSERVER_DEFAULT_CHANNEL_ADMIN_GROUP, //the channel permissions group that a client gets assigned when creating a channel
VIRTUALSERVER_MAX_DOWNLOAD_TOTAL_BANDWIDTH, //only available on request (=> requestServerVariables)
VIRTUALSERVER_MAX_UPLOAD_TOTAL_BANDWIDTH, //only available on request (=> requestServerVariables)
VIRTUALSERVER_HOSTBANNER_URL, //available when connected, always up-to-date
// VIRTUALSERVER_MAX_DOWNLOAD_TOTAL_BANDWIDTH, // Moved to VirtualServerProperties due to SDK usage
// VIRTUALSERVER_MAX_UPLOAD_TOTAL_BANDWIDTH, // Moved to VirtualServerProperties due to SDK usage
VIRTUALSERVER_HOSTBANNER_URL = 31, //available when connected, always up-to-date
VIRTUALSERVER_HOSTBANNER_GFX_URL, //available when connected, always up-to-date
VIRTUALSERVER_HOSTBANNER_GFX_INTERVAL, //available when connected, always up-to-date
VIRTUALSERVER_COMPLAIN_AUTOBAN_COUNT, //only available on request (=> requestServerVariables)
@@ -190,8 +207,8 @@ enum VirtualServerPropertiesRare {
VIRTUALSERVER_LOG_CHANNEL, //only available on request (=> requestServerVariables)
VIRTUALSERVER_LOG_PERMISSIONS, //only available on request (=> requestServerVariables)
VIRTUALSERVER_LOG_SERVER, //only available on request (=> requestServerVariables)
VIRTUALSERVER_LOG_FILETRANSFER, //only available on request (=> requestServerVariables)
VIRTUALSERVER_MIN_CLIENT_VERSION, //only available on request (=> requestServerVariables)
// VIRTUALSERVER_LOG_FILETRANSFER, // Moved to VirtualServerProperties due to SDK usage
VIRTUALSERVER_MIN_CLIENT_VERSION = 65, //only available on request (=> requestServerVariables)
VIRTUALSERVER_NAME_PHONETIC, //available when connected, always up-to-date
VIRTUALSERVER_ICON_ID, //available when connected, always up-to-date
VIRTUALSERVER_RESERVED_SLOTS, //available when connected, always up-to-date
@@ -213,12 +230,21 @@ enum VirtualServerPropertiesRare {
VIRTUALSERVER_ACCOUNTING_TOKEN, //internal use | contains base64 encoded token data
VIRTUALSERVER_PROTOCOL_VERIFY_KEYPAIR, //internal use
VIRTUALSERVER_ANTIFLOOD_POINTS_NEEDED_PLUGIN_BLOCK, //only available on request (=> requestServerVariables)
VIRTUALSERVER_CAPABILITY_EXTENSIONS, //available when connected, not updated while connected
VIRTUALSERVER_STORAGE_QUOTA, // Allowed filetransfer storage on this server (including chat attachments) in megabytes
VIRTUALSERVER_WEBRTC_CERTIFICATE, //internal use
VIRTUALSERVER_WEBRTC_PRIVATE_KEY, //internal use
VIRTUALSERVER_UUID, //the uuid of the server (uuid v5 of VIRTUALSERVER_UNIQUE_IDENTIFIER)
VIRTUALSERVER_ADMINISTRATIVE_DOMAIN, //The domain which is responsible for this teamspeak server (which hosts its .well-known file)
VIRTUALSERVER_CANONICAL_NAME, //The canonical name under which the server is reachable
VIRTUALSERVER_MYTSID_CONNECT_ONLY, //Only clients that have a valid mytsid can connect
VIRTUALSERVER_MAX_HOMEBASES, //How many matrix homebases this virtual server supports. -1 = no limit
VIRTUALSERVER_HOMEBASE_STORAGE_QUOTA, // Allowed filetransfer storage for homebase attachments in megabytes
VIRTUALSERVER_ENDMARKER_RARE
};
enum ChannelPropertiesRare {
CHANNEL_DUMMY_2= CHANNEL_ENDMARKER,
CHANNEL_DUMMY_3,
CHANNEL_DUMMY_3 = CHANNEL_ENDMARKER,
CHANNEL_DUMMY_4,
CHANNEL_DUMMY_5,
CHANNEL_DUMMY_6,
@@ -234,6 +260,8 @@ enum ChannelPropertiesRare {
CHANNEL_ICON_ID, //Available for all channels that are "in view", always up-to-date
CHANNEL_BANNER_GFX_URL, //Available for all channels that are "in view", always up-to-date
CHANNEL_BANNER_MODE, //Available for all channels that are "in view", always up-to-date
CHANNEL_PERMISSION_HINTS,
CHANNEL_STORAGE_QUOTA, // Storage space that is allowed to be used by this channels files (in MiB)
CHANNEL_ENDMARKER_RARE,
CHANNEL_DELETE_DELAY_DEADLINE = 127 //(for clientlibv2) expected delete time in monotonic clock seconds or 0 if nothing is expected
};
@@ -283,28 +311,12 @@ enum ClientPropertiesRare {
CLIENT_ACTIVE_INTEGRATIONS_INFO, //stores info from the myts server and contains the subscription info
CLIENT_MYTS_AVATAR,
CLIENT_SIGNED_BADGES,
CLIENT_PERMISSION_HINTS,
CLIENT_USER_TAG, //automatically up-to-date for any client "in view", stores public chat user tag
CLIENT_ENDMARKER_RARE,
CLIENT_HW_ID = 127 //(for clientlibv2) unique hardware id
};
enum ConnectionPropertiesRare {
CONNECTION_DUMMY_0= CONNECTION_ENDMARKER,
CONNECTION_DUMMY_1,
CONNECTION_DUMMY_2,
CONNECTION_DUMMY_3,
CONNECTION_DUMMY_4,
CONNECTION_DUMMY_5,
CONNECTION_DUMMY_6,
CONNECTION_DUMMY_7,
CONNECTION_DUMMY_8,
CONNECTION_DUMMY_9,
CONNECTION_FILETRANSFER_BANDWIDTH_SENT, //how many bytes per second are currently being sent by file transfers
CONNECTION_FILETRANSFER_BANDWIDTH_RECEIVED, //how many bytes per second are currently being received by file transfers
CONNECTION_FILETRANSFER_BYTES_RECEIVED_TOTAL, //how many bytes we received in total through file transfers
CONNECTION_FILETRANSFER_BYTES_SENT_TOTAL, //how many bytes we sent in total through file transfers
CONNECTION_ENDMARKER_RARE,
};
enum BBCodeTags {
BBCodeTag_B = 0x00000001,
BBCodeTag_I = 0x00000002,
@@ -340,10 +352,7 @@ enum BBCodeTags {
BBCodeTag_def_extended = BBCodeTag_group_text | BBCodeTag_group_align | BBCodeTag_URL | BBCodeTag_IMAGE | BBCodeTag_HR | BBCodeTag_group_list | BBCodeTag_group_table,
};
enum LicenseIssue {
Blacklisted = 0,
Greylisted
};
enum LicenseIssue { Blacklisted = 0, Greylisted };
enum MytsDataUnsetFlags {
MytsDataUnsetFlag_None = 0,

View File

@@ -0,0 +1,149 @@
#pragma once
/*WARNING: This file is auto generated. Do not edit this file, but edit the server messages and regenerate! */
#include "teamspeak/public_definitions.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Structure that contains the command data for an ftcreatedir message */
struct ts3sc_data_ftcreatedir {
uint64 channelID; ///< The channel ID where the directory is to be created
const char* dirname; ///< utf8 encoded c string containing the directory name
};
/** Structure that contains the meta data for an ftcreatedir message */
struct ts3sc_meta_ftcreatedir {
int RESERVED; ///< This is here because C forbids empty structs. DO NOT USE
};
/** C Structure that contains the meta data and data for an ftcreatedir message */
struct ts3sc_ftcreatedir {
struct ts3sc_meta_ftcreatedir m; ///< meta data
struct ts3sc_data_ftcreatedir d; ///< data
};
/** Structure that contains the command data for an ftdeletefile message */
struct ts3sc_data_ftdeletefile {
uint64 channelID; ///< The channel ID where the file is to be deleted
};
/** Structure that contains the repeat command data for an ftdeletefile message */
struct ts3sc_array_ftdeletefile {
const char* fileName; ///< The file name to be deleted
};
/** Structure that contains the meta data for an ftdeletefile message */
struct ts3sc_meta_ftdeletefile {
int RESERVED; ///< This is here because C forbids empty structs. DO NOT USE
};
/** C Structure that contains the meta data and data for an ftdeletefile message */
struct ts3sc_ftdeletefile {
struct ts3sc_meta_ftdeletefile m; ///< meta data
struct ts3sc_data_ftdeletefile d; ///< data
int r_size; ///< number of items in r
struct ts3sc_array_ftdeletefile* r; ///< repeated data
};
/** Structure that contains the command data for an ftgetfileinfo message */
struct ts3sc_data_ftgetfileinfo {
int RESERVED; ///< This is here because C forbids empty structs. DO NOT USE
};
/** Structure that contains the repeat command data for an ftgetfileinfo message */
struct ts3sc_array_ftgetfileinfo {
uint64 channelID; ///< The channel ID where the file is located
const char* fileName; ///< utf8 encoded c string containing the file name
};
/** Structure that contains the meta data for an ftgetfileinfo message */
struct ts3sc_meta_ftgetfileinfo {
int RESERVED; /**<This is here because C forbids empty structs. DO NOT USE*/
};
/** C Structure that contains the meta data and data for an ftgetfileinfo message */
struct ts3sc_ftgetfileinfo {
struct ts3sc_meta_ftgetfileinfo m; ///< meta data
struct ts3sc_data_ftgetfileinfo d; ///< data
int r_size; ///< number of items in r
struct ts3sc_array_ftgetfileinfo* r; ///< repeated data
};
/** Structure that contains the command data for an ftgetfilelist message */
struct ts3sc_data_ftgetfilelist {
uint64 channelID; ///< The channel ID
const char* path; ///< utf8 encoded c string containing the path to get the files and directories in
};
/** Structure that contains the meta data for an ftgetfilelist message */
struct ts3sc_meta_ftgetfilelist {
int RESERVED; ///< This is here because C forbids empty structs. DO NOT USE
};
/** C Structure that contains the meta data and data for an ftgetfilelist message */
struct ts3sc_ftgetfilelist {
struct ts3sc_meta_ftgetfilelist m; ///< meta data
struct ts3sc_data_ftgetfilelist d; ///< data
};
/** Structure that contains the command data for an ftinitdownload message */
struct ts3sc_data_ftinitdownload {
const char* fileName; ///< The file name
uint64 channelID; ///< The channel ID where the file is to be downloaded from
};
/** Structure that contains the meta data for an ftinitdownload message */
struct ts3sc_meta_ftinitdownload {
int RESERVED; ///< This is here because C forbids empty structs. DO NOT USE
};
/** C Structure that contains the meta data and data for an ftinitdownload message */
struct ts3sc_ftinitdownload {
struct ts3sc_meta_ftinitdownload m; ///< meta data
struct ts3sc_data_ftinitdownload d; ///< data
};
/** Structure that contains the command data for an ftinitupload message */
struct ts3sc_data_ftinitupload {
const char* fileName; ///< The file name
uint64 fileSize; ///< The file size
uint64 channelID; ///< The channel ID where the file is to be uploaded
int overwrite; ///< Set to 1 to overwrite files, 0 to prevent overwrites. Mutually exclusive with resume.
int resume; ///< Set to 1 to resume an existing upload, 0 to start from scratch. Mutually exclusive with overwrite
};
/** Structure that contains the meta data for an ftinitupload message */
struct ts3sc_meta_ftinitupload {
int RESERVED; ///< This is here because C forbids empty structs. DO NOT USE
};
/** C Structure that contains the meta data and data for an ftinitupload message */
struct ts3sc_ftinitupload {
struct ts3sc_meta_ftinitupload m; ///< message meta data
struct ts3sc_data_ftinitupload d; ///< message data
};
/** Structure that contains the command data for an ftrenamefile message */
struct ts3sc_data_ftrenamefile {
uint64 fromChannelID; ///< The channel ID where the file is located now
uint64 toChannelID; ///< The channel ID where the file is to be moved to
const char* oldFileName; ///< utf8 encoded c string containing the current file name
const char* newFileName; ///< utf8 encoded c string containing the new file name
};
/** Structure that contains the meta data for an ftrenamefile message */
struct ts3sc_meta_ftrenamefile {
unsigned int has_toChannelID : 1; ///< boolean. 1 if the file is to be moved to a different channel.
};
/** C Structure that contains the meta data and data for an ftrenamefile message */
struct ts3sc_ftrenamefile {
struct ts3sc_meta_ftrenamefile m; ///< message meta data
struct ts3sc_data_ftrenamefile d; ///< message data
};
#ifdef __cplusplus
}
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
#ifndef SERVERLIB_PUBLICDEFINITIONS_H
#define SERVERLIB_PUBLICDEFINITIONS_H
#endif //SERVERLIB_PUBLICDEFINITIONS_H

View File

@@ -5,9 +5,8 @@
extern "C" {
#endif
#include "teamspeak/clientlib_publicdefinitions.h"
#include "teamspeak/public_definitions.h"
#include "plugin_definitions.h"
#include "teamspeak/public_definitions.h"
/* Functions exported to plugin from main binary */
struct TS3Functions {
@@ -66,7 +65,7 @@ struct TS3Functions {
unsigned int (*setPlaybackConfigValue)(uint64 serverConnectionHandlerID, const char* ident, const char* value);
unsigned int (*setClientVolumeModifier)(uint64 serverConnectionHandlerID, anyID clientID, float value);
/* Recording */
/* Recording status */
unsigned int (*startVoiceRecording)(uint64 serverConnectionHandlerID);
unsigned int (*stopVoiceRecording)(uint64 serverConnectionHandlerID);
@@ -77,8 +76,7 @@ struct TS3Functions {
unsigned int (*channelset3DAttributes)(uint64 serverConnectionHandlerID, anyID clientID, const TS3_VECTOR* position);
/* Interaction with the server */
unsigned int (*startConnection)(uint64 serverConnectionHandlerID, const char* identity, const char* ip, unsigned int port, const char* nickname,
const char** defaultChannelArray, const char* defaultChannelPassword, const char* serverPassword);
unsigned int (*startConnection)(uint64 serverConnectionHandlerID, const char* identity, const char* ip, unsigned int port, const char* nickname, const char** defaultChannelArray, const char* defaultChannelPassword, const char* serverPassword);
unsigned int (*stopConnection)(uint64 serverConnectionHandlerID, const char* quitMessage);
unsigned int (*requestClientMove)(uint64 serverConnectionHandlerID, anyID clientID, uint64 newChannelID, const char* password, const char* returnCode);
unsigned int (*requestClientVariables)(uint64 serverConnectionHandlerID, anyID clientID, const char* returnCode);
@@ -213,7 +211,8 @@ struct TS3Functions {
unsigned int (*requestServerGroupAddClient)(uint64 serverConnectionHandlerID, uint64 serverGroupID, uint64 clientDatabaseID, const char* returnCode);
unsigned int (*requestServerGroupDelClient)(uint64 serverConnectionHandlerID, uint64 serverGroupID, uint64 clientDatabaseID, const char* returnCode);
unsigned int (*requestServerGroupsByClientID)(uint64 serverConnectionHandlerID, uint64 clientDatabaseID, const char* returnCode);
unsigned int (*requestServerGroupAddPerm)(uint64 serverConnectionHandlerID, uint64 serverGroupID, int continueonerror, const unsigned int* permissionIDArray, const int* permissionValueArray, const int* permissionNegatedArray, const int* permissionSkipArray, int arraySize, const char* returnCode);
unsigned int (*requestServerGroupAddPerm)(uint64 serverConnectionHandlerID, uint64 serverGroupID, int continueonerror, const unsigned int* permissionIDArray, const int* permissionValueArray, const int* permissionNegatedArray,
const int* permissionSkipArray, int arraySize, const char* returnCode);
unsigned int (*requestServerGroupDelPerm)(uint64 serverConnectionHandlerID, uint64 serverGroupID, int continueOnError, const unsigned int* permissionIDArray, int arraySize, const char* returnCode);
unsigned int (*requestServerGroupPermList)(uint64 serverConnectionHandlerID, uint64 serverGroupID, const char* returnCode);
unsigned int (*requestServerGroupClientList)(uint64 serverConnectionHandlerID, uint64 serverGroupID, int withNames, const char* returnCode);
@@ -247,7 +246,7 @@ struct TS3Functions {
void (*getResourcesPath)(char* path, size_t maxLen);
void (*getConfigPath)(char* path, size_t maxLen);
void (*getPluginPath)(char* path, size_t maxLen, const char* pluginID);
uint64 (*getCurrentServerConnectionHandlerID)();
uint64 (*getCurrentServerConnectionHandlerID)(void);
void (*printMessage)(uint64 serverConnectionHandlerID, const char* message, enum PluginMessageTarget messageTarget);
void (*printMessageToCurrentTab)(const char* message);
void (*urlsToBB)(const char* text, char* result, size_t maxLen);
@@ -262,18 +261,48 @@ struct TS3Functions {
unsigned int (*isReceivingWhisper)(uint64 scHandlerID, anyID clientID, int* result);
unsigned int (*getAvatar)(uint64 scHandlerID, anyID clientID, char* result, size_t maxLen);
void (*setPluginMenuEnabled)(const char* pluginID, int menuID, int enabled);
void (*showHotkeySetup)();
void (*showHotkeySetup)(void);
void (*requestHotkeyInputDialog)(const char* pluginID, const char* keyword, int isDown, void* qParentWindow);
unsigned int (*getHotkeyFromKeyword)(const char* pluginID, const char** keywords, char** hotkeys, size_t arrayLen, size_t hotkeyBufSize);
unsigned int (*getClientDisplayName)(uint64 scHandlerID, anyID clientID, char* result, size_t maxLen);
unsigned int (*getBookmarkList)(struct PluginBookmarkList** list);
unsigned int (*getProfileList)(enum PluginGuiProfile profile, int* defaultProfileIdx, char*** result);
unsigned int (*guiConnect)(enum PluginConnectTab connectTab, const char* serverLabel, const char* serverAddress, const char* serverPassword, const char* nickname, const char* channel, const char* channelPassword, const char* captureProfile, const char* playbackProfile, const char* hotkeyProfile, const char* soundProfile, const char* userIdentity, const char* oneTimeKey, const char* phoneticName, uint64* scHandlerID);
unsigned int (*guiConnect)(enum PluginConnectTab connectTab, const char* serverLabel, const char* serverAddress, const char* serverPassword, const char* nickname, const char* channel, const char* channelPassword, const char* captureProfile,
const char* playbackProfile, const char* hotkeyProfile, const char* soundProfile, const char* userIdentity, const char* oneTimeKey, const char* phoneticName, uint64* scHandlerID);
unsigned int (*guiConnectBookmark)(enum PluginConnectTab connectTab, const char* bookmarkuuid, uint64* scHandlerID);
unsigned int (*createBookmark)(const char* bookmarkuuid, const char* serverLabel, const char* serverAddress, const char* serverPassword, const char* nickname, const char* channel, const char* channelPassword, const char* captureProfile, const char* playbackProfile, const char* hotkeyProfile, const char* soundProfile, const char* uniqueUserId, const char* oneTimeKey, const char* phoneticName);
unsigned int (*createBookmark)(const char* bookmarkuuid, const char* serverLabel, const char* serverAddress, const char* serverPassword, const char* nickname, const char* channel, const char* channelPassword, const char* captureProfile,
const char* playbackProfile, const char* hotkeyProfile, const char* soundProfile, const char* uniqueUserId, const char* oneTimeKey, const char* phoneticName);
unsigned int (*getPermissionIDByName)(uint64 serverConnectionHandlerID, const char* permissionName, unsigned int* result);
unsigned int (*getClientNeededPermission)(uint64 serverConnectionHandlerID, const char* permissionName, int* result);
void (*notifyKeyEvent)(const char* pluginID, const char* keyIdentifier, int up_down);
/* Single-Track/Multi-Track recording */
unsigned int (*startRecording)(uint64 serverConnectionHandlerID, int multitrack, int noFileSelector, const char* path);
unsigned int (*stopRecording)(uint64 serverConnectionHandlerID);
/* Convenience functions */
unsigned int (*requestClientsMove)(uint64 serverConnectionHandlerID, const anyID* clientIDArray, uint64 newChannelID, const char* password, const char* returnCode);
unsigned int (*requestClientsKickFromChannel)(uint64 serverConnectionHandlerID, const anyID* clientIDArray, const char* kickReason, const char* returnCode);
unsigned int (*requestClientsKickFromServer)(uint64 serverConnectionHandlerID, const anyID* clientIDArray, const char* kickReason, const char* returnCode);
unsigned int (*requestMuteClientsTemporary)(uint64 serverConnectionHandlerID, const anyID* clientIDArray, const char* returnCode);
unsigned int (*requestUnmuteClientsTemporary)(uint64 serverConnectionHandlerID, const anyID* clientIDArray, const char* returnCode);
unsigned int (*getPermissionNameByID)(uint64 scHandlerID, unsigned int permissionID, char* result, size_t max_len);
unsigned int (*clientPropertyFlagToString)(size_t clientPropertyFlag, char** resultString);
unsigned int (*channelPropertyFlagToString)(size_t channelPropertyFlag, char** resultString);
unsigned int (*serverPropertyFlagToString)(size_t serverPropertyFlag, char** resultString);
/* Server editing */
unsigned int (*setServerVariableAsInt)(uint64 serverConnectionHandlerID, size_t flag, int value);
unsigned int (*setServerVariableAsUInt64)(uint64 serverConnectionHandlerID, size_t flag, uint64 value);
unsigned int (*setServerVariableAsDouble)(uint64 serverConnectionHandlerID, size_t flag, double value);
unsigned int (*setServerVariableAsString)(uint64 serverConnectionHandlerID, size_t flag, const char* value);
unsigned int (*flushServerUpdates)(uint64 serverConnectionHandlerID, const char* returnCode);
/* Server/Channel group helper functions */
unsigned int (*getServerGroupIDByName)(uint64 serverConnectionHandlerID, const char* groupName, unsigned int* result);
unsigned int (*getServerGroupNameByID)(uint64 scHandlerID, unsigned int groupID, char* result, size_t max_len);
unsigned int (*getChannelGroupIDByName)(uint64 serverConnectionHandlerID, const char* groupName, unsigned int* result);
unsigned int (*getChannelGroupNameByID)(uint64 scHandlerID, unsigned int groupID, char* result, size_t max_len);
};
#ifdef __cplusplus

BIN
src/icons/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

BIN
src/icons/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

BIN
src/icons/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

BIN
src/icons/t.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

View File

@@ -3,34 +3,49 @@
#include <QColor>
#include <QNetworkDatagram>
LEDHandler::LEDHandler(QUdpSocket* sock, TS3Functions ts3Functions)
LEDHandler::LEDHandler(QUdpSocket* sock, TS3Functions ts3Functions, QSettings* settings) : mSettings(settings)
{
mSock = sock;
mTs3Functions = ts3Functions;
mBrightness = mSettings->value("Global/Brightness", 60).toInt();
connect(mSock, &QUdpSocket::hostFound, this, &LEDHandler::hostFound);
}
void LEDHandler::talkingStarted()
{
printf("started\n");
sendColor(0, 0, 255, 0, 255);
sendColor(mSettings->value("Talk/R").toInt(),
mSettings->value("Talk/G").toInt(),
mSettings->value("Talk/B").toInt(),
mSettings->value("Talk/W").toInt(),
255);
}
void LEDHandler::talkingEnded()
{
printf("stopped\n");
sendColor(0, 0, 0, 0, 0);
mSettings->sync(); // update for external changes
}
void LEDHandler::poked()
{
sendColor(0, 0, 0, 255, 5);
sendColor(mSettings->value("Poked/R").toInt(),
mSettings->value("Poked/G").toInt(),
mSettings->value("Poked/B").toInt(),
mSettings->value("Poked/W").toInt(),
mSettings->value("Poked/Duration").toInt());
}
void LEDHandler::clientMoved()
{
sendColor(255, 255, 0, 0, 1);
sendColor(mSettings->value("ClientMoved/R").toInt(),
mSettings->value("ClientMoved/G").toInt(),
mSettings->value("ClientMoved/B").toInt(),
mSettings->value("ClientMoved/W").toInt(),
mSettings->value("ClientMoved/Duration").toInt());
}
void LEDHandler::sendColor(int R, int G, int B, int W, int t)
@@ -38,24 +53,35 @@ void LEDHandler::sendColor(int R, int G, int B, int W, int t)
QByteArray msg;
msg.append(3);
msg.append((uint)t);
for (int n = 0; n < cLEDNUM; n++) {
msg.append((int)R * brightness/100);
msg.append((int)G * brightness/100);
msg.append((int)B * brightness/100);
msg.append((int)W * brightness/100);
for (int n = mSettings->value("Global/StartLED").toInt();
n < mSettings->value("Global/EndLED").toInt(); n++) {
msg.append((int)R * mBrightness/100);
msg.append((int)G * mBrightness/100);
msg.append((int)B * mBrightness/100);
msg.append((int)W * mBrightness/100);
}
mSock->writeDatagram(msg, QHostAddress(cURL), cPORT);
mSock->writeDatagram(msg,
QHostAddress(mSettings->value("Global/IP").toString()),
mSettings->value("Global/Port").toInt());
}
void LEDHandler::connected()
{
sendColor(0, 255, 0, 0, 1);
sendColor(mSettings->value("Connected/R").toInt(),
mSettings->value("Connected/G").toInt(),
mSettings->value("Connected/B").toInt(),
mSettings->value("Connected/W").toInt(),
mSettings->value("Connected/Duration").toInt());
}
void LEDHandler::disconnected()
{
sendColor(255, 0, 0, 0, 1);
sendColor(mSettings->value("Disconnected/R").toInt(),
mSettings->value("Disconnected/G").toInt(),
mSettings->value("Disconnected/B").toInt(),
mSettings->value("Disconnected/W").toInt(),
mSettings->value("Disconnected/Duration").toInt());
}
void LEDHandler::hostFound()

View File

@@ -1,18 +1,19 @@
#ifndef LEDHANDLER_H
#define LEDHANDLER_H
#include <QSettings>
#include <QUdpSocket>
#include <ts3_functions.h>
class LEDHandler : public QObject
{
public:
QString cURL = "10.0.0.222";
int cPORT = 21324;
int cLEDNUM = 26;
QString cURL;
int cPORT;
int cLEDFROM;
int cLEDTO;
LEDHandler(QUdpSocket* sock, TS3Functions ts3Functions);
LEDHandler(QUdpSocket* sock, TS3Functions ts3Functions, QSettings* settings);
void talkingEnded();
void talkingStarted();
@@ -27,7 +28,45 @@ public slots:
private:
QUdpSocket* mSock;
TS3Functions mTs3Functions;
int brightness = 80;
QSettings* mSettings;
int mBrightness;
int cConnectedR;
int cConnectedG;
int cConnectedB;
int cConnectedW;
int cConnectedDur;
int cDisconnectedR;
int cDisconnectedG;
int cDisconnectedB;
int cDisconnectedW;
int cDisconnectedDur;
int cTalkR;
int cTalkG;
int cTalkB;
int cTalkW;
int cNewUserR;
int cNewUserG;
int cNewUserB;
int cNewUserW;
int cNewUserDur;
int cMovedR;
int cMovedG;
int cMovedB;
int cMovedW;
int cMovedDur;
int cPokedR;
int cPokedG;
int cPokedB;
int cPokedW;
int cPokedDur;
void sendColor(int R, int G, int B, int W, int t);
};

View File

@@ -4,6 +4,7 @@
* Copyright (c) TeamSpeak Systems GmbH
*/
#include "ts3_functions.h"
#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32)
#pragma warning (disable : 4100) /* Disable Unreferenced parameter warning */
#include <Windows.h>
@@ -18,7 +19,6 @@
#include "teamspeak/public_errors_rare.h"
#include "teamspeak/public_definitions.h"
#include "teamspeak/public_rare_definitions.h"
#include "teamspeak/clientlib_publicdefinitions.h"
static struct TS3Functions ts3Functions;
@@ -29,7 +29,7 @@ static struct TS3Functions ts3Functions;
#define _strcpy(dest, destSize, src) { strncpy(dest, src, destSize-1); (dest)[destSize-1] = '\0'; }
#endif
#define PLUGIN_API_VERSION 23
#define PLUGIN_API_VERSION 26
#define PATH_BUFSIZE 512
#define COMMAND_BUFSIZE 128
@@ -56,7 +56,7 @@ const char* ts3plugin_name() {
/* Plugin version */
const char* ts3plugin_version() {
return "0.4b";
return "0.8";
}
/* Plugin API version. Must be the same as the clients API major version, else the plugin fails to load. */
@@ -67,7 +67,7 @@ int ts3plugin_apiVersion() {
/* Plugin author */
const char* ts3plugin_author() {
/* If you want to use wchar_t, see ts3plugin_name() on how to use */
return "Rogosoftware";
return "Rogo Software";
}
/* Plugin description */
@@ -94,6 +94,8 @@ int ts3plugin_init() {
/* Your plugin init code here */
printf("PLUGIN: init\n");
/* Example on how to query application, resources and configuration paths from client */
/* Note: Console client returns empty string for app and resources path */
ts3Functions.getAppPath(appPath, PATH_BUFSIZE);
@@ -103,8 +105,13 @@ int ts3plugin_init() {
printf("PLUGIN: App path: %s\nResources path: %s\nConfig path: %s\nPlugin path: %s\n", appPath, resourcesPath, configPath, pluginPath);
mConfig = new QSettings(QString(pluginPath) + "/LEDconf.ini", QSettings::IniFormat);
initConfig();
printf("Initializing LED Settings: %d \n", mConfig->status());
printf("Settings Location: %s \n", mConfig->fileName().toStdString().c_str());
mUdpSock = new QUdpSocket();
mLedHandler = new LEDHandler(mUdpSock, ts3Functions);
mLedHandler = new LEDHandler(mUdpSock, ts3Functions, mConfig);
return 0; /* 0 = success, 1 = failure, -2 = failure but client will not show a "failed to load" warning */
/* -2 is a very special case and should only be used if a plugin displays a dialog (e.g. overlay) asking the user to disable
@@ -112,6 +119,57 @@ int ts3plugin_init() {
* For normal case, if a plugin really failed to load because of an error, the correct return value is 1. */
}
void initConfig() {
mConfig->sync();
if (!mConfig->value("init", false).toBool()) return;
mConfig->setValue("init", true);
mConfig->setValue("Global/IP", "10.0.0.167");
mConfig->setValue("Global/Port", 21324);
mConfig->setValue("Global/Brightness", 60);
mConfig->setValue("Global/StartLED", 0);
mConfig->setValue("Global/EndLED", 90);
mConfig->setValue("Connected/R", 0);
mConfig->setValue("Connected/G", 255);
mConfig->setValue("Connected/B", 0);
mConfig->setValue("Connected/W", 0);
mConfig->setValue("Connected/Duration", 1);
mConfig->setValue("Disconnected/R", 255);
mConfig->setValue("Disconnected/G", 0);
mConfig->setValue("Disconnected/B", 0);
mConfig->setValue("Disconnected/W", 0);
mConfig->setValue("Disconnected/Duration", 1);
mConfig->setValue("Talk/R", 0);
mConfig->setValue("Talk/G", 0);
mConfig->setValue("Talk/B", 255);
mConfig->setValue("Talk/W", 0);
mConfig->setValue("UserJoined/R", 125);
mConfig->setValue("UserJoined/G", 25);
mConfig->setValue("UserJoined/B", 250);
mConfig->setValue("UserJoined/W", 0);
mConfig->setValue("UserJoined/Duration", 1);
mConfig->setValue("ClientMoved/R", 0);
mConfig->setValue("ClientMoved/G", 255);
mConfig->setValue("ClientMoved/B", 255);
mConfig->setValue("ClientMoved/W", 15);
mConfig->setValue("ClientMoved/Duration", 1);
mConfig->setValue("Poked/R", 0);
mConfig->setValue("Poked/G", 0);
mConfig->setValue("Poked/B", 0);
mConfig->setValue("Poked/W", 255);
mConfig->setValue("Poked/Duration", 5);
mConfig->sync();
}
/* Custom code called right before the plugin is unloaded */
void ts3plugin_shutdown() {
/* Your plugin cleanup code here */
@@ -119,6 +177,7 @@ void ts3plugin_shutdown() {
delete mUdpSock;
delete mLedHandler;
delete mConfig;
/*
* Note:
@@ -522,13 +581,7 @@ static struct PluginMenuItem* createMenuItem(enum PluginMenuType type, int id, c
* These IDs are freely choosable by the plugin author. It's not really needed to use an enum, it just looks prettier.
*/
enum {
MENU_ID_CLIENT_1 = 1,
MENU_ID_CLIENT_2,
MENU_ID_CHANNEL_1,
MENU_ID_CHANNEL_2,
MENU_ID_CHANNEL_3,
MENU_ID_GLOBAL_1,
MENU_ID_GLOBAL_2
MENU_ID_SETTINGS
};
/*
@@ -556,13 +609,7 @@ void ts3plugin_initMenus(struct PluginMenuItem*** menuItems, char** menuIcon) {
*/
BEGIN_CREATE_MENUS(0); /* IMPORTANT: Number of menu items must be correct! */
//CREATE_MENU_ITEM(PLUGIN_MENU_TYPE_CLIENT, MENU_ID_CLIENT_1, "Client item 1", "1.png");
//CREATE_MENU_ITEM(PLUGIN_MENU_TYPE_CLIENT, MENU_ID_CLIENT_2, "Client item 2", "2.png");
//CREATE_MENU_ITEM(PLUGIN_MENU_TYPE_CHANNEL, MENU_ID_CHANNEL_1, "Channel item 1", "1.png");
//CREATE_MENU_ITEM(PLUGIN_MENU_TYPE_CHANNEL, MENU_ID_CHANNEL_2, "Channel item 2", "2.png");
//CREATE_MENU_ITEM(PLUGIN_MENU_TYPE_CHANNEL, MENU_ID_CHANNEL_3, "Channel item 3", "3.png");
//CREATE_MENU_ITEM(PLUGIN_MENU_TYPE_GLOBAL, MENU_ID_GLOBAL_1, "Global item 1", "1.png");
//CREATE_MENU_ITEM(PLUGIN_MENU_TYPE_GLOBAL, MENU_ID_GLOBAL_2, "Global item 2", "2.png");
// CREATE_MENU_ITEM(PLUGIN_MENU_TYPE_GLOBAL, MENU_ID_SETTINGS, "LED Settings", "1.png");
END_CREATE_MENUS; /* Includes an assert checking if the number of menu items matched */
/*
@@ -822,47 +869,13 @@ void ts3plugin_onMenuItemEvent(uint64 serverConnectionHandlerID, enum PluginMenu
case PLUGIN_MENU_TYPE_GLOBAL:
/* Global menu item was triggered. selectedItemID is unused and set to zero. */
switch(menuItemID) {
case MENU_ID_GLOBAL_1:
/* Menu global 1 was triggered */
break;
case MENU_ID_GLOBAL_2:
/* Menu global 2 was triggered */
case MENU_ID_SETTINGS:
// TODO: show dialog
break;
default:
break;
}
break;
case PLUGIN_MENU_TYPE_CHANNEL:
/* Channel contextmenu item was triggered. selectedItemID is the channelID of the selected channel */
switch(menuItemID) {
case MENU_ID_CHANNEL_1:
/* Menu channel 1 was triggered */
break;
case MENU_ID_CHANNEL_2:
/* Menu channel 2 was triggered */
break;
case MENU_ID_CHANNEL_3:
/* Menu channel 3 was triggered */
break;
default:
break;
}
break;
case PLUGIN_MENU_TYPE_CLIENT:
/* Client contextmenu item was triggered. selectedItemID is the clientID of the selected client */
switch(menuItemID) {
case MENU_ID_CLIENT_1:
/* Menu client 1 was triggered */
break;
case MENU_ID_CLIENT_2:
/* Menu client 2 was triggered */
break;
default:
break;
}
break;
default:
break;
}
}

View File

@@ -7,29 +7,25 @@
#ifndef PLUGIN_H
#define PLUGIN_H
#include <QUdpSocket>
#include <QSettings>
#include "ledhandler.h"
#include "public_definitions.h"
#include "qudpsocket.h"
#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32)
#include <Windows.h>
#define PLUGINS_EXPORTDLL __declspec(dllexport)
#else
#define PLUGINS_EXPORTDLL __attribute__((visibility("default")))
#endif
#include "ledhandler.h"
#include "ts3_functions.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#ifdef __cplusplus
extern "C" {
#endif
QSettings* mConfig;
QUdpSocket *mUdpSock;
LEDHandler *mLedHandler;
void initConfig();
/* Required functions */
PLUGINS_EXPORTDLL const char* ts3plugin_name();
@@ -67,9 +63,12 @@ PLUGINS_EXPORTDLL void ts3plugin_onUpdateClientEvent(uint64 serverConnectionHand
PLUGINS_EXPORTDLL void ts3plugin_onClientMoveEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, const char* moveMessage);
PLUGINS_EXPORTDLL void ts3plugin_onClientMoveSubscriptionEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility);
PLUGINS_EXPORTDLL void ts3plugin_onClientMoveTimeoutEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, const char* timeoutMessage);
PLUGINS_EXPORTDLL void ts3plugin_onClientMoveMovedEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID moverID, const char* moverName, const char* moverUniqueIdentifier, const char* moveMessage);
PLUGINS_EXPORTDLL void ts3plugin_onClientKickFromChannelEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID kickerID, const char* kickerName, const char* kickerUniqueIdentifier, const char* kickMessage);
PLUGINS_EXPORTDLL void ts3plugin_onClientKickFromServerEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID kickerID, const char* kickerName, const char* kickerUniqueIdentifier, const char* kickMessage);
PLUGINS_EXPORTDLL void ts3plugin_onClientMoveMovedEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID moverID, const char* moverName, const char* moverUniqueIdentifier,
const char* moveMessage);
PLUGINS_EXPORTDLL void ts3plugin_onClientKickFromChannelEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID kickerID, const char* kickerName, const char* kickerUniqueIdentifier,
const char* kickMessage);
PLUGINS_EXPORTDLL void ts3plugin_onClientKickFromServerEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID kickerID, const char* kickerName, const char* kickerUniqueIdentifier,
const char* kickMessage);
PLUGINS_EXPORTDLL void ts3plugin_onClientIDsEvent(uint64 serverConnectionHandlerID, const char* uniqueClientIdentifier, anyID clientID, const char* clientName);
PLUGINS_EXPORTDLL void ts3plugin_onClientIDsFinishedEvent(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL void ts3plugin_onServerEditedEvent(uint64 serverConnectionHandlerID, anyID editerID, const char* editerName, const char* editerUniqueIdentifier);
@@ -97,7 +96,8 @@ PLUGINS_EXPORTDLL void ts3plugin_onCustom3dRolloffCalculationWaveEvent(uint64 se
PLUGINS_EXPORTDLL void ts3plugin_onUserLoggingMessageEvent(const char* logMessage, int logLevel, const char* logChannel, uint64 logID, const char* logTime, const char* completeLogString);
/* Clientlib rare */
PLUGINS_EXPORTDLL void ts3plugin_onClientBanFromServerEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID kickerID, const char* kickerName, const char* kickerUniqueIdentifier, uint64 time, const char* kickMessage);
PLUGINS_EXPORTDLL void ts3plugin_onClientBanFromServerEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID kickerID, const char* kickerName, const char* kickerUniqueIdentifier, uint64 time,
const char* kickMessage);
PLUGINS_EXPORTDLL int ts3plugin_onClientPokeEvent(uint64 serverConnectionHandlerID, anyID fromClientID, const char* pokerName, const char* pokerUniqueIdentity, const char* message, int ffIgnored);
PLUGINS_EXPORTDLL void ts3plugin_onClientSelfVariableUpdateEvent(uint64 serverConnectionHandlerID, int flag, const char* oldValue, const char* newValue);
PLUGINS_EXPORTDLL void ts3plugin_onFileListEvent(uint64 serverConnectionHandlerID, uint64 channelID, const char* path, const char* name, uint64 size, uint64 datetime, int type, uint64 incompletesize, const char* returnCode);
@@ -124,10 +124,13 @@ PLUGINS_EXPORTDLL int ts3plugin_onServerPermissionErrorEvent(uint64 serverConne
PLUGINS_EXPORTDLL void ts3plugin_onPermissionListGroupEndIDEvent(uint64 serverConnectionHandlerID, unsigned int groupEndID);
PLUGINS_EXPORTDLL void ts3plugin_onPermissionListEvent(uint64 serverConnectionHandlerID, unsigned int permissionID, const char* permissionName, const char* permissionDescription);
PLUGINS_EXPORTDLL void ts3plugin_onPermissionListFinishedEvent(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL void ts3plugin_onPermissionOverviewEvent(uint64 serverConnectionHandlerID, uint64 clientDatabaseID, uint64 channelID, int overviewType, uint64 overviewID1, uint64 overviewID2, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
PLUGINS_EXPORTDLL void ts3plugin_onPermissionOverviewEvent(uint64 serverConnectionHandlerID, uint64 clientDatabaseID, uint64 channelID, int overviewType, uint64 overviewID1, uint64 overviewID2, unsigned int permissionID, int permissionValue,
int permissionNegated, int permissionSkip);
PLUGINS_EXPORTDLL void ts3plugin_onPermissionOverviewFinishedEvent(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupClientAddedEvent(uint64 serverConnectionHandlerID, anyID clientID, const char* clientName, const char* clientUniqueIdentity, uint64 serverGroupID, anyID invokerClientID, const char* invokerName, const char* invokerUniqueIdentity);
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupClientDeletedEvent(uint64 serverConnectionHandlerID, anyID clientID, const char* clientName, const char* clientUniqueIdentity, uint64 serverGroupID, anyID invokerClientID, const char* invokerName, const char* invokerUniqueIdentity);
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupClientAddedEvent(uint64 serverConnectionHandlerID, anyID clientID, const char* clientName, const char* clientUniqueIdentity, uint64 serverGroupID, anyID invokerClientID, const char* invokerName,
const char* invokerUniqueIdentity);
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupClientDeletedEvent(uint64 serverConnectionHandlerID, anyID clientID, const char* clientName, const char* clientUniqueIdentity, uint64 serverGroupID, anyID invokerClientID, const char* invokerName,
const char* invokerUniqueIdentity);
PLUGINS_EXPORTDLL void ts3plugin_onClientNeededPermissionsEvent(uint64 serverConnectionHandlerID, unsigned int permissionID, int permissionValue);
PLUGINS_EXPORTDLL void ts3plugin_onClientNeededPermissionsFinishedEvent(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL void ts3plugin_onFileTransferStatusEvent(anyID transferID, unsigned int status, const char* statusMessage, uint64 remotefileSize, uint64 serverConnectionHandlerID);
@@ -140,12 +143,15 @@ PLUGINS_EXPORTDLL void ts3plugin_onMessageGetEvent(uint64 serverConnectionHandle
PLUGINS_EXPORTDLL void ts3plugin_onClientDBIDfromUIDEvent(uint64 serverConnectionHandlerID, const char* uniqueClientIdentifier, uint64 clientDatabaseID);
PLUGINS_EXPORTDLL void ts3plugin_onClientNamefromUIDEvent(uint64 serverConnectionHandlerID, const char* uniqueClientIdentifier, uint64 clientDatabaseID, const char* clientNickName);
PLUGINS_EXPORTDLL void ts3plugin_onClientNamefromDBIDEvent(uint64 serverConnectionHandlerID, const char* uniqueClientIdentifier, uint64 clientDatabaseID, const char* clientNickName);
PLUGINS_EXPORTDLL void ts3plugin_onComplainListEvent(uint64 serverConnectionHandlerID, uint64 targetClientDatabaseID, const char* targetClientNickName, uint64 fromClientDatabaseID, const char* fromClientNickName, const char* complainReason, uint64 timestamp);
PLUGINS_EXPORTDLL void ts3plugin_onBanListEvent(uint64 serverConnectionHandlerID, uint64 banid, const char* ip, const char* name, const char* uid, const char* mytsid, uint64 creationTime, uint64 durationTime, const char* invokerName, uint64 invokercldbid, const char* invokeruid, const char* reason, int numberOfEnforcements, const char* lastNickName);
PLUGINS_EXPORTDLL void ts3plugin_onComplainListEvent(uint64 serverConnectionHandlerID, uint64 targetClientDatabaseID, const char* targetClientNickName, uint64 fromClientDatabaseID, const char* fromClientNickName, const char* complainReason,
uint64 timestamp);
PLUGINS_EXPORTDLL void ts3plugin_onBanListEvent(uint64 serverConnectionHandlerID, uint64 banid, const char* ip, const char* name, const char* uid, const char* mytsid, uint64 creationTime, uint64 durationTime, const char* invokerName, uint64 invokercldbid,
const char* invokeruid, const char* reason, int numberOfEnforcements, const char* lastNickName);
PLUGINS_EXPORTDLL void ts3plugin_onClientServerQueryLoginPasswordEvent(uint64 serverConnectionHandlerID, const char* loginPassword);
PLUGINS_EXPORTDLL void ts3plugin_onPluginCommandEvent(uint64 serverConnectionHandlerID, const char* pluginName, const char* pluginCommand, anyID invokerClientID, const char* invokerName, const char* invokerUniqueIdentity);
PLUGINS_EXPORTDLL void ts3plugin_onIncomingClientQueryEvent(uint64 serverConnectionHandlerID, const char* commandText);
PLUGINS_EXPORTDLL void ts3plugin_onServerTemporaryPasswordListEvent(uint64 serverConnectionHandlerID, const char* clientNickname, const char* uniqueClientIdentifier, const char* description, const char* password, uint64 timestampStart, uint64 timestampEnd, uint64 targetChannelID, const char* targetChannelPW);
PLUGINS_EXPORTDLL void ts3plugin_onServerTemporaryPasswordListEvent(uint64 serverConnectionHandlerID, const char* clientNickname, const char* uniqueClientIdentifier, const char* description, const char* password, uint64 timestampStart, uint64 timestampEnd,
uint64 targetChannelID, const char* targetChannelPW);
/* Client UI callbacks */
PLUGINS_EXPORTDLL void ts3plugin_onAvatarUpdated(uint64 serverConnectionHandlerID, anyID clientID, const char* avatarPath);