TeamTalk 4 C-API DLL  Version 4.5A
Client Error Handling

There are two types errors which can occur in the client, either server command error or internal errors. Section Client/Server Commands describes all the commands a client can issue to a server. If a server commands fails the client instance notifies the user application through the event WM_TEAMTALK_CMD_ERROR. An example of a server command error could be to issue the TT_DoLogin command with an incorrect server password. The server will in this case respond with the error CMDERR_INCORRECT_SERVER_PASSWORD. The user application must be designed to process these errors so application users can be notified of errors. More...

Typedefs

typedef enum ClientError ClientError
 Errors which can occur either as a result of client commands or as a result of internal errors. More...
 

Enumerations

enum  ClientError {
  CMDERR_SUCCESS = 0, CMDERR_SYNTAX_ERROR = 1000, CMDERR_UNKNOWN_COMMAND = 1001, CMDERR_MISSING_PARAMETER = 1002,
  CMDERR_INCOMPATIBLE_PROTOCOLS = 1003, CMDERR_UNKNOWN_AUDIOCODEC = 1004, CMDERR_INCORRECT_SERVER_PASSWORD = 2000, CMDERR_INCORRECT_CHANNEL_PASSWORD = 2001,
  CMDERR_INVALID_ACCOUNT = 2002, CMDERR_MAX_SERVER_USERS_EXCEEDED = 2003, CMDERR_MAX_CHANNEL_USERS_EXCEEDED = 2004, CMDERR_SERVER_BANNED = 2005,
  CMDERR_NOT_AUTHORIZED = 2006, CMDERR_CANNOT_CREATE_CHANNELS = 2007, CMDERR_MAX_DISKUSAGE_EXCEEDED = 2008, CMDERR_SUBSCRIPTIONS_DISABLED = 2009,
  CMDERR_INCORRECT_OP_PASSWORD = 2010, CMDERR_AUDIOCODEC_BITRATE_LIMIT_EXCEEDED = 2011, CMDERR_MAX_LOGINS_PER_IPADDRESS_EXCEEDED = 2012, CMDERR_NOT_LOGGEDIN = 3000,
  CMDERR_ALREADY_LOGGEDIN = 3001, CMDERR_NOT_IN_CHANNEL = 3002, CMDERR_ALREADY_IN_CHANNEL = 3003, CMDERR_CHANNEL_ALREADY_EXISTS = 3004,
  CMDERR_CHANNEL_NOT_FOUND = 3005, CMDERR_USER_NOT_FOUND = 3006, CMDERR_BAN_NOT_FOUND = 3007, CMDERR_FILETRANSFER_NOT_FOUND = 3008,
  CMDERR_OPENFILE_FAILED = 3009, CMDERR_ACCOUNT_NOT_FOUND = 3010, CMDERR_FILE_NOT_FOUND = 3011, CMDERR_FILE_ALREADY_EXISTS = 3012,
  CMDERR_FILESHARING_DISABLED = 3013, CMDERR_SERVER_HAS_USERS = 3014, CMDERR_CHANNEL_HAS_USERS = 3015, INTERR_SNDINPUT_FAILURE = 10000,
  INTERR_SNDOUTPUT_FAILURE = 10001
}
 Errors which can occur either as a result of client commands or as a result of internal errors. More...
 

Functions

TEAMTALKDLL_API void TT_GetErrorMessage (IN INT32 nError, OUT TTCHAR szErrorMsg[TT_STRLEN])
 Get textual discription of an error message. More...
 

Detailed Description

There are two types errors which can occur in the client, either server command error or internal errors. Section Client/Server Commands describes all the commands a client can issue to a server. If a server commands fails the client instance notifies the user application through the event WM_TEAMTALK_CMD_ERROR. An example of a server command error could be to issue the TT_DoLogin command with an incorrect server password. The server will in this case respond with the error CMDERR_INCORRECT_SERVER_PASSWORD. The user application must be designed to process these errors so application users can be notified of errors.

Internal errors are errors due to failing devices. Currently only two such errors exist INTERR_SNDINPUT_FAILURE and INTERR_SNDOUTPUT_FAILURE.

Typedef Documentation

typedef enum ClientError ClientError

Errors which can occur either as a result of client commands or as a result of internal errors.

Use TT_GetErrorMessage to get a text-description of the error.

Enumeration Type Documentation

Errors which can occur either as a result of client commands or as a result of internal errors.

