TeamTalk 5 C-API DLL: Client Event Handling

TeamTalk 5 C-API DLL Version 5.18A

Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations
Client Event Handling

This section explains how to handle events generated by the client instance. More...

## Classes

struct | TTMessage
| A struct containing the properties of an event. More...

## Typedefs

typedef enum ClientEvent | ClientEvent
| TeamTalk client event messages.
typedef enum TTType | TTType
typedef struct TTMessage | TTMessage
| A struct containing the properties of an event.

## Enumerations

enum

ClientEvent {
CLIENTEVENT_NONE = 0 , CLIENTEVENT_CON_SUCCESS = CLIENTEVENT_NONE + 10 , CLIENTEVENT_CON_CRYPT_ERROR = CLIENTEVENT_NONE + 15 , CLIENTEVENT_CON_FAILED = CLIENTEVENT_NONE + 20 ,
CLIENTEVENT_CON_LOST = CLIENTEVENT_NONE + 30 , CLIENTEVENT_CON_MAX_PAYLOAD_UPDATED = CLIENTEVENT_NONE + 40 , CLIENTEVENT_CMD_PROCESSING = CLIENTEVENT_NONE + 200 , CLIENTEVENT_CMD_ERROR = CLIENTEVENT_NONE + 210 ,
CLIENTEVENT_CMD_SUCCESS = CLIENTEVENT_NONE + 220 , CLIENTEVENT_CMD_MYSELF_LOGGEDIN = CLIENTEVENT_NONE + 230 , CLIENTEVENT_CMD_MYSELF_LOGGEDOUT = CLIENTEVENT_NONE + 240 , CLIENTEVENT_CMD_MYSELF_KICKED = CLIENTEVENT_NONE + 250 ,
CLIENTEVENT_CMD_USER_LOGGEDIN = CLIENTEVENT_NONE + 260 , CLIENTEVENT_CMD_USER_LOGGEDOUT = CLIENTEVENT_NONE + 270 , CLIENTEVENT_CMD_USER_UPDATE = CLIENTEVENT_NONE + 280 , CLIENTEVENT_CMD_USER_JOINED = CLIENTEVENT_NONE + 290 ,
CLIENTEVENT_CMD_USER_LEFT = CLIENTEVENT_NONE + 300 , CLIENTEVENT_CMD_USER_TEXTMSG = CLIENTEVENT_NONE + 310 , CLIENTEVENT_CMD_CHANNEL_NEW = CLIENTEVENT_NONE + 320 , CLIENTEVENT_CMD_CHANNEL_UPDATE = CLIENTEVENT_NONE + 330 ,
CLIENTEVENT_CMD_CHANNEL_REMOVE = CLIENTEVENT_NONE + 340 , CLIENTEVENT_CMD_SERVER_UPDATE = CLIENTEVENT_NONE + 350 , CLIENTEVENT_CMD_SERVERSTATISTICS = CLIENTEVENT_NONE + 360 , CLIENTEVENT_CMD_FILE_NEW = CLIENTEVENT_NONE + 370 ,
CLIENTEVENT_CMD_FILE_REMOVE = CLIENTEVENT_NONE + 380 , CLIENTEVENT_CMD_USERACCOUNT = CLIENTEVENT_NONE + 390 , CLIENTEVENT_CMD_BANNEDUSER = CLIENTEVENT_NONE + 400 , CLIENTEVENT_CMD_USERACCOUNT_NEW = CLIENTEVENT_NONE + 410 ,
CLIENTEVENT_CMD_USERACCOUNT_REMOVE = CLIENTEVENT_NONE + 420 , CLIENTEVENT_USER_STATECHANGE = CLIENTEVENT_NONE + 500 , CLIENTEVENT_USER_VIDEOCAPTURE = CLIENTEVENT_NONE + 510 , CLIENTEVENT_USER_MEDIAFILE_VIDEO = CLIENTEVENT_NONE + 520 ,
CLIENTEVENT_USER_DESKTOPWINDOW = CLIENTEVENT_NONE + 530 , CLIENTEVENT_USER_DESKTOPCURSOR = CLIENTEVENT_NONE + 540 , CLIENTEVENT_USER_DESKTOPINPUT = CLIENTEVENT_NONE + 550 , CLIENTEVENT_USER_RECORD_MEDIAFILE = CLIENTEVENT_NONE + 560 ,
CLIENTEVENT_USER_AUDIOBLOCK = CLIENTEVENT_NONE + 570 , CLIENTEVENT_INTERNAL_ERROR = CLIENTEVENT_NONE + 1000 , CLIENTEVENT_VOICE_ACTIVATION = CLIENTEVENT_NONE + 1010 , CLIENTEVENT_HOTKEY = CLIENTEVENT_NONE + 1020 ,
CLIENTEVENT_HOTKEY_TEST = CLIENTEVENT_NONE + 1030 , CLIENTEVENT_FILETRANSFER = CLIENTEVENT_NONE + 1040 , CLIENTEVENT_DESKTOPWINDOW_TRANSFER = CLIENTEVENT_NONE + 1050 , CLIENTEVENT_STREAM_MEDIAFILE = CLIENTEVENT_NONE + 1060 ,
CLIENTEVENT_LOCAL_MEDIAFILE = CLIENTEVENT_NONE + 1070 , CLIENTEVENT_AUDIOINPUT = CLIENTEVENT_NONE + 1080 , CLIENTEVENT_USER_FIRSTVOICESTREAMPACKET = CLIENTEVENT_NONE + 1090 , CLIENTEVENT_SOUNDDEVICE_ADDED = CLIENTEVENT_NONE + 1100 ,
CLIENTEVENT_SOUNDDEVICE_REMOVED = CLIENTEVENT_NONE + 1110 , CLIENTEVENT_SOUNDDEVICE_UNPLUGGED = CLIENTEVENT_NONE + 1120 , CLIENTEVENT_SOUNDDEVICE_NEW_DEFAULT_INPUT = CLIENTEVENT_NONE + 1130 , CLIENTEVENT_SOUNDDEVICE_NEW_DEFAULT_OUTPUT = CLIENTEVENT_NONE + 1140 ,
CLIENTEVENT_SOUNDDEVICE_NEW_DEFAULT_INPUT_COMDEVICE = CLIENTEVENT_NONE + 1150 , CLIENTEVENT_SOUNDDEVICE_NEW_DEFAULT_OUTPUT_COMDEVICE = CLIENTEVENT_NONE + 1160
}

