From b2477aec2adad08c4f44ffcdc2f9ad1c0ce4a56b Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Thu, 7 Jan 2010 13:03:34 +1000 Subject: Make compile for Symbian. --- src/network/bearer/bearer.pri | 12 ++++---- src/network/bearer/qnetworkconfigmanager.cpp | 36 ++++++++++++++++++++++++ src/network/bearer/qnetworkconfigmanager_s60_p.h | 4 +-- src/network/bearer/qnetworkconfiguration_s60_p.h | 2 +- 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 QNetworkConfigurationManager::allConfigurations(QNe QList result; QNetworkConfigurationManagerPrivate* conPriv = connManager(); +#ifdef Q_OS_SYMBIAN + QList cpsIdents = conPriv->accessPointConfigurations.keys(); + + //find all InternetAccessPoints + foreach (const QString &ii, cpsIdents) { + QExplicitlySharedDataPointer 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 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 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 -#include +#include +#include "qnetworkconfiguration_s60_p.h" #include #include 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 +#include #include 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 +} -- cgit v0.12