From f518ca7feb33c0c1641ccb8f3956246b855f9b6c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 19 Nov 2008 06:25:34 +0000 Subject: Reapply r7369 r7367 r7366 r7370 r7381. This brings it back up to the new libOMV. --- .../Framework/Communications/Capabilities/Caps.cs | 16 +-- .../Communications/Capabilities/LLSDArray.cs | 4 +- .../Capabilities/LLSDAssetUploadRequest.cs | 2 +- .../Capabilities/LLSDAssetUploadResponse.cs | 2 +- .../Communications/Capabilities/LLSDCapEvent.cs | 2 +- .../Communications/Capabilities/LLSDHelpers.cs | 22 ++-- .../Capabilities/LLSDInventoryItem.cs | 16 +-- .../Communications/Capabilities/LLSDItemUpdate.cs | 2 +- .../Communications/Capabilities/LLSDMapLayer.cs | 4 +- .../Capabilities/LLSDMapLayerResponse.cs | 2 +- .../Capabilities/LLSDParcelVoiceInfoResponse.cs | 2 +- .../Capabilities/LLSDStreamHandler.cs | 4 +- .../LLSDTaskInventoryUploadComplete.cs | 2 +- .../Capabilities/LLSDTaskScriptUpdate.cs | 2 +- .../Communications/Capabilities/LLSDType.cs | 4 +- .../Capabilities/LLSDVoiceAccountResponse.cs | 2 +- OpenSim/Framework/Communications/LoginResponse.cs | 126 ++++++++++----------- OpenSim/Framework/Communications/LoginService.cs | 8 +- .../Framework/Communications/UserManagerBase.cs | 2 +- 19 files changed, 112 insertions(+), 112 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 28e56da..b4a0473 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -159,7 +159,7 @@ namespace OpenSim.Framework.Communications.Capabilities m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest); m_log.Warn("[SEED]: " + capsBase + m_requestPath); //m_capsHandlers["MapLayer"] = - // new LLSDStreamhandler("POST", + // new LLSDStreamhandler("POST", // capsBase + m_mapLayerPath, // GetMapLayer); m_capsHandlers["NewFileAgentInventory"] = @@ -297,7 +297,7 @@ namespace OpenSim.Framework.Communications.Capabilities Hashtable inventoryhash = (Hashtable)foldersrequested[i]; LLSDFetchInventoryDescendents llsdRequest = new LLSDFetchInventoryDescendents(); - LLSDHelpers.DeserialiseLLSDMap(inventoryhash, llsdRequest); + LLSDHelpers.DeserialiseOSDMap(inventoryhash, llsdRequest); LLSDInventoryDescendents reply = FetchInventoryReply(llsdRequest); inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply); @@ -431,7 +431,7 @@ namespace OpenSim.Framework.Communications.Capabilities { m_log.Debug("[CAPS]: MapLayer Request in region: " + m_regionName); LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); - mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse()); + mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); return mapResponse; } @@ -439,9 +439,9 @@ namespace OpenSim.Framework.Communications.Capabilities /// /// /// - protected static LLSDMapLayer GetLLSDMapLayerResponse() + protected static OSDMapLayer GetOSDMapLayerResponse() { - LLSDMapLayer mapLayer = new LLSDMapLayer(); + OSDMapLayer mapLayer = new OSDMapLayer(); mapLayer.Right = 5000; mapLayer.Top = 5000; mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006"); @@ -545,7 +545,7 @@ namespace OpenSim.Framework.Communications.Capabilities Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request)); LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); - LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest); + LLSDHelpers.DeserialiseOSDMap(hash, llsdUpdateRequest); string capsBase = "/CAPS/" + m_capsObjectPath; string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); @@ -600,10 +600,10 @@ namespace OpenSim.Framework.Communications.Capabilities OSHttpRequest httpRequest, OSHttpResponse httpResponse) { m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName); - //OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request)); + //OpenMetaverse.StructuredData.OSDMap hash = (OpenMetaverse.StructuredData.OSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request)); Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request)); LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); - LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); + LLSDHelpers.DeserialiseOSDMap(hash, llsdRequest); string capsBase = "/CAPS/" + m_capsObjectPath; string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs b/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs index 3579cc2..668ca79 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs @@ -30,11 +30,11 @@ using System.Collections; namespace OpenSim.Framework.Communications.Capabilities { [LLSDType("ARRAY")] - public class LLSDArray + public class OSDArray { public ArrayList Array = new ArrayList(); - public LLSDArray() + public OSDArray() { } } diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs index 5833b65..16547d5 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs @@ -30,7 +30,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDAssetUploadRequest { public string asset_type = String.Empty; diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs index 63b3351..04e9ed7 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs @@ -29,7 +29,7 @@ using System; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDAssetUploadResponse { public string uploader = String.Empty; diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs b/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs index 5ff21b8..d8a6265 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs @@ -31,7 +31,7 @@ namespace OpenSim.Framework.Communications.Capabilities public class LLSDCapEvent { public int id = 0; - public LLSDArray events = new LLSDArray(); + public OSDArray events = new OSDArray(); public LLSDCapEvent() { diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs index b14bfdd..ae4a3db 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs @@ -44,7 +44,7 @@ namespace OpenSim.Framework.Communications.Capabilities XmlTextWriter writer = new XmlTextWriter(sw); writer.Formatting = Formatting.None; writer.WriteStartElement(String.Empty, "llsd", String.Empty); - SerializeLLSDType(writer, obj); + SerializeOSDType(writer, obj); writer.WriteEndElement(); writer.Close(); @@ -53,7 +53,7 @@ namespace OpenSim.Framework.Communications.Capabilities return sw.ToString(); } - private static void SerializeLLSDType(XmlTextWriter writer, object obj) + private static void SerializeOSDType(XmlTextWriter writer, object obj) { Type myType = obj.GetType(); LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false); @@ -76,7 +76,7 @@ namespace OpenSim.Framework.Communications.Capabilities fieldName = fieldName.Replace("___", "-"); writer.WriteString(fieldName); writer.WriteEndElement(); - SerializeLLSDType(writer, fieldValue); + SerializeOSDType(writer, fieldValue); } else { @@ -87,13 +87,13 @@ namespace OpenSim.Framework.Communications.Capabilities writer.WriteEndElement(); LLSD.LLSDWriteOne(writer, fieldValue); // OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement( - // writer, OpenMetaverse.StructuredData.LLSD.FromObject(fieldValue)); + // writer, OpenMetaverse.StructuredData.OSD.FromObject(fieldValue)); } } writer.WriteEndElement(); break; case "ARRAY": - // LLSDArray arrayObject = obj as LLSDArray; + // OSDArray arrayObject = obj as OSDArray; // ArrayList a = arrayObject.Array; ArrayList a = (ArrayList) obj.GetType().GetField("Array").GetValue(obj); if (a != null) @@ -101,7 +101,7 @@ namespace OpenSim.Framework.Communications.Capabilities writer.WriteStartElement(String.Empty, "array", String.Empty); foreach (object item in a) { - SerializeLLSDType(writer, item); + SerializeOSDType(writer, item); } writer.WriteEndElement(); } @@ -112,11 +112,11 @@ namespace OpenSim.Framework.Communications.Capabilities { LLSD.LLSDWriteOne(writer, obj); //OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement( - // writer, OpenMetaverse.StructuredData.LLSD.FromObject(obj)); + // writer, OpenMetaverse.StructuredData.OSD.FromObject(obj)); } } - public static object DeserialiseLLSDMap(Hashtable llsd, object obj) + public static object DeserialiseOSDMap(Hashtable llsd, object obj) { Type myType = obj.GetType(); LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false); @@ -133,12 +133,12 @@ namespace OpenSim.Framework.Communications.Capabilities FieldInfo field = myType.GetField(keyName); if (field != null) { - // if (enumerator.Value is OpenMetaverse.StructuredData.LLSDMap) + // if (enumerator.Value is OpenMetaverse.StructuredData.OSDMap) if (enumerator.Value is Hashtable) { object fieldValue = field.GetValue(obj); - DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue); - // DeserialiseLLSDMap((OpenMetaverse.StructuredData.LLSDMap) enumerator.Value, fieldValue); + DeserialiseOSDMap((Hashtable) enumerator.Value, fieldValue); + // DeserialiseOSDMap((OpenMetaverse.StructuredData.OSDMap) enumerator.Value, fieldValue); } else if (enumerator.Value is ArrayList) { diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs index ff36821..3651513 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs @@ -29,7 +29,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDInventoryItem { public UUID parent_id; @@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Capabilities public int created_at; } - [LLSDMap] + [OSDMap] public class LLSDPermissions { public UUID creator_id; @@ -61,20 +61,20 @@ namespace OpenSim.Framework.Communications.Capabilities public bool is_owner_group; } - [LLSDMap] + [OSDMap] public class LLSDSaleInfo { public int sale_price; public string sale_type; } - [LLSDMap] + [OSDMap] public class LLSDInventoryDescendents { - public LLSDArray folders = new LLSDArray(); + public OSDArray folders = new OSDArray(); } - [LLSDMap] + [OSDMap] public class LLSDFetchInventoryDescendents { public UUID folder_id; @@ -84,13 +84,13 @@ namespace OpenSim.Framework.Communications.Capabilities public bool fetch_items; } - [LLSDMap] + [OSDMap] public class LLSDInventoryFolderContents { public UUID agent___id; // the (three "_") "___" so the serialising knows to change this to a "-" public int descendents; public UUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names - public LLSDArray items = new LLSDArray(); + public OSDArray items = new OSDArray(); public UUID owner___id; // and of course we can't have field names with "-" in public int version; } diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs b/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs index c147bd3..4568732 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs @@ -29,7 +29,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDItemUpdate { public UUID item_id; diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs index fc381e4..356fa5e 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs @@ -30,7 +30,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { [LLSDType("MAP")] - public class LLSDMapLayer + public class OSDMapLayer { public int Left = 0; public int Right = 0; @@ -38,7 +38,7 @@ namespace OpenSim.Framework.Communications.Capabilities public int Bottom = 0; public UUID ImageID = UUID.Zero; - public LLSDMapLayer() + public OSDMapLayer() { } } diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs index 7dabbec..26815f9 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs @@ -31,7 +31,7 @@ namespace OpenSim.Framework.Communications.Capabilities public class LLSDMapLayerResponse { public LLSDMapRequest AgentData = new LLSDMapRequest(); - public LLSDArray LayerData = new LLSDArray(); + public OSDArray LayerData = new OSDArray(); public LLSDMapLayerResponse() { diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs index c045dcf..829a2a9 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs @@ -30,7 +30,7 @@ using System.Collections; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDParcelVoiceInfoResponse { public int parcel_local_id; diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs index 7fcbb81..c68a205 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs @@ -53,12 +53,12 @@ namespace OpenSim.Framework.Communications.Capabilities //string requestBody = streamReader.ReadToEnd(); //streamReader.Close(); - // OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap) + // OpenMetaverse.StructuredData.OSDMap hash = (OpenMetaverse.StructuredData.OSDMap) // OpenMetaverse.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request)); Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request); TRequest llsdRequest = new TRequest(); - LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); + LLSDHelpers.DeserialiseOSDMap(hash, llsdRequest); TResponse response = m_method(llsdRequest); diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs index b34cbf9..bcea657 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs @@ -29,7 +29,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDTaskInventoryUploadComplete { /// diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs index 730e95b..7401768 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs @@ -29,7 +29,7 @@ using OpenMetaverse; namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDTaskScriptUpdate { /// diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDType.cs b/OpenSim/Framework/Communications/Capabilities/LLSDType.cs index 181a465..949e119 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDType.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDType.cs @@ -46,9 +46,9 @@ namespace OpenSim.Framework.Communications.Capabilities } [AttributeUsage(AttributeTargets.Class)] - public class LLSDMap : LLSDType + public class OSDMap : LLSDType { - public LLSDMap() : base("MAP") + public OSDMap() : base("MAP") { } } diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs index 8143233..6cd5ee3 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs @@ -28,7 +28,7 @@ namespace OpenSim.Framework.Communications.Capabilities { - [LLSDMap] + [OSDMap] public class LLSDVoiceAccountResponse { public string username; 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 return (xmlRpcResponse); } - public LLSD GenerateFailureResponseLLSD(string reason, string message, string login) + public OSD GenerateFailureResponseLLSD(string reason, string message, string login) { - LLSDMap map = new LLSDMap(); + OSDMap map = new OSDMap(); // Ensure Login Failed message/reason; ErrorMessage = message; ErrorReason = reason; - map["reason"] = LLSD.FromString(ErrorReason); - map["message"] = LLSD.FromString(ErrorMessage); - map["login"] = LLSD.FromString(login); + map["reason"] = OSD.FromString(ErrorReason); + map["message"] = OSD.FromString(ErrorMessage); + map["login"] = OSD.FromString(login); return map; } @@ -221,7 +221,7 @@ namespace OpenSim.Framework.Communications return (CreateLoginFailedResponse()); } - public LLSD CreateFailedResponseLLSD() + public OSD CreateFailedResponseLLSD() { return CreateLoginFailedResponseLLSD(); } @@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications "false")); } - public LLSD CreateLoginFailedResponseLLSD() + public OSD CreateLoginFailedResponseLLSD() { return GenerateFailureResponseLLSD( "key", @@ -265,7 +265,7 @@ namespace OpenSim.Framework.Communications "false")); } - public LLSD CreateAlreadyLoggedInResponseLLSD() + public OSD CreateAlreadyLoggedInResponseLLSD() { return GenerateFailureResponseLLSD( "presence", @@ -283,7 +283,7 @@ namespace OpenSim.Framework.Communications "false")); } - public LLSD CreateLoginBlockedResponseLLSD() + public OSD CreateLoginBlockedResponseLLSD() { return GenerateFailureResponseLLSD( "presence", @@ -299,7 +299,7 @@ namespace OpenSim.Framework.Communications "false")); } - public LLSD CreateDeadRegionResponseLLSD() + public OSD CreateDeadRegionResponseLLSD() { return GenerateFailureResponseLLSD( "key", @@ -315,7 +315,7 @@ namespace OpenSim.Framework.Communications "false")); } - public LLSD CreateGridErrorResponseLLSD() + public OSD CreateGridErrorResponseLLSD() { return GenerateFailureResponseLLSD( "key", @@ -404,90 +404,90 @@ namespace OpenSim.Framework.Communications } } - public LLSD ToLLSDResponse() + public OSD ToLLSDResponse() { try { - LLSDMap map = new LLSDMap(); + OSDMap map = new OSDMap(); - map["first_name"] = LLSD.FromString(Firstname); - map["last_name"] = LLSD.FromString(Lastname); - map["agent_access"] = LLSD.FromString(agentAccess); + map["first_name"] = OSD.FromString(Firstname); + map["last_name"] = OSD.FromString(Lastname); + map["agent_access"] = OSD.FromString(agentAccess); - map["sim_port"] = LLSD.FromInteger(SimPort); - map["sim_ip"] = LLSD.FromString(SimAddress); + map["sim_port"] = OSD.FromInteger(SimPort); + map["sim_ip"] = OSD.FromString(SimAddress); - map["agent_id"] = LLSD.FromUUID(AgentID); - map["session_id"] = LLSD.FromUUID(SessionID); - map["secure_session_id"] = LLSD.FromUUID(SecureSessionID); - map["circuit_code"] = LLSD.FromInteger(CircuitCode); - map["seconds_since_epoch"] = LLSD.FromInteger((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds); + map["agent_id"] = OSD.FromUUID(AgentID); + map["session_id"] = OSD.FromUUID(SessionID); + map["secure_session_id"] = OSD.FromUUID(SecureSessionID); + map["circuit_code"] = OSD.FromInteger(CircuitCode); + map["seconds_since_epoch"] = OSD.FromInteger((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds); #region Login Flags - LLSDMap loginFlagsLLSD = new LLSDMap(); - loginFlagsLLSD["daylight_savings"] = LLSD.FromString(DST); - loginFlagsLLSD["stipend_since_login"] = LLSD.FromString(StipendSinceLogin); - loginFlagsLLSD["gendered"] = LLSD.FromString(Gendered); - loginFlagsLLSD["ever_logged_in"] = LLSD.FromString(EverLoggedIn); - map["login-flags"] = WrapLLSDMap(loginFlagsLLSD); + OSDMap loginFlagsLLSD = new OSDMap(); + loginFlagsLLSD["daylight_savings"] = OSD.FromString(DST); + loginFlagsLLSD["stipend_since_login"] = OSD.FromString(StipendSinceLogin); + loginFlagsLLSD["gendered"] = OSD.FromString(Gendered); + loginFlagsLLSD["ever_logged_in"] = OSD.FromString(EverLoggedIn); + map["login-flags"] = WrapOSDMap(loginFlagsLLSD); #endregion Login Flags #region Global Textures - LLSDMap globalTexturesLLSD = new LLSDMap(); - globalTexturesLLSD["sun_texture_id"] = LLSD.FromString(SunTexture); - globalTexturesLLSD["cloud_texture_id"] = LLSD.FromString(CloudTexture); - globalTexturesLLSD["moon_texture_id"] = LLSD.FromString(MoonTexture); + OSDMap globalTexturesLLSD = new OSDMap(); + globalTexturesLLSD["sun_texture_id"] = OSD.FromString(SunTexture); + globalTexturesLLSD["cloud_texture_id"] = OSD.FromString(CloudTexture); + globalTexturesLLSD["moon_texture_id"] = OSD.FromString(MoonTexture); - map["global-textures"] = WrapLLSDMap(globalTexturesLLSD); + map["global-textures"] = WrapOSDMap(globalTexturesLLSD); #endregion Global Textures - map["seed_capability"] = LLSD.FromString(seedCapability); + map["seed_capability"] = OSD.FromString(seedCapability); - map["event_categories"] = ArrayListToLLSDArray(eventCategories); - //map["event_notifications"] = new LLSDArray(); // todo - map["classified_categories"] = ArrayListToLLSDArray(classifiedCategories); + map["event_categories"] = ArrayListToOSDArray(eventCategories); + //map["event_notifications"] = new OSDArray(); // todo + map["classified_categories"] = ArrayListToOSDArray(classifiedCategories); #region UI Config - LLSDMap uiConfigLLSD = new LLSDMap(); - uiConfigLLSD["allow_first_life"] = LLSD.FromString(allowFirstLife); - map["ui-config"] = WrapLLSDMap(uiConfigLLSD); + OSDMap uiConfigLLSD = new OSDMap(); + uiConfigLLSD["allow_first_life"] = OSD.FromString(allowFirstLife); + map["ui-config"] = WrapOSDMap(uiConfigLLSD); #endregion UI Config #region Inventory - map["inventory-skeleton"] = ArrayListToLLSDArray(agentInventory); + map["inventory-skeleton"] = ArrayListToOSDArray(agentInventory); - map["inventory-skel-lib"] = ArrayListToLLSDArray(inventoryLibrary); - map["inventory-root"] = ArrayListToLLSDArray(inventoryRoot); ; - map["inventory-lib-root"] = ArrayListToLLSDArray(inventoryLibRoot); - map["inventory-lib-owner"] = ArrayListToLLSDArray(inventoryLibraryOwner); + map["inventory-skel-lib"] = ArrayListToOSDArray(inventoryLibrary); + map["inventory-root"] = ArrayListToOSDArray(inventoryRoot); ; + map["inventory-lib-root"] = ArrayListToOSDArray(inventoryLibRoot); + map["inventory-lib-owner"] = ArrayListToOSDArray(inventoryLibraryOwner); #endregion Inventory - map["gestures"] = ArrayListToLLSDArray(activeGestures); + map["gestures"] = ArrayListToOSDArray(activeGestures); - map["initial-outfit"] = ArrayListToLLSDArray(initialOutfit); - map["start_location"] = LLSD.FromString(startLocation); + map["initial-outfit"] = ArrayListToOSDArray(initialOutfit); + map["start_location"] = OSD.FromString(startLocation); - map["seed_capability"] = LLSD.FromString(seedCapability); - map["home"] = LLSD.FromString(home); - map["look_at"] = LLSD.FromString(lookAt); - map["message"] = LLSD.FromString(welcomeMessage); - map["region_x"] = LLSD.FromInteger(RegionX * Constants.RegionSize); - map["region_y"] = LLSD.FromInteger(RegionY * Constants.RegionSize); + map["seed_capability"] = OSD.FromString(seedCapability); + map["home"] = OSD.FromString(home); + map["look_at"] = OSD.FromString(lookAt); + map["message"] = OSD.FromString(welcomeMessage); + map["region_x"] = OSD.FromInteger(RegionX * Constants.RegionSize); + map["region_y"] = OSD.FromInteger(RegionY * Constants.RegionSize); if (m_buddyList != null) { - map["buddy-list"] = ArrayListToLLSDArray(m_buddyList.ToArray()); + map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray()); } - map["login"] = LLSD.FromString("true"); + map["login"] = OSD.FromString("true"); return map; } @@ -499,24 +499,24 @@ namespace OpenSim.Framework.Communications } } - public LLSDArray ArrayListToLLSDArray(ArrayList arrlst) + public OSDArray ArrayListToOSDArray(ArrayList arrlst) { - LLSDArray llsdBack = new LLSDArray(); + OSDArray llsdBack = new OSDArray(); foreach (Hashtable ht in arrlst) { - LLSDMap mp = new LLSDMap(); + OSDMap mp = new OSDMap(); foreach (DictionaryEntry deHt in ht) { - mp.Add((string)deHt.Key, LLSDString.FromObject(deHt.Value)); + mp.Add((string)deHt.Key, OSDString.FromObject(deHt.Value)); } llsdBack.Add(mp); } return llsdBack; } - private static LLSDArray WrapLLSDMap(LLSDMap wrapMe) + private static OSDArray WrapOSDMap(OSDMap wrapMe) { - LLSDArray array = new LLSDArray(); + OSDArray array = new OSDArray(); array.Add(wrapMe); return array; } diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 7fd1c3b..b4ee069 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs @@ -321,7 +321,7 @@ namespace OpenSim.Framework.Communications /// /// The LLSD request /// The response to send - public LLSD LLSDLoginMethod(LLSD request) + public OSD LLSDLoginMethod(OSD request) { // Temporary fix m_loginMutex.WaitOne(); @@ -335,9 +335,9 @@ namespace OpenSim.Framework.Communications UserProfileData userProfile = null; LoginResponse logResponse = new LoginResponse(); - if (request.Type == LLSDType.Map) + if (request.Type == OSDType.Map) { - LLSDMap map = (LLSDMap)request; + OSDMap map = (OSDMap)request; if (map.ContainsKey("first") && map.ContainsKey("last") && map.ContainsKey("passwd")) { @@ -749,7 +749,7 @@ namespace OpenSim.Framework.Communications m_userManager.CreateAgent(profile, request); } - public void CreateAgent(UserProfileData profile, LLSD request) + public void CreateAgent(UserProfileData profile, OSD request) { m_userManager.CreateAgent(profile, request); } diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 7189eee..4b5d2bb 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -448,7 +448,7 @@ namespace OpenSim.Framework.Communications profile.CurrentAgent = agent; } - public void CreateAgent(UserProfileData profile, LLSD request) + public void CreateAgent(UserProfileData profile, OSD request) { UserAgentData agent = new UserAgentData(); -- cgit v1.1