* refactor: Rename IRegionSerialiser and move into interfaces namespace
parent
fbd44e628c
commit
eb6cca4750
|
@ -30,9 +30,9 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
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);
|
List<string> SerialiseRegion(Scene scene, string saveDir);
|
||||||
|
|
|
@ -69,7 +69,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
|
|
||||||
private string m_repodir = null;
|
private string m_repodir = null;
|
||||||
private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
|
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
|
#endregion Fields
|
||||||
|
|
||||||
|
@ -105,9 +105,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
{
|
{
|
||||||
foreach (UUID region in m_scenes.Keys)
|
foreach (UUID region in m_scenes.Keys)
|
||||||
{
|
{
|
||||||
m_serialiser.Add(region,
|
m_serialiser.Add(region, m_scenes[region].RequestModuleInterface<IRegionSerialiserModule>());
|
||||||
m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,11 +25,6 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* 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;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -39,6 +34,11 @@ using System.Xml;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using log4net;
|
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
|
namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
{
|
{
|
||||||
|
@ -124,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
// Reload serialized prims
|
// Reload serialized prims
|
||||||
m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count);
|
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>();
|
ICollection<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
|
||||||
|
|
||||||
foreach (string serialisedSceneObject in serialisedSceneObjects)
|
foreach (string serialisedSceneObject in serialisedSceneObjects)
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
protected ITerrainModule m_terrainModule;
|
protected ITerrainModule m_terrainModule;
|
||||||
protected IRegionSerialiser m_serialiser;
|
protected IRegionSerialiserModule m_serialiser;
|
||||||
protected List<SceneObjectGroup> m_sceneObjects;
|
protected List<SceneObjectGroup> m_sceneObjects;
|
||||||
protected string m_sceneName;
|
protected string m_sceneName;
|
||||||
protected string m_savePath;
|
protected string m_savePath;
|
||||||
|
@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
public ArchiveWriteRequestExecution(
|
public ArchiveWriteRequestExecution(
|
||||||
List<SceneObjectGroup> sceneObjects,
|
List<SceneObjectGroup> sceneObjects,
|
||||||
ITerrainModule terrainModule,
|
ITerrainModule terrainModule,
|
||||||
IRegionSerialiser serialiser,
|
IRegionSerialiserModule serialiser,
|
||||||
string sceneName,
|
string sceneName,
|
||||||
string savePath)
|
string savePath)
|
||||||
{
|
{
|
||||||
|
|
|
@ -287,7 +287,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
= new ArchiveWriteRequestExecution(
|
= new ArchiveWriteRequestExecution(
|
||||||
sceneObjects,
|
sceneObjects,
|
||||||
m_scene.RequestModuleInterface<ITerrainModule>(),
|
m_scene.RequestModuleInterface<ITerrainModule>(),
|
||||||
m_scene.RequestModuleInterface<IRegionSerialiser>(),
|
m_scene.RequestModuleInterface<IRegionSerialiserModule>(),
|
||||||
m_scene.RegionInfo.RegionName,
|
m_scene.RegionInfo.RegionName,
|
||||||
m_savePath);
|
m_savePath);
|
||||||
new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute();
|
new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute();
|
||||||
|
|
|
@ -36,7 +36,7 @@ using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules.World.Serialiser
|
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 Commander m_commander = new Commander("Export");
|
||||||
private List<Scene> m_regions = new List<Scene>();
|
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.RegisterModuleCommander("Export", m_commander);
|
||||||
scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
|
scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
|
||||||
scene.RegisterModuleInterface<IRegionSerialiser>(this);
|
scene.RegisterModuleInterface<IRegionSerialiserModule>(this);
|
||||||
|
|
||||||
lock (m_regions)
|
lock (m_regions)
|
||||||
{
|
{
|
||||||
|
|
|
@ -142,7 +142,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
protected IWorldComm m_worldCommModule;
|
protected IWorldComm m_worldCommModule;
|
||||||
protected IAvatarFactory m_AvatarFactory;
|
protected IAvatarFactory m_AvatarFactory;
|
||||||
protected IConfigSource m_config;
|
protected IConfigSource m_config;
|
||||||
protected IRegionSerialiser m_serialiser;
|
protected IRegionSerialiserModule m_serialiser;
|
||||||
|
|
||||||
// Central Update Loop
|
// Central Update Loop
|
||||||
|
|
||||||
|
@ -728,7 +728,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_worldCommModule = RequestModuleInterface<IWorldComm>();
|
m_worldCommModule = RequestModuleInterface<IWorldComm>();
|
||||||
XferManager = RequestModuleInterface<IXfer>();
|
XferManager = RequestModuleInterface<IXfer>();
|
||||||
m_AvatarFactory = RequestModuleInterface<IAvatarFactory>();
|
m_AvatarFactory = RequestModuleInterface<IAvatarFactory>();
|
||||||
m_serialiser = RequestModuleInterface<IRegionSerialiser>();
|
m_serialiser = RequestModuleInterface<IRegionSerialiserModule>();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
|
||||||
|
|
||||||
private bool m_enabled = false;
|
private bool m_enabled = false;
|
||||||
private bool m_installBackupOnLoad = false;
|
private bool m_installBackupOnLoad = false;
|
||||||
private IRegionSerialiser m_serialiser;
|
private IRegionSerialiserModule m_serialiser;
|
||||||
private bool m_svnAutoSave = false;
|
private bool m_svnAutoSave = false;
|
||||||
private SvnClient m_svnClient;
|
private SvnClient m_svnClient;
|
||||||
private string m_svndir = "SVNmodule" + Slash.DirectorySeparatorChar + "repo";
|
private string m_svndir = "SVNmodule" + Slash.DirectorySeparatorChar + "repo";
|
||||||
|
@ -360,7 +360,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
|
||||||
private void SetupSerialiser()
|
private void SetupSerialiser()
|
||||||
{
|
{
|
||||||
if (m_scenes.Count > 0)
|
if (m_scenes.Count > 0)
|
||||||
m_serialiser = m_scenes[0].RequestModuleInterface<IRegionSerialiser>();
|
m_serialiser = m_scenes[0].RequestModuleInterface<IRegionSerialiserModule>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetupSvnProvider()
|
private void SetupSvnProvider()
|
||||||
|
|
Loading…
Reference in New Issue