﻿// Copyright (c) Kai Langlie. All rights reserved.
// Licensed under the Apache License, Version 2.0.

using System;
using System.Threading;
using OpenUpdate.Engine.Backup;
using OpenUpdate.Engine.Concrete;

namespace OpenUpdate.Engine.Interface
{
    internal interface IBackup
    {
        bool HasError { get; }
        string ErrorMessage { get; }
        int BackupCount { get; }
        int RestoreCount { get; }
        event EventHandler<BackupEventArgs> OnBackupChange;
        void Initialize(string appPath, Action<string> log);
        bool Backup(UpdateBase au);
        bool Finish(out string association);
        bool Restore(string filePath, Action<RestoreEventArgs> restoreAction, CancellationToken ct);
    }
}