jellyfin/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs

116 lines
4.0 KiB
C#
Raw Normal View History

using MediaBrowser.Model.LiveTv;
2013-11-25 13:39:23 -07:00
using MediaBrowser.Model.Querying;
using System.Collections.Generic;
using System.Threading;
2013-11-26 14:36:11 -07:00
using System.Threading.Tasks;
namespace MediaBrowser.Controller.LiveTv
{
/// <summary>
/// Manages all live tv services installed on the server
/// </summary>
public interface ILiveTvManager
{
2013-12-04 13:55:42 -07:00
/// <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; }
2013-11-26 14:36:11 -07:00
/// <summary>
/// Schedules the recording.
/// </summary>
/// <param name="programId">The program identifier.</param>
/// <returns>Task.</returns>
Task ScheduleRecording(string programId);
/// <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);
2013-12-04 13:55:42 -07:00
/// <summary>
/// Adds the parts.
/// </summary>
/// <param name="services">The services.</param>
void AddParts(IEnumerable<ILiveTvService> services);
/// <summary>
2013-11-24 13:51:45 -07:00
/// Gets the channels.
/// </summary>
2013-11-24 13:51:45 -07:00
/// <param name="query">The query.</param>
/// <returns>IEnumerable{Channel}.</returns>
2013-11-25 13:39:23 -07:00
QueryResult<ChannelInfoDto> GetChannels(ChannelQuery query);
2013-11-24 13:51:45 -07:00
/// <summary>
/// Gets the recording.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{RecordingInfoDto}.</returns>
Task<RecordingInfoDto> GetRecording(string id, CancellationToken cancellationToken);
/// <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);
2013-11-24 13:51:45 -07:00
/// <summary>
2013-11-25 19:53:48 -07:00
/// Gets the recordings.
2013-11-24 13:51:45 -07:00
/// </summary>
2013-11-26 14:36:11 -07:00
/// <param name="query">The query.</param>
/// <param name="cancellationToken">The cancellation token.</param>
2013-11-25 19:53:48 -07:00
/// <returns>QueryResult{RecordingInfoDto}.</returns>
2013-11-26 14:36:11 -07:00
Task<QueryResult<RecordingInfoDto>> GetRecordings(RecordingQuery query, CancellationToken cancellationToken);
2013-11-24 13:51:45 -07:00
2013-11-27 12:04:19 -07:00
/// <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);
2013-12-04 13:55:42 -07:00
2013-11-24 13:51:45 -07:00
/// <summary>
/// Gets the channel.
/// </summary>
2013-11-24 14:30:38 -07:00
/// <param name="id">The identifier.</param>
2013-11-24 13:51:45 -07:00
/// <returns>Channel.</returns>
2013-11-24 14:30:38 -07:00
Channel GetChannel(string id);
2013-11-25 09:15:31 -07:00
2013-11-25 19:53:48 -07:00
/// <summary>
/// Gets the channel.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="userId">The user identifier.</param>
/// <returns>Channel.</returns>
ChannelInfoDto GetChannelInfoDto(string id, string userId);
2013-11-25 09:15:31 -07:00
/// <summary>
/// Gets the programs.
/// </summary>
/// <param name="query">The query.</param>
2013-11-26 14:36:11 -07:00
/// <param name="cancellationToken">The cancellation token.</param>
2013-11-25 09:15:31 -07:00
/// <returns>IEnumerable{ProgramInfo}.</returns>
2013-11-26 14:36:11 -07:00
Task<QueryResult<ProgramInfoDto>> GetPrograms(ProgramQuery query, CancellationToken cancellationToken);
}
}