mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Merge branch 'master' into remove-stupid-weak-reference-bindable-events
This commit is contained in:
@ -9,35 +9,35 @@ namespace osu.Game.Database
|
||||
/// <summary>
|
||||
/// Represents a <see cref="IModelManager{TModel}"/> that can download new models from an external source.
|
||||
/// </summary>
|
||||
/// <typeparam name="TModel">The model type.</typeparam>
|
||||
public interface IModelDownloader<TModel> : IPostNotifications
|
||||
where TModel : class
|
||||
/// <typeparam name="T">The item's interface type.</typeparam>
|
||||
public interface IModelDownloader<T> : IPostNotifications
|
||||
where T : class
|
||||
{
|
||||
/// <summary>
|
||||
/// Fired when a <typeparamref name="TModel"/> download begins.
|
||||
/// Fired when a <typeparamref name="T"/> download begins.
|
||||
/// This is NOT run on the update thread and should be scheduled.
|
||||
/// </summary>
|
||||
Action<ArchiveDownloadRequest<TModel>> DownloadBegan { get; set; }
|
||||
Action<ArchiveDownloadRequest<T>> DownloadBegan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Fired when a <typeparamref name="TModel"/> download is interrupted, either due to user cancellation or failure.
|
||||
/// Fired when a <typeparamref name="T"/> download is interrupted, either due to user cancellation or failure.
|
||||
/// This is NOT run on the update thread and should be scheduled.
|
||||
/// </summary>
|
||||
Action<ArchiveDownloadRequest<TModel>> DownloadFailed { get; set; }
|
||||
Action<ArchiveDownloadRequest<T>> DownloadFailed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Begin a download for the requested <typeparamref name="TModel"/>.
|
||||
/// Begin a download for the requested <typeparamref name="T"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">The <stypeparamref name="TModel"/> to be downloaded.</param>
|
||||
/// <param name="item">The <stypeparamref name="T"/> to be downloaded.</param>
|
||||
/// <param name="minimiseDownloadSize">Whether this download should be optimised for slow connections. Generally means extras are not included in the download bundle..</param>
|
||||
/// <returns>Whether the download was started.</returns>
|
||||
bool Download(TModel model, bool minimiseDownloadSize);
|
||||
bool Download(T item, bool minimiseDownloadSize);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an existing <typeparamref name="TModel"/> download request if it exists.
|
||||
/// Gets an existing <typeparamref name="T"/> download request if it exists.
|
||||
/// </summary>
|
||||
/// <param name="model">The <typeparamref name="TModel"/> whose request is wanted.</param>
|
||||
/// <returns>The <see cref="ArchiveDownloadRequest{TModel}"/> object if it exists, otherwise null.</returns>
|
||||
ArchiveDownloadRequest<TModel> GetExistingDownload(TModel model);
|
||||
/// <param name="item">The <typeparamref name="T"/> whose request is wanted.</param>
|
||||
/// <returns>The <see cref="ArchiveDownloadRequest{T}"/> object if it exists, otherwise null.</returns>
|
||||
ArchiveDownloadRequest<T> GetExistingDownload(T item);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user