diff options
author | MW | 2007-06-27 15:03:54 +0000 |
---|---|---|
committer | MW | 2007-06-27 15:03:54 +0000 |
commit | 223550b7e4f9eb534728e7763642a2ba6154be96 (patch) | |
tree | cd6ebbefd3c06487f40c3c30b344d6c2fccb1df5 /Common/OpenSim.Framework/LLSDHelpers.cs | |
parent | * Begun reimplementing scripting. (diff) | |
download | opensim-SC_OLD-223550b7e4f9eb534728e7763642a2ba6154be96.zip opensim-SC_OLD-223550b7e4f9eb534728e7763642a2ba6154be96.tar.gz opensim-SC_OLD-223550b7e4f9eb534728e7763642a2ba6154be96.tar.bz2 opensim-SC_OLD-223550b7e4f9eb534728e7763642a2ba6154be96.tar.xz |
Some very Preliminary work on .net remoting for interregion comms.
a few more classes for CAPS LLSD types.
Diffstat (limited to 'Common/OpenSim.Framework/LLSDHelpers.cs')
-rw-r--r-- | Common/OpenSim.Framework/LLSDHelpers.cs | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/Common/OpenSim.Framework/LLSDHelpers.cs b/Common/OpenSim.Framework/LLSDHelpers.cs index 3b044a3..051520c 100644 --- a/Common/OpenSim.Framework/LLSDHelpers.cs +++ b/Common/OpenSim.Framework/LLSDHelpers.cs | |||
@@ -89,7 +89,23 @@ namespace OpenSim.Framework | |||
89 | System.Reflection.FieldInfo field = myType.GetField((string)enumerator.Key); | 89 | System.Reflection.FieldInfo field = myType.GetField((string)enumerator.Key); |
90 | if (field != null) | 90 | if (field != null) |
91 | { | 91 | { |
92 | field.SetValue(obj, enumerator.Value); | 92 | if (enumerator.Value is Hashtable) |
93 | { | ||
94 | object fieldValue = field.GetValue(obj); | ||
95 | DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue); | ||
96 | } | ||
97 | else if (enumerator.Value is ArrayList) | ||
98 | { | ||
99 | object fieldValue = field.GetValue(obj); | ||
100 | fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value); | ||
101 | //TODO | ||
102 | // the LLSD map/array types in the array need to be deserialised | ||
103 | // but first we need to know the right class to deserialise them into. | ||
104 | } | ||
105 | else | ||
106 | { | ||
107 | field.SetValue(obj, enumerator.Value); | ||
108 | } | ||
93 | } | 109 | } |
94 | } | 110 | } |
95 | break; | 111 | break; |
@@ -161,6 +177,39 @@ namespace OpenSim.Framework | |||
161 | } | 177 | } |
162 | } | 178 | } |
163 | 179 | ||
180 | [LLSDType("MAP")] | ||
181 | public class LLSDUploadReply | ||
182 | { | ||
183 | public string new_asset = ""; | ||
184 | public LLUUID new_inventory_item = LLUUID.Zero; | ||
185 | public string state = ""; | ||
186 | |||
187 | public LLSDUploadReply() | ||
188 | { | ||
189 | |||
190 | } | ||
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 | } | ||
164 | 213 | ||
165 | [LLSDType("MAP")] | 214 | [LLSDType("MAP")] |
166 | public class LLSDTest | 215 | public class LLSDTest |