You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Controller/Sync/IServerSyncProvider.cs

59 lines
2.3 KiB

using MediaBrowser.Model.Sync;
10 years ago
using System;
using System.Collections.Generic;
10 years ago
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Sync
{
public interface IServerSyncProvider : ISyncProvider
{
/// <summary>
10 years ago
/// Transfers the file.
/// </summary>
/// <param name="stream">The stream.</param>
/// <param name="remotePath">The remote path.</param>
/// <param name="target">The target.</param>
10 years ago
/// <param name="progress">The progress.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
10 years ago
Task<SyncedFileInfo> SendFile(Stream stream, string remotePath, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
/// <summary>
/// Deletes the file.
/// </summary>
/// <param name="path">The path.</param>
/// <param name="target">The target.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task DeleteFile(string path, SyncTarget target, CancellationToken cancellationToken);
/// <summary>
10 years ago
/// Gets the file.
/// </summary>
/// <param name="path">The path.</param>
/// <param name="target">The target.</param>
10 years ago
/// <param name="progress">The progress.</param>
/// <param name="cancellationToken">The cancellation token.</param>
10 years ago
/// <returns>Task&lt;Stream&gt;.</returns>
Task<Stream> GetFile(string path, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
/// <summary>
/// Gets the full path.
/// </summary>
/// <param name="path">The path.</param>
/// <param name="target">The target.</param>
/// <returns>System.String.</returns>
string GetFullPath(IEnumerable<string> path, SyncTarget target);
/// <summary>
/// Gets the parent directory path.
/// </summary>
/// <param name="path">The path.</param>
/// <param name="target">The target.</param>
/// <returns>System.String.</returns>
string GetParentDirectoryPath(string path, SyncTarget target);
}
}