jellyfin-server/MediaBrowser.Controller/Devices/IDeviceManager.cs

58 lines
1.8 KiB
C#
Raw Normal View History

#nullable disable
#pragma warning disable CS1591
using System;
2021-04-10 20:17:36 +00:00
using System.Threading.Tasks;
2020-05-13 02:10:35 +00:00
using Jellyfin.Data.Entities;
2021-04-10 20:17:36 +00:00
using Jellyfin.Data.Entities.Security;
using Jellyfin.Data.Events;
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
{
event EventHandler<GenericEventArgs<Tuple<string, DeviceOptions>>> DeviceOptionsUpdated;
2018-12-27 23:27:57 +00:00
/// <summary>
/// Saves the capabilities.
/// </summary>
2021-04-10 21:11:59 +00:00
/// <param name="deviceId">The device id.</param>
2018-12-27 23:27:57 +00:00
/// <param name="capabilities">The capabilities.</param>
2021-04-10 21:11:59 +00:00
void SaveCapabilities(string deviceId, ClientCapabilities capabilities);
2018-12-27 23:27:57 +00:00
/// <summary>
/// Gets the capabilities.
/// </summary>
2021-04-10 21:11:59 +00:00
/// <param name="deviceId">The device id.</param>
2018-12-27 23:27:57 +00:00
/// <returns>ClientCapabilities.</returns>
2021-04-10 21:11:59 +00:00
ClientCapabilities GetCapabilities(string deviceId);
2018-12-27 23:27:57 +00:00
/// <summary>
/// Gets the device information.
/// </summary>
/// <param name="id">The identifier.</param>
/// <returns>DeviceInfo.</returns>
2021-04-10 20:17:36 +00:00
Task<DeviceInfo> GetDevice(string id);
2018-12-27 23:27:57 +00:00
/// <summary>
/// Gets the devices.
/// </summary>
/// <param name="query">The query.</param>
/// <returns>IEnumerable&lt;DeviceInfo&gt;.</returns>
2021-04-10 20:17:36 +00:00
Task<QueryResult<DeviceInfo>> GetDevices(DeviceQuery query);
2018-12-27 23:27:57 +00:00
/// <summary>
/// Determines whether this instance [can access device] the specified user identifier.
/// </summary>
bool CanAccessDevice(User user, string deviceId);
2021-04-10 20:17:36 +00:00
Task UpdateDeviceOptions(string deviceId, DeviceOptions options);
2021-04-10 20:57:25 +00:00
Task<DeviceOptions> GetDeviceOptions(string deviceId);
2018-12-27 23:27:57 +00:00
}
}