| TeamTalk client event messages. More...

enum

TTType {
__NONE = 0 , __AUDIOCODEC = 1 , __BANNEDUSER = 2 , __VIDEOFORMAT = 3 ,
__OPUSCODEC = 4 , __CHANNEL = 5 , __CLIENTSTATISTICS = 6 , __REMOTEFILE = 7 ,
__FILETRANSFER = 8 , __MEDIAFILESTATUS = 9 , __SERVERPROPERTIES = 10 , __SERVERSTATISTICS = 11 ,
__SOUNDDEVICE = 12 , __SPEEXCODEC = 13 , __TEXTMESSAGE = 14 , __WEBMVP8CODEC = 15 ,
__TTMESSAGE = 16 , __USER = 17 , __USERACCOUNT = 18 , __USERSTATISTICS = 19 ,
__VIDEOCAPTUREDEVICE = 20 , __VIDEOCODEC = 21 , __AUDIOCONFIG = 22 , __SPEEXVBRCODEC = 23 ,
__VIDEOFRAME = 24 , __AUDIOBLOCK = 25 , __AUDIOFORMAT = 26 , __MEDIAFILEINFO = 27 ,
__CLIENTERRORMSG = 28 , __TTBOOL = 29 , __INT32 = 30 , __DESKTOPINPUT = 31 ,
__SPEEXDSP = 32 , __STREAMTYPE = 33 , __AUDIOPREPROCESSORTYPE = 34 , __AUDIOPREPROCESSOR = 35 ,
__TTAUDIOPREPROCESSOR = 36 , __MEDIAFILEPLAYBACK = 37 , __CLIENTKEEPALIVE = 38 , __UINT32 = 39 ,
__AUDIOINPUTPROGRESS = 40 , __JITTERCONFIG = 41 , __WEBRTCAUDIOPREPROCESSOR = 42 , __ENCRYPTIONCONTEXT = 43 ,
__SOUNDDEVICEEFFECTS = 44 , __DESKTOPWINDOW = 45 , __ABUSEPREVENTION = 46
}

## Detailed Description

This section explains how to handle events generated by the client instance.

