diff options
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ChannelInfo.cs | 21 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ILiveTvManager.cs | 30 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ILiveTvService.cs | 25 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaBrowser.Controller.csproj | 3 |
4 files changed, 79 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/LiveTv/ChannelInfo.cs b/MediaBrowser.Controller/LiveTv/ChannelInfo.cs new file mode 100644 index 000000000..5f4013448 --- /dev/null +++ b/MediaBrowser.Controller/LiveTv/ChannelInfo.cs @@ -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; } + } +} diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs new file mode 100644 index 000000000..de88d1562 --- /dev/null +++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs @@ -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); + } +} diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs new file mode 100644 index 000000000..4d9ec8531 --- /dev/null +++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs @@ -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); + } +} diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 0b27a350b..57219ae51 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -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" /> |
