INetworkManager.cs 1.4 KB

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