diff options
author | Sean Dague | 2007-07-16 15:40:11 +0000 |
---|---|---|
committer | Sean Dague | 2007-07-16 15:40:11 +0000 |
commit | 2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6 (patch) | |
tree | e3f80ad51736cf17e856547b1bcf956010927434 /OpenSim/Framework/UserManager/LoginResponse.cs | |
parent | *Trunk compiles now (diff) | |
download | opensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.zip opensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.gz opensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.bz2 opensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.xz |
changed to native line ending encoding
Diffstat (limited to 'OpenSim/Framework/UserManager/LoginResponse.cs')
-rw-r--r-- | OpenSim/Framework/UserManager/LoginResponse.cs | 1286 |
1 files changed, 643 insertions, 643 deletions
diff --git a/OpenSim/Framework/UserManager/LoginResponse.cs b/OpenSim/Framework/UserManager/LoginResponse.cs index abcbd48..d3dfd5b 100644 --- a/OpenSim/Framework/UserManager/LoginResponse.cs +++ b/OpenSim/Framework/UserManager/LoginResponse.cs | |||
@@ -1,643 +1,643 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections; | 2 | using System.Collections; |
3 | using libsecondlife; | 3 | using libsecondlife; |
4 | using Nwc.XmlRpc; | 4 | using Nwc.XmlRpc; |
5 | using OpenSim.Framework.Console; | 5 | using OpenSim.Framework.Console; |
6 | 6 | ||
7 | namespace OpenSim.Framework.UserManagement | 7 | namespace OpenSim.Framework.UserManagement |
8 | { | 8 | { |
9 | 9 | ||
10 | /// <summary> | 10 | /// <summary> |
11 | /// A temp class to handle login response. | 11 | /// A temp class to handle login response. |
12 | /// Should make use of UserProfileManager where possible. | 12 | /// Should make use of UserProfileManager where possible. |
13 | /// </summary> | 13 | /// </summary> |
14 | 14 | ||
15 | public class LoginResponse | 15 | public class LoginResponse |
16 | { | 16 | { |
17 | private Hashtable loginFlagsHash; | 17 | private Hashtable loginFlagsHash; |
18 | private Hashtable globalTexturesHash; | 18 | private Hashtable globalTexturesHash; |
19 | private Hashtable loginError; | 19 | private Hashtable loginError; |
20 | private Hashtable eventCategoriesHash; | 20 | private Hashtable eventCategoriesHash; |
21 | private Hashtable uiConfigHash; | 21 | private Hashtable uiConfigHash; |
22 | private Hashtable classifiedCategoriesHash; | 22 | private Hashtable classifiedCategoriesHash; |
23 | 23 | ||
24 | private ArrayList loginFlags; | 24 | private ArrayList loginFlags; |
25 | private ArrayList globalTextures; | 25 | private ArrayList globalTextures; |
26 | private ArrayList eventCategories; | 26 | private ArrayList eventCategories; |
27 | private ArrayList uiConfig; | 27 | private ArrayList uiConfig; |
28 | private ArrayList classifiedCategories; | 28 | private ArrayList classifiedCategories; |
29 | private ArrayList inventoryRoot; | 29 | private ArrayList inventoryRoot; |
30 | private ArrayList initialOutfit; | 30 | private ArrayList initialOutfit; |
31 | private ArrayList agentInventory; | 31 | private ArrayList agentInventory; |
32 | 32 | ||
33 | private UserInfo userProfile; | 33 | private UserInfo userProfile; |
34 | 34 | ||
35 | private LLUUID agentID; | 35 | private LLUUID agentID; |
36 | private LLUUID sessionID; | 36 | private LLUUID sessionID; |
37 | private LLUUID secureSessionID; | 37 | private LLUUID secureSessionID; |
38 | 38 | ||
39 | // Login Flags | 39 | // Login Flags |
40 | private string dst; | 40 | private string dst; |
41 | private string stipendSinceLogin; | 41 | private string stipendSinceLogin; |
42 | private string gendered; | 42 | private string gendered; |
43 | private string everLoggedIn; | 43 | private string everLoggedIn; |
44 | private string login; | 44 | private string login; |
45 | private int simPort; | 45 | private int simPort; |
46 | private string simAddress; | 46 | private string simAddress; |
47 | private string agentAccess; | 47 | private string agentAccess; |
48 | private Int32 circuitCode; | 48 | private Int32 circuitCode; |
49 | private uint regionX; | 49 | private uint regionX; |
50 | private uint regionY; | 50 | private uint regionY; |
51 | 51 | ||
52 | // Login | 52 | // Login |
53 | private string firstname; | 53 | private string firstname; |
54 | private string lastname; | 54 | private string lastname; |
55 | 55 | ||
56 | // Global Textures | 56 | // Global Textures |
57 | private string sunTexture; | 57 | private string sunTexture; |
58 | private string cloudTexture; | 58 | private string cloudTexture; |
59 | private string moonTexture; | 59 | private string moonTexture; |
60 | 60 | ||
61 | // Error Flags | 61 | // Error Flags |
62 | private string errorReason; | 62 | private string errorReason; |
63 | private string errorMessage; | 63 | private string errorMessage; |
64 | 64 | ||
65 | // Response | 65 | // Response |
66 | private XmlRpcResponse xmlRpcResponse; | 66 | private XmlRpcResponse xmlRpcResponse; |
67 | private XmlRpcResponse defaultXmlRpcResponse; | 67 | private XmlRpcResponse defaultXmlRpcResponse; |
68 | 68 | ||
69 | private string welcomeMessage; | 69 | private string welcomeMessage; |
70 | private string startLocation; | 70 | private string startLocation; |
71 | private string allowFirstLife; | 71 | private string allowFirstLife; |
72 | private string home; | 72 | private string home; |
73 | private string seedCapability; | 73 | private string seedCapability; |
74 | private string lookAt; | 74 | private string lookAt; |
75 | 75 | ||
76 | public LoginResponse() | 76 | public LoginResponse() |
77 | { | 77 | { |
78 | this.loginFlags = new ArrayList(); | 78 | this.loginFlags = new ArrayList(); |
79 | this.globalTextures = new ArrayList(); | 79 | this.globalTextures = new ArrayList(); |
80 | this.eventCategories = new ArrayList(); | 80 | this.eventCategories = new ArrayList(); |
81 | this.uiConfig = new ArrayList(); | 81 | this.uiConfig = new ArrayList(); |
82 | this.classifiedCategories = new ArrayList(); | 82 | this.classifiedCategories = new ArrayList(); |
83 | 83 | ||
84 | this.loginError = new Hashtable(); | 84 | this.loginError = new Hashtable(); |
85 | this.eventCategoriesHash = new Hashtable(); | 85 | this.eventCategoriesHash = new Hashtable(); |
86 | this.classifiedCategoriesHash = new Hashtable(); | 86 | this.classifiedCategoriesHash = new Hashtable(); |
87 | this.uiConfigHash = new Hashtable(); | 87 | this.uiConfigHash = new Hashtable(); |
88 | 88 | ||
89 | this.defaultXmlRpcResponse = new XmlRpcResponse(); | 89 | this.defaultXmlRpcResponse = new XmlRpcResponse(); |
90 | this.userProfile = new UserInfo(); | 90 | this.userProfile = new UserInfo(); |
91 | this.inventoryRoot = new ArrayList(); | 91 | this.inventoryRoot = new ArrayList(); |
92 | this.initialOutfit = new ArrayList(); | 92 | this.initialOutfit = new ArrayList(); |
93 | this.agentInventory = new ArrayList(); | 93 | this.agentInventory = new ArrayList(); |
94 | 94 | ||
95 | this.xmlRpcResponse = new XmlRpcResponse(); | 95 | this.xmlRpcResponse = new XmlRpcResponse(); |
96 | this.defaultXmlRpcResponse = new XmlRpcResponse(); | 96 | this.defaultXmlRpcResponse = new XmlRpcResponse(); |
97 | 97 | ||
98 | this.SetDefaultValues(); | 98 | this.SetDefaultValues(); |
99 | } // LoginServer | 99 | } // LoginServer |
100 | 100 | ||
101 | public void SetDefaultValues() | 101 | public void SetDefaultValues() |
102 | { | 102 | { |
103 | this.DST = "N"; | 103 | this.DST = "N"; |
104 | this.StipendSinceLogin = "N"; | 104 | this.StipendSinceLogin = "N"; |
105 | this.Gendered = "Y"; | 105 | this.Gendered = "Y"; |
106 | this.EverLoggedIn = "Y"; | 106 | this.EverLoggedIn = "Y"; |
107 | this.login = "false"; | 107 | this.login = "false"; |
108 | this.firstname = "Test"; | 108 | this.firstname = "Test"; |
109 | this.lastname = "User"; | 109 | this.lastname = "User"; |
110 | this.agentAccess = "M"; | 110 | this.agentAccess = "M"; |
111 | this.startLocation = "last"; | 111 | this.startLocation = "last"; |
112 | this.allowFirstLife = "Y"; | 112 | this.allowFirstLife = "Y"; |
113 | 113 | ||
114 | this.SunTexture = "cce0f112-878f-4586-a2e2-a8f104bba271"; | 114 | this.SunTexture = "cce0f112-878f-4586-a2e2-a8f104bba271"; |
115 | this.CloudTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; | 115 | this.CloudTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; |
116 | this.MoonTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; | 116 | this.MoonTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; |
117 | 117 | ||
118 | this.ErrorMessage = "You have entered an invalid name/password combination. Check Caps/lock."; | 118 | this.ErrorMessage = "You have entered an invalid name/password combination. Check Caps/lock."; |
119 | this.ErrorReason = "key"; | 119 | this.ErrorReason = "key"; |
120 | this.welcomeMessage = "Welcome to OpenSim!"; | 120 | this.welcomeMessage = "Welcome to OpenSim!"; |
121 | this.seedCapability = ""; | 121 | this.seedCapability = ""; |
122 | this.home = "{'region_handle':[r" + (1000 * 256).ToString() + ",r" + (1000 * 256).ToString() + "], 'position':[r" + this.userProfile.homepos.X.ToString() + ",r" + this.userProfile.homepos.Y.ToString() + ",r" + this.userProfile.homepos.Z.ToString() + "], 'look_at':[r" + this.userProfile.homelookat.X.ToString() + ",r" + this.userProfile.homelookat.Y.ToString() + ",r" + this.userProfile.homelookat.Z.ToString() + "]}"; | 122 | this.home = "{'region_handle':[r" + (1000 * 256).ToString() + ",r" + (1000 * 256).ToString() + "], 'position':[r" + this.userProfile.homepos.X.ToString() + ",r" + this.userProfile.homepos.Y.ToString() + ",r" + this.userProfile.homepos.Z.ToString() + "], 'look_at':[r" + this.userProfile.homelookat.X.ToString() + ",r" + this.userProfile.homelookat.Y.ToString() + ",r" + this.userProfile.homelookat.Z.ToString() + "]}"; |
123 | this.lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; | 123 | this.lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; |
124 | this.RegionX = (uint)255232; | 124 | this.RegionX = (uint)255232; |
125 | this.RegionY = (uint)254976; | 125 | this.RegionY = (uint)254976; |
126 | 126 | ||
127 | // Classifieds; | 127 | // Classifieds; |
128 | this.AddClassifiedCategory((Int32)1, "Shopping"); | 128 | this.AddClassifiedCategory((Int32)1, "Shopping"); |
129 | this.AddClassifiedCategory((Int32)2, "Land Rental"); | 129 | this.AddClassifiedCategory((Int32)2, "Land Rental"); |
130 | this.AddClassifiedCategory((Int32)3, "Property Rental"); | 130 | this.AddClassifiedCategory((Int32)3, "Property Rental"); |
131 | this.AddClassifiedCategory((Int32)4, "Special Attraction"); | 131 | this.AddClassifiedCategory((Int32)4, "Special Attraction"); |
132 | this.AddClassifiedCategory((Int32)5, "New Products"); | 132 | this.AddClassifiedCategory((Int32)5, "New Products"); |
133 | this.AddClassifiedCategory((Int32)6, "Employment"); | 133 | this.AddClassifiedCategory((Int32)6, "Employment"); |
134 | this.AddClassifiedCategory((Int32)7, "Wanted"); | 134 | this.AddClassifiedCategory((Int32)7, "Wanted"); |
135 | this.AddClassifiedCategory((Int32)8, "Service"); | 135 | this.AddClassifiedCategory((Int32)8, "Service"); |
136 | this.AddClassifiedCategory((Int32)9, "Personal"); | 136 | this.AddClassifiedCategory((Int32)9, "Personal"); |
137 | 137 | ||
138 | 138 | ||
139 | this.SessionID = LLUUID.Random(); | 139 | this.SessionID = LLUUID.Random(); |
140 | this.SecureSessionID = LLUUID.Random(); | 140 | this.SecureSessionID = LLUUID.Random(); |
141 | this.AgentID = LLUUID.Random(); | 141 | this.AgentID = LLUUID.Random(); |
142 | 142 | ||
143 | Hashtable InitialOutfitHash = new Hashtable(); | 143 | Hashtable InitialOutfitHash = new Hashtable(); |
144 | InitialOutfitHash["folder_name"] = "Nightclub Female"; | 144 | InitialOutfitHash["folder_name"] = "Nightclub Female"; |
145 | InitialOutfitHash["gender"] = "female"; | 145 | InitialOutfitHash["gender"] = "female"; |
146 | this.initialOutfit.Add(InitialOutfitHash); | 146 | this.initialOutfit.Add(InitialOutfitHash); |
147 | 147 | ||
148 | 148 | ||
149 | } // SetDefaultValues | 149 | } // SetDefaultValues |
150 | 150 | ||
151 | #region Login Failure Methods | 151 | #region Login Failure Methods |
152 | public XmlRpcResponse GenerateFailureResponse(string reason, string message, string login) | 152 | public XmlRpcResponse GenerateFailureResponse(string reason, string message, string login) |
153 | { | 153 | { |
154 | // Overwrite any default values; | 154 | // Overwrite any default values; |
155 | this.xmlRpcResponse = new XmlRpcResponse(); | 155 | this.xmlRpcResponse = new XmlRpcResponse(); |
156 | 156 | ||
157 | // Ensure Login Failed message/reason; | 157 | // Ensure Login Failed message/reason; |
158 | this.ErrorMessage = message; | 158 | this.ErrorMessage = message; |
159 | this.ErrorReason = reason; | 159 | this.ErrorReason = reason; |
160 | 160 | ||
161 | this.loginError["reason"] = this.ErrorReason; | 161 | this.loginError["reason"] = this.ErrorReason; |
162 | this.loginError["message"] = this.ErrorMessage; | 162 | this.loginError["message"] = this.ErrorMessage; |
163 | this.loginError["login"] = login; | 163 | this.loginError["login"] = login; |
164 | this.xmlRpcResponse.Value = this.loginError; | 164 | this.xmlRpcResponse.Value = this.loginError; |
165 | return (this.xmlRpcResponse); | 165 | return (this.xmlRpcResponse); |
166 | } // GenerateResponse | 166 | } // GenerateResponse |
167 | 167 | ||
168 | public XmlRpcResponse CreateFailedResponse() | 168 | public XmlRpcResponse CreateFailedResponse() |
169 | { | 169 | { |
170 | return (this.CreateLoginFailedResponse()); | 170 | return (this.CreateLoginFailedResponse()); |
171 | } // CreateErrorConnectingToGridResponse() | 171 | } // CreateErrorConnectingToGridResponse() |
172 | 172 | ||
173 | public XmlRpcResponse CreateLoginFailedResponse() | 173 | public XmlRpcResponse CreateLoginFailedResponse() |
174 | { | 174 | { |
175 | return (this.GenerateFailureResponse("key", "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.", "false")); | 175 | return (this.GenerateFailureResponse("key", "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.", "false")); |
176 | } // LoginFailedResponse | 176 | } // LoginFailedResponse |
177 | 177 | ||
178 | public XmlRpcResponse CreateAlreadyLoggedInResponse() | 178 | public XmlRpcResponse CreateAlreadyLoggedInResponse() |
179 | { | 179 | { |
180 | return (this.GenerateFailureResponse("presence", "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner", "false")); | 180 | return (this.GenerateFailureResponse("presence", "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner", "false")); |
181 | } // CreateAlreadyLoggedInResponse() | 181 | } // CreateAlreadyLoggedInResponse() |
182 | 182 | ||
183 | public XmlRpcResponse CreateDeadRegionResponse() | 183 | public XmlRpcResponse CreateDeadRegionResponse() |
184 | { | 184 | { |
185 | return (this.GenerateFailureResponse("key", "The region you are attempting to log into is not responding. Please select another region and try again.", "false")); | 185 | return (this.GenerateFailureResponse("key", "The region you are attempting to log into is not responding. Please select another region and try again.", "false")); |
186 | } | 186 | } |
187 | 187 | ||
188 | public XmlRpcResponse CreateGridErrorResponse() | 188 | public XmlRpcResponse CreateGridErrorResponse() |
189 | { | 189 | { |
190 | return (this.GenerateFailureResponse("key", "Error connecting to grid. Could not percieve credentials from login XML.", "false")); | 190 | return (this.GenerateFailureResponse("key", "Error connecting to grid. Could not percieve credentials from login XML.", "false")); |
191 | } | 191 | } |
192 | 192 | ||
193 | #endregion | 193 | #endregion |
194 | 194 | ||
195 | public XmlRpcResponse ToXmlRpcResponse() | 195 | public XmlRpcResponse ToXmlRpcResponse() |
196 | { | 196 | { |
197 | try | 197 | try |
198 | { | 198 | { |
199 | 199 | ||
200 | Hashtable responseData = new Hashtable(); | 200 | Hashtable responseData = new Hashtable(); |
201 | 201 | ||
202 | this.loginFlagsHash = new Hashtable(); | 202 | this.loginFlagsHash = new Hashtable(); |
203 | this.loginFlagsHash["daylight_savings"] = this.DST; | 203 | this.loginFlagsHash["daylight_savings"] = this.DST; |
204 | this.loginFlagsHash["stipend_since_login"] = this.StipendSinceLogin; | 204 | this.loginFlagsHash["stipend_since_login"] = this.StipendSinceLogin; |
205 | this.loginFlagsHash["gendered"] = this.Gendered; | 205 | this.loginFlagsHash["gendered"] = this.Gendered; |
206 | this.loginFlagsHash["ever_logged_in"] = this.EverLoggedIn; | 206 | this.loginFlagsHash["ever_logged_in"] = this.EverLoggedIn; |
207 | this.loginFlags.Add(this.loginFlagsHash); | 207 | this.loginFlags.Add(this.loginFlagsHash); |
208 | 208 | ||
209 | responseData["first_name"] = this.Firstname; | 209 | responseData["first_name"] = this.Firstname; |
210 | responseData["last_name"] = this.Lastname; | 210 | responseData["last_name"] = this.Lastname; |
211 | responseData["agent_access"] = this.agentAccess; | 211 | responseData["agent_access"] = this.agentAccess; |
212 | 212 | ||
213 | this.globalTexturesHash = new Hashtable(); | 213 | this.globalTexturesHash = new Hashtable(); |
214 | this.globalTexturesHash["sun_texture_id"] = this.SunTexture; | 214 | this.globalTexturesHash["sun_texture_id"] = this.SunTexture; |
215 | this.globalTexturesHash["cloud_texture_id"] = this.CloudTexture; | 215 | this.globalTexturesHash["cloud_texture_id"] = this.CloudTexture; |
216 | this.globalTexturesHash["moon_texture_id"] = this.MoonTexture; | 216 | this.globalTexturesHash["moon_texture_id"] = this.MoonTexture; |
217 | this.globalTextures.Add(this.globalTexturesHash); | 217 | this.globalTextures.Add(this.globalTexturesHash); |
218 | this.eventCategories.Add(this.eventCategoriesHash); | 218 | this.eventCategories.Add(this.eventCategoriesHash); |
219 | 219 | ||
220 | this.AddToUIConfig("allow_first_life", this.allowFirstLife); | 220 | this.AddToUIConfig("allow_first_life", this.allowFirstLife); |
221 | this.uiConfig.Add(this.uiConfigHash); | 221 | this.uiConfig.Add(this.uiConfigHash); |
222 | 222 | ||
223 | responseData["sim_port"] =(Int32) this.SimPort; | 223 | responseData["sim_port"] =(Int32) this.SimPort; |
224 | responseData["sim_ip"] = this.SimAddress; | 224 | responseData["sim_ip"] = this.SimAddress; |
225 | 225 | ||
226 | MainLog.Instance.Warn("SIM IP: " + responseData["sim_ip"] + "; SIM PORT: " + responseData["sim_port"]); | 226 | MainLog.Instance.Warn("SIM IP: " + responseData["sim_ip"] + "; SIM PORT: " + responseData["sim_port"]); |
227 | 227 | ||
228 | responseData["agent_id"] = this.AgentID.ToStringHyphenated(); | 228 | responseData["agent_id"] = this.AgentID.ToStringHyphenated(); |
229 | responseData["session_id"] = this.SessionID.ToStringHyphenated(); | 229 | responseData["session_id"] = this.SessionID.ToStringHyphenated(); |
230 | responseData["secure_session_id"] = this.SecureSessionID.ToStringHyphenated(); | 230 | responseData["secure_session_id"] = this.SecureSessionID.ToStringHyphenated(); |
231 | responseData["circuit_code"] = this.CircuitCode; | 231 | responseData["circuit_code"] = this.CircuitCode; |
232 | responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; | 232 | responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; |
233 | responseData["login-flags"] = this.loginFlags; | 233 | responseData["login-flags"] = this.loginFlags; |
234 | responseData["global-textures"] = this.globalTextures; | 234 | responseData["global-textures"] = this.globalTextures; |
235 | responseData["seed_capability"] = this.seedCapability; | 235 | responseData["seed_capability"] = this.seedCapability; |
236 | 236 | ||
237 | responseData["event_categories"] = this.eventCategories; | 237 | responseData["event_categories"] = this.eventCategories; |
238 | responseData["event_notifications"] = new ArrayList(); // todo | 238 | responseData["event_notifications"] = new ArrayList(); // todo |
239 | responseData["classified_categories"] = this.classifiedCategories; | 239 | responseData["classified_categories"] = this.classifiedCategories; |
240 | responseData["ui-config"] = this.uiConfig; | 240 | responseData["ui-config"] = this.uiConfig; |
241 | 241 | ||
242 | responseData["inventory-skeleton"] = this.agentInventory; | 242 | responseData["inventory-skeleton"] = this.agentInventory; |
243 | responseData["inventory-skel-lib"] = new ArrayList(); // todo | 243 | responseData["inventory-skel-lib"] = new ArrayList(); // todo |
244 | responseData["inventory-root"] = this.inventoryRoot; | 244 | responseData["inventory-root"] = this.inventoryRoot; |
245 | responseData["gestures"] = new ArrayList(); // todo | 245 | responseData["gestures"] = new ArrayList(); // todo |
246 | responseData["inventory-lib-owner"] = new ArrayList(); // todo | 246 | responseData["inventory-lib-owner"] = new ArrayList(); // todo |
247 | responseData["initial-outfit"] = this.initialOutfit; | 247 | responseData["initial-outfit"] = this.initialOutfit; |
248 | responseData["start_location"] = this.startLocation; | 248 | responseData["start_location"] = this.startLocation; |
249 | responseData["seed_capability"] = this.seedCapability; | 249 | responseData["seed_capability"] = this.seedCapability; |
250 | responseData["home"] = this.home; | 250 | responseData["home"] = this.home; |
251 | responseData["look_at"] = this.lookAt; | 251 | responseData["look_at"] = this.lookAt; |
252 | responseData["message"] = this.welcomeMessage; | 252 | responseData["message"] = this.welcomeMessage; |
253 | responseData["region_x"] = (Int32)this.RegionX * 256; | 253 | responseData["region_x"] = (Int32)this.RegionX * 256; |
254 | responseData["region_y"] = (Int32)this.RegionY * 256; | 254 | responseData["region_y"] = (Int32)this.RegionY * 256; |
255 | 255 | ||
256 | //responseData["inventory-lib-root"] = new ArrayList(); // todo | 256 | //responseData["inventory-lib-root"] = new ArrayList(); // todo |
257 | //responseData["buddy-list"] = new ArrayList(); // todo | 257 | //responseData["buddy-list"] = new ArrayList(); // todo |
258 | 258 | ||
259 | responseData["login"] = "true"; | 259 | responseData["login"] = "true"; |
260 | this.xmlRpcResponse.Value = responseData; | 260 | this.xmlRpcResponse.Value = responseData; |
261 | 261 | ||
262 | return (this.xmlRpcResponse); | 262 | return (this.xmlRpcResponse); |
263 | } | 263 | } |
264 | catch (Exception e) | 264 | catch (Exception e) |
265 | { | 265 | { |
266 | MainLog.Instance.WriteLine( | 266 | MainLog.Instance.WriteLine( |
267 | LogPriority.LOW, | 267 | LogPriority.LOW, |
268 | "LoginResponse: Error creating XML-RPC Response: " + e.Message | 268 | "LoginResponse: Error creating XML-RPC Response: " + e.Message |
269 | ); | 269 | ); |
270 | return (this.GenerateFailureResponse("Internal Error", "Error generating Login Response", "false")); | 270 | return (this.GenerateFailureResponse("Internal Error", "Error generating Login Response", "false")); |
271 | 271 | ||
272 | } | 272 | } |
273 | 273 | ||
274 | } // ToXmlRpcResponse | 274 | } // ToXmlRpcResponse |
275 | 275 | ||
276 | public void SetEventCategories(string category, string value) | 276 | public void SetEventCategories(string category, string value) |
277 | { | 277 | { |
278 | this.eventCategoriesHash[category] = value; | 278 | this.eventCategoriesHash[category] = value; |
279 | } // SetEventCategories | 279 | } // SetEventCategories |
280 | 280 | ||
281 | public void AddToUIConfig(string itemName, string item) | 281 | public void AddToUIConfig(string itemName, string item) |
282 | { | 282 | { |
283 | this.uiConfigHash[itemName] = item; | 283 | this.uiConfigHash[itemName] = item; |
284 | } // SetUIConfig | 284 | } // SetUIConfig |
285 | 285 | ||
286 | public void AddClassifiedCategory(Int32 ID, string categoryName) | 286 | public void AddClassifiedCategory(Int32 ID, string categoryName) |
287 | { | 287 | { |
288 | this.classifiedCategoriesHash["category_name"] = categoryName; | 288 | this.classifiedCategoriesHash["category_name"] = categoryName; |
289 | this.classifiedCategoriesHash["category_id"] = ID; | 289 | this.classifiedCategoriesHash["category_id"] = ID; |
290 | this.classifiedCategories.Add(this.classifiedCategoriesHash); | 290 | this.classifiedCategories.Add(this.classifiedCategoriesHash); |
291 | // this.classifiedCategoriesHash.Clear(); | 291 | // this.classifiedCategoriesHash.Clear(); |
292 | } // SetClassifiedCategory | 292 | } // SetClassifiedCategory |
293 | 293 | ||
294 | #region Properties | 294 | #region Properties |
295 | public string Login | 295 | public string Login |
296 | { | 296 | { |
297 | get | 297 | get |
298 | { | 298 | { |
299 | return this.login; | 299 | return this.login; |
300 | } | 300 | } |
301 | set | 301 | set |
302 | { | 302 | { |
303 | this.login = value; | 303 | this.login = value; |
304 | } | 304 | } |
305 | } // Login | 305 | } // Login |
306 | 306 | ||
307 | public string DST | 307 | public string DST |
308 | { | 308 | { |
309 | get | 309 | get |
310 | { | 310 | { |
311 | return this.dst; | 311 | return this.dst; |
312 | } | 312 | } |
313 | set | 313 | set |
314 | { | 314 | { |
315 | this.dst = value; | 315 | this.dst = value; |
316 | } | 316 | } |
317 | } // DST | 317 | } // DST |
318 | 318 | ||
319 | public string StipendSinceLogin | 319 | public string StipendSinceLogin |
320 | { | 320 | { |
321 | get | 321 | get |
322 | { | 322 | { |
323 | return this.stipendSinceLogin; | 323 | return this.stipendSinceLogin; |
324 | } | 324 | } |
325 | set | 325 | set |
326 | { | 326 | { |
327 | this.stipendSinceLogin = value; | 327 | this.stipendSinceLogin = value; |
328 | } | 328 | } |
329 | } // StipendSinceLogin | 329 | } // StipendSinceLogin |
330 | 330 | ||
331 | public string Gendered | 331 | public string Gendered |
332 | { | 332 | { |
333 | get | 333 | get |
334 | { | 334 | { |
335 | return this.gendered; | 335 | return this.gendered; |
336 | } | 336 | } |
337 | set | 337 | set |
338 | { | 338 | { |
339 | this.gendered = value; | 339 | this.gendered = value; |
340 | } | 340 | } |
341 | } // Gendered | 341 | } // Gendered |
342 | 342 | ||
343 | public string EverLoggedIn | 343 | public string EverLoggedIn |
344 | { | 344 | { |
345 | get | 345 | get |
346 | { | 346 | { |
347 | return this.everLoggedIn; | 347 | return this.everLoggedIn; |
348 | } | 348 | } |
349 | set | 349 | set |
350 | { | 350 | { |
351 | this.everLoggedIn = value; | 351 | this.everLoggedIn = value; |
352 | } | 352 | } |
353 | } // EverLoggedIn | 353 | } // EverLoggedIn |
354 | 354 | ||
355 | public int SimPort | 355 | public int SimPort |
356 | { | 356 | { |
357 | get | 357 | get |
358 | { | 358 | { |
359 | return this.simPort; | 359 | return this.simPort; |
360 | } | 360 | } |
361 | set | 361 | set |
362 | { | 362 | { |
363 | this.simPort = value; | 363 | this.simPort = value; |
364 | } | 364 | } |
365 | } // SimPort | 365 | } // SimPort |
366 | 366 | ||
367 | public string SimAddress | 367 | public string SimAddress |
368 | { | 368 | { |
369 | get | 369 | get |
370 | { | 370 | { |
371 | return this.simAddress; | 371 | return this.simAddress; |
372 | } | 372 | } |
373 | set | 373 | set |
374 | { | 374 | { |
375 | this.simAddress = value; | 375 | this.simAddress = value; |
376 | } | 376 | } |
377 | } // SimAddress | 377 | } // SimAddress |
378 | 378 | ||
379 | public LLUUID AgentID | 379 | public LLUUID AgentID |
380 | { | 380 | { |
381 | get | 381 | get |
382 | { | 382 | { |
383 | return this.agentID; | 383 | return this.agentID; |
384 | } | 384 | } |
385 | set | 385 | set |
386 | { | 386 | { |
387 | this.agentID = value; | 387 | this.agentID = value; |
388 | } | 388 | } |
389 | } // AgentID | 389 | } // AgentID |
390 | 390 | ||
391 | public LLUUID SessionID | 391 | public LLUUID SessionID |
392 | { | 392 | { |
393 | get | 393 | get |
394 | { | 394 | { |
395 | return this.sessionID; | 395 | return this.sessionID; |
396 | } | 396 | } |
397 | set | 397 | set |
398 | { | 398 | { |
399 | this.sessionID = value; | 399 | this.sessionID = value; |
400 | } | 400 | } |
401 | } // SessionID | 401 | } // SessionID |
402 | 402 | ||
403 | public LLUUID SecureSessionID | 403 | public LLUUID SecureSessionID |
404 | { | 404 | { |
405 | get | 405 | get |
406 | { | 406 | { |
407 | return this.secureSessionID; | 407 | return this.secureSessionID; |
408 | } | 408 | } |
409 | set | 409 | set |
410 | { | 410 | { |
411 | this.secureSessionID = value; | 411 | this.secureSessionID = value; |
412 | } | 412 | } |
413 | } // SecureSessionID | 413 | } // SecureSessionID |
414 | 414 | ||
415 | public Int32 CircuitCode | 415 | public Int32 CircuitCode |
416 | { | 416 | { |
417 | get | 417 | get |
418 | { | 418 | { |
419 | return this.circuitCode; | 419 | return this.circuitCode; |
420 | } | 420 | } |
421 | set | 421 | set |
422 | { | 422 | { |
423 | this.circuitCode = value; | 423 | this.circuitCode = value; |
424 | } | 424 | } |
425 | } // CircuitCode | 425 | } // CircuitCode |
426 | 426 | ||
427 | public uint RegionX | 427 | public uint RegionX |
428 | { | 428 | { |
429 | get | 429 | get |
430 | { | 430 | { |
431 | return this.regionX; | 431 | return this.regionX; |
432 | } | 432 | } |
433 | set | 433 | set |
434 | { | 434 | { |
435 | this.regionX = value; | 435 | this.regionX = value; |
436 | } | 436 | } |
437 | } // RegionX | 437 | } // RegionX |
438 | 438 | ||
439 | public uint RegionY | 439 | public uint RegionY |
440 | { | 440 | { |
441 | get | 441 | get |
442 | { | 442 | { |
443 | return this.regionY; | 443 | return this.regionY; |
444 | } | 444 | } |
445 | set | 445 | set |
446 | { | 446 | { |
447 | this.regionY = value; | 447 | this.regionY = value; |
448 | } | 448 | } |
449 | } // RegionY | 449 | } // RegionY |
450 | 450 | ||
451 | public string SunTexture | 451 | public string SunTexture |
452 | { | 452 | { |
453 | get | 453 | get |
454 | { | 454 | { |
455 | return this.sunTexture; | 455 | return this.sunTexture; |
456 | } | 456 | } |
457 | set | 457 | set |
458 | { | 458 | { |
459 | this.sunTexture = value; | 459 | this.sunTexture = value; |
460 | } | 460 | } |
461 | } // SunTexture | 461 | } // SunTexture |
462 | 462 | ||
463 | public string CloudTexture | 463 | public string CloudTexture |
464 | { | 464 | { |
465 | get | 465 | get |
466 | { | 466 | { |
467 | return this.cloudTexture; | 467 | return this.cloudTexture; |
468 | } | 468 | } |
469 | set | 469 | set |
470 | { | 470 | { |
471 | this.cloudTexture = value; | 471 | this.cloudTexture = value; |
472 | } | 472 | } |
473 | } // CloudTexture | 473 | } // CloudTexture |
474 | 474 | ||
475 | public string MoonTexture | 475 | public string MoonTexture |
476 | { | 476 | { |
477 | get | 477 | get |
478 | { | 478 | { |
479 | return this.moonTexture; | 479 | return this.moonTexture; |
480 | } | 480 | } |
481 | set | 481 | set |
482 | { | 482 | { |
483 | this.moonTexture = value; | 483 | this.moonTexture = value; |
484 | } | 484 | } |
485 | } // MoonTexture | 485 | } // MoonTexture |
486 | 486 | ||
487 | public string Firstname | 487 | public string Firstname |
488 | { | 488 | { |
489 | get | 489 | get |
490 | { | 490 | { |
491 | return this.firstname; | 491 | return this.firstname; |
492 | } | 492 | } |
493 | set | 493 | set |
494 | { | 494 | { |
495 | this.firstname = value; | 495 | this.firstname = value; |
496 | } | 496 | } |
497 | } // Firstname | 497 | } // Firstname |
498 | 498 | ||
499 | public string Lastname | 499 | public string Lastname |
500 | { | 500 | { |
501 | get | 501 | get |
502 | { | 502 | { |
503 | return this.lastname; | 503 | return this.lastname; |
504 | } | 504 | } |
505 | set | 505 | set |
506 | { | 506 | { |
507 | this.lastname = value; | 507 | this.lastname = value; |
508 | } | 508 | } |
509 | } // Lastname | 509 | } // Lastname |
510 | 510 | ||
511 | public string AgentAccess | 511 | public string AgentAccess |
512 | { | 512 | { |
513 | get | 513 | get |
514 | { | 514 | { |
515 | return this.agentAccess; | 515 | return this.agentAccess; |
516 | } | 516 | } |
517 | set | 517 | set |
518 | { | 518 | { |
519 | this.agentAccess = value; | 519 | this.agentAccess = value; |
520 | } | 520 | } |
521 | } | 521 | } |
522 | 522 | ||
523 | public string StartLocation | 523 | public string StartLocation |
524 | { | 524 | { |
525 | get | 525 | get |
526 | { | 526 | { |
527 | return this.startLocation; | 527 | return this.startLocation; |
528 | } | 528 | } |
529 | set | 529 | set |
530 | { | 530 | { |
531 | this.startLocation = value; | 531 | this.startLocation = value; |
532 | } | 532 | } |
533 | } // StartLocation | 533 | } // StartLocation |
534 | 534 | ||
535 | public string LookAt | 535 | public string LookAt |
536 | { | 536 | { |
537 | get | 537 | get |
538 | { | 538 | { |
539 | return this.lookAt; | 539 | return this.lookAt; |
540 | } | 540 | } |
541 | set | 541 | set |
542 | { | 542 | { |
543 | this.lookAt = value; | 543 | this.lookAt = value; |
544 | } | 544 | } |
545 | } | 545 | } |
546 | 546 | ||
547 | public string SeedCapability | 547 | public string SeedCapability |
548 | { | 548 | { |
549 | get | 549 | get |
550 | { | 550 | { |
551 | return this.seedCapability; | 551 | return this.seedCapability; |
552 | } | 552 | } |
553 | set | 553 | set |
554 | { | 554 | { |
555 | this.seedCapability = value; | 555 | this.seedCapability = value; |
556 | } | 556 | } |
557 | } // SeedCapability | 557 | } // SeedCapability |
558 | 558 | ||
559 | public string ErrorReason | 559 | public string ErrorReason |
560 | { | 560 | { |
561 | get | 561 | get |
562 | { | 562 | { |
563 | return this.errorReason; | 563 | return this.errorReason; |
564 | } | 564 | } |
565 | set | 565 | set |
566 | { | 566 | { |
567 | this.errorReason = value; | 567 | this.errorReason = value; |
568 | } | 568 | } |
569 | } // ErrorReason | 569 | } // ErrorReason |
570 | 570 | ||
571 | public string ErrorMessage | 571 | public string ErrorMessage |
572 | { | 572 | { |
573 | get | 573 | get |
574 | { | 574 | { |
575 | return this.errorMessage; | 575 | return this.errorMessage; |
576 | } | 576 | } |
577 | set | 577 | set |
578 | { | 578 | { |
579 | this.errorMessage = value; | 579 | this.errorMessage = value; |
580 | } | 580 | } |
581 | } // ErrorMessage | 581 | } // ErrorMessage |
582 | 582 | ||
583 | public ArrayList InventoryRoot | 583 | public ArrayList InventoryRoot |
584 | { | 584 | { |
585 | get | 585 | get |
586 | { | 586 | { |
587 | return this.inventoryRoot; | 587 | return this.inventoryRoot; |
588 | } | 588 | } |
589 | set | 589 | set |
590 | { | 590 | { |
591 | this.inventoryRoot = value; | 591 | this.inventoryRoot = value; |
592 | } | 592 | } |
593 | } | 593 | } |
594 | 594 | ||
595 | public ArrayList InventorySkeleton | 595 | public ArrayList InventorySkeleton |
596 | { | 596 | { |
597 | get | 597 | get |
598 | { | 598 | { |
599 | return this.agentInventory; | 599 | return this.agentInventory; |
600 | } | 600 | } |
601 | set | 601 | set |
602 | { | 602 | { |
603 | this.agentInventory = value; | 603 | this.agentInventory = value; |
604 | } | 604 | } |
605 | } | 605 | } |
606 | 606 | ||
607 | public string Home | 607 | public string Home |
608 | { | 608 | { |
609 | get | 609 | get |
610 | { | 610 | { |
611 | return this.home; | 611 | return this.home; |
612 | } | 612 | } |
613 | set | 613 | set |
614 | { | 614 | { |
615 | this.home = value; | 615 | this.home = value; |
616 | } | 616 | } |
617 | } | 617 | } |
618 | 618 | ||
619 | public string Message | 619 | public string Message |
620 | { | 620 | { |
621 | get | 621 | get |
622 | { | 622 | { |
623 | return this.welcomeMessage; | 623 | return this.welcomeMessage; |
624 | } | 624 | } |
625 | set | 625 | set |
626 | { | 626 | { |
627 | this.welcomeMessage = value; | 627 | this.welcomeMessage = value; |
628 | } | 628 | } |
629 | } | 629 | } |
630 | #endregion | 630 | #endregion |
631 | 631 | ||
632 | 632 | ||
633 | public class UserInfo | 633 | public class UserInfo |
634 | { | 634 | { |
635 | public string firstname; | 635 | public string firstname; |
636 | public string lastname; | 636 | public string lastname; |
637 | public ulong homeregionhandle; | 637 | public ulong homeregionhandle; |
638 | public LLVector3 homepos; | 638 | public LLVector3 homepos; |
639 | public LLVector3 homelookat; | 639 | public LLVector3 homelookat; |
640 | } | 640 | } |
641 | } | 641 | } |
642 | } | 642 | } |
643 | 643 | ||