TeamTalk 5 Java DLL Version 5.15A
Loading...
Searching...
No Matches
User Properties

This section explains users interact and how to configure user settings. 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...
 

Enumerations

enum  BearWare.UserType : uint { BearWare.UserType.USERTYPE_NONE = 0x0 , BearWare.UserType.USERTYPE_DEFAULT = 0x01 , BearWare.UserType.USERTYPE_ADMIN = 0x02 }
 The types of users supported. More...
 
enum  BearWare.Subscription : uint {
  BearWare.Subscription.SUBSCRIBE_NONE = 0x00000000 , BearWare.Subscription.SUBSCRIBE_USER_MSG = 0x00000001 , BearWare.Subscription.SUBSCRIBE_CHANNEL_MSG = 0x00000002 , BearWare.Subscription.SUBSCRIBE_BROADCAST_MSG = 0x00000004 ,
  BearWare.Subscription.SUBSCRIBE_CUSTOM_MSG = 0x00000008 , BearWare.Subscription.SUBSCRIBE_VOICE = 0x00000010 , BearWare.Subscription.SUBSCRIBE_VIDEOCAPTURE = 0x00000020 , BearWare.Subscription.SUBSCRIBE_DESKTOP = 0x00000040 ,
  BearWare.Subscription.SUBSCRIBE_DESKTOPINPUT = 0x00000080 , BearWare.Subscription.SUBSCRIBE_MEDIAFILE = 0x00000100 , BearWare.Subscription.SUBSCRIBE_INTERCEPT_USER_MSG = 0x00010000 , BearWare.Subscription.SUBSCRIBE_INTERCEPT_CHANNEL_MSG = 0x00020000 ,
  BearWare.Subscription.SUBSCRIBE_INTERCEPT_CUSTOM_MSG = 0x00080000 , BearWare.Subscription.SUBSCRIBE_INTERCEPT_VOICE = 0x00100000 , BearWare.Subscription.SUBSCRIBE_INTERCEPT_VIDEOCAPTURE = 0x00200000 , BearWare.Subscription.SUBSCRIBE_INTERCEPT_DESKTOP = 0x00400000 ,
  BearWare.Subscription.SUBSCRIBE_INTERCEPT_MEDIAFILE = 0x01000000
}
 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. More...
 
enum  BearWare.UserState : uint {
  BearWare.UserState.USERSTATE_NONE = 0x0000000 , BearWare.UserState.USERSTATE_VOICE = 0x00000001 , BearWare.UserState.USERSTATE_MUTE_VOICE = 0x00000002 , BearWare.UserState.USERSTATE_MUTE_MEDIAFILE = 0x00000004 ,
  BearWare.UserState.USERSTATE_DESKTOP = 0x00000008 , BearWare.UserState.USERSTATE_VIDEOCAPTURE = 0x00000010 , BearWare.UserState.USERSTATE_MEDIAFILE_AUDIO = 0x00000020 , BearWare.UserState.USERSTATE_MEDIAFILE_VIDEO = 0x00000040 ,
  BearWare.UserState.USERSTATE_MEDIAFILE
}
 The possible states for a user. Used for BearWare.User's uUserState variable. More...
 
enum  BearWare.TextMsgType : uint { BearWare.TextMsgType.MSGTYPE_USER = 1 , BearWare.TextMsgType.MSGTYPE_CHANNEL = 2 , BearWare.TextMsgType.MSGTYPE_BROADCAST = 3 , BearWare.TextMsgType.MSGTYPE_CUSTOM = 4 }
 Text message types. More...
 

Functions

int BearWare.TeamTalkBase.GetMyUserID ()
 Get the local client instance's user ID.
 
bool BearWare.TeamTalkBase.GetMyUserAccount (ref UserAccount lpUserAccount)
 Get the local client instance's BearWare.UserAccount.
 
UserType BearWare.TeamTalkBase.GetMyUserType ()
 Get the client instance's user type.
 
BearWare.UserRight BearWare.TeamTalkBase.GetMyUserRights ()
 Convenience method for TeamTalkBase.GetMyUserAccount()
 
int BearWare.TeamTalkBase.GetMyUserData ()
 If an account was used in TeamTalkBase.DoLogin() then this value will return the nUserData from the BearWare.UserAccount.
 