When events occur in the client instance, like e.g. if a new user joins a channel, the client instance queues a TTMessage which the user application must retrieve using TT_GetMessage(). The message queue for events is limited to 1 MB. If the queue grows above the maximum size then event handling is suspended and will not be resumed until the queue size is again below the maximum size. The event INTERR_TTMESSAGE_QUEUE_OVERFLOW will be posted to the message queue if an overflow has taken place.

If TT_InitTeamTalk is used with a HWND then the events are sent to the user application with WinAPI's PostMessage(...) function and is retrieved through GetMessage(...).

Note that when an event occurs the TeamTalk client instance doesn't wait for the user application to process the event. So if e.g. a user sends a text-message and immediately after disconnects from the server, then the User, who sent the message, cannot be retrieved using TT_GetUser() since the user is no longer available when the user application starts processing the new text-message event. This is, of course, annoying when designing the user application, but the reason for this design choice it that the client instance is a realtime component which cannot wait for the UI to process data, since audio playback and recording would then be halted.

The section Client Programming Guide gives a good idea of how events are processed in a user application.

## Typedef Documentation

## ◆ ClientEvent

typedef enum ClientEvent ClientEvent

TeamTalk client event messages.

Events are retrieved using TT_GetMessage().

## ◆ TTType

typedef enum TTType TTType

## ◆ TTMessage

typedef struct TTMessage TTMessage

A struct containing the properties of an event.

The event can be retrieved by called TT_GetMessage. This struct is only required on non-Windows systems.

Section Client Event Handling explains event handling in the local client instance.

See also
  TT_GetMessage

## Enumeration Type Documentation

## ◆ ClientEvent

enum ClientEvent

TeamTalk client event messages.

Events are retrieved using TT_GetMessage().

Enumerator
CLIENTEVENT_NONE |

CLIENTEVENT_CON_SUCCESS

Connected successfully to the server.

This event is posted if TT_Connect() was successful.

TT_DoLogin can now be called in order to logon to the server.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __NONE
  See also
    TT_Connect

CLIENTEVENT_CON_CRYPT_ERROR

Failed to connect to server due to encryption error.

OpenSSL could not establish a secure connection.

Attribute values in TTMessage:

- TTMessage.nSource OpenSSL error number. Refer to <openssl/err.h>
- TTMessage.ttType __CLIENTERRORMSG
- TTMessage.clienterrormsg Placed in union of TTMessage. Contains error description based on OpenSSL's ERR_error_string_n().

CLIENTEVENT_CON_FAILED

Failed to connect to server.

This event is posted if TT_Connect fails. Ensure to call TT_Disconnect before calling TT_Connect again.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __NONE
  See also
    TT_Connect

CLIENTEVENT_CON_LOST

Connection to server has been lost.

The server is not responding to requests from the local client instance and the connection has been dropped.

TT_GetClientStatistics can be used to check when data was last received from the server.

Ensure to call TT_Disconnect before calling TT_Connect again.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __NONE
  See also
    TT_Connect

CLIENTEVENT_CON_MAX_PAYLOAD_UPDATED

The maximum size of the payload put into UDP packets has been updated.

Attribute values in TTMessage:

- TTMessage.nSource Ignored
- TTMessage.ttType __INT32
- TTMessage.nPayloadSize Placed in union of TTMessage. The maximum size in bytes of the payload data which is put in UDP packets. 0 means the max payload query failed.
  See also
    TT_QueryMaxPayload()

CLIENTEVENT_CMD_PROCESSING

A command issued by `TT_Do*` methods is being processed.

Read section Client/Server Command Processing on how to use command processing in the user application.

Attribute values in TTMessage:

- TTMessage.nSource Command ID being processed (returned by TT_Do* commands)
- TTMessage.ttType __TTBOOL
- TTMessage.bActive Placed in union of TTMessage. Is TRUE if command ID started processing and FALSE if the command has finished processing.

CLIENTEVENT_CMD_ERROR

The server rejected a command issued by the local client instance.

To figure out which command failed use the command ID returned by the TT_Do* command. Section Client/Server Command Processing explains how to use command ID.

Attribute values in TTMessage:

- TTMessage.nSource The command ID returned from the TT_Do* commands.
- TTMessage.ttType __CLIENTERRORMSG
- TTMessage.clienterrormsg Placed in union of TTMessage. Contains error description.

