2007-10-31 01:21:04 +00:00
|
|
|
/*
|
2008-03-18 05:16:43 +00:00
|
|
|
* 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.
|
2009-06-01 06:37:14 +00:00
|
|
|
* * Neither the name of the OpenSimulator Project nor the
|
2008-03-18 05:16:43 +00:00
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2008-09-06 07:52:41 +00:00
|
|
|
using OpenMetaverse;
|
2009-02-07 12:25:39 +00:00
|
|
|
using OpenSim.Framework.Console;
|
2009-05-02 17:31:49 +00:00
|
|
|
using Nini.Config;
|
2007-10-31 01:21:04 +00:00
|
|
|
|
|
|
|
namespace OpenSim.Framework
|
|
|
|
{
|
2007-12-27 21:41:48 +00:00
|
|
|
public delegate void restart(RegionInfo thisRegion);
|
|
|
|
|
2008-05-14 05:11:23 +00:00
|
|
|
//public delegate void regionup (RegionInfo thisRegion);
|
2007-11-25 04:52:14 +00:00
|
|
|
|
|
|
|
public enum RegionStatus : int
|
|
|
|
{
|
|
|
|
Down = 0,
|
|
|
|
Up = 1,
|
|
|
|
Crashed = 2,
|
2008-03-04 05:31:54 +00:00
|
|
|
Starting = 3,
|
2008-04-29 14:04:55 +00:00
|
|
|
SlaveScene = 4
|
2008-11-28 17:18:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/// <value>
|
|
|
|
/// Indicate what action to take on an object derez request
|
|
|
|
/// </value>
|
|
|
|
public enum DeRezAction : byte
|
|
|
|
{
|
2008-12-17 16:11:03 +00:00
|
|
|
SaveToExistingUserInventoryItem = 0,
|
2008-11-28 17:18:10 +00:00
|
|
|
TakeCopy = 1,
|
|
|
|
Take = 4,
|
|
|
|
GodTakeCopy = 5,
|
|
|
|
Delete = 6,
|
|
|
|
Return = 9
|
2009-09-30 16:00:09 +00:00
|
|
|
};
|
2007-11-25 04:52:14 +00:00
|
|
|
|
2007-10-31 01:21:04 +00:00
|
|
|
public interface IScene
|
|
|
|
{
|
2008-04-29 14:04:55 +00:00
|
|
|
RegionInfo RegionInfo { get; }
|
2009-04-15 04:15:47 +00:00
|
|
|
RegionStatus RegionStatus { get; set; }
|
2008-04-29 14:04:55 +00:00
|
|
|
|
2009-05-02 17:31:49 +00:00
|
|
|
IConfigSource Config { get; }
|
|
|
|
|
2009-05-01 16:29:15 +00:00
|
|
|
float TimeDilation { get; }
|
|
|
|
|
2009-12-31 17:25:16 +00:00
|
|
|
bool AllowScriptCrossings { get; }
|
|
|
|
|
2007-11-25 04:52:14 +00:00
|
|
|
event restart OnRestart;
|
|
|
|
|
2011-08-09 23:59:31 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Register the new client with the scene. The client starts off as a child agent - the later agent crossing
|
2011-08-17 23:53:05 +00:00
|
|
|
/// will promote it to a root agent.
|
2011-08-09 23:59:31 +00:00
|
|
|
/// </summary>
|
2011-08-17 23:53:05 +00:00
|
|
|
/// <param name="client"></param>
|
|
|
|
/// <param name="type">The type of agent to add.</param>
|
|
|
|
void AddNewClient(IClientAPI client, PresenceType type);
|
2011-08-09 23:59:31 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Remove the given client from the scene.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="agentID"></param>
|
|
|
|
/// <param name="closeChildAgents">Close the neighbour child agents associated with this client.</param>
|
|
|
|
void RemoveClient(UUID agentID, bool closeChildAgents);
|
2007-10-31 01:21:04 +00:00
|
|
|
|
2010-11-25 03:16:52 +00:00
|
|
|
void Restart();
|
2009-09-27 17:14:10 +00:00
|
|
|
//RegionInfo OtherRegionUp(RegionInfo thisRegion);
|
2007-11-25 04:52:14 +00:00
|
|
|
|
2008-02-09 07:53:01 +00:00
|
|
|
string GetSimulatorVersion();
|
|
|
|
|
2008-12-15 18:11:47 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Is the agent denoted by the given agentID a child presence in this scene?
|
|
|
|
/// </summary>
|
|
|
|
///
|
|
|
|
/// Used by ClientView when a 'kick everyone' or 'estate message' occurs
|
|
|
|
///
|
|
|
|
/// <param name="avatarID">AvatarID to lookup</param>
|
2008-12-17 19:12:56 +00:00
|
|
|
/// <returns>true if the presence is a child agent, false if the presence is a root exception</returns>
|
|
|
|
/// <exception cref="System.NullReferenceException">
|
|
|
|
/// Thrown if the agent does not exist.
|
|
|
|
/// </exception>
|
2008-12-15 18:11:47 +00:00
|
|
|
bool PresenceChildStatus(UUID agentId);
|
2008-01-04 02:24:05 +00:00
|
|
|
|
2010-03-19 12:58:34 +00:00
|
|
|
bool TryGetScenePresence(UUID agentID, out object scenePresence);
|
2010-03-06 16:21:54 +00:00
|
|
|
|
2008-08-23 02:30:07 +00:00
|
|
|
T RequestModuleInterface<T>();
|
2008-09-25 17:26:32 +00:00
|
|
|
T[] RequestModuleInterfaces<T>();
|
2009-02-07 12:25:39 +00:00
|
|
|
|
2009-02-26 21:30:12 +00:00
|
|
|
void RegisterModuleInterface<M>(M mod);
|
|
|
|
void StackModuleInterface<M>(M mod);
|
|
|
|
|
2009-02-10 23:15:48 +00:00
|
|
|
void AddCommand(object module, string command, string shorthelp, string longhelp, CommandDelegate callback);
|
2009-12-31 17:25:16 +00:00
|
|
|
|
|
|
|
ISceneObject DeserializeObject(string representation);
|
2010-05-16 02:25:14 +00:00
|
|
|
|
|
|
|
bool CheckClient(UUID agentID, System.Net.IPEndPoint ep);
|
2007-10-31 01:21:04 +00:00
|
|
|
}
|
2008-08-23 02:30:07 +00:00
|
|
|
}
|