2013-03-04 05:43:06 +00:00
|
|
|
|
using MediaBrowser.Model.Updates;
|
|
|
|
|
using System;
|
2013-02-27 12:49:55 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Common.Updates
|
|
|
|
|
{
|
|
|
|
|
public interface IPackageManager
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets all available packages.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{List{PackageInfo}}.</returns>
|
2013-03-04 05:43:06 +00:00
|
|
|
|
Task<IEnumerable<PackageInfo>> GetAvailablePackages(CancellationToken cancellationToken);
|
2013-02-27 12:49:55 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Installs a package.
|
|
|
|
|
/// </summary>
|
2013-02-27 13:34:24 +00:00
|
|
|
|
/// <param name="progress"></param>
|
2013-02-27 12:49:55 +00:00
|
|
|
|
/// <param name="package">The package.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-03-04 05:43:06 +00:00
|
|
|
|
Task InstallPackage(IProgress<double> progress, PackageVersionInfo package, CancellationToken cancellationToken);
|
2013-02-27 12:49:55 +00:00
|
|
|
|
}
|
|
|
|
|
}
|