summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/symbian
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-25 00:56:37 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-25 05:53:00 (GMT)
commit3ccbfc46ef2647421608522aa38c12958e4ea3c3 (patch)
tree874721600ffa38985ee99a98b6ce5043eae122a3 /src/plugins/bearer/symbian
parentaf5501d2bef7242d3949d639e2bab7e326654bb2 (diff)
downloadQt-3ccbfc46ef2647421608522aa38c12958e4ea3c3.zip
Qt-3ccbfc46ef2647421608522aa38c12958e4ea3c3.tar.gz
Qt-3ccbfc46ef2647421608522aa38c12958e4ea3c3.tar.bz2
Compile with QT_NO_NETWORKINTERFACE defined.
Diffstat (limited to 'src/plugins/bearer/symbian')
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp10
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h6
2 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index 8910efe..512ea51 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -152,6 +152,7 @@ void QNetworkSessionPrivateImpl::syncStateWithInterface()
}
}
+#ifndef QT_NO_NETWORKINTERFACE
QNetworkInterface QNetworkSessionPrivateImpl::interface(TUint iapId) const
{
QString interfaceName;
@@ -189,7 +190,9 @@ QNetworkInterface QNetworkSessionPrivateImpl::interface(TUint iapId) const
return QNetworkInterface::interfaceFromName(interfaceName);
}
+#endif
+#ifndef QT_NO_NETWORKINTERFACE
QNetworkInterface QNetworkSessionPrivateImpl::currentInterface() const
{
if (!publicConfig.isValid() || state != QNetworkSession::Connected) {
@@ -198,6 +201,7 @@ QNetworkInterface QNetworkSessionPrivateImpl::currentInterface() const
return activeInterface;
}
+#endif
QVariant QNetworkSessionPrivateImpl::sessionProperty(const QString& /*key*/) const
{
@@ -309,7 +313,9 @@ void QNetworkSessionPrivateImpl::open()
if (connInfo().iIapId == symbianConfig->numericId) {
if (iConnection.Attach(connInfo, RConnection::EAttachTypeNormal) == KErrNone) {
activeConfig = publicConfig;
+#ifndef QT_NO_NETWORKINTERFACE
activeInterface = interface(symbianConfig->numericId);
+#endif
connected = ETrue;
startTime = QDateTime::currentDateTime();
if (iDynamicSetdefaultif) {
@@ -878,7 +884,9 @@ void QNetworkSessionPrivateImpl::RunL()
toSymbianConfig(privateConfiguration(activeConfig));
symbianConfig->mutex.lock();
+#ifndef QT_NO_NETWORKINTERFACE
activeInterface = interface(symbianConfig->numericId);
+#endif
if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
serviceConfig = QNetworkConfigurationManager()
.configurationFromIdentifier(symbianConfig->serviceNetworkPtr->id);
@@ -936,9 +944,11 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
SymbianNetworkConfigurationPrivate *symbianConfig =
toSymbianConfig(privateConfiguration(activeConfig));
+#ifndef QT_NO_NETWORKINTERFACE
symbianConfig->mutex.lock();
activeInterface = interface(symbianConfig->numericId);
symbianConfig->mutex.unlock();
+#endif
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
if (iDynamicSetdefaultif) {
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 35e2c58..9a57eae 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -89,7 +89,9 @@ public:
//notification hooks to discover future state changes.
void syncStateWithInterface();
+#ifndef QT_NO_NETWORKINTERFACE
QNetworkInterface currentInterface() const;
+#endif
QVariant sessionProperty(const QString& key) const;
void setSessionProperty(const QString& key, const QVariant& value);
@@ -137,12 +139,16 @@ private:
void handleSymbianConnectionStatusChange(TInt aConnectionStatus, TInt aError, TUint accessPointId = 0);
QNetworkConfiguration bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const;
QNetworkConfiguration activeConfiguration(TUint32 iapId = 0) const;
+#ifndef QT_NO_NETWORKINTERFACE
QNetworkInterface interface(TUint iapId) const;
+#endif
private: // data
SymbianEngine *engine;
+#ifndef QT_NO_NETWORKINTERFACE
mutable QNetworkInterface activeInterface;
+#endif
QDateTime startTime;