jellyfin/RSSDP/IUPnPDeviceValidator.cs

28 lines
1.1 KiB
C#
Raw Normal View History

2016-10-29 22:22:20 +00:00
using System;
namespace Rssdp.Infrastructure
{
/// <summary>
/// Interface for components that check an <see cref="SsdpDevice"/> object's properties meet the UPnP specification for a particular version.
/// </summary>
public interface IUpnpDeviceValidator
{
/// <summary>
/// Returns an enumerable set of strings, each one being a description of an invalid property on the specified root device.
/// </summary>
/// <param name="device">The <see cref="SsdpRootDevice"/> to validate.</param>
2017-08-24 19:52:19 +00:00
System.Collections.Generic.List<string> GetValidationErrors(SsdpRootDevice device);
2016-10-29 22:22:20 +00:00
/// <summary>
/// Returns an enumerable set of strings, each one being a description of an invalid property on the specified device.
/// </summary>
/// <param name="device">The <see cref="SsdpDevice"/> to validate.</param>
2017-08-24 19:52:19 +00:00
System.Collections.Generic.List<string> GetValidationErrors(SsdpDevice device);
2016-10-29 22:22:20 +00:00
/// <summary>
/// Validates the specified device and throws an <see cref="System.InvalidOperationException"/> if there are any validation errors.
/// </summary>
void ThrowIfDeviceInvalid(SsdpDevice device);
}
}