2015-03-07 22:43:53 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
|
using MediaBrowser.Model.Dto;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Library
|
|
|
|
|
{
|
|
|
|
|
public interface IMediaSourceProvider
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the media sources.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<IEnumerable<MediaSourceInfo>>.</returns>
|
|
|
|
|
Task<IEnumerable<MediaSourceInfo>> GetMediaSources(IHasMediaSources item, CancellationToken cancellationToken);
|
2015-03-28 20:22:27 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Opens the media source.
|
|
|
|
|
/// </summary>
|
2015-03-29 04:56:39 +00:00
|
|
|
|
/// <param name="openToken">The open token.</param>
|
2015-03-28 20:22:27 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<MediaSourceInfo>.</returns>
|
2015-03-29 04:56:39 +00:00
|
|
|
|
Task<MediaSourceInfo> OpenMediaSource(string openToken, CancellationToken cancellationToken);
|
2015-03-28 20:22:27 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Closes the media source.
|
|
|
|
|
/// </summary>
|
2015-03-29 04:56:39 +00:00
|
|
|
|
/// <param name="liveStreamId">The live stream identifier.</param>
|
2015-03-28 20:22:27 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2015-03-29 04:56:39 +00:00
|
|
|
|
Task CloseMediaSource(string liveStreamId, CancellationToken cancellationToken);
|
2015-03-07 22:43:53 +00:00
|
|
|
|
}
|
|
|
|
|
}
|