/// <summary> /// Start a friends conference /// </summary> /// <param name="participants"><seealso cref="UUID"/> List of UUIDs to start a conference with</param> /// <param name="tmp_session_id">the temportary session ID returned in the <see cref="OnJoinedGroupChat"/> callback></param> public void StartIMConference(List<UUID> participants, UUID tmp_session_id) { if (Client.Network.CurrentSim == null || Client.Network.CurrentSim.Caps == null) throw new Exception("ChatSessionRequest capability is not currently available"); Uri url = Client.Network.CurrentSim.Caps.CapabilityURI("ChatSessionRequest"); if (url != null) { ChatSessionRequestStartConference startConference = new ChatSessionRequestStartConference(); startConference.AgentsBlock = new UUID[participants.Count]; for (int i = 0; i < participants.Count; i++) startConference.AgentsBlock[i] = participants[i]; startConference.SessionID = tmp_session_id; CapsClient request = new CapsClient(url); request.BeginGetResponse(startConference.Serialize(), OSDFormat.Xml, Client.Settings.CAPS_TIMEOUT); } else { throw new Exception("ChatSessionRequest capability is not currently available"); } }
public void ChatSessionRequestStartConference() { ChatSessionRequestStartConference s = new ChatSessionRequestStartConference(); s.SessionID = UUID.Random(); s.AgentsBlock = new UUID[2]; s.AgentsBlock[0] = UUID.Random(); s.AgentsBlock[0] = UUID.Random(); OSDMap map = s.Serialize(); ChatSessionRequestStartConference t = new ChatSessionRequestStartConference(); t.Deserialize(map); Assert.AreEqual(s.SessionID, t.SessionID); Assert.AreEqual(s.Method, t.Method); for (int i = 0; i < t.AgentsBlock.Length; i++) { Assert.AreEqual(s.AgentsBlock[i], t.AgentsBlock[i]); } }