Add new timekeeping class to tdehwlib

Classify a number of new devices
pull/1/head
Timothy Pearson 9 years ago
parent 7fc4b62912
commit 6a0fb5c342

@ -1402,6 +1402,9 @@ TDEGenericDeviceType::TDEGenericDeviceType readGenericDeviceTypeFromString(TQStr
else if (query == "TestAndMeasurement") {
ret = TDEGenericDeviceType::TestAndMeasurement;
}
else if (query == "Timekeeping") {
ret = TDEGenericDeviceType::Timekeeping;
}
else if (query == "Event") {
ret = TDEGenericDeviceType::Event;
}
@ -2043,9 +2046,13 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
}
if ((devicetypestring == "audio")
|| (devicesubsystem == "sound")
|| (devicesubsystem == "hdaudio")
|| (devicesubsystem == "ac97")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Sound);
}
if (devicesubsystem == "container") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::OtherACPI);
}
if ((devicesubsystem == "video4linux")
|| (devicesubsystem == "dvb")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::VideoCapture);
@ -2089,10 +2096,19 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
|| (devicesubsystem == "amba")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
}
if (devicesubsystem == "edac") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::RAM);
}
if (devicesubsystem.startsWith("mc") && systempath.contains("/edac/")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::RAM);
}
if ((devicesubsystem == "ipmi")
|| (devicesubsystem == "ipmi_si")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Mainboard);
}
if (devicesubsystem == "iommu") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
}
if (devicesubsystem == "misc") {
if (devicedriver.startsWith("tpm_")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Cryptography);
@ -2101,6 +2117,15 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
}
}
if (devicesubsystem == "media") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
}
if (devicesubsystem == "nd") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::RAM);
}
if (devicesubsystem == "ptp") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Timekeeping);
}
if (devicesubsystem == "leds") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::OtherACPI);
}
@ -4116,6 +4141,9 @@ TQString TDEHardwareDevices::getFriendlyDeviceTypeStringFromType(TDEGenericDevic
else if (query == TDEGenericDeviceType::TestAndMeasurement) {
ret = i18n("Test and Measurement");
}
else if (query == TDEGenericDeviceType::Timekeeping) {
ret = i18n("Timekeeping");
}
else if (query == TDEGenericDeviceType::Event) {
ret = i18n("Platform Event");
}
@ -4283,6 +4311,9 @@ TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDE
else if (query == TDEGenericDeviceType::TestAndMeasurement) {
ret = DesktopIcon("kcmdevices", size);
}
else if (query == TDEGenericDeviceType::Timekeeping) {
ret = DesktopIcon("history", size);
}
else if (query == TDEGenericDeviceType::Event) {
ret = DesktopIcon("preferences-system", size);
}

@ -66,6 +66,7 @@ enum TDEGenericDeviceType {
CryptographicCard,
BiometricSecurity,
TestAndMeasurement,
Timekeeping,
Event,
Input,
PNP,

Loading…
Cancel
Save