TeamTalk 4 C-API DLL
Version 4.5A
|
When events occur in the client instance, like e.g. if a new user joins a channel, the client instance queues a message which the user application must retrieve. More...
Classes | |
struct | TTMessage |
A struct containing the properties of an event. More... | |
Typedefs | |
typedef enum ClientEvent | ClientEvent |
TeamTalk client event messages. On Windows these messages are posted to the HWND which was provided to TT_InitTeamTalk. More... | |
typedef struct TTMessage | TTMessage |
A struct containing the properties of an event. More... | |
When events occur in the client instance, like e.g. if a new user joins a channel, the client instance queues a message which the user application must retrieve.
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(...).
If a HWND is not used then events can instead be retrieved through TT_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 text-message cannot be retrieved 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 enum ClientEvent ClientEvent |
TeamTalk client event messages. On Windows these messages are posted to the HWND which was provided to TT_InitTeamTalk.
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.
enum ClientEvent |
TeamTalk client event messages. On Windows these messages are posted to the HWND which was provided to TT_InitTeamTalk.
Enumerator | |||||
---|---|---|---|---|---|
WM_TEAMTALK_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.
| ||||
WM_TEAMTALK_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.
| ||||
WM_TEAMTALK_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. To change when the client instance should regard the server as unavailable call TT_SetServerTimeout. TT_GetStatistics can be used to check when data was last received from the server. Ensure to call TT_Disconnect before calling TT_Connect again.
| ||||
WM_TEAMTALK_CON_P2P |
Peer to peer (p2p) status changed. Audio and video packets can be sent to the user without forwarding through the server. This is done by enabling P2P network using TT_EnablePeerToPeer. Once the client instance joins a new channel it will try and create a peer to peer connection to each user in the channel. The client instance will try to create a peer to peer connection for 5 seconds. Read section Forward Through Server Transmission Mode and section Peer to Peer Transmission Mode on the different ways of transmitting data.
| ||||
WM_TEAMTALK_CMD_PROCESSING |
A command issued by Read section Client/Server Command Processing on how to use command processing in the user application.
| ||||
WM_TEAMTALK_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 WM_TEAMTALK_CMD_CHANNEL_NEW immediately following this event. If USERRIGHT_VIEW_ALL_USERS is enabled the client instance will also receive the events WM_TEAMTALK_CMD_USER_LOGGEDIN and WM_TEAMTALK_CMD_USER_JOINED for every user on the server.
| ||||
WM_TEAMTALK_CMD_MYSELF_LOGGEDOUT |
The client instance logged out of a server. A response to TT_DoLogout.
| ||||
WM_TEAMTALK_CMD_MYSELF_JOINED |
The client instance has joined a new channel. Result of command TT_DoJoinChannel or TT_DoJoinChannelByID. Can also be a result of an administrator calling TT_DoMoveUser. If USERRIGHT_VIEW_ALL_USERS is disabled the client instance will afterwards receive the WM_TEAMTALK_CMD_USER_JOINED event for each of the users in the channel.
| ||||
WM_TEAMTALK_CMD_MYSELF_LEFT |
The client instance left a channel. The WPARAM contains the channel ID.
| ||||
WM_TEAMTALK_CMD_MYSELF_KICKED |
The client instance was kicked from a channel.
| ||||
WM_TEAMTALK_CMD_USER_LOGGEDIN |
A new user logged on to the server. Use TT_GetUser to get the properties of the user.
| ||||
WM_TEAMTALK_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.
| ||||
WM_TEAMTALK_CMD_USER_UPDATE |
User changed properties. Use TT_GetUser to see the new properties.
| ||||
WM_TEAMTALK_CMD_USER_JOINED |
A user has joined a channel.
| ||||
WM_TEAMTALK_CMD_USER_LEFT |
User has left a channel. | ||||
WM_TEAMTALK_CMD_USER_TEXTMSG |
A user has sent a text-message.
| ||||
WM_TEAMTALK_CMD_CHANNEL_NEW |
A new channel has been created.
| ||||
WM_TEAMTALK_CMD_CHANNEL_UPDATE |
A channel's properties has been updated. wParam Channel's ID lParam Ignored
| ||||
WM_TEAMTALK_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.
| ||||
WM_TEAMTALK_CMD_SERVER_UPDATE |
Server has updated its settings (server name, MOTD, etc.) Use TT_GetServerProperties to get the new server properties.
| ||||
WM_TEAMTALK_CMD_FILE_NEW |
A new file is added to a channel. Use TT_GetChannelFileInfo to get information about the file.
| ||||
WM_TEAMTALK_CMD_FILE_REMOVE |
A file has been removed from a channel.
| ||||
WM_TEAMTALK_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.
| ||||
WM_TEAMTALK_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.
| ||||
WM_TEAMTALK_USER_TALKING |
A user is talking. Playback using the sound output device has started for a user.
| ||||
WM_TEAMTALK_USER_VIDEOFRAME |
A new video frame was received from a user. Use TT_GetUserVideoFrame to display the image.
| ||||
WM_TEAMTALK_USER_AUDIOFILE |
An audio file recording has changed status. TT_SetUserAudioFolder 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.
| ||||
WM_TEAMTALK_INTERNAL_ERROR |
A sound device failed to initialize. This can e.g. happen if a new user joins a channel and there is no sound output channels available. nMaxOutputChannels of SoundDevice struct tells how many streams can be active simultaneously.
| ||||
WM_TEAMTALK_VOICE_ACTIVATION |
Voice activation has triggered transmission.
| ||||
WM_TEAMTALK_STREAM_AUDIOFILE_USER |
An audio file being streamed to a user is processing. This event is called as a result of TT_StartStreamingAudioFileToUser.
| ||||
WM_TEAMTALK_STREAM_AUDIOFILE_CHANNEL |
Audio file being stream to a channel is processing. This event is called as a result of TT_StartStreamingAudioFileToChannel.
| ||||
WM_TEAMTALK_HOTKEY |
A hotkey has been acticated or deactivated.
| ||||
WM_TEAMTALK_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.
| ||||
WM_TEAMTALK_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.
| ||||
WM_TEAMTALK_USER_AUDIOBLOCK |
A new audio block can be extracted. This event is only generated if TT_EnableAudioBlockEvent() is first called. Call TT_AcquireUserAudioBlock() to extract the AudioBlock.
| ||||
WM_TEAMTALK_USER_DESKTOPWINDOW |
A new or updated desktop window has been received from a user. Use TT_GetUserDesktopWindow() to retrieve the bitmap of the desktop window.
| ||||
WM_TEAMTALK_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.
| ||||
WM_TEAMTALK_USER_DESKTOPCURSOR |
A user has sent the position of the mouse cursor. Use TT_SendDesktopCursorPosition() to send the position of the mouse cursor.
| ||||
WM_TEAMTALK_CON_MAX_PAYLOAD_UPDATED |
The maximum size of the payload put into UDP packets has been updated.
| ||||
WM_TEAMTALK_STREAM_MEDIAFILE_CHANNEL |
Media file being streamed to a channel is processing. This event is called as a result of TT_StartStreamingMediaFileToChannel().
|