using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Events; using MediaBrowser.Model.Querying; using MediaBrowser.Model.Sync; using MediaBrowser.Model.Users; using System; using System.Collections.Generic; using System.Threading.Tasks; namespace MediaBrowser.Controller.Sync { public interface ISyncManager { event EventHandler> SyncJobCreated; event EventHandler> SyncJobCancelled; event EventHandler> SyncJobUpdated; event EventHandler> SyncJobItemUpdated; event EventHandler> SyncJobItemCreated; event EventHandler> SyncJobItemCancelled; /// /// Creates the job. /// /// The request. /// Task. Task CreateJob(SyncJobRequest request); /// /// Gets the jobs. /// /// QueryResult<SyncJob>. QueryResult GetJobs(SyncJobQuery query); /// /// Gets the job items. /// /// The query. /// QueryResult<SyncJobItem>. QueryResult GetJobItems(SyncJobItemQuery query); /// /// Gets the job. /// /// The identifier. /// SyncJob. SyncJob GetJob(string id); /// /// Updates the job. /// /// The job. /// Task. Task UpdateJob(SyncJob job); /// /// Res the enable job item. /// /// The identifier. /// Task. Task ReEnableJobItem(string id); /// /// Cnacels the job item. /// /// The identifier. /// Task. Task CancelJobItem(string id); /// /// Cancels the job. /// /// The identifier. /// Task. Task CancelJob(string id); /// /// Cancels the items. /// /// The target identifier. /// The item ids. /// Task. Task CancelItems(string targetId, string[] itemIds); /// /// Adds the parts. /// void AddParts(IEnumerable providers); /// /// Gets the synchronize targets. /// List GetSyncTargets(string userId); /// /// Supportses the synchronize. /// /// The item. /// true if XXXX, false otherwise. bool SupportsSync(BaseItem item); /// /// Reports the synchronize job item transferred. /// /// The identifier. /// Task. Task ReportSyncJobItemTransferred(string id); /// /// Gets the job item. /// /// The identifier. /// SyncJobItem. SyncJobItem GetJobItem(string id); /// /// Reports the offline action. /// /// The action. /// Task. Task ReportOfflineAction(UserAction action); /// /// Gets the ready synchronize items. /// /// The target identifier. /// List<SyncedItem>. Task> GetReadySyncItems(string targetId); /// /// Synchronizes the data. /// /// The request. /// Task<SyncDataResponse>. Task SyncData(SyncDataRequest request); /// /// Gets the library item ids. /// /// The query. /// QueryResult<System.String>. Dictionary GetSyncedItemProgresses(SyncJobItemQuery query); /// /// Reports the synchronize job item transfer beginning. /// /// The identifier. /// Task. Task ReportSyncJobItemTransferBeginning(string id); /// /// Reports the synchronize job item transfer failed. /// /// The identifier. /// Task. Task ReportSyncJobItemTransferFailed(string id); /// /// Gets the quality options. /// /// The target identifier. List GetQualityOptions(string targetId); /// /// Gets the quality options. /// /// The target identifier. /// The user. List GetQualityOptions(string targetId, User user); /// /// Gets the profile options. /// /// The target identifier. List GetProfileOptions(string targetId); /// /// Gets the profile options. /// /// The target identifier. /// The user. List GetProfileOptions(string targetId, User user); } }