TeamTalk 5 C-API DLL  Version 5.14A
Server Request Callbacks

Handle user requests to the server. More...

Typedefs

typedef void UserLoginCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN OUT UserAccount *lpUserAccount)
 Callback when a user is requesting to log on to the server. More...
 
typedef void UserChangeNicknameCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN const TTCHAR *szNewNickname)
 Callback when a user is requesting to change nickname. More...
 
typedef void UserChangeStatusCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN INT32 nNewStatusMode, IN const TTCHAR *szNewStatusMsg)
 Callback when a user is requesting to change status. More...
 
typedef void UserCreateUserAccountCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN const UserAccount *lpUserAccount)
 Callback when a user is requesting to create a new user account. More...
 
typedef void UserDeleteUserAccountCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN const TTCHAR *szUsername)
 Callback when a user is requesting to delete a user account. More...
 
typedef void UserAddServerBanCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpBanner, IN const User *lpBanee)
 Callback when a user is requesting to ban a user. More...
 
typedef void UserAddServerBanIPAddressCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpBanner, IN const TTCHAR *szIPAddress)
 Callback when a user is requesting to ban an IP-address. More...
 
typedef void UserDeleteServerBanCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN const TTCHAR *szIPAddress)
 Callback when a user is requesting to remove a ban. More...
 

Functions

TEAMTALKDLL_API TTBOOL TTS_RegisterUserLoginCallback (IN TTSInstance *lpTTSInstance, IN UserLoginCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user is requesting to log on to the server. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserChangeNicknameCallback (IN TTSInstance *lpTTSInstance, IN UserChangeNicknameCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback to when user is changing nickname. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserChangeStatusCallback (IN TTSInstance *lpTTSInstance, IN UserChangeStatusCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback to when user is changing status. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserCreateUserAccountCallback (IN TTSInstance *lpTTSInstance, IN UserCreateUserAccountCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user is requesting to create a new user account on the server. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserDeleteUserAccountCallback (IN TTSInstance *lpTTSInstance, IN UserDeleteUserAccountCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user is requesting to delete a user account on the server. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserAddServerBanCallback (IN TTSInstance *lpTTSInstance, IN UserAddServerBanCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user is requesting to add a server ban requested by a user. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserAddServerBanIPAddressCallback (IN TTSInstance *lpTTSInstance, IN UserAddServerBanIPAddressCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user is requesting to add a server IP-address ban requested by a user. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserDeleteServerBanCallback (IN TTSInstance *lpTTSInstance, IN UserDeleteServerBanCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user is requesting to delete a server IP-address ban requested by a user. More...
 

Detailed Description

Handle user requests to the server.

Callbacks of this type are invoked when a client application has issued a command to the server, basically called a TT_Do* method (one example could be TT_DoLogin()).

To get a callback when a user wants to log in call TTS_RegisterUserLoginCallback() and pass a pointer to the function which the TeamTalk server should call when a user wants to log in. If the user should be allowed to log on pass CMDERR_SUCCESS to the ClientErrorMsg provided by the TeamTalk server API. If not pass any another value which will then be returned to the client application.

Typedef Documentation

◆ UserLoginCallback

typedef void UserLoginCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN OUT UserAccount *lpUserAccount)

Callback when a user is requesting to log on to the server.

This callback occurs in the context of TT_DoLogin().

Register using TTS_RegisterUserLoginCallback().

Parameters
lpTTSInstanceThe server instance where the event is occurring.
lpUserDataThe user data supplied to register-callback function.
lpClientErrorMsgError message which should be sent back to user. Set nErrorNo to CMDERR_SUCCESS if user is authorized.
lpUserThe user properties gathered so far.
lpUserAccountThe user account information which should be set for this user.

Definition at line 51 of file TeamTalkSrv.h.

◆ UserChangeNicknameCallback

typedef void UserChangeNicknameCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN const TTCHAR *szNewNickname)

Callback when a user is requesting to change nickname.

This callback occurs in the context of TT_DoChangeNickname().

Register using TTS_RegisterUserChangeNickname().

Parameters
lpTTSInstanceThe server instance where the event is occurring.
lpUserDataThe user data supplied to register-callback function.
lpClientErrorMsgError message which should be sent back to user. Set nErrorNo to CMDERR_SUCCESS if user is authorized.
lpUserThe user properties.
szNewNicknameThe requested nickname.

Definition at line 70 of file TeamTalkSrv.h.

◆ UserChangeStatusCallback

typedef void UserChangeStatusCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN INT32 nNewStatusMode, IN const TTCHAR *szNewStatusMsg)

Callback when a user is requesting to change status.

This callback occurs in the context of TT_DoChangeStatus().

Register using TTS_RegisterUserChangeStatus().

Parameters
lpTTSInstanceThe server instance where the event is occurring.
lpUserDataThe user data supplied to register-callback function.
lpClientErrorMsgError message which should be sent back to user. Set nErrorNo to CMDERR_SUCCESS if user is authorized.
lpUserThe user properties.
nNewStatusModeThe requested status mode.
szNewStatusMsgThe requested nickname.

Definition at line 90 of file TeamTalkSrv.h.

◆ UserCreateUserAccountCallback

typedef void UserCreateUserAccountCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN const UserAccount *lpUserAccount)

Callback when a user is requesting to create a new user account.

This callback occurs in the context of TT_DoNewUserAccount().

Register using TTS_RegisterUserCreateUserAccountCallback().

Parameters
lpTTSInstanceThe server instance where the event is occurring.
lpUserDataThe user data supplied to register-callback function.
lpClientErrorMsgError message which should be sent back to user. Set nErrorNo to CMDERR_SUCCESS if user is authorized.
lpUserThe user's properties.
lpUserAccountThe properties of the user account to be created.

Definition at line 110 of file TeamTalkSrv.h.

◆ UserDeleteUserAccountCallback

typedef void UserDeleteUserAccountCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN const TTCHAR *szUsername)

Callback when a user is requesting to delete a user account.

This callback occurs in the context of TT_DoDeleteUserAccount().

Register using TTS_RegisterUserDeleteUserAccountCallback().

Parameters
lpTTSInstanceThe server instance where the event is occurring.
lpUserDataThe user data supplied to register-callback function.
lpClientErrorMsgError message which should be sent back to user. Set nErrorNo to CMDERR_SUCCESS if user is authorized.
lpUserThe properties of the user requesting.
szUsernameThe username of the account to delete.

Definition at line 129 of file TeamTalkSrv.h.

◆ UserAddServerBanCallback

typedef void UserAddServerBanCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpBanner, IN const User *lpBanee)

Callback when a user is requesting to ban a user.

This callback occurs in the context of TT_DoBanUser().

Register using TTS_RegisterUserAddServerBanCallback().

Parameters
lpTTSInstanceThe server instance where the event is occurring.
lpUserDataThe user data supplied to register-callback function.
lpClientErrorMsgError message which should be sent back to user. Set nErrorNo to CMDERR_SUCCESS if user is authorized.
lpBannerThe properties of the user requesting the ban.
lpBaneeThe properties of the user who should be banned.

Definition at line 147 of file TeamTalkSrv.h.

◆ UserAddServerBanIPAddressCallback

typedef void UserAddServerBanIPAddressCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpBanner, IN const TTCHAR *szIPAddress)

Callback when a user is requesting to ban an IP-address.

This callback occurs in the context of TT_DoBanIPAddress().

Register using TTS_RegisterUserAddServerBanIPAddressCallback().

Parameters
lpTTSInstanceThe server instance where the event is occurring.
lpUserDataThe user data supplied to register-callback function.
lpClientErrorMsgError message which should be sent back to user. Set nErrorNo to CMDERR_SUCCESS if user is authorized.
lpBannerThe properties of the user requesting the ban. This value can be NULL if ServerProperties nMaxLoginAttempts is enabled.
szIPAddressThe IP-address to be banned.

Definition at line 166 of file TeamTalkSrv.h.

◆ UserDeleteServerBanCallback

typedef void UserDeleteServerBanCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, OUT ClientErrorMsg *lpClientErrorMsg, IN const User *lpUser, IN const TTCHAR *szIPAddress)

