mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 09:04:42 +01:00
Add GPL modules
This commit is contained in:
18
MediaBrowser.Controller/Sync/IHasDynamicAccess.cs
Normal file
18
MediaBrowser.Controller/Sync/IHasDynamicAccess.cs
Normal 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<SyncedFileInfo>.</returns>
|
||||
Task<SyncedFileInfo> GetSyncedFileInfo(string id, SyncTarget target, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
10
MediaBrowser.Controller/Sync/IRemoteSyncProvider.cs
Normal file
10
MediaBrowser.Controller/Sync/IRemoteSyncProvider.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
namespace MediaBrowser.Controller.Sync
|
||||
{
|
||||
/// <summary>
|
||||
/// A marker interface
|
||||
/// </summary>
|
||||
public interface IRemoteSyncProvider
|
||||
{
|
||||
}
|
||||
}
|
||||
29
MediaBrowser.Controller/Sync/IServerSyncProvider.cs
Normal file
29
MediaBrowser.Controller/Sync/IServerSyncProvider.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
27
MediaBrowser.Controller/Sync/ISyncProvider.cs
Normal file
27
MediaBrowser.Controller/Sync/ISyncProvider.cs
Normal 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<SyncTarget>.</returns>
|
||||
List<SyncTarget> GetSyncTargets(string userId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all synchronize targets.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable<SyncTarget>.</returns>
|
||||
List<SyncTarget> GetAllSyncTargets();
|
||||
}
|
||||
}
|
||||
35
MediaBrowser.Controller/Sync/SyncedFileInfo.cs
Normal file
35
MediaBrowser.Controller/Sync/SyncedFileInfo.cs
Normal 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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user