Commit Graph

156 Commits (86df09d798b216ec21dafa3c90aeb348df47b23e)

Author SHA1 Message Date
Michele Calgaro d78af7ef55
Minor code refactoring of previous 2 commits.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
5 years ago
Slávek Banko 444839e053
tdehwlib: Re-enable OpenSSL < 1.1 compatibility
in tdecryptographiccarddevice.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Timothy Pearson 3f6bef6371 Update for OpenSSL >= 1.1.0
Signed-off-by: Timothy Pearson <kb9vqf@pearsoncomputing.net>
5 years ago
Slávek Banko 8bfa123fb6
tdehwlib: Add a read of the current switch state before invoking
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>
5 years ago
Slávek Banko f68fadda81
tdehwlib: Add event device classification according to the provided switches.
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>
5 years ago
Michele Calgaro 3192a72a46
Prevent tdenetworkmanager from crashing when using unmanaged devices.
This relates to bug 2929.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
5 years ago
Slávek Banko c088fbf55b
tdehwlib: Unify units of battery values.
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>
5 years ago
Michele Calgaro b6953843f5
Added back build options for UDISKS2, UDISKS and UDEVIL as requested by
some users.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
5 years ago
Slávek Banko 7f7f7322f9
tdehwlib: Add allowed access for plugdev group members.
This is useful if the system no longer supports policy at_console.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Michele Calgaro aa98dbfe80
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
5 years ago
Slávek Banko ecd1e4bd40
tdehwlib: Adjusted parsing of battery information
+ 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>
5 years ago
Slávek Banko ba82cdf5be
tdehwlib: Fix parsing of CPU cores frequency information
+ 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>
5 years ago
Slávek Banko 8856d5dde1
tdehw: Fix wrong merge location in prior commit.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 86c1d896c7
tdehwlib: Adjusted parsing of battery information
+ 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>
5 years ago
Slávek Banko 3b0f07f2cd
tdehwlib: Classify the charger as an AC adapter, not as a battery.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Michele Calgaro edcf1665f0
Removed sync dbus call code in tdenetworkmanager to align to latest
dbus-1-tqt code.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Michele Calgaro 11935291c7
Normalized names of devices to avoid unintentional mixed used of icons from different
icon themes.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Michele Calgaro aaaf378033
Adjusted to use new TQStringVariantMap type.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Michele Calgaro bf68342793
Reworked code for eject/mount/unmount operations to support new TDEStorageOpResult return type.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Michele Calgaro 7214a7b6b5 tdehw: code restructuring for tdestoragedevice.
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>
6 years ago
Michele Calgaro c76553c4fb
tdehw: TRUE/FALSE --> true/false renaming.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Michele Calgaro 32566accda tdehw: avoid crashing kded when using udisks/udisks2 to operate on
drives that contain dashes. This relates to issue #32.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Michele Calgaro 09835dceb7
tdehw: improved code for mount table.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Michele Calgaro 080948356f
Adapted to latest dbus-1-tqt version (TQT_DBusObjectPath inheriting from TQString).
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Michele Calgaro 536cfddc84
Use new function TQT_DBusData::getAsVariantData() instead of local
version of it.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Slávek Banko dadafca880
Fixed moc inclusion after last changes in dbus-1-tqt.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Slávek Banko dfe3c9649f
tdehwlib: Fix the flag setting whether the storage device contains the file system.
This resolves bug 2232, bug 2607 and bug 2946.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
6 years ago
Michele Calgaro c49ee53043
Fixed support for logind power state calls.
This resolves bug 2661 and bug 2975.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Michele Calgaro 706098c452 Fixed FTBFS caused by libcryptsetup 2.0
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
7 years ago
Slávek Banko 051acc7df5 Fix crash in tdehwlib if /sys/devices/system/cpu/cpu* is not accessible
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
8 years ago
Slávek Banko e0fd34a1bd tdehwlib: Use TDENetworkDevice in TDENetworkConnectionManager instead of MAC address
Use interface name in TDENetworkConnectionManager_BackendNM instead of MAC address
This relates to bug 2748

The name of the network interface seems to be a more stable identifier than the MAC
address because the MAC address can be changed easily or even automatically - see
randomization of MAC addresses on wireless interfaces. Therefore, the use of the
MAC address as a network interface identifier was abandoned.

Beware, this change is an API / ABI change! However, most changes are internal
and the only one affected is application TDENetworkManager.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
8 years ago
Slávek Banko eb6f8213d4 tdehwlib: Add a rule for classifying parport device
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
8 years ago
Slávek Banko cc4f1996df tdehwlib: Add a rule for classifying remote control devices
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
8 years ago
Slávek Banko d1280c31d9 tdehwlib: Allow to gather connection information on virtual net devices
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
8 years ago
Slávek Banko a73511a98d tdehwlib: Allow to classify virtual devices by subsystem
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
8 years ago
Slávek Banko d2b61ae9da Fix memory leak after processing udev_monitor
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
8 years ago
Slávek Banko 1a5bc0e4ff Fix memory leak after processing udev_device
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
8 years ago
Timothy Pearson 30c008d551 Probe partitions to get filesystem type
This fixes problems with LUKS partitions not being detected
9 years ago
Timothy Pearson b18bff9ad8 Properly classify Lenovo USB camera platform subdevices 9 years ago
Timothy Pearson 125cf0a7f2 Make cryptographic card reader detection on single readers sytems more robust 9 years ago
Timothy Pearson 2872549499 Add fallback to match udev cryptographic card reader name with PCSC vendor strings 9 years ago
Timothy Pearson d82b64cbbd Add IBM VIO device 9 years ago
Timothy Pearson d15fe834b1 Add nvmem device type 9 years ago
Michele Calgaro c7171b93f4 tdecore: Fixed hybrid suspend (aka suspend to RAM + suspend to disk) support using HAL.
org.freedesktop.Hal.Device.SystemPowerManagement/SuspendHybrid requires a parameter when invoked.
This relates to bug 2601.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
9 years ago
Michele Calgaro 92394e2850 tdecore: Improved code for hybrid suspend (aka suspend to RAM + suspend to disk).
Now code is more consistent. This relates to bug 2601.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
9 years ago
Michele Calgaro a29712773b tdecore: complete previous commit, one file was forgotten by mistake.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
9 years ago
Michele Calgaro ba3ed714c6 tdecore: Added DBus support for hybrid suspend (aka suspend to RAM + suspend to disk).
This relates to bug 2601.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
9 years ago
Michele Calgaro 3b095cf3cd tdecore: Initial support for hybrid suspend (aka suspend to RAM + suspend to disk).
Update to dbus interface and hardware device manager will be commit separately.
This relates to bug 2601.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
9 years ago
Slávek Banko 36481f68c1 Fix crash in tdehwlib on partitions without parent disk
This applies for example to the software RAID defined in the BIOS

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
9 years ago
Slávek Banko ff469a69ff Fix mountable flag for disk partitions
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
9 years ago