using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Dlna; 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; /// /// Creates the job. /// /// The request. /// Task. Task CreateJob(SyncJobRequest request); /// /// Gets the jobs. /// /// QueryResult<SyncJob>. Task> 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, IEnumerable itemIds); /// /// Adds the parts. /// void AddParts(IEnumerable providers); /// /// Gets the synchronize targets. /// IEnumerable 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); /// /// Marks the job item for removal. /// /// The identifier. /// Task. Task MarkJobItemForRemoval(string id); /// /// Unmarks the job item for removal. /// /// The identifier. /// Task. Task UnmarkJobItemForRemoval(string id); /// /// Gets the library item ids. /// /// The query. /// QueryResult<System.String>. QueryResult GetLibraryItemIds(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. /// IEnumerable<SyncQualityOption>. IEnumerable GetQualityOptions(string targetId); /// /// Gets the profile options. /// /// The target identifier. /// IEnumerable<SyncQualityOption>. IEnumerable GetProfileOptions(string targetId); } }