summaryrefslogtreecommitdiffstats
path: root/src/dbusHAL.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbusHAL.h')
-rw-r--r--src/dbusHAL.h55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/dbusHAL.h b/src/dbusHAL.h
index d3a3754..9a2e613 100644
--- a/src/dbusHAL.h
+++ b/src/dbusHAL.h
@@ -48,17 +48,9 @@
#include <dbus/message.h>
#include <dbus/connection.h>
-// HAL Library
-#include <hal/libhal.h>
-
// kpowersave - Header
#include "kpowersave_debug.h"
-#define HAL_SERVICE "org.freedesktop.Hal"
-#define HAL_PM_IFACE "org.freedesktop.Hal.Device.SystemPowerManagement"
-#define HAL_LPANEL_IFACE "org.freedesktop.Hal.Device.LaptopPanel"
-#define HAL_CPUFREQ_IFACE "org.freedesktop.Hal.Device.CPUFreq"
-#define HAL_COMPUTER_UDI "/org/freedesktop/Hal/devices/computer"
#define CK_SERVICE "org.freedesktop.ConsoleKit"
#define CK_MANAGER_IFACE "org.freedesktop.ConsoleKit.Manager"
#define CK_MANAGER_OBJECT "/org/freedesktop/ConsoleKit/Manager"
@@ -84,8 +76,6 @@ private:
DBusQt::Connection* m_dBusQtConnection;
//! real connection to D-Bus
DBusConnection *dbus_connection;
- //! HAL context
- LibHalContext *hal_ctx;
//! to store information if KPowersave is connected to D-Bus
/*!
@@ -94,13 +84,6 @@ private:
* \li false: if disconnected
*/
bool dbus_is_connected;
- //! to store information if KPowersave is connected to HAL
- /*!
- * This boolean represent information about the state of the connection to HAL
- * \li true: if connected
- * \li false: if disconnected
- */
- bool hal_is_connected;
//! if we could claim the org.freedesktop.Policy.Power interface
/*!
@@ -119,15 +102,6 @@ private:
DBusBusType dbus_type, void *retvalue, int retval_type,
int first_arg_type, va_list var_args);
- //! function to be called back by DBusPendingCall::dbus_pending_call_set_notify()
- static void callBackSuspend (DBusPendingCall* pcall, void* /*data*/);
-
- /* HAL helper functions */
- //! to initialise the connection to HAL
- bool initHAL();
- //! to free the HAL context
- void freeHAL();
-
public:
//! default constructor
@@ -137,8 +111,6 @@ public:
//! to reconnect to D-Bus and HAL
bool reconnect();
- //! to reconnect only HAL
- bool reconnectHAL();
//! to close the connection to D-Bus and HAL
bool close();
@@ -152,36 +124,12 @@ public:
// --- helper to get private members of the class --- //
//! to get information if KPowersave is connected to D-Bus
bool isConnectedToDBUS();
- //! to get information if KPowersave is connected to HAL
- bool isConnectedToHAL();
//! to get info about claim org.freedesktop.Policy.Power interface
bool aquiredPolicyPowerInterface();
- //! return the current HAL context
- LibHalContext *get_HAL_context();
//! return the current DBus connection
DBusConnection *get_DBUS_connection();
- /* HAL device information stuff */
- //! Query a integer device property from HAL
- bool halGetPropertyInt(TQString udi, TQString property, int *returnval);
- //! Query a bolean device property from HAL
- bool halGetPropertyBool(TQString udi, TQString property, bool *returnval);
- //! Query a string device property from HAL
- bool halGetPropertyString(TQString udi, TQString property, TQString *returnval);
- //! Query a string list device property from HAL
- bool halGetPropertyStringList (TQString udi, TQString property, TQStringList *devices);
- //! Query a capability for a HAL device
- bool halQueryCapability(TQString udi, TQString capability, bool *returnval);
-
- /* functions to find devices and check stuff */
- //! check if a property exist on a device
- bool halDevicePropertyExist(TQString udi, TQString property);
- //! to find a device by capability
- bool halFindDeviceByCapability (TQString capability, TQStringList *devices);
- //! to find a device by a string property
- bool halFindDeviceByString (TQString property, TQString keyval, TQStringList *devices);
-
/* D-Bus helper functions */
/* functions to call methodes */
@@ -192,9 +140,6 @@ public:
bool dbusSystemMethodCall( TQString interface, TQString path, TQString object, TQString method,
void *retvalue, int retval_type, int first_arg_type, ... );
- //! to call a suspend method on HAL
- bool dbusMethodCallSuspend ( const char *suspend );
-
/* PolicyKit call helper */
//! check if the user has a requested privilege
int isUserPrivileged( TQString privilege, TQString udi, TQString ressource = "", TQString user = TQString());