summaryrefslogtreecommitdiffstats
path: root/src/hardware.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/hardware.h')
-rw-r--r--src/hardware.h45
1 files changed, 26 insertions, 19 deletions
diff --git a/src/hardware.h b/src/hardware.h
index b173aa5..4d64314 100644
--- a/src/hardware.h
+++ b/src/hardware.h
@@ -33,12 +33,7 @@
#ifndef _HARDWARE_H_
#define _HARDWARE_H_
-// Global Header
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// QT - Header
+// TQt - Header
#include <tqstring.h>
#include <tqobject.h>
#include <tqvaluelist.h>
@@ -56,7 +51,8 @@ enum suspend_type {
SUSPEND2DISK,
SUSPEND2RAM,
FREEZE,
- STANDBY
+ STANDBY,
+ SUSPEND_HYBRID,
};
enum cpufreq_type {
@@ -106,6 +102,12 @@ typedef struct SuspendStates {
bool standby_can;
//! true if the machine support standby and PolicyKit allow to call the interface
int standby_allowed;
+ //! true if the machine support hybrid suspend and the interface is available
+ bool suspend_hybrid;
+ //! true if the machine support hybrid suspend, but no interface available
+ bool suspend_hybrid_can;
+ //! true if the machine support hybrid suspend and PolicyKit allow to call the interface
+ int suspend_hybrid_allowed;
SuspendStates () {
suspend2ram = false;
@@ -120,12 +122,15 @@ typedef struct SuspendStates {
standby = false;
standby_can = false;
standby_allowed = -1;
+ suspend_hybrid = false;
+ suspend_hybrid_can = false;
+ suspend_hybrid_allowed = -1;
}
} SuspendStates;
class HardwareInfo : public TQObject{
- Q_OBJECT
+ TQ_OBJECT
private:
@@ -134,7 +139,7 @@ private:
//! pointer to the dbusInterface connection class
dbusInterface *dbus_iface;
- //! hold udis of special hardware execpt batteries represented by a TQString pairs (name,udi)
+ //! hold udis of special hardware except batteries represented by a TQString pairs (name,udi)
/*!
* This directory handle udis for known fixed devices as e.g ac adapter. This devices are
* currently available:
@@ -152,6 +157,11 @@ private:
*/
TQStringList allUDIs;
+ /*!
+ * This TQStringList contains the unmonitored UDIs we alread know
+ */
+ TQStringList unknownUDIs;
+
//! hold information if suspend/standby/pm actions are supported and allowed
/*!
* This dictionary contains information about the available pm capabilities and
@@ -328,26 +338,21 @@ private slots:
//! check if brightness change is possible
void checkBrightness();
- //! TQT_SLOT to forward signal about changed battery warning state
+ //! TQ_SLOT to forward signal about changed battery warning state
void emitBatteryWARNState (int type, int state);
- //! TQT_SLOT to handle resume and forward a signal for resume
+ //! TQ_SLOT to handle resume and forward a signal for resume
void handleResumeSignal (int result);
//! to emit signal for power button
void emitPowerButtonPressed();
//! to emit signal for sleep button
- void emitSleepButtonPressed();
+ void emitSuspendButtonPressed();
//! to emit signal for s2disk button
void emitS2diskButtonPressed();
//! to emit signal for session state
void emitSessionActiveState();
- //! to handle signal for brightness Up buttons/keys
- void brightnessUpPressed();
- //! to handle signal for brightness Down buttons/keys
- void brightnessDownPressed();
-
signals:
//! signal for larger data changes
void generalDataChanged();
@@ -454,8 +459,10 @@ public:
// --> functions to call a TDE hardware library and trigger an action
//! execute/trigger a suspend via the TDE hardware library
bool suspend ( suspend_type suspend );
- //! set the brightness via TDE hardware library
- bool setBrightness ( int level, int percent = -1);
+ //! set the brightness level via TDE hardware library
+ bool setBrightnessLevel(int level);
+ //! set the brightness percentage via TDE hardware library
+ bool setBrightnessPercentage(int percent);
//! to set the brightness down
bool setBrightnessDown(int percentageStep = -1);
//! to set the brightness up