INetworkManager.cs 1.5 KB

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