using CursorLang.Core.Models; namespace CursorLang.Core.Services; /// /// Checking for and installing new versions of the application. /// public interface IUpdateService { /// /// It makes sense for this installation to update itself. /// /// /// An application installed from the Store is updated by the Store itself: /// offering a package from elsewhere on top of it will not do — Windows would /// not accept it anyway. /// bool IsSupported { get; } /// The version of the running application. Version CurrentVersion { get; } /// /// Looks for a release newer than the installed one. null means the latest /// version is installed or there is no suitable release in the repository. /// Task CheckAsync(CancellationToken cancellationToken); /// /// Downloads the release package and returns the path to it. /// /// /// progress receives the downloaded fraction from 0 to 1. While the file /// size is unknown — not every hosting reports it — there will be no calls at all. /// Task DownloadAsync(ReleaseInfo release, IProgress? progress, CancellationToken cancellationToken); /// Hands the downloaded package over to the Windows app installer. void Install(string packagePath); }