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 --- .../Scripting/HttpRequest/ScriptsHttpRequests.cs | 36 +++++++++++++++------- 1 file changed, 25 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/CoreModules/Scripting/HttpRequest') diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index d78931a..e331b8d 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -31,6 +31,7 @@ using System.IO; using System.Net; using System.Text; using System.Threading; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -84,7 +85,8 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Scripting.HttpRequest { - public class HttpRequestModule : IRegionModule, IHttpRequestModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class HttpRequestModule : ISharedRegionModule, IHttpRequestModule { private object HttpListLock = new object(); private int httpTimeout = 30000; @@ -229,18 +231,35 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest #endregion - #region IRegionModule Members + #region ISharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) + { + m_proxyurl = config.Configs["Startup"].GetString("HttpProxy"); + m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions"); + + m_pendingRequests = new Dictionary(); + } + + public void AddRegion(Scene scene) { m_scene = scene; m_scene.RegisterModuleInterface(this); + } + + public Type ReplaceableInterface + { + get { return null; } + } - m_proxyurl = config.Configs["Startup"].GetString("HttpProxy"); - m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions"); + public void RegionLoaded(Scene scene) + { + } - m_pendingRequests = new Dictionary(); + public void RemoveRegion(Scene scene) + { + scene.UnregisterModuleInterface(this); } public void PostInitialise() @@ -256,11 +275,6 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest get { return m_name; } } - public bool IsSharedModule - { - get { return true; } - } - #endregion } -- cgit v1.1