#region Disclaimer / License // Copyright (C) 2011, Kenneth Skovhede // http://www.hexad.dk, opensource@hexad.dk // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // #endregion using System; using System.Collections.Generic; using System.Text; namespace Duplicati.Library.Interface { /// /// An interface for logging interactions with the backend /// public interface IBackendInteraction { /// /// Signals the start of a operation on the backend, such as cleanup or backup /// /// The name of the operation void BeginOperation(string name); /// /// Signals the end of the operation /// void EndOperation(); /// /// Registers a get operation /// /// The entry involved /// True if the operation succeeeded, false otherwise /// An error message if the operation did not succeeed void RegisterGet(IFileEntry entry, bool success, String errorMessage); /// /// Registers a put operation /// /// The entry involved /// True if the operation succeeeded, false otherwise /// An error message if the operation did not succeeed void RegisterPut(IFileEntry entry, bool success, String errorMessage); /// /// Registers a delete operation /// /// The entry involved /// True if the operation succeeeded, false otherwise /// An error message if the operation did not succeeed void RegisterDelete(IFileEntry entry, bool success, String errorMessage); /// /// Registers a create folder operation /// /// True if the operation succeeeded, false otherwise /// An error message if the operation did not succeeed void RegisterCreateFolder(bool success, String errorMessage); /// /// Registers a list operation /// /// The entries returned, if the operation suceeded, null otherwise /// True if the operation succeeeded, false otherwise /// An error message if the operation did not succeeed void RegisterList(List files, bool success, String errorMessage); } }