sync updates

This commit is contained in:
Luke Pulverenti
2015-03-28 01:07:29 -04:00
parent d12bcc2d24
commit bda0b2f7c4
10 changed files with 29 additions and 18 deletions

View File

@@ -4,15 +4,15 @@ using System.Threading.Tasks;
namespace MediaBrowser.Controller.Sync
{
public interface IRequiresDynamicAccess
public interface IHasDynamicAccess
{
/// <summary>
/// Gets the file information.
/// Gets the synced file information.
/// </summary>
/// <param name="remotePath">The remote path.</param>
/// <param name="target">The target.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;SendFileResult&gt;.</returns>
Task<SendFileResult> GetFileInfo(string remotePath, SyncTarget target, CancellationToken cancellationToken);
/// <returns>Task&lt;SyncedFileInfo&gt;.</returns>
Task<SyncedFileInfo> GetSyncedFileInfo(string remotePath, SyncTarget target, CancellationToken cancellationToken);
}
}

View File

@@ -18,7 +18,7 @@ namespace MediaBrowser.Controller.Sync
/// <param name="progress">The progress.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task<SendFileResult> SendFile(Stream stream, string remotePath, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
Task<SyncedFileInfo> SendFile(Stream stream, string remotePath, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
/// <summary>
/// Deletes the file.

View File

@@ -1,8 +1,9 @@
using MediaBrowser.Model.MediaInfo;
using System.Collections.Generic;
namespace MediaBrowser.Controller.Sync
{
public class SendFileResult
public class SyncedFileInfo
{
/// <summary>
/// Gets or sets the path.
@@ -14,5 +15,15 @@ namespace MediaBrowser.Controller.Sync
/// </summary>
/// <value>The protocol.</value>
public MediaProtocol Protocol { get; set; }
/// <summary>
/// Gets or sets the required HTTP headers.
/// </summary>
/// <value>The required HTTP headers.</value>
public Dictionary<string, string> RequiredHttpHeaders { get; set; }
public SyncedFileInfo()
{
RequiredHttpHeaders = new Dictionary<string, string>();
}
}
}