From 9b66108081a8c8cf79faaa6c541554091c40850e Mon Sep 17 00:00:00 2001
From: Dr Scofield
Date: Fri, 6 Feb 2009 16:55:34 +0000
Subject: This changeset is the step 1 of 2 in refactoring
OpenSim.Region.Environment into a "framework" part and a modules only part.
This first changeset refactors OpenSim.Region.Environment.Scenes,
OpenSim.Region.Environment.Interfaces, and OpenSim.Region.Interfaces into
OpenSim.Region.Framework.{Interfaces,Scenes} leaving only region modules in
OpenSim.Region.Environment.
The next step will be to move region modules up from
OpenSim.Region.Environment.Modules to OpenSim.Region.CoreModules and
then sort out which modules are really core modules and which should
move out to forge.
I've been very careful to NOT BREAK anything. i hope i've
succeeded. as this is the work of a whole week i hope i managed to
keep track with the applied patches of the last week --- could any of
you that did check in stuff have a look at whether it survived? thx!
---
.../Interfaces/IAgentAssetTransactions.cs | 48 -
.../Environment/Interfaces/IAvatarFactory.cs | 39 -
.../Environment/Interfaces/ICapabilitiesModule.cs | 74 -
OpenSim/Region/Environment/Interfaces/ICommand.cs | 50 -
.../Environment/Interfaces/ICommandableModule.cs | 37 -
.../Region/Environment/Interfaces/ICommander.cs | 47 -
.../Region/Environment/Interfaces/IDialogModule.cs | 136 -
.../Interfaces/IDynamicTextureManager.cs | 58 -
.../Region/Environment/Interfaces/IEmailModule.cs | 48 -
.../Environment/Interfaces/IEntityCreator.cs | 56 -
.../Environment/Interfaces/IEntityInventory.cs | 208 -
.../Environment/Interfaces/IEstateDataStore.cs | 41 -
.../Region/Environment/Interfaces/IEstateModule.cs | 44 -
.../Environment/Interfaces/IFriendsModule.cs | 49 -
.../Region/Environment/Interfaces/IHttpRequests.cs | 42 -
.../Environment/Interfaces/IInterregionComms.cs | 81 -
.../Interfaces/IInventoryTransferModule.cs | 43 -
.../Region/Environment/Interfaces/IJ2KDecoder.cs | 41 -
.../Region/Environment/Interfaces/ILandChannel.cs | 49 -
.../Region/Environment/Interfaces/ILandObject.cs | 83 -
.../Interfaces/IRegionArchiverModule.cs | 75 -
.../Environment/Interfaces/IRegionDataStore.cs | 109 -
.../Region/Environment/Interfaces/IRegionModule.cs | 41 -
.../Interfaces/IRegionSerialiserModule.cs | 122 -
.../Region/Environment/Interfaces/ISoundModule.cs | 41 -
OpenSim/Region/Environment/Interfaces/ITerrain.cs | 78 -
.../Environment/Interfaces/ITerrainChannel.cs | 48 -
.../Environment/Interfaces/ITextureSender.cs | 58 -
.../Environment/Interfaces/IVegetationModule.cs | 49 -
.../Region/Environment/Interfaces/IWindModule.cs | 41 -
.../Region/Environment/Interfaces/IWorldComm.cs | 48 -
OpenSim/Region/Environment/Interfaces/IXMLRPC.cs | 48 -
OpenSim/Region/Environment/Interfaces/IXfer.cs | 34 -
OpenSim/Region/Environment/ModuleLoader.cs | 327 --
.../AgentAssetTransactionsManager.cs | 4 +-
.../AssetTransaction/AgentAssetsTransactions.cs | 2 +-
.../AssetTransaction/AssetTransactionModule.cs | 5 +-
.../Agent/AssetTransaction/AssetXferUploader.cs | 2 +-
.../Agent/Capabilities/CapabilitiesModule.cs | 6 +-
.../Agent/TextureDownload/TextureDownloadModule.cs | 6 +-
.../Agent/TextureDownload/TextureNotFoundSender.cs | 2 +-
.../TextureDownload/UserTextureDownloadService.cs | 4 +-
.../Agent/TextureSender/J2KDecoderModule.cs | 4 +-
.../Modules/Agent/TextureSender/TextureSender.cs | 2 +-
.../Environment/Modules/Agent/Xfer/XferModule.cs | 4 +-
.../Avatar/AvatarFactory/AvatarFactoryModule.cs | 4 +-
.../Modules/Avatar/Chat/ChannelState.cs | 4 +-
.../Environment/Modules/Avatar/Chat/ChatModule.cs | 4 +-
.../Modules/Avatar/Chat/IRCBridgeModule.cs | 4 +-
.../Modules/Avatar/Chat/IRCConnector.cs | 4 +-
.../Environment/Modules/Avatar/Chat/RegionState.cs | 4 +-
.../Modules/Avatar/Combat/CombatModule.cs | 5 +-
.../Modules/Avatar/Concierge/ConciergeModule.cs | 4 +-
.../Currency/SampleMoney/SampleMoneyModule.cs | 5 +-
.../Modules/Avatar/Dialog/DialogModule.cs | 4 +-
.../Modules/Avatar/Friends/FriendsModule.cs | 5 +-
.../Modules/Avatar/Gestures/GesturesModule.cs | 4 +-
.../Modules/Avatar/Groups/GroupsModule.cs | 4 +-
.../Avatar/InstantMessage/InstantMessageModule.cs | 5 +-
.../Avatar/InstantMessage/MessageTransferModule.cs | 5 +-
.../Avatar/InstantMessage/PresenceModule.cs | 5 +-
.../Archiver/InventoryArchiveReadRequest.cs | 2 +-
.../Archiver/InventoryArchiveWriteRequest.cs | 2 +-
.../Inventory/Transfer/InventoryTransferModule.cs | 5 +-
.../Environment/Modules/Avatar/Lure/LureModule.cs | 5 +-
.../Modules/Avatar/ObjectCaps/ObjectAdd.cs | 4 +-
.../Avatar/Profiles/AvatarProfilesModule.cs | 4 +-
.../Voice/AsterixVoice/AsteriskVoiceModule.cs | 4 +-
.../Avatar/Voice/SIPVoice/SIPVoiceModule.cs | 4 +-
.../Communications/Local/LocalInterregionComms.cs | 5 +-
.../Communications/REST/RESTInterregionComms.cs | 7 +-
.../ContentManagementSystem/AuraMetaEntity.cs | 4 +-
.../ContentManagementSystem/BeamMetaEntity.cs | 4 +-
.../ContentManagementSystem/CMController.cs | 4 +-
.../ContentManagementSystem/CMEntityCollection.cs | 4 +-
.../Modules/ContentManagementSystem/CMModel.cs | 4 +-
.../Modules/ContentManagementSystem/CMView.cs | 4 +-
.../ContentManagementEntity.cs | 4 +-
.../ContentManagementModule.cs | 4 +-
.../ContentManagementSystem/FileSystemDatabase.cs | 4 +-
.../Modules/ContentManagementSystem/GitDatabase.cs | 4 +-
.../ContentManagementSystem/IContentDatabase.cs | 2 +-
.../Modules/ContentManagementSystem/MetaEntity.cs | 4 +-
.../ContentManagementSystem/PointMetaEntity.cs | 4 +-
.../SceneObjectGroupDiff.cs | 4 +-
.../Framework/EventQueue/EventQueueGetModule.cs | 77 +-
.../Framework/EventQueue/EventQueueHelper.cs | 74 +-
.../Framework/InterfaceCommander/Command.cs | 2 +-
.../Framework/InterfaceCommander/Commander.cs | 2 +-
.../Modules/Grid/Interregion/IInterregionModule.cs | 2 +-
.../Modules/Grid/Interregion/InterregionModule.cs | 4 +-
.../Modules/Hypergrid/HGStandaloneAssetService.cs | 4 +-
.../Hypergrid/HGStandaloneInventoryService.cs | 4 +-
.../Modules/Hypergrid/HGWorldMapModule.cs | 6 +-
.../Modules/InterGrid/OpenGridProtocolModule.cs | 4 +-
.../DynamicTexture/DynamicTextureModule.cs | 4 +-
.../Modules/Scripting/EMailModules/EmailModule.cs | 4 +-
.../Scripting/HttpRequest/ScriptsHttpRequests.cs | 183 +-
.../Scripting/LoadImageURL/LoadImageURLModule.cs | 4 +-
.../Scripting/VectorRender/VectorRenderModule.cs | 4 +-
.../Modules/Scripting/WorldComm/WorldCommModule.cs | 8 +-
.../Modules/Scripting/XMLRPC/XMLRPCModule.cs | 110 +-
.../Modules/World/Archiver/ArchiveReadRequest.cs | 4 +-
.../World/Archiver/ArchiveWriteRequestExecution.cs | 4 +-
.../Archiver/ArchiveWriteRequestPreparation.cs | 4 +-
.../Modules/World/Archiver/ArchiverModule.cs | 4 +-
.../Modules/World/Archiver/AssetsRequest.cs | 4 +-
.../Modules/World/Archiver/Tests/ArchiverTests.cs | 4 +-
.../Modules/World/Estate/EstateManagementModule.cs | 4 +-
.../World/Estate/EstateTerrainXferHandler.cs | 2 +-
.../Environment/Modules/World/Land/LandChannel.cs | 4 +-
.../Modules/World/Land/LandManagementModule.cs | 4 +-
.../Environment/Modules/World/Land/LandObject.cs | 4 +-
.../Environment/Modules/World/NPC/NPCAvatar.cs | 2 +-
.../Environment/Modules/World/NPC/NPCModule.cs | 4 +-
.../Modules/World/Permissions/PermissionsModule.cs | 4 +-
.../Modules/World/Serialiser/IFileSerialiser.cs | 2 +-
.../Modules/World/Serialiser/SceneXmlLoader.cs | 289 --
.../Modules/World/Serialiser/SerialiseObjects.cs | 2 +-
.../Modules/World/Serialiser/SerialiseTerrain.cs | 2 +-
.../Modules/World/Serialiser/SerialiserModule.cs | 4 +-
.../Environment/Modules/World/Sound/SoundModule.cs | 4 +-
.../Environment/Modules/World/Sun/SunModule.cs | 4 +-
.../Modules/World/Terrain/Effects/CookieCutter.cs | 3 +-
.../Terrain/Effects/DefaultTerrainGenerator.cs | 3 +-
.../Modules/World/Terrain/FileLoaders/BMP.cs | 2 +-
.../Modules/World/Terrain/FileLoaders/GIF.cs | 2 +-
.../Terrain/FileLoaders/GenericSystemDrawing.cs | 3 +-
.../Modules/World/Terrain/FileLoaders/JPEG.cs | 2 +-
.../Modules/World/Terrain/FileLoaders/LLRAW.cs | 3 +-
.../Modules/World/Terrain/FileLoaders/PNG.cs | 2 +-
.../Modules/World/Terrain/FileLoaders/RAW32.cs | 3 +-
.../Modules/World/Terrain/FileLoaders/TIFF.cs | 2 +-
.../Modules/World/Terrain/FileLoaders/Terragen.cs | 3 +-
.../World/Terrain/FloodBrushes/FlattenArea.cs | 2 +-
.../World/Terrain/FloodBrushes/LowerArea.cs | 2 +-
.../World/Terrain/FloodBrushes/NoiseArea.cs | 3 +-
.../World/Terrain/FloodBrushes/RaiseArea.cs | 2 +-
.../World/Terrain/FloodBrushes/RevertArea.cs | 2 +-
.../World/Terrain/FloodBrushes/SmoothArea.cs | 2 +-
.../Modules/World/Terrain/ITerrainEffect.cs | 2 +-
.../Modules/World/Terrain/ITerrainFloodEffect.cs | 2 +-
.../Modules/World/Terrain/ITerrainLoader.cs | 2 +-
.../World/Terrain/ITerrainPaintableEffect.cs | 2 +-
.../World/Terrain/PaintBrushes/ErodeSphere.cs | 3 +-
.../World/Terrain/PaintBrushes/FlattenSphere.cs | 3 +-
.../World/Terrain/PaintBrushes/LowerSphere.cs | 2 +-
.../World/Terrain/PaintBrushes/NoiseSphere.cs | 3 +-
.../World/Terrain/PaintBrushes/OlsenSphere.cs | 3 +-
.../World/Terrain/PaintBrushes/RaiseSphere.cs | 3 +-
.../World/Terrain/PaintBrushes/RevertSphere.cs | 3 +-
.../World/Terrain/PaintBrushes/SmoothSphere.cs | 3 +-
.../World/Terrain/PaintBrushes/WeatherSphere.cs | 3 +-
.../Modules/World/Terrain/TerrainChannel.cs | 242 --
.../Modules/World/Terrain/TerrainModule.cs | 4 +-
.../Modules/World/Terrain/TerrainUtil.cs | 132 -
.../Modules/World/Terrain/Tests/TerrainTest.cs | 1 +
.../World/TreePopulator/TreePopulatorModule.cs | 4 +-
.../Modules/World/Vegetation/VegetationModule.cs | 4 +-
.../Environment/Modules/World/Wind/WindModule.cs | 4 +-
.../World/WorldMap/IMapTileTerrainRenderer.cs | 2 +-
.../Modules/World/WorldMap/MapImageModule.cs | 4 +-
.../Modules/World/WorldMap/MapSearchModule.cs | 6 +-
.../World/WorldMap/ShadedMapTileRenderer.cs | 4 +-
.../World/WorldMap/TexturedMapTileRenderer.cs | 4 +-
.../Modules/World/WorldMap/WorldMapModule.cs | 6 +-
OpenSim/Region/Environment/Scenes/Animation.cs | 59 -
OpenSim/Region/Environment/Scenes/AnimationSet.cs | 155 -
.../Scenes/AsyncSceneObjectGroupDeleter.cs | 165 -
.../Region/Environment/Scenes/AvatarAnimations.cs | 63 -
OpenSim/Region/Environment/Scenes/EntityBase.cs | 253 --
OpenSim/Region/Environment/Scenes/EntityManager.cs | 279 --
OpenSim/Region/Environment/Scenes/EventManager.cs | 980 -----
.../Environment/Scenes/Hypergrid/HGAssetMapper.cs | 376 --
.../Scenes/Hypergrid/HGScene.Inventory.cs | 152 -
.../Region/Environment/Scenes/Hypergrid/HGScene.cs | 84 -
.../Hypergrid/HGSceneCommunicationService.cs | 363 --
.../Environment/Scenes/IScenePresenceBody.cs | 37 -
OpenSim/Region/Environment/Scenes/ReturnInfo.cs | 39 -
.../Region/Environment/Scenes/Scene.Inventory.cs | 2665 ------------
.../Environment/Scenes/Scene.PacketHandlers.cs | 632 ---
.../Region/Environment/Scenes/Scene.Permissions.cs | 1334 ------
OpenSim/Region/Environment/Scenes/Scene.cs | 4237 --------------------
OpenSim/Region/Environment/Scenes/SceneBase.cs | 419 --
.../Scenes/SceneCommunicationService.cs | 1102 -----
OpenSim/Region/Environment/Scenes/SceneGraph.cs | 1811 ---------
OpenSim/Region/Environment/Scenes/SceneManager.cs | 669 ----
.../Scenes/SceneObjectGroup.Inventory.cs | 401 --
.../Region/Environment/Scenes/SceneObjectGroup.cs | 3012 --------------
.../Region/Environment/Scenes/SceneObjectPart.cs | 3826 ------------------
.../Environment/Scenes/SceneObjectPartInventory.cs | 892 -----
OpenSim/Region/Environment/Scenes/ScenePresence.cs | 3651 -----------------
.../Environment/Scenes/Scripting/IScriptHost.cs | 46 -
.../Environment/Scenes/Scripting/NullScriptHost.cs | 86 -
.../Scenes/Scripting/ScriptEngineInterface.cs | 38 -
.../Scenes/Scripting/ScriptEngineLoader.cs | 119 -
.../Region/Environment/Scenes/SimStatsReporter.cs | 450 ---
.../Environment/Scenes/Tests/EntityManagerTests.cs | 176 -
.../Scenes/Tests/SceneObjectBasicTests.cs | 139 -
.../Scenes/Tests/SceneObjectLinkingTests.cs | 249 --
.../Environment/Scenes/Tests/ScenePresenceTests.cs | 292 --
.../Scenes/Tests/StandaloneTeleportTests.cs | 105 -
OpenSim/Region/Environment/Scenes/UndoState.cs | 116 -
OpenSim/Region/Environment/StorageManager.cs | 96 -
.../Region/Environment/Types/BasicQuadTreeNode.cs | 269 --
OpenSim/Region/Environment/Types/UpdateQueue.cs | 134 -
206 files changed, 502 insertions(+), 33416 deletions(-)
delete mode 100644 OpenSim/Region/Environment/Interfaces/IAgentAssetTransactions.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/ICapabilitiesModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/ICommand.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/ICommandableModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/ICommander.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IDialogModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IEmailModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IEntityCreator.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IEntityInventory.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IEstateDataStore.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IEstateModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IFriendsModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IHttpRequests.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IInterregionComms.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IInventoryTransferModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IJ2KDecoder.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/ILandChannel.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/ILandObject.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IRegionArchiverModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IRegionModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IRegionSerialiserModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/ISoundModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/ITerrain.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/ITerrainChannel.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/ITextureSender.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IVegetationModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IWindModule.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IWorldComm.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IXMLRPC.cs
delete mode 100644 OpenSim/Region/Environment/Interfaces/IXfer.cs
delete mode 100644 OpenSim/Region/Environment/ModuleLoader.cs
delete mode 100644 OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
delete mode 100644 OpenSim/Region/Environment/Modules/World/Terrain/TerrainChannel.cs
delete mode 100644 OpenSim/Region/Environment/Modules/World/Terrain/TerrainUtil.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Animation.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/AnimationSet.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/AvatarAnimations.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/EntityBase.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/EntityManager.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/EventManager.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.Inventory.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/ReturnInfo.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Scene.Permissions.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Scene.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/SceneBase.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/SceneGraph.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/SceneManager.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/SceneObjectPartInventory.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/ScenePresence.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Tests/EntityManagerTests.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Tests/SceneObjectBasicTests.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Tests/SceneObjectLinkingTests.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/Tests/StandaloneTeleportTests.cs
delete mode 100644 OpenSim/Region/Environment/Scenes/UndoState.cs
delete mode 100644 OpenSim/Region/Environment/StorageManager.cs
delete mode 100644 OpenSim/Region/Environment/Types/BasicQuadTreeNode.cs
delete mode 100644 OpenSim/Region/Environment/Types/UpdateQueue.cs
(limited to 'OpenSim/Region/Environment')
diff --git a/OpenSim/Region/Environment/Interfaces/IAgentAssetTransactions.cs b/OpenSim/Region/Environment/Interfaces/IAgentAssetTransactions.cs
deleted file mode 100644
index 43c733d..0000000
--- a/OpenSim/Region/Environment/Interfaces/IAgentAssetTransactions.cs
+++ /dev/null
@@ -1,48 +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 OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Region.Environment.Scenes;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IAgentAssetTransactions
- {
- void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID,
- InventoryItemBase item);
-
- void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID,
- uint callbackID, string description, string name, sbyte invType,
- sbyte type, byte wearableType, uint nextOwnerMask);
-
- void HandleTaskItemUpdateFromTransaction(
- IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item);
-
- void RemoveAgentAssetTransactions(UUID userID);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs
deleted file mode 100644
index a722833..0000000
--- a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs
+++ /dev/null
@@ -1,39 +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 OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Region.Environment.Scenes;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IAvatarFactory
- {
- bool TryGetAvatarAppearance(UUID avatarId, out AvatarAppearance appearance);
- void UpdateDatabase(UUID userID, AvatarAppearance avatAppearance);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/ICapabilitiesModule.cs b/OpenSim/Region/Environment/Interfaces/ICapabilitiesModule.cs
deleted file mode 100644
index 8a2c549..0000000
--- a/OpenSim/Region/Environment/Interfaces/ICapabilitiesModule.cs
+++ /dev/null
@@ -1,74 +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.Collections.Generic;
-using OpenMetaverse;
-using OpenSim.Framework;
-using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface ICapabilitiesModule
- {
- void NewUserConnection(AgentCircuitData agent);
-
- ///
- /// Add a caps handler for the given agent. If the CAPS handler already exists for this agent,
- /// then it is replaced by a new CAPS handler.
- ///
- /// FIXME: On login this is called twice, once for the login and once when the connection is made.
- /// This is somewhat innefficient and should be fixed. The initial login creation is necessary
- /// since the client asks for capabilities immediately after being informed of the seed.
- ///
- ///
- ///
- void AddCapsHandler(UUID agentId);
-
- ///
- /// Remove the caps handler for a given agent.
- ///
- ///
- void RemoveCapsHandler(UUID agentId);
-
- ///
- /// Will return null if the agent doesn't have a caps handler registered
- ///
- ///
- Caps GetCapsHandlerForUser(UUID agentId);
-
- Dictionary GetChildrenSeeds(UUID agentID);
-
- string GetChildSeed(UUID agentID, ulong handle);
-
- void SetChildrenSeed(UUID agentID, Dictionary seeds);
-
- void DropChildSeed(UUID agentID, ulong handle);
-
- string GetCapsPath(UUID agentId);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/ICommand.cs b/OpenSim/Region/Environment/Interfaces/ICommand.cs
deleted file mode 100644
index c1da2c3..0000000
--- a/OpenSim/Region/Environment/Interfaces/ICommand.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 System.Collections.Generic;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public enum CommandIntentions
- {
- COMMAND_STATISTICAL,
- COMMAND_NON_HAZARDOUS,
- COMMAND_HAZARDOUS
- };
-
- public interface ICommand
- {
- void AddArgument(string name, string helptext, string type);
- Dictionary Arguments { get; }
- string Help { get; }
- string Name { get; }
- CommandIntentions Intentions { get; }
-
- void Run(object[] args);
- void ShowConsoleHelp();
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/ICommandableModule.cs b/OpenSim/Region/Environment/Interfaces/ICommandableModule.cs
deleted file mode 100644
index c4ed942..0000000
--- a/OpenSim/Region/Environment/Interfaces/ICommandableModule.cs
+++ /dev/null
@@ -1,37 +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.Region.Environment.Interfaces
-{
- public interface ICommandableModule
- {
- ICommander CommandInterface
- {
- get;
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/ICommander.cs b/OpenSim/Region/Environment/Interfaces/ICommander.cs
deleted file mode 100644
index a61ce490..0000000
--- a/OpenSim/Region/Environment/Interfaces/ICommander.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.
- */
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface ICommander
- {
- ///
- /// The name of this commander
- ///
- string Name { get; }
-
- ///
- /// Provide general help information about this commander.
- ///
- string Help { get; }
-
- void ProcessConsoleCommand(string function, string[] args);
- void RegisterCommand(string commandName, ICommand command);
- void Run(string function, object[] args);
- string GenerateRuntimeAPI();
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs b/OpenSim/Region/Environment/Interfaces/IDialogModule.cs
deleted file mode 100644
index 755aa27..0000000
--- a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs
+++ /dev/null
@@ -1,136 +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 OpenMetaverse;
-using OpenSim.Framework;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IDialogModule
- {
- ///
- /// Send a non-modal alert message to a particular user. This can disappear from the user's view after a
- /// small interval.
- ///
- ///
- ///
- void SendAlertToUser(IClientAPI client, string message);
-
- ///
- /// Send an alert message to a particular user.
- ///
- ///
- ///
- ///
- void SendAlertToUser(IClientAPI client, string message, bool modal);
-
- ///
- /// Send a non-modal alert message to a particular user.
- ///
- ///
- ///
- void SendAlertToUser(UUID agentID, string message);
-
- ///
- /// Send an alert message to a particular user.
- ///
- ///
- ///
- ///
- void SendAlertToUser(UUID agentID, string message, bool modal);
-
- ///
- /// Send an alert message to a particular user.
- ///
- ///
- ///
- ///
- ///
- void SendAlertToUser(string firstName, string lastName, string message, bool modal);
-
- ///
- /// Send an alert message to all users in the scene.
- ///
- ///
- void SendGeneralAlert(string message);
-
- ///
- /// Send a dialog box to a particular user.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- void SendDialogToUser(
- UUID avatarID, string objectName, UUID objectID, UUID ownerID,
- string message, UUID textureID, int ch, string[] buttonlabels);
-
- ///
- /// Send a url to a particular user.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- void SendUrlToUser(
- UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
-
- ///
- /// Send a notification to all users in the scene. This notification should remain around until the
- /// user explicitly dismisses it.
- ///
- ///
- /// On the Linden Labs Second Client (as of 1.21), this is a big blue box message on the upper right of the
- /// screen.
- ///
- /// The user sending the message
- /// The name of the user doing the sending
- /// The message being sent to the user
- void SendNotificationToUsersInRegion(UUID fromAvatarID, string fromAvatarName, string message);
-
- ///
- /// Send a notification to all users in the estate. This notification should remain around until the
- /// user explicitly dismisses it.
- ///
- ///
- /// On the Linden Labs Second Client (as of 1.21), this is a big blue box message on the upper right of the
- /// screen.
- ///
- /// The user sending the message
- /// The name of the user doing the sending
- /// The message being sent to the user
- void SendNotificationToUsersInEstate(UUID fromAvatarID, string fromAvatarName, string message);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs b/OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs
deleted file mode 100644
index c54c697..0000000
--- a/OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs
+++ /dev/null
@@ -1,58 +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 OpenMetaverse;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IDynamicTextureManager
- {
- void RegisterRender(string handleType, IDynamicTextureRender render);
- void ReturnData(UUID id, byte[] data);
-
- UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams,
- int updateTimer);
- UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams,
- int updateTimer, bool SetBlending, byte AlphaValue);
- UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams,
- int updateTimer);
- UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams,
- int updateTimer, bool SetBlending, byte AlphaValue);
- }
-
- public interface IDynamicTextureRender
- {
- string GetName();
- string GetContentType();
- bool SupportsAsynchronous();
- byte[] ConvertUrl(string url, string extraParams);
- byte[] ConvertStream(Stream data, string extraParams);
- bool AsyncConvertUrl(UUID id, string url, string extraParams);
- bool AsyncConvertData(UUID id, string bodyData, string extraParams);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IEmailModule.cs b/OpenSim/Region/Environment/Interfaces/IEmailModule.cs
deleted file mode 100644
index 5f1bcf3..0000000
--- a/OpenSim/Region/Environment/Interfaces/IEmailModule.cs
+++ /dev/null
@@ -1,48 +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;
-using OpenMetaverse;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public class Email
- {
- public string time;
- public string sender;
- public string subject;
- public string message;
- public int numLeft;
- }
-
- public interface IEmailModule : IRegionModule
- {
- void SendEmail(UUID objectID, string address, string subject, string body);
- Email GetNextEmail(UUID objectID, string sender, string subject);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IEntityCreator.cs b/OpenSim/Region/Environment/Interfaces/IEntityCreator.cs
deleted file mode 100644
index f45e959..0000000
--- a/OpenSim/Region/Environment/Interfaces/IEntityCreator.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 OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Region.Environment.Scenes;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- ///
- /// Interface to a class that is capable of creating entities
- ///
- public interface IEntityCreator
- {
- ///
- /// The entities that this class is capable of creating. These match the PCode format.
- ///
- ///
- PCode[] CreationCapabilities { get; }
-
- ///
- /// Create an entity
- ///
- ///
- ///
- ///
- ///
- ///
- /// The entity created, or null if the creation failed
- SceneObjectGroup CreateEntity(UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IEntityInventory.cs b/OpenSim/Region/Environment/Interfaces/IEntityInventory.cs
deleted file mode 100644
index a270293..0000000
--- a/OpenSim/Region/Environment/Interfaces/IEntityInventory.cs
+++ /dev/null
@@ -1,208 +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.Collections.Generic;
-using System.Reflection;
-using OpenMetaverse;
-using log4net;
-using OpenSim.Framework;
-using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes.Scripting;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- ///
- /// Interface to an entity's (SceneObjectPart's) inventory
- ///
- ///
- /// This is not a finished 1.0 candidate interface
- public interface IEntityInventory
- {
- ///
- /// Force the task inventory of this prim to persist at the next update sweep
- ///
- void ForceInventoryPersistence();
-
- ///
- /// Reset UUIDs for all the items in the prim's inventory.
- ///
- ///
- /// This involves either generating
- /// new ones or setting existing UUIDs to the correct parent UUIDs.
- ///
- /// If this method is called and there are inventory items, then we regard the inventory as having changed.
- ///
- /// Link number for the part
- void ResetInventoryIDs();
-
- ///
- /// Change every item in this inventory to a new owner.
- ///
- ///
- void ChangeInventoryOwner(UUID ownerId);
-
- ///
- /// Change every item in this inventory to a new group.
- ///
- ///
- void ChangeInventoryGroup(UUID groupID);
-
- ///
- /// Start all the scripts contained in this entity's inventory
- ///
- void CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource);
-
- ///
- /// Stop all the scripts in this entity.
- ///
- void RemoveScriptInstances();
-
- ///
- /// Start a script which is in this entity's inventory.
- ///
- ///
- ///
- ///
- ///
- void CreateScriptInstance(
- TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource);
-
- ///
- /// Start a script which is in this entity's inventory.
- ///
- ///
- ///
- ///
- ///
- ///
- void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource);
-
- ///
- /// Stop a script which is in this prim's inventory.
- ///
- ///
- void RemoveScriptInstance(UUID itemId);
-
- ///
- /// Add an item to this entity's inventory. If an item with the same name already exists, then an alternative
- /// name is chosen.
- ///
- ///
- void AddInventoryItem(TaskInventoryItem item, bool allowedDrop);
-
- ///
- /// Add an item to this entity's inventory. If an item with the same name already exists, it is replaced.
- ///
- ///
- void AddInventoryItemExclusive(TaskInventoryItem item, bool allowedDrop);
-
- ///
- /// Restore a whole collection of items to the entity's inventory at once.
- /// We assume that the items already have all their fields correctly filled out.
- /// The items are not flagged for persistence to the database, since they are being restored
- /// from persistence rather than being newly added.
- ///
- ///
- void RestoreInventoryItems(ICollection items);
-
- ///
- /// Returns an existing inventory item. Returns the original, so any changes will be live.
- ///
- ///
- /// null if the item does not exist
- TaskInventoryItem GetInventoryItem(UUID itemId);
-
- ///
- /// Update an existing inventory item.
- ///
- /// The updated item. An item with the same id must already exist
- /// in this prim's inventory.
- /// false if the item did not exist, true if the update occurred successfully
- bool UpdateInventoryItem(TaskInventoryItem item);
-
- ///
- /// Remove an item from this entity's inventory
- ///
- ///
- /// Numeric asset type of the item removed. Returns -1 if the item did not exist
- /// in this prim's inventory.
- int RemoveInventoryItem(UUID itemID);
-
- ///
- /// Return the name with which a client can request a xfer of this prim's inventory metadata
- ///
- string GetInventoryFileName();
-
- bool GetInventoryFileName(IClientAPI client, uint localID);
-
- ///
- /// Serialize all the metadata for the items in this prim's inventory ready for sending to the client
- ///
- ///
- void RequestInventoryFile(IClientAPI client, IXfer xferManager);
-
- ///
- /// Backup the inventory to the given data store
- ///
- ///
- void ProcessInventoryBackup(IRegionDataStore datastore);
-
- uint MaskEffectivePermissions();
-
- void ApplyNextOwnerPermissions();
-
- void ApplyGodPermissions(uint perms);
-
- ///
- /// Returns true if this inventory contains any scripts
- ///
- bool ContainsScripts();
-
- ///
- /// Get the uuids of all items in this inventory
- ///
- ///
- List GetInventoryList();
-
- ///
- /// Get the names of the assemblies associated with scripts in this inventory.
- ///
- ///
- string[] GetScriptAssemblies();
-
- ///
- /// Get the xml representing the saved states of scripts in this inventory.
- ///
- ///
- /// A
- ///
- Dictionary GetScriptStates();
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IEstateDataStore.cs b/OpenSim/Region/Environment/Interfaces/IEstateDataStore.cs
deleted file mode 100644
index f2d14a6..0000000
--- a/OpenSim/Region/Environment/Interfaces/IEstateDataStore.cs
+++ /dev/null
@@ -1,41 +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;
-using OpenMetaverse;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IEstateDataStore
- {
- void Initialise(string connectstring);
-
- EstateSettings LoadEstateSettings(UUID regionID);
- void StoreEstateSettings(EstateSettings es);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IEstateModule.cs b/OpenSim/Region/Environment/Interfaces/IEstateModule.cs
deleted file mode 100644
index d84af20..0000000
--- a/OpenSim/Region/Environment/Interfaces/IEstateModule.cs
+++ /dev/null
@@ -1,44 +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;
-using OpenMetaverse;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IEstateModule : IRegionModule
- {
- uint GetRegionFlags();
- bool IsManager(UUID avatarID);
-
- ///
- /// Tell all clients about the current state of the region (terrain textures, water height, etc.).
- ///
- void sendRegionHandshakeToAll();
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IFriendsModule.cs b/OpenSim/Region/Environment/Interfaces/IFriendsModule.cs
deleted file mode 100644
index 5d3376c..0000000
--- a/OpenSim/Region/Environment/Interfaces/IFriendsModule.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 OpenMetaverse;
-using OpenSim.Framework;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IFriendsModule
- {
- ///
- /// Offer a friendship to a user from the server end rather than by direct initiation from a client.
- ///
- ///
- /// A user with this id must existing in the user data store, but need not be logged on.
- ///
- ///
- /// An actually logged in client to which the offer is being made.
- /// FIXME: This is somewhat too tightly coupled - it should arguably be possible to offer friendships even if the
- /// receiving user is not currently online.
- ///
- ///
- void OfferFriendship(UUID fromUserId, IClientAPI toUserClient, string offerMessage);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IHttpRequests.cs b/OpenSim/Region/Environment/Interfaces/IHttpRequests.cs
deleted file mode 100644
index 216782b..0000000
--- a/OpenSim/Region/Environment/Interfaces/IHttpRequests.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.
- */
-
-using System.Collections.Generic;
-using OpenMetaverse;
-using OpenSim.Region.Environment.Modules.Scripting.HttpRequest;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IHttpRequests
- {
- UUID MakeHttpRequest(string url, string parameters, string body);
- UUID StartHttpRequest(uint localID, UUID itemID, string url, List parameters, Dictionary headers, string body);
- void StopHttpRequest(uint m_localID, UUID m_itemID);
- HttpRequestClass GetNextCompletedRequest();
- void RemoveCompletedRequest(UUID id);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IInterregionComms.cs b/OpenSim/Region/Environment/Interfaces/IInterregionComms.cs
deleted file mode 100644
index 7aeef15..0000000
--- a/OpenSim/Region/Environment/Interfaces/IInterregionComms.cs
+++ /dev/null
@@ -1,81 +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;
-using OpenMetaverse;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public delegate bool ChildAgentUpdateReceived(AgentData data);
-
- public interface IInterregionCommsOut
- {
- bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit);
-
- ///
- /// Full child agent update.
- ///
- ///
- ///
- ///
- bool SendChildAgentUpdate(ulong regionHandle, AgentData data);
-
- ///
- /// Short child agent update, mostly for position.
- ///
- ///
- ///
- ///
- bool SendChildAgentUpdate(ulong regionHandle, AgentPosition data);
-
- ///
- /// Message from receiving region to departing region, telling it got contacted by the client.
- /// When sent over REST, it invokes the opaque uri.
- ///
- ///
- ///
- ///
- ///
- bool SendReleaseAgent(ulong regionHandle, UUID id, string uri);
-
- ///
- /// Close agent.
- ///
- ///
- ///
- ///
- bool SendCloseAgent(ulong regionHandle, UUID id);
- }
-
- // This may not be needed, but having it here for now.
- public interface IInterregionCommsIn
- {
- event ChildAgentUpdateReceived OnChildAgentUpdate;
- }
-
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IInventoryTransferModule.cs b/OpenSim/Region/Environment/Interfaces/IInventoryTransferModule.cs
deleted file mode 100644
index ee170b9..0000000
--- a/OpenSim/Region/Environment/Interfaces/IInventoryTransferModule.cs
+++ /dev/null
@@ -1,43 +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 OpenMetaverse;
-using OpenSim.Region.Environment;
-using OpenSim.Region.Environment.Scenes;
-
-namespace OpenSim.Framework
-{
- ///
- /// An interface for a module that manages inter-agent inventory offers and transfers.
- ///
- public interface IInventoryTransferModule
- {
- void SetRootAgentScene(UUID agentID, Scene scene);
- bool NeedSceneCacheClear(UUID agentID, Scene scene);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IJ2KDecoder.cs b/OpenSim/Region/Environment/Interfaces/IJ2KDecoder.cs
deleted file mode 100644
index 2a37195..0000000
--- a/OpenSim/Region/Environment/Interfaces/IJ2KDecoder.cs
+++ /dev/null
@@ -1,41 +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 OpenMetaverse;
-using OpenMetaverse.Imaging;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
-
- public delegate void DecodedCallback(UUID AssetId, OpenJPEG.J2KLayerInfo[] layers);
-
- public interface IJ2KDecoder
- {
- void decode(UUID AssetId, byte[] assetData, DecodedCallback decodedReturn);
- void syncdecode(UUID AssetId, byte[] j2kdata);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/ILandChannel.cs b/OpenSim/Region/Environment/Interfaces/ILandChannel.cs
deleted file mode 100644
index a8a58ef..0000000
--- a/OpenSim/Region/Environment/Interfaces/ILandChannel.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 System.Collections.Generic;
-using OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Region.Environment.Scenes;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface ILandChannel
- {
- List ParcelsNearPoint(Vector3 position);
- List AllParcels();
- ILandObject GetLandObject(int x, int y);
- ILandObject GetLandObject(float x, float y);
- bool IsLandPrimCountTainted();
- bool IsForcefulBansAllowed();
- void UpdateLandObject(int localID, LandData data);
- void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient);
- void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
- void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
- void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/ILandObject.cs b/OpenSim/Region/Environment/Interfaces/ILandObject.cs
deleted file mode 100644
index 6fcf74b..0000000
--- a/OpenSim/Region/Environment/Interfaces/ILandObject.cs
+++ /dev/null
@@ -1,83 +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 OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Region.Environment.Scenes;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public delegate int overrideParcelMaxPrimCountDelegate(ILandObject obj);
- public delegate int overrideSimulatorMaxPrimCountDelegate(ILandObject obj);
-
- public interface ILandObject
- {
- int getParcelMaxPrimCount(ILandObject thisObject);
- int getSimulatorMaxPrimCount(ILandObject thisObject);
-
- LandData landData { get; set; }
- bool[,] landBitmap { get; set; }
- UUID regionUUID { get; }
- bool containsPoint(int x, int y);
- ILandObject Copy();
-
- void sendLandUpdateToAvatarsOverMe();
-
- void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client);
- void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client);
- bool isEitherBannedOrRestricted(UUID avatar);
- bool isBannedFromLand(UUID avatar);
- bool isRestrictedFromLand(UUID avatar);
- void sendLandUpdateToClient(IClientAPI remote_client);
- List createAccessListArrayByFlag(AccessList flag);
- void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
- void updateAccessList(uint flags, List entries, IClientAPI remote_client);
- void updateLandBitmapByteArray();
- void setLandBitmapFromByteArray();
- bool[,] getLandBitmap();
- void forceUpdateLandInfo();
- void setLandBitmap(bool[,] bitmap);
-
-
- bool[,] basicFullRegionLandBitmap();
- bool[,] getSquareLandBitmap(int start_x, int start_y, int end_x, int end_y);
- bool[,] modifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value);
- bool[,] mergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add);
- void sendForceObjectSelect(int local_id, int request_type, List returnIDs, IClientAPI remote_client);
- void sendLandObjectOwners(IClientAPI remote_client);
- void returnObject(SceneObjectGroup obj);
- void returnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client);
- void resetLandPrimCounts();
- void addPrimToCount(SceneObjectGroup obj);
- void removePrimFromCount(SceneObjectGroup obj);
- void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area);
-
- void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
- void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionArchiverModule.cs b/OpenSim/Region/Environment/Interfaces/IRegionArchiverModule.cs
deleted file mode 100644
index 559d2a6..0000000
--- a/OpenSim/Region/Environment/Interfaces/IRegionArchiverModule.cs
+++ /dev/null
@@ -1,75 +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;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- ///
- /// Interface to region archive functionality
- ///
- public interface IRegionArchiverModule
- {
- ///
- /// Archive the region to the given path
- ///
- ///
- /// This method occurs asynchronously. If you want notification of when it has completed then subscribe to
- /// the EventManager.OnOarFileSaved event.
- ///
- ///
- void ArchiveRegion(string savePath);
-
- ///
- /// Archive the region to a stream.
- ///
- ///
- /// This method occurs asynchronously. If you want notification of when it has completed then subscribe to
- /// the EventManager.OnOarFileSaved event.
- ///
- ///
- void ArchiveRegion(Stream saveStream);
-
- ///
- /// Dearchive the given region archive into the scene
- ///
- ///
- /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event.
- ///
- ///
- void DearchiveRegion(string loadPath);
-
- ///
- /// Dearchive a region from a stream.
- ///
- ///
- /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event.
- ///
- ///
- void DearchiveRegion(Stream loadStream);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
deleted file mode 100644
index 78fc626..0000000
--- a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
+++ /dev/null
@@ -1,109 +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 OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Region.Environment.Scenes;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IRegionDataStore
- {
- ///
- /// Initialises the data storage engine
- ///
- /// The file to save the database to (may not be applicable). Alternatively,
- /// a connection string for the database
- void Initialise(string filename);
-
- ///
- /// Dispose the database
- ///
- void Dispose();
-
- ///
- /// Stores all object's details apart from inventory
- ///
- ///
- ///
- void StoreObject(SceneObjectGroup obj, UUID regionUUID);
-
- ///
- /// Entirely removes the object, including inventory
- ///
- ///
- ///
- ///
- void RemoveObject(UUID uuid, UUID regionUUID);
-
- ///
- /// Store a prim's inventory
- ///
- ///
- void StorePrimInventory(UUID primID, ICollection items);
-
- ///
- /// Load persisted objects from region storage.
- ///
- /// the Region UUID
- /// List of loaded groups
- List LoadObjects(UUID regionUUID);
-
- ///
- /// Store a terrain revision in region storage
- ///
- /// HeightField data
- /// region UUID
- void StoreTerrain(double[,] terrain, UUID regionID);
-
- ///
- /// Load the latest terrain revision from region storage
- ///
- /// the region UUID
- /// Heightfield data
- double[,] LoadTerrain(UUID regionID);
-
- void StoreLandObject(ILandObject Parcel);
-
- ///
- ///
- /// - delete from land where UUID=globalID
- /// - delete from landaccesslist where LandUUID=globalID
- ///
- ///
- ///
- void RemoveLandObject(UUID globalID);
-
- List LoadLandObjects(UUID regionUUID);
-
- void StoreRegionSettings(RegionSettings rs);
- RegionSettings LoadRegionSettings(UUID regionUUID);
-
- void Shutdown();
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionModule.cs b/OpenSim/Region/Environment/Interfaces/IRegionModule.cs
deleted file mode 100644
index ffa4f32..0000000
--- a/OpenSim/Region/Environment/Interfaces/IRegionModule.cs
+++ /dev/null
@@ -1,41 +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 Nini.Config;
-using OpenSim.Region.Environment.Scenes;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IRegionModule
- {
- void Initialise(Scene scene, IConfigSource source);
- void PostInitialise();
- void Close();
- string Name { get; }
- bool IsSharedModule { get; }
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionSerialiserModule.cs b/OpenSim/Region/Environment/Interfaces/IRegionSerialiserModule.cs
deleted file mode 100644
index b89f869..0000000
--- a/OpenSim/Region/Environment/Interfaces/IRegionSerialiserModule.cs
+++ /dev/null
@@ -1,122 +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 OpenMetaverse;
-using System.Collections.Generic;
-using System.IO;
-using OpenSim.Region.Environment.Scenes;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IRegionSerialiserModule
- {
- List SerialiseRegion(Scene scene, string saveDir);
-
- ///
- /// Load prims from the xml format
- ///
- ///
- ///
- ///
- ///
- void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset);
-
- ///
- /// Save prims in the xml format
- ///
- ///
- ///
- void SavePrimsToXml(Scene scene, string fileName);
-
- ///
- /// Load prims from the xml2 format
- ///
- ///
- ///
- void LoadPrimsFromXml2(Scene scene, string fileName);
-
- ///
- /// Load prims from the xml2 format
- ///
- ///
- ///
- ///
- void LoadPrimsFromXml2(Scene scene, TextReader reader, bool startScripts);
-
- ///
- /// Save prims in the xml2 format
- ///
- ///
- ///
- void SavePrimsToXml2(Scene scene, string fileName);
-
- ///
- /// Save prims in the xml2 format, optionally specifying a bounding box for which
- /// prims should be saved. If both min and max vectors are Vector3.Zero, then all prims
- /// are exported.
- ///
- ///
- ///
- ///
- ///
- void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max);
-
- ///
- /// Save a set of prims in the xml2 format
- ///
- ///
- ///
- void SavePrimListToXml2(List entityList, string fileName);
-
- ///
- /// Save a set of prims in the xml2 format, optionally specifying a bounding box for which
- /// prims should be saved. If both min and max vectors are Vector3.Zero, then all prims
- /// are exported.
- ///
- ///
- ///
- ///
- ///
- void SavePrimListToXml2(List entityList, TextWriter stream, Vector3 min, Vector3 max);
-
- void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName);
-
- ///
- /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene.
- ///
- ///
- /// The scene object created. null if the scene object already existed
- SceneObjectGroup DeserializeGroupFromXml2(string xmlString);
-
- ///
- /// Serialize an individual scene object into the xml2 format
- ///
- ///
- ///
- string SaveGroupToXml2(SceneObjectGroup grp);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/ISoundModule.cs b/OpenSim/Region/Environment/Interfaces/ISoundModule.cs
deleted file mode 100644
index 3bb4c57..0000000
--- a/OpenSim/Region/Environment/Interfaces/ISoundModule.cs
+++ /dev/null
@@ -1,41 +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 Nini.Config;
-using OpenMetaverse;
-
-namespace OpenSim.Region.Environment
-{
- public interface ISoundModule
- {
- void PlayAttachedSound(UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags);
-
- void TriggerSound(
- UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle);
- }
-}
\ No newline at end of file
diff --git a/OpenSim/Region/Environment/Interfaces/ITerrain.cs b/OpenSim/Region/Environment/Interfaces/ITerrain.cs
deleted file mode 100644
index d5e1540..0000000
--- a/OpenSim/Region/Environment/Interfaces/ITerrain.cs
+++ /dev/null
@@ -1,78 +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 OpenSim.Framework;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface ITerrain
- {
- bool Tainted();
- bool Tainted(int x, int y);
- void ResetTaint();
-
- void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west,
- IClientAPI remoteUser);
-
- void CheckHeightValues();
- float[] GetHeights1D();
- float[,] GetHeights2D();
- double[,] GetHeights2DD();
- void GetHeights1D(float[] heights);
- void SetHeights2D(float[,] heights);
- void SetHeights2D(double[,] heights);
- void SwapRevertMaps();
- void SaveRevertMap();
- bool RunTerrainCmd(string[] args, ref string resultText, string simName);
- void SetRange(float min, float max);
- void LoadFromFileF64(string filename);
- void LoadFromFileF32(string filename);
- void LoadFromFileF32(string filename, int dimensionX, int dimensionY, int lowerboundX, int lowerboundY);
- void LoadFromFileIMG(string filename, int dimensionX, int dimensionY, int lowerboundX, int lowerboundY);
- void LoadFromFileSLRAW(string filename);
- void WriteToFileF64(string filename);
- void WriteToFileF32(string filename);
- void WriteToFileRAW(string filename);
- void WriteToFileHiRAW(string filename);
- void SetSeed(int val);
- void RaiseTerrain(double rx, double ry, double size, double amount);
- void LowerTerrain(double rx, double ry, double size, double amount);
- void FlattenTerrain(double rx, double ry, double size, double amount);
- void NoiseTerrain(double rx, double ry, double size, double amount);
- void RevertTerrain(double rx, double ry, double size, double amount);
- void SmoothTerrain(double rx, double ry, double size, double amount);
- void HillsGenerator();
- double GetHeight(int x, int y);
- void ExportImage(string filename, string gradientmap);
- byte[] ExportJpegImage(string gradientmap);
- }
-
- public interface IMapImageGenerator
- {
- byte[] WriteJpeg2000Image(string gradientmap);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/ITerrainChannel.cs b/OpenSim/Region/Environment/Interfaces/ITerrainChannel.cs
deleted file mode 100644
index 4bcb14b..0000000
--- a/OpenSim/Region/Environment/Interfaces/ITerrainChannel.cs
+++ /dev/null
@@ -1,48 +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.Region.Environment.Interfaces
-{
- public interface ITerrainChannel
- {
- int Height { get; }
- double this[int x, int y] { get; set; }
- int Width { get; }
-
- ///
- /// Squash the entire heightmap into a single dimensioned array
- ///
- ///
- float[] GetFloatsSerialised();
-
- double[,] GetDoubles();
- bool Tainted(int x, int y);
- ITerrainChannel MakeCopy();
- string SaveToXmlString();
- void LoadFromXmlString(string data);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/ITextureSender.cs b/OpenSim/Region/Environment/Interfaces/ITextureSender.cs
deleted file mode 100644
index ece1953..0000000
--- a/OpenSim/Region/Environment/Interfaces/ITextureSender.cs
+++ /dev/null
@@ -1,58 +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.Region.Environment.Interfaces
-{
- ///
- /// Interface for an object which can send texture information to a client
- ///
- public interface ITextureSender
- {
- ///
- /// Are we in the process of sending the texture?
- ///
- bool Sending { get; set; }
-
- ///
- /// Has the texture send been cancelled?
- ///
- bool Cancel { get; set; }
-
- ///
- /// Update the non data properties of a texture request
- ///
- ///
- ///
- void UpdateRequest(int discardLevel, uint packetNumber);
-
- ///
- /// Send a texture packet to the client.
- ///
- /// True if the last packet has been sent, false otherwise.
- bool SendTexturePacket();
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IVegetationModule.cs b/OpenSim/Region/Environment/Interfaces/IVegetationModule.cs
deleted file mode 100644
index c411993..0000000
--- a/OpenSim/Region/Environment/Interfaces/IVegetationModule.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 OpenMetaverse;
-using OpenSim.Region.Environment.Scenes;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IVegetationModule : IEntityCreator
- {
- ///
- /// Add a new tree to the scene. Used by other modules.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- SceneObjectGroup AddTree(
- UUID uuid, UUID groupID, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, bool newTree);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IWindModule.cs b/OpenSim/Region/Environment/Interfaces/IWindModule.cs
deleted file mode 100644
index 9896c56..0000000
--- a/OpenSim/Region/Environment/Interfaces/IWindModule.cs
+++ /dev/null
@@ -1,41 +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;
-using OpenMetaverse;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IWindModule : IRegionModule
- {
- Vector2[] WindSpeeds
- {
- get;
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IWorldComm.cs b/OpenSim/Region/Environment/Interfaces/IWorldComm.cs
deleted file mode 100644
index 1a33450..0000000
--- a/OpenSim/Region/Environment/Interfaces/IWorldComm.cs
+++ /dev/null
@@ -1,48 +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 OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Region.Environment.Modules.Scripting.WorldComm;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IWorldComm
- {
- int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg);
- void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg);
- bool HasMessages();
- ListenerInfo GetNextMessage();
- void ListenControl(UUID itemID, int handle, int active);
- void ListenRemove(UUID itemID, int handle);
- void DeleteListener(UUID itemID);
- Object[] GetSerializationData(UUID itemID);
- void CreateFromData(uint localID, UUID itemID, UUID hostID,
- Object[] data);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs b/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs
deleted file mode 100644
index 88e9ab5..0000000
--- a/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs
+++ /dev/null
@@ -1,48 +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 OpenMetaverse;
-using OpenSim.Region.Environment.Modules.Scripting.XMLRPC;
-
-namespace OpenSim.Region.Environment.Interfaces
-{
- public interface IXMLRPC
- {
- UUID OpenXMLRPCChannel(uint localID, UUID itemID, UUID channelID);
- void CloseXMLRPCChannel(UUID channelKey);
- bool hasRequests();
- void RemoteDataReply(string channel, string message_id, string sdata, int idata);
- bool IsEnabled();
- RPCRequestInfo GetNextCompletedRequest();
- void RemoveCompletedRequest(UUID id);
- void DeleteChannels(UUID itemID);
- UUID SendRemoteData(uint localID, UUID itemID, string channel, string dest, int idata, string sdata);
- SendRemoteDataRequest GetNextCompletedSRDRequest();
- void RemoveCompletedSRDRequest(UUID id);
- void CancelSRDRequests(UUID itemID);
- }
-}
diff --git a/OpenSim/Region/Environment/Interfaces/IXfer.cs b/OpenSim/Region/Environment/Interfaces/IXfer.cs
deleted file mode 100644
index bad1833..0000000
--- a/OpenSim/Region/Environment/Interfaces/IXfer.cs
+++ /dev/null
@@ -1,34 +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.Region.Environment.Interfaces
-{
- public interface IXfer
- {
- bool AddNewFile(string fileName, byte[] data);
- }
-}
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs
deleted file mode 100644
index f06fa0f..0000000
--- a/OpenSim/Region/Environment/ModuleLoader.cs
+++ /dev/null
@@ -1,327 +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.Collections.Generic;
-using System.IO;
-using System.Reflection;
-using log4net;
-using Nini.Config;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Modules.Agent.AssetTransaction;
-using OpenSim.Region.Environment.Modules.Avatar.Chat;
-using OpenSim.Region.Environment.Modules.Avatar.InstantMessage;
-using OpenSim.Region.Environment.Modules.Scripting.DynamicTexture;
-using OpenSim.Region.Environment.Modules.Scripting.LoadImageURL;
-using OpenSim.Region.Environment.Modules.Scripting.XMLRPC;
-using OpenSim.Region.Environment.Scenes;
-
-//TODO: Why do we reference InstantMessageModule here?
-
-namespace OpenSim.Region.Environment
-{
- public class ModuleLoader
- {
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- public Dictionary LoadedAssemblys = new Dictionary();
-
- private readonly List m_loadedModules = new List();
- private readonly Dictionary m_loadedSharedModules = new Dictionary();
- private readonly IConfigSource m_config;
-
- public ModuleLoader(IConfigSource config)
- {
- m_config = config;
- }
-
- public IRegionModule[] GetLoadedSharedModules
- {
- get
- {
- IRegionModule[] regionModules = new IRegionModule[m_loadedSharedModules.Count];
- m_loadedSharedModules.Values.CopyTo(regionModules, 0);
- return regionModules;
- }
- }
-
- public List PickupModules(Scene scene, string moduleDir)
- {
- DirectoryInfo dir = new DirectoryInfo(moduleDir);
- List modules = new List();
-
- foreach (FileInfo fileInfo in dir.GetFiles("*.dll"))
- {
- modules.AddRange(LoadRegionModules(fileInfo.FullName, scene));
- }
- return modules;
- }
-
- public void LoadDefaultSharedModules()
- {
- DynamicTextureModule dynamicModule = new DynamicTextureModule();
- if (m_loadedSharedModules.ContainsKey(dynamicModule.Name))
- {
- m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule");
- }
- else
- {
- m_loadedSharedModules.Add(dynamicModule.Name, dynamicModule);
- }
-
- // ChatModule chat = new ChatModule();
- // if (m_loadedSharedModules.ContainsKey(chat.Name))
- // {
- // m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule");
- // }
- // else
- // {
- // m_loadedSharedModules.Add(chat.Name, chat);
- // }
-
- InstantMessageModule imMod = new InstantMessageModule();
- if (m_loadedSharedModules.ContainsKey(imMod.Name))
- {
- m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule");
- }
- else
- {
- m_loadedSharedModules.Add(imMod.Name, imMod);
- }
-
- LoadImageURLModule loadMod = new LoadImageURLModule();
- if (m_loadedSharedModules.ContainsKey(loadMod.Name))
- {
- m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule");
- }
- else
- {
- m_loadedSharedModules.Add(loadMod.Name, loadMod);
- }
-
- // AvatarFactoryModule avatarFactory = new AvatarFactoryModule();
- // if (m_loadedSharedModules.ContainsKey(avatarFactory.Name))
- // {
- // m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule");
- // }
- // else
- // {
- // m_loadedSharedModules.Add(avatarFactory.Name, avatarFactory);
- // }
-
- XMLRPCModule xmlRpcMod = new XMLRPCModule();
- if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name))
- {
- m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule");
- }
- else
- {
- m_loadedSharedModules.Add(xmlRpcMod.Name, xmlRpcMod);
- }
- //TextureDownloadModule textureModule = new TextureDownloadModule();
-
- //LoadedSharedModules.Add(textureModule.Name, textureModule);
-
- AssetTransactionModule transactionsModule = new AssetTransactionModule();
- if (m_loadedSharedModules.ContainsKey(transactionsModule.Name))
- {
- m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", transactionsModule.Name, "TransactionModule");
- }
- else
- {
- m_loadedSharedModules.Add(transactionsModule.Name, transactionsModule);
- }
-
- }
-
- public void InitialiseSharedModules(Scene scene)
- {
- foreach (IRegionModule module in m_loadedSharedModules.Values)
- {
- module.Initialise(scene, m_config);
- scene.AddModule(module.Name, module); //should be doing this?
- }
- }
-
- public void InitializeModule(IRegionModule module, Scene scene)
- {
- module.Initialise(scene, m_config);
- scene.AddModule(module.Name, module);
- m_loadedModules.Add(module);
- }
-
- ///
- /// Loads/initialises a Module instance that can be used by multiple Regions
- ///
- ///
- ///
- public void LoadSharedModule(string dllName, string moduleName)
- {
- IRegionModule module = LoadModule(dllName, moduleName);
-
- if (module != null)
- LoadSharedModule(module);
- }
-
- ///
- /// Loads/initialises a Module instance that can be used by multiple Regions
- ///
- ///
- public void LoadSharedModule(IRegionModule module)
- {
- if (!m_loadedSharedModules.ContainsKey(module.Name))
- {
- m_loadedSharedModules.Add(module.Name, module);
- }
- }
-
- public List LoadRegionModules(string dllName, Scene scene)
- {
- IRegionModule[] modules = LoadModules(dllName);
- List initializedModules = new List();
-
- if (modules.Length > 0)
- {
- m_log.InfoFormat("[MODULES]: Found Module Library [{0}]", dllName);
- foreach (IRegionModule module in modules)
- {
- if (!module.IsSharedModule)
- {
- m_log.InfoFormat("[MODULES]: [{0}]: Initializing.", module.Name);
- InitializeModule(module, scene);
- initializedModules.Add(module);
- }
- else
- {
- m_log.InfoFormat("[MODULES]: [{0}]: Loading Shared Module.", module.Name);
- LoadSharedModule(module);
- }
- }
- }
- return initializedModules;
- }
-
- public void LoadRegionModule(string dllName, string moduleName, Scene scene)
- {
- IRegionModule module = LoadModule(dllName, moduleName);
- if (module != null)
- {
- InitializeModule(module, scene);
- }
- }
-
- ///
- /// Loads a external Module (if not already loaded) and creates a new instance of it.
- ///
- ///
- ///
- public IRegionModule LoadModule(string dllName, string moduleName)
- {
- IRegionModule[] modules = LoadModules(dllName);
-
- foreach (IRegionModule module in modules)
- {
- if ((module != null) && (module.Name == moduleName))
- {
- return module;
- }
- }
-
- return null;
- }
-
- public IRegionModule[] LoadModules(string dllName)
- {
- List modules = new List();
-
- Assembly pluginAssembly;
- if (!LoadedAssemblys.TryGetValue(dllName, out pluginAssembly))
- {
- try
- {
- pluginAssembly = Assembly.LoadFrom(dllName);
- LoadedAssemblys.Add(dllName, pluginAssembly);
- }
- catch (BadImageFormatException)
- {
- //m_log.InfoFormat("[MODULES]: The file [{0}] is not a module assembly.", e.FileName);
- }
- }
-
- if (pluginAssembly != null)
- {
- try
- {
- foreach (Type pluginType in pluginAssembly.GetTypes())
- {
- if (pluginType.IsPublic)
- {
- if (!pluginType.IsAbstract)
- {
- if (pluginType.GetInterface("IRegionModule") != null)
- {
- modules.Add((IRegionModule)Activator.CreateInstance(pluginType));
- }
- }
- }
- }
- }
- catch (ReflectionTypeLoadException)
- {
- m_log.InfoFormat("[MODULES]: Could not load types for [{0}].", pluginAssembly.FullName);
- }
- }
-
- return modules.ToArray();
- }
-
- public void PostInitialise()
- {
- foreach (IRegionModule module in m_loadedSharedModules.Values)
- {
- module.PostInitialise();
- }
-
- foreach (IRegionModule module in m_loadedModules)
- {
- module.PostInitialise();
- }
- }
-
- public void ClearCache()
- {
- LoadedAssemblys.Clear();
- }
-
- public void UnloadModule(IRegionModule rm)
- {
- rm.Close();
-
- m_loadedModules.Remove(rm);
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs
index f9f44f0..82325b7 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs
@@ -30,8 +30,8 @@ using System.Collections.Generic;
//using log4net;
using OpenMetaverse;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Scenes;
-using OpenSim.Region.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
{
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
index 7f4bb0b..adfbbad 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
@@ -29,7 +29,7 @@ using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Framework.Communications.Cache;
namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs
index d98d07d..1eb6795 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs
@@ -30,9 +30,8 @@ using System.Collections.Generic;
using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
{
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs
index 5387165..e1e1065 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -33,7 +33,7 @@ using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
{
diff --git a/OpenSim/Region/Environment/Modules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/Environment/Modules/Agent/Capabilities/CapabilitiesModule.cs
index 76b60fd..861e9f4 100644
--- a/OpenSim/Region/Environment/Modules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/Capabilities/CapabilitiesModule.cs
@@ -34,8 +34,8 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Capabilities;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
namespace OpenSim.Region.Environment.Modules.Agent.Capabilities
@@ -100,7 +100,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Capabilities
caps.ItemUpdatedCall = m_scene.CapsUpdateInventoryItemAsset;
caps.TaskScriptUpdatedCall = m_scene.CapsUpdateTaskInventoryScriptAsset;
caps.CAPSFetchInventoryDescendents = m_scene.HandleFetchInventoryDescendentsCAPS;
- caps.GetClient = m_scene.m_sceneGraph.GetControllingClient;
+ caps.GetClient = m_scene.SceneContents.GetControllingClient;
m_capsHandlers[agentId] = caps;
}
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
index 6bb61e2..4790295 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
@@ -31,10 +31,10 @@ using System.Threading;
using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Framework.Communications.Cache;
-using BlockingQueue = OpenSim.Framework.BlockingQueue;
+using BlockingQueue = OpenSim.Framework.BlockingQueue;
namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
{
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
index 34ddee6..51aa48e 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
@@ -30,7 +30,7 @@ using log4net;
using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
{
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
index e0790a2..38d96db 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
@@ -32,8 +32,8 @@ using log4net;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Limit;
using OpenSim.Framework.Statistics;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
{
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs
index cf76ebc..8524592 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/J2KDecoderModule.cs
@@ -36,8 +36,8 @@ using Nini.Config;
using OpenMetaverse;
using OpenMetaverse.Imaging;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
{
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
index f9a10bf..7d7efda 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
@@ -30,7 +30,7 @@ using System.Reflection;
using OpenMetaverse.Packets;
using log4net;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
{
diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
index 5b6c2a6..1d18b4b 100644
--- a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
@@ -30,8 +30,8 @@ using System.Collections.Generic;
using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Agent.Xfer
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 013301a..1ac0807 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -35,8 +35,8 @@ using log4net;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs
index 8f1ad00..dfa1caa 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs
@@ -32,8 +32,8 @@ using System.Text.RegularExpressions;
using log4net;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Chat
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
index 1109166..f234b75 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
@@ -36,8 +36,8 @@ using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Chat
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index 2fafe9b..ccd81c7 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
@@ -33,8 +33,8 @@ using log4net;
using Nini.Config;
using Nwc.XmlRpc;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Chat
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs
index e1c0ac4..c3cafb0 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs
@@ -37,8 +37,8 @@ using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Chat
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/RegionState.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/RegionState.cs
index b5cc3be..78f4265 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/RegionState.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/RegionState.cs
@@ -32,8 +32,8 @@ using System.Text.RegularExpressions;
using log4net;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Chat
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Combat/CombatModule.cs
index 6a09f2b..f032319 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Combat/CombatModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Combat/CombatModule.cs
@@ -37,9 +37,8 @@ using log4net;
using Nini.Config;
using Nwc.XmlRpc;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Framework.Communications.Cache;
namespace OpenSim.Region.Environment.Modules.Avatar.Combat.CombatModule
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs
index 7cfe2f9..5ac5dbe 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs
@@ -41,8 +41,8 @@ using Nwc.XmlRpc;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.Avatar.Chat;
namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
index 07e62e2..1ec5e9b 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
@@ -39,9 +39,8 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs
index 4f8da9a..d3ac2c0 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs
@@ -31,8 +31,8 @@ using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Dialog
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
index d54cf27..0ed962e 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
@@ -36,9 +36,8 @@ using Nwc.XmlRpc;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Friends
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Gestures/GesturesModule.cs
index 5ff6202..969c1d8 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Gestures/GesturesModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Gestures/GesturesModule.cs
@@ -31,8 +31,8 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using System.Reflection;
namespace OpenSim.Region.Environment.Modules.Avatar.Gestures
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
index dbb645e..e654912 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
@@ -32,8 +32,8 @@ using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Groups
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
index 747469b..3a1b282 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -36,9 +36,8 @@ using Nini.Config;
using Nwc.XmlRpc;
using OpenSim.Framework;
using OpenSim.Framework.Client;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs
index dec4ca0..347c305 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -36,9 +36,8 @@ using Nini.Config;
using Nwc.XmlRpc;
using OpenSim.Framework;
using OpenSim.Framework.Client;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/PresenceModule.cs
index a7816b0..c84d3d5 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/PresenceModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/PresenceModule.cs
@@ -36,9 +36,8 @@ using Nini.Config;
using Nwc.XmlRpc;
using OpenSim.Framework;
using OpenSim.Framework.Client;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index dcfcba3..3a58202 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -32,7 +32,7 @@ using System.IO.Compression;
using System.Reflection;
using System.Xml;
using OpenMetaverse;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.World.Archiver;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index 017ebcc..e23f2a8 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -32,7 +32,7 @@ using System.IO.Compression;
using System.Reflection;
using System.Xml;
using OpenMetaverse;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.World.Archiver;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 20ea030..62fb3a2 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -33,9 +33,8 @@ using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Framework.Communications.Cache;
namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Lure/LureModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Lure/LureModule.cs
index 7bb6843..79d5409 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Lure/LureModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Lure/LureModule.cs
@@ -37,9 +37,8 @@ using Nini.Config;
using Nwc.XmlRpc;
using OpenSim.Framework;
using OpenSim.Framework.Client;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Lure
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/Environment/Modules/Avatar/ObjectCaps/ObjectAdd.cs
index 56b6d75..c853582 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/ObjectCaps/ObjectAdd.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/ObjectCaps/ObjectAdd.cs
@@ -34,8 +34,8 @@ using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
namespace OpenSim.Region.Environment.Modules.Avatar.ObjectCaps
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
index a9415ce..a7e9849 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
@@ -32,8 +32,8 @@ using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Profiles
{
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs
index e3a9a45..33d7135 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs
@@ -36,8 +36,8 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Capabilities;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using Caps=OpenSim.Framework.Communications.Capabilities.Caps;
namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs
index bd89175..e4d9b7c 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs
@@ -35,8 +35,8 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Capabilities;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using Caps=OpenSim.Framework.Communications.Capabilities.Caps;
namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
diff --git a/OpenSim/Region/Environment/Modules/Communications/Local/LocalInterregionComms.cs b/OpenSim/Region/Environment/Modules/Communications/Local/LocalInterregionComms.cs
index 62f6df0..cb60d3f 100644
--- a/OpenSim/Region/Environment/Modules/Communications/Local/LocalInterregionComms.cs
+++ b/OpenSim/Region/Environment/Modules/Communications/Local/LocalInterregionComms.cs
@@ -38,9 +38,8 @@ using Nini.Config;
using Nwc.XmlRpc;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Communications.Local
{
diff --git a/OpenSim/Region/Environment/Modules/Communications/REST/RESTInterregionComms.cs b/OpenSim/Region/Environment/Modules/Communications/REST/RESTInterregionComms.cs
index b4302fd..cfcd618 100644
--- a/OpenSim/Region/Environment/Modules/Communications/REST/RESTInterregionComms.cs
+++ b/OpenSim/Region/Environment/Modules/Communications/REST/RESTInterregionComms.cs
@@ -42,10 +42,9 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Scenes;
-using OpenSim.Region.Environment.Scenes.Hypergrid;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.Framework.Scenes.Hypergrid;
using OpenSim.Region.Environment.Modules.Communications.Local;
namespace OpenSim.Region.Environment.Modules.Communications.REST
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
index 64b48fe..9695fb8 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
@@ -44,8 +44,8 @@ using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
index d0015f7..3b1a45e 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
@@ -44,8 +44,8 @@ using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
index dfca655..5a86d48 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
@@ -43,8 +43,8 @@ using OpenMetaverse;
using OpenSim;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
index c1f8a8a..cfd5cde 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
@@ -46,8 +46,8 @@ using Nini.Config;
using OpenSim;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
index 02e77bb..6399608 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
@@ -43,8 +43,8 @@ using OpenMetaverse;
using OpenSim;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
index 88f4a67..e5c9bb3 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
@@ -43,8 +43,8 @@ using OpenMetaverse;
using OpenSim;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
index d0b5929..2ea5ebc 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
@@ -43,8 +43,8 @@ using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
index f52c3b8..417cbce 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
@@ -42,8 +42,8 @@ using Nini.Config;
using OpenSim;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
index 3a8e374..65db153 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
@@ -45,10 +45,10 @@ using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.World.Serialiser;
using OpenSim.Region.Environment.Modules.World.Terrain;
-using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
index 9fd542c..4209dab 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
@@ -46,10 +46,10 @@ using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.World.Serialiser;
using OpenSim.Region.Environment.Modules.World.Terrain;
-using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
index 638172b..79dc86e 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
@@ -37,7 +37,7 @@
using System;
using OpenMetaverse;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
using Nini.Config;
namespace OpenSim.Region.Environment.Modules.ContentManagement
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
index d654a1a..c8f8c2f 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
@@ -44,8 +44,8 @@ using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
index 5db9545..d6ba92f 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
@@ -44,8 +44,8 @@ using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
index 79e970d..225a682 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
@@ -42,8 +42,8 @@ using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using log4net;
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs
index bc4c5b9..fb30321 100644
--- a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueGetModule.cs
@@ -34,6 +34,7 @@ using System.Reflection;
using System.Threading;
using System.Xml;
using OpenMetaverse;
+using OpenMetaverse.Packets;
using OpenMetaverse.StructuredData;
using log4net;
using Nini.Config;
@@ -42,9 +43,8 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Capabilities;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OSD = OpenMetaverse.StructuredData.OSD;
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
@@ -555,5 +555,76 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
return new OSDString("shutdown404!");
}
+
+ public void DisableSimulator(ulong handle, UUID avatarID)
+ {
+ OSD item = EventQueueHelper.DisableSimulator(handle);
+ Enqueue(item, avatarID);
+ }
+
+ public void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID)
+ {
+ OSD item = EventQueueHelper.EnableSimulator(handle, endPoint);
+ Enqueue(item, avatarID);
+ }
+
+ public void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath)
+ {
+ OSD item = EventQueueHelper.EstablishAgentCommunication(avatarID, endPoint.ToString(), capsPath);
+ Enqueue(item, avatarID);
+ }
+
+ public void TeleportFinishEvent(ulong regionHandle, byte simAccess,
+ IPEndPoint regionExternalEndPoint,
+ uint locationID, uint flags, string capsURL,
+ UUID avatarID)
+ {
+ OSD item = EventQueueHelper.TeleportFinishEvent(regionHandle, simAccess, regionExternalEndPoint,
+ locationID, flags, capsURL, avatarID);
+ Enqueue(item, avatarID);
+ }
+
+ public void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt,
+ IPEndPoint newRegionExternalEndPoint,
+ string capsURL, UUID avatarID, UUID sessionID)
+ {
+ OSD item = EventQueueHelper.CrossRegion(handle, pos, lookAt, newRegionExternalEndPoint,
+ capsURL, avatarID, sessionID);
+ Enqueue(item, avatarID);
+ }
+
+ public void ChatterboxInvitation(UUID sessionID, string sessionName,
+ UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog,
+ uint timeStamp, bool offline, int parentEstateID, Vector3 position,
+ uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket)
+ {
+ OSD item = EventQueueHelper.ChatterboxInvitation(sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog,
+ timeStamp, offline, parentEstateID, position, ttl, transactionID,
+ fromGroup, binaryBucket);
+ Enqueue(item, toAgent);
+ m_log.InfoFormat("########### eq ChatterboxInvitation #############\n{0}", item);
+
+ }
+
+ public void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat,
+ bool isModerator, bool textMute)
+ {
+ OSD item = EventQueueHelper.ChatterBoxSessionAgentListUpdates(sessionID, fromAgent, canVoiceChat,
+ isModerator, textMute);
+ Enqueue(item, toAgent);
+ m_log.InfoFormat("########### eq ChatterBoxSessionAgentListUpdates #############\n{0}", item);
+ }
+
+ public void ParcelProperties(ParcelPropertiesPacket parcelPropertiesPacket, UUID avatarID)
+ {
+ OSD item = Environment.EventQueueHelper.ParcelProperties(parcelPropertiesPacket);
+ Enqueue(item, avatarID);
+ }
+
+ public void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID)
+ {
+ OSD item = EventQueueHelper.GroupMembership(groupUpdate);
+ Enqueue(item, avatarID);
+ }
}
}
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs
index 546d9d1..b38ddba 100644
--- a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs
@@ -71,11 +71,11 @@ namespace OpenSim.Region.Environment
return llsdEvent;
}
- public static OSD EnableSimulator(ulong Handle, IPEndPoint endPoint)
+ public static OSD EnableSimulator(ulong handle, IPEndPoint endPoint)
{
OSDMap llsdSimInfo = new OSDMap(3);
- llsdSimInfo.Add("Handle", new OSDBinary(ulongToByteArray(Handle)));
+ llsdSimInfo.Add("Handle", new OSDBinary(ulongToByteArray(handle)));
llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes()));
llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port));
@@ -88,11 +88,11 @@ namespace OpenSim.Region.Environment
return buildEvent("EnableSimulator", llsdBody);
}
- public static OSD DisableSimulator(ulong Handle)
+ public static OSD DisableSimulator(ulong handle)
{
//OSDMap llsdSimInfo = new OSDMap(1);
- //llsdSimInfo.Add("Handle", new OSDBinary(regionHandleToByteArray(Handle)));
+ //llsdSimInfo.Add("Handle", new OSDBinary(regionHandleToByteArray(handle)));
//OSDArray arr = new OSDArray(1);
//arr.Add(llsdSimInfo);
@@ -103,57 +103,57 @@ namespace OpenSim.Region.Environment
return buildEvent("DisableSimulator", llsdBody);
}
- public static OSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt,
- IPEndPoint newRegionExternalEndPoint,
- string capsURL, UUID AgentID, UUID SessionID)
+ public static OSD CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt,
+ IPEndPoint newRegionExternalEndPoint,
+ string capsURL, UUID agentID, UUID sessionID)
{
- OSDArray LookAtArr = new OSDArray(3);
- LookAtArr.Add(OSD.FromReal(lookAt.X));
- LookAtArr.Add(OSD.FromReal(lookAt.Y));
- LookAtArr.Add(OSD.FromReal(lookAt.Z));
+ OSDArray lookAtArr = new OSDArray(3);
+ lookAtArr.Add(OSD.FromReal(lookAt.X));
+ lookAtArr.Add(OSD.FromReal(lookAt.Y));
+ lookAtArr.Add(OSD.FromReal(lookAt.Z));
- OSDArray PositionArr = new OSDArray(3);
- PositionArr.Add(OSD.FromReal(pos.X));
- PositionArr.Add(OSD.FromReal(pos.Y));
- PositionArr.Add(OSD.FromReal(pos.Z));
+ OSDArray positionArr = new OSDArray(3);
+ positionArr.Add(OSD.FromReal(pos.X));
+ positionArr.Add(OSD.FromReal(pos.Y));
+ positionArr.Add(OSD.FromReal(pos.Z));
- OSDMap InfoMap = new OSDMap(2);
- InfoMap.Add("LookAt", LookAtArr);
- InfoMap.Add("Position", PositionArr);
+ OSDMap infoMap = new OSDMap(2);
+ infoMap.Add("LookAt", lookAtArr);
+ infoMap.Add("Position", positionArr);
- OSDArray InfoArr = new OSDArray(1);
- InfoArr.Add(InfoMap);
+ OSDArray infoArr = new OSDArray(1);
+ infoArr.Add(infoMap);
- OSDMap AgentDataMap = new OSDMap(2);
- AgentDataMap.Add("AgentID", OSD.FromUUID(AgentID));
- AgentDataMap.Add("SessionID", OSD.FromUUID(SessionID));
+ OSDMap agentDataMap = new OSDMap(2);
+ agentDataMap.Add("AgentID", OSD.FromUUID(agentID));
+ agentDataMap.Add("SessionID", OSD.FromUUID(sessionID));
- OSDArray AgentDataArr = new OSDArray(1);
- AgentDataArr.Add(AgentDataMap);
+ OSDArray agentDataArr = new OSDArray(1);
+ agentDataArr.Add(agentDataMap);
- OSDMap RegionDataMap = new OSDMap(4);
- RegionDataMap.Add("RegionHandle", OSD.FromBinary(ulongToByteArray(Handle)));
- RegionDataMap.Add("SeedCapability", OSD.FromString(capsURL));
- RegionDataMap.Add("SimIP", OSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes()));
- RegionDataMap.Add("SimPort", OSD.FromInteger(newRegionExternalEndPoint.Port));
+ OSDMap regionDataMap = new OSDMap(4);
+ regionDataMap.Add("RegionHandle", OSD.FromBinary(ulongToByteArray(handle)));
+ regionDataMap.Add("SeedCapability", OSD.FromString(capsURL));
+ regionDataMap.Add("SimIP", OSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes()));
+ regionDataMap.Add("SimPort", OSD.FromInteger(newRegionExternalEndPoint.Port));
- OSDArray RegionDataArr = new OSDArray(1);
- RegionDataArr.Add(RegionDataMap);
+ OSDArray regionDataArr = new OSDArray(1);
+ regionDataArr.Add(regionDataMap);
OSDMap llsdBody = new OSDMap(3);
- llsdBody.Add("Info", InfoArr);
- llsdBody.Add("AgentData", AgentDataArr);
- llsdBody.Add("RegionData", RegionDataArr);
+ llsdBody.Add("Info", infoArr);
+ llsdBody.Add("AgentData", agentDataArr);
+ llsdBody.Add("RegionData", regionDataArr);
return buildEvent("CrossedRegion", llsdBody);
}
public static OSD TeleportFinishEvent(
ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
- uint locationID, uint flags, string capsURL, UUID AgentID)
+ uint locationID, uint flags, string capsURL, UUID agentID)
{
OSDMap info = new OSDMap();
- info.Add("AgentID", OSD.FromUUID(AgentID));
+ info.Add("AgentID", OSD.FromUUID(agentID));
info.Add("LocationID", OSD.FromInteger(4)); // TODO what is this?
info.Add("RegionHandle", OSD.FromBinary(ulongToByteArray(regionHandle)));
info.Add("SeedCapability", OSD.FromString(capsURL));
diff --git a/OpenSim/Region/Environment/Modules/Framework/InterfaceCommander/Command.cs b/OpenSim/Region/Environment/Modules/Framework/InterfaceCommander/Command.cs
index 6642bdc..0ad95ae 100644
--- a/OpenSim/Region/Environment/Modules/Framework/InterfaceCommander/Command.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/InterfaceCommander/Command.cs
@@ -27,7 +27,7 @@
using System;
using System.Collections.Generic;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.Framework.InterfaceCommander
{
diff --git a/OpenSim/Region/Environment/Modules/Framework/InterfaceCommander/Commander.cs b/OpenSim/Region/Environment/Modules/Framework/InterfaceCommander/Commander.cs
index 1da1177..31a67f7 100644
--- a/OpenSim/Region/Environment/Modules/Framework/InterfaceCommander/Commander.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/InterfaceCommander/Commander.cs
@@ -31,7 +31,7 @@ using System.Reflection;
using System.Text;
using log4net;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.Framework.InterfaceCommander
{
diff --git a/OpenSim/Region/Environment/Modules/Grid/Interregion/IInterregionModule.cs b/OpenSim/Region/Environment/Modules/Grid/Interregion/IInterregionModule.cs
index b0d44d7..edf1231 100644
--- a/OpenSim/Region/Environment/Modules/Grid/Interregion/IInterregionModule.cs
+++ b/OpenSim/Region/Environment/Modules/Grid/Interregion/IInterregionModule.cs
@@ -26,7 +26,7 @@
*/
using OpenSim.Framework;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Grid.Interregion
{
diff --git a/OpenSim/Region/Environment/Modules/Grid/Interregion/InterregionModule.cs b/OpenSim/Region/Environment/Modules/Grid/Interregion/InterregionModule.cs
index acd0e5c..cb571e4 100644
--- a/OpenSim/Region/Environment/Modules/Grid/Interregion/InterregionModule.cs
+++ b/OpenSim/Region/Environment/Modules/Grid/Interregion/InterregionModule.cs
@@ -32,8 +32,8 @@ using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Grid.Interregion
{
diff --git a/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs b/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs
index 285a019..4cb1c20 100644
--- a/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs
+++ b/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs
@@ -40,8 +40,8 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Grid.AssetServer;
using OpenSim.Data;
diff --git a/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneInventoryService.cs b/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneInventoryService.cs
index b10582b..54ba761 100644
--- a/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneInventoryService.cs
+++ b/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneInventoryService.cs
@@ -37,8 +37,8 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Hypergrid
{
diff --git a/OpenSim/Region/Environment/Modules/Hypergrid/HGWorldMapModule.cs b/OpenSim/Region/Environment/Modules/Hypergrid/HGWorldMapModule.cs
index e642b7f..1d9182e 100644
--- a/OpenSim/Region/Environment/Modules/Hypergrid/HGWorldMapModule.cs
+++ b/OpenSim/Region/Environment/Modules/Hypergrid/HGWorldMapModule.cs
@@ -47,10 +47,10 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Capabilities;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.Framework.Scenes.Types;
using OpenSim.Region.Environment.Modules.World.WorldMap;
-using OpenSim.Region.Environment.Scenes;
-using OpenSim.Region.Environment.Types;
using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
using OSD = OpenMetaverse.StructuredData.OSD;
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
index f5b2823..12a76de8 100644
--- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
@@ -44,8 +44,8 @@ using Nini.Config;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Capabilities;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OSD = OpenMetaverse.StructuredData.OSD;
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
diff --git a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
index bddf10d..f498f9a 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -33,8 +33,8 @@ using OpenMetaverse;
using OpenMetaverse.Imaging;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
{
diff --git a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
index 5a715f5..81ce761 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
@@ -31,8 +31,8 @@ using System.Collections.Generic;
using System.Text.RegularExpressions;
using OpenMetaverse;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using log4net;
using Nini.Config;
using DotNetOpenMail;
diff --git a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index eb9b322..821c60e 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -35,8 +35,8 @@ using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using System.Collections;
/*****************************************************
@@ -84,14 +84,14 @@ using System.Collections;
namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
{
- public class HttpRequestModule : IRegionModule, IHttpRequests
+ public class HttpRequestModule : IRegionModule, IHttpRequestModule
{
private object HttpListLock = new object();
private int httpTimeout = 30000;
private string m_name = "HttpScriptRequests";
- private string m_proxyurl = "";
- private string m_proxyexcepts = "";
+ private string m_proxyurl = "";
+ private string m_proxyexcepts = "";
//
private Dictionary m_pendingRequests;
@@ -102,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
{
}
- #region IHttpRequests Members
+ #region IHttpRequestModule Members
public UUID MakeHttpRequest(string url, string parameters, string body)
{
@@ -125,22 +125,22 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
{
switch (Int32.Parse(parms[i]))
{
- case HttpRequestClass.HTTP_METHOD:
+ case (int)HttpRequestConstants.HTTP_METHOD:
- htc.httpMethod = parms[i + 1];
+ htc.HttpMethod = parms[i + 1];
break;
- case HttpRequestClass.HTTP_MIMETYPE:
+ case (int)HttpRequestConstants.HTTP_MIMETYPE:
- htc.httpMIMEType = parms[i + 1];
+ htc.HttpMIMEType = parms[i + 1];
break;
- case HttpRequestClass.HTTP_BODY_MAXLENGTH:
+ case (int)HttpRequestConstants.HTTP_BODY_MAXLENGTH:
// TODO implement me
break;
- case HttpRequestClass.HTTP_VERIFY_CERT:
+ case (int)HttpRequestConstants.HTTP_VERIFY_CERT:
// TODO implement me
break;
@@ -148,22 +148,22 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
}
}
- htc.localID = localID;
- htc.itemID = itemID;
- htc.url = url;
- htc.reqID = reqID;
- htc.httpTimeout = httpTimeout;
- htc.outbound_body = body;
- htc.response_headers = headers;
- htc.proxyurl = m_proxyurl;
- htc.proxyexcepts = m_proxyexcepts;
+ htc.LocalID = localID;
+ htc.ItemID = itemID;
+ htc.Url = url;
+ htc.ReqID = reqID;
+ htc.HttpTimeout = httpTimeout;
+ htc.OutboundBody = body;
+ htc.ResponseHeaders = headers;
+ htc.proxyurl = m_proxyurl;
+ htc.proxyexcepts = m_proxyexcepts;
lock (HttpListLock)
{
m_pendingRequests.Add(reqID, htc);
}
- htc.process();
+ htc.Process();
return reqID;
}
@@ -193,7 +193,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
* it will need some refactoring and this works 'enough' right now
*/
- public HttpRequestClass GetNextCompletedRequest()
+ public IServiceRequest GetNextCompletedRequest()
{
lock (HttpListLock)
{
@@ -203,7 +203,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
if (m_pendingRequests.TryGetValue(luid, out tmpReq))
{
- if (tmpReq.finished)
+ if (tmpReq.Finished)
{
return tmpReq;
}
@@ -235,10 +235,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
{
m_scene = scene;
- m_scene.RegisterModuleInterface(this);
+ m_scene.RegisterModuleInterface(this);
- m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
- m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
+ m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
+ m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
m_pendingRequests = new Dictionary();
}
@@ -264,45 +264,64 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
#endregion
}
- public class HttpRequestClass
+ public class HttpRequestClass: IServiceRequest
{
// Constants for parameters
- public const int HTTP_BODY_MAXLENGTH = 2;
- public const int HTTP_METHOD = 0;
- public const int HTTP_MIMETYPE = 1;
- public const int HTTP_VERIFY_CERT = 3;
- public bool finished;
- public int httpBodyMaxLen = 2048; // not implemented
+ // public const int HTTP_BODY_MAXLENGTH = 2;
+ // public const int HTTP_METHOD = 0;
+ // public const int HTTP_MIMETYPE = 1;
+ // public const int HTTP_VERIFY_CERT = 3;
+ private bool _finished;
+ public bool Finished
+ {
+ get { return _finished; }
+ }
+ // public int HttpBodyMaxLen = 2048; // not implemented
// Parameter members and default values
- public string httpMethod = "GET";
- public string httpMIMEType = "text/plain;charset=utf-8";
+ public string HttpMethod = "GET";
+ public string HttpMIMEType = "text/plain;charset=utf-8";
+ public int HttpTimeout;
+ // public bool HttpVerifyCert = true; // not implemented
private Thread httpThread;
- public int httpTimeout;
- public bool httpVerifyCert = true; // not implemented
// Request info
- public UUID itemID;
- public uint localID;
- public DateTime next;
- public string outbound_body;
- public UUID reqID;
- public HttpWebRequest request;
- public string response_body;
- public List response_metadata;
- public Dictionary response_headers;
- public int status;
- public string url;
+ private UUID _itemID;
+ public UUID ItemID
+ {
+ get { return _itemID; }
+ set { _itemID = value; }
+ }
+ private uint _localID;
+ public uint LocalID
+ {
+ get { return _localID; }
+ set { _localID = value; }
+ }
+ public DateTime Next;
public string proxyurl;
public string proxyexcepts;
-
- public void process()
+ public string OutboundBody;
+ private UUID _reqID;
+ public UUID ReqID
+ {
+ get { return _reqID; }
+ set { _reqID = value; }
+ }
+ public HttpWebRequest Request;
+ public string ResponseBody;
+ public List ResponseMetadata;
+ public Dictionary ResponseHeaders;
+ public int Status;
+ public string Url;
+
+ public void Process()
{
httpThread = new Thread(SendRequest);
httpThread.Name = "HttpRequestThread";
httpThread.Priority = ThreadPriority.BelowNormal;
httpThread.IsBackground = true;
- finished = false;
+ _finished = false;
httpThread.Start();
ThreadTracker.Add(httpThread);
}
@@ -322,37 +341,35 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
try
{
- request = (HttpWebRequest)
- WebRequest.Create(url);
- request.Method = httpMethod;
- request.ContentType = httpMIMEType;
- if (proxyurl.Length > 0)
- {
- if (proxyexcepts.Length > 0) {
- string[] elist = proxyexcepts.Split(';');
- request.Proxy = new WebProxy(proxyurl,true,elist);
- } else {
- request.Proxy = new WebProxy(proxyurl,true);
- }
- }
-
- foreach (KeyValuePair entry in response_headers)
- request.Headers[entry.Key] = entry.Value;
+ Request = (HttpWebRequest) WebRequest.Create(Url);
+ Request.Method = HttpMethod;
+ Request.ContentType = HttpMIMEType;
+ if (proxyurl.Length > 0)
+ {
+ if (proxyexcepts.Length > 0) {
+ string[] elist = proxyexcepts.Split(';');
+ Request.Proxy = new WebProxy(proxyurl,true,elist);
+ } else {
+ Request.Proxy = new WebProxy(proxyurl,true);
+ }
+ }
+
+ foreach (KeyValuePair entry in ResponseHeaders)
+ Request.Headers[entry.Key] = entry.Value;
// Encode outbound data
- if (outbound_body.Length > 0) {
- byte[] data = Encoding.UTF8.GetBytes(outbound_body);
+ if (OutboundBody.Length > 0) {
+ byte[] data = Encoding.UTF8.GetBytes(OutboundBody);
- request.ContentLength = data.Length;
- Stream bstream = request.GetRequestStream();
+ Request.ContentLength = data.Length;
+ Stream bstream = Request.GetRequestStream();
bstream.Write(data, 0, data.Length);
bstream.Close();
}
- request.Timeout = httpTimeout;
+ Request.Timeout = HttpTimeout;
// execute the request
- response = (HttpWebResponse)
- request.GetResponse();
+ response = (HttpWebResponse) Request.GetResponse();
Stream resStream = response.GetResponseStream();
@@ -372,23 +389,23 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
}
} while (count > 0); // any more data to read?
- response_body = sb.ToString();
+ ResponseBody = sb.ToString();
}
catch (Exception e)
{
if (e is WebException && ((WebException)e).Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse webRsp = (HttpWebResponse)((WebException)e).Response;
- status = (int)webRsp.StatusCode;
- response_body = webRsp.StatusDescription;
+ Status = (int)webRsp.StatusCode;
+ ResponseBody = webRsp.StatusDescription;
}
else
{
- status = (int)OSHttpStatusCode.ClientErrorJoker;
- response_body = e.Message;
+ Status = (int)OSHttpStatusCode.ClientErrorJoker;
+ ResponseBody = e.Message;
}
- finished = true;
+ _finished = true;
return;
}
finally
@@ -397,8 +414,8 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
response.Close();
}
- status = (int)OSHttpStatusCode.SuccessOk;
- finished = true;
+ Status = (int)OSHttpStatusCode.SuccessOk;
+ _finished = true;
}
public void Stop()
diff --git a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
index 3d0afd1..af78c36 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -32,8 +32,8 @@ using System.Net;
using OpenMetaverse;
using OpenMetaverse.Imaging;
using Nini.Config;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
{
diff --git a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
index 3b318a4..60806a7 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
@@ -34,8 +34,8 @@ using System.Net;
using OpenMetaverse;
using OpenMetaverse.Imaging;
using Nini.Config;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
//using Cairo;
diff --git a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
index 99e3177..258734d 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
@@ -31,8 +31,8 @@ using System.Collections.Generic;
using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
// using log4net;
// using System.Reflection;
@@ -313,7 +313,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
/// Pop the first availlable listen event from the queue
///
/// ListenerInfo with filter filled in
- public ListenerInfo GetNextMessage()
+ public IWorldCommListenerInfo GetNextMessage()
{
ListenerInfo li = null;
@@ -608,7 +608,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
}
}
- public class ListenerInfo
+ public class ListenerInfo: IWorldCommListenerInfo
{
private bool m_active; // Listener is active or not
private int m_handle; // Assigned handle of this listener
diff --git a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
index 28028bc..fb86731 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
@@ -37,8 +37,8 @@ using Nini.Config;
using Nwc.XmlRpc;
using OpenSim.Framework;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
/*****************************************************
*
@@ -302,7 +302,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
}
}
- public RPCRequestInfo GetNextCompletedRequest()
+ public IXmlRpcRequestInfo GetNextCompletedRequest()
{
if (m_rpcPending != null)
{
@@ -345,10 +345,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
localID, itemID, channel, dest, idata, sdata
);
m_pendingSRDResponses.Add(req.GetReqID(), req);
- return req.process();
+ req.Process();
+ return req.ReqID;
}
- public SendRemoteDataRequest GetNextCompletedSRDRequest()
+ public IServiceRequest GetNextCompletedSRDRequest()
{
if (m_pendingSRDResponses != null)
{
@@ -360,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
if (m_pendingSRDResponses.TryGetValue(luid, out tmpReq))
{
- if (tmpReq.finished)
+ if (tmpReq.Finished)
return tmpReq;
}
}
@@ -389,7 +390,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
{
foreach (SendRemoteDataRequest li in m_pendingSRDResponses.Values)
{
- if (li.m_itemID.Equals(itemID))
+ if (li.ItemID.Equals(itemID))
m_pendingSRDResponses.Remove(li.GetReqID());
}
}
@@ -460,7 +461,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
}
}
- public class RPCRequestInfo
+ public class RPCRequestInfo: IXmlRpcRequestInfo
{
private UUID m_ChannelKey;
private string m_IntVal;
@@ -575,45 +576,64 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
}
}
- public class SendRemoteDataRequest
+ public class SendRemoteDataRequest: IServiceRequest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
- public string channel;
- public string destURL;
- public bool finished;
+
+ public string Channel;
+ public string DestURL;
+ private bool _finished;
+ public bool Finished
+ {
+ get { return _finished; }
+ set { _finished = value; }
+ }
private Thread httpThread;
- public int idata;
- public UUID m_itemID;
- public uint m_localID;
- public UUID reqID;
- public XmlRpcRequest request;
- public int response_idata;
- public string response_sdata;
- public string sdata;
+ public int Idata;
+ private UUID _itemID;
+ public UUID ItemID
+ {
+ get { return _itemID; }
+ set { _itemID = value; }
+ }
+ private uint _localID;
+ public uint LocalID
+ {
+ get { return _localID; }
+ set { _localID = value; }
+ }
+ private UUID _reqID;
+ public UUID ReqID
+ {
+ get { return _reqID; }
+ set { _reqID = value; }
+ }
+ public XmlRpcRequest Request;
+ public int ResponseIdata;
+ public string ResponseSdata;
+ public string Sdata;
public SendRemoteDataRequest(uint localID, UUID itemID, string channel, string dest, int idata, string sdata)
{
- this.channel = channel;
- destURL = dest;
- this.idata = idata;
- this.sdata = sdata;
- m_itemID = itemID;
- m_localID = localID;
+ this.Channel = channel;
+ DestURL = dest;
+ this.Idata = idata;
+ this.Sdata = sdata;
+ ItemID = itemID;
+ LocalID = localID;
- reqID = UUID.Random();
+ ReqID = UUID.Random();
}
- public UUID process()
+ public void Process()
{
httpThread = new Thread(SendRequest);
httpThread.Name = "HttpRequestThread";
httpThread.Priority = ThreadPriority.BelowNormal;
httpThread.IsBackground = true;
- finished = false;
+ _finished = false;
httpThread.Start();
ThreadTracker.Add(httpThread);
-
- return reqID;
}
/*
@@ -629,21 +649,21 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
// if not, use as method name
UUID parseUID;
string mName = "llRemoteData";
- if ((channel != null) && (channel != ""))
- if (!UUID.TryParse(channel, out parseUID))
- mName = channel;
+ if ((Channel != null) && (Channel != ""))
+ if (!UUID.TryParse(Channel, out parseUID))
+ mName = Channel;
else
- param["Channel"] = channel;
+ param["Channel"] = Channel;
- param["StringValue"] = sdata;
- param["IntValue"] = Convert.ToString(idata);
+ param["StringValue"] = Sdata;
+ param["IntValue"] = Convert.ToString(Idata);
ArrayList parameters = new ArrayList();
parameters.Add(param);
XmlRpcRequest req = new XmlRpcRequest(mName, parameters);
try
{
- XmlRpcResponse resp = req.Send(destURL, 30000);
+ XmlRpcResponse resp = req.Send(DestURL, 30000);
if (resp != null)
{
Hashtable respParms;
@@ -660,31 +680,31 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
{
if (respParms.Contains("StringValue"))
{
- sdata = (string) respParms["StringValue"];
+ Sdata = (string) respParms["StringValue"];
}
if (respParms.Contains("IntValue"))
{
- idata = Convert.ToInt32((string) respParms["IntValue"]);
+ Idata = Convert.ToInt32((string) respParms["IntValue"]);
}
if (respParms.Contains("faultString"))
{
- sdata = (string) respParms["faultString"];
+ Sdata = (string) respParms["faultString"];
}
if (respParms.Contains("faultCode"))
{
- idata = Convert.ToInt32(respParms["faultCode"]);
+ Idata = Convert.ToInt32(respParms["faultCode"]);
}
}
}
}
catch (Exception we)
{
- sdata = we.Message;
+ Sdata = we.Message;
m_log.Warn("[SendRemoteDataRequest]: Request failed");
m_log.Warn(we.StackTrace);
}
- finished = true;
+ _finished = true;
}
public void Stop()
@@ -700,7 +720,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
public UUID GetReqID()
{
- return reqID;
+ return ReqID;
}
}
}
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
index c860d01..b507c52 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
@@ -36,8 +36,8 @@ using OpenMetaverse;
using log4net;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.World.Terrain;
namespace OpenSim.Region.Environment.Modules.World.Archiver
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
index 179b82a..9a06bf7 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
@@ -33,10 +33,10 @@ using System.Xml;
using OpenMetaverse;
using log4net;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.World.Serialiser;
using OpenSim.Region.Environment.Modules.World.Terrain;
-using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Archiver
{
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
index a5f4770..56604d6 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -27,10 +27,10 @@
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.World.Serialiser;
using OpenSim.Region.Environment.Modules.World.Terrain;
-using OpenSim.Region.Environment.Scenes;
using System;
using System.Collections.Generic;
using System.IO;
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
index 9d9f81e..ed494fc 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
@@ -33,9 +33,9 @@ using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.World.Serialiser;
-using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Archiver
{
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs
index 035651a..7a6c810 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs
@@ -33,8 +33,8 @@ using OpenMetaverse;
using log4net;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Archiver
{
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs
index d7acd54..e265252 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/Tests/ArchiverTests.cs
@@ -32,11 +32,11 @@ using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Environment.Modules.World.Archiver;
using OpenSim.Region.Environment.Modules.World.Serialiser;
using OpenSim.Region.Environment.Modules.World.Terrain;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common.Setup;
namespace OpenSim.Region.Environment.Modules.World.Archiver.Tests
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index d906bbd..6b74c83 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -32,8 +32,8 @@ using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Estate
{
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateTerrainXferHandler.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateTerrainXferHandler.cs
index 2ba4e34..267178e 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateTerrainXferHandler.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateTerrainXferHandler.cs
@@ -32,7 +32,7 @@ using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Estate
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
index 9de0181..76555d2 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
@@ -29,8 +29,8 @@ using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Land
{
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
index 6f50102..58176e4 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
@@ -32,8 +32,8 @@ using System.Reflection;
using OpenMetaverse;
using log4net;
using Nini.Config;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Framework;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Communications.Capabilities;
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
index 89256fa..b5f7225 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
@@ -31,8 +31,8 @@ using System.Reflection;
using OpenMetaverse;
using log4net;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Land
{
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index f0d5de2..9165554 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -31,7 +31,7 @@ using System.Net;
using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.NPC
{
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs
index 7227cf0..2e7b16c 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs
@@ -27,8 +27,8 @@
using OpenMetaverse;
using Nini.Config;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.NPC
{
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index f086396..060a4f4 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -33,10 +33,10 @@ using System.Collections.Generic;
using System.Reflection;
using log4net;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.Framework;
using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander;
-using OpenSim.Region.Environment.Scenes;
using OpenSim.Framework.Communications.Cache;
namespace OpenSim.Region.Environment.Modules.World.Permissions
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/IFileSerialiser.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/IFileSerialiser.cs
index 40568e7..afad3cf 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/IFileSerialiser.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/IFileSerialiser.cs
@@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Serialiser
{
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
deleted file mode 100644
index 2e9c551..0000000
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
+++ /dev/null
@@ -1,289 +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.Collections.Generic;
-using System.IO;
-using System.Reflection;
-using System.Xml;
-using OpenMetaverse;
-using log4net;
-using OpenSim.Framework;
-using OpenSim.Region.Physics.Manager;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- ///
- /// Static methods to serialize and deserialize scene objects to and from XML
- ///
- public class SceneXmlLoader
- {
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset)
- {
- XmlDocument doc = new XmlDocument();
- XmlNode rootNode;
-
- if (fileName.StartsWith("http:") || File.Exists(fileName))
- {
- XmlTextReader reader = new XmlTextReader(fileName);
- reader.WhitespaceHandling = WhitespaceHandling.None;
- doc.Load(reader);
- reader.Close();
- rootNode = doc.FirstChild;
- foreach (XmlNode aPrimNode in rootNode.ChildNodes)
- {
- SceneObjectGroup obj = new SceneObjectGroup(aPrimNode.OuterXml, true);
-
- if (newIDS)
- {
- obj.ResetIDs();
- }
- //if we want this to be a import method then we need new uuids for the object to avoid any clashes
- //obj.RegenerateFullIDs();
-
- scene.AddNewSceneObject(obj, true);
- }
- }
- else
- {
- throw new Exception("Could not open file " + fileName + " for reading");
- }
- }
-
- public static void SavePrimsToXml(Scene scene, string fileName)
- {
- FileStream file = new FileStream(fileName, FileMode.Create);
- StreamWriter stream = new StreamWriter(file);
- int primCount = 0;
- stream.WriteLine("\n");
-
- List EntityList = scene.GetEntities();
-
- foreach (EntityBase ent in EntityList)
- {
- if (ent is SceneObjectGroup)
- {
- stream.WriteLine(((SceneObjectGroup) ent).ToXmlString());
- primCount++;
- }
- }
- stream.WriteLine("\n");
- stream.Close();
- file.Close();
- }
-
- public static string SaveGroupToXml2(SceneObjectGroup grp)
- {
- return grp.ToXmlString2();
- }
-
- public static SceneObjectGroup DeserializeGroupFromXml2(string xmlString)
- {
- XmlDocument doc = new XmlDocument();
- XmlNode rootNode;
-
- XmlTextReader reader = new XmlTextReader(new StringReader(xmlString));
- reader.WhitespaceHandling = WhitespaceHandling.None;
- doc.Load(reader);
- reader.Close();
- rootNode = doc.FirstChild;
-
- // This is to deal with neighbouring regions that are still surrounding the group xml with the
- // tag. It should be possible to remove the first part of this if statement once we go past 0.5.9 (or
- // when some other changes forces all regions to upgrade).
- // This might seem rather pointless since prim crossing from this revision to an earlier revision remains
- // broken. But it isn't much work to accomodate the old format here.
- if (rootNode.LocalName.Equals("scene"))
- {
- foreach (XmlNode aPrimNode in rootNode.ChildNodes)
- {
- // There is only ever one prim. This oddity should be removeable post 0.5.9
- return new SceneObjectGroup(aPrimNode.OuterXml);
- }
-
- return null;
- }
- else
- {
- return new SceneObjectGroup(rootNode.OuterXml);
- }
- }
-
- ///
- /// Load prims from the xml2 format
- ///
- ///
- ///
- public static void LoadPrimsFromXml2(Scene scene, string fileName)
- {
- LoadPrimsFromXml2(scene, new XmlTextReader(fileName), false);
- }
-
- ///
- /// Load prims from the xml2 format
- ///
- ///
- ///
- ///
- public static void LoadPrimsFromXml2(Scene scene, TextReader reader, bool startScripts)
- {
- LoadPrimsFromXml2(scene, new XmlTextReader(reader), startScripts);
- }
-
- ///
- /// Load prims from the xml2 format. This method will close the reader
- ///
- ///
- ///
- ///
- protected static void LoadPrimsFromXml2(Scene scene, XmlTextReader reader, bool startScripts)
- {
- XmlDocument doc = new XmlDocument();
- reader.WhitespaceHandling = WhitespaceHandling.None;
- doc.Load(reader);
- reader.Close();
- XmlNode rootNode = doc.FirstChild;
-
- ICollection sceneObjects = new List();
- foreach (XmlNode aPrimNode in rootNode.ChildNodes)
- {
- SceneObjectGroup obj = CreatePrimFromXml2(scene, aPrimNode.OuterXml);
- if (obj != null && startScripts)
- sceneObjects.Add(obj);
- }
-
- foreach (SceneObjectGroup sceneObject in sceneObjects)
- {
- sceneObject.CreateScriptInstances(0, true, scene.DefaultScriptEngine, 0);
- }
- }
-
- ///
- /// Create a prim from the xml2 representation.
- ///
- ///
- ///
- /// The scene object created. null if the scene object already existed
- protected static SceneObjectGroup CreatePrimFromXml2(Scene scene, string xmlData)
- {
- SceneObjectGroup obj = new SceneObjectGroup(xmlData);
-
- if (scene.AddRestoredSceneObject(obj, true, false))
- return obj;
- else
- return null;
- }
-
- public static void SavePrimsToXml2(Scene scene, string fileName)
- {
- List EntityList = scene.GetEntities();
-
- SavePrimListToXml2(EntityList, fileName);
- }
-
- public static void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max)
- {
- List EntityList = scene.GetEntities();
-
- SavePrimListToXml2(EntityList, stream, min, max);
- }
-
- public static void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName)
- {
- m_log.InfoFormat(
- "[SERIALISER]: Saving prims with name {0} in xml2 format for region {1} to {2}",
- primName, scene.RegionInfo.RegionName, fileName);
-
- List entityList = scene.GetEntities();
- List primList = new List();
-
- foreach (EntityBase ent in entityList)
- {
- if (ent is SceneObjectGroup)
- {
- if (ent.Name == primName)
- {
- primList.Add(ent);
- }
- }
- }
-
- SavePrimListToXml2(primList, fileName);
- }
-
- public static void SavePrimListToXml2(List entityList, string fileName)
- {
- FileStream file = new FileStream(fileName, FileMode.Create);
- try
- {
- StreamWriter stream = new StreamWriter(file);
- try
- {
- SavePrimListToXml2(entityList, stream, Vector3.Zero, Vector3.Zero);
- }
- finally
- {
- stream.Close();
- }
- }
- finally
- {
- file.Close();
- }
- }
-
- public static void SavePrimListToXml2(List entityList, TextWriter stream, Vector3 min, Vector3 max)
- {
- int primCount = 0;
- stream.WriteLine("\n");
-
- foreach (EntityBase ent in entityList)
- {
- if (ent is SceneObjectGroup)
- {
- SceneObjectGroup g = (SceneObjectGroup)ent;
- if (!min.Equals(Vector3.Zero) || !max.Equals(Vector3.Zero))
- {
- Vector3 pos = g.RootPart.GetWorldPosition();
- if (min.X > pos.X || min.Y > pos.Y || min.Z > pos.Z)
- continue;
- if (max.X < pos.X || max.Y < pos.Y || max.Z < pos.Z)
- continue;
- }
-
- stream.WriteLine(g.ToXmlString2());
- primCount++;
- }
- }
- stream.WriteLine("\n");
- stream.Flush();
- }
-
- }
-}
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs
index 1fb78b6..8b3f2ce 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs
@@ -30,7 +30,7 @@ using System.IO;
using System.IO.Compression;
using System.Text;
using System.Xml;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Serialiser
{
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseTerrain.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseTerrain.cs
index bd85264..d0ce3d8 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseTerrain.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseTerrain.cs
@@ -27,7 +27,7 @@
using OpenSim.Region.Environment.Modules.World.Terrain;
using OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Serialiser
{
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
index f939adf..0e7873c 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
@@ -30,9 +30,9 @@ using System.Collections.Generic;
using System.IO;
using OpenMetaverse;
using Nini.Config;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander;
-using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Serialiser
{
diff --git a/OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs b/OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs
index 4547480..1713797 100644
--- a/OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sound/SoundModule.cs
@@ -31,8 +31,8 @@ using Nini.Config;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.World.Sound
{
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
index 9d8956e..ee96d58 100644
--- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
@@ -30,8 +30,8 @@ using System.Collections.Generic;
using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs b/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs
index c5e99b5..83246fb 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs
@@ -25,7 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/Effects/DefaultTerrainGenerator.cs b/OpenSim/Region/Environment/Modules/World/Terrain/Effects/DefaultTerrainGenerator.cs
index 5bc6799..2082137 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/Effects/DefaultTerrainGenerator.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/Effects/DefaultTerrainGenerator.cs
@@ -25,7 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs
index 48da96d..a8e79d0 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs
@@ -28,7 +28,7 @@
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GIF.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GIF.cs
index accffd2..b76fe05 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GIF.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GIF.cs
@@ -28,7 +28,7 @@
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
index 983ad29..80873d9 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
@@ -29,7 +29,8 @@ using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs
index 35576c7..bea504d 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs
@@ -29,7 +29,7 @@ using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs
index 5158525..e323e28 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs
@@ -27,7 +27,8 @@
using System;
using System.IO;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/PNG.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/PNG.cs
index 19e181e..25967f3 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/PNG.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/PNG.cs
@@ -28,7 +28,7 @@
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/RAW32.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/RAW32.cs
index 758821a..7aff56a 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/RAW32.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/RAW32.cs
@@ -26,7 +26,8 @@
*/
using System.IO;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs
index 95b43b0..0503487 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs
@@ -28,7 +28,7 @@
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs
index 2bf029e..44d03e3 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs
@@ -28,7 +28,8 @@
using System;
using System.IO;
using System.Text;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/FlattenArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/FlattenArea.cs
index f3c8a13..4d49a70 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/FlattenArea.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/FlattenArea.cs
@@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/LowerArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/LowerArea.cs
index 3646d61..64f9014 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/LowerArea.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/LowerArea.cs
@@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/NoiseArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/NoiseArea.cs
index f7c4893..2d44a3a 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/NoiseArea.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/NoiseArea.cs
@@ -26,7 +26,8 @@
*/
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RaiseArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RaiseArea.cs
index 5eff3d6..0c7d016 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RaiseArea.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RaiseArea.cs
@@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs
index 602a5cc..3f06d82 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs
@@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/SmoothArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/SmoothArea.cs
index 8fd805e..3881264 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/SmoothArea.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/SmoothArea.cs
@@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainEffect.cs b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainEffect.cs
index bbbe2a3..4533e9e 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainEffect.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainEffect.cs
@@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainFloodEffect.cs b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainFloodEffect.cs
index 9fe93a2..5bae84b 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainFloodEffect.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainFloodEffect.cs
@@ -26,7 +26,7 @@
*/
using System;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainLoader.cs b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainLoader.cs
index 950b27b..21bda58 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainLoader.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainLoader.cs
@@ -26,7 +26,7 @@
*/
using System.IO;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainPaintableEffect.cs b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainPaintableEffect.cs
index e2a9cde..7461560 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainPaintableEffect.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainPaintableEffect.cs
@@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs
index 3fa3f8a..4d694cc 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs
@@ -26,7 +26,8 @@
*/
using System;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
index c103d99..91c030d 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
@@ -26,7 +26,8 @@
*/
using System;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs
index 745d3da..d391e94 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs
@@ -26,7 +26,7 @@
*/
using System;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs
index 23f7bc5..32a6869 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs
@@ -27,7 +27,8 @@
using System;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs
index 42ec794..86d01d3 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs
@@ -26,7 +26,8 @@
*/
using System;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs
index 56813ab..a0ff262 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs
@@ -26,7 +26,8 @@
*/
using System;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
index d3a1d3d..af6d94d 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
@@ -26,7 +26,8 @@
*/
using System;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs
index 0b4996f..fe270f7 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs
@@ -25,7 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs
index 1288419..faba119 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs
@@ -25,7 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainChannel.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainChannel.cs
deleted file mode 100644
index 1534c4b..0000000
--- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainChannel.cs
+++ /dev/null
@@ -1,242 +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 OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using System;
-using System.Text;
-using System.Xml;
-using System.IO;
-using System.Xml.Serialization;
-
-namespace OpenSim.Region.Environment.Modules.World.Terrain
-{
- ///
- /// A new version of the old Channel class, simplified
- ///
- public class TerrainChannel : ITerrainChannel
- {
- private readonly bool[,] taint;
- private double[,] map;
-
- public TerrainChannel()
- {
- map = new double[Constants.RegionSize, Constants.RegionSize];
- taint = new bool[Constants.RegionSize / 16,Constants.RegionSize / 16];
-
- int x;
- for (x = 0; x < Constants.RegionSize; x++)
- {
- int y;
- for (y = 0; y < Constants.RegionSize; y++)
- {
- map[x, y] = TerrainUtil.PerlinNoise2D(x, y, 2, 0.125) * 10;
- double spherFacA = TerrainUtil.SphericalFactor(x, y, Constants.RegionSize / 2.0, Constants.RegionSize / 2.0, 50) * 0.01;
- double spherFacB = TerrainUtil.SphericalFactor(x, y, Constants.RegionSize / 2.0, Constants.RegionSize / 2.0, 100) * 0.001;
- if (map[x, y] < spherFacA)
- map[x, y] = spherFacA;
- if (map[x, y] < spherFacB)
- map[x, y] = spherFacB;
- }
- }
- }
-
- public TerrainChannel(double[,] import)
- {
- map = import;
- taint = new bool[import.GetLength(0),import.GetLength(1)];
- }
-
- public TerrainChannel(bool createMap)
- {
- if (createMap)
- {
- map = new double[Constants.RegionSize,Constants.RegionSize];
- taint = new bool[Constants.RegionSize / 16,Constants.RegionSize / 16];
- }
- }
-
- public TerrainChannel(int w, int h)
- {
- map = new double[w,h];
- taint = new bool[w / 16,h / 16];
- }
-
- #region ITerrainChannel Members
-
- public int Width
- {
- get { return map.GetLength(0); }
- }
-
- public int Height
- {
- get { return map.GetLength(1); }
- }
-
- public ITerrainChannel MakeCopy()
- {
- TerrainChannel copy = new TerrainChannel(false);
- copy.map = (double[,]) map.Clone();
-
- return copy;
- }
-
- public float[] GetFloatsSerialised()
- {
- // Move the member variables into local variables, calling
- // member variables 256*256 times gets expensive
- int w = Width;
- int h = Height;
- float[] heights = new float[w * h];
-
- int i, j; // map coordinates
- int idx = 0; // index into serialized array
- for (i = 0; i < h; i++)
- {
- for (j = 0; j < w; j++)
- {
- heights[idx++] = (float)map[j, i];
- }
- }
-
- return heights;
- }
-
- public double[,] GetDoubles()
- {
- return map;
- }
-
- public double this[int x, int y]
- {
- get { return map[x, y]; }
- set
- {
- // Will "fix" terrain hole problems. Although not fantastically.
- if (Double.IsNaN(value) || Double.IsInfinity(value))
- return;
-
- if (map[x, y] != value)
- {
- taint[x / 16, y / 16] = true;
- map[x, y] = value;
- }
- }
- }
-
- public bool Tainted(int x, int y)
- {
- if (taint[x / 16, y / 16])
- {
- taint[x / 16, y / 16] = false;
- return true;
- }
- return false;
- }
-
- #endregion
-
- public TerrainChannel Copy()
- {
- TerrainChannel copy = new TerrainChannel(false);
- copy.map = (double[,]) map.Clone();
-
- return copy;
- }
-
- public string SaveToXmlString()
- {
- XmlWriterSettings settings = new XmlWriterSettings();
- settings.Encoding = Encoding.UTF8;
- using (StringWriter sw = new StringWriter())
- {
- using (XmlWriter writer = XmlWriter.Create(sw, settings))
- {
- WriteXml(writer);
- }
- string output = sw.ToString();
- return output;
- }
- }
-
- private void WriteXml(XmlWriter writer)
- {
- writer.WriteStartElement(String.Empty, "TerrainMap", String.Empty);
- ToXml(writer);
- writer.WriteEndElement();
- }
-
- public void LoadFromXmlString(string data)
- {
- StringReader sr = new StringReader(data);
- XmlTextReader reader = new XmlTextReader(sr);
- reader.Read();
-
- ReadXml(reader);
- reader.Close();
- sr.Close();
- }
-
- private void ReadXml(XmlReader reader)
- {
- reader.ReadStartElement("TerrainMap");
- FromXml(reader);
- }
-
- private void ToXml(XmlWriter xmlWriter)
- {
- float[] mapData = GetFloatsSerialised();
- byte[] buffer = new byte[mapData.Length * 4];
- for (int i = 0; i < mapData.Length; i++)
- {
- byte[] value = BitConverter.GetBytes(mapData[i]);
- Array.Copy(value, 0, buffer, (i * 4), 4);
- }
- XmlSerializer serializer = new XmlSerializer(typeof(byte[]));
- serializer.Serialize(xmlWriter, buffer);
- }
-
- private void FromXml(XmlReader xmlReader)
- {
- XmlSerializer serializer = new XmlSerializer(typeof(byte[]));
- byte[] dataArray = (byte[])serializer.Deserialize(xmlReader);
- int index = 0;
-
- for (int y = 0; y < Height; y++)
- {
- for (int x = 0; x < Width; x++)
- {
- float value;
- value = BitConverter.ToSingle(dataArray, index);
- index += 4;
- this[x, y] = (double)value;
- }
- }
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
index 3c27872..bc601dc 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
@@ -33,12 +33,12 @@ using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander;
using OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders;
using OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes;
using OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes;
-using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Terrain
{
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainUtil.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainUtil.cs
deleted file mode 100644
index b20ff42..0000000
--- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainUtil.cs
+++ /dev/null
@@ -1,132 +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.Region.Environment.Interfaces;
-
-namespace OpenSim.Region.Environment.Modules.World.Terrain
-{
- public static class TerrainUtil
- {
- public static double MetersToSphericalStrength(double size)
- {
- //return Math.Pow(2, size);
- return (size + 1) * 1.35; // MCP: a more useful brush size range
- }
-
- public static double SphericalFactor(double x, double y, double rx, double ry, double size)
- {
- return size * size - ((x - rx) * (x - rx) + (y - ry) * (y - ry));
- }
-
- public static double GetBilinearInterpolate(double x, double y, ITerrainChannel map)
- {
- int w = map.Width;
- int h = map.Height;
-
- if (x > w - 2.0)
- x = w - 2.0;
- if (y > h - 2.0)
- y = h - 2.0;
- if (x < 0.0)
- x = 0.0;
- if (y < 0.0)
- y = 0.0;
-
- const int stepSize = 1;
- double h00 = map[(int) x, (int) y];
- double h10 = map[(int) x + stepSize, (int) y];
- double h01 = map[(int) x, (int) y + stepSize];
- double h11 = map[(int) x + stepSize, (int) y + stepSize];
- double h1 = h00;
- double h2 = h10;
- double h3 = h01;
- double h4 = h11;
- double a00 = h1;
- double a10 = h2 - h1;
- double a01 = h3 - h1;
- double a11 = h1 - h2 - h3 + h4;
- double partialx = x - (int) x;
- double partialz = y - (int) y;
- double hi = a00 + (a10 * partialx) + (a01 * partialz) + (a11 * partialx * partialz);
- return hi;
- }
-
- private static double Noise(double x, double y)
- {
- int n = (int) x + (int) (y * 749);
- n = (n << 13) ^ n;
- return (1.0 - ((n * (n * n * 15731 + 789221) + 1376312589) & 0x7fffffff) / 1073741824.0);
- }
-
- private static double SmoothedNoise1(double x, double y)
- {
- double corners = (Noise(x - 1, y - 1) + Noise(x + 1, y - 1) + Noise(x - 1, y + 1) + Noise(x + 1, y + 1)) / 16;
- double sides = (Noise(x - 1, y) + Noise(x + 1, y) + Noise(x, y - 1) + Noise(x, y + 1)) / 8;
- double center = Noise(x, y) / 4;
- return corners + sides + center;
- }
-
- private static double Interpolate(double x, double y, double z)
- {
- return (x * (1.0 - z)) + (y * z);
- }
-
- public static double InterpolatedNoise(double x, double y)
- {
- int integer_X = (int) (x);
- double fractional_X = x - integer_X;
-
- int integer_Y = (int) y;
- double fractional_Y = y - integer_Y;
-
- double v1 = SmoothedNoise1(integer_X, integer_Y);
- double v2 = SmoothedNoise1(integer_X + 1, integer_Y);
- double v3 = SmoothedNoise1(integer_X, integer_Y + 1);
- double v4 = SmoothedNoise1(integer_X + 1, integer_Y + 1);
-
- double i1 = Interpolate(v1, v2, fractional_X);
- double i2 = Interpolate(v3, v4, fractional_X);
-
- return Interpolate(i1, i2, fractional_Y);
- }
-
- public static double PerlinNoise2D(double x, double y, int octaves, double persistence)
- {
- double total = 0.0;
-
- for (int i = 0; i < octaves; i++)
- {
- double frequency = Math.Pow(2, i);
- double amplitude = Math.Pow(persistence, i);
-
- total += InterpolatedNoise(x * frequency, y * frequency) * amplitude;
- }
- return total;
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs b/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs
index 3511988..2acd5bc 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs
@@ -27,6 +27,7 @@
using System;
using NUnit.Framework;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes;
namespace OpenSim.Region.Environment.Modules.World.Terrain.Tests
diff --git a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
index f6b82a3..8a49540 100644
--- a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
@@ -33,8 +33,8 @@ using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.TreePopulator
{
diff --git a/OpenSim/Region/Environment/Modules/World/Vegetation/VegetationModule.cs b/OpenSim/Region/Environment/Modules/World/Vegetation/VegetationModule.cs
index a1c2192..4c4ca0d 100644
--- a/OpenSim/Region/Environment/Modules/World/Vegetation/VegetationModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Vegetation/VegetationModule.cs
@@ -33,8 +33,8 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.Avatar.Vegetation
{
diff --git a/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs b/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
index 52f52eb..8e54fd9 100644
--- a/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
@@ -30,8 +30,8 @@ using System.Collections.Generic;
using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules
{
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/IMapTileTerrainRenderer.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/IMapTileTerrainRenderer.cs
index bebcc52..cb0ac8c 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/IMapTileTerrainRenderer.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/IMapTileTerrainRenderer.cs
@@ -26,7 +26,7 @@
*/
using System.Drawing;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Scenes;
using Nini.Config;
namespace OpenSim.Region.Environment
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs
index 1c43724..a806c7d 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs
@@ -35,8 +35,8 @@ using System.Reflection;
using Nini.Config;
using OpenMetaverse.Imaging;
using log4net;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenMetaverse;
namespace OpenSim.Region.Environment.Modules.World.WorldMap
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/MapSearchModule.cs
index 6541571..fcac7e1 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/MapSearchModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/MapSearchModule.cs
@@ -29,9 +29,9 @@ using System.Reflection;
using System.Collections.Generic;
using System.Net;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
-using OpenSim.Region.Environment.Scenes.Hypergrid;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.Framework.Scenes.Hypergrid;
using OpenMetaverse;
using log4net;
using Nini.Config;
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs
index dffa72a..7fe538e 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs
@@ -36,8 +36,8 @@ using OpenMetaverse;
using OpenMetaverse.Imaging;
using Nini.Config;
using log4net;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Environment.Modules.World.WorldMap
{
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
index d66bbdb..d23c352 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
@@ -37,8 +37,8 @@ using Nini.Config;
using log4net;
using OpenMetaverse.Imaging;
using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Environment.Modules.World.Terrain;
namespace OpenSim.Region.Environment.Modules.World.WorldMap
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
index cf1900b..37b4547 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
@@ -43,9 +43,9 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Capabilities;
using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Environment.Scenes;
-using OpenSim.Region.Environment.Types;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.Framework.Scenes.Types;
using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
using OSD = OpenMetaverse.StructuredData.OSD;
diff --git a/OpenSim/Region/Environment/Scenes/Animation.cs b/OpenSim/Region/Environment/Scenes/Animation.cs
deleted file mode 100644
index 2854e06..0000000
--- a/OpenSim/Region/Environment/Scenes/Animation.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;
-using OpenMetaverse;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- public class Animation
- {
- private UUID animID;
- public UUID AnimID
- {
- get { return animID; }
- set { animID = value; }
- }
-
- private int sequenceNum;
- public int SequenceNum
- {
- get { return sequenceNum; }
- set { sequenceNum = value; }
- }
-
- public Animation()
- {
- }
-
- public Animation(UUID animID, int sequenceNum)
- {
- this.animID = animID;
- this.sequenceNum = sequenceNum;
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/AnimationSet.cs b/OpenSim/Region/Environment/Scenes/AnimationSet.cs
deleted file mode 100644
index df25173..0000000
--- a/OpenSim/Region/Environment/Scenes/AnimationSet.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 System.Collections.Generic;
-using OpenMetaverse;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- public class AnimationSet
- {
- public static AvatarAnimations Animations = new AvatarAnimations();
-
- private Animation m_defaultAnimation = new Animation();
- private List m_animations = new List();
-
- public Animation DefaultAnimation
- {
- get { return m_defaultAnimation; }
- }
- public AnimationSet()
- {
- ResetDefaultAnimation();
- }
-
- public bool HasAnimation(UUID animID)
- {
- if (m_defaultAnimation.AnimID == animID)
- return true;
-
- for (int i = 0; i < m_animations.Count; ++i)
- {
- if (m_animations[i].AnimID == animID)
- return true;
- }
-
- return false;
- }
-
- public bool Add(UUID animID, int sequenceNum)
- {
- lock (m_animations)
- {
- if (!HasAnimation(animID))
- {
- m_animations.Add(new Animation(animID, sequenceNum));
- return true;
- }
- }
- return false;
- }
-
- public bool Remove(UUID animID)
- {
- lock (m_animations)
- {
- if (m_defaultAnimation.AnimID == animID)
- {
- ResetDefaultAnimation();
- }
- else if (HasAnimation(animID))
- {
- for (int i = 0; i < m_animations.Count; i++)
- {
- if (m_animations[i].AnimID == animID)
- {
- m_animations.RemoveAt(i);
- return true;
- }
- }
- }
- }
- return false;
- }
-
- public void Clear()
- {
- ResetDefaultAnimation();
- m_animations.Clear();
- }
-
- ///
- /// The default animation is reserved for "main" animations
- /// that are mutually exclusive, e.g. flying and sitting.
- ///
- public bool SetDefaultAnimation(UUID animID, int sequenceNum)
- {
- if (m_defaultAnimation.AnimID != animID)
- {
- m_defaultAnimation = new Animation(animID, sequenceNum);
- return true;
- }
- return false;
- }
-
- protected bool ResetDefaultAnimation()
- {
- return TrySetDefaultAnimation("STAND", 1);
- }
-
- ///
- /// Set the animation as the default animation if it's known
- ///
- public bool TrySetDefaultAnimation(string anim, int sequenceNum)
- {
- if (Animations.AnimsUUID.ContainsKey(anim))
- {
- return SetDefaultAnimation(Animations.AnimsUUID[anim], sequenceNum);
- }
- return false;
- }
-
- public void GetArrays(out UUID[] animIDs, out int[] sequenceNums)
- {
- lock (m_animations)
- {
- animIDs = new UUID[m_animations.Count + 1];
- sequenceNums = new int[m_animations.Count + 1];
-
- animIDs[0] = m_defaultAnimation.AnimID;
- sequenceNums[0] = m_defaultAnimation.SequenceNum;
-
- for (int i = 0; i < m_animations.Count; ++i)
- {
- animIDs[i + 1] = m_animations[i].AnimID;
- sequenceNums[i + 1] = m_animations[i].SequenceNum;
- }
- }
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
deleted file mode 100644
index 1429452..0000000
--- a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
+++ /dev/null
@@ -1,165 +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.Collections.Generic;
-using System.Reflection;
-using System.Timers;
-using log4net;
-using OpenMetaverse;
-using OpenMetaverse.Packets;
-using OpenSim.Framework;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- class DeleteToInventoryHolder
- {
- public DeRezAction action;
- public IClientAPI remoteClient;
- public SceneObjectGroup objectGroup;
- public UUID folderID;
- public bool permissionToDelete;
- }
-
- ///
- /// Asynchronously derez objects. This is used to derez large number of objects to inventory without holding
- /// up the main client thread.
- ///
- public class AsyncSceneObjectGroupDeleter
- {
- private static readonly ILog m_log
- = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- ///
- /// Is the deleter currently enabled?
- ///
- public bool Enabled;
-
- private Timer m_inventoryTicker = new Timer(2000);
- private readonly Queue m_inventoryDeletes = new Queue();
- private Scene m_scene;
-
- public AsyncSceneObjectGroupDeleter(Scene scene)
- {
- m_scene = scene;
-
- m_inventoryTicker.AutoReset = false;
- m_inventoryTicker.Elapsed += InventoryRunDeleteTimer;
- }
-
- ///
- /// Delete the given object from the scene
- ///
- public void DeleteToInventory(DeRezAction action, UUID folderID,
- SceneObjectGroup objectGroup, IClientAPI remoteClient,
- bool permissionToDelete)
- {
- if (Enabled)
- m_inventoryTicker.Stop();
-
- lock (m_inventoryDeletes)
- {
- DeleteToInventoryHolder dtis = new DeleteToInventoryHolder();
- dtis.action = action;
- dtis.folderID = folderID;
- dtis.objectGroup = objectGroup;
- dtis.remoteClient = remoteClient;
- dtis.permissionToDelete = permissionToDelete;
-
- m_inventoryDeletes.Enqueue(dtis);
- }
-
- if (Enabled)
- m_inventoryTicker.Start();
-
- // Visually remove it, even if it isnt really gone yet. This means that if we crash before the object
- // has gone to inventory, it will reappear in the region again on restart instead of being lost.
- // This is not ideal since the object will still be available for manipulation when it should be, but it's
- // better than losing the object for now.
- if (permissionToDelete)
- objectGroup.DeleteGroup(false);
- }
-
- private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e)
- {
- m_log.Debug("[SCENE]: Starting send to inventory loop");
-
- while (InventoryDeQueueAndDelete())
- {
- m_log.Debug("[SCENE]: Sent item successfully to inventory, continuing...");
- }
- }
-
- ///
- /// Move the next object in the queue to inventory. Then delete it properly from the scene.
- ///
- ///
- public bool InventoryDeQueueAndDelete()
- {
- DeleteToInventoryHolder x = null;
-
- try
- {
- lock (m_inventoryDeletes)
- {
- int left = m_inventoryDeletes.Count;
- if (left > 0)
- {
- m_log.DebugFormat(
- "[SCENE]: Sending object to user's inventory, {0} item(s) remaining.", left);
-
- x = m_inventoryDeletes.Dequeue();
-
- try
- {
- m_scene.DeleteToInventory(x.action, x.folderID, x.objectGroup, x.remoteClient);
- if (x.permissionToDelete)
- m_scene.DeleteSceneObject(x.objectGroup, false);
- }
- catch (Exception e)
- {
- m_log.DebugFormat("Exception background sending object: " + e);
- }
-
- return true;
- }
- }
- }
- catch (Exception e)
- {
- // We can't put the object group details in here since the root part may have disappeared (which is where these sit).
- // FIXME: This needs to be fixed.
- m_log.ErrorFormat(
- "[SCENE]: Queued sending of scene object to agent {0} {1} failed: {2}",
- (x != null ? x.remoteClient.Name : "unavailable"), (x != null ? x.remoteClient.AgentId.ToString() : "unavailable"), e.ToString());
- }
-
- m_log.Debug("[SCENE]: No objects left in inventory send queue.");
- return false;
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs
deleted file mode 100644
index d4dd0db..0000000
--- a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs
+++ /dev/null
@@ -1,63 +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 System.Xml;
-using OpenMetaverse;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- public class AvatarAnimations
- {
- public Dictionary AnimsUUID = new Dictionary();
- public Dictionary AnimsNames = new Dictionary();
- public Dictionary AnimStateNames = new Dictionary();
-
- public AvatarAnimations()
- {
- using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"))
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(reader);
- foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
- {
- if (nod.Attributes["name"] != null)
- {
- string name = (string)nod.Attributes["name"].Value;
- UUID id = (UUID)nod.InnerText;
- string animState = (string)nod.Attributes["state"].Value;
-
- AnimsUUID.Add(name, id);
- AnimsNames.Add(id, name);
- if (animState != "")
- AnimStateNames.Add(id, animState);
- }
- }
- }
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs
deleted file mode 100644
index 3ae8cde..0000000
--- a/OpenSim/Region/Environment/Scenes/EntityBase.cs
+++ /dev/null
@@ -1,253 +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.Runtime.Serialization;
-using System.Security.Permissions;
-using OpenMetaverse;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- [Serializable]
- public abstract class EntityBase : ISerializable
- {
- ///
- /// The scene to which this entity belongs
- ///
- public Scene Scene
- {
- get { return m_scene; }
- }
- protected Scene m_scene;
-
- protected UUID m_uuid;
-
- public virtual UUID UUID
- {
- get { return m_uuid; }
- set { m_uuid = value; }
- }
-
- protected string m_name;
-
- ///
- /// The name of this entity
- ///
- public virtual string Name
- {
- get { return m_name; }
- set { m_name = value; }
- }
-
- ///
- /// Signals whether this entity was in a scene but has since been removed from it.
- ///
- public bool IsDeleted
- {
- get { return m_isDeleted; }
- }
- protected bool m_isDeleted;
-
- protected Vector3 m_pos;
-
- ///
- ///
- ///
- public virtual Vector3 AbsolutePosition
- {
- get { return m_pos; }
- set { m_pos = value; }
- }
-
- protected Vector3 m_velocity;
- protected Vector3 m_rotationalvelocity;
-
- ///
- /// Current velocity of the entity.
- ///
- public virtual Vector3 Velocity
- {
- get { return m_velocity; }
- set { m_velocity = value; }
- }
-
- protected Quaternion m_rotation = new Quaternion(0f, 0f, 1f, 0f);
-
- public virtual Quaternion Rotation
- {
- get { return m_rotation; }
- set { m_rotation = value; }
- }
-
- protected uint m_localId;
-
- public virtual uint LocalId
- {
- get { return m_localId; }
- set { m_localId = value; }
- }
-
- ///
- /// Creates a new Entity (should not occur on it's own)
- ///
- public EntityBase()
- {
- m_uuid = UUID.Zero;
-
- m_pos = Vector3.Zero;
- m_velocity = Vector3.Zero;
- Rotation = Quaternion.Identity;
- m_name = "(basic entity)";
- m_rotationalvelocity = Vector3.Zero;
- }
-
- ///
- ///
- ///
- public abstract void UpdateMovement();
-
- ///
- /// Performs any updates that need to be done at each frame, as opposed to immediately.
- /// These included scheduled updates and updates that occur due to physics processing.
- ///
- public abstract void Update();
-
- ///
- /// Copies the entity
- ///
- ///
- public virtual EntityBase Copy()
- {
- return (EntityBase) MemberwiseClone();
- }
-
-
- public abstract void SetText(string text, Vector3 color, double alpha);
-
- protected EntityBase(SerializationInfo info, StreamingContext context)
- {
- //System.Console.WriteLine("EntityBase Deserialize BGN");
-
- if (info == null)
- {
- throw new ArgumentNullException("info");
- }
-
- m_uuid = new UUID((Guid)info.GetValue("m_uuid", typeof(Guid)));
- m_name = (string)info.GetValue("m_name", typeof(string));
-
- m_pos
- = new Vector3(
- (float)info.GetValue("m_pos.X", typeof(float)),
- (float)info.GetValue("m_pos.Y", typeof(float)),
- (float)info.GetValue("m_pos.Z", typeof(float)));
-
- m_velocity
- = new Vector3(
- (float)info.GetValue("m_velocity.X", typeof(float)),
- (float)info.GetValue("m_velocity.Y", typeof(float)),
- (float)info.GetValue("m_velocity.Z", typeof(float)));
-
- m_rotationalvelocity
- = new Vector3(
- (float)info.GetValue("m_rotationalvelocity.X", typeof(float)),
- (float)info.GetValue("m_rotationalvelocity.Y", typeof(float)),
- (float)info.GetValue("m_rotationalvelocity.Z", typeof(float)));
-
- m_rotation
- = new Quaternion(
- (float)info.GetValue("m_rotation.X", typeof(float)),
- (float)info.GetValue("m_rotation.Y", typeof(float)),
- (float)info.GetValue("m_rotation.Z", typeof(float)),
- (float)info.GetValue("m_rotation.W", typeof(float)));
-
- m_localId = (uint)info.GetValue("m_localId", typeof(uint));
-
- //System.Console.WriteLine("EntityBase Deserialize END");
- }
-
- [SecurityPermission(SecurityAction.LinkDemand,
- Flags = SecurityPermissionFlag.SerializationFormatter)]
- public virtual void GetObjectData(
- SerializationInfo info, StreamingContext context)
- {
- if (info == null)
- {
- throw new ArgumentNullException("info");
- }
-
- info.AddValue("m_uuid", m_uuid.Guid);
- info.AddValue("m_name", m_name);
-
- // Vector3
- info.AddValue("m_pos.X", m_pos.X);
- info.AddValue("m_pos.Y", m_pos.Y);
- info.AddValue("m_pos.Z", m_pos.Z);
-
- // Vector3
- info.AddValue("m_velocity.X", m_velocity.X);
- info.AddValue("m_velocity.Y", m_velocity.Y);
- info.AddValue("m_velocity.Z", m_velocity.Z);
-
- // Vector3
- info.AddValue("m_rotationalvelocity.X", m_rotationalvelocity.X);
- info.AddValue("m_rotationalvelocity.Y", m_rotationalvelocity.Y);
- info.AddValue("m_rotationalvelocity.Z", m_rotationalvelocity.Z);
-
- // Quaternion
- info.AddValue("m_rotation.X", m_rotation.X);
- info.AddValue("m_rotation.Y", m_rotation.Y);
- info.AddValue("m_rotation.Z", m_rotation.Z);
- info.AddValue("m_rotation.W", m_rotation.W);
-
- info.AddValue("m_localId", m_localId);
- }
- }
-
- //Nested Classes
- public class EntityIntersection
- {
- public Vector3 ipoint = new Vector3(0, 0, 0);
- public Vector3 normal = new Vector3(0, 0, 0);
- public Vector3 AAfaceNormal = new Vector3(0, 0, 0);
- public int face = -1;
- public bool HitTF = false;
- public SceneObjectPart obj;
- public float distance = 0;
-
- public EntityIntersection()
- {
- }
-
- public EntityIntersection(Vector3 _ipoint, Vector3 _normal, bool _HitTF)
- {
- ipoint = _ipoint;
- normal = _normal;
- HitTF = _HitTF;
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/EntityManager.cs b/OpenSim/Region/Environment/Scenes/EntityManager.cs
deleted file mode 100644
index f89d361..0000000
--- a/OpenSim/Region/Environment/Scenes/EntityManager.cs
+++ /dev/null
@@ -1,279 +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 OpenSimulator 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.Collections;
-using System.Collections.Generic;
-using System.Reflection;
-using log4net;
-using OpenMetaverse;
-
-
-namespace OpenSim.Region.Environment.Scenes
-{
- public class EntityManager : IEnumerable
- {
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
- private readonly Dictionary m_eb_uuid = new Dictionary();
- private readonly Dictionary m_eb_localID = new Dictionary();
- //private readonly Dictionary m_pres_uuid = new Dictionary();
- private readonly Object m_lock = new Object();
-
- [Obsolete("Use Add() instead.")]
- public void Add(UUID id, EntityBase eb)
- {
- Add(eb);
- }
-
- public void Add(EntityBase entity)
- {
- lock (m_lock)
- {
- try
- {
- m_eb_uuid.Add(entity.UUID, entity);
- m_eb_localID.Add(entity.LocalId, entity);
- }
- catch(Exception e)
- {
- m_log.ErrorFormat("Add Entity failed: {0}", e.Message);
- }
- }
- }
-
- public void InsertOrReplace(EntityBase entity)
- {
- lock (m_lock)
- {
- try
- {
- m_eb_uuid[entity.UUID] = entity;
- m_eb_localID[entity.LocalId] = entity;
- }
- catch(Exception e)
- {
- m_log.ErrorFormat("Insert or Replace Entity failed: {0}", e.Message);
- }
- }
- }
-
- public void Clear()
- {
- lock (m_lock)
- {
- m_eb_uuid.Clear();
- m_eb_localID.Clear();
- }
- }
-
- public int Count
- {
- get
- {
- lock (m_lock)
- {
- return m_eb_uuid.Count;
- }
- }
- }
-
- public bool ContainsKey(UUID id)
- {
- lock (m_lock)
- {
- try
- {
- return m_eb_uuid.ContainsKey(id);
- }
- catch
- {
- return false;
- }
- }
- }
-
- public bool ContainsKey(uint localID)
- {
- lock (m_lock)
- {
- try
- {
- return m_eb_localID.ContainsKey(localID);
- }
- catch
- {
- return false;
- }
- }
- }
-
- public bool Remove(uint localID)
- {
- lock (m_lock)
- {
- try
- {
- bool a = m_eb_uuid.Remove(m_eb_localID[localID].UUID);
- bool b = m_eb_localID.Remove(localID);
- return a && b;
- }
- catch (Exception e)
- {
- m_log.ErrorFormat("Remove Entity failed for {0}", localID, e);
- return false;
- }
- }
- }
-
- public bool Remove(UUID id)
- {
- lock (m_lock)
- {
- try
- {
- bool a = m_eb_localID.Remove(m_eb_uuid[id].LocalId);
- bool b = m_eb_uuid.Remove(id);
- return a && b;
- }
- catch (Exception e)
- {
- m_log.ErrorFormat("Remove Entity failed for {0}", id, e);
- return false;
- }
- }
- }
-
- public List GetAllByType()
- {
- List tmp = new List();
-
- lock (m_lock)
- {
- try
- {
- foreach (KeyValuePair pair in m_eb_uuid)
- {
- if (pair.Value is T)
- {
- tmp.Add(pair.Value);
- }
- }
- }
- catch (Exception e)
- {
- m_log.ErrorFormat("GetAllByType failed for {0}", e);
- tmp = null;
- }
- }
-
- return tmp;
- }
-
- public List GetEntities()
- {
- lock (m_lock)
- {
- return new List(m_eb_uuid.Values);
- }
- }
-
- public EntityBase this[UUID id]
- {
- get
- {
- lock (m_lock)
- {
- try
- {
- return m_eb_uuid[id];
- }
- catch
- {
- return null;
- }
- }
- }
- set
- {
- InsertOrReplace(value);
- }
- }
-
- public EntityBase this[uint localID]
- {
- get
- {
- lock (m_lock)
- {
- try
- {
- return m_eb_localID[localID];
- }
- catch
- {
- return null;
- }
- }
- }
- set
- {
- InsertOrReplace(value);
- }
- }
-
- public bool TryGetValue(UUID key, out EntityBase obj)
- {
- lock (m_lock)
- {
- return m_eb_uuid.TryGetValue(key, out obj);
- }
- }
-
- public bool TryGetValue(uint key, out EntityBase obj)
- {
- lock (m_lock)
- {
- return m_eb_localID.TryGetValue(key, out obj);
- }
- }
-
- ///
- /// This could be optimised to work on the list 'live' rather than making a safe copy and iterating that.
- ///
- ///
- public IEnumerator GetEnumerator()
- {
- return GetEntities().GetEnumerator();
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return GetEnumerator();
- }
-
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs
deleted file mode 100644
index bba7eed..0000000
--- a/OpenSim/Region/Environment/Scenes/EventManager.cs
+++ /dev/null
@@ -1,980 +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 OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Framework.Client;
-using OpenSim.Region.Environment.Interfaces;
-using Caps=OpenSim.Framework.Communications.Capabilities.Caps;
-using System.Collections.Generic;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- ///
- /// A class for triggering remote scene events.
- ///
- public class EventManager
- {
- public delegate void OnFrameDelegate();
-
- public event OnFrameDelegate OnFrame;
-
- public delegate void ClientMovement(ScenePresence client);
-
- public event ClientMovement OnClientMovement;
-
- public delegate void OnTerrainTickDelegate();
-
- public event OnTerrainTickDelegate OnTerrainTick;
-
- public delegate void OnBackupDelegate(IRegionDataStore datastore, bool forceBackup);
-
- public event OnBackupDelegate OnBackup;
-
- public delegate void OnClientConnectCoreDelegate(IClientCore client);
-
- public event OnClientConnectCoreDelegate OnClientConnect;
-
- public delegate void OnNewClientDelegate(IClientAPI client);
-
- ///
- /// Depreciated in favour of OnClientConnect.
- /// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces.
- ///
- public event OnNewClientDelegate OnNewClient;
-
- public delegate void OnNewPresenceDelegate(ScenePresence presence);
-
- public event OnNewPresenceDelegate OnNewPresence;
-
- public delegate void OnRemovePresenceDelegate(UUID agentId);
-
- public event OnRemovePresenceDelegate OnRemovePresence;
-
- public delegate void OnParcelPrimCountUpdateDelegate();
-
- public event OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate;
-
- public delegate void OnParcelPrimCountAddDelegate(SceneObjectGroup obj);
-
- public event OnParcelPrimCountAddDelegate OnParcelPrimCountAdd;
-
- public delegate void OnPluginConsoleDelegate(string[] args);
-
- public event OnPluginConsoleDelegate OnPluginConsole;
-
- public delegate void OnShutdownDelegate();
-
- public event OnShutdownDelegate OnShutdown;
-
- public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
- public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient);
- public delegate void ScriptResetDelegate(uint localID, UUID itemID);
-
- public delegate void OnPermissionErrorDelegate(UUID user, string reason);
-
- public delegate void OnSetRootAgentSceneDelegate(UUID agentID, Scene scene);
-
- public event OnSetRootAgentSceneDelegate OnSetRootAgentScene;
-
- public event ObjectGrabDelegate OnObjectGrab;
- public event ObjectDeGrabDelegate OnObjectDeGrab;
- public event ScriptResetDelegate OnScriptReset;
-
- public event OnPermissionErrorDelegate OnPermissionError;
-
- public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource);
-
- public event NewRezScript OnRezScript;
-
- public delegate void RemoveScript(uint localID, UUID itemID);
-
- public event RemoveScript OnRemoveScript;
-
- public delegate void StartScript(uint localID, UUID itemID);
-
- public event StartScript OnStartScript;
-
- public delegate void StopScript(uint localID, UUID itemID);
-
- public event StopScript OnStopScript;
-
- public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta);
-
- public event SceneGroupMoved OnSceneGroupMove;
-
- public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID);
-
- public event SceneGroupGrabed OnSceneGroupGrab;
-
- public delegate void LandObjectAdded(ILandObject newParcel);
-
- public event LandObjectAdded OnLandObjectAdded;
-
- public delegate void LandObjectRemoved(UUID globalID);
-
- public event LandObjectRemoved OnLandObjectRemoved;
-
- public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID);
-
- public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
-
- public delegate void SignificantClientMovement(IClientAPI remote_client);
-
- public event SignificantClientMovement OnSignificantClientMovement;
-
- public delegate void IncomingInstantMessage(GridInstantMessage message);
-
- public event IncomingInstantMessage OnIncomingInstantMessage;
-
- public event IncomingInstantMessage OnUnhandledInstantMessage;
-
- public delegate void ClientClosed(UUID clientID);
-
- public event ClientClosed OnClientClosed;
-
- public delegate void ScriptChangedEvent(uint localID, uint change);
-
- public event ScriptChangedEvent OnScriptChangedEvent;
-
- public delegate void ScriptControlEvent(uint localID, UUID item, UUID avatarID, uint held, uint changed);
-
- public event ScriptControlEvent OnScriptControlEvent;
-
- public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
-
- public event ScriptAtTargetEvent OnScriptAtTargetEvent;
-
- public delegate void ScriptNotAtTargetEvent(uint localID);
-
- public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent;
-
- public delegate void ScriptColliding(uint localID, ColliderArgs colliders);
-
- public event ScriptColliding OnScriptColliderStart;
- public event ScriptColliding OnScriptColliding;
- public event ScriptColliding OnScriptCollidingEnd;
-
- public delegate void OnMakeChildAgentDelegate(ScenePresence presence);
- public event OnMakeChildAgentDelegate OnMakeChildAgent;
-
- public delegate void OnMakeRootAgentDelegate(ScenePresence presence);
- public event OnMakeRootAgentDelegate OnMakeRootAgent;
-
- public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel);
-
- public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete;
-
- public delegate void RequestChangeWaterHeight(float height);
-
- public event RequestChangeWaterHeight OnRequestChangeWaterHeight;
-
- public delegate void AvatarKillData(uint KillerLocalID, ScenePresence avatar);
-
- public event AvatarKillData OnAvatarKilled;
-
- public delegate void ScriptTimerEvent(uint localID, double timerinterval);
-
- public event ScriptTimerEvent OnScriptTimerEvent;
-
- public delegate void EstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool EstateSun, float LindenHour);
- public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID);
-
- public event EstateToolsTimeUpdate OnEstateToolsTimeUpdate;
-
- public delegate void ObjectBeingRemovedFromScene(SceneObjectGroup obj);
- public event ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene;
-
- public delegate void NoticeNoLandDataFromStorage();
- public event NoticeNoLandDataFromStorage OnNoticeNoLandDataFromStorage;
-
- public delegate void IncomingLandDataFromStorage(List data);
- public event IncomingLandDataFromStorage OnIncomingLandDataFromStorage;
-
- public delegate void SetAllowForcefulBan(bool allow);
- public event SetAllowForcefulBan OnSetAllowForcefulBan;
-
- public delegate void RequestParcelPrimCountUpdate();
- public event RequestParcelPrimCountUpdate OnRequestParcelPrimCountUpdate;
-
- public delegate void ParcelPrimCountTainted();
- public event ParcelPrimCountTainted OnParcelPrimCountTainted;
- public event GetScriptRunning OnGetScriptRunning;
-
- ///
- /// RegisterCapsEvent is called by Scene after the Caps object
- /// has been instantiated and before it is return to the
- /// client and provides region modules to add their caps.
- ///
- public delegate void RegisterCapsEvent(UUID agentID, Caps caps);
- public event RegisterCapsEvent OnRegisterCaps;
-
- ///
- /// DeregisterCapsEvent is called by Scene when the caps
- /// handler for an agent are removed.
- ///
- public delegate void DeregisterCapsEvent(UUID agentID, Caps caps);
- public event DeregisterCapsEvent OnDeregisterCaps;
-
- ///
- /// ChatFromWorldEvent is called via Scene when a chat message
- /// from world comes in.
- ///
- public delegate void ChatFromWorldEvent(Object sender, OSChatMessage chat);
- public event ChatFromWorldEvent OnChatFromWorld;
-
- ///
- /// ChatFromClientEvent is triggered via ChatModule (or
- /// substitutes thereof) when a chat message
- /// from the client comes in.
- ///
- public delegate void ChatFromClientEvent(Object sender, OSChatMessage chat);
- public event ChatFromClientEvent OnChatFromClient;
-
- ///
- /// ChatBroadcastEvent is called via Scene when a broadcast chat message
- /// from world comes in
- ///
- public delegate void ChatBroadcastEvent(Object sender, OSChatMessage chat);
- public event ChatBroadcastEvent OnChatBroadcast;
-
- public delegate float SunLindenHour();
- public event SunLindenHour OnGetSunLindenHour;
-
- ///
- /// Called when oar file has finished loading, although
- /// the scripts may not have started yet
- /// Message is non empty string if there were problems loading the oar file
- ///
- public delegate void OarFileLoaded(string message);
- public event OarFileLoaded OnOarFileLoaded;
-
- ///
- /// Called when an oar file has finished saving
- /// Message is non empty string if there were problems saving the oar file
- ///
- public delegate void OarFileSaved(string message);
- public event OarFileSaved OnOarFileSaved;
-
- ///
- /// Called when the script compile queue becomes empty
- /// Returns the number of scripts which failed to start
- ///
- public delegate void EmptyScriptCompileQueue(int numScriptsFailed, string message);
- public event EmptyScriptCompileQueue OnEmptyScriptCompileQueue;
-
- public class MoneyTransferArgs : EventArgs
- {
- public UUID sender;
- public UUID receiver;
-
- // Always false. The SL protocol sucks.
- public bool authenticated = false;
-
- public int amount;
- public int transactiontype;
- public string description;
-
- public MoneyTransferArgs(UUID asender, UUID areceiver, int aamount, int atransactiontype, string adescription)
- {
- sender = asender;
- receiver = areceiver;
- amount = aamount;
- transactiontype = atransactiontype;
- description = adescription;
- }
- }
-
- public class LandBuyArgs : EventArgs
- {
- public UUID agentId = UUID.Zero;
-
- public UUID groupId = UUID.Zero;
-
- public UUID parcelOwnerID = UUID.Zero;
-
- public bool final = false;
- public bool groupOwned = false;
- public bool removeContribution = false;
- public int parcelLocalID = 0;
- public int parcelArea = 0;
- public int parcelPrice = 0;
- public bool authenticated = false;
- public bool landValidated = false;
- public bool economyValidated = false;
- public int transactionID = 0;
- public int amountDebited = 0;
-
- public LandBuyArgs(UUID pagentId, UUID pgroupId, bool pfinal, bool pgroupOwned,
- bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice,
- bool pauthenticated)
- {
- agentId = pagentId;
- groupId = pgroupId;
- final = pfinal;
- groupOwned = pgroupOwned;
- removeContribution = premoveContribution;
- parcelLocalID = pparcelLocalID;
- parcelArea = pparcelArea;
- parcelPrice = pparcelPrice;
- authenticated = pauthenticated;
- }
- }
-
- public delegate void MoneyTransferEvent(Object sender, MoneyTransferArgs e);
-
- public delegate void LandBuy(Object sender, LandBuyArgs e);
-
- public event MoneyTransferEvent OnMoneyTransfer;
- public event LandBuy OnLandBuy;
- public event LandBuy OnValidateLandBuy;
-
- /* Designated Event Deletage Instances */
-
- private ScriptChangedEvent handlerScriptChangedEvent = null; //OnScriptChangedEvent;
- private ScriptAtTargetEvent handlerScriptAtTargetEvent = null;
- private ScriptNotAtTargetEvent handlerScriptNotAtTargetEvent = null;
- private ClientMovement handlerClientMovement = null; //OnClientMovement;
- private OnPermissionErrorDelegate handlerPermissionError = null; //OnPermissionError;
- private OnPluginConsoleDelegate handlerPluginConsole = null; //OnPluginConsole;
- private OnFrameDelegate handlerFrame = null; //OnFrame;
- private OnNewClientDelegate handlerNewClient = null; //OnNewClient;
- private OnClientConnectCoreDelegate handlerClientConnect = null; //OnClientConnect
- private OnNewPresenceDelegate handlerNewPresence = null; //OnNewPresence;
- private OnRemovePresenceDelegate handlerRemovePresence = null; //OnRemovePresence;
- private OnBackupDelegate handlerBackup = null; //OnBackup;
- private OnParcelPrimCountUpdateDelegate handlerParcelPrimCountUpdate = null; //OnParcelPrimCountUpdate;
- private MoneyTransferEvent handlerMoneyTransfer = null; //OnMoneyTransfer;
- private OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = null; //OnParcelPrimCountAdd;
- private OnShutdownDelegate handlerShutdown = null; //OnShutdown;
- private ObjectGrabDelegate handlerObjectGrab = null; //OnObjectGrab;
- private ObjectDeGrabDelegate handlerObjectDeGrab = null; //OnObjectDeGrab;
- private ScriptResetDelegate handlerScriptReset = null; // OnScriptReset
- private NewRezScript handlerRezScript = null; //OnRezScript;
- private RemoveScript handlerRemoveScript = null; //OnRemoveScript;
- private StartScript handlerStartScript = null; //OnStartScript;
- private StopScript handlerStopScript = null; //OnStopScript;
- private SceneGroupMoved handlerSceneGroupMove = null; //OnSceneGroupMove;
- private SceneGroupGrabed handlerSceneGroupGrab = null; //OnSceneGroupGrab;
- private LandObjectAdded handlerLandObjectAdded = null; //OnLandObjectAdded;
- private LandObjectRemoved handlerLandObjectRemoved = null; //OnLandObjectRemoved;
- private AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = null; //OnAvatarEnteringNewParcel;
- private IncomingInstantMessage handlerIncomingInstantMessage = null; //OnIncomingInstantMessage;
- private IncomingInstantMessage handlerUnhandledInstantMessage = null; //OnUnhandledInstantMessage;
- private ClientClosed handlerClientClosed = null; //OnClientClosed;
- private OnMakeChildAgentDelegate handlerMakeChildAgent = null; //OnMakeChildAgent;
- private OnMakeRootAgentDelegate handlerMakeRootAgent = null; //OnMakeRootAgent;
- private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick;
- private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps;
- private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps;
- private ChatFromWorldEvent handlerChatFromWorld = null; // OnChatFromWorld;
- private ChatFromClientEvent handlerChatFromClient = null; // OnChatFromClient;
- private ChatBroadcastEvent handlerChatBroadcast = null; // OnChatBroadcast;
- private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null;
- private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight
- private ScriptControlEvent handlerScriptControlEvent = null;
- private SignificantClientMovement handlerSignificantClientMovement = null;
-
- private LandBuy handlerLandBuy = null;
- private LandBuy handlerValidateLandBuy = null;
- private AvatarKillData handlerAvatarKill = null;
-
- private NoticeNoLandDataFromStorage handlerNoticeNoLandDataFromStorage = null;
- private IncomingLandDataFromStorage handlerIncomingLandDataFromStorage = null;
- private SetAllowForcefulBan handlerSetAllowForcefulBan = null;
- private RequestParcelPrimCountUpdate handlerRequestParcelPrimCountUpdate = null;
- private ParcelPrimCountTainted handlerParcelPrimCountTainted = null;
- private ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = null;
- private ScriptTimerEvent handlerScriptTimerEvent = null;
- private EstateToolsTimeUpdate handlerEstateToolsTimeUpdate = null;
-
- private ScriptColliding handlerCollidingStart = null;
- private ScriptColliding handlerColliding = null;
- private ScriptColliding handlerCollidingEnd = null;
- private GetScriptRunning handlerGetScriptRunning = null;
-
- private SunLindenHour handlerSunGetLindenHour = null;
- private OnSetRootAgentSceneDelegate handlerSetRootAgentScene = null;
-
- private OarFileLoaded handlerOarFileLoaded = null;
- private OarFileSaved handlerOarFileSaved = null;
-
- private EmptyScriptCompileQueue handlerEmptyScriptCompileQueue = null;
-
- public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
- {
- handlerGetScriptRunning = OnGetScriptRunning;
- if (handlerGetScriptRunning != null)
- handlerGetScriptRunning(controllingClient, objectID, itemID);
- }
-
- public void TriggerOnScriptChangedEvent(uint localID, uint change)
- {
- handlerScriptChangedEvent = OnScriptChangedEvent;
- if (handlerScriptChangedEvent != null)
- handlerScriptChangedEvent(localID, change);
- }
-
- public void TriggerOnClientMovement(ScenePresence avatar)
- {
- handlerClientMovement = OnClientMovement;
- if (handlerClientMovement != null)
- handlerClientMovement(avatar);
- }
-
- public void TriggerPermissionError(UUID user, string reason)
- {
- handlerPermissionError = OnPermissionError;
- if (handlerPermissionError != null)
- handlerPermissionError(user, reason);
- }
-
- public void TriggerOnPluginConsole(string[] args)
- {
- handlerPluginConsole = OnPluginConsole;
- if (handlerPluginConsole != null)
- handlerPluginConsole(args);
- }
-
- public void TriggerOnFrame()
- {
- handlerFrame = OnFrame;
- if (handlerFrame != null)
- {
- handlerFrame();
- }
- }
-
- public void TriggerOnNewClient(IClientAPI client)
- {
- handlerNewClient = OnNewClient;
- if (handlerNewClient != null)
- handlerNewClient(client);
-
- if (client is IClientCore)
- {
- handlerClientConnect = OnClientConnect;
- handlerClientConnect((IClientCore) client);
- }
- }
-
- public void TriggerOnNewPresence(ScenePresence presence)
- {
- handlerNewPresence = OnNewPresence;
- if (handlerNewPresence != null)
- handlerNewPresence(presence);
- }
-
- public void TriggerOnRemovePresence(UUID agentId)
- {
- handlerRemovePresence = OnRemovePresence;
- if (handlerRemovePresence != null)
- {
- handlerRemovePresence(agentId);
- }
- }
-
- public void TriggerOnBackup(IRegionDataStore dstore)
- {
- handlerBackup = OnBackup;
- if (handlerBackup != null)
- {
- handlerBackup(dstore, false);
- }
- }
-
- public void TriggerParcelPrimCountUpdate()
- {
- handlerParcelPrimCountUpdate = OnParcelPrimCountUpdate;
- if (handlerParcelPrimCountUpdate != null)
- {
- handlerParcelPrimCountUpdate();
- }
- }
-
- public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs e)
- {
- handlerMoneyTransfer = OnMoneyTransfer;
- if (handlerMoneyTransfer != null)
- {
- handlerMoneyTransfer(sender, e);
- }
- }
-
- public void TriggerTerrainTick()
- {
- handlerTerrainTick = OnTerrainTick;
- if (handlerTerrainTick != null)
- {
- handlerTerrainTick();
- }
- }
-
- public void TriggerParcelPrimCountAdd(SceneObjectGroup obj)
- {
- handlerParcelPrimCountAdd = OnParcelPrimCountAdd;
- if (handlerParcelPrimCountAdd != null)
- {
- handlerParcelPrimCountAdd(obj);
- }
- }
-
- public void TriggerObjectBeingRemovedFromScene(SceneObjectGroup obj)
- {
- handlerObjectBeingRemovedFromScene = OnObjectBeingRemovedFromScene;
- if (handlerObjectBeingRemovedFromScene != null)
- {
- handlerObjectBeingRemovedFromScene(obj);
- }
- }
-
- public void TriggerShutdown()
- {
- handlerShutdown = OnShutdown;
- if (handlerShutdown != null)
- handlerShutdown();
- }
-
- public void TriggerObjectGrab(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs)
- {
- handlerObjectGrab = OnObjectGrab;
- if (handlerObjectGrab != null)
- {
- handlerObjectGrab(localID, originalID, offsetPos, remoteClient, surfaceArgs);
- }
- }
-
- public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient)
- {
- handlerObjectDeGrab = OnObjectDeGrab;
- if (handlerObjectDeGrab != null)
- {
- handlerObjectDeGrab(localID, originalID, remoteClient);
- }
- }
-
- public void TriggerScriptReset(uint localID, UUID itemID)
- {
- handlerScriptReset = OnScriptReset;
- if (handlerScriptReset != null)
- {
- handlerScriptReset(localID, itemID);
- }
- }
-
- public void TriggerRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource)
- {
- handlerRezScript = OnRezScript;
- if (handlerRezScript != null)
- {
- handlerRezScript(localID, itemID, script, startParam,
- postOnRez, engine, stateSource);
- }
- }
-
- public void TriggerStartScript(uint localID, UUID itemID)
- {
- handlerStartScript = OnStartScript;
- if (handlerStartScript != null)
- {
- handlerStartScript(localID, itemID);
- }
- }
-
- public void TriggerStopScript(uint localID, UUID itemID)
- {
- handlerStopScript = OnStopScript;
- if (handlerStopScript != null)
- {
- handlerStopScript(localID, itemID);
- }
- }
-
- public void TriggerRemoveScript(uint localID, UUID itemID)
- {
- handlerRemoveScript = OnRemoveScript;
- if (handlerRemoveScript != null)
- {
- handlerRemoveScript(localID, itemID);
- }
- }
-
- public bool TriggerGroupMove(UUID groupID, Vector3 delta)
- {
- handlerSceneGroupMove = OnSceneGroupMove;
-
- if (handlerSceneGroupMove != null)
- {
- return handlerSceneGroupMove(groupID, delta);
- }
- return true;
- }
-
- public void TriggerGroupGrab(UUID groupID, Vector3 offset, UUID userID)
- {
- handlerSceneGroupGrab = OnSceneGroupGrab;
- if (handlerSceneGroupGrab != null)
- {
- handlerSceneGroupGrab(groupID, offset, userID);
- }
- }
-
- public void TriggerLandObjectAdded(ILandObject newParcel)
- {
- handlerLandObjectAdded = OnLandObjectAdded;
-
- if (handlerLandObjectAdded != null)
- {
- handlerLandObjectAdded(newParcel);
- }
- }
-
- public void TriggerLandObjectRemoved(UUID globalID)
- {
- handlerLandObjectRemoved = OnLandObjectRemoved;
- if (handlerLandObjectRemoved != null)
- {
- handlerLandObjectRemoved(globalID);
- }
- }
-
- public void TriggerLandObjectUpdated(uint localParcelID, ILandObject newParcel)
- {
- //triggerLandObjectRemoved(localParcelID);
-
- TriggerLandObjectAdded(newParcel);
- }
-
- public void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID)
- {
- handlerAvatarEnteringNewParcel = OnAvatarEnteringNewParcel;
-
- if (handlerAvatarEnteringNewParcel != null)
- {
- handlerAvatarEnteringNewParcel(avatar, localLandID, regionID);
- }
- }
-
- public void TriggerIncomingInstantMessage(GridInstantMessage message)
- {
- handlerIncomingInstantMessage = OnIncomingInstantMessage;
- if (handlerIncomingInstantMessage != null)
- {
- handlerIncomingInstantMessage(message);
- }
- }
-
- public void TriggerUnhandledInstantMessage(GridInstantMessage message)
- {
- handlerUnhandledInstantMessage = OnUnhandledInstantMessage;
- if (handlerUnhandledInstantMessage != null)
- {
- handlerUnhandledInstantMessage(message);
- }
- }
-
- public void TriggerClientClosed(UUID ClientID)
- {
- handlerClientClosed = OnClientClosed;
- if (handlerClientClosed != null)
- {
- handlerClientClosed(ClientID);
- }
- }
-
- public void TriggerOnMakeChildAgent(ScenePresence presence)
- {
- handlerMakeChildAgent = OnMakeChildAgent;
- if (handlerMakeChildAgent != null)
- {
- handlerMakeChildAgent(presence);
- }
- }
-
- public void TriggerOnMakeRootAgent(ScenePresence presence)
- {
- handlerMakeRootAgent = OnMakeRootAgent;
- if (handlerMakeRootAgent != null)
- {
- handlerMakeRootAgent(presence);
- }
- }
-
- public void TriggerOnRegisterCaps(UUID agentID, Caps caps)
- {
- handlerRegisterCaps = OnRegisterCaps;
- if (handlerRegisterCaps != null)
- {
- handlerRegisterCaps(agentID, caps);
- }
- }
-
- public void TriggerOnDeregisterCaps(UUID agentID, Caps caps)
- {
- handlerDeregisterCaps = OnDeregisterCaps;
- if (handlerDeregisterCaps != null)
- {
- handlerDeregisterCaps(agentID, caps);
- }
- }
-
- public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, UUID AssetID, String AssetName, int userlevel)
- {
- handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete;
- if (handlerNewInventoryItemUpdateComplete != null)
- {
- handlerNewInventoryItemUpdateComplete(agentID, AssetID, AssetName, userlevel);
- }
- }
-
- public void TriggerLandBuy(Object sender, LandBuyArgs e)
- {
- handlerLandBuy = OnLandBuy;
- if (handlerLandBuy != null)
- {
- handlerLandBuy(sender, e);
- }
- }
-
- public void TriggerValidateLandBuy(Object sender, LandBuyArgs e)
- {
- handlerValidateLandBuy = OnValidateLandBuy;
- if (handlerValidateLandBuy != null)
- {
- handlerValidateLandBuy(sender, e);
- }
- }
-
- public void TriggerAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 currentpos)
- {
- handlerScriptAtTargetEvent = OnScriptAtTargetEvent;
- if (handlerScriptAtTargetEvent != null)
- {
- handlerScriptAtTargetEvent(localID, handle, targetpos, currentpos);
- }
- }
-
- public void TriggerNotAtTargetEvent(uint localID)
- {
- handlerScriptNotAtTargetEvent = OnScriptNotAtTargetEvent;
- if (handlerScriptNotAtTargetEvent != null)
- {
- handlerScriptNotAtTargetEvent(localID);
- }
- }
-
- public void TriggerRequestChangeWaterHeight(float height)
- {
- handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight;
- if (handlerRequestChangeWaterHeight != null)
- {
- handlerRequestChangeWaterHeight(height);
- }
- }
-
- public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar)
- {
- handlerAvatarKill = OnAvatarKilled;
- if (handlerAvatarKill != null)
- {
- handlerAvatarKill(KillerObjectLocalID, DeadAvatar);
- }
- }
-
- public void TriggerSignificantClientMovement(IClientAPI client)
- {
- handlerSignificantClientMovement = OnSignificantClientMovement;
- if (handlerSignificantClientMovement != null)
- {
- handlerSignificantClientMovement(client);
- }
- }
-
- public void TriggerOnChatFromWorld(Object sender, OSChatMessage chat)
- {
- handlerChatFromWorld = OnChatFromWorld;
- if (handlerChatFromWorld != null)
- {
- handlerChatFromWorld(sender, chat);
- }
- }
-
- public void TriggerOnChatFromClient(Object sender, OSChatMessage chat)
- {
- handlerChatFromClient = OnChatFromClient;
- if (handlerChatFromClient != null)
- {
- handlerChatFromClient(sender, chat);
- }
- }
-
- public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat)
- {
- handlerChatBroadcast = OnChatBroadcast;
- if (handlerChatBroadcast != null)
- {
- handlerChatBroadcast(sender, chat);
- }
- }
-
- internal void TriggerControlEvent(uint p, UUID scriptUUID, UUID avatarID, uint held, uint _changed)
- {
- handlerScriptControlEvent = OnScriptControlEvent;
- if (handlerScriptControlEvent != null)
- {
- handlerScriptControlEvent(p, scriptUUID, avatarID, held, _changed);
- }
- }
-
- public void TriggerNoticeNoLandDataFromStorage()
- {
- handlerNoticeNoLandDataFromStorage = OnNoticeNoLandDataFromStorage;
- if (handlerNoticeNoLandDataFromStorage != null)
- {
- handlerNoticeNoLandDataFromStorage();
-
- }
- }
-
- public void TriggerIncomingLandDataFromStorage(List landData)
- {
- handlerIncomingLandDataFromStorage = OnIncomingLandDataFromStorage;
- if (handlerIncomingLandDataFromStorage != null)
- {
- handlerIncomingLandDataFromStorage(landData);
-
- }
- }
-
- public void TriggerSetAllowForcefulBan(bool allow)
- {
- handlerSetAllowForcefulBan = OnSetAllowForcefulBan;
- if (handlerSetAllowForcefulBan != null)
- {
- handlerSetAllowForcefulBan(allow);
-
- }
- }
-
- public void TriggerRequestParcelPrimCountUpdate()
- {
- handlerRequestParcelPrimCountUpdate = OnRequestParcelPrimCountUpdate;
- if (handlerRequestParcelPrimCountUpdate != null)
- {
- handlerRequestParcelPrimCountUpdate();
- }
- }
-
- public void TriggerParcelPrimCountTainted()
- {
- handlerParcelPrimCountTainted = OnParcelPrimCountTainted;
- if (handlerParcelPrimCountTainted != null)
- {
- handlerParcelPrimCountTainted();
- }
- }
-
- // this lets us keep track of nasty script events like timer, etc.
- public void TriggerTimerEvent(uint objLocalID, double Interval)
- {
- handlerScriptTimerEvent = OnScriptTimerEvent;
- if (handlerScriptTimerEvent != null)
- {
- handlerScriptTimerEvent(objLocalID, Interval);
- }
- }
-
- public void TriggerEstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool useEstateTime, float LindenHour)
- {
- handlerEstateToolsTimeUpdate = OnEstateToolsTimeUpdate;
- if (handlerEstateToolsTimeUpdate != null)
- {
- handlerEstateToolsTimeUpdate(regionHandle, FixedTime, useEstateTime, LindenHour);
- }
- }
-
- public float GetSunLindenHour()
- {
- handlerSunGetLindenHour = OnGetSunLindenHour;
- if (handlerSunGetLindenHour != null)
- {
- return handlerSunGetLindenHour();
- }
- return 6;
- }
-
- public void TriggerOarFileLoaded(string message)
- {
- handlerOarFileLoaded = OnOarFileLoaded;
- if (handlerOarFileLoaded != null)
- handlerOarFileLoaded(message);
- }
-
- public void TriggerOarFileSaved(string message)
- {
- handlerOarFileSaved = OnOarFileSaved;
- if (handlerOarFileSaved != null)
- handlerOarFileSaved(message);
- }
-
- public void TriggerEmptyScriptCompileQueue(int numScriptsFailed, string message)
- {
- handlerEmptyScriptCompileQueue = OnEmptyScriptCompileQueue;
- if (handlerEmptyScriptCompileQueue != null)
- handlerEmptyScriptCompileQueue(numScriptsFailed, message);
- }
-
- public void TriggerScriptCollidingStart(uint localId, ColliderArgs colliders)
- {
- handlerCollidingStart = OnScriptColliderStart;
- if (handlerCollidingStart != null)
- handlerCollidingStart(localId, colliders);
- }
-
- public void TriggerScriptColliding(uint localId, ColliderArgs colliders)
- {
- handlerColliding = OnScriptColliding;
- if (handlerColliding != null)
- handlerColliding(localId, colliders);
- }
-
- public void TriggerScriptCollidingEnd(uint localId, ColliderArgs colliders)
- {
- handlerCollidingEnd = OnScriptCollidingEnd;
- if (handlerCollidingEnd != null)
- handlerCollidingEnd(localId, colliders);
- }
-
- public void TriggerSetRootAgentScene(UUID agentID, Scene scene)
- {
- handlerSetRootAgentScene = OnSetRootAgentScene;
- if (handlerSetRootAgentScene != null)
- handlerSetRootAgentScene(agentID, scene);
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs
deleted file mode 100644
index 73a5a3a..0000000
--- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs
+++ /dev/null
@@ -1,376 +0,0 @@
-/**
- * Copyright (c) 2008, Contributors. All rights reserved.
- * 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 Organizations nor the names of Individual
- * Contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR 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.Collections;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Threading;
-
-using log4net;
-using Nini.Config;
-using OpenMetaverse;
-
-using OpenSim.Framework;
-using OpenSim.Framework.Communications;
-using OpenSim.Framework.Communications.Cache;
-using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment;
-using OpenSim.Region.Environment.Scenes;
-
-//using HyperGrid.Framework;
-//using OpenSim.Region.Communications.Hypergrid;
-
-namespace OpenSim.Region.Environment.Scenes.Hypergrid
-{
- public class HGAssetMapper
- {
- #region Fields
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- // This maps between asset server URLs and asset server clients
- private Dictionary m_assetServers = new Dictionary();
-
- // This maps between asset UUIDs and asset servers
- private Dictionary m_assetMap = new Dictionary();
-
- private Scene m_scene;
- #endregion
-
- #region Constructor
-
- public HGAssetMapper(Scene scene)
- {
- m_scene = scene;
- }
-
- #endregion
-
- #region Internal functions
-
- private string UserAssetURL(UUID userID)
- {
- CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID);
- if (uinfo != null)
- return (uinfo.UserProfile.UserAssetURI == "") ? null : uinfo.UserProfile.UserAssetURI;
- return null;
- }
-
- private bool IsLocalUser(UUID userID)
- {
- CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID);
-
- if (uinfo != null)
- {
- if (HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile))
- {
- m_log.Debug("[HGScene]: Home user " + uinfo.UserProfile.FirstName + " " + uinfo.UserProfile.SurName);
- return true;
- }
- }
-
- m_log.Debug("[HGScene]: Foreign user " + uinfo.UserProfile.FirstName + " " + uinfo.UserProfile.SurName);
- return false;
- }
-
- private bool IsInAssetMap(UUID uuid)
- {
- return m_assetMap.ContainsKey(uuid);
- }
-
- private bool FetchAsset(GridAssetClient asscli, UUID assetID, bool isTexture)
- {
- // I'm not going over 3 seconds since this will be blocking processing of all the other inbound
- // packets from the client.
- int pollPeriod = 200;
- int maxPolls = 15;
-
- AssetBase asset;
-
- // Maybe it came late, and it's already here. Check first.
- if (m_scene.CommsManager.AssetCache.TryGetCachedAsset(assetID, out asset))
- {
- m_log.Debug("[HGScene]: Asset already in asset cache. " + assetID);
- return true;
- }
-
-
- asscli.RequestAsset(assetID, isTexture);
-
- do
- {
- Thread.Sleep(pollPeriod);
-
- if (m_scene.CommsManager.AssetCache.TryGetCachedAsset(assetID, out asset) && (asset != null))
- {
- m_log.Debug("[HGScene]: Asset made it to asset cache. " + asset.Metadata.Name + " " + assetID);
- // I think I need to store it in the asset DB too.
- // For now, let me just do it for textures and scripts
- if (((AssetType)asset.Metadata.Type == AssetType.Texture) ||
- ((AssetType)asset.Metadata.Type == AssetType.LSLBytecode) ||
- ((AssetType)asset.Metadata.Type == AssetType.LSLText))
- {
- AssetBase asset1 = new AssetBase();
- Copy(asset, asset1);
- m_scene.AssetCache.AssetServer.StoreAsset(asset1);
- }
- return true;
- }
- } while (--maxPolls > 0);
-
- m_log.WarnFormat("[HGScene]: {0} {1} was not received before the retrieval timeout was reached",
- isTexture ? "texture" : "asset", assetID.ToString());
-
- return false;
- }
-
- private bool PostAsset(GridAssetClient asscli, UUID assetID)
- {
- AssetBase asset1;
- m_scene.CommsManager.AssetCache.TryGetCachedAsset(assetID, out asset1);
-
- if (asset1 != null)
- {
- // See long comment in AssetCache.AddAsset
- if (!asset1.Metadata.Temporary || asset1.Metadata.Local)
- {
- // The asset cache returns instances of subclasses of AssetBase:
- // TextureImage or AssetInfo. So in passing them to the remote
- // server we first need to convert this to instances of AssetBase,
- // which is the serializable class for assets.
- AssetBase asset = new AssetBase();
- Copy(asset1, asset);
-
- asscli.StoreAsset(asset);
- }
- return true;
- }
- else
- m_log.Warn("[HGScene]: Tried to post asset to remote server, but asset not in local cache.");
-
- return false;
- }
-
- private void Copy(AssetBase from, AssetBase to)
- {
- to.Data = from.Data;
- to.Metadata.Description = from.Metadata.Description;
- to.Metadata.FullID = from.Metadata.FullID;
- to.Metadata.ID = from.Metadata.ID;
- to.Metadata.Local = from.Metadata.Local;
- to.Metadata.Name = from.Metadata.Name;
- to.Metadata.Temporary = from.Metadata.Temporary;
- to.Metadata.Type = from.Metadata.Type;
-
- }
-
- private void _guardedAdd(Dictionary lst, UUID obj, bool val)
- {
- if (!lst.ContainsKey(obj))
- lst.Add(obj, val);
- }
-
- private void SniffTextureUUIDs(Dictionary uuids, SceneObjectGroup sog)
- {
- try
- {
- _guardedAdd(uuids, sog.RootPart.Shape.Textures.DefaultTexture.TextureID, true);
- }
- catch (Exception) { }
-
- foreach (Primitive.TextureEntryFace tface in sog.RootPart.Shape.Textures.FaceTextures)
- {
- try
- {
- _guardedAdd(uuids, tface.TextureID, true);
- }
- catch (Exception) { }
- }
-
- foreach (SceneObjectPart sop in sog.Children.Values)
- {
- try
- {
- _guardedAdd(uuids, sop.Shape.Textures.DefaultTexture.TextureID, true);
- }
- catch (Exception) { }
- foreach (Primitive.TextureEntryFace tface in sop.Shape.Textures.FaceTextures)
- {
- try
- {
- _guardedAdd(uuids, tface.TextureID, true);
- }
- catch (Exception) { }
- }
- }
- }
-
- private void SniffTaskInventoryUUIDs(Dictionary uuids, SceneObjectGroup sog)
- {
- TaskInventoryDictionary tinv = sog.RootPart.TaskInventory;
-
- foreach (TaskInventoryItem titem in tinv.Values)
- {
- uuids.Add(titem.AssetID, (InventoryType)titem.Type == InventoryType.Texture);
- }
- }
-
- private Dictionary SniffUUIDs(AssetBase asset)
- {
- Dictionary uuids = new Dictionary();
- if ((asset != null) && ((AssetType)asset.Metadata.Type == AssetType.Object))
- {
- string ass_str = Utils.BytesToString(asset.Data);
- SceneObjectGroup sog = new SceneObjectGroup(ass_str, true);
-
- SniffTextureUUIDs(uuids, sog);
-
- // We need to sniff further...
- SniffTaskInventoryUUIDs(uuids, sog);
-
- }
-
- return uuids;
- }
-
- private Dictionary SniffUUIDs(UUID assetID)
- {
- //Dictionary uuids = new Dictionary();
-
- AssetBase asset;
- m_scene.CommsManager.AssetCache.TryGetCachedAsset(assetID, out asset);
-
- return SniffUUIDs(asset);
- }
-
- private void Dump(Dictionary lst)
- {
- m_log.Debug("XXX -------- UUID DUMP ------- XXX");
- foreach (KeyValuePair kvp in lst)
- m_log.Debug(" >> " + kvp.Key + " (texture? " + kvp.Value + ")");
- m_log.Debug("XXX -------- UUID DUMP ------- XXX");
- }
-
- #endregion
-
-
- #region Public interface
-
- public void Get(UUID itemID, UUID ownerID)
- {
- if (!IsInAssetMap(itemID) && !IsLocalUser(ownerID))
- {
- // Get the item from the remote asset server onto the local AssetCache
- // and place an entry in m_assetMap
-
- GridAssetClient asscli = null;
- string userAssetURL = UserAssetURL(ownerID);
- if (userAssetURL != null)
- {
- m_assetServers.TryGetValue(userAssetURL, out asscli);
- if (asscli == null)
- {
- m_log.Debug("[HGScene]: Starting new GridAssetClient for " + userAssetURL);
- asscli = new GridAssetClient(userAssetURL);
- asscli.SetReceiver(m_scene.CommsManager.AssetCache); // Straight to the asset cache!
- m_assetServers.Add(userAssetURL, asscli);
- }
-
- m_log.Debug("[HGScene]: Fetching object " + itemID + " to asset server " + userAssetURL);
- bool success = FetchAsset(asscli, itemID, false); // asscli.RequestAsset(item.ItemID, false);
-
- // OK, now fetch the inside.
- Dictionary ids = SniffUUIDs(itemID);
- Dump(ids);
- foreach (KeyValuePair kvp in ids)
- FetchAsset(asscli, kvp.Key, kvp.Value);
-
-
- if (success)
- {
- m_log.Debug("[HGScene]: Successfully fetched item from remote asset server " + userAssetURL);
- m_assetMap.Add(itemID, asscli);
- }
- else
- m_log.Warn("[HGScene]: Could not fetch asset from remote asset server " + userAssetURL);
- }
- else
- m_log.Warn("[HGScene]: Unable to locate foreign user's asset server");
- }
- }
-
- public void Post(UUID itemID, UUID ownerID)
- {
- if (!IsLocalUser(ownerID))
- {
- // Post the item from the local AssetCache ontp the remote asset server
- // and place an entry in m_assetMap
-
- GridAssetClient asscli = null;
- string userAssetURL = UserAssetURL(ownerID);
- if (userAssetURL != null)
- {
- m_assetServers.TryGetValue(userAssetURL, out asscli);
- if (asscli == null)
- {
- m_log.Debug("[HGScene]: Starting new GridAssetClient for " + userAssetURL);
- asscli = new GridAssetClient(userAssetURL);
- asscli.SetReceiver(m_scene.CommsManager.AssetCache); // Straight to the asset cache!
- m_assetServers.Add(userAssetURL, asscli);
- }
- m_log.Debug("[HGScene]: Posting object " + itemID + " to asset server " + userAssetURL);
- bool success = PostAsset(asscli, itemID);
-
- // Now the inside
- Dictionary ids = SniffUUIDs(itemID);
- Dump(ids);
- foreach (KeyValuePair kvp in ids)
- PostAsset(asscli, kvp.Key);
-
- if (success)
- {
- m_log.Debug("[HGScene]: Successfully posted item to remote asset server " + userAssetURL);
- if (!m_assetMap.ContainsKey(itemID))
- m_assetMap.Add(itemID, asscli);
- }
- else
- m_log.Warn("[HGScene]: Could not post asset to remote asset server " + userAssetURL);
-
- //if (!m_assetMap.ContainsKey(itemID))
- // m_assetMap.Add(itemID, asscli);
- }
- else
- m_log.Warn("[HGScene]: Unable to locate foreign user's asset server");
-
- }
- }
-
- #endregion
-
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.Inventory.cs
deleted file mode 100644
index bdb90d8..0000000
--- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.Inventory.cs
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * Copyright (c) 2008, Contributors. All rights reserved.
- * 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 Organizations nor the names of Individual
- * Contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR 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.Collections;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Threading;
-
-using log4net;
-using Nini.Config;
-using OpenMetaverse;
-
-using OpenSim.Framework;
-using OpenSim.Framework.Communications;
-using OpenSim.Framework.Communications.Cache;
-using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment;
-using OpenSim.Region.Environment.Scenes;
-
-namespace OpenSim.Region.Environment.Scenes.Hypergrid
-{
- public partial class HGScene : Scene
- {
- #region Fields
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- private HGAssetMapper m_assMapper;
-
- #endregion
-
- #region Constructors
-
- public HGScene(RegionInfo regInfo, AgentCircuitManager authen,
- CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
- AssetCache assetCach, StorageManager storeManager,
- ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
- bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
- : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader,
- dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
- {
- m_log.Info("[HGScene]: Starting HGScene.");
- m_assMapper = new HGAssetMapper(this);
-
- EventManager.OnNewInventoryItemUploadComplete += UploadInventoryItem;
- }
-
- #endregion
-
- #region Event handlers
-
- public void UploadInventoryItem(UUID avatarID, UUID assetID, string name, int userlevel)
- {
- CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(avatarID);
- if (userInfo != null)
- {
- m_assMapper.Post(assetID, avatarID);
- }
- }
-
- #endregion
-
- #region Overrides of Scene.Inventory methods
-
- ///
- /// CapsUpdateInventoryItemAsset
- ///
- public override UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data)
- {
- UUID newAssetID = base.CapsUpdateInventoryItemAsset(remoteClient, itemID, data);
-
- UploadInventoryItem(remoteClient.AgentId, newAssetID, "", 0);
-
- return newAssetID;
- }
-
- ///
- /// DeleteToInventory
- ///
- public override UUID DeleteToInventory(DeRezAction action, UUID folderID, SceneObjectGroup objectGroup, IClientAPI remoteClient)
- {
- UUID assetID = base.DeleteToInventory(action, folderID, objectGroup, remoteClient);
-
- if (!assetID.Equals(UUID.Zero))
- {
- UploadInventoryItem(remoteClient.AgentId, assetID, "", 0);
- }
- else
- m_log.Debug("[HGScene]: Scene.Inventory did not create asset");
-
- return assetID;
- }
-
- ///
- /// RezObject
- ///
- public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
- UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
- bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
- {
- CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
- if (userInfo != null)
- {
- if (userInfo.RootFolder != null)
- {
- InventoryItemBase item = userInfo.RootFolder.FindItem(itemID);
-
- if (item != null)
- {
- m_assMapper.Get(item.AssetID, remoteClient.AgentId);
-
- }
- }
- }
-
- // OK, we're done fetching. Pass it up to the default RezObject
- return base.RezObject(remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
- RezSelected, RemoveItem, fromTaskID, attachment);
-
- }
-
-
- #endregion
-
- }
-
-}
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.cs
deleted file mode 100644
index ca644a6..0000000
--- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGScene.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Copyright (c) 2008, Contributors. All rights reserved.
- * 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 Organizations nor the names of Individual
- * Contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR 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.Collections.Generic;
-
-using OpenMetaverse;
-
-using OpenSim.Framework;
-
-using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Environment;
-using OpenSim.Region.Environment.Scenes;
-using TPFlags = OpenSim.Framework.Constants.TeleportFlags;
-
-namespace OpenSim.Region.Environment.Scenes.Hypergrid
-{
- public partial class HGScene : Scene
- {
- ///
- /// Teleport an avatar to their home region
- ///
- ///
- ///
- public override void TeleportClientHome(UUID agentId, IClientAPI client)
- {
- m_log.Debug("[HGScene]: TeleportClientHome " + client.FirstName + " " + client.LastName);
-
- CachedUserInfo uinfo = CommsManager.UserProfileCacheService.GetUserDetails(agentId);
- if (uinfo != null)
- {
- UserProfileData UserProfile = uinfo.UserProfile;
-
- if (UserProfile != null)
- {
- RegionInfo regionInfo = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion);
- //if (regionInfo != null)
- //{
- // UserProfile.HomeRegionID = regionInfo.RegionID;
- // //CommsManager.UserService.UpdateUserProfile(UserProfile);
- //}
- if (regionInfo == null)
- {
- // can't find the Home region: Tell viewer and abort
- client.SendTeleportFailed("Your home-region could not be found.");
- return;
- }
- RequestTeleportLocation(
- client, regionInfo.RegionHandle, UserProfile.HomeLocation, UserProfile.HomeLookAt,
- (uint)(TPFlags.SetLastToTarget | TPFlags.ViaHome));
- }
- }
- else
- client.SendTeleportFailed("Sorry! I lost your home-region information.");
-
- }
-
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs
deleted file mode 100644
index 5e3e03f..0000000
--- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs
+++ /dev/null
@@ -1,363 +0,0 @@
-/**
- * Copyright (c) 2008, Contributors. All rights reserved.
- * 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 Organizations nor the names of Individual
- * Contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR 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.Collections.Generic;
-using System.Net;
-using System.Reflection;
-using System.Threading;
-using log4net;
-using OpenMetaverse;
-using OSD = OpenMetaverse.StructuredData.OSD;
-using OpenSim.Framework;
-using OpenSim.Framework.Communications;
-using OpenSim.Framework.Communications.Cache;
-using OpenSim.Framework.Communications.Capabilities;
-using OpenSim.Region.Environment.Scenes;
-using OpenSim.Region.Environment;
-using OpenSim.Region.Interfaces;
-
-namespace OpenSim.Region.Environment.Scenes.Hypergrid
-{
- public class HGSceneCommunicationService : SceneCommunicationService
- {
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- public readonly IHyperlink m_hg;
-
- public HGSceneCommunicationService(CommunicationsManager commsMan, IHyperlink hg) : base(commsMan)
- {
- m_hg = hg;
- }
-
-
- ///
- /// Try to teleport an agent to a new region.
- ///
- ///
- ///
- ///
- ///
- ///
- public override void RequestTeleportToLocation(ScenePresence avatar, ulong regionHandle, Vector3 position,
- Vector3 lookAt, uint teleportFlags)
- {
- if (!avatar.Scene.Permissions.CanTeleport(avatar.UUID))
- return;
-
- bool destRegionUp = true;
-
- IEventQueue eq = avatar.Scene.RequestModuleInterface();
-
- if (regionHandle == m_regionInfo.RegionHandle)
- {
- // Teleport within the same region
- if (position.X < 0 || position.X > Constants.RegionSize || position.Y < 0 || position.Y > Constants.RegionSize || position.Z < 0)
- {
- Vector3 emergencyPos = new Vector3(128, 128, 128);
-
- m_log.WarnFormat(
- "[HGSceneCommService]: RequestTeleportToLocation() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}",
- position, avatar.Name, avatar.UUID, emergencyPos);
- position = emergencyPos;
- }
- // TODO: Get proper AVG Height
- float localAVHeight = 1.56f;
- float posZLimit = (float)avatar.Scene.GetLandHeight((int)position.X, (int)position.Y);
- float newPosZ = posZLimit + localAVHeight;
- if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ)))
- {
- position.Z = newPosZ;
- }
-
- // Only send this if the event queue is null
- if (eq == null)
- avatar.ControllingClient.SendTeleportLocationStart();
-
-
- avatar.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags);
- avatar.Teleport(position);
- }
- else
- {
- RegionInfo reg = RequestNeighbouringRegionInfo(regionHandle);
- if (reg != null)
- {
-
- uint newRegionX = (uint)(reg.RegionHandle >> 40);
- uint newRegionY = (((uint)(reg.RegionHandle)) >> 8);
- uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40);
- uint oldRegionY = (((uint)(m_regionInfo.RegionHandle)) >> 8);
-
- ///
- /// Hypergrid mod start
- ///
- ///
- bool isHyperLink = m_hg.IsHyperlinkRegion(reg.RegionHandle);
- bool isHomeUser = true;
- ulong realHandle = regionHandle;
- CachedUserInfo uinfo = m_commsProvider.UserProfileCacheService.GetUserDetails(avatar.UUID);
- if (uinfo != null)
- {
- isHomeUser = HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile);
- realHandle = m_hg.FindRegionHandle(regionHandle);
- Console.WriteLine("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString());
- }
- ///
- /// Hypergrid mod stop
- ///
- ///
-
- if (eq == null)
- avatar.ControllingClient.SendTeleportLocationStart();
-
-
- // Let's do DNS resolution only once in this process, please!
- // This may be a costly operation. The reg.ExternalEndPoint field is not a passive field,
- // it's actually doing a lot of work.
- IPEndPoint endPoint = reg.ExternalEndPoint;
- if (endPoint.Address == null)
- {
- // Couldn't resolve the name. Can't TP, because the viewer wants IP addresses.
- destRegionUp = false;
- }
-
- if (destRegionUp)
- {
- // Fixing a bug where teleporting while sitting results in the avatar ending up removed from
- // both regions
- if (avatar.ParentID != (uint)0)
- avatar.StandUp();
-
- if (!avatar.ValidateAttachments())
- {
- avatar.ControllingClient.SendTeleportFailed("Inconsistent attachment state");
- return;
- }
-
- // the avatar.Close below will clear the child region list. We need this below for (possibly)
- // closing the child agents, so save it here (we need a copy as it is Clear()-ed).
- //List childRegions = new List(avatar.GetKnownRegionList());
- // Compared to ScenePresence.CrossToNewRegion(), there's no obvious code to handle a teleport
- // failure at this point (unlike a border crossing failure). So perhaps this can never fail
- // once we reach here...
- //avatar.Scene.RemoveCapsHandler(avatar.UUID);
-
- string capsPath = String.Empty;
- AgentCircuitData agentCircuit = avatar.ControllingClient.RequestClientInfo();
- agentCircuit.BaseFolder = UUID.Zero;
- agentCircuit.InventoryFolder = UUID.Zero;
- agentCircuit.startpos = position;
- agentCircuit.child = true;
- if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY))
- {
- // brand new agent, let's create a new caps seed
- agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
- }
-
- //if (!m_commsProvider.InterRegion.InformRegionOfChildAgent(reg.RegionHandle, agentCircuit))
- if (!m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, agentCircuit))
- {
- avatar.ControllingClient.SendTeleportFailed("Destination is not accepting teleports.");
- return;
- }
-
- // Let's close some agents
- if (isHyperLink) // close them all except this one
- {
- List regions = new List(avatar.KnownChildRegionHandles);
- regions.Remove(avatar.Scene.RegionInfo.RegionHandle);
- SendCloseChildAgentConnections(avatar.UUID, regions);
- }
- else // close just a few
- avatar.CloseChildAgents(newRegionX, newRegionY);
-
- if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY) || isHyperLink)
- {
- capsPath
- = "http://"
- + reg.ExternalHostName
- + ":"
- + reg.HttpPort
- + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
-
- if (eq != null)
- {
- OSD Item = EventQueueHelper.EnableSimulator(realHandle, endPoint);
- eq.Enqueue(Item, avatar.UUID);
-
- // ES makes the client send a UseCircuitCode message to the destination,
- // which triggers a bunch of things there.
- // So let's wait
- Thread.Sleep(2000);
-
- Item = EventQueueHelper.EstablishAgentCommunication(avatar.UUID, endPoint.ToString(), capsPath);
- eq.Enqueue(Item, avatar.UUID);
- }
- else
- {
- avatar.ControllingClient.InformClientOfNeighbour(realHandle, endPoint);
- // TODO: make Event Queue disablable!
- }
- }
- else
- {
- // child agent already there
- agentCircuit.CapsPath = avatar.Scene.CapsModule.GetChildSeed(avatar.UUID, reg.RegionHandle);
- capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort
- + "/CAPS/" + agentCircuit.CapsPath + "0000/";
- }
-
- //m_commsProvider.InterRegion.ExpectAvatarCrossing(reg.RegionHandle, avatar.ControllingClient.AgentId,
- // position, false);
-
- //if (!m_commsProvider.InterRegion.ExpectAvatarCrossing(reg.RegionHandle, avatar.ControllingClient.AgentId,
- // position, false))
- //{
- // avatar.ControllingClient.SendTeleportFailed("Problem with destination.");
- // // We should close that agent we just created over at destination...
- // List lst = new List();
- // lst.Add(realHandle);
- // SendCloseChildAgentAsync(avatar.UUID, lst);
- // return;
- //}
-
- SetInTransit(avatar.UUID);
- // Let's send a full update of the agent. This is a synchronous call.
- AgentData agent = new AgentData();
- avatar.CopyTo(agent);
- agent.Position = position;
- agent.CallbackURI = "http://" + m_regionInfo.ExternalHostName + ":" + m_regionInfo.HttpPort +
- "/agent/" + avatar.UUID.ToString() + "/" + avatar.Scene.RegionInfo.RegionHandle.ToString() + "/release/";
-
- m_interregionCommsOut.SendChildAgentUpdate(reg.RegionHandle, agent);
-
- m_log.DebugFormat(
- "[CAPS]: Sending new CAPS seed url {0} to client {1}", agentCircuit.CapsPath, avatar.UUID);
-
-
- ///
- /// Hypergrid mod: realHandle instead of reg.RegionHandle
- ///
- ///
- if (eq != null)
- {
- OSD Item = EventQueueHelper.TeleportFinishEvent(realHandle, 13, endPoint,
- 4, teleportFlags, capsPath, avatar.UUID);
- eq.Enqueue(Item, avatar.UUID);
- }
- else
- {
- avatar.ControllingClient.SendRegionTeleport(realHandle, 13, endPoint, 4,
- teleportFlags, capsPath);
- }
- ///
- /// Hypergrid mod stop
- ///
-
-
- // TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which
- // trigers a whole shebang of things there, including MakeRoot. So let's wait for confirmation
- // that the client contacted the destination before we send the attachments and close things here.
- if (!WaitForCallback(avatar.UUID))
- {
- // Client never contacted destination. Let's restore everything back
- avatar.ControllingClient.SendTeleportFailed("Problems connecting to destination.");
-
- ResetFromTransit(avatar.UUID);
- // Yikes! We should just have a ref to scene here.
- avatar.Scene.InformClientOfNeighbours(avatar);
-
- // Finally, kill the agent we just created at the destination.
- m_interregionCommsOut.SendCloseAgent(reg.RegionHandle, avatar.UUID);
-
- return;
- }
-
- // Can't go back from here
- if (KiPrimitive != null)
- {
- KiPrimitive(avatar.LocalId);
- }
-
- avatar.MakeChildAgent();
-
- // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it
- avatar.CrossAttachmentsIntoNewRegion(reg.RegionHandle, true);
-
-
- // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
- ///
- /// Hypergrid mod: extra check for isHyperLink
- ///
- if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY) || isHyperLink)
- {
- Thread.Sleep(5000);
- avatar.Close();
- CloseConnection(avatar.UUID);
- }
- // if (teleport success) // seems to be always success here
- // the user may change their profile information in other region,
- // so the userinfo in UserProfileCache is not reliable any more, delete it
- if (avatar.Scene.NeedSceneCacheClear(avatar.UUID) || isHyperLink)
- {
- m_commsProvider.UserProfileCacheService.RemoveUser(avatar.UUID);
- m_log.DebugFormat(
- "[HGSceneCommService]: User {0} is going to another region, profile cache removed",
- avatar.UUID);
- }
- }
- else
- {
- avatar.ControllingClient.SendTeleportFailed("Remote Region appears to be down");
- }
- }
- else
- {
- // TP to a place that doesn't exist (anymore)
- // Inform the viewer about that
- avatar.ControllingClient.SendTeleportFailed("The region you tried to teleport to doesn't exist anymore");
-
- // and set the map-tile to '(Offline)'
- uint regX, regY;
- Utils.LongToUInts(regionHandle, out regX, out regY);
-
- MapBlockData block = new MapBlockData();
- block.X = (ushort)(regX / Constants.RegionSize);
- block.Y = (ushort)(regY / Constants.RegionSize);
- block.Access = 254; // == not there
-
- List blocks = new List();
- blocks.Add(block);
- avatar.ControllingClient.SendMapBlock(blocks, 0);
- }
- }
- }
-
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
deleted file mode 100644
index 9a4c72f..0000000
--- a/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
+++ /dev/null
@@ -1,37 +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 OpenMetaverse;
-using OpenSim.Framework;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- public interface IScenePresenceBody
- {
- void processMovement(IClientAPI remoteClient, uint flags, Quaternion bodyRotation);
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/ReturnInfo.cs b/OpenSim/Region/Environment/Scenes/ReturnInfo.cs
deleted file mode 100644
index 898baab..0000000
--- a/OpenSim/Region/Environment/Scenes/ReturnInfo.cs
+++ /dev/null
@@ -1,39 +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 OpenMetaverse;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- public struct ReturnInfo
- {
- public int count;
- public Vector3 location;
- public string objectName;
- public string reason;
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
deleted file mode 100644
index bc80d56..0000000
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ /dev/null
@@ -1,2665 +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.Collections.Generic;
-using System.Reflection;
-using System.Text;
-using System.Timers;
-using OpenMetaverse;
-using log4net;
-using OpenSim.Framework;
-using OpenSim.Framework.Communications.Cache;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Interfaces;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- public partial class Scene
- {
- private static readonly ILog m_log
- = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
- ///
- /// Allows asynchronous derezzing of objects from the scene into a client's inventory.
- ///
- protected AsyncSceneObjectGroupDeleter m_asyncSceneObjectDeleter;
-
- ///
- /// Start all the scripts in the scene which should be started.
- ///
- public void CreateScriptInstances()
- {
- m_log.Info("[PRIM INVENTORY]: Starting scripts in scene");
-
- foreach (EntityBase group in Entities)
- {
- if (group is SceneObjectGroup)
- {
- ((SceneObjectGroup) group).CreateScriptInstances(0, false, DefaultScriptEngine, 0);
- }
- }
- }
-
- public void AddUploadedInventoryItem(UUID agentID, InventoryItemBase item)
- {
- IMoneyModule money=RequestModuleInterface();
- if (money != null)
- {
- money.ApplyUploadCharge(agentID);
- }
-
- AddInventoryItem(agentID, item);
- }
-
- public bool AddInventoryItemReturned(UUID AgentId, InventoryItemBase item)
- {
- CachedUserInfo userInfo
- = CommsManager.UserProfileCacheService.GetUserDetails(AgentId);
- if (userInfo != null)
- {
- userInfo.AddItem(item);
- return true;
- }
- else
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Agent was not found for add of item {1} {2}", item.Name, item.ID);
-
- return false;
- }
- }
-
- public void AddInventoryItem(UUID AgentID, InventoryItemBase item)
- {
- CachedUserInfo userInfo
- = CommsManager.UserProfileCacheService.GetUserDetails(AgentID);
-
- if (userInfo != null)
- {
- userInfo.AddItem(item);
-
- int userlevel = 0;
- if (Permissions.IsGod(AgentID))
- {
- userlevel = 1;
- }
- // TODO: remove this cruft once MasterAvatar is fully deprecated
- //
- if (m_regInfo.MasterAvatarAssignedUUID == AgentID)
- {
- userlevel = 2;
- }
- EventManager.TriggerOnNewInventoryItemUploadComplete(AgentID, item.AssetID, item.Name, userlevel);
- }
- else
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Agent {1} was not found for add of item {2} {3}",
- AgentID, item.Name, item.ID);
-
- return;
- }
- }
-
- ///
- /// Add an inventory item to an avatar's inventory.
- ///
- /// The remote client controlling the avatar
- /// The item. This structure contains all the item metadata, including the folder
- /// in which the item is to be placed.
- public void AddInventoryItem(IClientAPI remoteClient, InventoryItemBase item)
- {
- CachedUserInfo userInfo
- = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (userInfo != null)
- {
- AddInventoryItem(remoteClient.AgentId, item);
- remoteClient.SendInventoryItemCreateUpdate(item);
- }
- else
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not resolve user {0} for adding an inventory item",
- remoteClient.AgentId);
- }
- }
-
- ///
- /// Capability originating call to update the asset of an item in an agent's inventory
- ///
- ///
- ///
- ///
- ///
- public virtual UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data)
- {
- CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
- if (userInfo != null)
- {
- if (userInfo.RootFolder != null)
- {
- InventoryItemBase item = userInfo.RootFolder.FindItem(itemID);
-
- if (item != null)
- {
- if ((InventoryType)item.InvType == InventoryType.Notecard)
- {
- if (!Permissions.CanEditNotecard(itemID, UUID.Zero, remoteClient.AgentId))
- {
- remoteClient.SendAgentAlertMessage("Insufficient permissions to edit notecard", false);
- return UUID.Zero;
- }
-
- remoteClient.SendAgentAlertMessage("Notecard saved", false);
- }
- else if ((InventoryType)item.InvType == InventoryType.LSL)
- {
- if (!Permissions.CanEditScript(itemID, UUID.Zero, remoteClient.AgentId))
- {
- remoteClient.SendAgentAlertMessage("Insufficient permissions to edit script", false);
- return UUID.Zero;
- }
-
- remoteClient.SendAgentAlertMessage("Script saved", false);
- }
-
- AssetBase asset =
- CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data);
- AssetCache.AddAsset(asset);
-
- item.AssetID = asset.Metadata.FullID;
- userInfo.UpdateItem(item);
-
- // remoteClient.SendInventoryItemCreateUpdate(item);
- return (asset.Metadata.FullID);
- }
- }
- }
- else
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not resolve user {0} for caps inventory update",
- remoteClient.AgentId);
- }
-
- return UUID.Zero;
- }
-
- ///
- /// CapsUpdatedInventoryItemAsset(IClientAPI, UUID, byte[])
- ///
- public UUID CapsUpdateInventoryItemAsset(UUID avatarId, UUID itemID, byte[] data)
- {
- ScenePresence avatar;
-
- if (TryGetAvatar(avatarId, out avatar))
- {
- return CapsUpdateInventoryItemAsset(avatar.ControllingClient, itemID, data);
- }
- else
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: " +
- "Avatar {0} cannot be found to update its inventory item asset",
- avatarId);
- }
-
- return UUID.Zero;
- }
-
- ///
- /// Capability originating call to update the asset of a script in a prim's (task's) inventory
- ///
- ///
- ///
- /// The prim which contains the item to update
- /// Indicates whether the script to update is currently running
- ///
- public void CapsUpdateTaskInventoryScriptAsset(IClientAPI remoteClient, UUID itemId,
- UUID primId, bool isScriptRunning, byte[] data)
- {
- if (!Permissions.CanEditScript(itemId, primId, remoteClient.AgentId))
- {
- remoteClient.SendAgentAlertMessage("Insufficient permissions to edit script", false);
- return;
- }
-
- // Retrieve group
- SceneObjectPart part = GetSceneObjectPart(primId);
- SceneObjectGroup group = part.ParentGroup;
- if (null == group)
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: " +
- "Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist",
- itemId, primId);
-
- return;
- }
-
- // Retrieve item
- TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemId);
-
- if (null == item)
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for caps script update "
- + " but the item does not exist in this inventory",
- itemId, part.Name, part.UUID);
-
- return;
- }
-
- AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data);
- AssetCache.AddAsset(asset);
-
- if (isScriptRunning)
- {
- part.Inventory.RemoveScriptInstance(item.ItemID);
- }
-
- // Update item with new asset
- item.AssetID = asset.Metadata.FullID;
- group.UpdateInventoryItem(item);
- part.GetProperties(remoteClient);
-
- // Trigger rerunning of script (use TriggerRezScript event, see RezScript)
- if (isScriptRunning)
- {
- // Needs to determine which engine was running it and use that
- //
- part.Inventory.CreateScriptInstance(item.ItemID, 0, false, DefaultScriptEngine, 0);
- }
- else
- {
- remoteClient.SendAgentAlertMessage("Script saved", false);
- }
- }
-
- ///
- /// CapsUpdateTaskInventoryScriptAsset(IClientAPI, UUID, UUID, bool, byte[])
- ///
- public void CapsUpdateTaskInventoryScriptAsset(UUID avatarId, UUID itemId,
- UUID primId, bool isScriptRunning, byte[] data)
- {
- ScenePresence avatar;
-
- if (TryGetAvatar(avatarId, out avatar))
- {
- CapsUpdateTaskInventoryScriptAsset(
- avatar.ControllingClient, itemId, primId, isScriptRunning, data);
- }
- else
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: " +
- "Avatar {0} cannot be found to update its prim item asset",
- avatarId);
- }
- }
-
- ///
- /// Update an item which is either already in the client's inventory or is within
- /// a transaction
- ///
- ///
- /// The transaction ID. If this is UUID.Zero we will
- /// assume that we are not in a transaction
- /// The ID of the updated item
- /// The name of the updated item
- /// The description of the updated item
- /// The permissions of the updated item
-/* public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID,
- UUID itemID, string name, string description,
- uint nextOwnerMask)*/
- public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID,
- UUID itemID, InventoryItemBase itemUpd)
- {
- CachedUserInfo userInfo
- = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (userInfo != null && userInfo.RootFolder != null)
- {
- InventoryItemBase item = userInfo.RootFolder.FindItem(itemID);
-
- if (item != null)
- {
- if (UUID.Zero == transactionID)
- {
- item.Name = itemUpd.Name;
- item.Description = itemUpd.Description;
- item.NextPermissions = itemUpd.NextPermissions;
- item.CurrentPermissions |= 8; // Slam!
- item.EveryOnePermissions = itemUpd.EveryOnePermissions;
- item.GroupPermissions = itemUpd.GroupPermissions;
-
- item.GroupID = itemUpd.GroupID;
- item.GroupOwned = itemUpd.GroupOwned;
- item.CreationDate = itemUpd.CreationDate;
- // The client sends zero if its newly created?
-
- if (itemUpd.CreationDate == 0)
- item.CreationDate = Util.UnixTimeSinceEpoch();
- else
- item.CreationDate = itemUpd.CreationDate;
-
- // TODO: Check if folder changed and move item
- //item.NextPermissions = itemUpd.Folder;
- item.InvType = itemUpd.InvType;
- item.SalePrice = itemUpd.SalePrice;
- item.SaleType = itemUpd.SaleType;
- item.Flags = itemUpd.Flags;
-
- userInfo.UpdateItem(item);
- }
- else
- {
- IAgentAssetTransactions agentTransactions = this.RequestModuleInterface();
- if (agentTransactions != null)
- {
- agentTransactions.HandleItemUpdateFromTransaction(
- remoteClient, transactionID, item);
- }
- }
- }
- else
- {
- m_log.Error(
- "[AGENTINVENTORY]: Item ID " + itemID + " not found for an inventory item update.");
- }
- }
- else
- {
- m_log.Error(
- "[AGENT INVENTORY]: Agent ID " + remoteClient.AgentId + " not found for an inventory item update.");
- }
- }
-
- ///
- /// Give an inventory item from one user to another
- ///
- ///
- /// ID of the sender of the item
- ///
- public virtual void GiveInventoryItem(IClientAPI recipientClient, UUID senderId, UUID itemId)
- {
- InventoryItemBase itemCopy = GiveInventoryItem(recipientClient.AgentId, senderId, itemId);
-
- if (itemCopy != null)
- recipientClient.SendBulkUpdateInventory(itemCopy);
- }
-
- ///
- /// Give an inventory item from one user to another
- ///
- ///
- /// ID of the sender of the item
- ///
- /// The inventory item copy given, null if the give was unsuccessful
- public virtual InventoryItemBase GiveInventoryItem(UUID recipient, UUID senderId, UUID itemId)
- {
- return GiveInventoryItem(recipient, senderId, itemId, UUID.Zero);
- }
-
- ///
- /// Give an inventory item from one user to another
- ///
- ///
- /// ID of the sender of the item
- ///
- ///
- /// The id of the folder in which the copy item should go. If UUID.Zero then the item is placed in the most
- /// appropriate default folder.
- ///
- ///
- /// The inventory item copy given, null if the give was unsuccessful
- ///
- public virtual InventoryItemBase GiveInventoryItem(
- UUID recipient, UUID senderId, UUID itemId, UUID recipientFolderId)
- {
- // Retrieve the item from the sender
- CachedUserInfo senderUserInfo = CommsManager.UserProfileCacheService.GetUserDetails(senderId);
-
- if (senderUserInfo == null)
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to find sending user {0} for item {1}", senderId, itemId);
-
- return null;
- }
-
- if (senderUserInfo.RootFolder != null)
- {
- InventoryItemBase item = senderUserInfo.RootFolder.FindItem(itemId);
-
- if (item != null)
- {
- if (!Permissions.BypassPermissions())
- {
- if ((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)
- return null;
- }
-
- CachedUserInfo recipientUserInfo
- = CommsManager.UserProfileCacheService.GetUserDetails(recipient);
-
- if (recipientUserInfo != null)
- {
- if (!recipientUserInfo.HasReceivedInventory)
- CommsManager.UserProfileCacheService.RequestInventoryForUser(recipient);
-
- // Insert a copy of the item into the recipient
- InventoryItemBase itemCopy = new InventoryItemBase();
- itemCopy.Owner = recipient;
- itemCopy.Creator = item.Creator;
- itemCopy.ID = UUID.Random();
- itemCopy.AssetID = item.AssetID;
- itemCopy.Description = item.Description;
- itemCopy.Name = item.Name;
- itemCopy.AssetType = item.AssetType;
- itemCopy.InvType = item.InvType;
- itemCopy.Folder = recipientFolderId;
-
- if (Permissions.PropagatePermissions())
- {
- if (item.InvType == 6)
- {
- itemCopy.BasePermissions &= ~(uint)(PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer);
- itemCopy.BasePermissions |= (item.CurrentPermissions & 7) << 13;
- }
- else
- {
- itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions;
- }
-
- itemCopy.CurrentPermissions = itemCopy.BasePermissions;
- if ((item.CurrentPermissions & 8) != 0) // Propagate slam bit
- {
- itemCopy.BasePermissions &= item.NextPermissions;
- itemCopy.CurrentPermissions = itemCopy.BasePermissions;
- itemCopy.CurrentPermissions |= 8;
- }
-
- itemCopy.NextPermissions = item.NextPermissions;
- itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions;
- itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions;
- }
- else
- {
- itemCopy.CurrentPermissions = item.CurrentPermissions;
- itemCopy.NextPermissions = item.NextPermissions;
- itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions;
- itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions;
- itemCopy.BasePermissions = item.BasePermissions;
- }
- itemCopy.GroupID = UUID.Zero;
- itemCopy.GroupOwned = false;
- itemCopy.Flags = item.Flags;
- itemCopy.SalePrice = item.SalePrice;
- itemCopy.SaleType = item.SaleType;
-
- itemCopy.CreationDate = item.CreationDate;
-
- recipientUserInfo.AddItem(itemCopy);
-
- if (!Permissions.BypassPermissions())
- {
- if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
- senderUserInfo.DeleteItem(itemId);
- }
-
- return itemCopy;
- }
- else
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find userinfo for recipient user {0} of item {1}, {2} from {3}",
- recipient, item.Name,
- item.ID, senderId);
- }
- }
- else
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to find item {0} to give to {1}", itemId, senderId);
-
- return null;
- }
- }
- else
- {
- m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemId.ToString() + ", no root folder");
- return null;
- }
-
- return null;
- }
-
- ///
- /// Give an entire inventory folder from one user to another. The entire contents (including all descendent
- /// folders) is given.
- ///
- ///
- /// ID of the sender of the item
- ///
- ///
- /// The id of the receipient folder in which the send folder should be placed. If UUID.Zero then the
- /// recipient folder is the root folder
- ///
- ///
- /// The inventory folder copy given, null if the copy was unsuccessful
- ///
- public virtual InventoryFolderImpl GiveInventoryFolder(
- UUID recipientId, UUID senderId, UUID folderId, UUID recipientParentFolderId)
- {
- // Retrieve the folder from the sender
- CachedUserInfo senderUserInfo = CommsManager.UserProfileCacheService.GetUserDetails(senderId);
-
- if (null == senderUserInfo)
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to find sending user {0} for folder {1}", senderId, folderId);
-
- return null;
- }
-
- if (!senderUserInfo.HasReceivedInventory)
- {
- m_log.DebugFormat(
- "[AGENT INVENTORY]: Could not give inventory folder - have not yet received inventory for {0}",
- senderId);
-
- return null;
- }
-
- InventoryFolderImpl folder = senderUserInfo.RootFolder.FindFolder(folderId);
-
- if (null == folder)
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find inventory folder {0} to give", folderId);
-
- return null;
- }
-
- CachedUserInfo recipientUserInfo
- = CommsManager.UserProfileCacheService.GetUserDetails(recipientId);
-
- if (null == recipientUserInfo)
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to find receiving user {0} for folder {1}", recipientId, folderId);
-
- return null;
- }
-
- if (recipientParentFolderId == UUID.Zero)
- recipientParentFolderId = recipientUserInfo.RootFolder.ID;
-
- UUID newFolderId = UUID.Random();
- recipientUserInfo.CreateFolder(folder.Name, newFolderId, (ushort)folder.Type, recipientParentFolderId);
-
- // XXX: Messy - we should really get this back in the CreateFolder call
- InventoryFolderImpl copiedFolder = recipientUserInfo.RootFolder.FindFolder(newFolderId);
-
- // Give all the subfolders
- List subFolders = folder.RequestListOfFolderImpls();
- foreach (InventoryFolderImpl childFolder in subFolders)
- {
- GiveInventoryFolder(recipientId, senderId, childFolder.ID, copiedFolder.ID);
- }
-
- // Give all the items
- List items = folder.RequestListOfItems();
- foreach (InventoryItemBase item in items)
- {
- GiveInventoryItem(recipientId, senderId, item.ID, copiedFolder.ID);
- }
-
- return copiedFolder;
- }
-
- public void CopyInventoryItem(IClientAPI remoteClient, uint callbackID, UUID oldAgentID, UUID oldItemID,
- UUID newFolderID, string newName)
- {
- m_log.DebugFormat(
- "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}",
- remoteClient.AgentId, oldAgentID, oldItemID, newFolderID, newName);
-
- InventoryItemBase item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(oldItemID);
-
- if (item == null)
- {
- CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID);
- if (userInfo == null)
- {
- m_log.Error("[AGENT INVENTORY]: Failed to find user " + oldAgentID.ToString());
- return;
- }
-
- if (userInfo.RootFolder != null)
- {
- item = userInfo.RootFolder.FindItem(oldItemID);
-
- if (item == null)
- {
- m_log.Error("[AGENT INVENTORY]: Failed to find item " + oldItemID.ToString());
- return;
- }
- }
- else
- {
- m_log.Error("[AGENT INVENTORY]: Failed to find item " + oldItemID.ToString());
- return;
- }
- }
-
- AssetBase asset
- = AssetCache.GetAsset(
- item.AssetID, (item.AssetType == (int)AssetType.Texture ? true : false));
-
- if (asset != null)
- {
- if (newName != String.Empty)
- {
- asset.Metadata.Name = newName;
- }
- else
- {
- newName = item.Name;
- }
-
- if (remoteClient.AgentId == oldAgentID)
- {
- CreateNewInventoryItem(
- remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
- item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
- }
- else
- {
- CreateNewInventoryItem(
- remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
- item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
- }
- }
- else
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not copy item {0} since asset {1} could not be found",
- item.Name, item.AssetID);
- }
- }
-
- ///
- /// Create a new asset data structure.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data)
- {
- AssetBase asset = new AssetBase();
- asset.Metadata.Name = name;
- asset.Metadata.Description = description;
- asset.Metadata.Type = assetType;
- asset.Metadata.FullID = UUID.Random();
- asset.Data = (data == null) ? new byte[1] : data;
-
- return asset;
- }
-
- ///
- /// Move an item within the agent's inventory.
- ///
- ///
- ///
- ///
- ///
- ///
- public void MoveInventoryItem(IClientAPI remoteClient, UUID folderID, UUID itemID, int length,
- string newName)
- {
- m_log.DebugFormat(
- "[AGENT INVENTORY]: Moving item {0} to {1} for {2}", itemID, folderID, remoteClient.AgentId);
-
- CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (userInfo == null)
- {
- m_log.Error("[AGENT INVENTORY]: Failed to find user " + remoteClient.AgentId.ToString());
-
- return;
- }
-
- if (userInfo.RootFolder != null)
- {
- InventoryItemBase item = userInfo.RootFolder.FindItem(itemID);
-
- if (item != null)
- {
- if (newName != String.Empty)
- {
- item.Name = newName;
- }
- item.Folder = folderID;
-
- userInfo.DeleteItem(item.ID);
-
- AddInventoryItem(remoteClient, item);
- }
- else
- {
- m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString());
-
- return;
- }
- }
- else
- {
- m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString() + ", no root folder");
-
- return;
- }
- }
-
- ///
- /// Create a new inventory item.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- private void CreateNewInventoryItem(IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID,
- AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate)
- {
- CreateNewInventoryItem(
- remoteClient, folderID, name, flags, callbackID, asset, invType,
- (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate);
- }
-
- ///
- /// Create a new Inventory Item
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- private void CreateNewInventoryItem(
- IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType,
- uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate)
- {
- CachedUserInfo userInfo
- = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (userInfo != null)
- {
- InventoryItemBase item = new InventoryItemBase();
- item.Owner = remoteClient.AgentId;
- item.Creator = remoteClient.AgentId;
- item.ID = UUID.Random();
- item.AssetID = asset.Metadata.FullID;
- item.Description = asset.Metadata.Description;
- item.Name = name;
- item.Flags = flags;
- item.AssetType = asset.Metadata.Type;
- item.InvType = invType;
- item.Folder = folderID;
- item.CurrentPermissions = currentMask;
- item.NextPermissions = nextOwnerMask;
- item.EveryOnePermissions = everyoneMask;
- item.GroupPermissions = groupMask;
- item.BasePermissions = baseMask;
- item.CreationDate = creationDate;
-
- userInfo.AddItem(item);
- remoteClient.SendInventoryItemCreateUpdate(item);
- }
- else
- {
- m_log.WarnFormat(
- "No user details associated with client {0} uuid {1} in CreateNewInventoryItem!",
- remoteClient.Name, remoteClient.AgentId);
- }
- }
-
- ///
- /// Create a new inventory item. Called when the client creates a new item directly within their
- /// inventory (e.g. by selecting a context inventory menu option).
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public void CreateNewInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID,
- uint callbackID, string description, string name, sbyte invType,
- sbyte assetType,
- byte wearableType, uint nextOwnerMask, int creationDate)
- {
- m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID);
-
- if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId))
- return;
-
- if (transactionID == UUID.Zero)
- {
- CachedUserInfo userInfo
- = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (userInfo != null)
- {
- ScenePresence presence;
- TryGetAvatar(remoteClient.AgentId, out presence);
- byte[] data = null;
-
- if (invType == 3 && presence != null) // OpenMetaverse.asset.assettype.landmark = 3 - needs to be turned into an enum
- {
- Vector3 pos = presence.AbsolutePosition;
- string strdata = String.Format(
- "Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n",
- presence.Scene.RegionInfo.RegionID,
- pos.X, pos.Y, pos.Z,
- presence.RegionHandle);
- data = Encoding.ASCII.GetBytes(strdata);
- }
-
- AssetBase asset = CreateAsset(name, description, assetType, data);
- AssetCache.AddAsset(asset);
-
- CreateNewInventoryItem(remoteClient, folderID, asset.Metadata.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
- }
- else
- {
- m_log.ErrorFormat(
- "userInfo for agent uuid {0} unexpectedly null in CreateNewInventoryItem",
- remoteClient.AgentId);
- }
- }
- else
- {
- IAgentAssetTransactions agentTransactions = this.RequestModuleInterface();
- if (agentTransactions != null)
- {
- agentTransactions.HandleItemCreationFromTransaction(
- remoteClient, transactionID, folderID, callbackID, description,
- name, invType, assetType, wearableType, nextOwnerMask);
- }
- }
- }
-
- ///
- /// Remove an inventory item for the client's inventory
- ///
- ///
- ///
- private void RemoveInventoryItem(IClientAPI remoteClient, UUID itemID)
- {
- CachedUserInfo userInfo
- = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (userInfo == null)
- {
- m_log.WarnFormat(
- "[AGENT INVENTORY]: Failed to find user {0} {1} to delete inventory item {2}",
- remoteClient.Name, remoteClient.AgentId, itemID);
-
- return;
- }
-
- userInfo.DeleteItem(itemID);
- }
-
- ///
- /// Removes an inventory folder. Although there is a packet in the Linden protocol for this, it may be
- /// legacy and not currently used (purge folder is used to remove folders from trash instead).
- ///
- ///
- ///
- private void RemoveInventoryFolder(IClientAPI remoteClient, UUID folderID)
- {
- CachedUserInfo userInfo
- = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (userInfo == null)
- {
- m_log.Warn("[AGENT INVENTORY]: Failed to find user " + remoteClient.AgentId.ToString());
- return;
- }
-
- if (userInfo.RootFolder != null)
- {
- InventoryItemBase folder = userInfo.RootFolder.FindItem(folderID);
-
- if (folder != null)
- {
- m_log.WarnFormat(
- "[AGENT INVENTORY]: Remove folder not implemented in request by {0} {1} for {2}",
- remoteClient.Name, remoteClient.AgentId, folderID);
-
- // doesn't work just yet, commented out. will fix in next patch.
- // userInfo.DeleteItem(folder);
- }
- }
- }
-
- private SceneObjectGroup GetGroupByPrim(uint localID)
- {
- List EntityList = GetEntities();
-
- foreach (EntityBase ent in EntityList)
- {
- if (ent is SceneObjectGroup)
- {
- if (((SceneObjectGroup) ent).HasChildPrim(localID))
- return (SceneObjectGroup) ent;
- }
- }
- return null;
- }
-
- ///
- /// Send the details of a prim's inventory to the client.
- ///
- ///
- ///
- public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID)
- {
- SceneObjectGroup group = GetGroupByPrim(primLocalID);
- if (group != null)
- {
- bool fileChange = group.GetPartInventoryFileName(remoteClient, primLocalID);
- if (fileChange)
- {
- if (XferManager != null)
- {
- group.RequestInventoryFile(remoteClient, primLocalID, XferManager);
- }
- }
- }
- else
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: Inventory requested of prim {0} which doesn't exist", primLocalID);
- }
- }
-
- ///
- /// Remove an item from a prim (task) inventory
- ///
- /// Unused at the moment but retained since the avatar ID might
- /// be necessary for a permissions check at some stage.
- ///
- ///
- public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID)
- {
- SceneObjectPart part = GetSceneObjectPart(localID);
- SceneObjectGroup group = part.ParentGroup;
- if (group != null)
- {
- TaskInventoryItem item = group.GetInventoryItem(localID, itemID);
- if (item == null)
- return;
-
- if (item.Type == 10)
- {
- EventManager.TriggerRemoveScript(localID, itemID);
- }
- group.RemoveInventoryItem(localID, itemID);
- part.GetProperties(remoteClient);
- }
- else
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: " +
- "Removal of item {0} requested of prim {1} but this prim does not exist",
- itemID,
- localID);
- }
- }
-
- private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, SceneObjectPart part, UUID itemId)
- {
- TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId);
-
- if (null == taskItem)
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for creating an avatar"
- + " inventory item from a prim's inventory item "
- + " but the required item does not exist in the prim's inventory",
- itemId, part.Name, part.UUID);
-
- return null;
- }
-
- if ((destAgent != taskItem.OwnerID) && ((taskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0))
- {
- return null;
- }
-
- InventoryItemBase agentItem = new InventoryItemBase();
-
- agentItem.ID = UUID.Random();
- agentItem.Creator = taskItem.CreatorID;
- agentItem.Owner = destAgent;
- agentItem.AssetID = taskItem.AssetID;
- agentItem.Description = taskItem.Description;
- agentItem.Name = taskItem.Name;
- agentItem.AssetType = taskItem.Type;
- agentItem.InvType = taskItem.InvType;
- agentItem.Flags = taskItem.Flags;
-
- if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions())
- {
- if (taskItem.InvType == 6)
- agentItem.BasePermissions = taskItem.BasePermissions & ((taskItem.CurrentPermissions & 7) << 13);
- else
- agentItem.BasePermissions = taskItem.BasePermissions;
- agentItem.BasePermissions &= taskItem.NextPermissions;
- agentItem.CurrentPermissions = agentItem.BasePermissions | 8;
- agentItem.NextPermissions = taskItem.NextPermissions;
- agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions;
- agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions;
- }
- else
- {
- agentItem.BasePermissions = taskItem.BasePermissions;
- agentItem.CurrentPermissions = taskItem.CurrentPermissions;
- agentItem.NextPermissions = taskItem.NextPermissions;
- agentItem.EveryOnePermissions = taskItem.EveryonePermissions;
- agentItem.GroupPermissions = taskItem.GroupPermissions;
- }
-
- if (!Permissions.BypassPermissions())
- {
- if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
- part.Inventory.RemoveInventoryItem(itemId);
- }
-
- return agentItem;
- }
-
- ///
- /// Move the given item in the given prim to a folder in the client's inventory
- ///
- ///
- ///
- ///
- ///
- public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId)
- {
- InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId);
-
- if (agentItem == null)
- return null;
-
- agentItem.Folder = folderId;
- AddInventoryItem(remoteClient, agentItem);
- return agentItem;
- }
-
- ///
- /// ClientMoveTaskInventoryItem
- ///
- ///
- ///
- ///
- ///
- public void ClientMoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, uint primLocalId, UUID itemId)
- {
- SceneObjectPart part = GetSceneObjectPart(primLocalId);
-
- if (null == part)
- {
- m_log.WarnFormat(
- "[PRIM INVENTORY]: " +
- "Move of inventory item {0} from prim with local id {1} failed because the prim could not be found",
- itemId, primLocalId);
-
- return;
- }
-
- TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId);
-
- if (null == taskItem)
- {
- m_log.WarnFormat("[PRIM INVENTORY]: Move of inventory item {0} from prim with local id {1} failed"
- + " because the inventory item could not be found",
- itemId, primLocalId);
-
- return;
- }
-
- // Only owner can copy
- if (remoteClient.AgentId != taskItem.OwnerID)
- return;
-
- MoveTaskInventoryItem(remoteClient, folderId, part, itemId);
- }
-
- ///
- /// MoveTaskInventoryItem
- ///
- ///
- ///
- ///
- ///
- public InventoryItemBase MoveTaskInventoryItem(UUID avatarId, UUID folderId, SceneObjectPart part, UUID itemId)
- {
- ScenePresence avatar;
-
- if (TryGetAvatar(avatarId, out avatar))
- {
- return MoveTaskInventoryItem(avatar.ControllingClient, folderId, part, itemId);
- }
- else
- {
- CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(avatarId);
- if (profile == null || profile.RootFolder == null)
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: " +
- "Avatar {0} cannot be found to add item",
- avatarId);
- }
- if (!profile.HasReceivedInventory)
- CommsManager.UserProfileCacheService.RequestInventoryForUser(avatarId);
- InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(avatarId, part, itemId);
-
- if (agentItem == null)
- return null;
-
- agentItem.Folder = folderId;
-
- AddInventoryItem(avatarId, agentItem);
-
- return agentItem;
- }
- }
-
- ///
- /// Copy a task (prim) inventory item to another task (prim)
- ///
- ///
- ///
- ///
- public void MoveTaskInventoryItem(UUID destId, SceneObjectPart part, UUID itemId)
- {
- TaskInventoryItem srcTaskItem = part.Inventory.GetInventoryItem(itemId);
-
- if (srcTaskItem == null)
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for moving"
- + " but the item does not exist in this inventory",
- itemId, part.Name, part.UUID);
-
- return;
- }
-
- SceneObjectPart destPart = GetSceneObjectPart(destId);
-
- if (destPart == null)
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: " +
- "Could not find prim for ID {0}",
- destId);
- return;
- }
-
- // Can't transfer this
- //
- if ((part.OwnerID != destPart.OwnerID) && ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0))
- return;
-
- if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0)
- {
- // object cannot copy items to an object owned by a different owner
- // unless llAllowInventoryDrop has been called
-
- return;
- }
-
- // must have both move and modify permission to put an item in an object
- if ((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0)
- {
- return;
- }
-
- TaskInventoryItem destTaskItem = new TaskInventoryItem();
-
- destTaskItem.ItemID = UUID.Random();
- destTaskItem.CreatorID = srcTaskItem.CreatorID;
- destTaskItem.AssetID = srcTaskItem.AssetID;
- destTaskItem.GroupID = destPart.GroupID;
- destTaskItem.OwnerID = destPart.OwnerID;
- destTaskItem.ParentID = destPart.UUID;
- destTaskItem.ParentPartID = destPart.UUID;
-
- destTaskItem.BasePermissions = srcTaskItem.BasePermissions;
- destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions;
- destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions;
- destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions;
- destTaskItem.NextPermissions = srcTaskItem.NextPermissions;
- destTaskItem.Flags = srcTaskItem.Flags;
-
- if (destPart.OwnerID != part.OwnerID)
- {
- if (Permissions.PropagatePermissions())
- {
- destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions &
- srcTaskItem.NextPermissions;
- destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions &
- srcTaskItem.NextPermissions;
- destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions &
- srcTaskItem.NextPermissions;
- destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
- srcTaskItem.NextPermissions;
- destTaskItem.CurrentPermissions |= 8; // Slam!
- }
- }
-
- destTaskItem.Description = srcTaskItem.Description;
- destTaskItem.Name = srcTaskItem.Name;
- destTaskItem.InvType = srcTaskItem.InvType;
- destTaskItem.Type = srcTaskItem.Type;
-
- destPart.Inventory.AddInventoryItem(destTaskItem, part.OwnerID != destPart.OwnerID);
-
- if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
- part.Inventory.RemoveInventoryItem(itemId);
-
- ScenePresence avatar;
-
- if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
- {
- destPart.GetProperties(avatar.ControllingClient);
- }
- }
-
- public UUID MoveTaskInventoryItems(UUID destID, string category, SceneObjectPart host, List items)
- {
- CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID);
- if (profile == null || profile.RootFolder == null)
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: " +
- "Avatar {0} cannot be found to add items",
- destID);
- return UUID.Zero;
- }
-
- UUID newFolderID = UUID.Random();
-
- profile.CreateFolder(category, newFolderID, 0xffff, profile.RootFolder.ID);
-
- foreach (UUID itemID in items)
- {
- InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(destID, host, itemID);
-
- if (agentItem != null)
- {
- agentItem.Folder = newFolderID;
-
- AddInventoryItem(destID, agentItem);
- }
- }
-
- ScenePresence avatar;
-
- if (TryGetAvatar(destID, out avatar))
- {
- profile.SendInventoryDecendents(avatar.ControllingClient,
- profile.RootFolder.ID, true, false);
- profile.SendInventoryDecendents(avatar.ControllingClient,
- newFolderID, false, true);
- }
-
- return newFolderID;
- }
-
- ///
- /// Update an item in a prim (task) inventory.
- /// This method does not handle scripts, RezScript(IClientAPI, UUID, unit)
- ///
- ///
- ///
- ///
- ///
- public void UpdateTaskInventory(IClientAPI remoteClient, UUID transactionID, TaskInventoryItem itemInfo,
- uint primLocalID)
- {
- UUID itemID = itemInfo.ItemID;
-
- // Find the prim we're dealing with
- SceneObjectPart part = GetSceneObjectPart(primLocalID);
-
- if (part != null)
- {
- TaskInventoryItem currentItem = part.Inventory.GetInventoryItem(itemID);
- bool allowInventoryDrop = (part.GetEffectiveObjectFlags()
- & (uint)PrimFlags.AllowInventoryDrop) != 0;
-
- // Explicity allow anyone to add to the inventory if the
- // AllowInventoryDrop flag has been set. Don't however let
- // them update an item unless they pass the external checks
- //
- if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId)
- && (currentItem != null || !allowInventoryDrop))
- return;
-
- if (currentItem == null)
- {
- UUID copyID = UUID.Random();
- if (itemID != UUID.Zero)
- {
- CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (userInfo != null && userInfo.RootFolder != null)
- {
- InventoryItemBase item = userInfo.RootFolder.FindItem(itemID);
-
- // Try library
- // XXX clumsy, possibly should be one call
- if (null == item)
- {
- item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID);
- }
-
- if (item != null)
- {
- part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID);
- m_log.InfoFormat(
- "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}",
- item.Name, primLocalID, remoteClient.Name);
- part.GetProperties(remoteClient);
- if (!Permissions.BypassPermissions())
- {
- if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
- RemoveInventoryItem(remoteClient, itemID);
- }
- }
- else
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!",
- itemID, remoteClient.Name);
- }
- }
- }
- }
- else // Updating existing item with new perms etc
- {
- IAgentAssetTransactions agentTransactions = this.RequestModuleInterface();
- if (agentTransactions != null)
- {
- agentTransactions.HandleTaskItemUpdateFromTransaction(
- remoteClient, part, transactionID, currentItem);
- }
- if (part.Inventory.UpdateInventoryItem(itemInfo))
- part.GetProperties(remoteClient);
- }
- }
- else
- {
- m_log.WarnFormat(
- "[PRIM INVENTORY]: " +
- "Update with item {0} requested of prim {1} for {2} but this prim does not exist",
- itemID, primLocalID, remoteClient.Name);
- }
- }
-
- ///
- /// Rez a script into a prim's inventory, either ex nihilo or from an existing avatar inventory
- ///
- ///
- ///
- ///
- public void RezScript(IClientAPI remoteClient, InventoryItemBase itemBase, UUID transactionID, uint localID)
- {
- UUID itemID = itemBase.ID;
- UUID copyID = UUID.Random();
-
- if (itemID != UUID.Zero) // transferred from an avatar inventory to the prim's inventory
- {
- CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (userInfo != null && userInfo.RootFolder != null)
- {
- InventoryItemBase item = userInfo.RootFolder.FindItem(itemID);
-
- // Try library
- // XXX clumsy, possibly should be one call
- if (null == item)
- {
- item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID);
- }
-
- if (item != null)
- {
- SceneObjectPart part = GetSceneObjectPart(localID);
- if (part != null)
- {
- if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId))
- return;
-
- part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID);
- // TODO: switch to posting on_rez here when scripts
- // have state in inventory
- part.Inventory.CreateScriptInstance(copyID, 0, false, DefaultScriptEngine, 0);
-
- // m_log.InfoFormat("[PRIMINVENTORY]: " +
- // "Rezzed script {0} into prim local ID {1} for user {2}",
- // item.inventoryName, localID, remoteClient.Name);
- part.GetProperties(remoteClient);
- }
- else
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: " +
- "Could not rez script {0} into prim local ID {1} for user {2}"
- + " because the prim could not be found in the region!",
- item.Name, localID, remoteClient.Name);
- }
- }
- else
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: Could not find script inventory item {0} to rez for {1}!",
- itemID, remoteClient.Name);
- }
- }
- }
- else // script has been rezzed directly into a prim's inventory
- {
- SceneObjectPart part = GetSceneObjectPart(itemBase.Folder);
- if (part == null)
- return;
-
- if (part.OwnerID != remoteClient.AgentId)
- return;
-
- if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
- return;
-
- if (!Permissions.CanCreateObjectInventory(
- itemBase.InvType, part.UUID, remoteClient.AgentId))
- return;
-
- AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType, Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}"));
- AssetCache.AddAsset(asset);
-
- TaskInventoryItem taskItem = new TaskInventoryItem();
-
- taskItem.ResetIDs(itemBase.Folder);
- taskItem.ParentID = itemBase.Folder;
- taskItem.CreationDate = (uint)itemBase.CreationDate;
- taskItem.Name = itemBase.Name;
- taskItem.Description = itemBase.Description;
- taskItem.Type = itemBase.AssetType;
- taskItem.InvType = itemBase.InvType;
- taskItem.OwnerID = itemBase.Owner;
- taskItem.CreatorID = itemBase.Creator;
- taskItem.BasePermissions = itemBase.BasePermissions;
- taskItem.CurrentPermissions = itemBase.CurrentPermissions;
- taskItem.EveryonePermissions = itemBase.EveryOnePermissions;
- taskItem.GroupPermissions = itemBase.GroupPermissions;
- taskItem.NextPermissions = itemBase.NextPermissions;
- taskItem.GroupID = itemBase.GroupID;
- taskItem.GroupPermissions = 0;
- taskItem.Flags = itemBase.Flags;
- taskItem.PermsGranter = UUID.Zero;
- taskItem.PermsMask = 0;
- taskItem.AssetID = asset.Metadata.FullID;
-
- part.Inventory.AddInventoryItem(taskItem, false);
- part.GetProperties(remoteClient);
-
- part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0);
- }
- }
-
- ///
- /// Rez a script into a prim's inventory from another prim
- ///
- ///
- ///
- ///
- public void RezScript(UUID srcId, SceneObjectPart srcPart, UUID destId, int pin, int running, int start_param)
- {
- TaskInventoryItem srcTaskItem = srcPart.Inventory.GetInventoryItem(srcId);
-
- if (srcTaskItem == null)
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for rezzing a script but the "
- + " item does not exist in this inventory",
- srcId, srcPart.Name, srcPart.UUID);
-
- return;
- }
-
- SceneObjectPart destPart = GetSceneObjectPart(destId);
-
- if (destPart == null)
- {
- m_log.ErrorFormat(
- "[PRIM INVENTORY]: " +
- "Could not find script for ID {0}",
- destId);
- return;
- }
-
- // Must own the object, and have modify rights
- if (srcPart.OwnerID != destPart.OwnerID)
- return;
-
- if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
- return;
-
- if (destPart.ScriptAccessPin != pin)
- {
- m_log.WarnFormat(
- "[PRIM INVENTORY]: " +
- "Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}",
- srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin);
- // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL -
- // "Object: Task Object trying to illegally load script onto task Other_Object!"
- // How do we shout from in here?
- return;
- }
-
- TaskInventoryItem destTaskItem = new TaskInventoryItem();
-
- destTaskItem.ItemID = UUID.Random();
- destTaskItem.CreatorID = srcTaskItem.CreatorID;
- destTaskItem.AssetID = srcTaskItem.AssetID;
- destTaskItem.GroupID = destPart.GroupID;
- destTaskItem.OwnerID = destPart.OwnerID;
- destTaskItem.ParentID = destPart.UUID;
- destTaskItem.ParentPartID = destPart.UUID;
-
- destTaskItem.BasePermissions = srcTaskItem.BasePermissions;
- destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions;
- destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions;
- destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions;
- destTaskItem.NextPermissions = srcTaskItem.NextPermissions;
- destTaskItem.Flags = srcTaskItem.Flags;
-
- if (destPart.OwnerID != srcPart.OwnerID)
- {
- if (Permissions.PropagatePermissions())
- {
- destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions &
- srcTaskItem.NextPermissions;
- destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions &
- srcTaskItem.NextPermissions;
- destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions &
- srcTaskItem.NextPermissions;
- destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
- srcTaskItem.NextPermissions;
- destTaskItem.CurrentPermissions |= 8; // Slam!
- }
- }
-
- destTaskItem.Description = srcTaskItem.Description;
- destTaskItem.Name = srcTaskItem.Name;
- destTaskItem.InvType = srcTaskItem.InvType;
- destTaskItem.Type = srcTaskItem.Type;
-
- destPart.Inventory.AddInventoryItemExclusive(destTaskItem, false);
-
- if (running > 0)
- {
- destPart.Inventory.CreateScriptInstance(destTaskItem, 0, false, DefaultScriptEngine, 0);
- }
-
- ScenePresence avatar;
-
- if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
- {
- destPart.GetProperties(avatar.ControllingClient);
- }
- }
-
- ///
- /// Called when an object is removed from the environment into inventory.
- ///
- ///
- ///
- ///
- ///
- ///
- public virtual void DeRezObject(IClientAPI remoteClient, uint localID,
- UUID groupID, DeRezAction action, UUID destinationID)
- {
- SceneObjectPart part = GetSceneObjectPart(localID);
- if (part == null)
- return;
-
- if (part.ParentGroup == null || part.ParentGroup.IsDeleted)
- return;
-
- // Can't delete child prims
- if (part != part.ParentGroup.RootPart)
- return;
-
- SceneObjectGroup grp = part.ParentGroup;
-
- //force a database backup/update on this SceneObjectGroup
- //So that we know the database is upto date, for when deleting the object from it
- ForceSceneObjectBackup(grp);
-
- bool permissionToTake = false;
- bool permissionToDelete = false;
-
- if (action == DeRezAction.SaveToExistingUserInventoryItem)
- {
- if (grp.OwnerID == remoteClient.AgentId && grp.RootPart.FromUserInventoryItemID != UUID.Zero)
- {
- permissionToTake = true;
- permissionToDelete = false;
- }
- }
- else if (action == DeRezAction.TakeCopy)
- {
- permissionToTake =
- Permissions.CanTakeCopyObject(
- grp.UUID,
- remoteClient.AgentId);
- }
- else if (action == DeRezAction.GodTakeCopy)
- {
- permissionToTake =
- Permissions.IsGod(
- remoteClient.AgentId);
- }
- else if (action == DeRezAction.Take)
- {
- permissionToTake =
- Permissions.CanTakeObject(
- grp.UUID,
- remoteClient.AgentId);
-
- //If they can take, they can delete!
- permissionToDelete = permissionToTake;
- }
- else if (action == DeRezAction.Delete)
- {
- permissionToTake =
- Permissions.CanDeleteObject(
- grp.UUID,
- remoteClient.AgentId);
- permissionToDelete = permissionToTake;
- }
- else if (action == DeRezAction.Return)
- {
- if (remoteClient != null)
- {
- permissionToTake =
- Permissions.CanReturnObject(
- grp.UUID,
- remoteClient.AgentId);
- permissionToDelete = permissionToTake;
-
- if (permissionToDelete)
- {
- AddReturn(grp.OwnerID, grp.Name, grp.AbsolutePosition, "parcel owner return");
- }
- }
- else // Auto return passes through here with null agent
- {
- permissionToTake = true;
- permissionToDelete = true;
- }
- }
- else
- {
- m_log.DebugFormat(
- "[AGENT INVENTORY]: Ignoring unexpected derez action {0} for {1}", action, remoteClient.Name);
- return;
- }
-
- if (permissionToTake)
- {
- m_asyncSceneObjectDeleter.DeleteToInventory(
- action, destinationID, grp, remoteClient,
- permissionToDelete);
- }
- else if (permissionToDelete)
- {
- DeleteSceneObject(grp, false);
- }
- }
-
- private bool WaitForInventory(CachedUserInfo info)
- {
- // 200 Seconds wait. This is called in the context of the
- // background delete thread, so we can afford to waste time
- // here.
- //
- int count = 200;
-
- while (count > 0)
- {
- System.Threading.Thread.Sleep(100);
- count--;
- if (info.HasReceivedInventory)
- return true;
- }
- m_log.DebugFormat("Timed out waiting for inventory of user {0}",
- info.UserProfile.ID.ToString());
- return false;
- }
-
- ///
- /// Delete a scene object from a scene and place in the given avatar's inventory.
- /// Returns the UUID of the newly created asset.
- ///
- ///
- ///
- ///
- ///
- public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
- SceneObjectGroup objectGroup, IClientAPI remoteClient)
- {
- UUID assetID = UUID.Zero;
-
- string sceneObjectXml = objectGroup.ToXmlString();
-
- // Get the user info of the item destination
- //
- CachedUserInfo userInfo;
-
- if (action == DeRezAction.Take || action == DeRezAction.TakeCopy ||
- action == DeRezAction.SaveToExistingUserInventoryItem)
- {
- // Take or take copy require a taker
- // Saving changes requires a local user
- //
- if (remoteClient == null)
- return UUID.Zero;
-
- userInfo = CommsManager.UserProfileCacheService.GetUserDetails(
- remoteClient.AgentId);
- }
- else
- {
- // All returns / deletes go to the object owner
- //
- userInfo = CommsManager.UserProfileCacheService.GetUserDetails(
- objectGroup.RootPart.OwnerID);
- }
-
- if (userInfo == null) // Can't proceed
- {
- return UUID.Zero;
- }
-
- if (!userInfo.HasReceivedInventory)
- {
- // Async inventory requests will queue, but they will never
- // execute unless inventory is actually fetched
- //
- CommsManager.UserProfileCacheService.RequestInventoryForUser(
- userInfo.UserProfile.ID);
- }
-
- if (userInfo != null)
- {
- // If we're returning someone's item, it goes back to the
- // owner's Lost And Found folder.
- // Delete is treated like return in this case
- // Deleting your own items makes them go to trash
- //
-
- InventoryFolderBase folder = null;
- InventoryItemBase item = null;
-
- if (DeRezAction.SaveToExistingUserInventoryItem == action)
- {
- item = userInfo.RootFolder.FindItem(
- objectGroup.RootPart.FromUserInventoryItemID);
-
- if (null == item)
- {
- m_log.DebugFormat(
- "[AGENT INVENTORY]: Object {0} {1} scheduled for save to inventory has already been deleted.",
- objectGroup.Name, objectGroup.UUID);
- return UUID.Zero;
- }
- }
- else
- {
- // Folder magic
- //
- if (action == DeRezAction.Delete)
- {
- // Deleting someone else's item
- //
- if (remoteClient == null ||
- objectGroup.OwnerID != remoteClient.AgentId)
- {
- // Folder skeleton may not be loaded and we
- // have to wait for the inventory to find
- // the destination folder
- //
- if (!WaitForInventory(userInfo))
- return UUID.Zero;
- folder = userInfo.FindFolderForType(
- (int)AssetType.LostAndFoundFolder);
- }
- else
- {
- // Assume inventory skeleton was loaded during login
- // and all folders can be found
- //
- folder = userInfo.FindFolderForType(
- (int)AssetType.TrashFolder);
- }
- }
- else if (action == DeRezAction.Return)
- {
- // Wait if needed
- //
- if (!userInfo.HasReceivedInventory)
- {
- if (!WaitForInventory(userInfo))
- return UUID.Zero;
- }
-
- // Dump to lost + found unconditionally
- //
- folder = userInfo.FindFolderForType(
- (int)AssetType.LostAndFoundFolder);
- }
-
- if (folderID == UUID.Zero && folder == null)
- {
- // Catch all. Use lost & found
- //
- if (!userInfo.HasReceivedInventory)
- {
- if (!WaitForInventory(userInfo))
- return UUID.Zero;
- }
-
- folder = userInfo.FindFolderForType(
- (int)AssetType.LostAndFoundFolder);
- }
-
- if (folder == null) // None of the above
- {
- folder = userInfo.RootFolder.FindFolder(folderID);
-
- if (folder == null) // Nowhere to put it
- {
- return UUID.Zero;
- }
- }
-
- item = new InventoryItemBase();
- item.Creator = objectGroup.RootPart.CreatorID;
- item.ID = UUID.Random();
- item.InvType = (int)InventoryType.Object;
- item.Folder = folder.ID;
- item.Owner = userInfo.UserProfile.ID;
-
- }
-
- AssetBase asset = CreateAsset(
- objectGroup.GetPartName(objectGroup.RootPart.LocalId),
- objectGroup.GetPartDescription(objectGroup.RootPart.LocalId),
- (sbyte)AssetType.Object,
- Utils.StringToBytes(sceneObjectXml));
- AssetCache.AddAsset(asset);
- assetID = asset.Metadata.FullID;
-
- if (DeRezAction.SaveToExistingUserInventoryItem == action)
- {
- item.AssetID = asset.Metadata.FullID;
- userInfo.UpdateItem(item);
- }
- else
- {
- item.AssetID = asset.Metadata.FullID;
-
- if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && Permissions.PropagatePermissions())
- {
- uint perms=objectGroup.GetEffectivePermissions();
- uint nextPerms=(perms & 7) << 13;
- if ((nextPerms & (uint)PermissionMask.Copy) == 0)
- perms &= ~(uint)PermissionMask.Copy;
- if ((nextPerms & (uint)PermissionMask.Transfer) == 0)
- perms &= ~(uint)PermissionMask.Transfer;
- if ((nextPerms & (uint)PermissionMask.Modify) == 0)
- perms &= ~(uint)PermissionMask.Modify;
-
- item.BasePermissions = perms & objectGroup.RootPart.NextOwnerMask;
- item.CurrentPermissions = item.BasePermissions;
- item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
- item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask;
- item.GroupPermissions = objectGroup.RootPart.GroupMask & objectGroup.RootPart.NextOwnerMask;
- item.CurrentPermissions |= 8; // Slam!
- }
- else
- {
- item.BasePermissions = objectGroup.GetEffectivePermissions();
- item.CurrentPermissions = objectGroup.GetEffectivePermissions();
- item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
- item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask;
- item.GroupPermissions = objectGroup.RootPart.GroupMask;
-
- item.CurrentPermissions |= 8; // Slam!
- }
-
- // TODO: add the new fields (Flags, Sale info, etc)
- item.CreationDate = Util.UnixTimeSinceEpoch();
- item.Description = asset.Metadata.Description;
- item.Name = asset.Metadata.Name;
- item.AssetType = asset.Metadata.Type;
-
- userInfo.AddItem(item);
-
- if (remoteClient != null && item.Owner == remoteClient.AgentId)
- {
- remoteClient.SendInventoryItemCreateUpdate(item);
- }
- else
- {
- ScenePresence notifyUser = GetScenePresence(item.Owner);
- if (notifyUser != null)
- {
- notifyUser.ControllingClient.SendInventoryItemCreateUpdate(item);
- }
- }
- }
- }
-
- return assetID;
- }
-
- public void updateKnownAsset(IClientAPI remoteClient, SceneObjectGroup grp, UUID assetID, UUID agentID)
- {
- SceneObjectGroup objectGroup = grp;
- if (objectGroup != null)
- {
- if (!grp.HasGroupChanged)
- {
- m_log.InfoFormat("[ATTACHMENT]: Save request for {0} which is unchanged", grp.UUID);
- return;
- }
-
- m_log.InfoFormat(
- "[ATTACHMENT]: Updating asset for attachment {0}, attachpoint {1}",
- grp.UUID, grp.GetAttachmentPoint());
-
- string sceneObjectXml = objectGroup.ToXmlString();
-
- CachedUserInfo userInfo =
- CommsManager.UserProfileCacheService.GetUserDetails(agentID);
- if (userInfo != null && userInfo.RootFolder != null)
- {
- Queue searchfolders = new Queue();
- searchfolders.Enqueue(userInfo.RootFolder);
-
- UUID foundFolder = UUID.Zero;
- InventoryItemBase item = null;
-
- // search through folders to find the asset.
- while (searchfolders.Count > 0)
- {
- InventoryFolderImpl fld = searchfolders.Dequeue();
- lock (fld)
- {
- if (fld != null)
- {
- if (fld.Items.ContainsKey(assetID))
- {
- item = fld.Items[assetID];
- foundFolder = fld.ID;
- searchfolders.Clear();
- break;
- }
- else
- {
- foreach (InventoryFolderImpl subfld in fld.RequestListOfFolderImpls())
- {
- searchfolders.Enqueue(subfld);
- }
- }
- }
- }
- }
-
- if (foundFolder != UUID.Zero && item != null)
- {
- AssetBase asset = CreateAsset(
- objectGroup.GetPartName(objectGroup.LocalId),
- objectGroup.GetPartDescription(objectGroup.LocalId),
- (sbyte)AssetType.Object,
- Utils.StringToBytes(sceneObjectXml));
- AssetCache.AddAsset(asset);
-
- item.AssetID = asset.Metadata.FullID;
- item.Description = asset.Metadata.Description;
- item.Name = asset.Metadata.Name;
- item.AssetType = asset.Metadata.Type;
- item.InvType = (int)InventoryType.Object;
- item.Folder = foundFolder;
-
- userInfo.UpdateItem(item);
-
- // this gets called when the agent loggs off!
- if (remoteClient != null)
- {
- remoteClient.SendInventoryItemCreateUpdate(item);
- }
- }
- }
- }
- }
-
- public UUID attachObjectAssetStore(IClientAPI remoteClient, SceneObjectGroup grp, UUID AgentId, out UUID itemID)
- {
- itemID = UUID.Zero;
- if (grp != null)
- {
- string sceneObjectXml = grp.ToXmlString();
-
- CachedUserInfo userInfo =
- CommsManager.UserProfileCacheService.GetUserDetails(AgentId);
- if (userInfo != null)
- {
- AssetBase asset = CreateAsset(
- grp.GetPartName(grp.LocalId),
- grp.GetPartDescription(grp.LocalId),
- (sbyte)AssetType.Object,
- Utils.StringToBytes(sceneObjectXml));
- AssetCache.AddAsset(asset);
-
- InventoryItemBase item = new InventoryItemBase();
- item.Creator = grp.RootPart.CreatorID;
- item.Owner = remoteClient.AgentId;
- item.ID = UUID.Random();
- item.AssetID = asset.Metadata.FullID;
- item.Description = asset.Metadata.Description;
- item.Name = asset.Metadata.Name;
- item.AssetType = asset.Metadata.Type;
- item.InvType = (int)InventoryType.Object;
-
- item.Folder = UUID.Zero; // Objects folder!
-
- if ((remoteClient.AgentId != grp.RootPart.OwnerID) && Permissions.PropagatePermissions())
- {
- item.BasePermissions = grp.RootPart.NextOwnerMask;
- item.CurrentPermissions = grp.RootPart.NextOwnerMask;
- item.NextPermissions = grp.RootPart.NextOwnerMask;
- item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask;
- item.GroupPermissions = grp.RootPart.GroupMask & grp.RootPart.NextOwnerMask;
- }
- else
- {
- item.BasePermissions = grp.RootPart.BaseMask;
- item.CurrentPermissions = grp.RootPart.OwnerMask;
- item.NextPermissions = grp.RootPart.NextOwnerMask;
- item.EveryOnePermissions = grp.RootPart.EveryoneMask;
- item.GroupPermissions = grp.RootPart.GroupMask;
- }
- item.CreationDate = Util.UnixTimeSinceEpoch();
-
- // sets assetID so client can show asset as 'attached' in inventory
- grp.SetFromAssetID(item.ID);
-
- userInfo.AddItem(item);
- remoteClient.SendInventoryItemCreateUpdate(item);
-
- itemID = item.ID;
- return item.AssetID;
- }
- return UUID.Zero;
- }
- return UUID.Zero;
- }
-
- ///
- /// Event Handler Rez an object into a scene
- /// Calls the non-void event handler
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public virtual void RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
- UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
- bool RezSelected, bool RemoveItem, UUID fromTaskID)
- {
- RezObject(
- remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
- RezSelected, RemoveItem, fromTaskID, false);
- }
-
- ///
- /// Rez an object into the scene from the user's inventory
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The SceneObjectGroup rezzed or null if rez was unsuccessful.
- public virtual SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
- UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
- bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
- {
- // Work out position details
- byte bRayEndIsIntersection = (byte)0;
-
- if (RayEndIsIntersection)
- {
- bRayEndIsIntersection = (byte)1;
- }
- else
- {
- bRayEndIsIntersection = (byte)0;
- }
-
- Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f);
-
-
- Vector3 pos = GetNewRezLocation(
- RayStart, RayEnd, RayTargetID, Quaternion.Identity,
- BypassRayCast, bRayEndIsIntersection,true,scale, false);
-
- // Rez object
- CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
- if (userInfo != null)
- {
- // Do NOT use HasReceivedInventory here, this is called
- // from within ItemReceive during login for attachments.
- // Using HasReceivedInventory here will break attachment
- // persistence!
- //
- if (userInfo.RootFolder != null)
- {
- InventoryItemBase item = userInfo.RootFolder.FindItem(itemID);
-
- if (item != null)
- {
- AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false);
-
- if (rezAsset != null)
- {
- UUID itemId = UUID.Zero;
-
- // If we have permission to copy then link the rezzed object back to the user inventory
- // item that it came from. This allows us to enable 'save object to inventory'
- if (!Permissions.BypassPermissions())
- {
- if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == (uint)PermissionMask.Copy)
- {
- itemId = item.ID;
- }
- }
-
- string xmlData = Utils.BytesToString(rezAsset.Data);
- SceneObjectGroup group = new SceneObjectGroup(itemId, xmlData, true);
-
- if (!Permissions.CanRezObject(
- group.Children.Count, remoteClient.AgentId, pos)
- && !attachment)
- {
- return null;
- }
-
- group.ResetIDs();
-
- AddNewSceneObject(group, true);
-
- // if attachment we set it's asset id so object updates can reflect that
- // if not, we set it's position in world.
- if (!attachment)
- {
- pos = GetNewRezLocation(
- RayStart, RayEnd, RayTargetID, Quaternion.Identity,
- BypassRayCast, bRayEndIsIntersection, true, group.GroupScale(), false);
- group.AbsolutePosition = pos;
- }
- else
- {
- group.SetFromAssetID(itemID);
- }
-
- SceneObjectPart rootPart = null;
- try
- {
- rootPart = group.GetChildPart(group.UUID);
- }
- catch (NullReferenceException)
- {
- string isAttachment = "";
-
- if (attachment)
- isAttachment = " Object was an attachment";
-
- m_log.Error("[AGENT INVENTORY]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment);
- }
-
- // Since renaming the item in the inventory does not affect the name stored
- // in the serialization, transfer the correct name from the inventory to the
- // object itself before we rez.
- rootPart.Name = item.Name;
- rootPart.Description = item.Description;
-
- List partList = new List(group.Children.Values);
-
- group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
- if (rootPart.OwnerID != item.Owner)
- {
- //Need to kill the for sale here
- rootPart.ObjectSaleType = 0;
- rootPart.SalePrice = 10;
-
- if (Permissions.PropagatePermissions())
- {
- if ((item.CurrentPermissions & 8) != 0)
- {
- foreach (SceneObjectPart part in partList)
- {
- part.EveryoneMask = item.EveryOnePermissions;
- part.NextOwnerMask = item.NextPermissions;
- part.GroupMask = 0; // DO NOT propagate here
- }
- }
- group.ApplyNextOwnerPermissions();
- }
- }
-
- foreach (SceneObjectPart part in partList)
- {
- if (part.OwnerID != item.Owner)
- {
- part.LastOwnerID = part.OwnerID;
- part.OwnerID = item.Owner;
- part.Inventory.ChangeInventoryOwner(item.Owner);
- }
- else if (((item.CurrentPermissions & 8) != 0) && (!attachment)) // Slam!
- {
- part.EveryoneMask = item.EveryOnePermissions;
- part.NextOwnerMask = item.NextPermissions;
-
- part.GroupMask = 0; // DO NOT propagate here
- }
- }
-
- rootPart.TrimPermissions();
-
- if (!attachment)
- {
- if (group.RootPart.Shape.PCode == (byte)PCode.Prim)
- {
- group.ClearPartAttachmentData();
- }
- }
-
- if (!attachment)
- {
- // Fire on_rez
- group.CreateScriptInstances(0, true, DefaultScriptEngine, 0);
-
- rootPart.ScheduleFullUpdate();
- }
-
- if (!Permissions.BypassPermissions())
- {
- if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
- {
- // If this is done on attachments, no
- // copy ones will be lost, so avoid it
- //
- if (!attachment)
- userInfo.DeleteItem(item.ID);
- }
- }
-
- return rootPart.ParentGroup;
- }
- }
- }
- else
- m_log.WarnFormat("[AGENT INVENTORY]: Root folder not found in {0}", RegionInfo.RegionName);
- }
- else
- m_log.WarnFormat("[AGENT INVENTORY]: User profile not found in {0}", RegionInfo.RegionName);
-
- return null;
- }
-
- ///
- /// Rez an object into the scene from a prim's inventory.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The SceneObjectGroup rezzed or null if rez was unsuccessful
- public virtual SceneObjectGroup RezObject(
- SceneObjectPart sourcePart, TaskInventoryItem item,
- Vector3 pos, Quaternion rot, Vector3 vel, int param)
- {
- // Rez object
- if (item != null)
- {
- UUID ownerID = item.OwnerID;
-
- AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false);
-
- if (rezAsset != null)
- {
- string xmlData = Utils.BytesToString(rezAsset.Data);
- SceneObjectGroup group = new SceneObjectGroup(xmlData, true);
-
- if (!Permissions.CanRezObject(group.Children.Count, ownerID, pos))
- {
- return null;
- }
- group.ResetIDs();
-
- AddNewSceneObject(group, true);
-
- // we set it's position in world.
- group.AbsolutePosition = pos;
-
- SceneObjectPart rootPart = group.GetChildPart(group.UUID);
-
- // Since renaming the item in the inventory does not affect the name stored
- // in the serialization, transfer the correct name from the inventory to the
- // object itself before we rez.
- rootPart.Name = item.Name;
- rootPart.Description = item.Description;
-
- List partList = new List(group.Children.Values);
-
- group.SetGroup(sourcePart.GroupID, null);
-
- if (rootPart.OwnerID != item.OwnerID)
- {
- if (Permissions.PropagatePermissions())
- {
- if ((item.CurrentPermissions & 8) != 0)
- {
- foreach (SceneObjectPart part in partList)
- {
- part.EveryoneMask = item.EveryonePermissions;
- part.NextOwnerMask = item.NextPermissions;
- }
- }
- group.ApplyNextOwnerPermissions();
- }
- }
-
- foreach (SceneObjectPart part in partList)
- {
- if (part.OwnerID != item.OwnerID)
- {
- part.LastOwnerID = part.OwnerID;
- part.OwnerID = item.OwnerID;
- part.Inventory.ChangeInventoryOwner(item.OwnerID);
- }
- else if ((item.CurrentPermissions & 8) != 0) // Slam!
- {
- part.EveryoneMask = item.EveryonePermissions;
- part.NextOwnerMask = item.NextPermissions;
- }
- }
- rootPart.TrimPermissions();
- if (group.RootPart.Shape.PCode == (byte)PCode.Prim)
- {
- group.ClearPartAttachmentData();
- }
- group.UpdateGroupRotation(rot);
- //group.ApplyPhysics(m_physicalPrim);
- if (group.RootPart.PhysActor != null && group.RootPart.PhysActor.IsPhysical && vel != Vector3.Zero)
- {
- group.RootPart.ApplyImpulse((vel * group.GetMass()), false);
- group.Velocity = vel;
- rootPart.ScheduleFullUpdate();
- }
- group.CreateScriptInstances(param, true, DefaultScriptEngine, 2);
- rootPart.ScheduleFullUpdate();
-
- if (!Permissions.BypassPermissions())
- {
- if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
- sourcePart.Inventory.RemoveInventoryItem(item.ItemID);
- }
- return rootPart.ParentGroup;
- }
- }
-
- return null;
- }
-
- public virtual bool returnObjects(SceneObjectGroup[] returnobjects, UUID AgentId)
- {
- foreach (SceneObjectGroup grp in returnobjects)
- {
- AddReturn(grp.OwnerID, grp.Name, grp.AbsolutePosition, "parcel owner return");
- DeRezObject(null, grp.RootPart.LocalId,
- grp.RootPart.GroupID, DeRezAction.Return, UUID.Zero);
- }
-
- return true;
- }
-
- public void SetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID, bool running)
- {
- SceneObjectPart part = GetSceneObjectPart(objectID);
- if (part == null)
- return;
-
- if (running)
- EventManager.TriggerStartScript(part.LocalId, itemID);
- else
- EventManager.TriggerStopScript(part.LocalId, itemID);
- }
-
- public UUID RezSingleAttachment(IClientAPI remoteClient, UUID itemID,
- uint AttachmentPt)
- {
- SceneObjectGroup att = m_sceneGraph.RezSingleAttachment(remoteClient, itemID, AttachmentPt);
-
- if (att == null)
- {
- DetachSingleAttachmentToInv(itemID, remoteClient);
- return UUID.Zero;
- }
-
- return RezSingleAttachment(att, remoteClient, itemID, AttachmentPt);
- }
-
- public UUID RezSingleAttachment(SceneObjectGroup att,
- IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
- {
- if (!att.IsDeleted)
- AttachmentPt = att.RootPart.AttachmentPoint;
-
- ScenePresence presence;
- if (TryGetAvatar(remoteClient.AgentId, out presence))
- {
- presence.Appearance.SetAttachment((int)AttachmentPt, itemID, att.UUID);
- IAvatarFactory ava = RequestModuleInterface();
- if (ava != null)
- {
- ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
- }
-
- }
- return att.UUID;
- }
-
- public void AttachObject(IClientAPI controllingClient, uint localID, uint attachPoint, Quaternion rot, Vector3 pos, bool silent)
- {
- m_sceneGraph.AttachObject(controllingClient, localID, attachPoint, rot, pos, silent);
- }
-
- public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
- {
- if (UUID.Zero == itemID)
- {
- m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error inventory item ID.");
- return;
- }
-
- if (0 == AttachmentPt)
- {
- m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error attachment point.");
- return;
- }
-
- if (null == att.RootPart)
- {
- m_log.Error("[SCENE INVENTORY]: Unable to save attachment for a prim without the rootpart!");
- return;
- }
-
- ScenePresence presence;
- if (TryGetAvatar(remoteClient.AgentId, out presence))
- {
- presence.Appearance.SetAttachment((int)AttachmentPt, itemID, att.UUID);
- IAvatarFactory ava = RequestModuleInterface();
- if (ava != null)
- {
- m_log.InfoFormat("[SCENE INVENTORY]: Saving avatar attachment. AgentID:{0} ItemID:{1} AttachmentPoint:{2}", remoteClient.AgentId, itemID, AttachmentPt);
- ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
- }
- }
- }
-
- public void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient)
- {
- SceneObjectPart part = GetSceneObjectPart(itemID);
- if (part == null || part.ParentGroup == null)
- return;
-
- UUID inventoryID = part.ParentGroup.GetFromAssetID();
-
- ScenePresence presence;
- if (TryGetAvatar(remoteClient.AgentId, out presence))
- {
- if (!Permissions.CanRezObject(part.ParentGroup.Children.Count, remoteClient.AgentId, presence.AbsolutePosition))
- return;
-
- presence.Appearance.DetachAttachment(itemID);
- IAvatarFactory ava = RequestModuleInterface();
- if (ava != null)
- {
- ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
- }
- part.ParentGroup.DetachToGround();
- CachedUserInfo userInfo =
- CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
- if (userInfo != null)
- {
- userInfo.DeleteItem(inventoryID);
- remoteClient.SendRemoveInventoryItem(inventoryID);
- }
- }
- }
-
- public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient)
- {
- ScenePresence presence;
- if (TryGetAvatar(remoteClient.AgentId, out presence))
- {
- presence.Appearance.DetachAttachment(itemID);
- IAvatarFactory ava = RequestModuleInterface();
- if (ava != null)
- {
- ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
- }
-
- }
-
- m_sceneGraph.DetachSingleAttachmentToInv(itemID, remoteClient);
- }
-
- public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
- {
- EventManager.TriggerGetScriptRunning(controllingClient, objectID, itemID);
- }
-
- void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List localIDs)
- {
- if (!Permissions.IsGod(remoteClient.AgentId))
- return;
-
- foreach (uint localID in localIDs)
- {
- SceneObjectPart part = GetSceneObjectPart(localID);
- if (part != null && part.ParentGroup != null)
- {
- part.ParentGroup.SetOwnerId(ownerID);
- part.Inventory.ChangeInventoryOwner(ownerID);
- part.ParentGroup.SetGroup(groupID, remoteClient);
- }
- }
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
deleted file mode 100644
index 3334e81..0000000
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ /dev/null
@@ -1,632 +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 System.Threading;
-using OpenMetaverse;
-using OpenMetaverse.Packets;
-using OpenSim.Framework;
-using OpenSim.Framework.Communications;
-using OpenSim.Framework.Communications.Cache;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- public partial class Scene
- {
- protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
- UUID fromID, bool fromAgent, bool broadcast)
- {
- OSChatMessage args = new OSChatMessage();
-
- args.Message = Utils.BytesToString(message);
- args.Channel = channel;
- args.Type = type;
- args.Position = fromPos;
- args.SenderUUID = fromID;
- args.Scene = this;
-
- if (fromAgent)
- {
- ScenePresence user = GetScenePresence(fromID);
- if (user != null)
- args.Sender = user.ControllingClient;
- }
- else
- {
- SceneObjectPart obj = GetSceneObjectPart(fromID);
- args.SenderObject = obj;
- }
-
- args.From = fromName;
- //args.
-
- if (broadcast)
- EventManager.TriggerOnChatBroadcast(this, args);
- else
- EventManager.TriggerOnChatFromWorld(this, args);
-
- }
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
- UUID fromID, bool fromAgent)
- {
- SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, false);
- }
-
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public void SimChatBroadcast(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
- UUID fromID, bool fromAgent)
- {
- SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, true);
- }
-
- ///
- /// Invoked when the client selects a prim.
- ///
- ///
- ///
- public void SelectPrim(uint primLocalID, IClientAPI remoteClient)
- {
- List EntityList = GetEntities();
-
- foreach (EntityBase ent in EntityList)
- {
- if (ent is SceneObjectGroup)
- {
- if (((SceneObjectGroup) ent).LocalId == primLocalID)
- {
- ((SceneObjectGroup) ent).GetProperties(remoteClient);
- ((SceneObjectGroup) ent).IsSelected = true;
- // A prim is only tainted if it's allowed to be edited by the person clicking it.
- if (Permissions.CanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId)
- || Permissions.CanMoveObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId))
- {
- EventManager.TriggerParcelPrimCountTainted();
- }
- break;
- }
- else
- {
- // We also need to check the children of this prim as they
- // can be selected as well and send property information
- bool foundPrim = false;
- foreach (KeyValuePair child in ((SceneObjectGroup) ent).Children)
- {
- if (child.Value.LocalId == primLocalID)
- {
- child.Value.GetProperties(remoteClient);
- foundPrim = true;
- break;
- }
- }
- if (foundPrim) break;
- }
- }
- }
- }
-
- ///
- /// Handle the deselection of a prim from the client.
- ///
- ///
- ///
- public void DeselectPrim(uint primLocalID, IClientAPI remoteClient)
- {
- SceneObjectPart part = GetSceneObjectPart(primLocalID);
- if (part == null)
- return;
-
- // The prim is in the process of being deleted.
- if (null == part.ParentGroup.RootPart)
- return;
-
- // A deselect packet contains all the local prims being deselected. However, since selection is still
- // group based we only want the root prim to trigger a full update - otherwise on objects with many prims
- // we end up sending many duplicate ObjectUpdates
- if (part.ParentGroup.RootPart.LocalId != part.LocalId)
- return;
-
- bool isAttachment = false;
-
- // This is wrong, wrong, wrong. Selection should not be
- // handled by group, but by prim. Legacy cruft.
- // TODO: Make selection flagging per prim!
- //
- part.ParentGroup.IsSelected = false;
-
- if (part.ParentGroup.IsAttachment)
- isAttachment = true;
- else
- part.ParentGroup.ScheduleGroupForFullUpdate();
-
- // If it's not an attachment, and we are allowed to move it,
- // then we might have done so. If we moved across a parcel
- // boundary, we will need to recount prims on the parcels.
- // For attachments, that makes no sense.
- //
- if (!isAttachment)
- {
- if (Permissions.CanEditObject(
- part.UUID, remoteClient.AgentId)
- || Permissions.CanMoveObject(
- part.UUID, remoteClient.AgentId))
- EventManager.TriggerParcelPrimCountTainted();
- }
- }
-
- public virtual void ProcessMoneyTransferRequest(UUID source, UUID destination, int amount,
- int transactiontype, string description)
- {
- EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(source, destination, amount,
- transactiontype, description);
-
- EventManager.TriggerMoneyTransfer(this, args);
- }
-
- public virtual void ProcessParcelBuy(UUID agentId, UUID groupId, bool final, bool groupOwned,
- bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated)
- {
- EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(agentId, groupId, final, groupOwned,
- removeContribution, parcelLocalID, parcelArea,
- parcelPrice, authenticated);
-
- // First, allow all validators a stab at it
- m_eventManager.TriggerValidateLandBuy(this, args);
-
- // Then, check validation and transfer
- m_eventManager.TriggerLandBuy(this, args);
- }
-
- public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List surfaceArgs)
- {
- List EntityList = GetEntities();
-
- SurfaceTouchEventArgs surfaceArg = null;
- if (surfaceArgs != null && surfaceArgs.Count > 0)
- surfaceArg = surfaceArgs[0];
-
- foreach (EntityBase ent in EntityList)
- {
- if (ent is SceneObjectGroup)
- {
- SceneObjectGroup obj = ent as SceneObjectGroup;
- if (obj != null)
- {
- // Is this prim part of the group
- if (obj.HasChildPrim(localID))
- {
- // Currently only grab/touch for the single prim
- // the client handles rez correctly
- obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
-
- SceneObjectPart part = obj.GetChildPart(localID);
-
- // If the touched prim handles touches, deliver it
- // If not, deliver to root prim
- if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
- EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
- else
- EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
-
- return;
- }
- }
- }
- }
- }
-
- public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient)
- {
- List EntityList = GetEntities();
-
- foreach (EntityBase ent in EntityList)
- {
- if (ent is SceneObjectGroup)
- {
- SceneObjectGroup obj = ent as SceneObjectGroup;
-
- // Is this prim part of the group
- if (obj.HasChildPrim(localID))
- {
- SceneObjectPart part=obj.GetChildPart(localID);
- if (part != null)
- {
- // If the touched prim handles touches, deliver it
- // If not, deliver to root prim
- if ((part.ScriptEvents & scriptEvents.touch_end) != 0)
- EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient);
- else
- EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient);
-
- return;
- }
- return;
- }
- }
- }
- }
-
- public void ProcessAvatarPickerRequest(IClientAPI client, UUID avatarID, UUID RequestID, string query)
- {
- //EventManager.TriggerAvatarPickerRequest();
-
- List AvatarResponses = new List();
- AvatarResponses = m_sceneGridService.GenerateAgentPickerRequestResponse(RequestID, query);
-
- AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply);
- // TODO: don't create new blocks if recycling an old packet
-
- AvatarPickerReplyPacket.DataBlock[] searchData =
- new AvatarPickerReplyPacket.DataBlock[AvatarResponses.Count];
- AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock();
-
- agentData.AgentID = avatarID;
- agentData.QueryID = RequestID;
- replyPacket.AgentData = agentData;
- //byte[] bytes = new byte[AvatarResponses.Count*32];
-
- int i = 0;
- foreach (AvatarPickerAvatar item in AvatarResponses)
- {
- UUID translatedIDtem = item.AvatarID;
- searchData[i] = new AvatarPickerReplyPacket.DataBlock();
- searchData[i].AvatarID = translatedIDtem;
- searchData[i].FirstName = Utils.StringToBytes((string) item.firstName);
- searchData[i].LastName = Utils.StringToBytes((string) item.lastName);
- i++;
- }
- if (AvatarResponses.Count == 0)
- {
- searchData = new AvatarPickerReplyPacket.DataBlock[0];
- }
- replyPacket.Data = searchData;
-
- AvatarPickerReplyAgentDataArgs agent_data = new AvatarPickerReplyAgentDataArgs();
- agent_data.AgentID = replyPacket.AgentData.AgentID;
- agent_data.QueryID = replyPacket.AgentData.QueryID;
-
- List data_args = new List();
- for (i = 0; i < replyPacket.Data.Length; i++)
- {
- AvatarPickerReplyDataArgs data_arg = new AvatarPickerReplyDataArgs();
- data_arg.AvatarID = replyPacket.Data[i].AvatarID;
- data_arg.FirstName = replyPacket.Data[i].FirstName;
- data_arg.LastName = replyPacket.Data[i].LastName;
- data_args.Add(data_arg);
- }
- client.SendAvatarPickerReply(agent_data, data_args);
- }
-
- public void ProcessScriptReset(IClientAPI remoteClient, UUID objectID,
- UUID itemID)
- {
- SceneObjectPart part=GetSceneObjectPart(objectID);
- if (part == null)
- return;
-
- if (Permissions.CanResetScript(objectID, itemID, remoteClient.AgentId))
- {
- EventManager.TriggerScriptReset(part.LocalId, itemID);
- }
- }
-
- ///
- /// Handle a fetch inventory request from the client
- ///
- ///
- ///
- ///
- public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID)
- {
- if (ownerID == CommsManager.UserProfileCacheService.LibraryRoot.Owner)
- {
- //Console.WriteLine("request info for library item");
- return;
- }
-
- CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (null == userProfile)
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
- remoteClient.Name, remoteClient.AgentId);
- return;
- }
-
- if (userProfile.HasReceivedInventory)
- {
- InventoryItemBase item = null;
- if (userProfile.RootFolder == null)
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: User {0} {1} does not have a root folder.",
- remoteClient.Name, remoteClient.AgentId);
- else
- item = userProfile.RootFolder.FindItem(itemID);
-
- if (item != null)
- {
- remoteClient.SendInventoryItemDetails(ownerID, item);
- }
- }
- }
-
- ///
- /// Tell the client about the various child items and folders contained in the requested folder.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public void HandleFetchInventoryDescendents(IClientAPI remoteClient, UUID folderID, UUID ownerID,
- bool fetchFolders, bool fetchItems, int sortOrder)
- {
- // FIXME MAYBE: We're not handling sortOrder!
-
- // TODO: This code for looking in the folder for the library should be folded back into the
- // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc.
- // can be handled transparently).
- InventoryFolderImpl fold = null;
- if ((fold = CommsManager.UserProfileCacheService.LibraryRoot.FindFolder(folderID)) != null)
- {
- remoteClient.SendInventoryFolderDetails(
- fold.Owner, folderID, fold.RequestListOfItems(),
- fold.RequestListOfFolders(), fetchFolders, fetchItems);
- return;
- }
-
- CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (null == userProfile)
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
- remoteClient.Name, remoteClient.AgentId);
- return;
- }
-
- userProfile.SendInventoryDecendents(remoteClient, folderID, fetchFolders, fetchItems);
- }
-
- ///
- /// Handle the caps inventory descendents fetch.
- ///
- /// Since the folder structure is sent to the client on login, I believe we only need to handle items.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// null if the inventory look up failed
- public List HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
- bool fetchFolders, bool fetchItems, int sortOrder)
- {
-// m_log.DebugFormat(
-// "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
-// fetchFolders, fetchItems, folderID, agentID);
-
- // FIXME MAYBE: We're not handling sortOrder!
-
- // TODO: This code for looking in the folder for the library should be folded back into the
- // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc.
- // can be handled transparently).
- InventoryFolderImpl fold;
- if ((fold = CommsManager.UserProfileCacheService.LibraryRoot.FindFolder(folderID)) != null)
- {
- return fold.RequestListOfItems();
- }
-
- CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(agentID);
-
- if (null == userProfile)
- {
- m_log.ErrorFormat("[AGENT INVENTORY]: Could not find user profile for {0}", agentID);
- return null;
- }
-
- // XXX: When a client crosses into a scene, their entire inventory is fetched
- // asynchronously. If the client makes a request before the inventory is received, we need
- // to give the inventory a chance to come in.
- //
- // This is a crude way of dealing with that by retrying the lookup. It's not quite as bad
- // in CAPS as doing this with the udp request, since here it won't hold up other packets.
- // In fact, here we'll be generous and try for longer.
- if (!userProfile.HasReceivedInventory)
- {
- int attempts = 0;
- while (attempts++ < 30)
- {
- m_log.DebugFormat(
- "[INVENTORY CACHE]: Poll number {0} for inventory items in folder {1} for user {2}",
- attempts, folderID, agentID);
-
- Thread.Sleep(2000);
-
- if (userProfile.HasReceivedInventory)
- {
- break;
- }
- }
- }
-
- if (userProfile.HasReceivedInventory)
- {
- if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null)
- {
- return fold.RequestListOfItems();
- }
- else
- {
- m_log.WarnFormat(
- "[AGENT INVENTORY]: Could not find folder {0} requested by user {1}",
- folderID, agentID);
- return null;
- }
- }
- else
- {
- m_log.ErrorFormat("[INVENTORY CACHE]: Could not find root folder for user {0}", agentID);
- return null;
- }
- }
-
- ///
- /// Handle an inventory folder creation request from the client.
- ///
- ///
- ///
- ///
- ///
- ///
- public void HandleCreateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort folderType,
- string folderName, UUID parentID)
- {
- CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (null == userProfile)
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
- remoteClient.Name, remoteClient.AgentId);
- return;
- }
-
- if (!userProfile.CreateFolder(folderName, folderID, folderType, parentID))
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to move create folder for user {0} {1}",
- remoteClient.Name, remoteClient.AgentId);
- }
- }
-
- ///
- /// Handle a client request to update the inventory folder
- ///
- ///
- /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
- /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
- /// and needs to be changed.
- ///
- ///
- ///
- ///
- ///
- ///
- public void HandleUpdateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort type, string name,
- UUID parentID)
- {
-// m_log.DebugFormat(
-// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
-
- CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (null == userProfile)
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
- remoteClient.Name, remoteClient.AgentId);
- return;
- }
-
- if (!userProfile.UpdateFolder(name, folderID, type, parentID))
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to update folder for user {0} {1}",
- remoteClient.Name, remoteClient.AgentId);
- }
- }
-
- ///
- /// Handle an inventory folder move request from the client.
- ///
- ///
- ///
- ///
- public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID)
- {
- CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (null == userProfile)
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
- remoteClient.Name, remoteClient.AgentId);
- return;
- }
-
- if (!userProfile.MoveFolder(folderID, parentID))
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to move folder {0} to {1} for user {2}",
- folderID, parentID, remoteClient.Name);
- }
- }
-
- ///
- /// This should delete all the items and folders in the given directory.
- ///
- ///
- ///
- public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID)
- {
- CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
-
- if (null == userProfile)
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
- remoteClient.Name, remoteClient.AgentId);
- return;
- }
-
- if (!userProfile.PurgeFolder(folderID))
- {
- m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to purge folder for user {0} {1}",
- remoteClient.Name, remoteClient.AgentId);
- }
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Permissions.cs b/OpenSim/Region/Environment/Scenes/Scene.Permissions.cs
deleted file mode 100644
index 0872128..0000000
--- a/OpenSim/Region/Environment/Scenes/Scene.Permissions.cs
+++ /dev/null
@@ -1,1334 +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.Collections.Generic;
-using System.Text;
-using OpenMetaverse;
-using OpenSim.Framework;
-using OpenSim.Region.Environment.Interfaces;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- public class ScenePermissions
- {
- private Scene m_scene;
-
- public ScenePermissions(Scene scene)
- {
- m_scene = scene;
- }
-
- #region Object Permission Checks
-
- public delegate uint GenerateClientFlagsHandler(UUID userID, UUID objectIDID);
- private List GenerateClientFlagsCheckFunctions = new List();
-
- public void AddGenerateClientFlagsHandler(GenerateClientFlagsHandler delegateFunc)
- {
- if (!GenerateClientFlagsCheckFunctions.Contains(delegateFunc))
- GenerateClientFlagsCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveGenerateClientFlagsHandler(GenerateClientFlagsHandler delegateFunc)
- {
- if (GenerateClientFlagsCheckFunctions.Contains(delegateFunc))
- GenerateClientFlagsCheckFunctions.Remove(delegateFunc);
- }
-
- public uint GenerateClientFlags(UUID userID, UUID objectID)
- {
- SceneObjectPart part=m_scene.GetSceneObjectPart(objectID);
-
- if (part == null)
- return 0;
-
- // libomv will moan about PrimFlags.ObjectYouOfficer being
- // obsolete...
- #pragma warning disable 0612
- uint perms=part.GetEffectiveObjectFlags() |
- (uint)PrimFlags.ObjectModify |
- (uint)PrimFlags.ObjectCopy |
- (uint)PrimFlags.ObjectMove |
- (uint)PrimFlags.ObjectTransfer |
- (uint)PrimFlags.ObjectYouOwner |
- (uint)PrimFlags.ObjectAnyOwner |
- (uint)PrimFlags.ObjectOwnerModify |
- (uint)PrimFlags.ObjectYouOfficer;
- #pragma warning restore 0612
-
- foreach (GenerateClientFlagsHandler check in GenerateClientFlagsCheckFunctions)
- {
- perms &= check(userID, objectID);
- }
- return perms;
- }
-
- public delegate void SetBypassPermissionsHandler(bool value);
- private List SetBypassPermissionsCheckFunctions = new List();
-
- public void AddSetBypassPermissionsHandler(SetBypassPermissionsHandler delegateFunc)
- {
- if (!SetBypassPermissionsCheckFunctions.Contains(delegateFunc))
- SetBypassPermissionsCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveSetBypassPermissionsHandler(SetBypassPermissionsHandler delegateFunc)
- {
- if (SetBypassPermissionsCheckFunctions.Contains(delegateFunc))
- SetBypassPermissionsCheckFunctions.Remove(delegateFunc);
- }
-
- public void SetBypassPermissions(bool value)
- {
- foreach (SetBypassPermissionsHandler check in SetBypassPermissionsCheckFunctions)
- {
- check(value);
- }
- }
-
- public delegate bool BypassPermissionsHandler();
- private List BypassPermissionsCheckFunctions = new List();
-
- public void AddBypassPermissionsHandler(BypassPermissionsHandler delegateFunc)
- {
- if (!BypassPermissionsCheckFunctions.Contains(delegateFunc))
- BypassPermissionsCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveBypassPermissionsHandler(BypassPermissionsHandler delegateFunc)
- {
- if (BypassPermissionsCheckFunctions.Contains(delegateFunc))
- BypassPermissionsCheckFunctions.Remove(delegateFunc);
- }
-
- public bool BypassPermissions()
- {
- foreach (BypassPermissionsHandler check in BypassPermissionsCheckFunctions)
- {
- if (check() == false)
- {
- return false;
- }
- }
- return true;
- }
-
- public delegate bool PropagatePermissionsHandler();
- private List PropagatePermissionsCheckFunctions = new List();
-
- public void AddPropagatePermissionsHandler(PropagatePermissionsHandler delegateFunc)
- {
- if (!PropagatePermissionsCheckFunctions.Contains(delegateFunc))
- PropagatePermissionsCheckFunctions.Add(delegateFunc);
- }
-
- public void RemovePropagatePermissionsHandler(PropagatePermissionsHandler delegateFunc)
- {
- if (PropagatePermissionsCheckFunctions.Contains(delegateFunc))
- PropagatePermissionsCheckFunctions.Remove(delegateFunc);
- }
-
- public bool PropagatePermissions()
- {
- foreach (PropagatePermissionsHandler check in PropagatePermissionsCheckFunctions)
- {
- if (check() == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #region REZ OBJECT
- public delegate bool CanRezObjectHandler(int objectCount, UUID owner, Vector3 objectPosition, Scene scene);
- private List CanRezObjectCheckFunctions = new List();
-
- public void AddRezObjectHandler(CanRezObjectHandler delegateFunc)
- {
- if (!CanRezObjectCheckFunctions.Contains(delegateFunc))
- CanRezObjectCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveRezObjectHandler(CanRezObjectHandler delegateFunc)
- {
- if (CanRezObjectCheckFunctions.Contains(delegateFunc))
- CanRezObjectCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanRezObject(int objectCount, UUID owner, Vector3 objectPosition)
- {
- foreach (CanRezObjectHandler check in CanRezObjectCheckFunctions)
- {
- if (check(objectCount, owner,objectPosition, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region DELETE OBJECT
- public delegate bool CanDeleteObjectHandler(UUID objectID, UUID deleter, Scene scene);
- private List CanDeleteObjectCheckFunctions = new List();
-
- public void AddDeleteObjectHandler(CanDeleteObjectHandler delegateFunc)
- {
- if (!CanDeleteObjectCheckFunctions.Contains(delegateFunc))
- CanDeleteObjectCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveDeleteObjectHandler(CanDeleteObjectHandler delegateFunc)
- {
- if (CanDeleteObjectCheckFunctions.Contains(delegateFunc))
- CanDeleteObjectCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanDeleteObject(UUID objectID, UUID deleter)
- {
- foreach (CanDeleteObjectHandler check in CanDeleteObjectCheckFunctions)
- {
- if (check(objectID,deleter,m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region TAKE OBJECT
- public delegate bool CanTakeObjectHandler(UUID objectID, UUID stealer, Scene scene);
- private List CanTakeObjectCheckFunctions = new List();
-
- public void AddTakeObjectHandler(CanTakeObjectHandler delegateFunc)
- {
- if (!CanTakeObjectCheckFunctions.Contains(delegateFunc))
- CanTakeObjectCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveTakeObjectHandler(CanTakeObjectHandler delegateFunc)
- {
- if (CanTakeObjectCheckFunctions.Contains(delegateFunc))
- CanTakeObjectCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanTakeObject(UUID objectID, UUID AvatarTakingUUID)
- {
- foreach (CanTakeObjectHandler check in CanTakeObjectCheckFunctions)
- {
- if (check(objectID, AvatarTakingUUID, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region TAKE COPY OBJECT
- public delegate bool CanTakeCopyObjectHandler(UUID objectID, UUID userID, Scene inScene);
- private List CanTakeCopyObjectCheckFunctions = new List();
-
- public void AddTakeCopyObjectHandler(CanTakeCopyObjectHandler delegateFunc)
- {
- if (!CanTakeCopyObjectCheckFunctions.Contains(delegateFunc))
- CanTakeCopyObjectCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveTakeCopyObjectHandler(CanTakeCopyObjectHandler delegateFunc)
- {
- if (CanTakeCopyObjectCheckFunctions.Contains(delegateFunc))
- CanTakeCopyObjectCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanTakeCopyObject(UUID objectID, UUID userID)
- {
- foreach (CanTakeCopyObjectHandler check in CanTakeCopyObjectCheckFunctions)
- {
- if (check(objectID,userID,m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region DUPLICATE OBJECT
- public delegate bool CanDuplicateObjectHandler(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition);
- private List CanDuplicateObjectCheckFunctions = new List();
-
- public void AddDuplicateObjectHandler(CanDuplicateObjectHandler delegateFunc)
- {
- if (!CanDuplicateObjectCheckFunctions.Contains(delegateFunc))
- CanDuplicateObjectCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveDuplicateObjectHandler(CanDuplicateObjectHandler delegateFunc)
- {
- if (CanDuplicateObjectCheckFunctions.Contains(delegateFunc))
- CanDuplicateObjectCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanDuplicateObject(int objectCount, UUID objectID, UUID owner, Vector3 objectPosition)
- {
- foreach (CanDuplicateObjectHandler check in CanDuplicateObjectCheckFunctions)
- {
- if (check(objectCount, objectID, owner, m_scene, objectPosition) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region EDIT OBJECT
- public delegate bool CanEditObjectHandler(UUID objectID, UUID editorID, Scene scene);
- private List CanEditObjectCheckFunctions = new List();
-
- public void AddEditObjectHandler(CanEditObjectHandler delegateFunc)
- {
- if (!CanEditObjectCheckFunctions.Contains(delegateFunc))
- CanEditObjectCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveEditObjectHandler(CanEditObjectHandler delegateFunc)
- {
- if (CanEditObjectCheckFunctions.Contains(delegateFunc))
- CanEditObjectCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanEditObject(UUID objectID, UUID editorID)
- {
- foreach (CanEditObjectHandler check in CanEditObjectCheckFunctions)
- {
- if (check(objectID, editorID, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- public delegate bool CanEditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene);
- private List CanEditObjectInventoryCheckFunctions = new List();
-
- public void AddEditObjectInventoryHandler(CanEditObjectInventoryHandler delegateFunc)
- {
- if (!CanEditObjectInventoryCheckFunctions.Contains(delegateFunc))
- CanEditObjectInventoryCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveEditObjectInventoryHandler(CanEditObjectInventoryHandler delegateFunc)
- {
- if (CanEditObjectInventoryCheckFunctions.Contains(delegateFunc))
- CanEditObjectInventoryCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanEditObjectInventory(UUID objectID, UUID editorID)
- {
- foreach (CanEditObjectInventoryHandler check in CanEditObjectInventoryCheckFunctions)
- {
- if (check(objectID, editorID, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region MOVE OBJECT
- public delegate bool CanMoveObjectHandler(UUID objectID, UUID moverID, Scene scene);
- private List CanMoveObjectCheckFunctions = new List();
-
- public void AddMoveObjectHandler(CanMoveObjectHandler delegateFunc)
- {
- if (!CanMoveObjectCheckFunctions.Contains(delegateFunc))
- CanMoveObjectCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveMoveObjectHandler(CanMoveObjectHandler delegateFunc)
- {
- if (CanMoveObjectCheckFunctions.Contains(delegateFunc))
- CanMoveObjectCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanMoveObject(UUID objectID, UUID moverID)
- {
- foreach (CanMoveObjectHandler check in CanMoveObjectCheckFunctions)
- {
- if (check(objectID,moverID,m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region OBJECT ENTRY
- public delegate bool CanObjectEntryHandler(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene);
- private List CanObjectEntryCheckFunctions = new List();
-
- public void AddObjectEntryHandler(CanObjectEntryHandler delegateFunc)
- {
- if (!CanObjectEntryCheckFunctions.Contains(delegateFunc))
- CanObjectEntryCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveObjectEntryHandler(CanObjectEntryHandler delegateFunc)
- {
- if (CanObjectEntryCheckFunctions.Contains(delegateFunc))
- CanObjectEntryCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanObjectEntry(UUID objectID, bool enteringRegion, Vector3 newPoint)
- {
- foreach (CanObjectEntryHandler check in CanObjectEntryCheckFunctions)
- {
- if (check(objectID, enteringRegion, newPoint, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region RETURN OBJECT
- public delegate bool CanReturnObjectHandler(UUID objectID, UUID returnerID, Scene scene);
- private List CanReturnObjectCheckFunctions = new List();
-
- public void AddReturnObjectHandler(CanReturnObjectHandler delegateFunc)
- {
- if (!CanReturnObjectCheckFunctions.Contains(delegateFunc))
- CanReturnObjectCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveReturnObjectHandler(CanReturnObjectHandler delegateFunc)
- {
- if (CanReturnObjectCheckFunctions.Contains(delegateFunc))
- CanReturnObjectCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanReturnObject(UUID objectID, UUID returnerID)
- {
- foreach (CanReturnObjectHandler check in CanReturnObjectCheckFunctions)
- {
- if (check(objectID,returnerID,m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region INSTANT MESSAGE
- public delegate bool CanInstantMessageHandler(UUID user, UUID target, Scene startScene);
- private List CanInstantMessageCheckFunctions = new List();
-
- public void AddInstantMessageHandler(CanInstantMessageHandler delegateFunc)
- {
- if (!CanInstantMessageCheckFunctions.Contains(delegateFunc))
- CanInstantMessageCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveInstantMessageHandler(CanInstantMessageHandler delegateFunc)
- {
- if (CanInstantMessageCheckFunctions.Contains(delegateFunc))
- CanInstantMessageCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanInstantMessage(UUID user, UUID target)
- {
- foreach (CanInstantMessageHandler check in CanInstantMessageCheckFunctions)
- {
- if (check(user, target, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region INVENTORY TRANSFER
- public delegate bool CanInventoryTransferHandler(UUID user, UUID target, Scene startScene);
- private List CanInventoryTransferCheckFunctions = new List();
-
- public void AddInventoryTransferHandler(CanInventoryTransferHandler delegateFunc)
- {
- if (!CanInventoryTransferCheckFunctions.Contains(delegateFunc))
- CanInventoryTransferCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveInventoryTransferHandler(CanInventoryTransferHandler delegateFunc)
- {
- if (CanInventoryTransferCheckFunctions.Contains(delegateFunc))
- CanInventoryTransferCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanInventoryTransfer(UUID user, UUID target)
- {
- foreach (CanInventoryTransferHandler check in CanInventoryTransferCheckFunctions)
- {
- if (check(user, target, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region VIEW SCRIPT
- public delegate bool CanViewScriptHandler(UUID script, UUID objectID, UUID user, Scene scene);
- private List CanViewScriptCheckFunctions = new List();
-
- public void AddViewScriptHandler(CanViewScriptHandler delegateFunc)
- {
- if (!CanViewScriptCheckFunctions.Contains(delegateFunc))
- CanViewScriptCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveViewScriptHandler(CanViewScriptHandler delegateFunc)
- {
- if (CanViewScriptCheckFunctions.Contains(delegateFunc))
- CanViewScriptCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanViewScript(UUID script, UUID objectID, UUID user)
- {
- foreach (CanViewScriptHandler check in CanViewScriptCheckFunctions)
- {
- if (check(script, objectID, user, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- public delegate bool CanViewNotecardHandler(UUID script, UUID objectID, UUID user, Scene scene);
- private List CanViewNotecardCheckFunctions = new List();
-
- public void AddViewNotecardHandler(CanViewNotecardHandler delegateFunc)
- {
- if (!CanViewNotecardCheckFunctions.Contains(delegateFunc))
- CanViewNotecardCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveViewNotecardHandler(CanViewNotecardHandler delegateFunc)
- {
- if (CanViewNotecardCheckFunctions.Contains(delegateFunc))
- CanViewNotecardCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanViewNotecard(UUID script, UUID objectID, UUID user)
- {
- foreach (CanViewNotecardHandler check in CanViewNotecardCheckFunctions)
- {
- if (check(script, objectID, user, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region EDIT SCRIPT
- public delegate bool CanEditScriptHandler(UUID script, UUID objectID, UUID user, Scene scene);
- private List CanEditScriptCheckFunctions = new List();
-
- public void AddEditScriptHandler(CanEditScriptHandler delegateFunc)
- {
- if (!CanEditScriptCheckFunctions.Contains(delegateFunc))
- CanEditScriptCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveEditScriptHandler(CanEditScriptHandler delegateFunc)
- {
- if (CanEditScriptCheckFunctions.Contains(delegateFunc))
- CanEditScriptCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanEditScript(UUID script, UUID objectID, UUID user)
- {
- foreach (CanEditScriptHandler check in CanEditScriptCheckFunctions)
- {
- if (check(script, objectID, user, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- public delegate bool CanEditNotecardHandler(UUID notecard, UUID objectID, UUID user, Scene scene);
- private List CanEditNotecardCheckFunctions = new List();
-
- public void AddEditNotecardHandler(CanEditNotecardHandler delegateFunc)
- {
- if (!CanEditNotecardCheckFunctions.Contains(delegateFunc))
- CanEditNotecardCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveEditNotecardHandler(CanEditNotecardHandler delegateFunc)
- {
- if (CanEditNotecardCheckFunctions.Contains(delegateFunc))
- CanEditNotecardCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanEditNotecard(UUID script, UUID objectID, UUID user)
- {
- foreach (CanEditNotecardHandler check in CanEditNotecardCheckFunctions)
- {
- if (check(script, objectID, user, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region RUN SCRIPT (When Script Placed in Object)
- public delegate bool CanRunScriptHandler(UUID script, UUID objectID, UUID user, Scene scene);
- private List CanRunScriptCheckFunctions = new List();
-
- public void AddRunScriptHandler(CanRunScriptHandler delegateFunc)
- {
- if (!CanRunScriptCheckFunctions.Contains(delegateFunc))
- CanRunScriptCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveRunScriptHandler(CanRunScriptHandler delegateFunc)
- {
- if (CanRunScriptCheckFunctions.Contains(delegateFunc))
- CanRunScriptCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanRunScript(UUID script, UUID objectID, UUID user)
- {
- foreach (CanRunScriptHandler check in CanRunScriptCheckFunctions)
- {
- if (check(script, objectID, user, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region START SCRIPT (When Script run box is Checked after placed in object)
- public delegate bool CanStartScriptHandler(UUID script, UUID user, Scene scene);
- private List CanStartScriptCheckFunctions = new List();
-
- public void AddStartScriptHandler(CanStartScriptHandler delegateFunc)
- {
- if (!CanStartScriptCheckFunctions.Contains(delegateFunc))
- CanStartScriptCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveStartScriptHandler(CanStartScriptHandler delegateFunc)
- {
- if (CanStartScriptCheckFunctions.Contains(delegateFunc))
- CanStartScriptCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanStartScript(UUID script, UUID user)
- {
- foreach (CanStartScriptHandler check in CanStartScriptCheckFunctions)
- {
- if (check(script, user, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region STOP SCRIPT (When Script run box is unchecked after placed in object)
- public delegate bool CanStopScriptHandler(UUID script, UUID user, Scene scene);
- private List CanStopScriptCheckFunctions = new List();
-
- public void AddStopScriptHandler(CanStopScriptHandler delegateFunc)
- {
- if (!CanStopScriptCheckFunctions.Contains(delegateFunc))
- CanStopScriptCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveStopScriptHandler(CanStopScriptHandler delegateFunc)
- {
- if (CanStopScriptCheckFunctions.Contains(delegateFunc))
- CanStopScriptCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanStopScript(UUID script, UUID user)
- {
- foreach (CanStopScriptHandler check in CanStopScriptCheckFunctions)
- {
- if (check(script, user, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region RESET SCRIPT
- public delegate bool CanResetScriptHandler(UUID prim, UUID script, UUID user, Scene scene);
- private List CanResetScriptCheckFunctions = new List();
-
- public void AddResetScriptHandler(CanResetScriptHandler delegateFunc)
- {
- if (!CanResetScriptCheckFunctions.Contains(delegateFunc))
- CanResetScriptCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveResetScriptHandler(CanResetScriptHandler delegateFunc)
- {
- if (CanResetScriptCheckFunctions.Contains(delegateFunc))
- CanResetScriptCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanResetScript(UUID prim, UUID script, UUID user)
- {
- foreach (CanResetScriptHandler check in CanResetScriptCheckFunctions)
- {
- if (check(prim, script, user, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region TERRAFORM LAND
- public delegate bool CanTerraformLandHandler(UUID user, Vector3 position, Scene requestFromScene);
- private List CanTerraformLandCheckFunctions = new List();
-
- public void AddTerraformLandHandler(CanTerraformLandHandler delegateFunc)
- {
- if (!CanTerraformLandCheckFunctions.Contains(delegateFunc))
- CanTerraformLandCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveTerraformLandHandler(CanTerraformLandHandler delegateFunc)
- {
- if (CanTerraformLandCheckFunctions.Contains(delegateFunc))
- CanTerraformLandCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanTerraformLand(UUID user, Vector3 pos)
- {
- foreach (CanTerraformLandHandler check in CanTerraformLandCheckFunctions)
- {
- if (check(user, pos, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region RUN CONSOLE COMMAND
- public delegate bool CanRunConsoleCommandHandler(UUID user, Scene requestFromScene);
- private List CanRunConsoleCommandCheckFunctions = new List();
-
- public void AddRunConsoleCommandHandler(CanRunConsoleCommandHandler delegateFunc)
- {
- if (!CanRunConsoleCommandCheckFunctions.Contains(delegateFunc))
- CanRunConsoleCommandCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveRunConsoleCommandHandler(CanRunConsoleCommandHandler delegateFunc)
- {
- if (CanRunConsoleCommandCheckFunctions.Contains(delegateFunc))
- CanRunConsoleCommandCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanRunConsoleCommand(UUID user)
- {
- foreach (CanRunConsoleCommandHandler check in CanRunConsoleCommandCheckFunctions)
- {
- if (check(user, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- #region CAN ISSUE ESTATE COMMAND
- public delegate bool CanIssueEstateCommandHandler(UUID user, Scene requestFromScene, bool ownerCommand);
- private List CanIssueEstateCommandCheckFunctions = new List();
-
- public void AddIssueEstateCommandHandler(CanIssueEstateCommandHandler delegateFunc)
- {
- if (!CanIssueEstateCommandCheckFunctions.Contains(delegateFunc))
- CanIssueEstateCommandCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveIssueEstateCommandHandler(CanIssueEstateCommandHandler delegateFunc)
- {
- if (CanIssueEstateCommandCheckFunctions.Contains(delegateFunc))
- CanIssueEstateCommandCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanIssueEstateCommand(UUID user, bool ownerCommand)
- {
- foreach (CanIssueEstateCommandHandler check in CanIssueEstateCommandCheckFunctions)
- {
- if (check(user, m_scene, ownerCommand) == false)
- {
- return false;
- }
- }
- return true;
- }
- #endregion
-
- #region CAN BE GODLIKE
- public delegate bool IsGodHandler(UUID user, Scene requestFromScene);
- private List IsGodCheckFunctions = new List();
-
- public void AddIsGodHandler(IsGodHandler delegateFunc)
- {
- if (!IsGodCheckFunctions.Contains(delegateFunc))
- IsGodCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveIsGodHandler(IsGodHandler delegateFunc)
- {
- if (IsGodCheckFunctions.Contains(delegateFunc))
- IsGodCheckFunctions.Remove(delegateFunc);
- }
-
- public bool IsGod(UUID user)
- {
- foreach (IsGodHandler check in IsGodCheckFunctions)
- {
- if (check(user, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
- #endregion
-
- #region EDIT PARCEL
- public delegate bool CanEditParcelHandler(UUID user, ILandObject parcel, Scene scene);
- private List CanEditParcelCheckFunctions = new List();
-
- public void AddEditParcelHandler(CanEditParcelHandler delegateFunc)
- {
- if (!CanEditParcelCheckFunctions.Contains(delegateFunc))
- CanEditParcelCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveEditParcelHandler(CanEditParcelHandler delegateFunc)
- {
- if (CanEditParcelCheckFunctions.Contains(delegateFunc))
- CanEditParcelCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanEditParcel(UUID user, ILandObject parcel)
- {
- foreach (CanEditParcelHandler check in CanEditParcelCheckFunctions)
- {
- if (check(user, parcel, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
- #endregion
-
- #region SELL PARCEL
- public delegate bool CanSellParcelHandler(UUID user, ILandObject parcel, Scene scene);
- private List CanSellParcelCheckFunctions = new List();
-
- public void AddSellParcelHandler(CanSellParcelHandler delegateFunc)
- {
- if (!CanSellParcelCheckFunctions.Contains(delegateFunc))
- CanSellParcelCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveSellParcelHandler(CanSellParcelHandler delegateFunc)
- {
- if (CanSellParcelCheckFunctions.Contains(delegateFunc))
- CanSellParcelCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanSellParcel(UUID user, ILandObject parcel)
- {
- foreach (CanSellParcelHandler check in CanSellParcelCheckFunctions)
- {
- if (check(user, parcel, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
- #endregion
-
- #region ABANDON PARCEL
- public delegate bool CanAbandonParcelHandler(UUID user, ILandObject parcel, Scene scene);
- private List CanAbandonParcelCheckFunctions = new List();
-
- public void AddAbandonParcelHandler(CanAbandonParcelHandler delegateFunc)
- {
- if (!CanAbandonParcelCheckFunctions.Contains(delegateFunc))
- CanAbandonParcelCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveAbandonParcelHandler(CanAbandonParcelHandler delegateFunc)
- {
- if (CanAbandonParcelCheckFunctions.Contains(delegateFunc))
- CanAbandonParcelCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanAbandonParcel(UUID user, ILandObject parcel)
- {
- foreach (CanAbandonParcelHandler check in CanAbandonParcelCheckFunctions)
- {
- if (check(user, parcel, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
- #endregion
-
- public delegate bool CanReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene);
- private List CanReclaimParcelCheckFunctions = new List();
-
- public void AddReclaimParcelHandler(CanReclaimParcelHandler delegateFunc)
- {
- if (!CanReclaimParcelCheckFunctions.Contains(delegateFunc))
- CanReclaimParcelCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveReclaimParcelHandler(CanReclaimParcelHandler delegateFunc)
- {
- if (CanReclaimParcelCheckFunctions.Contains(delegateFunc))
- CanReclaimParcelCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanReclaimParcel(UUID user, ILandObject parcel)
- {
- foreach (CanReclaimParcelHandler check in CanReclaimParcelCheckFunctions)
- {
- if (check(user, parcel, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
- public delegate bool CanBuyLandHandler(UUID user, ILandObject parcel, Scene scene);
- private List CanBuyLandCheckFunctions = new List();
-
- public void AddCanBuyLandHandler(CanBuyLandHandler delegateFunc)
- {
- if (!CanBuyLandCheckFunctions.Contains(delegateFunc))
- CanBuyLandCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveCanBuyLandHandler(CanBuyLandHandler delegateFunc)
- {
- if (CanBuyLandCheckFunctions.Contains(delegateFunc))
- CanBuyLandCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanBuyLand(UUID user, ILandObject parcel)
- {
- foreach (CanBuyLandHandler check in CanBuyLandCheckFunctions)
- {
- if (check(user, parcel, m_scene) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- public delegate bool CanLinkObjectHandler(UUID user, UUID objectID);
- private List CanLinkObjectCheckFunctions = new List();
-
- public void AddCanLinkObjectHandler(CanLinkObjectHandler delegateFunc)
- {
- if (!CanLinkObjectCheckFunctions.Contains(delegateFunc))
- CanLinkObjectCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveCanLinkObjectHandler(CanLinkObjectHandler delegateFunc)
- {
- if (CanLinkObjectCheckFunctions.Contains(delegateFunc))
- CanLinkObjectCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanLinkObject(UUID user, UUID objectID)
- {
- foreach (CanLinkObjectHandler check in CanLinkObjectCheckFunctions)
- {
- if (check(user, objectID) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- public delegate bool CanDelinkObjectHandler(UUID user, UUID objectID);
- private List CanDelinkObjectCheckFunctions = new List();
-
- public void AddCanDelinkObjectHandler(CanDelinkObjectHandler delegateFunc)
- {
- if (!CanDelinkObjectCheckFunctions.Contains(delegateFunc))
- CanDelinkObjectCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveCanDelinkObjectHandler(CanDelinkObjectHandler delegateFunc)
- {
- if (CanDelinkObjectCheckFunctions.Contains(delegateFunc))
- CanDelinkObjectCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanDelinkObject(UUID user, UUID objectID)
- {
- foreach (CanDelinkObjectHandler check in CanDelinkObjectCheckFunctions)
- {
- if (check(user, objectID) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- #endregion
-
- public delegate bool CanCreateObjectInventoryHandler(int invType, UUID objectID, UUID userID);
- private List CanCreateObjectInventoryCheckFunctions
- = new List();
-
-
- public void AddCanCreateObjectInventoryHandler(CanCreateObjectInventoryHandler delegateFunc)
- {
- if (!CanCreateObjectInventoryCheckFunctions.Contains(delegateFunc))
- CanCreateObjectInventoryCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveCanCreateObjectInventoryHandler(CanCreateObjectInventoryHandler delegateFunc)
- {
- if (CanCreateObjectInventoryCheckFunctions.Contains(delegateFunc))
- CanCreateObjectInventoryCheckFunctions.Remove(delegateFunc);
- }
-
- ///
- /// Check whether the specified user is allowed to directly create the given inventory type in a prim's
- /// inventory (e.g. the New Script button in the 1.21 Linden Lab client).
- ///
- ///
- ///
- ///
- ///
- public bool CanCreateObjectInventory(int invType, UUID objectID, UUID userID)
- {
- foreach (CanCreateObjectInventoryHandler check in CanCreateObjectInventoryCheckFunctions)
- {
- if (check(invType, objectID, userID) == false)
- {
- return false;
- }
- }
-
- return true;
- }
-
- public delegate bool CanCopyObjectInventoryHandler(UUID itemID, UUID objectID, UUID userID);
- private List CanCopyObjectInventoryCheckFunctions = new List();
-
- public void AddCanCopyObjectInventoryHandler(CanCopyObjectInventoryHandler delegateFunc)
- {
- if (!CanCopyObjectInventoryCheckFunctions.Contains(delegateFunc))
- CanCopyObjectInventoryCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveCanCopyObjectInventoryHandler(CanCopyObjectInventoryHandler delegateFunc)
- {
- if (CanCopyObjectInventoryCheckFunctions.Contains(delegateFunc))
- CanCopyObjectInventoryCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanCopyObjectInventory(UUID itemID, UUID objectID, UUID userID)
- {
- foreach (CanCopyObjectInventoryHandler check in CanCopyObjectInventoryCheckFunctions)
- {
- if (check(itemID, objectID, userID) == false)
- {
- return false;
- }
- }
- return true;
- }
-
- public delegate bool CanDeleteObjectInventoryHandler(UUID itemID, UUID objectID, UUID userID);
- private List CanDeleteObjectInventoryCheckFunctions
- = new List();
-
- public void AddCanDeleteObjectInventoryHandler(CanDeleteObjectInventoryHandler delegateFunc)
- {
- if (!CanDeleteObjectInventoryCheckFunctions.Contains(delegateFunc))
- CanDeleteObjectInventoryCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveCanDeleteObjectInventoryHandler(CanDeleteObjectInventoryHandler delegateFunc)
- {
- if (CanDeleteObjectInventoryCheckFunctions.Contains(delegateFunc))
- CanDeleteObjectInventoryCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanDeleteObjectInventory(UUID itemID, UUID objectID, UUID userID)
- {
- foreach (CanDeleteObjectInventoryHandler check in CanDeleteObjectInventoryCheckFunctions)
- {
- if (check(itemID, objectID, userID) == false)
- {
- return false;
- }
- }
-
- return true;
- }
-
- public delegate bool CanCreateUserInventoryHandler(int invType, UUID userID);
- private List CanCreateUserInventoryCheckFunctions
- = new List();
-
- public void AddCanCreateUserInventoryHandler(CanCreateUserInventoryHandler delegateFunc)
- {
- if (!CanCreateUserInventoryCheckFunctions.Contains(delegateFunc))
- CanCreateUserInventoryCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveCanCreateUserInventoryHandler(CanCreateUserInventoryHandler delegateFunc)
- {
- if (CanCreateUserInventoryCheckFunctions.Contains(delegateFunc))
- CanCreateUserInventoryCheckFunctions.Remove(delegateFunc);
- }
-
- ///
- /// Check whether the specified user is allowed to create the given inventory type in their inventory.
- ///
- ///
- ///
- ///
- public bool CanCreateUserInventory(int invType, UUID userID)
- {
- foreach (CanCreateUserInventoryHandler check in CanCreateUserInventoryCheckFunctions)
- {
- if (check(invType, userID) == false)
- {
- return false;
- }
- }
-
- return true;
- }
-
- public delegate bool CanEditUserInventoryHandler(UUID itemID, UUID userID);
- private List CanEditUserInventoryCheckFunctions
- = new List();
-
- public void AddCanEditUserInventoryHandler(CanEditUserInventoryHandler delegateFunc)
- {
- if (!CanEditUserInventoryCheckFunctions.Contains(delegateFunc))
- CanEditUserInventoryCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveCanEditUserInventoryHandler(CanEditUserInventoryHandler delegateFunc)
- {
- if (CanEditUserInventoryCheckFunctions.Contains(delegateFunc))
- CanEditUserInventoryCheckFunctions.Remove(delegateFunc);
- }
-
- ///
- /// Check whether the specified user is allowed to edit the given inventory item within their own inventory.
- ///
- ///
- ///
- ///
- public bool CanEditUserInventory(UUID itemID, UUID userID)
- {
- foreach (CanEditUserInventoryHandler check in CanEditUserInventoryCheckFunctions)
- {
- if (check(itemID, userID) == false)
- {
- return false;
- }
- }
-
- return true;
- }
-
- public delegate bool CanCopyUserInventoryHandler(UUID itemID, UUID userID);
- private List CanCopyUserInventoryCheckFunctions
- = new List();
-
- public void AddCanCopyUserInventoryHandler(CanCopyUserInventoryHandler delegateFunc)
- {
- if (!CanCopyUserInventoryCheckFunctions.Contains(delegateFunc))
- CanCopyUserInventoryCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveCanCopyUserInventoryHandler(CanCopyUserInventoryHandler delegateFunc)
- {
- if (CanCopyUserInventoryCheckFunctions.Contains(delegateFunc))
- CanCopyUserInventoryCheckFunctions.Remove(delegateFunc);
- }
-
- ///
- /// Check whether the specified user is allowed to copy the given inventory item from their own inventory.
- ///
- ///
- ///
- ///
- public bool CanCopyUserInventory(UUID itemID, UUID userID)
- {
- foreach (CanCopyUserInventoryHandler check in CanCopyUserInventoryCheckFunctions)
- {
- if (check(itemID, userID) == false)
- {
- return false;
- }
- }
-
- return true;
- }
-
- public delegate bool CanDeleteUserInventoryHandler(UUID itemID, UUID userID);
- private List CanDeleteUserInventoryCheckFunctions
- = new List();
-
- public void AddCanDeleteUserInventoryHandler(CanDeleteUserInventoryHandler delegateFunc)
- {
- if (!CanDeleteUserInventoryCheckFunctions.Contains(delegateFunc))
- CanDeleteUserInventoryCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveCanDeleteUserInventoryHandler(CanDeleteUserInventoryHandler delegateFunc)
- {
- if (CanDeleteUserInventoryCheckFunctions.Contains(delegateFunc))
- CanDeleteUserInventoryCheckFunctions.Remove(delegateFunc);
- }
-
- ///
- /// Check whether the specified user is allowed to edit the given inventory item within their own inventory.
- ///
- ///
- ///
- ///
- public bool CanDeleteUserInventory(UUID itemID, UUID userID)
- {
- foreach (CanDeleteUserInventoryHandler check in CanDeleteUserInventoryCheckFunctions)
- {
- if (check(itemID, userID) == false)
- {
- return false;
- }
- }
-
- return true;
- }
-
- public delegate bool CanTeleportHandler(UUID userID);
- private List CanTeleportCheckFunctions = new List();
-
- public void AddCanTeleportHandler(CanTeleportHandler delegateFunc)
- {
- if (!CanTeleportCheckFunctions.Contains(delegateFunc))
- CanTeleportCheckFunctions.Add(delegateFunc);
- }
-
- public void RemoveCanTeleportHandler(CanTeleportHandler delegateFunc)
- {
- if (CanTeleportCheckFunctions.Contains(delegateFunc))
- CanTeleportCheckFunctions.Remove(delegateFunc);
- }
-
- public bool CanTeleport(UUID userID)
- {
- foreach (CanTeleportHandler check in CanTeleportCheckFunctions)
- {
- if (check(userID) == false)
- {
- return false;
- }
- }
- return true;
- }
- }
-}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
deleted file mode 100644
index f798a0e..0000000
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ /dev/null
@@ -1,4237 +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 copyrightD
- * 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.Collections.Generic;
-using System.Drawing;
-using System.Drawing.Imaging;
-using System.IO;
-using System.Xml;
-using System.Threading;
-using System.Timers;
-using OpenMetaverse;
-using OpenMetaverse.Imaging;
-using OpenMetaverse.Packets;
-using OpenSim.Framework;
-using OpenSim.Framework.Communications;
-using OpenSim.Framework.Communications.Cache;
-using OpenSim.Framework.Servers;
-using OpenSim.Region.Environment.Interfaces;
-using OpenSim.Region.Interfaces;
-using OpenSim.Region.Environment.Modules.World.Terrain;
-using OpenSim.Region.Environment.Scenes.Scripting;
-using OpenSim.Region.Physics.Manager;
-using Nini.Config;
-using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
-using Image = System.Drawing.Image;
-using TPFlags = OpenSim.Framework.Constants.TeleportFlags;
-using Timer = System.Timers.Timer;
-using OSD = OpenMetaverse.StructuredData.OSD;
-
-namespace OpenSim.Region.Environment.Scenes
-{
- public delegate bool FilterAvatarList(ScenePresence avatar);
-
- public partial class Scene : SceneBase
- {
- public delegate void SynchronizeSceneHandler(Scene scene);
- public SynchronizeSceneHandler SynchronizeScene = null;
- public int splitID = 0;
-
- private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L;
- private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L;
-
- #region Fields
-
- protected Timer m_restartWaitTimer = new Timer();
-
- public SimStatsReporter StatsReporter;
-
- protected List m_regionRestartNotifyList = new List();
- protected List m_neighbours = new List();
-
- ///
- /// The scene graph for this scene
- ///
- /// TODO: Possibly stop other classes being able to manipulate this directly.
- public SceneGraph m_sceneGraph;
-
- ///
- /// Are we applying physics to any of the prims in this scene?
- ///
- public bool m_physicalPrim;
- public float m_maxNonphys = 65536;
- public float m_maxPhys = 10;
- public bool m_clampPrimSize = false;
- public bool m_trustBinaries = false;
- public bool m_allowScriptCrossings = false;
-
- public bool m_seeIntoRegionFromNeighbor;
- public int MaxUndoCount = 5;
- private int m_RestartTimerCounter;
- private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing
- private int m_incrementsof15seconds = 0;
- private volatile bool m_backingup = false;
-
- private Dictionary m_returns = new Dictionary();
-
- protected string m_simulatorVersion = "OpenSimulator Server";
-
- protected ModuleLoader m_moduleLoader;
- protected StorageManager m_storageManager;
- protected AgentCircuitManager m_authenticateHandler;
- public CommunicationsManager CommsManager;
-
- protected SceneCommunicationService m_sceneGridService;
-
- public SceneCommunicationService SceneGridService
- {
- get { return m_sceneGridService; }
- }
-
- public IXfer XferManager;
-
- protected IXMLRPC m_xmlrpcModule;
- protected IWorldComm m_worldCommModule;
- protected IAvatarFactory m_AvatarFactory;
- protected IConfigSource m_config;
- protected IRegionSerialiserModule m_serialiser;
- protected IInterregionCommsOut m_interregionCommsOut;
- protected IInterregionCommsIn m_interregionCommsIn;
- protected IDialogModule m_dialogModule;
- protected internal ICapabilitiesModule CapsModule;
-
- // Central Update Loop
-
- protected int m_fps = 10;
- protected int m_frame = 0;
- protected float m_timespan = 0.089f;
- protected DateTime m_lastupdate = DateTime.Now;
-
- protected float m_timedilation = 1.0f;
-
- private int m_update_physics = 1;
- private int m_update_entitymovement = 1;
- private int m_update_entities = 1; // Run through all objects checking for updates
- private int m_update_entitiesquick = 200; // Run through objects that have scheduled updates checking for updates
- private int m_update_presences = 1; // Update scene presence movements
- private int m_update_events = 1;
- private int m_update_backup = 200;
- private int m_update_terrain = 50;
- private int m_update_land = 1;
-
- private int frameMS = 0;
- private int physicsMS2 = 0;
- private int physicsMS = 0;
- private int otherMS = 0;
-
- private bool m_physics_enabled = true;
- private bool m_scripts_enabled = true;
- private string m_defaultScriptEngine;
- private int m_LastLogin = 0;
- private Thread HeartbeatThread;
- private volatile bool shuttingdown = false;
-
- private object m_deleting_scene_object = new object();
-
- // the minimum time that must elapse before a changed object will be considered for persisted
- public long m_dontPersistBefore = DEFAULT_MIN_TIME_FOR_PERSISTENCE * 10000000L;
- // the maximum time that must elapse before a changed object will be considered for persisted
- public long m_persistAfter = DEFAULT_MAX_TIME_FOR_PERSISTENCE * 10000000L;
-
- #endregion
-
- #region Properties
-
- public AgentCircuitManager AuthenticateHandler
- {
- get { return m_authenticateHandler; }
- }
-
- public SceneGraph SceneContents
- {
- get { return m_sceneGraph; }
- }
-
- // an instance to the physics plugin's Scene object.
- public PhysicsScene PhysicsScene
- {
- get { return m_sceneGraph.PhysicsScene; }
- set
- {
- // If we're not doing the initial set
- // Then we've got to remove the previous
- // event handler
- if (PhysicsScene != null && PhysicsScene.SupportsNINJAJoints)
- {
- PhysicsScene.OnJointMoved -= jointMoved;
- PhysicsScene.OnJointDeactivated -= jointDeactivated;
- PhysicsScene.OnJointErrorMessage -= jointErrorMessage;
- }
-
- m_sceneGraph.PhysicsScene = value;
-
- if (PhysicsScene != null && m_sceneGraph.PhysicsScene.SupportsNINJAJoints)
- {
- // register event handlers to respond to joint movement/deactivation
- PhysicsScene.OnJointMoved += jointMoved;
- PhysicsScene.OnJointDeactivated += jointDeactivated;
- PhysicsScene.OnJointErrorMessage += jointErrorMessage;
- }
-
- }
- }
-
- // This gets locked so things stay thread safe.
- public object SyncRoot
- {
- get { return m_sceneGraph.m_syncRoot; }
- }
-
- public float TimeDilation
- {
- get { return m_timedilation; }
- }
-
- ///
- /// This is for llGetRegionFPS
- ///
- public float SimulatorFPS
- {
- get { return StatsReporter.getLastReportedSimFPS(); }
- }
-
- public string DefaultScriptEngine
- {
- get { return m_defaultScriptEngine; }
- }
-
- // Local reference to the objects in the scene (which are held in the scenegraph)
- // public Dictionary Objects
- // {
- // get { return m_sceneGraph.SceneObjects; }
- // }
-
- // Reference to all of the agents in the scene (root and child)
- protected Dictionary m_scenePresences
- {
- get { return m_sceneGraph.ScenePresences; }
- set { m_sceneGraph.ScenePresences = value; }
- }
-
- // protected Dictionary m_sceneObjects
- // {
- // get { return m_sceneGraph.SceneObjects; }
- // set { m_sceneGraph.SceneObjects = value; }
- // }
-
- public EntityManager Entities
- {
- get { return m_sceneGraph.Entities; }
- }
-
- public Dictionary m_restorePresences
- {
- get { return m_sceneGraph.RestorePresences; }
- set { m_sceneGraph.RestorePresences = value; }
- }
-
- public int objectCapacity = 45000;
-
- #endregion
-
- #region Constructors
-
- public Scene(RegionInfo regInfo, AgentCircuitManager authen,
- CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
- AssetCache assetCach, StorageManager storeManager,
- ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
- bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
- {
- m_config = config;
-
- Random random = new Random();
- m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue/2))+(uint)(uint.MaxValue/4);
- m_moduleLoader = moduleLoader;
- m_authenticateHandler = authen;
- CommsManager = commsMan;
- m_sceneGridService = sceneGridService;
- m_storageManager = storeManager;
- AssetCache = assetCach;
- m_regInfo = regInfo;
- m_regionHandle = m_regInfo.RegionHandle;
- m_regionName = m_regInfo.RegionName;
- m_datastore = m_regInfo.DataStore;
-
- m_physicalPrim = physicalPrim;
- m_seeIntoRegionFromNeighbor = SeeIntoRegionFromNeighbor;
-
- m_eventManager = new EventManager();
- m_permissions = new ScenePermissions(this);
-
- m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this);
- m_asyncSceneObjectDeleter.Enabled = true;
-
- // Load region settings
- m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
- if (m_storageManager.EstateDataStore != null)
- m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
-
- //Bind Storage Manager functions to some land manager functions for this scene
- EventManager.OnLandObjectAdded +=
- new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject);
- EventManager.OnLandObjectRemoved +=
- new EventManager.LandObjectRemoved(m_storageManager.DataStore.RemoveLandObject);
-
- m_sceneGraph = new SceneGraph(this, m_regInfo);
-
- // If the scene graph has an Unrecoverable error, restart this sim.
- // Currently the only thing that causes it to happen is two kinds of specific
- // Physics based crashes.
- //
- // Out of memory
- // Operating system has killed the plugin
- m_sceneGraph.UnRecoverableError += RestartNow;
-
- RegisterDefaultSceneEvents();
-
- DumpAssetsToFile = dumpAssetsToFile;
-
- m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts;
-
- m_physics_enabled = !RegionInfo.RegionSettings.DisablePhysics;
-
- StatsReporter = new SimStatsReporter(this);
- StatsReporter.OnSendStatsResult += SendSimStatsPackets;
- StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
-
- StatsReporter.SetObjectCapacity(objectCapacity);
-
- m_simulatorVersion = simulatorVersion
- + " (OS " + Util.GetOperatingSystemInformation() + ")"
- + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString()
- + " PhysPrim:" + m_physicalPrim.ToString();
-
- try
- {
- // Region config overrides global config
- //
- IConfig startupConfig = m_config.Configs["Startup"];
- m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", 65536.0f);
- if (RegionInfo.NonphysPrimMax > 0)
- m_maxNonphys = RegionInfo.NonphysPrimMax;
-
- m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", 10.0f);
-
- if (RegionInfo.PhysPrimMax > 0)
- m_maxPhys = RegionInfo.PhysPrimMax;
-
- // Here, if clamping is requested in either global or
- // local config, it will be used
- //
- m_clampPrimSize = startupConfig.GetBoolean("ClampPrimSize", false);
- if (RegionInfo.ClampPrimSize)
- m_clampPrimSize = true;
-
- m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", false);
- m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", false);
- m_dontPersistBefore =
- startupConfig.GetLong("MinimumTimeBeforePersistenceConsidered", DEFAULT_MIN_TIME_FOR_PERSISTENCE);
- m_dontPersistBefore *= 10000000;
- m_persistAfter =
- startupConfig.GetLong("MaximumTimeBeforePersistenceConsidered", DEFAULT_MAX_TIME_FOR_PERSISTENCE);
- m_persistAfter *= 10000000;
-
- m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "DotNetEngine");
- }
- catch
- {
- m_log.Warn("[SCENE]: Failed to load StartupConfig");
- }
- }
-
- ///
- /// Mock constructor for scene group persistency unit tests.
- /// SceneObjectGroup RegionId property is delegated to Scene.
- ///
- ///
- public Scene(RegionInfo regInfo)
- {
- m_regInfo = regInfo;
- m_eventManager = new EventManager();
- }
-
- #endregion
-
- #region Startup / Close Methods
-
- public bool ShuttingDown
- {
- get { return shuttingdown; }
- }
-
- protected virtual void RegisterDefaultSceneEvents()
- {
- IDialogModule dm = RequestModuleInterface();
-
- if (dm != null)
- m_eventManager.OnPermissionError += dm.SendAlertToUser;
- }
-
- public override string GetSimulatorVersion()
- {
- return m_simulatorVersion;
- }
-
- ///
- /// Another region is up. Gets called from Grid Comms:
- /// (OGS1 -> LocalBackEnd -> RegionListened -> SceneCommunicationService)
- /// We have to tell all our ScenePresences about it, and add it to the
- /// neighbor list.
- ///
- /// We only add it to the neighbor list if it's within 1 region from here.
- /// Agents may have draw distance values that cross two regions though, so
- /// we add it to the notify list regardless of distance. We'll check
- /// the agent's draw distance before notifying them though.
- ///
- /// RegionInfo handle for the new region.
- /// True after all operations complete, throws exceptions otherwise.
- public override bool OtherRegionUp(RegionInfo otherRegion)
- {
- if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
- {
- for (int i = 0; i < m_neighbours.Count; i++)
- {
- // The purpose of this loop is to re-update the known neighbors
- // when another region comes up on top of another one.
- // The latest region in that location ends up in the
- // 'known neighbors list'
- // Additionally, the commFailTF property gets reset to false.
- if (m_neighbours[i].RegionHandle == otherRegion.RegionHandle)
- {
- lock (m_neighbours)
- {
- m_neighbours[i] = otherRegion;
- }
- }
- }
-
- // If the value isn't in the neighbours, add it.
- // If the RegionInfo isn't exact but is for the same XY World location,
- // then the above loop will fix that.
-
- if (!(CheckNeighborRegion(otherRegion)))
- {
- lock (m_neighbours)
- {
- m_neighbours.Add(otherRegion);
- //m_log.Info("[UP]: " + otherRegion.RegionHandle.ToString());
- }
- }
-
- // If these are cast to INT because long + negative values + abs returns invalid data
- int resultX = Math.Abs((int)otherRegion.RegionLocX - (int)RegionInfo.RegionLocX);
- int resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY);
- if (resultX <= 1 && resultY <= 1)
- {
- try
- {
- ForEachScenePresence(delegate(ScenePresence agent)
- {
- // If agent is a root agent.
- if (!agent.IsChildAgent)
- {
- //agent.ControllingClient.new
- //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
- InformClientOfNeighbor(agent, otherRegion);
- }
- }
- );
- }
- catch (NullReferenceException)
- {
- // This means that we're not booted up completely yet.
- // This shouldn't happen too often anymore.
- m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception");
- }
- }
- else
- {
- m_log.Info("[INTERGRID]: Got notice about far away Region: " + otherRegion.RegionName.ToString() +
- " at (" + otherRegion.RegionLocX.ToString() + ", " +
- otherRegion.RegionLocY.ToString() + ")");
- }
- }
- return true;
- }
-
- public void AddNeighborRegion(RegionInfo region)
- {
- lock (m_neighbours)
- {
- if (!CheckNeighborRegion(region))
- {
- m_neighbours.Add(region);
- }
- }
- }
-
- public bool CheckNeighborRegion(RegionInfo region)
- {
- bool found = false;
- lock (m_neighbours)
- {
- foreach (RegionInfo reg in m_neighbours)
- {
- if (reg.RegionHandle == region.RegionHandle)
- {
- found = true;
- break;
- }
- }
- }
- return found;
- }
-
- ///
- /// Given float seconds, this will restart the region.
- ///
- /// float indicating duration before restart.
- public virtual void Restart(float seconds)
- {
- // notifications are done in 15 second increments
- // so .. if the number of seconds is less then 15 seconds, it's not really a restart request
- // It's a 'Cancel restart' request.
-
- // RestartNow() does immediate restarting.
- if (seconds < 15)
- {
- m_restartTimer.Stop();
- m_dialogModule.SendGeneralAlert("Restart Aborted");
- }
- else
- {
- // Now we figure out what to set the timer to that does the notifications and calls, RestartNow()
- m_restartTimer.Interval = 15000;
- m_incrementsof15seconds = (int)seconds / 15;
- m_RestartTimerCounter = 0;
- m_restartTimer.AutoReset = true;
- m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
- m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes");
- m_restartTimer.Start();
- m_dialogModule.SendNotificationToUsersInRegion(
- UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes");
- }
- }
-
- // The Restart timer has occured.
- // We have to figure out if this is a notification or if the number of seconds specified in Restart
- // have elapsed.
- // If they have elapsed, call RestartNow()
- public void RestartTimer_Elapsed(object sender, ElapsedEventArgs e)
- {
- m_RestartTimerCounter++;
- if (m_RestartTimerCounter <= m_incrementsof15seconds)
- {
- if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7)
- m_dialogModule.SendNotificationToUsersInRegion(
- UUID.Random(),
- String.Empty,
- RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter) * 15) + " seconds");
- }
- else
- {
- m_restartTimer.Stop();
- m_restartTimer.AutoReset = false;
- RestartNow();
- }
- }
-
- // This causes the region to restart immediatley.
- public void RestartNow()
- {
- if (PhysicsScene != null)
- {
- PhysicsScene.Dispose();
- }
-
- m_log.Error("[REGION]: Closing");
- Close();
- m_log.Error("[REGION]: Firing Region Restart Message");
- base.Restart(0);
- }
-
- // This is a helper function that notifies root agents in this region that a new sim near them has come up
- // This is in the form of a timer because when an instance of OpenSim.exe is started,
- // Even though the sims initialize, they don't listen until 'all of the sims are initialized'
- // If we tell an agent about a sim that's not listening yet, the agent will not be able to connect to it.
- // subsequently the agent will never see the region come back online.
- public void RestartNotifyWaitElapsed(object sender, ElapsedEventArgs e)
- {
- m_restartWaitTimer.Stop();
- lock (m_regionRestartNotifyList)
- {
- foreach (RegionInfo region in m_regionRestartNotifyList)
- {
- try
- {
- ForEachScenePresence(delegate(ScenePresence agent)
- {
- // If agent is a root agent.
- if (!agent.IsChildAgent)
- {
- //agent.ControllingClient.new
- //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
- InformClientOfNeighbor(agent, region);
- }
- }
- );
- }
- catch (NullReferenceException)
- {
- // This means that we're not booted up completely yet.
- // This shouldn't happen too often anymore.
- }
- }
-
- // Reset list to nothing.
- m_regionRestartNotifyList.Clear();
- }
- }
-
- public void SetSceneCoreDebug(bool ScriptEngine, bool CollisionEvents, bool PhysicsEngine)
- {
- if (m_scripts_enabled != !ScriptEngine)
- {
- // Tedd! Here's the method to disable the scripting engine!
- if (ScriptEngine)
- {
- m_log.Info("Stopping all Scripts in Scene");
- foreach (EntityBase ent in Entities)
- {
- if (ent is SceneObjectGroup)
- {
- ((SceneObjectGroup) ent).RemoveScriptInstances();
- }
- }
- }
- else
- {
- m_log.Info("Starting all Scripts in Scene");
- lock (Entities)
- {
- foreach (EntityBase ent in Entities)
- {
- if (ent is SceneObjectGroup)
- {
- ((SceneObjectGroup)ent).CreateScriptInstances(0, false, DefaultScriptEngine, 0);
- }
- }
- }
- }
- m_scripts_enabled = !ScriptEngine;
- m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine");
- }
-
- if (m_physics_enabled != !PhysicsEngine)
- {
- m_physics_enabled = !PhysicsEngine;
- }
- }
-
- public int GetInaccurateNeighborCount()
- {
- lock (m_neighbours)
- {
- return m_neighbours.Count;
- }
- }
-
- // This is the method that shuts down the scene.
- public override void Close()
- {
- m_log.InfoFormat("[SCENE]: Closing down the single simulator: {0}", RegionInfo.RegionName);
-
- // Kick all ROOT agents with the message, 'The simulator is going down'
- ForEachScenePresence(delegate(ScenePresence avatar)
- {
- if (avatar.KnownChildRegionHandles.Contains(RegionInfo.RegionHandle))
- avatar.KnownChildRegionHandles.Remove(RegionInfo.RegionHandle);
-
- if (!avatar.IsChildAgent)
- avatar.ControllingClient.Kick("The simulator is going down.");
-
- avatar.ControllingClient.SendShutdownConnectionNotice();
- });
-
- // Wait here, or the kick messages won't actually get to the agents before the scene terminates.
- Thread.Sleep(500);
-
- // Stop all client threads.
- ForEachScenePresence(delegate(ScenePresence avatar) { avatar.ControllingClient.Close(true); });
-
- // Stop updating the scene objects and agents.
- //m_heartbeatTimer.Close();
- shuttingdown = true;
-
- m_log.Debug("[SCENE]: Persisting changed objects");
- List entities = GetEntities();
- foreach (EntityBase entity in entities)
- {
- if (!entity.IsDeleted && entity is SceneObjectGroup && ((SceneObjectGroup)entity).HasGroupChanged)
- {
- ((SceneObjectGroup)entity).ProcessBackup(m_storageManager.DataStore, false);
- }
- }
-
- m_sceneGraph.Close();
-
- // De-register with region communications (events cleanup)
- UnRegisterRegionWithComms();
-
- // call the base class Close method.
- base.Close();
- }
-
- ///
- /// Start the timer which triggers regular scene updates
- ///
- public void StartTimer()
- {
- //m_log.Debug("[SCENE]: Starting timer");
- //m_heartbeatTimer.Enabled = true;
- //m_heartbeatTimer.Interval = (int)(m_timespan * 1000);
- //m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat);
- HeartbeatThread = new Thread(new ParameterizedThreadStart(Heartbeat));
- HeartbeatThread.SetApartmentState(ApartmentState.MTA);
- HeartbeatThread.Name = "Heartbeat";
- HeartbeatThread.Priority = ThreadPriority.AboveNormal;
- ThreadTracker.Add(HeartbeatThread);
- HeartbeatThread.Start();
- }
-
- ///
- /// Sets up references to modules required by the scene
- ///
- public void SetModuleInterfaces()
- {
- m_xmlrpcModule = RequestModuleInterface();
- m_worldCommModule = RequestModuleInterface();
- XferManager = RequestModuleInterface();
- m_AvatarFactory = RequestModuleInterface();
- m_serialiser = RequestModuleInterface();
- m_interregionCommsOut = RequestModuleInterface();
- m_interregionCommsIn = RequestModuleInterface();
- m_dialogModule = RequestModuleInterface();
- CapsModule = RequestModuleInterface();
- }
-
- #endregion
-
- #region Update Methods
-
- ///
- /// Performs per-frame updates regularly
- ///
- ///
- ///
- private void Heartbeat(object sender)
- {
- Update();
- }
-
- ///
- /// Performs per-frame updates on the scene, this should be the central scene loop
- ///
- public override void Update()
- {
- int maintc = 0;
- while (!shuttingdown)
- {
- maintc = System.Environment.TickCount;
-
- TimeSpan SinceLastFrame = DateTime.Now - m_lastupdate;
- // Aquire a lock so only one update call happens at once
- //updateLock.WaitOne();
- float physicsFPS = 0;
- //m_log.Info("sadfadf" + m_neighbours.Count.ToString());
- int agentsInScene = m_sceneGraph.GetRootAgentCount() + m_sceneGraph.GetChildAgentCount();
-
- if (agentsInScene > 21)
- {
- if (m_update_entities == 1)
- {
- m_update_entities = 5;
- StatsReporter.SetUpdateMS(6000);
- }
- }
- else
- {
- if (m_update_entities == 5)
- {
- m_update_entities = 1;
- StatsReporter.SetUpdateMS(3000);
- }
- }
-
- frameMS = System.Environment.TickCount;
- try
- {
- // Increment the frame counter
- m_frame++;
-
- // Loop it
- if (m_frame == Int32.MaxValue)
- m_frame = 0;
-
- physicsMS2 = System.Environment.TickCount;
- if ((m_frame % m_update_physics == 0) && m_physics_enabled)
- m_sceneGraph.UpdatePreparePhysics();
- physicsMS2 = System.Environment.TickCount - physicsMS2;
-
- if (m_frame % m_update_entitymovement == 0)
- m_sceneGraph.UpdateEntityMovement();
-
- physicsMS = System.Environment.TickCount;
- if ((m_frame % m_update_physics == 0) && m_physics_enabled)
- physicsFPS = m_sceneGraph.UpdatePhysics(
- Math.Max(SinceLastFrame.TotalSeconds, m_timespan)
- );
- if (m_frame % m_update_physics == 0 && SynchronizeScene != null)
- SynchronizeScene(this);
-
- physicsMS = System.Environment.TickCount - physicsMS;
- physicsMS += physicsMS2;
-
- otherMS = System.Environment.TickCount;
- // run through all entities looking for updates (slow)
- if (m_frame % m_update_entities == 0)
- m_sceneGraph.UpdateEntities();
-
- // run through entities that have scheduled themselves for
- // updates looking for updates(faster)
- if (m_frame % m_update_entitiesquick == 0)
- m_sceneGraph.ProcessUpdates();
-
- // Run through scenepresences looking for updates
- if (m_frame % m_update_presences == 0)
- m_sceneGraph.UpdatePresences();
-
- // Delete temp-on-rez stuff
- if (m_frame % m_update_backup == 0)
- CleanTempObjects();
-
- if (Region_Status != RegionStatus.SlaveScene)
- {
- if (m_frame % m_update_events == 0)
- UpdateEvents();
-
- if (m_frame % m_update_backup == 0)
- {
- UpdateStorageBackup();
- }
-
- if (m_frame % m_update_terrain == 0)
- UpdateTerrain();
-
- if (m_frame % m_update_land == 0)
- UpdateLand();
- otherMS = System.Environment.TickCount - otherMS;
- // if (m_frame%m_update_avatars == 0)
- // UpdateInWorldTime();
- StatsReporter.AddPhysicsFPS(physicsFPS);
- StatsReporter.AddTimeDilation(m_timedilation);
- StatsReporter.AddFPS(1);
- StatsReporter.AddInPackets(0);
- StatsReporter.SetRootAgents(m_sceneGraph.GetRootAgentCount());
- StatsReporter.SetChildAgents(m_sceneGraph.GetChildAgentCount());
- StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount());
- StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount());
- frameMS = System.Environment.TickCount - frameMS;
- StatsReporter.addFrameMS(frameMS);
- StatsReporter.addPhysicsMS(physicsMS);
- StatsReporter.addOtherMS(otherMS);
- StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());
- StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
- }
- }
- catch (NotImplementedException)
- {
- throw;
- }
- catch (AccessViolationException e)
- {
- m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
- }
- //catch (NullReferenceException e)
- //{
- // m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
- //}
- catch (InvalidOperationException e)
- {
- m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
- }
- catch (Exception e)
- {
- m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
- }
- finally
- {
- //updateLock.ReleaseMutex();
- // Get actual time dilation
- float tmpval = (m_timespan / (float)SinceLastFrame.TotalSeconds);
-
- // If actual time dilation is greater then one, we're catching up, so subtract
- // the amount that's greater then 1 from the time dilation
- if (tmpval > 1.0)
- {
- tmpval = tmpval - (tmpval - 1.0f);
- }
- m_timedilation = tmpval;
-
- m_lastupdate = DateTime.Now;
- }
- maintc = System.Environment.TickCount - maintc;
- maintc = (int)(m_timespan * 1000) - maintc;
-
- if ((maintc < (m_timespan * 1000)) && maintc > 0)
- Thread.Sleep(maintc);
- }
- }
-
- private void SendSimStatsPackets(SimStats stats)
- {
- List StatSendAgents = GetScenePresences();
- foreach (ScenePresence agent in StatSendAgents)
- {
- if (!agent.IsChildAgent)
- {
- agent.ControllingClient.SendSimStats(stats);
- }
- }
- }
-
- private void UpdateLand()
- {
- if (LandChannel != null)
- {
- if (LandChannel.IsLandPrimCountTainted())
- {
- EventManager.TriggerParcelPrimCountUpdate();
- }
- }
- }
-
- private void UpdateTerrain()
- {
- EventManager.TriggerTerrainTick();
- }
-
- private void UpdateStorageBackup()
- {
- if (!m_backingup)
- {
- m_backingup = true;
- Thread backupthread = new Thread(Backup);
- backupthread.Name = "BackupWriter";
- backupthread.IsBackground = true;
- backupthread.Start();
- }
- }
-
- private void UpdateEvents()
- {
- m_eventManager.TriggerOnFrame();
- }
-
- ///
- /// Perform delegate action on all clients subscribing to updates from this region.
- ///
- ///
- internal void Broadcast(Action whatToDo)
- {
- ForEachScenePresence(delegate(ScenePresence presence) { whatToDo(presence.ControllingClient); });
- }
-
- ///
- /// Backup the scene. This acts as the main method of the backup thread.
- ///
- ///
- public void Backup()
- {
- lock (m_returns)
- {
- EventManager.TriggerOnBackup(m_storageManager.DataStore);
- m_backingup = false;
-
- foreach (KeyValuePair ret in m_returns)
- {
- UUID transaction = UUID.Random();
-
- GridInstantMessage msg = new GridInstantMessage();
- msg.fromAgentID = new Guid(UUID.Zero.ToString()); // From server
- msg.toAgentID = new Guid(ret.Key.ToString());
- msg.imSessionID = new Guid(transaction.ToString());
- msg.timestamp = (uint)Util.UnixTimeSinceEpoch();
- msg.fromAgentName = "Server";
- msg.dialog = (byte)19; // Object msg
- msg.fromGroup = false;
- msg.offline = (byte)1;
- msg.ParentEstateID = RegionInfo.EstateSettings.ParentEstateID;
- msg.Position = Vector3.Zero;
- msg.RegionID = RegionInfo.RegionID.Guid;
- msg.binaryBucket = new byte[0];
- if (ret.Value.count > 1)
- msg.message = string.Format("Your {0} objects were returned from {1} in region {2} due to {3}", ret.Value.count, ret.Value.location.ToString(), RegionInfo.RegionName, ret.Value.reason);
- else
- msg.message = string.Format("Your object {0} was returned from {1} in region {2} due to {3}", ret.Value.objectName, ret.Value.location.ToString(), RegionInfo.RegionName, ret.Value.reason);
-
- IMessageTransferModule tr = RequestModuleInterface();
- if (tr != null)
- tr.SendInstantMessage(msg, delegate(bool success) {} );
- }
- m_returns.Clear();
- }
- }
-
- public void ForceSceneObjectBackup(SceneObjectGroup group)
- {
- if (group != null)
- {
- group.ProcessBackup(m_storageManager.DataStore, true);
- }
- }
-
- public void AddReturn(UUID agentID, string objectName, Vector3 location, string reason)
- {
- lock (m_returns)
- {
- if (m_returns.ContainsKey(agentID))
- {
- ReturnInfo info = m_returns[agentID];
- info.count++;
- m_returns[agentID] = info;
- }
- else
- {
- ReturnInfo info = new ReturnInfo();
- info.count = 1;
- info.objectName = objectName;
- info.location = location;
- info.reason = reason;
- m_returns[agentID] = info;
- }
- }
- }
-
- #endregion
-
- #region Load Terrain
-
- public void ExportWorldMap(string fileName)
- {
- List mapBlocks =
- m_sceneGridService.RequestNeighbourMapBlocks((int)(RegionInfo.RegionLocX - 9),
- (int)(RegionInfo.RegionLocY - 9),
- (int)(RegionInfo.RegionLocX + 9),
- (int)(RegionInfo.RegionLocY + 9));
- List textures = new List();
- List