front end of OGS1 Appearance bits. Now I need to write the

back end.
0.6.0-stable
Sean Dague 2008-05-16 18:02:20 +00:00
parent c2581c9577
commit 244c776487
1 changed files with 47 additions and 3 deletions

View File

@ -97,6 +97,11 @@ namespace OpenSim.Region.Communications.OGS1
"): " + data["error_desc"]); "): " + data["error_desc"]);
return null; return null;
} }
else
{
return new AvatarAppearance(data);
}
return null; return null;
} }
@ -569,7 +574,7 @@ namespace OpenSim.Region.Communications.OGS1
try try
{ {
Hashtable param = new Hashtable(); Hashtable param = new Hashtable();
param["ownerID"] = user.ToString(); param["owner"] = user.ToString();
IList parameters = new ArrayList(); IList parameters = new ArrayList();
parameters.Add(param); parameters.Add(param);
@ -590,7 +595,46 @@ namespace OpenSim.Region.Communications.OGS1
public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 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) public void AddAttachment(LLUUID user, LLUUID item)