TeamTalk 5 C-API DLL  Version 5.11A
Channel Properties

This section explains the concept of channels where users can interact. More...

Classes

struct  Channel
 A struct containing the properties of a channel. More...
 
struct  FileTransfer
 A struct containing the properties of a file transfer. More...
 
struct  RemoteFile
 A struct containing the properties of a file in a Channel. More...
 

Macros

#define TT_TRANSMITUSERS_MAX   128
 
#define TT_CLASSROOM_FREEFORALL   0xFFF
 
#define TT_CLASSROOM_USERID_INDEX   0
 
#define TT_CLASSROOM_STREAMTYPE_INDEX   1
 
#define TT_TRANSMITUSERS_FREEFORALL   0xFFF
 
#define TT_TRANSMITUSERS_USERID_INDEX   0
 
#define TT_TRANSMITUSERS_STREAMTYPE_INDEX   1
 
#define TT_CHANNELS_OPERATOR_MAX   16
 
#define TT_TRANSMITQUEUE_MAX   16
 

Typedefs

typedef enum ChannelType ChannelType
 The types of channels supported. More...
 
typedef UINT32 ChannelTypes
 Bitmask of ChannelType. More...
 
typedef struct Channel Channel
 A struct containing the properties of a channel. More...
 
typedef enum FileTransferStatus FileTransferStatus
 Status of a file transfer. More...
 
typedef struct FileTransfer FileTransfer
 A struct containing the properties of a file transfer. More...
 
typedef struct RemoteFile RemoteFile
 A struct containing the properties of a file in a Channel. More...
 

Enumerations

enum  ChannelType {
  CHANNEL_DEFAULT = 0x0000 , CHANNEL_PERMANENT = 0x0001 , CHANNEL_SOLO_TRANSMIT = 0x0002 , CHANNEL_CLASSROOM = 0x0004 ,
  CHANNEL_OPERATOR_RECVONLY = 0x0008 , CHANNEL_NO_VOICEACTIVATION = 0x0010 , CHANNEL_NO_RECORDING = 0x0020 , CHANNEL_HIDDEN = 0x0040
}
 The types of channels supported. More...
 
enum  FileTransferStatus { FILETRANSFER_CLOSED = 0 , FILETRANSFER_ERROR = 1 , FILETRANSFER_ACTIVE = 2 , FILETRANSFER_FINISHED = 3 }
 Status of a file transfer. More...
 

Functions

TEAMTALKDLL_API INT32 TT_GetRootChannelID (IN TTInstance *lpTTInstance)
 Get the root channel's ID. More...
 
TEAMTALKDLL_API INT32 TT_GetMyChannelID (IN TTInstance *lpTTInstance)
 Get the channel which the local client instance is currently participating in. More...
 
TEAMTALKDLL_API TTBOOL TT_GetChannel (IN TTInstance *lpTTInstance, IN INT32 nChannelID, OUT Channel *lpChannel)
 Get the channel with a specific ID. More...
 
TEAMTALKDLL_API TTBOOL TT_GetChannelPath (IN TTInstance *lpTTInstance, IN INT32 nChannelID, OUT TTCHAR szChannelPath[TT_STRLEN])
 Get the channel's path. Channels are separated by '/'. More...
 
TEAMTALKDLL_API INT32 TT_GetChannelIDFromPath (IN TTInstance *lpTTInstance, IN const TTCHAR *szChannelPath)
 Get the channel ID of the supplied path. Channels are separated by '/'. More...
 
TEAMTALKDLL_API TTBOOL TT_GetChannelUsers (IN TTInstance *lpTTInstance, IN INT32 nChannelID, IN OUT User *lpUsers, IN OUT INT32 *lpnHowMany)
 Get the IDs of all users in a channel. More...
 
TEAMTALKDLL_API TTBOOL TT_GetChannelFiles (IN TTInstance *lpTTInstance, IN INT32 nChannelID, IN OUT RemoteFile *lpRemoteFiles, IN OUT INT32 *lpnHowMany)
 Get the list of the files in a channel which can be downloaded. More...
 
TEAMTALKDLL_API TTBOOL TT_GetChannelFile (IN TTInstance *lpTTInstance, IN INT32 nChannelID, IN INT32 nFileID, OUT RemoteFile *lpRemoteFile)
 Get information about a file which can be downloaded. More...
 
TEAMTALKDLL_API TTBOOL TT_IsChannelOperator (IN TTInstance *lpTTInstance, IN INT32 nUserID, IN INT32 nChannelID)
 Check whether user is operator of a channel. More...
 
