using System;
using System.Collections.Generic;
using RGB.NET.Core;
using RGB.NET.Devices.Logitech.Native;
namespace RGB.NET.Devices.Logitech
{
///
/// Represents the update-queue performing updates for logitech zone devices.
///
public class LogitechZoneUpdateQueue : UpdateQueue
{
#region Constants
private static readonly Dictionary DEVICE_TYPE_MAPPING = new Dictionary
{
{RGBDeviceType.Keyboard, LogitechDeviceType.Keyboard},
{RGBDeviceType.Mouse, LogitechDeviceType.Mouse},
{RGBDeviceType.Headset, LogitechDeviceType.Headset},
{RGBDeviceType.Mousepad, LogitechDeviceType.Mousemat},
{RGBDeviceType.Speaker, LogitechDeviceType.Speaker}
};
#endregion
#region Properties & Fields
private readonly LogitechDeviceType _deviceType;
#endregion
#region Constructors
///
/// Initializes a new instance of the class.
///
/// The update trigger used by this queue.
/// The tpye of the device this queue is updating.
public LogitechZoneUpdateQueue(IDeviceUpdateTrigger updateTrigger, RGBDeviceType deviceType)
: base(updateTrigger)
{
if (!DEVICE_TYPE_MAPPING.TryGetValue(deviceType, out _deviceType))
throw new ArgumentException($"Invalid type '{deviceType.ToString()}'", nameof(deviceType));
}
#endregion
#region Methods
///
protected override void Update(Dictionary