Add GPL modules

This commit is contained in:
Andrew Rabert
2018-12-27 18:27:57 -05:00
parent 9bac3ac616
commit a86b71899e
648 changed files with 50005 additions and 123 deletions

View File

@@ -0,0 +1,18 @@
using MediaBrowser.Model.Sync;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Sync
{
public interface IHasDynamicAccess
{
/// <summary>
/// Gets the synced file information.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="target">The target.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;SyncedFileInfo&gt;.</returns>
Task<SyncedFileInfo> GetSyncedFileInfo(string id, SyncTarget target, CancellationToken cancellationToken);
}
}

View File

@@ -0,0 +1,10 @@

namespace MediaBrowser.Controller.Sync
{
/// <summary>
/// A marker interface
/// </summary>
public interface IRemoteSyncProvider
{
}
}

View File

@@ -0,0 +1,29 @@
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Sync;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.IO;
using MediaBrowser.Controller.Entities;
namespace MediaBrowser.Controller.Sync
{
public interface IServerSyncProvider : ISyncProvider
{
/// <summary>
/// Transfers the file.
/// </summary>
Task<SyncedFileInfo> SendFile(SyncJob syncJob, string originalMediaPath, Stream inputStream, bool isMedia, string[] outputPathParts, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
Task<QueryResult<FileSystemMetadata>> GetFiles(string[] directoryPathParts, SyncTarget target, CancellationToken cancellationToken);
}
public interface ISupportsDirectCopy
{
/// <summary>
/// Sends the file.
/// </summary>
Task<SyncedFileInfo> SendFile(SyncJob syncJob, string originalMediaPath, string inputPath, bool isMedia, string[] outputPathParts, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
}
}

View File

@@ -0,0 +1,27 @@
using MediaBrowser.Model.Sync;
using System.Collections.Generic;
namespace MediaBrowser.Controller.Sync
{
public interface ISyncProvider
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
string Name { get; }
/// <summary>
/// Gets the synchronize targets.
/// </summary>
/// <param name="userId">The user identifier.</param>
/// <returns>IEnumerable&lt;SyncTarget&gt;.</returns>
List<SyncTarget> GetSyncTargets(string userId);
/// <summary>
/// Gets all synchronize targets.
/// </summary>
/// <returns>IEnumerable&lt;SyncTarget&gt;.</returns>
List<SyncTarget> GetAllSyncTargets();
}
}

View File

@@ -0,0 +1,35 @@
using MediaBrowser.Model.MediaInfo;
using System.Collections.Generic;
namespace MediaBrowser.Controller.Sync
{
public class SyncedFileInfo
{
/// <summary>
/// Gets or sets the path.
/// </summary>
/// <value>The path.</value>
public string Path { get; set; }
public string[] PathParts { get; set; }
/// <summary>
/// Gets or sets the protocol.
/// </summary>
/// <value>The protocol.</value>
public MediaProtocol Protocol { get; set; }
/// <summary>
/// Gets or sets the required HTTP headers.
/// </summary>
/// <value>The required HTTP headers.</value>
public Dictionary<string, string> RequiredHttpHeaders { get; set; }
/// <summary>
/// Gets or sets the identifier.
/// </summary>
/// <value>The identifier.</value>
public string Id { get; set; }
public SyncedFileInfo()
{
RequiredHttpHeaders = new Dictionary<string, string>();
}
}
}