aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserManager.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index 58e9677..16eedcd 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -27,6 +27,7 @@
27*/ 27*/
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic;
30using libsecondlife; 31using libsecondlife;
31using Nwc.XmlRpc; 32using Nwc.XmlRpc;
32using OpenSim.Framework; 33using OpenSim.Framework;
@@ -70,6 +71,24 @@ namespace OpenSim.Grid.UserServer
70 return response; 71 return response;
71 } 72 }
72 73
74 public XmlRpcResponse AvatarPickerListtoXmlRPCResponse(LLUUID queryID, List<AvatarPickerAvatar> returnUsers)
75 {
76 XmlRpcResponse response = new XmlRpcResponse();
77 Hashtable responseData = new Hashtable();
78 // Query Result Information
79 responseData["queryid"] = (string)queryID.ToStringHyphenated();
80 responseData["avcount"] = (string)returnUsers.Count.ToString();
81
82 for (int i = 0; i < returnUsers.Count; i++)
83 {
84 responseData["avatarid" + i.ToString()] = returnUsers[i].AvatarID.ToStringHyphenated();
85 responseData["firstname" + i.ToString()] = returnUsers[i].firstName;
86 responseData["lastname" + i.ToString()] = returnUsers[i].lastName;
87 }
88 response.Value = responseData;
89
90 return response;
91 }
73 /// <summary> 92 /// <summary>
74 /// Converts a user profile to an XML element which can be returned 93 /// Converts a user profile to an XML element which can be returned
75 /// </summary> 94 /// </summary>
@@ -113,6 +132,23 @@ namespace OpenSim.Grid.UserServer
113 132
114 #region XMLRPC User Methods 133 #region XMLRPC User Methods
115 134
135 public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request)
136 {
137 XmlRpcResponse response = new XmlRpcResponse();
138 Hashtable requestData = (Hashtable)request.Params[0];
139 List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>();
140 LLUUID queryID = new LLUUID(LLUUID.Zero.ToStringHyphenated());
141
142 if (requestData.Contains("avquery") && requestData.Contains("queryid"))
143 {
144 queryID = new LLUUID((string)requestData["queryid"]);
145 returnAvatar = GenerateAgentPickerRequestResponse(queryID,(string)requestData["avquery"]);
146 }
147
148 Console.WriteLine("[AVATARINFO]: Servicing Avatar Query: " + (string)requestData["avquery"]);
149 return AvatarPickerListtoXmlRPCResponse(queryID,returnAvatar);
150 }
151
116 public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request) 152 public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request)
117 { 153 {
118 XmlRpcResponse response = new XmlRpcResponse(); 154 XmlRpcResponse response = new XmlRpcResponse();