Callback when a user is requesting to remove a ban.

This callback occurs in the context of TT_DoUnBanUser().

Register using TTS_RegisterUserDeleteServerBanCallback().

Parameters
lpTTSInstanceThe server instance where the event is occurring.
lpUserDataThe user data supplied to register-callback function.
lpClientErrorMsgError message which should be sent back to user. Set nErrorNo to CMDERR_SUCCESS if user is authorized.
lpUserThe properties of the user doing the request.
szIPAddressThe IP-address to be unbanned.

Definition at line 184 of file TeamTalkSrv.h.

Function Documentation

◆ TTS_RegisterUserLoginCallback()

TEAMTALKDLL_API TTBOOL TTS_RegisterUserLoginCallback ( IN TTSInstance lpTTSInstance,
IN UserLoginCallback lpCallback,
IN VOID *  lpUserData,
IN TTBOOL  bEnable 
)

Register a callback when a user is requesting to log on to the server.

Parameters
lpTTSInstancePointer to the server instance created by TTS_InitTeamTalk().
lpCallbackPointer to a function which will handle the callback.
lpUserDataA pointer which will be passed to the callback function.
bEnableWhether to register or unregister the callback.
Returns
Returns TRUE if the call was successful.

◆ TTS_RegisterUserChangeNicknameCallback()

