summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-21 00:36:08 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-21 00:36:08 -0500
commitc0cca8ca9524d6d91bce4ead3bc2595dda94ae65 (patch)
treeaf4a766ed1a401ee0fc443fe9f247c1a32d91ef5 /tdecore/tdehw
parentd4b7e6e7dadff1f92fc16bc53b1d7a3608e19e15 (diff)
downloadtdelibs-c0cca8ca9524d6d91bce4ead3bc2595dda94ae65.tar.gz
tdelibs-c0cca8ca9524d6d91bce4ead3bc2595dda94ae65.zip
Add fingerprint reader and test/measurement devices classes to tdehwlib
Diffstat (limited to 'tdecore/tdehw')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp42
-rw-r--r--tdecore/tdehw/tdehwcommontypes.h2
2 files changed, 36 insertions, 8 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index e3608e11c..9b21a4b0e 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -1396,6 +1396,12 @@ TDEGenericDeviceType::TDEGenericDeviceType readGenericDeviceTypeFromString(TQStr
else if (query == "CryptographicCard") {
ret = TDEGenericDeviceType::CryptographicCard;
}
+ else if (query == "BiometricSecurity") {
+ ret = TDEGenericDeviceType::BiometricSecurity;
+ }
+ else if (query == "TestAndMeasurement") {
+ ret = TDEGenericDeviceType::TestAndMeasurement;
+ }
else if (query == "Event") {
ret = TDEGenericDeviceType::Event;
}
@@ -2292,14 +2298,6 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
ifaceprotofile.close();
}
}
- if (usbInterfaceClass == 9) {
- // Hub
- if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Hub);
- }
- if (usbInterfaceClass == 11) {
- // Smart Card Reader
- if (!device) device = new TDECryptographicCardDevice(TDEGenericDeviceType::CryptographicCard);
- }
if ((usbInterfaceClass == 6) && (usbInterfaceSubClass == 1) && (usbInterfaceProtocol == 1)) {
// PictBridge
if (!device) {
@@ -2314,6 +2312,22 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
devicenode = (udev_device_get_devnode(parentdev));
}
}
+ else if (usbInterfaceClass == 9) {
+ // Hub
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Hub);
+ }
+ else if (usbInterfaceClass == 11) {
+ // Smart Card Reader
+ if (!device) device = new TDECryptographicCardDevice(TDEGenericDeviceType::CryptographicCard);
+ }
+ else if (usbInterfaceClass == 14) {
+ // Fingerprint Reader
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::BiometricSecurity);
+ }
+ else if (usbInterfaceClass == 254) {
+ // Test and/or Measurement Device
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::TestAndMeasurement);
+ }
else {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::OtherUSB);
}
@@ -4096,6 +4110,12 @@ TQString TDEHardwareDevices::getFriendlyDeviceTypeStringFromType(TDEGenericDevic
else if (query == TDEGenericDeviceType::CryptographicCard) {
ret = i18n("Cryptographic Card");
}
+ else if (query == TDEGenericDeviceType::BiometricSecurity) {
+ ret = i18n("Biometric Security");
+ }
+ else if (query == TDEGenericDeviceType::TestAndMeasurement) {
+ ret = i18n("Test and Measurement");
+ }
else if (query == TDEGenericDeviceType::Event) {
ret = i18n("Platform Event");
}
@@ -4257,6 +4277,12 @@ TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDE
else if (query == TDEGenericDeviceType::CryptographicCard) {
ret = DesktopIcon("password", size);
}
+ else if (query == TDEGenericDeviceType::BiometricSecurity) {
+ ret = DesktopIcon("password", size);
+ }
+ else if (query == TDEGenericDeviceType::TestAndMeasurement) {
+ ret = DesktopIcon("kcmdevices", size);
+ }
else if (query == TDEGenericDeviceType::Event) {
ret = DesktopIcon("preferences-system", size);
}
diff --git a/tdecore/tdehw/tdehwcommontypes.h b/tdecore/tdehw/tdehwcommontypes.h
index b560407eb..403a21d25 100644
--- a/tdecore/tdehw/tdehwcommontypes.h
+++ b/tdecore/tdehw/tdehwcommontypes.h
@@ -64,6 +64,8 @@ enum TDEGenericDeviceType {
Platform,
Cryptography,
CryptographicCard,
+ BiometricSecurity,
+ TestAndMeasurement,
Event,
Input,
PNP,