public void UpdateAgent(IAgentInfo agent) { NameValueCollection requestArgs = new NameValueCollection { { "RequestMethod", "AddUserData" }, { "UserID", agent.PrincipalID.ToString() }, { "AgentInfo", OSDParser.SerializeJsonString(agent.ToOSD()) } }; PostData(agent.PrincipalID, requestArgs); }
/// <summary> /// Updates the language and maturity params of the agent. /// Note: we only allow for this on the grid side /// </summary> /// <param name="agent"></param> public void UpdateAgent(IAgentInfo agent) { List<object> SetValues = new List<object>(); List<string> SetRows = new List<string>(); SetRows.Add("Value"); SetValues.Add(OSDParser.SerializeLLSDXmlString(agent.ToOSD())); List<object> KeyValue = new List<object>(); List<string> KeyRow = new List<string>(); KeyRow.Add("ID"); KeyValue.Add(agent.PrincipalID); KeyRow.Add("`Key`"); KeyValue.Add("AgentInfo"); GD.Update("userdata", SetValues.ToArray(), SetRows.ToArray(), KeyRow.ToArray(), KeyValue.ToArray()); }
/// <summary> /// Creates a new database entry for the agent. /// Note: we only allow for this on the grid side /// </summary> /// <param name="agentID"></param> public void CreateNewAgent(UUID agentID) { List<object> values = new List<object>(); values.Add(agentID); values.Add("AgentInfo"); IAgentInfo info = new IAgentInfo(); info.PrincipalID = agentID; values.Add(OSDParser.SerializeLLSDXmlString(info.ToOSD())); //Value which is a default Profile GD.Insert("userdata", values.ToArray()); }
public void UpdateAgent(IAgentInfo agent) { /*object remoteValue = DoRemoteForUser(agent.PrincipalID, agent.ToOSD()); if (remoteValue != null) return;*/ List<object> SetValues = new List<object> {OSDParser.SerializeLLSDXmlString(agent.ToOSD())}; List<string> SetRows = new List<string> {"Value"}; List<object> KeyValue = new List<object> {agent.PrincipalID, "AgentInfo"}; List<string> KeyRow = new List<string> {"ID", "`Key`"}; GD.Update("userdata", SetValues.ToArray(), SetRows.ToArray(), KeyRow.ToArray(), KeyValue.ToArray()); }
public void UpdateAgent(IAgentInfo agent) { try { List<string> serverURIs = m_registry.RequestModuleInterface<IConfigurationService>().FindValueOf( agent.PrincipalID.ToString(), "RemoteServerURI"); foreach (string url in serverURIs) { OpenMetaverse.StructuredData.OSDMap map = new OpenMetaverse.StructuredData.OSDMap(); map["Method"] = "updateagent"; map["Agent"] = agent.ToOSD(); WebUtils.PostToService(url + "osd", map, false, false); } } catch (Exception e) { MainConsole.Instance.DebugFormat("[AuroraRemoteAgentConnector]: Exception when contacting server: {0}", e); } }
public void CreateNewAgent(UUID PrincipalID) { IAgentInfo info = new IAgentInfo {PrincipalID = PrincipalID}; NameValueCollection requestArgs = new NameValueCollection { {"RequestMethod", "AddUserData"}, {"UserID", info.PrincipalID.ToString()}, {"AgentInfo", OSDParser.SerializeJsonString(info.ToOSD())} }; PostData(info.PrincipalID, requestArgs); }
/// <summary> /// Updates the language and maturity params of the agent. /// Note: we only allow for this on the grid side /// </summary> /// <param name="agent"></param> public void UpdateAgent(IAgentInfo agent) { List<object> SetValues = new List<object> {OSDParser.SerializeLLSDXmlString(agent.ToOSD())}; List<string> SetRows = new List<string> {"Value"}; List<object> KeyValue = new List<object> {agent.PrincipalID, "AgentInfo"}; List<string> KeyRow = new List<string> {"ID", "`Key`"}; GD.Update("userdata", SetValues.ToArray(), SetRows.ToArray(), KeyRow.ToArray(), KeyValue.ToArray()); }
public void UpdateAgent(IAgentInfo agent) { CacheAgent(agent); object remoteValue = DoRemoteForUser(agent.PrincipalID, agent.ToOSD()); if (remoteValue != null || m_doRemoteOnly) return; Dictionary<string, object> values = new Dictionary<string, object>(1); values["Value"] = OSDParser.SerializeLLSDXmlString(agent.ToOSD()); QueryFilter filter = new QueryFilter(); filter.andFilters["ID"] = agent.PrincipalID; filter.andFilters["`Key`"] = "AgentInfo"; GD.Update("userdata", values, null, filter, null, null); }