aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/EventManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs71
1 files changed, 65 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 4733547..692e0c9 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -148,7 +148,7 @@ namespace OpenSim.Region.Framework.Scenes
148 /// Triggered when a new presence is added to the scene 148 /// Triggered when a new presence is added to the scene
149 /// </summary> 149 /// </summary>
150 /// <remarks> 150 /// <remarks>
151 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> which is used by both 151 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/> which is used by both
152 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> 152 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see>
153 /// </remarks> 153 /// </remarks>
154 public event OnNewPresenceDelegate OnNewPresence; 154 public event OnNewPresenceDelegate OnNewPresence;
@@ -159,7 +159,7 @@ namespace OpenSim.Region.Framework.Scenes
159 /// Triggered when a presence is removed from the scene 159 /// Triggered when a presence is removed from the scene
160 /// </summary> 160 /// </summary>
161 /// <remarks> 161 /// <remarks>
162 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> which is used by both 162 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/> which is used by both
163 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> 163 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see>
164 /// 164 ///
165 /// Triggered under per-agent lock. So if you want to perform any long-running operations, please 165 /// Triggered under per-agent lock. So if you want to perform any long-running operations, please
@@ -743,7 +743,7 @@ namespace OpenSim.Region.Framework.Scenes
743 public event OnIncomingSceneObjectDelegate OnIncomingSceneObject; 743 public event OnIncomingSceneObjectDelegate OnIncomingSceneObject;
744 public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so); 744 public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so);
745 745
746 public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); 746 public delegate void NewInventoryItemUploadComplete(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel);
747 747
748 public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete; 748 public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete;
749 749
@@ -974,6 +974,8 @@ namespace OpenSim.Region.Framework.Scenes
974 public delegate void RegionStarted(Scene scene); 974 public delegate void RegionStarted(Scene scene);
975 public event RegionStarted OnRegionStarted; 975 public event RegionStarted OnRegionStarted;
976 976
977 public delegate void RegionHeartbeatStart(Scene scene);
978 public event RegionHeartbeatStart OnRegionHeartbeatStart;
977 public delegate void RegionHeartbeatEnd(Scene scene); 979 public delegate void RegionHeartbeatEnd(Scene scene);
978 public event RegionHeartbeatEnd OnRegionHeartbeatEnd; 980 public event RegionHeartbeatEnd OnRegionHeartbeatEnd;
979 981
@@ -1024,6 +1026,16 @@ namespace OpenSim.Region.Framework.Scenes
1024 /// </remarks> 1026 /// </remarks>
1025 public event TeleportFail OnTeleportFail; 1027 public event TeleportFail OnTeleportFail;
1026 1028
1029// public delegate void GatherUuids(SceneObjectPart sop, IDictionary<UUID, AssetType> assetUuids);
1030//
1031// /// <summary>
1032// /// Triggered when UUIDs referenced by a scene object are being gathered for archiving, hg transfer, etc.
1033// /// </summary>
1034// /// <remarks>
1035// /// The listener should add references to the IDictionary<UUID, AssetType> as appropriate.
1036// /// </remarks>
1037// public event GatherUuids OnGatherUuids;
1038
1027 public class MoneyTransferArgs : EventArgs 1039 public class MoneyTransferArgs : EventArgs
1028 { 1040 {
1029 public UUID sender; 1041 public UUID sender;
@@ -1095,7 +1107,7 @@ namespace OpenSim.Region.Framework.Scenes
1095 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.ProcessMoneyTransferRequest"/> 1107 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.ProcessMoneyTransferRequest"/>
1096 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientGridEvents"/> 1108 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientGridEvents"/>
1097 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientEvents"/> 1109 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientEvents"/>
1098 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> 1110 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/>
1099 /// </remarks> 1111 /// </remarks>
1100 public event MoneyTransferEvent OnMoneyTransfer; 1112 public event MoneyTransferEvent OnMoneyTransfer;
1101 1113
@@ -1354,7 +1366,9 @@ namespace OpenSim.Region.Framework.Scenes
1354 { 1366 {
1355 try 1367 try
1356 { 1368 {
1369// m_log.ErrorFormat("[EVENT MANAGER]: OnRemovePresenceDelegate: {0}",d.Target.ToString());
1357 d(agentId); 1370 d(agentId);
1371// m_log.ErrorFormat("[EVENT MANAGER]: OnRemovePresenceDelegate done ");
1358 } 1372 }
1359 catch (Exception e) 1373 catch (Exception e)
1360 { 1374 {
@@ -2025,7 +2039,10 @@ namespace OpenSim.Region.Framework.Scenes
2025 { 2039 {
2026 try 2040 try
2027 { 2041 {
2042// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed: {0}", d.Target.ToString());
2028 d(ClientID, scene); 2043 d(ClientID, scene);
2044// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed done ");
2045
2029 } 2046 }
2030 catch (Exception e) 2047 catch (Exception e)
2031 { 2048 {
@@ -2160,7 +2177,7 @@ namespace OpenSim.Region.Framework.Scenes
2160 } 2177 }
2161 } 2178 }
2162 2179
2163 public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, UUID AssetID, String AssetName, int userlevel) 2180 public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, AssetType type, UUID AssetID, String AssetName, int userlevel)
2164 { 2181 {
2165 NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete; 2182 NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete;
2166 if (handlerNewInventoryItemUpdateComplete != null) 2183 if (handlerNewInventoryItemUpdateComplete != null)
@@ -2169,7 +2186,7 @@ namespace OpenSim.Region.Framework.Scenes
2169 { 2186 {
2170 try 2187 try
2171 { 2188 {
2172 d(agentID, AssetID, AssetName, userlevel); 2189 d(agentID, type, AssetID, AssetName, userlevel);
2173 } 2190 }
2174 catch (Exception e) 2191 catch (Exception e)
2175 { 2192 {
@@ -3096,6 +3113,27 @@ namespace OpenSim.Region.Framework.Scenes
3096 } 3113 }
3097 } 3114 }
3098 3115
3116 public void TriggerRegionHeartbeatStart(Scene scene)
3117 {
3118 RegionHeartbeatStart handler = OnRegionHeartbeatStart;
3119
3120 if (handler != null)
3121 {
3122 foreach (RegionHeartbeatStart d in handler.GetInvocationList())
3123 {
3124 try
3125 {
3126 d(scene);
3127 }
3128 catch (Exception e)
3129 {
3130 m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionHeartbeatStart failed - continuing {0} - {1}",
3131 e.Message, e.StackTrace);
3132 }
3133 }
3134 }
3135 }
3136
3099 public void TriggerRegionHeartbeatEnd(Scene scene) 3137 public void TriggerRegionHeartbeatEnd(Scene scene)
3100 { 3138 {
3101 RegionHeartbeatEnd handler = OnRegionHeartbeatEnd; 3139 RegionHeartbeatEnd handler = OnRegionHeartbeatEnd;
@@ -3251,5 +3289,26 @@ namespace OpenSim.Region.Framework.Scenes
3251 handler(scenePresence); 3289 handler(scenePresence);
3252 } 3290 }
3253 } 3291 }
3292
3293// public void TriggerGatherUuids(SceneObjectPart sop, IDictionary<UUID, AssetType> assetUuids)
3294// {
3295// GatherUuids handler = OnGatherUuids;
3296//
3297// if (handler != null)
3298// {
3299// foreach (GatherUuids d in handler.GetInvocationList())
3300// {
3301// try
3302// {
3303// d(sop, assetUuids);
3304// }
3305// catch (Exception e)
3306// {
3307// m_log.ErrorFormat("[EVENT MANAGER]: Delegate for TriggerUuidGather failed - continuing {0} - {1}",
3308// e.Message, e.StackTrace);
3309// }
3310// }
3311// }
3312// }
3254 } 3313 }
3255} 3314}