diff options
author | Slávek Banko <[email protected]> | 2014-02-08 18:21:28 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2014-02-08 18:21:28 +0100 |
commit | c68a1bac04c5cfdb0cdcbd91dc54995bfa05e292 (patch) | |
tree | 5a6bc1d0a5eba85862a2008df71bc6d273a13397 /src/hardware.h | |
parent | 5c45c1a222eb91ea429f8c5245e32e43e7505582 (diff) | |
download | tdepowersave-c68a1bac04c5cfdb0cdcbd91dc54995bfa05e292.tar.gz tdepowersave-c68a1bac04c5cfdb0cdcbd91dc54995bfa05e292.zip |
Switch from dbus-tqt do dbus-1-tqt
Add systemd session and inhibit support
Cleanup unused methods
This partially resolves Bug 1597
Diffstat (limited to 'src/hardware.h')
-rw-r--r-- | src/hardware.h | 44 |
1 files changed, 3 insertions, 41 deletions
diff --git a/src/hardware.h b/src/hardware.h index 6d0c741..b173aa5 100644 --- a/src/hardware.h +++ b/src/hardware.h @@ -76,12 +76,6 @@ enum device_type { UNKNOWN_DEVICE }; -enum ERROR_MSG { - DBUS_NO_RIGHTS, - DBUS_NOT_RUNNING, - DBUS_RUNNING -}; - //! hold information if suspend/standby/pm actions are supported and allowed /*! * This dictionary contains information about the available pm capabilities and @@ -138,7 +132,7 @@ private: TDEHardwareDevices *m_hwdevices; //! pointer to the dbusInterface connection class - dbusInterface *dbus_HAL; + dbusInterface *dbus_iface; //! hold udis of special hardware execpt batteries represented by a TQString pairs (name,udi) /*! @@ -225,14 +219,6 @@ private: * \li false: else */ bool cpuFreq; - //! if the machine support change *SchedPowerSavings methodes via TDE hardware library - /*! - * This boolean represent information if the machine support change the - * SchedPowerSavings methodes via TDE hardware library. - * \li true: if supported - * \li false: else - */ - bool schedPowerSavings; //! if the machine support change brightness /*! * This boolean represent information if the machine support brightness changes. @@ -315,24 +301,18 @@ private: bool intialiseHWInfo(); //! reinit all hardware information bool reinitHardwareInfos(); - //! to check the current ConsoleKit session - bool checkConsoleKitSession(); //! to check if we should handle a device bool checkIfHandleDevice ( TQString _udi, int *type ); //! to set the CPUFreq governor bool setCPUFreqGovernor( const char *governor ); - //! to get the state of SchedPowerSave setting of kernel/TDE hardware library - bool getSchedPowerSavings(); - //! to set the state of SchedPowerSave setting of kernel/TDE hardware library - bool setSchedPowerSavings( bool enable ); //! find and update a battery information void updateBatteryValues (TDEGenericDevice* device); private slots: - //! to fetch events from D-Bus and handle them - void processMessage (msg_type type, TQString message, TQString value); + //! handle changes of the session state + void handleSessionState (bool state); //! to fetch events from the TDE hardware library and handle them void processHardwareChangedEvent (TDEGenericDevice*); //! to fetch keypresses from the TDE hardware library and handle them @@ -392,10 +372,6 @@ signals: void batteryWARNState(int type, int state); // Error signals - //! signal if the HAL daemon terminate and restart - void halRunning( bool ); - //! signal if the D-Bus daemon terminate and restart - void dbusRunning( int ); //! signal if the IsActive state of void desktopSessionIsActive (bool); @@ -428,15 +404,6 @@ public: */ bool update_info_primBattery_changed; - //! boolean which tell us if the D-Bus daemon was terminated - /*! - * This boolean contains information if the D-Bus daemon terminated and - * we recieved "dbus.terminate" - * \li true: If D-Bus terminated - * \li false: If D-Bus not terminated - */ - bool dbus_terminated; - // --> functions //! default constructor HardwareInfo(); @@ -463,9 +430,6 @@ public: //! if the user is allowed to change CPU Freq PolicyKit int isCpuFreqAllowed (); - //! if org.freedesktop.Policy.Power has a owner - bool isPolicyPowerIfaceOwned(); - //! get state of the AC adapter bool getAcAdapter() const; //! get the state of the lid button @@ -498,8 +462,6 @@ public: bool setBrightnessUp(int percentageStep = -1); //! set the CPU frequency policy/speed bool setCPUFreq ( cpufreq_type cpufreq, int limit = 51 ); - //! call SetPowerSave method on TDE hardware library. - bool setPowerSave( bool on ); //! function to set warning states for the primary battery collection void setPrimaryBatteriesWarningLevel (int _warn = -1, int _low = -1, int _crit = -1 ); |