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. --- .../Environment/Modules/Agent/Xfer/XferModule.cs | 4 +- .../Modules/Framework/EventQueueGetModule.cs | 30 +-- .../Modules/Framework/EventQueueHelper.cs | 110 ++++---- .../Modules/InterGrid/OpenGridProtocolModule.cs | 284 ++++++++++----------- .../Environment/Modules/World/Land/LandObject.cs | 4 +- .../Modules/World/WorldMap/WorldMapModule.cs | 112 ++++---- 6 files changed, 272 insertions(+), 272 deletions(-) (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs index 2f9a691..5b6c2a6 100644 --- a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs @@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer { // for now (testing) we only support files under 1000 bytes byte[] transferData = new byte[Data.Length + 4]; - Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); + Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); Array.Copy(Data, 0, transferData, 4, Data.Length); Client.SendXferPacket(XferID, 0 + 0x80000000, transferData); @@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer else { byte[] transferData = new byte[1000 + 4]; - Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); + Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); Array.Copy(Data, 0, transferData, 4, 1000); Client.SendXferPacket(XferID, 0, transferData); Packet++; diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs index c532ac0..3fc8005 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs @@ -44,18 +44,18 @@ using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Interfaces; using OpenSim.Region.Environment.Scenes; -using LLSD = OpenMetaverse.StructuredData.LLSD; -using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; -using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; +using OSD = OpenMetaverse.StructuredData.OSD; +using OSDMap = OpenMetaverse.StructuredData.OSDMap; +using OSDArray = OpenMetaverse.StructuredData.OSDArray; using Caps = OpenSim.Framework.Communications.Capabilities.Caps; -using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue; +using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue; namespace OpenSim.Region.Environment.Modules.Framework { public struct QueueItem { public int id; - public LLSDMap body; + public OSDMap body; } public class EventQueueGetModule : IEventQueue, IRegionModule @@ -146,7 +146,7 @@ namespace OpenSim.Region.Environment.Modules.Framework #region IEventQueue Members - public bool Enqueue(LLSD ev, UUID avatarID) + public bool Enqueue(OSD ev, UUID avatarID) { m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName); try @@ -308,7 +308,7 @@ namespace OpenSim.Region.Environment.Modules.Framework // } BlockingLLSDQueue queue = GetQueue(agentID); - LLSD element = queue.Dequeue(15000); // 15s timeout + OSD element = queue.Dequeue(15000); // 15s timeout Hashtable responsedata = new Hashtable(); @@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.Modules.Framework - LLSDArray array = new LLSDArray(); + OSDArray array = new OSDArray(); if (element == null) // didn't have an event in 15s { // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say! @@ -354,10 +354,10 @@ namespace OpenSim.Region.Environment.Modules.Framework } } - LLSDMap events = new LLSDMap(); + OSDMap events = new OSDMap(); events.Add("events", array); - events.Add("id", new LLSDInteger(thisID)); + events.Add("id", new OSDInteger(thisID)); lock (m_ids) { m_ids[agentID] = thisID + 1; @@ -366,7 +366,7 @@ namespace OpenSim.Region.Environment.Modules.Framework responsedata["int_response_code"] = 200; responsedata["content_type"] = "application/xml"; responsedata["keepalive"] = false; - responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events); + responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events); m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); return responsedata; @@ -424,7 +424,7 @@ namespace OpenSim.Region.Environment.Modules.Framework } - public LLSD EventQueueFallBack(string path, LLSD request, string endpoint) + public OSD EventQueueFallBack(string path, OSD request, string endpoint) { // This is a fallback element to keep the client from loosing EventQueueGet // Why does CAPS fail sometimes!? @@ -473,7 +473,7 @@ namespace OpenSim.Region.Environment.Modules.Framework thisID = m_ids[AvatarID]; BlockingLLSDQueue queue = GetQueue(AvatarID); - LLSDArray array = new LLSDArray(); + OSDArray array = new OSDArray(); LLSD element = queue.Dequeue(15000); // 15s timeout if (element == null) { @@ -489,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules.Framework thisID++; } } - LLSDMap events = new LLSDMap(); + OSDMap events = new OSDMap(); events.Add("events", array); events.Add("id", new LLSDInteger(thisID)); @@ -512,7 +512,7 @@ namespace OpenSim.Region.Environment.Modules.Framework { //return new LLSD(); } - return new LLSDString("shutdown404!"); + return new OSDString("shutdown404!"); } } } diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs index 0d0eed2..21be82a 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs @@ -52,70 +52,70 @@ namespace OpenSim.Region.Environment }; } - public static LLSD buildEvent(string eventName, LLSD eventBody) + public static OSD buildEvent(string eventName, OSD eventBody) { - LLSDMap llsdEvent = new LLSDMap(2); - llsdEvent.Add("message", new LLSDString(eventName)); + OSDMap llsdEvent = new OSDMap(2); + llsdEvent.Add("message", new OSDString(eventName)); llsdEvent.Add("body", eventBody); return llsdEvent; } - public static LLSD EnableSimulator(ulong Handle, IPEndPoint endPoint) + public static OSD EnableSimulator(ulong Handle, IPEndPoint endPoint) { - LLSDMap llsdSimInfo = new LLSDMap(3); + OSDMap llsdSimInfo = new OSDMap(3); - llsdSimInfo.Add("Handle", new LLSDBinary(regionHandleToByteArray(Handle))); - llsdSimInfo.Add("IP", new LLSDBinary(endPoint.Address.GetAddressBytes())); - llsdSimInfo.Add("Port", new LLSDInteger(endPoint.Port)); + llsdSimInfo.Add("Handle", new OSDBinary(regionHandleToByteArray(Handle))); + llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes())); + llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port)); - LLSDArray arr = new LLSDArray(1); + OSDArray arr = new OSDArray(1); arr.Add(llsdSimInfo); - LLSDMap llsdBody = new LLSDMap(1); + OSDMap llsdBody = new OSDMap(1); llsdBody.Add("SimulatorInfo", arr); return buildEvent("EnableSimulator", llsdBody); } - public static LLSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt, + public static OSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL, UUID AgentID, UUID SessionID) { - LLSDArray LookAtArr = new LLSDArray(3); - LookAtArr.Add(LLSD.FromReal(lookAt.X)); - LookAtArr.Add(LLSD.FromReal(lookAt.Y)); - LookAtArr.Add(LLSD.FromReal(lookAt.Z)); + OSDArray LookAtArr = new OSDArray(3); + LookAtArr.Add(OSD.FromReal(lookAt.X)); + LookAtArr.Add(OSD.FromReal(lookAt.Y)); + LookAtArr.Add(OSD.FromReal(lookAt.Z)); - LLSDArray PositionArr = new LLSDArray(3); - PositionArr.Add(LLSD.FromReal(pos.X)); - PositionArr.Add(LLSD.FromReal(pos.Y)); - PositionArr.Add(LLSD.FromReal(pos.Z)); + OSDArray PositionArr = new OSDArray(3); + PositionArr.Add(OSD.FromReal(pos.X)); + PositionArr.Add(OSD.FromReal(pos.Y)); + PositionArr.Add(OSD.FromReal(pos.Z)); - LLSDMap InfoMap = new LLSDMap(2); + OSDMap InfoMap = new OSDMap(2); InfoMap.Add("LookAt", LookAtArr); InfoMap.Add("Position", PositionArr); - LLSDArray InfoArr = new LLSDArray(1); + OSDArray InfoArr = new OSDArray(1); InfoArr.Add(InfoMap); - LLSDMap AgentDataMap = new LLSDMap(2); - AgentDataMap.Add("AgentID", LLSD.FromUUID(AgentID)); - AgentDataMap.Add("SessionID", LLSD.FromUUID(SessionID)); + OSDMap AgentDataMap = new OSDMap(2); + AgentDataMap.Add("AgentID", OSD.FromUUID(AgentID)); + AgentDataMap.Add("SessionID", OSD.FromUUID(SessionID)); - LLSDArray AgentDataArr = new LLSDArray(1); + OSDArray AgentDataArr = new OSDArray(1); AgentDataArr.Add(AgentDataMap); - LLSDMap RegionDataMap = new LLSDMap(4); - RegionDataMap.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(Handle))); - RegionDataMap.Add("SeedCapability", LLSD.FromString(capsURL)); - RegionDataMap.Add("SimIP", LLSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes())); - RegionDataMap.Add("SimPort", LLSD.FromInteger(newRegionExternalEndPoint.Port)); + OSDMap RegionDataMap = new OSDMap(4); + RegionDataMap.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(Handle))); + RegionDataMap.Add("SeedCapability", OSD.FromString(capsURL)); + RegionDataMap.Add("SimIP", OSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes())); + RegionDataMap.Add("SimPort", OSD.FromInteger(newRegionExternalEndPoint.Port)); - LLSDArray RegionDataArr = new LLSDArray(1); + OSDArray RegionDataArr = new OSDArray(1); RegionDataArr.Add(RegionDataMap); - LLSDMap llsdBody = new LLSDMap(3); + OSDMap llsdBody = new OSDMap(3); llsdBody.Add("Info", InfoArr); llsdBody.Add("AgentData", AgentDataArr); llsdBody.Add("RegionData", RegionDataArr); @@ -123,49 +123,49 @@ namespace OpenSim.Region.Environment return buildEvent("CrossedRegion", llsdBody); } - public static LLSD TeleportFinishEvent( + public static OSD TeleportFinishEvent( ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL, UUID AgentID) { - LLSDMap info = new LLSDMap(); - info.Add("AgentID", LLSD.FromUUID(AgentID)); - info.Add("LocationID", LLSD.FromInteger(4)); // TODO what is this? - info.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(regionHandle))); - info.Add("SeedCapability", LLSD.FromString(capsURL)); - info.Add("SimAccess", LLSD.FromInteger(simAccess)); - info.Add("SimIP", LLSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); - info.Add("SimPort", LLSD.FromInteger(regionExternalEndPoint.Port)); - info.Add("TeleportFlags", LLSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation - - LLSDArray infoArr = new LLSDArray(); + OSDMap info = new OSDMap(); + info.Add("AgentID", OSD.FromUUID(AgentID)); + info.Add("LocationID", OSD.FromInteger(4)); // TODO what is this? + info.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(regionHandle))); + info.Add("SeedCapability", OSD.FromString(capsURL)); + info.Add("SimAccess", OSD.FromInteger(simAccess)); + info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); + info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); + info.Add("TeleportFlags", OSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation + + OSDArray infoArr = new OSDArray(); infoArr.Add(info); - LLSDMap body = new LLSDMap(); + OSDMap body = new OSDMap(); body.Add("Info", infoArr); return buildEvent("TeleportFinish", body); } - public static LLSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono) + public static OSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono) { - LLSDMap script = new LLSDMap(); - script.Add("ObjectID", LLSD.FromUUID(objectID)); - script.Add("ItemID", LLSD.FromUUID(itemID)); - script.Add("Running", LLSD.FromBoolean(running)); - script.Add("Mono", LLSD.FromBoolean(mono)); + OSDMap script = new OSDMap(); + script.Add("ObjectID", OSD.FromUUID(objectID)); + script.Add("ItemID", OSD.FromUUID(itemID)); + script.Add("Running", OSD.FromBoolean(running)); + script.Add("Mono", OSD.FromBoolean(mono)); - LLSDArray scriptArr = new LLSDArray(); + OSDArray scriptArr = new OSDArray(); scriptArr.Add(script); - LLSDMap body = new LLSDMap(); + OSDMap body = new OSDMap(); body.Add("Script", scriptArr); return buildEvent("ScriptRunningReply", body); } - public static LLSD KeepAliveEvent() + public static OSD KeepAliveEvent() { - return buildEvent("FAKEEVENT", new LLSDMap()); + return buildEvent("FAKEEVENT", new OSDMap()); } } } diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs index 5b06408..1c86c2f 100644 --- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs @@ -46,9 +46,9 @@ using OpenSim.Framework.Servers; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using LLSD = OpenMetaverse.StructuredData.LLSD; -using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; -using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; +using OSD = OpenMetaverse.StructuredData.OSD; +using OSDMap = OpenMetaverse.StructuredData.OSDMap; +using OSDArray = OpenMetaverse.StructuredData.OSDArray; namespace OpenSim.Region.Environment.Modules.InterGrid { @@ -218,7 +218,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid #endregion - public LLSD ProcessRegionDomainSeed(string path, LLSD request, string endpoint) + public OSD ProcessRegionDomainSeed(string path, OSD request, string endpoint) { string[] pathSegments = path.Split('/'); @@ -234,11 +234,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid //m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}", // path, pathSegments.Length, pathSegments[1], pathSegments[pathSegments.Length - 1]); - //return new LLSDMap(); + //return new OSDMap(); } - public LLSD ProcessAgentDomainMessage(string path, LLSD request, string endpoint) + public OSD ProcessAgentDomainMessage(string path, OSD request, string endpoint) { // /agent/* @@ -288,7 +288,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid //return null; } - private LLSD GenerateRezAvatarRequestMessage(string regionname) + private OSD GenerateRezAvatarRequestMessage(string regionname) { Scene region = null; bool usedroot = false; @@ -319,7 +319,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid RegionInfo reg = region.RegionInfo; - LLSDMap responseMap = new LLSDMap(); + OSDMap responseMap = new OSDMap(); string rezHttpProtocol = "http://"; //string regionCapsHttpProtocol = "http://"; string httpaddr = reg.ExternalHostName; @@ -347,9 +347,9 @@ namespace OpenSim.Region.Environment.Modules.InterGrid httpaddr = httpsCN; } - responseMap["connect"] = LLSD.FromBoolean(true); - LLSDMap capabilitiesMap = new LLSDMap(); - capabilitiesMap["rez_avatar/request"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath); + responseMap["connect"] = OSD.FromBoolean(true); + OSDMap capabilitiesMap = new OSDMap(); + capabilitiesMap["rez_avatar/request"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath); responseMap["capabilities"] = capabilitiesMap; return responseMap; @@ -376,11 +376,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid } - public LLSD RequestRezAvatarMethod(string path, LLSD request) + public OSD RequestRezAvatarMethod(string path, OSD request) { //System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString()); - LLSDMap requestMap = (LLSDMap)request; + OSDMap requestMap = (OSDMap)request; Scene homeScene = null; @@ -441,27 +441,27 @@ namespace OpenSim.Region.Environment.Modules.InterGrid UpdateOGPState(LocalAgentID, userState); - LLSDMap responseMap = new LLSDMap(); + OSDMap responseMap = new OSDMap(); if (RemoteAgentID == UUID.Zero) { - responseMap["connect"] = LLSD.FromBoolean(false); - responseMap["message"] = LLSD.FromString("No agent ID was specified in rez_avatar/request"); + responseMap["connect"] = OSD.FromBoolean(false); + responseMap["message"] = OSD.FromString("No agent ID was specified in rez_avatar/request"); m_log.Error("[OGP]: rez_avatar/request failed because no avatar UUID was provided in the request body"); return responseMap; } - responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName); + responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName); // DEPRECIATED - responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); + responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); - responseMap["connect"] = LLSD.FromBoolean(true); - responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port); - responseMap["region_x"] = LLSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX - responseMap["region_y"] = LLSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY - responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); - responseMap["sim_access"] = LLSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG"); + responseMap["connect"] = OSD.FromBoolean(true); + responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port); + responseMap["region_x"] = OSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX + responseMap["region_y"] = OSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY + responseMap["region_id"] = OSD.FromUUID(reg.originRegionID); + responseMap["sim_access"] = OSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG"); // Generate a dummy agent for the user so we can get back a CAPS path AgentCircuitData agentData = new AgentCircuitData(); @@ -575,14 +575,14 @@ namespace OpenSim.Region.Environment.Modules.InterGrid // DEPRECIATED - responseMap["seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); + responseMap["seed_capability"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); // REPLACEMENT - responseMap["region_seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); + responseMap["region_seed_capability"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); - responseMap["rez_avatar"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); - responseMap["rez_avatar/rez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); - responseMap["rez_avatar/derez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath); + responseMap["rez_avatar"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); + responseMap["rez_avatar/rez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); + responseMap["rez_avatar/derez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath); // Add the user to the list of CAPS that are outstanding. // well allow the caps hosts in this dictionary @@ -605,27 +605,27 @@ namespace OpenSim.Region.Environment.Modules.InterGrid return responseMap; } - public LLSD RezAvatarMethod(string path, LLSD request) + public OSD RezAvatarMethod(string path, OSD request) { m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString()); - LLSDMap responseMap = new LLSDMap(); + OSDMap responseMap = new OSDMap(); AgentCircuitData userData = null; // Only people we've issued a cap can go further if (TryGetAgentCircuitData(path,out userData)) { - LLSDMap requestMap = (LLSDMap)request; + OSDMap requestMap = (OSDMap)request; // take these values to start. There's a few more UUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); UUID SessionID = requestMap["session_id"].AsUUID(); int circuitcode = requestMap["circuit_code"].AsInteger(); - LLSDArray Parameter = new LLSDArray(); + OSDArray Parameter = new OSDArray(); if (requestMap.ContainsKey("parameter")) { - Parameter = (LLSDArray)((LLSD)requestMap["parameter"]); + Parameter = (OSDArray)requestMap["parameter"]; } //int version = 1; @@ -636,7 +636,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid for (int i = 0; i < Parameter.Count; i++) { - LLSDMap item = (LLSDMap)Parameter[i]; + OSDMap item = (OSDMap)Parameter[i]; // if (item.ContainsKey("version")) // { // version = item["version"].AsInteger(); @@ -714,15 +714,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid RegionInfo reg = homeScene.RegionInfo; // Dummy positional and look at info.. we don't have it. - LLSDArray PositionArray = new LLSDArray(); - PositionArray.Add(LLSD.FromInteger(128)); - PositionArray.Add(LLSD.FromInteger(128)); - PositionArray.Add(LLSD.FromInteger(40)); + OSDArray PositionArray = new OSDArray(); + PositionArray.Add(OSD.FromInteger(128)); + PositionArray.Add(OSD.FromInteger(128)); + PositionArray.Add(OSD.FromInteger(40)); - LLSDArray LookAtArray = new LLSDArray(); - LookAtArray.Add(LLSD.FromInteger(1)); - LookAtArray.Add(LLSD.FromInteger(1)); - LookAtArray.Add(LLSD.FromInteger(1)); + OSDArray LookAtArray = new OSDArray(); + LookAtArray.Add(OSD.FromInteger(1)); + LookAtArray.Add(OSD.FromInteger(1)); + LookAtArray.Add(OSD.FromInteger(1)); // Our region's X and Y position in OpenSimulator space. uint fooX = reg.RegionLocX; @@ -732,31 +732,31 @@ namespace OpenSim.Region.Environment.Modules.InterGrid m_log.InfoFormat("[OGO]: region UUID {0} ", reg.RegionID); // Convert the X and Y position to LL space - responseMap["region_x"] = LLSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X - responseMap["region_y"] = LLSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y + responseMap["region_x"] = OSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X + responseMap["region_y"] = OSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y // Give em a new seed capability - responseMap["seed_capability"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); - responseMap["region"] = LLSD.FromUUID(reg.originRegionID); + responseMap["seed_capability"] = OSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); + responseMap["region"] = OSD.FromUUID(reg.originRegionID); responseMap["look_at"] = LookAtArray; - responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port); - responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString()); + responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port); + responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString()); // DEPRECIATED - responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); + responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); - responseMap["session_id"] = LLSD.FromUUID(SessionID); - responseMap["secure_session_id"] = LLSD.FromUUID(SecureSessionID); - responseMap["circuit_code"] = LLSD.FromInteger(circuitcode); + responseMap["session_id"] = OSD.FromUUID(SessionID); + responseMap["secure_session_id"] = OSD.FromUUID(SecureSessionID); + responseMap["circuit_code"] = OSD.FromInteger(circuitcode); responseMap["position"] = PositionArray; - responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); + responseMap["region_id"] = OSD.FromUUID(reg.originRegionID); - responseMap["sim_access"] = LLSD.FromString("Mature"); + responseMap["sim_access"] = OSD.FromString("Mature"); - responseMap["connect"] = LLSD.FromBoolean(true); + responseMap["connect"] = OSD.FromBoolean(true); @@ -767,12 +767,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid return responseMap; } - public LLSD DerezAvatarMethod(string path, LLSD request) + public OSD DerezAvatarMethod(string path, OSD request) { m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString()); //LLSD llsdResponse = null; - LLSDMap responseMap = new LLSDMap(); + OSDMap responseMap = new OSDMap(); string[] PathArray = path.Split('/'); m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]); @@ -790,34 +790,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid OGPState userState = GetOGPState(LocalID); if (userState.agent_id != UUID.Zero) { - //LLSDMap outboundRequestMap = new LLSDMap(); - LLSDMap inboundRequestMap = (LLSDMap)request; + //OSDMap outboundRequestMap = new OSDMap(); + OSDMap inboundRequestMap = (OSDMap)request; string rezAvatarString = inboundRequestMap["rez_avatar"].AsString(); if (rezAvatarString.Length == 0) { rezAvatarString = inboundRequestMap["rez_avatar/rez"].AsString(); } - LLSDArray LookAtArray = new LLSDArray(); - LookAtArray.Add(LLSD.FromInteger(1)); - LookAtArray.Add(LLSD.FromInteger(1)); - LookAtArray.Add(LLSD.FromInteger(1)); - - LLSDArray PositionArray = new LLSDArray(); - PositionArray.Add(LLSD.FromInteger(128)); - PositionArray.Add(LLSD.FromInteger(128)); - PositionArray.Add(LLSD.FromInteger(40)); - - LLSDArray lookArray = new LLSDArray(); - lookArray.Add(LLSD.FromInteger(128)); - lookArray.Add(LLSD.FromInteger(128)); - lookArray.Add(LLSD.FromInteger(40)); - - responseMap["connect"] = LLSD.FromBoolean(true);// it's okay to give this user up + OSDArray LookAtArray = new OSDArray(); + LookAtArray.Add(OSD.FromInteger(1)); + LookAtArray.Add(OSD.FromInteger(1)); + LookAtArray.Add(OSD.FromInteger(1)); + + OSDArray PositionArray = new OSDArray(); + PositionArray.Add(OSD.FromInteger(128)); + PositionArray.Add(OSD.FromInteger(128)); + PositionArray.Add(OSD.FromInteger(40)); + + OSDArray lookArray = new OSDArray(); + lookArray.Add(OSD.FromInteger(128)); + lookArray.Add(OSD.FromInteger(128)); + lookArray.Add(OSD.FromInteger(40)); + + responseMap["connect"] = OSD.FromBoolean(true);// it's okay to give this user up responseMap["look_at"] = LookAtArray; m_log.WarnFormat("[OGP]: Invoking rez_avatar on host:{0} for avatar: {1} {2}", rezAvatarString, userState.first_name, userState.last_name); - LLSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState); + OSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState); // If invoking it returned an error, parse and end if (rezResponseMap.ContainsKey("connect")) @@ -852,34 +852,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid int rrY = rezResponseMap["region_y"].AsInteger(); m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY); UUID rrRID = rezResponseMap["region_id"].AsUUID(); - LLSDArray RezResponsePositionArray = null; + OSDArray RezResponsePositionArray = null; string rrAccess = rezResponseMap["sim_access"].AsString(); if (rezResponseMap.ContainsKey("position")) { - RezResponsePositionArray = (LLSDArray)rezResponseMap["position"]; + RezResponsePositionArray = (OSDArray)rezResponseMap["position"]; } // DEPRECIATED - responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap); + responseMap["seed_capability"] = OSD.FromString(rezRespSeedCap); // REPLACEMENT r3 - responseMap["region_seed_capability"] = LLSD.FromString(rezRespSeedCap); + responseMap["region_seed_capability"] = OSD.FromString(rezRespSeedCap); // DEPRECIATED - responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); + responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); - responseMap["sim_host"] = LLSD.FromString(rezRespSim_host); - responseMap["sim_port"] = LLSD.FromInteger(rrPort); - responseMap["region_x"] = LLSD.FromInteger(rrX ); - responseMap["region_y"] = LLSD.FromInteger(rrY ); - responseMap["region_id"] = LLSD.FromUUID(rrRID); - responseMap["sim_access"] = LLSD.FromString(rrAccess); + responseMap["sim_host"] = OSD.FromString(rezRespSim_host); + responseMap["sim_port"] = OSD.FromInteger(rrPort); + responseMap["region_x"] = OSD.FromInteger(rrX ); + responseMap["region_y"] = OSD.FromInteger(rrY ); + responseMap["region_id"] = OSD.FromUUID(rrRID); + responseMap["sim_access"] = OSD.FromString(rrAccess); if (RezResponsePositionArray != null) { responseMap["position"] = RezResponsePositionArray; } responseMap["look_at"] = lookArray; - responseMap["connect"] = LLSD.FromBoolean(true); + responseMap["connect"] = OSD.FromBoolean(true); ShutdownConnection(LocalID,this); // PLEASE STOP CHANGING THIS TO an M_LOG, M_LOG DOESN'T WORK ON MULTILINE .TOSTRINGS @@ -899,7 +899,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid //return responseMap; } - private LLSDMap invokeRezAvatarCap(LLSDMap responseMap, string CapAddress, OGPState userState) + private OSDMap invokeRezAvatarCap(OSDMap responseMap, string CapAddress, OGPState userState) { Scene reg = GetRootScene(); @@ -907,38 +907,38 @@ namespace OpenSim.Region.Environment.Modules.InterGrid DeRezRequest.Method = "POST"; DeRezRequest.ContentType = "application/xml+llsd"; - LLSDMap RAMap = new LLSDMap(); - LLSDMap AgentParms = new LLSDMap(); - LLSDMap RegionParms = new LLSDMap(); - - LLSDArray Parameter = new LLSDArray(2); - - LLSDMap version = new LLSDMap(); - version["version"] = LLSD.FromInteger(userState.src_version); - Parameter.Add((LLSD)version); - - LLSDMap SrcData = new LLSDMap(); - SrcData["estate_id"] = LLSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID); - SrcData["parent_estate_id"] = LLSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID)); - SrcData["region_id"] = LLSD.FromUUID(reg.RegionInfo.originRegionID); - SrcData["visible_to_parent"] = LLSD.FromBoolean(userState.visible_to_parent); - Parameter.Add((LLSD)SrcData); - - AgentParms["first_name"] = LLSD.FromString(userState.first_name); - AgentParms["last_name"] = LLSD.FromString(userState.last_name); - AgentParms["agent_id"] = LLSD.FromUUID(userState.agent_id); - RegionParms["region_id"] = LLSD.FromUUID(userState.region_id); - AgentParms["circuit_code"] = LLSD.FromInteger(userState.circuit_code); - AgentParms["secure_session_id"] = LLSD.FromUUID(userState.secure_session_id); - AgentParms["session_id"] = LLSD.FromUUID(userState.session_id); - AgentParms["agent_access"] = LLSD.FromBoolean(userState.agent_access); - AgentParms["god_level"] = LLSD.FromInteger(userState.god_level); - AgentParms["god_overide"] = LLSD.FromBoolean(userState.god_overide); - AgentParms["identified"] = LLSD.FromBoolean(userState.identified); - AgentParms["transacted"] = LLSD.FromBoolean(userState.transacted); - AgentParms["age_verified"] = LLSD.FromBoolean(userState.age_verified); - AgentParms["limited_to_estate"] = LLSD.FromInteger(userState.limited_to_estate); - AgentParms["inventory_host"] = LLSD.FromString(userState.inventory_host); + OSDMap RAMap = new OSDMap(); + OSDMap AgentParms = new OSDMap(); + OSDMap RegionParms = new OSDMap(); + + OSDArray Parameter = new OSDArray(2); + + OSDMap version = new OSDMap(); + version["version"] = OSD.FromInteger(userState.src_version); + Parameter.Add(version); + + OSDMap SrcData = new OSDMap(); + SrcData["estate_id"] = OSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID); + SrcData["parent_estate_id"] = OSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID)); + SrcData["region_id"] = OSD.FromUUID(reg.RegionInfo.originRegionID); + SrcData["visible_to_parent"] = OSD.FromBoolean(userState.visible_to_parent); + Parameter.Add(SrcData); + + AgentParms["first_name"] = OSD.FromString(userState.first_name); + AgentParms["last_name"] = OSD.FromString(userState.last_name); + AgentParms["agent_id"] = OSD.FromUUID(userState.agent_id); + RegionParms["region_id"] = OSD.FromUUID(userState.region_id); + AgentParms["circuit_code"] = OSD.FromInteger(userState.circuit_code); + AgentParms["secure_session_id"] = OSD.FromUUID(userState.secure_session_id); + AgentParms["session_id"] = OSD.FromUUID(userState.session_id); + AgentParms["agent_access"] = OSD.FromBoolean(userState.agent_access); + AgentParms["god_level"] = OSD.FromInteger(userState.god_level); + AgentParms["god_overide"] = OSD.FromBoolean(userState.god_overide); + AgentParms["identified"] = OSD.FromBoolean(userState.identified); + AgentParms["transacted"] = OSD.FromBoolean(userState.transacted); + AgentParms["age_verified"] = OSD.FromBoolean(userState.age_verified); + AgentParms["limited_to_estate"] = OSD.FromInteger(userState.limited_to_estate); + AgentParms["inventory_host"] = OSD.FromString(userState.inventory_host); // version 1 RAMap = AgentParms; @@ -951,11 +951,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid string RAMapString = RAMap.ToString(); m_log.InfoFormat("[OGP] RAMap string {0}", RAMapString); - LLSD LLSDofRAMap = RAMap; // RENAME if this works + OSD LLSDofRAMap = RAMap; // RENAME if this works m_log.InfoFormat("[OGP]: LLSD of map as string was {0}", LLSDofRAMap.ToString()); //m_log.InfoFormat("[OGP]: LLSD+XML: {0}", LLSDParser.SerializeXmlString(LLSDofRAMap)); - byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap); + byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap); //string bufferDump = System.Text.Encoding.ASCII.GetString(buffer); //m_log.InfoFormat("[OGP]: buffer form is {0}",bufferDump); @@ -973,7 +973,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid catch (WebException ex) { m_log.InfoFormat("[OGP] Bad send on de_rez_avatar {0}", ex.Message); - responseMap["connect"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); return responseMap; } @@ -997,21 +997,21 @@ namespace OpenSim.Region.Environment.Modules.InterGrid catch (WebException ex) { m_log.InfoFormat("[OGP]: exception on read after send of rez avatar {0}", ex.Message); - responseMap["connect"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); return responseMap; } - LLSD rezResponse = null; + OSD rezResponse = null; try { - rezResponse = LLSDParser.DeserializeXml(rez_avatar_reply); + rezResponse = OSDParser.DeserializeLLSDXml(rez_avatar_reply); - responseMap = (LLSDMap)rezResponse; + responseMap = (OSDMap)rezResponse; } catch (Exception ex) { m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message); - responseMap["connect"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); return responseMap; } @@ -1019,22 +1019,22 @@ namespace OpenSim.Region.Environment.Modules.InterGrid return responseMap; } - public LLSD GenerateNoHandlerMessage() + public OSD GenerateNoHandlerMessage() { - LLSDMap map = new LLSDMap(); - map["reason"] = LLSD.FromString("LLSDRequest"); - map["message"] = LLSD.FromString("No handler registered for LLSD Requests"); - map["login"] = LLSD.FromString("false"); - map["connect"] = LLSD.FromString("false"); + OSDMap map = new OSDMap(); + map["reason"] = OSD.FromString("LLSDRequest"); + map["message"] = OSD.FromString("No handler registered for LLSD Requests"); + map["login"] = OSD.FromString("false"); + map["connect"] = OSD.FromString("false"); return map; } - public LLSD GenerateNoStateMessage(UUID passedAvatar) + public OSD GenerateNoStateMessage(UUID passedAvatar) { - LLSDMap map = new LLSDMap(); - map["reason"] = LLSD.FromString("derez failed"); - map["message"] = LLSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString()); - map["login"] = LLSD.FromString("false"); - map["connect"] = LLSD.FromString("false"); + OSDMap map = new OSDMap(); + map["reason"] = OSD.FromString("derez failed"); + map["message"] = OSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString()); + map["login"] = OSD.FromString("false"); + map["connect"] = OSD.FromString("false"); return map; } private bool TryGetAgentCircuitData(string path, out AgentCircuitData userdata) diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 27c7014..197d5c2 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs @@ -369,7 +369,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land List toRemove = new List(); foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList) { - if (entry.Flags == (AccessList) flags) + if (entry.Flags == (AccessList)flags) { toRemove.Add(entry); } @@ -384,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land ParcelManager.ParcelAccessEntry temp = new ParcelManager.ParcelAccessEntry(); temp.AgentID = entry.AgentID; temp.Time = new DateTime(); //Pointless? Yes. - temp.Flags = (AccessList) flags; + temp.Flags = (AccessList)flags; if (!newData.ParcelAccessList.Contains(temp)) { diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs index c51a314..8318cdc 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs @@ -48,9 +48,9 @@ using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Types; using Caps = OpenSim.Framework.Communications.Capabilities.Caps; -using LLSD = OpenMetaverse.StructuredData.LLSD; -using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; -using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; +using OSD = OpenMetaverse.StructuredData.OSD; +using OSDMap = OpenMetaverse.StructuredData.OSDMap; +using OSDArray = OpenMetaverse.StructuredData.OSDArray; namespace OpenSim.Region.Environment.Modules.World.WorldMap { @@ -202,7 +202,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap } } LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); - mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse()); + mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); return mapResponse.ToString(); } @@ -215,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap { m_log.Debug("[CAPS]: MapLayer Request in region: " + m_scene.RegionInfo.RegionName); LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); - mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse()); + mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); return mapResponse; } @@ -223,9 +223,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap /// /// /// - 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"); @@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap } uint xstart = 0; uint ystart = 0; - Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart); + Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart); if (itemtype == 6) // we only sevice 6 right now (avatar green dots) { if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle) @@ -407,7 +407,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap if (dorequest) { - LLSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); + OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); RequestMapItemsCompleted(response); } } @@ -433,8 +433,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap /// /// Sends the mapitem response to the IClientAPI /// - /// The LLSDMap Response for the mapitem - private void RequestMapItemsCompleted(LLSDMap response) + /// The OSDMap Response for the mapitem + private void RequestMapItemsCompleted(OSDMap response) { UUID requestID = response["requestID"].AsUUID(); @@ -460,10 +460,10 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap if (response.ContainsKey(mrs.itemtype.ToString())) { List returnitems = new List(); - LLSDArray itemarray = (LLSDArray)response[mrs.itemtype.ToString()]; + OSDArray itemarray = (OSDArray)response[mrs.itemtype.ToString()]; for (int i = 0; i < itemarray.Count; i++) { - LLSDMap mapitem = (LLSDMap)itemarray[i]; + OSDMap mapitem = (OSDMap)itemarray[i]; mapItemReply mi = new mapItemReply(); mi.x = (uint)mapitem["X"].AsInteger(); mi.y = (uint)mapitem["Y"].AsInteger(); @@ -517,7 +517,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap /// passed in from packet /// Region we're looking up /// - private LLSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags, + private OSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags, uint EstateID, bool godlike, uint itemtype, ulong regionhandle) { bool blacklisted = false; @@ -528,7 +528,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap } if (blacklisted) - return new LLSDMap(); + return new OSDMap(); UUID requestID = UUID.Random(); lock (m_cachedRegionMapItemsAddress) @@ -569,7 +569,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap // Can't find the http server if (httpserver.Length == 0 || blacklisted) - return new LLSDMap(); + return new OSDMap(); MapRequestState mrs = new MapRequestState(); mrs.agentID = id; @@ -585,14 +585,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap WebRequest mapitemsrequest = WebRequest.Create(httpserver); mapitemsrequest.Method = "POST"; mapitemsrequest.ContentType = "application/xml+llsd"; - LLSDMap RAMap = new LLSDMap(); + OSDMap RAMap = new OSDMap(); // string RAMapString = RAMap.ToString(); - LLSD LLSDofRAMap = RAMap; // RENAME if this works + OSD LLSDofRAMap = RAMap; // RENAME if this works - byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap); - LLSDMap responseMap = new LLSDMap(); - responseMap["requestID"] = LLSD.FromUUID(requestID); + byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap); + OSDMap responseMap = new OSDMap(); + responseMap["requestID"] = OSD.FromUUID(requestID); Stream os = null; try @@ -606,7 +606,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap catch (WebException ex) { m_log.InfoFormat("[WorldMap] Bad send on GetMapItems {0}", ex.Message); - responseMap["connect"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); lock (m_blacklistedurls) { if (!m_blacklistedurls.ContainsKey(httpserver)) @@ -630,12 +630,12 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap } else { - return new LLSDMap(); + return new OSDMap(); } } catch (WebException) { - responseMap["connect"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); lock (m_blacklistedurls) { if (!m_blacklistedurls.ContainsKey(httpserver)) @@ -646,18 +646,18 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap return responseMap; } - LLSD rezResponse = null; + OSD rezResponse = null; try { - rezResponse = LLSDParser.DeserializeXml(response_mapItems_reply); + rezResponse = OSDParser.DeserializeLLSDXml(response_mapItems_reply); - responseMap = (LLSDMap)rezResponse; - responseMap["requestID"] = LLSD.FromUUID(requestID); + responseMap = (OSDMap)rezResponse; + responseMap["requestID"] = OSD.FromUUID(requestID); } catch (Exception) { //m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message); - responseMap["connect"] = LLSD.FromBoolean(false); + responseMap["connect"] = OSD.FromBoolean(false); return responseMap; } @@ -793,57 +793,57 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap return null; } - public LLSD HandleRemoteMapItemRequest(string path, LLSD request, string endpoint) + public OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint) { uint xstart = 0; uint ystart = 0; - Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart); + Utils.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart); - LLSDMap responsemap = new LLSDMap(); + OSDMap responsemap = new OSDMap(); List avatars = m_scene.GetAvatars(); - LLSDArray responsearr = new LLSDArray(avatars.Count); - LLSDMap responsemapdata = new LLSDMap(); + OSDArray responsearr = new OSDArray(avatars.Count); + OSDMap responsemapdata = new OSDMap(); int tc = System.Environment.TickCount; /* foreach (ScenePresence av in avatars) { - responsemapdata = new LLSDMap(); - responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); - responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); - responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero); - responsemapdata["Name"] = LLSD.FromString("TH"); - responsemapdata["Extra"] = LLSD.FromInteger(0); - responsemapdata["Extra2"] = LLSD.FromInteger(0); + responsemapdata = new OSDMap(); + responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); + responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); + responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); + responsemapdata["Name"] = OSD.FromString("TH"); + responsemapdata["Extra"] = OSD.FromInteger(0); + responsemapdata["Extra2"] = OSD.FromInteger(0); responsearr.Add(responsemapdata); } responsemap["1"] = responsearr; */ if (avatars.Count == 0) { - responsemapdata = new LLSDMap(); - responsemapdata["X"] = LLSD.FromInteger((int)(xstart + 1)); - responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + 1)); - responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero); - responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); - responsemapdata["Extra"] = LLSD.FromInteger(0); - responsemapdata["Extra2"] = LLSD.FromInteger(0); + responsemapdata = new OSDMap(); + responsemapdata["X"] = OSD.FromInteger((int)(xstart + 1)); + responsemapdata["Y"] = OSD.FromInteger((int)(ystart + 1)); + responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); + responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); + responsemapdata["Extra"] = OSD.FromInteger(0); + responsemapdata["Extra2"] = OSD.FromInteger(0); responsearr.Add(responsemapdata); responsemap["6"] = responsearr; } else { - responsearr = new LLSDArray(avatars.Count); + responsearr = new OSDArray(avatars.Count); foreach (ScenePresence av in avatars) { - responsemapdata = new LLSDMap(); - responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); - responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); - responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero); - responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); - responsemapdata["Extra"] = LLSD.FromInteger(1); - responsemapdata["Extra2"] = LLSD.FromInteger(0); + responsemapdata = new OSDMap(); + responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); + responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); + responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); + responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); + responsemapdata["Extra"] = OSD.FromInteger(1); + responsemapdata["Extra2"] = OSD.FromInteger(0); responsearr.Add(responsemapdata); } responsemap["6"] = responsearr; -- cgit v1.1