using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Providers;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Providers
{
///
/// Interface IProviderManager
///
public interface IProviderManager
{
///
/// Refreshes the metadata.
///
/// The item.
/// The options.
/// The cancellation token.
/// Task.
Task RefreshMetadata(IHasMetadata item, MetadataRefreshOptions options, CancellationToken cancellationToken);
///
/// Executes the metadata providers.
///
/// The item.
/// The cancellation token.
/// if set to true [force].
/// Task{System.Boolean}.
Task ExecuteMetadataProviders(BaseItem item, CancellationToken cancellationToken, bool force = false);
///
/// Saves the image.
///
/// The item.
/// The URL.
/// The resource pool.
/// The type.
/// Index of the image.
/// The cancellation token.
/// Task.
Task SaveImage(BaseItem item, string url, SemaphoreSlim resourcePool, ImageType type, int? imageIndex, CancellationToken cancellationToken);
///
/// Saves the image.
///
/// The item.
/// The source.
/// Type of the MIME.
/// The type.
/// Index of the image.
/// The source URL.
/// The cancellation token.
/// Task.
Task SaveImage(BaseItem item, Stream source, string mimeType, ImageType type, int? imageIndex, string sourceUrl, CancellationToken cancellationToken);
///
/// Adds the metadata providers.
///
/// The providers.
/// The image providers.
/// The metadata services.
/// The metadata providers.
void AddParts(IEnumerable providers, IEnumerable imageProviders, IEnumerable metadataServices, IEnumerable metadataProviders);
///
/// Gets the available remote images.
///
/// The item.
/// The cancellation token.
/// Name of the provider.
/// The type.
/// Task{IEnumerable{RemoteImageInfo}}.
Task> GetAvailableRemoteImages(BaseItem item, CancellationToken cancellationToken, string providerName = null, ImageType? type = null);
///
/// Gets the image providers.
///
/// The item.
/// IEnumerable{ImageProviderInfo}.
IEnumerable GetImageProviderInfo(BaseItem item);
}
}