#region Disclaimer / License // Copyright (C) 2010, 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; using System.Windows.Forms; namespace Duplicati.Library.Backend { /// /// The interface used to display a GUI wizard page for the user. /// If the backed should be avalible from the GUI, this interface must be implemented /// public interface IBackendGUI : IBackend { /// /// The title of the page in the wizard /// string PageTitle { get; } /// /// The page description in the wizard /// string PageDescription { get; } /// /// A method to retrieve a user interface control. /// The method should keep a reference to the dictionary. /// The control will be resized to fit in the wizard. /// /// The set of settings defined by the calling application /// A set of options, either empty or previously stored by the backend /// The control that represents the user interface Control GetControl(IDictionary applicationSettings, IDictionary options); /// /// Method that is called when the user leaves the form. /// This method can be used to store data from the interface in the dictionary, /// so the user interface can be reconstructed later. /// /// The UI object created by the GetControl call void Leave(Control control); /// /// A method that is called when the form should be validated. /// The method should inform the user if the validation fails. /// /// The UI object created by the GetControl call /// True if the data is valid, false otherwise bool Validate(Control control); /// /// Returns the target path for activating Duplicati, and sets any options required. /// /// The set of settings defined by the calling application /// A set of previously saved options for the backend /// A set of commandline options for the backend /// The destination path string GetConfiguration(IDictionary applicationSettings, IDictionary guiOptions, IDictionary commandlineOptions); } }