aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Capabilities/LLSDHelpers.cs
diff options
context:
space:
mode:
authorlbsa712007-06-29 13:51:21 +0000
committerlbsa712007-06-29 13:51:21 +0000
commitf6deaf8a65693d022f58961a007f2492c9ac97fa (patch)
tree7428eccc93a3f64f46e08d7269bc337f3d26d8a8 /OpenSim/Region/Capabilities/LLSDHelpers.cs
parentDeleted some files that are no longer in use. (I am sure I deleted these yest... (diff)
parent*Hopefully fixed the empty dialog box error on client when logging in on sand... (diff)
downloadopensim-SC-f6deaf8a65693d022f58961a007f2492c9ac97fa.zip
opensim-SC-f6deaf8a65693d022f58961a007f2492c9ac97fa.tar.gz
opensim-SC-f6deaf8a65693d022f58961a007f2492c9ac97fa.tar.bz2
opensim-SC-f6deaf8a65693d022f58961a007f2492c9ac97fa.tar.xz
Switched in NameSpaceChanges
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Capabilities/LLSDHelpers.cs (renamed from Common/OpenSim.Framework/LLSDHelpers.cs)169
1 files changed, 44 insertions, 125 deletions
diff --git a/Common/OpenSim.Framework/LLSDHelpers.cs b/OpenSim/Region/Capabilities/LLSDHelpers.cs
index 051520c..76d9345 100644
--- a/Common/OpenSim.Framework/LLSDHelpers.cs
+++ b/OpenSim/Region/Capabilities/LLSDHelpers.cs
@@ -1,3 +1,30 @@
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*/
1using System; 28using System;
2using System.Collections; 29using System.Collections;
3using System.Collections.Generic; 30using System.Collections.Generic;
@@ -6,7 +33,7 @@ using System.IO;
6using System.Xml; 33using System.Xml;
7using libsecondlife; 34using libsecondlife;
8 35
9namespace OpenSim.Framework 36namespace OpenSim.Region.Capabilities
10{ 37{
11 public class LLSDHelpers 38 public class LLSDHelpers
12 { 39 {
@@ -46,7 +73,6 @@ namespace OpenSim.Framework
46 } 73 }
47 else 74 else
48 { 75 {
49 //Console.WriteLine("LLSD field name" + fields[i].Name + " , " + fields[i].GetValue(obj).GetType());
50 writer.WriteStartElement(String.Empty, "key", String.Empty); 76 writer.WriteStartElement(String.Empty, "key", String.Empty);
51 writer.WriteString(fields[i].Name); 77 writer.WriteString(fields[i].Name);
52 writer.WriteEndElement(); 78 writer.WriteEndElement();
@@ -59,12 +85,15 @@ namespace OpenSim.Framework
59 // LLSDArray arrayObject = obj as LLSDArray; 85 // LLSDArray arrayObject = obj as LLSDArray;
60 // ArrayList a = arrayObject.Array; 86 // ArrayList a = arrayObject.Array;
61 ArrayList a = (ArrayList)obj.GetType().GetField("Array").GetValue(obj); 87 ArrayList a = (ArrayList)obj.GetType().GetField("Array").GetValue(obj);
62 writer.WriteStartElement(String.Empty, "array", String.Empty); 88 if (a != null)
63 foreach (object item in a)
64 { 89 {
65 SerializeLLSDType(writer, item); 90 writer.WriteStartElement(String.Empty, "array", String.Empty);
91 foreach (object item in a)
92 {
93 SerializeLLSDType(writer, item);
94 }
95 writer.WriteEndElement();
66 } 96 }
67 writer.WriteEndElement();
68 break; 97 break;
69 } 98 }
70 } 99 }
@@ -115,132 +144,22 @@ namespace OpenSim.Framework
115 } 144 }
116 } 145 }
117 146
118 [LLSDType("MAP")] 147
119 public class LLSDMapLayerResponse
120 {
121 public LLSDMapRequest AgentData = new LLSDMapRequest();
122 public LLSDArray LayerData = new LLSDArray();
123
124 public LLSDMapLayerResponse()
125 {
126
127 }
128 }
129
130 [LLSDType("MAP")]
131 public class LLSDCapsDetails
132 {
133 public string MapLayer = "";
134 public string NewFileAgentInventory = "";
135 //public string EventQueueGet = "";
136
137 public LLSDCapsDetails()
138 {
139
140 }
141 }
142
143 [LLSDType("MAP")]
144 public class LLSDMapLayer
145 {
146 public int Left = 0;
147 public int Right = 0;
148 public int Top = 0;
149 public int Bottom = 0;
150 public LLUUID ImageID = LLUUID.Zero;
151 148
152 public LLSDMapLayer() 149
153 {
154
155 }
156 }
157 150
158 [LLSDType("ARRAY")] 151
159 public class LLSDArray
160 {
161 public ArrayList Array = new ArrayList();
162 152
163 public LLSDArray() 153
164 {
165 154
166 } 155
167 }
168 156
169 [LLSDType("MAP")] 157
170 public class LLSDMapRequest
171 {
172 public int Flags = 0;
173 158
174 public LLSDMapRequest() 159
175 {
176
177 }
178 }
179 160
180 [LLSDType("MAP")] 161
181 public class LLSDUploadReply
182 {
183 public string new_asset = "";
184 public LLUUID new_inventory_item = LLUUID.Zero;
185 public string state = "";
186 162
187 public LLSDUploadReply()
188 {
189 163
190 } 164
191 }
192
193 [LLSDType("MAP")]
194 public class LLSDCapEvent
195 {
196 public int id = 0;
197 public LLSDArray events = new LLSDArray();
198
199 public LLSDCapEvent()
200 {
201
202 }
203 }
204
205 [LLSDType("MAP")]
206 public class LLSDEmpty
207 {
208 public LLSDEmpty()
209 {
210
211 }
212 }
213
214 [LLSDType("MAP")]
215 public class LLSDTest
216 {
217 public int Test1 = 20;
218 public int Test2 = 10;
219
220 public LLSDTest()
221 {
222
223 }
224 }
225
226
227 [AttributeUsage(AttributeTargets.Class)]
228 public class LLSDType : Attribute
229 {
230 private string myType;
231
232 public LLSDType(string type)
233 {
234 myType = type;
235
236 }
237
238 public string ObjectType
239 {
240 get
241 {
242 return myType;
243 }
244 }
245 }
246} 165}