TeamTalk 5 C-API DLL  Version 5.14A
TeamTalkSrv.h File Reference
#include "TeamTalk.h"

Go to the source code of this file.

Macros

#define TEAMTALK_SERVER_VERSION   "5.14.0.5128"
 Ensure the header and DLL are exactly the same version. To get the version of the loaded DLL call TT_GetVersion(). A remote client's version can be seen in the szVersion member of the User-struct. More...
 

Typedefs

typedef VOID TTSInstance
 A server instance. More...
 
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...
 
typedef void UserConnectedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
 Callback when a new user is connecting to the server. More...
 
typedef void UserLoggedInCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
 Callback when a user has logged in. More...
 
typedef void UserLoggedOutCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
 Callback when a user has logged out. More...
 
typedef void UserDisconnectedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
 Callback when user has disconnected. More...
 
typedef void UserTimedoutCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
 Callback when a user's connection has timed out. More...
 
typedef void UserKickedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpKicker, IN const User *lpKickee, IN const Channel *lpChannel)
 Callback when a user has been kicked. More...
 
typedef void UserBannedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpBanner, IN const User *lpBanee, IN const Channel *lpChannel)
 Callback when a user has been banned. More...
 
typedef void UserUnbannedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUnbanner, IN const TTCHAR *szIPAddress)
 Callback when a ban is removed. More...
 
typedef void UserUpdatedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
 Callback when a user's properties are being updated. More...
 
typedef void UserJoinedChannelCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser, IN const Channel *lpChannel)
 Callback when a user has joined a channel. More...
 
typedef void UserLeftChannelCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser, IN const Channel *lpChannel)
 Callback when a user has left a channel. More...
 
typedef void UserMovedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpMover, IN const User *lpMovee)
 Callback when a user has been moved. More...
 
typedef void UserTextMessageCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser, IN const TextMessage *lpTextMessage)
 Callback when a user is sending a text message. More...
 
typedef void ChannelCreatedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const Channel *lpChannel, IN const User *lpUser)
 Callback when a new channel has been created. More...
 
typedef void ChannelUpdatedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const Channel *lpChannel, IN const User *lpUser)
 Callback when a channel has been updated. More...
 
typedef void ChannelRemovedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const Channel *lpChannel, IN const User *lpUser)
 Callback when channel has been removed. More...
 
typedef void FileUploadedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const RemoteFile *lpRemoteFile, IN const User *lpUser)
 Callback when a new file has been uploaded to a channel. More...
 
typedef void FileDownloadedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const RemoteFile *lpRemoteFile, IN const User *lpUser)
 Callback when a user has downloaded a file. More...
 
typedef void FileDeletedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const RemoteFile *lpRemoteFile, IN const User *lpUser)
 Callback when a user has deleted a file. More...
 
typedef void ServerUpdatedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const ServerProperties *lpServerProperties, IN const User *lpUser)
 Callback when a user has updated the server properties. More...
 
typedef void SaveServerConfigCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
 Callback when a user has reguested to save the server configuration. More...
 

Functions

TEAMTALKDLL_API TTBOOL TTS_SetEncryptionContext (IN TTSInstance *lpTTSInstance, IN const TTCHAR *szCertificateFile, IN const TTCHAR *szPrivateKeyFile)
 Set certificate and private key for encrypted server. More...
 
TEAMTALKDLL_API TTBOOL TTS_SetEncryptionContextEx (IN TTSInstance *lpTTSInstance, const EncryptionContext *lpEncryptionContext)
 Set up encryption context for encrypted server. More...
 
TEAMTALKDLL_API TTSInstanceTTS_InitTeamTalk ()
 Create new TeamTalk server instance. More...
 
TEAMTALKDLL_API TTBOOL TTS_CloseTeamTalk (IN TTSInstance *lpTTSInstance)
 Close TeamTalk server instance. More...
 
TEAMTALKDLL_API TTBOOL TTS_RunEventLoop (IN TTSInstance *lpTTSInstance, IN INT32 *pnWaitMs)
 Run the server's event loop. More...
 
TEAMTALKDLL_API INT32 TTS_SetChannelFilesRoot (IN TTSInstance *lpTTSInstance, IN const TTCHAR *szFilesRoot, IN INT64 nMaxDiskUsage, IN INT64 nDefaultChannelQuota)
 The root folder of where users should upload files to. More...
 
TEAMTALKDLL_API INT32 TTS_UpdateServer (IN TTSInstance *lpTTSInstance, IN const ServerProperties *lpServerProperties)
 Set server properties. More...
 
TEAMTALKDLL_API INT32 TTS_MakeChannel (IN TTSInstance *lpTTSInstance, IN const Channel *lpChannel)
 Make new channel. More...
 
TEAMTALKDLL_API INT32 TTS_UpdateChannel (IN TTSInstance *lpTTSInstance, IN const Channel *lpChannel)
 Update an existing channel. More...
 
TEAMTALKDLL_API INT32 TTS_RemoveChannel (IN TTSInstance *lpTTSInstance, IN INT32 nChannelID)
 Remove a channel. More...
 
