From 9fdaa039c4b1e95842a219499f80ac963bbdb91e Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 13 Oct 2017 15:18:05 -0400 Subject: rework device repository --- MediaBrowser.Controller/Devices/IDeviceManager.cs | 13 ++++--------- MediaBrowser.Controller/Devices/IDeviceRepository.cs | 13 ++++--------- 2 files changed, 8 insertions(+), 18 deletions(-) (limited to 'MediaBrowser.Controller/Devices') diff --git a/MediaBrowser.Controller/Devices/IDeviceManager.cs b/MediaBrowser.Controller/Devices/IDeviceManager.cs index 2846bcfc64..676db09aa7 100644 --- a/MediaBrowser.Controller/Devices/IDeviceManager.cs +++ b/MediaBrowser.Controller/Devices/IDeviceManager.cs @@ -28,7 +28,7 @@ namespace MediaBrowser.Controller.Devices /// The application version. /// The used by user identifier. /// Task. - Task RegisterDevice(string reportedId, string name, string appName, string appVersion, string usedByUserId); + DeviceInfo RegisterDevice(string reportedId, string name, string appName, string appVersion, string usedByUserId); /// /// Saves the capabilities. @@ -36,7 +36,7 @@ namespace MediaBrowser.Controller.Devices /// The reported identifier. /// The capabilities. /// Task. - Task SaveCapabilities(string reportedId, ClientCapabilities capabilities); + void SaveCapabilities(string reportedId, ClientCapabilities capabilities); /// /// Gets the capabilities. @@ -58,7 +58,7 @@ namespace MediaBrowser.Controller.Devices /// The identifier. /// The options. /// Task. - Task UpdateDeviceInfo(string id, DeviceOptions options); + void UpdateDeviceInfo(string id, DeviceOptions options); /// /// Gets the devices. @@ -67,12 +67,7 @@ namespace MediaBrowser.Controller.Devices /// IEnumerable<DeviceInfo>. QueryResult GetDevices(DeviceQuery query); - /// - /// Deletes the device. - /// - /// The identifier. - /// Task. - Task DeleteDevice(string id); + void DeleteDevice(string id); /// /// Gets the upload history. diff --git a/MediaBrowser.Controller/Devices/IDeviceRepository.cs b/MediaBrowser.Controller/Devices/IDeviceRepository.cs index 736504da30..b9ebbb6c71 100644 --- a/MediaBrowser.Controller/Devices/IDeviceRepository.cs +++ b/MediaBrowser.Controller/Devices/IDeviceRepository.cs @@ -1,7 +1,6 @@ using MediaBrowser.Model.Devices; using MediaBrowser.Model.Session; using System.Collections.Generic; -using System.Threading.Tasks; namespace MediaBrowser.Controller.Devices { @@ -12,7 +11,7 @@ namespace MediaBrowser.Controller.Devices /// /// The device. /// Task. - Task SaveDevice(DeviceInfo device); + void SaveDevice(DeviceInfo device); /// /// Saves the capabilities. @@ -20,7 +19,7 @@ namespace MediaBrowser.Controller.Devices /// The identifier. /// The capabilities. /// Task. - Task SaveCapabilities(string id, ClientCapabilities capabilities); + void SaveCapabilities(string id, ClientCapabilities capabilities); /// /// Gets the capabilities. @@ -36,18 +35,14 @@ namespace MediaBrowser.Controller.Devices /// DeviceInfo. DeviceInfo GetDevice(string id); - /// - /// Gets the devices. - /// - /// IEnumerable<DeviceInfo>. - IEnumerable GetDevices(); + List GetDevices(); /// /// Deletes the device. /// /// The identifier. /// Task. - Task DeleteDevice(string id); + void DeleteDevice(string id); /// /// Gets the upload history. -- cgit v1.2.3