diff options
author | PixelTomsen | 2012-11-11 19:12:06 +0100 |
---|---|---|
committer | Diva Canto | 2012-11-11 11:17:40 -0800 |
commit | 37c970090401b620bf58be1d7618e3637c283cfe (patch) | |
tree | 1f2bb4a849124369413c05e36b25737c69eee1e0 /OpenSim/Region | |
parent | remove entry OpenGridProtocol in OpenSimDefaults.ini - module was deleted (diff) | |
download | opensim-SC_OLD-37c970090401b620bf58be1d7618e3637c283cfe.zip opensim-SC_OLD-37c970090401b620bf58be1d7618e3637c283cfe.tar.gz opensim-SC_OLD-37c970090401b620bf58be1d7618e3637c283cfe.tar.bz2 opensim-SC_OLD-37c970090401b620bf58be1d7618e3637c283cfe.tar.xz |
moving windlight-sources to correct namespace-named folder (world); add LightShare as Interface
Signed-off-by: Diva Canto <diva@metaverseink.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs (renamed from OpenSim/Region/CoreModules/LightShare/EnvironmentModule.cs) | 20 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs (renamed from OpenSim/Region/CoreModules/LightShare/LightShareModule.cs) | 37 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/ILightShareModule.cs | 33 |
3 files changed, 60 insertions, 30 deletions
diff --git a/OpenSim/Region/CoreModules/LightShare/EnvironmentModule.cs b/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs index 1526886..c3cea7a 100644 --- a/OpenSim/Region/CoreModules/LightShare/EnvironmentModule.cs +++ b/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs | |||
@@ -51,10 +51,10 @@ namespace OpenSim.Region.CoreModules.World.LightShare | |||
51 | private Scene m_scene = null; | 51 | private Scene m_scene = null; |
52 | private UUID regionID = UUID.Zero; | 52 | private UUID regionID = UUID.Zero; |
53 | private static bool Enabled = false; | 53 | private static bool Enabled = false; |
54 | 54 | ||
55 | private static readonly string capsName = "EnvironmentSettings"; | 55 | private static readonly string capsName = "EnvironmentSettings"; |
56 | private static readonly string capsBase = "/CAPS/0020/"; | 56 | private static readonly string capsBase = "/CAPS/0020/"; |
57 | 57 | ||
58 | private LLSDEnvironmentSetResponse setResponse = null; | 58 | private LLSDEnvironmentSetResponse setResponse = null; |
59 | 59 | ||
60 | #region INonSharedRegionModule | 60 | #region INonSharedRegionModule |
@@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare | |||
72 | } | 72 | } |
73 | 73 | ||
74 | Enabled = true; | 74 | Enabled = true; |
75 | 75 | ||
76 | m_log.InfoFormat("[{0}]: Module is enabled.", Name); | 76 | m_log.InfoFormat("[{0}]: Module is enabled.", Name); |
77 | } | 77 | } |
78 | 78 | ||
@@ -132,8 +132,8 @@ namespace OpenSim.Region.CoreModules.World.LightShare | |||
132 | #region Events | 132 | #region Events |
133 | private void OnRegisterCaps(UUID agentID, Caps caps) | 133 | private void OnRegisterCaps(UUID agentID, Caps caps) |
134 | { | 134 | { |
135 | // m_log.DebugFormat("[{0}]: Register capability for agentID {1} in region {2}", | 135 | // m_log.DebugFormat("[{0}]: Register capability for agentID {1} in region {2}", |
136 | // Name, agentID, caps.RegionName); | 136 | // Name, agentID, caps.RegionName); |
137 | 137 | ||
138 | string capsPath = capsBase + UUID.Random(); | 138 | string capsPath = capsBase + UUID.Random(); |
139 | 139 | ||
@@ -163,8 +163,8 @@ namespace OpenSim.Region.CoreModules.World.LightShare | |||
163 | private string GetEnvironmentSettings(string request, string path, string param, | 163 | private string GetEnvironmentSettings(string request, string path, string param, |
164 | UUID agentID, Caps caps) | 164 | UUID agentID, Caps caps) |
165 | { | 165 | { |
166 | // m_log.DebugFormat("[{0}]: Environment GET handle for agentID {1} in region {2}", | 166 | // m_log.DebugFormat("[{0}]: Environment GET handle for agentID {1} in region {2}", |
167 | // Name, agentID, caps.RegionName); | 167 | // Name, agentID, caps.RegionName); |
168 | 168 | ||
169 | string env = String.Empty; | 169 | string env = String.Empty; |
170 | 170 | ||
@@ -188,8 +188,8 @@ namespace OpenSim.Region.CoreModules.World.LightShare | |||
188 | UUID agentID, Caps caps) | 188 | UUID agentID, Caps caps) |
189 | { | 189 | { |
190 | 190 | ||
191 | // m_log.DebugFormat("[{0}]: Environment SET handle from agentID {1} in region {2}", | 191 | // m_log.DebugFormat("[{0}]: Environment SET handle from agentID {1} in region {2}", |
192 | // Name, agentID, caps.RegionName); | 192 | // Name, agentID, caps.RegionName); |
193 | 193 | ||
194 | setResponse.regionID = regionID; | 194 | setResponse.regionID = regionID; |
195 | setResponse.success = false; | 195 | setResponse.success = false; |
@@ -204,7 +204,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare | |||
204 | { | 204 | { |
205 | m_scene.SimulationDataService.StoreRegionEnvironmentSettings(regionID, request); | 205 | m_scene.SimulationDataService.StoreRegionEnvironmentSettings(regionID, request); |
206 | setResponse.success = true; | 206 | setResponse.success = true; |
207 | 207 | ||
208 | m_log.InfoFormat("[{0}]: New Environment settings has been saved from agentID {1} in region {2}", | 208 | m_log.InfoFormat("[{0}]: New Environment settings has been saved from agentID {1} in region {2}", |
209 | Name, agentID, caps.RegionName); | 209 | Name, agentID, caps.RegionName); |
210 | } | 210 | } |
diff --git a/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs b/OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs index c9a263f..bd04ded 100644 --- a/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs +++ b/OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs | |||
@@ -27,22 +27,20 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | ||
31 | using System.Reflection; | 30 | using System.Reflection; |
32 | using OpenMetaverse; | 31 | using OpenMetaverse; |
33 | using log4net; | ||
34 | using Nini.Config; | ||
35 | using OpenSim.Data; | ||
36 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
37 | using OpenSim.Region.CoreModules.Framework.InterfaceCommander; | 33 | using OpenSim.Region.CoreModules.Framework.InterfaceCommander; |
38 | using OpenSim.Region.Framework.Interfaces; | 34 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 35 | using OpenSim.Region.Framework.Scenes; |
36 | using log4net; | ||
37 | using Nini.Config; | ||
40 | using Mono.Addins; | 38 | using Mono.Addins; |
41 | 39 | ||
42 | namespace OpenSim.Region.CoreModules.World.LightShare | 40 | namespace OpenSim.Region.CoreModules.World.LightShare |
43 | { | 41 | { |
44 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 42 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
45 | public class LightShareModule : INonSharedRegionModule, ICommandableModule | 43 | public class LightShareModule : INonSharedRegionModule, ILightShareModule, ICommandableModule |
46 | { | 44 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | private readonly Commander m_commander = new Commander("windlight"); | 46 | private readonly Commander m_commander = new Commander("windlight"); |
@@ -58,22 +56,10 @@ namespace OpenSim.Region.CoreModules.World.LightShare | |||
58 | 56 | ||
59 | #endregion | 57 | #endregion |
60 | 58 | ||
61 | #region IRegionModule Members | 59 | #region INonSharedRegionModule Members |
62 | |||
63 | public static bool EnableWindlight | ||
64 | { | ||
65 | get | ||
66 | { | ||
67 | return m_enableWindlight; | ||
68 | } | ||
69 | set | ||
70 | { | ||
71 | } | ||
72 | } | ||
73 | 60 | ||
74 | public void Initialise(IConfigSource config) | 61 | public void Initialise(IConfigSource config) |
75 | { | 62 | { |
76 | // ini file settings | ||
77 | try | 63 | try |
78 | { | 64 | { |
79 | m_enableWindlight = config.Configs["LightShare"].GetBoolean("enable_windlight", false); | 65 | m_enableWindlight = config.Configs["LightShare"].GetBoolean("enable_windlight", false); |
@@ -92,7 +78,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare | |||
92 | return; | 78 | return; |
93 | 79 | ||
94 | m_scene = scene; | 80 | m_scene = scene; |
95 | //m_scene.RegisterModuleInterface<IRegionModule>(this); | 81 | m_scene.RegisterModuleInterface<ILightShareModule>(this); |
96 | m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; | 82 | m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; |
97 | 83 | ||
98 | m_scene.EventManager.OnMakeRootAgent += EventManager_OnMakeRootAgent; | 84 | m_scene.EventManager.OnMakeRootAgent += EventManager_OnMakeRootAgent; |
@@ -137,6 +123,17 @@ namespace OpenSim.Region.CoreModules.World.LightShare | |||
137 | 123 | ||
138 | #endregion | 124 | #endregion |
139 | 125 | ||
126 | public static bool EnableWindlight | ||
127 | { | ||
128 | get | ||
129 | { | ||
130 | return m_enableWindlight; | ||
131 | } | ||
132 | set | ||
133 | { | ||
134 | } | ||
135 | } | ||
136 | |||
140 | #region events | 137 | #region events |
141 | 138 | ||
142 | private List<byte[]> compileWindlightSettings(RegionLightShareData wl) | 139 | private List<byte[]> compileWindlightSettings(RegionLightShareData wl) |
@@ -260,7 +257,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare | |||
260 | private void HandleDisable(Object[] args) | 257 | private void HandleDisable(Object[] args) |
261 | { | 258 | { |
262 | m_log.InfoFormat("[WINDLIGHT]: Plugin now disabled"); | 259 | m_log.InfoFormat("[WINDLIGHT]: Plugin now disabled"); |
263 | m_enableWindlight=false; | 260 | m_enableWindlight = false; |
264 | } | 261 | } |
265 | 262 | ||
266 | private void HandleEnable(Object[] args) | 263 | private void HandleEnable(Object[] args) |
diff --git a/OpenSim/Region/Framework/Interfaces/ILightShareModule.cs b/OpenSim/Region/Framework/Interfaces/ILightShareModule.cs new file mode 100644 index 0000000..b5fd24f --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ILightShareModule.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | namespace OpenSim.Region.Framework.Interfaces | ||
29 | { | ||
30 | public interface ILightShareModule | ||
31 | { | ||
32 | } | ||
33 | } \ No newline at end of file | ||