From e0c387446b2562ac6b153d36d357a71e70fa736b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 9 Aug 2013 21:16:31 -0400 Subject: reworked iso manager --- MediaBrowser.Model/IO/IIsoManager.cs | 34 ++++++++++++++++++++++++++++++++++ MediaBrowser.Model/IO/IIsoMount.cs | 22 ++++++++++++++++++++++ MediaBrowser.Model/IO/IIsoMounter.cs | 27 +++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 MediaBrowser.Model/IO/IIsoManager.cs create mode 100644 MediaBrowser.Model/IO/IIsoMount.cs create mode 100644 MediaBrowser.Model/IO/IIsoMounter.cs (limited to 'MediaBrowser.Model/IO') diff --git a/MediaBrowser.Model/IO/IIsoManager.cs b/MediaBrowser.Model/IO/IIsoManager.cs new file mode 100644 index 0000000000..92c4d5aee8 --- /dev/null +++ b/MediaBrowser.Model/IO/IIsoManager.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.Model.IO +{ + public interface IIsoManager : IDisposable + { + /// + /// Mounts the specified iso path. + /// + /// The iso path. + /// The cancellation token. + /// IsoMount. + /// isoPath + /// Unable to create mount. + Task Mount(string isoPath, CancellationToken cancellationToken); + + /// + /// Determines whether this instance can mount the specified path. + /// + /// The path. + /// true if this instance can mount the specified path; otherwise, false. + bool CanMount(string path); + + /// + /// Adds the parts. + /// + /// The mounters. + void AddParts(IEnumerable mounters); + } +} \ No newline at end of file diff --git a/MediaBrowser.Model/IO/IIsoMount.cs b/MediaBrowser.Model/IO/IIsoMount.cs new file mode 100644 index 0000000000..4f8f8b5d25 --- /dev/null +++ b/MediaBrowser.Model/IO/IIsoMount.cs @@ -0,0 +1,22 @@ +using System; + +namespace MediaBrowser.Model.IO +{ + /// + /// Interface IIsoMount + /// + public interface IIsoMount : IDisposable + { + /// + /// Gets or sets the iso path. + /// + /// The iso path. + string IsoPath { get; } + + /// + /// Gets the mounted path. + /// + /// The mounted path. + string MountedPath { get; } + } +} \ No newline at end of file diff --git a/MediaBrowser.Model/IO/IIsoMounter.cs b/MediaBrowser.Model/IO/IIsoMounter.cs new file mode 100644 index 0000000000..91a0453681 --- /dev/null +++ b/MediaBrowser.Model/IO/IIsoMounter.cs @@ -0,0 +1,27 @@ +using System; +using System.IO; +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.Model.IO +{ + public interface IIsoMounter : IDisposable + { + /// + /// Mounts the specified iso path. + /// + /// The iso path. + /// The cancellation token. + /// IsoMount. + /// isoPath + /// Unable to create mount. + Task Mount(string isoPath, CancellationToken cancellationToken); + + /// + /// Determines whether this instance can mount the specified path. + /// + /// The path. + /// true if this instance can mount the specified path; otherwise, false. + bool CanMount(string path); + } +} -- cgit v1.2.3