jellyfin-server/RSSDP/ISsdpDevicePublisher.cs

37 lines
1.5 KiB
C#
Raw Normal View History

using System;
2016-10-29 22:22:20 +00:00
using System.Threading.Tasks;
namespace Rssdp.Infrastructure
{
2019-01-07 23:24:34 +00:00
/// <summary>
/// Interface for components that publish the existence of SSDP devices.
/// </summary>
/// <remarks>
/// <para>Publishing a device includes sending notifications (alive and byebye) as well as responding to search requests when appropriate.</para>
/// </remarks>
/// <seealso cref="SsdpRootDevice"/>
/// <seealso cref="ISsdpDeviceLocator"/>
public interface ISsdpDevicePublisher
{
/// <summary>
/// Adds a device (and it's children) to the list of devices being published by this server, making them discoverable to SSDP clients.
/// </summary>
/// <param name="device">The <see cref="SsdpRootDevice"/> instance to add.</param>
2019-01-13 20:37:13 +00:00
/// <returns>An awaitable <see cref="Task"/>.</returns>
2019-01-07 23:24:34 +00:00
void AddDevice(SsdpRootDevice device);
2016-10-29 22:22:20 +00:00
2019-01-07 23:24:34 +00:00
/// <summary>
/// Removes a device (and it's children) from the list of devices being published by this server, making them undiscoverable.
/// </summary>
/// <param name="device">The <see cref="SsdpRootDevice"/> instance to add.</param>
2019-01-13 20:37:13 +00:00
/// <returns>An awaitable <see cref="Task"/>.</returns>
2019-01-07 23:24:34 +00:00
Task RemoveDevice(SsdpRootDevice device);
2016-10-29 22:22:20 +00:00
2019-01-07 23:24:34 +00:00
/// <summary>
/// Returns a read only list of devices being published by this instance.
/// </summary>
/// <seealso cref="SsdpDevice"/>
System.Collections.Generic.IEnumerable<SsdpRootDevice> Devices { get; }
}
2016-10-29 22:22:20 +00:00
}