From 5bc3bbbcf3e7df23db3e3e0410266ba72a1a1e14 Mon Sep 17 00:00:00 2001 From: AliciaRaven Date: Sat, 6 Sep 2014 20:23:40 +0100 Subject: Add an event callback for loading IAR files. The callback for creating them already existed but not for loading. This is of interest for use by region modules. Also includes reporting numbers of items saved and items filtered to the completed log printout. --- .../Interfaces/IInventoryArchiverModule.cs | 27 +++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs b/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs index 54251a4..0795589 100644 --- a/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs @@ -42,8 +42,24 @@ namespace OpenSim.Region.Framework.Interfaces /// The inventory path saved /// The stream to which the archive was saved /// Contains the exception generated if the save did not succeed + /// Number of inventory items saved to archive + /// Number of inventory items skipped due to perm filter option public delegate void InventoryArchiveSaved( - UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, Exception reportedException); + UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, Exception reportedException, int SaveCount, int FilterCount); + + /// + /// Used for the OnInventoryArchiveLoaded event. + /// + /// Request id + /// true if the load succeeded, false otherwise + /// The user for whom the load was conducted + /// The inventory path loaded + /// The stream from which the archive was loaded + /// Contains the exception generated if the load did not succeed + /// Number of inventory items loaded from archive + public delegate void InventoryArchiveLoaded( + UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream loadStream, Exception reportedException, int LoadCount); + public interface IInventoryArchiverModule { @@ -53,6 +69,11 @@ namespace OpenSim.Region.Framework.Interfaces event InventoryArchiveSaved OnInventoryArchiveSaved; /// + /// Fired when an archive inventory load has been completed. + /// + event InventoryArchiveLoaded OnInventoryArchiveLoaded; + + /// /// Dearchive a user's inventory folder from the given stream /// /// @@ -60,7 +81,7 @@ namespace OpenSim.Region.Framework.Interfaces /// The inventory path in which to place the loaded folders and items /// The stream from which the inventory archive will be loaded /// true if the first stage of the operation succeeded, false otherwise - bool DearchiveInventory(string firstName, string lastName, string invPath, string pass, Stream loadStream); + bool DearchiveInventory(UUID id, string firstName, string lastName, string invPath, string pass, Stream loadStream); /// /// Dearchive a user's inventory folder from the given stream @@ -73,7 +94,7 @@ namespace OpenSim.Region.Framework.Interfaces /// the loaded IAR with existing folders where possible. /// true if the first stage of the operation succeeded, false otherwise bool DearchiveInventory( - string firstName, string lastName, string invPath, string pass, Stream loadStream, + UUID id, string firstName, string lastName, string invPath, string pass, Stream loadStream, Dictionary options); /// -- cgit v1.1