using System;
using System.Threading.Tasks;
using Jellyfin.Data.Dtos;
using Jellyfin.Data.Events;
using Jellyfin.Data.Queries;
using Jellyfin.Database.Implementations.Entities;
using Jellyfin.Database.Implementations.Entities.Security;
using MediaBrowser.Model.Devices;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Session;
namespace MediaBrowser.Controller.Devices;
/// 
/// Device manager interface.
/// 
public interface IDeviceManager
{
    /// 
    /// Event handler for updated device options.
    /// 
    event EventHandler>> DeviceOptionsUpdated;
    /// 
    /// Creates a new device.
    /// 
    /// The device to create.
    /// A  representing the creation of the device.
    Task CreateDevice(Device device);
    /// 
    /// Saves the capabilities.
    /// 
    /// The device id.
    /// The capabilities.
    void SaveCapabilities(string deviceId, ClientCapabilities capabilities);
    /// 
    /// Gets the capabilities.
    /// 
    /// The device id.
    /// ClientCapabilities.
    ClientCapabilities GetCapabilities(string? deviceId);
    /// 
    /// Gets the device information.
    /// 
    /// The identifier.
    /// DeviceInfoDto.
    DeviceInfoDto? GetDevice(string id);
    /// 
    /// Gets devices based on the provided query.
    /// 
    /// The device query.
    /// A  representing the retrieval of the devices.
    QueryResult GetDevices(DeviceQuery query);
    /// 
    /// Gets device information based on the provided query.
    /// 
    /// The device query.
    /// A  representing the retrieval of the device information.
    QueryResult GetDeviceInfos(DeviceQuery query);
    /// 
    /// Gets the device information.
    /// 
    /// The user's id, or null.
    /// IEnumerable<DeviceInfoDto>.
    QueryResult GetDevicesForUser(Guid? userId);
    /// 
    /// Deletes a device.
    /// 
    /// The device.
    /// A  representing the deletion of the device.
    Task DeleteDevice(Device device);
    /// 
    /// Updates a device.
    /// 
    /// The device.
    /// A  representing the update of the device.
    Task UpdateDevice(Device device);
    /// 
    /// Determines whether this instance [can access device] the specified user identifier.
    /// 
    /// The user to test.
    /// The device id to test.
    /// Whether the user can access the device.
    bool CanAccessDevice(User user, string deviceId);
    /// 
    /// Updates the options of a device.
    /// 
    /// The device id.
    /// The device name.
    /// A  representing the update of the device options.
    Task UpdateDeviceOptions(string deviceId, string? deviceName);
    /// 
    /// Gets the options of a device.
    /// 
    /// The device id.
    ///  of the device.
    DeviceOptionsDto? GetDeviceOptions(string deviceId);
    /// 
    /// Gets the dto for client capabilities.
    /// 
    /// The client capabilities.
    ///  of the device.
    ClientCapabilitiesDto ToClientCapabilitiesDto(ClientCapabilities capabilities);
}