2013-11-24 20:51:45 +00:00
|
|
|
|
using MediaBrowser.Common.Net;
|
2013-11-11 19:36:48 +00:00
|
|
|
|
using System.Collections.Generic;
|
2013-09-26 15:48:14 +00:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.LiveTv
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represents a single live tv back end (next pvr, media portal, etc).
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface ILiveTvService
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the name.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The name.</value>
|
|
|
|
|
string Name { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channels async.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{IEnumerable{ChannelInfo}}.</returns>
|
|
|
|
|
Task<IEnumerable<ChannelInfo>> GetChannelsAsync(CancellationToken cancellationToken);
|
2013-10-31 20:45:58 +00:00
|
|
|
|
|
2013-11-20 17:10:02 +00:00
|
|
|
|
/// <summary>
|
2013-11-26 21:36:11 +00:00
|
|
|
|
/// Cancels the timer asynchronous.
|
2013-11-20 17:10:02 +00:00
|
|
|
|
/// </summary>
|
2013-11-26 21:36:11 +00:00
|
|
|
|
/// <param name="timerId">The timer identifier.</param>
|
2013-11-20 17:10:02 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-11-26 21:36:11 +00:00
|
|
|
|
Task CancelTimerAsync(string timerId, CancellationToken cancellationToken);
|
2013-11-20 17:10:02 +00:00
|
|
|
|
|
2013-11-25 20:39:23 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes the recording asynchronous.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="recordingId">The recording identifier.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task DeleteRecordingAsync(string recordingId, CancellationToken cancellationToken);
|
2013-11-26 21:36:11 +00:00
|
|
|
|
|
2013-11-20 17:10:02 +00:00
|
|
|
|
/// <summary>
|
2013-11-26 21:36:11 +00:00
|
|
|
|
/// Creates the timer asynchronous.
|
2013-11-20 17:10:02 +00:00
|
|
|
|
/// </summary>
|
2013-11-26 21:36:11 +00:00
|
|
|
|
/// <param name="info">The information.</param>
|
2013-11-20 17:10:02 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-11-26 21:36:11 +00:00
|
|
|
|
Task CreateTimerAsync(TimerInfo info, CancellationToken cancellationToken);
|
2013-11-25 20:39:23 +00:00
|
|
|
|
|
2013-12-01 06:25:19 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates the series timer asynchronous.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="info">The information.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task CreateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Updates the series timer asynchronous.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="info">The information.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task UpdateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken);
|
|
|
|
|
|
2013-11-20 03:15:48 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channel image asynchronous.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="channelId">The channel identifier.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{Stream}.</returns>
|
2013-12-02 21:46:22 +00:00
|
|
|
|
Task<ImageResponseInfo> GetChannelImageAsync(string channelId, CancellationToken cancellationToken);
|
2013-11-20 03:15:48 +00:00
|
|
|
|
|
2013-12-02 21:46:22 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the program image asynchronous.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="programId">The program identifier.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{ImageResponseInfo}.</returns>
|
|
|
|
|
Task<ImageResponseInfo> GetProgramImageAsync(string programId, CancellationToken cancellationToken);
|
|
|
|
|
|
2013-11-11 19:36:48 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the recordings asynchronous.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{IEnumerable{RecordingInfo}}.</returns>
|
2013-11-25 20:39:23 +00:00
|
|
|
|
Task<IEnumerable<RecordingInfo>> GetRecordingsAsync(CancellationToken cancellationToken);
|
2013-11-02 21:38:21 +00:00
|
|
|
|
|
2013-11-26 21:36:11 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the recordings asynchronous.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{IEnumerable{RecordingInfo}}.</returns>
|
|
|
|
|
Task<IEnumerable<TimerInfo>> GetTimersAsync(CancellationToken cancellationToken);
|
2013-11-30 06:49:38 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2013-12-01 06:25:19 +00:00
|
|
|
|
/// Gets the series timers asynchronous.
|
2013-11-30 06:49:38 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
2013-12-01 06:25:19 +00:00
|
|
|
|
/// <returns>Task{IEnumerable{SeriesTimerInfo}}.</returns>
|
|
|
|
|
Task<IEnumerable<SeriesTimerInfo>> GetSeriesTimersAsync(CancellationToken cancellationToken);
|
2013-11-26 21:36:11 +00:00
|
|
|
|
|
2013-11-11 19:36:48 +00:00
|
|
|
|
/// <summary>
|
2013-11-25 20:39:23 +00:00
|
|
|
|
/// Gets the programs asynchronous.
|
2013-11-11 19:36:48 +00:00
|
|
|
|
/// </summary>
|
2013-11-25 16:15:31 +00:00
|
|
|
|
/// <param name="channelId">The channel identifier.</param>
|
2013-11-11 19:36:48 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
2013-11-25 16:15:31 +00:00
|
|
|
|
/// <returns>Task{IEnumerable{ProgramInfo}}.</returns>
|
2013-11-25 20:39:23 +00:00
|
|
|
|
Task<IEnumerable<ProgramInfo>> GetProgramsAsync(string channelId, CancellationToken cancellationToken);
|
2013-09-26 15:48:14 +00:00
|
|
|
|
}
|
|
|
|
|
}
|