From ec3c31e61e5e540f822891110df9bc978655bbaf Mon Sep 17 00:00:00 2001 From: Revolution Date: Fri, 22 Jan 2010 18:09:33 -0600 Subject: Updates all IRegionModules to the new style region modules. Signed-off-by: Melanie --- .../Agent/TextureDownload/TextureDownloadModule.cs | 33 +++++++++++++++------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/CoreModules/Agent/TextureDownload') diff --git a/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs index 71ff28c..c4d84cb 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Reflection; using System.Threading; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -41,7 +42,8 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Agent.TextureDownload { - public class TextureDownloadModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class TextureDownloadModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -65,11 +67,14 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload { } - #region IRegionModule Members + #region INonSharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) + { + } + + public void AddRegion(Scene scene) { - if (m_scene == null) { //m_log.Debug("Creating Texture download module"); @@ -90,22 +95,30 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload } } - public void PostInitialise() + public Type ReplaceableInterface { + get { return null; } } - public void Close() + public void RegionLoaded(Scene scene) { } - public string Name + public void RemoveRegion(Scene scene) { - get { return "TextureDownloadModule"; } + if(m_scenes.Contains(scene)) + m_scenes.Remove(scene); + scene.EventManager.OnNewClient -= NewClient; + scene.EventManager.OnRemovePresence -= EventManager_OnRemovePresence; } - public bool IsSharedModule + public void Close() + { + } + + public string Name { - get { return false; } + get { return "TextureDownloadModule"; } } #endregion -- cgit v1.1