aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/Types
diff options
context:
space:
mode:
authorMW2007-10-29 21:46:25 +0000
committerMW2007-10-29 21:46:25 +0000
commit3d8219f6c7faa256d6a13ab7925f75d83af95b78 (patch)
treeea507efa88aa7e526575469a6ce913fdc0c0358e /OpenSim/Framework/General/Types
parentFixed a bug in SQLAssetServer that only seemed to be a problem when running u... (diff)
downloadopensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.zip
opensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.tar.gz
opensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.tar.bz2
opensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.tar.xz
as per the "Filesystem cleanup for OpenSim repository" mailing list thread. Have flattened the OpenSim.Framework project/namespace. The problem is that the namespace is still wrong as its "OpenSim.Framework" while the directory is "OpenSim\Framework\General" , so we need to decide if we change the directory or correct the namespace.
Note this has lead to a big flat project, but I think a lot of the files we most likely don't even use any longer. And others belong in other projects/namespaces anyway.
Diffstat (limited to 'OpenSim/Framework/General/Types')
-rw-r--r--OpenSim/Framework/General/Types/AgentCiruitData.cs49
-rw-r--r--OpenSim/Framework/General/Types/AgentWearable.cs72
-rw-r--r--OpenSim/Framework/General/Types/AssetBase.cs56
-rw-r--r--OpenSim/Framework/General/Types/AssetLandmark.cs59
-rw-r--r--OpenSim/Framework/General/Types/AssetStorage.cs47
-rw-r--r--OpenSim/Framework/General/Types/EstateSettings.cs738
-rw-r--r--OpenSim/Framework/General/Types/InventoryItemBase.cs228
-rw-r--r--OpenSim/Framework/General/Types/LandData.cs120
-rw-r--r--OpenSim/Framework/General/Types/Login.cs50
-rw-r--r--OpenSim/Framework/General/Types/MapBlockData.cs51
-rw-r--r--OpenSim/Framework/General/Types/NeighbourInfo.cs42
-rw-r--r--OpenSim/Framework/General/Types/NetworkServersInfo.cs94
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs224
-rw-r--r--OpenSim/Framework/General/Types/RegionHandle.cs149
-rw-r--r--OpenSim/Framework/General/Types/RegionInfo.cs350
-rw-r--r--OpenSim/Framework/General/Types/UUID.cs155
-rw-r--r--OpenSim/Framework/General/Types/UserProfileData.cs191
17 files changed, 0 insertions, 2675 deletions
diff --git a/OpenSim/Framework/General/Types/AgentCiruitData.cs b/OpenSim/Framework/General/Types/AgentCiruitData.cs
deleted file mode 100644
index 5695197..0000000
--- a/OpenSim/Framework/General/Types/AgentCiruitData.cs
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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 libsecondlife;
29using System;
30
31namespace OpenSim.Framework.Types
32{
33 [Serializable]
34 public class AgentCircuitData
35 {
36 public AgentCircuitData() { }
37 public LLUUID AgentID;
38 public LLUUID SessionID;
39 public LLUUID SecureSessionID;
40 public LLVector3 startpos;
41 public string firstname;
42 public string lastname;
43 public uint circuitcode;
44 public bool child;
45 public LLUUID InventoryFolder;
46 public LLUUID BaseFolder;
47 public string CapsPath = "";
48 }
49}
diff --git a/OpenSim/Framework/General/Types/AgentWearable.cs b/OpenSim/Framework/General/Types/AgentWearable.cs
deleted file mode 100644
index ecd45d5..0000000
--- a/OpenSim/Framework/General/Types/AgentWearable.cs
+++ /dev/null
@@ -1,72 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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 libsecondlife;
29
30namespace OpenSim.Framework.Types
31{
32 public class AvatarWearable
33 {
34 public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000");
35 public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000");
36
37 public AvatarWearable()
38 {
39
40 }
41
42 public AvatarWearable( LLUUID itemId, LLUUID assetId )
43 {
44 AssetID = assetId;
45 ItemID = itemId;
46 }
47
48 public static AvatarWearable[] DefaultWearables
49 {
50 get
51 {
52 AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these
53 for (int i = 0; i < 13; i++)
54 {
55 defaultWearables[i] = new AvatarWearable();
56 }
57 defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
58 defaultWearables[0].ItemID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9");
59
60 defaultWearables[1].ItemID = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9");
61 defaultWearables[1].AssetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb");
62
63 defaultWearables[4].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000");
64 defaultWearables[4].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111110");
65
66 defaultWearables[5].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111");
67 defaultWearables[5].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111120");
68 return defaultWearables;
69 }
70 }
71 }
72}
diff --git a/OpenSim/Framework/General/Types/AssetBase.cs b/OpenSim/Framework/General/Types/AssetBase.cs
deleted file mode 100644
index c34887c..0000000
--- a/OpenSim/Framework/General/Types/AssetBase.cs
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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 libsecondlife;
30
31namespace OpenSim.Framework.Types
32{
33 [Serializable]
34 public class AssetBase
35 {
36 public byte[] Data;
37 public LLUUID FullID;
38 public sbyte Type;
39 public sbyte InvType;
40 public string Name = "";
41 public string Description = "";
42 public bool Local = false;
43 public bool Temporary = false;
44
45 public AssetBase()
46 {
47
48 }
49
50 public AssetBase(LLUUID assetId, string name)
51 {
52 FullID = assetId;
53 Name = name;
54 }
55 }
56}
diff --git a/OpenSim/Framework/General/Types/AssetLandmark.cs b/OpenSim/Framework/General/Types/AssetLandmark.cs
deleted file mode 100644
index 0c9fadd..0000000
--- a/OpenSim/Framework/General/Types/AssetLandmark.cs
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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.Text;
29using libsecondlife;
30
31namespace OpenSim.Framework.Types
32{
33 public class AssetLandmark : AssetBase
34 {
35 public int Version;
36 public LLVector3 Position;
37 public LLUUID RegionID;
38
39 public AssetLandmark(AssetBase a)
40 {
41 this.Data = a.Data;
42 this.FullID = a.FullID;
43 this.Type = a.Type;
44 this.InvType = a.InvType;
45 this.Name = a.Name;
46 this.Description = a.Description;
47 InternData();
48 }
49
50 private void InternData()
51 {
52 string temp = Encoding.UTF8.GetString(Data).Trim();
53 string[] parts = temp.Split('\n');
54 int.TryParse(parts[0].Substring(17, 1), out Version);
55 LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID);
56 LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position);
57 }
58 }
59}
diff --git a/OpenSim/Framework/General/Types/AssetStorage.cs b/OpenSim/Framework/General/Types/AssetStorage.cs
deleted file mode 100644
index 54b9593..0000000
--- a/OpenSim/Framework/General/Types/AssetStorage.cs
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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 libsecondlife;
29
30namespace OpenSim.Framework.Types
31{
32 public class AssetStorage
33 {
34
35 public AssetStorage() {
36 }
37
38 public AssetStorage(LLUUID assetUUID) {
39 UUID=assetUUID;
40 }
41
42 public byte[] Data;
43 public sbyte Type;
44 public string Name;
45 public LLUUID UUID;
46 }
47}
diff --git a/OpenSim/Framework/General/Types/EstateSettings.cs b/OpenSim/Framework/General/Types/EstateSettings.cs
deleted file mode 100644
index 2675e52..0000000
--- a/OpenSim/Framework/General/Types/EstateSettings.cs
+++ /dev/null
@@ -1,738 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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.IO;
29using libsecondlife;
30using OpenSim.Framework.Configuration;
31using OpenSim.Framework.Utilities;
32using System.Globalization;
33
34namespace OpenSim.Framework.Types
35{
36 public class EstateSettings
37 {
38
39 //Settings to this island
40 private float m_billableFactor;
41 public float billableFactor
42 {
43 get
44 {
45 return m_billableFactor;
46 }
47 set
48 {
49 m_billableFactor = value;
50 configMember.forceSetConfigurationOption("billable_factor", m_billableFactor.ToString());
51 }
52 }
53
54
55 private uint m_estateID;
56 public uint estateID
57 {
58 get
59 {
60 return m_estateID;
61 }
62 set
63 {
64 m_estateID = value;
65 configMember.forceSetConfigurationOption("estate_id", m_estateID.ToString());
66 }
67 }
68
69
70 private uint m_parentEstateID;
71 public uint parentEstateID
72 {
73 get
74 {
75 return m_parentEstateID;
76 }
77 set
78 {
79 m_parentEstateID = value;
80 configMember.forceSetConfigurationOption("parent_estate_id", m_parentEstateID.ToString());
81 }
82 }
83
84 private byte m_maxAgents;
85 public byte maxAgents
86 {
87 get
88 {
89 return m_maxAgents;
90 }
91 set
92 {
93 m_maxAgents = value;
94 configMember.forceSetConfigurationOption("max_agents", m_maxAgents.ToString());
95 }
96 }
97
98 private float m_objectBonusFactor;
99 public float objectBonusFactor
100 {
101 get
102 {
103 return m_objectBonusFactor;
104 }
105 set
106 {
107 m_objectBonusFactor = value;
108 configMember.forceSetConfigurationOption("object_bonus_factor", m_objectBonusFactor.ToString());
109 }
110 }
111
112 private int m_redirectGridX;
113 public int redirectGridX
114 {
115 get
116 {
117 return m_redirectGridX;
118 }
119 set
120 {
121 m_redirectGridX = value;
122 configMember.forceSetConfigurationOption("redirect_grid_x", m_redirectGridX.ToString());
123 }
124 }
125
126 private int m_redirectGridY;
127 public int redirectGridY
128 {
129 get
130 {
131 return m_redirectGridY;
132 }
133 set
134 {
135 m_redirectGridY = value;
136 configMember.forceSetConfigurationOption("redirect_grid_y", m_redirectGridY.ToString());
137 }
138 }
139
140 private Simulator.RegionFlags m_regionFlags;
141 public Simulator.RegionFlags regionFlags
142 {
143 get
144 {
145 return m_regionFlags;
146 }
147 set
148 {
149 m_regionFlags = value;
150 configMember.forceSetConfigurationOption("region_flags", m_regionFlags.ToString());
151 }
152 }
153
154
155 private Simulator.SimAccess m_simAccess;
156 public Simulator.SimAccess simAccess
157 {
158 get
159 {
160 return m_simAccess;
161 }
162 set
163 {
164 m_simAccess = value;
165 configMember.forceSetConfigurationOption("sim_access", m_simAccess.ToString());
166 }
167 }
168
169 private float m_sunHour;
170 public float sunHour
171 {
172 get
173 {
174 return m_sunHour;
175 }
176 set
177 {
178 m_sunHour = value;
179 configMember.forceSetConfigurationOption("sun_hour", m_sunHour.ToString());
180 }
181 }
182
183 private float m_terrainRaiseLimit;
184 public float terrainRaiseLimit
185 {
186 get
187 {
188 return m_terrainRaiseLimit;
189 }
190 set
191 {
192 m_terrainRaiseLimit = value;
193 configMember.forceSetConfigurationOption("terrain_raise_limit", m_terrainRaiseLimit.ToString());
194 }
195 }
196
197 private float m_terrainLowerLimit;
198 public float terrainLowerLimit
199 {
200 get
201 {
202 return m_terrainLowerLimit;
203 }
204 set
205 {
206 m_terrainLowerLimit = value;
207 configMember.forceSetConfigurationOption("terrain_lower_limit", m_terrainLowerLimit.ToString());
208 }
209 }
210
211 private bool m_useFixedSun;
212 public bool useFixedSun
213 {
214 get
215 {
216 return m_useFixedSun;
217 }
218 set
219 {
220 m_useFixedSun = value;
221 configMember.forceSetConfigurationOption("use_fixed_sun", m_useFixedSun.ToString());
222 }
223 }
224
225
226 private int m_pricePerMeter;
227 public int pricePerMeter
228 {
229 get
230 {
231 return m_pricePerMeter;
232 }
233 set
234 {
235 m_pricePerMeter = value;
236 configMember.forceSetConfigurationOption("price_per_meter", m_pricePerMeter.ToString());
237 }
238 }
239
240
241 private ushort m_regionWaterHeight;
242 public ushort regionWaterHeight
243 {
244 get
245 {
246 return m_regionWaterHeight;
247 }
248 set
249 {
250 m_regionWaterHeight = value;
251 configMember.forceSetConfigurationOption("region_water_height", m_regionWaterHeight.ToString());
252 }
253 }
254
255
256 private bool m_regionAllowTerraform;
257 public bool regionAllowTerraform
258 {
259 get
260 {
261 return m_regionAllowTerraform;
262 }
263 set
264 {
265 m_regionAllowTerraform = value;
266 configMember.forceSetConfigurationOption("region_allow_terraform", m_regionAllowTerraform.ToString());
267 }
268 }
269
270
271 // Region Information
272 // Low resolution 'base' textures. No longer used.
273 private LLUUID m_terrainBase0;
274 public LLUUID terrainBase0
275 {
276 get
277 {
278 return m_terrainBase0;
279 }
280 set
281 {
282 m_terrainBase0 = value;
283 configMember.forceSetConfigurationOption("terrain_base_0", m_terrainBase0.ToString());
284 }
285 }
286
287 private LLUUID m_terrainBase1;
288 public LLUUID terrainBase1
289 {
290 get
291 {
292 return m_terrainBase1;
293 }
294 set
295 {
296 m_terrainBase1 = value;
297 configMember.forceSetConfigurationOption("terrain_base_1", m_terrainBase1.ToString());
298 }
299 }
300
301 private LLUUID m_terrainBase2;
302 public LLUUID terrainBase2
303 {
304 get
305 {
306 return m_terrainBase2;
307 }
308 set
309 {
310 m_terrainBase2 = value;
311 configMember.forceSetConfigurationOption("terrain_base_2", m_terrainBase2.ToString());
312 }
313 }
314
315 private LLUUID m_terrainBase3;
316 public LLUUID terrainBase3
317 {
318 get
319 {
320 return m_terrainBase3;
321 }
322 set
323 {
324 m_terrainBase3 = value;
325 configMember.forceSetConfigurationOption("terrain_base_3", m_terrainBase3.ToString());
326 }
327 }
328
329
330 // Higher resolution terrain textures
331 private LLUUID m_terrainDetail0;
332 public LLUUID terrainDetail0
333 {
334 get
335 {
336 return m_terrainDetail0;
337 }
338 set
339 {
340
341 m_terrainDetail0 = value;
342 configMember.forceSetConfigurationOption("terrain_detail_0", m_terrainDetail0.ToString());
343 }
344 }
345
346 private LLUUID m_terrainDetail1;
347 public LLUUID terrainDetail1
348 {
349 get
350 {
351 return m_terrainDetail1;
352 }
353 set
354 {
355 m_terrainDetail1 = value;
356 configMember.forceSetConfigurationOption("terrain_detail_1", m_terrainDetail1.ToString());
357 }
358 }
359 private LLUUID m_terrainDetail2;
360 public LLUUID terrainDetail2
361 {
362 get
363 {
364 return m_terrainDetail2;
365 }
366 set
367 {
368 m_terrainDetail2 = value;
369 configMember.forceSetConfigurationOption("terrain_detail_2", m_terrainDetail2.ToString());
370 }
371 }
372 private LLUUID m_terrainDetail3;
373 public LLUUID terrainDetail3
374 {
375 get
376 {
377 return m_terrainDetail3;
378 }
379 set
380 {
381 m_terrainDetail3 = value;
382 configMember.forceSetConfigurationOption("terrain_detail_3", m_terrainDetail3.ToString());
383 }
384 }
385
386 // First quad - each point is bilinearly interpolated at each meter of terrain
387 private float m_terrainStartHeight0;
388 public float terrainStartHeight0
389 {
390 get
391 {
392 return m_terrainStartHeight0;
393 }
394 set
395 {
396 m_terrainStartHeight0 = value;
397 configMember.forceSetConfigurationOption("terrain_start_height_0", m_terrainStartHeight0.ToString());
398 }
399 }
400
401
402 private float m_terrainStartHeight1;
403 public float terrainStartHeight1
404 {
405 get
406 {
407 return m_terrainStartHeight1;
408 }
409 set
410 {
411 m_terrainStartHeight1 = value;
412 configMember.forceSetConfigurationOption("terrain_start_height_1", m_terrainStartHeight1.ToString());
413 }
414 }
415
416 private float m_terrainStartHeight2;
417 public float terrainStartHeight2
418 {
419 get
420 {
421 return m_terrainStartHeight2;
422 }
423 set
424 {
425 m_terrainStartHeight2 = value;
426 configMember.forceSetConfigurationOption("terrain_start_height_2", m_terrainStartHeight2.ToString());
427 }
428 }
429
430 private float m_terrainStartHeight3;
431 public float terrainStartHeight3
432 {
433 get
434 {
435 return m_terrainStartHeight3;
436 }
437 set
438 {
439 m_terrainStartHeight3 = value;
440 configMember.forceSetConfigurationOption("terrain_start_height_3", m_terrainStartHeight3.ToString());
441 }
442 }
443 // Second quad - also bilinearly interpolated.
444 // Terrain texturing is done that:
445 // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y]
446 private float m_terrainHeightRange0;
447 public float terrainHeightRange0
448 {
449 get
450 {
451 return m_terrainHeightRange0;
452 }
453 set
454 {
455 m_terrainHeightRange0 = value;
456 configMember.forceSetConfigurationOption("terrain_height_range_0", m_terrainHeightRange0.ToString());
457 }
458 }
459
460 private float m_terrainHeightRange1;
461 public float terrainHeightRange1
462 {
463 get
464 {
465 return m_terrainHeightRange1;
466 }
467 set
468 {
469 m_terrainHeightRange1 = value;
470 configMember.forceSetConfigurationOption("terrain_height_range_1", m_terrainHeightRange1.ToString());
471 }
472 }
473
474 private float m_terrainHeightRange2;
475 public float terrainHeightRange2
476 {
477 get
478 {
479 return m_terrainHeightRange2;
480 }
481 set
482 {
483 m_terrainHeightRange2 = value;
484 configMember.forceSetConfigurationOption("terrain_height_range_2", m_terrainHeightRange2.ToString());
485 }
486 }
487
488 private float m_terrainHeightRange3;
489 public float terrainHeightRange3
490 {
491 get
492 {
493 return m_terrainHeightRange3;
494 }
495 set
496 {
497 m_terrainHeightRange3 = value;
498 configMember.forceSetConfigurationOption("terrain_height_range_3", m_terrainHeightRange3.ToString());
499 }
500 }
501 // Terrain Default (Must be in F32 Format!)
502 private string m_terrainFile;
503 public string terrainFile
504 {
505 get
506 {
507 return m_terrainFile;
508 }
509 set
510 {
511 m_terrainFile = value;
512 configMember.forceSetConfigurationOption("terrain_file", m_terrainFile.ToString());
513 }
514 }
515
516 private double m_terrainMultiplier;
517 public double terrainMultiplier
518 {
519 get
520 {
521 return m_terrainMultiplier;
522 }
523 set
524 {
525 m_terrainMultiplier = value;
526 configMember.forceSetConfigurationOption("terrain_multiplier", m_terrainMultiplier.ToString());
527 }
528 }
529
530 private float m_waterHeight;
531 public float waterHeight
532 {
533 get
534 {
535 return m_waterHeight;
536 }
537 set
538 {
539 m_waterHeight = value;
540 configMember.forceSetConfigurationOption("water_height", m_waterHeight.ToString());
541 }
542 }
543
544 private LLUUID m_terrainImageID;
545 public LLUUID terrainImageID
546 {
547 get
548 {
549 return m_terrainImageID;
550 }
551 set
552 {
553 m_terrainImageID = value;
554 configMember.forceSetConfigurationOption("terrain_image_id", m_terrainImageID.ToString());
555 }
556 }
557 private ConfigurationMember configMember;
558 public EstateSettings()
559 {
560 // Temporary hack to prevent multiple loadings.
561 if (configMember == null)
562 {
563 configMember = new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", this.loadConfigurationOptions, this.handleIncomingConfiguration);
564 configMember.performConfigurationRetrieve();
565 }
566 }
567
568 public void loadConfigurationOptions()
569 {
570 configMember.addConfigurationOption("billable_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "","0.0",true);
571 configMember.addConfigurationOption("estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "","0",true);
572 configMember.addConfigurationOption("parent_estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", "0", true);
573 configMember.addConfigurationOption("max_agents", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, "", "40", true);
574
575 configMember.addConfigurationOption("object_bonus_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "1.0", true);
576 configMember.addConfigurationOption("redirect_grid_x", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "", "0", true);
577 configMember.addConfigurationOption("redirect_grid_y", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "", "0", true);
578 configMember.addConfigurationOption("region_flags", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", "0", true);
579 configMember.addConfigurationOption("sim_access", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, "", "21", true);
580 configMember.addConfigurationOption("sun_hour", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "0", true);
581 configMember.addConfigurationOption("terrain_raise_limit", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "0", true);
582 configMember.addConfigurationOption("terrain_lower_limit", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "0", true);
583 configMember.addConfigurationOption("use_fixed_sun", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "", "false", true);
584 configMember.addConfigurationOption("price_per_meter", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", "1", true);
585 configMember.addConfigurationOption("region_water_height", ConfigurationOption.ConfigurationTypes.TYPE_UINT16, "", "20", true);
586 configMember.addConfigurationOption("region_allow_terraform", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "", "true", true);
587
588 configMember.addConfigurationOption("terrain_base_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "b8d3965a-ad78-bf43-699b-bff8eca6c975", true);
589 configMember.addConfigurationOption("terrain_base_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "abb783e6-3e93-26c0-248a-247666855da3", true);
590 configMember.addConfigurationOption("terrain_base_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "179cdabd-398a-9b6b-1391-4dc333ba321f", true);
591 configMember.addConfigurationOption("terrain_base_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "beb169c7-11ea-fff2-efe5-0f24dc881df2", true);
592
593 configMember.addConfigurationOption("terrain_detail_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true);
594 configMember.addConfigurationOption("terrain_detail_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true);
595 configMember.addConfigurationOption("terrain_detail_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true);
596 configMember.addConfigurationOption("terrain_detail_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true);
597
598 configMember.addConfigurationOption("terrain_start_height_0", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true);
599 configMember.addConfigurationOption("terrain_start_height_1", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true);
600 configMember.addConfigurationOption("terrain_start_height_2", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true);
601 configMember.addConfigurationOption("terrain_start_height_3", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true);
602
603 configMember.addConfigurationOption("terrain_height_range_0", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true);
604 configMember.addConfigurationOption("terrain_height_range_1", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true);
605 configMember.addConfigurationOption("terrain_height_range_2", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true);
606 configMember.addConfigurationOption("terrain_height_range_3", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true);
607
608 configMember.addConfigurationOption("terrain_file", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "", "default.r32", true);
609 configMember.addConfigurationOption("terrain_multiplier", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true);
610 configMember.addConfigurationOption("water_height", ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, "", "20.0", true);
611 configMember.addConfigurationOption("terrain_image_id", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true);
612 }
613
614 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
615 {
616 switch (configuration_key)
617 {
618 case "billable_factor":
619 this.m_billableFactor = (float)configuration_result;
620 break;
621 case "estate_id":
622 this.m_estateID = (uint)configuration_result;
623 break;
624 case "parent_estate_id":
625 this.m_parentEstateID = (uint)configuration_result;
626 break;
627 case "max_agents":
628 this.m_maxAgents = (byte)configuration_result;
629 break;
630
631 case "object_bonus_factor":
632 this.m_objectBonusFactor = (float)configuration_result;
633 break;
634 case "redirect_grid_x":
635 this.m_redirectGridX = (int)configuration_result;
636 break;
637 case "redirect_grid_y":
638 this.m_redirectGridY = (int)configuration_result;
639 break;
640 case "region_flags":
641 this.m_regionFlags = (Simulator.RegionFlags)((uint)configuration_result);
642 break;
643 case "sim_access":
644 this.m_simAccess = (Simulator.SimAccess)((byte)configuration_result);
645 break;
646 case "sun_hour":
647 this.m_sunHour = (float)configuration_result;
648 break;
649 case "terrain_raise_limit":
650 this.m_terrainRaiseLimit = (float)configuration_result;
651 break;
652 case "terrain_lower_limit":
653 this.m_terrainLowerLimit = (float)configuration_result;
654 break;
655 case "use_fixed_sun":
656 this.m_useFixedSun = (bool)configuration_result;
657 break;
658 case "price_per_meter":
659 this.m_pricePerMeter = System.Convert.ToInt32(configuration_result);
660 break;
661 case "region_water_height":
662 this.m_regionWaterHeight = (ushort)configuration_result;
663 break;
664 case "region_allow_terraform":
665 this.m_regionAllowTerraform = (bool)configuration_result;
666 break;
667
668 case "terrain_base_0":
669 this.m_terrainBase0 = (LLUUID)configuration_result;
670 break;
671 case "terrain_base_1":
672 this.m_terrainBase1 = (LLUUID)configuration_result;
673 break;
674 case "terrain_base_2":
675 this.m_terrainBase2 = (LLUUID)configuration_result;
676 break;
677 case "terrain_base_3":
678 this.m_terrainBase3 = (LLUUID)configuration_result;
679 break;
680
681 case "terrain_detail_0":
682 this.m_terrainDetail0 = (LLUUID)configuration_result;
683 break;
684 case "terrain_detail_1":
685 this.m_terrainDetail1 = (LLUUID)configuration_result;
686 break;
687 case "terrain_detail_2":
688 this.m_terrainDetail2 = (LLUUID)configuration_result;
689 break;
690 case "terrain_detail_3":
691 this.m_terrainDetail3 = (LLUUID)configuration_result;
692 break;
693
694 case "terrain_start_height_0":
695 this.m_terrainStartHeight0 = (float)configuration_result;
696 break;
697 case "terrain_start_height_1":
698 this.m_terrainStartHeight1 = (float)configuration_result;
699 break;
700 case "terrain_start_height_2":
701 this.m_terrainStartHeight2 = (float)configuration_result;
702 break;
703 case "terrain_start_height_3":
704 this.m_terrainStartHeight3 = (float)configuration_result;
705 break;
706
707 case "terrain_height_range_0":
708 this.m_terrainHeightRange0 = (float)configuration_result;
709 break;
710 case "terrain_height_range_1":
711 this.m_terrainHeightRange1 = (float)configuration_result;
712 break;
713 case "terrain_height_range_2":
714 this.m_terrainHeightRange2 = (float)configuration_result;
715 break;
716 case "terrain_height_range_3":
717 this.m_terrainHeightRange3 = (float)configuration_result;
718 break;
719
720 case "terrain_file":
721 this.m_terrainFile = (string)configuration_result;
722 break;
723 case "terrain_multiplier":
724 this.m_terrainMultiplier = System.Convert.ToDouble(configuration_result);
725 break;
726 case "water_height":
727 double tmpVal = (double) configuration_result;
728 this.m_waterHeight = (float) tmpVal;
729 break;
730 case "terrain_image_id":
731 this.m_terrainImageID = (LLUUID)configuration_result;
732 break;
733 }
734
735 return true;
736 }
737 }
738}
diff --git a/OpenSim/Framework/General/Types/InventoryItemBase.cs b/OpenSim/Framework/General/Types/InventoryItemBase.cs
deleted file mode 100644
index fed7e50..0000000
--- a/OpenSim/Framework/General/Types/InventoryItemBase.cs
+++ /dev/null
@@ -1,228 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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.Collections.Generic;
29using libsecondlife;
30
31namespace OpenSim.Framework.Types
32{
33 /// <summary>
34 /// Inventory Item - contains all the properties associated with an individual inventory piece.
35 /// </summary>
36 public class InventoryItemBase
37 {
38 /// <summary>
39 /// A UUID containing the ID for the inventory item itself
40 /// </summary>
41 public LLUUID inventoryID;
42 /// <summary>
43 /// The UUID of the associated asset on the asset server
44 /// </summary>
45 public LLUUID assetID;
46 /// <summary>
47 /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
48 /// </summary>
49 public int assetType;
50 /// <summary>
51 /// The type of inventory item. (Can be slightly different to the asset type
52 /// </summary>
53 public int invType;
54 /// <summary>
55 /// The folder this item is contained in
56 /// </summary>
57 public LLUUID parentFolderID;
58 /// <summary>
59 /// The owner of this inventory item
60 /// </summary>
61 public LLUUID avatarID;
62 /// <summary>
63 /// The creator of this item
64 /// </summary>
65 public LLUUID creatorsID;
66 /// <summary>
67 /// The name of the inventory item (must be less than 64 characters)
68 /// </summary>
69 public string inventoryName;
70 /// <summary>
71 /// The description of the inventory item (must be less than 64 characters)
72 /// </summary>
73 public string inventoryDescription;
74 /// <summary>
75 /// A mask containing the permissions for the next owner (cannot be enforced)
76 /// </summary>
77 public uint inventoryNextPermissions;
78 /// <summary>
79 /// A mask containing permissions for the current owner (cannot be enforced)
80 /// </summary>
81 public uint inventoryCurrentPermissions;
82 /// <summary>
83 ///
84 /// </summary>
85 public uint inventoryBasePermissions;
86 /// <summary>
87 ///
88 /// </summary>
89 public uint inventoryEveryOnePermissions;
90 }
91
92 /// <summary>
93 /// A Class for folders which contain users inventory
94 /// </summary>
95 public class InventoryFolderBase
96 {
97 /// <summary>
98 /// The name of the folder (64 characters or less)
99 /// </summary>
100 public string name;
101 /// <summary>
102 /// The agent who's inventory this is contained by
103 /// </summary>
104 public LLUUID agentID;
105 /// <summary>
106 /// The folder this folder is contained in
107 /// </summary>
108 public LLUUID parentID;
109 /// <summary>
110 /// The UUID for this folder
111 /// </summary>
112 public LLUUID folderID;
113 /// <summary>
114 /// Tyep of Items normally stored in this folder
115 /// </summary>
116 public short type;
117 /// <summary>
118 ///
119 /// </summary>
120 public ushort version;
121 }
122
123 /// <summary>
124 /// An interface for accessing inventory data from a storage server
125 /// </summary>
126 public interface IInventoryData
127 {
128 /// <summary>
129 /// Initialises the interface
130 /// </summary>
131 void Initialise();
132
133 /// <summary>
134 /// Closes the interface
135 /// </summary>
136 void Close();
137
138 /// <summary>
139 /// The plugin being loaded
140 /// </summary>
141 /// <returns>A string containing the plugin name</returns>
142 string getName();
143
144 /// <summary>
145 /// The plugins version
146 /// </summary>
147 /// <returns>A string containing the plugin version</returns>
148 string getVersion();
149
150 /// <summary>
151 /// Returns a list of inventory items contained within the specified folder
152 /// </summary>
153 /// <param name="folderID">The UUID of the target folder</param>
154 /// <returns>A List of InventoryItemBase items</returns>
155 List<InventoryItemBase> getInventoryInFolder(LLUUID folderID);
156
157 /// <summary>
158 /// Returns a list of the root folders within a users inventory
159 /// </summary>
160 /// <param name="user">The user whos inventory is to be searched</param>
161 /// <returns>A list of folder objects</returns>
162 List<InventoryFolderBase> getUserRootFolders(LLUUID user);
163
164 /// <summary>
165 /// Returns the users inventory root folder.
166 /// </summary>
167 /// <param name="user">The UUID of the user who is having inventory being returned</param>
168 /// <returns>Root inventory folder</returns>
169 InventoryFolderBase getUserRootFolder(LLUUID user);
170
171 /// <summary>
172 /// Returns a list of inventory folders contained in the folder 'parentID'
173 /// </summary>
174 /// <param name="parentID">The folder to get subfolders for</param>
175 /// <returns>A list of inventory folders</returns>
176 List<InventoryFolderBase> getInventoryFolders(LLUUID parentID);
177
178 /// <summary>
179 /// Returns an inventory item by its UUID
180 /// </summary>
181 /// <param name="item">The UUID of the item to be returned</param>
182 /// <returns>A class containing item information</returns>
183 InventoryItemBase getInventoryItem(LLUUID item);
184
185 /// <summary>
186 /// Returns a specified inventory folder by its UUID
187 /// </summary>
188 /// <param name="folder">The UUID of the folder to be returned</param>
189 /// <returns>A class containing folder information</returns>
190 InventoryFolderBase getInventoryFolder(LLUUID folder);
191
192 /// <summary>
193 /// Creates a new inventory item based on item
194 /// </summary>
195 /// <param name="item">The item to be created</param>
196 void addInventoryItem(InventoryItemBase item);
197
198 /// <summary>
199 /// Updates an inventory item with item (updates based on ID)
200 /// </summary>
201 /// <param name="item">The updated item</param>
202 void updateInventoryItem(InventoryItemBase item);
203
204 /// <summary>
205 ///
206 /// </summary>
207 /// <param name="item"></param>
208 void deleteInventoryItem(LLUUID item);
209
210 /// <summary>
211 /// Adds a new folder specified by folder
212 /// </summary>
213 /// <param name="folder">The inventory folder</param>
214 void addInventoryFolder(InventoryFolderBase folder);
215
216 /// <summary>
217 /// Updates a folder based on its ID with folder
218 /// </summary>
219 /// <param name="folder">The inventory folder</param>
220 void updateInventoryFolder(InventoryFolderBase folder);
221
222 /// <summary>
223 /// Deletes a folder based on its ID with folder
224 /// </summary>
225 /// <param name="folder">The id of the folder</param>
226 void deleteInventoryFolder(LLUUID folder);
227 }
228}
diff --git a/OpenSim/Framework/General/Types/LandData.cs b/OpenSim/Framework/General/Types/LandData.cs
deleted file mode 100644
index 63c01df..0000000
--- a/OpenSim/Framework/General/Types/LandData.cs
+++ /dev/null
@@ -1,120 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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 libsecondlife;
29
30namespace OpenSim.Framework.Types
31{
32
33 public class LandData
34 {
35 public byte[] landBitmapByteArray = new byte[512];
36 public string landName = "Your Parcel";
37 public string landDesc = "";
38 public LLUUID ownerID = new LLUUID();
39 public bool isGroupOwned = false;
40 public LLVector3 AABBMin = new LLVector3();
41 public LLVector3 AABBMax = new LLVector3();
42 public int area = 0;
43 public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned
44 public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID
45 public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
46 public int claimDate = 0; //Unemplemented
47 public int claimPrice = 0; //Unemplemented
48 public LLUUID groupID = new LLUUID(); //Unemplemented
49 public int groupPrims = 0;
50 public int otherPrims = 0;
51 public int ownerPrims = 0;
52 public int selectedPrims = 0;
53 public int simwidePrims = 0;
54 public int simwideArea = 0;
55 public int salePrice = 0; //Unemeplemented. Parcels price.
56 public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased;
57 public uint landFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts | (uint)Parcel.ParcelFlags.SoundLocal ;
58 public byte landingType = 0;
59 public byte mediaAutoScale = 0;
60 public LLUUID mediaID = LLUUID.Zero;
61 public int localID = 0;
62 public LLUUID globalID = new LLUUID();
63
64 public string mediaURL = "";
65 public string musicURL = "";
66 public float passHours = 0;
67 public int passPrice = 0;
68 public LLUUID snapshotID = LLUUID.Zero;
69 public LLVector3 userLocation = new LLVector3();
70 public LLVector3 userLookAt = new LLVector3();
71
72 public LandData()
73 {
74 globalID = LLUUID.Random();
75 }
76
77 public LandData Copy()
78 {
79 LandData landData = new LandData();
80
81 landData.AABBMax = this.AABBMax;
82 landData.AABBMin = this.AABBMin;
83 landData.area = this.area;
84 landData.auctionID = this.auctionID;
85 landData.authBuyerID = this.authBuyerID;
86 landData.category = this.category;
87 landData.claimDate = this.claimDate;
88 landData.claimPrice = this.claimPrice;
89 landData.globalID = this.globalID;
90 landData.groupID = this.groupID;
91 landData.groupPrims = this.groupPrims;
92 landData.otherPrims = this.otherPrims;
93 landData.ownerPrims = this.ownerPrims;
94 landData.selectedPrims = this.selectedPrims;
95 landData.isGroupOwned = this.isGroupOwned;
96 landData.localID = this.localID;
97 landData.landingType = this.landingType;
98 landData.mediaAutoScale = this.mediaAutoScale;
99 landData.mediaID = this.mediaID;
100 landData.mediaURL = this.mediaURL;
101 landData.musicURL = this.musicURL;
102 landData.ownerID = this.ownerID;
103 landData.landBitmapByteArray = (byte[])this.landBitmapByteArray.Clone();
104 landData.landDesc = this.landDesc;
105 landData.landFlags = this.landFlags;
106 landData.landName = this.landName;
107 landData.landStatus = this.landStatus;
108 landData.passHours = this.passHours;
109 landData.passPrice = this.passPrice;
110 landData.salePrice = this.salePrice;
111 landData.snapshotID = this.snapshotID;
112 landData.userLocation = this.userLocation;
113 landData.userLookAt = this.userLookAt;
114
115 return landData;
116
117 }
118 }
119
120}
diff --git a/OpenSim/Framework/General/Types/Login.cs b/OpenSim/Framework/General/Types/Login.cs
deleted file mode 100644
index fc1f3ad..0000000
--- a/OpenSim/Framework/General/Types/Login.cs
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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 libsecondlife;
29
30namespace OpenSim.Framework.Types
31{
32 public class Login
33 {
34 public string First = "Test";
35 public string Last = "User";
36 public LLUUID Agent;
37 public LLUUID Session;
38 public LLUUID SecureSession = LLUUID.Zero;
39 public LLUUID InventoryFolder;
40 public LLUUID BaseFolder;
41 public uint CircuitCode;
42 public string CapsPath ="";
43 public LLVector3 StartPos;
44
45 public Login()
46 {
47 StartPos = new LLVector3(128, 128, 70);
48 }
49 }
50}
diff --git a/OpenSim/Framework/General/Types/MapBlockData.cs b/OpenSim/Framework/General/Types/MapBlockData.cs
deleted file mode 100644
index 5796f19..0000000
--- a/OpenSim/Framework/General/Types/MapBlockData.cs
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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*/
28
29using System;
30using libsecondlife;
31
32namespace OpenSim.Framework.Types
33{
34 public class MapBlockData
35 {
36 public uint Flags;
37 public ushort X;
38 public ushort Y;
39 public byte Agents;
40 public byte Access;
41 public byte WaterHeight;
42 public LLUUID MapImageId;
43 public String Name;
44 public uint RegionFlags;
45
46 public MapBlockData()
47 {
48
49 }
50 }
51}
diff --git a/OpenSim/Framework/General/Types/NeighbourInfo.cs b/OpenSim/Framework/General/Types/NeighbourInfo.cs
deleted file mode 100644
index 572e77c..0000000
--- a/OpenSim/Framework/General/Types/NeighbourInfo.cs
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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*/
28namespace OpenSim.Framework.Types
29{
30 public class NeighbourInfo
31 {
32 public NeighbourInfo()
33 {
34 }
35
36 public ulong regionhandle;
37 public uint RegionLocX;
38 public uint RegionLocY;
39 public string sim_ip;
40 public uint sim_port;
41 }
42}
diff --git a/OpenSim/Framework/General/Types/NetworkServersInfo.cs b/OpenSim/Framework/General/Types/NetworkServersInfo.cs
deleted file mode 100644
index 2357a9e..0000000
--- a/OpenSim/Framework/General/Types/NetworkServersInfo.cs
+++ /dev/null
@@ -1,94 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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 OpenSim.Framework.Console;
30using OpenSim.Framework.Interfaces;
31using OpenSim.Framework.Configuration;
32
33using Nini.Config;
34namespace OpenSim.Framework.Types
35{
36 public class NetworkServersInfo
37 {
38 public string AssetURL = "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/";
39 public string AssetSendKey = "";
40
41 public string GridURL = "";
42 public string GridSendKey = "";
43 public string GridRecvKey = "";
44 public string UserURL = "";
45 public string UserSendKey = "";
46 public string UserRecvKey = "";
47 public bool isSandbox;
48
49 public static int DefaultHttpListenerPort = 9000;
50 public int HttpListenerPort = DefaultHttpListenerPort;
51
52 public static int RemotingListenerPort = 8895;
53
54
55 public NetworkServersInfo()
56 {
57 }
58
59 public NetworkServersInfo(uint defaultHomeLocX, uint defaultHomeLocY)
60 {
61 m_defaultHomeLocX = defaultHomeLocX;
62 m_defaultHomeLocY = defaultHomeLocY;
63 }
64
65 private uint? m_defaultHomeLocX;
66 public uint DefaultHomeLocX
67 {
68 get { return m_defaultHomeLocX.Value; }
69 }
70
71 private uint? m_defaultHomeLocY;
72 public uint DefaultHomeLocY
73 {
74 get { return m_defaultHomeLocY.Value; }
75 }
76
77 public void loadFromConfiguration(IConfigSource config)
78 {
79 m_defaultHomeLocX = (uint)config.Configs["StandAlone"].GetInt("default_location_x", 1000);
80 m_defaultHomeLocY = (uint)config.Configs["StandAlone"].GetInt("default_location_y", 1000);
81
82 HttpListenerPort = config.Configs["Network"].GetInt("http_listener_port", DefaultHttpListenerPort);
83 RemotingListenerPort = config.Configs["Network"].GetInt("remoting_listener_port", RemotingListenerPort);
84 GridURL = config.Configs["Network"].GetString("grid_server_url", "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString());
85 GridSendKey = config.Configs["Network"].GetString("grid_send_key", "null");
86 GridRecvKey = config.Configs["Network"].GetString("grid_recv_key", "null");
87 UserURL = config.Configs["Network"].GetString("user_server_url", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString());
88 UserSendKey = config.Configs["Network"].GetString("user_send_key", "null");
89 UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null");
90 AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL);
91
92 }
93 }
94}
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
deleted file mode 100644
index 5805ece..0000000
--- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
+++ /dev/null
@@ -1,224 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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*/
28
29using System.Xml.Serialization;
30using libsecondlife;
31using libsecondlife.Packets;
32
33namespace OpenSim.Framework.Types
34{
35 public enum ProfileShape : byte
36 {
37 Circle = 0,
38 Square = 1,
39 IsometricTriangle = 2,
40 EquilateralTriangle = 3,
41 RightTriangle = 4,
42 HalfCircle = 5
43 }
44
45 public enum HollowShape : byte
46 {
47 Same = 0,
48 Circle = 16,
49 Square = 32,
50 Triangle = 48
51 }
52
53 public enum PCodeEnum : byte
54 {
55 Primitive = 9,
56 Avatar = 47
57 }
58
59 public enum Extrusion : byte
60 {
61 Straight = 16,
62 Curve1 = 32,
63 Curve2 = 48,
64 Flexible = 128
65 }
66
67 public class PrimitiveBaseShape
68 {
69 private static byte[] m_defaultTextureEntry;
70
71 public byte PCode;
72 public ushort PathBegin;
73 public ushort PathEnd;
74 public byte PathScaleX;
75 public byte PathScaleY;
76 public byte PathShearX;
77 public byte PathShearY;
78 public sbyte PathSkew;
79 public ushort ProfileBegin;
80 public ushort ProfileEnd;
81 public LLVector3 Scale;
82 public byte PathCurve;
83 public byte ProfileCurve;
84 public ushort ProfileHollow;
85 public sbyte PathRadiusOffset;
86 public byte PathRevolutions;
87 public sbyte PathTaperX;
88 public sbyte PathTaperY;
89 public sbyte PathTwist;
90 public sbyte PathTwistBegin;
91 public byte[] TextureEntry; // a LL textureEntry in byte[] format
92 public byte[] ExtraParams;
93
94 public ProfileShape ProfileShape
95 {
96 get
97 {
98 return (ProfileShape)(ProfileCurve & 0xf);
99 }
100 set
101 {
102 byte oldValueMasked = (byte)(ProfileCurve & 0xf0);
103 ProfileCurve = (byte)(oldValueMasked | (byte)value);
104 }
105 }
106
107 [XmlIgnore]
108 public HollowShape HollowShape
109 {
110 get
111 {
112 return (HollowShape)(ProfileHollow & 0xf0);
113 }
114 set
115 {
116 byte oldValueMasked = (byte)(ProfileHollow & 0xf0);
117 ProfileHollow = (byte)(oldValueMasked | (byte)value);
118 }
119 }
120
121 public LLVector3 PrimScale
122 {
123 get
124 {
125 return this.Scale;
126 }
127 }
128
129 static PrimitiveBaseShape()
130 {
131 m_defaultTextureEntry = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes();
132 }
133
134 public PrimitiveBaseShape()
135 {
136 PCode = (byte)PCodeEnum.Primitive;
137 ExtraParams = new byte[1];
138 TextureEntry = m_defaultTextureEntry;
139 }
140
141 //void returns need to change of course
142 public virtual void GetMesh()
143 {
144
145 }
146
147 public PrimitiveBaseShape Copy()
148 {
149 return (PrimitiveBaseShape)this.MemberwiseClone();
150 }
151 }
152
153 public class GenericShape : PrimitiveBaseShape
154 {
155 public GenericShape()
156 : base()
157 {
158
159 }
160 }
161
162 public class BoxShape : PrimitiveBaseShape
163 {
164 public BoxShape()
165 : base()
166 {
167 PathCurve = (byte)Extrusion.Straight;
168 ProfileShape = ProfileShape.Square;
169 PathScaleX = 100;
170 PathScaleY = 100;
171 }
172
173 public BoxShape(float side)
174 : this()
175 {
176 SetSide(side);
177 }
178
179 public void SetSide(float side)
180 {
181 Scale = new LLVector3(side, side, side);
182 }
183
184 public static BoxShape Default
185 {
186 get
187 {
188 BoxShape boxShape = new BoxShape();
189
190 boxShape.SetSide(0.5f);
191
192 return boxShape;
193 }
194 }
195 }
196 public class CylinderShape : PrimitiveBaseShape
197 {
198 public CylinderShape()
199 : base()
200 {
201 PathCurve = (byte)Extrusion.Straight;
202 ProfileShape = ProfileShape.Circle;
203 PathScaleX = 100;
204 PathScaleY = 100;
205 }
206
207 public CylinderShape(float radius, float heigth)
208 : this()
209 {
210 SetRadius(radius);
211 SetHeigth(heigth);
212 }
213
214 private void SetHeigth(float heigth)
215 {
216 Scale.Z = heigth;
217 }
218
219 private void SetRadius(float radius)
220 {
221 Scale.X = Scale.Y = radius * 2f;
222 }
223 }
224}
diff --git a/OpenSim/Framework/General/Types/RegionHandle.cs b/OpenSim/Framework/General/Types/RegionHandle.cs
deleted file mode 100644
index 5749296..0000000
--- a/OpenSim/Framework/General/Types/RegionHandle.cs
+++ /dev/null
@@ -1,149 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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*/
28
29using System;
30using System.Net;
31
32namespace OpenSim.Framework.Types
33{
34 /// <summary>
35 /// A class for manipulating RegionHandle coordinates
36 /// </summary>
37 class RegionHandle
38 {
39 private UInt64 handle;
40
41 /// <summary>
42 /// Initialises a new grid-aware RegionHandle
43 /// </summary>
44 /// <param name="ip">IP Address of the Grid Server for this region</param>
45 /// <param name="x">Grid X Coordinate</param>
46 /// <param name="y">Grid Y Coordinate</param>
47 public RegionHandle(string ip, short x, short y)
48 {
49 IPAddress addr = IPAddress.Parse(ip);
50
51 if (addr.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork)
52 throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address");
53
54 uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0);
55
56 // Split the IP address in half
57 short a = (short)((baseHandle << 16) & 0xFFFF);
58 short b = (short)((baseHandle << 0) & 0xFFFF);
59
60 // Raise the bounds a little
61 uint nx = (uint)x;
62 uint ny = (uint)y;
63
64 // Multiply grid coords to get region coords
65 nx *= 256;
66 ny *= 256;
67
68 // Stuff the IP address in too
69 nx = (uint)a << 16;
70 ny = (uint)b << 16;
71
72 handle = ((UInt64)nx << 32) | (uint)ny;
73 }
74
75 /// <summary>
76 /// Initialises a new RegionHandle that is not inter-grid aware
77 /// </summary>
78 /// <param name="x">Grid X Coordinate</param>
79 /// <param name="y">Grid Y Coordinate</param>
80 public RegionHandle(uint x, uint y)
81 {
82 handle = ((x * 256) << 32) | (y * 256);
83 }
84
85 /// <summary>
86 /// Initialises a new RegionHandle from an existing value
87 /// </summary>
88 /// <param name="Region">A U64 RegionHandle</param>
89 public RegionHandle(UInt64 Region)
90 {
91 handle = Region;
92 }
93
94 /// <summary>
95 /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy.
96 /// </summary>
97 /// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks>
98 /// <returns>Region Handle including IP Address encoding</returns>
99 public UInt64 getTeleportHandle()
100 {
101 return handle;
102 }
103
104 /// <summary>
105 /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds.
106 /// </summary>
107 /// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns>
108 public UInt64 getNeighbourHandle()
109 {
110 UInt64 mask = 0x0000FFFF0000FFFF;
111
112 return handle | mask;
113 }
114
115 /// <summary>
116 /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle
117 /// </summary>
118 /// <returns>Grid Server IP Address</returns>
119 public IPAddress getGridIP()
120 {
121 uint a = (uint)((handle >> 16) & 0xFFFF);
122 uint b = (uint)((handle >> 48) & 0xFFFF);
123
124 return new IPAddress((long)(a << 16) | (long)b);
125 }
126
127 /// <summary>
128 /// Returns the X Coordinate from a Grid-Encoded RegionHandle
129 /// </summary>
130 /// <returns>X Coordinate</returns>
131 public uint getGridX()
132 {
133 uint x = (uint)((handle >> 32) & 0xFFFF);
134
135 return x;
136 }
137
138 /// <summary>
139 /// Returns the Y Coordinate from a Grid-Encoded RegionHandle
140 /// </summary>
141 /// <returns>Y Coordinate</returns>
142 public uint getGridY()
143 {
144 uint y = (uint)((handle >> 0) & 0xFFFF);
145
146 return y;
147 }
148 }
149}
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs
deleted file mode 100644
index 49360f8..0000000
--- a/OpenSim/Framework/General/Types/RegionInfo.cs
+++ /dev/null
@@ -1,350 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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.Globalization;
30using System.Net;
31using System.Net.Sockets;
32using Nini.Config;
33using libsecondlife;
34using OpenSim.Framework.Console;
35using OpenSim.Framework.Interfaces;
36using OpenSim.Framework.Utilities;
37
38using OpenSim.Framework.Configuration;
39
40
41namespace OpenSim.Framework.Types
42{
43 public class SimpleRegionInfo
44 {
45 public SimpleRegionInfo()
46 {
47 }
48
49 public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
50 {
51
52 m_regionLocX = regionLocX;
53 m_regionLocY = regionLocY;
54
55 m_internalEndPoint = internalEndPoint;
56 m_externalHostName = externalUri;
57 }
58
59 public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port)
60 {
61
62 m_regionLocX = regionLocX;
63 m_regionLocY = regionLocY;
64
65 m_externalHostName = externalUri;
66
67 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port);
68 }
69
70 public LLUUID RegionID = new LLUUID();
71
72 private uint m_remotingPort;
73 public uint RemotingPort
74 {
75 get
76 {
77 return m_remotingPort;
78 }
79 set
80 {
81 m_remotingPort = value;
82 }
83 }
84
85 public string RemotingAddress;
86
87
88 public IPEndPoint ExternalEndPoint
89 {
90 get
91 {
92 // Old one defaults to IPv6
93 //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port );
94
95 IPAddress ia = null;
96 // If it is already an IP, don't resolve it - just return directly
97 if (IPAddress.TryParse(m_externalHostName, out ia))
98 return new IPEndPoint(ia, m_internalEndPoint.Port);
99
100 // Reset for next check
101 ia = null;
102
103
104 // New method favors IPv4
105 foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
106 {
107 if (ia == null)
108 ia = Adr;
109
110 if (Adr.AddressFamily == AddressFamily.InterNetwork)
111 {
112 ia = Adr;
113 break;
114 }
115
116 }
117
118 return new IPEndPoint(ia, m_internalEndPoint.Port);
119 }
120
121 set
122 {
123 m_externalHostName = value.ToString();
124 }
125 }
126
127 protected string m_externalHostName;
128 public string ExternalHostName
129 {
130 get
131 {
132 return m_externalHostName;
133 }
134 set
135 {
136 m_externalHostName = value;
137 }
138 }
139
140 protected IPEndPoint m_internalEndPoint;
141 public IPEndPoint InternalEndPoint
142 {
143 get
144 {
145 return m_internalEndPoint;
146 }
147 set
148 {
149 m_internalEndPoint = value;
150 }
151 }
152
153 protected uint? m_regionLocX;
154 public uint RegionLocX
155 {
156 get
157 {
158 return m_regionLocX.Value;
159 }
160 set
161 {
162 m_regionLocX = value;
163 }
164 }
165
166 protected uint? m_regionLocY;
167 public uint RegionLocY
168 {
169 get
170 {
171 return m_regionLocY.Value;
172 }
173 set
174 {
175 m_regionLocY = value;
176 }
177 }
178
179 public ulong RegionHandle
180 {
181 get
182 {
183 return Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
184 }
185 }
186 }
187
188 public class RegionInfo : SimpleRegionInfo
189 {
190 public string RegionName = "";
191
192 public string DataStore = "";
193 public bool isSandbox = false;
194
195 public LLUUID MasterAvatarAssignedUUID = new LLUUID();
196 public string MasterAvatarFirstName = "";
197 public string MasterAvatarLastName = "";
198 public string MasterAvatarSandboxPassword = "";
199
200 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
201 private static EstateSettings m_estateSettings;
202 public EstateSettings EstateSettings
203 {
204 get
205 {
206 if( m_estateSettings == null )
207 {
208 m_estateSettings = new EstateSettings();
209 }
210
211 return m_estateSettings;
212 }
213
214 }
215
216 public ConfigurationMember configMember;
217 public RegionInfo(string description, string filename)
218 {
219 configMember = new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
220 configMember.performConfigurationRetrieve();
221 }
222
223 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) :
224 base(regionLocX, regionLocY, internalEndPoint, externalUri)
225 {
226
227
228 }
229
230 public RegionInfo()
231 {
232
233 }
234
235 //not in use, should swap to nini though.
236 public void LoadFromNiniSource(IConfigSource source)
237 {
238 this.LoadFromNiniSource(source, "RegionInfo");
239 }
240
241 //not in use, should swap to nini though.
242 public void LoadFromNiniSource(IConfigSource source, string sectionName)
243 {
244 string errorMessage = "";
245 this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToStringHyphenated()));
246 this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test");
247 this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000"));
248 this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000"));
249 this.DataStore = source.Configs[sectionName].GetString("datastore", "OpenSim.db");
250
251 string ipAddress = source.Configs[sectionName].GetString("internal_ip_address", "0.0.0.0");
252 IPAddress ipAddressResult;
253 if (IPAddress.TryParse(ipAddress, out ipAddressResult))
254 {
255 this.m_internalEndPoint = new IPEndPoint(ipAddressResult, 0);
256 }
257 else
258 {
259 errorMessage = "needs an IP Address (IPAddress)";
260 }
261 this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", NetworkServersInfo.DefaultHttpListenerPort);
262
263 string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1");
264 if (externalHost != "SYSTEMIP")
265 {
266 this.m_externalHostName = externalHost;
267 }
268 else
269 {
270 this.m_externalHostName = Util.GetLocalHost().ToString();
271 }
272
273 this.MasterAvatarFirstName = source.Configs[sectionName].GetString("master_avatar_first", "Test");
274 this.MasterAvatarLastName = source.Configs[sectionName].GetString("master_avatar_last", "User");
275 this.MasterAvatarSandboxPassword = source.Configs[sectionName].GetString("master_avatar_pass", "test");
276
277 if (errorMessage != "")
278 {
279 // a error
280 }
281 }
282
283 public void loadConfigurationOptions()
284 {
285 configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "UUID of Region (Default is recommended, random UUID)", LLUUID.Random().ToString(), true);
286 configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Region Name", "OpenSim Test", false);
287 configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (X Axis)", "1000", false);
288 configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (Y Axis)", "1000", false);
289 configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
290 configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false);
291 configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false);
292 configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false);
293 configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false);
294 configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false);
295 configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false);
296 }
297
298 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
299 {
300 switch (configuration_key)
301 {
302 case "sim_UUID":
303 this.RegionID = (LLUUID)configuration_result;
304 break;
305 case "sim_name":
306 this.RegionName = (string)configuration_result;
307 break;
308 case "sim_location_x":
309 this.m_regionLocX = (uint)configuration_result;
310 break;
311 case "sim_location_y":
312 this.m_regionLocY = (uint)configuration_result;
313 break;
314 case "datastore":
315 this.DataStore = (string)configuration_result;
316 break;
317 case "internal_ip_address":
318 IPAddress address = (IPAddress)configuration_result;
319 this.m_internalEndPoint = new IPEndPoint(address, 0);
320 break;
321 case "internal_ip_port":
322 this.m_internalEndPoint.Port = (int)configuration_result;
323 break;
324 case "external_host_name":
325 if ((string)configuration_result != "SYSTEMIP")
326 {
327 this.m_externalHostName = (string)configuration_result;
328 }
329 else
330 {
331 this.m_externalHostName = Util.GetLocalHost().ToString();
332 }
333 break;
334 case "master_avatar_first":
335 this.MasterAvatarFirstName = (string)configuration_result;
336 break;
337 case "master_avatar_last":
338 this.MasterAvatarLastName = (string)configuration_result;
339 break;
340 case "master_avatar_pass":
341 string tempMD5Passwd = (string)configuration_result;
342 this.MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
343 break;
344 }
345
346 return true;
347 }
348
349 }
350}
diff --git a/OpenSim/Framework/General/Types/UUID.cs b/OpenSim/Framework/General/Types/UUID.cs
deleted file mode 100644
index 207b63e..0000000
--- a/OpenSim/Framework/General/Types/UUID.cs
+++ /dev/null
@@ -1,155 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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*/
28
29using System;
30using libsecondlife;
31
32namespace OpenSim.Framework.Types
33{
34 class UUID
35 {
36 public LLUUID llUUID;
37
38 public UUID(string uuid)
39 {
40 llUUID = new LLUUID(uuid);
41 }
42
43 public UUID(byte[] uuid)
44 {
45 llUUID = new LLUUID(uuid, 0);
46 }
47
48 public UUID(byte[] uuid, int offset)
49 {
50 llUUID = new LLUUID(uuid, offset);
51 }
52
53 public UUID()
54 {
55 llUUID = LLUUID.Zero;
56 }
57
58 public UUID(ulong uuid)
59 {
60 llUUID = new LLUUID(uuid);
61 }
62
63 public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth)
64 {
65 byte[] uuid = new byte[16];
66
67 byte[] n = BitConverter.GetBytes(first);
68 n.CopyTo(uuid, 0);
69 n = BitConverter.GetBytes(second);
70 n.CopyTo(uuid, 4);
71 n = BitConverter.GetBytes(third);
72 n.CopyTo(uuid, 8);
73 n = BitConverter.GetBytes(fourth);
74 n.CopyTo(uuid, 12);
75
76 llUUID = new LLUUID(uuid,0);
77 }
78
79 public override string ToString()
80 {
81 return llUUID.ToString();
82 }
83
84 public string ToStringHyphenated()
85 {
86 return llUUID.ToStringHyphenated();
87 }
88
89 public byte[] GetBytes()
90 {
91 return llUUID.GetBytes();
92 }
93
94 public UInt32[] GetInts()
95 {
96 UInt32[] ints = new UInt32[4];
97 ints[0] = BitConverter.ToUInt32(llUUID.Data, 0);
98 ints[1] = BitConverter.ToUInt32(llUUID.Data, 4);
99 ints[2] = BitConverter.ToUInt32(llUUID.Data, 8);
100 ints[3] = BitConverter.ToUInt32(llUUID.Data, 12);
101
102 return ints;
103 }
104
105 public LLUUID GetLLUUID()
106 {
107 return llUUID;
108 }
109
110 public uint CRC()
111 {
112 return llUUID.CRC();
113 }
114
115 public override int GetHashCode()
116 {
117 return llUUID.GetHashCode();
118 }
119
120 public void Combine(UUID other)
121 {
122 llUUID.Combine(other.GetLLUUID());
123 }
124
125 public void Combine(LLUUID other)
126 {
127 llUUID.Combine(other);
128 }
129
130 public override bool Equals(Object other)
131 {
132 return llUUID.Equals(other);
133 }
134
135 public static bool operator ==(UUID a, UUID b)
136 {
137 return a.llUUID.Equals(b.GetLLUUID());
138 }
139
140 public static bool operator !=(UUID a, UUID b)
141 {
142 return !a.llUUID.Equals(b.GetLLUUID());
143 }
144
145 public static bool operator ==(UUID a, LLUUID b)
146 {
147 return a.Equals(b);
148 }
149
150 public static bool operator !=(UUID a, LLUUID b)
151 {
152 return !a.Equals(b);
153 }
154 }
155}
diff --git a/OpenSim/Framework/General/Types/UserProfileData.cs b/OpenSim/Framework/General/Types/UserProfileData.cs
deleted file mode 100644
index 20d8224..0000000
--- a/OpenSim/Framework/General/Types/UserProfileData.cs
+++ /dev/null
@@ -1,191 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.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 libsecondlife;
30
31namespace OpenSim.Framework.Types
32{
33 /// <summary>
34 /// Information about a particular user known to the userserver
35 /// </summary>
36 public class UserProfileData
37 {
38 /// <summary>
39 /// The ID value for this user
40 /// </summary>
41 public LLUUID UUID;
42
43 /// <summary>
44 /// The first component of a users account name
45 /// </summary>
46 public string username;
47 /// <summary>
48 /// The second component of a users account name
49 /// </summary>
50 public string surname;
51
52 /// <summary>
53 /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
54 /// </summary>
55 /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
56 public string passwordHash;
57 /// <summary>
58 /// The salt used for the users hash, should be 32 bytes or longer
59 /// </summary>
60 public string passwordSalt;
61
62 /// <summary>
63 /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into
64 /// </summary>
65 public ulong homeRegion
66 {
67 get { return Helpers.UIntsToLong((homeRegionX * 256), (homeRegionY * 256)); }
68 set {
69 homeRegionX = (uint)(value >> 40);
70 homeRegionY = (((uint)(value)) >> 8);
71 }
72 }
73 public uint homeRegionX;
74 public uint homeRegionY;
75 /// <summary>
76 /// The coordinates inside the region of the home location
77 /// </summary>
78 public LLVector3 homeLocation;
79 /// <summary>
80 /// Where the user will be looking when they rez.
81 /// </summary>
82 public LLVector3 homeLookAt;
83
84 /// <summary>
85 /// A UNIX Timestamp (seconds since epoch) for the users creation
86 /// </summary>
87 public int created;
88 /// <summary>
89 /// A UNIX Timestamp for the users last login date / time
90 /// </summary>
91 public int lastLogin;
92
93 public LLUUID rootInventoryFolderID;
94
95 /// <summary>
96 /// A URI to the users inventory server, used for foreigners and large grids
97 /// </summary>
98 public string userInventoryURI = String.Empty;
99 /// <summary>
100 /// A URI to the users asset server, used for foreigners and large grids.
101 /// </summary>
102 public string userAssetURI = String.Empty;
103
104 /// <summary>
105 /// A uint mask containing the "I can do" fields of the users profile
106 /// </summary>
107 public uint profileCanDoMask;
108 /// <summary>
109 /// A uint mask containing the "I want to do" part of the users profile
110 /// </summary>
111 public uint profileWantDoMask; // Profile window "I want to" mask
112
113 /// <summary>
114 /// The about text listed in a users profile.
115 /// </summary>
116 public string profileAboutText = String.Empty;
117 /// <summary>
118 /// The first life about text listed in a users profile
119 /// </summary>
120 public string profileFirstText = String.Empty;
121
122 /// <summary>
123 /// The profile image for an avatar stored on the asset server
124 /// </summary>
125 public LLUUID profileImage;
126 /// <summary>
127 /// The profile image for the users first life tab
128 /// </summary>
129 public LLUUID profileFirstImage;
130 /// <summary>
131 /// The users last registered agent (filled in on the user server)
132 /// </summary>
133 public UserAgentData currentAgent;
134 }
135
136 /// <summary>
137 /// Information about a users session
138 /// </summary>
139 public class UserAgentData
140 {
141 /// <summary>
142 /// The UUID of the users avatar (not the agent!)
143 /// </summary>
144 public LLUUID UUID;
145 /// <summary>
146 /// The IP address of the user
147 /// </summary>
148 public string agentIP = String.Empty;
149 /// <summary>
150 /// The port of the user
151 /// </summary>
152 public uint agentPort;
153 /// <summary>
154 /// Is the user online?
155 /// </summary>
156 public bool agentOnline;
157 /// <summary>
158 /// The session ID for the user (also the agent ID)
159 /// </summary>
160 public LLUUID sessionID;
161 /// <summary>
162 /// The "secure" session ID for the user
163 /// </summary>
164 /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks>
165 public LLUUID secureSessionID;
166 /// <summary>
167 /// The region the user logged into initially
168 /// </summary>
169 public LLUUID regionID;
170 /// <summary>
171 /// A unix timestamp from when the user logged in
172 /// </summary>
173 public int loginTime;
174 /// <summary>
175 /// When this agent expired and logged out, 0 if still online
176 /// </summary>
177 public int logoutTime;
178 /// <summary>
179 /// Current region the user is logged into
180 /// </summary>
181 public LLUUID currentRegion;
182 /// <summary>
183 /// Region handle of the current region the user is in
184 /// </summary>
185 public ulong currentHandle;
186 /// <summary>
187 /// The position of the user within the region
188 /// </summary>
189 public LLVector3 currentPos;
190 }
191} \ No newline at end of file