aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorDiva Canto2009-08-11 10:30:03 -0700
committerDiva Canto2009-08-11 10:30:03 -0700
commit31419a70ce05e7db0c54f4c4ec827a0d1fe23402 (patch)
tree28687ede5c6f8fac8048ecce7a1a11ab30c7504f /OpenSim/Services
parentAdded two new methods to IIventoryService -- GetFolderForType and GetFolderCo... (diff)
downloadopensim-SC_OLD-31419a70ce05e7db0c54f4c4ec827a0d1fe23402.zip
opensim-SC_OLD-31419a70ce05e7db0c54f4c4ec827a0d1fe23402.tar.gz
opensim-SC_OLD-31419a70ce05e7db0c54f4c4ec827a0d1fe23402.tar.bz2
opensim-SC_OLD-31419a70ce05e7db0c54f4c4ec827a0d1fe23402.tar.xz
System folders inventory cache added to OUT inventory modules. This tracks agents in and out of *sims* in order to fetch/drop their system folders from the cache. Also added region-side support for fetching the system folders from the inventory service. Nothing of this is called yet.
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs4
-rw-r--r--OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs2
-rw-r--r--OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs6
-rw-r--r--OpenSim/Services/InventoryService/InventoryService.cs20
4 files changed, 26 insertions, 6 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs
index b168871..f6d1500 100644
--- a/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Services.Connectors.Inventory
126 /// <param name="userID"></param> 126 /// <param name="userID"></param>
127 /// <param name="type"></param> 127 /// <param name="type"></param>
128 /// <returns></returns> 128 /// <returns></returns>
129 public List<InventoryFolderBase> GetSystemFolders(string id, UUID sessionID) 129 public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(string id, UUID sessionID)
130 { 130 {
131 m_log.Debug("[HGInventory]: GetSystemFolders " + id); 131 m_log.Debug("[HGInventory]: GetSystemFolders " + id);
132 string url = string.Empty; 132 string url = string.Empty;
@@ -138,7 +138,7 @@ namespace OpenSim.Services.Connectors.Inventory
138 return connector.GetSystemFolders(userID, sessionID); 138 return connector.GetSystemFolders(userID, sessionID);
139 } 139 }
140 140
141 return new List<InventoryFolderBase>(); 141 return new Dictionary<AssetType, InventoryFolderBase>();
142 } 142 }
143 143
144 /// <summary> 144 /// <summary>
diff --git a/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs b/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs
index 98fd680..973cb0a 100644
--- a/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs
+++ b/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Services.Connectors
57 /// <param name="userID"></param> 57 /// <param name="userID"></param>
58 /// <param name="type"></param> 58 /// <param name="type"></param>
59 /// <returns></returns> 59 /// <returns></returns>
60 List<InventoryFolderBase> GetSystemFolders(string userID, UUID session_id); 60 Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(string userID, UUID session_id);
61 61
62 /// <summary> 62 /// <summary>
63 /// Gets everything (folders and items) inside a folder 63 /// Gets everything (folders and items) inside a folder
diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
index 1a6826e..3b15831 100644
--- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
@@ -161,11 +161,11 @@ namespace OpenSim.Services.Connectors
161 /// <param name="userID"></param> 161 /// <param name="userID"></param>
162 /// <param name="type"></param> 162 /// <param name="type"></param>
163 /// <returns></returns> 163 /// <returns></returns>
164 public List<InventoryFolderBase> GetSystemFolders(string userID, UUID sessionID) 164 public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(string userID, UUID sessionID)
165 { 165 {
166 try 166 try
167 { 167 {
168 return SynchronousRestSessionObjectPoster<string, List<InventoryFolderBase>>.BeginPostObject( 168 return SynchronousRestSessionObjectPoster<string, Dictionary<AssetType, InventoryFolderBase>>.BeginPostObject(
169 "GET", m_ServerURI + "/SystemFolders/", userID, sessionID.ToString(), userID.ToString()); 169 "GET", m_ServerURI + "/SystemFolders/", userID, sessionID.ToString(), userID.ToString());
170 } 170 }
171 catch (Exception e) 171 catch (Exception e)
@@ -174,7 +174,7 @@ namespace OpenSim.Services.Connectors
174 e.Source, e.Message); 174 e.Source, e.Message);
175 } 175 }
176 176
177 return new List<InventoryFolderBase>(); 177 return new Dictionary<AssetType, InventoryFolderBase>();
178 } 178 }
179 179
180 /// <summary> 180 /// <summary>
diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs
index dd435c9..fc54c12 100644
--- a/OpenSim/Services/InventoryService/InventoryService.cs
+++ b/OpenSim/Services/InventoryService/InventoryService.cs
@@ -273,6 +273,26 @@ namespace OpenSim.Services.InventoryService
273 return root; 273 return root;
274 } 274 }
275 275
276 public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID)
277 {
278 InventoryFolderBase root = GetRootFolder(userID);
279 if (root != null)
280 {
281 InventoryCollection content = GetFolderContent(userID, root.ID);
282 if (content != null)
283 {
284 Dictionary<AssetType, InventoryFolderBase> folders = new Dictionary<AssetType, InventoryFolderBase>();
285 foreach (InventoryFolderBase folder in content.Folders)
286 {
287 if (folder.Type != (short)AssetType.Folder)
288 folders[(AssetType)folder.Type] = folder;
289 }
290 return folders;
291 }
292 }
293 return new Dictionary<AssetType, InventoryFolderBase>();
294 }
295
276 public List<InventoryItemBase> GetActiveGestures(UUID userId) 296 public List<InventoryItemBase> GetActiveGestures(UUID userId)
277 { 297 {
278 List<InventoryItemBase> activeGestures = new List<InventoryItemBase>(); 298 List<InventoryItemBase> activeGestures = new List<InventoryItemBase>();