From bda0b2f7c490fbd2f462902aba13ee7db80688c3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 28 Mar 2015 01:07:29 -0400 Subject: sync updates --- .../MediaBrowser.Controller.csproj | 4 +-- MediaBrowser.Controller/Sync/IHasDynamicAccess.cs | 18 ++++++++++++++ .../Sync/IRequiresDynamicAccess.cs | 18 -------------- .../Sync/IServerSyncProvider.cs | 2 +- MediaBrowser.Controller/Sync/SendFileResult.cs | 18 -------------- MediaBrowser.Controller/Sync/SyncedFileInfo.cs | 29 ++++++++++++++++++++++ 6 files changed, 50 insertions(+), 39 deletions(-) create mode 100644 MediaBrowser.Controller/Sync/IHasDynamicAccess.cs delete mode 100644 MediaBrowser.Controller/Sync/IRequiresDynamicAccess.cs delete mode 100644 MediaBrowser.Controller/Sync/SendFileResult.cs create mode 100644 MediaBrowser.Controller/Sync/SyncedFileInfo.cs (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 809d1f6f4..2fa62f79f 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -393,13 +393,13 @@ - + - + diff --git a/MediaBrowser.Controller/Sync/IHasDynamicAccess.cs b/MediaBrowser.Controller/Sync/IHasDynamicAccess.cs new file mode 100644 index 000000000..f907de729 --- /dev/null +++ b/MediaBrowser.Controller/Sync/IHasDynamicAccess.cs @@ -0,0 +1,18 @@ +using MediaBrowser.Model.Sync; +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Sync +{ + public interface IHasDynamicAccess + { + /// + /// Gets the synced file information. + /// + /// The remote path. + /// The target. + /// The cancellation token. + /// Task<SyncedFileInfo>. + Task GetSyncedFileInfo(string remotePath, SyncTarget target, CancellationToken cancellationToken); + } +} diff --git a/MediaBrowser.Controller/Sync/IRequiresDynamicAccess.cs b/MediaBrowser.Controller/Sync/IRequiresDynamicAccess.cs deleted file mode 100644 index 820a1dce0..000000000 --- a/MediaBrowser.Controller/Sync/IRequiresDynamicAccess.cs +++ /dev/null @@ -1,18 +0,0 @@ -using MediaBrowser.Model.Sync; -using System.Threading; -using System.Threading.Tasks; - -namespace MediaBrowser.Controller.Sync -{ - public interface IRequiresDynamicAccess - { - /// - /// Gets the file information. - /// - /// The remote path. - /// The target. - /// The cancellation token. - /// Task<SendFileResult>. - Task GetFileInfo(string remotePath, SyncTarget target, CancellationToken cancellationToken); - } -} diff --git a/MediaBrowser.Controller/Sync/IServerSyncProvider.cs b/MediaBrowser.Controller/Sync/IServerSyncProvider.cs index 9cccd4150..46bbbd329 100644 --- a/MediaBrowser.Controller/Sync/IServerSyncProvider.cs +++ b/MediaBrowser.Controller/Sync/IServerSyncProvider.cs @@ -18,7 +18,7 @@ namespace MediaBrowser.Controller.Sync /// The progress. /// The cancellation token. /// Task. - Task SendFile(Stream stream, string remotePath, SyncTarget target, IProgress progress, CancellationToken cancellationToken); + Task SendFile(Stream stream, string remotePath, SyncTarget target, IProgress progress, CancellationToken cancellationToken); /// /// Deletes the file. diff --git a/MediaBrowser.Controller/Sync/SendFileResult.cs b/MediaBrowser.Controller/Sync/SendFileResult.cs deleted file mode 100644 index 62753444a..000000000 --- a/MediaBrowser.Controller/Sync/SendFileResult.cs +++ /dev/null @@ -1,18 +0,0 @@ -using MediaBrowser.Model.MediaInfo; - -namespace MediaBrowser.Controller.Sync -{ - public class SendFileResult - { - /// - /// Gets or sets the path. - /// - /// The path. - public string Path { get; set; } - /// - /// Gets or sets the protocol. - /// - /// The protocol. - public MediaProtocol Protocol { get; set; } - } -} diff --git a/MediaBrowser.Controller/Sync/SyncedFileInfo.cs b/MediaBrowser.Controller/Sync/SyncedFileInfo.cs new file mode 100644 index 000000000..550af2d55 --- /dev/null +++ b/MediaBrowser.Controller/Sync/SyncedFileInfo.cs @@ -0,0 +1,29 @@ +using MediaBrowser.Model.MediaInfo; +using System.Collections.Generic; + +namespace MediaBrowser.Controller.Sync +{ + public class SyncedFileInfo + { + /// + /// Gets or sets the path. + /// + /// The path. + public string Path { get; set; } + /// + /// Gets or sets the protocol. + /// + /// The protocol. + public MediaProtocol Protocol { get; set; } + /// + /// Gets or sets the required HTTP headers. + /// + /// The required HTTP headers. + public Dictionary RequiredHttpHeaders { get; set; } + + public SyncedFileInfo() + { + RequiredHttpHeaders = new Dictionary(); + } + } +} -- cgit v1.2.3