IServerSyncProvider.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using MediaBrowser.Model.Sync;
  2. using System.Collections.Generic;
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. namespace MediaBrowser.Controller.Sync
  6. {
  7. public interface IServerSyncProvider : ISyncProvider
  8. {
  9. /// <summary>
  10. /// Gets the server item ids.
  11. /// </summary>
  12. /// <param name="serverId">The server identifier.</param>
  13. /// <param name="target">The target.</param>
  14. /// <param name="cancellationToken">The cancellation token.</param>
  15. /// <returns>Task&lt;List&lt;System.String&gt;&gt;.</returns>
  16. Task<List<string>> GetServerItemIds(string serverId, SyncTarget target, CancellationToken cancellationToken);
  17. /// <summary>
  18. /// Removes the item.
  19. /// </summary>
  20. /// <param name="serverId">The server identifier.</param>
  21. /// <param name="itemId">The item identifier.</param>
  22. /// <param name="target">The target.</param>
  23. /// <param name="cancellationToken">The cancellation token.</param>
  24. /// <returns>Task.</returns>
  25. Task DeleteItem(string serverId, string itemId, SyncTarget target, CancellationToken cancellationToken);
  26. /// <summary>
  27. /// Transfers the file.
  28. /// </summary>
  29. /// <param name="serverId">The server identifier.</param>
  30. /// <param name="itemId">The item identifier.</param>
  31. /// <param name="inputFile">The input file.</param>
  32. /// <param name="pathParts">The path parts.</param>
  33. /// <param name="target">The target.</param>
  34. /// <param name="cancellationToken">The cancellation token.</param>
  35. /// <returns>Task.</returns>
  36. Task TransferItemFile(string serverId, string itemId, string inputFile, string[] pathParts, SyncTarget target, CancellationToken cancellationToken);
  37. }
  38. }