using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Configuration;
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);
///
/// Saves the image.
///
/// The item.
/// The URL.
/// The resource pool.
/// The type.
/// Index of the image.
/// The cancellation token.
/// Task.
Task SaveImage(IHasImages 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 cancellation token.
/// Task.
Task SaveImage(IHasImages item, Stream source, string mimeType, ImageType type, int? imageIndex, CancellationToken cancellationToken);
///
/// Adds the metadata providers.
///
/// The image providers.
/// The metadata services.
/// The metadata providers.
/// The savers.
/// The image savers.
/// The external ids.
void AddParts(IEnumerable imageProviders, IEnumerable metadataServices, IEnumerable metadataProviders,
IEnumerable savers,
IEnumerable imageSavers,
IEnumerable externalIds);
///
/// Gets the available remote images.
///
/// The item.
/// The query.
/// The cancellation token.
/// Task{IEnumerable{RemoteImageInfo}}.
Task> GetAvailableRemoteImages(IHasImages item, RemoteImageQuery query, CancellationToken cancellationToken);
///
/// Gets the image providers.
///
/// The item.
/// IEnumerable{ImageProviderInfo}.
IEnumerable GetRemoteImageProviderInfo(IHasImages item);
///
/// Gets all metadata plugins.
///
/// IEnumerable{MetadataPlugin}.
IEnumerable GetAllMetadataPlugins();
///
/// Gets the external urls.
///
/// The item.
/// IEnumerable{ExternalUrl}.
IEnumerable GetExternalUrls(IHasProviderIds item);
///
/// Gets the external identifier infos.
///
/// The item.
/// IEnumerable{ExternalIdInfo}.
IEnumerable GetExternalIdInfos(IHasProviderIds item);
///
/// Saves the metadata.
///
/// The item.
/// Type of the update.
/// Task.
Task SaveMetadata(IHasMetadata item, ItemUpdateType updateType);
///
/// Gets the metadata options.
///
/// The item.
/// MetadataOptions.
MetadataOptions GetMetadataOptions(IHasImages item);
///
/// Gets the remote search results.
///
/// The type of the t item type.
/// The type of the t lookup type.
/// The search information.
/// The cancellation token.
/// Task{IEnumerable{SearchResult{``1}}}.
Task> GetRemoteSearchResults(
RemoteSearchQuery searchInfo,
CancellationToken cancellationToken)
where TItemType : BaseItem, new()
where TLookupType : ItemLookupInfo;
}
}