summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-06-10 06:02:23 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-06-24 02:27:49 (GMT)
commit4aeb66d9c3e22a84d3c9bd916b8277537a2c4a2f (patch)
tree760c0223789969951db860a7583fed328a4b498c
parent12c06cfb761b1c8b3575df9ad6d1aabdbd2ed402 (diff)
downloadQt-4aeb66d9c3e22a84d3c9bd916b8277537a2c4a2f.zip
Qt-4aeb66d9c3e22a84d3c9bd916b8277537a2c4a2f.tar.gz
Qt-4aeb66d9c3e22a84d3c9bd916b8277537a2c4a2f.tar.bz2
Cherry pick fix for MOBILITY-853 from Qt Mobility.
256e67963c4cb0fc150e6c47193e7c9b17296611
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp70
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h1
2 files changed, 71 insertions, 0 deletions
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index cf7e7a5..bda3e56 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -131,6 +131,9 @@ void SymbianEngine::initialize()
}
TRAP_IGNORE(iConnectionMonitor.ConnectL());
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ TRAP_IGNORE(iConnectionMonitor.SetUintAttribute(EBearerIdAll, 0, KBearerGroupThreshold, 1));
+#endif
TRAP_IGNORE(iConnectionMonitor.NotifyEventL(*this));
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
@@ -804,6 +807,59 @@ void SymbianEngine::updateStatesToSnaps()
}
}
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+void SymbianEngine::updateMobileBearerToConfigs(TConnMonBearerInfo bearerInfo)
+{
+ QHash<QString, QNetworkConfigurationPrivatePointer>::const_iterator i =
+ accessPointConfigurations.constBegin();
+ while (i != accessPointConfigurations.constEnd()) {
+ QNetworkConfigurationPrivatePointer ptr = i.value();
+
+ QMutexLocker locker(&ptr->mutex);
+
+ SymbianNetworkConfigurationPrivate *p = toSymbianConfig(ptr);
+
+ if (p->bearer >= SymbianNetworkConfigurationPrivate::Bearer2G &&
+ p->bearer <= SymbianNetworkConfigurationPrivate::BearerHSPA) {
+ switch (bearerInfo) {
+ case EBearerInfoCSD:
+ p->bearer = SymbianNetworkConfigurationPrivate::Bearer2G;
+ break;
+ case EBearerInfoWCDMA:
+ p->bearer = SymbianNetworkConfigurationPrivate::BearerWCDMA;
+ break;
+ case EBearerInfoCDMA2000:
+ p->bearer = SymbianNetworkConfigurationPrivate::BearerCDMA2000;
+ break;
+ case EBearerInfoGPRS:
+ p->bearer = SymbianNetworkConfigurationPrivate::Bearer2G;
+ break;
+ case EBearerInfoHSCSD:
+ p->bearer = SymbianNetworkConfigurationPrivate::Bearer2G;
+ break;
+ case EBearerInfoEdgeGPRS:
+ p->bearer = SymbianNetworkConfigurationPrivate::Bearer2G;
+ break;
+ case EBearerInfoWcdmaCSD:
+ p->bearer = SymbianNetworkConfigurationPrivate::BearerWCDMA;
+ break;
+ case EBearerInfoHSDPA:
+ p->bearer = SymbianNetworkConfigurationPrivate::BearerHSPA;
+ break;
+ case EBearerInfoHSUPA:
+ p->bearer = SymbianNetworkConfigurationPrivate::BearerHSPA;
+ break;
+ case EBearerInfoHSxPA:
+ p->bearer = SymbianNetworkConfigurationPrivate::BearerHSPA;
+ break;
+ }
+ }
+
+ ++i;
+ }
+}
+#endif
+
bool SymbianEngine::changeConfigurationStateTo(QNetworkConfigurationPrivatePointer ptr,
QNetworkConfiguration::StateFlags newState)
{
@@ -941,6 +997,20 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
QMutexLocker locker(&mutex);
switch (aEvent.EventType()) {
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ case EConnMonBearerInfoChange:
+ {
+ CConnMonBearerInfoChange* realEvent;
+ realEvent = (CConnMonBearerInfoChange*) &aEvent;
+ TUint connectionId = realEvent->ConnectionId();
+ if (connectionId == EBearerIdAll) {
+ //Network level event
+ TConnMonBearerInfo bearerInfo = (TConnMonBearerInfo)realEvent->BearerInfo();
+ updateMobileBearerToConfigs(bearerInfo);
+ }
+ break;
+ }
+#endif
case EConnMonConnectionStatusChange:
{
CConnMonConnectionStatusChange* realEvent;
diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h
index 8e58994..d95d4d5 100644
--- a/src/plugins/bearer/symbian/symbianengine.h
+++ b/src/plugins/bearer/symbian/symbianengine.h
@@ -173,6 +173,7 @@ private:
bool changeConfigurationStateAtMaxTo(QNetworkConfigurationPrivatePointer ptr,
QNetworkConfiguration::StateFlags newState);
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ void updateMobileBearerToConfigs(TConnMonBearerInfo bearerInfo);
SymbianNetworkConfigurationPrivate *configFromConnectionMethodL(RCmConnectionMethod& connectionMethod);
#else
bool readNetworkConfigurationValuesFromCommsDb(