2019-01-13 20:01:16 +00:00
|
|
|
using System.Collections.Generic;
|
2018-12-27 23:27:57 +00:00
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
2019-01-13 19:25:32 +00:00
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
using MediaBrowser.Model.Providers;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Providers
|
|
|
|
{
|
2022-04-15 17:27:38 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Interface IRemoteMetadataProvider.
|
|
|
|
/// </summary>
|
2018-12-27 23:27:57 +00:00
|
|
|
public interface IRemoteMetadataProvider : IMetadataProvider
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-04-15 17:27:38 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Interface IRemoteMetadataProvider.
|
|
|
|
/// </summary>
|
2022-12-05 13:56:58 +00:00
|
|
|
/// <typeparam name="TItemType">The type of <see cref="BaseItem" />.</typeparam>
|
|
|
|
/// <typeparam name="TLookupInfoType">The type of <see cref="ItemLookupInfo" />.</typeparam>
|
2018-12-27 23:27:57 +00:00
|
|
|
public interface IRemoteMetadataProvider<TItemType, in TLookupInfoType> : IMetadataProvider<TItemType>, IRemoteMetadataProvider, IRemoteSearchProvider<TLookupInfoType>
|
|
|
|
where TItemType : BaseItem, IHasLookupInfo<TLookupInfoType>
|
|
|
|
where TLookupInfoType : ItemLookupInfo, new()
|
|
|
|
{
|
2022-04-15 17:27:38 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the metadata for a specific LookupInfoType.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="info">The LookupInfoType to get metadata for.</param>
|
|
|
|
/// <param name="cancellationToken">The <see cref="CancellationToken"/>.</param>
|
2022-04-27 11:08:54 +00:00
|
|
|
/// <returns>A task returning a MetadataResult for the specific LookupInfoType.</returns>
|
2018-12-27 23:27:57 +00:00
|
|
|
Task<MetadataResult<TItemType>> GetMetadata(TLookupInfoType info, CancellationToken cancellationToken);
|
|
|
|
}
|
|
|
|
|
2022-04-15 17:27:38 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Interface IRemoteMetadataProvider.
|
|
|
|
/// </summary>
|
2022-12-05 13:56:58 +00:00
|
|
|
/// <typeparam name="TLookupInfoType">The type of <see cref="ItemLookupInfo" />.</typeparam>
|
2018-12-27 23:27:57 +00:00
|
|
|
public interface IRemoteSearchProvider<in TLookupInfoType> : IRemoteSearchProvider
|
|
|
|
where TLookupInfoType : ItemLookupInfo
|
|
|
|
{
|
2022-04-15 17:27:38 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the list of <see cref="RemoteSearchResult"/> for a specific LookupInfoType.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="searchInfo">The LookupInfoType to search for.</param>
|
|
|
|
/// <param name="cancellationToken">The <see cref="CancellationToken"/>.</param>
|
2022-04-27 11:08:54 +00:00
|
|
|
/// <returns>A task returning RemoteSearchResults for the searchInfo.</returns>
|
2018-12-27 23:27:57 +00:00
|
|
|
Task<IEnumerable<RemoteSearchResult>> GetSearchResults(TLookupInfoType searchInfo, CancellationToken cancellationToken);
|
|
|
|
}
|
|
|
|
}
|