using System;
using System.IO;
using System.Threading.Tasks;
using MediaBrowser.Controller.SystemBackupService;
namespace Jellyfin.Server.Implementations.SystemBackupService;
///
/// Defines an interface to restore and backup the jellyfin system.
///
public interface IBackupService
{
///
/// Creates a new Backup zip file containing the current state of the application.
///
/// The backup options.
/// A task.
Task CreateBackupAsync(BackupOptionsDto backupOptions);
///
/// Gets a list of backups that are available to be restored from.
///
/// A list of backup paths.
Task EnumerateBackups();
///
/// Gets a single backup manifest if the path defines a valid Jellyfin backup archive.
///
/// The path to be loaded.
/// The containing backup manifest or null if not existing or compatiable.
Task GetBackupManifest(string archivePath);
///
/// Restores an backup zip file created by jellyfin.
///
/// Path to the archive.
/// A Task.
/// Thrown when an invalid or missing file is specified.
/// Thrown when attempt to load an unsupported backup is made.
/// Thrown for errors during the restore.
Task RestoreBackupAsync(string archivePath);
///
/// Schedules a Restore and restarts the server.
///
/// The path to the archive to restore from.
void ScheduleRestoreAndRestartServer(string archivePath);
}