public GroupInviteInfo GetAgentToGroupInvite(UUID requestingAgentID, UUID inviteID) { GroupInviteInfo invite = new GroupInviteInfo(); List <string> groupInvite = data.Query(new string[] { "AgentID", "InviteID" }, new object[] { requestingAgentID, inviteID }, "osgroupinvite", "*"); invite.AgentID = UUID.Parse(groupInvite[3]); invite.GroupID = UUID.Parse(groupInvite[1]); invite.InviteID = UUID.Parse(groupInvite[0]); invite.RoleID = UUID.Parse(groupInvite[2]); invite.FromAgentName = groupInvite[5]; return(invite); }
public List <GroupInviteInfo> GetGroupInvites(UUID requestingAgentID) { List <string> groupInvite = data.Query(new string[] { "AgentID" }, new object[] { requestingAgentID }, "osgroupinvite", "*"); List <GroupInviteInfo> invites = new List <GroupInviteInfo>(); for (int i = 0; i < groupInvite.Count; i += 6) { GroupInviteInfo invite = new GroupInviteInfo(); invite.AgentID = UUID.Parse(groupInvite[i + 3]); invite.GroupID = UUID.Parse(groupInvite[i + 1]); invite.InviteID = UUID.Parse(groupInvite[i]); invite.RoleID = UUID.Parse(groupInvite[i + 2]); invite.FromAgentName = groupInvite[i + 5]; invites.Add(invite); } return(invites); }
public GroupInviteInfo GetAgentToGroupInvite(UUID requestingAgentID, UUID inviteID) { Hashtable param = new Hashtable(); param["InviteID"] = inviteID.ToString(); Hashtable respData = XmlRpcCall(requestingAgentID, "groups.getAgentToGroupInvite", param); if (respData.Contains("error")) { return(null); } GroupInviteInfo inviteInfo = new GroupInviteInfo { InviteID = inviteID, GroupID = UUID.Parse((string)respData["GroupID"]), RoleID = UUID.Parse((string)respData["RoleID"]), AgentID = UUID.Parse((string)respData["AgentID"]) }; return(inviteInfo); }
public GroupInviteInfo GetAgentToGroupInvite(UUID requestingAgentID, UUID inviteID) { Hashtable param = new Hashtable(); param["InviteID"] = inviteID.ToString(); Hashtable respData = XmlRpcCall(requestingAgentID, "groups.getAgentToGroupInvite", param); if (respData.Contains("error")) { return null; } GroupInviteInfo inviteInfo = new GroupInviteInfo(); inviteInfo.InviteID = inviteID; inviteInfo.GroupID = UUID.Parse((string)respData["GroupID"]); inviteInfo.RoleID = UUID.Parse((string)respData["RoleID"]); inviteInfo.AgentID = UUID.Parse((string)respData["AgentID"]); return inviteInfo; }
public static GroupInviteInfo GroupInviteInfo(Dictionary<string, object> dict) { if (dict == null) return null; GroupInviteInfo invite = new GroupInviteInfo(); invite.InviteID = new UUID(dict["InviteID"].ToString()); invite.GroupID = new UUID(dict["GroupID"].ToString()); invite.RoleID = new UUID(dict["RoleID"].ToString()); invite.AgentID = Sanitize(dict["AgentID"].ToString()); return invite; }
public static Dictionary<string, object> GroupInviteInfo(GroupInviteInfo invite) { Dictionary<string, object> dict = new Dictionary<string, object>(); dict["InviteID"] = invite.InviteID.ToString(); dict["GroupID"] = invite.GroupID.ToString(); dict["RoleID"] = invite.RoleID.ToString(); dict["AgentID"] = invite.AgentID; return dict; }
public GroupInviteInfo GetAgentToGroupInvite(UUID requestingAgentID, UUID inviteID) { Dictionary<string, object> sendData = new Dictionary<string, object>(); sendData["METHOD"] = "GetAgentToGroupInvite"; sendData["requestingAgentID"] = requestingAgentID; sendData["inviteID"] = inviteID; string reqString = WebUtils.BuildXmlResponse(sendData); try { foreach (string m_ServerURI in m_ServerURIs) { string reply = SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI + "/auroradata", reqString); if (reply != string.Empty) { Dictionary<string, object> replyData = WebUtils.ParseXmlResponse(reply); if (replyData != null) { Dictionary<string, object>.ValueCollection replyvalues = replyData.Values; GroupInviteInfo group = null; foreach (object f in replyvalues) { if (f is Dictionary<string, object>) { group = new GroupInviteInfo((Dictionary<string, object>)f); } } // Success return group; } } } } catch (Exception e) { m_log.DebugFormat("[AuroraRemoteGroupsServiceConnector]: Exception when contacting server: {0}", e.ToString()); } return null; }
public GroupInviteInfo GetAgentToGroupInvite(UUID requestingAgentID, UUID inviteID) { if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); OSDMap GroupMemberInvite; UUID GroupID; if (!SimianGetFirstGenericEntry("GroupMemberInvite", inviteID.ToString(), out GroupID, out GroupMemberInvite)) { return null; } GroupInviteInfo inviteInfo = new GroupInviteInfo(); inviteInfo.InviteID = inviteID; inviteInfo.GroupID = GroupID; inviteInfo.AgentID = GroupMemberInvite["AgentID"].AsUUID(); inviteInfo.RoleID = GroupMemberInvite["RoleID"].AsUUID(); return inviteInfo; }
public GroupInviteInfo GetAgentToGroupInvite(string RequestingAgentID, UUID inviteID) { InvitationData data = m_Database.RetrieveInvitation(inviteID); if (data == null) return null; GroupInviteInfo inviteInfo = new GroupInviteInfo(); inviteInfo.AgentID = data.PrincipalID; inviteInfo.GroupID = data.GroupID; inviteInfo.InviteID = data.InviteID; inviteInfo.RoleID = data.RoleID; return inviteInfo; }
public List<GroupInviteInfo> GetGroupInvites(UUID requestingAgentID) { List<string> groupInvite = data.Query(new[] { "AgentID" }, new object[] { requestingAgentID }, "osgroupinvite", "*"); List<GroupInviteInfo> invites = new List<GroupInviteInfo>(); for (int i = 0; i < groupInvite.Count; i += 6) { GroupInviteInfo invite = new GroupInviteInfo { AgentID = UUID.Parse(groupInvite[i + 3]), GroupID = UUID.Parse(groupInvite[i + 1]), InviteID = UUID.Parse(groupInvite[i]), RoleID = UUID.Parse(groupInvite[i + 2]), FromAgentName = groupInvite[i + 5] }; invites.Add(invite); } return invites; }
public GroupInviteInfo GetAgentToGroupInvite(UUID requestingAgentID, UUID inviteID) { GroupInviteInfo invite = new GroupInviteInfo(); List<string> groupInvite = data.Query(new[] { "AgentID", "InviteID" }, new object[] { requestingAgentID, inviteID }, "osgroupinvite", "*"); if (groupInvite.Count == 0) return null; invite.AgentID = UUID.Parse(groupInvite[3]); invite.GroupID = UUID.Parse(groupInvite[1]); invite.InviteID = UUID.Parse(groupInvite[0]); invite.RoleID = UUID.Parse(groupInvite[2]); invite.FromAgentName = groupInvite[5]; return invite; }
private GroupInviteInfo MapGroupInviteInfoFromResult(Dictionary<string, string> result) { GroupInviteInfo inviteInfo = new GroupInviteInfo(); inviteInfo.AgentID = new UUID(result["AgentID"]); inviteInfo.GroupID = new UUID(result["GroupID"]); inviteInfo.InviteID = new UUID(result["InviteID"]); inviteInfo.RoleID = new UUID(result["RoleID"]); return inviteInfo; }
public GroupInviteInfo GetAgentToGroupInvite(UUID requestingAgentID, UUID inviteID) { if (m_debugEnabled) MainConsole.Instance.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", MethodBase.GetCurrentMethod().Name); OSDMap GroupMemberInvite; UUID GroupID; if ( !SimianGetFirstGenericEntry("GroupMemberInvite", inviteID.ToString(), out GroupID, out GroupMemberInvite)) { return null; } GroupInviteInfo inviteInfo = new GroupInviteInfo { InviteID = inviteID, GroupID = GroupID, AgentID = GroupMemberInvite["AgentID"].AsUUID(), RoleID = GroupMemberInvite["RoleID"].AsUUID() }; return inviteInfo; }
public List<GroupInviteInfo> GetGroupInvites(UUID requestingAgentID) { Hashtable param = new Hashtable (); param["AgentID"] = requestingAgentID.ToString (); Hashtable respData = XmlRpcCall (requestingAgentID, "groups.getGroupInvites", param); if (!respData.Contains ("error")) { List<GroupInviteInfo> GroupInvites = new List<GroupInviteInfo> (); Hashtable results = (Hashtable)respData["results"]; if (results != null) { foreach (Hashtable invite in results.Values) { GroupInviteInfo data = new GroupInviteInfo(); data.AgentID = new UUID((string)invite["AgentID"]); data.GroupID = new UUID((string)invite["GroupID"]); data.InviteID = new UUID((string)invite["InviteID"]); data.RoleID = new UUID((string)invite["RoleID"]); GroupInvites.Add(data); } } return GroupInvites; } return new List<GroupInviteInfo> (); }
public GroupInviteInfo GetAgentToGroupInvite(UUID requestingAgentID, UUID inviteID) { Dictionary<string, object> sendData = new Dictionary<string, object>(); sendData["METHOD"] = "GetAgentToGroupInvite"; sendData["requestingAgentID"] = requestingAgentID; sendData["inviteID"] = inviteID; string reqString = WebUtils.BuildXmlResponse(sendData); try { List<string> m_ServerURIs = m_registry.RequestModuleInterface<IConfigurationService>().FindValueOf( requestingAgentID.ToString(), "RemoteServerURI", false); foreach (string m_ServerURI in m_ServerURIs) { string reply = SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI, reqString); if (reply != string.Empty) { Dictionary<string, object> replyData = WebUtils.ParseXmlResponse(reply); if (replyData != null) { Dictionary<string, object>.ValueCollection replyvalues = replyData.Values; GroupInviteInfo group = null; #if (!ISWIN) foreach (object replyvalue in replyvalues) { Dictionary<string, object> f = replyvalue as Dictionary<string, object>; if (f != null) { group = new GroupInviteInfo(f); } } #else foreach (Dictionary<string, object> f in replyvalues.OfType<Dictionary<string, object>>()) { group = new GroupInviteInfo(f); } #endif // Success return group; } } } } catch (Exception e) { MainConsole.Instance.DebugFormat("[AuroraRemoteGroupsServiceConnector]: Exception when contacting server: {0}", e); } return null; }