diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalInventoryService.cs | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index 40e6601..e82d267 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs | |||
@@ -36,10 +36,6 @@ namespace OpenSim.Region.Communications.Local | |||
36 | { | 36 | { |
37 | public class LocalInventoryService : InventoryServiceBase | 37 | public class LocalInventoryService : InventoryServiceBase |
38 | { | 38 | { |
39 | public LocalInventoryService() | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, | 39 | public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, |
44 | InventoryItemInfo itemCallBack) | 40 | InventoryItemInfo itemCallBack) |
45 | { | 41 | { |
@@ -51,9 +47,7 @@ namespace OpenSim.Region.Communications.Local | |||
51 | { | 47 | { |
52 | if (folder.parentID == LLUUID.Zero) | 48 | if (folder.parentID == LLUUID.Zero) |
53 | { | 49 | { |
54 | InventoryFolderImpl newfolder = new InventoryFolderImpl(folder); | 50 | rootFolder = RequestInventoryFolder(userID, folder, folderCallBack, itemCallBack); |
55 | rootFolder = newfolder; | ||
56 | folderCallBack(userID, newfolder); | ||
57 | } | 51 | } |
58 | } | 52 | } |
59 | 53 | ||
@@ -63,14 +57,7 @@ namespace OpenSim.Region.Communications.Local | |||
63 | { | 57 | { |
64 | if (folder.folderID != rootFolder.folderID) | 58 | if (folder.folderID != rootFolder.folderID) |
65 | { | 59 | { |
66 | InventoryFolderImpl newfolder = new InventoryFolderImpl(folder); | 60 | RequestInventoryFolder(userID, folder, folderCallBack, itemCallBack); |
67 | folderCallBack(userID, newfolder); | ||
68 | |||
69 | List<InventoryItemBase> items = RequestFolderItems(newfolder.folderID); | ||
70 | foreach (InventoryItemBase item in items) | ||
71 | { | ||
72 | itemCallBack(userID, item); | ||
73 | } | ||
74 | } | 61 | } |
75 | } | 62 | } |
76 | } | 63 | } |
@@ -90,5 +77,26 @@ namespace OpenSim.Region.Communications.Local | |||
90 | { | 77 | { |
91 | DeleteItem(item); | 78 | DeleteItem(item); |
92 | } | 79 | } |
80 | |||
81 | /// <summary> | ||
82 | /// Send the given inventory folder and its item contents back to the requester. | ||
83 | /// </summary> | ||
84 | /// <param name="userID"></param> | ||
85 | /// <param name="folder"></param> | ||
86 | private InventoryFolderImpl RequestInventoryFolder(LLUUID userID, InventoryFolderBase folder, | ||
87 | InventoryFolderInfo folderCallBack, | ||
88 | InventoryItemInfo itemCallBack) | ||
89 | { | ||
90 | InventoryFolderImpl newFolder = new InventoryFolderImpl(folder); | ||
91 | folderCallBack(userID, newFolder); | ||
92 | |||
93 | List<InventoryItemBase> items = RequestFolderItems(newFolder.folderID); | ||
94 | foreach (InventoryItemBase item in items) | ||
95 | { | ||
96 | itemCallBack(userID, item); | ||
97 | } | ||
98 | |||
99 | return newFolder; | ||
100 | } | ||
93 | } | 101 | } |
94 | } \ No newline at end of file | 102 | } |