diff options
Diffstat (limited to 'OpenSim/Region/Communications/Local/LocalInventoryService.cs')
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalInventoryService.cs | 144 |
1 files changed, 72 insertions, 72 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index af58d33..b8f57f6 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs | |||
@@ -1,72 +1,72 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using libsecondlife; | 3 | using libsecondlife; |
4 | using OpenSim.Framework.Communications; | 4 | using OpenSim.Framework.Communications; |
5 | using OpenSim.Framework.Data; | 5 | using OpenSim.Framework.Data; |
6 | using OpenSim.Framework.Types; | 6 | using OpenSim.Framework.Types; |
7 | using OpenSim.Framework.UserManagement; | 7 | using OpenSim.Framework.UserManagement; |
8 | using OpenSim.Framework.Utilities; | 8 | using OpenSim.Framework.Utilities; |
9 | using OpenSim.Framework.InventoryServiceBase; | 9 | using OpenSim.Framework.InventoryServiceBase; |
10 | using InventoryFolder = OpenSim.Framework.Communications.Caches.InventoryFolder; | 10 | using InventoryFolder = OpenSim.Framework.Communications.Caches.InventoryFolder; |
11 | 11 | ||
12 | namespace OpenSim.Region.Communications.Local | 12 | namespace OpenSim.Region.Communications.Local |
13 | { | 13 | { |
14 | public class LocalInventoryService : InventoryServiceBase , IInventoryServices | 14 | public class LocalInventoryService : InventoryServiceBase , IInventoryServices |
15 | { | 15 | { |
16 | 16 | ||
17 | public LocalInventoryService() | 17 | public LocalInventoryService() |
18 | { | 18 | { |
19 | 19 | ||
20 | } | 20 | } |
21 | 21 | ||
22 | public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack) | 22 | public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack) |
23 | { | 23 | { |
24 | List<InventoryFolderBase> folders = this.RequestFirstLevelFolders(userID); | 24 | List<InventoryFolderBase> folders = this.RequestFirstLevelFolders(userID); |
25 | InventoryFolder rootFolder = null; | 25 | InventoryFolder rootFolder = null; |
26 | 26 | ||
27 | //need to make sure we send root folder first | 27 | //need to make sure we send root folder first |
28 | foreach (InventoryFolderBase folder in folders) | 28 | foreach (InventoryFolderBase folder in folders) |
29 | { | 29 | { |
30 | if (folder.parentID == libsecondlife.LLUUID.Zero) | 30 | if (folder.parentID == libsecondlife.LLUUID.Zero) |
31 | { | 31 | { |
32 | InventoryFolder newfolder = new InventoryFolder(folder); | 32 | InventoryFolder newfolder = new InventoryFolder(folder); |
33 | rootFolder = newfolder; | 33 | rootFolder = newfolder; |
34 | folderCallBack(userID, newfolder); | 34 | folderCallBack(userID, newfolder); |
35 | } | 35 | } |
36 | } | 36 | } |
37 | 37 | ||
38 | if (rootFolder != null) | 38 | if (rootFolder != null) |
39 | { | 39 | { |
40 | foreach (InventoryFolderBase folder in folders) | 40 | foreach (InventoryFolderBase folder in folders) |
41 | { | 41 | { |
42 | if (folder.folderID != rootFolder.folderID) | 42 | if (folder.folderID != rootFolder.folderID) |
43 | { | 43 | { |
44 | InventoryFolder newfolder = new InventoryFolder(folder); | 44 | InventoryFolder newfolder = new InventoryFolder(folder); |
45 | folderCallBack(userID, newfolder); | 45 | folderCallBack(userID, newfolder); |
46 | 46 | ||
47 | List<InventoryItemBase> items = this.RequestFolderItems(newfolder.folderID); | 47 | List<InventoryItemBase> items = this.RequestFolderItems(newfolder.folderID); |
48 | foreach (InventoryItemBase item in items) | 48 | foreach (InventoryItemBase item in items) |
49 | { | 49 | { |
50 | itemCallBack(userID, item); | 50 | itemCallBack(userID, item); |
51 | } | 51 | } |
52 | } | 52 | } |
53 | } | 53 | } |
54 | } | 54 | } |
55 | } | 55 | } |
56 | 56 | ||
57 | public void AddNewInventoryFolder(LLUUID userID, InventoryFolder folder) | 57 | public void AddNewInventoryFolder(LLUUID userID, InventoryFolder folder) |
58 | { | 58 | { |
59 | this.AddFolder(folder); | 59 | this.AddFolder(folder); |
60 | } | 60 | } |
61 | 61 | ||
62 | public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) | 62 | public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) |
63 | { | 63 | { |
64 | this.AddItem(item); | 64 | this.AddItem(item); |
65 | } | 65 | } |
66 | 66 | ||
67 | public void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) | 67 | public void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) |
68 | { | 68 | { |
69 | this.deleteItem(item); | 69 | this.deleteItem(item); |
70 | } | 70 | } |
71 | } | 71 | } |
72 | } | 72 | } |