diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/ContentManagementSystem')
-rw-r--r-- | OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs index 3d1c346..6769d59 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -38,6 +38,7 @@ using System.Threading; | |||
38 | 38 | ||
39 | using OpenMetaverse; | 39 | using OpenMetaverse; |
40 | 40 | ||
41 | using Mono.Addins; | ||
41 | using Nini.Config; | 42 | using Nini.Config; |
42 | 43 | ||
43 | using OpenSim; | 44 | using OpenSim; |
@@ -50,7 +51,8 @@ using log4net; | |||
50 | 51 | ||
51 | namespace OpenSim.Region.OptionalModules.ContentManagement | 52 | namespace OpenSim.Region.OptionalModules.ContentManagement |
52 | { | 53 | { |
53 | public class ContentManagementModule : IRegionModule | 54 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
55 | public class ContentManagementModule : ISharedRegionModule | ||
54 | { | 56 | { |
55 | #region Static Fields | 57 | #region Static Fields |
56 | 58 | ||
@@ -60,22 +62,20 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
60 | 62 | ||
61 | #region Fields | 63 | #region Fields |
62 | 64 | ||
63 | bool initialised = false; | 65 | private bool initialised = false; |
64 | CMController m_control = null; | 66 | private CMController m_control = null; |
65 | bool m_enabled = false; | 67 | private bool m_enabled = false; |
66 | CMModel m_model = null; | 68 | private CMModel m_model = null; |
67 | bool m_posted = false; | 69 | private bool m_posted = false; |
68 | CMView m_view = null; | 70 | private CMView m_view = null; |
71 | private string databaseDir = "./"; | ||
72 | private string database = "FileSystemDatabase"; | ||
73 | private int channel = 345; | ||
69 | 74 | ||
70 | #endregion Fields | 75 | #endregion Fields |
71 | 76 | ||
72 | #region Public Properties | 77 | #region Public Properties |
73 | 78 | ||
74 | public bool IsSharedModule | ||
75 | { | ||
76 | get { return true; } | ||
77 | } | ||
78 | |||
79 | public string Name | 79 | public string Name |
80 | { | 80 | { |
81 | get { return "ContentManagementModule"; } | 81 | get { return "ContentManagementModule"; } |
@@ -89,11 +89,8 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
89 | { | 89 | { |
90 | } | 90 | } |
91 | 91 | ||
92 | public void Initialise(Scene scene, IConfigSource source) | 92 | public void Initialise(IConfigSource source) |
93 | { | 93 | { |
94 | string databaseDir = "./"; | ||
95 | string database = "FileSystemDatabase"; | ||
96 | int channel = 345; | ||
97 | try | 94 | try |
98 | { | 95 | { |
99 | if (source.Configs["CMS"] == null) | 96 | if (source.Configs["CMS"] == null) |
@@ -115,13 +112,15 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
115 | m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e); | 112 | m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e); |
116 | m_enabled = false; | 113 | m_enabled = false; |
117 | } | 114 | } |
115 | } | ||
118 | 116 | ||
117 | public void AddRegion(Scene scene) | ||
118 | { | ||
119 | if (!m_enabled) | 119 | if (!m_enabled) |
120 | { | 120 | { |
121 | m_log.Info("[Content Management]: Content Management System is not Enabled."); | 121 | m_log.Info("[Content Management]: Content Management System is not Enabled."); |
122 | return; | 122 | return; |
123 | } | 123 | } |
124 | |||
125 | lock (this) | 124 | lock (this) |
126 | { | 125 | { |
127 | if (!initialised) //only init once | 126 | if (!initialised) //only init once |
@@ -142,6 +141,18 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
142 | } | 141 | } |
143 | } | 142 | } |
144 | } | 143 | } |
144 | public void RegionLoaded(Scene scene) | ||
145 | { | ||
146 | } | ||
147 | |||
148 | public void RemoveRegion(Scene scene) | ||
149 | { | ||
150 | } | ||
151 | |||
152 | public Type ReplaceableInterface | ||
153 | { | ||
154 | get { return null; } | ||
155 | } | ||
145 | 156 | ||
146 | public void PostInitialise() | 157 | public void PostInitialise() |
147 | { | 158 | { |