aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Capabilities
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Capabilities')
-rw-r--r--OpenSim/Region/Capabilities/Caps.cs279
-rw-r--r--OpenSim/Region/Capabilities/LLSDArray.cs45
-rw-r--r--OpenSim/Region/Capabilities/LLSDCapEvent.cs45
-rw-r--r--OpenSim/Region/Capabilities/LLSDCapsDetails.cs19
-rw-r--r--OpenSim/Region/Capabilities/LLSDEmpty.cs42
-rw-r--r--OpenSim/Region/Capabilities/LLSDHelpers.cs165
-rw-r--r--OpenSim/Region/Capabilities/LLSDMapLayer.cs50
-rw-r--r--OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs45
-rw-r--r--OpenSim/Region/Capabilities/LLSDMapRequest.cs17
-rw-r--r--OpenSim/Region/Capabilities/LLSDTest.cs45
-rw-r--r--OpenSim/Region/Capabilities/LLSDType.cs53
-rw-r--r--OpenSim/Region/Capabilities/LLSDUploadReply.cs47
-rw-r--r--OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj143
-rw-r--r--OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build56
14 files changed, 1051 insertions, 0 deletions
diff --git a/OpenSim/Region/Capabilities/Caps.cs b/OpenSim/Region/Capabilities/Caps.cs
new file mode 100644
index 0000000..416a6bc
--- /dev/null
+++ b/OpenSim/Region/Capabilities/Caps.cs
@@ -0,0 +1,279 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections;
30using System.Collections.Generic;
31using System.Text;
32using System.IO;
33using System.Xml;
34using OpenSim.Framework.Servers;
35using OpenSim.Framework;
36using OpenSim.Framework.Utilities;
37using OpenSim.Framework.Types;
38using OpenSim.Region.Caches;
39using libsecondlife;
40
41namespace OpenSim.Region.Capabilities
42{
43 public delegate void UpLoadedTexture(LLUUID assetID, LLUUID inventoryItem, byte[] data);
44
45 public class Caps
46 {
47 private string httpListenerAddress;
48 private uint httpListenPort;
49 private string capsObjectPath = "00001-";
50 private string requestPath = "0000/";
51 private string mapLayerPath = "0001/";
52 private string newInventory = "0002/";
53 private string requestTexture = "0003/";
54 private string eventQueue = "0100/";
55 private BaseHttpServer httpListener;
56 private LLUUID agentID;
57 private AssetCache assetCache;
58 private int eventQueueCount = 1;
59 private Queue<string> CapsEventQueue = new Queue<string>();
60
61 public Caps(AssetCache assetCach, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, LLUUID agent)
62 {
63 assetCache = assetCach;
64 capsObjectPath = capsPath;
65 httpListener = httpServer;
66 httpListenerAddress = httpListen;
67 httpListenPort = httpPort;
68 agentID = agent;
69 }
70
71 /// <summary>
72 ///
73 /// </summary>
74 public void RegisterHandlers()
75 {
76 Console.WriteLine("registering CAPS handlers");
77 httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + requestPath, CapsRequest);
78 httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + mapLayerPath, MapLayer);
79 httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + newInventory, NewAgentInventory);
80 httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + eventQueue, ProcessEventQueue);
81 }
82
83 /// <summary>
84 ///
85 /// </summary>
86 /// <param name="request"></param>
87 /// <param name="path"></param>
88 /// <param name="param"></param>
89 /// <returns></returns>
90 public string CapsRequest(string request, string path, string param)
91 {
92 // Console.WriteLine("Caps Request " + request);
93 string result = "";
94 result = LLSDHelpers.SerialiseLLSDReply(this.GetCapabilities());
95 return result;
96 }
97
98 /// <summary>
99 ///
100 /// </summary>
101 /// <returns></returns>
102 protected LLSDCapsDetails GetCapabilities()
103 {
104 /* string capURLS = "";
105 capURLS += "<key>MapLayer</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + mapLayerPath + "</string>";
106 capURLS += "<key>NewFileAgentInventory</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + newInventory + "</string>";
107 //capURLS += "<key>RequestTextureDownload</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + requestTexture + "</string>";
108 //capURLS += "<key>EventQueueGet</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + eventQueue + "</string>";
109 return capURLS;*/
110
111 LLSDCapsDetails caps = new LLSDCapsDetails();
112 caps.MapLayer = "http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + mapLayerPath;
113 caps.NewFileAgentInventory = "http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + newInventory;
114 return caps;
115 }
116
117 /// <summary>
118 ///
119 /// </summary>
120 /// <param name="request"></param>
121 /// <param name="path"></param>
122 /// <param name="param"></param>
123 /// <returns></returns>
124 public string MapLayer(string request, string path, string param)
125 {
126 Encoding _enc = System.Text.Encoding.UTF8;
127 Hashtable hash =(Hashtable) LLSD.LLSDDeserialize(_enc.GetBytes(request));
128 LLSDMapRequest mapReq = new LLSDMapRequest();
129 LLSDHelpers.DeserialiseLLSDMap(hash, mapReq );
130
131 LLSDMapLayerResponse mapResponse= new LLSDMapLayerResponse();
132 mapResponse.LayerData.Array.Add(this.BuildLLSDMapLayerResponse());
133 string res = LLSDHelpers.SerialiseLLSDReply(mapResponse);
134
135 //Console.WriteLine(" Maplayer response is " + res);
136
137 return res;
138 }
139
140 /// <summary>
141 ///
142 /// </summary>
143 /// <returns></returns>
144 protected LLSDMapLayer BuildLLSDMapLayerResponse()
145 {
146 LLSDMapLayer mapLayer = new LLSDMapLayer();
147 mapLayer.Right = 5000;
148 mapLayer.Top = 5000;
149 mapLayer.ImageID = new LLUUID("00000000-0000-0000-9999-000000000006");
150
151 return mapLayer;
152 }
153
154 public string ProcessEventQueue(string request, string path, string param)
155 {
156 string res = "";
157
158 if (this.CapsEventQueue.Count > 0)
159 {
160 lock (this.CapsEventQueue)
161 {
162 string item = CapsEventQueue.Dequeue();
163 res = item;
164 }
165 }
166 else
167 {
168 res = this.CreateEmptyEventResponse();
169 }
170 return res;
171 }
172
173 public string CreateEstablishAgentComms(string caps, string ipAddressPort)
174 {
175 string res = "<llsd><map><key>id</key><integer>" + eventQueueCount + "</integer>";
176 res += "<key>events</key><array><map>";
177 res += "<key>message</key><string>EstablishAgentCommunication</string>";
178 res += "<key>body</key><map>";
179 res += "<key>sim-ip-and-port</key><string>" + ipAddressPort + "</string>";
180 res += "<key>seed-capability</key><string>" + caps + "</string>";
181 res += "<key>agent-id</key><uuid>" + this.agentID.ToStringHyphenated() + "</uuid>";
182 res += "</map>";
183 res += "</map></array>";
184 res += "</map></llsd>";
185 eventQueueCount++;
186 this.CapsEventQueue.Enqueue(res);
187 return res;
188 }
189
190 public string CreateEmptyEventResponse()
191 {
192 string res = "<llsd><map><key>id</key><integer>" + eventQueueCount + "</integer>";
193 res += "<key>events</key><array><map>";
194 res += "</map></array>";
195 res += "</map></llsd>";
196 eventQueueCount++;
197 return res;
198 }
199
200 public string NewAgentInventory(string request, string path, string param)
201 {
202 //Console.WriteLine("received upload request:"+ request);
203 string res = "";
204 LLUUID newAsset = LLUUID.Random();
205 LLUUID newInvItem = LLUUID.Random();
206 string uploaderPath = capsObjectPath + Util.RandomClass.Next(5000, 8000).ToString("0000");
207 AssetUploader uploader = new AssetUploader(newAsset, newInvItem, uploaderPath, this.httpListener);
208 httpListener.AddRestHandler("POST", "/CAPS/" + uploaderPath, uploader.uploaderCaps);
209 string uploaderURL = "http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + uploaderPath;
210 //Console.WriteLine("uploader url is " + uploaderURL);
211 res += "<llsd><map>";
212 res += "<key>uploader</key><string>" + uploaderURL + "</string>";
213 //res += "<key>success</key><boolean>true</boolean>";
214 res += "<key>state</key><string>upload</string>";
215 res += "</map></llsd>";
216 uploader.OnUpLoad += this.UploadHandler;
217 return res;
218 }
219
220 public void UploadHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data)
221 {
222 // Console.WriteLine("upload handler called");
223 AssetBase asset;
224 asset = new AssetBase();
225 asset.FullID = assetID;
226 asset.Type = 0;
227 asset.InvType = 0;
228 asset.Name = "UploadedTexture" + Util.RandomClass.Next(1, 1000).ToString("000");
229 asset.Data = data;
230 this.assetCache.AddAsset(asset);
231 }
232
233 public class AssetUploader
234 {
235 public event UpLoadedTexture OnUpLoad;
236
237 private string uploaderPath = "";
238 private LLUUID newAssetID;
239 private LLUUID inventoryItemID;
240 private BaseHttpServer httpListener;
241 public AssetUploader(LLUUID assetID, LLUUID inventoryItem, string path, BaseHttpServer httpServer)
242 {
243 newAssetID = assetID;
244 inventoryItemID = inventoryItem;
245 uploaderPath = path;
246 httpListener = httpServer;
247
248 }
249
250 public string uploaderCaps(string request, string path, string param)
251 {
252 Encoding _enc = System.Text.Encoding.UTF8;
253 byte[] data = _enc.GetBytes(request);
254 //Console.WriteLine("recieved upload " + Util.FieldToString(data));
255 LLUUID inv = this.inventoryItemID;
256 string res = "";
257 res += "<llsd><map>";
258 res += "<key>new_asset</key><string>" + newAssetID.ToStringHyphenated() + "</string>";
259 res += "<key>new_inventory_item</key><uuid>" + inv.ToStringHyphenated() + "</uuid>";
260 res += "<key>state</key><string>complete</string>";
261 res += "</map></llsd>";
262
263 // Console.WriteLine("asset " + newAssetID.ToStringHyphenated() + " , inventory item " + inv.ToStringHyphenated());
264 httpListener.RemoveRestHandler("POST", "/CAPS/" + uploaderPath);
265 if (OnUpLoad != null)
266 {
267 OnUpLoad(newAssetID, inv, data);
268 }
269
270 /*FileStream fs = File.Create("upload.jp2");
271 BinaryWriter bw = new BinaryWriter(fs);
272 bw.Write(data);
273 bw.Close();
274 fs.Close();*/
275 return res;
276 }
277 }
278 }
279}
diff --git a/OpenSim/Region/Capabilities/LLSDArray.cs b/OpenSim/Region/Capabilities/LLSDArray.cs
new file mode 100644
index 0000000..76d5a2c
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDArray.cs
@@ -0,0 +1,45 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Region.Capabilities
34{
35 [LLSDType("ARRAY")]
36 public class LLSDArray
37 {
38 public ArrayList Array = new ArrayList();
39
40 public LLSDArray()
41 {
42
43 }
44 }
45}
diff --git a/OpenSim/Region/Capabilities/LLSDCapEvent.cs b/OpenSim/Region/Capabilities/LLSDCapEvent.cs
new file mode 100644
index 0000000..d47d25c
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDCapEvent.cs
@@ -0,0 +1,45 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Region.Capabilities
33{
34 [LLSDType("MAP")]
35 public class LLSDCapEvent
36 {
37 public int id = 0;
38 public LLSDArray events = new LLSDArray();
39
40 public LLSDCapEvent()
41 {
42
43 }
44 }
45}
diff --git a/OpenSim/Region/Capabilities/LLSDCapsDetails.cs b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
new file mode 100644
index 0000000..d6db606
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
@@ -0,0 +1,19 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Region.Capabilities
6{
7 [LLSDType("MAP")]
8 public class LLSDCapsDetails
9 {
10 public string MapLayer = "";
11 public string NewFileAgentInventory = "";
12 //public string EventQueueGet = "";
13
14 public LLSDCapsDetails()
15 {
16
17 }
18 }
19}
diff --git a/OpenSim/Region/Capabilities/LLSDEmpty.cs b/OpenSim/Region/Capabilities/LLSDEmpty.cs
new file mode 100644
index 0000000..68f1ce9
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDEmpty.cs
@@ -0,0 +1,42 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Region.Capabilities
33{
34 [LLSDType("MAP")]
35 public class LLSDEmpty
36 {
37 public LLSDEmpty()
38 {
39
40 }
41 }
42}
diff --git a/OpenSim/Region/Capabilities/LLSDHelpers.cs b/OpenSim/Region/Capabilities/LLSDHelpers.cs
new file mode 100644
index 0000000..76d9345
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDHelpers.cs
@@ -0,0 +1,165 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections;
30using System.Collections.Generic;
31using System.Text;
32using System.IO;
33using System.Xml;
34using libsecondlife;
35
36namespace OpenSim.Region.Capabilities
37{
38 public class LLSDHelpers
39 {
40 public static string SerialiseLLSDReply(object obj)
41 {
42 StringWriter sw = new StringWriter();
43 XmlTextWriter writer = new XmlTextWriter(sw);
44 writer.Formatting = Formatting.None;
45 writer.WriteStartElement(String.Empty, "llsd", String.Empty);
46 LLSDHelpers.SerializeLLSDType(writer, obj);
47 writer.WriteEndElement();
48 writer.Close();
49 return sw.ToString();
50 }
51
52 public static void SerializeLLSDType(XmlTextWriter writer, object obj)
53 {
54 Type myType = obj.GetType();
55 LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false);
56 if (llsdattributes.Length > 0)
57 {
58 switch (llsdattributes[0].ObjectType)
59 {
60 case "MAP":
61 writer.WriteStartElement(String.Empty, "map", String.Empty);
62 System.Reflection.FieldInfo[] fields = myType.GetFields();
63 for (int i = 0; i < fields.Length; i++)
64 {
65 object fieldValue = fields[i].GetValue(obj);
66 LLSDType[] fieldAttributes = (LLSDType[])fieldValue.GetType().GetCustomAttributes(typeof(LLSDType), false);
67 if (fieldAttributes.Length > 0)
68 {
69 writer.WriteStartElement(String.Empty, "key", String.Empty);
70 writer.WriteString(fields[i].Name);
71 writer.WriteEndElement();
72 SerializeLLSDType(writer, fieldValue);
73 }
74 else
75 {
76 writer.WriteStartElement(String.Empty, "key", String.Empty);
77 writer.WriteString(fields[i].Name);
78 writer.WriteEndElement();
79 LLSD.LLSDWriteOne(writer, fieldValue);
80 }
81 }
82 writer.WriteEndElement();
83 break;
84 case "ARRAY":
85 // LLSDArray arrayObject = obj as LLSDArray;
86 // ArrayList a = arrayObject.Array;
87 ArrayList a = (ArrayList)obj.GetType().GetField("Array").GetValue(obj);
88 if (a != null)
89 {
90 writer.WriteStartElement(String.Empty, "array", String.Empty);
91 foreach (object item in a)
92 {
93 SerializeLLSDType(writer, item);
94 }
95 writer.WriteEndElement();
96 }
97 break;
98 }
99 }
100 else
101 {
102 LLSD.LLSDWriteOne(writer, obj);
103 }
104 }
105
106 public static object DeserialiseLLSDMap(Hashtable llsd, object obj)
107 {
108 Type myType = obj.GetType();
109 LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false);
110 if (llsdattributes.Length > 0)
111 {
112 switch (llsdattributes[0].ObjectType)
113 {
114 case "MAP":
115 IDictionaryEnumerator enumerator = llsd.GetEnumerator();
116 while (enumerator.MoveNext())
117 {
118 System.Reflection.FieldInfo field = myType.GetField((string)enumerator.Key);
119 if (field != null)
120 {
121 if (enumerator.Value is Hashtable)
122 {
123 object fieldValue = field.GetValue(obj);
124 DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue);
125 }
126 else if (enumerator.Value is ArrayList)
127 {
128 object fieldValue = field.GetValue(obj);
129 fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value);
130 //TODO
131 // the LLSD map/array types in the array need to be deserialised
132 // but first we need to know the right class to deserialise them into.
133 }
134 else
135 {
136 field.SetValue(obj, enumerator.Value);
137 }
138 }
139 }
140 break;
141 }
142 }
143 return obj;
144 }
145 }
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165}
diff --git a/OpenSim/Region/Capabilities/LLSDMapLayer.cs b/OpenSim/Region/Capabilities/LLSDMapLayer.cs
new file mode 100644
index 0000000..b097ec3
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDMapLayer.cs
@@ -0,0 +1,50 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32using libsecondlife;
33
34namespace OpenSim.Region.Capabilities
35{
36 [LLSDType("MAP")]
37 public class LLSDMapLayer
38 {
39 public int Left = 0;
40 public int Right = 0;
41 public int Top = 0;
42 public int Bottom = 0;
43 public LLUUID ImageID = LLUUID.Zero;
44
45 public LLSDMapLayer()
46 {
47
48 }
49 }
50}
diff --git a/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs b/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs
new file mode 100644
index 0000000..ee37a5b
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs
@@ -0,0 +1,45 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Region.Capabilities
33{
34 [LLSDType("MAP")]
35 public class LLSDMapLayerResponse
36 {
37 public LLSDMapRequest AgentData = new LLSDMapRequest();
38 public LLSDArray LayerData = new LLSDArray();
39
40 public LLSDMapLayerResponse()
41 {
42
43 }
44 }
45}
diff --git a/OpenSim/Region/Capabilities/LLSDMapRequest.cs b/OpenSim/Region/Capabilities/LLSDMapRequest.cs
new file mode 100644
index 0000000..b15f1be
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDMapRequest.cs
@@ -0,0 +1,17 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Region.Capabilities
6{
7 [LLSDType("MAP")]
8 public class LLSDMapRequest
9 {
10 public int Flags = 0;
11
12 public LLSDMapRequest()
13 {
14
15 }
16 }
17}
diff --git a/OpenSim/Region/Capabilities/LLSDTest.cs b/OpenSim/Region/Capabilities/LLSDTest.cs
new file mode 100644
index 0000000..3948f2c
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDTest.cs
@@ -0,0 +1,45 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Region.Capabilities
33{
34 [LLSDType("MAP")]
35 public class LLSDTest
36 {
37 public int Test1 = 20;
38 public int Test2 = 10;
39
40 public LLSDTest()
41 {
42
43 }
44 }
45}
diff --git a/OpenSim/Region/Capabilities/LLSDType.cs b/OpenSim/Region/Capabilities/LLSDType.cs
new file mode 100644
index 0000000..7da5861
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDType.cs
@@ -0,0 +1,53 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Region.Capabilities
33{
34 [AttributeUsage(AttributeTargets.Class)]
35 public class LLSDType : Attribute
36 {
37 private string myType;
38
39 public LLSDType(string type)
40 {
41 myType = type;
42
43 }
44
45 public string ObjectType
46 {
47 get
48 {
49 return myType;
50 }
51 }
52 }
53}
diff --git a/OpenSim/Region/Capabilities/LLSDUploadReply.cs b/OpenSim/Region/Capabilities/LLSDUploadReply.cs
new file mode 100644
index 0000000..83cf166
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDUploadReply.cs
@@ -0,0 +1,47 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32using libsecondlife;
33namespace OpenSim.Region.Capabilities
34{
35 [LLSDType("MAP")]
36 public class LLSDUploadReply
37 {
38 public string new_asset = "";
39 public LLUUID new_inventory_item = LLUUID.Zero;
40 public string state = "";
41
42 public LLSDUploadReply()
43 {
44
45 }
46 }
47}
diff --git a/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj
new file mode 100644
index 0000000..4667d52
--- /dev/null
+++ b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj
@@ -0,0 +1,143 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{39038E85-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Region.Capabilities</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Region.Capabilities</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn>
59 </PropertyGroup>
60 <ItemGroup>
61 <Reference Include="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System" >
66 <HintPath>System.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System.Xml" >
70 <HintPath>System.Xml.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="XMLRPC.dll" >
74 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 </ItemGroup>
78 <ItemGroup>
79 <ProjectReference Include="..\..\Framework\General\OpenSim.Framework.csproj">
80 <Name>OpenSim.Framework</Name>
81 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
83 <Private>False</Private>
84 </ProjectReference>
85 <ProjectReference Include="..\..\Framework\Servers\OpenSim.Framework.Servers.csproj">
86 <Name>OpenSim.Framework.Servers</Name>
87 <Project>{2CC71860-0000-0000-0000-000000000000}</Project>
88 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
89 <Private>False</Private>
90 </ProjectReference>
91 <ProjectReference Include="..\Caches\OpenSim.Region.Caches.csproj">
92 <Name>OpenSim.Region.Caches</Name>
93 <Project>{61FCCDB3-0000-0000-0000-000000000000}</Project>
94 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
95 <Private>False</Private>
96 </ProjectReference>
97 </ItemGroup>
98 <ItemGroup>
99 <Compile Include="Caps.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 <Compile Include="LLSDArray.cs">
103 <SubType>Code</SubType>
104 </Compile>
105 <Compile Include="LLSDCapEvent.cs">
106 <SubType>Code</SubType>
107 </Compile>
108 <Compile Include="LLSDCapsDetails.cs">
109 <SubType>Code</SubType>
110 </Compile>
111 <Compile Include="LLSDEmpty.cs">
112 <SubType>Code</SubType>
113 </Compile>
114 <Compile Include="LLSDHelpers.cs">
115 <SubType>Code</SubType>
116 </Compile>
117 <Compile Include="LLSDMapLayer.cs">
118 <SubType>Code</SubType>
119 </Compile>
120 <Compile Include="LLSDMapLayerResponse.cs">
121 <SubType>Code</SubType>
122 </Compile>
123 <Compile Include="LLSDMapRequest.cs">
124 <SubType>Code</SubType>
125 </Compile>
126 <Compile Include="LLSDTest.cs">
127 <SubType>Code</SubType>
128 </Compile>
129 <Compile Include="LLSDType.cs">
130 <SubType>Code</SubType>
131 </Compile>
132 <Compile Include="LLSDUploadReply.cs">
133 <SubType>Code</SubType>
134 </Compile>
135 </ItemGroup>
136 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
137 <PropertyGroup>
138 <PreBuildEvent>
139 </PreBuildEvent>
140 <PostBuildEvent>
141 </PostBuildEvent>
142 </PropertyGroup>
143</Project>
diff --git a/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build
new file mode 100644
index 0000000..a091b5c
--- /dev/null
+++ b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build
@@ -0,0 +1,56 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Region.Capabilities" default="build">
3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
6 <copy todir="${project::get-base-directory()}/${build.dir}">
7 <fileset basedir="${project::get-base-directory()}">
8 </fileset>
9 </copy>
10 <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
11 <resources prefix="OpenSim.Region.Capabilities" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="Caps.cs" />
15 <include name="LLSDArray.cs" />
16 <include name="LLSDCapEvent.cs" />
17 <include name="LLSDCapsDetails.cs" />
18 <include name="LLSDEmpty.cs" />
19 <include name="LLSDHelpers.cs" />
20 <include name="LLSDMapLayer.cs" />
21 <include name="LLSDMapLayerResponse.cs" />
22 <include name="LLSDMapRequest.cs" />
23 <include name="LLSDTest.cs" />
24 <include name="LLSDType.cs" />
25 <include name="LLSDUploadReply.cs" />
26 </sources>
27 <references basedir="${project::get-base-directory()}">
28 <lib>
29 <include name="${project::get-base-directory()}" />
30 <include name="${project::get-base-directory()}/${build.dir}" />
31 </lib>
32 <include name="../../../bin/libsecondlife.dll" />
33 <include name="../../../bin/OpenSim.Framework.dll" />
34 <include name="../../../bin/OpenSim.Framework.Servers.dll" />
35 <include name="../../../bin/OpenSim.Region.Caches.dll" />
36 <include name="System.dll" />
37 <include name="System.Xml.dll" />
38 <include name="../../../bin/XMLRPC.dll" />
39 </references>
40 </csc>
41 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
42 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
43 <copy todir="${project::get-base-directory()}/../../../bin/">
44 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
45 <include name="*.dll"/>
46 <include name="*.exe"/>
47 </fileset>
48 </copy>
49 </target>
50 <target name="clean">
51 <delete dir="${bin.dir}" failonerror="false" />
52 <delete dir="${obj.dir}" failonerror="false" />
53 </target>
54 <target name="doc" description="Creates documentation.">
55 </target>
56</project>