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 | 49 +++++ .../Region/Framework/Interfaces/IAvatarFactory.cs | 39 ++++ .../Framework/Interfaces/ICapabilitiesModule.cs | 74 ++++++++ OpenSim/Region/Framework/Interfaces/ICommand.cs | 50 +++++ .../Framework/Interfaces/ICommandableModule.cs | 37 ++++ OpenSim/Region/Framework/Interfaces/ICommander.cs | 47 +++++ .../Region/Framework/Interfaces/IDialogModule.cs | 136 ++++++++++++++ .../Framework/Interfaces/IDynamicTextureManager.cs | 58 ++++++ .../Region/Framework/Interfaces/IEmailModule.cs | 48 +++++ .../Region/Framework/Interfaces/IEntityCreator.cs | 56 ++++++ .../Framework/Interfaces/IEntityInventory.cs | 207 +++++++++++++++++++++ .../Framework/Interfaces/IEstateDataStore.cs | 41 ++++ .../Region/Framework/Interfaces/IEstateModule.cs | 44 +++++ OpenSim/Region/Framework/Interfaces/IEventQueue.cs | 64 +++++++ .../Region/Framework/Interfaces/IFriendsModule.cs | 49 +++++ .../Region/Framework/Interfaces/IGroupsModule.cs | 68 +++++++ .../Region/Framework/Interfaces/IHttpRequests.cs | 51 +++++ .../Framework/Interfaces/IInterregionComms.cs | 81 ++++++++ .../Interfaces/IInventoryTransferModule.cs | 42 +++++ OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs | 41 ++++ .../Region/Framework/Interfaces/ILandChannel.cs | 49 +++++ OpenSim/Region/Framework/Interfaces/ILandObject.cs | 83 +++++++++ .../Framework/Interfaces/IMessageTransferModule.cs | 40 ++++ .../Region/Framework/Interfaces/IPresenceModule.cs | 56 ++++++ .../Framework/Interfaces/IRegionArchiverModule.cs | 75 ++++++++ .../Framework/Interfaces/IRegionDataStore.cs | 109 +++++++++++ .../Region/Framework/Interfaces/IRegionModule.cs | 41 ++++ .../Interfaces/IRegionSerialiserModule.cs | 122 ++++++++++++ .../Region/Framework/Interfaces/IScriptModule.cs | 41 ++++ .../Region/Framework/Interfaces/IServiceRequest.cs | 45 +++++ .../Region/Framework/Interfaces/ISoundModule.cs | 41 ++++ OpenSim/Region/Framework/Interfaces/ITerrain.cs | 78 ++++++++ .../Region/Framework/Interfaces/ITerrainChannel.cs | 48 +++++ .../Region/Framework/Interfaces/ITextureSender.cs | 58 ++++++ .../Framework/Interfaces/IVegetationModule.cs | 49 +++++ OpenSim/Region/Framework/Interfaces/IWindModule.cs | 41 ++++ OpenSim/Region/Framework/Interfaces/IWorldComm.cs | 64 +++++++ OpenSim/Region/Framework/Interfaces/IXMLRPC.cs | 66 +++++++ OpenSim/Region/Framework/Interfaces/IXfer.cs | 34 ++++ 39 files changed, 2422 insertions(+) create mode 100644 OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs create mode 100644 OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/ICommand.cs create mode 100644 OpenSim/Region/Framework/Interfaces/ICommandableModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/ICommander.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IDialogModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IEmailModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IEntityCreator.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IEntityInventory.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IEstateModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IEventQueue.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IFriendsModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IGroupsModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IHttpRequests.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IInterregionComms.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs create mode 100644 OpenSim/Region/Framework/Interfaces/ILandChannel.cs create mode 100644 OpenSim/Region/Framework/Interfaces/ILandObject.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IPresenceModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IRegionModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IScriptModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IServiceRequest.cs create mode 100644 OpenSim/Region/Framework/Interfaces/ISoundModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/ITerrain.cs create mode 100644 OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs create mode 100644 OpenSim/Region/Framework/Interfaces/ITextureSender.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IVegetationModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IWindModule.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IWorldComm.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IXMLRPC.cs create mode 100644 OpenSim/Region/Framework/Interfaces/IXfer.cs (limited to 'OpenSim/Region/Framework/Interfaces') diff --git a/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs b/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs new file mode 100644 index 0000000..49a5dd0 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs @@ -0,0 +1,49 @@ +/* + * 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.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.Framework.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/Framework/Interfaces/IAvatarFactory.cs b/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs new file mode 100644 index 0000000..b533206 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs @@ -0,0 +1,39 @@ +/* + * 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.Framework.Interfaces; + +namespace OpenSim.Region.Framework.Interfaces +{ + public interface IAvatarFactory + { + bool TryGetAvatarAppearance(UUID avatarId, out AvatarAppearance appearance); + void UpdateDatabase(UUID userID, AvatarAppearance avatAppearance); + } +} diff --git a/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs b/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs new file mode 100644 index 0000000..bac0b2e --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs @@ -0,0 +1,74 @@ +/* + * 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.Framework.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/Framework/Interfaces/ICommand.cs b/OpenSim/Region/Framework/Interfaces/ICommand.cs new file mode 100644 index 0000000..1551b58 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ICommand.cs @@ -0,0 +1,50 @@ +/* + * 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.Framework.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/Framework/Interfaces/ICommandableModule.cs b/OpenSim/Region/Framework/Interfaces/ICommandableModule.cs new file mode 100644 index 0000000..5d6660d --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ICommandableModule.cs @@ -0,0 +1,37 @@ +/* + * 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.Framework.Interfaces +{ + public interface ICommandableModule + { + ICommander CommandInterface + { + get; + } + } +} diff --git a/OpenSim/Region/Framework/Interfaces/ICommander.cs b/OpenSim/Region/Framework/Interfaces/ICommander.cs new file mode 100644 index 0000000..17a2e4a --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ICommander.cs @@ -0,0 +1,47 @@ +/* + * 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.Framework.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/Framework/Interfaces/IDialogModule.cs b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs new file mode 100644 index 0000000..7247d52 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs @@ -0,0 +1,136 @@ +/* + * 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.Framework.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/Framework/Interfaces/IDynamicTextureManager.cs b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs new file mode 100644 index 0000000..e119bc3 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs @@ -0,0 +1,58 @@ +/* + * 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.Framework.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/Framework/Interfaces/IEmailModule.cs b/OpenSim/Region/Framework/Interfaces/IEmailModule.cs new file mode 100644 index 0000000..b5f885a --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IEmailModule.cs @@ -0,0 +1,48 @@ +/* + * 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.Framework.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/Framework/Interfaces/IEntityCreator.cs b/OpenSim/Region/Framework/Interfaces/IEntityCreator.cs new file mode 100644 index 0000000..1a6e626 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IEntityCreator.cs @@ -0,0 +1,56 @@ +/* + * 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.Framework.Scenes; + +namespace OpenSim.Region.Framework.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/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs new file mode 100644 index 0000000..20fe090 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs @@ -0,0 +1,207 @@ +/* + * 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.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes.Scripting; + +namespace OpenSim.Region.Framework.Interfaces +{ + /// + /// 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/Framework/Interfaces/IEstateDataStore.cs b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs new file mode 100644 index 0000000..4da115e --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs @@ -0,0 +1,41 @@ +/* + * 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.Framework.Interfaces +{ + public interface IEstateDataStore + { + void Initialise(string connectstring); + + EstateSettings LoadEstateSettings(UUID regionID); + void StoreEstateSettings(EstateSettings es); + } +} diff --git a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs new file mode 100644 index 0000000..f169f61 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs @@ -0,0 +1,44 @@ +/* + * 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.Framework.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/Framework/Interfaces/IEventQueue.cs b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs new file mode 100644 index 0000000..cf609ae --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs @@ -0,0 +1,64 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSim Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Net; +using OpenSim.Framework; +using OpenMetaverse; +using OpenMetaverse.Packets; +using OpenMetaverse.StructuredData; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Region.Framework.Interfaces +{ + public interface IEventQueue + { + bool Enqueue(OSD o, UUID avatarID); + + // These are required to decouple Scenes from EventQueueHelper + void DisableSimulator(ulong handle, UUID avatarID); + void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID); + void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, + string capsPath); + void TeleportFinishEvent(ulong regionHandle, byte simAccess, + IPEndPoint regionExternalEndPoint, + uint locationID, uint flags, string capsURL, + UUID agentID); + void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, + IPEndPoint newRegionExternalEndPoint, + string capsURL, UUID avatarID, UUID sessionID); + 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); + void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat, + bool isModerator, bool textMute); + void ParcelProperties(ParcelPropertiesPacket parcelPropertiesPacket, UUID avatarID); + void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID); + } +} diff --git a/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs new file mode 100644 index 0000000..0bdfb8f --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs @@ -0,0 +1,49 @@ +/* + * 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.Framework.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/Framework/Interfaces/IGroupsModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs new file mode 100644 index 0000000..16527d1 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs @@ -0,0 +1,68 @@ +/* + * 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 OpenSim.Framework; +using OpenMetaverse; + +namespace OpenSim.Region.Framework.Interfaces +{ + public delegate void NewGroupNotice(UUID groupID, UUID noticeID); + + public interface IGroupsModule + { + event NewGroupNotice OnNewGroupNotice; + + void ActivateGroup(IClientAPI remoteClient, UUID groupID); + List GroupTitlesRequest(IClientAPI remoteClient, UUID groupID); + List GroupMembersRequest(IClientAPI remoteClient, UUID groupID); + List GroupRoleDataRequest(IClientAPI remoteClient, UUID groupID); + List GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID); + GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID); + GroupMembershipData[] GetMembershipData(UUID UserID); + + void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish); + + void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile); + + void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID); + UUID CreateGroup(IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish); + + GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID); + string GetGroupTitle(UUID avatarID); + void GroupRoleUpdate(IClientAPI remoteClient, UUID GroupID, UUID RoleID, string name, string description, string title, ulong powers, byte updateType); + void GroupRoleChanges(IClientAPI remoteClient, UUID GroupID, UUID RoleID, UUID MemberID, uint changes); + void GroupNoticeRequest(IClientAPI remoteClient, UUID groupNoticeID); + void SendGroupNoticeToClient(IClientAPI remoteClient, UUID groupNoticeID, byte dialog); + void SendAgentGroupDataUpdate(IClientAPI remoteClient); + void JoinGroupRequest(IClientAPI remoteClient, UUID GroupID); + void LeaveGroupRequest(IClientAPI remoteClient, UUID GroupID); + void EjectGroupMemberRequest(IClientAPI remoteClient, UUID GroupID, UUID EjecteeID); + void InviteGroupRequest(IClientAPI remoteClient, UUID GroupID, UUID InviteeID, UUID RoleID); + } +} diff --git a/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs b/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs new file mode 100644 index 0000000..fd49757 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs @@ -0,0 +1,51 @@ +/* + * 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.Net; +using OpenMetaverse; + +namespace OpenSim.Region.Framework.Interfaces +{ + public enum HttpRequestConstants + { + HTTP_METHOD = 0, + HTTP_MIMETYPE = 1, + HTTP_BODY_MAXLENGTH = 2, + HTTP_VERIFY_CERT = 3, + } + + public interface IHttpRequestModule + { + 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); + IServiceRequest GetNextCompletedRequest(); + void RemoveCompletedRequest(UUID id); + } +} diff --git a/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs new file mode 100644 index 0000000..783b3f9 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs @@ -0,0 +1,81 @@ +/* + * 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.Framework.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/Framework/Interfaces/IInventoryTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs new file mode 100644 index 0000000..4314271 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs @@ -0,0 +1,42 @@ +/* + * 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.Framework.Scenes; + +namespace OpenSim.Region.Framework.Interfaces +{ + /// + /// 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/Framework/Interfaces/IJ2KDecoder.cs b/OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs new file mode 100644 index 0000000..1d10896 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs @@ -0,0 +1,41 @@ +/* + * 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.Framework.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/Framework/Interfaces/ILandChannel.cs b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs new file mode 100644 index 0000000..35c2fc1 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs @@ -0,0 +1,49 @@ +/* + * 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.Framework.Interfaces; + +namespace OpenSim.Region.Framework.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/Framework/Interfaces/ILandObject.cs b/OpenSim/Region/Framework/Interfaces/ILandObject.cs new file mode 100644 index 0000000..52cc6cf --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ILandObject.cs @@ -0,0 +1,83 @@ +/* + * 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.Framework.Scenes; + +namespace OpenSim.Region.Framework.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/Framework/Interfaces/IMessageTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs new file mode 100644 index 0000000..f0a5473 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs @@ -0,0 +1,40 @@ +/* + * 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.Framework.Interfaces +{ + public delegate void MessageResultNotification(bool success); + + public interface IMessageTransferModule + { + void SendInstantMessage(GridInstantMessage im, MessageResultNotification result); + } +} diff --git a/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs b/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs new file mode 100644 index 0000000..011f8bb --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs @@ -0,0 +1,56 @@ +/* + * 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.Framework.Interfaces +{ + public struct PresenceInfo + { + public UUID userID; + public UUID regionID; + + public PresenceInfo(UUID userID, UUID regionID) + { + this.userID = userID; + this.regionID = regionID; + } + } + + public delegate void PresenceChange(PresenceInfo info); + public delegate void BulkPresenceData(PresenceInfo[] info); + + public interface IPresenceModule + { + void RequestBulkPresenceData(UUID[] users); + + event PresenceChange OnPresenceChange; + event BulkPresenceData OnBulkPresenceData; + } +} diff --git a/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs new file mode 100644 index 0000000..97afe8d --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs @@ -0,0 +1,75 @@ +/* + * 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.Framework.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/Framework/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs new file mode 100644 index 0000000..46d81ce --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs @@ -0,0 +1,109 @@ +/* + * 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.Framework.Scenes; + +namespace OpenSim.Region.Framework.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/Framework/Interfaces/IRegionModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionModule.cs new file mode 100644 index 0000000..6a45017 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IRegionModule.cs @@ -0,0 +1,41 @@ +/* + * 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.Framework.Scenes; + +namespace OpenSim.Region.Framework.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/Framework/Interfaces/IRegionSerialiserModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs new file mode 100644 index 0000000..40e4c99 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs @@ -0,0 +1,122 @@ +/* + * 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.Framework.Scenes; + +namespace OpenSim.Region.Framework.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/Framework/Interfaces/IScriptModule.cs b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs new file mode 100644 index 0000000..65620d3 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs @@ -0,0 +1,41 @@ +/* + * 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.Framework.Interfaces +{ + public interface IScriptModule + { + string ScriptEngineName { get; } + + string GetAssemblyName(UUID itemID); + string GetXMLState(UUID itemID); + } +} diff --git a/OpenSim/Region/Framework/Interfaces/IServiceRequest.cs b/OpenSim/Region/Framework/Interfaces/IServiceRequest.cs new file mode 100644 index 0000000..f3283c4 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IServiceRequest.cs @@ -0,0 +1,45 @@ +/* + * 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.Framework.Interfaces +{ + public interface IServiceRequest + { + // Status + bool Finished { get; } + + // Request info + UUID ItemID { get; set; } + uint LocalID { get; set; } + UUID ReqID { get; set; } + + void Process(); + void SendRequest(); + void Stop(); + } +} \ No newline at end of file diff --git a/OpenSim/Region/Framework/Interfaces/ISoundModule.cs b/OpenSim/Region/Framework/Interfaces/ISoundModule.cs new file mode 100644 index 0000000..91c80e3 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ISoundModule.cs @@ -0,0 +1,41 @@ +/* + * 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.Framework.Interfaces +{ + 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/Framework/Interfaces/ITerrain.cs b/OpenSim/Region/Framework/Interfaces/ITerrain.cs new file mode 100644 index 0000000..6e9c98d --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ITerrain.cs @@ -0,0 +1,78 @@ +/* + * 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.Framework.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/Framework/Interfaces/ITerrainChannel.cs b/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs new file mode 100644 index 0000000..fc4ced2 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs @@ -0,0 +1,48 @@ +/* + * 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.Framework.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/Framework/Interfaces/ITextureSender.cs b/OpenSim/Region/Framework/Interfaces/ITextureSender.cs new file mode 100644 index 0000000..aab3d26 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ITextureSender.cs @@ -0,0 +1,58 @@ +/* + * 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.Framework.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/Framework/Interfaces/IVegetationModule.cs b/OpenSim/Region/Framework/Interfaces/IVegetationModule.cs new file mode 100644 index 0000000..537a8dc --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IVegetationModule.cs @@ -0,0 +1,49 @@ +/* + * 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.Framework.Scenes; + +namespace OpenSim.Region.Framework.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/Framework/Interfaces/IWindModule.cs b/OpenSim/Region/Framework/Interfaces/IWindModule.cs new file mode 100644 index 0000000..96b303f --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IWindModule.cs @@ -0,0 +1,41 @@ +/* + * 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.Framework.Interfaces +{ + public interface IWindModule : IRegionModule + { + Vector2[] WindSpeeds + { + get; + } + } +} diff --git a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs new file mode 100644 index 0000000..24865db --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs @@ -0,0 +1,64 @@ +/* + * 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.Framework.Interfaces +{ + public interface IWorldCommListenerInfo + { + Object[] GetSerializationData(); + UUID GetItemID(); + UUID GetHostID(); + int GetChannel(); + uint GetLocalID(); + int GetHandle(); + string GetMessage(); + string GetName(); + bool IsActive(); + void Deactivate(); + void Activate(); + UUID GetID(); + } + + 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(); + IWorldCommListenerInfo 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/Framework/Interfaces/IXMLRPC.cs b/OpenSim/Region/Framework/Interfaces/IXMLRPC.cs new file mode 100644 index 0000000..6570b0a --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IXMLRPC.cs @@ -0,0 +1,66 @@ +/* + * 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 Nwc.XmlRpc; + +// using OpenSim.Region.Environment.Modules.Scripting.XMLRPC; + +namespace OpenSim.Region.Framework.Interfaces +{ + public interface IXmlRpcRequestInfo + { + bool IsProcessed(); + UUID GetChannelKey(); + void SetProcessed(bool processed); + void SetStrRetval(string resp); + string GetStrRetval(); + void SetIntRetval(int resp); + int GetIntRetval(); + uint GetLocalID(); + UUID GetItemID(); + string GetStrVal(); + int GetIntValue(); + UUID GetMessageID(); + } + + 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(); + IXmlRpcRequestInfo GetNextCompletedRequest(); + void RemoveCompletedRequest(UUID id); + void DeleteChannels(UUID itemID); + UUID SendRemoteData(uint localID, UUID itemID, string channel, string dest, int idata, string sdata); + IServiceRequest GetNextCompletedSRDRequest(); + void RemoveCompletedSRDRequest(UUID id); + void CancelSRDRequests(UUID itemID); + } +} diff --git a/OpenSim/Region/Framework/Interfaces/IXfer.cs b/OpenSim/Region/Framework/Interfaces/IXfer.cs new file mode 100644 index 0000000..a83f166 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IXfer.cs @@ -0,0 +1,34 @@ +/* + * 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.Framework.Interfaces +{ + public interface IXfer + { + bool AddNewFile(string fileName, byte[] data); + } +} -- cgit v1.1