diff options
author | Teravus Ovares (Dan Olivares) | 2009-08-26 11:48:05 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-26 11:48:05 -0400 |
commit | 54e05a083d2aeb7a892647f64edfd52db80ce5ed (patch) | |
tree | 1fca51f8dd19c0f4871d8e1b875511c6087b3675 /OpenSim/Services/Connectors/Inventory | |
parent | * It turns out that Physics heightmap values were being stored in managed mem... (diff) | |
parent | Add reference to OpenMetaverse.dll to UserServer.Modules to make MSVS happy (diff) | |
download | opensim-SC-54e05a083d2aeb7a892647f64edfd52db80ce5ed.zip opensim-SC-54e05a083d2aeb7a892647f64edfd52db80ce5ed.tar.gz opensim-SC-54e05a083d2aeb7a892647f64edfd52db80ce5ed.tar.bz2 opensim-SC-54e05a083d2aeb7a892647f64edfd52db80ce5ed.tar.xz |
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to 'OpenSim/Services/Connectors/Inventory')
4 files changed, 68 insertions, 5 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs index 45e921a..1004fb9 100644 --- a/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs | |||
@@ -201,6 +201,19 @@ namespace OpenSim.Services.Connectors.Inventory | |||
201 | return false; | 201 | return false; |
202 | } | 202 | } |
203 | 203 | ||
204 | public bool DeleteFolders(string id, List<UUID> folders, UUID sessionID) | ||
205 | { | ||
206 | string url = string.Empty; | ||
207 | string userID = string.Empty; | ||
208 | |||
209 | if (StringToUrlAndUserID(id, out url, out userID)) | ||
210 | { | ||
211 | ISessionAuthInventoryService connector = GetConnector(url); | ||
212 | return connector.DeleteFolders(userID, folders, sessionID); | ||
213 | } | ||
214 | return false; | ||
215 | } | ||
216 | |||
204 | public bool PurgeFolder(string id, InventoryFolderBase folder, UUID sessionID) | 217 | public bool PurgeFolder(string id, InventoryFolderBase folder, UUID sessionID) |
205 | { | 218 | { |
206 | string url = string.Empty; | 219 | string url = string.Empty; |
diff --git a/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs b/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs index c89c9b7..da8c7e2 100644 --- a/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs +++ b/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs | |||
@@ -89,6 +89,11 @@ namespace OpenSim.Services.Connectors | |||
89 | bool MoveFolder(string userID, InventoryFolderBase folder, UUID session_id); | 89 | bool MoveFolder(string userID, InventoryFolderBase folder, UUID session_id); |
90 | 90 | ||
91 | /// <summary> | 91 | /// <summary> |
92 | /// Delete a list of inventory folders (from trash) | ||
93 | /// </summary> | ||
94 | bool DeleteFolders(string userID, List<UUID> folders, UUID session_id); | ||
95 | |||
96 | /// <summary> | ||
92 | /// Purge an inventory folder of all its items and subfolders. | 97 | /// Purge an inventory folder of all its items and subfolders. |
93 | /// </summary> | 98 | /// </summary> |
94 | /// <param name="folder"></param> | 99 | /// <param name="folder"></param> |
diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs index b573a06..a2261ba 100644 --- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs | |||
@@ -229,6 +229,11 @@ namespace OpenSim.Services.Connectors | |||
229 | return SynchronousRestSessionObjectPoster<Guid, InventoryCollection>.BeginPostObject( | 229 | return SynchronousRestSessionObjectPoster<Guid, InventoryCollection>.BeginPostObject( |
230 | "POST", m_ServerURI + "/GetFolderContent/", folderID.Guid, sessionID.ToString(), userID.ToString()); | 230 | "POST", m_ServerURI + "/GetFolderContent/", folderID.Guid, sessionID.ToString(), userID.ToString()); |
231 | } | 231 | } |
232 | catch (TimeoutException e) | ||
233 | { | ||
234 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderContent operation to {0} timed out {0} {1}.", m_ServerURI, | ||
235 | e.Source, e.Message); | ||
236 | } | ||
232 | catch (Exception e) | 237 | catch (Exception e) |
233 | { | 238 | { |
234 | // Maybe we're talking to an old inventory server. Try this other thing. | 239 | // Maybe we're talking to an old inventory server. Try this other thing. |
@@ -308,6 +313,25 @@ namespace OpenSim.Services.Connectors | |||
308 | return false; | 313 | return false; |
309 | } | 314 | } |
310 | 315 | ||
316 | public bool DeleteFolders(string userID, List<UUID> folderIDs, UUID sessionID) | ||
317 | { | ||
318 | try | ||
319 | { | ||
320 | List<Guid> guids = new List<Guid>(); | ||
321 | foreach (UUID u in folderIDs) | ||
322 | guids.Add(u.Guid); | ||
323 | return SynchronousRestSessionObjectPoster<List<Guid>, bool>.BeginPostObject( | ||
324 | "POST", m_ServerURI + "/DeleteFolders/", guids, sessionID.ToString(), userID); | ||
325 | } | ||
326 | catch (Exception e) | ||
327 | { | ||
328 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Delete inventory folders operation failed, {0} {1}", | ||
329 | e.Source, e.Message); | ||
330 | } | ||
331 | |||
332 | return false; | ||
333 | } | ||
334 | |||
311 | public bool MoveFolder(string userID, InventoryFolderBase folder, UUID sessionID) | 335 | public bool MoveFolder(string userID, InventoryFolderBase folder, UUID sessionID) |
312 | { | 336 | { |
313 | try | 337 | try |
@@ -397,13 +421,28 @@ namespace OpenSim.Services.Connectors | |||
397 | 421 | ||
398 | private void MoveItemsAsync(string userID, List<InventoryItemBase> items, UUID sessionID) | 422 | private void MoveItemsAsync(string userID, List<InventoryItemBase> items, UUID sessionID) |
399 | { | 423 | { |
424 | if (items == null) | ||
425 | { | ||
426 | m_log.WarnFormat("[INVENTORY CONNECTOR]: request to move items got a null list."); | ||
427 | return; | ||
428 | } | ||
429 | |||
400 | try | 430 | try |
401 | { | 431 | { |
402 | SynchronousRestSessionObjectPoster<List<InventoryItemBase>, bool>.BeginPostObject( | 432 | //SynchronousRestSessionObjectPoster<List<InventoryItemBase>, bool>.BeginPostObject( |
403 | "POST", m_ServerURI + "/MoveItems/", items, sessionID.ToString(), userID.ToString()); | 433 | // "POST", m_ServerURI + "/MoveItems/", items, sessionID.ToString(), userID.ToString()); |
434 | |||
435 | //// Success | ||
436 | //return; | ||
437 | string uri = m_ServerURI + "/inventory/" + userID; | ||
438 | if (SynchronousRestObjectRequester. | ||
439 | MakeRequest<List<InventoryItemBase>, bool>("PUT", uri, items)) | ||
440 | m_log.DebugFormat("[INVENTORY CONNECTOR]: move {0} items poster succeeded {1}", items.Count, uri); | ||
441 | else | ||
442 | m_log.DebugFormat("[INVENTORY CONNECTOR]: move {0} items poster failed {1}", items.Count, uri); ; | ||
404 | 443 | ||
405 | // Success | ||
406 | return; | 444 | return; |
445 | |||
407 | } | 446 | } |
408 | catch (Exception e) | 447 | catch (Exception e) |
409 | { | 448 | { |
@@ -466,12 +505,12 @@ namespace OpenSim.Services.Connectors | |||
466 | return null; | 505 | return null; |
467 | } | 506 | } |
468 | 507 | ||
469 | public InventoryFolderBase QueryFolder(string userID, InventoryFolderBase item, UUID sessionID) | 508 | public InventoryFolderBase QueryFolder(string userID, InventoryFolderBase folder, UUID sessionID) |
470 | { | 509 | { |
471 | try | 510 | try |
472 | { | 511 | { |
473 | return SynchronousRestSessionObjectPoster<InventoryFolderBase, InventoryFolderBase>.BeginPostObject( | 512 | return SynchronousRestSessionObjectPoster<InventoryFolderBase, InventoryFolderBase>.BeginPostObject( |
474 | "POST", m_ServerURI + "/QueryFolder/", item, sessionID.ToString(), item.Owner.ToString()); | 513 | "POST", m_ServerURI + "/QueryFolder/", folder, sessionID.ToString(), userID); |
475 | } | 514 | } |
476 | catch (Exception e) | 515 | catch (Exception e) |
477 | { | 516 | { |
diff --git a/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs index cd283ff..a7aa138 100644 --- a/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs | |||
@@ -136,6 +136,12 @@ namespace OpenSim.Services.Connectors | |||
136 | return false; | 136 | return false; |
137 | } | 137 | } |
138 | 138 | ||
139 | public bool DeleteFolders(UUID ownerID, List<UUID> folderIDs) | ||
140 | { | ||
141 | return false; | ||
142 | } | ||
143 | |||
144 | |||
139 | public bool PurgeFolder(InventoryFolderBase folder) | 145 | public bool PurgeFolder(InventoryFolderBase folder) |
140 | { | 146 | { |
141 | return false; | 147 | return false; |