From 3d8219f6c7faa256d6a13ab7925f75d83af95b78 Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 29 Oct 2007 21:46:25 +0000 Subject: 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. --- OpenSim/Framework/General/Types/AgentCiruitData.cs | 49 -- OpenSim/Framework/General/Types/AgentWearable.cs | 72 -- OpenSim/Framework/General/Types/AssetBase.cs | 56 -- OpenSim/Framework/General/Types/AssetLandmark.cs | 59 -- OpenSim/Framework/General/Types/AssetStorage.cs | 47 -- OpenSim/Framework/General/Types/EstateSettings.cs | 738 --------------------- .../Framework/General/Types/InventoryItemBase.cs | 228 ------- OpenSim/Framework/General/Types/LandData.cs | 120 ---- OpenSim/Framework/General/Types/Login.cs | 50 -- OpenSim/Framework/General/Types/MapBlockData.cs | 51 -- OpenSim/Framework/General/Types/NeighbourInfo.cs | 42 -- .../Framework/General/Types/NetworkServersInfo.cs | 94 --- .../Framework/General/Types/PrimitiveBaseShape.cs | 224 ------- OpenSim/Framework/General/Types/RegionHandle.cs | 149 ----- OpenSim/Framework/General/Types/RegionInfo.cs | 350 ---------- OpenSim/Framework/General/Types/UUID.cs | 155 ----- OpenSim/Framework/General/Types/UserProfileData.cs | 191 ------ 17 files changed, 2675 deletions(-) delete mode 100644 OpenSim/Framework/General/Types/AgentCiruitData.cs delete mode 100644 OpenSim/Framework/General/Types/AgentWearable.cs delete mode 100644 OpenSim/Framework/General/Types/AssetBase.cs delete mode 100644 OpenSim/Framework/General/Types/AssetLandmark.cs delete mode 100644 OpenSim/Framework/General/Types/AssetStorage.cs delete mode 100644 OpenSim/Framework/General/Types/EstateSettings.cs delete mode 100644 OpenSim/Framework/General/Types/InventoryItemBase.cs delete mode 100644 OpenSim/Framework/General/Types/LandData.cs delete mode 100644 OpenSim/Framework/General/Types/Login.cs delete mode 100644 OpenSim/Framework/General/Types/MapBlockData.cs delete mode 100644 OpenSim/Framework/General/Types/NeighbourInfo.cs delete mode 100644 OpenSim/Framework/General/Types/NetworkServersInfo.cs delete mode 100644 OpenSim/Framework/General/Types/PrimitiveBaseShape.cs delete mode 100644 OpenSim/Framework/General/Types/RegionHandle.cs delete mode 100644 OpenSim/Framework/General/Types/RegionInfo.cs delete mode 100644 OpenSim/Framework/General/Types/UUID.cs delete mode 100644 OpenSim/Framework/General/Types/UserProfileData.cs (limited to 'OpenSim/Framework/General/Types') 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using libsecondlife; -using System; - -namespace OpenSim.Framework.Types -{ - [Serializable] - public class AgentCircuitData - { - public AgentCircuitData() { } - public LLUUID AgentID; - public LLUUID SessionID; - public LLUUID SecureSessionID; - public LLVector3 startpos; - public string firstname; - public string lastname; - public uint circuitcode; - public bool child; - public LLUUID InventoryFolder; - public LLUUID BaseFolder; - public string CapsPath = ""; - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using libsecondlife; - -namespace OpenSim.Framework.Types -{ - public class AvatarWearable - { - public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); - public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); - - public AvatarWearable() - { - - } - - public AvatarWearable( LLUUID itemId, LLUUID assetId ) - { - AssetID = assetId; - ItemID = itemId; - } - - public static AvatarWearable[] DefaultWearables - { - get - { - AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these - for (int i = 0; i < 13; i++) - { - defaultWearables[i] = new AvatarWearable(); - } - defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); - defaultWearables[0].ItemID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); - - defaultWearables[1].ItemID = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"); - defaultWearables[1].AssetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); - - defaultWearables[4].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"); - defaultWearables[4].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111110"); - - defaultWearables[5].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"); - defaultWearables[5].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111120"); - return defaultWearables; - } - } - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using System; -using libsecondlife; - -namespace OpenSim.Framework.Types -{ - [Serializable] - public class AssetBase - { - public byte[] Data; - public LLUUID FullID; - public sbyte Type; - public sbyte InvType; - public string Name = ""; - public string Description = ""; - public bool Local = false; - public bool Temporary = false; - - public AssetBase() - { - - } - - public AssetBase(LLUUID assetId, string name) - { - FullID = assetId; - Name = name; - } - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using System.Text; -using libsecondlife; - -namespace OpenSim.Framework.Types -{ - public class AssetLandmark : AssetBase - { - public int Version; - public LLVector3 Position; - public LLUUID RegionID; - - public AssetLandmark(AssetBase a) - { - this.Data = a.Data; - this.FullID = a.FullID; - this.Type = a.Type; - this.InvType = a.InvType; - this.Name = a.Name; - this.Description = a.Description; - InternData(); - } - - private void InternData() - { - string temp = Encoding.UTF8.GetString(Data).Trim(); - string[] parts = temp.Split('\n'); - int.TryParse(parts[0].Substring(17, 1), out Version); - LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); - LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position); - } - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using libsecondlife; - -namespace OpenSim.Framework.Types -{ - public class AssetStorage - { - - public AssetStorage() { - } - - public AssetStorage(LLUUID assetUUID) { - UUID=assetUUID; - } - - public byte[] Data; - public sbyte Type; - public string Name; - public LLUUID UUID; - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using System.IO; -using libsecondlife; -using OpenSim.Framework.Configuration; -using OpenSim.Framework.Utilities; -using System.Globalization; - -namespace OpenSim.Framework.Types -{ - public class EstateSettings - { - - //Settings to this island - private float m_billableFactor; - public float billableFactor - { - get - { - return m_billableFactor; - } - set - { - m_billableFactor = value; - configMember.forceSetConfigurationOption("billable_factor", m_billableFactor.ToString()); - } - } - - - private uint m_estateID; - public uint estateID - { - get - { - return m_estateID; - } - set - { - m_estateID = value; - configMember.forceSetConfigurationOption("estate_id", m_estateID.ToString()); - } - } - - - private uint m_parentEstateID; - public uint parentEstateID - { - get - { - return m_parentEstateID; - } - set - { - m_parentEstateID = value; - configMember.forceSetConfigurationOption("parent_estate_id", m_parentEstateID.ToString()); - } - } - - private byte m_maxAgents; - public byte maxAgents - { - get - { - return m_maxAgents; - } - set - { - m_maxAgents = value; - configMember.forceSetConfigurationOption("max_agents", m_maxAgents.ToString()); - } - } - - private float m_objectBonusFactor; - public float objectBonusFactor - { - get - { - return m_objectBonusFactor; - } - set - { - m_objectBonusFactor = value; - configMember.forceSetConfigurationOption("object_bonus_factor", m_objectBonusFactor.ToString()); - } - } - - private int m_redirectGridX; - public int redirectGridX - { - get - { - return m_redirectGridX; - } - set - { - m_redirectGridX = value; - configMember.forceSetConfigurationOption("redirect_grid_x", m_redirectGridX.ToString()); - } - } - - private int m_redirectGridY; - public int redirectGridY - { - get - { - return m_redirectGridY; - } - set - { - m_redirectGridY = value; - configMember.forceSetConfigurationOption("redirect_grid_y", m_redirectGridY.ToString()); - } - } - - private Simulator.RegionFlags m_regionFlags; - public Simulator.RegionFlags regionFlags - { - get - { - return m_regionFlags; - } - set - { - m_regionFlags = value; - configMember.forceSetConfigurationOption("region_flags", m_regionFlags.ToString()); - } - } - - - private Simulator.SimAccess m_simAccess; - public Simulator.SimAccess simAccess - { - get - { - return m_simAccess; - } - set - { - m_simAccess = value; - configMember.forceSetConfigurationOption("sim_access", m_simAccess.ToString()); - } - } - - private float m_sunHour; - public float sunHour - { - get - { - return m_sunHour; - } - set - { - m_sunHour = value; - configMember.forceSetConfigurationOption("sun_hour", m_sunHour.ToString()); - } - } - - private float m_terrainRaiseLimit; - public float terrainRaiseLimit - { - get - { - return m_terrainRaiseLimit; - } - set - { - m_terrainRaiseLimit = value; - configMember.forceSetConfigurationOption("terrain_raise_limit", m_terrainRaiseLimit.ToString()); - } - } - - private float m_terrainLowerLimit; - public float terrainLowerLimit - { - get - { - return m_terrainLowerLimit; - } - set - { - m_terrainLowerLimit = value; - configMember.forceSetConfigurationOption("terrain_lower_limit", m_terrainLowerLimit.ToString()); - } - } - - private bool m_useFixedSun; - public bool useFixedSun - { - get - { - return m_useFixedSun; - } - set - { - m_useFixedSun = value; - configMember.forceSetConfigurationOption("use_fixed_sun", m_useFixedSun.ToString()); - } - } - - - private int m_pricePerMeter; - public int pricePerMeter - { - get - { - return m_pricePerMeter; - } - set - { - m_pricePerMeter = value; - configMember.forceSetConfigurationOption("price_per_meter", m_pricePerMeter.ToString()); - } - } - - - private ushort m_regionWaterHeight; - public ushort regionWaterHeight - { - get - { - return m_regionWaterHeight; - } - set - { - m_regionWaterHeight = value; - configMember.forceSetConfigurationOption("region_water_height", m_regionWaterHeight.ToString()); - } - } - - - private bool m_regionAllowTerraform; - public bool regionAllowTerraform - { - get - { - return m_regionAllowTerraform; - } - set - { - m_regionAllowTerraform = value; - configMember.forceSetConfigurationOption("region_allow_terraform", m_regionAllowTerraform.ToString()); - } - } - - - // Region Information - // Low resolution 'base' textures. No longer used. - private LLUUID m_terrainBase0; - public LLUUID terrainBase0 - { - get - { - return m_terrainBase0; - } - set - { - m_terrainBase0 = value; - configMember.forceSetConfigurationOption("terrain_base_0", m_terrainBase0.ToString()); - } - } - - private LLUUID m_terrainBase1; - public LLUUID terrainBase1 - { - get - { - return m_terrainBase1; - } - set - { - m_terrainBase1 = value; - configMember.forceSetConfigurationOption("terrain_base_1", m_terrainBase1.ToString()); - } - } - - private LLUUID m_terrainBase2; - public LLUUID terrainBase2 - { - get - { - return m_terrainBase2; - } - set - { - m_terrainBase2 = value; - configMember.forceSetConfigurationOption("terrain_base_2", m_terrainBase2.ToString()); - } - } - - private LLUUID m_terrainBase3; - public LLUUID terrainBase3 - { - get - { - return m_terrainBase3; - } - set - { - m_terrainBase3 = value; - configMember.forceSetConfigurationOption("terrain_base_3", m_terrainBase3.ToString()); - } - } - - - // Higher resolution terrain textures - private LLUUID m_terrainDetail0; - public LLUUID terrainDetail0 - { - get - { - return m_terrainDetail0; - } - set - { - - m_terrainDetail0 = value; - configMember.forceSetConfigurationOption("terrain_detail_0", m_terrainDetail0.ToString()); - } - } - - private LLUUID m_terrainDetail1; - public LLUUID terrainDetail1 - { - get - { - return m_terrainDetail1; - } - set - { - m_terrainDetail1 = value; - configMember.forceSetConfigurationOption("terrain_detail_1", m_terrainDetail1.ToString()); - } - } - private LLUUID m_terrainDetail2; - public LLUUID terrainDetail2 - { - get - { - return m_terrainDetail2; - } - set - { - m_terrainDetail2 = value; - configMember.forceSetConfigurationOption("terrain_detail_2", m_terrainDetail2.ToString()); - } - } - private LLUUID m_terrainDetail3; - public LLUUID terrainDetail3 - { - get - { - return m_terrainDetail3; - } - set - { - m_terrainDetail3 = value; - configMember.forceSetConfigurationOption("terrain_detail_3", m_terrainDetail3.ToString()); - } - } - - // First quad - each point is bilinearly interpolated at each meter of terrain - private float m_terrainStartHeight0; - public float terrainStartHeight0 - { - get - { - return m_terrainStartHeight0; - } - set - { - m_terrainStartHeight0 = value; - configMember.forceSetConfigurationOption("terrain_start_height_0", m_terrainStartHeight0.ToString()); - } - } - - - private float m_terrainStartHeight1; - public float terrainStartHeight1 - { - get - { - return m_terrainStartHeight1; - } - set - { - m_terrainStartHeight1 = value; - configMember.forceSetConfigurationOption("terrain_start_height_1", m_terrainStartHeight1.ToString()); - } - } - - private float m_terrainStartHeight2; - public float terrainStartHeight2 - { - get - { - return m_terrainStartHeight2; - } - set - { - m_terrainStartHeight2 = value; - configMember.forceSetConfigurationOption("terrain_start_height_2", m_terrainStartHeight2.ToString()); - } - } - - private float m_terrainStartHeight3; - public float terrainStartHeight3 - { - get - { - return m_terrainStartHeight3; - } - set - { - m_terrainStartHeight3 = value; - configMember.forceSetConfigurationOption("terrain_start_height_3", m_terrainStartHeight3.ToString()); - } - } - // Second quad - also bilinearly interpolated. - // Terrain texturing is done that: - // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y] - private float m_terrainHeightRange0; - public float terrainHeightRange0 - { - get - { - return m_terrainHeightRange0; - } - set - { - m_terrainHeightRange0 = value; - configMember.forceSetConfigurationOption("terrain_height_range_0", m_terrainHeightRange0.ToString()); - } - } - - private float m_terrainHeightRange1; - public float terrainHeightRange1 - { - get - { - return m_terrainHeightRange1; - } - set - { - m_terrainHeightRange1 = value; - configMember.forceSetConfigurationOption("terrain_height_range_1", m_terrainHeightRange1.ToString()); - } - } - - private float m_terrainHeightRange2; - public float terrainHeightRange2 - { - get - { - return m_terrainHeightRange2; - } - set - { - m_terrainHeightRange2 = value; - configMember.forceSetConfigurationOption("terrain_height_range_2", m_terrainHeightRange2.ToString()); - } - } - - private float m_terrainHeightRange3; - public float terrainHeightRange3 - { - get - { - return m_terrainHeightRange3; - } - set - { - m_terrainHeightRange3 = value; - configMember.forceSetConfigurationOption("terrain_height_range_3", m_terrainHeightRange3.ToString()); - } - } - // Terrain Default (Must be in F32 Format!) - private string m_terrainFile; - public string terrainFile - { - get - { - return m_terrainFile; - } - set - { - m_terrainFile = value; - configMember.forceSetConfigurationOption("terrain_file", m_terrainFile.ToString()); - } - } - - private double m_terrainMultiplier; - public double terrainMultiplier - { - get - { - return m_terrainMultiplier; - } - set - { - m_terrainMultiplier = value; - configMember.forceSetConfigurationOption("terrain_multiplier", m_terrainMultiplier.ToString()); - } - } - - private float m_waterHeight; - public float waterHeight - { - get - { - return m_waterHeight; - } - set - { - m_waterHeight = value; - configMember.forceSetConfigurationOption("water_height", m_waterHeight.ToString()); - } - } - - private LLUUID m_terrainImageID; - public LLUUID terrainImageID - { - get - { - return m_terrainImageID; - } - set - { - m_terrainImageID = value; - configMember.forceSetConfigurationOption("terrain_image_id", m_terrainImageID.ToString()); - } - } - private ConfigurationMember configMember; - public EstateSettings() - { - // Temporary hack to prevent multiple loadings. - if (configMember == null) - { - configMember = new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", this.loadConfigurationOptions, this.handleIncomingConfiguration); - configMember.performConfigurationRetrieve(); - } - } - - public void loadConfigurationOptions() - { - configMember.addConfigurationOption("billable_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "","0.0",true); - configMember.addConfigurationOption("estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "","0",true); - configMember.addConfigurationOption("parent_estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", "0", true); - configMember.addConfigurationOption("max_agents", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, "", "40", true); - - configMember.addConfigurationOption("object_bonus_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "1.0", true); - configMember.addConfigurationOption("redirect_grid_x", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "", "0", true); - configMember.addConfigurationOption("redirect_grid_y", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "", "0", true); - configMember.addConfigurationOption("region_flags", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", "0", true); - configMember.addConfigurationOption("sim_access", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, "", "21", true); - configMember.addConfigurationOption("sun_hour", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "0", true); - configMember.addConfigurationOption("terrain_raise_limit", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "0", true); - configMember.addConfigurationOption("terrain_lower_limit", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "0", true); - configMember.addConfigurationOption("use_fixed_sun", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "", "false", true); - configMember.addConfigurationOption("price_per_meter", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", "1", true); - configMember.addConfigurationOption("region_water_height", ConfigurationOption.ConfigurationTypes.TYPE_UINT16, "", "20", true); - configMember.addConfigurationOption("region_allow_terraform", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "", "true", true); - - configMember.addConfigurationOption("terrain_base_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "b8d3965a-ad78-bf43-699b-bff8eca6c975", true); - configMember.addConfigurationOption("terrain_base_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "abb783e6-3e93-26c0-248a-247666855da3", true); - configMember.addConfigurationOption("terrain_base_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "179cdabd-398a-9b6b-1391-4dc333ba321f", true); - configMember.addConfigurationOption("terrain_base_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "beb169c7-11ea-fff2-efe5-0f24dc881df2", true); - - configMember.addConfigurationOption("terrain_detail_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true); - configMember.addConfigurationOption("terrain_detail_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true); - configMember.addConfigurationOption("terrain_detail_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true); - configMember.addConfigurationOption("terrain_detail_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true); - - configMember.addConfigurationOption("terrain_start_height_0", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); - configMember.addConfigurationOption("terrain_start_height_1", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); - configMember.addConfigurationOption("terrain_start_height_2", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); - configMember.addConfigurationOption("terrain_start_height_3", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); - - configMember.addConfigurationOption("terrain_height_range_0", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); - configMember.addConfigurationOption("terrain_height_range_1", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); - configMember.addConfigurationOption("terrain_height_range_2", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); - configMember.addConfigurationOption("terrain_height_range_3", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); - - configMember.addConfigurationOption("terrain_file", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "", "default.r32", true); - configMember.addConfigurationOption("terrain_multiplier", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); - configMember.addConfigurationOption("water_height", ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, "", "20.0", true); - configMember.addConfigurationOption("terrain_image_id", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true); - } - - public bool handleIncomingConfiguration(string configuration_key, object configuration_result) - { - switch (configuration_key) - { - case "billable_factor": - this.m_billableFactor = (float)configuration_result; - break; - case "estate_id": - this.m_estateID = (uint)configuration_result; - break; - case "parent_estate_id": - this.m_parentEstateID = (uint)configuration_result; - break; - case "max_agents": - this.m_maxAgents = (byte)configuration_result; - break; - - case "object_bonus_factor": - this.m_objectBonusFactor = (float)configuration_result; - break; - case "redirect_grid_x": - this.m_redirectGridX = (int)configuration_result; - break; - case "redirect_grid_y": - this.m_redirectGridY = (int)configuration_result; - break; - case "region_flags": - this.m_regionFlags = (Simulator.RegionFlags)((uint)configuration_result); - break; - case "sim_access": - this.m_simAccess = (Simulator.SimAccess)((byte)configuration_result); - break; - case "sun_hour": - this.m_sunHour = (float)configuration_result; - break; - case "terrain_raise_limit": - this.m_terrainRaiseLimit = (float)configuration_result; - break; - case "terrain_lower_limit": - this.m_terrainLowerLimit = (float)configuration_result; - break; - case "use_fixed_sun": - this.m_useFixedSun = (bool)configuration_result; - break; - case "price_per_meter": - this.m_pricePerMeter = System.Convert.ToInt32(configuration_result); - break; - case "region_water_height": - this.m_regionWaterHeight = (ushort)configuration_result; - break; - case "region_allow_terraform": - this.m_regionAllowTerraform = (bool)configuration_result; - break; - - case "terrain_base_0": - this.m_terrainBase0 = (LLUUID)configuration_result; - break; - case "terrain_base_1": - this.m_terrainBase1 = (LLUUID)configuration_result; - break; - case "terrain_base_2": - this.m_terrainBase2 = (LLUUID)configuration_result; - break; - case "terrain_base_3": - this.m_terrainBase3 = (LLUUID)configuration_result; - break; - - case "terrain_detail_0": - this.m_terrainDetail0 = (LLUUID)configuration_result; - break; - case "terrain_detail_1": - this.m_terrainDetail1 = (LLUUID)configuration_result; - break; - case "terrain_detail_2": - this.m_terrainDetail2 = (LLUUID)configuration_result; - break; - case "terrain_detail_3": - this.m_terrainDetail3 = (LLUUID)configuration_result; - break; - - case "terrain_start_height_0": - this.m_terrainStartHeight0 = (float)configuration_result; - break; - case "terrain_start_height_1": - this.m_terrainStartHeight1 = (float)configuration_result; - break; - case "terrain_start_height_2": - this.m_terrainStartHeight2 = (float)configuration_result; - break; - case "terrain_start_height_3": - this.m_terrainStartHeight3 = (float)configuration_result; - break; - - case "terrain_height_range_0": - this.m_terrainHeightRange0 = (float)configuration_result; - break; - case "terrain_height_range_1": - this.m_terrainHeightRange1 = (float)configuration_result; - break; - case "terrain_height_range_2": - this.m_terrainHeightRange2 = (float)configuration_result; - break; - case "terrain_height_range_3": - this.m_terrainHeightRange3 = (float)configuration_result; - break; - - case "terrain_file": - this.m_terrainFile = (string)configuration_result; - break; - case "terrain_multiplier": - this.m_terrainMultiplier = System.Convert.ToDouble(configuration_result); - break; - case "water_height": - double tmpVal = (double) configuration_result; - this.m_waterHeight = (float) tmpVal; - break; - case "terrain_image_id": - this.m_terrainImageID = (LLUUID)configuration_result; - break; - } - - return true; - } - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using System.Collections.Generic; -using libsecondlife; - -namespace OpenSim.Framework.Types -{ - /// - /// Inventory Item - contains all the properties associated with an individual inventory piece. - /// - public class InventoryItemBase - { - /// - /// A UUID containing the ID for the inventory item itself - /// - public LLUUID inventoryID; - /// - /// The UUID of the associated asset on the asset server - /// - public LLUUID assetID; - /// - /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) - /// - public int assetType; - /// - /// The type of inventory item. (Can be slightly different to the asset type - /// - public int invType; - /// - /// The folder this item is contained in - /// - public LLUUID parentFolderID; - /// - /// The owner of this inventory item - /// - public LLUUID avatarID; - /// - /// The creator of this item - /// - public LLUUID creatorsID; - /// - /// The name of the inventory item (must be less than 64 characters) - /// - public string inventoryName; - /// - /// The description of the inventory item (must be less than 64 characters) - /// - public string inventoryDescription; - /// - /// A mask containing the permissions for the next owner (cannot be enforced) - /// - public uint inventoryNextPermissions; - /// - /// A mask containing permissions for the current owner (cannot be enforced) - /// - public uint inventoryCurrentPermissions; - /// - /// - /// - public uint inventoryBasePermissions; - /// - /// - /// - public uint inventoryEveryOnePermissions; - } - - /// - /// A Class for folders which contain users inventory - /// - public class InventoryFolderBase - { - /// - /// The name of the folder (64 characters or less) - /// - public string name; - /// - /// The agent who's inventory this is contained by - /// - public LLUUID agentID; - /// - /// The folder this folder is contained in - /// - public LLUUID parentID; - /// - /// The UUID for this folder - /// - public LLUUID folderID; - /// - /// Tyep of Items normally stored in this folder - /// - public short type; - /// - /// - /// - public ushort version; - } - - /// - /// An interface for accessing inventory data from a storage server - /// - public interface IInventoryData - { - /// - /// Initialises the interface - /// - void Initialise(); - - /// - /// Closes the interface - /// - void Close(); - - /// - /// The plugin being loaded - /// - /// A string containing the plugin name - string getName(); - - /// - /// The plugins version - /// - /// A string containing the plugin version - string getVersion(); - - /// - /// Returns a list of inventory items contained within the specified folder - /// - /// The UUID of the target folder - /// A List of InventoryItemBase items - List getInventoryInFolder(LLUUID folderID); - - /// - /// Returns a list of the root folders within a users inventory - /// - /// The user whos inventory is to be searched - /// A list of folder objects - List getUserRootFolders(LLUUID user); - - /// - /// Returns the users inventory root folder. - /// - /// The UUID of the user who is having inventory being returned - /// Root inventory folder - InventoryFolderBase getUserRootFolder(LLUUID user); - - /// - /// Returns a list of inventory folders contained in the folder 'parentID' - /// - /// The folder to get subfolders for - /// A list of inventory folders - List getInventoryFolders(LLUUID parentID); - - /// - /// Returns an inventory item by its UUID - /// - /// The UUID of the item to be returned - /// A class containing item information - InventoryItemBase getInventoryItem(LLUUID item); - - /// - /// Returns a specified inventory folder by its UUID - /// - /// The UUID of the folder to be returned - /// A class containing folder information - InventoryFolderBase getInventoryFolder(LLUUID folder); - - /// - /// Creates a new inventory item based on item - /// - /// The item to be created - void addInventoryItem(InventoryItemBase item); - - /// - /// Updates an inventory item with item (updates based on ID) - /// - /// The updated item - void updateInventoryItem(InventoryItemBase item); - - /// - /// - /// - /// - void deleteInventoryItem(LLUUID item); - - /// - /// Adds a new folder specified by folder - /// - /// The inventory folder - void addInventoryFolder(InventoryFolderBase folder); - - /// - /// Updates a folder based on its ID with folder - /// - /// The inventory folder - void updateInventoryFolder(InventoryFolderBase folder); - - /// - /// Deletes a folder based on its ID with folder - /// - /// The id of the folder - void deleteInventoryFolder(LLUUID folder); - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using libsecondlife; - -namespace OpenSim.Framework.Types -{ - - public class LandData - { - public byte[] landBitmapByteArray = new byte[512]; - public string landName = "Your Parcel"; - public string landDesc = ""; - public LLUUID ownerID = new LLUUID(); - public bool isGroupOwned = false; - public LLVector3 AABBMin = new LLVector3(); - public LLVector3 AABBMax = new LLVector3(); - public int area = 0; - public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned - public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID - public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category - public int claimDate = 0; //Unemplemented - public int claimPrice = 0; //Unemplemented - public LLUUID groupID = new LLUUID(); //Unemplemented - public int groupPrims = 0; - public int otherPrims = 0; - public int ownerPrims = 0; - public int selectedPrims = 0; - public int simwidePrims = 0; - public int simwideArea = 0; - public int salePrice = 0; //Unemeplemented. Parcels price. - public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased; - 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 ; - public byte landingType = 0; - public byte mediaAutoScale = 0; - public LLUUID mediaID = LLUUID.Zero; - public int localID = 0; - public LLUUID globalID = new LLUUID(); - - public string mediaURL = ""; - public string musicURL = ""; - public float passHours = 0; - public int passPrice = 0; - public LLUUID snapshotID = LLUUID.Zero; - public LLVector3 userLocation = new LLVector3(); - public LLVector3 userLookAt = new LLVector3(); - - public LandData() - { - globalID = LLUUID.Random(); - } - - public LandData Copy() - { - LandData landData = new LandData(); - - landData.AABBMax = this.AABBMax; - landData.AABBMin = this.AABBMin; - landData.area = this.area; - landData.auctionID = this.auctionID; - landData.authBuyerID = this.authBuyerID; - landData.category = this.category; - landData.claimDate = this.claimDate; - landData.claimPrice = this.claimPrice; - landData.globalID = this.globalID; - landData.groupID = this.groupID; - landData.groupPrims = this.groupPrims; - landData.otherPrims = this.otherPrims; - landData.ownerPrims = this.ownerPrims; - landData.selectedPrims = this.selectedPrims; - landData.isGroupOwned = this.isGroupOwned; - landData.localID = this.localID; - landData.landingType = this.landingType; - landData.mediaAutoScale = this.mediaAutoScale; - landData.mediaID = this.mediaID; - landData.mediaURL = this.mediaURL; - landData.musicURL = this.musicURL; - landData.ownerID = this.ownerID; - landData.landBitmapByteArray = (byte[])this.landBitmapByteArray.Clone(); - landData.landDesc = this.landDesc; - landData.landFlags = this.landFlags; - landData.landName = this.landName; - landData.landStatus = this.landStatus; - landData.passHours = this.passHours; - landData.passPrice = this.passPrice; - landData.salePrice = this.salePrice; - landData.snapshotID = this.snapshotID; - landData.userLocation = this.userLocation; - landData.userLookAt = this.userLookAt; - - return landData; - - } - } - -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using libsecondlife; - -namespace OpenSim.Framework.Types -{ - public class Login - { - public string First = "Test"; - public string Last = "User"; - public LLUUID Agent; - public LLUUID Session; - public LLUUID SecureSession = LLUUID.Zero; - public LLUUID InventoryFolder; - public LLUUID BaseFolder; - public uint CircuitCode; - public string CapsPath =""; - public LLVector3 StartPos; - - public Login() - { - StartPos = new LLVector3(128, 128, 70); - } - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ - -using System; -using libsecondlife; - -namespace OpenSim.Framework.Types -{ - public class MapBlockData - { - public uint Flags; - public ushort X; - public ushort Y; - public byte Agents; - public byte Access; - public byte WaterHeight; - public LLUUID MapImageId; - public String Name; - public uint RegionFlags; - - public MapBlockData() - { - - } - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -namespace OpenSim.Framework.Types -{ - public class NeighbourInfo - { - public NeighbourInfo() - { - } - - public ulong regionhandle; - public uint RegionLocX; - public uint RegionLocY; - public string sim_ip; - public uint sim_port; - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using System; -using OpenSim.Framework.Console; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Configuration; - -using Nini.Config; -namespace OpenSim.Framework.Types -{ - public class NetworkServersInfo - { - public string AssetURL = "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/"; - public string AssetSendKey = ""; - - public string GridURL = ""; - public string GridSendKey = ""; - public string GridRecvKey = ""; - public string UserURL = ""; - public string UserSendKey = ""; - public string UserRecvKey = ""; - public bool isSandbox; - - public static int DefaultHttpListenerPort = 9000; - public int HttpListenerPort = DefaultHttpListenerPort; - - public static int RemotingListenerPort = 8895; - - - public NetworkServersInfo() - { - } - - public NetworkServersInfo(uint defaultHomeLocX, uint defaultHomeLocY) - { - m_defaultHomeLocX = defaultHomeLocX; - m_defaultHomeLocY = defaultHomeLocY; - } - - private uint? m_defaultHomeLocX; - public uint DefaultHomeLocX - { - get { return m_defaultHomeLocX.Value; } - } - - private uint? m_defaultHomeLocY; - public uint DefaultHomeLocY - { - get { return m_defaultHomeLocY.Value; } - } - - public void loadFromConfiguration(IConfigSource config) - { - m_defaultHomeLocX = (uint)config.Configs["StandAlone"].GetInt("default_location_x", 1000); - m_defaultHomeLocY = (uint)config.Configs["StandAlone"].GetInt("default_location_y", 1000); - - HttpListenerPort = config.Configs["Network"].GetInt("http_listener_port", DefaultHttpListenerPort); - RemotingListenerPort = config.Configs["Network"].GetInt("remoting_listener_port", RemotingListenerPort); - GridURL = config.Configs["Network"].GetString("grid_server_url", "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString()); - GridSendKey = config.Configs["Network"].GetString("grid_send_key", "null"); - GridRecvKey = config.Configs["Network"].GetString("grid_recv_key", "null"); - UserURL = config.Configs["Network"].GetString("user_server_url", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString()); - UserSendKey = config.Configs["Network"].GetString("user_send_key", "null"); - UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null"); - AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL); - - } - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ - -using System.Xml.Serialization; -using libsecondlife; -using libsecondlife.Packets; - -namespace OpenSim.Framework.Types -{ - public enum ProfileShape : byte - { - Circle = 0, - Square = 1, - IsometricTriangle = 2, - EquilateralTriangle = 3, - RightTriangle = 4, - HalfCircle = 5 - } - - public enum HollowShape : byte - { - Same = 0, - Circle = 16, - Square = 32, - Triangle = 48 - } - - public enum PCodeEnum : byte - { - Primitive = 9, - Avatar = 47 - } - - public enum Extrusion : byte - { - Straight = 16, - Curve1 = 32, - Curve2 = 48, - Flexible = 128 - } - - public class PrimitiveBaseShape - { - private static byte[] m_defaultTextureEntry; - - public byte PCode; - public ushort PathBegin; - public ushort PathEnd; - public byte PathScaleX; - public byte PathScaleY; - public byte PathShearX; - public byte PathShearY; - public sbyte PathSkew; - public ushort ProfileBegin; - public ushort ProfileEnd; - public LLVector3 Scale; - public byte PathCurve; - public byte ProfileCurve; - public ushort ProfileHollow; - public sbyte PathRadiusOffset; - public byte PathRevolutions; - public sbyte PathTaperX; - public sbyte PathTaperY; - public sbyte PathTwist; - public sbyte PathTwistBegin; - public byte[] TextureEntry; // a LL textureEntry in byte[] format - public byte[] ExtraParams; - - public ProfileShape ProfileShape - { - get - { - return (ProfileShape)(ProfileCurve & 0xf); - } - set - { - byte oldValueMasked = (byte)(ProfileCurve & 0xf0); - ProfileCurve = (byte)(oldValueMasked | (byte)value); - } - } - - [XmlIgnore] - public HollowShape HollowShape - { - get - { - return (HollowShape)(ProfileHollow & 0xf0); - } - set - { - byte oldValueMasked = (byte)(ProfileHollow & 0xf0); - ProfileHollow = (byte)(oldValueMasked | (byte)value); - } - } - - public LLVector3 PrimScale - { - get - { - return this.Scale; - } - } - - static PrimitiveBaseShape() - { - m_defaultTextureEntry = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); - } - - public PrimitiveBaseShape() - { - PCode = (byte)PCodeEnum.Primitive; - ExtraParams = new byte[1]; - TextureEntry = m_defaultTextureEntry; - } - - //void returns need to change of course - public virtual void GetMesh() - { - - } - - public PrimitiveBaseShape Copy() - { - return (PrimitiveBaseShape)this.MemberwiseClone(); - } - } - - public class GenericShape : PrimitiveBaseShape - { - public GenericShape() - : base() - { - - } - } - - public class BoxShape : PrimitiveBaseShape - { - public BoxShape() - : base() - { - PathCurve = (byte)Extrusion.Straight; - ProfileShape = ProfileShape.Square; - PathScaleX = 100; - PathScaleY = 100; - } - - public BoxShape(float side) - : this() - { - SetSide(side); - } - - public void SetSide(float side) - { - Scale = new LLVector3(side, side, side); - } - - public static BoxShape Default - { - get - { - BoxShape boxShape = new BoxShape(); - - boxShape.SetSide(0.5f); - - return boxShape; - } - } - } - public class CylinderShape : PrimitiveBaseShape - { - public CylinderShape() - : base() - { - PathCurve = (byte)Extrusion.Straight; - ProfileShape = ProfileShape.Circle; - PathScaleX = 100; - PathScaleY = 100; - } - - public CylinderShape(float radius, float heigth) - : this() - { - SetRadius(radius); - SetHeigth(heigth); - } - - private void SetHeigth(float heigth) - { - Scale.Z = heigth; - } - - private void SetRadius(float radius) - { - Scale.X = Scale.Y = radius * 2f; - } - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ - -using System; -using System.Net; - -namespace OpenSim.Framework.Types -{ - /// - /// A class for manipulating RegionHandle coordinates - /// - class RegionHandle - { - private UInt64 handle; - - /// - /// Initialises a new grid-aware RegionHandle - /// - /// IP Address of the Grid Server for this region - /// Grid X Coordinate - /// Grid Y Coordinate - public RegionHandle(string ip, short x, short y) - { - IPAddress addr = IPAddress.Parse(ip); - - if (addr.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork) - throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address"); - - uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0); - - // Split the IP address in half - short a = (short)((baseHandle << 16) & 0xFFFF); - short b = (short)((baseHandle << 0) & 0xFFFF); - - // Raise the bounds a little - uint nx = (uint)x; - uint ny = (uint)y; - - // Multiply grid coords to get region coords - nx *= 256; - ny *= 256; - - // Stuff the IP address in too - nx = (uint)a << 16; - ny = (uint)b << 16; - - handle = ((UInt64)nx << 32) | (uint)ny; - } - - /// - /// Initialises a new RegionHandle that is not inter-grid aware - /// - /// Grid X Coordinate - /// Grid Y Coordinate - public RegionHandle(uint x, uint y) - { - handle = ((x * 256) << 32) | (y * 256); - } - - /// - /// Initialises a new RegionHandle from an existing value - /// - /// A U64 RegionHandle - public RegionHandle(UInt64 Region) - { - handle = Region; - } - - /// - /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy. - /// - /// Do not use for SimulatorEnable packets. The client will choke. - /// Region Handle including IP Address encoding - public UInt64 getTeleportHandle() - { - return handle; - } - - /// - /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds. - /// - /// A U64 RegionHandle for use in SimulatorEnable packets. - public UInt64 getNeighbourHandle() - { - UInt64 mask = 0x0000FFFF0000FFFF; - - return handle | mask; - } - - /// - /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle - /// - /// Grid Server IP Address - public IPAddress getGridIP() - { - uint a = (uint)((handle >> 16) & 0xFFFF); - uint b = (uint)((handle >> 48) & 0xFFFF); - - return new IPAddress((long)(a << 16) | (long)b); - } - - /// - /// Returns the X Coordinate from a Grid-Encoded RegionHandle - /// - /// X Coordinate - public uint getGridX() - { - uint x = (uint)((handle >> 32) & 0xFFFF); - - return x; - } - - /// - /// Returns the Y Coordinate from a Grid-Encoded RegionHandle - /// - /// Y Coordinate - public uint getGridY() - { - uint y = (uint)((handle >> 0) & 0xFFFF); - - return y; - } - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using System; -using System.Globalization; -using System.Net; -using System.Net.Sockets; -using Nini.Config; -using libsecondlife; -using OpenSim.Framework.Console; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Utilities; - -using OpenSim.Framework.Configuration; - - -namespace OpenSim.Framework.Types -{ - public class SimpleRegionInfo - { - public SimpleRegionInfo() - { - } - - public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) - { - - m_regionLocX = regionLocX; - m_regionLocY = regionLocY; - - m_internalEndPoint = internalEndPoint; - m_externalHostName = externalUri; - } - - public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port) - { - - m_regionLocX = regionLocX; - m_regionLocY = regionLocY; - - m_externalHostName = externalUri; - - m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port); - } - - public LLUUID RegionID = new LLUUID(); - - private uint m_remotingPort; - public uint RemotingPort - { - get - { - return m_remotingPort; - } - set - { - m_remotingPort = value; - } - } - - public string RemotingAddress; - - - public IPEndPoint ExternalEndPoint - { - get - { - // Old one defaults to IPv6 - //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); - - IPAddress ia = null; - // If it is already an IP, don't resolve it - just return directly - if (IPAddress.TryParse(m_externalHostName, out ia)) - return new IPEndPoint(ia, m_internalEndPoint.Port); - - // Reset for next check - ia = null; - - - // New method favors IPv4 - foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) - { - if (ia == null) - ia = Adr; - - if (Adr.AddressFamily == AddressFamily.InterNetwork) - { - ia = Adr; - break; - } - - } - - return new IPEndPoint(ia, m_internalEndPoint.Port); - } - - set - { - m_externalHostName = value.ToString(); - } - } - - protected string m_externalHostName; - public string ExternalHostName - { - get - { - return m_externalHostName; - } - set - { - m_externalHostName = value; - } - } - - protected IPEndPoint m_internalEndPoint; - public IPEndPoint InternalEndPoint - { - get - { - return m_internalEndPoint; - } - set - { - m_internalEndPoint = value; - } - } - - protected uint? m_regionLocX; - public uint RegionLocX - { - get - { - return m_regionLocX.Value; - } - set - { - m_regionLocX = value; - } - } - - protected uint? m_regionLocY; - public uint RegionLocY - { - get - { - return m_regionLocY.Value; - } - set - { - m_regionLocY = value; - } - } - - public ulong RegionHandle - { - get - { - return Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); - } - } - } - - public class RegionInfo : SimpleRegionInfo - { - public string RegionName = ""; - - public string DataStore = ""; - public bool isSandbox = false; - - public LLUUID MasterAvatarAssignedUUID = new LLUUID(); - public string MasterAvatarFirstName = ""; - public string MasterAvatarLastName = ""; - public string MasterAvatarSandboxPassword = ""; - - // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. - private static EstateSettings m_estateSettings; - public EstateSettings EstateSettings - { - get - { - if( m_estateSettings == null ) - { - m_estateSettings = new EstateSettings(); - } - - return m_estateSettings; - } - - } - - public ConfigurationMember configMember; - public RegionInfo(string description, string filename) - { - configMember = new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); - configMember.performConfigurationRetrieve(); - } - - public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) : - base(regionLocX, regionLocY, internalEndPoint, externalUri) - { - - - } - - public RegionInfo() - { - - } - - //not in use, should swap to nini though. - public void LoadFromNiniSource(IConfigSource source) - { - this.LoadFromNiniSource(source, "RegionInfo"); - } - - //not in use, should swap to nini though. - public void LoadFromNiniSource(IConfigSource source, string sectionName) - { - string errorMessage = ""; - this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToStringHyphenated())); - this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); - this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000")); - this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); - this.DataStore = source.Configs[sectionName].GetString("datastore", "OpenSim.db"); - - string ipAddress = source.Configs[sectionName].GetString("internal_ip_address", "0.0.0.0"); - IPAddress ipAddressResult; - if (IPAddress.TryParse(ipAddress, out ipAddressResult)) - { - this.m_internalEndPoint = new IPEndPoint(ipAddressResult, 0); - } - else - { - errorMessage = "needs an IP Address (IPAddress)"; - } - this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", NetworkServersInfo.DefaultHttpListenerPort); - - string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1"); - if (externalHost != "SYSTEMIP") - { - this.m_externalHostName = externalHost; - } - else - { - this.m_externalHostName = Util.GetLocalHost().ToString(); - } - - this.MasterAvatarFirstName = source.Configs[sectionName].GetString("master_avatar_first", "Test"); - this.MasterAvatarLastName = source.Configs[sectionName].GetString("master_avatar_last", "User"); - this.MasterAvatarSandboxPassword = source.Configs[sectionName].GetString("master_avatar_pass", "test"); - - if (errorMessage != "") - { - // a error - } - } - - public void loadConfigurationOptions() - { - configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "UUID of Region (Default is recommended, random UUID)", LLUUID.Random().ToString(), true); - configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Region Name", "OpenSim Test", false); - configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (X Axis)", "1000", false); - configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (Y Axis)", "1000", false); - configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false); - configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false); - configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false); - configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false); - configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false); - configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false); - configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false); - } - - public bool handleIncomingConfiguration(string configuration_key, object configuration_result) - { - switch (configuration_key) - { - case "sim_UUID": - this.RegionID = (LLUUID)configuration_result; - break; - case "sim_name": - this.RegionName = (string)configuration_result; - break; - case "sim_location_x": - this.m_regionLocX = (uint)configuration_result; - break; - case "sim_location_y": - this.m_regionLocY = (uint)configuration_result; - break; - case "datastore": - this.DataStore = (string)configuration_result; - break; - case "internal_ip_address": - IPAddress address = (IPAddress)configuration_result; - this.m_internalEndPoint = new IPEndPoint(address, 0); - break; - case "internal_ip_port": - this.m_internalEndPoint.Port = (int)configuration_result; - break; - case "external_host_name": - if ((string)configuration_result != "SYSTEMIP") - { - this.m_externalHostName = (string)configuration_result; - } - else - { - this.m_externalHostName = Util.GetLocalHost().ToString(); - } - break; - case "master_avatar_first": - this.MasterAvatarFirstName = (string)configuration_result; - break; - case "master_avatar_last": - this.MasterAvatarLastName = (string)configuration_result; - break; - case "master_avatar_pass": - string tempMD5Passwd = (string)configuration_result; - this.MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); - break; - } - - return true; - } - - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ - -using System; -using libsecondlife; - -namespace OpenSim.Framework.Types -{ - class UUID - { - public LLUUID llUUID; - - public UUID(string uuid) - { - llUUID = new LLUUID(uuid); - } - - public UUID(byte[] uuid) - { - llUUID = new LLUUID(uuid, 0); - } - - public UUID(byte[] uuid, int offset) - { - llUUID = new LLUUID(uuid, offset); - } - - public UUID() - { - llUUID = LLUUID.Zero; - } - - public UUID(ulong uuid) - { - llUUID = new LLUUID(uuid); - } - - public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth) - { - byte[] uuid = new byte[16]; - - byte[] n = BitConverter.GetBytes(first); - n.CopyTo(uuid, 0); - n = BitConverter.GetBytes(second); - n.CopyTo(uuid, 4); - n = BitConverter.GetBytes(third); - n.CopyTo(uuid, 8); - n = BitConverter.GetBytes(fourth); - n.CopyTo(uuid, 12); - - llUUID = new LLUUID(uuid,0); - } - - public override string ToString() - { - return llUUID.ToString(); - } - - public string ToStringHyphenated() - { - return llUUID.ToStringHyphenated(); - } - - public byte[] GetBytes() - { - return llUUID.GetBytes(); - } - - public UInt32[] GetInts() - { - UInt32[] ints = new UInt32[4]; - ints[0] = BitConverter.ToUInt32(llUUID.Data, 0); - ints[1] = BitConverter.ToUInt32(llUUID.Data, 4); - ints[2] = BitConverter.ToUInt32(llUUID.Data, 8); - ints[3] = BitConverter.ToUInt32(llUUID.Data, 12); - - return ints; - } - - public LLUUID GetLLUUID() - { - return llUUID; - } - - public uint CRC() - { - return llUUID.CRC(); - } - - public override int GetHashCode() - { - return llUUID.GetHashCode(); - } - - public void Combine(UUID other) - { - llUUID.Combine(other.GetLLUUID()); - } - - public void Combine(LLUUID other) - { - llUUID.Combine(other); - } - - public override bool Equals(Object other) - { - return llUUID.Equals(other); - } - - public static bool operator ==(UUID a, UUID b) - { - return a.llUUID.Equals(b.GetLLUUID()); - } - - public static bool operator !=(UUID a, UUID b) - { - return !a.llUUID.Equals(b.GetLLUUID()); - } - - public static bool operator ==(UUID a, LLUUID b) - { - return a.Equals(b); - } - - public static bool operator !=(UUID a, LLUUID b) - { - return !a.Equals(b); - } - } -} 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 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using System; -using libsecondlife; - -namespace OpenSim.Framework.Types -{ - /// - /// Information about a particular user known to the userserver - /// - public class UserProfileData - { - /// - /// The ID value for this user - /// - public LLUUID UUID; - - /// - /// The first component of a users account name - /// - public string username; - /// - /// The second component of a users account name - /// - public string surname; - - /// - /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) - /// - /// This is double MD5'd because the client sends an unsalted MD5 to the loginserver - public string passwordHash; - /// - /// The salt used for the users hash, should be 32 bytes or longer - /// - public string passwordSalt; - - /// - /// 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 - /// - public ulong homeRegion - { - get { return Helpers.UIntsToLong((homeRegionX * 256), (homeRegionY * 256)); } - set { - homeRegionX = (uint)(value >> 40); - homeRegionY = (((uint)(value)) >> 8); - } - } - public uint homeRegionX; - public uint homeRegionY; - /// - /// The coordinates inside the region of the home location - /// - public LLVector3 homeLocation; - /// - /// Where the user will be looking when they rez. - /// - public LLVector3 homeLookAt; - - /// - /// A UNIX Timestamp (seconds since epoch) for the users creation - /// - public int created; - /// - /// A UNIX Timestamp for the users last login date / time - /// - public int lastLogin; - - public LLUUID rootInventoryFolderID; - - /// - /// A URI to the users inventory server, used for foreigners and large grids - /// - public string userInventoryURI = String.Empty; - /// - /// A URI to the users asset server, used for foreigners and large grids. - /// - public string userAssetURI = String.Empty; - - /// - /// A uint mask containing the "I can do" fields of the users profile - /// - public uint profileCanDoMask; - /// - /// A uint mask containing the "I want to do" part of the users profile - /// - public uint profileWantDoMask; // Profile window "I want to" mask - - /// - /// The about text listed in a users profile. - /// - public string profileAboutText = String.Empty; - /// - /// The first life about text listed in a users profile - /// - public string profileFirstText = String.Empty; - - /// - /// The profile image for an avatar stored on the asset server - /// - public LLUUID profileImage; - /// - /// The profile image for the users first life tab - /// - public LLUUID profileFirstImage; - /// - /// The users last registered agent (filled in on the user server) - /// - public UserAgentData currentAgent; - } - - /// - /// Information about a users session - /// - public class UserAgentData - { - /// - /// The UUID of the users avatar (not the agent!) - /// - public LLUUID UUID; - /// - /// The IP address of the user - /// - public string agentIP = String.Empty; - /// - /// The port of the user - /// - public uint agentPort; - /// - /// Is the user online? - /// - public bool agentOnline; - /// - /// The session ID for the user (also the agent ID) - /// - public LLUUID sessionID; - /// - /// The "secure" session ID for the user - /// - /// Not very secure. Dont rely on it for anything more than Linden Lab does. - public LLUUID secureSessionID; - /// - /// The region the user logged into initially - /// - public LLUUID regionID; - /// - /// A unix timestamp from when the user logged in - /// - public int loginTime; - /// - /// When this agent expired and logged out, 0 if still online - /// - public int logoutTime; - /// - /// Current region the user is logged into - /// - public LLUUID currentRegion; - /// - /// Region handle of the current region the user is in - /// - public ulong currentHandle; - /// - /// The position of the user within the region - /// - public LLVector3 currentPos; - } -} \ No newline at end of file -- cgit v1.1