TEAMTALKDLL_API INT32 TTS_AddFileToChannel (IN TTSInstance *lpTTSInstance, IN const TTCHAR *szLocalFilePath, IN const RemoteFile *lpRemoteFile)
 Add a file to an existing channel. More...
 
TEAMTALKDLL_API INT32 TTS_RemoveFileFromChannel (IN TTSInstance *lpTTSInstance, IN const RemoteFile *lpRemoteFile)
 Remove a file from a channel. More...
 
TEAMTALKDLL_API INT32 TTS_MoveUser (IN TTSInstance *lpTTSInstance, IN INT32 nUserID, IN const Channel *lpChannel)
 Move a user from one channel to another. More...
 
TEAMTALKDLL_API INT32 TTS_SendTextMessage (IN TTSInstance *lpTTSInstance, const TextMessage *lpTextMessage)
 Send text message from server to clients. More...
 
TEAMTALKDLL_API TTBOOL TTS_StartServer (IN TTSInstance *lpTTSInstance, IN const TTCHAR *szBindIPAddr, IN UINT16 nTcpPort, IN UINT16 nUdpPort, IN TTBOOL bEncrypted)
 Start server on specified IP-address and ports. More...
 
TEAMTALKDLL_API TTBOOL TTS_StartServerSysID (IN TTSInstance *lpTTSInstance, IN const TTCHAR *szBindIPAddr, IN UINT16 nTcpPort, IN UINT16 nUdpPort, IN TTBOOL bEncrypted, IN const TTCHAR *szSystemID)
 Same as TTS_StartServer() but with the option of specifying a system-ID. More...
 
TEAMTALKDLL_API TTBOOL TTS_StopServer (IN TTSInstance *lpTTSInstance)
 Stop server and drop all users. More...
 
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...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserConnectedCallback (IN TTSInstance *lpTTSInstance, IN UserConnectedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user connects to the server. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserLoggedInCallback (IN TTSInstance *lpTTSInstance, IN UserLoggedInCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user logs on to the server. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserLoggedOutCallback (IN TTSInstance *lpTTSInstance, IN UserLoggedOutCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user logs out of the server. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserDisconnectedCallback (IN TTSInstance *lpTTSInstance, IN UserDisconnectedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user disconnects from the server. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserTimedoutCallback (IN TTSInstance *lpTTSInstance, IN UserTimedoutCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user is dropped because of inactivity. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserKickedCallback (IN TTSInstance *lpTTSInstance, IN UserKickedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user is kicked from the server. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserBannedCallback (IN TTSInstance *lpTTSInstance, IN UserBannedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user is banned from the server. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserUnbannedCallback (IN TTSInstance *lpTTSInstance, IN UserUnbannedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when an IP-address is unbanned from the server. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserUpdatedCallback (IN TTSInstance *lpTTSInstance, IN UserUpdatedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when an user's properties are updated. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserJoinedChannelCallback (IN TTSInstance *lpTTSInstance, IN UserJoinedChannelCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when an user joins a channel. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserLeftChannelCallback (IN TTSInstance *lpTTSInstance, IN UserLeftChannelCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when an user leaves a channel. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserMovedCallback (IN TTSInstance *lpTTSInstance, IN UserMovedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user is moved. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterUserTextMessageCallback (IN TTSInstance *lpTTSInstance, IN UserTextMessageCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user send a text message. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterChannelCreatedCallback (IN TTSInstance *lpTTSInstance, IN ChannelCreatedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a channel is created. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterChannelUpdatedCallback (IN TTSInstance *lpTTSInstance, IN ChannelUpdatedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a channel is updated. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterChannelRemovedCallback (IN TTSInstance *lpTTSInstance, IN ChannelRemovedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a channel is removed. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterFileUploadedCallback (IN TTSInstance *lpTTSInstance, IN FileUploadedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a file is uploaded. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterFileDownloadedCallback (IN TTSInstance *lpTTSInstance, IN FileDownloadedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a file is downloaded. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterFileDeletedCallback (IN TTSInstance *lpTTSInstance, IN FileDeletedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a file is deleted. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterServerUpdatedCallback (IN TTSInstance *lpTTSInstance, IN ServerUpdatedCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a server's properties has been updated. More...
 
TEAMTALKDLL_API TTBOOL TTS_RegisterSaveServerConfigCallback (IN TTSInstance *lpTTSInstance, IN SaveServerConfigCallback *lpCallback, IN VOID *lpUserData, IN TTBOOL bEnable)
 Register a callback when a user requests the server to save its configuration. More...
 

Macro Definition Documentation

◆ TEAMTALK_SERVER_VERSION

#define TEAMTALK_SERVER_VERSION   "5.14.0.5128"

Ensure the header and DLL are exactly the same version. To get the version of the loaded DLL call TT_GetVersion(). A remote client's version can be seen in the szVersion member of the User-struct.

Definition at line 21 of file TeamTalkSrv.h.

Typedef Documentation

◆ TTSInstance

typedef VOID TTSInstance

A server instance.

See also
TTS_InitTeamTalk()

Definition at line 31 of file TeamTalkSrv.h.