Files
jellyfin-jellyfin-1/MediaBrowser.Controller/LiveTv/ILiveTvService.cs

160 lines
7.2 KiB
C#
Raw Normal View History

2013-12-14 20:17:57 -05:00
using System.Collections.Generic;
2013-12-22 12:16:24 -05:00
using System.IO;
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 21:45:58 +01:00
/// <summary>
2013-11-26 16:36:11 -05:00
/// Cancels the timer asynchronous.
/// </summary>
2013-11-26 16:36:11 -05:00
/// <param name="timerId">The timer identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2013-11-26 16:36:11 -05:00
Task CancelTimerAsync(string timerId, CancellationToken cancellationToken);
2013-12-15 09:19:24 -05:00
/// <summary>
/// Cancels the series timer asynchronous.
/// </summary>
/// <param name="timerId">The timer identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task CancelSeriesTimerAsync(string timerId, CancellationToken cancellationToken);
2013-11-25 15:39:23 -05: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 16:36:11 -05:00
/// <summary>
2013-11-26 16:36:11 -05:00
/// Creates the timer asynchronous.
/// </summary>
2013-11-26 16:36:11 -05:00
/// <param name="info">The information.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2013-11-26 16:36:11 -05:00
Task CreateTimerAsync(TimerInfo info, CancellationToken cancellationToken);
2013-11-25 15:39:23 -05:00
2013-12-01 01:25:19 -05: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);
2013-12-14 20:17:57 -05:00
/// <summary>
/// Updates the timer asynchronous.
/// </summary>
/// <param name="info">The information.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task UpdateTimerAsync(TimerInfo info, CancellationToken cancellationToken);
2013-12-01 01:25:19 -05:00
/// <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);
/// <summary>
2013-12-19 16:51:32 -05:00
/// Gets the channel image asynchronous. This only needs to be implemented if an image path or url cannot be supplied to ChannelInfo
/// </summary>
/// <param name="channelId">The channel identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{Stream}.</returns>
2013-12-02 16:46:22 -05:00
Task<ImageResponseInfo> GetChannelImageAsync(string channelId, CancellationToken cancellationToken);
2013-12-14 10:49:11 -05:00
/// <summary>
2013-12-19 16:51:32 -05:00
/// Gets the recording image asynchronous. This only needs to be implemented if an image path or url cannot be supplied to RecordingInfo
2013-12-14 10:49:11 -05:00
/// </summary>
2013-12-18 00:44:46 -05:00
/// <param name="recordingId">The recording identifier.</param>
2013-12-14 10:49:11 -05:00
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{ImageResponseInfo}.</returns>
2013-12-18 00:44:46 -05:00
Task<ImageResponseInfo> GetRecordingImageAsync(string recordingId, CancellationToken cancellationToken);
2013-12-14 10:49:11 -05:00
2013-12-02 16:46:22 -05:00
/// <summary>
2013-12-19 16:51:32 -05:00
/// Gets the program image asynchronous. This only needs to be implemented if an image path or url cannot be supplied to ProgramInfo
2013-12-02 16:46:22 -05:00
/// </summary>
2013-12-18 00:44:46 -05:00
/// <param name="programId">The program identifier.</param>
2013-12-14 10:49:11 -05:00
/// <param name="channelId">The channel identifier.</param>
2013-12-02 16:46:22 -05:00
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{ImageResponseInfo}.</returns>
2013-12-18 00:44:46 -05:00
Task<ImageResponseInfo> GetProgramImageAsync(string programId, string channelId, CancellationToken cancellationToken);
2013-12-02 16:46:22 -05:00
2013-11-11 14:36:48 -05:00
/// <summary>
/// Gets the recordings asynchronous.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{RecordingInfo}}.</returns>
2013-11-25 15:39:23 -05:00
Task<IEnumerable<RecordingInfo>> GetRecordingsAsync(CancellationToken cancellationToken);
2013-11-26 16:36:11 -05: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 01:49:38 -05:00
2013-12-17 15:02:12 -05:00
/// <summary>
/// Gets the timer defaults asynchronous.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{TimerInfo}.</returns>
2013-12-18 00:44:46 -05:00
Task<SeriesTimerInfo> GetNewTimerDefaultsAsync(CancellationToken cancellationToken);
2013-12-17 15:02:12 -05:00
2013-11-30 01:49:38 -05:00
/// <summary>
2013-12-01 01:25:19 -05:00
/// Gets the series timers asynchronous.
2013-11-30 01:49:38 -05:00
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
2013-12-01 01:25:19 -05:00
/// <returns>Task{IEnumerable{SeriesTimerInfo}}.</returns>
Task<IEnumerable<SeriesTimerInfo>> GetSeriesTimersAsync(CancellationToken cancellationToken);
2013-11-26 16:36:11 -05:00
2013-11-11 14:36:48 -05:00
/// <summary>
2013-11-25 15:39:23 -05:00
/// Gets the programs asynchronous.
2013-11-11 14:36:48 -05:00
/// </summary>
2013-11-25 11:15:31 -05:00
/// <param name="channelId">The channel identifier.</param>
2013-11-11 14:36:48 -05:00
/// <param name="cancellationToken">The cancellation token.</param>
2013-11-25 11:15:31 -05:00
/// <returns>Task{IEnumerable{ProgramInfo}}.</returns>
2013-11-25 15:39:23 -05:00
Task<IEnumerable<ProgramInfo>> GetProgramsAsync(string channelId, CancellationToken cancellationToken);
2013-12-22 12:16:24 -05:00
/// <summary>
/// Gets the recording stream.
/// </summary>
/// <param name="recordingId">The recording identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{Stream}.</returns>
Task<Stream> GetRecordingStream(string recordingId, CancellationToken cancellationToken);
/// <summary>
/// Gets the channel stream.
/// </summary>
/// <param name="recordingId">The recording identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{Stream}.</returns>
Task<Stream> GetChannelStream(string recordingId, CancellationToken cancellationToken);
}
}