ISyncManager.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using MediaBrowser.Controller.Entities;
  2. using MediaBrowser.Model.Querying;
  3. using MediaBrowser.Model.Sync;
  4. using System.Collections.Generic;
  5. using System.Threading.Tasks;
  6. namespace MediaBrowser.Controller.Sync
  7. {
  8. public interface ISyncManager
  9. {
  10. /// <summary>
  11. /// Creates the job.
  12. /// </summary>
  13. /// <param name="request">The request.</param>
  14. /// <returns>Task.</returns>
  15. Task<SyncJobCreationResult> CreateJob(SyncJobRequest request);
  16. /// <summary>
  17. /// Gets the jobs.
  18. /// </summary>
  19. /// <returns>QueryResult&lt;SyncJob&gt;.</returns>
  20. QueryResult<SyncJob> GetJobs(SyncJobQuery query);
  21. /// <summary>
  22. /// Gets the job.
  23. /// </summary>
  24. /// <param name="id">The identifier.</param>
  25. /// <returns>SyncJob.</returns>
  26. SyncJob GetJob(string id);
  27. /// <summary>
  28. /// Cancels the job.
  29. /// </summary>
  30. /// <param name="id">The identifier.</param>
  31. /// <returns>Task.</returns>
  32. Task CancelJob(string id);
  33. /// <summary>
  34. /// Adds the parts.
  35. /// </summary>
  36. void AddParts(IEnumerable<ISyncProvider> providers);
  37. /// <summary>
  38. /// Gets the synchronize targets.
  39. /// </summary>
  40. IEnumerable<SyncTarget> GetSyncTargets(string userId);
  41. /// <summary>
  42. /// Supportses the synchronize.
  43. /// </summary>
  44. /// <param name="item">The item.</param>
  45. /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
  46. bool SupportsSync(BaseItem item);
  47. }
  48. }