|
|
@ -1623,7 +1623,7 @@ TDENetworkConnectionType::TDENetworkConnectionType TDENetworkConnectionManager_B
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, TRUE);
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, true);
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
tqApp->processEvents();
|
|
|
|
tqApp->processEvents();
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
@ -1966,7 +1966,7 @@ void TDENetworkConnectionManager_BackendNM::loadConnectionInformation() {
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, TRUE);
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, true);
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
tqApp->processEvents();
|
|
|
|
tqApp->processEvents();
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
@ -2465,7 +2465,7 @@ void TDENetworkConnectionManager_BackendNM::loadConnectionInformation() {
|
|
|
|
TQT_DBusDataValueList::const_iterator it4;
|
|
|
|
TQT_DBusDataValueList::const_iterator it4;
|
|
|
|
for (it4 = valueList.begin(); it4 != valueList.end(); ++it4) {
|
|
|
|
for (it4 = valueList.begin(); it4 != valueList.end(); ++it4) {
|
|
|
|
TQT_DBusData innerDataValue = *it4;
|
|
|
|
TQT_DBusData innerDataValue = *it4;
|
|
|
|
TQStringList pieces = TQStringList::split(":", innerDataValue.toString(), TRUE);
|
|
|
|
TQStringList pieces = TQStringList::split(":", innerDataValue.toString(), true);
|
|
|
|
vlanConnection->ingressPriorityMap[pieces[0].toUInt()] = pieces[1].toUInt();;
|
|
|
|
vlanConnection->ingressPriorityMap[pieces[0].toUInt()] = pieces[1].toUInt();;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2474,7 +2474,7 @@ void TDENetworkConnectionManager_BackendNM::loadConnectionInformation() {
|
|
|
|
TQT_DBusDataValueList::const_iterator it4;
|
|
|
|
TQT_DBusDataValueList::const_iterator it4;
|
|
|
|
for (it4 = valueList.begin(); it4 != valueList.end(); ++it4) {
|
|
|
|
for (it4 = valueList.begin(); it4 != valueList.end(); ++it4) {
|
|
|
|
TQT_DBusData innerDataValue = *it4;
|
|
|
|
TQT_DBusData innerDataValue = *it4;
|
|
|
|
TQStringList pieces = TQStringList::split(":", innerDataValue.toString(), TRUE);
|
|
|
|
TQStringList pieces = TQStringList::split(":", innerDataValue.toString(), true);
|
|
|
|
vlanConnection->egressPriorityMap[pieces[0].toUInt()] = pieces[1].toUInt();;
|
|
|
|
vlanConnection->egressPriorityMap[pieces[0].toUInt()] = pieces[1].toUInt();;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3030,7 +3030,7 @@ bool TDENetworkConnectionManager_BackendNM::loadConnectionSecrets(TQString uuid)
|
|
|
|
TDENetworkConnection* connection = findConnectionByUUID(uuid);
|
|
|
|
TDENetworkConnection* connection = findConnectionByUUID(uuid);
|
|
|
|
if (!connection) {
|
|
|
|
if (!connection) {
|
|
|
|
PRINT_ERROR(TQString("Unable to locate connection with uuid '%1' in local database. Did you run loadConnectionInformation() first?"));
|
|
|
|
PRINT_ERROR(TQString("Unable to locate connection with uuid '%1' in local database. Did you run loadConnectionInformation() first?"));
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//TDEWiredEthernetConnection* ethernetConnection = dynamic_cast<TDEWiredEthernetConnection*>(connection);
|
|
|
|
//TDEWiredEthernetConnection* ethernetConnection = dynamic_cast<TDEWiredEthernetConnection*>(connection);
|
|
|
|
//TDEWiredInfinibandConnection* infinibandConnection = dynamic_cast<TDEWiredInfinibandConnection*>(connection);
|
|
|
|
//TDEWiredInfinibandConnection* infinibandConnection = dynamic_cast<TDEWiredInfinibandConnection*>(connection);
|
|
|
@ -3042,7 +3042,7 @@ bool TDENetworkConnectionManager_BackendNM::loadConnectionSecrets(TQString uuid)
|
|
|
|
//TDEBluetoothConnection* bluetoothConnection = dynamic_cast<TDEBluetoothConnection*>(connection);
|
|
|
|
//TDEBluetoothConnection* bluetoothConnection = dynamic_cast<TDEBluetoothConnection*>(connection);
|
|
|
|
TDEModemConnection* modemConnection = dynamic_cast<TDEModemConnection*>(connection);
|
|
|
|
TDEModemConnection* modemConnection = dynamic_cast<TDEModemConnection*>(connection);
|
|
|
|
|
|
|
|
|
|
|
|
bool ret = TRUE;
|
|
|
|
bool ret = true;
|
|
|
|
ret = ret && loadConnectionSecretsForGroup(uuid, "802-1x");
|
|
|
|
ret = ret && loadConnectionSecretsForGroup(uuid, "802-1x");
|
|
|
|
if (wiFiConnection) {
|
|
|
|
if (wiFiConnection) {
|
|
|
|
ret = ret && loadConnectionSecretsForGroup(uuid, "802-11-wireless-security");
|
|
|
|
ret = ret && loadConnectionSecretsForGroup(uuid, "802-11-wireless-security");
|
|
|
@ -3062,7 +3062,7 @@ bool TDENetworkConnectionManager_BackendNM::loadConnectionSecretsForGroup(TQStri
|
|
|
|
TDENetworkConnection* connection = findConnectionByUUID(uuid);
|
|
|
|
TDENetworkConnection* connection = findConnectionByUUID(uuid);
|
|
|
|
if (!connection) {
|
|
|
|
if (!connection) {
|
|
|
|
PRINT_ERROR(TQString("Unable to locate connection with uuid '%1' in local database. Did you run loadConnectionInformation() first?"));
|
|
|
|
PRINT_ERROR(TQString("Unable to locate connection with uuid '%1' in local database. Did you run loadConnectionInformation() first?"));
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//TDEWiredEthernetConnection* ethernetConnection = dynamic_cast<TDEWiredEthernetConnection*>(connection);
|
|
|
|
//TDEWiredEthernetConnection* ethernetConnection = dynamic_cast<TDEWiredEthernetConnection*>(connection);
|
|
|
|
//TDEWiredInfinibandConnection* infinibandConnection = dynamic_cast<TDEWiredInfinibandConnection*>(connection);
|
|
|
|
//TDEWiredInfinibandConnection* infinibandConnection = dynamic_cast<TDEWiredInfinibandConnection*>(connection);
|
|
|
@ -3104,7 +3104,7 @@ bool TDENetworkConnectionManager_BackendNM::loadConnectionSecretsForGroup(TQStri
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_SECRETS_INTERACTION_TIMEOUT_MS, TRUE);
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_SECRETS_INTERACTION_TIMEOUT_MS, true);
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
tqApp->processEvents();
|
|
|
|
tqApp->processEvents();
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
@ -3242,26 +3242,26 @@ bool TDENetworkConnectionManager_BackendNM::loadConnectionSecretsForGroup(TQStri
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
PRINT_ERROR(TQString("Unable to load secrets for connection with uuid '%1'").arg(uuid))
|
|
|
|
PRINT_ERROR(TQString("Unable to load secrets for connection with uuid '%1'").arg(uuid))
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
PRINT_WARNING(TQString("connection for provided uuid '%1' was not found").arg(uuid));
|
|
|
|
PRINT_WARNING(TQString("connection for provided uuid '%1' was not found").arg(uuid));
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection* connection) {
|
|
|
|
bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection* connection) {
|
|
|
|
bool timed_out = FALSE;
|
|
|
|
bool timed_out = false;
|
|
|
|
bool command_failed = FALSE;
|
|
|
|
bool command_failed = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (!connection) {
|
|
|
|
if (!connection) {
|
|
|
|
PRINT_ERROR(TQString("connection cannot be NULL!"));
|
|
|
|
PRINT_ERROR(TQString("connection cannot be NULL!"));
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// If the UUID is blank, generate a new UUID for this connection and also guarantee that it it truly unique
|
|
|
|
// If the UUID is blank, generate a new UUID for this connection and also guarantee that it it truly unique
|
|
|
@ -3321,7 +3321,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, TRUE);
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, true);
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
tqApp->processEvents();
|
|
|
|
tqApp->processEvents();
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
@ -3402,7 +3402,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("connection", dbusData, TRUE); else outerMap.remove("connection");
|
|
|
|
if (groupValid) outerMap.insert("connection", dbusData, true); else outerMap.remove("connection");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["802-1x"];
|
|
|
|
dbusData = outerMap["802-1x"];
|
|
|
@ -3633,7 +3633,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("802-1x", dbusData, TRUE); else outerMap.remove("802-1x");
|
|
|
|
if (groupValid) outerMap.insert("802-1x", dbusData, true); else outerMap.remove("802-1x");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["802-3-ethernet"];
|
|
|
|
dbusData = outerMap["802-3-ethernet"];
|
|
|
@ -3679,7 +3679,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("802-3-ethernet", dbusData, TRUE); else outerMap.remove("802-3-ethernet");
|
|
|
|
if (groupValid) outerMap.insert("802-3-ethernet", dbusData, true); else outerMap.remove("802-3-ethernet");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["infiniband"];
|
|
|
|
dbusData = outerMap["infiniband"];
|
|
|
@ -3711,7 +3711,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("infiniband", dbusData, TRUE); else outerMap.remove("infiniband");
|
|
|
|
if (groupValid) outerMap.insert("infiniband", dbusData, true); else outerMap.remove("infiniband");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["802-11-wireless"];
|
|
|
|
dbusData = outerMap["802-11-wireless"];
|
|
|
@ -3831,7 +3831,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("802-11-wireless", dbusData, TRUE); else outerMap.remove("802-11-wireless");
|
|
|
|
if (groupValid) outerMap.insert("802-11-wireless", dbusData, true); else outerMap.remove("802-11-wireless");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["802-11-wireless-security"];
|
|
|
|
dbusData = outerMap["802-11-wireless-security"];
|
|
|
@ -3937,7 +3937,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("802-11-wireless-security", dbusData, TRUE); else outerMap.remove("802-11-wireless-security");
|
|
|
|
if (groupValid) outerMap.insert("802-11-wireless-security", dbusData, true); else outerMap.remove("802-11-wireless-security");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["vpn"];
|
|
|
|
dbusData = outerMap["vpn"];
|
|
|
@ -3974,7 +3974,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("vpn", dbusData, TRUE); else outerMap.remove("vpn");
|
|
|
|
if (groupValid) outerMap.insert("vpn", dbusData, true); else outerMap.remove("vpn");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["wimax"];
|
|
|
|
dbusData = outerMap["wimax"];
|
|
|
@ -4000,7 +4000,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("wimax", dbusData, TRUE); else outerMap.remove("wimax");
|
|
|
|
if (groupValid) outerMap.insert("wimax", dbusData, true); else outerMap.remove("wimax");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["vlan"];
|
|
|
|
dbusData = outerMap["vlan"];
|
|
|
@ -4031,7 +4031,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("vlan", dbusData, TRUE); else outerMap.remove("vlan");
|
|
|
|
if (groupValid) outerMap.insert("vlan", dbusData, true); else outerMap.remove("vlan");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["serial"];
|
|
|
|
dbusData = outerMap["serial"];
|
|
|
@ -4047,7 +4047,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("serial", dbusData, TRUE); else outerMap.remove("serial");
|
|
|
|
if (groupValid) outerMap.insert("serial", dbusData, true); else outerMap.remove("serial");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["ppp"];
|
|
|
|
dbusData = outerMap["ppp"];
|
|
|
@ -4096,7 +4096,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("ppp", dbusData, TRUE); else outerMap.remove("ppp");
|
|
|
|
if (groupValid) outerMap.insert("ppp", dbusData, true); else outerMap.remove("ppp");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["pppoe"];
|
|
|
|
dbusData = outerMap["pppoe"];
|
|
|
@ -4113,7 +4113,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("pppoe", dbusData, TRUE); else outerMap.remove("pppoe");
|
|
|
|
if (groupValid) outerMap.insert("pppoe", dbusData, true); else outerMap.remove("pppoe");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["802-11-olpc-mesh"];
|
|
|
|
dbusData = outerMap["802-11-olpc-mesh"];
|
|
|
@ -4143,7 +4143,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("802-11-olpc-mesh", dbusData, TRUE); else outerMap.remove("802-11-olpc-mesh");
|
|
|
|
if (groupValid) outerMap.insert("802-11-olpc-mesh", dbusData, true); else outerMap.remove("802-11-olpc-mesh");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["bluetooth"];
|
|
|
|
dbusData = outerMap["bluetooth"];
|
|
|
@ -4169,7 +4169,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("bluetooth", dbusData, TRUE); else outerMap.remove("bluetooth");
|
|
|
|
if (groupValid) outerMap.insert("bluetooth", dbusData, true); else outerMap.remove("bluetooth");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["cdma"];
|
|
|
|
dbusData = outerMap["cdma"];
|
|
|
@ -4186,7 +4186,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("cdma", dbusData, TRUE); else outerMap.remove("cdma");
|
|
|
|
if (groupValid) outerMap.insert("cdma", dbusData, true); else outerMap.remove("cdma");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["gsm"];
|
|
|
|
dbusData = outerMap["gsm"];
|
|
|
@ -4212,7 +4212,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("gsm", dbusData, TRUE); else outerMap.remove("gsm");
|
|
|
|
if (groupValid) outerMap.insert("gsm", dbusData, true); else outerMap.remove("gsm");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["ipv4"];
|
|
|
|
dbusData = outerMap["ipv4"];
|
|
|
@ -4340,7 +4340,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("ipv4", dbusData, TRUE); else outerMap.remove("ipv4");
|
|
|
|
if (groupValid) outerMap.insert("ipv4", dbusData, true); else outerMap.remove("ipv4");
|
|
|
|
|
|
|
|
|
|
|
|
groupValid = false;
|
|
|
|
groupValid = false;
|
|
|
|
dbusData = outerMap["ipv6"];
|
|
|
|
dbusData = outerMap["ipv6"];
|
|
|
@ -4522,7 +4522,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
dbusData = TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap<TQString>(settingsMap));
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
groupValid = (settingsMap.count() > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (groupValid) outerMap.insert("ipv6", dbusData, TRUE); else outerMap.remove("ipv6");
|
|
|
|
if (groupValid) outerMap.insert("ipv6", dbusData, true); else outerMap.remove("ipv6");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
connectionSettingsMap = TQT_DBusDataMap<TQString>(outerMap);
|
|
|
|
connectionSettingsMap = TQT_DBusDataMap<TQString>(outerMap);
|
|
|
|
|
|
|
|
|
|
|
@ -4554,7 +4554,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, TRUE);
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, true);
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
tqApp->processEvents();
|
|
|
|
tqApp->processEvents();
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
@ -4569,7 +4569,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
// Error!
|
|
|
|
// Error!
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
@ -4589,7 +4589,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, TRUE);
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, true);
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
PRINT_ERROR(TQString("DBUS asynchronous call timed out!"))
|
|
|
|
PRINT_ERROR(TQString("DBUS asynchronous call timed out!"))
|
|
|
@ -4615,7 +4615,7 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
// Error!
|
|
|
|
// Error!
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -4642,7 +4642,7 @@ bool TDENetworkConnectionManager_BackendNM::deleteConnection(TQString uuid) {
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, TRUE);
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, true);
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
tqApp->processEvents();
|
|
|
|
tqApp->processEvents();
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
@ -4656,17 +4656,17 @@ bool TDENetworkConnectionManager_BackendNM::deleteConnection(TQString uuid) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
PRINT_ERROR(TQString("Unable to remove connection with uuid '%1'").arg(uuid))
|
|
|
|
PRINT_ERROR(TQString("Unable to remove connection with uuid '%1'").arg(uuid))
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
PRINT_WARNING(TQString("connection for provided uuid '%1' was not found").arg(uuid));
|
|
|
|
PRINT_WARNING(TQString("connection for provided uuid '%1' was not found").arg(uuid));
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
PRINT_ERROR(TQString("invalid internal network-manager settings proxy object"));
|
|
|
|
PRINT_ERROR(TQString("invalid internal network-manager settings proxy object"));
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -4825,7 +4825,7 @@ bool TDENetworkConnectionManager_BackendNM::verifyConnectionSettings(TDENetworkC
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TDENetworkConnectionStatus::TDENetworkConnectionStatus TDENetworkConnectionManager_BackendNM::initiateConnection(TQString uuid) {
|
|
|
|
TDENetworkConnectionStatus::TDENetworkConnectionStatus TDENetworkConnectionManager_BackendNM::initiateConnection(TQString uuid) {
|
|
|
@ -4865,7 +4865,7 @@ TDENetworkConnectionStatus::TDENetworkConnectionStatus TDENetworkConnectionManag
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, TRUE);
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, true);
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
PRINT_ERROR(TQString("DBUS asynchronous call timed out!"))
|
|
|
|
PRINT_ERROR(TQString("DBUS asynchronous call timed out!"))
|
|
|
@ -5056,7 +5056,7 @@ TDENetworkConnectionStatus::TDENetworkConnectionStatus TDENetworkConnectionManag
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
// Wait for the asynchronous call to return...
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
d->nmConnectionSettingsAsyncCallWaiting[asyncCallID] = true;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
TQTimer nmCallTimeoutTimer;
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, TRUE);
|
|
|
|
nmCallTimeoutTimer.start(NM_ASYNC_TIMEOUT_MS, true);
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
while (d->nmConnectionSettingsAsyncCallWaiting[asyncCallID]) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
if (!nmCallTimeoutTimer.isActive()) {
|
|
|
|
PRINT_ERROR(TQString("DBUS asynchronous call timed out!"))
|
|
|
|
PRINT_ERROR(TQString("DBUS asynchronous call timed out!"))
|
|
|
@ -5350,14 +5350,14 @@ bool TDENetworkConnectionManager_BackendNM::networkingEnabled() {
|
|
|
|
if (error.isValid()) {
|
|
|
|
if (error.isValid()) {
|
|
|
|
// Error!
|
|
|
|
// Error!
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -5369,14 +5369,14 @@ bool TDENetworkConnectionManager_BackendNM::wiFiHardwareEnabled() {
|
|
|
|
if (error.isValid()) {
|
|
|
|
if (error.isValid()) {
|
|
|
|
// Error!
|
|
|
|
// Error!
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -5391,16 +5391,16 @@ bool TDENetworkConnectionManager_BackendNM::enableNetworking(bool enable) {
|
|
|
|
if (error.isValid()) {
|
|
|
|
if (error.isValid()) {
|
|
|
|
// Error!
|
|
|
|
// Error!
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
// FIXME
|
|
|
|
// FIXME
|
|
|
|
// Wait for async reply before returning...
|
|
|
|
// Wait for async reply before returning...
|
|
|
|
return TRUE;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -5411,14 +5411,14 @@ bool TDENetworkConnectionManager_BackendNM::enableWiFi(bool enable) {
|
|
|
|
if (error.isValid()) {
|
|
|
|
if (error.isValid()) {
|
|
|
|
// Error!
|
|
|
|
// Error!
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
return TRUE;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -5430,14 +5430,14 @@ bool TDENetworkConnectionManager_BackendNM::wiFiEnabled() {
|
|
|
|
if (error.isValid()) {
|
|
|
|
if (error.isValid()) {
|
|
|
|
// Error!
|
|
|
|
// Error!
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
PRINT_ERROR((error.name() + ": " + error.message()))
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
return FALSE;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|