diff options
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index 7ac8bed..ff87493 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | |||
@@ -32,6 +32,7 @@ using System.Reflection; | |||
32 | using System.Text; | 32 | using System.Text; |
33 | using System.Threading; | 33 | using System.Threading; |
34 | using log4net; | 34 | using log4net; |
35 | using Mono.Addins; | ||
35 | using Nini.Config; | 36 | using Nini.Config; |
36 | using OpenMetaverse; | 37 | using OpenMetaverse; |
37 | using OpenMetaverse.Imaging; | 38 | using OpenMetaverse.Imaging; |
@@ -45,7 +46,8 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
45 | { | 46 | { |
46 | public delegate void J2KDecodeDelegate(UUID assetID); | 47 | public delegate void J2KDecodeDelegate(UUID assetID); |
47 | 48 | ||
48 | public class J2KDecoderModule : IRegionModule, IJ2KDecoder | 49 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
50 | public class J2KDecoderModule : ISharedRegionModule, IJ2KDecoder | ||
49 | { | 51 | { |
50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
51 | 53 | ||
@@ -58,16 +60,19 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
58 | /// <summary>Reference to a scene (doesn't matter which one as long as it can load the cache module)</summary> | 60 | /// <summary>Reference to a scene (doesn't matter which one as long as it can load the cache module)</summary> |
59 | private Scene m_scene; | 61 | private Scene m_scene; |
60 | 62 | ||
61 | #region IRegionModule | 63 | #region ISharedRegionModule |
62 | 64 | ||
63 | public string Name { get { return "J2KDecoderModule"; } } | 65 | public string Name { get { return "J2KDecoderModule"; } } |
64 | public bool IsSharedModule { get { return true; } } | 66 | |
65 | |||
66 | public J2KDecoderModule() | 67 | public J2KDecoderModule() |
67 | { | 68 | { |
68 | } | 69 | } |
69 | 70 | ||
70 | public void Initialise(Scene scene, IConfigSource source) | 71 | public void Initialise(IConfigSource source) |
72 | { | ||
73 | } | ||
74 | |||
75 | public void AddRegion(Scene scene) | ||
71 | { | 76 | { |
72 | if (m_scene == null) | 77 | if (m_scene == null) |
73 | m_scene = scene; | 78 | m_scene = scene; |
@@ -75,16 +80,30 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
75 | scene.RegisterModuleInterface<IJ2KDecoder>(this); | 80 | scene.RegisterModuleInterface<IJ2KDecoder>(this); |
76 | } | 81 | } |
77 | 82 | ||
78 | public void PostInitialise() | 83 | public Type ReplaceableInterface |
84 | { | ||
85 | get { return null; } | ||
86 | } | ||
87 | |||
88 | public void RegionLoaded(Scene scene) | ||
79 | { | 89 | { |
80 | m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); | 90 | m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); |
81 | } | 91 | } |
82 | 92 | ||
93 | public void RemoveRegion(Scene scene) | ||
94 | { | ||
95 | scene.UnregisterModuleInterface<IJ2KDecoder>(this); | ||
96 | } | ||
97 | |||
98 | public void PostInitialise() | ||
99 | { | ||
100 | } | ||
101 | |||
83 | public void Close() | 102 | public void Close() |
84 | { | 103 | { |
85 | } | 104 | } |
86 | 105 | ||
87 | #endregion IRegionModule | 106 | #endregion |
88 | 107 | ||
89 | #region IJ2KDecoder | 108 | #region IJ2KDecoder |
90 | 109 | ||