diff --git a/pluginsdk/include/teamlog/logtypes.h b/pluginsdk/include/teamlog/logtypes.h old mode 100644 new mode 100755 diff --git a/pluginsdk/include/teamspeak/clientlib_publicdefinitions.h b/pluginsdk/include/teamspeak/clientlib_publicdefinitions.h index d8b3c1f..35c0b84 100644 --- a/pluginsdk/include/teamspeak/clientlib_publicdefinitions.h +++ b/pluginsdk/include/teamspeak/clientlib_publicdefinitions.h @@ -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 diff --git a/pluginsdk/include/teamspeak/public_definitions.h b/pluginsdk/include/teamspeak/public_definitions.h index ecb61dc..f6b720e 100644 --- a/pluginsdk/include/teamspeak/public_definitions.h +++ b/pluginsdk/include/teamspeak/public_definitions.h @@ -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 @@ -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, }; @@ -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, }; @@ -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, }; diff --git a/pluginsdk/include/teamspeak/public_errors.h b/pluginsdk/include/teamspeak/public_errors.h index ac827ad..0659d3d 100644 --- a/pluginsdk/include/teamspeak/public_errors.h +++ b/pluginsdk/include/teamspeak/public_errors.h @@ -3,186 +3,192 @@ //The idea here is: the values are 2 bytes wide, the first byte identifies the group, the second the count within that group -//general -const unsigned int ERROR_ok = 0x0000; -const unsigned int ERROR_undefined = 0x0001; -const unsigned int ERROR_not_implemented = 0x0002; -const unsigned int ERROR_ok_no_update = 0x0003; -const unsigned int ERROR_dont_notify = 0x0004; -const unsigned int ERROR_lib_time_limit_reached = 0x0005; +enum Ts3ErrorType { + //general + ERROR_ok = 0x0000, + ERROR_undefined = 0x0001, + ERROR_not_implemented = 0x0002, + ERROR_ok_no_update = 0x0003, + ERROR_dont_notify = 0x0004, + ERROR_lib_time_limit_reached = 0x0005, + ERROR_out_of_memory = 0x0006, + ERROR_canceled = 0x0007, -//dunno -const unsigned int ERROR_command_not_found = 0x0100; -const unsigned int ERROR_unable_to_bind_network_port = 0x0101; -const unsigned int ERROR_no_network_port_available = 0x0102; -const unsigned int ERROR_port_already_in_use = 0x0103; + //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, -//client -const unsigned int ERROR_client_invalid_id = 0x0200; -const unsigned int ERROR_client_nickname_inuse = 0x0201; -const unsigned int ERROR_client_protocol_limit_reached = 0x0203; -const unsigned int ERROR_client_invalid_type = 0x0204; -const unsigned int ERROR_client_already_subscribed = 0x0205; -const unsigned int ERROR_client_not_logged_in = 0x0206; -const unsigned int ERROR_client_could_not_validate_identity = 0x0207; -const unsigned int ERROR_client_version_outdated = 0x020a; -const unsigned int ERROR_client_is_flooding = 0x020c; -const unsigned int ERROR_client_hacked = 0x020d; -const unsigned int ERROR_client_cannot_verify_now = 0x020e; -const unsigned int ERROR_client_login_not_permitted = 0x020f; -const unsigned int ERROR_client_not_subscribed = 0x0210; + //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_not_logged_in = 0x0206, + ERROR_client_could_not_validate_identity = 0x0207, + ERROR_client_version_outdated = 0x020a, + ERROR_client_is_flooding = 0x020c, + ERROR_client_hacked = 0x020d, + ERROR_client_cannot_verify_now = 0x020e, + ERROR_client_login_not_permitted = 0x020f, + ERROR_client_not_subscribed = 0x0210, -//channel -const unsigned int ERROR_channel_invalid_id = 0x0300; -const unsigned int ERROR_channel_protocol_limit_reached = 0x0301; -const unsigned int ERROR_channel_already_in = 0x0302; -const unsigned int ERROR_channel_name_inuse = 0x0303; -const unsigned int ERROR_channel_not_empty = 0x0304; -const unsigned int ERROR_channel_can_not_delete_default = 0x0305; -const unsigned int ERROR_channel_default_require_permanent = 0x0306; -const unsigned int ERROR_channel_invalid_flags = 0x0307; -const unsigned int ERROR_channel_parent_not_permanent = 0x0308; -const unsigned int ERROR_channel_maxclients_reached = 0x0309; -const unsigned int ERROR_channel_maxfamily_reached = 0x030a; -const unsigned int ERROR_channel_invalid_order = 0x030b; -const unsigned int ERROR_channel_no_filetransfer_supported = 0x030c; -const unsigned int ERROR_channel_invalid_password = 0x030d; -const unsigned int ERROR_channel_invalid_security_hash = 0x030f; //note 0x030e is defined in public_rare_errors; + //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; -//server -const unsigned int ERROR_server_invalid_id = 0x0400; -const unsigned int ERROR_server_running = 0x0401; -const unsigned int ERROR_server_is_shutting_down = 0x0402; -const unsigned int ERROR_server_maxclients_reached = 0x0403; -const unsigned int ERROR_server_invalid_password = 0x0404; -const unsigned int ERROR_server_is_virtual = 0x0407; -const unsigned int ERROR_server_is_not_running = 0x0409; -const unsigned int ERROR_server_is_booting = 0x040a; -const unsigned int ERROR_server_status_invalid = 0x040b; -const unsigned int ERROR_server_version_outdated = 0x040d; -const unsigned int ERROR_server_duplicate_running = 0x040e; + //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_status_invalid = 0x040b, + ERROR_server_version_outdated = 0x040d, + ERROR_server_duplicate_running = 0x040e, -//parameter -const unsigned int ERROR_parameter_quote = 0x0600; -const unsigned int ERROR_parameter_invalid_count = 0x0601; -const unsigned int ERROR_parameter_invalid = 0x0602; -const unsigned int ERROR_parameter_not_found = 0x0603; -const unsigned int ERROR_parameter_convert = 0x0604; -const unsigned int ERROR_parameter_invalid_size = 0x0605; -const unsigned int ERROR_parameter_missing = 0x0606; -const unsigned int ERROR_parameter_checksum = 0x0607; + //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, -//unsorted, need further investigation -const unsigned int ERROR_vs_critical = 0x0700; -const unsigned int ERROR_connection_lost = 0x0701; -const unsigned int ERROR_not_connected = 0x0702; -const unsigned int ERROR_no_cached_connection_info = 0x0703; -const unsigned int ERROR_currently_not_possible = 0x0704; -const unsigned int ERROR_failed_connection_initialisation = 0x0705; -const unsigned int ERROR_could_not_resolve_hostname = 0x0706; -const unsigned int ERROR_invalid_server_connection_handler_id = 0x0707; -const unsigned int ERROR_could_not_initialise_input_manager = 0x0708; -const unsigned int ERROR_clientlibrary_not_initialised = 0x0709; -const unsigned int ERROR_serverlibrary_not_initialised = 0x070a; -const unsigned int ERROR_whisper_too_many_targets = 0x070b; -const unsigned int ERROR_whisper_no_targets = 0x070c; -const unsigned int ERROR_connection_ip_protocol_missing = 0x070d; + //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_illegal_server_license = 0x070f, -//file transfer -const unsigned int ERROR_file_invalid_name = 0x0800; -const unsigned int ERROR_file_invalid_permissions = 0x0801; -const unsigned int ERROR_file_already_exists = 0x0802; -const unsigned int ERROR_file_not_found = 0x0803; -const unsigned int ERROR_file_io_error = 0x0804; -const unsigned int ERROR_file_invalid_transfer_id = 0x0805; -const unsigned int ERROR_file_invalid_path = 0x0806; -const unsigned int ERROR_file_no_files_available = 0x0807; -const unsigned int ERROR_file_overwrite_excludes_resume = 0x0808; -const unsigned int ERROR_file_invalid_size = 0x0809; -const unsigned int ERROR_file_already_in_use = 0x080a; -const unsigned int ERROR_file_could_not_open_connection = 0x080b; -const unsigned int ERROR_file_no_space_left_on_device = 0x080c; -const unsigned int ERROR_file_exceeds_file_system_maximum_size = 0x080d; -const unsigned int ERROR_file_transfer_connection_timeout = 0x080e; -const unsigned int ERROR_file_connection_lost = 0x080f; -const unsigned int ERROR_file_exceeds_supplied_size = 0x0810; -const unsigned int ERROR_file_transfer_complete = 0x0811; -const unsigned int ERROR_file_transfer_canceled = 0x0812; -const unsigned int ERROR_file_transfer_interrupted = 0x0813; -const unsigned int ERROR_file_transfer_server_quota_exceeded = 0x0814; -const unsigned int ERROR_file_transfer_client_quota_exceeded = 0x0815; -const unsigned int ERROR_file_transfer_reset = 0x0816; -const unsigned int ERROR_file_transfer_limit_reached = 0x0817; + //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, + + //sound + ERROR_sound_preprocessor_disabled = 0x0900, + 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_internal_capture = 0x090e, + ERROR_sound_device_in_use = 0x090f, + ERROR_sound_device_already_registerred = 0x0910, + ERROR_sound_unknown_device = 0x0911, + ERROR_sound_unsupported_frequency = 0x0912, + ERROR_sound_invalid_channel_count = 0x0913, + ERROR_sound_read_wave = 0x0914, + 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, -//sound -const unsigned int ERROR_sound_preprocessor_disabled = 0x0900; -const unsigned int ERROR_sound_internal_preprocessor = 0x0901; -const unsigned int ERROR_sound_internal_encoder = 0x0902; -const unsigned int ERROR_sound_internal_playback = 0x0903; -const unsigned int ERROR_sound_no_capture_device_available = 0x0904; -const unsigned int ERROR_sound_no_playback_device_available = 0x0905; -const unsigned int ERROR_sound_could_not_open_capture_device = 0x0906; -const unsigned int ERROR_sound_could_not_open_playback_device = 0x0907; -const unsigned int ERROR_sound_handler_has_device = 0x0908; -const unsigned int ERROR_sound_invalid_capture_device = 0x0909; -const unsigned int ERROR_sound_invalid_playback_device = 0x090a; -const unsigned int ERROR_sound_invalid_wave = 0x090b; -const unsigned int ERROR_sound_unsupported_wave = 0x090c; -const unsigned int ERROR_sound_open_wave = 0x090d; -const unsigned int ERROR_sound_internal_capture = 0x090e; -const unsigned int ERROR_sound_device_in_use = 0x090f; -const unsigned int ERROR_sound_device_already_registerred = 0x0910; -const unsigned int ERROR_sound_unknown_device = 0x0911; -const unsigned int ERROR_sound_unsupported_frequency = 0x0912; -const unsigned int ERROR_sound_invalid_channel_count = 0x0913; -const unsigned int ERROR_sound_read_wave = 0x0914; -const unsigned int ERROR_sound_need_more_data = 0x0915; //for internal purposes only -const unsigned int ERROR_sound_device_busy = 0x0916; //for internal purposes only -const unsigned int ERROR_sound_no_data = 0x0917; -const unsigned int ERROR_sound_channel_mask_mismatch = 0x0918; + //permissions + ERROR_permissions_client_insufficient = 0x0a08, + ERROR_permissions = 0x0a0c, -//permissions -const unsigned int ERROR_permissions_client_insufficient = 0x0a08; -const unsigned int ERROR_permissions = 0x0a0c; + //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_not_started = 0x0b0d, + ERROR_accounting_to_many_starts = 0x0b0e, -//accounting -const unsigned int ERROR_accounting_virtualserver_limit_reached = 0x0b00; -const unsigned int ERROR_accounting_slot_limit_reached = 0x0b01; -const unsigned int ERROR_accounting_license_file_not_found = 0x0b02; -const unsigned int ERROR_accounting_license_date_not_ok = 0x0b03; -const unsigned int ERROR_accounting_unable_to_connect_to_server = 0x0b04; -const unsigned int ERROR_accounting_unknown_error = 0x0b05; -const unsigned int ERROR_accounting_server_error = 0x0b06; -const unsigned int ERROR_accounting_instance_limit_reached = 0x0b07; -const unsigned int ERROR_accounting_instance_check_error = 0x0b08; -const unsigned int ERROR_accounting_license_file_invalid = 0x0b09; -const unsigned int ERROR_accounting_running_elsewhere = 0x0b0a; -const unsigned int ERROR_accounting_instance_duplicated = 0x0b0b; -const unsigned int ERROR_accounting_already_started = 0x0b0c; -const unsigned int ERROR_accounting_not_started = 0x0b0d; -const unsigned int ERROR_accounting_to_many_starts = 0x0b0e; - -//provisioning server -const unsigned int ERROR_provisioning_invalid_password = 0x1100; -const unsigned int ERROR_provisioning_invalid_request = 0x1101; -const unsigned int ERROR_provisioning_no_slots_available = 0x1102; -const unsigned int ERROR_provisioning_pool_missing = 0x1103; -const unsigned int ERROR_provisioning_pool_unknown = 0x1104; -const unsigned int ERROR_provisioning_unknown_ip_location = 0x1105; -const unsigned int ERROR_provisioning_internal_tries_exceeded = 0x1106; -const unsigned int ERROR_provisioning_too_many_slots_requested = 0x1107; -const unsigned int ERROR_provisioning_too_many_reserved = 0x1108; -const unsigned int ERROR_provisioning_could_not_connect = 0x1109; -const unsigned int ERROR_provisioning_auth_server_not_connected = 0x1110; -const unsigned int ERROR_provisioning_auth_data_too_large = 0x1111; -const unsigned int ERROR_provisioning_already_initialized = 0x1112; -const unsigned int ERROR_provisioning_not_initialized = 0x1113; -const unsigned int ERROR_provisioning_connecting = 0x1114; -const unsigned int ERROR_provisioning_already_connected = 0x1115; -const unsigned int ERROR_provisioning_not_connected = 0x1116; -const unsigned int ERROR_provisioning_io_error = 0x1117; -const unsigned int ERROR_provisioning_invalid_timeout = 0x1118; -const unsigned int ERROR_provisioning_ts3server_not_found = 0x1119; -const unsigned int ERROR_provisioning_no_permission = 0x111A; + //provisioning server + ERROR_provisioning_invalid_password = 0x1100, + ERROR_provisioning_invalid_request = 0x1101, + ERROR_provisioning_no_slots_available = 0x1102, + ERROR_provisioning_pool_missing = 0x1103, + ERROR_provisioning_pool_unknown = 0x1104, + ERROR_provisioning_unknown_ip_location = 0x1105, + ERROR_provisioning_internal_tries_exceeded = 0x1106, + ERROR_provisioning_too_many_slots_requested = 0x1107, + ERROR_provisioning_too_many_reserved = 0x1108, + ERROR_provisioning_could_not_connect = 0x1109, + ERROR_provisioning_auth_server_not_connected = 0x1110, + ERROR_provisioning_auth_data_too_large = 0x1111, + ERROR_provisioning_already_initialized = 0x1112, + ERROR_provisioning_not_initialized = 0x1113, + ERROR_provisioning_connecting = 0x1114, + ERROR_provisioning_already_connected = 0x1115, + ERROR_provisioning_not_connected = 0x1116, + ERROR_provisioning_io_error = 0x1117, + ERROR_provisioning_invalid_timeout = 0x1118, + ERROR_provisioning_ts3server_not_found = 0x1119, + ERROR_provisioning_no_permission = 0x111A, +}; #endif diff --git a/pluginsdk/include/teamspeak/public_errors_rare.h b/pluginsdk/include/teamspeak/public_errors_rare.h index 87816ea..8a54792 100644 --- a/pluginsdk/include/teamspeak/public_errors_rare.h +++ b/pluginsdk/include/teamspeak/public_errors_rare.h @@ -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 diff --git a/pluginsdk/include/teamspeak/public_rare_definitions.h b/pluginsdk/include/teamspeak/public_rare_definitions.h index a07c951..c4e4cdc 100644 --- a/pluginsdk/include/teamspeak/public_rare_definitions.h +++ b/pluginsdk/include/teamspeak/public_rare_definitions.h @@ -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, @@ -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, @@ -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) @@ -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) @@ -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, @@ -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, @@ -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 { @@ -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, @@ -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); diff --git a/pluginsdk/include/ts3_functions.h b/pluginsdk/include/ts3_functions.h index c6264c9..348a4b1 100644 --- a/pluginsdk/include/ts3_functions.h +++ b/pluginsdk/include/ts3_functions.h @@ -66,7 +66,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); @@ -194,11 +194,11 @@ struct TS3Functions { /* Interacting with the server - banning */ unsigned int (*banclient)(uint64 serverConnectionHandlerID, anyID clientID, uint64 timeInSeconds, const char* banReason, const char* returnCode); - unsigned int (*banadd)(uint64 serverConnectionHandlerID, const char* ipRegExp, const char* nameRegexp, const char* uniqueIdentity, uint64 timeInSeconds, const char* banReason, const char* returnCode); + unsigned int (*banadd)(uint64 serverConnectionHandlerID, const char* ipRegExp, const char* nameRegexp, const char* uniqueIdentity, const char* mytsID, uint64 timeInSeconds, const char* banReason, const char* returnCode); unsigned int (*banclientdbid)(uint64 serverConnectionHandlerID, uint64 clientDBID, uint64 timeInSeconds, const char* banReason, const char* returnCode); unsigned int (*bandel)(uint64 serverConnectionHandlerID, uint64 banID, const char* returnCode); unsigned int (*bandelall)(uint64 serverConnectionHandlerID, const char* returnCode); - unsigned int (*requestBanList)(uint64 serverConnectionHandlerID, const char* returnCode); + unsigned int (*requestBanList)(uint64 serverConnectionHandlerID, uint64 start, unsigned int duration, const char* returnCode); /* Interacting with the server - complain */ unsigned int (*requestComplainAdd)(uint64 serverConnectionHandlerID, uint64 targetClientDatabaseID, const char* complainReason, const char* returnCode); @@ -273,7 +273,29 @@ struct TS3Functions { 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); + 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); }; #ifdef __cplusplus diff --git a/src/plugin.cpp b/src/plugin.cpp index dabfa86..50575fd 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -32,7 +32,7 @@ #define _strcpy(dest, destSize, src) { strncpy(dest, src, destSize-1); (dest)[destSize-1] = '\0'; } #endif -#define PLUGIN_API_VERSION 23 +#define PLUGIN_API_VERSION 24 diff --git a/src/soundview_qt.h b/src/soundview_qt.h index 0daf418..2796dfc 100644 --- a/src/soundview_qt.h +++ b/src/soundview_qt.h @@ -11,6 +11,7 @@ #define rpsbsrc__soundview_qt_H__ #include +#include #include #include "SoundInfo.h"