// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// The Preset Service Interface
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Services.Presets.Interfaces
{
using System.Collections.Generic;
using System.Collections.ObjectModel;
using HandBrake.Interop.Model;
using HandBrakeWPF.Services.Presets.Model;
///
/// The Preset Service Interface
///
public interface IPresetService
{
///
/// Gets a Collection of presets.
///
ObservableCollection Presets { get; }
///
/// Gets DefaultPreset.
///
Preset DefaultPreset { get; }
///
/// The load.
///
void Load();
///
/// Save the state of the Preset Treview
///
void SaveCategoryStates();
///
/// Load the state of the Preset Treeview.
///
void LoadCategoryStates();
///
/// Get a list of preset categories.
///
///
/// String list.
///
IList GetPresetCategories(bool userCategoriesOnly);
///
/// Add a new preset to the system
///
///
/// A Preset to add
///
///
/// True if added,
/// False if name already exists
///
bool Add(Preset preset);
///
/// The import.
///
///
/// The filename.
///
void Import(string filename);
///
/// The export.
///
///
/// The filename.
///
///
/// The preset.
///
///
/// The configuration.
///
void Export(string filename, Preset preset, HBConfiguration configuration);
///
/// Update a preset
///
///
/// The updated preset
///
void Update(Preset update);
///
/// Remove a preset with a given name from either the built in or user preset list.
///
///
/// The Preset to remove
///
///
/// True if it was removed successfully, false otherwise.
///
bool Remove(Preset preset);
///
/// Remove a group of presets by category
///
///
/// The Category to remove
///
void RemoveGroup(string category);
///
/// Get a Preset
///
///
/// The name of the preset to get
///
///
/// A Preset or null object
///
Preset GetPreset(string name);
///
/// Clear Built-in Presets
///
void ClearBuiltIn();
///
/// Clear all presets
///
void ClearAll();
///
/// Set Default Preset
///
///
/// The name.
///
void SetDefault(Preset name);
///
/// Returns a value if the preset can be updated / resaved
///
///
/// The name.
///
///
/// True if it's not a built-in preset, false otherwise.
///
bool CanUpdatePreset(string name);
///
/// Reads the CLI's CLI output format and load's them into the preset List Preset
///
void UpdateBuiltInPresets();
///
/// Check if the preset "name" exists in either Presets or UserPresets lists.
///
/// Name of the preset
/// True if found
bool CheckIfPresetExists(string name);
///
/// Replace an existing preset with a modified one.
///
///
/// The existing.
///
///
/// The replacement.
///
void Replace(Preset existing, Preset replacement);
///
/// Set the selected preset
///
/// The preset we want to select.
void SetSelected(Preset selectedPreset);
}
}