* Moved EventManager to SceneBase (from Scene)

* Added OnShutdown event to EventManager (to be used to perform cleanups, etc)
* Fixed another compiler warning.
afrisby
Adam Frisby 2007-07-19 00:52:10 +00:00
parent 5e490e0599
commit 36fc7390f2
3 changed files with 18 additions and 9 deletions

View File

@ -64,10 +64,10 @@ namespace OpenSim.Region.Environment.Scenes
private int landPrimCheckCount; private int landPrimCheckCount;
private Mutex updateLock; private Mutex updateLock;
protected StorageManager storageManager;
protected AgentCircuitManager authenticateHandler; protected AgentCircuitManager authenticateHandler;
protected RegionCommsListener regionCommsHost; protected RegionCommsListener regionCommsHost;
protected CommunicationsManager commsManager; protected CommunicationsManager commsManager;
protected StorageManager storageManager;
protected Dictionary<LLUUID, Caps> capsHandlers = new Dictionary<LLUUID, Caps>(); protected Dictionary<LLUUID, Caps> capsHandlers = new Dictionary<LLUUID, Caps>();
protected BaseHttpServer httpListener; protected BaseHttpServer httpListener;
@ -97,13 +97,6 @@ namespace OpenSim.Region.Environment.Scenes
get { return m_estateManager; } get { return m_estateManager; }
} }
private EventManager m_eventManager;
public EventManager EventManager
{
get { return m_eventManager; }
}
private ScriptManager m_scriptManager; private ScriptManager m_scriptManager;
public ScriptManager ScriptManager public ScriptManager ScriptManager

View File

@ -47,6 +47,13 @@ namespace OpenSim.Region.Environment.Scenes
public TerrainEngine Terrain; public TerrainEngine Terrain;
protected EventManager m_eventManager;
public EventManager EventManager
{
get { return m_eventManager; }
}
protected string m_datastore; protected string m_datastore;
protected object m_syncRoot = new object(); protected object m_syncRoot = new object();
@ -134,7 +141,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
try try
{ {
//TODO: Add cleanup code for storage manager, etc. this.EventManager.TriggerShutdown();
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -28,6 +28,9 @@ namespace OpenSim.Region.Environment.Scenes
public delegate void OnScriptConsoleDelegate(string[] args); public delegate void OnScriptConsoleDelegate(string[] args);
public event OnScriptConsoleDelegate OnScriptConsole; public event OnScriptConsoleDelegate OnScriptConsole;
public delegate void OnShutdownDelegate();
public event OnShutdownDelegate OnShutdown;
public void TriggerOnScriptConsole(string[] args) public void TriggerOnScriptConsole(string[] args)
{ {
if (OnScriptConsole != null) if (OnScriptConsole != null)
@ -78,5 +81,11 @@ namespace OpenSim.Region.Environment.Scenes
OnParcelPrimCountAdd(obj); OnParcelPrimCountAdd(obj);
} }
} }
public void TriggerShutdown()
{
if (OnShutdown != null)
OnShutdown();
}
} }
} }