TeamTalk 5 Java DLL Version 5.12A
|
This section explains how to instantiate a new client instance and query its current state. More...
Classes | |
class | BearWare.TeamTalkBase |
Abstract class which encapsulates the TeamTalk 5 client. Instantiate either BearWare.TeamTalk5 (TeamTalk 5 SDK Standard Edition) or BearWare.TeamTalk5Pro (TeamTalk 5 SDK Professional Edition) to create the TeamTalk instance. More... | |
class | BearWare.TeamTalk5 |
Class used to load TeamTalk5.dll and instantiate a TeamTalk client in TeamTalk 5 SDK Standard Edition. More... | |
class | BearWare.TeamTalk5Pro |
Class used to load TeamTalk5Pro.dll and instantiate a TeamTalk client in TeamTalk 5 SDK Professional Edition. More... | |
Enumerations | |
enum | BearWare.ClientFlag : uint |
Flags used to describe the the client instance current state. More... | |
Functions | |
static string | BearWare.TeamTalkBase.GetVersion () |
Get the DLL's version number. More... | |
BearWare.TeamTalkBase.TeamTalkBase (bool poll_based) | |
Create a new TeamTalk client instance. More... | |
void | BearWare.TeamTalkBase.Dispose () |
bool | BearWare.TeamTalkBase.GetMessage (ref TTMessage pMsg, int nWaitMs) |
Poll for events in the client instance. More... | |
bool | BearWare.TeamTalkBase.PumpMessage (ClientEvent nClientEvent, int nIdentifier) |
Cause client instance event thread to schedule an update event. More... | |
BearWare.ClientFlag | BearWare.TeamTalkBase.GetFlags () |
Get a bitmask describing the client's current state. More... | |
static bool | BearWare.TeamTalkBase.SetLicenseInformation (string szRegName, string szRegKey) |
Set license information to disable trial mode. More... | |
void | BearWare.TeamTalkBase.ProcessMsg (TTMessage msg) |
Event handler for BearWare.TTMessage. More... | |
Variables | |
const int | BearWare.TeamTalkBase.TT_STRLEN = 512 |
The maximum length of all strings used in TeamTalkBase. This value includes the zero terminator, so 511 characters. Note that Unicode characters are converted to UTF-8 internally and limited once again to 512 if the string gets longer. More... | |
const int | BearWare.TeamTalkBase.TT_USERID_MAX = 0xFFF |
The highest user ID. More... | |
const int | BearWare.TeamTalkBase.TT_CHANNELID_MAX = 0xFFF |
The highest channel ID. Also used for TT_CLASSROOM_FREEFORALL. More... | |
const int | BearWare.TeamTalkBase.TT_LOCAL_USERID = 0 |
User ID passed to TeamTalkBase.EnableAudioBlockEvent() in order to receive BearWare.AudioBlock directly from sound input device after joining a channel. More... | |
const int | BearWare.TeamTalkBase.TT_LOCAL_TX_USERID = 0x1002 |
User ID passed to TeamTalkBase.EnableAudioBlockEvent() in order to receive BearWare.AudioBlock when voice transmission is activated. More... | |
const int | BearWare.TeamTalkBase.TT_MUXED_USERID = 0x1001 |
User ID used to identify muxed audio that has been mixed into a single stream. More... | |
Properties | |
ClientFlag | BearWare.TeamTalkBase.Flags [get] |
Same as GetFlags(). More... | |
This section explains how to instantiate a new client instance and query its current state.
To instantiate a client in TeamTalk 5 SDK Standard Edition call the constructor TeamTalk5.TeamTalk5() and in TeamTalk 5 Professional Edition call TeamTalk5Pro.TeamTalk5Pro(). In both cases the constructor has the parameter poll_events which should be 'false' for Windows Forms applications and 'true' for console applications. The poll_events parameter tells how the client instance should post its events. Since a Windows Forms application has its own message-loop it does not need to "poll" for events. This is, however, needed by console applications which should call TeamTalkBase.GetMessage() to get events.
When a new client instance is created a user application can call to TeamTalkBase.GetFlags() to query the client instance's current state. Initially the client instance's state will be ClientFlag #ClientFlag.CLIENT_CLOSED. This means that no operation has been performed on the client.
enum BearWare.ClientFlag : uint |
Flags used to describe the the client instance current state.
The client's state is a bitmask of the flags in ClientFlag.
The state of the client instance can be retrieved by calling TeamTalkBase.GetFlags() This enables the user application to display the possible options to the end user. If e.g. the flag #ClientFlag.CLIENT_AUTHORIZED is not set it will not be possible to perform any other commands except TeamTalkBase.DoLogin(). Doing so will make the server return an error message to the client.
Definition at line 4067 of file TeamTalk.cs.
|
static |
Get the DLL's version number.
Definition at line 4294 of file TeamTalk.cs.
|
protected |
Create a new TeamTalk client instance.
poll_based | If the application using this class is a Windows Forms application poll_based should be 'false' since events will be posted using the Windows message loop. In Console applications on the other hand, the user application will have to 'poll' for events using GetMessage(). Remember to put the [STAThread] macro on the Main method if building a console application. |
Definition at line 4306 of file TeamTalk.cs.
void BearWare.TeamTalkBase.Dispose | ( | ) |
Definition at line 4389 of file TeamTalk.cs.
bool BearWare.TeamTalkBase.GetMessage | ( | ref TTMessage | pMsg, |
int | nWaitMs | ||
) |
Poll for events in the client instance.
In a Windows Forms application events can be processed using the application message-loop, but in Console application the application must process the events itself. The most common way to do this is to start a timer which calls TeamTalkBase.GetMessage() every now and then to ensure the UI is updated with the latest events.
pMsg | Reference to a TTMessage instance which will hold the event that has occured. |
nWaitMs | The amount of time to wait for the event. If -1 the function will block forever or until the next event occurs. |
Definition at line 4422 of file TeamTalk.cs.
bool BearWare.TeamTalkBase.PumpMessage | ( | ClientEvent | nClientEvent, |
int | nIdentifier | ||
) |
Cause client instance event thread to schedule an update event.
Normally all events are due to a state change in the client instance. The state change (ClientEvent) is submitted by the client instance's internal thread. In some cases it's, however, convenient to make the internal thread submit the latest properties of an object. One example is after having changed the volume of a BearWare.User. Then your local copy of BearWare.User will no longer contain the latest nVolumeVoice
.
Calling PumpMessage() will make the client instance's internal thread queue an update of BearWare.User so the latest properties of the user can be retrieved from GetMessage().
It's also possible to simply use GetUser() but the problem with this approach is that this call is from a separate thread and therefore doesn't take the event queue into account.
nClientEvent | The event which should be queued. Currently only #ClientEvent.CLIENTEVENT_USER_STATECHANGE is supported. |
nIdentifier | The ID of the object to retrieve. Currently only nUserID is supported. |
Definition at line 4453 of file TeamTalk.cs.
BearWare.ClientFlag BearWare.TeamTalkBase.GetFlags | ( | ) |
Get a bitmask describing the client's current state.
Checks whether the client is connecting, connected, authorized, etc. The current state can be checked by and'ing the returned bitmask which is based on ClientFlag.
Definition at line 4467 of file TeamTalk.cs.
|
static |
Set license information to disable trial mode.
This function must be called before instantiating either the BearWare.TeamTalk5 or BearWare.TeamTalk5Pro-class.
szRegName | The registration name provided by BearWare.dk. |
szRegKey | The registration key provided by BearWare.dk. |
Definition at line 4489 of file TeamTalk.cs.
void BearWare.TeamTalkBase.ProcessMsg | ( | TTMessage | msg | ) |
Event handler for BearWare.TTMessage.
msg | The BearWare.TTMessage retrieved by TeamTalkBase.GetMessage() |
Definition at line 4498 of file TeamTalk.cs.
|
static |
The maximum length of all strings used in TeamTalkBase. This value includes the zero terminator, so 511 characters. Note that Unicode characters are converted to UTF-8 internally and limited once again to 512 if the string gets longer.
Definition at line 4178 of file TeamTalk.cs.
|
static |
The highest user ID.
Definition at line 4181 of file TeamTalk.cs.
|
static |
The highest channel ID. Also used for TT_CLASSROOM_FREEFORALL.
Definition at line 4185 of file TeamTalk.cs.
|
static |
User ID passed to TeamTalkBase.EnableAudioBlockEvent() in order to receive BearWare.AudioBlock directly from sound input device after joining a channel.
When this user ID is passed then the BearWare.AudioBlock received will be prior to audio preprocessing (BearWare.AudioPreprocessor).
Note, however, that #ClientEvent.CLIENTEVENT_USER_AUDIOBLOCK will not be triggered until the TeamTalk instance is in a channel. This is because the sound input device is not started until it knows the BearWare.AudioCodec's sample rate, number of channels and transmit interval.
Definition at line 4241 of file TeamTalk.cs.
|
static |
User ID passed to TeamTalkBase.EnableAudioBlockEvent() in order to receive BearWare.AudioBlock when voice transmission is activated.
Either through TeamTalkBase.EnableVoiceActivation() or TeamTalkBase.EnableVoiceTransmission().
Definition at line 4250 of file TeamTalk.cs.
|
static |
User ID used to identify muxed audio that has been mixed into a single stream.
This user ID is passed to TeamTalkBase.EnableAudioBlockEvent() in order to receive BearWare.AudioBlock of audio that is played in the TeamTalk instance.
Definition at line 4259 of file TeamTalk.cs.
|
get |
Same as GetFlags().
Definition at line 4475 of file TeamTalk.cs.