using System.IO;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Querying;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.LiveTv
{
///
/// Manages all live tv services installed on the server
///
public interface ILiveTvManager
{
///
/// Gets the active service.
///
/// The active service.
ILiveTvService ActiveService { get; }
///
/// Gets the services.
///
/// The services.
IReadOnlyList Services { get; }
///
/// Gets the new timer defaults asynchronous.
///
/// The cancellation token.
/// Task{TimerInfo}.
Task GetNewTimerDefaults(CancellationToken cancellationToken);
///
/// Gets the new timer defaults.
///
/// The program identifier.
/// The cancellation token.
/// Task{SeriesTimerInfoDto}.
Task GetNewTimerDefaults(string programId, CancellationToken cancellationToken);
///
/// Deletes the recording.
///
/// The identifier.
/// Task.
Task DeleteRecording(string id);
///
/// Cancels the timer.
///
/// The identifier.
/// Task.
Task CancelTimer(string id);
///
/// Cancels the series timer.
///
/// The identifier.
/// Task.
Task CancelSeriesTimer(string id);
///
/// Adds the parts.
///
/// The services.
void AddParts(IEnumerable services);
///
/// Gets the channels.
///
/// The query.
/// The cancellation token.
/// IEnumerable{Channel}.
Task> GetChannels(ChannelQuery query, CancellationToken cancellationToken);
///
/// Gets the recording.
///
/// The identifier.
/// The user.
/// The cancellation token.
/// Task{RecordingInfoDto}.
Task GetRecording(string id, CancellationToken cancellationToken, User user = null);
///
/// Gets the channel.
///
/// The identifier.
/// The cancellation token.
/// The user.
/// Task{RecordingInfoDto}.
Task GetChannel(string id, CancellationToken cancellationToken, User user = null);
///
/// Gets the timer.
///
/// The identifier.
/// The cancellation token.
/// Task{TimerInfoDto}.
Task GetTimer(string id, CancellationToken cancellationToken);
///
/// Gets the series timer.
///
/// The identifier.
/// The cancellation token.
/// Task{TimerInfoDto}.
Task GetSeriesTimer(string id, CancellationToken cancellationToken);
///
/// Gets the recordings.
///
/// The query.
/// The cancellation token.
/// QueryResult{RecordingInfoDto}.
Task> GetRecordings(RecordingQuery query, CancellationToken cancellationToken);
///
/// Gets the timers.
///
/// The query.
/// The cancellation token.
/// Task{QueryResult{TimerInfoDto}}.
Task> GetTimers(TimerQuery query, CancellationToken cancellationToken);
///
/// Gets the series timers.
///
/// The query.
/// The cancellation token.
/// Task{QueryResult{SeriesTimerInfoDto}}.
Task> GetSeriesTimers(SeriesTimerQuery query, CancellationToken cancellationToken);
///
/// Gets the channel.
///
/// The identifier.
/// Channel.
LiveTvChannel GetInternalChannel(string id);
///
/// Gets the internal program.
///
/// The identifier.
/// LiveTvProgram.
LiveTvProgram GetInternalProgram(string id);
///
/// Gets the recording.
///
/// The identifier.
/// The cancellation token.
/// LiveTvRecording.
Task GetInternalRecording(string id, CancellationToken cancellationToken);
///
/// Gets the recording stream.
///
/// The identifier.
/// The cancellation token.
/// Task{Stream}.
Task GetRecordingStream(string id, CancellationToken cancellationToken);
///
/// Gets the channel stream.
///
/// The identifier.
/// The cancellation token.
/// Task{StreamResponseInfo}.
Task GetChannelStream(string id, CancellationToken cancellationToken);
///
/// Gets the program.
///
/// The identifier.
/// The cancellation token.
/// The user.
/// Task{ProgramInfoDto}.
Task GetProgram(string id, CancellationToken cancellationToken, User user = null);
///
/// Gets the programs.
///
/// The query.
/// The cancellation token.
/// IEnumerable{ProgramInfo}.
Task> GetPrograms(ProgramQuery query, CancellationToken cancellationToken);
///
/// Updates the timer.
///
/// The timer.
/// The cancellation token.
/// Task.
Task UpdateTimer(TimerInfoDto timer, CancellationToken cancellationToken);
///
/// Updates the timer.
///
/// The timer.
/// The cancellation token.
/// Task.
Task UpdateSeriesTimer(SeriesTimerInfoDto timer, CancellationToken cancellationToken);
///
/// Creates the timer.
///
/// The timer.
/// The cancellation token.
/// Task.
Task CreateTimer(TimerInfoDto timer, CancellationToken cancellationToken);
///
/// Creates the series timer.
///
/// The timer.
/// The cancellation token.
/// Task.
Task CreateSeriesTimer(SeriesTimerInfoDto timer, CancellationToken cancellationToken);
///
/// Gets the recording groups.
///
/// The query.
/// The cancellation token.
/// Task{QueryResult{RecordingGroupDto}}.
Task> GetRecordingGroups(RecordingGroupQuery query, CancellationToken cancellationToken);
///
/// Closes the live stream.
///
/// The identifier.
/// The cancellation token.
/// Task.
Task CloseLiveStream(string id, CancellationToken cancellationToken);
///
/// Gets the guide information.
///
/// GuideInfo.
GuideInfo GetGuideInfo();
}
}