jellyfin/MediaBrowser.Controller/Channels/IChannel.cs

87 lines
3.1 KiB
C#
Raw Normal View History

using MediaBrowser.Controller.Entities;
2014-03-18 10:05:57 -07:00
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Channels;
2014-03-18 10:05:57 -07:00
using MediaBrowser.Model.Entities;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Channels
{
public interface IChannel
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
string Name { get; }
2014-05-18 15:26:06 -07:00
/// <summary>
/// Gets the data version.
/// </summary>
/// <value>The data version.</value>
string DataVersion { get; }
/// <summary>
/// Gets the home page URL.
/// </summary>
/// <value>The home page URL.</value>
string HomePageUrl { get; }
/// <summary>
2014-05-02 21:20:04 -07:00
/// Gets the channel information.
/// </summary>
/// <returns>ChannelFeatures.</returns>
ChannelFeatures GetChannelFeatures();
2014-03-17 18:45:41 -07:00
/// <summary>
/// Determines whether [is enabled for] [the specified user].
/// </summary>
/// <param name="user">The user.</param>
/// <returns><c>true</c> if [is enabled for] [the specified user]; otherwise, <c>false</c>.</returns>
bool IsEnabledFor(User user);
/// <summary>
/// Searches the specified search term.
/// </summary>
2014-03-17 18:45:41 -07:00
/// <param name="searchInfo">The search information.</param>
/// <param name="user">The user.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns>
2014-03-17 18:45:41 -07:00
Task<IEnumerable<ChannelItemInfo>> Search(ChannelSearchInfo searchInfo, User user, CancellationToken cancellationToken);
/// <summary>
/// Gets the channel items.
/// </summary>
2014-03-18 10:05:57 -07:00
/// <param name="query">The query.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{ChannelItem}}.</returns>
2014-03-18 10:05:57 -07:00
Task<ChannelItemResult> GetChannelItems(InternalChannelItemQuery query, CancellationToken cancellationToken);
/// <summary>
2014-03-18 10:05:57 -07:00
/// Gets the channel image.
/// </summary>
2014-03-18 10:05:57 -07:00
/// <param name="type">The type.</param>
/// <param name="cancellationToken">The cancellation token.</param>
2014-03-18 10:05:57 -07:00
/// <returns>Task{DynamicImageInfo}.</returns>
Task<DynamicImageResponse> GetChannelImage(ImageType type, CancellationToken cancellationToken);
/// <summary>
/// Gets the supported channel images.
/// </summary>
/// <returns>IEnumerable{ImageType}.</returns>
IEnumerable<ImageType> GetSupportedChannelImages();
}
2014-05-18 12:58:42 -07:00
public interface IRequiresMediaInfoCallback
{
/// <summary>
/// Gets the channel item media information.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{ChannelMediaInfo}}.</returns>
Task<IEnumerable<ChannelMediaInfo>> GetChannelItemMediaInfo(string id, CancellationToken cancellationToken);
}
}