bool BearWare.TeamTalkBase.GetUser (int nUserID, ref User lpUser)
 Get the user with the specified ID.
 
bool BearWare.TeamTalkBase.GetUserStatistics (int nUserID, ref UserStatistics lpUserStatistics)
 Get statistics for data and packet reception from a user.
 
bool BearWare.TeamTalkBase.GetUserByUsername (string szUsername, ref User lpUser)
 Get the user with the specified username.
 

Variables

const int BearWare.TeamTalkBase.TT_CHANNELS_OPERATOR_MAX = 16
 

Properties

int BearWare.TeamTalkBase.UserID [get]
 Same as GetMyUserID().
 
BearWare.UserType BearWare.TeamTalkBase.UserType [get]
 Same as GetMyUserType().
 
BearWare.UserRight BearWare.TeamTalkBase.UserRights [get]
 Same as GetMyUserRights().
 
int BearWare.TeamTalkBase.UserData [get]
 Same as GetMyUserData().
 

Detailed Description

This section explains users interact and how to configure user settings.

Users can be seen on the server after a successful call to TeamTalkBase.DoLogin(). Once logged in a user can send user to user text-messages using TeamTalkBase.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.

Sections:

User Types

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 (see uUserRights of BearWare.UserAccount) whereas an administrator can change server properties, create, delete and remove channels as well as move, kick and ban users. Checkout User Administration on how to set up user rights.

User Interaction

Once a user has joined a channel it is possible to transmit voice and video data to other users. If a user starts talking in the channel the event TeamTalkBase.OnUserStateChange() is posted to the user application and if a video frame is received the event TeamTalkBase.OnUserVideoFrame() is sent to the user application.

User Audio Settings

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 TeamTalkBase.SetUserVolume() to increase the volume.

If on the other hand the user application wants to mute a user TeamTalkBase.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.

User Subscriptions

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 TeamTalkBase.DoUnsubscribe() along with the user ID and the Subscription.SUBSCRIBE_VOICE-flag to tell the server that he no longer wants to receive audio from that user. The server will then respond with the event TeamTalkBase.OnCmdUserUpdate() and the uLocalSubscriptions member of BearWare.User will have the Subscription.SUBSCRIBE_VOICE-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 TeamTalkBase.DoSubscribe() can be used to revert unsubscriptions.

Spying on Users

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 TeamTalkBase.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 TeamTalkBase.SetUserMediaStorageDir() on how to store voice data to audio files.

Enumeration Type Documentation

◆ UserType

enum BearWare.UserType : uint

The types of users supported.

See also
User
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.

Definition at line 2081 of file TeamTalk.cs.

◆ Subscription

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 TeamTalkBase.DoSubscribe() and TeamTalkBase.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.

See also
TeamTalkBase.DoSubscribe
TeamTalkBase.DoUnsubscribe
Enumerator
SUBSCRIBE_NONE 

No subscriptions.

SUBSCRIBE_USER_MSG 

Subscribing to user text messages.

See also
BearWare.TextMsgType.MSGTYPE_USER.
SUBSCRIBE_CHANNEL_MSG 

Subscribing to channel texxt messages.

See also
BearWare.TextMsgType.MSGTYPE_CHANNEL.
SUBSCRIBE_BROADCAST_MSG 

Subscribing to broadcast text messsages.

See also
BearWare.TextMsgType.MSGTYPE_BROADCAST.
SUBSCRIBE_CUSTOM_MSG 

Subscribing to custom user messages.

See also
BearWare.TextMsgType.MSGTYPE_CUSTOM.
SUBSCRIBE_VOICE 

Subscribing to BearWare.StreamType.STREAMTYPE_VOICE.

SUBSCRIBE_VIDEOCAPTURE 

Subscribing to BearWare.StreamType.STREAMTYPE_VIDEOCAPTURE.

SUBSCRIBE_DESKTOP 

Subscribing to BearWare.StreamType.STREAMTYPE_DESKTOP.

SUBSCRIBE_DESKTOPINPUT 

Subscribing to BearWare.StreamType.STREAMTYPE_DESKTOPINPUT.

See also
TeamTalkBase.GetUserDesktopInput()
TeamTalkBase.SendDesktopInput()
SUBSCRIBE_MEDIAFILE 

