Top | ![]() |
![]() |
![]() |
![]() |
An LdmDMIDevice is a specialised implementation of the LdmDevice which is aware of DMI specific data. This class is never directly created by the user, but is instead returned by the LdmManager.
This class extends the base LdmDevice to add DMI specific data. This is almost exclusively used to provide platform identification and allow matching of specific hardware products (i.e. laptops) via their modalias.
Users can test if a device is a DMI device without having to cast, by simply checking the “device-type”:
1 2 3 4 5 6 7 8 |
if (ldm_device_has_type(device, LDM_DEVICE_TYPE_PLATFORM)) { g_message("Found PCI device"); } // Alternatively.. if (LDM_IS_DMI_DEVICE(device)) { g_message("Found PCI device through casting"); } |