using osu.Game.Online.API; using System; using System.Collections.Generic; using System.Text; namespace osu.Game.Database { public interface IDownloadModelManager : IModelManager where TModel : class { /// /// Fired when a download begins. /// event Action> DownloadBegan; /// /// Fired when a download is interrupted, either due to user cancellation or failure. /// event Action> DownloadFailed; bool IsAvailableLocally(TModel model); /// /// Downloads a . /// This will post notifications tracking progress. /// /// The to be downloaded. /// Whether downloading can happen. bool Download(TModel model); /// /// Downloads a with optional parameters for the download request. /// This will post notifications tracking progress. /// /// The to be downloaded. /// Optional parameters to be used for creating the download request. /// Whether downloading can happen. bool Download(TModel model, params object[] extra); /// /// Checks whether a given is available in the local store already. /// /// The whose existence needs to be checked. /// Whether the exists locally. ArchiveDownloadModelRequest GetExistingDownload(TModel model); } }