mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-11 08:43:01 +01:00
add device upload options
This commit is contained in:
71
MediaBrowser.Controller/Devices/IDeviceManager.cs
Normal file
71
MediaBrowser.Controller/Devices/IDeviceManager.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using MediaBrowser.Model.Devices;
|
||||
using MediaBrowser.Model.Session;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Devices
|
||||
{
|
||||
public interface IDeviceManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Registers the device.
|
||||
/// </summary>
|
||||
/// <param name="reportedId">The reported identifier.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="usedByUserId">The used by user identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task RegisterDevice(string reportedId, string name, string usedByUserId);
|
||||
|
||||
/// <summary>
|
||||
/// Saves the capabilities.
|
||||
/// </summary>
|
||||
/// <param name="reportedId">The reported identifier.</param>
|
||||
/// <param name="capabilities">The capabilities.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SaveCapabilities(string reportedId, ClientCapabilities capabilities);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the capabilities.
|
||||
/// </summary>
|
||||
/// <param name="reportedId">The reported identifier.</param>
|
||||
/// <returns>ClientCapabilities.</returns>
|
||||
ClientCapabilities GetCapabilities(string reportedId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the device information.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>DeviceInfo.</returns>
|
||||
DeviceInfo GetDevice(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the devices.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable<DeviceInfo>.</returns>
|
||||
IEnumerable<DeviceInfo> GetDevices();
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the device.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task DeleteDevice(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the upload history.
|
||||
/// </summary>
|
||||
/// <param name="deviceId">The device identifier.</param>
|
||||
/// <returns>ContentUploadHistory.</returns>
|
||||
ContentUploadHistory GetCameraUploadHistory(string deviceId);
|
||||
|
||||
/// <summary>
|
||||
/// Accepts the upload.
|
||||
/// </summary>
|
||||
/// <param name="deviceId">The device identifier.</param>
|
||||
/// <param name="stream">The stream.</param>
|
||||
/// <param name="file">The file.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task AcceptCameraUpload(string deviceId, Stream stream, LocalFileInfo file);
|
||||
}
|
||||
}
|
||||
66
MediaBrowser.Controller/Devices/IDeviceRepository.cs
Normal file
66
MediaBrowser.Controller/Devices/IDeviceRepository.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using MediaBrowser.Model.Devices;
|
||||
using MediaBrowser.Model.Session;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Devices
|
||||
{
|
||||
public interface IDeviceRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// Registers the device.
|
||||
/// </summary>
|
||||
/// <param name="device">The device.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SaveDevice(DeviceInfo device);
|
||||
|
||||
/// <summary>
|
||||
/// Saves the capabilities.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="capabilities">The capabilities.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SaveCapabilities(string id, ClientCapabilities capabilities);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the capabilities.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>ClientCapabilities.</returns>
|
||||
ClientCapabilities GetCapabilities(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the device information.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>DeviceInfo.</returns>
|
||||
DeviceInfo GetDevice(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the devices.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable<DeviceInfo>.</returns>
|
||||
IEnumerable<DeviceInfo> GetDevices();
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the device.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task DeleteDevice(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the upload history.
|
||||
/// </summary>
|
||||
/// <param name="deviceId">The device identifier.</param>
|
||||
/// <returns>ContentUploadHistory.</returns>
|
||||
ContentUploadHistory GetCameraUploadHistory(string deviceId);
|
||||
|
||||
/// <summary>
|
||||
/// Saves the camera upload history.
|
||||
/// </summary>
|
||||
/// <param name="deviceId">The device identifier.</param>
|
||||
/// <param name="file">The file.</param>
|
||||
void AddCameraUpload(string deviceId, LocalFileInfo file);
|
||||
}
|
||||
}
|
||||
@@ -102,6 +102,8 @@
|
||||
<Compile Include="Connect\ConnectUser.cs" />
|
||||
<Compile Include="Connect\IConnectManager.cs" />
|
||||
<Compile Include="Connect\UserLinkResult.cs" />
|
||||
<Compile Include="Devices\IDeviceManager.cs" />
|
||||
<Compile Include="Devices\IDeviceRepository.cs" />
|
||||
<Compile Include="Dlna\ControlRequest.cs" />
|
||||
<Compile Include="Dlna\ControlResponse.cs" />
|
||||
<Compile Include="Dlna\DlnaIconResponse.cs" />
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// </summary>
|
||||
/// <param name="sessionId">The session identifier.</param>
|
||||
/// <param name="capabilities">The capabilities.</param>
|
||||
void ReportCapabilities(string sessionId, SessionCapabilities capabilities);
|
||||
void ReportCapabilities(string sessionId, ClientCapabilities capabilities);
|
||||
|
||||
/// <summary>
|
||||
/// Reports the transcoding information.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using System.IO;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Devices;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using MediaBrowser.Model.Sync;
|
||||
using System.Collections.Generic;
|
||||
|
||||
Reference in New Issue
Block a user