aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-16 00:47:21 +0000
committerMelanie Thielker2008-11-16 00:47:21 +0000
commit27e557eb9857ccc34ae3588c4e0ff43bd5e6644a (patch)
tree742ab8738481d93ebc03fe94c80b6333c65631b0 /OpenSim/Region/Environment/Scenes
parentChanged sculpted prim texture scaling method to bilinear to reduce scaling ar... (diff)
downloadopensim-SC_OLD-27e557eb9857ccc34ae3588c4e0ff43bd5e6644a.zip
opensim-SC_OLD-27e557eb9857ccc34ae3588c4e0ff43bd5e6644a.tar.gz
opensim-SC_OLD-27e557eb9857ccc34ae3588c4e0ff43bd5e6644a.tar.bz2
opensim-SC_OLD-27e557eb9857ccc34ae3588c4e0ff43bd5e6644a.tar.xz
Introduces the message transfer module. It splits the transfer mechanics off
the IM module and makes it into a module of it's own, which can be used by all other modules. Removes some ugly hacks. Refer to the IM module to see how it's used. Also fixes the persistence issue (Mantis #2598)
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/EventManager.cs29
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs18
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs3
3 files changed, 24 insertions, 26 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs
index 5d21dc5..bcefe37 100644
--- a/OpenSim/Region/Environment/Scenes/EventManager.cs
+++ b/OpenSim/Region/Environment/Scenes/EventManager.cs
@@ -144,9 +144,11 @@ namespace OpenSim.Region.Environment.Scenes
144 144
145 public event SignificantClientMovement OnSignificantClientMovement; 145 public event SignificantClientMovement OnSignificantClientMovement;
146 146
147 public delegate void NewGridInstantMessage(GridInstantMessage message, InstantMessageReceiver whichModule); 147 public delegate void IncomingInstantMessage(GridInstantMessage message);
148 148
149 public event NewGridInstantMessage OnGridInstantMessage; 149 public event IncomingInstantMessage OnIncomingInstantMessage;
150
151 public event IncomingInstantMessage OnUnhandledInstantMessage;
150 152
151 public delegate void ClientClosed(UUID clientID); 153 public delegate void ClientClosed(UUID clientID);
152 154
@@ -352,7 +354,8 @@ namespace OpenSim.Region.Environment.Scenes
352 private LandObjectAdded handlerLandObjectAdded = null; //OnLandObjectAdded; 354 private LandObjectAdded handlerLandObjectAdded = null; //OnLandObjectAdded;
353 private LandObjectRemoved handlerLandObjectRemoved = null; //OnLandObjectRemoved; 355 private LandObjectRemoved handlerLandObjectRemoved = null; //OnLandObjectRemoved;
354 private AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = null; //OnAvatarEnteringNewParcel; 356 private AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = null; //OnAvatarEnteringNewParcel;
355 private NewGridInstantMessage handlerGridInstantMessage = null; //OnGridInstantMessage; 357 private IncomingInstantMessage handlerIncomingInstantMessage = null; //OnIncomingInstantMessage;
358 private IncomingInstantMessage handlerUnhandledInstantMessage = null; //OnUnhandledInstantMessage;
356 private ClientClosed handlerClientClosed = null; //OnClientClosed; 359 private ClientClosed handlerClientClosed = null; //OnClientClosed;
357 private OnMakeChildAgentDelegate handlerMakeChildAgent = null; //OnMakeChildAgent; 360 private OnMakeChildAgentDelegate handlerMakeChildAgent = null; //OnMakeChildAgent;
358 private OnMakeRootAgentDelegate handlerMakeRootAgent = null; //OnMakeRootAgent; 361 private OnMakeRootAgentDelegate handlerMakeRootAgent = null; //OnMakeRootAgent;
@@ -641,15 +644,21 @@ namespace OpenSim.Region.Environment.Scenes
641 } 644 }
642 } 645 }
643 646
644 ///<summary>Used to pass instnat messages around between the Scene, the Friends Module and the Instant Messsage Module</summary> 647 public void TriggerIncomingInstantMessage(GridInstantMessage message)
645 ///<param name="message">Object containing the Instant Message Data</param> 648 {
646 ///<param name="whichModule">A bit vector containing the modules to send the message to</param> 649 handlerIncomingInstantMessage = OnIncomingInstantMessage;
647 public void TriggerGridInstantMessage(GridInstantMessage message, InstantMessageReceiver whichModule) 650 if (handlerIncomingInstantMessage != null)
651 {
652 handlerIncomingInstantMessage(message);
653 }
654 }
655
656 public void TriggerUnhandledInstantMessage(GridInstantMessage message)
648 { 657 {
649 handlerGridInstantMessage = OnGridInstantMessage; 658 handlerUnhandledInstantMessage = OnUnhandledInstantMessage;
650 if (handlerGridInstantMessage != null) 659 if (handlerUnhandledInstantMessage != null)
651 { 660 {
652 handlerGridInstantMessage(message, whichModule); 661 handlerUnhandledInstantMessage(message);
653 } 662 }
654 } 663 }
655 664
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 08b7bdb..7485134 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -993,7 +993,8 @@ namespace OpenSim.Region.Environment.Scenes
993 else 993 else
994 msg.message = string.Format("Your object {0} was returned from {1} in region {2} due to parcel auto return", ret.Value.objectName, ret.Value.location.ToString(), RegionInfo.RegionName); 994 msg.message = string.Format("Your object {0} was returned from {1} in region {2} due to parcel auto return", ret.Value.objectName, ret.Value.location.ToString(), RegionInfo.RegionName);
995 995
996 TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 996// TODO: Send IM
997// TriggerGridInstantMessage(msg);
997 } 998 }
998 } 999 }
999 1000
@@ -3304,21 +3305,6 @@ namespace OpenSim.Region.Environment.Scenes
3304 return UUID.Zero; 3305 return UUID.Zero;
3305 } 3306 }
3306 3307
3307 /// <summary>
3308 /// This method is a way for the Friends Module to create an instant
3309 /// message to the avatar and for Instant Messages that travel across
3310 /// gridcomms to make it to the Instant Message Module.
3311 ///
3312 /// Friendship establishment and groups are unfortunately tied with instant messaging and
3313 /// there's no way to separate them completely.
3314 /// </summary>
3315 /// <param name="message">object containing the instant message data</param>
3316 /// <returns>void</returns>
3317 public void TriggerGridInstantMessage(GridInstantMessage message, InstantMessageReceiver options)
3318 {
3319 m_eventManager.TriggerGridInstantMessage(message, options);
3320 }
3321
3322 public virtual void StoreAddFriendship(UUID ownerID, UUID friendID, uint perms) 3308 public virtual void StoreAddFriendship(UUID ownerID, UUID friendID, uint perms)
3323 { 3309 {
3324 // TODO: m_sceneGridService.DoStuff; 3310 // TODO: m_sceneGridService.DoStuff;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index d929be2..acb6888 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1211,6 +1211,9 @@ namespace OpenSim.Region.Environment.Scenes
1211 /// <param name="datastore"></param> 1211 /// <param name="datastore"></param>
1212 public void ProcessBackup(IRegionDataStore datastore) 1212 public void ProcessBackup(IRegionDataStore datastore)
1213 { 1213 {
1214 if (!m_isBackedUp)
1215 return;
1216
1214 // Since this is the top of the section of call stack for backing up a particular scene object, don't let 1217 // Since this is the top of the section of call stack for backing up a particular scene object, don't let
1215 // any exception propogate upwards. 1218 // any exception propogate upwards.
1216 1219