diff options
Diffstat (limited to 'MediaBrowser.Common/Net/INetworkManager.cs')
| -rw-r--r-- | MediaBrowser.Common/Net/INetworkManager.cs | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/MediaBrowser.Common/Net/INetworkManager.cs b/MediaBrowser.Common/Net/INetworkManager.cs index a7beabbdc..43562afe3 100644 --- a/MediaBrowser.Common/Net/INetworkManager.cs +++ b/MediaBrowser.Common/Net/INetworkManager.cs @@ -1,10 +1,11 @@ #nullable enable using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Net; using System.Net.NetworkInformation; +using MediaBrowser.Common.Net; using Microsoft.AspNetCore.Http; -using NetCollection = System.Collections.ObjectModel.Collection<MediaBrowser.Common.Net.IPObject>; namespace MediaBrowser.Common.Net { @@ -31,7 +32,7 @@ namespace MediaBrowser.Common.Net /// <summary> /// Gets the remote address filter. /// </summary> - NetCollection RemoteAddressFilter { get; } + Collection<IPObject> RemoteAddressFilter { get; } /// <summary> /// Gets or sets a value indicating whether iP6 is enabled. @@ -46,17 +47,17 @@ namespace MediaBrowser.Common.Net /// <summary> /// Calculates the list of interfaces to use for Kestrel. /// </summary> - /// <returns>A NetCollection object containing all the interfaces to bind. + /// <returns>A Collection{IPObject} object containing all the interfaces to bind. /// If all the interfaces are specified, and none are excluded, it returns zero items /// to represent any address.</returns> /// <param name="individualInterfaces">When false, return <see cref="IPAddress.Any"/> or <see cref="IPAddress.IPv6Any"/> for all interfaces.</param> - NetCollection GetAllBindInterfaces(bool individualInterfaces = false); + Collection<IPObject> GetAllBindInterfaces(bool individualInterfaces = false); /// <summary> /// Returns a collection containing the loopback interfaces. /// </summary> - /// <returns>Netcollection.</returns> - NetCollection GetLoopbacks(); + /// <returns>Collection{IPObject}.</returns> + Collection<IPObject> GetLoopbacks(); /// <summary> /// Retrieves the bind address to use in system url's. (Server Discovery, PlayTo, LiveTV, SystemInfo) @@ -137,7 +138,14 @@ namespace MediaBrowser.Common.Net /// </summary> /// <param name="addressObj">IP to check. Can be an IPAddress or an IPObject.</param> /// <returns>Result of the check.</returns> - bool IsGatewayInterface(object? addressObj); + bool IsGatewayInterface(IPObject? addressObj); + + /// <summary> + /// Checks to see if the IP Address provided matches an interface that has a gateway. + /// </summary> + /// <param name="addressObj">IP to check. Can be an IPAddress or an IPObject.</param> + /// <returns>Result of the check.</returns> + bool IsGatewayInterface(IPAddress? addressObj); /// <summary> /// Returns true if the address is a private address. @@ -178,21 +186,21 @@ namespace MediaBrowser.Common.Net /// <param name="token">Token to parse.</param> /// <param name="result">Resultant object's ip addresses, if successful.</param> /// <returns>Success of the operation.</returns> - bool TryParseInterface(string token, out NetCollection? result); + bool TryParseInterface(string token, out Collection<IPObject>? result); /// <summary> - /// Parses an array of strings into a NetCollection. + /// Parses an array of strings into a Collection{IPObject}. /// </summary> /// <param name="values">Values to parse.</param> /// <param name="bracketed">When true, only include values in []. When false, ignore bracketed values.</param> /// <returns>IPCollection object containing the value strings.</returns> - NetCollection CreateIPCollection(string[] values, bool bracketed = false); + Collection<IPObject> CreateIPCollection(string[] values, bool bracketed = false); /// <summary> /// Returns all the internal Bind interface addresses. /// </summary> /// <returns>An internal list of interfaces addresses.</returns> - NetCollection GetInternalBindAddresses(); + Collection<IPObject> GetInternalBindAddresses(); /// <summary> /// Checks to see if an IP address is still a valid interface address. @@ -220,12 +228,6 @@ namespace MediaBrowser.Common.Net /// </summary> /// <param name="filter">Optional filter for the list.</param> /// <returns>Returns a filtered list of LAN addresses.</returns> - NetCollection GetFilteredLANSubnets(NetCollection? filter = null); - - /// <summary> - /// Reloads all settings and re-initialises the instance. - /// </summary> - /// <param name="configuration">The configuration to use.</param> - void UpdateSettings(object configuration); + Collection<IPObject> GetFilteredLANSubnets(Collection<IPObject>? filter = null); } } |
