using MediaBrowser.Controller.Entities;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Channels
{
public interface IChannel
{
///
/// Gets the name.
///
/// The name.
string Name { get; }
///
/// Gets the home page URL.
///
/// The home page URL.
string HomePageUrl { get; }
///
/// Gets the capabilities.
///
/// ChannelCapabilities.
ChannelCapabilities GetCapabilities();
///
/// Searches the specified search term.
///
/// The search term.
/// The user.
/// The cancellation token.
/// Task{IEnumerable{ChannelItemInfo}}.
Task> Search(string searchTerm, User user, CancellationToken cancellationToken);
///
/// Gets the channel items.
///
/// The user.
/// The cancellation token.
/// Task{IEnumerable{ChannelItem}}.
Task> GetChannelItems(User user, CancellationToken cancellationToken);
///
/// Gets the channel items.
///
/// The category identifier.
/// The user.
/// The cancellation token.
/// Task{IEnumerable{ChannelItem}}.
Task> GetChannelItems(string categoryId, User user, CancellationToken cancellationToken);
}
public class ChannelCapabilities
{
public bool CanSearch { get; set; }
}
}