using System;
using System.Runtime.InteropServices;
using CUE.NET.Devices.Generic.Enums;
using CUE.NET.Native;
namespace CUE.NET.Devices.Generic
{
///
/// Represents generic information about a CUE device.
///
public class GenericDeviceInfo : IDeviceInfo
{
#region Properties & Fields
///
/// Gets the device type. ()
///
public CorsairDeviceType Type { get; }
///
/// Gets the device model (like “K95RGB”).
///
public string Model { get; }
///
/// Get a flag that describes device capabilities. ()
///
public CorsairDeviceCaps CapsMask { get; }
#endregion
#region Constructors
///
/// Internal constructor of managed .
///
/// The native -struct
internal GenericDeviceInfo(_CorsairDeviceInfo nativeInfo)
{
this.Type = nativeInfo.type;
this.Model = nativeInfo.model == IntPtr.Zero ? null : Marshal.PtrToStringAuto(nativeInfo.model);
this.CapsMask = (CorsairDeviceCaps)nativeInfo.capsMask;
}
#endregion
}
}