TeamTalk 5 Java DLL
Version 5.11A
|
This section contains the list of commands which can be issued by the client instance to the server. More...
Functions | |
int | BearWare.TeamTalkBase.DoPing () |
Ping server and wait for server to reply. More... | |
int | BearWare.TeamTalkBase.DoLogin (string szNickname, string szUsername, string szPassword) |
Same as DologinEx() but without the option to specify szClientName . Kept for backwards compatibility. More... | |
int | BearWare.TeamTalkBase.DoLoginEx (string szNickname, string szUsername, string szPassword, string szClientName) |
Logon to a server. More... | |
int | BearWare.TeamTalkBase.DoLogout () |
Logout of the server. More... | |
int | BearWare.TeamTalkBase.DoJoinChannel (Channel lpChannel) |
Create a new channel and join it. More... | |
int | BearWare.TeamTalkBase.DoJoinChannelByID (int nChannelID, string szPassword) |
Join an existing channel. More... | |
int | BearWare.TeamTalkBase.DoLeaveChannel () |
Leave the current channel. More... | |
int | BearWare.TeamTalkBase.DoChangeNickname (string szNewNick) |
Change the client instance's nick name. More... | |
int | BearWare.TeamTalkBase.DoChangeStatus (int nStatusMode, string szStatusMessage) |
Change the client instance's currect status. More... | |
int | BearWare.TeamTalkBase.DoTextMessage (TextMessage lpTextMessage) |
Send a text message to either a user or a channel. More... | |
int | BearWare.TeamTalkBase.DoChannelOp (int nUserID, int nChannelID, bool bMakeOperator) |
Make another user operator of a channel. More... | |
int | BearWare.TeamTalkBase.DoChannelOpEx (int nUserID, int nChannelID, string szOpPassword, bool bMakeOperator) |
Make another user operator of a channel using the szOpPassword of BearWare.Channel. More... | |
int | BearWare.TeamTalkBase.DoKickUser (int nUserID, int nChannelID) |
Kick user from either channel or server. More... | |
int | BearWare.TeamTalkBase.DoSendFile (int nChannelID, string szLocalFilePath) |
Send a file to the specified channel. More... | |
int | BearWare.TeamTalkBase.DoRecvFile (int nChannelID, int nFileID, string szLocalFilePath) |
Download a file from the specified channel. More... | |
int | BearWare.TeamTalkBase.DoDeleteFile (int nChannelID, int nFileID) |
Delete a file from a channel. More... | |
int | BearWare.TeamTalkBase.DoSubscribe (int nUserID, Subscription uSubscriptions) |
Subscribe to user events and/or data. More... | |
int | BearWare.TeamTalkBase.DoUnsubscribe (int nUserID, Subscription uSubscriptions) |
Unsubscribe to user events/data. This can be used to ignore messages or voice data from a specific user. More... | |
int | BearWare.TeamTalkBase.DoMakeChannel (Channel lpChannel) |
Make a new channel on the server. More... | |
int | BearWare.TeamTalkBase.DoUpdateChannel (Channel lpChannel) |
Update a channel's properties. More... | |
int | BearWare.TeamTalkBase.DoRemoveChannel (int nChannelID) |
Remove a channel from a server. More... | |
int | BearWare.TeamTalkBase.DoMoveUser (int nUserID, int nChannelID) |
Issue command to move a user from one channel to another. More... | |
int | BearWare.TeamTalkBase.DoUpdateServer (ServerProperties lpServerProperties) |
Update server properties. More... | |
int | BearWare.TeamTalkBase.DoListUserAccounts (int nIndex, int nCount) |
Issue command to list user accounts on the server. More... | |
int | BearWare.TeamTalkBase.DoNewUserAccount (UserAccount lpUserAccount) |
Issue command to create a new user account on the server. More... | |
int | BearWare.TeamTalkBase.DoDeleteUserAccount (string szUsername) |
Issue command to delete a user account on the server. More... | |
int | BearWare.TeamTalkBase.DoBanUser (int nUserID, int nChannelID) |
Issue a ban command on a user in a specific channel. More... | |
int | BearWare.TeamTalkBase.DoBanUserEx (int nUserID, BanType uBanTypes) |
Ban the user with nUserID using the ban types specified. More... | |
int | BearWare.TeamTalkBase.DoBan (BannedUser lpBannedUser) |
Ban the properties specified in lpBannedUser . More... | |
int | BearWare.TeamTalkBase.DoBanIPAddress (string szIPAddress, int nChannelID) |
Issue a ban command on an IP-address user. More... | |
int | BearWare.TeamTalkBase.DoUnBanUser (string szIPAddress, int nChannelID) |
Unban the user with the specified IP-address. More... | |
int | BearWare.TeamTalkBase.DoUnBanUserEx (BannedUser lpBannedUser) |
Unban the properties specified in BearWare.BannedUser. More... | |
int | BearWare.TeamTalkBase.DoListBans (int nChannelID, int nIndex, int nCount) |
Issue a command to list the banned users. More... | |
int | BearWare.TeamTalkBase.DoSaveConfig () |
Save the server's current state to its settings file (typically the server's .xml file). More... | |
int | BearWare.TeamTalkBase.DoQueryServerStats () |
Get the server's current statistics. More... | |
int | BearWare.TeamTalkBase.DoQuit () |
Quit from server. More... | |
This section contains the list of commands which can be issued by the client instance to the server.
Functions with the prefix Do*
are commands which the client can issue to the server. Every Do*
function returns a command identifier which can user application can use to check when the server has finished processing the issued command. Once the client receives a response to a command the client instance posts the event TeamTalkBase.OnCmdProcessing() to the user application containing the command identifier and whether the command is being processed or it has completed.
As an example, say the user application wants to issue the TeamTalkBase.DoLogin() command. When the application calls TeamTalkBase.DoLogin() the returned command ID is stored in a variable. The application then waits for the TeamTalkBase.OnCmdProcessing() event to be posted with the stored command ID. The first time TeamTalkBase.OnCmdProcessing() is posted to the user application it is to say that processing has begun. The second time TeamTalkBase.OnCmdProcessing() is called it is to say that the command has completed. In between the command starting and completing several other events may take place. If e.g. the TeamTalkBase.DoLogin() fails the user application would receive the event TeamTalkBase.OnCmdError(). If on the other hand the command was successful all the channels and user would be posted as events to the application before the login-command completed processing.
int BearWare.TeamTalkBase.DoPing | ( | ) |
Ping server and wait for server to reply.
Use this command to check if the server is responding.
If the client instance doesn't ping the server within the timeout specified by nUserTimeout
in BearWare.ServerProperties, then the server will disconnect the client.
The client instance automatically pings the server at half the time specified by nUserTimeout
in BearWare.ServerProperties.
ClientEvent.CLIENTEVENT_CMD_PROCESSING is posted if server replies.
Definition at line 6623 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoLogin | ( | string | szNickname, |
string | szUsername, | ||
string | szPassword | ||
) |
Same as DologinEx() but without the option to specify szClientName
. Kept for backwards compatibility.
szNickname | The nickname to use. |
szUsername | The username of the BearWare.UserAccount set up on the server. |
szPassword | The password of the user account on the server. Leave blank if no account is needed on the server. |
Definition at line 6639 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoLoginEx | ( | string | szNickname, |
string | szUsername, | ||
string | szPassword, | ||
string | szClientName | ||
) |
Logon to a server.
Once connected to a server call this function to logon. If the login is successful OnCmdMyselfLoggedIn is posted, otherwise OnCmdError. Once logged on it's not possible to talk to other users until the client instance joins a channel. Call DoJoinChannel to join a channel.
Possible errors:
szNickname | The nickname to use. |
szUsername | The username of the BearWare.UserAccount set up on the server. |
szPassword | The password of the user account on the server. Leave blank if no account is needed on the server. |
szClientName | The name of the client application used. This is an optional value and can be kept blank. |
Definition at line 6673 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoLogout | ( | ) |
Logout of the server.
If successful the event OnCmdMyselfLoggedOut will be posted.
Possible errors:
Definition at line 6691 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoJoinChannel | ( | Channel | lpChannel | ) |
Create a new channel and join it.
This function can also be used to join an existing channel and in this case the parameters szTopic and szOpPassword are ignored.
When TeamTalkBase.DoJoinChannel() is used to create channels it works similar to IRC. If the client instance tries to join a channel which does not exist it will be created as a new channel. If the client instance is the last user to leave a channel the channel will be removed on the server.
If the channel is created successfully the event ClientEvent.CLIENTEVENT_CMD_CHANNEL_NEW will be sent, followed by ClientEvent.CLIENTEVENT_CMD_USER_JOINED.
User rights required:
Possible errors:
lpChannel | The channel to join or create if it doesn't already exist. |
Definition at line 6734 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoJoinChannelByID | ( | int | nChannelID, |
string | szPassword | ||
) |
Join an existing channel.
This command basically calls DoJoinChannel but omits the unnecessary parameters for only joining a channel and not creating a new one.
Possible errors:
nChannelID | The ID of the channel to join. |
szPassword | The password for the channel to join. |
Definition at line 6761 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoLeaveChannel | ( | ) |
Leave the current channel.
Note that DoLeaveChannel() doesn't take any parameters since a user can only participate in one channel at the time. If command is successful the event OnCmdUserLeftChannel will be posted.
Possible errors:
Definition at line 6784 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoChangeNickname | ( | string | szNewNick | ) |
Change the client instance's nick name.
The event OnCmdUserUpdate will be posted if the update was successful.
Command will be rejected if UserRight.USERRIGHT_LOCKED_NICKNAME is set.
Possible errors:
szNewNick | is the new nick name to use. |
Definition at line 6805 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoChangeStatus | ( | int | nStatusMode, |
string | szStatusMessage | ||
) |
Change the client instance's currect status.
The event OnCmdUserUpdate will be posted if the update was successful.
Command will be rejected if UserRight.USERRIGHT_LOCKED_STATUS is set.
Possible errors:
nStatusMode | The value for the status mode. |
szStatusMessage | The user's message associated with the status mode. |
Definition at line 6828 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoTextMessage | ( | TextMessage | lpTextMessage | ) |
Send a text message to either a user or a channel.
Can also be a broadcast message which is received by all users on the server. This, however, requires UserRight.USERRIGHT_TEXTMESSAGE_BROADCAST.
Possible errors:
lpTextMessage | A preallocated text-message struct. |
Definition at line 6850 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoChannelOp | ( | int | nUserID, |
int | nChannelID, | ||
bool | bMakeOperator | ||
) |
Make another user operator of a channel.
User rights required:
Possible errors:
nUserID | The user who should become channel operator. |
nChannelID | The channel where the user should become operator |
bMakeOperator | Whether user should be op'ed or deop'ed |
Definition at line 6874 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoChannelOpEx | ( | int | nUserID, |
int | nChannelID, | ||
string | szOpPassword, | ||
bool | bMakeOperator | ||
) |
Make another user operator of a channel using the szOpPassword of BearWare.Channel.
Possible errors:
nUserID | The user who should become channel operator. |
nChannelID | The channel where the user should become operator. |
szOpPassword | The szOpPassword of BearWare.Channel. |
bMakeOperator | Whether user should be op'ed or deop'ed. |
Definition at line 6897 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoKickUser | ( | int | nUserID, |
int | nChannelID | ||
) |
Kick user from either channel or server.
To ban a user call TeamTalkBase.DoBanUser() before TeamTalkBase.DoKickUser().
User rights required:
Possible errors:
nUserID | The ID of the user to kick. |
nChannelID | The channel where the user shoul be kicked from or specify 0 to kick the user off the server. |
Definition at line 6926 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoSendFile | ( | int | nChannelID, |
string | szLocalFilePath | ||
) |
Send a file to the specified channel.
If user is logged on as an admin the file can be located in any channel. If the user is not an admin the file must be located in the same channel as the user is currently participating in. The file being uploaded must have a file size which is less than the disk quota of the channel, minus the sum of all the files in the channel. The disk quota of a channel can be obtained in the nDiskQuota
of the BearWare.Channel struct passed to TeamTalkBase.GetChannel().
User rights required:
Possible errors:
nChannelID | The ID of the channel of where to put the file. Only admins can upload in channel other then their own. |
szLocalFilePath | The path of the file to upload, e.g. C:\myfile.txt. |
Definition at line 6964 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoRecvFile | ( | int | nChannelID, |
int | nFileID, | ||
string | szLocalFilePath | ||
) |
Download a file from the specified channel.
If user is logged on as an admin the file can be located in any channel. If the user is not an admin the file must be located in the same channel as the user is currently participating in.
User rights required:
Possible errors:
nChannelID | The ID of the channel of where to get the file. Only admins can download in channel other then their own. |
nFileID | The ID of the file which is passed by OnCmdFileNew. |
szLocalFilePath | The path of where to store the file, e.g. C:\myfile.txt. |
Definition at line 6997 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoDeleteFile | ( | int | nChannelID, |
int | nFileID | ||
) |
Delete a file from a channel.
A user is allowed to delete a file from a channel if either the user is an admin, operator of the channel or owner of the file. To be owner of the file a user must have a BearWare.UserAccount on the server.
Possible errors:
nChannelID | The ID of the channel where the file is located. |
nFileID | The ID of the file to delete. The ID of the file which is passed by OnCmdFileNew. |
Definition at line 7023 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoSubscribe | ( | int | nUserID, |
Subscription | uSubscriptions | ||
) |
Subscribe to user events and/or data.
Possible errors:
nUserID | The ID of the user this should affect. |
uSubscriptions | Union of Subscription to subscribe to. |
Definition at line 7041 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoUnsubscribe | ( | int | nUserID, |
Subscription | uSubscriptions | ||
) |
Unsubscribe to user events/data. This can be used to ignore messages or voice data from a specific user.
Possible errors:
nUserID | The ID of the user this should affect. |
uSubscriptions | Union of Subscription to unsubscribe. |
Definition at line 7060 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoMakeChannel | ( | Channel | lpChannel | ) |
Make a new channel on the server.
This command only applies to users with UserRight.USERRIGHT_MODIFY_CHANNELS.
User rights required:
Possible errors:
lpChannel | A Channel-structure containing information about the channel being created. The Channel's member nChannelID is ignored. |
Definition at line 7089 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoUpdateChannel | ( | Channel | lpChannel | ) |
Update a channel's properties.
Users with UserRight.USERRIGHT_MODIFY_CHANNELS can update all properties of a channel.
A user with channel-operator status (see TeamTalkBase.DoChannelOp()) can also update a channel's properties, but is not able to change the following properties:
audiocodec
nDiskQuota
nMaxUsers
uChannelType
Note that a channel's BearWare.AudioCodec cannot be changed if there's currently users in the channel.
Possible errors:
lpChannel | A Channel-structure containing information about the channel being modified. The channel member's nParentID and szName are ignored. |
Definition at line 7125 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoRemoveChannel | ( | int | nChannelID | ) |
Remove a channel from a server.
This command only applies to users with UserRight.USERRIGHT_MODIFY_CHANNELS.
If there's any users in the channel they will be kicked and subchannels will be deleted as well.
Possible errors:
nChannelID | The ID of the channel to remove. |
Definition at line 7147 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoMoveUser | ( | int | nUserID, |
int | nChannelID | ||
) |
Issue command to move a user from one channel to another.
User rights required:
Possible errors:
Definition at line 7170 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoUpdateServer | ( | ServerProperties | lpServerProperties | ) |
Update server properties.
User rights required:
Possible errors:
lpServerProperties | A structure holding the information to be set on the server. |
Definition at line 7190 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoListUserAccounts | ( | int | nIndex, |
int | nCount | ||
) |
Issue command to list user accounts on the server.
The event OnCmdUserAccount() will be posted for every BearWare.UserAccount on the server. Ensure not to list too many many user accounts since this may suspend event handling.
User accounts can be used to create users with different user rights.
Only UserType.USERTYPE_ADMIN can issue this command.
Possible errors:
nIndex | Index of first user to display. |
nCount | The number of users to retrieve. |
Definition at line 7218 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoNewUserAccount | ( | UserAccount | lpUserAccount | ) |
Issue command to create a new user account on the server.
Check out section User Administration to see how the server handles users.
Only UserType.USERTYPE_ADMIN can issue this command.
Possible errors:
lpUserAccount | The properties of the user account to create. |
Definition at line 7244 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoDeleteUserAccount | ( | string | szUsername | ) |
Issue command to delete a user account on the server.
Only UserType.USERTYPE_ADMIN can issue this command.
Possible errors:
szUsername | The username of the user account to delete. |
Definition at line 7266 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoBanUser | ( | int | nUserID, |
int | nChannelID | ||
) |
Issue a ban command on a user in a specific channel.
The ban applies to the user's IP-address. Call TeamTalkBase.DoKickUser() to kick the user off the server.
User rights required:
Possible errors:
nUserID | The ID of the user to ban. |
nChannelID | Set to 0 to ban from logging in. Otherwise specify user's current channel. |
Definition at line 7297 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoBanUserEx | ( | int | nUserID, |
BanType | uBanTypes | ||
) |
Ban the user with nUserID
using the ban types specified.
If uBanTypes
contains BanType.BANTYPE_USERNAME then the username cannot join the channel where
nUserID is currently present.
If uBanTypes
contains BanType.BANTYPE_IPADDR then the IP-address cannot join the channel where
nUserID is currently present.
Definition at line 7313 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoBan | ( | BannedUser | lpBannedUser | ) |
Ban the properties specified in lpBannedUser
.
The uBanTypes
specifies what the ban applies to. If BanType.BANTYPE_CHANNEL is specified in the uBanTypes
of lpBannedUser
then the ban applies to joining a channel, DoJoinChannel(). Otherwise the ban applies to login, DoLogin().
If BanType.BANTYPE_IPADDR is specified then the IP-address must be set in szIPAddress
and any IP-address matching will receive ClientError.CMDERR_SERVER_BANNED or ClientError.CMDERR_CHANNEL_BANNED for TeamTalkBase.DoLogin() or TeamTalkBase.DoJoinChannel(). If instead BanType.BANTYPE_USERNAME is specified then szUsername
must be set and the same rule applies as for IP-addresses.
Definition at line 7336 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoBanIPAddress | ( | string | szIPAddress, |
int | nChannelID | ||
) |
Issue a ban command on an IP-address user.
Same as TeamTalkBase.DoBanUser() except this command applies to IP-addresses and therefore doesn't require a user to be logged in.
User rights required:
Possible errors:
szIPAddress | The IP-address to ban. |
nChannelID | Set to zero. |
Definition at line 7361 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoUnBanUser | ( | string | szIPAddress, |
int | nChannelID | ||
) |
Unban the user with the specified IP-address.
User rights required:
Possible errors:
szIPAddress | The IP-address to unban. |
nChannelID | Set to zero. |
Definition at line 7386 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoUnBanUserEx | ( | BannedUser | lpBannedUser | ) |
Unban the properties specified in BearWare.BannedUser.
The uBanTypes in BearWare.BannedUser determines which properties should have their ban remove. E.g. uBanTypes = BanType.BANTYPE_USERNAME and szUsername
= "guest" will remove all bans where the username is "guest".
Definition at line 7400 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoListBans | ( | int | nChannelID, |
int | nIndex, | ||
int | nCount | ||
) |
Issue a command to list the banned users.
The event OnCmdBannedUser() will be posted for every BearWare.BannedUser on the server.
User rights required:
Possible errors:
nChannelID | Set to zero. |
nIndex | Index of first ban to display. |
nCount | The number of bans to display. |
Definition at line 7425 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoSaveConfig | ( | ) |
Save the server's current state to its settings file (typically the server's .xml file).
Only UserType.USERTYPE_ADMIN can issue this command.
Note that the server only saves channels with the flag ChannelType ChannelType.CHANNEL_PERMANENT.
Possible errors:
Definition at line 7446 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoQueryServerStats | ( | ) |
Get the server's current statistics.
Event ClientEvent.CLIENTEVENT_CMD_SERVERSTATISTICS will be posted when server has sent response.
Only UserType.USERTYPE_ADMIN can issue this command.
Possible errors:
Definition at line 7466 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoQuit | ( | ) |
Quit from server.
Possible errors:
This will generate a OnConnectionLost since the server will drop the client.
Definition at line 7482 of file TeamTalk.cs.