aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorAdam Frisby2007-07-19 00:52:10 +0000
committerAdam Frisby2007-07-19 00:52:10 +0000
commit36fc7390f2aabb745455f23f276725f102cacbf6 (patch)
treee5bd15a711b84c48705153e36aee0174d6cbb8be /OpenSim/Region
parent* Nearly back down to zero compiler warnings again... (diff)
downloadopensim-SC-36fc7390f2aabb745455f23f276725f102cacbf6.zip
opensim-SC-36fc7390f2aabb745455f23f276725f102cacbf6.tar.gz
opensim-SC-36fc7390f2aabb745455f23f276725f102cacbf6.tar.bz2
opensim-SC-36fc7390f2aabb745455f23f276725f102cacbf6.tar.xz
* Moved EventManager to SceneBase (from Scene)
* Added OnShutdown event to EventManager (to be used to perform cleanups, etc) * Fixed another compiler warning.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs9
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs9
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs9
3 files changed, 18 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 3abd96d..7ed4c96 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -64,10 +64,10 @@ namespace OpenSim.Region.Environment.Scenes
64 private int landPrimCheckCount; 64 private int landPrimCheckCount;
65 private Mutex updateLock; 65 private Mutex updateLock;
66 66
67 protected StorageManager storageManager;
67 protected AgentCircuitManager authenticateHandler; 68 protected AgentCircuitManager authenticateHandler;
68 protected RegionCommsListener regionCommsHost; 69 protected RegionCommsListener regionCommsHost;
69 protected CommunicationsManager commsManager; 70 protected CommunicationsManager commsManager;
70 protected StorageManager storageManager;
71 71
72 protected Dictionary<LLUUID, Caps> capsHandlers = new Dictionary<LLUUID, Caps>(); 72 protected Dictionary<LLUUID, Caps> capsHandlers = new Dictionary<LLUUID, Caps>();
73 protected BaseHttpServer httpListener; 73 protected BaseHttpServer httpListener;
@@ -97,13 +97,6 @@ namespace OpenSim.Region.Environment.Scenes
97 get { return m_estateManager; } 97 get { return m_estateManager; }
98 } 98 }
99 99
100 private EventManager m_eventManager;
101
102 public EventManager EventManager
103 {
104 get { return m_eventManager; }
105 }
106
107 private ScriptManager m_scriptManager; 100 private ScriptManager m_scriptManager;
108 101
109 public ScriptManager ScriptManager 102 public ScriptManager ScriptManager
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index 2c50e4d..f3db9e2 100644
--- a/OpenSim/Region/Environment/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -47,6 +47,13 @@ namespace OpenSim.Region.Environment.Scenes
47 47
48 public TerrainEngine Terrain; 48 public TerrainEngine Terrain;
49 49
50 protected EventManager m_eventManager;
51
52 public EventManager EventManager
53 {
54 get { return m_eventManager; }
55 }
56
50 protected string m_datastore; 57 protected string m_datastore;
51 58
52 protected object m_syncRoot = new object(); 59 protected object m_syncRoot = new object();
@@ -134,7 +141,7 @@ namespace OpenSim.Region.Environment.Scenes
134 { 141 {
135 try 142 try
136 { 143 {
137 //TODO: Add cleanup code for storage manager, etc. 144 this.EventManager.TriggerShutdown();
138 } 145 }
139 catch (Exception e) 146 catch (Exception e)
140 { 147 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index 255cbf2..eb1d5b4 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -28,6 +28,9 @@ namespace OpenSim.Region.Environment.Scenes
28 public delegate void OnScriptConsoleDelegate(string[] args); 28 public delegate void OnScriptConsoleDelegate(string[] args);
29 public event OnScriptConsoleDelegate OnScriptConsole; 29 public event OnScriptConsoleDelegate OnScriptConsole;
30 30
31 public delegate void OnShutdownDelegate();
32 public event OnShutdownDelegate OnShutdown;
33
31 public void TriggerOnScriptConsole(string[] args) 34 public void TriggerOnScriptConsole(string[] args)
32 { 35 {
33 if (OnScriptConsole != null) 36 if (OnScriptConsole != null)
@@ -78,5 +81,11 @@ namespace OpenSim.Region.Environment.Scenes
78 OnParcelPrimCountAdd(obj); 81 OnParcelPrimCountAdd(obj);
79 } 82 }
80 } 83 }
84
85 public void TriggerShutdown()
86 {
87 if (OnShutdown != null)
88 OnShutdown();
89 }
81 } 90 }
82} 91}