CLIENTEVENT_CMD_SUCCESS

The server successfully processed a command issued by the local client instance.

To figure out which command succeeded use the command ID returned by the TT_Do* command. Section Client/Server Command Processing explains how to use command ID.

Attribute values in TTMessage:

- TTMessage.nSource The command ID returned from the TT_Do* commands.
- TTMessage.ttType __NONE

CLIENTEVENT_CMD_MYSELF_LOGGEDIN

The client instance successfully logged on to server.

The call to TT_DoLogin was successful and all channels on the server will be posted in the event CLIENTEVENT_CMD_CHANNEL_NEW immediately following this event. If USERRIGHT_VIEW_ALL_USERS is enabled the client instance will also receive the events CLIENTEVENT_CMD_USER_LOGGEDIN and CLIENTEVENT_CMD_USER_JOINED for every user on the server.

Attribute values in TTMessage:

- TTMessage.nSource The client instance's user ID, i.e. what can now be retrieved through TT_GetMyUserID().
- TTMessage.ttType __USERACCOUNT
- TTMessage.useraccount Placed in union of TTMessage.
  See also
    TT_DoLogin

CLIENTEVENT_CMD_MYSELF_LOGGEDOUT

The client instance logged out of the server.

A response to TT_DoLogout.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __NONE
  See also
    TT_DoLogout

CLIENTEVENT_CMD_MYSELF_KICKED

The client instance was kicked from a channel.

Attribute values in TTMessage:

- TTMessage.nSource If greater than zero indicates local client instance was kicked from a channel. Otherwise kicked from server.
- TTMessage.ttType __USER if kicked by a user otherwise __NONE.
- TTMessage.user Placed in union of TTMessage if ttType equals __USER otherwise __NONE.

CLIENTEVENT_CMD_USER_LOGGEDIN

A new user logged on to the server.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __USER
- TTMessage.user Placed in union of TTMessage.

See also
  TT_DoLogin
  TT_GetUser To retrieve user.
  CLIENTEVENT_CMD_USER_LOGGEDOUT

CLIENTEVENT_CMD_USER_LOGGEDOUT

A client logged out of the server.

This event is called when a user logs out with TT_DoLogout or disconnects with TT_Disconnect.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __USER
- TTMessage.user Placed in union of TTMessage.

See also
  TT_DoLogout
  TT_Disconnect
  CLIENTEVENT_CMD_USER_LOGGEDIN

CLIENTEVENT_CMD_USER_UPDATE

User changed properties.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __USER
- TTMessage.user Placed in union of TTMessage.

See also
  TT_GetUser To retrieve user.

CLIENTEVENT_CMD_USER_JOINED

A user has joined a channel.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __USER
- TTMessage.user Placed in union of TTMessage.

See also
  TT_GetUser To retrieve user.

CLIENTEVENT_CMD_USER_LEFT

User has left a channel.

Attribute values in TTMessage:

- TTMessage.nSource Channel ID of previous channel.
- TTMessage.ttType __USER
- TTMessage.user Placed in union of TTMessage.

CLIENTEVENT_CMD_USER_TEXTMSG

A user has sent a text-message.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __TEXTMESSAGE
- TTMessage.textmessage Placed in union of TTMessage.

See also
  TT_GetUser To retrieve user.
  TT_DoTextMessage() to send text message.

CLIENTEVENT_CMD_CHANNEL_NEW

A new channel has been created.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __CHANNEL
- TTMessage.channel Placed in union of TTMessage.

See also
  TT_GetChannel To retrieve channel.

CLIENTEVENT_CMD_CHANNEL_UPDATE

A channel's properties has been updated.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __CHANNEL
- TTMessage.channel Placed in union of TTMessage.

See also
  TT_GetChannel To retrieve channel.

CLIENTEVENT_CMD_CHANNEL_REMOVE

A channel has been removed.

Note that calling the TT_GetChannel with the channel ID will fail because the channel is no longer there.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __CHANNEL
- TTMessage.channel Placed in union of TTMessage.

CLIENTEVENT_CMD_SERVER_UPDATE

Server has updated its settings (server name, MOTD, etc.)

Get new settings in `serverproperties` of TTMessage.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __SERVERPROPERTIES
- TTMessage.serverproperties Placed in union of TTMessage.

