aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Caches/InventoryFolder.cs
diff options
context:
space:
mode:
authorMW2007-07-11 14:39:03 +0000
committerMW2007-07-11 14:39:03 +0000
commit9d989612b0da9c5cc4e33a2f72d13d94116865d1 (patch)
tree414d0697b54e1b2061f4da9aaf3a9877304d1217 /OpenSim/Region/Caches/InventoryFolder.cs
parent* Removing terrain datafiles from trunk's SVN. Will move somewhere else. (diff)
downloadopensim-SC_OLD-9d989612b0da9c5cc4e33a2f72d13d94116865d1.zip
opensim-SC_OLD-9d989612b0da9c5cc4e33a2f72d13d94116865d1.tar.gz
opensim-SC_OLD-9d989612b0da9c5cc4e33a2f72d13d94116865d1.tar.bz2
opensim-SC_OLD-9d989612b0da9c5cc4e33a2f72d13d94116865d1.tar.xz
updated libsecondlife.dll to a 1.18 version (from the libsecondlife aditi branch, so when they have a trunk version that is 1.18 ready, best to update again).
Started some work on a userProfile/inventory cache.
Diffstat (limited to 'OpenSim/Region/Caches/InventoryFolder.cs')
-rw-r--r--OpenSim/Region/Caches/InventoryFolder.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/OpenSim/Region/Caches/InventoryFolder.cs b/OpenSim/Region/Caches/InventoryFolder.cs
new file mode 100644
index 0000000..364a184
--- /dev/null
+++ b/OpenSim/Region/Caches/InventoryFolder.cs
@@ -0,0 +1,51 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using OpenSim.Framework.Data;
6
7namespace OpenSim.Region.Caches
8{
9 public class InventoryFolder : InventoryFolderBase
10 {
11 public Dictionary<LLUUID, InventoryFolder> SubFolders = new Dictionary<LLUUID, InventoryFolder>();
12 public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>();
13
14 public InventoryFolder()
15 {
16 }
17
18 public InventoryFolder HasSubFolder(LLUUID folderID)
19 {
20 InventoryFolder returnFolder = null;
21 if (this.SubFolders.ContainsKey(folderID))
22 {
23 returnFolder = this.SubFolders[folderID];
24 }
25 else
26 {
27 foreach (InventoryFolder folder in this.SubFolders.Values)
28 {
29 returnFolder = folder.HasSubFolder(folderID);
30 if (returnFolder != null)
31 {
32 break;
33 }
34 }
35 }
36 return returnFolder;
37 }
38
39 public InventoryFolder CreateNewSubFolder(LLUUID folderID, string folderName, ushort type)
40 {
41 InventoryFolder subFold = new InventoryFolder();
42 subFold.name = folderName;
43 subFold.folderID = folderID;
44 subFold.type = type;
45 subFold.parentID = this.folderID;
46 subFold.agentID = this.agentID;
47 this.SubFolders.Add(subFold.folderID, subFold);
48 return subFold;
49 }
50 }
51}