You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
191 lines
7.4 KiB
191 lines
7.4 KiB
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
|
|
{
|
|
/// <summary>
|
|
/// Manages all live tv services installed on the server
|
|
/// </summary>
|
|
public interface ILiveTvManager
|
|
{
|
|
/// <summary>
|
|
/// Gets the active service.
|
|
/// </summary>
|
|
/// <value>The active service.</value>
|
|
ILiveTvService ActiveService { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the services.
|
|
/// </summary>
|
|
/// <value>The services.</value>
|
|
IReadOnlyList<ILiveTvService> Services { get; }
|
|
|
|
/// <summary>
|
|
/// Schedules the recording.
|
|
/// </summary>
|
|
/// <param name="programId">The program identifier.</param>
|
|
/// <returns>Task.</returns>
|
|
Task ScheduleRecording(string programId);
|
|
|
|
/// <summary>
|
|
/// Gets the new timer defaults asynchronous.
|
|
/// </summary>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task{TimerInfo}.</returns>
|
|
Task<TimerInfoDto> GetNewTimerDefaults(CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Deletes the recording.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <returns>Task.</returns>
|
|
Task DeleteRecording(string id);
|
|
|
|
/// <summary>
|
|
/// Cancels the timer.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <returns>Task.</returns>
|
|
Task CancelTimer(string id);
|
|
|
|
/// <summary>
|
|
/// Cancels the series timer.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <returns>Task.</returns>
|
|
Task CancelSeriesTimer(string id);
|
|
|
|
/// <summary>
|
|
/// Adds the parts.
|
|
/// </summary>
|
|
/// <param name="services">The services.</param>
|
|
void AddParts(IEnumerable<ILiveTvService> services);
|
|
|
|
/// <summary>
|
|
/// Gets the channels.
|
|
/// </summary>
|
|
/// <param name="query">The query.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>IEnumerable{Channel}.</returns>
|
|
Task<QueryResult<ChannelInfoDto>> GetChannels(ChannelQuery query, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Gets the recording.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <param name="user">The user.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task{RecordingInfoDto}.</returns>
|
|
Task<RecordingInfoDto> GetRecording(string id, CancellationToken cancellationToken, User user = null);
|
|
|
|
/// <summary>
|
|
/// Gets the channel.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <param name="user">The user.</param>
|
|
/// <returns>Task{RecordingInfoDto}.</returns>
|
|
Task<ChannelInfoDto> GetChannel(string id, CancellationToken cancellationToken, User user = null);
|
|
|
|
/// <summary>
|
|
/// Gets the timer.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task{TimerInfoDto}.</returns>
|
|
Task<TimerInfoDto> GetTimer(string id, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Gets the series timer.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task{TimerInfoDto}.</returns>
|
|
Task<SeriesTimerInfoDto> GetSeriesTimer(string id, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Gets the recordings.
|
|
/// </summary>
|
|
/// <param name="query">The query.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>QueryResult{RecordingInfoDto}.</returns>
|
|
Task<QueryResult<RecordingInfoDto>> GetRecordings(RecordingQuery query, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Gets the timers.
|
|
/// </summary>
|
|
/// <param name="query">The query.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task{QueryResult{TimerInfoDto}}.</returns>
|
|
Task<QueryResult<TimerInfoDto>> GetTimers(TimerQuery query, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Gets the series timers.
|
|
/// </summary>
|
|
/// <param name="query">The query.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task{QueryResult{SeriesTimerInfoDto}}.</returns>
|
|
Task<QueryResult<SeriesTimerInfoDto>> GetSeriesTimers(SeriesTimerQuery query, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Gets the channel.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <returns>Channel.</returns>
|
|
Channel GetChannel(string id);
|
|
|
|
/// <summary>
|
|
/// Gets the program.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <param name="user">The user.</param>
|
|
/// <returns>Task{ProgramInfoDto}.</returns>
|
|
Task<ProgramInfoDto> GetProgram(string id, CancellationToken cancellationToken, User user = null);
|
|
|
|
/// <summary>
|
|
/// Gets the programs.
|
|
/// </summary>
|
|
/// <param name="query">The query.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>IEnumerable{ProgramInfo}.</returns>
|
|
Task<QueryResult<ProgramInfoDto>> GetPrograms(ProgramQuery query, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Updates the timer.
|
|
/// </summary>
|
|
/// <param name="timer">The timer.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task.</returns>
|
|
Task UpdateTimer(TimerInfoDto timer, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Updates the timer.
|
|
/// </summary>
|
|
/// <param name="timer">The timer.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task.</returns>
|
|
Task UpdateSeriesTimer(SeriesTimerInfoDto timer, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Creates the timer.
|
|
/// </summary>
|
|
/// <param name="timer">The timer.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task.</returns>
|
|
Task CreateTimer(TimerInfoDto timer, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Creates the series timer.
|
|
/// </summary>
|
|
/// <param name="timer">The timer.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task.</returns>
|
|
Task CreateSeriesTimer(SeriesTimerInfoDto timer, CancellationToken cancellationToken);
|
|
}
|
|
}
|