2014-03-12 02:11:01 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
|
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; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the home page URL.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The home page URL.</value>
|
|
|
|
|
string HomePageUrl { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the capabilities.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>ChannelCapabilities.</returns>
|
|
|
|
|
ChannelCapabilities GetCapabilities();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Searches the specified search term.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="searchTerm">The search term.</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-12 02:11:01 +00:00
|
|
|
|
Task<IEnumerable<ChannelItemInfo>> Search(string searchTerm, User user, CancellationToken cancellationToken);
|
|
|
|
|
|
2014-03-09 22:14:44 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channel items.
|
|
|
|
|
/// </summary>
|
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{ChannelItem}}.</returns>
|
2014-03-12 02:11:01 +00:00
|
|
|
|
Task<IEnumerable<ChannelItemInfo>> GetChannelItems(User user, CancellationToken cancellationToken);
|
2014-03-09 22:14:44 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channel items.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="categoryId">The category identifier.</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{ChannelItem}}.</returns>
|
2014-03-12 02:11:01 +00:00
|
|
|
|
Task<IEnumerable<ChannelItemInfo>> GetChannelItems(string categoryId, User user, CancellationToken cancellationToken);
|
2014-03-09 22:14:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ChannelCapabilities
|
|
|
|
|
{
|
|
|
|
|
public bool CanSearch { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|