aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs
diff options
context:
space:
mode:
authorMelanie2010-01-29 07:20:13 +0000
committerMelanie2010-01-29 07:20:13 +0000
commitcfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac (patch)
tree43f3fd01f30651d482f81b5ae7c25fd84cc8ca37 /OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.zip
opensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.gz
opensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.bz2
opensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.xz
Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf.
Diffstat (limited to 'OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs47
1 files changed, 18 insertions, 29 deletions
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs
index 6769d59..3d1c346 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,7 +38,6 @@ using System.Threading;
38 38
39using OpenMetaverse; 39using OpenMetaverse;
40 40
41using Mono.Addins;
42using Nini.Config; 41using Nini.Config;
43 42
44using OpenSim; 43using OpenSim;
@@ -51,8 +50,7 @@ using log4net;
51 50
52namespace OpenSim.Region.OptionalModules.ContentManagement 51namespace OpenSim.Region.OptionalModules.ContentManagement
53{ 52{
54 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 53 public class ContentManagementModule : IRegionModule
55 public class ContentManagementModule : ISharedRegionModule
56 { 54 {
57 #region Static Fields 55 #region Static Fields
58 56
@@ -62,20 +60,22 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
62 60
63 #region Fields 61 #region Fields
64 62
65 private bool initialised = false; 63 bool initialised = false;
66 private CMController m_control = null; 64 CMController m_control = null;
67 private bool m_enabled = false; 65 bool m_enabled = false;
68 private CMModel m_model = null; 66 CMModel m_model = null;
69 private bool m_posted = false; 67 bool m_posted = false;
70 private CMView m_view = null; 68 CMView m_view = null;
71 private string databaseDir = "./";
72 private string database = "FileSystemDatabase";
73 private int channel = 345;
74 69
75 #endregion Fields 70 #endregion Fields
76 71
77 #region Public Properties 72 #region Public Properties
78 73
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,8 +89,11 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
89 { 89 {
90 } 90 }
91 91
92 public void Initialise(IConfigSource source) 92 public void Initialise(Scene scene, IConfigSource source)
93 { 93 {
94 string databaseDir = "./";
95 string database = "FileSystemDatabase";
96 int channel = 345;
94 try 97 try
95 { 98 {
96 if (source.Configs["CMS"] == null) 99 if (source.Configs["CMS"] == null)
@@ -112,15 +115,13 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
112 m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e); 115 m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e);
113 m_enabled = false; 116 m_enabled = false;
114 } 117 }
115 }
116 118
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
124 lock (this) 125 lock (this)
125 { 126 {
126 if (!initialised) //only init once 127 if (!initialised) //only init once
@@ -141,18 +142,6 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
141 } 142 }
142 } 143 }
143 } 144 }
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 }
156 145
157 public void PostInitialise() 146 public void PostInitialise()
158 { 147 {