From 49b99132106d0553dae6edf13c89f7b66604d133 Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 25 Jun 2007 18:31:47 +0000 Subject: Some work in progress LLSD serialise / de-serialise functions. --- OpenSim/OpenSim.Region/Caps.cs | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'OpenSim/OpenSim.Region') diff --git a/OpenSim/OpenSim.Region/Caps.cs b/OpenSim/OpenSim.Region/Caps.cs index 11b1b4d..319e027 100644 --- a/OpenSim/OpenSim.Region/Caps.cs +++ b/OpenSim/OpenSim.Region/Caps.cs @@ -1,8 +1,11 @@ using System; +using System.Collections; using System.Collections.Generic; using System.Text; using System.IO; +using System.Xml; using OpenSim.Servers; +using OpenSim.Framework; using OpenSim.Framework.Utilities; using OpenSim.Framework.Types; using OpenSim.Caches; @@ -91,6 +94,11 @@ namespace OpenSim.Region /// public string MapLayer(string request, string path, string param) { + Encoding _enc = System.Text.Encoding.UTF8; + Hashtable hash =(Hashtable) LLSD.LLSDDeserialize(_enc.GetBytes(request)); + LLSDMapRequest mapReq = new LLSDMapRequest(); + LLSDHelpers.DeserialiseLLSDMap(hash, mapReq ); + string res = "AgentDataFlags0LayerData"; res += this.BuildLLSDMapLayerResponse(); res += ""; @@ -123,14 +131,14 @@ namespace OpenSim.Region public string ProcessEventQueue(string request, string path, string param) { - // Console.WriteLine("event queue request " + request); + // Console.WriteLine("event queue request " + request); string res = ""; int timer = 0; - /*while ((timer < 200) || (this.CapsEventQueue.Count < 1)) - { - timer++; - }*/ + /*while ((timer < 200) || (this.CapsEventQueue.Count < 1)) + { + timer++; + }*/ if (this.CapsEventQueue.Count > 0) { lock (this.CapsEventQueue) @@ -152,9 +160,9 @@ namespace OpenSim.Region res += "events"; res += "messageEstablishAgentCommunication"; res += "body"; - res += "sim-ip-and-port"+ipAddressPort +""; - res += "seed-capability"+caps+""; - res += "agent-id"+this.agentID.ToStringHyphenated()+""; + res += "sim-ip-and-port" + ipAddressPort + ""; + res += "seed-capability" + caps + ""; + res += "agent-id" + this.agentID.ToStringHyphenated() + ""; res += ""; res += ""; res += ""; @@ -195,7 +203,7 @@ namespace OpenSim.Region public void UploadHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data) { - // Console.WriteLine("upload handler called"); + // Console.WriteLine("upload handler called"); AssetBase asset; asset = new AssetBase(); asset.FullID = assetID; -- cgit v1.1