TeamTalk 4 C-API DLL
Version 4.5A
|
The server keeps track of which users are in which channels and ensures that users in the same channel can communicate with each other. It is also the job of the server to provide user authentication so only users with the proper credentials are allowed to do certain operations. More...
Classes | |
struct | ServerProperties |
A struct containing the properties of the server's settings. More... | |
struct | ServerStatistics |
A struct containing the server's statistics, i.e. bandwidth usage and user activity. More... | |
struct | BannedUser |
A struct containing the properties of a banned user. This struct is used by TT_GetBannedUsers. More... | |
struct | UserAccount |
A struct containing the properties of a user account. More... | |
Typedefs | |
typedef enum UserRight | UserRight |
The rights users have once they have logged on to the server. More... | |
typedef UINT32 | UserRights |
A bitmask based on UserRight for holding the rights users have who log on the server. More... | |
typedef struct ServerProperties | ServerProperties |
A struct containing the properties of the server's settings. More... | |
typedef struct ServerStatistics | ServerStatistics |
A struct containing the server's statistics, i.e. bandwidth usage and user activity. More... | |
typedef struct BannedUser | BannedUser |
A struct containing the properties of a banned user. This struct is used by TT_GetBannedUsers. More... | |
typedef struct UserAccount | UserAccount |
A struct containing the properties of a user account. More... | |
Enumerations | |
enum | UserRight { USERRIGHT_NONE = 0x0000, USERRIGHT_GUEST_LOGIN = 0x0001, USERRIGHT_VIEW_ALL_USERS = 0x0002, USERRIGHT_CHANNEL_CREATION = 0x0004, USERRIGHT_CHANNEL_OPERATORS = 0x0008, USERRIGHT_CHANNEL_COMMANDS = 0x0010, USERRIGHT_CLIENT_BROADCAST = 0x0020, USERRIGHT_SUBSCRIPTIONS = 0x0040, USERRIGHT_FORWARD_AUDIO = 0x0080, USERRIGHT_FORWARD_VIDEO = 0x0100, USERRIGHT_DOUBLE_LOGIN = 0x0200, USERRIGHT_FORWARD_DESKTOP = 0x0400, USERRIGHT_STRICT_UTF8 = 0x0800 } |
The rights users have once they have logged on to the server. More... | |
Functions | |
TEAMTALKDLL_API BOOL | TT_GetBannedUsers (IN TTInstance *lpTTInstance, IN OUT BannedUser *lpBannedUsers, IN OUT INT32 *lpnHowMany) |
Get the list of banned users. More... | |
TEAMTALKDLL_API BOOL | TT_GetUserAccounts (IN TTInstance *lpTTInstance, IN OUT UserAccount *lpUserAccounts, IN OUT INT32 *lpnHowMany) |
Get the list of user accounts. More... | |
The server keeps track of which users are in which channels and ensures that users in the same channel can communicate with each other. It is also the job of the server to provide user authentication so only users with the proper credentials are allowed to do certain operations.
Get the server's properties.
It is a good idea to check out section Server Setup Guide to learn how to configure the TeamTalk server.
The server can be configured in a number of ways using the ServerProperties-struct. Only users who are logged on to the server as administrators can change a server's properties while it's running. This is done using the command TT_DoUpdateServer.
The uUserRights bitmask in ServerProperties specifies what users are allowed to do. The server can e.g. be configured to only allowed users who have an account to log on by disabling the flag USERRIGHT_GUEST_LOGIN. If default users (without administrator rights) shouldn't be allowed to create channels this can be disabled by disabling the flag USERRIGHT_CHANNEL_CREATION.
Two types of users exists on a server, default users and administrator users. The UserType-enum can be used to see who is what. To be administrator the user must have a user account on the server with the USERTYPE_ADMIN flag set.
As administrator it is possible to list all users who have an account on the server using TT_DoListUserAccounts. To create a new user account call the command TT_DoNewUserAccount and to delete an account call TT_DoDeleteUserAccount.
Sometimes it may be necessary to kick and ban users from a server. As administrator it is possible to use the command TT_DoKickUser to kick a user off the server. A channel operator can also kick a user from a channel (but not off a server).
As administrator it is also possible to ban users from the server, so they can no longer log in. This can be done using TT_DoBanUser. To list who are currently banned call TT_DoListBans and to remove a ban call TT_DoUnBanUser.
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
lpProperties | A struct to hold the server's properties. |
The rights users have once they have logged on to the server.
ServerProperties holds the user rights in its uUserRights member variable and is retrieved by calling TT_GetServerProperties once connected to the server.
typedef UINT32 UserRights |
A bitmask based on UserRight for holding the rights users have who log on the server.
typedef struct ServerProperties ServerProperties |
A struct containing the properties of the server's settings.
The server properties is available after a successful call to TT_DoLogin
typedef struct ServerStatistics ServerStatistics |
A struct containing the server's statistics, i.e. bandwidth usage and user activity.
Use TT_DoQueryServerStats() to query the server's statistics and when the command completes use TT_GetServerStatistics() to extract the statistics.
typedef struct BannedUser BannedUser |
A struct containing the properties of a banned user. This struct is used by TT_GetBannedUsers.
typedef struct UserAccount UserAccount |
A struct containing the properties of a user account.
A registered user is one that has a user account on the server.
enum UserRight |
The rights users have once they have logged on to the server.
ServerProperties holds the user rights in its uUserRights member variable and is retrieved by calling TT_GetServerProperties once connected to the server.
Enumerator | |
---|---|
USERRIGHT_NONE |
Users who log onto the server has none of the rights below. |
USERRIGHT_GUEST_LOGIN |
Users can log on without an account and by only specifying the server password. |
USERRIGHT_VIEW_ALL_USERS |
Users can see users in all other channels. This option cannot be changed in a call to TT_DoUpdateServer. |
USERRIGHT_CHANNEL_CREATION |
Users are allowed to create channels. |
USERRIGHT_CHANNEL_OPERATORS |
Users can become operators of channels. |
USERRIGHT_CHANNEL_COMMANDS |
Users can use channel commands (text messages prefixed with '/'. |
USERRIGHT_CLIENT_BROADCAST |
None-admins are allowed to broadcast messages to all users. |
USERRIGHT_SUBSCRIPTIONS |
Users are allowed to change subscriptions to other users. |
USERRIGHT_FORWARD_AUDIO |
Users are allowed to forward audio packets through server. |
USERRIGHT_FORWARD_VIDEO |
Users are allowed to forward video packets through server. |
USERRIGHT_DOUBLE_LOGIN |
Allow multiple users to log on to the server with the same UserAccount. |
USERRIGHT_FORWARD_DESKTOP |
Users are allowed to forward desktop packets through server. Requires server version 4.3.0.1490 or later. |
USERRIGHT_STRICT_UTF8 |
Users are only allowed to use valid UTF-8 strings. If a non-UTF-8 string is passed in a command the server will respond with the command error CMDERR_SYNTAX_ERROR.
|
TEAMTALKDLL_API BOOL TT_GetBannedUsers | ( | IN TTInstance * | lpTTInstance, |
IN OUT BannedUser * | lpBannedUsers, | ||
IN OUT INT32 * | lpnHowMany | ||
) |
Get the list of banned users.
After the command TT_DoListBans has completed, this function can be called to retrieve the list of banned users. The list of banned users can only be retrieved once after which the internal representation of the users is deleted (to save memory).
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
lpBannedUsers | A preallocated array to hold banned users or NULL to query how many banned users are listed. |
lpnHowMany | This is both an input and an output parameter. If lpBannedUsers is NULL lpnHowMany will receive the number of banned users. If lpBannedUsers is not NULL lpnHowMany must contain how many banned users which will fit in the lpBannedUsers array. Upon returning lpnHowMany will contain how many were actually written to the array. |
TEAMTALKDLL_API BOOL TT_GetUserAccounts | ( | IN TTInstance * | lpTTInstance, |
IN OUT UserAccount * | lpUserAccounts, | ||
IN OUT INT32 * | lpnHowMany | ||
) |
Get the list of user accounts.
After the command TT_DoListUserAccounts has competed, this function can be called to retrieve the list of user accounts on the server. The list of user accounts can only be retrieved once after which the internal representation of the users is deleted (to save memory).
lpTTInstance | Pointer to client instance created by TT_InitTeamTalk. |
lpUserAccounts | A preallocated array to hold user accounts or NULL to query how many user accounts are available for retrieval. |
lpnHowMany | This is both an input and an output parameter. If lpUserAccounts is NULL lpnHowMany will receive the number of user accounts. If lpUserAccounts is not NULL lpnHowMany must contain how many user accounts which will fit in the lpUserAccounts array. Upon returning lpnHowMany will contain how many were actually written to the array. |