jellyfin-server/MediaBrowser.Controller/Sync/IServerSyncProvider.cs

67 lines
2.6 KiB
C#
Raw Normal View History

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