summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/symbian
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2010-12-07 16:03:09 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2010-12-07 16:35:19 (GMT)
commit8adba785c8b68b9fdc98b51ecf317e17ad145d13 (patch)
treed955f0e48ec66811fbbe85239d7f71bd2018707a /src/plugins/bearer/symbian
parent443d9e8a951ead746bd92ddb3835cd9cd63a063b (diff)
downloadQt-8adba785c8b68b9fdc98b51ecf317e17ad145d13.zip
Qt-8adba785c8b68b9fdc98b51ecf317e17ad145d13.tar.gz
Qt-8adba785c8b68b9fdc98b51ecf317e17ad145d13.tar.bz2
default RConnection for sockets
Bearer pushes RConnection into QtCore. QSocket can pull this RConnection back out when it needs to open an RSocket (potentially this can be removed again later if QSocket is made QNetworkSession aware) Reviewed-by: Markus Goetz
Diffstat (limited to 'src/plugins/bearer/symbian')
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index cfb55bf..759c86a 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -114,6 +114,7 @@ QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl()
// Close global 'Open C' RConnection
// Clears also possible unsetdefaultif() flags.
setdefaultif(0);
+ QSymbianSocketManager::instance().setDefaultConnection(0);
iConnectionMonitor.Close();
iOpenCLibrary.Close();
@@ -533,6 +534,7 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals)
setdefaultif(0);
}
+ QSymbianSocketManager::instance().setDefaultConnection(0);
// If UserChoice, go down immediately. If some other configuration,
// go down immediately if there is no reports expected from the platform;
// in practice Connection Monitor is aware of connections only after
@@ -634,6 +636,7 @@ void QNetworkSessionPrivateImpl::migrate()
} else {
setdefaultif(0);
}
+ QSymbianSocketManager::instance().setDefaultConnection(0);
// Start migrating to new IAP
iMobility->MigrateToPreferredCarrier();
}
@@ -670,6 +673,8 @@ void QNetworkSessionPrivateImpl::accept()
strcpy(ifr.ifr_name, nameAsByteArray.constData());
setdefaultif(&ifr);
+ QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
+
newState(QNetworkSession::Connected, iNewRoamingIap);
}
#endif
@@ -693,6 +698,8 @@ void QNetworkSessionPrivateImpl::reject()
strcpy(ifr.ifr_name, nameAsByteArray.constData());
setdefaultif(&ifr);
+ QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
+
newState(QNetworkSession::Connected, iOldRoamingIap);
}
}
@@ -1079,6 +1086,7 @@ void QNetworkSessionPrivateImpl::RunL()
QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
strcpy(ifr.ifr_name, nameAsByteArray.constData());
error = setdefaultif(&ifr);
+ QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
}
if (error != KErrNone) {
isOpen = false;
@@ -1092,6 +1100,7 @@ void QNetworkSessionPrivateImpl::RunL()
// No valid configuration, bail out.
// Status updates from QNCM won't be received correctly
// because there is no configuration to associate them with so transit here.
+ QSymbianSocketManager::instance().setDefaultConnection(0);
iConnection.Close();
newState(QNetworkSession::Closing);
newState(QNetworkSession::Disconnected);
@@ -1205,6 +1214,7 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
strcpy(ifr.ifr_name, nameAsByteArray.constData());
setdefaultif(&ifr);
+ QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
#endif
}