aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-06 07:52:41 +0000
committerTeravus Ovares2008-09-06 07:52:41 +0000
commit7d89e122930be39e84a6d174548fa2d12ac0484a (patch)
treee5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
parent* minor: speculatively try a change to bamboo.build to see if this generates ... (diff)
downloadopensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.zip
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs30
1 files changed, 14 insertions, 16 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
index c675365..66d279a 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
@@ -40,7 +40,7 @@ using Slash = System.IO.Path;
40using System.Reflection; 40using System.Reflection;
41using System.Xml; 41using System.Xml;
42 42
43using libsecondlife; 43using OpenMetaverse;
44 44
45using Nini.Config; 45using Nini.Config;
46 46
@@ -53,8 +53,6 @@ using OpenSim.Region.Physics.Manager;
53 53
54using log4net; 54using log4net;
55 55
56using Axiom.Math;
57
58namespace OpenSim.Region.Environment.Modules.ContentManagement 56namespace OpenSim.Region.Environment.Modules.ContentManagement
59{ 57{
60 public class FileSystemDatabase : IContentDatabase 58 public class FileSystemDatabase : IContentDatabase
@@ -70,8 +68,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
70 #region Fields 68 #region Fields
71 69
72 private string m_repodir = null; 70 private string m_repodir = null;
73 private Dictionary<LLUUID, Scene> m_scenes = new Dictionary<LLUUID, Scene>(); 71 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
74 private Dictionary<LLUUID, IRegionSerialiser> m_serialiser = new Dictionary<LLUUID, IRegionSerialiser>(); 72 private Dictionary<UUID, IRegionSerialiser> m_serialiser = new Dictionary<UUID, IRegionSerialiser>();
75 73
76 #endregion Fields 74 #endregion Fields
77 75
@@ -92,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
92 if (!Directory.Exists(m_repodir)) 90 if (!Directory.Exists(m_repodir))
93 Directory.CreateDirectory(m_repodir); 91 Directory.CreateDirectory(m_repodir);
94 92
95 foreach (LLUUID region in m_scenes.Keys) 93 foreach (UUID region in m_scenes.Keys)
96 { 94 {
97 scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar; 95 scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar;
98 if (!Directory.Exists(scenedir)) 96 if (!Directory.Exists(scenedir))
@@ -104,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
104 private void SetupSerialiser() 102 private void SetupSerialiser()
105 { 103 {
106 if (m_serialiser.Count == 0) 104 if (m_serialiser.Count == 0)
107 foreach(LLUUID region in m_scenes.Keys) 105 foreach(UUID region in m_scenes.Keys)
108 m_serialiser.Add(region, 106 m_serialiser.Add(region,
109 m_scenes[region].RequestModuleInterface<IRegionSerialiser>() 107 m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
110 ); 108 );
@@ -114,12 +112,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
114 112
115 #region Public Methods 113 #region Public Methods
116 114
117 public int GetMostRecentRevision(LLUUID regionid) 115 public int GetMostRecentRevision(UUID regionid)
118 { 116 {
119 return NumOfRegionRev(regionid); 117 return NumOfRegionRev(regionid);
120 } 118 }
121 119
122 public string GetRegionObjectHeightMap(LLUUID regionid) 120 public string GetRegionObjectHeightMap(UUID regionid)
123 { 121 {
124 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + 122 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
125 Slash.DirectorySeparatorChar + "heightmap.r32"; 123 Slash.DirectorySeparatorChar + "heightmap.r32";
@@ -131,7 +129,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
131 return result; 129 return result;
132 } 130 }
133 131
134 public string GetRegionObjectHeightMap(LLUUID regionid, int revision) 132 public string GetRegionObjectHeightMap(UUID regionid, int revision)
135 { 133 {
136 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + 134 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
137 Slash.DirectorySeparatorChar + "heightmap.r32"; 135 Slash.DirectorySeparatorChar + "heightmap.r32";
@@ -143,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
143 return result; 141 return result;
144 } 142 }
145 143
146 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision) 144 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision)
147 { 145 {
148 System.Collections.ArrayList objectList = new System.Collections.ArrayList(); 146 System.Collections.ArrayList objectList = new System.Collections.ArrayList();
149 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar + 147 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar +
@@ -169,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
169 return null; 167 return null;
170 } 168 }
171 169
172 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid) 170 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid)
173 { 171 {
174 int revision = NumOfRegionRev(regionid); 172 int revision = NumOfRegionRev(regionid);
175 m_log.Info("[FSDB]: found revisions:" + revision); 173 m_log.Info("[FSDB]: found revisions:" + revision);
@@ -215,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
215 m_scenes.Add(scene.RegionInfo.RegionID, scene); 213 m_scenes.Add(scene.RegionInfo.RegionID, scene);
216 } 214 }
217 215
218 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(LLUUID regionid) 216 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID regionid)
219 { 217 {
220 SortedDictionary<string, string> revisionDict = new SortedDictionary<string,string>(); 218 SortedDictionary<string, string> revisionDict = new SortedDictionary<string,string>();
221 219
@@ -244,7 +242,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
244 return revisionDict; 242 return revisionDict;
245 } 243 }
246 244
247 public int NumOfRegionRev(LLUUID regionid) 245 public int NumOfRegionRev(UUID regionid)
248 { 246 {
249 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar; 247 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar;
250 m_log.Info("[FSDB]: Reading scene dir: " + scenedir); 248 m_log.Info("[FSDB]: Reading scene dir: " + scenedir);
@@ -261,7 +259,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
261 CreateDirectory(); 259 CreateDirectory();
262 } 260 }
263 261
264 public void SaveRegion(LLUUID regionid, string regionName, string logMessage) 262 public void SaveRegion(UUID regionid, string regionName, string logMessage)
265 { 263 {
266 m_log.Info("[FSDB]: ..............................."); 264 m_log.Info("[FSDB]: ...............................");
267 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar; 265 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar;
@@ -311,4 +309,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
311 309
312 #endregion Public Methods 310 #endregion Public Methods
313 } 311 }
314} \ No newline at end of file 312}