diff options
author | Timothy Pearson <[email protected]> | 2015-08-25 00:26:06 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2015-08-25 00:26:06 -0500 |
commit | ae35100db0302f629251d4a8b4f976bea8afbdd3 (patch) | |
tree | 3389567302fe263befb40a64ca1bf03711a63ca1 /kcontrol/hwmanager/hwmanager.cpp | |
parent | da7215ff52c93782a7de962ca5d076e484baed43 (diff) | |
download | tdebase-ae35100db0302f629251d4a8b4f976bea8afbdd3.tar.gz tdebase-ae35100db0302f629251d4a8b4f976bea8afbdd3.zip |
Add preliminary cryptographic card support to the TDE hardware device manager
Diffstat (limited to 'kcontrol/hwmanager/hwmanager.cpp')
-rw-r--r-- | kcontrol/hwmanager/hwmanager.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kcontrol/hwmanager/hwmanager.cpp b/kcontrol/hwmanager/hwmanager.cpp index a82daf1be..00b5143bf 100644 --- a/kcontrol/hwmanager/hwmanager.cpp +++ b/kcontrol/hwmanager/hwmanager.cpp @@ -47,6 +47,8 @@ #include <stdio.h> #include <tqstring.h> +#include <tdecryptographiccarddevice.h> + #include "hwmanager.h" using namespace std; @@ -144,6 +146,9 @@ void TDEHWManager::populateTreeView() TDEGenericHardwareList hwlist = hwdevices->listByDeviceClass(TDEGenericDeviceType::RootSystem); TDEGenericDevice *hwdevice; for ( hwdevice = hwlist.first(); hwdevice; hwdevice = hwlist.next() ) { + if (hwdevice->type() == TDEGenericDeviceType::CryptographicCard) { + static_cast<TDECryptographicCardDevice*>(hwdevice)->enableCardMonitoring(true); + } DeviceIconItem* item = new DeviceIconItem(base->deviceTree, hwdevice->detailedFriendlyName(), hwdevice->icon(base->deviceTree->iconSize()), hwdevice); if ((!selected_syspath.isNull()) && (hwdevice->systemPath() == selected_syspath)) { base->deviceTree->ensureItemVisible(item); @@ -160,6 +165,9 @@ void TDEHWManager::populateTreeView() TDEGenericDevice *hwdevice; TDEGenericHardwareList hwlist = hwdevices->listByDeviceClass((TDEGenericDeviceType::TDEGenericDeviceType)i); for ( hwdevice = hwlist.first(); hwdevice; hwdevice = hwlist.next() ) { + if (hwdevice->type() == TDEGenericDeviceType::CryptographicCard) { + static_cast<TDECryptographicCardDevice*>(hwdevice)->enableCardMonitoring(true); + } DeviceIconItem* item = new DeviceIconItem(rootitem, hwdevice->detailedFriendlyName(), hwdevice->icon(base->deviceTree->iconSize()), hwdevice); if ((!selected_syspath.isNull()) && (hwdevice->systemPath() == selected_syspath)) { base->deviceTree->ensureItemVisible(item); @@ -177,6 +185,9 @@ void TDEHWManager::populateTreeViewLeaf(DeviceIconItem *parent, bool show_by_con TDEGenericHardwareList hwlist = hwdevices->listAllPhysicalDevices(); TDEGenericDevice *hwdevice; for ( hwdevice = hwlist.first(); hwdevice; hwdevice = hwlist.next() ) { + if (hwdevice->type() == TDEGenericDeviceType::CryptographicCard) { + static_cast<TDECryptographicCardDevice*>(hwdevice)->enableCardMonitoring(true); + } if (hwdevice->parentDevice() == parent->device()) { DeviceIconItem* item = new DeviceIconItem(parent, hwdevice->detailedFriendlyName(), hwdevice->icon(base->deviceTree->iconSize()), hwdevice); if ((!selected_syspath.isNull()) && (hwdevice->systemPath() == selected_syspath)) { |