diff options
author | Melanie | 2010-10-06 03:03:10 +0100 |
---|---|---|
committer | Melanie | 2010-10-06 03:03:10 +0100 |
commit | 17316170a5fb1396d7ed82f6d9c5f0976385cf31 (patch) | |
tree | b270e7f35f2c0a55c94ad5f96616696a3672b42a /OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs | |
parent | Fix incorrect class name (diff) | |
download | opensim-SC_OLD-17316170a5fb1396d7ed82f6d9c5f0976385cf31.zip opensim-SC_OLD-17316170a5fb1396d7ed82f6d9c5f0976385cf31.tar.gz opensim-SC_OLD-17316170a5fb1396d7ed82f6d9c5f0976385cf31.tar.bz2 opensim-SC_OLD-17316170a5fb1396d7ed82f6d9c5f0976385cf31.tar.xz |
Add WOrldView request handler and plumbing
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs index d89d274..098b741 100644 --- a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs +++ b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs | |||
@@ -36,6 +36,9 @@ using OpenMetaverse.Imaging; | |||
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
38 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
39 | using OpenSim.Server.Base; | ||
40 | using OpenSim.Framework.Servers.HttpServer; | ||
41 | using OpenSim.Services.Interfaces; | ||
39 | 42 | ||
40 | namespace OpenSim.Region.OptionalModules.World.WorldView | 43 | namespace OpenSim.Region.OptionalModules.World.WorldView |
41 | { | 44 | { |
@@ -46,9 +49,18 @@ namespace OpenSim.Region.OptionalModules.World.WorldView | |||
46 | 49 | ||
47 | 50 | ||
48 | private bool m_Enabled = false; | 51 | private bool m_Enabled = false; |
52 | private IMapImageGenerator m_Generator; | ||
49 | 53 | ||
50 | public void Initialise(IConfigSource config) | 54 | public void Initialise(IConfigSource config) |
51 | { | 55 | { |
56 | IConfig moduleConfig = config.Configs["Modules"]; | ||
57 | if (moduleConfig == null) | ||
58 | return; | ||
59 | |||
60 | if (moduleConfig.GetString("WorldViewModule", String.Empty) != Name) | ||
61 | return; | ||
62 | |||
63 | m_Enabled = true; | ||
52 | } | 64 | } |
53 | 65 | ||
54 | public void AddRegion(Scene scene) | 66 | public void AddRegion(Scene scene) |
@@ -57,6 +69,17 @@ namespace OpenSim.Region.OptionalModules.World.WorldView | |||
57 | 69 | ||
58 | public void RegionLoaded(Scene scene) | 70 | public void RegionLoaded(Scene scene) |
59 | { | 71 | { |
72 | m_Generator = scene.RequestModuleInterface<IMapImageGenerator>(); | ||
73 | if (m_Generator == null) | ||
74 | { | ||
75 | m_Enabled = false; | ||
76 | return; | ||
77 | } | ||
78 | |||
79 | m_log.Info("[WORLDVIEW]: Configured and enabled"); | ||
80 | |||
81 | IHttpServer server = MainServer.GetHttpServer(0); | ||
82 | server.AddStreamHandler(new WorldViewRequestHandler(this)); | ||
60 | } | 83 | } |
61 | 84 | ||
62 | public void RemoveRegion(Scene scene) | 85 | public void RemoveRegion(Scene scene) |
@@ -76,5 +99,10 @@ namespace OpenSim.Region.OptionalModules.World.WorldView | |||
76 | public void Close() | 99 | public void Close() |
77 | { | 100 | { |
78 | } | 101 | } |
102 | |||
103 | public byte[] GenerateWorldView(Vector3 pos, Vector3 rot) | ||
104 | { | ||
105 | return new Byte[0]; | ||
106 | } | ||
79 | } | 107 | } |
80 | } | 108 | } |