1 #if !defined(TEAMTALKSRVDLL_H)
2 #define TEAMTALKSRVDLL_H
21 #define TEAMTALK_SERVER_VERSION "5.14.0.5128"
54 IN
const User* lpUser,
73 IN
const User* lpUser,
74 IN
const TTCHAR* szNewNickname);
93 IN
const User* lpUser,
94 IN INT32 nNewStatusMode,
95 IN
const TTCHAR* szNewStatusMsg);
113 IN
const User* lpUser,
132 IN
const User* lpUser,
133 IN
const TTCHAR* szUsername);
150 IN
const User* lpBanner,
151 IN
const User* lpBanee);
169 IN
const User* lpBanner,
170 IN
const TTCHAR* szIPAddress);
187 IN
const User* lpUser,
188 IN
const TTCHAR* szIPAddress);
204 IN VOID* lpUserData, IN
const User* lpUser);
217 IN VOID* lpUserData, IN
const User* lpUser);
227 IN VOID* lpUserData, IN
const User* lpUser);
237 IN VOID* lpUserData, IN
const User* lpUser);
247 IN VOID* lpUserData, IN
const User* lpUser);
259 IN VOID* lpUserData, IN
const User* lpKicker,
260 IN
const User* lpKickee, IN
const Channel* lpChannel);
273 IN VOID* lpUserData, IN
const User* lpBanner,
274 IN
const User* lpBanee, IN
const Channel* lpChannel);
287 IN VOID* lpUserData, IN
const User* lpUnbanner,
288 IN
const TTCHAR* szIPAddress);
298 IN VOID* lpUserData, IN
const User* lpUser);
309 IN VOID* lpUserData, IN
const User* lpUser,
321 IN VOID* lpUserData, IN
const User* lpUser,
335 IN VOID* lpUserData, IN
const User* lpMover,
336 IN
const User* lpMovee);
349 IN VOID* lpUserData, IN
const User* lpUser,
364 IN VOID* lpUserData, IN
const Channel* lpChannel,
365 IN
const User* lpUser);
378 IN VOID* lpUserData, IN
const Channel* lpChannel,
379 IN
const User* lpUser);
391 IN VOID* lpUserData, IN
const Channel* lpChannel,
392 IN
const User* lpUser);
405 IN
const User* lpUser);
418 IN
const User* lpUser);
431 IN
const User* lpUser);
446 IN
const User* lpUser);
459 IN
const User* lpUser);
485 IN
const TTCHAR* szCertificateFile,
486 IN
const TTCHAR* szPrivateKeyFile);
569 IN
const TTCHAR* szFilesRoot,
570 IN INT64 nMaxDiskUsage,
571 IN INT64 nDefaultChannelQuota);
633 IN INT32 nChannelID);
650 IN
const TTCHAR* szLocalFilePath,
683 IN INT32 nUserID, IN
const Channel* lpChannel);
715 IN
const TTCHAR* szBindIPAddr,
736 IN
const TTCHAR* szBindIPAddr,
740 IN
const TTCHAR* szSystemID);
767 IN VOID* lpUserData, IN
TTBOOL bEnable);
781 IN VOID* lpUserData, IN
TTBOOL bEnable);
795 IN VOID* lpUserData, IN
TTBOOL bEnable);
809 IN VOID* lpUserData, IN
TTBOOL bEnable);
823 IN VOID* lpUserData, IN
TTBOOL bEnable);
837 IN VOID* lpUserData, IN
TTBOOL bEnable);
851 IN VOID* lpUserData, IN
TTBOOL bEnable);
865 IN VOID* lpUserData, IN
TTBOOL bEnable);
884 IN VOID* lpUserData, IN
TTBOOL bEnable);
897 IN VOID* lpUserData, IN
TTBOOL bEnable);
910 IN VOID* lpUserData, IN
TTBOOL bEnable);
923 IN VOID* lpUserData, IN
TTBOOL bEnable);
939 IN VOID* lpUserData, IN
TTBOOL bEnable);
952 IN VOID* lpUserData, IN
TTBOOL bEnable);
965 IN VOID* lpUserData, IN
TTBOOL bEnable);
979 IN VOID* lpUserData, IN
TTBOOL bEnable);
992 IN VOID* lpUserData, IN
TTBOOL bEnable);
1005 IN VOID* lpUserData, IN
TTBOOL bEnable);
1018 IN VOID* lpUserData, IN
TTBOOL bEnable);
1031 IN VOID* lpUserData, IN
TTBOOL bEnable);
1044 IN VOID* lpUserData, IN
TTBOOL bEnable);
1057 IN VOID* lpUserData, IN
TTBOOL bEnable);
1070 IN VOID* lpUserData, IN
TTBOOL bEnable);
1083 IN VOID* lpUserData, IN
TTBOOL bEnable);
1096 IN VOID* lpUserData, IN
TTBOOL bEnable);
1109 IN VOID* lpUserData, IN
TTBOOL bEnable);
1122 IN VOID* lpUserData, IN
TTBOOL bEnable);
1135 IN VOID* lpUserData, IN
TTBOOL bEnable);
1149 IN VOID* lpUserData, IN
TTBOOL bEnable);
WCHAR TTCHAR
TeamTalk uses Unicode on Windows.
VOID TTSInstance
A server instance.
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.
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.
TEAMTALKDLL_API INT32 TTS_SendTextMessage(IN TTSInstance *lpTTSInstance, const TextMessage *lpTextMessage)
Send text message from server to clients.
TEAMTALKDLL_API TTBOOL TTS_CloseTeamTalk(IN TTSInstance *lpTTSInstance)
Close TeamTalk server instance.
TEAMTALKDLL_API INT32 TTS_RemoveChannel(IN TTSInstance *lpTTSInstance, IN INT32 nChannelID)
Remove a channel.
TEAMTALKDLL_API INT32 TTS_MakeChannel(IN TTSInstance *lpTTSInstance, IN const Channel *lpChannel)
Make new channel.
TEAMTALKDLL_API TTSInstance * TTS_InitTeamTalk()
Create new TeamTalk server instance.
TEAMTALKDLL_API INT32 TTS_AddFileToChannel(IN TTSInstance *lpTTSInstance, IN const TTCHAR *szLocalFilePath, IN const RemoteFile *lpRemoteFile)
Add a file to an existing channel.
TEAMTALKDLL_API TTBOOL TTS_StopServer(IN TTSInstance *lpTTSInstance)
Stop server and drop all users.
TEAMTALKDLL_API TTBOOL TTS_SetEncryptionContext(IN TTSInstance *lpTTSInstance, IN const TTCHAR *szCertificateFile, IN const TTCHAR *szPrivateKeyFile)
Set certificate and private key for encrypted server.
TEAMTALKDLL_API INT32 TTS_UpdateChannel(IN TTSInstance *lpTTSInstance, IN const Channel *lpChannel)
Update an existing channel.
TEAMTALKDLL_API TTBOOL TTS_RunEventLoop(IN TTSInstance *lpTTSInstance, IN INT32 *pnWaitMs)
Run the server's event loop.
TEAMTALKDLL_API INT32 TTS_RemoveFileFromChannel(IN TTSInstance *lpTTSInstance, IN const RemoteFile *lpRemoteFile)
Remove a file from a channel.
TEAMTALKDLL_API TTBOOL TTS_SetEncryptionContextEx(IN TTSInstance *lpTTSInstance, const EncryptionContext *lpEncryptionContext)
Set up encryption context for encrypted server.
TEAMTALKDLL_API INT32 TTS_MoveUser(IN TTSInstance *lpTTSInstance, IN INT32 nUserID, IN const Channel *lpChannel)
Move a user from one channel to another.
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.
TEAMTALKDLL_API INT32 TTS_UpdateServer(IN TTSInstance *lpTTSInstance, IN const ServerProperties *lpServerProperties)
Set server properties.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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_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.
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_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_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_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.
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.
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.
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.
void ChannelUpdatedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const Channel *lpChannel, IN const User *lpUser)
Callback when a channel has been updated.
void UserDisconnectedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
Callback when user has disconnected.
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.
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.
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.
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.
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.
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.
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.
void UserLoggedInCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
Callback when a user has logged in.
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.
void UserTimedoutCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
Callback when a user's connection has timed out.
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.
void UserJoinedChannelCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser, IN const Channel *lpChannel)
Callback when a user has joined a channel.
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.
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.
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.
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.
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.
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.
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.
void UserConnectedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
Callback when a new user is connecting to the server.
void UserLeftChannelCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser, IN const Channel *lpChannel)
Callback when a user has left a channel.
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.
void FileDownloadedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const RemoteFile *lpRemoteFile, IN const User *lpUser)
Callback when a user has downloaded a file.
void UserLoggedOutCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
Callback when a user has logged out.
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.
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.
void SaveServerConfigCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
Callback when a user has reguested to save the server configuration.
void UserMovedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpMover, IN const User *lpMovee)
Callback when a user has been moved.
void UserUnbannedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUnbanner, IN const TTCHAR *szIPAddress)
Callback when a ban is removed.
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.
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.
void UserUpdatedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const User *lpUser)
Callback when a user's properties are being updated.
void ChannelCreatedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const Channel *lpChannel, IN const User *lpUser)
Callback when a new channel has been created.
void ChannelRemovedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const Channel *lpChannel, IN const User *lpUser)
Callback when channel has been removed.
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.
void FileDeletedCallback(IN TTSInstance *lpTTSInstance, IN VOID *lpUserData, IN const RemoteFile *lpRemoteFile, IN const User *lpUser)
Callback when a user has deleted a file.
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.
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.
A struct containing the properties of a channel.
Struct containing an error message.
Configure peer verification for encrypted connection.
A struct containing the properties of a file in a Channel.
A struct containing the properties of the server's settings.
A struct containing the properties of a text message sent by a user.
A struct containing the properties of a user account.
A struct containing the properties of a user.