diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-08-11 14:36:14 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-08-13 16:01:01 +0900 |
commit | f159fa61a972641944adc614d33baf5e52ac5e0e (patch) | |
tree | a00705c6f65529f40f90f622ccd8cc4cb60f5c89 /tdecore/tdehw/tdehardwaredevices.h | |
parent | de4f27a2eea6f7b8e723dc8966a34ce1de0952d0 (diff) | |
download | tdelibs-f159fa61a972641944adc614d33baf5e52ac5e0e.tar.gz tdelibs-f159fa61a972641944adc614d33baf5e52ac5e0e.zip |
tdehw lib: reworked device notifications to avoid repeated scanning of devices.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdecore/tdehw/tdehardwaredevices.h')
-rw-r--r-- | tdecore/tdehw/tdehardwaredevices.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.h b/tdecore/tdehw/tdehardwaredevices.h index f3c5e1a93..db63e9d34 100644 --- a/tdecore/tdehw/tdehardwaredevices.h +++ b/tdecore/tdehw/tdehardwaredevices.h @@ -207,19 +207,13 @@ class TDECORE_EXPORT TDEHardwareDevices : public TQObject /** * Rescan a hardware device to look for changes * WARNING: This method can be very expensive. Use with caution! - * @param hwdevice TDEGenericDevice* with the device to rescan - */ - void rescanDeviceInformation(TDEGenericDevice* hwdevice); - - /** - * Rescan a hardware device to look for changes - * WARNING: This method can be very expensive. Use with caution! * The computational expense can be reduced somewhat if the device tree structure * has not changed by calling this method with regenerateDeviceTree = false. * @param hwdevice TDEGenericDevice* with the device to rescan + * @param dev udev_device* with the udev device to rescan * @param regenerateDeviceTree true to update parent/child links in device tree */ - void rescanDeviceInformation(TDEGenericDevice* hwdevice, bool regenerateDeviceTree); + void rescanDeviceInformation(TDEGenericDevice* hwdevice, udev_device* dev = NULL, bool regenerateDeviceTree = true); /** * Enable or disable automatic state updates of triggerless hardware devices @@ -238,7 +232,7 @@ class TDECORE_EXPORT TDEHardwareDevices : public TQObject * @param enable a bool specifiying whether or not automatic updates should be enabled */ void setBatteryUpdatesEnabled(bool enable); - + /** * Convert a byte count to human readable form * @param bytes a double containing the number of bytes |