ICloudSyncProvider.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using MediaBrowser.Model.Sync;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.IO;
  5. using System.Threading;
  6. using System.Threading.Tasks;
  7. namespace MediaBrowser.Controller.Sync
  8. {
  9. public interface ICloudSyncProvider
  10. {
  11. /// <summary>
  12. /// Gets the name.
  13. /// </summary>
  14. /// <value>The name.</value>
  15. string Name { get; }
  16. /// <summary>
  17. /// Gets the synchronize targets.
  18. /// </summary>
  19. /// <param name="userId">The user identifier.</param>
  20. /// <returns>IEnumerable&lt;SyncTarget&gt;.</returns>
  21. IEnumerable<SyncTarget> GetSyncTargets(string userId);
  22. /// <summary>
  23. /// Transfers the item file.
  24. /// </summary>
  25. /// <param name="inputFile">The input file.</param>
  26. /// <param name="pathParts">The path parts.</param>
  27. /// <param name="target">The target.</param>
  28. /// <param name="progress">The progress.</param>
  29. /// <param name="cancellationToken">The cancellation token.</param>
  30. /// <returns>Task.</returns>
  31. Task SendFile(string inputFile, string[] pathParts, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
  32. /// <summary>
  33. /// Gets the file.
  34. /// </summary>
  35. /// <param name="pathParts">The path parts.</param>
  36. /// <param name="target">The target.</param>
  37. /// <param name="progress">The progress.</param>
  38. /// <param name="cancellationToken">The cancellation token.</param>
  39. /// <returns>Task&lt;Stream&gt;.</returns>
  40. Task<Stream> GetFile(string[] pathParts, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
  41. }
  42. }