public void Confirmation(string sender, string receiver, bool ok, bool isGroup) { if (isGroup) { GroupConversation group = Subscriber.GetGroup(receiver); if (ok) { group.UserJoinAudio(sender); } } else { UserInformation user = Subscriber.getUser(receiver); if (user != null && user.AudioCallback != null) { if (ok) { user.AudioCallback.ChannelAccepted(sender); } else { user.AudioCallback.ChannelDeclined(sender); } } } }
public void RefuseGroupShareScreen(string sender, string groupName) { GroupConversation group = Subscriber.GetGroup(groupName); if (group != null) { group.UserRefusedShareSCreen(sender); } }
public void SendGroupMessage(string sender, string groupName, string message) { GroupConversation group = Subscriber.GetGroup(groupName); if (group != null) { group.SendMessage(sender, message); } }
public void SendVoiceGroup(byte[] voice, int byteRecorded, string groupName, string sender) { GroupConversation group = Subscriber.GetGroup(groupName); if (group != null) { group.SendVoiceAudio(sender, voice, byteRecorded); } }
public void DeclineGroupRequest(string sender, string groupName) { UserInformation user = Subscriber.getUser(sender); GroupConversation group = Subscriber.GetGroup(groupName); if (group != null) { group.UserDeclined(sender); } }
public List <string> GetGroupMembers(string groupName) { List <string> list = new List <string>(); GroupConversation group = Subscriber.GetGroup(groupName); foreach (UserInformation user in group.Members) { list.Add(user.Username); } return(list); }
public void InitShareScreenGroup(string sender, string groupName, string connectionString) { GroupConversation group = Subscriber.GetGroup(groupName); foreach (UserInformation user in group.Members) { if (user.Username != sender) { user.ScreenShareCallback.GroupShareScreenNotification(sender, group.GroupName, connectionString); } } }
public void UserLeftShareScreen(string sender, string groupName) { GroupConversation group = Subscriber.GetGroup(groupName); foreach (UserInformation user in group.Members) { if (user != null && user.Username != sender) { user.ScreenShareCallback.UserLeftShareScreenGroup(sender, group.GroupName); } } }
public bool CreateGroupConversation(string creator, string groupName) { if (Subscriber.GroupConversations.Exists(x => x.Creator == creator && x.GroupName == groupName)) { return(false); } GroupConversation group = new GroupConversation(creator, groupName); Subscriber.GroupConversations.Add(group); return(true); }
public void LeaveGroup(string sender, string groupName) { UserInformation user = Subscriber.getUser(sender); GroupConversation group = Subscriber.GetGroup(groupName); if (group != null) { group.UserLeft(sender); if (group.Members.Count == 0) { Subscriber.GroupConversations.Remove(group); } } }
public bool AcceptGroupRequest(string sender, string groupName) { UserInformation user = Subscriber.getUser(sender); GroupConversation group = Subscriber.GetGroup(groupName); if (group != null) { if (!group.UserExits(sender)) { group.UserJoined(sender); } return(true); } return(false); }
public void StopCall(string sender, string receiver, bool isGroup) { if (isGroup) { GroupConversation group = Subscriber.GetGroup(receiver); group.UserLeftAudio(sender); } else { UserInformation user = Subscriber.getUser(receiver); if (user != null && user.AudioCallback != null) { user.AudioCallback.StopCall(sender); } } }
public void InitCommunicationGroup(string sender, string groupName) { GroupConversation group = Subscriber.GetGroup(groupName); group.InviteMembersToAudioCall(sender); }