TeamTalk 5 C-API DLL: Server Request Callbacks

TeamTalk 5 C-API DLL Version 5.18A

Loading...
Searching...
No Matches
Typedefs | Functions
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.
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.
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.
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.
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.
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.
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.
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.

## 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.
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.
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.
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.
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.
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.
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.
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.

## 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

  lpTTSInstance | The server instance where the event is occurring.
  lpUserData | The user data supplied to register-callback function.
  lpClientErrorMsg | Error message which should be sent back to user. Set `nErrorNo` to CMDERR_SUCCESS if user is authorized.
  lpUser | The user properties gathered so far.
  lpUserAccount | The 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

  lpTTSInstance | The server instance where the event is occurring.
  lpUserData | The user data supplied to register-callback function.
  lpClientErrorMsg | Error message which should be sent back to user. Set `nErrorNo` to CMDERR_SUCCESS if user is authorized.
  lpUser | The user properties.
  szNewNickname | The 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

  lpTTSInstance | The server instance where the event is occurring.
  lpUserData | The user data supplied to register-callback function.
  lpClientErrorMsg | Error message which should be sent back to user. Set `nErrorNo` to CMDERR_SUCCESS if user is authorized.
  lpUser | The user properties.
  nNewStatusMode | The requested status mode.
  szNewStatusMsg | The 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

  lpTTSInstance | The server instance where the event is occurring.
  lpUserData | The user data supplied to register-callback function.
  lpClientErrorMsg | Error message which should be sent back to user. Set `nErrorNo` to CMDERR_SUCCESS if user is authorized.
  lpUser | The user's properties.
  lpUserAccount | The 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

  lpTTSInstance | The server instance where the event is occurring.
  lpUserData | The user data supplied to register-callback function.
  lpClientErrorMsg | Error message which should be sent back to user. Set `nErrorNo` to CMDERR_SUCCESS if user is authorized.
  lpUser | The properties of the user requesting.
  szUsername | The 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

  lpTTSInstance | The server instance where the event is occurring.
  lpUserData | The user data supplied to register-callback function.
  lpClientErrorMsg | Error message which should be sent back to user. Set `nErrorNo` to CMDERR_SUCCESS if user is authorized.
  lpBanner | The properties of the user requesting the ban.
  lpBanee | The 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

  lpTTSInstance | The server instance where the event is occurring.
  lpUserData | The user data supplied to register-callback function.
  lpClientErrorMsg | Error message which should be sent back to user. Set `nErrorNo` to CMDERR_SUCCESS if user is authorized.
  lpBanner | The properties of the user requesting the ban. This value can be NULL if ServerProperties `nMaxLoginAttempts` is enabled.
  szIPAddress | The 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

  lpTTSInstance | The server instance where the event is occurring.
  lpUserData | The user data supplied to register-callback function.
  lpClientErrorMsg | Error message which should be sent back to user. Set `nErrorNo` to CMDERR_SUCCESS if user is authorized.
  lpUser | The properties of the user doing the request.
  szIPAddress | The 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

  lpTTSInstance | Pointer to the server instance created by TTS_InitTeamTalk().
  lpCallback | Pointer to a function which will handle the callback.
  lpUserData | A pointer which will be passed to the callback function.
  bEnable | Whether 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

  lpTTSInstance | Pointer to the server instance created by TTS_InitTeamTalk().
  lpCallback | Pointer to a function which will handle the callback.
  lpUserData | A pointer which will be passed to the callback function.
  bEnable | Whether 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

  lpTTSInstance | Pointer to the server instance created by TTS_InitTeamTalk().
  lpCallback | Pointer to a function which will handle the callback.
  lpUserData | A pointer which will be passed to the callback function.
  bEnable | Whether 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

  lpTTSInstance | Pointer to the server instance created by TTS_InitTeamTalk().
  lpCallback | Pointer to a function which will handle the callback.
  lpUserData | A pointer which will be passed to the callback function.
  bEnable | Whether 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

  lpTTSInstance | Pointer to the server instance created by TTS_InitTeamTalk().
  lpCallback | Pointer to a function which will handle the callback.
  lpUserData | A pointer which will be passed to the callback function.
  bEnable | Whether 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

  lpTTSInstance | Pointer to the server instance created by TTS_InitTeamTalk().
  lpCallback | Pointer to a function which will handle the callback.
  lpUserData | A pointer which will be passed to the callback function.
  bEnable | Whether 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

  lpTTSInstance | Pointer to the server instance created by TTS_InitTeamTalk().
  lpCallback | Pointer to a function which will handle the callback.
  lpUserData | A pointer which will be passed to the callback function.
  bEnable | Whether 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

  lpTTSInstance | Pointer to the server instance created by TTS_InitTeamTalk().
  lpCallback | Pointer to a function which will handle the callback.
  lpUserData | A pointer which will be passed to the callback function.
  bEnable | Whether to register or unregister the callback.

Returns
  Returns TRUE if the call was successful.