Skip to content

Commit

Permalink
Merge pull request #96 from frebib/api-24
Browse files Browse the repository at this point in the history
Updated to API Version 24 & fix QT 5.10 build
  • Loading branch information
MGraefe authored Nov 26, 2020
2 parents 23b0cbf + d1475c4 commit a7653d6
Show file tree
Hide file tree
Showing 9 changed files with 348 additions and 252 deletions.
Empty file modified pluginsdk/include/teamlog/logtypes.h
100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions pluginsdk/include/teamspeak/clientlib_publicdefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ enum ConnectStatus {

enum LocalTestMode {
TEST_MODE_OFF = 0,
TEST_MODE_VOICE_LOCAL_ONLY = 1,
TEST_MODE_VOICE_LOCAL_AND_REMOTE = 2,
TEST_MODE_VOICE_LOCAL_ONLY,
TEST_MODE_VOICE_LOCAL_AND_REMOTE,
TEST_MODE_TALK_STATUS_CHANGES_ONLY
};

#endif //CLIENTLIB_PUBLICDEFINITIONS_H
6 changes: 5 additions & 1 deletion pluginsdk/include/teamspeak/public_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
#define TS3_MAX_SIZE_REASON_MESSAGE 80

//limited length, measured in bytes (utf8 encoded)
#define TS3_MAX_SIZE_TEXTMESSAGE 1024
#define TS3_MAX_SIZE_TEXTMESSAGE 8192
#define TS3_MAX_SIZE_CHANNEL_TOPIC 255
#define TS3_MAX_SIZE_CHANNEL_DESCRIPTION 8192
#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
Expand Down Expand Up @@ -124,6 +125,7 @@ enum ChannelProperties {
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_UNIQUE_IDENTIFIER, //Available for all channels that are "in view"
CHANNEL_ENDMARKER,
};

Expand All @@ -149,6 +151,7 @@ enum ClientProperties {
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_ENDMARKER,
};

Expand All @@ -165,6 +168,7 @@ enum VirtualServerProperties {
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_ENDMARKER,
};

Expand Down
348 changes: 177 additions & 171 deletions pluginsdk/include/teamspeak/public_errors.h

Large diffs are not rendered by default.

134 changes: 82 additions & 52 deletions pluginsdk/include/teamspeak/public_errors_rare.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,96 @@

//The idea here is: the values are 2 bytes wide, the first byte identifies the group, the second the count within that group

//client
const unsigned int ERROR_client_invalid_password = 0x0208;
const unsigned int ERROR_client_too_many_clones_connected = 0x0209;
const unsigned int ERROR_client_is_online = 0x020b;
enum Ts3RareErrorType {
//client
ERROR_client_invalid_password = 0x0208,
ERROR_client_too_many_clones_connected = 0x0209,
ERROR_client_is_online = 0x020b,

//channel
const unsigned int ERROR_channel_is_private_channel = 0x030e;
//note 0x030f is defined in public_errors;
//channel
ERROR_channel_is_private_channel = 0x030e,
//note 0x030f is defined in public_errors;

//database
const unsigned int ERROR_database = 0x0500;
const unsigned int ERROR_database_empty_result = 0x0501;
const unsigned int ERROR_database_duplicate_entry = 0x0502;
const unsigned int ERROR_database_no_modifications = 0x0503;
const unsigned int ERROR_database_constraint = 0x0504;
const unsigned int ERROR_database_reinvoke = 0x0505;
//database
ERROR_database = 0x0500,
ERROR_database_empty_result = 0x0501,
ERROR_database_duplicate_entry = 0x0502,
ERROR_database_no_modifications = 0x0503,
ERROR_database_constraint = 0x0504,
ERROR_database_reinvoke = 0x0505,

//permissions
const unsigned int ERROR_permission_invalid_group_id = 0x0a00;
const unsigned int ERROR_permission_duplicate_entry = 0x0a01;
const unsigned int ERROR_permission_invalid_perm_id = 0x0a02;
const unsigned int ERROR_permission_empty_result = 0x0a03;
const unsigned int ERROR_permission_default_group_forbidden = 0x0a04;
const unsigned int ERROR_permission_invalid_size = 0x0a05;
const unsigned int ERROR_permission_invalid_value = 0x0a06;
const unsigned int ERROR_permissions_group_not_empty = 0x0a07;
const unsigned int ERROR_permissions_insufficient_group_power = 0x0a09;
const unsigned int ERROR_permissions_insufficient_permission_power = 0x0a0a;
const unsigned int ERROR_permission_template_group_is_used = 0x0a0b;
//0x0a0c is in public_errors.h
//permissions
ERROR_permission_invalid_group_id = 0x0a00,
ERROR_permission_duplicate_entry = 0x0a01,
ERROR_permission_invalid_perm_id = 0x0a02,
ERROR_permission_empty_result = 0x0a03,
ERROR_permission_default_group_forbidden = 0x0a04,
ERROR_permission_invalid_size = 0x0a05,
ERROR_permission_invalid_value = 0x0a06,
ERROR_permissions_group_not_empty = 0x0a07,
ERROR_permissions_insufficient_group_power = 0x0a09,
ERROR_permissions_insufficient_permission_power = 0x0a0a,
ERROR_permission_template_group_is_used = 0x0a0b,
//0x0a0c is in public_errors.h
ERROR_permission_used_by_integration = 0x0a0d,

//server
const unsigned int ERROR_server_deployment_active = 0x0405;
const unsigned int ERROR_server_unable_to_stop_own_server = 0x0406;
const unsigned int ERROR_server_wrong_machineid = 0x0408;
const unsigned int ERROR_server_modal_quit = 0x040c;
//server
ERROR_server_deployment_active = 0x0405,
ERROR_server_unable_to_stop_own_server = 0x0406,
ERROR_server_wrong_machineid = 0x0408,
ERROR_server_modal_quit = 0x040c,
ERROR_server_time_difference_too_large = 0x040f,
ERROR_server_blacklisted = 0x0410,
ERROR_server_shutdown = 0x0411,

//messages
const unsigned int ERROR_message_invalid_id = 0x0c00;
//messages
ERROR_message_invalid_id = 0x0c00,

//ban
const unsigned int ERROR_ban_invalid_id = 0x0d00;
const unsigned int ERROR_connect_failed_banned = 0x0d01;
const unsigned int ERROR_rename_failed_banned = 0x0d02;
const unsigned int ERROR_ban_flooding = 0x0d03;
//ban
ERROR_ban_invalid_id = 0x0d00,
ERROR_connect_failed_banned = 0x0d01,
ERROR_rename_failed_banned = 0x0d02,
ERROR_ban_flooding = 0x0d03,

//tts
const unsigned int ERROR_tts_unable_to_initialize = 0x0e00;
//tts
ERROR_tts_unable_to_initialize = 0x0e00,

//privilege key
const unsigned int ERROR_privilege_key_invalid = 0x0f00;
//privilege key
ERROR_privilege_key_invalid = 0x0f00,

//voip
const unsigned int ERROR_voip_pjsua = 0x1000;
const unsigned int ERROR_voip_already_initialized = 0x1001;
const unsigned int ERROR_voip_too_many_accounts = 0x1002;
const unsigned int ERROR_voip_invalid_account = 0x1003;
const unsigned int ERROR_voip_internal_error = 0x1004;
const unsigned int ERROR_voip_invalid_connectionId = 0x1005;
const unsigned int ERROR_voip_cannot_answer_initiated_call = 0x1006;
const unsigned int ERROR_voip_not_initialized = 0x1007;
//voip
ERROR_voip_pjsua = 0x1000,
ERROR_voip_already_initialized = 0x1001,
ERROR_voip_too_many_accounts = 0x1002,
ERROR_voip_invalid_account = 0x1003,
ERROR_voip_internal_error = 0x1004,
ERROR_voip_invalid_connectionId = 0x1005,
ERROR_voip_cannot_answer_initiated_call = 0x1006,
ERROR_voip_not_initialized = 0x1007,

//ed25519
ERROR_ed25519_rng_fail = 0x1300,
ERROR_ed25519_signature_invalid = 0x1301,
ERROR_ed25519_invalid_key = 0x1302,
ERROR_ed25519_unable_to_create_valid_key = 0x1303,
ERROR_ed25519_out_of_memory = 0x1304,
ERROR_ed25519_exists = 0x1305,
ERROR_ed25519_read_beyond_eof = 0x1306,
ERROR_ed25519_write_beyond_eof = 0x1307,
ERROR_ed25519_version = 0x1308,
ERROR_ed25519_invalid = 0x1309,
ERROR_ed25519_invalid_date = 0x130A,
ERROR_ed25519_unauthorized = 0x130B,
ERROR_ed25519_invalid_type = 0x130C,
ERROR_ed25519_address_nomatch = 0x130D,
ERROR_ed25519_not_valid_yet = 0x130E,
ERROR_ed25519_expired = 0x130F,
ERROR_ed25519_index_out_of_range = 0x1310,
ERROR_ed25519_invalid_size = 0x1311,

//mytsid - client
ERROR_invalid_mytsid_data = 0x1200,
ERROR_invalid_integration = 0x1201,
};

#endif
74 changes: 53 additions & 21 deletions pluginsdk/include/teamspeak/public_rare_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,25 @@ enum CommandLinePropertiesRare {
COMMANDLINE_INIFILE,
COMMANDLINE_LOGQUERYCOMMANDS,
COMMANDLINE_DBCLIENTKEEPDAYS,
COMMANDLINE_THREADS_QUERY_TCP,
COMMANDLINE_NO_PERMISSION_UPDATE,
COMMANDLINE_OPEN_WIN_CONSOLE,
COMMANDLINE_NO_PASSWORD_DIALOG,
COMMANDLINE_LOGAPPEND,
COMMANDLINE_QUERY_SKIPBRUTEFORCECHECK,
COMMANDLINE_QUERY_BUFFER_MB,
COMMANDLINE_HTTP_PROXY,
COMMANDLINE_LICENSE_ACCEPTED,
COMMANDLINE_SERVERQUERYDOCS_PATH,
COMMANDLINE_QUERY_SSH_IP,
COMMANDLINE_QUERY_SSH_PORT,
COMMANDLINE_QUERY_PROTOCOLS,
COMMANDLINE_QUERY_SSH_RSA_HOST_KEY,
COMMANDLINE_QUERY_TIMEOUT,
COMMANDLINE_VERSION,
COMMANDLINE_CRASHDUMPSPATH,
COMMANDLINE_DAEMON,
COMMANDLINE_PID_FILE,
COMMANDLINE_HINTS_ENABLED,
#endif
#else
COMMANDLINE_NOTHING=0,
Expand All @@ -122,12 +135,12 @@ enum ServerInstancePropertiesRare {
SERVERINSTANCE_TEMPLATE_CHANNELDEFAULT_GROUP,
SERVERINSTANCE_PERMISSIONS_VERSION,
SERVERINSTANCE_PENDING_CONNECTIONS_PER_IP,
SERVERINSTANCE_SERVERQUERY_MAX_CONNECTIONS_PER_IP,
SERVERINSTANCE_ENDMARKER_RARE,
};

enum VirtualServerPropertiesRare {
VIRTUALSERVER_DUMMY_0= VIRTUALSERVER_ENDMARKER,
VIRTUALSERVER_DUMMY_1,
VIRTUALSERVER_DUMMY_1 = VIRTUALSERVER_ENDMARKER,
VIRTUALSERVER_DUMMY_2,
VIRTUALSERVER_DUMMY_3,
VIRTUALSERVER_DUMMY_4,
Expand All @@ -141,11 +154,11 @@ enum VirtualServerPropertiesRare {
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_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_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_HOSTBANNER_URL, //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)
Expand All @@ -159,9 +172,9 @@ enum VirtualServerPropertiesRare {
VIRTUALSERVER_ANTIFLOOD_POINTS_NEEDED_IP_BLOCK, //only available on request (=> requestServerVariables)
VIRTUALSERVER_CLIENT_CONNECTIONS, //only available on request (=> requestServerVariables)
VIRTUALSERVER_QUERY_CLIENT_CONNECTIONS, //only available on request (=> requestServerVariables)
VIRTUALSERVER_HOSTBUTTON_TOOLTIP, //available when connected, always up-to-date
VIRTUALSERVER_HOSTBUTTON_URL, //available when connected, always up-to-date
VIRTUALSERVER_HOSTBUTTON_GFX_URL, //available when connected, always up-to-date
VIRTUALSERVER_HOSTBUTTON_TOOLTIP, //available when connected, always up-to-date
VIRTUALSERVER_HOSTBUTTON_URL, //available when connected, always up-to-date
VIRTUALSERVER_HOSTBUTTON_GFX_URL, //available when connected, always up-to-date
VIRTUALSERVER_QUERYCLIENTS_ONLINE, //only available on request (=> requestServerVariables)
VIRTUALSERVER_DOWNLOAD_QUOTA, //only available on request (=> requestServerVariables)
VIRTUALSERVER_UPLOAD_QUOTA, //only available on request (=> requestServerVariables)
Expand Down Expand Up @@ -196,13 +209,16 @@ enum VirtualServerPropertiesRare {
VIRTUALSERVER_CHANNEL_TEMP_DELETE_DELAY_DEFAULT, //available when connected, always up-to-date
VIRTUALSERVER_MIN_ANDROID_VERSION, //only available on request (=> requestServerVariables)
VIRTUALSERVER_MIN_IOS_VERSION, //only available on request (=> requestServerVariables)
VIRTUALSERVER_MIN_WINPHONE_VERSION, //only available on request (=> requestServerVariables)
VIRTUALSERVER_MIN_WINPHONE_VERSION, //only available on request (=> requestServerVariables)
VIRTUALSERVER_NICKNAME, //available when connected, always up-to-date
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_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,
Expand All @@ -216,13 +232,15 @@ enum ChannelPropertiesRare {
CHANNEL_FORCED_SILENCE, //Available for all channels that are "in view", always up-to-date
CHANNEL_NAME_PHONETIC, //Available for all channels that are "in view", always up-to-date
CHANNEL_ICON_ID, //Available for all channels that are "in view", always up-to-date
CHANNEL_FLAG_PRIVATE, //Available for all channels that are "in view", always up-to-date
CHANNEL_ENDMARKER_RARE
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_ENDMARKER_RARE,
CHANNEL_DELETE_DELAY_DEADLINE = 127 //(for clientlibv2) expected delete time in monotonic clock seconds or 0 if nothing is expected
};

enum ClientPropertiesRare {
CLIENT_DUMMY_3= CLIENT_ENDMARKER,
CLIENT_DUMMY_4,
CLIENT_DUMMY_4 = CLIENT_ENDMARKER,
CLIENT_DUMMY_5,
CLIENT_DUMMY_6,
CLIENT_DUMMY_7,
Expand Down Expand Up @@ -261,7 +279,14 @@ enum ClientPropertiesRare {
CLIENT_COUNTRY, //automatically up-to-date for any client "in view"
CLIENT_CHANNEL_GROUP_INHERITED_CHANNEL_ID, //automatically up-to-date for any client "in view", only valid with PERMISSION feature, contains channel_id where the channel_group_id is set from
CLIENT_BADGES, //automatically up-to-date for any client "in view", stores icons for partner badges
CLIENT_MYTEAMSPEAK_ID, //automatically up-to-date for any client "in view", stores myteamspeak id
CLIENT_INTEGRATIONS, //automatically up-to-date for any client "in view", stores integrations
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_ENDMARKER_RARE,
CLIENT_HW_ID = 127 //(for clientlibv2) unique hardware id
};

enum ConnectionPropertiesRare {
Expand All @@ -282,12 +307,6 @@ enum ConnectionPropertiesRare {
CONNECTION_ENDMARKER_RARE,
};

enum LicenseViolationType {
NO_VIOLATION = 0,
SLOT_VIOLATION,
SLOT_SUSPICION
};

enum BBCodeTags {
BBCodeTag_B = 0x00000001,
BBCodeTag_I = 0x00000002,
Expand Down Expand Up @@ -323,6 +342,19 @@ 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 MytsDataUnsetFlags {
MytsDataUnsetFlag_None = 0,
MytsDataUnsetFlag_Badges = 1,
MytsDataUnsetFlag_Avatar = 1 << 1,

MytsDataUnsetFlag_All = MytsDataUnsetFlag_Badges | MytsDataUnsetFlag_Avatar // make sure "all" really contains all flags
};

typedef int(*ExtraBBCodeValidator)(void* userparam, const char* tag, const char* paramValue, int paramValueSize, const char* childValue, int childValueSize);
typedef const char* (*ExtraBBCodeParamTransform)(void* userparam, const char* tag, const char* paramValue);

Expand Down
Loading

0 comments on commit a7653d6

Please sign in to comment.