jellyfin/MediaBrowser.Controller/LiveTv/ILiveTvService.cs

78 lines
3.2 KiB
C#
Raw Normal View History

2013-11-24 13:51:45 -07:00
using MediaBrowser.Common.Net;
using System;
2013-11-11 12:36:48 -07:00
using System.Collections.Generic;
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 13:45:58 -07: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);
2013-11-25 13:39:23 -07: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);
/// <summary>
/// Schedules the recording asynchronous.
/// </summary>
2013-11-21 13:26:45 -07:00
/// <param name="name">The name for the recording</param>
/// <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>
2013-11-25 13:39:23 -07:00
Task ScheduleRecordingAsync(string name, string channelId, DateTime startTime, TimeSpan duration, CancellationToken cancellationToken);
/// <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-11-24 13:51:45 -07:00
Task<HttpResponseInfo> GetChannelImageAsync(string channelId, CancellationToken cancellationToken);
2013-11-11 12:36:48 -07:00
/// <summary>
/// Gets the recordings asynchronous.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{RecordingInfo}}.</returns>
2013-11-25 13:39:23 -07:00
Task<IEnumerable<RecordingInfo>> GetRecordingsAsync(CancellationToken cancellationToken);
2013-11-11 12:36:48 -07:00
/// <summary>
2013-11-25 13:39:23 -07:00
/// Gets the programs asynchronous.
2013-11-11 12:36:48 -07:00
/// </summary>
2013-11-25 09:15:31 -07:00
/// <param name="channelId">The channel identifier.</param>
2013-11-11 12:36:48 -07:00
/// <param name="cancellationToken">The cancellation token.</param>
2013-11-25 09:15:31 -07:00
/// <returns>Task{IEnumerable{ProgramInfo}}.</returns>
2013-11-25 13:39:23 -07:00
Task<IEnumerable<ProgramInfo>> GetProgramsAsync(string channelId, CancellationToken cancellationToken);
}
}