CLIENTEVENT_CMD_SERVERSTATISTICS

Server statistics available.

This is a response to TT_DoServerStatistics()

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __SERVERSTATISTICS
- TTMessage.serverstatistics Placed in union of TTMessage.

CLIENTEVENT_CMD_FILE_NEW

A new file is added to a channel.

Use TT_GetChannelFile() to get information about the file.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __REMOTEFILE
- TTMessage.remotefile Placed in union of TTMessage.

See also
  TT_GetChannelFile To retrieve file.

CLIENTEVENT_CMD_FILE_REMOVE

A file has been removed from a channel.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __REMOTEFILE
- TTMessage.remotefile Placed in union of TTMessage.

CLIENTEVENT_CMD_USERACCOUNT

A user account has been received from the server.

This message is posted as a result of TT_DoListUserAccounts()

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __USERACCOUNT
- TTMessage.useraccount Placed in union of TTMessage.

CLIENTEVENT_CMD_BANNEDUSER

A banned user has been received from the server.

This message is posted as a result of TT_DoListBans()

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __BANNEDUSER
- TTMessage.banneduser Placed in union of TTMessage.

CLIENTEVENT_CMD_USERACCOUNT_NEW

A user account has been created.

This message is posted as a result of TT_DoNewUserAccount()

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __USERACCOUNT
- TTMessage.useraccount Placed in union of TTMessage.

CLIENTEVENT_CMD_USERACCOUNT_REMOVE

A user account has been removed.

This message is posted as a result of TT_DoDeleteUserAccount()

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __USERACCOUNT
- TTMessage.useraccount Placed in union of TTMessage.

CLIENTEVENT_USER_STATECHANGE

A user state has changed.

The uUserState has changed for a user due to playback of an incoming stream.

The user state changes if:

- A user has started/stopped voice stream, i.e. USERSTATE_VOICE
- A user has started/stopped a video capture stream, i.e. USERSTATE_VIDEOCAPTURE
- A user has started/stopped a media file stream, i.e. i.e. USERSTATE_MEDIAFILE_AUDIO or USERSTATE_MEDIAFILE_VIDEO

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __USER.
- TTMessage.user Placed in union of TTMessage.

See also
  TT_SetUserStoppedTalkingDelay

CLIENTEVENT_USER_VIDEOCAPTURE

A new video frame from a video capture device was received from a user.

Use TT_AcquireUserVideoCaptureFrame to display the video frame.

Attribute values in TTMessage:

- TTMessage.nSource User's ID.
- TTMessage.ttType __INT32
- TTMessage.nStreamID Placed in union of TTMessage. The ID of the video stream currently active for this user. If stream ID becomes 0 it means the current stream has been closed.

CLIENTEVENT_USER_MEDIAFILE_VIDEO

A new video frame from a video media file was received from a user.

Use TT_AcquireUserMediaVideoFrame() to display the video frame.

Attribute values in TTMessage:

- TTMessage.nSource User's ID.
- TTMessage.ttType __INT32
- TTMessage.nStreamID Placed in union of TTMessage. The ID of the video stream currently active for this user. If stream ID becomes 0 it means the current stream has been closed.

CLIENTEVENT_USER_DESKTOPWINDOW

A new or updated desktop window has been received from a user.

Use TT_AcquireUserDesktopWindow() to retrieve the bitmap of the desktop window.

Attribute values in TTMessage:

- TTMessage.nSource The user's ID.
- TTMessage.ttType __INT32
- TTMessage.nStreamID Placed in union of TTMessage. The ID of the desktop window's session. If this ID changes it means the user has started a new session. If the session ID becomes 0 it means the desktop session has been closed by the user.
  See also
    TT_SendDesktopWindow()

CLIENTEVENT_USER_DESKTOPCURSOR

A user has sent the position of the mouse cursor.

Use TT_SendDesktopCursorPosition() to send the position of the mouse cursor.

Attribute values in TTMessage:

- TTMessage.nSource The user ID of the owner of the mouse cursor.
- TTMessage.ttType __DESKTOPINPUT
- TTMessage.desktopinput Placed in union of TTMessage. Contains the coordinates of the mouse cursor.

CLIENTEVENT_USER_DESKTOPINPUT

Desktop input (mouse or keyboard input) has been received from a user.

Desktop input is used in combination with a shared desktop window, see Desktop Sharing.

