2015-10-16 18:11:11 +00:00
|
|
|
|
using System;
|
|
|
|
|
using MediaBrowser.Model.Dto;
|
2015-07-20 18:32:55 +00:00
|
|
|
|
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>
|
|
|
|
|
/// <returns>Task<IEnumerable<ChannelInfo>>.</returns>
|
2016-09-29 12:55:49 +00:00
|
|
|
|
Task<IEnumerable<ChannelInfo>> GetChannels(bool enableCache, CancellationToken cancellationToken);
|
2015-07-20 18:32:55 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the tuner infos.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<List<LiveTvTunerInfo>>.</returns>
|
2015-08-19 16:43:23 +00:00
|
|
|
|
Task<List<LiveTvTunerInfo>> GetTunerInfos(CancellationToken cancellationToken);
|
2015-07-20 18:32:55 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channel stream.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="channelId">The channel identifier.</param>
|
|
|
|
|
/// <param name="streamId">The stream identifier.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<MediaSourceInfo>.</returns>
|
2016-09-25 18:39:13 +00:00
|
|
|
|
Task<LiveStream> GetChannelStream(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="channelId">The channel identifier.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<List<MediaSourceInfo>>.</returns>
|
2015-08-19 19:25:18 +00:00
|
|
|
|
Task<List<MediaSourceInfo>> GetChannelStreamMediaSources(string channelId, CancellationToken cancellationToken);
|
2016-02-19 06:20:18 +00:00
|
|
|
|
}
|
|
|
|
|
public interface IConfigurableTunerHost
|
|
|
|
|
{
|
2015-07-23 23:40:54 +00:00
|
|
|
|
/// <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
|
|
|
|
}
|
|
|
|
|
}
|