using MediaBrowser.Model.Devices;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Session;
using System;
using System.IO;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Devices
{
public interface IDeviceManager
{
///
/// Occurs when [device options updated].
///
event EventHandler> DeviceOptionsUpdated;
///
/// Occurs when [camera image uploaded].
///
event EventHandler> CameraImageUploaded;
///
/// Registers the device.
///
/// The reported identifier.
/// The name.
/// Name of the application.
/// The application version.
/// The used by user identifier.
/// Task.
DeviceInfo RegisterDevice(string reportedId, string name, string appName, string appVersion, string usedByUserId);
///
/// Saves the capabilities.
///
/// The reported identifier.
/// The capabilities.
/// Task.
void SaveCapabilities(string reportedId, ClientCapabilities capabilities);
///
/// Gets the capabilities.
///
/// The reported identifier.
/// ClientCapabilities.
ClientCapabilities GetCapabilities(string reportedId);
///
/// Gets the device information.
///
/// The identifier.
/// DeviceInfo.
DeviceInfo GetDevice(string id);
///
/// Updates the device information.
///
/// The identifier.
/// The options.
/// Task.
void UpdateDeviceInfo(string id, DeviceOptions options);
///
/// Gets the devices.
///
/// The query.
/// IEnumerable<DeviceInfo>.
QueryResult GetDevices(DeviceQuery query);
void DeleteDevice(string id);
///
/// Gets the upload history.
///
/// The device identifier.
/// ContentUploadHistory.
ContentUploadHistory GetCameraUploadHistory(string deviceId);
///
/// Accepts the upload.
///
/// The device identifier.
/// The stream.
/// The file.
/// Task.
Task AcceptCameraUpload(string deviceId, Stream stream, LocalFileInfo file);
///
/// Determines whether this instance [can access device] the specified user identifier.
///
/// The user identifier.
/// The device identifier.
/// true if this instance [can access device] the specified user identifier; otherwise, false.
bool CanAccessDevice(string userId, string deviceId);
}
}