IServerSyncProvider.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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="path">The path.</param>
  32. /// <param name="target">The target.</param>
  33. /// <param name="cancellationToken">The cancellation token.</param>
  34. /// <returns>Task.</returns>
  35. Task TransferItemFile(string serverId, string itemId, string path, SyncTarget target, CancellationToken cancellationToken);
  36. /// <summary>
  37. /// Transfers the related file.
  38. /// </summary>
  39. /// <param name="serverId">The server identifier.</param>
  40. /// <param name="itemId">The item identifier.</param>
  41. /// <param name="path">The path.</param>
  42. /// <param name="type">The type.</param>
  43. /// <param name="target">The target.</param>
  44. /// <param name="cancellationToken">The cancellation token.</param>
  45. /// <returns>Task.</returns>
  46. Task TransferRelatedFile(string serverId, string itemId, string path, ItemFileType type, SyncTarget target, CancellationToken cancellationToken);
  47. }
  48. }