aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneEvents.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-03 15:44:20 +0000
committerJustin Clarke Casey2008-04-03 15:44:20 +0000
commit042cd57e948f6e3695d1d5b2b2a473ee77a1e9c4 (patch)
tree347f7abdb075b4acba5ece213d667c7c562c99fb /OpenSim/Region/Environment/Scenes/SceneEvents.cs
parent* Minor: fix doc glitch (diff)
downloadopensim-SC_OLD-042cd57e948f6e3695d1d5b2b2a473ee77a1e9c4.zip
opensim-SC_OLD-042cd57e948f6e3695d1d5b2b2a473ee77a1e9c4.tar.gz
opensim-SC_OLD-042cd57e948f6e3695d1d5b2b2a473ee77a1e9c4.tar.bz2
opensim-SC_OLD-042cd57e948f6e3695d1d5b2b2a473ee77a1e9c4.tar.xz
* From: Dr Scofield <hud@zurich.ibm.com>
* This patch removes voice code into a region module. This required the implementation of events and other code to allow region modules to register their own caps handlers, and should allow different voice module implementations. * CAVEAT: This does not provide complete voice support, it merely provides the hooks so that it can be plugged in.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneEvents.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index 809507c..c916009 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -29,6 +29,7 @@ using libsecondlife;
29using System; 29using System;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Interfaces; 31using OpenSim.Region.Environment.Interfaces;
32using Caps = OpenSim.Region.Capabilities.Caps;
32 33
33namespace OpenSim.Region.Environment.Scenes 34namespace OpenSim.Region.Environment.Scenes
34{ 35{
@@ -136,6 +137,19 @@ namespace OpenSim.Region.Environment.Scenes
136 137
137 public event OnNewPresenceDelegate OnMakeChildAgent; 138 public event OnNewPresenceDelegate OnMakeChildAgent;
138 139
140 /// <summary>
141 /// RegisterCapsEvent is called by Scene after the Caps object
142 /// has been instantiated and before it is return to the
143 /// client and provides region modules to add their caps.
144 /// </summary>
145 public delegate void RegisterCapsEvent(LLUUID agentID, Caps caps);
146 public event RegisterCapsEvent OnRegisterCaps;
147 /// <summary>
148 /// DeregisterCapsEvent is called by Scene when the caps
149 /// handler for an agent are removed.
150 /// </summary>
151 public delegate void DeregisterCapsEvent(LLUUID agentID, Caps caps);
152 public event DeregisterCapsEvent OnDeregisterCaps;
139 153
140 public class MoneyTransferArgs : System.EventArgs 154 public class MoneyTransferArgs : System.EventArgs
141 { 155 {
@@ -191,6 +205,8 @@ namespace OpenSim.Region.Environment.Scenes
191 private ClientClosed handlerClientClosed = null; //OnClientClosed; 205 private ClientClosed handlerClientClosed = null; //OnClientClosed;
192 private OnNewPresenceDelegate handlerMakeChildAgent = null; //OnMakeChildAgent; 206 private OnNewPresenceDelegate handlerMakeChildAgent = null; //OnMakeChildAgent;
193 private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick; 207 private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick;
208 private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps;
209 private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps;
194 210
195 public void TriggerOnScriptChangedEvent(uint localID, uint change) 211 public void TriggerOnScriptChangedEvent(uint localID, uint change)
196 { 212 {
@@ -428,5 +444,23 @@ namespace OpenSim.Region.Environment.Scenes
428 handlerMakeChildAgent(presence); 444 handlerMakeChildAgent(presence);
429 } 445 }
430 } 446 }
447
448 public void TriggerOnRegisterCaps(LLUUID agentID, Caps caps)
449 {
450 handlerRegisterCaps = OnRegisterCaps;
451 if (handlerRegisterCaps != null)
452 {
453 handlerRegisterCaps(agentID, caps);
454 }
455 }
456
457 public void TriggerOnDeregisterCaps(LLUUID agentID, Caps caps)
458 {
459 handlerDeregisterCaps = OnDeregisterCaps;
460 if (handlerDeregisterCaps != null)
461 {
462 handlerDeregisterCaps(agentID, caps);
463 }
464 }
431 } 465 }
432} 466}