TEAMTALKDLL_API TTBOOL TT_GetServerChannels (IN TTInstance *lpTTInstance, IN OUT Channel *lpChannels, IN OUT INT32 *lpnHowMany)
 Get all the channels on the server. More...
 
TEAMTALKDLL_API TTBOOL TT_GetFileTransferInfo (IN TTInstance *lpTTInstance, IN INT32 nTransferID, OUT FileTransfer *lpFileTransfer)
 Get information about an active file transfer.
More...
 
TEAMTALKDLL_API TTBOOL TT_CancelFileTransfer (IN TTInstance *lpTTInstance, IN INT32 nTransferID)
 Cancel an active file transfer. More...
 

Detailed Description

This section explains the concept of channels where users can interact.

Users are arranged in a tree structure consisting of channels where each channel can hold a number of users. While in a channel users can transmit audio and video to each other as well as sending channel messages. On a server there will always be a root channel which cannot be deleted.

In other conferencing tools channels are also refered to as "rooms".

Sections:

Channel Administration

To create a new channel on a server requires USERRIGHT_MODIFY_CHANNELS or USERRIGHT_CREATE_TEMPORARY_CHANNEL.

With USERRIGHT_MODIFY_CHANNELS the method TT_DoMakeChannel() can be used to create a new channel and any existing channel can be updated using TT_DoUpdateChannel() and removed by calling TT_DoRemoveChannel(). Basically USERRIGHT_MODIFY_CHANNELS gives unrestricted access to all channels on the server. Also seeing passwords of all channels on the server.

With USERRIGHT_CREATE_TEMPORARY_CHANNEL the user can only create temporary channels which disappear when the last user leaves the channel. A temporary channel must be created by calling TT_DoJoinChannel(). Once a user has created a temporary channel and joined it he becomes operator of the channel which means that he can update the channel's properties at any given time.

File Sharing

While in a channel users can upload and download files if the USERRIGHT_UPLOAD_FILES and USERRIGHT_DOWNLOAD_FILES are enabled. To upload a file to a channel the channel needs to have a disk quota. The disk quota is specified by nDiskQuota in the Channel-struct. The file being uploaded must have a file size which is less than the disk quota and the sum of sizes of existing files. Once a file is uploaded only channel operators and the file's owner can delete a file.

Call TT_DoSendFile to upload a file and TT_DoRecvFile to download a file. Only users who have a UserAccount on the server are allowed to upload files. There is no limit on the maximum number of file transfers but it is advised to queue file transfers so the file transfers do no affect server performance.

Storing Conversations to Audio Files

In some applications it may be required to be able to save all audio data received by the client instance to disk. This can be archived by calling TT_SetUserMediaStorageDir() which will then save received audio data in the following format: "YYYYMMDD-HHMMSS \#USERID USERNAME.wav". USERNAME is the szUsername from User.

To store audio data from outside the local client instance's channel, please read section Spying on Users.

Macro Definition Documentation

◆ TT_TRANSMITUSERS_MAX

#define TT_TRANSMITUSERS_MAX   128

The maximum number of users allowed to transmit when a Channel is configured with CHANNEL_CLASSROOM.

Definition at line 107 of file TeamTalk.h.

◆ TT_CLASSROOM_FREEFORALL

#define TT_CLASSROOM_FREEFORALL   0xFFF

If a Channel is configured with CHANNEL_CLASSROOM then only users certain user IDs are allowed to transmit. If, however, TT_CLASSROOM_FREEFORALL is put in transmitUsers then everyone in the channel are allowed to transmit.

Definition at line 115 of file TeamTalk.h.

◆ TT_CLASSROOM_USERID_INDEX

#define TT_CLASSROOM_USERID_INDEX   0

User ID index in transmitUsers of Channel

Definition at line 119 of file TeamTalk.h.

◆ TT_CLASSROOM_STREAMTYPE_INDEX

#define TT_CLASSROOM_STREAMTYPE_INDEX   1

StreamTypes index in transmitUsers of Channel

Definition at line 123 of file TeamTalk.h.

◆ TT_TRANSMITUSERS_FREEFORALL

#define TT_TRANSMITUSERS_FREEFORALL   0xFFF

Same as TT_CLASSROOM_FREEFORALL

Definition at line 128 of file TeamTalk.h.

◆ TT_TRANSMITUSERS_USERID_INDEX

#define TT_TRANSMITUSERS_USERID_INDEX   0

Same as TT_CLASSROOM_USERID_INDEX

Definition at line 133 of file TeamTalk.h.

