jellyfin/MediaBrowser.Model/System/WakeOnLanInfo.cs

48 lines
1.4 KiB
C#
Raw Normal View History

2019-08-09 21:16:24 +00:00
using System.Net.NetworkInformation;
2018-12-27 23:27:57 +00:00
namespace MediaBrowser.Model.System
{
2019-08-09 21:16:24 +00:00
/// <summary>
/// Provides the MAC address and port for wake-on-LAN functionality.
/// </summary>
2018-12-27 23:27:57 +00:00
public class WakeOnLanInfo
{
2019-08-09 21:16:24 +00:00
/// <summary>
/// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
/// </summary>
/// <param name="macAddress">The MAC address.</param>
public WakeOnLanInfo(PhysicalAddress macAddress) : this(macAddress.ToString())
2019-08-09 21:16:24 +00:00
{
}
/// <summary>
/// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
/// </summary>
/// <param name="macAddress">The MAC address.</param>
public WakeOnLanInfo(string macAddress) : this()
2019-08-09 21:16:24 +00:00
{
MacAddress = macAddress;
}
/// <summary>
/// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
/// </summary>
2018-12-27 23:27:57 +00:00
public WakeOnLanInfo()
{
Port = 9;
}
/// <summary>
/// Gets the MAC address of the device.
/// </summary>
/// <value>The MAC address.</value>
public string? MacAddress { get; set; }
/// <summary>
/// Gets or sets the wake-on-LAN port.
/// </summary>
/// <value>The wake-on-LAN port.</value>
public int Port { get; set; }
2018-12-27 23:27:57 +00:00
}
}