diff options
author | Sean Dague | 2008-04-07 23:27:05 +0000 |
---|---|---|
committer | Sean Dague | 2008-04-07 23:27:05 +0000 |
commit | 5ee75998ce4d941efd937848d28f3a4dac6ba6cc (patch) | |
tree | f29a100cb8ab3715c82f0aec4fee9f968f210405 /OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | |
parent | Refactor InventoryItemBase to do the following: (diff) | |
download | opensim-SC_OLD-5ee75998ce4d941efd937848d28f3a4dac6ba6cc.zip opensim-SC_OLD-5ee75998ce4d941efd937848d28f3a4dac6ba6cc.tar.gz opensim-SC_OLD-5ee75998ce4d941efd937848d28f3a4dac6ba6cc.tar.bz2 opensim-SC_OLD-5ee75998ce4d941efd937848d28f3a4dac6ba6cc.tar.xz |
more refactoring, this time on InventoryFolderBase
* wrap attributes in properties
* clean up names a little bit
* clean up name styles
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index 12a07eb..cb82850 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | |||
@@ -56,14 +56,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
56 | { | 56 | { |
57 | m_log.Info("[LIBRARY INVENTORY]: Loading library inventory"); | 57 | m_log.Info("[LIBRARY INVENTORY]: Loading library inventory"); |
58 | 58 | ||
59 | agentID = libOwner; | 59 | AgentID = libOwner; |
60 | folderID = new LLUUID("00000112-000f-0000-0000-000100bba000"); | 60 | ID = new LLUUID("00000112-000f-0000-0000-000100bba000"); |
61 | name = "OpenSim Library"; | 61 | Name = "OpenSim Library"; |
62 | parentID = LLUUID.Zero; | 62 | ParentID = LLUUID.Zero; |
63 | type = (short) 8; | 63 | Type = (short) 8; |
64 | version = (ushort) 1; | 64 | Version = (ushort) 1; |
65 | 65 | ||
66 | libraryFolders.Add(folderID, this); | 66 | libraryFolders.Add(ID, this); |
67 | 67 | ||
68 | LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml")); | 68 | LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml")); |
69 | 69 | ||
@@ -172,20 +172,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
172 | { | 172 | { |
173 | InventoryFolderImpl folderInfo = new InventoryFolderImpl(); | 173 | InventoryFolderImpl folderInfo = new InventoryFolderImpl(); |
174 | 174 | ||
175 | folderInfo.folderID = new LLUUID(config.GetString("folderID", folderID.ToString())); | 175 | folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString())); |
176 | folderInfo.name = config.GetString("name", "unknown"); | 176 | folderInfo.Name = config.GetString("name", "unknown"); |
177 | folderInfo.parentID = new LLUUID(config.GetString("parentFolderID", folderID.ToString())); | 177 | folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString())); |
178 | folderInfo.type = (short)config.GetInt("type", 8); | 178 | folderInfo.Type = (short)config.GetInt("type", 8); |
179 | 179 | ||
180 | folderInfo.agentID = libOwner; | 180 | folderInfo.AgentID = libOwner; |
181 | folderInfo.version = 1; | 181 | folderInfo.Version = 1; |
182 | 182 | ||
183 | if (libraryFolders.ContainsKey(folderInfo.parentID)) | 183 | if (libraryFolders.ContainsKey(folderInfo.ParentID)) |
184 | { | 184 | { |
185 | InventoryFolderImpl parentFolder = libraryFolders[folderInfo.parentID]; | 185 | InventoryFolderImpl parentFolder = libraryFolders[folderInfo.ParentID]; |
186 | 186 | ||
187 | libraryFolders.Add(folderInfo.folderID, folderInfo); | 187 | libraryFolders.Add(folderInfo.ID, folderInfo); |
188 | parentFolder.SubFolders.Add(folderInfo.folderID, folderInfo); | 188 | parentFolder.SubFolders.Add(folderInfo.ID, folderInfo); |
189 | 189 | ||
190 | // m_log.InfoFormat("[LIBRARY INVENTORY]: Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID); | 190 | // m_log.InfoFormat("[LIBRARY INVENTORY]: Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID); |
191 | } | 191 | } |
@@ -193,7 +193,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
193 | { | 193 | { |
194 | m_log.WarnFormat( | 194 | m_log.WarnFormat( |
195 | "[LIBRARY INVENTORY]: Couldn't add folder {0} ({1}) since parent folder with ID {2} does not exist!", | 195 | "[LIBRARY INVENTORY]: Couldn't add folder {0} ({1}) since parent folder with ID {2} does not exist!", |
196 | folderInfo.name, folderInfo.folderID, folderInfo.parentID); | 196 | folderInfo.Name, folderInfo.ID, folderInfo.ParentID); |
197 | } | 197 | } |
198 | } | 198 | } |
199 | 199 | ||
@@ -206,9 +206,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
206 | InventoryItemBase item = new InventoryItemBase(); | 206 | InventoryItemBase item = new InventoryItemBase(); |
207 | item.Owner = libOwner; | 207 | item.Owner = libOwner; |
208 | item.Creator = libOwner; | 208 | item.Creator = libOwner; |
209 | item.ID = new LLUUID(config.GetString("inventoryID", folderID.ToString())); | 209 | item.ID = new LLUUID(config.GetString("inventoryID", ID.ToString())); |
210 | item.AssetID = new LLUUID(config.GetString("assetID", LLUUID.Random().ToString())); | 210 | item.AssetID = new LLUUID(config.GetString("assetID", LLUUID.Random().ToString())); |
211 | item.Folder = new LLUUID(config.GetString("folderID", folderID.ToString())); | 211 | item.Folder = new LLUUID(config.GetString("folderID", ID.ToString())); |
212 | item.Description = config.GetString("description", System.String.Empty); | 212 | item.Description = config.GetString("description", System.String.Empty); |
213 | item.Name = config.GetString("name", System.String.Empty); | 213 | item.Name = config.GetString("name", System.String.Empty); |
214 | item.AssetType = config.GetInt("assetType", 0); | 214 | item.AssetType = config.GetInt("assetType", 0); |