2014-12-11 06:20:28 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2014-12-13 03:56:30 +00:00
|
|
|
|
using MediaBrowser.Model.Dlna;
|
2014-07-22 16:36:34 +00:00
|
|
|
|
using MediaBrowser.Model.Querying;
|
2014-07-15 04:12:26 +00:00
|
|
|
|
using MediaBrowser.Model.Sync;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Sync
|
|
|
|
|
{
|
|
|
|
|
public interface ISyncManager
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates the job.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request">The request.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2014-07-26 17:30:15 +00:00
|
|
|
|
Task<SyncJobCreationResult> CreateJob(SyncJobRequest request);
|
2014-07-15 04:12:26 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the jobs.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>QueryResult<SyncJob>.</returns>
|
|
|
|
|
QueryResult<SyncJob> GetJobs(SyncJobQuery query);
|
|
|
|
|
|
2014-12-17 05:52:34 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the job items.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
/// <returns>QueryResult<SyncJobItem>.</returns>
|
|
|
|
|
QueryResult<SyncJobItem> GetJobItems(SyncJobItemQuery query);
|
|
|
|
|
|
2014-07-17 22:21:35 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the job.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
/// <returns>SyncJob.</returns>
|
|
|
|
|
SyncJob GetJob(string id);
|
2014-12-13 03:56:30 +00:00
|
|
|
|
|
2014-07-15 04:12:26 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Cancels the job.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task CancelJob(string id);
|
|
|
|
|
|
2014-07-22 01:29:06 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Adds the parts.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void AddParts(IEnumerable<ISyncProvider> providers);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the synchronize targets.
|
|
|
|
|
/// </summary>
|
2014-07-22 16:36:34 +00:00
|
|
|
|
IEnumerable<SyncTarget> GetSyncTargets(string userId);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Supportses the synchronize.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
|
|
|
|
bool SupportsSync(BaseItem item);
|
2014-12-13 03:56:30 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the device profile.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="targetId">The target identifier.</param>
|
|
|
|
|
/// <returns>DeviceProfile.</returns>
|
|
|
|
|
DeviceProfile GetDeviceProfile(string targetId);
|
2014-12-17 05:30:31 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Reports the synchronize job item transferred.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task ReportSyncJobItemTransferred(string id);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the job item.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
/// <returns>SyncJobItem.</returns>
|
|
|
|
|
SyncJobItem GetJobItem(string id);
|
2014-07-15 04:12:26 +00:00
|
|
|
|
}
|
|
|
|
|
}
|