jellyfin/MediaBrowser.Controller/Sync/IServerSyncProvider.cs

59 lines
2.3 KiB
C#
Raw Normal View History

2015-02-05 06:29:37 +01:00
using MediaBrowser.Model.Sync;
2015-02-26 21:06:42 +01:00
using System;
2015-02-28 14:42:47 +01:00
using System.Collections.Generic;
2015-02-26 21:06:42 +01:00
using System.IO;
2015-02-05 06:29:37 +01:00
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Sync
{
public interface IServerSyncProvider : ISyncProvider
{
/// <summary>
2015-02-26 21:06:42 +01:00
/// Transfers the file.
2015-02-05 06:29:37 +01:00
/// </summary>
2015-03-08 05:44:31 +01:00
/// <param name="stream">The stream.</param>
/// <param name="remotePath">The remote path.</param>
2015-02-05 06:29:37 +01:00
/// <param name="target">The target.</param>
2015-02-26 21:06:42 +01:00
/// <param name="progress">The progress.</param>
2015-02-05 06:29:37 +01:00
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2015-03-28 06:07:29 +01:00
Task<SyncedFileInfo> SendFile(Stream stream, string remotePath, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
2015-02-28 14:42:47 +01:00
/// <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);
2015-02-05 06:29:37 +01:00
/// <summary>
2015-02-26 21:06:42 +01:00
/// Gets the file.
2015-02-05 06:29:37 +01:00
/// </summary>
2015-02-28 14:42:47 +01:00
/// <param name="path">The path.</param>
2015-02-05 06:29:37 +01:00
/// <param name="target">The target.</param>
2015-02-26 21:06:42 +01:00
/// <param name="progress">The progress.</param>
2015-02-05 06:29:37 +01:00
/// <param name="cancellationToken">The cancellation token.</param>
2015-02-26 21:06:42 +01:00
/// <returns>Task&lt;Stream&gt;.</returns>
2015-02-28 14:42:47 +01:00
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);
2015-02-05 06:29:37 +01:00
}
}