Use TT_GetErrorMessage to get a text-description of the error.

Enumerator
CMDERR_SUCCESS 

Command indicating success. Only used internally.

CMDERR_SYNTAX_ERROR 

Command has syntax error. Only used internally.

CMDERR_UNKNOWN_COMMAND 

The server doesn't support the issued command.

This error may occur if the server is an older version than the client instance.

CMDERR_MISSING_PARAMETER 

Command cannot be performed due to missing parameter. Only used internally.

CMDERR_INCOMPATIBLE_PROTOCOLS 

The server uses a protocol which is incompatible with the client instance.

CMDERR_UNKNOWN_AUDIOCODEC 

The server does not support the audio codec specified by the client. Introduced in version 4.1.0.1264.

See Also
TT_DoMakeChannel
TT_DoJoinChannel
CMDERR_INCORRECT_SERVER_PASSWORD 

Invalid server password.

The TT_DoLogin command passed a server password which was invalid.

See Also
TT_DoLogin
CMDERR_INCORRECT_CHANNEL_PASSWORD 

Invalid channel password.

The TT_DoJoinChannel or TT_DoJoinChannelByID passed an invalid channel password. TT_DoMakeChannel can also cause a this error if the password is longer than TT_STRLEN.

CMDERR_INVALID_ACCOUNT 

Invalid username or password for account.

The TT_DoLogin command was issued with invalid account properties. This error can also occur by TT_DoNewUserAccount if username is empty.

CMDERR_MAX_SERVER_USERS_EXCEEDED 

Login failed due to maximum number of users on server.

TT_DoLogin failed because the server does not allow any more users.

CMDERR_MAX_CHANNEL_USERS_EXCEEDED 

Cannot join channel because it has maximum number of users.

TT_DoJoinChannel or TT_DoJoinChannelByID failed because no more users are allowed in the channel.

CMDERR_SERVER_BANNED 

IP-address has been banned from server.

TT_DoLogin failed because the local client's IP-address has been banned on the server.

CMDERR_NOT_AUTHORIZED 

Command not authorized.

   The command cannot be performed because the client instance
   has insufficient rights.
See Also
TT_DoDeleteFile
TT_DoJoinChannel
TT_DoJoinChannelByID
TT_DoLeaveChannel
TT_DoChannelOp
TT_DoChannelOpEx
TT_DoKickUser
TT_DoUpdateChannel
TT_DoChangeNickname
TT_DoChangeStatus
TT_DoTextMessage
TT_DoSubscribe
TT_DoUnsubscribe
TT_DoMakeChannel
TT_DoRemoveChannel
TT_DoMoveUser
TT_DoUpdateServer
TT_DoSaveConfig
TT_DoSendFile
TT_DoRecvFile
TT_DoBanUser
TT_DoUnBanUser
TT_DoListBans
TT_DoListUserAccounts
TT_DoNewUserAccount
TT_DoDeleteUserAccount
CMDERR_CANNOT_CREATE_CHANNELS 

Server doesn't allow users to create channels.

    #TT_DoJoinChannel or #TT_DoJoinChannelByID failed because
    #USERRIGHT_CHANNEL_CREATION is not enabled.  
See Also
ServerProperties
CMDERR_MAX_DISKUSAGE_EXCEEDED 

Cannot upload file because disk quota will be exceeded.

   #TT_DoSendFile was not allowed because there's not enough
   disk space available for upload.
See Also
Channel
CMDERR_SUBSCRIPTIONS_DISABLED 

Modifying subscriptions not enabled.

   #TT_DoSubscribe or #TT_DoUnsubscribe failed because the
   server does not allow users to change subscriptions. The
   USERRIGHT_SUBSCRIPTIONS is not enabled in the server's
   #ServerProperties.
See Also
ServerProperties
CMDERR_INCORRECT_OP_PASSWORD 

Invalid password for becoming channel operator.

The password specified in TT_DoChannelOpEx is not correct. The operator password is the szOpPassword of the Channel-struct.

CMDERR_AUDIOCODEC_BITRATE_LIMIT_EXCEEDED 

The selected AudioCodec exceeds what the server allows.

A server can limit the vitrate of audio codecs if nAudioCodecBpsLimit of ServerProperties is specified.

CMDERR_MAX_LOGINS_PER_IPADDRESS_EXCEEDED 

The maximum number of logins allowed per IP-address has been exceeded.

