2014-06-07 15:46:24 -04:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
|
|
using MediaBrowser.Model.Channels;
|
2014-03-17 21:45:41 -04:00
|
|
|
|
using MediaBrowser.Model.Dto;
|
|
|
|
|
|
using MediaBrowser.Model.Querying;
|
2014-03-09 18:14:44 -04:00
|
|
|
|
using System.Collections.Generic;
|
2014-03-17 21:45:41 -04:00
|
|
|
|
using System.Threading;
|
2014-03-09 18:14:44 -04:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Channels
|
|
|
|
|
|
{
|
|
|
|
|
|
public interface IChannelManager
|
|
|
|
|
|
{
|
2014-03-17 21:45:41 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Adds the parts.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="channels">The channels.</param>
|
2014-05-03 19:38:23 -04:00
|
|
|
|
/// <param name="factories">The factories.</param>
|
|
|
|
|
|
void AddParts(IEnumerable<IChannel> channels, IEnumerable<IChannelFactory> factories);
|
2014-03-17 21:45:41 -04:00
|
|
|
|
|
2014-06-02 15:32:41 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the channel download path.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <value>The channel download path.</value>
|
|
|
|
|
|
string ChannelDownloadPath { get; }
|
|
|
|
|
|
|
2014-05-27 13:09:48 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the channel features.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
|
/// <returns>ChannelFeatures.</returns>
|
|
|
|
|
|
ChannelFeatures GetChannelFeatures(string id);
|
|
|
|
|
|
|
2014-06-02 15:32:41 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets all channel features.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns>IEnumerable{ChannelFeatures}.</returns>
|
|
|
|
|
|
IEnumerable<ChannelFeatures> GetAllChannelFeatures();
|
|
|
|
|
|
|
2014-05-19 15:51:56 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the channel.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
|
/// <returns>Channel.</returns>
|
|
|
|
|
|
Channel GetChannel(string id);
|
|
|
|
|
|
|
2014-03-17 21:45:41 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the channels.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
|
/// <returns>Task{QueryResult{BaseItemDto}}.</returns>
|
|
|
|
|
|
Task<QueryResult<BaseItemDto>> GetChannels(ChannelQuery query, CancellationToken cancellationToken);
|
|
|
|
|
|
|
2014-06-02 15:32:41 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets all media.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
|
/// <returns>Task{QueryResult{BaseItemDto}}.</returns>
|
|
|
|
|
|
Task<QueryResult<BaseItemDto>> GetAllMedia(AllChannelMediaQuery query, CancellationToken cancellationToken);
|
|
|
|
|
|
|
2014-06-15 19:30:04 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the latest media.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
|
/// <returns>Task{QueryResult{BaseItemDto}}.</returns>
|
|
|
|
|
|
Task<QueryResult<BaseItemDto>> GetLatestChannelItems(AllChannelMediaQuery query, CancellationToken cancellationToken);
|
|
|
|
|
|
|
2014-03-17 21:45:41 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the channel items.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
|
/// <returns>Task{QueryResult{BaseItemDto}}.</returns>
|
|
|
|
|
|
Task<QueryResult<BaseItemDto>> GetChannelItems(ChannelItemQuery query, CancellationToken cancellationToken);
|
2014-05-18 15:58:42 -04:00
|
|
|
|
|
2014-06-02 22:01:30 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the cached channel item media sources.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
|
/// <returns>IEnumerable{MediaSourceInfo}.</returns>
|
|
|
|
|
|
IEnumerable<MediaSourceInfo> GetCachedChannelItemMediaSources(string id);
|
|
|
|
|
|
|
2014-05-18 15:58:42 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the channel item media sources.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
2014-06-02 22:01:30 -04:00
|
|
|
|
/// <returns>Task{IEnumerable{MediaSourceInfo}}.</returns>
|
2014-06-02 15:32:41 -04:00
|
|
|
|
Task<IEnumerable<MediaSourceInfo>> GetChannelItemMediaSources(string id, CancellationToken cancellationToken);
|
2014-06-07 15:46:24 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the channel folder.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="userId">The user identifier.</param>
|
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
|
/// <returns>BaseItemDto.</returns>
|
|
|
|
|
|
Task<Folder> GetInternalChannelFolder(string userId, CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the channel folder.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="userId">The user identifier.</param>
|
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
|
/// <returns>BaseItemDto.</returns>
|
|
|
|
|
|
Task<BaseItemDto> GetChannelFolder(string userId, CancellationToken cancellationToken);
|
2014-03-09 18:14:44 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|