diff options
author | MW | 2007-06-25 18:31:47 +0000 |
---|---|---|
committer | MW | 2007-06-25 18:31:47 +0000 |
commit | 49b99132106d0553dae6edf13c89f7b66604d133 (patch) | |
tree | ae997d4fb832bd2f15fd8920bfd3a0bd811fd39b /OpenSim/OpenSim.Region | |
parent | Forgot these (diff) | |
download | opensim-SC_OLD-49b99132106d0553dae6edf13c89f7b66604d133.zip opensim-SC_OLD-49b99132106d0553dae6edf13c89f7b66604d133.tar.gz opensim-SC_OLD-49b99132106d0553dae6edf13c89f7b66604d133.tar.bz2 opensim-SC_OLD-49b99132106d0553dae6edf13c89f7b66604d133.tar.xz |
Some work in progress LLSD serialise / de-serialise functions.
Diffstat (limited to 'OpenSim/OpenSim.Region')
-rw-r--r-- | OpenSim/OpenSim.Region/Caps.cs | 26 |
1 files changed, 17 insertions, 9 deletions
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 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections; | ||
2 | using System.Collections.Generic; | 3 | using System.Collections.Generic; |
3 | using System.Text; | 4 | using System.Text; |
4 | using System.IO; | 5 | using System.IO; |
6 | using System.Xml; | ||
5 | using OpenSim.Servers; | 7 | using OpenSim.Servers; |
8 | using OpenSim.Framework; | ||
6 | using OpenSim.Framework.Utilities; | 9 | using OpenSim.Framework.Utilities; |
7 | using OpenSim.Framework.Types; | 10 | using OpenSim.Framework.Types; |
8 | using OpenSim.Caches; | 11 | using OpenSim.Caches; |
@@ -91,6 +94,11 @@ namespace OpenSim.Region | |||
91 | /// <returns></returns> | 94 | /// <returns></returns> |
92 | public string MapLayer(string request, string path, string param) | 95 | public string MapLayer(string request, string path, string param) |
93 | { | 96 | { |
97 | Encoding _enc = System.Text.Encoding.UTF8; | ||
98 | Hashtable hash =(Hashtable) LLSD.LLSDDeserialize(_enc.GetBytes(request)); | ||
99 | LLSDMapRequest mapReq = new LLSDMapRequest(); | ||
100 | LLSDHelpers.DeserialiseLLSDMap(hash, mapReq ); | ||
101 | |||
94 | string res = "<llsd><map><key>AgentData</key><map><key>Flags</key><integer>0</integer></map><key>LayerData</key><array>"; | 102 | string res = "<llsd><map><key>AgentData</key><map><key>Flags</key><integer>0</integer></map><key>LayerData</key><array>"; |
95 | res += this.BuildLLSDMapLayerResponse(); | 103 | res += this.BuildLLSDMapLayerResponse(); |
96 | res += "</array></map></llsd>"; | 104 | res += "</array></map></llsd>"; |
@@ -123,14 +131,14 @@ namespace OpenSim.Region | |||
123 | 131 | ||
124 | public string ProcessEventQueue(string request, string path, string param) | 132 | public string ProcessEventQueue(string request, string path, string param) |
125 | { | 133 | { |
126 | // Console.WriteLine("event queue request " + request); | 134 | // Console.WriteLine("event queue request " + request); |
127 | string res = ""; | 135 | string res = ""; |
128 | int timer = 0; | 136 | int timer = 0; |
129 | 137 | ||
130 | /*while ((timer < 200) || (this.CapsEventQueue.Count < 1)) | 138 | /*while ((timer < 200) || (this.CapsEventQueue.Count < 1)) |
131 | { | 139 | { |
132 | timer++; | 140 | timer++; |
133 | }*/ | 141 | }*/ |
134 | if (this.CapsEventQueue.Count > 0) | 142 | if (this.CapsEventQueue.Count > 0) |
135 | { | 143 | { |
136 | lock (this.CapsEventQueue) | 144 | lock (this.CapsEventQueue) |
@@ -152,9 +160,9 @@ namespace OpenSim.Region | |||
152 | res += "<key>events</key><array><map>"; | 160 | res += "<key>events</key><array><map>"; |
153 | res += "<key>message</key><string>EstablishAgentCommunication</string>"; | 161 | res += "<key>message</key><string>EstablishAgentCommunication</string>"; |
154 | res += "<key>body</key><map>"; | 162 | res += "<key>body</key><map>"; |
155 | res += "<key>sim-ip-and-port</key><string>"+ipAddressPort +"</string>"; | 163 | res += "<key>sim-ip-and-port</key><string>" + ipAddressPort + "</string>"; |
156 | res += "<key>seed-capability</key><string>"+caps+"</string>"; | 164 | res += "<key>seed-capability</key><string>" + caps + "</string>"; |
157 | res += "<key>agent-id</key><uuid>"+this.agentID.ToStringHyphenated()+"</uuid>"; | 165 | res += "<key>agent-id</key><uuid>" + this.agentID.ToStringHyphenated() + "</uuid>"; |
158 | res += "</map>"; | 166 | res += "</map>"; |
159 | res += "</map></array>"; | 167 | res += "</map></array>"; |
160 | res += "</map></llsd>"; | 168 | res += "</map></llsd>"; |
@@ -195,7 +203,7 @@ namespace OpenSim.Region | |||
195 | 203 | ||
196 | public void UploadHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data) | 204 | public void UploadHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data) |
197 | { | 205 | { |
198 | // Console.WriteLine("upload handler called"); | 206 | // Console.WriteLine("upload handler called"); |
199 | AssetBase asset; | 207 | AssetBase asset; |
200 | asset = new AssetBase(); | 208 | asset = new AssetBase(); |
201 | asset.FullID = assetID; | 209 | asset.FullID = assetID; |