IServerSyncProvider.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. using MediaBrowser.Model.Sync;
  2. using System;
  3. using System.IO;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. namespace MediaBrowser.Controller.Sync
  7. {
  8. public interface IServerSyncProvider : ISyncProvider
  9. {
  10. /// <summary>
  11. /// Transfers the file.
  12. /// </summary>
  13. /// <param name="inputFile">The input file.</param>
  14. /// <param name="pathParts">The path parts.</param>
  15. /// <param name="target">The target.</param>
  16. /// <param name="progress">The progress.</param>
  17. /// <param name="cancellationToken">The cancellation token.</param>
  18. /// <returns>Task.</returns>
  19. Task SendFile(string inputFile, string[] pathParts, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
  20. /// <summary>
  21. /// Gets the file.
  22. /// </summary>
  23. /// <param name="pathParts">The path parts.</param>
  24. /// <param name="target">The target.</param>
  25. /// <param name="progress">The progress.</param>
  26. /// <param name="cancellationToken">The cancellation token.</param>
  27. /// <returns>Task&lt;Stream&gt;.</returns>
  28. Task<Stream> GetFile(string[] pathParts, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
  29. }
  30. }