◆ TT_TRANSMITUSERS_STREAMTYPE_INDEX

#define TT_TRANSMITUSERS_STREAMTYPE_INDEX   1

Same as TT_CLASSROOM_STREAMTYPE_INDEX

Definition at line 138 of file TeamTalk.h.

◆ TT_CHANNELS_OPERATOR_MAX

#define TT_CHANNELS_OPERATOR_MAX   16

The maximum number of channels where a user can automatically become channel operator.

See also
UserAccount

Definition at line 145 of file TeamTalk.h.

◆ TT_TRANSMITQUEUE_MAX

#define TT_TRANSMITQUEUE_MAX   16

The maximum number of users in a Channel's transmit queue when channel is configured with CHANNEL_SOLO_TRANSMIT

Definition at line 151 of file TeamTalk.h.

Typedef Documentation

◆ ChannelType

typedef enum ChannelType ChannelType

The types of channels supported.

See also
Channel

◆ ChannelTypes

typedef UINT32 ChannelTypes

Bitmask of ChannelType.

Definition at line 2459 of file TeamTalk.h.

◆ Channel

typedef struct Channel Channel

A struct containing the properties of a channel.

To change the properties of a channel call TT_DoUpdateChannel(). Note that audiocodec cannot be changed if the channel has users.

See also
TT_GetChannel
ChannelType
AudioCodec

◆ FileTransferStatus

Status of a file transfer.

See also
FileTransfer

◆ FileTransfer

typedef struct FileTransfer FileTransfer

A struct containing the properties of a file transfer.

See also
TT_GetFileTransferInfo

◆ RemoteFile

typedef struct RemoteFile RemoteFile

A struct containing the properties of a file in a Channel.

See also
TT_GetChannelFile

Enumeration Type Documentation

◆ ChannelType

The types of channels supported.

See also
Channel
Enumerator
CHANNEL_DEFAULT 

A default channel is a channel which disappears after the last user leaves the channel.

CHANNEL_PERMANENT 

A channel which persists even when the last user leaves the channel.

CHANNEL_SOLO_TRANSMIT 

Only one user can transmit at a time.

CHANNEL_CLASSROOM 

Voice and video transmission in the channel is controlled by a channel operator.

For a user to transmit audio or video to this type of channel the channel operator must add the user's ID to transmitUsers in the Channel struct and call TT_DoUpdateChannel().

See also
TT_IsChannelOperator
USERTYPE_ADMIN
CHANNEL_OPERATOR_RECVONLY 

Only channel operators (and administrators) will receive audio/video/desktop transmissions. Default channel users will only see transmissions from operators and/or administrators.

CHANNEL_NO_VOICEACTIVATION 

Don't allow voice transmission if it's trigged by voice activation.

See also
TT_EnableVoiceActivation()
CHANNEL_NO_RECORDING 

Don't allow recording to files in the channel.

CHANNEL_HIDDEN 

Hidden channel which can only be seen with USERRIGHT_VIEW_HIDDEN_CHANNELS.

Definition at line 2421 of file TeamTalk.h.

◆ FileTransferStatus

Status of a file transfer.

See also
FileTransfer
Enumerator
FILETRANSFER_CLOSED 

brief Invalid transfer.

FILETRANSFER_ERROR 

Error during file transfer.

FILETRANSFER_ACTIVE 

File transfer active.

FILETRANSFER_FINISHED 

File transfer finished.

Definition at line 2580 of file TeamTalk.h.

Function Documentation

◆ TT_GetRootChannelID()

TEAMTALKDLL_API INT32 TT_GetRootChannelID ( IN TTInstance lpTTInstance)

Get the root channel's ID.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
Returns
Returns the ID of the root channel. If 0 is returned no root channel exists.
See also
TT_GetMyChannelID
TT_GetChannelPath

◆ TT_GetMyChannelID()

TEAMTALKDLL_API INT32 TT_GetMyChannelID ( IN TTInstance lpTTInstance)

Get the channel which the local client instance is currently participating in.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
Returns
Returns the ID of the current channel. If 0 is returned the user is not participating in a channel.

◆ TT_GetChannel()

TEAMTALKDLL_API TTBOOL TT_GetChannel ( IN TTInstance lpTTInstance,
IN INT32  nChannelID,
OUT Channel lpChannel 
)

Get the channel with a specific ID.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
nChannelIDThe ID of the channel to get information about.
lpChannelA preallocated struct which will receive the channel's properties.
Returns
FALSE if unable to retrieve channel otherwise TRUE.