TEAMTALKDLL_API TTBOOL TTS_RegisterUserChangeNicknameCallback ( IN TTSInstance lpTTSInstance,
IN UserChangeNicknameCallback lpCallback,
IN VOID *  lpUserData,
IN TTBOOL  bEnable 
)

Register a callback to when user is changing nickname.

Parameters
lpTTSInstancePointer to the server instance created by TTS_InitTeamTalk().
lpCallbackPointer to a function which will handle the callback.
lpUserDataA pointer which will be passed to the callback function.
bEnableWhether to register or unregister the callback.
Returns
Returns TRUE if the call was successful.
See also
TT_DoChangeNickname()

◆ TTS_RegisterUserChangeStatusCallback()

TEAMTALKDLL_API TTBOOL TTS_RegisterUserChangeStatusCallback ( IN TTSInstance lpTTSInstance,
IN UserChangeStatusCallback lpCallback,
IN VOID *  lpUserData,
IN TTBOOL  bEnable 
)

Register a callback to when user is changing status.

Parameters
lpTTSInstancePointer to the server instance created by TTS_InitTeamTalk().
lpCallbackPointer to a function which will handle the callback.
lpUserDataA pointer which will be passed to the callback function.
bEnableWhether to register or unregister the callback.
Returns
Returns TRUE if the call was successful.
See also
TT_DoChangeStatus()

◆ TTS_RegisterUserCreateUserAccountCallback()

TEAMTALKDLL_API TTBOOL TTS_RegisterUserCreateUserAccountCallback ( IN TTSInstance lpTTSInstance,
IN UserCreateUserAccountCallback lpCallback,
IN VOID *  lpUserData,
IN TTBOOL  bEnable 
)

Register a callback when a user is requesting to create a new user account on the server.

Parameters
lpTTSInstancePointer to the server instance created by TTS_InitTeamTalk().
lpCallbackPointer to a function which will handle the callback.
lpUserDataA pointer which will be passed to the callback function.
bEnableWhether to register or unregister the callback.
Returns
Returns TRUE if the call was successful.

◆ TTS_RegisterUserDeleteUserAccountCallback()

TEAMTALKDLL_API TTBOOL TTS_RegisterUserDeleteUserAccountCallback ( IN TTSInstance lpTTSInstance,
IN UserDeleteUserAccountCallback lpCallback,
IN VOID *  lpUserData,
IN TTBOOL  bEnable 
)

Register a callback when a user is requesting to delete a user account on the server.

Parameters
lpTTSInstancePointer to the server instance created by TTS_InitTeamTalk().
lpCallbackPointer to a function which will handle the callback.
lpUserDataA pointer which will be passed to the callback function.
bEnableWhether to register or unregister the callback.
Returns
Returns TRUE if the call was successful.

◆ TTS_RegisterUserAddServerBanCallback()

TEAMTALKDLL_API TTBOOL TTS_RegisterUserAddServerBanCallback ( IN TTSInstance lpTTSInstance,
IN UserAddServerBanCallback lpCallback,
IN VOID *  lpUserData,
IN TTBOOL  bEnable 
)

Register a callback when a user is requesting to add a server ban requested by a user.

Parameters
lpTTSInstancePointer to the server instance created by TTS_InitTeamTalk().
lpCallbackPointer to a function which will handle the callback.
lpUserDataA pointer which will be passed to the callback function.
bEnableWhether to register or unregister the callback.
Returns
Returns TRUE if the call was successful.

◆ TTS_RegisterUserAddServerBanIPAddressCallback()

TEAMTALKDLL_API TTBOOL TTS_RegisterUserAddServerBanIPAddressCallback ( IN TTSInstance lpTTSInstance,
IN UserAddServerBanIPAddressCallback lpCallback,
IN VOID *  lpUserData,
IN TTBOOL  bEnable 
)

Register a callback when a user is requesting to add a server IP-address ban requested by a user.

Parameters
lpTTSInstancePointer to the server instance created by TTS_InitTeamTalk().
lpCallbackPointer to a function which will handle the callback.
lpUserDataA pointer which will be passed to the callback function.
bEnableWhether to register or unregister the callback.
Returns
Returns TRUE if the call was successful.

◆ TTS_RegisterUserDeleteServerBanCallback()

TEAMTALKDLL_API TTBOOL TTS_RegisterUserDeleteServerBanCallback ( IN TTSInstance lpTTSInstance,
IN UserDeleteServerBanCallback lpCallback,
IN VOID *  lpUserData,
IN TTBOOL  bEnable 
)

Register a callback when a user is requesting to delete a server IP-address ban requested by a user.

Parameters
lpTTSInstancePointer to the server instance created by TTS_InitTeamTalk().
lpCallbackPointer to a function which will handle the callback.
lpUserDataA pointer which will be passed to the callback function.
bEnableWhether to register or unregister the callback.
Returns
Returns TRUE if the call was successful.