2014-03-12 02:11:01 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2014-03-18 17:05:57 +00:00
|
|
|
|
using MediaBrowser.Controller.Providers;
|
2014-05-19 19:51:56 +00:00
|
|
|
|
using MediaBrowser.Model.Channels;
|
2014-03-18 17:05:57 +00:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
2014-03-12 02:11:01 +00:00
|
|
|
|
using System.Collections.Generic;
|
2014-03-09 22:14:44 +00:00
|
|
|
|
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 22:26:06 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the data version.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The data version.</value>
|
|
|
|
|
string DataVersion { get; }
|
|
|
|
|
|
2014-05-23 23:58:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the home page URL.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The home page URL.</value>
|
|
|
|
|
string HomePageUrl { get; }
|
|
|
|
|
|
2014-03-09 22:14:44 +00:00
|
|
|
|
/// <summary>
|
2014-05-03 04:20:04 +00:00
|
|
|
|
/// Gets the channel information.
|
2014-03-09 22:14:44 +00:00
|
|
|
|
/// </summary>
|
2014-05-23 23:58:28 +00:00
|
|
|
|
/// <returns>ChannelFeatures.</returns>
|
|
|
|
|
ChannelFeatures GetChannelFeatures();
|
2014-03-09 22:14:44 +00:00
|
|
|
|
|
2014-03-18 01:45:41 +00: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);
|
|
|
|
|
|
2014-03-09 22:14:44 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Searches the specified search term.
|
|
|
|
|
/// </summary>
|
2014-03-18 01:45:41 +00:00
|
|
|
|
/// <param name="searchInfo">The search information.</param>
|
2014-03-12 02:11:01 +00:00
|
|
|
|
/// <param name="user">The user.</param>
|
2014-03-09 22:14:44 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns>
|
2014-03-18 01:45:41 +00:00
|
|
|
|
Task<IEnumerable<ChannelItemInfo>> Search(ChannelSearchInfo searchInfo, User user, CancellationToken cancellationToken);
|
2014-03-12 02:11:01 +00:00
|
|
|
|
|
2014-03-09 22:14:44 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channel items.
|
|
|
|
|
/// </summary>
|
2014-03-18 17:05:57 +00:00
|
|
|
|
/// <param name="query">The query.</param>
|
2014-03-09 22:14:44 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{IEnumerable{ChannelItem}}.</returns>
|
2014-03-18 17:05:57 +00:00
|
|
|
|
Task<ChannelItemResult> GetChannelItems(InternalChannelItemQuery query, CancellationToken cancellationToken);
|
2014-03-09 22:14:44 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2014-03-18 17:05:57 +00:00
|
|
|
|
/// Gets the channel image.
|
2014-03-09 22:14:44 +00:00
|
|
|
|
/// </summary>
|
2014-03-18 17:05:57 +00:00
|
|
|
|
/// <param name="type">The type.</param>
|
2014-03-09 22:14:44 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
2014-03-18 17:05:57 +00: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-03-09 22:14:44 +00:00
|
|
|
|
}
|
2014-05-18 19:58:42 +00: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);
|
|
|
|
|
}
|
2014-03-09 22:14:44 +00:00
|
|
|
|
}
|