◆ TT_GetChannelPath()

TEAMTALKDLL_API TTBOOL TT_GetChannelPath ( IN TTInstance lpTTInstance,
IN INT32  nChannelID,
OUT TTCHAR  szChannelPath[TT_STRLEN] 
)

Get the channel's path. Channels are separated by '/'.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
nChannelIDThe channel's ID.
szChannelPathWill receive the channel's path.
Returns
Returns TRUE if channel exists.

◆ TT_GetChannelIDFromPath()

TEAMTALKDLL_API INT32 TT_GetChannelIDFromPath ( IN TTInstance lpTTInstance,
IN const TTCHAR szChannelPath 
)

Get the channel ID of the supplied path. Channels are separated by '/'.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
szChannelPathWill receive the channel's path.
Returns
The channel's ID or 0 on error.

◆ TT_GetChannelUsers()

TEAMTALKDLL_API TTBOOL TT_GetChannelUsers ( IN TTInstance lpTTInstance,
IN INT32  nChannelID,
IN OUT User lpUsers,
IN OUT INT32 *  lpnHowMany 
)

Get the IDs of all users in a channel.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
nChannelIDThe channel's ID.
lpUsersA preallocated array which has room for lpnHowMany user elements. Pass NULL to query the number of users in channel.
lpnHowManyThe number of elements in the array lpUsers. If lpUserIDs is NULL lpnHowMany will receive the number of users in the channel.
See also
User
TT_GetChannel

◆ TT_GetChannelFiles()

TEAMTALKDLL_API TTBOOL TT_GetChannelFiles ( IN TTInstance lpTTInstance,
IN INT32  nChannelID,
IN OUT RemoteFile lpRemoteFiles,
IN OUT INT32 *  lpnHowMany 
)

Get the list of the files in a channel which can be downloaded.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
nChannelIDThe ID of the channel to extract the files from.
lpRemoteFilesA preallocated struct which will receive file information. If lpRemoteFiles is NULL then lpnHowMany will receive the number of files in the channel.
lpnHowManyUse for both querying and specifying the number of files. If lpRemoteFiles is NULL then lpnHowMany will receive the number of files in the channel. If lpRemoteFiles is not NULL then lpnHowMany should specify the size of the lpRemoteFiles array.
See also
TT_GetChannelFile

◆ TT_GetChannelFile()

TEAMTALKDLL_API TTBOOL TT_GetChannelFile ( IN TTInstance lpTTInstance,
IN INT32  nChannelID,
IN INT32  nFileID,
OUT RemoteFile lpRemoteFile 
)

Get information about a file which can be downloaded.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
nChannelIDThe ID of the channel to extract the file from.
nFileIDThe ID of the file.
lpRemoteFileA preallocated struct which will receive file information.

◆ TT_IsChannelOperator()

TEAMTALKDLL_API TTBOOL TT_IsChannelOperator ( IN TTInstance lpTTInstance,
IN INT32  nUserID,
IN INT32  nChannelID 
)

Check whether user is operator of a channel.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
nUserIDthe ID of the user to check.
nChannelIDthe ID of the channel to check whether user is operator of.

◆ TT_GetServerChannels()

TEAMTALKDLL_API TTBOOL TT_GetServerChannels ( IN TTInstance lpTTInstance,
IN OUT Channel lpChannels,
IN OUT INT32 *  lpnHowMany 
)

Get all the channels on the server.

Use TT_GetChannel() to get more information about each of the channels.

See also
TT_GetServerUsers()

◆ TT_GetFileTransferInfo()

TEAMTALKDLL_API TTBOOL TT_GetFileTransferInfo ( IN TTInstance lpTTInstance,
IN INT32  nTransferID,
OUT FileTransfer lpFileTransfer 
)

Get information about an active file transfer.

An active file transfer is one which has been posted through the event CLIENTEVENT_FILETRANSFER.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
nTransferIDThe ID of the file transfer to investigate. Transfer ID is passed by CLIENTEVENT_FILETRANSFER.
lpFileTransferA preallocated struct which will receive the file transfer information.
See also
TT_CancelFileTransfer

◆ TT_CancelFileTransfer()

TEAMTALKDLL_API TTBOOL TT_CancelFileTransfer ( IN TTInstance lpTTInstance,
IN INT32  nTransferID 
)

Cancel an active file transfer.

An active file transfer is one which has been post through the event CLIENTEVENT_FILETRANSFER.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
nTransferIDThe ID of the file transfer to investigate. Transfer ID is passed by CLIENTEVENT_FILETRANSFER.