#nullable disable
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Data.Entities;
using Jellyfin.Data.Events;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Querying;
namespace MediaBrowser.Controller.LiveTv
{
///
/// Manages all live tv services installed on the server.
///
public interface ILiveTvManager
{
event EventHandler> SeriesTimerCancelled;
event EventHandler> TimerCancelled;
event EventHandler> TimerCreated;
event EventHandler> SeriesTimerCreated;
///
/// 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);
///
/// Cancels the timer.
///
/// The identifier.
/// Task.
Task CancelTimer(string id);
///
/// Cancels the series timer.
///
/// The identifier.
/// Task.
Task CancelSeriesTimer(string id);
///
/// 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 options.
/// A recording.
Task> GetRecordingsAsync(RecordingQuery query, DtoOptions options);
///
/// 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 stream.
///
/// The identifier.
/// The media source identifier.
/// The current live streams.
/// The cancellation token.
/// Task{StreamResponseInfo}.
Task> GetChannelStream(string id, string mediaSourceId, List currentLiveStreams, 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 options.
/// The cancellation token.
/// IEnumerable{ProgramInfo}.
Task> GetPrograms(InternalItemsQuery query, DtoOptions options, 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 recommended programs.
///
/// The query.
/// The options.
/// The cancellation token.
/// Recommended programs.
Task> GetRecommendedProgramsAsync(InternalItemsQuery query, DtoOptions options, CancellationToken cancellationToken);
///
/// Gets the recommended programs internal.
///
/// The query.
/// The options.
/// The cancellation token.
/// Recommended programs.
QueryResult GetRecommendedProgramsInternal(InternalItemsQuery query, DtoOptions options, CancellationToken cancellationToken);
///
/// Gets the live tv information.
///
/// The cancellation token.
/// Task{LiveTvInfo}.
LiveTvInfo GetLiveTvInfo(CancellationToken cancellationToken);
///
/// Resets the tuner.
///
/// The identifier.
/// The cancellation token.
/// Task.
Task ResetTuner(string id, CancellationToken cancellationToken);
///
/// Gets the live tv folder.
///
/// The cancellation token.
/// Live TV folder.
Folder GetInternalLiveTvFolder(CancellationToken cancellationToken);
///
/// Gets the enabled users.
///
/// IEnumerable{User}.
IEnumerable GetEnabledUsers();
///
/// Gets the internal channels.
///
/// The query.
/// The options.
/// The cancellation token.
/// Internal channels.
QueryResult GetInternalChannels(LiveTvChannelQuery query, DtoOptions dtoOptions, CancellationToken cancellationToken);
///
/// Gets the channel media sources.
///
/// Item to search for.
/// CancellationToken to use for operation.
/// Channel media sources wrapped in a task.
Task> GetChannelMediaSources(BaseItem item, CancellationToken cancellationToken);
///
/// Adds the information to program dto.
///
/// The programs.
/// The fields.
/// The user.
/// Task.
Task AddInfoToProgramDto(IReadOnlyCollection<(BaseItem Item, BaseItemDto ItemDto)> programs, IReadOnlyList fields, User user = null);
///
/// Adds the channel information.
///
/// The items.
/// The options.
/// The user.
void AddChannelInfo(IReadOnlyCollection<(BaseItemDto ItemDto, LiveTvChannel Channel)> items, DtoOptions options, User user);
void AddInfoToRecordingDto(BaseItem item, BaseItemDto dto, ActiveRecordingInfo activeRecordingInfo, User user = null);
Task GetRecordingFoldersAsync(User user);
}
}