summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog114
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/Makefile.am4
-rw-r--r--src/dbusInterface.cpp (renamed from src/dbusHAL.cpp)50
-rw-r--r--src/dbusInterface.h (renamed from src/dbusHAL.h)12
-rw-r--r--src/hardware.cpp2
-rw-r--r--src/hardware.h9
-rw-r--r--src/hardware_battery.h2
8 files changed, 96 insertions, 99 deletions
diff --git a/ChangeLog b/ChangeLog
index 2908cd0..d0c9899 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -50,8 +50,8 @@
When use DBUS_TYPE_BOOLEAN use as variable type dbus_bool_t
to avoid possible trouble on big endian machines:
- * src/dbusHAL.cpp: Replaced int variables with dbus_bool_t.
- * src/dbusHAL.h: included dbus/dbus.h
+ * src/dbusInterface.cpp: Replaced int variables with dbus_bool_t.
+ * src/dbusInterface.h: included dbus/dbus.h
* src/hardware.cpp: Replaced int variables with dbus_bool_t.
2007-09-11 Danny Kukawka <[email protected]>
@@ -104,7 +104,7 @@
Changed return value types due to changes in HAL
(s/DBUS_TYPE_UINT32/DBUS_TYPE_INT32):
- * src/dbusHAL.cpp: Changed for suspend calls.
+ * src/dbusInterface.cpp: Changed for suspend calls.
* src/hardware.cpp: Changed for GetBrightness and for
SetPowerSave() calls.
@@ -183,11 +183,11 @@
2007-08-20 Danny Kukawka <[email protected]>
- * src/dbusHAL.[cpp,h]: Added function to check if the
+ * src/dbusInterface.[cpp,h]: Added function to check if the
org.freedesktop.Policy.Power has an owner (new function
is isPolicyPowerIfaceOwned()).
* src/hardware.[cpp,h]: Added helper to call
- dbusHAL::isPolicyPowerIfaceOwned().
+ dbusInterface::isPolicyPowerIfaceOwned().
* src/kpowersave.[cpp,h]: Added active session handling
for schemes (don't react on AC state changes if the
session get inactive and apply default schemes based on
@@ -225,12 +225,12 @@
from DBus for org.freedesktop.Policy.Power and check if
this KPowersave instance caused the signal.
- * src/dbusHAL.[cpp,h]:
+ * src/dbusInterface.[cpp,h]:
* src/hardware.cpp:
2007-08-20 Danny Kukawka <[email protected]>
- * src/dbusHAL.[cpp,h]: Split up the code to aquire the
+ * src/dbusInterface.[cpp,h]: Split up the code to aquire the
org.freedesktop.Policy.Power name service to a new own
function. Added new function to release the service
name again. Call now dbus_bus_release_name() if close()
@@ -285,7 +285,7 @@
current desktop session is active and monitor if the
state change.
- * src/dbusHAL.[cpp,h]: Listen to D-Bus if the state of the
+ * src/dbusInterface.[cpp,h]: Listen to D-Bus if the state of the
session change and inform class HardwareInfo about the
change.
* src/hardware.[cpp,h]: Added new function to get the name
@@ -303,7 +303,7 @@
and remove no longer needed checks to prevent compiler
warnings:
- * src/dbusHAL.cpp:
+ * src/dbusInterface.cpp:
* src/inactivity.cpp:
* src/kpowersave.cpp:
@@ -328,7 +328,7 @@
2007-08-16 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: Show some debug messages only if
+ * src/dbusInterface.cpp: Show some debug messages only if
kpowersave started with --dbg-trace.
2007-08-16 Danny Kukawka <[email protected]>
@@ -388,11 +388,11 @@
2007-08-13 Danny Kukawka <[email protected]>
- * src/dbusHAL.[cpp,h]: Extended isUserPrivileged()
+ * src/dbusInterface.[cpp,h]: Extended isUserPrivileged()
depending on USE_LIBHAL_POLICYCHECK to ask HAL if the
user is privileged to call a interface.
* src/hardware.[cpp,h]: Ported existing calls of
- dbusHAL::isUserPrivileged() to changed function param.
+ dbusInterface::isUserPrivileged() to changed function param.
Added new checks for Brightness/SetPowersave HAL calls
if USE_LIBHAL_POLICYCHECK is defined (because they didn't
exist in the old HAL < 0.5.10)
@@ -497,7 +497,7 @@
2007-07-26 Danny Kukawka <[email protected]>
- * src/dbusHAL.h: Code docu update.
+ * src/dbusInterface.h: Code docu update.
2007-07-25 Danny Kukawka <[email protected]>
@@ -512,7 +512,7 @@
warning: deprecated conversion from string constant to 'char*'
- * src/dbusHAL.[cpp,h]: in dbusMethodCallSuspend()
+ * src/dbusInterface.[cpp,h]: in dbusMethodCallSuspend()
* src/hardware.[cpp,h]: in setCPUFreqGovernor()
2007-07-25 Danny Kukawka <[email protected]>
@@ -686,7 +686,7 @@
Fixed debug messages:
- * src/dbusHAL.cpp:
+ * src/dbusInterface.cpp:
* src/hardware.cpp:
2007-06-17 Danny Kukawka <[email protected]>
@@ -722,7 +722,7 @@
2007-06-13 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: Make the code easier by group initial checks
+ * src/dbusInterface.cpp: Make the code easier by group initial checks
for HAL/D-Bus connection and parameter checks, add goto's to
reduce kdDebugFuncOut() codelines before each return.
This include also some whitespace/tab replacements.
@@ -740,7 +740,7 @@
* src/autosuspend.cpp:
* src/configuredialog.cpp:
- * src/dbusHAL.cpp:
+ * src/dbusInterface.cpp:
* src/detaileddialog.cpp:
* src/hardware.cpp:
* src/hardware_battery.cpp:
@@ -765,7 +765,7 @@
2007-05-10 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: Added code to check if the returned
+ * src/dbusInterface.cpp: Added code to check if the returned
message is really DBUS_MESSAGE_TYPE_METHOD_RETURN as
expected.
* src/hardware.cpp: Changed debug message due to a bug in
@@ -774,7 +774,7 @@
2007-05-10 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: added TODO
+ * src/dbusInterface.cpp: added TODO
* src/hardware.[cpp,h]: Fixed call for SetPowerSave to get
also the returnvalue from the HAL method.
@@ -945,7 +945,7 @@
* src/autosuspend.[cpp,h]:
* src/blacklisteditdialog.cpp:
* src/configuredialog.cpp:
- * src/dbusHAL.cpp:
+ * src/dbusInterface.cpp:
* src/hardware.cpp:
* src/hardware_battery.cpp:
* src/hardware_batteryCollection.cpp:
@@ -959,7 +959,7 @@
parallel build issues:
* src/autosuspend.cpp:
- * src/dbusHAL.cpp:
+ * src/dbusInterface.cpp:
* src/hardware.cpp:
* src/hardware_battery.cpp:
* src/hardware_batteryCollection.cpp:
@@ -989,7 +989,7 @@
2007-04-09 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: make isUserPrivileged() more robust to
+ * src/dbusInterface.cpp: make isUserPrivileged() more robust to
avoid possible segmentation faults.
2007-04-03 Danny Kukawka <[email protected]>
@@ -1130,7 +1130,7 @@
Updated dates in copyright headers:
- * src/dbusHAL.[cpp,h]:
+ * src/dbusInterface.[cpp,h]:
* src/detaileddialog.cpp:
* src/hardware*.[cpp,h]:
* src/inactivity.cpp:
@@ -1140,7 +1140,7 @@
2007-03-09 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: emit signal about resume first if the
+ * src/dbusInterface.cpp: emit signal about resume first if the
pending call and the messages get unrefed.
2007-02-28 Danny Kukawka <[email protected]>
@@ -1441,7 +1441,7 @@
Fixed usage of D-Bus in strings and code comments
(s/DBUS/D-Bus/ and s/D-BUS/D-Bus/).
- * src/dbusHAL.[cpp,h]:
+ * src/dbusInterface.[cpp,h]:
* src/dummy.cpp:
* src/hardware.[cpp,h]:
* src/kpowersave.cpp:
@@ -1805,7 +1805,7 @@
2006-12-08 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: fixed compiler warning from b.n.c bug
+ * src/dbusInterface.cpp: fixed compiler warning from b.n.c bug
#226875 with proposed change from David Binderman
@@ -1860,7 +1860,7 @@
Make KPowersave more stable (hopefully), added some checks
and (re)set some variables in error cases.
- * src/dbusHAL.cpp:
+ * src/dbusInterface.cpp:
* src/hardware.cpp:
2006-11-22 Danny Kukawka <[email protected]>
@@ -1946,7 +1946,7 @@
Fixed code comments, added missing function parameter docu,
removed file-version tags, update date of some files:
- * src/dbusHAL.[cpp,h]:
+ * src/dbusInterface.[cpp,h]:
* src/hardware.[cpp,h]:
* src/hardware_battery.[cpp,h]:
* src/hardware_batteryCollection.[cpp,h]:
@@ -1959,7 +1959,7 @@
Fixed code comments and documentation (e.g. undocumented
function parameter):
- * src/dbusHAL.cpp:
+ * src/dbusInterface.cpp:
* src/hardware.cpp:
* src/hardware.h:
* src/kpowersave.cpp:
@@ -2011,7 +2011,7 @@
2006-11-19 Danny Kukawka <[email protected]>
* TODO: removed done issues
- * src/dbusHAL.[cpp,h]: Added code to claim/aquire the
+ * src/dbusInterface.[cpp,h]: Added code to claim/aquire the
org.freedesktop.Policy.Power interface from D-Bus to stop
the powersave daemon/client and to be allowed to handle
the powermanagement policy.
@@ -2077,7 +2077,7 @@
2006-11-17 Danny Kukawka <[email protected]>
* src/kpowersave.cpp: Reduced function calls to
- dbusHAL with updateTooltip().
+ dbusInterface with updateTooltip().
2006-11-16 Danny Kukawka <[email protected]>
@@ -2086,7 +2086,7 @@
2006-11-16 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: Fixed free() error, if D-Bus is not
+ * src/dbusInterface.cpp: Fixed free() error, if D-Bus is not
running on startup.
2006-11-16 Danny Kukawka <[email protected]>
@@ -2148,11 +2148,11 @@
use the new pending calls instead of the old, normal
methodCalls.
Added code to fetch, forward and handle the resume
- signal from the dbusHAL class.
+ signal from the dbusInterface class.
2006-11-14 Danny Kukawka <[email protected]>
- * src/dbusHAL.[cpp,h]: added new functions to be able
+ * src/dbusInterface.[cpp,h]: added new functions to be able
to handle suspend as pending D-Bus calls. This should
allow us to get a resume signal etc.
Added a new signal to be emitted if we resumed and
@@ -2348,7 +2348,7 @@
2006-11-06 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: Fixed dbusHAL::isUserPrivileged()
+ * src/dbusInterface.cpp: Fixed dbusInterface::isUserPrivileged()
to use 'const char *' instead of QString.
2006-11-06 Danny Kukawka <[email protected]>
@@ -2369,7 +2369,7 @@
2006-11-06 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: set dbus_is_connected to false if
+ * src/dbusInterface.cpp: set dbus_is_connected to false if
D-Bus is gone
* src/kpowersave.cpp: fixed display D-Bus error message
and avoid display HAL related error msg if D-Bus is
@@ -2481,7 +2481,7 @@
2006-11-05 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: Removed include of powersave_dbus.h.
+ * src/dbusInterface.cpp: Removed include of powersave_dbus.h.
Replaced usage of dbusGetMessageString() from old powersave
library with dbus_message_get_args() and fixed code to
fetch event if HAL go down.
@@ -2518,7 +2518,7 @@
Replaced usage of pdaemon class in the detailed dialog with
class HardwareInfo:
- * src/dbusHAL.cpp: fixed debug message
+ * src/dbusInterface.cpp: fixed debug message
* src/dbusPowersave.cpp: comment out some code to get the
applet run temporary, before remove the class complete.
* src/detaileddialog.[cpp,h]: replaced complete pdaemon code
@@ -2593,7 +2593,7 @@
anymore. Simply call dbus_bus_get() instead. This should fix
b.n.c #214881.
- * src/dbusHAL.cpp:
+ * src/dbusInterface.cpp:
* src/dbusPowersave.cpp:
2006-10-25 Danny Kukawka <[email protected]>
@@ -2627,7 +2627,7 @@
Cleanup: removed not handled msg_type NAME_AQUIRED.
- * src/dbusHAL.[cpp,h]:
+ * src/dbusInterface.[cpp,h]:
* src/hardware.cpp:
2006-10-24 Danny Kukawka <[email protected]>
@@ -2643,13 +2643,13 @@
2006-10-24 Danny Kukawka <[email protected]>
- * src/dbusHAL.[cpp,h]: changed return type of new function
+ * src/dbusInterface.[cpp,h]: changed return type of new function
isUserPrivileged() from bool to int to get a info if we can't
connect to the PolicyKit interface on DBUS.
2006-10-24 Danny Kukawka <[email protected]>
- * src/dbusHAL.[cpp,h]: Added function to check PolicyKit
+ * src/dbusInterface.[cpp,h]: Added function to check PolicyKit
for a privilege for a given user.
2006-10-23 Danny Kukawka <[email protected]>
@@ -2807,7 +2807,7 @@
2006-10-19 Danny Kukawka <[email protected]>
- * src/dbusHAL.h: removed unused event type HAL_EVENT
+ * src/dbusInterface.h: removed unused event type HAL_EVENT
* src/hardware.cpp: Added initial code to filter the DBUS and
HAL events we need in KPowersave.
@@ -2927,16 +2927,16 @@
2006-10-09 Danny Kukawka <[email protected]>
- * src/dbusHAL.[cpp,h]: changed DBus method call functions for
+ * src/dbusInterface.[cpp,h]: changed DBus method call functions for
easier usage than the old one and removed one no longer needed
function.
- * src/dbusHAL.h: Changed function params to show also the
+ * src/dbusInterface.h: Changed function params to show also the
variable names in code completion of KDevelop.
* src/hardware.cpp: Adapted exsting code the new functions.
2006-10-06 Danny Kukawka <[email protected]>
- * src/dbusHAL.h: s/HAL_DEVICE_UDI/HAL_COMPUTER_UDI/
+ * src/dbusInterface.h: s/HAL_DEVICE_UDI/HAL_COMPUTER_UDI/
* src/hardware.[cpp,h]: Replaced strings with defines
HAL_COMPUTER_UDI and HAL_PM_IFACE.
Added new initial function to trigger a suspend and added new
@@ -2965,7 +2965,7 @@
2006-10-03 Danny Kukawka <[email protected]>
- * src/dbusHAL.[cpp,h]: removed HAL specific function to call
+ * src/dbusInterface.[cpp,h]: removed HAL specific function to call
a powermanagement related function and added three generic
functions to call a method on a DBUS interface (taked and
adapted code from current powersave code base).
@@ -2976,7 +2976,7 @@
2006-10-01 Danny Kukawka <[email protected]>
- * src/dbusHAL.[cpp,h]: added function to check the supported
+ * src/dbusInterface.[cpp,h]: added function to check the supported
powermanagement/suspend functions and store the information
if e.g. suspend2disk is available as HAL interface and if not
if the machine support this via the kernel in general.
@@ -2991,7 +2991,7 @@
2006-09-28 Frank Seidel <[email protected]>
- * src/dbusHAL.cpp: Fixed typo in halQueryCapability (libhal
+ * src/dbusInterface.cpp: Fixed typo in halQueryCapability (libhal
function call).
2006-09-28 Danny Kukawka <[email protected]>
@@ -3002,11 +3002,11 @@
2006-09-26 Danny Kukawka <[email protected]>
- * src/dbusHAL.[cpp,h]: code comments
+ * src/dbusInterface.[cpp,h]: code comments
* src/hardware.[cpp,h]: addes some empty functions and a QDicr
for udis of devices except batteries (e.g. AC, Lid, buttons ...)
* src/pdaemon.cpp: added comments about the state of port code
- and functions to class dbusHAL
+ and functions to class dbusInterface
2006-09-25 Danny Kukawka <[email protected]>
@@ -3028,10 +3028,10 @@
2006-09-25 Danny Kukawka <[email protected]>
- * src/dbusHAL.cpp: init HAL context in constructor
+ * src/dbusInterface.cpp: init HAL context in constructor
* src/hardware.[cpp/h]: conntect to DBUS/HAL in constructor and
added initial function to filter and handle events from DBUS/HAL
- via signal from dbusHAL class.
+ via signal from dbusInterface class.
2006-09-23 Danny Kukawka <[email protected]>
@@ -3051,8 +3051,8 @@
2006-09-23 Danny Kukawka <[email protected]>
* Doxyfile: changed version string
- * src/Makefile.am: added dbusHAL class to make
- * src/dbusHAL.[cpp,h]: Changed name of the class to dbusHAL and
+ * src/Makefile.am: added dbusInterface class to make
+ * src/dbusInterface.[cpp,h]: Changed name of the class to dbusInterface and
added connection to HAL and code to hold LibHalContext. The class
contains now mew functions to search for devices and to get device
information from HAL. Also added: new function to call
@@ -3069,8 +3069,8 @@
TODO: add code to init and hold hal_context for libhal.
- * src/dbusHAL.cpp:
- * src/dbusHAL.h:
+ * src/dbusInterface.cpp:
+ * src/dbusInterface.h:
2006-09-04 Danny Kukawka <[email protected]>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 41cad7d..ada56e2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -41,7 +41,7 @@ tde_add_tdeinit_executable( kpowersave AUTOMOC
dummy.cpp autodimm.cpp autosuspend.cpp
blacklistedit_Dialog.ui blacklisteditdialog.cpp
configure_Dialog.ui configuredialog.cpp countdown_Dialog.ui
- countdowndialog.cpp dbusHAL.cpp detailed_Dialog.ui
+ countdowndialog.cpp dbusInterface.cpp detailed_Dialog.ui
detaileddialog.cpp hardware.cpp hardware_battery.cpp
hardware_batteryCollection.cpp hardware_cpu.cpp
inactivity.cpp info_Dialog.ui infodialog.cpp kpowersave.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 0315ff0..a6f2aed 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,7 +11,7 @@ noinst_HEADERS = \
blacklisteditdialog.h \
configuredialog.h \
countdowndialog.h \
- dbusHAL.h \
+ dbusInterface.h \
detaileddialog.h \
hardware.h \
hardware_battery.h \
@@ -53,7 +53,7 @@ kpowersave_la_SOURCES = \
configuredialog.cpp \
countdown_Dialog.ui \
countdowndialog.cpp \
- dbusHAL.cpp \
+ dbusInterface.cpp \
detailed_Dialog.ui \
detaileddialog.cpp \
hardware.cpp \
diff --git a/src/dbusHAL.cpp b/src/dbusInterface.cpp
index 48686a3..adec4cd 100644
--- a/src/dbusHAL.cpp
+++ b/src/dbusInterface.cpp
@@ -18,7 +18,7 @@
***************************************************************************/
/*!
- * \file dbusHAL.cpp
+ * \file dbusInterface.cpp
* \brief In this file can be found the functionality to connect to
* the HAL daemon via D-Bus, to handle D-Bus calls/events and to
* provide wrapper to HAL lib and functions
@@ -30,15 +30,15 @@
#include <klocale.h>
// DBUS - Header
-#include "dbusHAL.h"
+#include "dbusInterface.h"
// system headers
#include <iostream>
static void* myInstance = 0;
-/*! The default constructor of the class dbusHAL. */
-dbusHAL::dbusHAL(){
+/*! The default constructor of the class dbusInterface. */
+dbusInterface::dbusInterface(){
kdDebugFuncIn(trace);
dbus_is_connected = false;
@@ -56,7 +56,7 @@ dbusHAL::dbusHAL(){
}
/*! This is the default destructor of class dbusPowersaveConnection. */
-dbusHAL::~dbusHAL(){
+dbusInterface::~dbusInterface(){
kdDebugFuncIn(trace);
close();
@@ -71,7 +71,7 @@ dbusHAL::~dbusHAL(){
* \retval true if connected
* \retval false if disconnected
*/
-bool dbusHAL::isConnectedToDBUS() {
+bool dbusInterface::isConnectedToDBUS() {
return dbus_is_connected;
}
@@ -82,7 +82,7 @@ bool dbusHAL::isConnectedToDBUS() {
* \retval true if aquired
* \retval false if not
*/
-bool dbusHAL::aquiredPolicyPowerInterface() {
+bool dbusInterface::aquiredPolicyPowerInterface() {
return aquiredPolicyPower;
}
@@ -92,7 +92,7 @@ bool dbusHAL::aquiredPolicyPowerInterface() {
* \retval true if successful reconnected to D-Bus and HAL
* \retval false if unsuccessful
*/
-bool dbusHAL::reconnect() {
+bool dbusInterface::reconnect() {
// close D-Bus connection
close();
// init D-Bus conntection and HAL context
@@ -105,7 +105,7 @@ bool dbusHAL::reconnect() {
* \retval true if successful closed the connection
* \retval false if any problems
*/
-bool dbusHAL::close() {
+bool dbusInterface::close() {
if ( m_dBusQtConnection != NULL ) {
releasePolicyPowerIface();
m_dBusQtConnection->close();
@@ -124,7 +124,7 @@ bool dbusHAL::close() {
* \retval true if successful initialised D-Bus connection
* \retval false if unsuccessful
*/
-bool dbusHAL::initDBUS(){
+bool dbusInterface::initDBUS(){
kdDebugFuncIn(trace);
dbus_is_connected = false;
@@ -180,7 +180,7 @@ bool dbusHAL::initDBUS(){
* \retval true if successful aquired the interface
* \retval false if unsuccessful
*/
-bool dbusHAL::aquirePolicyPowerIface(){
+bool dbusInterface::aquirePolicyPowerIface(){
kdDebugFuncIn(trace);
if (dbus_connection == NULL) {
@@ -214,7 +214,7 @@ bool dbusHAL::aquirePolicyPowerIface(){
* \retval true if successful aquired the interface
* \retval false if unsuccessful
*/
-bool dbusHAL::releasePolicyPowerIface(){
+bool dbusInterface::releasePolicyPowerIface(){
kdDebugFuncIn(trace);
int result;
@@ -263,7 +263,7 @@ bool dbusHAL::releasePolicyPowerIface(){
* \retval true if the interface is owned by someone
* \retval false if else
*/
-bool dbusHAL::isPolicyPowerIfaceOwned(){
+bool dbusInterface::isPolicyPowerIfaceOwned(){
kdDebugFuncIn(trace);
bool retval = false;
@@ -300,7 +300,7 @@ bool dbusHAL::isPolicyPowerIfaceOwned(){
* \param ... more arguments
* \return If the query was successful or not
*/
-bool dbusHAL::dbusSystemMethodCall( TQString interface, TQString path, TQString object, TQString method,
+bool dbusInterface::dbusSystemMethodCall( TQString interface, TQString path, TQString object, TQString method,
int first_arg_type, ... ) {
kdDebugFuncIn(trace);
@@ -328,7 +328,7 @@ bool dbusHAL::dbusSystemMethodCall( TQString interface, TQString path, TQString
* \param first_arg_type Integer with the dbus type of the first argument followed by the value
* \return If the query was successful or not
*/
-bool dbusHAL::dbusSystemMethodCall( TQString interface, TQString path, TQString object, TQString method,
+bool dbusInterface::dbusSystemMethodCall( TQString interface, TQString path, TQString object, TQString method,
void *retvalue, int retval_type, int first_arg_type, ... ) {
kdDebugFuncIn(trace);
@@ -358,7 +358,7 @@ bool dbusHAL::dbusSystemMethodCall( TQString interface, TQString path, TQString
* \param var_args va_list with more arguments
* \return If the query was successful or not
*/
-bool dbusHAL::dbusMethodCall( TQString interface, TQString path, TQString object, TQString method,
+bool dbusInterface::dbusMethodCall( TQString interface, TQString path, TQString object, TQString method,
DBusBusType dbus_type, void *retvalue, int retval_type, int first_arg_type,
va_list var_args ) {
kdDebugFuncIn(trace);
@@ -441,7 +441,7 @@ out:
* \retval 1 if allowed
* \retval -1 if a error occurs or we could not query the interface
*/
-int dbusHAL::isUserPrivileged(TQString privilege, TQString udi, TQString ressource, TQString user) {
+int dbusInterface::isUserPrivileged(TQString privilege, TQString udi, TQString ressource, TQString user) {
kdDebugFuncIn(trace);
const char *_unique_name;
@@ -495,7 +495,7 @@ out:
* \param message String with the message
* \param string String with additional info
*/
-void dbusHAL::emitMsgReceived( msg_type type, TQString message, TQString string ) {
+void dbusInterface::emitMsgReceived( msg_type type, TQString message, TQString string ) {
if (message.startsWith("dbus.terminate"))
dbus_is_connected = false;
@@ -510,7 +510,7 @@ void dbusHAL::emitMsgReceived( msg_type type, TQString message, TQString string
emit msgReceived_withStringString( type, message, string );
}
-#include "dbusHAL.moc"
+#include "dbusInterface.moc"
// --> functions which are not member of the class ...
/*!
@@ -535,7 +535,7 @@ filterFunction (DBusConnection *connection, DBusMessage *message, void */*data*/
if (dbus_message_is_signal (message,
DBUS_INTERFACE_LOCAL,
"Disconnected")){
- ((dbusHAL*) myInstance)->emitMsgReceived( DBUS_EVENT, "dbus.terminate", 0 );
+ ((dbusInterface*) myInstance)->emitMsgReceived( DBUS_EVENT, "dbus.terminate", 0 );
dbus_connection_unref(connection);
kdDebugFuncOut(trace);
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@@ -590,18 +590,18 @@ filterFunction (DBusConnection *connection, DBusMessage *message, void */*data*/
if (!strcmp(service, "org.freedesktop.Policy.Power")) {
const char *own_name;
- own_name = dbus_bus_get_unique_name(((dbusHAL*) myInstance)->get_DBUS_connection());
+ own_name = dbus_bus_get_unique_name(((dbusInterface*) myInstance)->get_DBUS_connection());
if (!strcmp(new_owner, own_name)) {
kdDebug() << "=== now owner of org.freedesktop.Policy.Power ===" << endl;
// we have now again the ower of the name!
- ((dbusHAL*) myInstance)->emitMsgReceived( POLICY_POWER_OWNER_CHANGED,
+ ((dbusInterface*) myInstance)->emitMsgReceived( POLICY_POWER_OWNER_CHANGED,
"NOW_OWNER",
NULL );
} else {
// some other has now the interface
kdDebug() << "=== someone owner of org.freedesktop.Policy.Power ===" << endl;
- ((dbusHAL*) myInstance)->emitMsgReceived( POLICY_POWER_OWNER_CHANGED,
+ ((dbusInterface*) myInstance)->emitMsgReceived( POLICY_POWER_OWNER_CHANGED,
"OTHER_OWNER",
NULL );
}
@@ -620,7 +620,7 @@ filterFunction (DBusConnection *connection, DBusMessage *message, void */*data*/
dbus_bool_t active;
if (dbus_message_get_args( message, &error, DBUS_TYPE_BOOLEAN, &active, DBUS_TYPE_INVALID )) {
- ((dbusHAL*) myInstance)->emitMsgReceived( CONSOLEKIT_SESSION_ACTIVE,
+ ((dbusInterface*) myInstance)->emitMsgReceived( CONSOLEKIT_SESSION_ACTIVE,
session, TQString("%1").arg((int)active));
} else {
if (dbus_error_is_set( &error )) dbus_error_free( &error );
@@ -642,7 +642,7 @@ filterFunction (DBusConnection *connection, DBusMessage *message, void */*data*/
// --> some functions to get private members
//! to get the current connection to D-Bus
-DBusConnection * dbusHAL::get_DBUS_connection() {
+DBusConnection * dbusInterface::get_DBUS_connection() {
return dbus_connection;
}
diff --git a/src/dbusHAL.h b/src/dbusInterface.h
index 9a2e613..b0eb0b4 100644
--- a/src/dbusHAL.h
+++ b/src/dbusInterface.h
@@ -18,11 +18,11 @@
***************************************************************************/
/*!
-* \file dbusHAL.h
-* \brief Headerfile for dbusHAL.cpp and the class \ref dbusHAL.
+* \file dbusInterface.h
+* \brief Headerfile for dbusInterface.cpp and the class \ref dbusInterface.
*/
/*!
-* \class dbusHAL
+* \class dbusInterface
* \brief class for connection to HAL via D-Bus
* \author Danny Kukawka, <[email protected]>, <[email protected]>
* \date 2006-2007
@@ -66,7 +66,7 @@ enum msg_type {
POLICY_POWER_OWNER_CHANGED
};
-class dbusHAL : public TQObject{
+class dbusInterface : public TQObject{
Q_OBJECT
@@ -105,9 +105,9 @@ private:
public:
//! default constructor
- dbusHAL();
+ dbusInterface();
//! default destructor
- ~dbusHAL();
+ ~dbusInterface();
//! to reconnect to D-Bus and HAL
bool reconnect();
diff --git a/src/hardware.cpp b/src/hardware.cpp
index 227c7a5..f0996fd 100644
--- a/src/hardware.cpp
+++ b/src/hardware.cpp
@@ -75,7 +75,7 @@ HardwareInfo::HardwareInfo() {
setPrimaryBatteriesWarningLevel(); // force default settings
// connect to D-Bus and HAL
- dbus_HAL = new dbusHAL();
+ dbus_HAL = new dbusInterface();
if (dbus_HAL->isConnectedToDBUS()) {
dbus_terminated = false;
} else {
diff --git a/src/hardware.h b/src/hardware.h
index f902499..3dd048b 100644
--- a/src/hardware.h
+++ b/src/hardware.h
@@ -48,10 +48,7 @@
// TDE hardware library
#include <tdehardwaredevices.h>
-// HAL Library
-#include <hal/libhal.h>
-
-#include "dbusHAL.h"
+#include "dbusInterface.h"
#include "hardware_battery.h"
#include "hardware_batteryCollection.h"
@@ -130,8 +127,8 @@ class HardwareInfo : public TQObject{
private:
TDEHardwareDevices *m_hwdevices;
- //! pointer to the dbusHAL connection class
- dbusHAL *dbus_HAL;
+ //! pointer to the dbusInterface connection class
+ dbusInterface *dbus_HAL;
//! hold udis of special hardware execpt batteries represented by a TQString pairs (name,udi)
/*!
diff --git a/src/hardware_battery.h b/src/hardware_battery.h
index 1eaa7b0..3e50c0a 100644
--- a/src/hardware_battery.h
+++ b/src/hardware_battery.h
@@ -45,7 +45,7 @@
// TDE hardware library
#include <tdehardwaredevices.h>
-#include "dbusHAL.h"
+#include "dbusInterface.h"
class Battery : public TQObject {