diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-01-07 03:03:34 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-01-07 03:03:34 (GMT) |
commit | b2477aec2adad08c4f44ffcdc2f9ad1c0ce4a56b (patch) | |
tree | 27a894ec318b9305ab4dd7c727f893fa7a5cd598 /src | |
parent | bd532d0cb6da5d09e048192171d7f5263e22eca6 (diff) | |
download | Qt-b2477aec2adad08c4f44ffcdc2f9ad1c0ce4a56b.zip Qt-b2477aec2adad08c4f44ffcdc2f9ad1c0ce4a56b.tar.gz Qt-b2477aec2adad08c4f44ffcdc2f9ad1c0ce4a56b.tar.bz2 |
Make compile for Symbian.
Diffstat (limited to 'src')
-rw-r--r-- | src/network/bearer/bearer.pri | 12 | ||||
-rw-r--r-- | src/network/bearer/qnetworkconfigmanager.cpp | 36 | ||||
-rw-r--r-- | src/network/bearer/qnetworkconfigmanager_s60_p.h | 4 | ||||
-rw-r--r-- | src/network/bearer/qnetworkconfiguration_s60_p.h | 2 | ||||
-rw-r--r-- | src/plugins/bearer/bearer.pro | 2 |
5 files changed, 47 insertions, 9 deletions
diff --git a/src/network/bearer/bearer.pri b/src/network/bearer/bearer.pri index 4f6c549..766e717 100644 --- a/src/network/bearer/bearer.pri +++ b/src/network/bearer/bearer.pri @@ -4,13 +4,11 @@ HEADERS += bearer/qnetworkconfiguration.h \ bearer/qnetworksession.h \ - bearer/qnetworkconfigmanager.h \ - bearer/qbearerplugin.h + bearer/qnetworkconfigmanager.h SOURCES += bearer/qnetworksession.cpp \ bearer/qnetworkconfigmanager.cpp \ - bearer/qnetworkconfiguration.cpp \ - bearer/qbearerplugin.cpp + bearer/qnetworkconfiguration.cpp symbian { exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \ @@ -72,11 +70,13 @@ symbian { HEADERS += bearer/qnetworkconfigmanager_p.h \ bearer/qnetworkconfiguration_p.h \ bearer/qnetworksession_p.h \ - bearer/qnetworksessionengine_p.h + bearer/qnetworksessionengine_p.h \ + bearer/qbearerplugin.h SOURCES += bearer/qnetworkconfigmanager_p.cpp \ bearer/qnetworksession_p.cpp \ - bearer/qnetworksessionengine.cpp + bearer/qnetworksessionengine.cpp \ + bearer/qbearerplugin.cpp contains(QT_CONFIG, networkmanager):DEFINES += BACKEND_NM } diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp index 6b73e3c..7f58e07 100644 --- a/src/network/bearer/qnetworkconfigmanager.cpp +++ b/src/network/bearer/qnetworkconfigmanager.cpp @@ -238,6 +238,32 @@ QList<QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(QNe QList<QNetworkConfiguration> result; QNetworkConfigurationManagerPrivate* conPriv = connManager(); +#ifdef Q_OS_SYMBIAN + QList<QString> cpsIdents = conPriv->accessPointConfigurations.keys(); + + //find all InternetAccessPoints + foreach (const QString &ii, cpsIdents) { + QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> p = + conPriv->accessPointConfigurations.value(ii); + if ( (p->state & filter) == filter ) { + QNetworkConfiguration pt; + pt.d = conPriv->accessPointConfigurations.value(ii); + result << pt; + } + } + + //find all service networks + cpsIdents = conPriv->snapConfigurations.keys(); + foreach (const QString &ii, cpsIdents) { + QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> p = + conPriv->snapConfigurations.value(ii); + if ( (p->state & filter) == filter ) { + QNetworkConfiguration pt; + pt.d = conPriv->snapConfigurations.value(ii); + result << pt; + } + } +#else foreach (QNetworkSessionEngine *engine, conPriv->sessionEngines) { QStringList cpsIdents = engine->accessPointConfigurations.keys(); @@ -264,6 +290,7 @@ QList<QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(QNe } } } +#endif return result; } @@ -280,6 +307,14 @@ QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier( QNetworkConfiguration item; +#ifdef Q_OS_SYMBIAN + if (conPriv->accessPointConfigurations.contains(identifier)) + item.d = conPriv->accessPointConfigurations.value(identifier); + else if (conPriv->snapConfigurations.contains(identifier)) + item.d = conPriv->snapConfigurations.value(identifier); + else if (conPriv->userChoiceConfigurations.contains(identifier)) + item.d = conPriv->userChoiceConfigurations.value(identifier); +#else foreach (QNetworkSessionEngine *engine, conPriv->sessionEngines) { if (engine->accessPointConfigurations.contains(identifier)) item.d = engine->accessPointConfigurations.value(identifier); @@ -292,6 +327,7 @@ QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier( return item; } +#endif return item; } diff --git a/src/network/bearer/qnetworkconfigmanager_s60_p.h b/src/network/bearer/qnetworkconfigmanager_s60_p.h index 568803d..3378898 100644 --- a/src/network/bearer/qnetworkconfigmanager_s60_p.h +++ b/src/network/bearer/qnetworkconfigmanager_s60_p.h @@ -53,8 +53,8 @@ // We mean it. // -#include <qnetworkconfigmanager.h> -#include <qnetworkconfiguration_s60_p.h> +#include <QtNetwork/qnetworkconfigmanager.h> +#include "qnetworkconfiguration_s60_p.h" #include <QHash> #include <rconnmon.h> diff --git a/src/network/bearer/qnetworkconfiguration_s60_p.h b/src/network/bearer/qnetworkconfiguration_s60_p.h index 0973152..5e75c13 100644 --- a/src/network/bearer/qnetworkconfiguration_s60_p.h +++ b/src/network/bearer/qnetworkconfiguration_s60_p.h @@ -53,7 +53,7 @@ // We mean it. // -#include <qnetworkconfiguration.h> +#include <QtNetwork/qnetworkconfiguration.h> #include <QtCore/qshareddata.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/bearer/bearer.pro b/src/plugins/bearer/bearer.pro index 58d2613..05fce8c 100644 --- a/src/plugins/bearer/bearer.pro +++ b/src/plugins/bearer/bearer.pro @@ -1,7 +1,9 @@ TEMPLATE = subdirs +!symbian:!maemo { SUBDIRS += generic contains(QT_CONFIG, dbus):contains(QT_CONFIG, networkmanager):SUBDIRS += networkmanager win32:SUBDIRS += nla win32:!wince*:SUBDIRS += nativewifi macx:SUBDIRS += corewlan +} |