2021-05-06 22:39:20 +00:00
|
|
|
#nullable disable
|
|
|
|
|
2020-08-22 19:56:24 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 20:01:16 +00:00
|
|
|
using System;
|
2020-05-13 02:10:35 +00:00
|
|
|
using Jellyfin.Data.Entities;
|
2020-08-14 00:48:28 +00:00
|
|
|
using Jellyfin.Data.Events;
|
2019-01-13 19:25:32 +00:00
|
|
|
using MediaBrowser.Model.Devices;
|
|
|
|
using MediaBrowser.Model.Querying;
|
|
|
|
using MediaBrowser.Model.Session;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Devices
|
|
|
|
{
|
|
|
|
public interface IDeviceManager
|
|
|
|
{
|
2020-08-22 19:56:24 +00:00
|
|
|
event EventHandler<GenericEventArgs<Tuple<string, DeviceOptions>>> DeviceOptionsUpdated;
|
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Saves the capabilities.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="reportedId">The reported identifier.</param>
|
|
|
|
/// <param name="capabilities">The capabilities.</param>
|
|
|
|
void 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>
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
/// <returns>IEnumerable<DeviceInfo>.</returns>
|
|
|
|
QueryResult<DeviceInfo> GetDevices(DeviceQuery query);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Determines whether this instance [can access device] the specified user identifier.
|
|
|
|
/// </summary>
|
2021-05-13 13:32:02 +00:00
|
|
|
/// <param name="user">The user to test.</param>
|
|
|
|
/// <param name="deviceId">The device id to test.</param>
|
|
|
|
/// <returns>Whether the user can access the device.</returns>
|
2018-12-27 23:27:57 +00:00
|
|
|
bool CanAccessDevice(User user, string deviceId);
|
|
|
|
|
|
|
|
void UpdateDeviceOptions(string deviceId, DeviceOptions options);
|
2020-08-22 19:56:24 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
DeviceOptions GetDeviceOptions(string deviceId);
|
|
|
|
}
|
|
|
|
}
|