Subscribing to BearWare.StreamType.STREAMTYPE_MEDIAFILE_VIDEO and BearWare.StreamType.STREAMTYPE_MEDIAFILE_AUDIO.

SUBSCRIBE_INTERCEPT_USER_MSG 

Intercept all user text messages sent by a user. Only user-type BearWare.UserType.USERTYPE_ADMIN can do this.

SUBSCRIBE_INTERCEPT_CHANNEL_MSG 

Intercept all channel messages sent by a user. Only user-type BearWare.UserType.USERTYPE_ADMIN can do this.

SUBSCRIBE_INTERCEPT_CUSTOM_MSG 

Intercept all custom text messages sent by user. Only user-type BearWare.UserType.USERTYPE_ADMIN can do this.

SUBSCRIBE_INTERCEPT_VOICE 

Intercept all voice sent by a user. Only user-type BearWare.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_VIDEOCAPTURE 

Intercept all video sent by a user. Only user-type BearWare.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 BearWare.UserType.USERTYPE_ADMIN can do this. By enabling this subscription an administrator can views desktops sent by users outside his own channel.

SUBSCRIBE_INTERCEPT_MEDIAFILE 

Intercept all media file data sent by a user. Only user-type BearWare.UserType.USERTYPE_ADMIN can do this. By enabling this subscription an administrator can listen to media files sent by users outside his own channel.

Definition at line 2196 of file TeamTalk.cs.

◆ UserState

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_VOICE 

If set the user is currently talking. If this flag changes the event BearWare.ClientEvent.CLIENTEVENT_USER_STATECHANGE is posted.

USERSTATE_MUTE_VOICE 

If set the user's voice is muted.

See also
TeamTalkBase.SetUserMute
USERSTATE_MUTE_MEDIAFILE 

If set the user's media file playback is muted.

See also
TeamTalkBase.SetUserMute
USERSTATE_DESKTOP 

If set the user currently has an active desktop session. If this flag changes the event BearWare.ClientEvent.CLIENTEVENT_USER_STATECHANGE is posted.

See also
TeamTalkBase.SendDesktopWindow().
USERSTATE_VIDEOCAPTURE 

If set the user currently has an active video stream. If this flag changes the event BearWare.ClientEvent.CLIENTEVENT_USER_STATECHANGE is posted.

See also
CLIENTEVENT_USER_VIDEOCAPTURE.
USERSTATE_MEDIAFILE_AUDIO 

If set the user currently streams an audio file. If user is streaming a video file with audio then this value is also set. If this flag changes the event BearWare.ClientEvent.CLIENTEVENT_USER_STATECHANGE is posted.

See also
TeamTalkBase.StartStreamingMediaFile()
USERSTATE_MEDIAFILE_VIDEO 

If set the user currently streams a video file. If this flag changes the event BearWare.ClientEvent.CLIENTEVENT_USER_STATECHANGE is posted.

See also
TeamTalkBase.StartStreamingMediaFile()
USERSTATE_MEDIAFILE 

If set user is streaming a media file. If this flag changes the event BearWare.ClientEvent.CLIENTEVENT_USER_STATECHANGE is posted.

See also
TeamTalkBase.StartStreamingMediaFile()

Definition at line 2262 of file TeamTalk.cs.

◆ TextMsgType

enum BearWare.TextMsgType : uint

Text message types.

The types of messages which can be passed to TeamTalkBase.DoTextMessage().

See also
BearWare.TextMessage
BearWare.TeamTalkBase.DoTextMessage
CLIENTEVENT_CMD_USER_TEXTMSG
Enumerator
MSGTYPE_USER 

A User to user text message. A message of this type can be sent across channels.

MSGTYPE_CHANNEL 

A User to channel text message. Users of type BearWare.UserType.USERTYPE_DEFAULT can only send this text message to the channel they're participating in, whereas users of type BearWare.UserType.USERTYPE_ADMIN can send to any channel.

MSGTYPE_BROADCAST 

A broadcast message. Requires BearWare.UserRight.USERRIGHT_TEXTMESSAGE_BROADCAST.

MSGTYPE_CUSTOM 

A custom user to user text message. Works the same way as BearWare.TextMsgType BearWare.TextMsgType.MSGTYPE_USER.

