From a86b71899ec52c44ddc6c3018e8cc5e9d7ff4d62 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Thu, 27 Dec 2018 18:27:57 -0500 Subject: Add GPL modules --- .../Devices/CameraImageUploadInfo.cs | 10 +++ MediaBrowser.Controller/Devices/IDeviceManager.cs | 73 ++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 MediaBrowser.Controller/Devices/CameraImageUploadInfo.cs create mode 100644 MediaBrowser.Controller/Devices/IDeviceManager.cs (limited to 'MediaBrowser.Controller/Devices') diff --git a/MediaBrowser.Controller/Devices/CameraImageUploadInfo.cs b/MediaBrowser.Controller/Devices/CameraImageUploadInfo.cs new file mode 100644 index 0000000000..b3f3bb9025 --- /dev/null +++ b/MediaBrowser.Controller/Devices/CameraImageUploadInfo.cs @@ -0,0 +1,10 @@ +using MediaBrowser.Model.Devices; + +namespace MediaBrowser.Controller.Devices +{ + public class CameraImageUploadInfo + { + public LocalFileInfo FileInfo { get; set; } + public DeviceInfo Device { get; set; } + } +} diff --git a/MediaBrowser.Controller/Devices/IDeviceManager.cs b/MediaBrowser.Controller/Devices/IDeviceManager.cs new file mode 100644 index 0000000000..d29fb8ded0 --- /dev/null +++ b/MediaBrowser.Controller/Devices/IDeviceManager.cs @@ -0,0 +1,73 @@ +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; +using MediaBrowser.Controller.Entities; + +namespace MediaBrowser.Controller.Devices +{ + public interface IDeviceManager + { + /// + /// Occurs when [camera image uploaded]. + /// + event EventHandler> CameraImageUploaded; + + /// + /// 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); + + /// + /// Gets the devices. + /// + /// The query. + /// IEnumerable<DeviceInfo>. + QueryResult GetDevices(DeviceQuery query); + + /// + /// 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. + /// + bool CanAccessDevice(User user, string deviceId); + + void UpdateDeviceOptions(string deviceId, DeviceOptions options); + DeviceOptions GetDeviceOptions(string deviceId); + event EventHandler>> DeviceOptionsUpdated; + } +} -- cgit v1.2.3