using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Sync;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.IO;
namespace MediaBrowser.Controller.Sync
{
public interface IServerSyncProvider : ISyncProvider
{
///
/// Transfers the file.
///
/// The stream.
/// The path parts.
/// The target.
/// The progress.
/// The cancellation token.
/// Task.
Task SendFile(Stream stream, string[] pathParts, SyncTarget target, IProgress progress, CancellationToken cancellationToken);
///
/// Deletes the file.
///
/// The identifier.
/// The target.
/// The cancellation token.
/// Task.
Task DeleteFile(string id, SyncTarget target, CancellationToken cancellationToken);
///
/// Gets the file.
///
/// The identifier.
/// The target.
/// The progress.
/// The cancellation token.
/// Task<Stream>.
Task GetFile(string id, SyncTarget target, IProgress progress, CancellationToken cancellationToken);
///
/// Gets the files.
///
Task> GetFiles(string id, SyncTarget target, CancellationToken cancellationToken);
Task> GetFiles(string[] pathParts, SyncTarget target, CancellationToken cancellationToken);
Task> GetFiles(SyncTarget target, CancellationToken cancellationToken);
}
public interface ISupportsDirectCopy
{
///
/// Sends the file.
///
/// The path.
/// The path parts.
/// The target.
/// The progress.
/// The cancellation token.
/// Task<SyncedFileInfo>.
Task SendFile(string path, string[] pathParts, SyncTarget target, IProgress progress, CancellationToken cancellationToken);
}
public interface IHasDuplicateCheck
{
///
/// Allows the duplicate job item.
///
/// The original.
/// The duplicate.
/// true if XXXX, false otherwise.
bool AllowDuplicateJobItem(SyncJobItem original, SyncJobItem duplicate);
}
}