IServerSyncProvider.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 IServerSyncProvider : ISyncProvider
  10. {
  11. /// <summary>
  12. /// Transfers the file.
  13. /// </summary>
  14. /// <param name="inputFile">The input file.</param>
  15. /// <param name="path">The path.</param>
  16. /// <param name="target">The target.</param>
  17. /// <param name="progress">The progress.</param>
  18. /// <param name="cancellationToken">The cancellation token.</param>
  19. /// <returns>Task.</returns>
  20. Task SendFile(string inputFile, string path, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
  21. /// <summary>
  22. /// Deletes the file.
  23. /// </summary>
  24. /// <param name="path">The path.</param>
  25. /// <param name="target">The target.</param>
  26. /// <param name="cancellationToken">The cancellation token.</param>
  27. /// <returns>Task.</returns>
  28. Task DeleteFile(string path, SyncTarget target, CancellationToken cancellationToken);
  29. /// <summary>
  30. /// Gets the file.
  31. /// </summary>
  32. /// <param name="path">The path.</param>
  33. /// <param name="target">The target.</param>
  34. /// <param name="progress">The progress.</param>
  35. /// <param name="cancellationToken">The cancellation token.</param>
  36. /// <returns>Task&lt;Stream&gt;.</returns>
  37. Task<Stream> GetFile(string path, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
  38. /// <summary>
  39. /// Gets the full path.
  40. /// </summary>
  41. /// <param name="path">The path.</param>
  42. /// <param name="target">The target.</param>
  43. /// <returns>System.String.</returns>
  44. string GetFullPath(IEnumerable<string> path, SyncTarget target);
  45. /// <summary>
  46. /// Gets the parent directory path.
  47. /// </summary>
  48. /// <param name="path">The path.</param>
  49. /// <param name="target">The target.</param>
  50. /// <returns>System.String.</returns>
  51. string GetParentDirectoryPath(string path, SyncTarget target);
  52. /// <summary>
  53. /// Gets the file system entries.
  54. /// </summary>
  55. /// <param name="path">The path.</param>
  56. /// <param name="target">The target.</param>
  57. /// <returns>Task&lt;List&lt;DeviceFileInfo&gt;&gt;.</returns>
  58. Task<List<DeviceFileInfo>> GetFileSystemEntries(string path, SyncTarget target);
  59. /// <summary>
  60. /// Gets the data provider.
  61. /// </summary>
  62. /// <returns>ISyncDataProvider.</returns>
  63. ISyncDataProvider GetDataProvider();
  64. }
  65. }