aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorlbsa712008-02-14 11:15:41 +0000
committerlbsa712008-02-14 11:15:41 +0000
commitc0d411f4275c6f3e69a072559dc8634792256153 (patch)
tree4e351de2ddb9a01a6dde99dc48ac9a6087c5ddd5 /OpenSim
parentRevert the index -> Add changes made in AvatarFactoryModule previously. It a... (diff)
downloadopensim-SC_OLD-c0d411f4275c6f3e69a072559dc8634792256153.zip
opensim-SC_OLD-c0d411f4275c6f3e69a072559dc8634792256153.tar.gz
opensim-SC_OLD-c0d411f4275c6f3e69a072559dc8634792256153.tar.bz2
opensim-SC_OLD-c0d411f4275c6f3e69a072559dc8634792256153.tar.xz
* Exposed AddHandlers in response to mantis #534. Thanks, kmeisthax!
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs37
1 files changed, 33 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 4bdcd40..5842932 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Region.Environment.Scenes
93 protected SceneXmlLoader m_sceneXmlLoader; 93 protected SceneXmlLoader m_sceneXmlLoader;
94 94
95 protected Dictionary<LLUUID, Caps> m_capsHandlers = new Dictionary<LLUUID, Caps>(); 95 protected Dictionary<LLUUID, Caps> m_capsHandlers = new Dictionary<LLUUID, Caps>();
96 protected BaseHttpServer httpListener; 96 protected BaseHttpServer m_httpListener;
97 97
98 protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>(); 98 protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>();
99 public Dictionary<Type, object> ModuleInterfaces = new Dictionary<Type, object>(); 99 public Dictionary<Type, object> ModuleInterfaces = new Dictionary<Type, object>();
@@ -280,7 +280,7 @@ namespace OpenSim.Region.Environment.Scenes
280 m_log.Info("[SCENE]: Creating LandMap"); 280 m_log.Info("[SCENE]: Creating LandMap");
281 Terrain = new TerrainEngine((int)RegionInfo.RegionLocX, (int)RegionInfo.RegionLocY); 281 Terrain = new TerrainEngine((int)RegionInfo.RegionLocX, (int)RegionInfo.RegionLocY);
282 282
283 httpListener = httpServer; 283 m_httpListener = httpServer;
284 m_dumpAssetsToFile = dumpAssetsToFile; 284 m_dumpAssetsToFile = dumpAssetsToFile;
285 285
286 if ((RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts) 286 if ((RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts)
@@ -1609,11 +1609,11 @@ namespace OpenSim.Region.Environment.Scenes
1609 { 1609 {
1610 m_log.Debug("[CONNECTION DEBUGGING]: Setting up CAPS handler for " + agent.AgentID.ToString() + " at " + agent.CapsPath.ToString()); 1610 m_log.Debug("[CONNECTION DEBUGGING]: Setting up CAPS handler for " + agent.AgentID.ToString() + " at " + agent.CapsPath.ToString());
1611 Caps cap = 1611 Caps cap =
1612 new Caps(AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port, 1612 new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port,
1613 agent.CapsPath, agent.AgentID, m_dumpAssetsToFile); 1613 agent.CapsPath, agent.AgentID, m_dumpAssetsToFile);
1614 1614
1615 Util.SetCapsURL(agent.AgentID, 1615 Util.SetCapsURL(agent.AgentID,
1616 "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() + 1616 "http://" + m_regInfo.ExternalHostName + ":" + m_httpListener.Port.ToString() +
1617 "/CAPS/" + agent.CapsPath + "0000/"); 1617 "/CAPS/" + agent.CapsPath + "0000/");
1618 cap.RegisterHandlers(); 1618 cap.RegisterHandlers();
1619 if (agent.child) 1619 if (agent.child)
@@ -2582,5 +2582,34 @@ namespace OpenSim.Region.Environment.Scenes
2582 } 2582 }
2583 2583
2584 #endregion 2584 #endregion
2585
2586 #region BaseHTTPServer wrapper methods
2587
2588 public bool AddHTTPHandler(string method, GenericHTTPMethod handler)
2589 {
2590 return m_httpListener.AddHTTPHandler(method, handler);
2591 }
2592
2593 public bool AddXmlRPCHandler(string method, XmlRpcMethod handler)
2594 {
2595 return m_httpListener.AddXmlRPCHandler(method, handler);
2596 }
2597
2598 public void AddStreamHandler(IRequestHandler handler)
2599 {
2600 m_httpListener.AddStreamHandler(handler);
2601 }
2602
2603 public void RemoveStreamHandler(string httpMethod, string path)
2604 {
2605 m_httpListener.RemoveStreamHandler(httpMethod, path);
2606 }
2607
2608 public void RemoveHTTPHandler(string httpMethod, string path)
2609 {
2610 m_httpListener.RemoveHTTPHandler(httpMethod, path);
2611 }
2612
2613 #endregion
2585 } 2614 }
2586} 2615}