aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv/ITunerHostManager.cs
diff options
context:
space:
mode:
authorBrian Howe <howe.m.brian@gmail.com>2024-02-27 21:07:30 -0600
committerBrian Howe <howe.m.brian@gmail.com>2024-02-27 21:07:30 -0600
commit54eb81395ef8d3d4cb064b56361ce94fc72b38b5 (patch)
tree73240b556055557b0ae034ef5d5ba60cb5cb051e /MediaBrowser.Controller/LiveTv/ITunerHostManager.cs
parent7f1fec688cc1a6f7f69fa5b059af01cf9c456d3f (diff)
parent4786901bb796c3e912f13b686571fde8d16f49c5 (diff)
Merge branch 'master' into bhowe34/fix-replace-missing-metadata-for-music
Diffstat (limited to 'MediaBrowser.Controller/LiveTv/ITunerHostManager.cs')
-rw-r--r--MediaBrowser.Controller/LiveTv/ITunerHostManager.cs46
1 files changed, 46 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/LiveTv/ITunerHostManager.cs b/MediaBrowser.Controller/LiveTv/ITunerHostManager.cs
new file mode 100644
index 000000000..3df6066f6
--- /dev/null
+++ b/MediaBrowser.Controller/LiveTv/ITunerHostManager.cs
@@ -0,0 +1,46 @@
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using MediaBrowser.Model.Dto;
+using MediaBrowser.Model.LiveTv;
+
+namespace MediaBrowser.Controller.LiveTv;
+
+/// <summary>
+/// Service responsible for managing the <see cref="ITunerHost"/>s.
+/// </summary>
+public interface ITunerHostManager
+{
+ /// <summary>
+ /// Gets the available <see cref="ITunerHost"/>s.
+ /// </summary>
+ IReadOnlyList<ITunerHost> TunerHosts { get; }
+
+ /// <summary>
+ /// Gets the <see cref="NameIdPair"/>s for the available <see cref="ITunerHost"/>s.
+ /// </summary>
+ /// <returns>The <see cref="NameIdPair"/>s.</returns>
+ IEnumerable<NameIdPair> GetTunerHostTypes();
+
+ /// <summary>
+ /// Saves the tuner host.
+ /// </summary>
+ /// <param name="info">Turner host to save.</param>
+ /// <param name="dataSourceChanged">Option to specify that data source has changed.</param>
+ /// <returns>Tuner host information wrapped in a task.</returns>
+ Task<TunerHostInfo> SaveTunerHost(TunerHostInfo info, bool dataSourceChanged = true);
+
+ /// <summary>
+ /// Discovers the available tuners.
+ /// </summary>
+ /// <param name="newDevicesOnly">A value indicating whether to only return new devices.</param>
+ /// <returns>The <see cref="TunerHostInfo"/>s.</returns>
+ IAsyncEnumerable<TunerHostInfo> DiscoverTuners(bool newDevicesOnly);
+
+ /// <summary>
+ /// Scans for tuner devices that have changed URLs.
+ /// </summary>
+ /// <param name="cancellationToken">The <see cref="CancellationToken"/> to use.</param>
+ /// <returns>A task that represents the scanning operation.</returns>
+ Task ScanForTunerDeviceChanges(CancellationToken cancellationToken);
+}