From 96e649189f24b6261d0bcdd6aa7f5a078b8d3f7f Mon Sep 17 00:00:00 2001
From: Tom Grimshaw
Date: Fri, 25 Jun 2010 14:25:39 -0700
Subject: Add two events: OnAttachToBackup and OnDetachFromBackup.
---
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
(limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 80f9114..904e38a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -43,6 +43,10 @@ namespace OpenSim.Region.Framework.Scenes
public delegate void ObjectDuplicateDelegate(EntityBase original, EntityBase clone);
+ public delegate void AttachToBackupDelegate(SceneObjectGroup sog);
+
+ public delegate void DetachFromBackupDelegate(SceneObjectGroup sog);
+
public delegate void ObjectCreateDelegate(EntityBase obj);
public delegate void ObjectDeleteDelegate(EntityBase obj);
@@ -61,6 +65,8 @@ namespace OpenSim.Region.Framework.Scenes
private PhysicsCrash handlerPhysicsCrash = null;
public event ObjectDuplicateDelegate OnObjectDuplicate;
+ public event AttachToBackupDelegate OnAttachToBackup;
+ public event DetachFromBackupDelegate OnDetachFromBackup;
public event ObjectCreateDelegate OnObjectCreate;
public event ObjectDeleteDelegate OnObjectRemove;
@@ -388,10 +394,14 @@ namespace OpenSim.Region.Framework.Scenes
m_numPrim += sceneObject.Children.Count;
if (attachToBackup)
+ {
sceneObject.AttachToBackup();
+ }
if (OnObjectCreate != null)
+ {
OnObjectCreate(sceneObject);
+ }
lock (m_dictionary_lock)
{
@@ -458,6 +468,22 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ public void FireAttachToBackup(SceneObjectGroup obj)
+ {
+ if (OnAttachToBackup != null)
+ {
+ OnAttachToBackup(obj);
+ }
+ }
+
+ public void FireDetachFromBackup(SceneObjectGroup obj)
+ {
+ if (OnDetachFromBackup != null)
+ {
+ OnDetachFromBackup(obj);
+ }
+ }
+
///
/// Process all pending updates
///
--
cgit v1.1
From f64d1cb3967b5352921b296348f618a62fdfa622 Mon Sep 17 00:00:00 2001
From: Tom Grimshaw
Date: Fri, 25 Jun 2010 14:39:15 -0700
Subject: Add new event: OnChangedBackup
---
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 11 +++++++++++
1 file changed, 11 insertions(+)
(limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index ce7b0eb..81ef54f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -47,6 +47,8 @@ namespace OpenSim.Region.Framework.Scenes
public delegate void DetachFromBackupDelegate(SceneObjectGroup sog);
+ public delegate void ChangedBackupDelegate(SceneObjectGroup sog);
+
public delegate void ObjectCreateDelegate(EntityBase obj);
public delegate void ObjectDeleteDelegate(EntityBase obj);
@@ -67,6 +69,7 @@ namespace OpenSim.Region.Framework.Scenes
public event ObjectDuplicateDelegate OnObjectDuplicate;
public event AttachToBackupDelegate OnAttachToBackup;
public event DetachFromBackupDelegate OnDetachFromBackup;
+ public event ChangedBackupDelegate OnChangeBackup;
public event ObjectCreateDelegate OnObjectCreate;
public event ObjectDeleteDelegate OnObjectRemove;
@@ -484,6 +487,14 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ public void FireChangeBackup(SceneObjectGroup obj)
+ {
+ if (OnChangeBackup != null)
+ {
+ OnChangeBackup(obj);
+ }
+ }
+
///
/// Process all pending updates
///
--
cgit v1.1