diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index d4168fe..62b9bed 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -41,7 +41,7 @@ using OpenMetaverse; | |||
41 | 41 | ||
42 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | 42 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory |
43 | { | 43 | { |
44 | public class HGInventoryBroker : InventoryCache, ISharedRegionModule, IInventoryService | 44 | public class HGInventoryBroker : BaseInventoryConnector, ISharedRegionModule, IInventoryService |
45 | { | 45 | { |
46 | private static readonly ILog m_log = | 46 | private static readonly ILog m_log = |
47 | LogManager.GetLogger( | 47 | LogManager.GetLogger( |
@@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
138 | { | 138 | { |
139 | } | 139 | } |
140 | 140 | ||
141 | public override void AddRegion(Scene scene) | 141 | public void AddRegion(Scene scene) |
142 | { | 142 | { |
143 | if (!m_Enabled) | 143 | if (!m_Enabled) |
144 | return; | 144 | return; |
@@ -156,12 +156,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
156 | } | 156 | } |
157 | 157 | ||
158 | scene.RegisterModuleInterface<IInventoryService>(this); | 158 | scene.RegisterModuleInterface<IInventoryService>(this); |
159 | base.AddRegion(scene); | 159 | m_cache.AddRegion(scene); |
160 | } | 160 | } |
161 | 161 | ||
162 | public override void RemoveRegion(Scene scene) | 162 | public void RemoveRegion(Scene scene) |
163 | { | 163 | { |
164 | base.RemoveRegion(scene); | 164 | if (!m_Enabled) |
165 | return; | ||
166 | |||
167 | m_cache.RemoveRegion(scene); | ||
165 | } | 168 | } |
166 | 169 | ||
167 | public void RegionLoaded(Scene scene) | 170 | public void RegionLoaded(Scene scene) |
@@ -175,17 +178,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
175 | 178 | ||
176 | #region IInventoryService | 179 | #region IInventoryService |
177 | 180 | ||
178 | public bool CreateUserInventory(UUID userID) | 181 | public override bool CreateUserInventory(UUID userID) |
179 | { | 182 | { |
180 | return m_GridService.CreateUserInventory(userID); | 183 | return m_GridService.CreateUserInventory(userID); |
181 | } | 184 | } |
182 | 185 | ||
183 | public List<InventoryFolderBase> GetInventorySkeleton(UUID userId) | 186 | public override List<InventoryFolderBase> GetInventorySkeleton(UUID userId) |
184 | { | 187 | { |
185 | return m_GridService.GetInventorySkeleton(userId); | 188 | return m_GridService.GetInventorySkeleton(userId); |
186 | } | 189 | } |
187 | 190 | ||
188 | public InventoryCollection GetUserInventory(UUID userID) | 191 | public override InventoryCollection GetUserInventory(UUID userID) |
189 | { | 192 | { |
190 | if (IsLocalGridUser(userID)) | 193 | if (IsLocalGridUser(userID)) |
191 | return m_GridService.GetUserInventory(userID); | 194 | return m_GridService.GetUserInventory(userID); |
@@ -193,7 +196,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
193 | return null; | 196 | return null; |
194 | } | 197 | } |
195 | 198 | ||
196 | public void GetUserInventory(UUID userID, InventoryReceiptCallback callback) | 199 | public override void GetUserInventory(UUID userID, InventoryReceiptCallback callback) |
197 | { | 200 | { |
198 | if (IsLocalGridUser(userID)) | 201 | if (IsLocalGridUser(userID)) |
199 | m_GridService.GetUserInventory(userID, callback); | 202 | m_GridService.GetUserInventory(userID, callback); |
@@ -220,7 +223,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
220 | // } | 223 | // } |
221 | //} | 224 | //} |
222 | 225 | ||
223 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) | 226 | public override InventoryCollection GetFolderContent(UUID userID, UUID folderID) |
224 | { | 227 | { |
225 | if (IsLocalGridUser(userID)) | 228 | if (IsLocalGridUser(userID)) |
226 | return m_GridService.GetFolderContent(userID, folderID); | 229 | return m_GridService.GetFolderContent(userID, folderID); |
@@ -271,12 +274,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
271 | return new Dictionary<AssetType, InventoryFolderBase>(); | 274 | return new Dictionary<AssetType, InventoryFolderBase>(); |
272 | } | 275 | } |
273 | 276 | ||
274 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) | 277 | public override List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) |
275 | { | 278 | { |
276 | return new List<InventoryItemBase>(); | 279 | return new List<InventoryItemBase>(); |
277 | } | 280 | } |
278 | 281 | ||
279 | public bool AddFolder(InventoryFolderBase folder) | 282 | public override bool AddFolder(InventoryFolderBase folder) |
280 | { | 283 | { |
281 | if (folder == null) | 284 | if (folder == null) |
282 | return false; | 285 | return false; |
@@ -291,7 +294,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
291 | } | 294 | } |
292 | } | 295 | } |
293 | 296 | ||
294 | public bool UpdateFolder(InventoryFolderBase folder) | 297 | public override bool UpdateFolder(InventoryFolderBase folder) |
295 | { | 298 | { |
296 | if (folder == null) | 299 | if (folder == null) |
297 | return false; | 300 | return false; |
@@ -306,7 +309,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
306 | } | 309 | } |
307 | } | 310 | } |
308 | 311 | ||
309 | public bool MoveFolder(InventoryFolderBase folder) | 312 | public override bool MoveFolder(InventoryFolderBase folder) |
310 | { | 313 | { |
311 | if (folder == null) | 314 | if (folder == null) |
312 | return false; | 315 | return false; |
@@ -321,7 +324,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
321 | } | 324 | } |
322 | } | 325 | } |
323 | 326 | ||
324 | public bool PurgeFolder(InventoryFolderBase folder) | 327 | public override bool PurgeFolder(InventoryFolderBase folder) |
325 | { | 328 | { |
326 | if (folder == null) | 329 | if (folder == null) |
327 | return false; | 330 | return false; |
@@ -336,7 +339,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
336 | } | 339 | } |
337 | } | 340 | } |
338 | 341 | ||
339 | public bool AddItem(InventoryItemBase item) | 342 | // public bool AddItem(InventoryItemBase item) inherited |
343 | // Uses AddItemPlain | ||
344 | |||
345 | protected override bool AddItemPlain(InventoryItemBase item) | ||
340 | { | 346 | { |
341 | if (item == null) | 347 | if (item == null) |
342 | return false; | 348 | return false; |
@@ -351,7 +357,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
351 | } | 357 | } |
352 | } | 358 | } |
353 | 359 | ||
354 | public bool UpdateItem(InventoryItemBase item) | 360 | public override bool UpdateItem(InventoryItemBase item) |
355 | { | 361 | { |
356 | if (item == null) | 362 | if (item == null) |
357 | return false; | 363 | return false; |
@@ -366,7 +372,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
366 | } | 372 | } |
367 | } | 373 | } |
368 | 374 | ||
369 | public bool DeleteItem(InventoryItemBase item) | 375 | public override bool DeleteItem(InventoryItemBase item) |
370 | { | 376 | { |
371 | if (item == null) | 377 | if (item == null) |
372 | return false; | 378 | return false; |
@@ -381,7 +387,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
381 | } | 387 | } |
382 | } | 388 | } |
383 | 389 | ||
384 | public InventoryItemBase QueryItem(InventoryItemBase item) | 390 | public override InventoryItemBase QueryItem(InventoryItemBase item) |
385 | { | 391 | { |
386 | if (item == null) | 392 | if (item == null) |
387 | return null; | 393 | return null; |
@@ -396,7 +402,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
396 | } | 402 | } |
397 | } | 403 | } |
398 | 404 | ||
399 | public InventoryFolderBase QueryFolder(InventoryFolderBase folder) | 405 | public override InventoryFolderBase QueryFolder(InventoryFolderBase folder) |
400 | { | 406 | { |
401 | if (folder == null) | 407 | if (folder == null) |
402 | return null; | 408 | return null; |
@@ -411,17 +417,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
411 | } | 417 | } |
412 | } | 418 | } |
413 | 419 | ||
414 | public bool HasInventoryForUser(UUID userID) | 420 | public override bool HasInventoryForUser(UUID userID) |
415 | { | 421 | { |
416 | return false; | 422 | return false; |
417 | } | 423 | } |
418 | 424 | ||
419 | public InventoryFolderBase GetRootFolder(UUID userID) | 425 | public override InventoryFolderBase GetRootFolder(UUID userID) |
420 | { | 426 | { |
421 | return null; | 427 | return null; |
422 | } | 428 | } |
423 | 429 | ||
424 | public List<InventoryItemBase> GetActiveGestures(UUID userId) | 430 | public override List<InventoryItemBase> GetActiveGestures(UUID userId) |
425 | { | 431 | { |
426 | return new List<InventoryItemBase>(); | 432 | return new List<InventoryItemBase>(); |
427 | } | 433 | } |