aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Channels/IChannel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Channels/IChannel.cs')
-rw-r--r--MediaBrowser.Controller/Channels/IChannel.cs57
1 files changed, 57 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Channels/IChannel.cs b/MediaBrowser.Controller/Channels/IChannel.cs
new file mode 100644
index 000000000..edb2347c0
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/IChannel.cs
@@ -0,0 +1,57 @@
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace MediaBrowser.Controller.Channels
+{
+ public interface IChannel
+ {
+ /// <summary>
+ /// Gets the name.
+ /// </summary>
+ /// <value>The name.</value>
+ string Name { get; }
+
+ /// <summary>
+ /// Gets the home page URL.
+ /// </summary>
+ /// <value>The home page URL.</value>
+ string HomePageUrl { get; }
+
+ /// <summary>
+ /// Gets the capabilities.
+ /// </summary>
+ /// <returns>ChannelCapabilities.</returns>
+ ChannelCapabilities GetCapabilities();
+
+ /// <summary>
+ /// Searches the specified search term.
+ /// </summary>
+ /// <param name="searchTerm">The search term.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns>
+ Task<IEnumerable<ChannelItemInfo>> Search(string searchTerm, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets the channel items.
+ /// </summary>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{IEnumerable{ChannelItem}}.</returns>
+ Task<IEnumerable<ChannelItemInfo>> GetChannelItems(CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets the channel items.
+ /// </summary>
+ /// <param name="categoryId">The category identifier.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{IEnumerable{ChannelItem}}.</returns>
+ Task<IEnumerable<ChannelItemInfo>> GetChannelItems(string categoryId, CancellationToken cancellationToken);
+ }
+
+ public class ChannelCapabilities
+ {
+ public bool CanSearch { get; set; }
+
+ public bool CanBeIndexed { get; set; }
+ }
+}