refs #507, checks if URLs / DBus can be connected / reached

* new class CFailoverUrlList
* improved utility methods
* CDBusServer: utility function to check server / DBus can be connected
* check in swift GUI if DBus is available
This commit is contained in:
Klaus Basan
2015-11-17 01:22:29 +01:00
committed by Mathew Sutcliffe
parent b24cd2e9c7
commit 6dd8fb333e
7 changed files with 271 additions and 62 deletions

View File

@@ -134,9 +134,21 @@ namespace BlackMisc
return canConnect(host, p, message, timeoutMs);
}
bool CNetworkUtils::canConnect(const CUrl &location, QString &message, int timeoutMs)
bool CNetworkUtils::canConnect(const QUrl &url, int timeoutMs)
{
return canConnect(location.getHost(), location.getPort(), message, timeoutMs);
QString m;
return canConnect(url, m, timeoutMs);
}
bool CNetworkUtils::canConnect(const CUrl &url, QString &message, int timeoutMs)
{
return canConnect(url.getHost(), url.getPort(), message, timeoutMs);
}
bool CNetworkUtils::canConnect(const CUrl &url, int timeoutMs)
{
QString m;
return canConnect(url, m, timeoutMs);
}
bool CNetworkUtils::isValidIPv4Address(const QString &candidate)