aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
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.cs9
-rw-r--r--OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs2
-rw-r--r--OpenSim/Services/Interfaces/IInventoryService.cs3
-rw-r--r--OpenSim/Services/InventoryService/InventoryService.cs12
6 files changed, 20 insertions, 12 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs
index 75fa516..00b74b5 100644
--- a/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs
@@ -253,7 +253,7 @@ namespace OpenSim.Services.Connectors.Inventory
253 return false; 253 return false;
254 } 254 }
255 255
256 public bool DeleteItem(string id, InventoryItemBase item, UUID sessionID) 256 public bool DeleteItems(string id, List<UUID> itemIDs, UUID sessionID)
257 { 257 {
258 string url = string.Empty; 258 string url = string.Empty;
259 string userID = string.Empty; 259 string userID = string.Empty;
@@ -261,7 +261,7 @@ namespace OpenSim.Services.Connectors.Inventory
261 if (StringToUrlAndUserID(id, out url, out userID)) 261 if (StringToUrlAndUserID(id, out url, out userID))
262 { 262 {
263 ISessionAuthInventoryService connector = GetConnector(url); 263 ISessionAuthInventoryService connector = GetConnector(url);
264 return connector.UpdateItem(userID, item, sessionID); 264 return connector.DeleteItems(userID, itemIDs, sessionID);
265 } 265 }
266 return false; 266 return false;
267 } 267 }
diff --git a/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs b/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs
index 7f051f3..e4e713c 100644
--- a/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs
+++ b/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs
@@ -121,7 +121,7 @@ namespace OpenSim.Services.Connectors
121 /// </summary> 121 /// </summary>
122 /// <param name="item"></param> 122 /// <param name="item"></param>
123 /// <returns>true if the item was successfully deleted</returns> 123 /// <returns>true if the item was successfully deleted</returns>
124 bool DeleteItem(string userID, InventoryItemBase item, UUID session_id); 124 bool DeleteItems(string userID, List<UUID> itemIDs, UUID session_id);
125 125
126 InventoryItemBase QueryItem(string userID, InventoryItemBase item, UUID session_id); 126 InventoryItemBase QueryItem(string userID, InventoryItemBase item, UUID session_id);
127 127
diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
index 5aa4b30..9b2e331 100644
--- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs
@@ -383,12 +383,15 @@ namespace OpenSim.Services.Connectors
383 return false; 383 return false;
384 } 384 }
385 385
386 public bool DeleteItem(string userID, InventoryItemBase item, UUID sessionID) 386 public bool DeleteItems(string userID, List<UUID> items, UUID sessionID)
387 { 387 {
388 try 388 try
389 { 389 {
390 return SynchronousRestSessionObjectPoster<InventoryItemBase, bool>.BeginPostObject( 390 List<Guid> guids = new List<Guid>();
391 "POST", m_ServerURI + "/DeleteItem/", item, sessionID.ToString(), item.Owner.ToString()); 391 foreach (UUID u in items)
392 guids.Add(u.Guid);
393 return SynchronousRestSessionObjectPoster<List<Guid>, bool>.BeginPostObject(
394 "POST", m_ServerURI + "/DeleteItem/", guids, sessionID.ToString(), userID);
392 } 395 }
393 catch (Exception e) 396 catch (Exception e)
394 { 397 {
diff --git a/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs
index 5cbd307..3bbf129 100644
--- a/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs
@@ -151,7 +151,7 @@ namespace OpenSim.Services.Connectors
151 return false; 151 return false;
152 } 152 }
153 153
154 public bool DeleteItem(InventoryItemBase item) 154 public bool DeleteItems(UUID owner, List<UUID> itemIDs)
155 { 155 {
156 return false; 156 return false;
157 } 157 }
diff --git a/OpenSim/Services/Interfaces/IInventoryService.cs b/OpenSim/Services/Interfaces/IInventoryService.cs
index a89a238..6409b57 100644
--- a/OpenSim/Services/Interfaces/IInventoryService.cs
+++ b/OpenSim/Services/Interfaces/IInventoryService.cs
@@ -147,7 +147,8 @@ namespace OpenSim.Services.Interfaces
147 /// </summary> 147 /// </summary>
148 /// <param name="item"></param> 148 /// <param name="item"></param>
149 /// <returns>true if the item was successfully deleted</returns> 149 /// <returns>true if the item was successfully deleted</returns>
150 bool DeleteItem(InventoryItemBase item); 150 //bool DeleteItem(InventoryItemBase item);
151 bool DeleteItems(UUID userID, List<UUID> itemIDs);
151 152
152 /// <summary> 153 /// <summary>
153 /// Get an item, given by its UUID 154 /// Get an item, given by its UUID
diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs
index 65c2d96..69b1b28 100644
--- a/OpenSim/Services/InventoryService/InventoryService.cs
+++ b/OpenSim/Services/InventoryService/InventoryService.cs
@@ -387,12 +387,14 @@ namespace OpenSim.Services.InventoryService
387 } 387 }
388 388
389 // See IInventoryServices 389 // See IInventoryServices
390 public virtual bool DeleteItem(InventoryItemBase item) 390 public virtual bool DeleteItems(UUID owner, List<UUID> itemIDs)
391 { 391 {
392 m_log.InfoFormat( 392 m_log.InfoFormat(
393 "[INVENTORY SERVICE]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder); 393 "[INVENTORY SERVICE]: Deleting {0} items from user {1}", itemIDs.Count, owner);
394 394
395 m_Database.deleteInventoryItem(item.ID); 395 // uhh.....
396 foreach (UUID uuid in itemIDs)
397 m_Database.deleteInventoryItem(uuid);
396 398
397 // FIXME: Should return false on failure 399 // FIXME: Should return false on failure
398 return true; 400 return true;
@@ -439,10 +441,12 @@ namespace OpenSim.Services.InventoryService
439 441
440 List<InventoryItemBase> items = GetFolderItems(folder.Owner, folder.ID); 442 List<InventoryItemBase> items = GetFolderItems(folder.Owner, folder.ID);
441 443
444 List<UUID> uuids = new List<UUID>();
442 foreach (InventoryItemBase item in items) 445 foreach (InventoryItemBase item in items)
443 { 446 {
444 DeleteItem(item); 447 uuids.Add(item.ID);
445 } 448 }
449 DeleteItems(folder.Owner, uuids);
446 450
447 // FIXME: Should return false on failure 451 // FIXME: Should return false on failure
448 return true; 452 return true;