aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/LoginResponse.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-17 21:00:34 +0000
committerJustin Clarke Casey2008-11-17 21:00:34 +0000
commitc25a0ea7923aa390d30b8eebdbca4e599edf9b0d (patch)
tree775133790681153be9edc6d640162271750a1fd0 /OpenSim/Framework/Communications/LoginResponse.cs
parent* minor: add interface version to 'show version' command output (diff)
downloadopensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.zip
opensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.gz
opensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.bz2
opensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.xz
* Update libOMV to r2359. This is necessary for the progressive texture patch
* Update libopenjpeg as well for this patch. * Appears to be okay on a very short sniff test * Source code will be placed in opensim-libs shortly
Diffstat (limited to 'OpenSim/Framework/Communications/LoginResponse.cs')
-rw-r--r--OpenSim/Framework/Communications/LoginResponse.cs126
1 files changed, 63 insertions, 63 deletions
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs
index b2565b1..867e9e6 100644
--- a/OpenSim/Framework/Communications/LoginResponse.cs
+++ b/OpenSim/Framework/Communications/LoginResponse.cs
@@ -201,17 +201,17 @@ namespace OpenSim.Framework.Communications
201 return (xmlRpcResponse); 201 return (xmlRpcResponse);
202 } 202 }
203 203
204 public LLSD GenerateFailureResponseLLSD(string reason, string message, string login) 204 public OSD GenerateFailureResponseLLSD(string reason, string message, string login)
205 { 205 {
206 LLSDMap map = new LLSDMap(); 206 OSDMap map = new OSDMap();
207 207
208 // Ensure Login Failed message/reason; 208 // Ensure Login Failed message/reason;
209 ErrorMessage = message; 209 ErrorMessage = message;
210 ErrorReason = reason; 210 ErrorReason = reason;
211 211
212 map["reason"] = LLSD.FromString(ErrorReason); 212 map["reason"] = OSD.FromString(ErrorReason);
213 map["message"] = LLSD.FromString(ErrorMessage); 213 map["message"] = OSD.FromString(ErrorMessage);
214 map["login"] = LLSD.FromString(login); 214 map["login"] = OSD.FromString(login);
215 215
216 return map; 216 return map;
217 } 217 }
@@ -221,7 +221,7 @@ namespace OpenSim.Framework.Communications
221 return (CreateLoginFailedResponse()); 221 return (CreateLoginFailedResponse());
222 } 222 }
223 223
224 public LLSD CreateFailedResponseLLSD() 224 public OSD CreateFailedResponseLLSD()
225 { 225 {
226 return CreateLoginFailedResponseLLSD(); 226 return CreateLoginFailedResponseLLSD();
227 } 227 }
@@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications
234 "false")); 234 "false"));
235 } 235 }
236 236
237 public LLSD CreateLoginFailedResponseLLSD() 237 public OSD CreateLoginFailedResponseLLSD()
238 { 238 {
239 return GenerateFailureResponseLLSD( 239 return GenerateFailureResponseLLSD(
240 "key", 240 "key",
@@ -265,7 +265,7 @@ namespace OpenSim.Framework.Communications
265 "false")); 265 "false"));
266 } 266 }
267 267
268 public LLSD CreateAlreadyLoggedInResponseLLSD() 268 public OSD CreateAlreadyLoggedInResponseLLSD()
269 { 269 {
270 return GenerateFailureResponseLLSD( 270 return GenerateFailureResponseLLSD(
271 "presence", 271 "presence",
@@ -283,7 +283,7 @@ namespace OpenSim.Framework.Communications
283 "false")); 283 "false"));
284 } 284 }
285 285
286 public LLSD CreateLoginBlockedResponseLLSD() 286 public OSD CreateLoginBlockedResponseLLSD()
287 { 287 {
288 return GenerateFailureResponseLLSD( 288 return GenerateFailureResponseLLSD(
289 "presence", 289 "presence",
@@ -299,7 +299,7 @@ namespace OpenSim.Framework.Communications
299 "false")); 299 "false"));
300 } 300 }
301 301
302 public LLSD CreateDeadRegionResponseLLSD() 302 public OSD CreateDeadRegionResponseLLSD()
303 { 303 {
304 return GenerateFailureResponseLLSD( 304 return GenerateFailureResponseLLSD(
305 "key", 305 "key",
@@ -315,7 +315,7 @@ namespace OpenSim.Framework.Communications
315 "false")); 315 "false"));
316 } 316 }
317 317
318 public LLSD CreateGridErrorResponseLLSD() 318 public OSD CreateGridErrorResponseLLSD()
319 { 319 {
320 return GenerateFailureResponseLLSD( 320 return GenerateFailureResponseLLSD(
321 "key", 321 "key",
@@ -404,90 +404,90 @@ namespace OpenSim.Framework.Communications
404 } 404 }
405 } 405 }
406 406
407 public LLSD ToLLSDResponse() 407 public OSD ToLLSDResponse()
408 { 408 {
409 try 409 try
410 { 410 {
411 LLSDMap map = new LLSDMap(); 411 OSDMap map = new OSDMap();
412 412
413 map["first_name"] = LLSD.FromString(Firstname); 413 map["first_name"] = OSD.FromString(Firstname);
414 map["last_name"] = LLSD.FromString(Lastname); 414 map["last_name"] = OSD.FromString(Lastname);
415 map["agent_access"] = LLSD.FromString(agentAccess); 415 map["agent_access"] = OSD.FromString(agentAccess);
416 416
417 map["sim_port"] = LLSD.FromInteger(SimPort); 417 map["sim_port"] = OSD.FromInteger(SimPort);
418 map["sim_ip"] = LLSD.FromString(SimAddress); 418 map["sim_ip"] = OSD.FromString(SimAddress);
419 419
420 map["agent_id"] = LLSD.FromUUID(AgentID); 420 map["agent_id"] = OSD.FromUUID(AgentID);
421 map["session_id"] = LLSD.FromUUID(SessionID); 421 map["session_id"] = OSD.FromUUID(SessionID);
422 map["secure_session_id"] = LLSD.FromUUID(SecureSessionID); 422 map["secure_session_id"] = OSD.FromUUID(SecureSessionID);
423 map["circuit_code"] = LLSD.FromInteger(CircuitCode); 423 map["circuit_code"] = OSD.FromInteger(CircuitCode);
424 map["seconds_since_epoch"] = LLSD.FromInteger((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds); 424 map["seconds_since_epoch"] = OSD.FromInteger((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds);
425 425
426 #region Login Flags 426 #region Login Flags
427 427
428 LLSDMap loginFlagsLLSD = new LLSDMap(); 428 OSDMap loginFlagsLLSD = new OSDMap();
429 loginFlagsLLSD["daylight_savings"] = LLSD.FromString(DST); 429 loginFlagsLLSD["daylight_savings"] = OSD.FromString(DST);
430 loginFlagsLLSD["stipend_since_login"] = LLSD.FromString(StipendSinceLogin); 430 loginFlagsLLSD["stipend_since_login"] = OSD.FromString(StipendSinceLogin);
431 loginFlagsLLSD["gendered"] = LLSD.FromString(Gendered); 431 loginFlagsLLSD["gendered"] = OSD.FromString(Gendered);
432 loginFlagsLLSD["ever_logged_in"] = LLSD.FromString(EverLoggedIn); 432 loginFlagsLLSD["ever_logged_in"] = OSD.FromString(EverLoggedIn);
433 map["login-flags"] = WrapLLSDMap(loginFlagsLLSD); 433 map["login-flags"] = WrapOSDMap(loginFlagsLLSD);
434 434
435 #endregion Login Flags 435 #endregion Login Flags
436 436
437 #region Global Textures 437 #region Global Textures
438 438
439 LLSDMap globalTexturesLLSD = new LLSDMap(); 439 OSDMap globalTexturesLLSD = new OSDMap();
440 globalTexturesLLSD["sun_texture_id"] = LLSD.FromString(SunTexture); 440 globalTexturesLLSD["sun_texture_id"] = OSD.FromString(SunTexture);
441 globalTexturesLLSD["cloud_texture_id"] = LLSD.FromString(CloudTexture); 441 globalTexturesLLSD["cloud_texture_id"] = OSD.FromString(CloudTexture);
442 globalTexturesLLSD["moon_texture_id"] = LLSD.FromString(MoonTexture); 442 globalTexturesLLSD["moon_texture_id"] = OSD.FromString(MoonTexture);
443 443
444 map["global-textures"] = WrapLLSDMap(globalTexturesLLSD); 444 map["global-textures"] = WrapOSDMap(globalTexturesLLSD);
445 445
446 #endregion Global Textures 446 #endregion Global Textures
447 447
448 map["seed_capability"] = LLSD.FromString(seedCapability); 448 map["seed_capability"] = OSD.FromString(seedCapability);
449 449
450 map["event_categories"] = ArrayListToLLSDArray(eventCategories); 450 map["event_categories"] = ArrayListToOSDArray(eventCategories);
451 //map["event_notifications"] = new LLSDArray(); // todo 451 //map["event_notifications"] = new OSDArray(); // todo
452 map["classified_categories"] = ArrayListToLLSDArray(classifiedCategories); 452 map["classified_categories"] = ArrayListToOSDArray(classifiedCategories);
453 453
454 #region UI Config 454 #region UI Config
455 455
456 LLSDMap uiConfigLLSD = new LLSDMap(); 456 OSDMap uiConfigLLSD = new OSDMap();
457 uiConfigLLSD["allow_first_life"] = LLSD.FromString(allowFirstLife); 457 uiConfigLLSD["allow_first_life"] = OSD.FromString(allowFirstLife);
458 map["ui-config"] = WrapLLSDMap(uiConfigLLSD); 458 map["ui-config"] = WrapOSDMap(uiConfigLLSD);
459 459
460 #endregion UI Config 460 #endregion UI Config
461 461
462 #region Inventory 462 #region Inventory
463 463
464 map["inventory-skeleton"] = ArrayListToLLSDArray(agentInventory); 464 map["inventory-skeleton"] = ArrayListToOSDArray(agentInventory);
465 465
466 map["inventory-skel-lib"] = ArrayListToLLSDArray(inventoryLibrary); 466 map["inventory-skel-lib"] = ArrayListToOSDArray(inventoryLibrary);
467 map["inventory-root"] = ArrayListToLLSDArray(inventoryRoot); ; 467 map["inventory-root"] = ArrayListToOSDArray(inventoryRoot); ;
468 map["inventory-lib-root"] = ArrayListToLLSDArray(inventoryLibRoot); 468 map["inventory-lib-root"] = ArrayListToOSDArray(inventoryLibRoot);
469 map["inventory-lib-owner"] = ArrayListToLLSDArray(inventoryLibraryOwner); 469 map["inventory-lib-owner"] = ArrayListToOSDArray(inventoryLibraryOwner);
470 470
471 #endregion Inventory 471 #endregion Inventory
472 472
473 map["gestures"] = ArrayListToLLSDArray(activeGestures); 473 map["gestures"] = ArrayListToOSDArray(activeGestures);
474 474
475 map["initial-outfit"] = ArrayListToLLSDArray(initialOutfit); 475 map["initial-outfit"] = ArrayListToOSDArray(initialOutfit);
476 map["start_location"] = LLSD.FromString(startLocation); 476 map["start_location"] = OSD.FromString(startLocation);
477 477
478 map["seed_capability"] = LLSD.FromString(seedCapability); 478 map["seed_capability"] = OSD.FromString(seedCapability);
479 map["home"] = LLSD.FromString(home); 479 map["home"] = OSD.FromString(home);
480 map["look_at"] = LLSD.FromString(lookAt); 480 map["look_at"] = OSD.FromString(lookAt);
481 map["message"] = LLSD.FromString(welcomeMessage); 481 map["message"] = OSD.FromString(welcomeMessage);
482 map["region_x"] = LLSD.FromInteger(RegionX * Constants.RegionSize); 482 map["region_x"] = OSD.FromInteger(RegionX * Constants.RegionSize);
483 map["region_y"] = LLSD.FromInteger(RegionY * Constants.RegionSize); 483 map["region_y"] = OSD.FromInteger(RegionY * Constants.RegionSize);
484 484
485 if (m_buddyList != null) 485 if (m_buddyList != null)
486 { 486 {
487 map["buddy-list"] = ArrayListToLLSDArray(m_buddyList.ToArray()); 487 map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray());
488 } 488 }
489 489
490 map["login"] = LLSD.FromString("true"); 490 map["login"] = OSD.FromString("true");
491 491
492 return map; 492 return map;
493 } 493 }
@@ -499,24 +499,24 @@ namespace OpenSim.Framework.Communications
499 } 499 }
500 } 500 }
501 501
502 public LLSDArray ArrayListToLLSDArray(ArrayList arrlst) 502 public OSDArray ArrayListToOSDArray(ArrayList arrlst)
503 { 503 {
504 LLSDArray llsdBack = new LLSDArray(); 504 OSDArray llsdBack = new OSDArray();
505 foreach (Hashtable ht in arrlst) 505 foreach (Hashtable ht in arrlst)
506 { 506 {
507 LLSDMap mp = new LLSDMap(); 507 OSDMap mp = new OSDMap();
508 foreach (DictionaryEntry deHt in ht) 508 foreach (DictionaryEntry deHt in ht)
509 { 509 {
510 mp.Add((string)deHt.Key, LLSDString.FromObject(deHt.Value)); 510 mp.Add((string)deHt.Key, OSDString.FromObject(deHt.Value));
511 } 511 }
512 llsdBack.Add(mp); 512 llsdBack.Add(mp);
513 } 513 }
514 return llsdBack; 514 return llsdBack;
515 } 515 }
516 516
517 private static LLSDArray WrapLLSDMap(LLSDMap wrapMe) 517 private static OSDArray WrapOSDMap(OSDMap wrapMe)
518 { 518 {
519 LLSDArray array = new LLSDArray(); 519 OSDArray array = new OSDArray();
520 array.Add(wrapMe); 520 array.Add(wrapMe);
521 return array; 521 return array;
522 } 522 }