Removed sync dbus call code in tdenetworkmanager to align to latest

dbus-1-tqt code.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/39/head
Michele Calgaro 5 years ago
parent e1ef15d04d
commit edcf1665f0
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1597,18 +1597,6 @@ TDENetworkConnectionType::TDENetworkConnectionType TDENetworkConnectionManager_B
TQ_UINT32 ret;
TQT_DBusError error;
#ifndef USE_ASYNC_DBUS_CALLS
// Obtain connection settings from the path specified
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, dbusPath);
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
TQT_DBusTQStringDataMap connectionSettingsMap;
ret = connectionSettings.GetSettings(connectionSettingsMap, error);
if (ret && error.isValid()) {
ret = 0;
PRINT_ERROR((error.name() + ": " + error.message()))
}
if (ret) {
#else // USE_ASYNC_DBUS_CALLS
// Obtain connection settings from the path specified
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, dbusPath);
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
@ -1640,7 +1628,6 @@ TDENetworkConnectionType::TDENetworkConnectionType TDENetworkConnectionManager_B
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
}
#endif // USE_ASYNC_DBUS_CALLS
// Parse settings to find connection type
TQT_DBusTQStringDataMap::const_iterator it2;
@ -1939,18 +1926,6 @@ void TDENetworkConnectionManager_BackendNM::loadConnectionInformation() {
printf("[network-manager comm debug] %s\n", (*it).data()); fflush(stdout);
#endif // DEBUG_NETWORK_MANAGER_COMMUNICATIONS
#ifndef USE_ASYNC_DBUS_CALLS
// Obtain connection settings from the path specified
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, (*it));
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
TQT_DBusTQStringDataMap connectionSettingsMap;
ret = connectionSettings.GetSettings(connectionSettingsMap, error);
if (ret && error.isValid()) {
ret = 0;
PRINT_ERROR((error.name() + ": " + error.message()))
}
if (ret) {
#else // USE_ASYNC_DBUS_CALLS
// Obtain connection settings from the path specified
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, (*it));
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
@ -1983,7 +1958,6 @@ void TDENetworkConnectionManager_BackendNM::loadConnectionInformation() {
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
}
#endif // USE_ASYNC_DBUS_CALLS
#ifdef DEBUG_NETWORK_MANAGER_COMMUNICATIONS
printf("[network-manager comm debug] received DBUS object structure map follows:\n"); fflush(stdout);
@ -3079,17 +3053,6 @@ bool TDENetworkConnectionManager_BackendNM::loadConnectionSecretsForGroup(TQStri
TQT_DBusTQStringDataMap connectionSecretsMap(TQT_DBusData::String);
ret = d->m_networkManagerSettings->GetConnectionByUuid(uuid, existingConnection, error);
if (ret) {
#ifndef USE_ASYNC_DBUS_CALLS
// Obtain connection settings from the path specified
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, existingConnection);
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
ret = connectionSettings.GetSecrets(group, connectionSecretsMap, error);
if (ret && error.isValid()) {
ret = 0;
PRINT_ERROR((error.name() + ": " + error.message()))
}
if (ret) {
#else // USE_ASYNC_DBUS_CALLS
// Obtain connection secrets from the path specified
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, existingConnection);
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
@ -3121,7 +3084,6 @@ bool TDENetworkConnectionManager_BackendNM::loadConnectionSecretsForGroup(TQStri
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
}
#endif // USE_ASYNC_DBUS_CALLS
#ifdef DEBUG_NETWORK_MANAGER_COMMUNICATIONS
printf("[network-manager comm debug] received DBUS object structure map follows:\n"); fflush(stdout);
@ -3296,17 +3258,6 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
existing = false;
ret = d->m_networkManagerSettings->GetConnectionByUuid(connection->UUID, existingConnection, error);
if (ret) {
#ifndef USE_ASYNC_DBUS_CALLS
// Obtain connection settings from the path specified
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, existingConnection);
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
ret = connectionSettings.GetSettings(connectionSettingsMap, error);
if (ret && error.isValid()) {
ret = 0;
PRINT_ERROR((error.name() + ": " + error.message()))
}
if (ret) {
#else // USE_ASYNC_DBUS_CALLS
// Obtain connection settings from the path specified
DBus::ConnectionSettingsInterface connectionSettings(NM_DBUS_SERVICE, existingConnection);
connectionSettings.setConnection(TQT_DBusConnection::systemBus());
@ -3339,7 +3290,6 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if (d->nmConnectionSettingsAsyncSettingsResponse.contains(asyncCallID)) {
d->nmConnectionSettingsAsyncSettingsResponse.remove(asyncCallID);
}
#endif // USE_ASYNC_DBUS_CALLS
existing = true;
}
}

Loading…
Cancel
Save