summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw
Commit message (Collapse)AuthorAgeFilesLines
* Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT definesMichele Calgaro2024-01-125-39/+39
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehw lib: drop definition of TDEDiskDeviceStatus::HotpluggableMichele Calgaro2023-12-281-1/+1
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Fix lvm volumes appearing as removable devicesAlexander Golubev2023-12-283-56/+26
| | | | | | | | | | | | | | - remove obsolete/erroneous code meddling with GENHD_FL_MEDIA_CHANGE_NOTIFY - use /sys/block/<dev>/removable rather than /sys/block/<dev>/capabilities - deprecate TDEDiskDeviceStatus::Hotpluggable and use TDEDiskDeviceStatus::Removable for all removable devices - put some local utility function into anonymous namespace See https://mirror.git.trinitydesktop.org/gitea/TDE/tde/issues/148 Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
* Replace Q_OBJECT with TQ_OBJECTMichele Calgaro2023-07-207-9/+9
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Added compatibility for hwlib support for muslormorph2022-12-141-2/+2
| | | | Signed-off-by: ormorph <roma251078@mail.ru>
* tdehw lib: power off USB devices after ejecting them when udisks/udisks2 are ↵Michele Calgaro2022-04-201-6/+70
| | | | | | used. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehw lib: make sure to emit hardwareRemoved signal after removing the ↵Michele Calgaro2022-03-161-3/+8
| | | | | | device from the device list. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehw: make rtc devices appear as Timekeeping rather than Mainboard devicesAlexander Golubev2022-02-151-3/+3
| | | | Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
* Removed HAL dependant code.Michele Calgaro2022-02-143-163/+5
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Use AUTOMOC for generated sources instead of a specific rule.Slávek Banko2022-01-141-8/+1
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Prevent potential crash, when building without Network Manager ↵Slávek Banko2021-09-301-3/+8
| | | | | | support. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehw lib: reworked device notifications to avoid repeated scanning of devices.Michele Calgaro2021-08-134-169/+84
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehw lib: removed unused and seemingly unnecessary method in storage device.Michele Calgaro2021-08-102-60/+0
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehw lib: make the call to close the file explicit.Michele Calgaro2021-08-091-0/+1
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Removed unused code related to hardware events.Michele Calgaro2021-08-023-32/+0
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Update Windows Generic Device IDs.gregory guy2021-06-131-138/+330
| | | | Signed-off-by: gregory guy <gregory-tde@laposte.net>
* As default behaviour, use hwdata files for pci and usb ids files.gregory guy2021-06-131-2/+2
| | | | Signed-off-by: gregory guy <gregory-tde@laposte.net>
* Fix definitions of slot constants for old cryptsetup API.Slávek Banko2021-06-071-5/+3
| | | | | | This resolves issue #137. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Build tdehw library as a standalone library.Slávek Banko2021-05-073-2/+18
| | | | | | This causes tdecore API change! Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Removed dbus access rules for invalid "send_destination".Slávek Banko2021-02-091-16/+0
| | | | | | | | | | For the tde_dbus_hardwarecontrol daemon, the destination is always "org.trinitydesktop.hardwarecontrol", which provides interfaces for individual components. The permissions for the standard dbus Introspectable and Properties calls are therefore set together on one destination, regardless of the interfaces for the individual components. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Allow everyone to read the status of input switches.Slávek Banko2021-02-091-0/+4
| | | | | | | | | Reading the status of input switches seems safe so that it can be allowed to everyone. This will prevent the log from being filled with unauthorized access messages if the user is not a member of the plugdev group - this resolve issue TDE/tde#44. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdecore/tdehw: disable SW_RADIO switch if it's the same as SW_RFKILL_ALLAlexander Golubev2021-02-081-0/+4
| | | | Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
* tdehw lib: fixed detection of mountable optical disks with incompleteMichele Calgaro2020-11-221-6/+8
| | | | | | partition table. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehw lib: reworked code for eject operation to support return type ↵Michele Calgaro2020-11-212-37/+66
| | | | | | TQStringVariantMap. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Added support for locking/unlocking of LUKS disks using pmount/pumount.Michele Calgaro2020-10-311-9/+65
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Fixed mounting and unmounting of mapped storage devices.Michele Calgaro2020-10-106-27/+70
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Fixed displaying of encrypted disks.Michele Calgaro2020-10-103-145/+71
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Added udisks2 support for unlocking/locking of encrypted disks.Michele Calgaro2020-10-104-24/+228
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehwlib: Add regular monitoring of power supply device status,Slávek Banko2020-10-071-1/+10
| | | | | | | | | to be able to generate a signal when the power state changes, if the signal is not generated from udev. This resolves issue TDE/tde#30. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Minor code refactoring of previous 2 commits.Michele Calgaro2020-06-071-13/+9
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehwlib: Re-enable OpenSSL < 1.1 compatibilitySlávek Banko2020-06-051-0/+14
| | | | | | in tdecryptographiccarddevice. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Update for OpenSSL >= 1.1.0Timothy Pearson2020-06-031-2/+4
| | | | Signed-off-by: Timothy Pearson <kb9vqf@pearsoncomputing.net>
* tdehwlib: Add a read of the current switch state before invokingSlávek Banko2020-02-261-0/+1
| | | | | | | | a switchChanged() signal for an EV_SW input event. This resolves the detection of closing the lid on some hardware. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Add event device classification according to the provided switches.Slávek Banko2020-02-231-3/+9
| | | | | | | This will resolve event device detection on special hardware, for example, the LID switch on Pinebook Pro. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Prevent tdenetworkmanager from crashing when using unmanaged devices.Michele Calgaro2020-02-221-37/+46
| | | | | | This relates to bug 2929. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehwlib: Unify units of battery values.Slávek Banko2020-02-161-8/+42
| | | | | | | | | | The values from energy_* and power_now are converted from mWh and mW to Ah and A, so that the units are equal to values from charge_* and current_now. This resolves issue #68. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Added back build options for UDISKS2, UDISKS and UDEVIL as requested byMichele Calgaro2020-02-103-22/+66
| | | | | | some users. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehwlib: Add allowed access for plugdev group members.Slávek Banko2020-02-051-0/+28
| | | | | | This is useful if the system no longer supports policy at_console. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Removed explicit usage of the 'register' keyword.Michele Calgaro2020-01-301-1/+1
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehwlib: Adjusted parsing of battery informationSlávek Banko2020-01-231-8/+24
| | | | | | | | | | | + Added reading of estimated time to fully charged battery (time_to_full_now) The remaining time is calculated if the value is not provided in the battery information. If the battery does not provide charging current information, the estimated time to charge the battery cannot be calculated. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Fix parsing of CPU cores frequency informationSlávek Banko2020-01-091-77/+71
| | | | | | | | | | | | | | | | + The current frequency is parsed from the scaling_cur_freq file If the current frequency is not found in /proc/cpuinfo, the attempt to read value from cpuinfo_cur_freq failed because only root can read this file. + The have_frequency flag is not set when parsing current frequency from sysfs Setting the have_frequency flag after parsing current frequency for the first core caused the current frequency not to be parsed for other cores. + Frequency characteristics are parsed for all cores The assumption that the frequency characteristics for all cores will be the same as the first core is no longer reliable. There are heterogeneous architectures - for example ARM big.LITTLE. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehw: Fix wrong merge location in prior commit.Slávek Banko2020-01-081-3/+3
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Adjusted parsing of battery informationSlávek Banko2020-01-082-10/+36
| | | | | | | | | | | | | | | | | | | | | | + Added initialization of all values Some batteries do not provide all values and, without initialization, values may contain dubious data. + Added reading of current battery capacity value in percent (capacity) Some batteries may provide the current capacity value in percent instead of the current energy value. + Added check whether the battery provides current energy value (charge_now or energy_now) The current energy is calculated if the value is not provided in the battery information. + Added reading of estimated time to empty battery (time_to_empty_now) The remaining time is calculated if the value is not provided in the battery information. If the battery does not provide charging current information, the estimated time to charge the battery cannot be calculated. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* tdehwlib: Classify the charger as an AC adapter, not as a battery.Slávek Banko2020-01-081-0/+1
| | | | Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* Removed sync dbus call code in tdenetworkmanager to align to latestMichele Calgaro2019-07-201-50/+0
| | | | | | dbus-1-tqt code. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Normalized names of devices to avoid unintentional mixed used of icons from ↵Michele Calgaro2019-07-082-5/+8
| | | | | | | | different icon themes. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Adjusted to use new TQStringVariantMap type.Michele Calgaro2019-07-074-38/+35
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Reworked code for eject/mount/unmount operations to support new ↵Michele Calgaro2019-07-074-255/+260
| | | | | | TDEStorageOpResult return type. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehw: code restructuring for tdestoragedevice.Michele Calgaro2019-07-074-483/+442
| | | | | | | | 1. added disk helper source files 2. removed WITH_UDISKS2, WITH_UDISK, WITH_UDEVIL defines. The respective code is always included 3. order of execution for mount/umount activities: udisks2, udisk, udevil, pmount. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdehw: TRUE/FALSE --> true/false renaming.Michele Calgaro2019-07-0720-161/+159
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>