From 963b1e861c710337b23276680ddfb68ec2ceaadf Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 14:22:06 -0800 Subject: One more module converted: ScriptsHttpRequests. --- .../Scripting/HttpRequest/ScriptsHttpRequests.cs | 34 ++++++++++++++++------ 1 file changed, 25 insertions(+), 9 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 d328eb3..a676971 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -41,6 +41,7 @@ using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using Mono.Addins; /***************************************************** * @@ -87,7 +88,8 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Scripting.HttpRequest { - public class HttpRequestModule : IRegionModule, IHttpRequestModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HttpRequestModule")] + public class HttpRequestModule : ISharedRegionModule, IHttpRequestModule { private object HttpListLock = new object(); private int httpTimeout = 30000; @@ -270,24 +272,38 @@ 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_scene = scene; - - m_scene.RegisterModuleInterface(this); - 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 void RemoveRegion(Scene scene) + { + scene.UnregisterModuleInterface(this); + if (scene == m_scene) + m_scene = null; + } + public void PostInitialise() { } + public void RegionLoaded(Scene scene) + { + } + public void Close() { } @@ -297,9 +313,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest get { return m_name; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } + get { return null; } } #endregion -- cgit v1.1