This event is generated if a remote user has called TT_SendDesktopInput(). In order for the local client instance to receive desktop input it must have enabled the subscription SUBSCRIBE_DESKTOPINPUT.

Due to different keyboard layout it might be a good idea to look into the key-translation function TT_DesktopInput_KeyTranslate().

See Receive Desktop Input for more information on receiving desktop input.

Attribute values in TTMessage:

- TTMessage.nSource User ID
- TTMessage.ttType __DESKTOPINPUT
- TTMessage.desktopinput Placed in union of TTMessage.

CLIENTEVENT_USER_RECORD_MEDIAFILE

A media file recording has changed status.

TT_SetUserMediaStorageDir makes the client instance store all audio from a user to a specified folder. Every time an audio file is being processed this event is posted.

Attribute values in TTMessage:

- TTMessage.nSource The user's ID.
- TTMessage.ttType __MEDIAFILEINFO
- TTMessage.mediafileinfo Placed in union of TTMessage. Properties for the media file currently being recorded

CLIENTEVENT_USER_AUDIOBLOCK

A new audio block can be extracted.

The AudioBlock can either be of STREAMTYPE_VOICE, STREAMTYPE_LOCALMEDIAPLAYBACK_AUDIO or STREAMTYPE_MEDIAFILE_AUDIO.

This event is only generated if TT_EnableAudioBlockEvent() is first called.

Call TT_AcquireUserAudioBlock() to extract the AudioBlock.

Attribute values in TTMessage:

- TTMessage.nSource The user ID.
  See also
    TT_LOCAL_USERID
    TT_MUTEX_USERID
- TTMessage.ttType __STREAMTYPE
- TTMessage.nStreamType Placed in union of TTMessage

CLIENTEVENT_INTERNAL_ERROR

An internal error occurred in the client instance.

This can e.g. happen if a new user joins a channel and a sound output device fails to start a new audio stream.

For at list of internal error messages check out ClientError with errors prefixed `INTERR_*`

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __CLIENTERRORMSG
- TTMessage.clienterrormsg Placed in union of TTMessage. Contains information on what caused an error.

CLIENTEVENT_VOICE_ACTIVATION

Voice activation has triggered transmission.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __TTBOOL
- TTMessage.bActive Placed in union of TTMessage. TRUE if voice is being transmitted due to voice level high than activation level.

See also
  TT_GetSoundInputLevel()
  TT_SetVoiceActivationLevel()
  CLIENT_SNDINPUT_VOICEACTIVATION
  TT_EnableTransmission

CLIENTEVENT_HOTKEY

A hotkey has been acticated or deactivated.

Attribute values in TTMessage:

- TTMessage.nSource The hotkey ID passed to TT_HotKey_Register().
- TTMessage.ttType __TTBOOL
- TTMessage.bActive Placed in union of TTMessage. TRUE when hotkey is active and FALSE when it becomes inactive.

See also
  TT_HotKey_Register
  TT_HotKey_Unregister

CLIENTEVENT_HOTKEY_TEST

A button was pressed or released on the user's keyboard or mouse.

When TT_HotKey_InstallTestHook is called a hook is installed in Windows which intercepts all keyboard and mouse presses. Every time a key or mouse is pressed or released this event is posted.

Use TT_HotKey_GetKeyString to get a key description of the pressed key.

Attribute values in TTMessage:

- TTMessage.nSource The virtual key code. Look here for a list of virtual key codes: http://msdn.microsoft.com/en-us/library/ms645540(VS.85).aspx
- TTMessage.ttType __TTBOOL
- TTMessage.bActive Placed in union of TTMessage. TRUE when key is down and FALSE when released.
  See also
    TT_HotKey_InstallTestHook

CLIENTEVENT_FILETRANSFER

A file transfer is processing.

Use TT_GetFileTransferInfo to get information about the file transfer. Ensure to check if the file transfer is completed, because the file transfer instance will be removed from the client instance when the user application reads the FileTransfer object and it has completed the transfer.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __FILETRANSFER
- TTMessage.filetransfer Placed in union of TTMessage. Properties and status information about the file transfer.

See also
  TT_GetFileTransferInfo To retrieve FileTransfer.

CLIENTEVENT_DESKTOPWINDOW_TRANSFER

Used for tracking when a desktop window has been transmitted to the server.

