summaryrefslogtreecommitdiffstats
path: root/src/network/bearer
diff options
context:
space:
mode:
authorLouai Al-Khanji <louai.al-khanji@theqtcompany.com>2015-10-15 16:24:54 +0300
committerLouai Al-Khanji <louai.al-khanji@theqtcompany.com>2015-11-21 15:38:39 +0000
commitdbb7817e13bc7f7ccb8f04b00a65eb3dcf8d25f8 (patch)
tree6b786e700e14bfe100bebd753b7133830231dac4 /src/network/bearer
parent496823b9a856d649c468d03b64241562807f3c16 (diff)
Remove remaining support for Blackberry
The platform is no longer supported or actively maintained, and is in the way for improvements to the Unix event dispatcher and QProcess implementations. Change-Id: I3935488ca12e2139ea5f46068d7665a453e20526 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/network/bearer')
-rw-r--r--src/network/bearer/qnetworkconfiguration.cpp103
-rw-r--r--src/network/bearer/qnetworkconfiguration_p.h11
2 files changed, 0 insertions, 114 deletions
diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp
index 6b56d3ec88..b68abce380 100644
--- a/src/network/bearer/qnetworkconfiguration.cpp
+++ b/src/network/bearer/qnetworkconfiguration.cpp
@@ -35,11 +35,6 @@
#include "qnetworkconfiguration_p.h"
#include <QDebug>
-#ifdef Q_OS_BLACKBERRY
-#include "private/qcore_unix_p.h" // qt_safe_open
-#include <sys/pps.h>
-#endif // Q_OS_BLACKBERRY
-
QT_BEGIN_NAMESPACE
/*!
@@ -202,77 +197,6 @@ QT_BEGIN_NAMESPACE
\value BearerLTE The configuration is for a LTE (4G) interface.
*/
-#ifdef Q_OS_BLACKBERRY
-static const char cellularStatusFile[] = "/pps/services/radioctrl/modem0/status_public";
-
-static QNetworkConfiguration::BearerType cellularStatus()
-{
- QNetworkConfiguration::BearerType ret = QNetworkConfiguration::BearerUnknown;
-
- int cellularStatusFD;
- if ((cellularStatusFD = qt_safe_open(cellularStatusFile, O_RDONLY)) == -1) {
- qWarning() << Q_FUNC_INFO << "failed to open" << cellularStatusFile;
- return ret;
- }
- char buf[2048];
- if (qt_safe_read(cellularStatusFD, &buf, sizeof(buf)) == -1) {
- qWarning() << Q_FUNC_INFO << "read from PPS file failed:" << strerror(errno);
- qt_safe_close(cellularStatusFD);
- return ret;
- }
- pps_decoder_t ppsDecoder;
- if (pps_decoder_initialize(&ppsDecoder, buf) != PPS_DECODER_OK) {
- qWarning() << Q_FUNC_INFO << "failed to initialize PPS decoder";
- qt_safe_close(cellularStatusFD);
- return ret;
- }
- pps_decoder_error_t err;
- if ((err = pps_decoder_push(&ppsDecoder, 0)) != PPS_DECODER_OK) {
- qWarning() << Q_FUNC_INFO << "pps_decoder_push failed" << err;
- pps_decoder_cleanup(&ppsDecoder);
- qt_safe_close(cellularStatusFD);
- return ret;
- }
- if (!pps_decoder_is_integer(&ppsDecoder, "network_technology")) {
- qWarning() << Q_FUNC_INFO << "field has not the expected data type";
- pps_decoder_cleanup(&ppsDecoder);
- qt_safe_close(cellularStatusFD);
- return ret;
- }
- int type;
- if (!pps_decoder_get_int(&ppsDecoder, "network_technology", &type)
- == PPS_DECODER_OK) {
- qWarning() << Q_FUNC_INFO << "could not read bearer type from PPS";
- pps_decoder_cleanup(&ppsDecoder);
- qt_safe_close(cellularStatusFD);
- return ret;
- }
- switch (type) {
- case 0: // 0 == NONE
- break; // unhandled
- case 1: // fallthrough, 1 == GSM
- case 4: // 4 == CDMA_1X
- ret = QNetworkConfiguration::Bearer2G;
- break;
- case 2: // 2 == UMTS
- ret = QNetworkConfiguration::BearerWCDMA;
- break;
- case 8: // 8 == EVDO
- ret = QNetworkConfiguration::BearerEVDO;
- break;
- case 16: // 16 == LTE
- ret = QNetworkConfiguration::BearerLTE;
- break;
- default:
- qWarning() << Q_FUNC_INFO << "unhandled bearer type" << type;
- break;
- }
- pps_decoder_cleanup(&ppsDecoder);
- qt_safe_close(cellularStatusFD);
- return ret;
-}
-#endif // Q_OS_BLACKBERRY
-
/*!
Constructs an invalid configuration object.
@@ -494,19 +418,6 @@ QNetworkConfiguration::BearerType QNetworkConfiguration::bearerType() const
return BearerUnknown;
QMutexLocker locker(&d->mutex);
-
-#ifdef Q_OS_BLACKBERRY
- // for cellular configurations, we need to determine the exact
- // type right now, because it might have changed after the last scan
- if (d->bearerType == QNetworkConfiguration::Bearer2G) {
- QNetworkConfiguration::BearerType type = cellularStatus();
- // if reading the status failed for some reason, just
- // fall back to 2G
- return (type == QNetworkConfiguration::BearerUnknown)
- ? QNetworkConfiguration::Bearer2G : type;
- }
-#endif // Q_OS_BLACKBERRY
-
return d->bearerType;
}
@@ -639,20 +550,6 @@ QString QNetworkConfiguration::bearerTypeName() const
case BearerWLAN:
return QStringLiteral("WLAN");
case Bearer2G:
-#ifdef Q_OS_BLACKBERRY
- {
- // for cellular configurations, we need to determine the exact
- // type right now, because it might have changed after the last scan
- QNetworkConfiguration::BearerType type = cellularStatus();
- if (type == QNetworkConfiguration::BearerWCDMA) {
- return QStringLiteral("WCDMA");
- } else if (type == QNetworkConfiguration::BearerEVDO) {
- return QStringLiteral("EVDO");
- }else if (type == QNetworkConfiguration::BearerLTE) {
- return QStringLiteral("LTE");
- }
- }
-#endif // Q_OS_BLACKBERRY
return QStringLiteral("2G");
case Bearer3G:
return QStringLiteral("3G");
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h
index 75df36fbd9..c8d926e32f 100644
--- a/src/network/bearer/qnetworkconfiguration_p.h
+++ b/src/network/bearer/qnetworkconfiguration_p.h
@@ -51,10 +51,6 @@
#include <QtCore/qmutex.h>
#include <QtCore/qmap.h>
-#ifdef Q_OS_BLACKBERRY
-#include <bps/netstatus.h>
-#endif
-
QT_BEGIN_NAMESPACE
typedef QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> QNetworkConfigurationPrivatePointer;
@@ -66,9 +62,6 @@ public:
type(QNetworkConfiguration::Invalid),
purpose(QNetworkConfiguration::UnknownPurpose),
bearerType(QNetworkConfiguration::BearerUnknown),
-#ifdef Q_OS_BLACKBERRY
- oldIpStatus(NETSTATUS_IP_STATUS_ERROR_UNKNOWN),
-#endif
isValid(false), roamingSupported(false)
{}
virtual ~QNetworkConfigurationPrivate()
@@ -89,10 +82,6 @@ public:
QNetworkConfiguration::Purpose purpose;
QNetworkConfiguration::BearerType bearerType;
-#ifdef Q_OS_BLACKBERRY
- netstatus_ip_status_t oldIpStatus;
-#endif
-
bool isValid;
bool roamingSupported;