TeamTalk 5 C-API DLL
Version 5.11A
|
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... | |
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:
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.
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.
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.
#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.
#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.
#define TT_CLASSROOM_USERID_INDEX 0 |
User ID index in transmitUsers
of Channel
Definition at line 119 of file TeamTalk.h.
#define TT_CLASSROOM_STREAMTYPE_INDEX 1 |
StreamTypes index in transmitUsers
of Channel
Definition at line 123 of file TeamTalk.h.
#define TT_TRANSMITUSERS_FREEFORALL 0xFFF |
Same as TT_CLASSROOM_FREEFORALL
Definition at line 128 of file TeamTalk.h.
#define TT_TRANSMITUSERS_USERID_INDEX 0 |
Same as TT_CLASSROOM_USERID_INDEX
Definition at line 133 of file TeamTalk.h.
#define TT_TRANSMITUSERS_STREAMTYPE_INDEX 1 |
Same as TT_CLASSROOM_STREAMTYPE_INDEX
Definition at line 138 of file TeamTalk.h.
#define TT_CHANNELS_OPERATOR_MAX 16 |
The maximum number of channels where a user can automatically become channel operator.
Definition at line 145 of file TeamTalk.h.
#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 enum ChannelType ChannelType |
The types of channels supported.
typedef UINT32 ChannelTypes |
Bitmask of ChannelType.
Definition at line 2459 of file TeamTalk.h.
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.
typedef enum FileTransferStatus FileTransferStatus |
Status of a file transfer.
typedef struct FileTransfer FileTransfer |
A struct containing the properties of a file transfer.
typedef struct RemoteFile RemoteFile |
A struct containing the properties of a file in a Channel.
enum ChannelType |
The types of channels supported.
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
|
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.
|
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.
enum FileTransferStatus |
Status of a file transfer.
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.
TEAMTALKDLL_API INT32 TT_GetRootChannelID | ( | IN TTInstance * | lpTTInstance | ) |
Get the root channel's ID.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
TEAMTALKDLL_API INT32 TT_GetMyChannelID | ( | IN TTInstance * | lpTTInstance | ) |
Get the channel which the local client instance is currently participating in.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
TEAMTALKDLL_API TTBOOL TT_GetChannel | ( | IN TTInstance * | lpTTInstance, |
IN INT32 | nChannelID, | ||
OUT Channel * | lpChannel | ||
) |
Get the channel with a specific ID.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
nChannelID | The ID of the channel to get information about. |
lpChannel | A preallocated struct which will receive the channel's properties. |
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 '/'.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
nChannelID | The channel's ID. |
szChannelPath | Will receive the channel's path. |
TEAMTALKDLL_API INT32 TT_GetChannelIDFromPath | ( | IN TTInstance * | lpTTInstance, |
IN const TTCHAR * | szChannelPath | ||
) |
Get the channel ID of the supplied path. Channels are separated by '/'.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
szChannelPath | Will receive the channel's path. |
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.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
nChannelID | The channel's ID. |
lpUsers | A preallocated array which has room for lpnHowMany user elements. Pass NULL to query the number of users in channel. |
lpnHowMany | The number of elements in the array lpUsers. If lpUserIDs is NULL lpnHowMany will receive the number of users in the channel. |
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.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
nChannelID | The ID of the channel to extract the files from. |
lpRemoteFiles | A preallocated struct which will receive file information. If lpRemoteFiles is NULL then lpnHowMany will receive the number of files in the channel. |
lpnHowMany | Use 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. |
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.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
nChannelID | The ID of the channel to extract the file from. |
nFileID | The ID of the file. |
lpRemoteFile | A preallocated struct which will receive file information. |
TEAMTALKDLL_API TTBOOL TT_IsChannelOperator | ( | IN TTInstance * | lpTTInstance, |
IN INT32 | nUserID, | ||
IN INT32 | nChannelID | ||
) |
Check whether user is operator of a channel.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
nUserID | the ID of the user to check. |
nChannelID | the ID of the channel to check whether user is operator of. |
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.
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.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
nTransferID | The ID of the file transfer to investigate. Transfer ID is passed by CLIENTEVENT_FILETRANSFER. |
lpFileTransfer | A preallocated struct which will receive the file transfer information. |
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.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
nTransferID | The ID of the file transfer to investigate. Transfer ID is passed by CLIENTEVENT_FILETRANSFER. |