aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/EventManager.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-06-27 23:42:35 +0100
committerJustin Clark-Casey (justincc)2013-06-27 23:42:35 +0100
commit149487ea0f74a46a70c98b3a31259b667f4d29b2 (patch)
tree19524863c98a1d5b229cfda790913da1588d372b /OpenSim/Region/Framework/Scenes/EventManager.cs
parentMake the concept of namespaces explicit in dynamic attributes (diff)
downloadopensim-SC_OLD-149487ea0f74a46a70c98b3a31259b667f4d29b2.zip
opensim-SC_OLD-149487ea0f74a46a70c98b3a31259b667f4d29b2.tar.gz
opensim-SC_OLD-149487ea0f74a46a70c98b3a31259b667f4d29b2.tar.bz2
opensim-SC_OLD-149487ea0f74a46a70c98b3a31259b667f4d29b2.tar.xz
refactor: Move code for gathering textures referenced by materials into MaterialsDemoModule from UuidGatherer
This code is now triggered via EventManager.OnGatherUuids which modules can subscribe to.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index a246319..720bfa9 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -1021,6 +1021,16 @@ namespace OpenSim.Region.Framework.Scenes
1021 /// </remarks> 1021 /// </remarks>
1022 public event TeleportFail OnTeleportFail; 1022 public event TeleportFail OnTeleportFail;
1023 1023
1024 public delegate void GatherUuids(SceneObjectPart sop, IDictionary<UUID, AssetType> assetUuids);
1025
1026 /// <summary>
1027 /// Triggered when UUIDs referenced by a scene object are being gathered for archiving, hg transfer, etc.
1028 /// </summary>
1029 /// <remarks>
1030 /// The listener should add references to the IDictionary<UUID, AssetType> as appropriate.
1031 /// </remarks>
1032 public event GatherUuids OnGatherUuids;
1033
1024 public class MoneyTransferArgs : EventArgs 1034 public class MoneyTransferArgs : EventArgs
1025 { 1035 {
1026 public UUID sender; 1036 public UUID sender;
@@ -3237,5 +3247,26 @@ namespace OpenSim.Region.Framework.Scenes
3237 } 3247 }
3238 } 3248 }
3239 } 3249 }
3250
3251 public void TriggerGatherUuids(SceneObjectPart sop, IDictionary<UUID, AssetType> assetUuids)
3252 {
3253 GatherUuids handler = OnGatherUuids;
3254
3255 if (handler != null)
3256 {
3257 foreach (GatherUuids d in handler.GetInvocationList())
3258 {
3259 try
3260 {
3261 d(sop, assetUuids);
3262 }
3263 catch (Exception e)
3264 {
3265 m_log.ErrorFormat("[EVENT MANAGER]: Delegate for TriggerUuidGather failed - continuing {0} - {1}",
3266 e.Message, e.StackTrace);
3267 }
3268 }
3269 }
3270 }
3240 } 3271 }
3241} 3272}