IIsoMounter.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using System.IO;
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. namespace MediaBrowser.Model.IO
  6. {
  7. public interface IIsoMounter : IDisposable
  8. {
  9. /// <summary>
  10. /// Mounts the specified iso path.
  11. /// </summary>
  12. /// <param name="isoPath">The iso path.</param>
  13. /// <param name="cancellationToken">The cancellation token.</param>
  14. /// <returns>IsoMount.</returns>
  15. /// <exception cref="ArgumentNullException">isoPath</exception>
  16. /// <exception cref="IOException">Unable to create mount.</exception>
  17. Task<IIsoMount> Mount(string isoPath, CancellationToken cancellationToken);
  18. /// <summary>
  19. /// Determines whether this instance can mount the specified path.
  20. /// </summary>
  21. /// <param name="path">The path.</param>
  22. /// <returns><c>true</c> if this instance can mount the specified path; otherwise, <c>false</c>.</returns>
  23. bool CanMount(string path);
  24. /// <summary>
  25. /// Gets a value indicating whether [requires installation].
  26. /// </summary>
  27. /// <value><c>true</c> if [requires installation]; otherwise, <c>false</c>.</value>
  28. bool RequiresInstallation { get; }
  29. /// <summary>
  30. /// Gets a value indicating whether this instance is installed.
  31. /// </summary>
  32. /// <value><c>true</c> if this instance is installed; otherwise, <c>false</c>.</value>
  33. bool IsInstalled { get; }
  34. /// <summary>
  35. /// Installs this instance.
  36. /// </summary>
  37. /// <returns>Task.</returns>
  38. Task Install(CancellationToken cancellationToken);
  39. /// <summary>
  40. /// Gets the name.
  41. /// </summary>
  42. /// <value>The name.</value>
  43. string Name { get; }
  44. }
  45. }