diff options
| author | Luke <luke.pulverenti@gmail.com> | 2015-03-19 13:21:35 -0400 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2015-03-19 13:21:35 -0400 |
| commit | 9926be0d9de688c04065c916e44ada4177b38a80 (patch) | |
| tree | 15338144a143948ffbee316641757e81489a7354 /MediaBrowser.Controller/Sync/IServerSyncProvider.cs | |
| parent | b756e677d733992c2033bdd369980a37e17609e4 (diff) | |
| parent | 0564d454e5ad4f59702aa9022af6bb8fd064a9ff (diff) | |
Merge pull request #1043 from MediaBrowser/dev
3.0.5557.0
Diffstat (limited to 'MediaBrowser.Controller/Sync/IServerSyncProvider.cs')
| -rw-r--r-- | MediaBrowser.Controller/Sync/IServerSyncProvider.cs | 57 |
1 files changed, 41 insertions, 16 deletions
diff --git a/MediaBrowser.Controller/Sync/IServerSyncProvider.cs b/MediaBrowser.Controller/Sync/IServerSyncProvider.cs index 8ef54fd43..abf884e9d 100644 --- a/MediaBrowser.Controller/Sync/IServerSyncProvider.cs +++ b/MediaBrowser.Controller/Sync/IServerSyncProvider.cs @@ -1,5 +1,7 @@ using MediaBrowser.Model.Sync; +using System; using System.Collections.Generic; +using System.IO; using System.Threading; using System.Threading.Tasks; @@ -8,35 +10,58 @@ namespace MediaBrowser.Controller.Sync public interface IServerSyncProvider : ISyncProvider { /// <summary> - /// Gets the server item ids. + /// Transfers the file. /// </summary> - /// <param name="serverId">The server identifier.</param> + /// <param name="stream">The stream.</param> + /// <param name="remotePath">The remote path.</param> /// <param name="target">The target.</param> + /// <param name="progress">The progress.</param> /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>Task<List<System.String>>.</returns> - Task<List<string>> GetServerItemIds(string serverId, SyncTarget target, CancellationToken cancellationToken); + /// <returns>Task.</returns> + Task<SendFileResult> SendFile(Stream stream, string remotePath, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken); /// <summary> - /// Removes the item. + /// Deletes the file. /// </summary> - /// <param name="serverId">The server identifier.</param> - /// <param name="itemId">The item identifier.</param> + /// <param name="path">The path.</param> /// <param name="target">The target.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task.</returns> - Task DeleteItem(string serverId, string itemId, SyncTarget target, CancellationToken cancellationToken); + Task DeleteFile(string path, SyncTarget target, CancellationToken cancellationToken); /// <summary> - /// Transfers the file. + /// Gets the file. /// </summary> - /// <param name="serverId">The server identifier.</param> - /// <param name="itemId">The item identifier.</param> - /// <param name="pathParts">The path parts.</param> - /// <param name="name">The name.</param> - /// <param name="fileType">Type of the file.</param> + /// <param name="path">The path.</param> /// <param name="target">The target.</param> + /// <param name="progress">The progress.</param> /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>Task.</returns> - Task TransferItemFile(string serverId, string itemId, string[] pathParts, string name, ItemFileType fileType, SyncTarget target, CancellationToken cancellationToken); + /// <returns>Task<Stream>.</returns> + Task<Stream> GetFile(string path, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken); + + /// <summary> + /// Gets the full path. + /// </summary> + /// <param name="path">The path.</param> + /// <param name="target">The target.</param> + /// <returns>System.String.</returns> + string GetFullPath(IEnumerable<string> path, SyncTarget target); + + /// <summary> + /// Gets the parent directory path. + /// </summary> + /// <param name="path">The path.</param> + /// <param name="target">The target.</param> + /// <returns>System.String.</returns> + string GetParentDirectoryPath(string path, SyncTarget target); + + /// <summary> + /// Gets the file system entries. + /// </summary> + /// <param name="path">The path.</param> + /// <param name="target">The target.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task<List<DeviceFileInfo>>.</returns> + Task<List<DeviceFileInfo>> GetFileSystemEntries(string path, SyncTarget target, CancellationToken cancellationToken); } } |
