2013-11-20 18:10:02 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
2013-11-20 04:15:48 +01:00
|
|
|
|
using MediaBrowser.Model.LiveTv;
|
2013-11-11 20:36:48 +01:00
|
|
|
|
using System.Collections.Generic;
|
2013-09-26 17:48:14 +02: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 21:45:58 +01:00
|
|
|
|
|
2013-11-20 18:10:02 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Cancels the recording asynchronous.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="recordingId">The recording identifier.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task CancelRecordingAsync(string recordingId, CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Schedules the recording asynchronous.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="channelId">The channel identifier.</param>
|
|
|
|
|
/// <param name="startTime">The start time.</param>
|
|
|
|
|
/// <param name="duration">The duration.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task ScheduleRecordingAsync(string channelId, DateTime startTime, TimeSpan duration, CancellationToken cancellationToken);
|
|
|
|
|
|
2013-11-20 04:15:48 +01: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>
|
|
|
|
|
Task<Stream> GetChannelImageAsync(string channelId, CancellationToken cancellationToken);
|
|
|
|
|
|
2013-11-11 20:36:48 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the recordings asynchronous.
|
|
|
|
|
/// </summary>
|
2013-11-15 22:31:44 +01:00
|
|
|
|
/// <param name="query">The query.</param>
|
2013-11-11 20:36:48 +01:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{IEnumerable{RecordingInfo}}.</returns>
|
2013-11-15 22:31:44 +01:00
|
|
|
|
Task<IEnumerable<RecordingInfo>> GetRecordingsAsync(RecordingQuery query, CancellationToken cancellationToken);
|
2013-11-02 22:38:21 +01:00
|
|
|
|
|
2013-11-11 20:36:48 +01:00
|
|
|
|
/// <summary>
|
2013-11-15 22:31:44 +01:00
|
|
|
|
/// Gets the channel guides.
|
2013-11-11 20:36:48 +01:00
|
|
|
|
/// </summary>
|
2013-11-15 22:31:44 +01:00
|
|
|
|
/// <param name="channelIdList">The channel identifier list.</param>
|
2013-11-11 20:36:48 +01:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
2013-11-15 22:31:44 +01:00
|
|
|
|
/// <returns>Task{IEnumerable{ChannelGuide}}.</returns>
|
|
|
|
|
Task<IEnumerable<ChannelGuide>> GetChannelGuidesAsync(IEnumerable<string> channelIdList, CancellationToken cancellationToken);
|
2013-09-26 17:48:14 +02:00
|
|
|
|
}
|
|
|
|
|
}
|