Definition at line 2489 of file TeamTalk.cs.

Function Documentation

◆ GetMyUserID()

int BearWare.TeamTalkBase.GetMyUserID ( )

Get the local client instance's user ID.

This information can be retrieved after the #OnCmdMyselfLoggedIn event.

Returns
Returns the user ID assigned to the current user on the server. -1 is returned if no ID has been assigned to the user.

Definition at line 7703 of file TeamTalk.cs.

◆ GetMyUserAccount()

bool BearWare.TeamTalkBase.GetMyUserAccount ( ref UserAccount  lpUserAccount)

Get the local client instance's BearWare.UserAccount.

This information can be retrieved after TeamTalkBase.OnCmdMyselfLoggedIn() event.

Parameters
lpUserAccountThe local client's user account registered on the server. Note that the szPassword field of BearWare.UserAccount will not be set.
See also
TeamTalkBase.DoLogin

Definition at line 7718 of file TeamTalk.cs.

◆ GetMyUserType()

UserType BearWare.TeamTalkBase.GetMyUserType ( )

Get the client instance's user type.

This information can be retrieved after #OnCmdMyselfLoggedIn event.

Returns
A bitmask of the type of user based on BearWare.UserType.
See also
DoLogin
BearWare.UserType
GetMyUserAccount

Definition at line 7738 of file TeamTalk.cs.

◆ GetMyUserRights()

BearWare.UserRight BearWare.TeamTalkBase.GetMyUserRights ( )

Convenience method for TeamTalkBase.GetMyUserAccount()

Definition at line 7754 of file TeamTalk.cs.

◆ GetMyUserData()

int BearWare.TeamTalkBase.GetMyUserData ( )

If an account was used in TeamTalkBase.DoLogin() then this value will return the nUserData from the BearWare.UserAccount.

This information can be retrieved after #OnCmdMyselfLoggedIn event.

Returns
If set, nUserData from BearWare.UserAccount, otherwise 0.

Definition at line 7768 of file TeamTalk.cs.

◆ GetUser()

bool BearWare.TeamTalkBase.GetUser ( int  nUserID,
ref User  lpUser 
)

Get the user with the specified ID.

Parameters
nUserIDThe ID of the user to extract.
lpUserA preallocated BearWare.User struct.
See also
GetUserByUsername

Definition at line 7784 of file TeamTalk.cs.

◆ GetUserStatistics()

bool BearWare.TeamTalkBase.GetUserStatistics ( int  nUserID,
ref UserStatistics  lpUserStatistics 
)

Get statistics for data and packet reception from a user.

Parameters
nUserIDThe ID of the user to extract.
lpUserStatisticsA preallocated BearWare.UserStatistics struct.

Definition at line 7793 of file TeamTalk.cs.

◆ GetUserByUsername()

bool BearWare.TeamTalkBase.GetUserByUsername ( string  szUsername,
ref User  lpUser 
)

Get the user with the specified username.

Remember to take into account that multiple users can log in with the same account if BearWare.UserRight.USERRIGHT_MULTI_LOGIN is specified.

Parameters
szUsernameThe user's username (from BearWare.UserAccount).
lpUserA preallocated BearWare.User struct.

Definition at line 7805 of file TeamTalk.cs.

Variable Documentation

◆ TT_CHANNELS_OPERATOR_MAX

const int BearWare.TeamTalkBase.TT_CHANNELS_OPERATOR_MAX = 16
static

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

See also
BearWare.UserAccount

Definition at line 4299 of file TeamTalk.cs.

Properties

◆ UserID

int BearWare.TeamTalkBase.UserID
get

Same as GetMyUserID().

Definition at line 7726 of file TeamTalk.cs.

◆ UserType

BearWare.UserType BearWare.TeamTalkBase.UserType
get

Same as GetMyUserType().

Definition at line 7746 of file TeamTalk.cs.

◆ UserRights

BearWare.UserRight BearWare.TeamTalkBase.UserRights
get

Same as GetMyUserRights().

Definition at line 7751 of file TeamTalk.cs.

◆ UserData

int BearWare.TeamTalkBase.UserData
get

Same as GetMyUserData().

Definition at line 7776 of file TeamTalk.cs.