From 244c776487c9c2099d9a42a499b0da043341b8df Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 16 May 2008 18:02:20 +0000 Subject: front end of OGS1 Appearance bits. Now I need to write the back end. --- .../Region/Communications/OGS1/OGS1UserServices.cs | 50 ++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index d77f190..8c47323 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -97,6 +97,11 @@ namespace OpenSim.Region.Communications.OGS1 "): " + data["error_desc"]); return null; } + else + { + return new AvatarAppearance(data); + } + return null; } @@ -569,14 +574,14 @@ namespace OpenSim.Region.Communications.OGS1 try { Hashtable param = new Hashtable(); - param["ownerID"] = user.ToString(); + param["owner"] = user.ToString(); IList parameters = new ArrayList(); parameters.Add(param); XmlRpcRequest req = new XmlRpcRequest("get_user_appearance", parameters); XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000); Hashtable respData = (Hashtable) resp.Value; - + return ConvertXMLRPCDataToAvatarAppearance(respData); } catch (WebException e) @@ -590,7 +595,46 @@ namespace OpenSim.Region.Communications.OGS1 public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) { - return; + try + { + Hashtable param = appearance.ToHashTable(); + param["owner"] = user.ToString(); + + IList parameters = new ArrayList(); + parameters.Add(param); + XmlRpcRequest req = new XmlRpcRequest("update_user_appearance", parameters); + XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000); + Hashtable respData = (Hashtable) resp.Value; + + if (respData != null) + { + if (respData.Contains("returnString")) + { + if ((string)respData["returnString"] == "TRUE") + { + + } + else + { + m_log.Warn("[GRID]: Unable to update_user_appearance, User Server Reported an issue"); + } + } + else + { + m_log.Warn("[GRID]: Unable to update_user_appearance, UserServer didn't understand me!"); + } + } + else + { + m_log.Warn("[GRID]: Unable to update_user_appearance, UserServer didn't understand me!"); + } + } + catch (WebException e) + { + m_log.Warn("[OGS1 USER SERVICES]: Error when trying to update Avatar's appearance: " + + e.Message); + // Return Empty list (no friends) + } } public void AddAttachment(LLUUID user, LLUUID item) -- cgit v1.1