25 using System.Collections.Generic;
28 using System.Runtime.InteropServices;
461 : base(lpChannel, lpServerProperties)
468 base.OnChannelCreatedCallback +=
new ChannelCreatedCallback(TeamTalkSrv_OnChannelCreatedCallback);
469 base.OnChannelRemovedCallback +=
new ChannelRemovedCallback(TeamTalkSrv_OnChannelRemovedCallback);
470 base.OnChannelUpdatedCallback +=
new ChannelUpdatedCallback(TeamTalkSrv_OnChannelUpdatedCallback);
471 base.OnUserLoginCallback +=
new UserLoginCallback(TeamTalkSrv_OnUserLoginCallback);
472 base.OnUserLoggedOutCallback +=
new UserLoggedOutCallback(TeamTalkSrv_OnUserLoggedOutCallback);
473 base.OnUserLoggedInCallBack +=
new UserLoggedInCallback(TeamTalkSrv_OnUserLoggedInCallBack);
474 base.OnUserTextMessageCallback +=
new UserTextMessageCallback(TeamTalkSrv_OnUserTextMessageCallback);
475 base.OnUserAddServerBanCallback +=
new UserAddServerBanCallback(TeamTalkSrv_OnUserAddServerBanCallback);
476 base.OnUserAddServerBanIPAddressCallback +=
new UserAddServerBanIPAddressCallback(TeamTalkSrv_OnUserAddServerBanIPAddressCallback);
477 base.OnUserDeleteServerBanCallback +=
new UserDeleteServerBanCallback(TeamTalkSrv_OnUserDeleteServerBanCallback);
478 base.OnUserBannedCallback +=
new UserBannedCallback(TeamTalkSrv_OnUserBannedCallback);
479 base.OnUserConnectedCallback +=
new UserConnectedCallback(TeamTalkSrv_OnUserConnectedCallback);
480 base.OnUserDisconnectedCallback +=
new UserDisconnectedCallback(TeamTalkSrv_OnUserDisconnectedCallback);
481 base.OnUserTimedoutCallback +=
new UserTimedoutCallback(TeamTalkSrv_OnUserTimedoutCallback);
482 base.OnUserLeftChannelCallback +=
new UserLeftChannelCallback(TeamTalkSrv_OnUserLeftChannelCallback);
483 base.OnUserJoinedChannelCallback +=
new UserJoinedChannelCallback(TeamTalkSrv_OnUserJoinedChannelCallback);
484 base.OnUserKickedCallback +=
new UserKickedCallback(TeamTalkSrv_OnUserKickedCallback);
485 base.OnUserMovedCallback +=
new UserMovedCallback(TeamTalkSrv_OnUserMovedCallback);
486 base.OnUserUpdatedCallback +=
new UserUpdatedCallback(TeamTalkSrv_OnUserUpdatedCallback);
487 base.OnSaveServerConfigCallback +=
new SaveServerConfigCallback(TeamTalkSrv_OnSaveServerConfigCallback);
488 base.OnServerUpdatedCallback +=
new ServerUpdatedCallback(TeamTalkSrv_OnServerUpdatedCallback);
489 base.OnUserCreateUserAccountCallback +=
new UserCreateUserAccountCallback(TeamTalkSrv_OnUserCreateUserAccountCallback);
490 base.OnUserDeleteUserAccountCallback +=
new UserDeleteUserAccountCallback(TeamTalkSrv_OnUserDeleteUserAccountCallback);
491 base.OnFileDeletedCallback +=
new FileDeletedCallback(TeamTalkSrv_OnFileDeletedCallback);
492 base.OnFileDownloadedCallback +=
new FileDownloadedCallback(TeamTalkSrv_OnFileDownloadedCallback);
493 base.OnFileUploadedCallback +=
new FileUploadedCallback(TeamTalkSrv_OnFileUploadedCallback);
494 base.OnUserChangeNicknameCallback +=
new UserChangeNicknameCallback(TeamTalk5Srv_OnUserChangeNicknameCallback);
495 base.OnUserChangeStatusCallback +=
new UserChangeStatusCallback(TeamTalk5Srv_OnUserChangeStatusCallback);
498 void TeamTalk5Srv_OnUserChangeStatusCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref ClientErrorMsg lpClientErrorMsg, ref User lpUser, ref
int nNewStatusMode,
string szNewStatusMsg)
502 OnUserChangeStatus(ref lpClientErrorMsg, ref lpUser, ref nNewStatusMode, szNewStatusMsg);
506 void TeamTalk5Srv_OnUserChangeNicknameCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref ClientErrorMsg lpClientErrorMsg, ref User lpUser,
string szNewNickname)
516 void TeamTalkSrv_OnFileUploadedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref RemoteFile lpRemoteFile, ref User lpUser)
524 void TeamTalkSrv_OnFileDownloadedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref RemoteFile lpRemoteFile, ref User lpUser)
532 void TeamTalkSrv_OnFileDeletedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref RemoteFile lpRemoteFile, ref User lpUser)
540 void TeamTalkSrv_OnUserDeleteUserAccountCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref ClientErrorMsg lpClientErrorMsg, ref User lpUser,
string szUsername)
549 void TeamTalkSrv_OnUserCreateUserAccountCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref ClientErrorMsg lpClientErrorMsg, ref User lpUser, ref UserAccount lpUserAccount)
557 void TeamTalkSrv_OnServerUpdatedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref ServerProperties lpServerProperties, ref User lpUser)
565 void TeamTalkSrv_OnSaveServerConfigCallback(IntPtr lpTTSInstance, IntPtr lpUserData, IntPtr lpUser)
567 User user =
new User();
568 if (lpUser != IntPtr.Zero)
570 user = (User)Marshal.PtrToStructure(lpUser, typeof(User));
578 void TeamTalkSrv_OnUserUpdatedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref User lpUser)
586 void TeamTalkSrv_OnUserMovedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref User lpMover, ref User lpMovee)
594 void TeamTalkSrv_OnUserKickedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, IntPtr lpKicker, ref User lpKickee, IntPtr lpChannel)
596 User user =
new User();
597 if (lpKicker != IntPtr.Zero)
599 user = (User)Marshal.PtrToStructure(lpKicker, typeof(User));
601 Channel chan =
new Channel();
602 if(lpChannel != IntPtr.Zero)
604 chan = (Channel)Marshal.PtrToStructure(lpChannel, typeof(Channel));
612 void TeamTalkSrv_OnUserJoinedChannelCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref User lpUser, ref Channel lpChannel)
620 void TeamTalkSrv_OnUserLeftChannelCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref User lpUser, ref Channel lpChannel)
628 void TeamTalkSrv_OnUserTimedoutCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref User lpUser)
636 void TeamTalkSrv_OnUserDisconnectedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref User lpUser)
644 void TeamTalkSrv_OnUserConnectedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref User lpUser)
652 void TeamTalkSrv_OnUserBannedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref User lpBanner, ref User lpBanee, IntPtr lpChannel)
660 void TeamTalkSrv_OnUserDeleteServerBanCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref ClientErrorMsg lpClientErrorMsg, ref User lpUser,
string szIPAddress)
668 void TeamTalkSrv_OnUserAddServerBanIPAddressCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref ClientErrorMsg lpClientErrorMsg, ref User lpBanner,
string szIPAddress)
676 void TeamTalkSrv_OnUserAddServerBanCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref ClientErrorMsg lpClientErrorMsg, ref User lpBanner, ref User lpBanee)
684 void TeamTalkSrv_OnUserTextMessageCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref User lpUser, ref TextMessage lpTextMessage)
692 void TeamTalkSrv_OnUserLoggedOutCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref User lpUser)
700 void TeamTalkSrv_OnUserLoggedInCallBack(IntPtr lpTTSInstance, IntPtr lpUserData, ref User lpUser)
708 void TeamTalkSrv_OnUserLoginCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref ClientErrorMsg lpClientErrorMsg, ref User lpUser, ref UserAccount lpUserAccount)
712 OnUserLogin(ref lpClientErrorMsg, ref lpUser, ref lpUserAccount);
716 void TeamTalkSrv_OnChannelUpdatedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref Channel lpChannel, IntPtr lpUser)
718 User user =
new User();
719 if (lpUser != IntPtr.Zero)
721 user = (User)Marshal.PtrToStructure(lpUser, typeof(User));
729 void TeamTalkSrv_OnChannelRemovedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref Channel lpChannel, IntPtr lpUser)
731 User user =
new User();
732 if (lpUser != IntPtr.Zero)
734 user = (User)Marshal.PtrToStructure(lpUser, typeof(User));
742 void TeamTalkSrv_OnChannelCreatedCallback(IntPtr lpTTSInstance, IntPtr lpUserData, ref Channel lpChannel, IntPtr lpUser)
744 User user =
new User();
745 if (lpUser != IntPtr.Zero)
747 user = (User)Marshal.PtrToStructure(lpUser, typeof(User));
Instantiate this class to start a TeamTalk server.
Base class for BearWare.TeamTalk5Srv.
TeamTalk5Srv()
Instantiate TeamTalk server. Call UpdateServer() and MakeChannel() to setup server properties and roo...
TeamTalk5Srv(Channel lpChannel, ServerProperties lpServerProperties)
Instantiate TeamTalk server with root channel and server properties.
TeamTalk5Srv(Channel lpChannel)
Instantiate TeamTalk server with a root channel.
UserCreateUserAccount OnUserCreateUserAccount
Register using UserCreateUserAccount delegate.
UserDeleteUserAccount OnUserDeleteUserAccount
Register using UserCreateUserAccount delegate.
delegate void UserLogin(ref ClientErrorMsg lpClientErrorMsg, ref User lpUser, ref UserAccount lpUserAccount)
Callback when a user is requesting to log on to the server.
delegate void UserCreateUserAccount(ref ClientErrorMsg lpClientErrorMsg, ref User lpUser, ref UserAccount lpUserAccount)
Callback when a user is requesting to create a new user account.
UserDeleteServerBan OnUserDeleteServerBan
Register using UserAddServerBanIPAddress delegate.
delegate void UserChangeStatus(ref ClientErrorMsg lpClientErrorMsg, ref User lpUser, ref int nNewStatusMode, string szNewStatusMsg)
Callback when a user is requesting to change status.
UserChangeStatus OnUserChangeStatus
Register using UserChangeStatus delegate.
delegate void UserAddServerBanIPAddress(ref ClientErrorMsg lpClientErrorMsg, ref User lpBanner, string szIPAddress)
Callback when a user is requesting to ban an IP-address.
UserChangeNickname OnUserChangeNickname
Register using UserChangeNickname delegate.
delegate void UserDeleteUserAccount(ref ClientErrorMsg lpClientErrorMsg, ref User lpUser, string szUsername)
Callback when a user is requesting to delete a user account.
delegate void UserChangeNickname(ref ClientErrorMsg lpClientErrorMsg, ref User lpUser, string szNewNickname)
Callback when a user is requesting to change nickname.
UserLogin OnUserLogin
Register using UserLogin delegate.
delegate void UserAddServerBan(ref ClientErrorMsg lpClientErrorMsg, ref User lpBanner, ref User lpBanee)
Callback when a user is requesting to ban a user.
UserAddServerBanIPAddress OnUserAddServerBanIPAddress
Register using UserAddServerBan delegate.
delegate void UserDeleteServerBan(ref ClientErrorMsg lpClientErrorMsg, ref User lpUser, string szIPAddress)
Callback when a user is requesting to remove a ban.
UserAddServerBan OnUserAddServerBan
Register using UserAddServerBan delegate.
UserMoved OnUserMoved
Register using UserMoved delegate.
UserLoggedOut OnUserLoggedOut
Register using UserLoggedOut delegate.
ChannelUpdated OnChannelUpdated
Register using ChannelUpdated delegate.
delegate void UserTextMessage(ref User lpUser, ref TextMessage lpTextMessage)
Callback when a user is sending a text message.
delegate void ChannelRemoved(ref Channel lpChannel, ref User lpUser)
Callback when channel has been removed.
delegate void UserJoinedChannel(ref User lpUser, ref Channel lpChannel)
Callback when a user has joined a channel.
FileDownloaded OnFileDownloaded
Register using FileDownloaded delegate.
delegate void UserConnected(ref User lpUser)
Callback when a new user is connecting to the server.
delegate void FileDeleted(ref RemoteFile lpRemoteFile, ref User lpUser)
Callback when a user has deleted a file.
ChannelRemoved OnChannelRemoved
Register using ChannelRemoved delegate.
delegate void UserLoggedIn(ref User lpUser)
Callback when a user has logged in.
ServerUpdated OnServerUpdated
Register using ServerUpdated delegate.
UserKicked OnUserKicked
Register using UserKicked delegate.
UserDisconnected OnUserDisconnected
Register using UserDisconnected delegate.
UserLoggedIn OnUserLoggedIn
Register using UserLoggedIn delegate.
delegate void ServerUpdated(ref ServerProperties lpServerProperties, ref User lpUser)
Callback when a user has updated the server properties.
FileUploaded OnFileUploaded
Register using FileUploaded delegate.
delegate void SaveServerConfig(ref User lpUser)
Callback when a user has reguested to save the server configuration.
delegate void UserLeftChannel(ref User lpUser, ref Channel lpChannel)
Callback when a user has left a channel.
delegate void FileDownloaded(ref RemoteFile lpRemoteFile, ref User lpUser)
Callback when a user has downloaded a file.
ChannelCreated OnChannelCreated
Register using ChannelCreated delegate.
UserLeftChannel OnUserLeftChannel
Register using UserLeftChannel delegate.
SaveServerConfig OnSaveServerConfig
Register using SaveServerConfig delegate.
delegate void UserDisconnected(ref User lpUser)
Callback when user has disconnected.
UserJoinedChannel OnUserJoinedChannel
Register using UserJoinedChannel delegate.
FileDeleted OnFileDeleted
Register using FileDeleted delegate.
delegate void UserTimedout(ref User lpUser)
Callback when a user's connection has timed out.
UserTextMessage OnUserTextMessage
Register using UserTextMessage delegate.
UserBanned OnUserBanned
Register using UserBanned delegate.
delegate void UserMoved(ref User lpMover, ref User lpMovee)
Callback when a user has been moved.
delegate void ChannelUpdated(ref Channel lpChannel, ref User lpUser)
Callback when a channel has been updated.
delegate void UserKicked(ref User lpKicker, ref User lpKickee, ref Channel lpChannel)
Callback when a user has been kicked.
delegate void UserUpdated(ref User lpUser)
Callback when a user's properties are being updated.
UserUnbanned OnUserUnbanned
Register using UserUnbanned delegate.
delegate void UserBanned(ref User lpBanner, ref User lpBanee, IntPtr lpChannel)
Callback when a user has been banned.
delegate void UserUnbanned(ref User lpUnbanner, string szIPAddress)
Callback when a ban is removed.
UserUpdated OnUserUpdated
Register using UserUpdated delegate.
delegate void ChannelCreated(ref Channel lpChannel, ref User lpUser)
Callback when a new channel has been created.
delegate void FileUploaded(ref RemoteFile lpRemoteFile, ref User lpUser)
Callback when a new file has been uploaded to a channel.
delegate void UserLoggedOut(ref User lpUser)
Callback when a user has logged out.
UserTimedout OnUserTimedout
Register using UserTimedout delegate.
UserConnected OnUserConnected
Register using UserConnected delegate.
A struct containing the properties of a channel.
A struct containing the properties of a file in a BearWare.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.