aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache
diff options
context:
space:
mode:
authorSean Dague2008-04-07 23:15:35 +0000
committerSean Dague2008-04-07 23:15:35 +0000
commitf43681510725f5b95fcb864a1f3e4b744fcaf992 (patch)
tree2d34caa75488d1c608d1a21b4888cb0f264a6cba /OpenSim/Framework/Communications/Cache
parentneeded to add 4 characters to support the dashes (diff)
downloadopensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.zip
opensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.gz
opensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.bz2
opensim-SC_OLD-f43681510725f5b95fcb864a1f3e4b744fcaf992.tar.xz
Refactor InventoryItemBase to do the following:
* wrap fields as Properties * rename some fields/properties to more sensible names * set style to PropName to match more standard C# approach
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs14
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs60
2 files changed, 37 insertions, 37 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index f2dd2bf..cb1eb5a 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -171,21 +171,21 @@ namespace OpenSim.Framework.Communications.Cache
171 { 171 {
172 if ((userID == UserProfile.UUID) && (RootFolder != null)) 172 if ((userID == UserProfile.UUID) && (RootFolder != null))
173 { 173 {
174 if (itemInfo.parentFolderID == RootFolder.folderID) 174 if (itemInfo.Folder == RootFolder.folderID)
175 { 175 {
176 if (!RootFolder.Items.ContainsKey(itemInfo.inventoryID)) 176 if (!RootFolder.Items.ContainsKey(itemInfo.ID))
177 { 177 {
178 RootFolder.Items.Add(itemInfo.inventoryID, itemInfo); 178 RootFolder.Items.Add(itemInfo.ID, itemInfo);
179 } 179 }
180 } 180 }
181 else 181 else
182 { 182 {
183 InventoryFolderImpl folder = RootFolder.HasSubFolder(itemInfo.parentFolderID); 183 InventoryFolderImpl folder = RootFolder.HasSubFolder(itemInfo.Folder);
184 if (folder != null) 184 if (folder != null)
185 { 185 {
186 if (!folder.Items.ContainsKey(itemInfo.inventoryID)) 186 if (!folder.Items.ContainsKey(itemInfo.ID))
187 { 187 {
188 folder.Items.Add(itemInfo.inventoryID, itemInfo); 188 folder.Items.Add(itemInfo.ID, itemInfo);
189 } 189 }
190 } 190 }
191 } 191 }
@@ -214,7 +214,7 @@ namespace OpenSim.Framework.Communications.Cache
214 bool result = false; 214 bool result = false;
215 if ((userID == UserProfile.UUID) && (RootFolder != null)) 215 if ((userID == UserProfile.UUID) && (RootFolder != null))
216 { 216 {
217 result = RootFolder.DeleteItem(item.inventoryID); 217 result = RootFolder.DeleteItem(item.ID);
218 if (result) 218 if (result)
219 { 219 {
220 m_parentCommsManager.InventoryService.DeleteInventoryItem(userID, item); 220 m_parentCommsManager.InventoryService.DeleteInventoryItem(userID, item);
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index b624b15..12a07eb 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -116,19 +116,19 @@ namespace OpenSim.Framework.Communications.Cache
116 int assetType, int invType, LLUUID parentFolderID) 116 int assetType, int invType, LLUUID parentFolderID)
117 { 117 {
118 InventoryItemBase item = new InventoryItemBase(); 118 InventoryItemBase item = new InventoryItemBase();
119 item.avatarID = libOwner; 119 item.Owner = libOwner;
120 item.creatorsID = libOwner; 120 item.Creator = libOwner;
121 item.inventoryID = inventoryID; 121 item.ID = inventoryID;
122 item.assetID = assetID; 122 item.AssetID = assetID;
123 item.inventoryDescription = description; 123 item.Description = description;
124 item.inventoryName = name; 124 item.Name = name;
125 item.assetType = assetType; 125 item.AssetType = assetType;
126 item.invType = invType; 126 item.InvType = invType;
127 item.parentFolderID = parentFolderID; 127 item.Folder = parentFolderID;
128 item.inventoryBasePermissions = 0x7FFFFFFF; 128 item.BasePermissions = 0x7FFFFFFF;
129 item.inventoryEveryOnePermissions = 0x7FFFFFFF; 129 item.EveryOnePermissions = 0x7FFFFFFF;
130 item.inventoryCurrentPermissions = 0x7FFFFFFF; 130 item.CurrentPermissions = 0x7FFFFFFF;
131 item.inventoryNextPermissions = 0x7FFFFFFF; 131 item.NextPermissions = 0x7FFFFFFF;
132 return item; 132 return item;
133 } 133 }
134 134
@@ -204,31 +204,31 @@ namespace OpenSim.Framework.Communications.Cache
204 private void ReadItemFromConfig(IConfig config) 204 private void ReadItemFromConfig(IConfig config)
205 { 205 {
206 InventoryItemBase item = new InventoryItemBase(); 206 InventoryItemBase item = new InventoryItemBase();
207 item.avatarID = libOwner; 207 item.Owner = libOwner;
208 item.creatorsID = libOwner; 208 item.Creator = libOwner;
209 item.inventoryID = new LLUUID(config.GetString("inventoryID", folderID.ToString())); 209 item.ID = new LLUUID(config.GetString("inventoryID", folderID.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.parentFolderID = new LLUUID(config.GetString("folderID", folderID.ToString())); 211 item.Folder = new LLUUID(config.GetString("folderID", folderID.ToString()));
212 item.inventoryDescription = config.GetString("description", System.String.Empty); 212 item.Description = config.GetString("description", System.String.Empty);
213 item.inventoryName = 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);
215 item.invType = config.GetInt("inventoryType", 0); 215 item.InvType = config.GetInt("inventoryType", 0);
216 item.inventoryCurrentPermissions = (uint)config.GetLong("currentPermissions", 0x7FFFFFFF); 216 item.CurrentPermissions = (uint)config.GetLong("currentPermissions", 0x7FFFFFFF);
217 item.inventoryNextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF); 217 item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF);
218 item.inventoryEveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF); 218 item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF);
219 item.inventoryBasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF); 219 item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF);
220 220
221 if (libraryFolders.ContainsKey(item.parentFolderID)) 221 if (libraryFolders.ContainsKey(item.Folder))
222 { 222 {
223 InventoryFolderImpl parentFolder = libraryFolders[item.parentFolderID]; 223 InventoryFolderImpl parentFolder = libraryFolders[item.Folder];
224 224
225 parentFolder.Items.Add(item.inventoryID, item); 225 parentFolder.Items.Add(item.ID, item);
226 } 226 }
227 else 227 else
228 { 228 {
229 m_log.WarnFormat( 229 m_log.WarnFormat(
230 "[LIBRARY INVENTORY]: Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!", 230 "[LIBRARY INVENTORY]: Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!",
231 item.inventoryName, item.inventoryID, item.parentFolderID); 231 item.Name, item.ID, item.Folder);
232 } 232 }
233 } 233 }
234 234