From d4d9d8ed8feb2532ca66319e5e7eb500ba188609 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 25 May 2009 11:11:04 +0000 Subject: converting CapabilitiesModule to new region module scheme --- .../Agent/Capabilities/CapabilitiesModule.cs | 27 ++++++++++++++++++---- .../Resources/CoreModulePlugin.addin.xml | 1 + OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 7 +++--- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs index dbd5104..eba077e 100644 --- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs @@ -38,7 +38,7 @@ using Caps=OpenSim.Framework.Communications.Capabilities.Caps; namespace OpenSim.Region.CoreModules.Agent.Capabilities { - public class CapabilitiesModule : IRegionModule, ICapabilitiesModule + public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -53,16 +53,33 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities protected Dictionary> childrenSeeds = new Dictionary>(); - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) + { + } + + public void AddRegion(Scene scene) { m_scene = scene; m_scene.RegisterModuleInterface(this); } + + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + m_scene.UnregisterModuleInterface(this); + } public void PostInitialise() {} + public void Close() {} - public string Name { get { return "Capabilities Module"; } } - public bool IsSharedModule { get { return false; } } + + public string Name + { + get { return "Capabilities Module"; } + } public void AddCapsHandler(UUID agentId) { @@ -86,7 +103,7 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities Caps caps = new Caps( - m_scene.AssetService, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName, + m_scene.AssetService, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName, m_scene.CommsManager.HttpServer.Port, capsObjectPath, agentId, m_scene.DumpAssetsToFile, m_scene.RegionInfo.RegionName); diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 6c80598..b71b7ee 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -8,6 +8,7 @@ + diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 413a2b9..6de5a02 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs @@ -117,9 +117,10 @@ namespace OpenSim.Tests.Common.Setup TestScene testScene = new TestScene( regInfo, acm, cm, scs, sm, null, false, false, false, configSource, null); - IRegionModule capsModule = new CapabilitiesModule(); - capsModule.Initialise(testScene, new IniConfigSource()); - testScene.AddModule(capsModule.Name, capsModule); + INonSharedRegionModule capsModule = new CapabilitiesModule(); + capsModule.Initialise(new IniConfigSource()); + testScene.AddRegionModule(capsModule.Name, capsModule); + capsModule.AddRegion(testScene); IRegionModule godsModule = new GodsModule(); godsModule.Initialise(testScene, new IniConfigSource()); -- cgit v1.1