jellyfin-server/MediaBrowser.Controller/LiveTv/ITunerHost.cs

60 lines
2.5 KiB
C#
Raw Normal View History

2015-07-20 18:32:55 +00:00
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.LiveTv;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.LiveTv
{
public interface ITunerHost
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
string Name { get; }
/// <summary>
/// Gets the type.
/// </summary>
/// <value>The type.</value>
string Type { get; }
/// <summary>
/// Gets the channels.
/// </summary>
/// <param name="info">The information.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;IEnumerable&lt;ChannelInfo&gt;&gt;.</returns>
Task<IEnumerable<ChannelInfo>> GetChannels(TunerHostInfo info, CancellationToken cancellationToken);
/// <summary>
/// Gets the tuner infos.
/// </summary>
/// <param name="info">The information.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;List&lt;LiveTvTunerInfo&gt;&gt;.</returns>
Task<List<LiveTvTunerInfo>> GetTunerInfos(TunerHostInfo info, CancellationToken cancellationToken);
/// <summary>
/// Gets the channel stream.
/// </summary>
/// <param name="info">The information.</param>
/// <param name="channelId">The channel identifier.</param>
/// <param name="streamId">The stream identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;MediaSourceInfo&gt;.</returns>
Task<MediaSourceInfo> GetChannelStream(TunerHostInfo info, string channelId, string streamId, CancellationToken cancellationToken);
2015-07-23 13:23:22 +00:00
/// <summary>
2015-07-23 23:40:54 +00:00
/// Gets the channel stream media sources.
/// </summary>
/// <param name="info">The information.</param>
/// <param name="channelId">The channel identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;List&lt;MediaSourceInfo&gt;&gt;.</returns>
Task<List<MediaSourceInfo>> GetChannelStreamMediaSources(TunerHostInfo info, string channelId, CancellationToken cancellationToken);
/// <summary>
2015-07-23 13:23:22 +00:00
/// Validates the specified information.
/// </summary>
/// <param name="info">The information.</param>
/// <returns>Task.</returns>
Task Validate(TunerHostInfo info);
2015-07-20 18:32:55 +00:00
}
}