When the transmission has completed the flag CLIENT_TX_DESKTOP will be cleared from the local client instance.

Attribute values in TTMessage:

- TTMessage.nSource The desktop session's ID. If the desktop session ID becomes 0 it means the desktop session has been closed and/or cancelled.
- TTMessage.ttType __INT32
- TTMessage.nBytesRemain Placed in union of TTMessage. The number of bytes remaining before transmission of last desktop window completes. When remaining bytes is 0 TT_SendDesktopWindow() can be called again.

CLIENTEVENT_STREAM_MEDIAFILE

Media file being streamed to a channel is processing.

This event is called as a result of TT_StartStreamingMediaFileToChannel() to monitor progress of streaming.

Attribute values in TTMessage:

- TTMessage.nSource 0
- TTMessage.ttType __MEDIAFILEINFO
- TTMessage.mediafileinfo Placed in union of TTMessage. Contains properties and status information about the media file being streamed.

CLIENTEVENT_LOCAL_MEDIAFILE

Media file played locally is processing.

This event is called as a result of TT_InitLocalPlayback() to monitor progress of playback.

Attribute values in TTMessage:

- TTMessage.nSource Session ID returned by TT_InitLocalPlayback()
- TTMessage.ttType __MEDIAFILEINFO
- TTMessage.mediafileinfo Placed in union of TTMessage. Contains properties and status information about the media file being played.

CLIENTEVENT_AUDIOINPUT

Progress is audio being injected as STREAMTYPE_VOICE.

`nStreamID` of AudioInputProgress is the stream ID provided in the AudioBlock when calling TT_InsertAudioBlock().

When `uElapsedMSec` and `uQueueMSec` of AudioInputProgress are zero then the stream ID (session) has ended. An audio input session has ended when an empty AudioBlock has been inserted using TT_InsertAudioBlock().

Attribute values in TTMessage:

- TTMessage.nSource Stream ID used for sending audio input. The stream ID will appear in AudioBlock's `nStreamID` on the receiving side.
- TTMessage.ttType __AUDIOINPUTPROGRESS
- TTMessage.audioinputprogress Placed in union of TTMessage. Tells how much audio remains in queue. The queue should be refilled as long as the audio input should remain active.

CLIENTEVENT_USER_FIRSTVOICESTREAMPACKET

The first voice packet of a new voice stream has been received.

This time of this event may differ significantly from the start of the voice playout that is notified via CLIENTEVENT_USER_STATECHANGE due to jitter buffering.

The time between CLIENTEVENT_USER_FIRSTVOICESTREAMPACKET and CLIENTEVENT_USER_STATECHANGE is the fixed jitter delay configuration plus the currently active adaptive jitter buffering in the nActiveAdaptiveDelayMSec member of the User struct

Attribute values in TTMessage:

- TTMessage.nSource Stream ID. This can be mapped to AudioBlock.
- TTMessage.ttType __USER.
- TTMessage.user Placed in union of TTMessage.

See also
  TT_SetUserJitterControl

CLIENTEVENT_SOUNDDEVICE_ADDED

New sound device available.

This event is currently only support on Windows. Restart sound system to discover the new sound device.

Attribute values in TTMessage:

- TTMessage.nSource 0.
- TTMessage.ttType __SOUNDDEVICE.
- TTMessage.sounddevice Placed in union of TTMessage.

Only `szDeviceName` and `szDeviceID` of SoundDevice will be set.

See also
  TT_RestartSoundSystem()
  TT_GetSoundDevices()

CLIENTEVENT_SOUNDDEVICE_REMOVED

Sound device removed.

This event is currently only support on Windows. Restart sound system to retrieve new list of available sound devices.

Attribute values in TTMessage:

- TTMessage.nSource 0.
- TTMessage.ttType __SOUNDDEVICE.
- TTMessage.sounddevice Placed in union of TTMessage.

Only `szDeviceName` and `szDeviceID` of SoundDevice will be set.

See also
  TT_RestartSoundSystem()
  TT_GetSoundDevices()

CLIENTEVENT_SOUNDDEVICE_UNPLUGGED

Sound device unplugged.

This event is currently only support on Windows.

The jack has been unplugged from the sound device.

Attribute values in TTMessage:

