INetworkManager.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using MediaBrowser.Model.Net;
  2. using System.Collections.Generic;
  3. using System.Net;
  4. namespace MediaBrowser.Common.Net
  5. {
  6. public interface INetworkManager
  7. {
  8. /// <summary>
  9. /// Gets the machine's local ip address
  10. /// </summary>
  11. /// <returns>IPAddress.</returns>
  12. IEnumerable<string> GetLocalIpAddresses();
  13. /// <summary>
  14. /// Gets a random port number that is currently available
  15. /// </summary>
  16. /// <returns>System.Int32.</returns>
  17. int GetRandomUnusedPort();
  18. /// <summary>
  19. /// Returns MAC Address from first Network Card in Computer
  20. /// </summary>
  21. /// <returns>[string] MAC Address</returns>
  22. string GetMacAddress();
  23. /// <summary>
  24. /// Gets the network shares.
  25. /// </summary>
  26. /// <param name="path">The path.</param>
  27. /// <returns>IEnumerable{NetworkShare}.</returns>
  28. IEnumerable<NetworkShare> GetNetworkShares(string path);
  29. /// <summary>
  30. /// Gets available devices within the domain
  31. /// </summary>
  32. /// <returns>PC's in the Domain</returns>
  33. IEnumerable<string> GetNetworkDevices();
  34. /// <summary>
  35. /// Parses the specified endpointstring.
  36. /// </summary>
  37. /// <param name="endpointstring">The endpointstring.</param>
  38. /// <returns>IPEndPoint.</returns>
  39. IPEndPoint Parse(string endpointstring);
  40. }
  41. }