Aufgrund einer Wartung wird GitLab am 21.09. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 21.09. between 8:00 and 9:00 am.

Commit 72692a53 authored by Carsten Fuhrmann's avatar Carsten Fuhrmann
Browse files

First init

parents
#include "overlaycontroller.h"
OverlayController::OverlayController()
{
}
#pragma once
#include "qttsoverlay_global.h"
class QTTSOVERLAY_EXPORT OverlayController
{
public:
OverlayController();
};
This diff is collapsed.
/*
* TeamSpeak 3 demo plugin
*
* Copyright (c) 2008-2016 TeamSpeak Systems GmbH
*/
#ifndef PLUGIN_H
#define PLUGIN_H
#ifdef WIN32
#define PLUGINS_EXPORTDLL __declspec(dllexport)
#else
#define PLUGINS_EXPORTDLL __attribute__ ((visibility("default")))
#endif
void generateChatLine(QString message);
void deleteChatLine(QLabel* message);
void generateSpeaker(QString name);
void deleteSpeaker(QString name);
void debugPrint(QString text);
#ifdef __cplusplus
extern "C" {
#endif
/* Required functions */
PLUGINS_EXPORTDLL const char* ts3plugin_name();
PLUGINS_EXPORTDLL const char* ts3plugin_version();
PLUGINS_EXPORTDLL int ts3plugin_apiVersion();
PLUGINS_EXPORTDLL const char* ts3plugin_author();
PLUGINS_EXPORTDLL const char* ts3plugin_description();
PLUGINS_EXPORTDLL void ts3plugin_setFunctionPointers(const struct TS3Functions funcs);
PLUGINS_EXPORTDLL int ts3plugin_init();
PLUGINS_EXPORTDLL void ts3plugin_shutdown();
/* Optional functions */
PLUGINS_EXPORTDLL int ts3plugin_offersConfigure();
PLUGINS_EXPORTDLL void ts3plugin_configure(void* handle, void* qParentWidget);
PLUGINS_EXPORTDLL void ts3plugin_registerPluginID(const char* id);
PLUGINS_EXPORTDLL const char* ts3plugin_commandKeyword();
PLUGINS_EXPORTDLL int ts3plugin_processCommand(uint64 serverConnectionHandlerID, const char* command);
PLUGINS_EXPORTDLL void ts3plugin_currentServerConnectionChanged(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL const char* ts3plugin_infoTitle();
PLUGINS_EXPORTDLL void ts3plugin_infoData(uint64 serverConnectionHandlerID, uint64 id, enum PluginItemType type, char** data);
PLUGINS_EXPORTDLL void ts3plugin_freeMemory(void* data);
PLUGINS_EXPORTDLL int ts3plugin_requestAutoload();
//PLUGINS_EXPORTDLL void ts3plugin_initMenus(struct PluginMenuItem*** menuItems, char** menuIcon);
//PLUGINS_EXPORTDLL void ts3plugin_initHotkeys(struct PluginHotkey*** hotkeys);
/* Clientlib */
PLUGINS_EXPORTDLL void ts3plugin_onConnectStatusChangeEvent(uint64 serverConnectionHandlerID, int newStatus, unsigned int errorNumber);
PLUGINS_EXPORTDLL void ts3plugin_onNewChannelEvent(uint64 serverConnectionHandlerID, uint64 channelID, uint64 channelParentID);
PLUGINS_EXPORTDLL void ts3plugin_onNewChannelCreatedEvent(uint64 serverConnectionHandlerID, uint64 channelID, uint64 channelParentID, anyID invokerID, const char* invokerName, const char* invokerUniqueIdentifier);
PLUGINS_EXPORTDLL void ts3plugin_onDelChannelEvent(uint64 serverConnectionHandlerID, uint64 channelID, anyID invokerID, const char* invokerName, const char* invokerUniqueIdentifier);
PLUGINS_EXPORTDLL void ts3plugin_onChannelMoveEvent(uint64 serverConnectionHandlerID, uint64 channelID, uint64 newChannelParentID, anyID invokerID, const char* invokerName, const char* invokerUniqueIdentifier);
PLUGINS_EXPORTDLL void ts3plugin_onUpdateChannelEvent(uint64 serverConnectionHandlerID, uint64 channelID);
PLUGINS_EXPORTDLL void ts3plugin_onUpdateChannelEditedEvent(uint64 serverConnectionHandlerID, uint64 channelID, anyID invokerID, const char* invokerName, const char* invokerUniqueIdentifier);
PLUGINS_EXPORTDLL void ts3plugin_onUpdateClientEvent(uint64 serverConnectionHandlerID, anyID clientID, anyID invokerID, const char* invokerName, const char* invokerUniqueIdentifier);
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_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);
PLUGINS_EXPORTDLL void ts3plugin_onServerUpdatedEvent(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL int ts3plugin_onServerErrorEvent(uint64 serverConnectionHandlerID, const char* errorMessage, unsigned int error, const char* returnCode, const char* extraMessage);
PLUGINS_EXPORTDLL void ts3plugin_onServerStopEvent(uint64 serverConnectionHandlerID, const char* shutdownMessage);
PLUGINS_EXPORTDLL int ts3plugin_onTextMessageEvent(uint64 serverConnectionHandlerID, anyID targetMode, anyID toID, anyID fromID, const char* fromName, const char* fromUniqueIdentifier, const char* message, int ffIgnored);
PLUGINS_EXPORTDLL void ts3plugin_onTalkStatusChangeEvent(uint64 serverConnectionHandlerID, int status, int isReceivedWhisper, anyID clientID);
PLUGINS_EXPORTDLL void ts3plugin_onConnectionInfoEvent(uint64 serverConnectionHandlerID, anyID clientID);
PLUGINS_EXPORTDLL void ts3plugin_onServerConnectionInfoEvent(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL void ts3plugin_onChannelSubscribeEvent(uint64 serverConnectionHandlerID, uint64 channelID);
PLUGINS_EXPORTDLL void ts3plugin_onChannelSubscribeFinishedEvent(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL void ts3plugin_onChannelUnsubscribeEvent(uint64 serverConnectionHandlerID, uint64 channelID);
PLUGINS_EXPORTDLL void ts3plugin_onChannelUnsubscribeFinishedEvent(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL void ts3plugin_onChannelDescriptionUpdateEvent(uint64 serverConnectionHandlerID, uint64 channelID);
PLUGINS_EXPORTDLL void ts3plugin_onChannelPasswordChangedEvent(uint64 serverConnectionHandlerID, uint64 channelID);
PLUGINS_EXPORTDLL void ts3plugin_onPlaybackShutdownCompleteEvent(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL void ts3plugin_onSoundDeviceListChangedEvent(const char* modeID, int playOrCap);
PLUGINS_EXPORTDLL void ts3plugin_onEditPlaybackVoiceDataEvent(uint64 serverConnectionHandlerID, anyID clientID, short* samples, int sampleCount, int channels);
PLUGINS_EXPORTDLL void ts3plugin_onEditPostProcessVoiceDataEvent(uint64 serverConnectionHandlerID, anyID clientID, short* samples, int sampleCount, int channels, const unsigned int* channelSpeakerArray, unsigned int* channelFillMask);
PLUGINS_EXPORTDLL void ts3plugin_onEditMixedPlaybackVoiceDataEvent(uint64 serverConnectionHandlerID, short* samples, int sampleCount, int channels, const unsigned int* channelSpeakerArray, unsigned int* channelFillMask);
PLUGINS_EXPORTDLL void ts3plugin_onEditCapturedVoiceDataEvent(uint64 serverConnectionHandlerID, short* samples, int sampleCount, int channels, int* edited);
PLUGINS_EXPORTDLL void ts3plugin_onCustom3dRolloffCalculationClientEvent(uint64 serverConnectionHandlerID, anyID clientID, float distance, float* volume);
PLUGINS_EXPORTDLL void ts3plugin_onCustom3dRolloffCalculationWaveEvent(uint64 serverConnectionHandlerID, uint64 waveHandle, float distance, float* volume);
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 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);
PLUGINS_EXPORTDLL void ts3plugin_onFileListFinishedEvent(uint64 serverConnectionHandlerID, uint64 channelID, const char* path);
PLUGINS_EXPORTDLL void ts3plugin_onFileInfoEvent(uint64 serverConnectionHandlerID, uint64 channelID, const char* name, uint64 size, uint64 datetime);
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupListEvent(uint64 serverConnectionHandlerID, uint64 serverGroupID, const char* name, int type, int iconID, int saveDB);
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupListFinishedEvent(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupByClientIDEvent(uint64 serverConnectionHandlerID, const char* name, uint64 serverGroupList, uint64 clientDatabaseID);
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupPermListEvent(uint64 serverConnectionHandlerID, uint64 serverGroupID, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupPermListFinishedEvent(uint64 serverConnectionHandlerID, uint64 serverGroupID);
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupClientListEvent(uint64 serverConnectionHandlerID, uint64 serverGroupID, uint64 clientDatabaseID, const char* clientNameIdentifier, const char* clientUniqueID);
PLUGINS_EXPORTDLL void ts3plugin_onChannelGroupListEvent(uint64 serverConnectionHandlerID, uint64 channelGroupID, const char* name, int type, int iconID, int saveDB);
PLUGINS_EXPORTDLL void ts3plugin_onChannelGroupListFinishedEvent(uint64 serverConnectionHandlerID);
PLUGINS_EXPORTDLL void ts3plugin_onChannelGroupPermListEvent(uint64 serverConnectionHandlerID, uint64 channelGroupID, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
PLUGINS_EXPORTDLL void ts3plugin_onChannelGroupPermListFinishedEvent(uint64 serverConnectionHandlerID, uint64 channelGroupID);
PLUGINS_EXPORTDLL void ts3plugin_onChannelPermListEvent(uint64 serverConnectionHandlerID, uint64 channelID, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
PLUGINS_EXPORTDLL void ts3plugin_onChannelPermListFinishedEvent(uint64 serverConnectionHandlerID, uint64 channelID);
PLUGINS_EXPORTDLL void ts3plugin_onClientPermListEvent(uint64 serverConnectionHandlerID, uint64 clientDatabaseID, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
PLUGINS_EXPORTDLL void ts3plugin_onClientPermListFinishedEvent(uint64 serverConnectionHandlerID, uint64 clientDatabaseID);
PLUGINS_EXPORTDLL void ts3plugin_onChannelClientPermListEvent(uint64 serverConnectionHandlerID, uint64 channelID, uint64 clientDatabaseID, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
PLUGINS_EXPORTDLL void ts3plugin_onChannelClientPermListFinishedEvent(uint64 serverConnectionHandlerID, uint64 channelID, uint64 clientDatabaseID);
PLUGINS_EXPORTDLL void ts3plugin_onClientChannelGroupChangedEvent(uint64 serverConnectionHandlerID, uint64 channelGroupID, uint64 channelID, anyID clientID, anyID invokerClientID, const char* invokerName, const char* invokerUniqueIdentity);
PLUGINS_EXPORTDLL int ts3plugin_onServerPermissionErrorEvent(uint64 serverConnectionHandlerID, const char* errorMessage, unsigned int error, const char* returnCode, unsigned int failedPermissionID);
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_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_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);
PLUGINS_EXPORTDLL void ts3plugin_onClientChatClosedEvent(uint64 serverConnectionHandlerID, anyID clientID, const char* clientUniqueIdentity);
PLUGINS_EXPORTDLL void ts3plugin_onClientChatComposingEvent(uint64 serverConnectionHandlerID, anyID clientID, const char* clientUniqueIdentity);
PLUGINS_EXPORTDLL void ts3plugin_onServerLogEvent(uint64 serverConnectionHandlerID, const char* logMsg);
PLUGINS_EXPORTDLL void ts3plugin_onServerLogFinishedEvent(uint64 serverConnectionHandlerID, uint64 lastPos, uint64 fileSize);
PLUGINS_EXPORTDLL void ts3plugin_onMessageListEvent(uint64 serverConnectionHandlerID, uint64 messageID, const char* fromClientUniqueIdentity, const char* subject, uint64 timestamp, int flagRead);
PLUGINS_EXPORTDLL void ts3plugin_onMessageGetEvent(uint64 serverConnectionHandlerID, uint64 messageID, const char* fromClientUniqueIdentity, const char* subject, const char* message, uint64 timestamp);
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, 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);
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);
/* Client UI callbacks */
PLUGINS_EXPORTDLL void ts3plugin_onAvatarUpdated(uint64 serverConnectionHandlerID, anyID clientID, const char* avatarPath);
PLUGINS_EXPORTDLL void ts3plugin_onMenuItemEvent(uint64 serverConnectionHandlerID, enum PluginMenuType type, int menuItemID, uint64 selectedItemID);
PLUGINS_EXPORTDLL void ts3plugin_onHotkeyEvent(const char* keyword);
PLUGINS_EXPORTDLL void ts3plugin_onHotkeyRecordedEvent(const char* keyword, const char* key);
PLUGINS_EXPORTDLL void ts3plugin_onClientDisplayNameChanged(uint64 serverConnectionHandlerID, anyID clientID, const char* displayName, const char* uniqueClientIdentifier);
#ifdef __cplusplus
}
#endif
#endif
#ifndef PLUGIN_DEFINITIONS
#define PLUGIN_DEFINITIONS
/* Return values for ts3plugin_offersConfigure */
enum PluginConfigureOffer {
PLUGIN_OFFERS_NO_CONFIGURE = 0, /* Plugin does not implement ts3plugin_configure */
PLUGIN_OFFERS_CONFIGURE_NEW_THREAD, /* Plugin does implement ts3plugin_configure and requests to run this function in an own thread */
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 PluginItemType {
PLUGIN_SERVER = 0,
PLUGIN_CHANNEL,
PLUGIN_CLIENT
};
enum PluginMenuType {
PLUGIN_MENU_TYPE_GLOBAL = 0,
PLUGIN_MENU_TYPE_CHANNEL,
PLUGIN_MENU_TYPE_CLIENT
};
#define PLUGIN_MENU_BUFSZ 128
struct PluginMenuItem {
enum PluginMenuType type;
int id;
char text[PLUGIN_MENU_BUFSZ];
char icon[PLUGIN_MENU_BUFSZ];
};
#define PLUGIN_HOTKEY_BUFSZ 128
struct PluginHotkey {
char keyword[PLUGIN_HOTKEY_BUFSZ];
char description[PLUGIN_HOTKEY_BUFSZ];
};
struct PluginBookmarkList;
struct PluginBookmarkItem {
char* name;
unsigned char isFolder;
unsigned char reserved[3];
union{
char* uuid;
struct PluginBookmarkList* folder;
};
};
struct PluginBookmarkList{
int itemcount;
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 PluginConnectTab{
PLUGIN_CONNECT_TAB_NEW = 0,
PLUGIN_CONNECT_TAB_CURRENT,
PLUGIN_CONNECT_TAB_NEW_IF_CURRENT_CONNECTED
};
#endif
#pragma once
#include <QtCore/qglobal.h>
#ifndef BUILD_STATIC
# if defined(QTTSOVERLAY_LIB)
# define QTTSOVERLAY_EXPORT Q_DECL_EXPORT
# else
# define QTTSOVERLAY_EXPORT Q_DECL_IMPORT
# endif
#else
# define QTTSOVERLAY_EXPORT
#endif
#ifndef TEAMLOG_LOGTYPES_H
#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,
};
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)
};
#endif //TEAMLOG_LOGTYPES_H
#ifndef CLIENTLIB_PUBLICDEFINITIONS_H
#define CLIENTLIB_PUBLICDEFINITIONS_H
enum Visibility {
ENTER_VISIBILITY = 0,
RETAIN_VISIBILITY,
LEAVE_VISIBILITY
};
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 clientID yet, we haven't been accepted by the server
STATUS_CONNECTED, //The server has accepted us, we can talk and hear and we got a clientID, but we don't have the channels and clients yet, we can get server infos (welcome msg etc.)
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 = 1,
TEST_MODE_VOICE_LOCAL_AND_REMOTE = 2,
};
#endif //CLIENTLIB_PUBLICDEFINITIONS_H
#ifndef PUBLIC_DEFINITIONS_H
#define PUBLIC_DEFINITIONS_H
#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
//limited length, measured in bytes (utf8 encoded)
#define TS3_MAX_SIZE_TEXTMESSAGE 1024
#define TS3_MAX_SIZE_CHANNEL_TOPIC 255
#define TS3_MAX_SIZE_CHANNEL_DESCRIPTION 8192
#define TS3_MAX_SIZE_VIRTUALSERVER_WELCOMEMESSAGE 1024
//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;
#ifdef BUILDING_DLL
#define EXPORTDLL __declspec(dllexport)
#else
#define EXPORTDLL
#endif
#else
#include <stdint.h>
typedef uint16_t anyID;
typedef uint64_t uint64;
#ifdef BUILDING_DLL
#define EXPORTDLL __attribute__ ((visibility("default")))
#else
#define EXPORTDLL
#endif
#endif
enum TalkStatus {
STATUS_NOT_TALKING = 0,
STATUS_TALKING = 1,
STATUS_TALKING_WHILE_DISABLED = 2,
};
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
};
enum CodecEncryptionMode {
CODEC_ENCRYPTION_PER_CHANNEL = 0,
CODEC_ENCRYPTION_FORCED_OFF,
CODEC_ENCRYPTION_FORCED_ON,
};
enum TextMessageTargetMode {
TextMessageTarget_CLIENT=1,
TextMessageTarget_CHANNEL,
TextMessageTarget_SERVER,
TextMessageTarget_MAX
};
enum MuteInputStatus {
MUTEINPUT_NONE = 0,
MUTEINPUT_MUTED,
};
enum MuteOutputStatus {
MUTEOUTPUT_NONE = 0,
MUTEOUTPUT_MUTED,
};
enum HardwareInputStatus {
HARDWAREINPUT_DISABLED = 0,
HARDWAREINPUT_ENABLED,
};
enum HardwareOutputStatus {
HARDWAREOUTPUT_DISABLED = 0,
HARDWAREOUTPUT_ENABLED,
};
enum InputDeactivationStatus {
INPUT_ACTIVE = 0,
INPUT_DEACTIVATED = 1,
};
enum ReasonIdentifier {
REASON_NONE = 0, //no reason data
REASON_MOVED = 1, //{SectionInvoker}
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
REASON_KICK_SERVER = 5, //{SectionInvoker} reasonmsg=reason //{SectionInvoker} is only added server->client
REASON_KICK_SERVER_BAN = 6, //{SectionInvoker} reasonmsg=reason bantime=time //{SectionInvoker} is only added server->client
REASON_SERVERSTOP = 7, //reasonmsg=reason
REASON_CLIENTDISCONNECT = 8, //reasonmsg=reason
REASON_CHANNELUPDATE = 9, //no reason data
REASON_CHANNELEDIT = 10, //{SectionInvoker}
REASON_CLIENTDISCONNECT_SERVER_SHUTDOWN = 11, //reasonmsg=reason
};
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_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_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_ENDMARKER,
};
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,
};
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. */
} TS3_VECTOR;
enum GroupWhisperType {
GROUPWHISPERTYPE_SERVERGROUP = 0,
GROUPWHISPERTYPE_CHANNELGROUP = 1,
GROUPWHISPERTYPE_CHANNELCOMMANDER = 2,
GROUPWHISPERTYPE_ALLCLIENTS = 3,
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_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 */
};
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 */
};
/*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,