mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-17 13:10:28 +01:00
add device upload options
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using MediaBrowser.Model.Channels;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Devices;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Events;
|
||||
@@ -793,17 +794,23 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// <value>The type of the client.</value>
|
||||
string ClientName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the device.
|
||||
/// </summary>
|
||||
/// <value>The device.</value>
|
||||
IDevice Device { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the device.
|
||||
/// </summary>
|
||||
/// <value>The name of the device.</value>
|
||||
string DeviceName { get; set; }
|
||||
string DeviceName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the device id.
|
||||
/// </summary>
|
||||
/// <value>The device id.</value>
|
||||
string DeviceId { get; set; }
|
||||
string DeviceId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current user id.
|
||||
@@ -1319,5 +1326,29 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// <returns>Task.</returns>
|
||||
Task SendContextMessageAsync(string itemType, string itemId, string itemName, string context,
|
||||
CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content upload history.
|
||||
/// </summary>
|
||||
/// <param name="deviceId">The device identifier.</param>
|
||||
/// <returns>Task<ContentUploadHistory>.</returns>
|
||||
Task<ContentUploadHistory> GetContentUploadHistory(string deviceId);
|
||||
|
||||
/// <summary>
|
||||
/// Uploads the file.
|
||||
/// </summary>
|
||||
/// <param name="stream">The stream.</param>
|
||||
/// <param name="file">The file.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task UploadFile(Stream stream,
|
||||
LocalFileInfo file,
|
||||
CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the devices options options.
|
||||
/// </summary>
|
||||
/// <returns>Task<DevicesOptions>.</returns>
|
||||
Task<DevicesOptions> GetDevicesOptions();
|
||||
}
|
||||
}
|
||||
44
MediaBrowser.Model/ApiClient/IDevice.cs
Normal file
44
MediaBrowser.Model/ApiClient/IDevice.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using MediaBrowser.Model.Devices;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Model.ApiClient
|
||||
{
|
||||
public interface IDevice
|
||||
{
|
||||
/// <summary>
|
||||
/// Occurs when [resume from sleep].
|
||||
/// </summary>
|
||||
event EventHandler<EventArgs> ResumeFromSleep;
|
||||
/// <summary>
|
||||
/// Gets the name of the device.
|
||||
/// </summary>
|
||||
/// <value>The name of the device.</value>
|
||||
string DeviceName { get; }
|
||||
/// <summary>
|
||||
/// Gets the device identifier.
|
||||
/// </summary>
|
||||
/// <value>The device identifier.</value>
|
||||
string DeviceId { get; }
|
||||
/// <summary>
|
||||
/// Gets the local images.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable<LocalFileInfo>.</returns>
|
||||
IEnumerable<LocalFileInfo> GetLocalPhotos();
|
||||
/// <summary>
|
||||
/// Gets the local videos.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable<LocalFileInfo>.</returns>
|
||||
IEnumerable<LocalFileInfo> GetLocalVideos();
|
||||
/// <summary>
|
||||
/// Uploads the file.
|
||||
/// </summary>
|
||||
/// <param name="file">The file.</param>
|
||||
/// <param name="apiClient">The API client.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task UploadFile(LocalFileInfo file, IApiClient apiClient, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user