aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Inventory
diff options
context:
space:
mode:
authorDiva Canto2009-08-19 10:56:08 -0700
committerDiva Canto2009-08-19 10:56:08 -0700
commitd519f1885f587409592cf92bc0f4ba8533a1866f (patch)
treedc8d0073d09050c8787121290b1e3a8f65119812 /OpenSim/Server/Handlers/Inventory
parentAsync purge so that the client thread doesn't wait. (diff)
downloadopensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.zip
opensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.gz
opensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.bz2
opensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.xz
Added MoveItems, which is most useful upon viewer-delete inventory operation. Moving a batch of items is a 1-time operation. Made it async anyway, so that the viewer doesn't wait in case the DB layer is dumb (which is the case currently).
Diffstat (limited to 'OpenSim/Server/Handlers/Inventory')
-rw-r--r--OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs21
1 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
index 6cfc7df..6ef1d9d 100644
--- a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
@@ -125,8 +125,8 @@ namespace OpenSim.Server.Handlers.Inventory
125 "POST", "/NewFolder/", m_InventoryService.AddFolder, CheckAuthSession)); 125 "POST", "/NewFolder/", m_InventoryService.AddFolder, CheckAuthSession));
126 126
127 m_httpServer.AddStreamHandler( 127 m_httpServer.AddStreamHandler(
128 new RestDeserialiseTrustedHandler<InventoryFolderBase, bool>( 128 new RestDeserialiseSecureHandler<InventoryFolderBase, bool>(
129 "POST", "/CreateFolder/", m_InventoryService.AddFolder, CheckTrustSource)); 129 "POST", "/CreateFolder/", m_InventoryService.AddFolder, CheckAuthSession));
130 130
131 m_httpServer.AddStreamHandler( 131 m_httpServer.AddStreamHandler(
132 new RestDeserialiseSecureHandler<InventoryItemBase, bool>( 132 new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
@@ -137,9 +137,13 @@ namespace OpenSim.Server.Handlers.Inventory
137 "POST", "/AddNewItem/", m_InventoryService.AddItem, CheckTrustSource)); 137 "POST", "/AddNewItem/", m_InventoryService.AddItem, CheckTrustSource));
138 138
139 m_httpServer.AddStreamHandler( 139 m_httpServer.AddStreamHandler(
140 new RestDeserialiseTrustedHandler<Guid, List<InventoryItemBase>>( 140 new RestDeserialiseSecureHandler<Guid, List<InventoryItemBase>>(
141 "POST", "/GetItems/", GetFolderItems, CheckTrustSource)); 141 "POST", "/GetItems/", GetFolderItems, CheckAuthSession));
142 142
143 m_httpServer.AddStreamHandler(
144 new RestDeserialiseSecureHandler<List<InventoryItemBase>, bool>(
145 "POST", "/MoveItems/", MoveItems, CheckAuthSession));
146
143 // for persistent active gestures 147 // for persistent active gestures
144 m_httpServer.AddStreamHandler( 148 m_httpServer.AddStreamHandler(
145 new RestDeserialiseTrustedHandler<Guid, List<InventoryItemBase>> 149 new RestDeserialiseTrustedHandler<Guid, List<InventoryItemBase>>
@@ -256,6 +260,15 @@ namespace OpenSim.Server.Handlers.Inventory
256 return m_InventoryService.DeleteItems(UUID.Zero, uuids); 260 return m_InventoryService.DeleteItems(UUID.Zero, uuids);
257 } 261 }
258 262
263 public bool MoveItems(List<InventoryItemBase> items)
264 {
265 // oops we lost the user info here. Bad bad handlers
266 // let's peek at one item
267 UUID ownerID = UUID.Zero;
268 if (items.Count > 0)
269 ownerID = items[0].Owner;
270 return m_InventoryService.MoveItems(ownerID, items);
271 }
259 #endregion 272 #endregion
260 273
261 /// <summary> 274 /// <summary>