summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/icd/qicdengine.h
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-07-29 06:39:05 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-08-02 00:09:06 (GMT)
commitd12f39e50e4144f3272424bb0bff18c857105654 (patch)
treeffde9a7863c78af2adabcb9c7e85c79d9f79cfc6 /src/plugins/bearer/icd/qicdengine.h
parent613bc8eb31d8a80b43aa045ab2040b7cb7e0eadf (diff)
downloadQt-d12f39e50e4144f3272424bb0bff18c857105654.zip
Qt-d12f39e50e4144f3272424bb0bff18c857105654.tar.gz
Qt-d12f39e50e4144f3272424bb0bff18c857105654.tar.bz2
Use an enum to return the bearer type of a network configuration.
Task-number: QTBUG-12378 Reviewed-by: Alex
Diffstat (limited to 'src/plugins/bearer/icd/qicdengine.h')
-rw-r--r--src/plugins/bearer/icd/qicdengine.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/plugins/bearer/icd/qicdengine.h b/src/plugins/bearer/icd/qicdengine.h
index 1b291eb..16dc979 100644
--- a/src/plugins/bearer/icd/qicdengine.h
+++ b/src/plugins/bearer/icd/qicdengine.h
@@ -54,13 +54,25 @@ class QNetworkConfigurationPrivate;
class IapMonitor;
class QDBusInterface;
+inline QNetworkConfiguration::BearerType bearerTypeFromIapType(const QString &iapType)
+{
+ if (iapType == QLatin1String("WLAN_INFRA") ||
+ iapType == QLatin1String("WLAN_ADHOC")) {
+ return QNetworkConfiguration::BearerWLAN;
+ } else if (iapType == QLatin1String("GPRS")) {
+ return QNetworkConfiguration::BearerHSPA;
+ } else {
+ return QNetworkConfiguration::BearerUnknown;
+ }
+}
+
class IcdNetworkConfigurationPrivate : public QNetworkConfigurationPrivate
{
public:
IcdNetworkConfigurationPrivate();
~IcdNetworkConfigurationPrivate();
- QString bearerName() const;
+ virtual QString bearerTypeName() const;
// In Maemo the id field (defined in QNetworkConfigurationPrivate)
// is the IAP id (which typically is UUID)