diff options
author | Sean Dague | 2008-09-03 18:11:44 +0000 |
---|---|---|
committer | Sean Dague | 2008-09-03 18:11:44 +0000 |
commit | af5c7e52b1163cf65f897e5c7ecf9ef2d9f6e88e (patch) | |
tree | fcc52c0f3e20f005873def97e3be5cd9ca16270e /OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs | |
parent | white space fixes (diff) | |
download | opensim-SC_OLD-af5c7e52b1163cf65f897e5c7ecf9ef2d9f6e88e.zip opensim-SC_OLD-af5c7e52b1163cf65f897e5c7ecf9ef2d9f6e88e.tar.gz opensim-SC_OLD-af5c7e52b1163cf65f897e5c7ecf9ef2d9f6e88e.tar.bz2 opensim-SC_OLD-af5c7e52b1163cf65f897e5c7ecf9ef2d9f6e88e.tar.xz |
narrange to do basic cleanup of the CMS module
Diffstat (limited to 'OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs | 75 |
1 files changed, 51 insertions, 24 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs index 413d00d..ef27f46 100644 --- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs | |||
@@ -1,31 +1,69 @@ | |||
1 | #region Header | ||
2 | |||
1 | // ContentManagementModule.cs | 3 | // ContentManagementModule.cs |
2 | // User: bongiojp | 4 | // User: bongiojp |
3 | 5 | ||
6 | #endregion Header | ||
7 | |||
4 | using System; | 8 | using System; |
5 | using System.Collections.Generic; | 9 | using System.Collections.Generic; |
10 | using System.Threading; | ||
11 | |||
6 | using libsecondlife; | 12 | using libsecondlife; |
13 | |||
7 | using Nini.Config; | 14 | using Nini.Config; |
15 | |||
8 | using OpenSim; | 16 | using OpenSim; |
9 | using OpenSim.Framework; | 17 | using OpenSim.Framework; |
10 | using OpenSim.Region.Environment.Interfaces; | 18 | using OpenSim.Region.Environment.Interfaces; |
11 | using OpenSim.Region.Environment.Scenes; | 19 | using OpenSim.Region.Environment.Scenes; |
12 | using log4net; | ||
13 | using OpenSim.Region.Physics.Manager; | 20 | using OpenSim.Region.Physics.Manager; |
21 | |||
22 | using log4net; | ||
23 | |||
14 | using Axiom.Math; | 24 | using Axiom.Math; |
15 | using System.Threading; | 25 | |
16 | |||
17 | namespace OpenSim.Region.Environment.Modules.ContentManagement | 26 | namespace OpenSim.Region.Environment.Modules.ContentManagement |
18 | { | 27 | { |
19 | public class ContentManagementModule : IRegionModule | 28 | public class ContentManagementModule : IRegionModule |
20 | { | 29 | { |
30 | #region Static Fields | ||
31 | |||
21 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 32 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
33 | |||
34 | #endregion Static Fields | ||
35 | |||
36 | #region Fields | ||
37 | |||
38 | bool initialised = false; | ||
22 | CMController m_control = null; | 39 | CMController m_control = null; |
40 | bool m_enabled = false; | ||
23 | CMModel m_model = null; | 41 | CMModel m_model = null; |
24 | CMView m_view = null; | ||
25 | bool initialised = false; | ||
26 | bool m_posted = false; | 42 | bool m_posted = false; |
27 | bool m_enabled = false; | 43 | CMView m_view = null; |
28 | 44 | ||
45 | #endregion Fields | ||
46 | |||
47 | #region Public Properties | ||
48 | |||
49 | public bool IsSharedModule | ||
50 | { | ||
51 | get { return true; } | ||
52 | } | ||
53 | |||
54 | public string Name | ||
55 | { | ||
56 | get { return "ContentManagementModule"; } | ||
57 | } | ||
58 | |||
59 | #endregion Public Properties | ||
60 | |||
61 | #region Public Methods | ||
62 | |||
63 | public void Close() | ||
64 | { | ||
65 | } | ||
66 | |||
29 | public void Initialise(Scene scene, IConfigSource source) | 67 | public void Initialise(Scene scene, IConfigSource source) |
30 | { | 68 | { |
31 | string databaseDir = "./"; | 69 | string databaseDir = "./"; |
@@ -52,13 +90,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
52 | m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e); | 90 | m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e); |
53 | m_enabled = false; | 91 | m_enabled = false; |
54 | } | 92 | } |
55 | 93 | ||
56 | if (!m_enabled) | 94 | if (!m_enabled) |
57 | { | 95 | { |
58 | m_log.Info("[Content Management]: Content Management System is not Enabled."); | 96 | m_log.Info("[Content Management]: Content Management System is not Enabled."); |
59 | return; | 97 | return; |
60 | } | 98 | } |
61 | 99 | ||
62 | lock(this) | 100 | lock(this) |
63 | { | 101 | { |
64 | if (!initialised) //only init once | 102 | if (!initialised) //only init once |
@@ -79,12 +117,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
79 | } | 117 | } |
80 | } | 118 | } |
81 | } | 119 | } |
82 | 120 | ||
83 | public void PostInitialise() | 121 | public void PostInitialise() |
84 | { | 122 | { |
85 | if (! m_enabled) | 123 | if (! m_enabled) |
86 | return; | 124 | return; |
87 | 125 | ||
88 | lock(this) | 126 | lock(this) |
89 | { | 127 | { |
90 | if (!m_posted) //only post once | 128 | if (!m_posted) //only post once |
@@ -94,18 +132,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
94 | } | 132 | } |
95 | } | 133 | } |
96 | } | 134 | } |
97 | |||
98 | public void Close() | ||
99 | {} | ||
100 | |||
101 | public string Name | ||
102 | { | ||
103 | get { return "ContentManagementModule"; } | ||
104 | } | ||
105 | 135 | ||
106 | public bool IsSharedModule | 136 | #endregion Public Methods |
107 | { | ||
108 | get { return true; } | ||
109 | } | ||
110 | } | 137 | } |
111 | } | 138 | } \ No newline at end of file |