aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Local/LocalInventoryService.cs
diff options
context:
space:
mode:
authorlbsa712007-09-24 07:30:30 +0000
committerlbsa712007-09-24 07:30:30 +0000
commit1302ef44e3c632159378bc4042c753bcf36e9c63 (patch)
tree6b6295ac233ecb05afe6432a903ec616e4fa079a /OpenSim/Region/Communications/Local/LocalInventoryService.cs
parent* Trying to streamline CommunicationsManager (diff)
downloadopensim-SC_OLD-1302ef44e3c632159378bc4042c753bcf36e9c63.zip
opensim-SC_OLD-1302ef44e3c632159378bc4042c753bcf36e9c63.tar.gz
opensim-SC_OLD-1302ef44e3c632159378bc4042c753bcf36e9c63.tar.bz2
opensim-SC_OLD-1302ef44e3c632159378bc4042c753bcf36e9c63.tar.xz
* Started major restructusing of comms to prepare for better grid and region functionality
* Working towards one shared set of services * Killed off two projects with very little functionality
Diffstat (limited to 'OpenSim/Region/Communications/Local/LocalInventoryService.cs')
-rw-r--r--OpenSim/Region/Communications/Local/LocalInventoryService.cs139
1 files changed, 67 insertions, 72 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs
index b8f57f6..53f6ffa 100644
--- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs
+++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs
@@ -1,72 +1,67 @@
1using System; 1using System.Collections.Generic;
2using System.Collections.Generic; 2using libsecondlife;
3using libsecondlife; 3using OpenSim.Framework.Communications;
4using OpenSim.Framework.Communications; 4using OpenSim.Framework.Data;
5using OpenSim.Framework.Data; 5using InventoryFolder=OpenSim.Framework.Communications.Caches.InventoryFolder;
6using OpenSim.Framework.Types; 6
7using OpenSim.Framework.UserManagement; 7namespace OpenSim.Region.Communications.Local
8using OpenSim.Framework.Utilities; 8{
9using OpenSim.Framework.InventoryServiceBase; 9 public class LocalInventoryService : InventoryServiceBase
10using InventoryFolder = OpenSim.Framework.Communications.Caches.InventoryFolder; 10 {
11 11
12namespace OpenSim.Region.Communications.Local 12 public LocalInventoryService()
13{ 13 {
14 public class LocalInventoryService : InventoryServiceBase , IInventoryServices 14
15 { 15 }
16 16
17 public LocalInventoryService() 17 public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack)
18 { 18 {
19 19 List<InventoryFolderBase> folders = this.RequestFirstLevelFolders(userID);
20 } 20 InventoryFolder rootFolder = null;
21 21
22 public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack) 22 //need to make sure we send root folder first
23 { 23 foreach (InventoryFolderBase folder in folders)
24 List<InventoryFolderBase> folders = this.RequestFirstLevelFolders(userID); 24 {
25 InventoryFolder rootFolder = null; 25 if (folder.parentID == libsecondlife.LLUUID.Zero)
26 26 {
27 //need to make sure we send root folder first 27 InventoryFolder newfolder = new InventoryFolder(folder);
28 foreach (InventoryFolderBase folder in folders) 28 rootFolder = newfolder;
29 { 29 folderCallBack(userID, newfolder);
30 if (folder.parentID == libsecondlife.LLUUID.Zero) 30 }
31 { 31 }
32 InventoryFolder newfolder = new InventoryFolder(folder); 32
33 rootFolder = newfolder; 33 if (rootFolder != null)
34 folderCallBack(userID, newfolder); 34 {
35 } 35 foreach (InventoryFolderBase folder in folders)
36 } 36 {
37 37 if (folder.folderID != rootFolder.folderID)
38 if (rootFolder != null) 38 {
39 { 39 InventoryFolder newfolder = new InventoryFolder(folder);
40 foreach (InventoryFolderBase folder in folders) 40 folderCallBack(userID, newfolder);
41 { 41
42 if (folder.folderID != rootFolder.folderID) 42 List<InventoryItemBase> items = this.RequestFolderItems(newfolder.folderID);
43 { 43 foreach (InventoryItemBase item in items)
44 InventoryFolder newfolder = new InventoryFolder(folder); 44 {
45 folderCallBack(userID, newfolder); 45 itemCallBack(userID, item);
46 46 }
47 List<InventoryItemBase> items = this.RequestFolderItems(newfolder.folderID); 47 }
48 foreach (InventoryItemBase item in items) 48 }
49 { 49 }
50 itemCallBack(userID, item); 50 }
51 } 51
52 } 52 public override void AddNewInventoryFolder(LLUUID userID, InventoryFolder folder)
53 } 53 {
54 } 54 this.AddFolder(folder);
55 } 55 }
56 56
57 public void AddNewInventoryFolder(LLUUID userID, InventoryFolder folder) 57 public override void AddNewInventoryItem(LLUUID userID, InventoryItemBase item)
58 { 58 {
59 this.AddFolder(folder); 59 this.AddItem(item);
60 } 60 }
61 61
62 public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) 62 public override void DeleteInventoryItem(LLUUID userID, InventoryItemBase item)
63 { 63 {
64 this.AddItem(item); 64 this.deleteItem(item);
65 } 65 }
66 66 }
67 public void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) 67}
68 {
69 this.deleteItem(item);
70 }
71 }
72}