aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2012-11-11 14:22:06 -0800
committerDiva Canto2012-11-11 14:22:06 -0800
commit963b1e861c710337b23276680ddfb68ec2ceaadf (patch)
tree18ad922f35fd795673e4bb7a8d55e1eec7c6dc51
parentOne more module converted: EmailModule. (diff)
downloadopensim-SC_OLD-963b1e861c710337b23276680ddfb68ec2ceaadf.zip
opensim-SC_OLD-963b1e861c710337b23276680ddfb68ec2ceaadf.tar.gz
opensim-SC_OLD-963b1e861c710337b23276680ddfb68ec2ceaadf.tar.bz2
opensim-SC_OLD-963b1e861c710337b23276680ddfb68ec2ceaadf.tar.xz
One more module converted: ScriptsHttpRequests.
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs34
1 files changed, 25 insertions, 9 deletions
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;
41using OpenSim.Framework.Servers.HttpServer; 41using OpenSim.Framework.Servers.HttpServer;
42using OpenSim.Region.Framework.Interfaces; 42using OpenSim.Region.Framework.Interfaces;
43using OpenSim.Region.Framework.Scenes; 43using OpenSim.Region.Framework.Scenes;
44using Mono.Addins;
44 45
45/***************************************************** 46/*****************************************************
46 * 47 *
@@ -87,7 +88,8 @@ using OpenSim.Region.Framework.Scenes;
87 88
88namespace OpenSim.Region.CoreModules.Scripting.HttpRequest 89namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
89{ 90{
90 public class HttpRequestModule : IRegionModule, IHttpRequestModule 91 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HttpRequestModule")]
92 public class HttpRequestModule : ISharedRegionModule, IHttpRequestModule
91 { 93 {
92 private object HttpListLock = new object(); 94 private object HttpListLock = new object();
93 private int httpTimeout = 30000; 95 private int httpTimeout = 30000;
@@ -270,24 +272,38 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
270 272
271 #endregion 273 #endregion
272 274
273 #region IRegionModule Members 275 #region ISharedRegionModule Members
274 276
275 public void Initialise(Scene scene, IConfigSource config) 277 public void Initialise(IConfigSource config)
276 { 278 {
277 m_scene = scene;
278
279 m_scene.RegisterModuleInterface<IHttpRequestModule>(this);
280
281 m_proxyurl = config.Configs["Startup"].GetString("HttpProxy"); 279 m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
282 m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions"); 280 m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
283 281
284 m_pendingRequests = new Dictionary<UUID, HttpRequestClass>(); 282 m_pendingRequests = new Dictionary<UUID, HttpRequestClass>();
285 } 283 }
286 284
285 public void AddRegion(Scene scene)
286 {
287 m_scene = scene;
288
289 m_scene.RegisterModuleInterface<IHttpRequestModule>(this);
290 }
291
292 public void RemoveRegion(Scene scene)
293 {
294 scene.UnregisterModuleInterface<IHttpRequestModule>(this);
295 if (scene == m_scene)
296 m_scene = null;
297 }
298
287 public void PostInitialise() 299 public void PostInitialise()
288 { 300 {
289 } 301 }
290 302
303 public void RegionLoaded(Scene scene)
304 {
305 }
306
291 public void Close() 307 public void Close()
292 { 308 {
293 } 309 }
@@ -297,9 +313,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
297 get { return m_name; } 313 get { return m_name; }
298 } 314 }
299 315
300 public bool IsSharedModule 316 public Type ReplaceableInterface
301 { 317 {
302 get { return true; } 318 get { return null; }
303 } 319 }
304 320
305 #endregion 321 #endregion