|
|
|
@ -36,7 +36,7 @@ TQApplication(argc, argv, GUIenabled, SMenabled)
|
|
|
|
|
// init session connection to dbus
|
|
|
|
|
if (!initDBUS()) {
|
|
|
|
|
tqDebug("Failed to initialize the connection to DBus");
|
|
|
|
|
TQTimer::singleShot(DBUS_CONNECTION_TIMEOUT, this, TQT_SLOT(slotReconnect()));
|
|
|
|
|
TQTimer::singleShot(DBUS_CONNECTION_TIMEOUT, this, TQ_SLOT(slotReconnect()));
|
|
|
|
|
retryCount++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -66,16 +66,16 @@ bool HardwareControl::initDBUS(){
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
m_connection.scheduleDispatch();
|
|
|
|
|
m_connection.connect(this, TQT_SLOT(slotDbusSignal(const TQT_DBusMessage&)));
|
|
|
|
|
m_connection.connect(this, TQ_SLOT(slotDbusSignal(const TQT_DBusMessage&)));
|
|
|
|
|
|
|
|
|
|
TQTimer::singleShot(10, this, TQT_SLOT(slotConnectionCheck()));
|
|
|
|
|
TQTimer::singleShot(10, this, TQ_SLOT(slotConnectionCheck()));
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void HardwareControl::close() {
|
|
|
|
|
if(m_connection.isConnected()) {
|
|
|
|
|
m_connection.disconnect(this, TQT_SLOT(slotDbusSignal(const TQT_DBusMessage&)));
|
|
|
|
|
m_connection.disconnect(this, TQ_SLOT(slotDbusSignal(const TQT_DBusMessage&)));
|
|
|
|
|
m_connection.closeConnection(DBUS_HWCTRL_SERVICE_NAME);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -88,7 +88,7 @@ void HardwareControl::slotReconnect() {
|
|
|
|
|
if (DBUS_CONNECTION_RETRY > retryCount) {
|
|
|
|
|
tqFatal("Failed to initialize the connection to DBus");
|
|
|
|
|
}
|
|
|
|
|
TQTimer::singleShot(DBUS_CONNECTION_TIMEOUT, this, TQT_SLOT(slotReconnect()));
|
|
|
|
|
TQTimer::singleShot(DBUS_CONNECTION_TIMEOUT, this, TQ_SLOT(slotReconnect()));
|
|
|
|
|
retryCount++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|