- TTMessage.nSource 0.
- TTMessage.ttType __SOUNDDEVICE.
- TTMessage.sounddevice Placed in union of TTMessage.

Only `szDeviceName` and `szDeviceID` of SoundDevice will be set.

See also
  TT_RestartSoundSystem()
  TT_GetSoundDevices()

CLIENTEVENT_SOUNDDEVICE_NEW_DEFAULT_INPUT

New sound device has been selected as default input device.

Restart sound system to retrieve new list of available sound devices.

Attribute values in TTMessage:

- TTMessage.nSource 0.
- TTMessage.ttType __SOUNDDEVICE.
- TTMessage.sounddevice Placed in union of TTMessage.

Only `szDeviceName` and `szDeviceID` of SoundDevice will be set.

See also
  TT_RestartSoundSystem()
  TT_GetSoundDevices()

CLIENTEVENT_SOUNDDEVICE_NEW_DEFAULT_OUTPUT

New sound device has been selected as default output device.

Restart sound system to retrieve new list of available sound devices.

Attribute values in TTMessage:

- TTMessage.nSource 0.
- TTMessage.ttType __SOUNDDEVICE.
- TTMessage.sounddevice Placed in union of TTMessage.

Only `szDeviceName` and `szDeviceID` of SoundDevice will be set.

See also
  TT_RestartSoundSystem()
  TT_GetSoundDevices()

CLIENTEVENT_SOUNDDEVICE_NEW_DEFAULT_INPUT_COMDEVICE

New sound input device has been selected as default communication device.

See also
  SOUNDDEVICEFEATURE_DEFAULTCOMDEVICE

Restart sound system to see changes to sound devices.

Attribute values in TTMessage:

- TTMessage.nSource 0.
- TTMessage.ttType __SOUNDDEVICE.
- TTMessage.sounddevice Placed in union of TTMessage.

Only `szDeviceName` and `szDeviceID` of SoundDevice will be set.

See also
  TT_RestartSoundSystem()
  TT_GetSoundDevices()

CLIENTEVENT_SOUNDDEVICE_NEW_DEFAULT_OUTPUT_COMDEVICE

New sound output device has been selected as default communication device.

See also
  SOUNDDEVICEFEATURE_DEFAULTCOMDEVICE

Restart sound system to see changes to sound devices.

Attribute values in TTMessage:

- TTMessage.nSource 0.
- TTMessage.ttType __SOUNDDEVICE.
- TTMessage.sounddevice Placed in union of TTMessage.

Only `szDeviceName` and `szDeviceID` of SoundDevice will be set.

See also
  TT_RestartSoundSystem()
  TT_GetSoundDevices()

Definition at line 3161 of file TeamTalk.h.

## ◆ TTType

enum TTType

Enumerator
__NONE |
__AUDIOCODEC |
__BANNEDUSER |
__VIDEOFORMAT |
__OPUSCODEC |
__CHANNEL |
__CLIENTSTATISTICS |
__REMOTEFILE |
__FILETRANSFER |
__MEDIAFILESTATUS |
__SERVERPROPERTIES |
__SERVERSTATISTICS |
__SOUNDDEVICE |
__SPEEXCODEC |
__TEXTMESSAGE |
__WEBMVP8CODEC |
__TTMESSAGE |
__USER |
__USERACCOUNT |
__USERSTATISTICS |
__VIDEOCAPTUREDEVICE |
__VIDEOCODEC |
__AUDIOCONFIG |
__SPEEXVBRCODEC |
__VIDEOFRAME |
__AUDIOBLOCK |
__AUDIOFORMAT |
__MEDIAFILEINFO |
__CLIENTERRORMSG |
__TTBOOL |
__INT32 |
__DESKTOPINPUT |
__SPEEXDSP |
__STREAMTYPE |
__AUDIOPREPROCESSORTYPE |
__AUDIOPREPROCESSOR |
__TTAUDIOPREPROCESSOR |
__MEDIAFILEPLAYBACK |
__CLIENTKEEPALIVE |
__UINT32 |
__AUDIOINPUTPROGRESS |
__JITTERCONFIG |
__WEBRTCAUDIOPREPROCESSOR |
__ENCRYPTIONCONTEXT |
__SOUNDDEVICEEFFECTS |
__DESKTOPWINDOW |
__ABUSEPREVENTION |

Definition at line 3922 of file TeamTalk.h.