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>
|
|
|
|
/// Returns the MAC address of the device.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The MAC address.</value>
|
2018-12-27 23:27:57 +00:00
|
|
|
public string MacAddress { get; set; }
|
2019-08-09 21:16:24 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the wake-on-LAN port.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The wake-on-LAN port.</value>
|
2018-12-27 23:27:57 +00:00
|
|
|
public int Port { get; set; }
|
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
MacAddress = macAddress.ToString();
|
|
|
|
Port = 9;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="macAddress">The MAC address.</param>
|
|
|
|
public WakeOnLanInfo(string macAddress)
|
|
|
|
{
|
|
|
|
MacAddress = macAddress;
|
|
|
|
Port = 9;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
|
|
|
|
/// </summary>
|
2018-12-27 23:27:57 +00:00
|
|
|
public WakeOnLanInfo()
|
|
|
|
{
|
|
|
|
Port = 9;
|
|
|
|
}
|
|
|
|
}
|
2019-01-13 19:31:15 +00:00
|
|
|
}
|