See Also
ServerProperties
TT_DoLogin()
CMDERR_NOT_LOGGEDIN 

Client instance has not been authenticated.

TT_DoLogin has not been issued successfully or TT_DoLogout could not be performed because client instance is already logged in.

CMDERR_ALREADY_LOGGEDIN 

Already logged in.

TT_DoLogin cannot be performed twice.

CMDERR_NOT_IN_CHANNEL 

Cannot leave channel because not in channel.

TT_DoLeaveChannel failed because user is not in a channel.

CMDERR_ALREADY_IN_CHANNEL 

Cannot join same channel twice.

TT_DoJoinChannel or TT_DoJoinChannelByID failed because client instance is already in the specified channel.

CMDERR_CHANNEL_ALREADY_EXISTS 

Channel already exists.

TT_DoMakeChannel failed because channel already exists.

CMDERR_CHANNEL_NOT_FOUND 

Channel does not exist.

   Command failed because channel does not exists.
See Also
TT_DoRemoveChannel
TT_DoUpdateChannel
TT_DoMakeChannel Due to invalid channel name
TT_DoSendFile
TT_DoRecvFile
TT_DoDeleteFile
TT_DoJoinChannel
TT_DoJoinChannelByID
TT_DoLeaveChannel
TT_DoChannelOp
TT_DoKickUser
TT_DoBanUser
TT_DoMoveUser
TT_DoTextMessage
CMDERR_USER_NOT_FOUND 

User not found.

   Command failed because user does not exists.
See Also
TT_DoChannelOp
TT_DoKickUser
TT_DoBanUser
TT_DoMoveUser
TT_DoTextMessage
TT_DoSubscribe
TT_DoUnsubscribe
CMDERR_BAN_NOT_FOUND 

Banned IP-address does not exist.

TT_DoUnBanUser failed because there is no banned IP-address which matches what was specified.

CMDERR_FILETRANSFER_NOT_FOUND 

File transfer doesn't exists.

TT_DoSendFile or TT_DoRecvFile failed because the server cannot process the file transfer.

CMDERR_OPENFILE_FAILED 

Server failed to open file.

TT_DoSendFile or TT_DoRecvFile failed because the server cannot open the specified file (possible file lock).

CMDERR_ACCOUNT_NOT_FOUND 

Cannot find user account.

TT_DoDeleteUserAccount failed because the specified user account does not exists.

CMDERR_FILE_NOT_FOUND 

File does not exist.

TT_DoSendFile, TT_DoRecvFile or TT_DoDeleteFile failed because the server cannot find the specified file.

CMDERR_FILE_ALREADY_EXISTS 

File already exist.

TT_DoSendFile failed because the file already exists in the channel.

CMDERR_FILESHARING_DISABLED 

Server does not allow file transfers.

TT_DoSendFile or TT_DoRecvFile failed because the server does not allow file transfers.

CMDERR_SERVER_HAS_USERS 

Cannot process command since server is not empty.

See Also
TT_DoUpdateServer Ensure not to update USERRIGHT_VIEW_ALL_USERS.
CMDERR_CHANNEL_HAS_USERS 

Cannot process command since channel is not empty.

See Also
TT_DoUpdateChannel AudioCodec cannot be changed while there are User Properties in a channel.
INTERR_SNDINPUT_FAILURE 

A sound input device failed.

This can e.g. happen when joining a channel and the sound input device has been unplugged.

Call TT_CloseSoundInputDevice and TT_InitSoundInputDevice with a valid SoundDevice to releave the problem.

INTERR_SNDOUTPUT_FAILURE 

A sound output device failed.

This can e.g. happen when joining a channel and the sound output device has been unplugged. Note that it can be posted multiple times if there's several users in the channel.

Call TT_CloseSoundOutputDevice and TT_InitSoundOutputDevice with a valid SoundDevice to releave the problem.

Function Documentation

TEAMTALKDLL_API void TT_GetErrorMessage ( IN INT32  nError,
OUT TTCHAR  szErrorMsg[TT_STRLEN] 
)

Get textual discription of an error message.

Get a description of an error code posted by either WM_TEAMTALK_CMD_ERROR or WM_TEAMTALK_INTERNAL_ERROR.

Parameters
nErrorThe number of the error.
szErrorMsgA text description of the error.
See Also
WM_TEAMTALK_CMD_ERROR
WM_TEAMTALK_INTERNAL_ERROR