TeamTalk 4 .NET DLL
Version 4.5A
|
Users can be seen on the server after a successful call to TeamTalk4.DoLogin(). Once logged in a user can send user to user text-messages using TeamTalk4.DoTextMessage() as well as receive broadcast messages. A user cannot send audio and video data to other users until they have joined the same channel. More...
Classes | |
struct | BearWare.User |
A struct containing the properties of a user. More... | |
struct | BearWare.UserStatistics |
Packet reception and data statistics for a user. More... | |
struct | BearWare.TextMessage |
A struct containing the properties of a text message sent by a user. More... | |
Functions | |
int | BearWare.TeamTalk4.GetMyUserID () |
Get the local client instance's user ID. More... | |
bool | BearWare.TeamTalk4.GetMyUserAccount (out UserAccount lpUserAccount) |
Get the local client instance's BearWare.UserAccount. More... | |
UserType | BearWare.TeamTalk4.GetMyUserType () |
Get the client instance's user type. More... | |
int | BearWare.TeamTalk4.GetMyUserData () |
If an account was used in TeamTalk4.DoLogin() then this value will return the nUserData from the BearWare.UserAccount. More... | |
bool | BearWare.TeamTalk4.GetUser (int nUserID, out User lpUser) |
Get the user with the specified ID. More... | |
bool | BearWare.TeamTalk4.GetUserStatistics (int nUserID, out UserStatistics lpStats) |
Get statistics for data and packet reception from a user. More... | |
bool | BearWare.TeamTalk4.GetUserByUsername (string szUsername, out User lpUser) |
Get the user with the specified username. More... | |
bool | BearWare.TeamTalk4.GetTextMessage (int nMsgID, bool bRemoveMsg, out TextMessage lpTextMessage) |
Get a text-message sent by a user. More... | |
Variables | |
const int | BearWare.TeamTalk4.TT_CHANNELS_OPERATOR_MAX = 16 |
Properties | |
int | BearWare.TeamTalk4.UserID [get] |
Same as GetMyUserID(). More... | |
BearWare.UserType | BearWare.TeamTalk4.UserType [get] |
Same as GetMyUserType(). More... | |
int | BearWare.TeamTalk4.UserData [get] |
Same as GetMyUserData(). More... | |
Users can be seen on the server after a successful call to TeamTalk4.DoLogin(). Once logged in a user can send user to user text-messages using TeamTalk4.DoTextMessage() as well as receive broadcast messages. A user cannot send audio and video data to other users until they have joined the same channel.
A user can either be a default user UserType USERTYPE_DEFAULT or an administrator UserType USERTYPE_ADMIN. A default user has limited rights on the server whereas an administrator can change server properties, create, delete and remove channels as well as move, kick and ban users.
Once a user has joined a channel it is possible to transmit audio and video data to other users. If a user starts talking in the channel the event TeamTalk4.OnUserTalking() is posted to the user application and if a video frame is received the event TeamTalk4.OnUserVideoFrame() is sent to the user application.
While in the same channel the user application can change different settings on a user. If e.g. a user's volume is too low the user application can call TeamTalk4.SetUserVolume() to increase the volume. If it's still not loud enough TeamTalk4.SetUserGainLevel() can be called to use software to amplify the volume level.
If on the other hand the user application wants to mute a user TeamTalk4.SetUserMute() can be used for this. Note that muting a user doesn't mean that the client instance will stop receiving audio from that user, it simply means it will not be played. To stop receiving audio from a user the local client instance must ask the server to unsubscribe audio data from the user. This is explained in the next section.
When logging on to a server the local client instance will by default subscribe to user messages, channel messages, broadcast messages, audio data and video data from all users. If, however, a client wants to stop receiving e.g. audio from a user, he can call TeamTalk4.DoUnsubscribe() along with the user ID and the Subscription SUBSCRIBE_AUDIO-flag to tell the server that he no longer wants to receive audio from that user. The server will then respond with the event TeamTalk4.OnCmdUserUpdate() and the uLocalSubscriptions member of BearWare.User will have the Subscription SUBSCRIBE_AUDIO-flag removed. At the remote user the uPeerSubscriptions member will be changed. Subscribe/unsubscribe can also be done for user, channel and broadcast messages and video data. The function TeamTalk4.DoSubscribe() can be used to revert unsubscriptions.
Previously it has been said that users can only receive audio and video from users when they are in the same channel, but actually an administrator user can call TeamTalk4.DoSubscribe() with the flags prefixed SUBSCRIBE_INTERCEPT_* to spy on users outside his own channel. In other words it's possible hear and see video data outside ones channel. Also all user and channel messages sent by a user can also be intercepted in this way.
Having the ability to intercept all data sent from users in any channel means that it's possible to log everything that is happening on the server. Both audio and video transfers as well as text messaging. Checkout TeamTalk4.SetUserAudioFolder() on how to store voice data to audio files.
enum BearWare.UserType : uint |
The types of users supported.
Enumerator | |
---|---|
USERTYPE_NONE |
Used internally to denote an unauthenticated user. |
USERTYPE_DEFAULT |
A default user who can join channels. |
USERTYPE_ADMIN |
A user with administrator privileges. |
enum BearWare.Subscription : uint |
A user by default accepts audio, video and text messages from all users. Using subscribtions can, however, change what the local client instance is willing to accept from other users.
By calling TeamTalk4.DoSubscribe() and TeamTalk4.DoUnsubscribe() the local client instance can tell the server (and thereby remote users) what he is willing to accept from other users.
To check what a user subscribes to check out the BearWare.User struct's uLocalSubscriptions. The subscriptions with the prefix SUBSCRIBE_INTERCEPT_* options can be used to spy on users and receive data from them even if one is not participating in the same channel as they are.
Enumerator | |
---|---|
SUBSCRIBE_NONE |
No subscriptions. |
SUBSCRIBE_USER_MSG |
Subscribing to user messages. |
SUBSCRIBE_CHANNEL_MSG |
Subscribing to channel messages. |
SUBSCRIBE_BROADCAST_MSG |
Subscribing to broadcast messsages. |
SUBSCRIBE_AUDIO |
Subscribing to audio. |
SUBSCRIBE_VIDEO |
Subscribing to video. |
SUBSCRIBE_DESKTOP |
Subscribing to desktop sharing. |
SUBSCRIBE_CUSTOM_MSG |
Subscribing to custom user messages.
|
SUBSCRIBE_INTERCEPT_USER_MSG |
Intercept all user text messages sent by a user. Only user-type UserType USERTYPE_ADMIN can do this. |
SUBSCRIBE_INTERCEPT_CHANNEL_MSG |
Intercept all channel messages sent by a user. Only user-type UserType USERTYPE_ADMIN can do this. |
SUBSCRIBE_INTERCEPT_AUDIO |
Intercept all audio sent by a user. Only user-type UserType USERTYPE_ADMIN can do this. By enabling this subscription an administrator can listen to audio sent by users outside his own channel. SUBSCRIBE_INTERCEPT_BROADCAST_MSG = 0x0400, |
SUBSCRIBE_INTERCEPT_VIDEO |
Intercept all video sent by a user. Only user-type UserType USERTYPE_ADMIN can do this. By enabling this subscription an administrator can receive video frames sent by users outside his own channel. |
SUBSCRIBE_INTERCEPT_DESKTOP |
Intercept all desktop data sent by a user. Only user-type UserType USERTYPE_ADMIN can do this. By enabling this subscription an administrator can views desktops sent by users outside his own channel. |
SUBSCRIBE_INTERCEPT_CUSTOM_MSG |
Intercept all custom text messages sent by user. Only user-type UserType USERTYPE_ADMIN can do this. |
enum BearWare.UserState : uint |
The possible states for a user. Used for BearWare.User's uUserState variable.
Enumerator | |
---|---|
USERSTATE_NONE |
The user is in initial state. |
USERSTATE_TALKING |
If set the user is currently talking. Basically means the event TeamTalk4.OnUserTalking() has been posted for this user. This flag doesn't apply to "myself". For "myself" (client instance) use TeamTalk4.IsTransmitting() |
USERSTATE_MUTE |
If set the user is muted.
|
USERSTATE_P2P_CONNECTED |
Whether a peer to peer connection has been established to this user.
|
USERSTATE_DESKTOP |
If set the user currently has an active desktop session.
|
USERSTATE_VIDEO |
If set the user currently has an active video stream.
|
enum BearWare.TextMsgType : uint |
Text message types.
The types of messages which can be passed to TeamTalk4.DoTextMessage()().
Enumerator | |
---|---|
MSGTYPE_USER |
A User to user text message. |
MSGTYPE_CHANNEL |
A User to channel text message. |
MSGTYPE_BROADCAST |
A broadcast message. Only admins can send broadcast messages unless UserRight USERRIGHT_CLIENT_BROADCAST is enabled. |
MSGTYPE_CUSTOM |
A custom user to user text message. Works the same way as TextMsgType MSGTYPE_USER. |
int BearWare.TeamTalk4.GetMyUserID | ( | ) |
Get the local client instance's user ID.
This information can be retrieved after the OnCmdMyselfLoggedIn event.
bool BearWare.TeamTalk4.GetMyUserAccount | ( | out UserAccount | lpUserAccount | ) |
Get the local client instance's BearWare.UserAccount.
This information can be retrieved after TeamTalk4.OnCmdMyselfLoggedIn() event.
lpUserAccount | The local client's user account registered on the server. Note that the szPassword field of BearWare.UserAccount will not be set. |
UserType BearWare.TeamTalk4.GetMyUserType | ( | ) |
Get the client instance's user type.
This information can be retrieved after OnCmdMyselfLoggedIn event.
int BearWare.TeamTalk4.GetMyUserData | ( | ) |
If an account was used in TeamTalk4.DoLogin() then this value will return the nUserData from the BearWare.UserAccount.
This information can be retrieved after OnCmdMyselfLoggedIn event.
bool BearWare.TeamTalk4.GetUser | ( | int | nUserID, |
out User | lpUser | ||
) |
Get the user with the specified ID.
nUserID | The ID of the user to extract. |
lpUser | A preallocated BearWare.User struct. |
bool BearWare.TeamTalk4.GetUserStatistics | ( | int | nUserID, |
out UserStatistics | lpStats | ||
) |
Get statistics for data and packet reception from a user.
nUserID | The ID of the user to extract. |
lpStats | A preallocated BearWare.UserStatistics struct. |
bool BearWare.TeamTalk4.GetUserByUsername | ( | string | szUsername, |
out User | lpUser | ||
) |
Get the user with the specified username.
szUsername | The user's username (from BearWare.UserAccount). |
lpUser | A preallocated BearWare.User struct. |
bool BearWare.TeamTalk4.GetTextMessage | ( | int | nMsgID, |
bool | bRemoveMsg, | ||
out TextMessage | lpTextMessage | ||
) |
Get a text-message sent by a user.
The client instance uses a cyclic buffer in order not to drain resources and can hold a maximum of 65535 text-messages.
nMsgID | The ID of the message to extract. |
bRemoveMsg | Clear the text-message to release resources. |
lpTextMessage | Will receive the content of the message extracted. Pass NULL if only called to remove the message. |
const int BearWare.TeamTalk4.TT_CHANNELS_OPERATOR_MAX = 16 |
The maximum number of channels where a user can automatically become channel operator.
|
get |
Same as GetMyUserID().
|
get |
Same as GetMyUserType().
|
get |
Same as GetMyUserData().