2014-09-30 06:47:30 +02:00
|
|
|
|
using System;
|
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2014-06-07 21:46:24 +02:00
|
|
|
|
using MediaBrowser.Model.Channels;
|
2014-03-18 02:45:41 +01:00
|
|
|
|
using MediaBrowser.Model.Dto;
|
|
|
|
|
using MediaBrowser.Model.Querying;
|
2014-03-09 23:14:44 +01:00
|
|
|
|
using System.Collections.Generic;
|
2014-03-18 02:45:41 +01:00
|
|
|
|
using System.Threading;
|
2014-03-09 23:14:44 +01:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Channels
|
|
|
|
|
{
|
|
|
|
|
public interface IChannelManager
|
|
|
|
|
{
|
2014-03-18 02:45:41 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Adds the parts.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="channels">The channels.</param>
|
2015-09-16 05:55:26 +02:00
|
|
|
|
void AddParts(IEnumerable<IChannel> channels);
|
2014-03-18 02:45:41 +01:00
|
|
|
|
|
2014-05-27 19:09:48 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channel features.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
/// <returns>ChannelFeatures.</returns>
|
|
|
|
|
ChannelFeatures GetChannelFeatures(string id);
|
|
|
|
|
|
2016-09-07 22:11:34 +02:00
|
|
|
|
bool SupportsSync(string channelId);
|
|
|
|
|
|
2014-06-02 21:32:41 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets all channel features.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>IEnumerable{ChannelFeatures}.</returns>
|
|
|
|
|
IEnumerable<ChannelFeatures> GetAllChannelFeatures();
|
|
|
|
|
|
2014-05-19 21:51:56 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channel.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
/// <returns>Channel.</returns>
|
|
|
|
|
Channel GetChannel(string id);
|
|
|
|
|
|
2014-07-30 05:31:35 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channels internal.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<QueryResult<Channel>>.</returns>
|
|
|
|
|
Task<QueryResult<Channel>> GetChannelsInternal(ChannelQuery query, CancellationToken cancellationToken);
|
|
|
|
|
|
2014-03-18 02:45:41 +01: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-09-22 23:56:54 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets all media internal.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<QueryResult<BaseItem>>.</returns>
|
|
|
|
|
Task<QueryResult<BaseItem>> GetAllMediaInternal(AllChannelMediaQuery query, CancellationToken cancellationToken);
|
|
|
|
|
|
2014-06-02 21:32:41 +02: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-16 01:30:04 +02: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-09-30 06:47:30 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the latest channel items internal.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<QueryResult<BaseItem>>.</returns>
|
|
|
|
|
Task<QueryResult<BaseItem>> GetLatestChannelItemsInternal(AllChannelMediaQuery query, CancellationToken cancellationToken);
|
2014-06-16 01:30:04 +02:00
|
|
|
|
|
2014-03-18 02:45:41 +01: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 21:58:42 +02:00
|
|
|
|
|
2014-07-30 05:31:35 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channel items internal.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
2014-09-30 06:47:30 +02:00
|
|
|
|
/// <param name="progress">The progress.</param>
|
2014-07-30 05:31:35 +02:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<QueryResult<BaseItem>>.</returns>
|
2014-09-30 06:47:30 +02:00
|
|
|
|
Task<QueryResult<BaseItem>> GetChannelItemsInternal(ChannelItemQuery query, IProgress<double> progress, CancellationToken cancellationToken);
|
2014-07-30 05:31:35 +02:00
|
|
|
|
|
2014-05-18 21:58:42 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channel item media sources.
|
|
|
|
|
/// </summary>
|
2015-03-28 21:22:27 +01:00
|
|
|
|
/// <param name="item">The item.</param>
|
2014-05-18 21:58:42 +02:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
2014-06-03 04:01:30 +02:00
|
|
|
|
/// <returns>Task{IEnumerable{MediaSourceInfo}}.</returns>
|
2017-05-26 08:48:54 +02:00
|
|
|
|
IEnumerable<MediaSourceInfo> GetStaticMediaSources(BaseItem item, CancellationToken cancellationToken);
|
2014-06-07 21:46:24 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channel folder.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>BaseItemDto.</returns>
|
2015-08-14 20:30:08 +02:00
|
|
|
|
Task<Folder> GetInternalChannelFolder(CancellationToken cancellationToken);
|
2014-06-07 21:46:24 +02: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<BaseItemDto> GetChannelFolder(string userId, CancellationToken cancellationToken);
|
2014-03-09 23:14:44 +01:00
|
|
|
|
}
|
|
|
|
|
}
|