fixes #550 - Add internal interfaces for live tv

This commit is contained in:
Luke Pulverenti
2013-09-26 11:48:14 -04:00
parent 0a313b5087
commit 98442402a5
14 changed files with 257 additions and 0 deletions

View File

@@ -0,0 +1,21 @@

namespace MediaBrowser.Controller.LiveTv
{
/// <summary>
/// Class ChannelInfo
/// </summary>
public class ChannelInfo
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the name of the service.
/// </summary>
/// <value>The name of the service.</value>
public string ServiceName { get; set; }
}
}

View File

@@ -0,0 +1,30 @@
using MediaBrowser.Model.LiveTv;
using System.Collections.Generic;
namespace MediaBrowser.Controller.LiveTv
{
/// <summary>
/// Manages all live tv services installed on the server
/// </summary>
public interface ILiveTvManager
{
/// <summary>
/// Gets the services.
/// </summary>
/// <value>The services.</value>
IReadOnlyList<ILiveTvService> Services { get; }
/// <summary>
/// Adds the parts.
/// </summary>
/// <param name="services">The services.</param>
void AddParts(IEnumerable<ILiveTvService> services);
/// <summary>
/// Gets the channel info dto.
/// </summary>
/// <param name="info">The info.</param>
/// <returns>ChannelInfoDto.</returns>
ChannelInfoDto GetChannelInfoDto(ChannelInfo info);
}
}

View File

@@ -0,0 +1,25 @@
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);
}
}

View File

@@ -96,6 +96,9 @@
<Compile Include="Library\ILibraryPrescanTask.cs" />
<Compile Include="Library\IMetadataSaver.cs" />
<Compile Include="Library\ItemUpdateType.cs" />
<Compile Include="LiveTv\ChannelInfo.cs" />
<Compile Include="LiveTv\ILiveTvManager.cs" />
<Compile Include="LiveTv\ILiveTvService.cs" />
<Compile Include="Localization\ILocalizationManager.cs" />
<Compile Include="Notifications\INotificationsRepository.cs" />
<Compile Include="Notifications\NotificationUpdateEventArgs.cs" />