in theory implement the backend of appearance for grid.

testers encouraged so I can track down issues.
0.6.0-stable
Sean Dague 2008-05-16 18:23:13 +00:00
parent 6812de9af2
commit a5fb011041
2 changed files with 46 additions and 0 deletions

View File

@ -127,6 +127,8 @@ namespace OpenSim.Grid.UserServer
m_httpServer.AddXmlRPCHandler("remove_user_friend", m_userManager.XmlRpcResponseXmlRPCRemoveUserFriend);
m_httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms);
m_httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList);
m_httpServer.AddXmlRPCHandler("get_avatar_appearance", m_userManager.XmlRPCGetAvatarAppearance);
m_httpServer.AddXmlRPCHandler("update_avatar_appearance", m_userManager.XmlRPCUpdateAvatarAppearance);
m_httpServer.AddXmlRPCHandler("logout_of_simulator", m_userManager.XmlRPCLogOffUserMethodUUID);
// Message Server ---> User Server

View File

@ -247,6 +247,50 @@ namespace OpenSim.Grid.UserServer
return FriendListItemListtoXmlRPCResponse(returndata);
}
public XmlRpcResponse XmlRPCGetAvatarAppearance(XmlRpcRequest request)
{
XmlRpcResponse response = new XmlRpcResponse();
Hashtable requestData = (Hashtable)request.Params[0];
AvatarAppearance appearance = null;
Hashtable responseData = null;
if (requestData.Contains("owner"))
{
appearance = GetUserAppearance(new LLUUID((string)requestData["owner"]));
responseData = appearance.ToHashTable();
}
else
{
responseData = new Hashtable();
responseData["error_type"] = "unknown_avatar";
responseData["error_desc"] = "The avatar appearance requested is not in the database";
}
response.Value = responseData;
return response;
}
public XmlRpcResponse XmlRPCUpdateAvatarAppearance(XmlRpcRequest request)
{
XmlRpcResponse response = new XmlRpcResponse();
Hashtable requestData = (Hashtable)request.Params[0];
Hashtable responseData = null;
if (requestData.Contains("owner"))
{
AvatarAppearance appearance = new AvatarAppearance(requestData);
UpdateUserAppearance(new LLUUID((string)requestData["owner"]), appearance);
responseData = new Hashtable();
responseData["returnString"] = "TRUE";
}
else
{
responseData = new Hashtable();
responseData["error_type"] = "unknown_avatar";
responseData["error_desc"] = "The avatar appearance requested is not in the database";
}
response.Value = responseData;
return response;
}
public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request)
{
XmlRpcResponse response = new XmlRpcResponse();