* refactor: Rename IRegionSerialiser and move into interfaces namespace

0.6.1-post-fixes
Justin Clarke Casey 2008-12-19 19:07:11 +00:00
parent fbd44e628c
commit eb6cca4750
8 changed files with 19 additions and 21 deletions

View File

@ -30,9 +30,9 @@ using System.Collections.Generic;
using System.IO;
using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Serialiser
namespace OpenSim.Region.Environment.Interfaces
{
public interface IRegionSerialiser
public interface IRegionSerialiserModule
{
List<string> SerialiseRegion(Scene scene, string saveDir);

View File

@ -69,7 +69,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
private string m_repodir = null;
private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
private Dictionary<UUID, IRegionSerialiser> m_serialiser = new Dictionary<UUID, IRegionSerialiser>();
private Dictionary<UUID, IRegionSerialiserModule> m_serialiser = new Dictionary<UUID, IRegionSerialiserModule>();
#endregion Fields
@ -105,9 +105,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{
foreach (UUID region in m_scenes.Keys)
{
m_serialiser.Add(region,
m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
);
m_serialiser.Add(region, m_scenes[region].RequestModuleInterface<IRegionSerialiserModule>());
}
}
}

View File

@ -25,11 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using OpenSim.Framework;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Environment.Modules.World.Serialiser;
using OpenSim.Region.Environment.Modules.World.Terrain;
using OpenSim.Framework.Communications.Cache;
using System;
using System.Collections.Generic;
using System.IO;
@ -39,6 +34,11 @@ using System.Xml;
using System.Net;
using OpenMetaverse;
using log4net;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Environment.Modules.World.Terrain;
namespace OpenSim.Region.Environment.Modules.World.Archiver
{
@ -124,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
// Reload serialized prims
m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count);
IRegionSerialiser serialiser = m_scene.RequestModuleInterface<IRegionSerialiser>();
IRegionSerialiserModule serialiser = m_scene.RequestModuleInterface<IRegionSerialiserModule>();
ICollection<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
foreach (string serialisedSceneObject in serialisedSceneObjects)

View File

@ -54,7 +54,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected ITerrainModule m_terrainModule;
protected IRegionSerialiser m_serialiser;
protected IRegionSerialiserModule m_serialiser;
protected List<SceneObjectGroup> m_sceneObjects;
protected string m_sceneName;
protected string m_savePath;
@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
public ArchiveWriteRequestExecution(
List<SceneObjectGroup> sceneObjects,
ITerrainModule terrainModule,
IRegionSerialiser serialiser,
IRegionSerialiserModule serialiser,
string sceneName,
string savePath)
{

View File

@ -287,7 +287,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
= new ArchiveWriteRequestExecution(
sceneObjects,
m_scene.RequestModuleInterface<ITerrainModule>(),
m_scene.RequestModuleInterface<IRegionSerialiser>(),
m_scene.RequestModuleInterface<IRegionSerialiserModule>(),
m_scene.RegionInfo.RegionName,
m_savePath);
new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute();

View File

@ -36,7 +36,7 @@ using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Region.Environment.Modules.World.Serialiser
{
public class SerialiserModule : IRegionModule, IRegionSerialiser
public class SerialiserModule : IRegionModule, IRegionSerialiserModule
{
private Commander m_commander = new Commander("Export");
private List<Scene> m_regions = new List<Scene>();
@ -49,7 +49,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
{
scene.RegisterModuleCommander("Export", m_commander);
scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
scene.RegisterModuleInterface<IRegionSerialiser>(this);
scene.RegisterModuleInterface<IRegionSerialiserModule>(this);
lock (m_regions)
{

View File

@ -142,7 +142,7 @@ namespace OpenSim.Region.Environment.Scenes
protected IWorldComm m_worldCommModule;
protected IAvatarFactory m_AvatarFactory;
protected IConfigSource m_config;
protected IRegionSerialiser m_serialiser;
protected IRegionSerialiserModule m_serialiser;
// Central Update Loop
@ -728,7 +728,7 @@ namespace OpenSim.Region.Environment.Scenes
m_worldCommModule = RequestModuleInterface<IWorldComm>();
XferManager = RequestModuleInterface<IXfer>();
m_AvatarFactory = RequestModuleInterface<IAvatarFactory>();
m_serialiser = RequestModuleInterface<IRegionSerialiser>();
m_serialiser = RequestModuleInterface<IRegionSerialiserModule>();
}
#endregion

View File

@ -50,7 +50,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
private bool m_enabled = false;
private bool m_installBackupOnLoad = false;
private IRegionSerialiser m_serialiser;
private IRegionSerialiserModule m_serialiser;
private bool m_svnAutoSave = false;
private SvnClient m_svnClient;
private string m_svndir = "SVNmodule" + Slash.DirectorySeparatorChar + "repo";
@ -360,7 +360,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
private void SetupSerialiser()
{
if (m_scenes.Count > 0)
m_serialiser = m_scenes[0].RequestModuleInterface<IRegionSerialiser>();
m_serialiser = m_scenes[0].RequestModuleInterface<IRegionSerialiserModule>();
}
private void SetupSvnProvider()