summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2011-09-14 07:45:44 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2011-09-14 07:45:44 (GMT)
commit1b30b3a6726adf806ae221357393e562285e8346 (patch)
treec650ff836d3abdf5890726354ee6e2b9bce11304 /src/plugins/bearer
parent1c1a5fe0e2d9e28be5e0e14732d79d34c9bb2a74 (diff)
parent704dd92581783d91ccd234d58896d7078eed14a5 (diff)
downloadQt-1b30b3a6726adf806ae221357393e562285e8346.zip
Qt-1b30b3a6726adf806ae221357393e562285e8346.tar.gz
Qt-1b30b3a6726adf806ae221357393e562285e8346.tar.bz2
Merge remote branch 'origin/4.8' into 4.8-from-4.7
Conflicts: src/gui/text/qtextengine_p.h src/network/ssl/qsslsocket_openssl.cpp
Diffstat (limited to 'src/plugins/bearer')
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux.cpp1
-rw-r--r--src/plugins/bearer/connman/qofonoservice_linux.cpp5
-rw-r--r--src/plugins/bearer/connman/qofonoservice_linux_p.h6
-rw-r--r--src/plugins/bearer/corewlan/corewlan.pro3
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm4
-rw-r--r--src/plugins/bearer/platformdefs_win.h5
-rw-r--r--src/plugins/bearer/qbearerengine_impl.h7
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp67
-rw-r--r--src/plugins/bearer/qnetworksession_impl.h23
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp261
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h38
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp58
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h16
13 files changed, 233 insertions, 261 deletions
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
index 24e6489..edb8665 100644
--- a/src/plugins/bearer/connman/qconnmanservice_linux.cpp
+++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
@@ -870,7 +870,6 @@ quint64 QConnmanCounterInterface::getTimeOnline()
return 0;
}
-
/////////////////////////////////////////
QConnmanDBusHelper::QConnmanDBusHelper(QObject * parent)
: QObject(parent)
diff --git a/src/plugins/bearer/connman/qofonoservice_linux.cpp b/src/plugins/bearer/connman/qofonoservice_linux.cpp
index 3a395eb..7c0a255 100644
--- a/src/plugins/bearer/connman/qofonoservice_linux.cpp
+++ b/src/plugins/bearer/connman/qofonoservice_linux.cpp
@@ -53,6 +53,8 @@
#include "qofonoservice_linux_p.h"
+#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_DBUS
QT_BEGIN_NAMESPACE
static QDBusConnection dbusConnection = QDBusConnection::systemBus();
@@ -938,3 +940,6 @@ void QOfonoSmsInterface::sendMessage(const QString &to, const QString &message)
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/connman/qofonoservice_linux_p.h b/src/plugins/bearer/connman/qofonoservice_linux_p.h
index bc2cf9c..e3282f1 100644
--- a/src/plugins/bearer/connman/qofonoservice_linux_p.h
+++ b/src/plugins/bearer/connman/qofonoservice_linux_p.h
@@ -65,6 +65,9 @@
#include <QtDBus/QDBusContext>
#include <QMap>
+#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_DBUS
+
#define OFONO_SERVICE "org.ofono"
#define OFONO_MANAGER_INTERFACE "org.ofono.Manager"
#define OFONO_MANAGER_PATH "/"
@@ -331,4 +334,7 @@ Q_SIGNALS:
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
+#endif // QT_NO_BEARERMANAGEMENT
+
#endif //QOFONOSERVICE_H
diff --git a/src/plugins/bearer/corewlan/corewlan.pro b/src/plugins/bearer/corewlan/corewlan.pro
index 5d7a795..590a85b 100644
--- a/src/plugins/bearer/corewlan/corewlan.pro
+++ b/src/plugins/bearer/corewlan/corewlan.pro
@@ -15,9 +15,10 @@ HEADERS += qcorewlanengine.h \
../qbearerengine_impl.h
SOURCES += main.cpp \
- qcorewlanengine.mm \
../qnetworksession_impl.cpp
+OBJECTIVE_SOURCES += qcorewlanengine.mm
+
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
target.path += $$[QT_INSTALL_PLUGINS]/bearer
INSTALLS += target
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index 5be8458..c81f56a 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -864,7 +864,7 @@ quint64 QCoreWlanEngine::bytesReceived(const QString &id)
return getBytes(interfaceStr,true);
}
-quint64 QCoreWlanEngine::startTime(const QString &id)
+quint64 QCoreWlanEngine::startTime(const QString &identifier)
{
QMutexLocker locker(&mutex);
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
@@ -899,7 +899,7 @@ quint64 QCoreWlanEngine::startTime(const QString &id)
for(int i = 0; i < dictSize; i++) {
if([ssidStr isEqualToString:keys[i]]) {
const QString ident = QString::number(qHash(QLatin1String("corewlan:") + qt_NSStringToQString(objects[i])));
- if(ident == id) {
+ if(ident == identifier) {
ok = true;
}
}
diff --git a/src/plugins/bearer/platformdefs_win.h b/src/plugins/bearer/platformdefs_win.h
index 7a6e2cd..1d8a842 100644
--- a/src/plugins/bearer/platformdefs_win.h
+++ b/src/plugins/bearer/platformdefs_win.h
@@ -53,6 +53,7 @@ QT_BEGIN_NAMESPACE
#define NS_NLA 15
+#ifndef NLA_NAMESPACE_GUID
enum NLA_BLOB_DATA_TYPE {
NLA_RAW_DATA = 0,
NLA_INTERFACE = 1,
@@ -115,6 +116,8 @@ struct NLA_BLOB {
} ICS;
} data;
};
+#endif // NLA_NAMESPACE_GUID
+
#endif
enum NDIS_MEDIUM {
@@ -135,4 +138,4 @@ enum NDIS_PHYSICAL_MEDIUM {
QT_END_NAMESPACE
-#endif
+#endif // QPLATFORMDEFS_WIN_H
diff --git a/src/plugins/bearer/qbearerengine_impl.h b/src/plugins/bearer/qbearerengine_impl.h
index 2965fcd..6a61c1b 100644
--- a/src/plugins/bearer/qbearerengine_impl.h
+++ b/src/plugins/bearer/qbearerengine_impl.h
@@ -60,8 +60,8 @@ public:
DisconnectionError,
};
- QBearerEngineImpl(QObject *parent = 0) : QBearerEngine(parent) { }
- ~QBearerEngineImpl() { }
+ QBearerEngineImpl(QObject *parent = 0) : QBearerEngine(parent) {}
+ ~QBearerEngineImpl() {}
virtual void connectToId(const QString &id) = 0;
virtual void disconnectFromId(const QString &id) = 0;
@@ -81,4 +81,5 @@ Q_SIGNALS:
QT_END_NAMESPACE
#endif // QT_NO_BEARERMANAGEMENT
-#endif
+
+#endif // QBEARERENGINE_IMPL_H
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
index 0856dfe..4a14dcc 100644
--- a/src/plugins/bearer/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
@@ -45,9 +45,10 @@
#include <QtNetwork/qnetworksession.h>
#include <QtNetwork/private/qnetworkconfigmanager_p.h>
-#include <QtCore/qstringlist.h>
+#include <QtCore/qdatetime.h>
#include <QtCore/qdebug.h>
#include <QtCore/qmutex.h>
+#include <QtCore/qstringlist.h>
#ifndef QT_NO_BEARERMANAGEMENT
@@ -71,10 +72,11 @@ class QNetworkSessionManagerPrivate : public QObject
Q_OBJECT
public:
- QNetworkSessionManagerPrivate(QObject *parent = 0);
- ~QNetworkSessionManagerPrivate();
+ QNetworkSessionManagerPrivate(QObject *parent = 0) : QObject(parent) {}
+ ~QNetworkSessionManagerPrivate() {}
- void forceSessionClose(const QNetworkConfiguration &config);
+ inline void forceSessionClose(const QNetworkConfiguration &config)
+ { emit forcedSessionClose(config); }
Q_SIGNALS:
void forcedSessionClose(const QNetworkConfiguration &config);
@@ -84,20 +86,6 @@ Q_SIGNALS:
Q_GLOBAL_STATIC(QNetworkSessionManagerPrivate, sessionManager);
-QNetworkSessionManagerPrivate::QNetworkSessionManagerPrivate(QObject *parent)
-: QObject(parent)
-{
-}
-
-QNetworkSessionManagerPrivate::~QNetworkSessionManagerPrivate()
-{
-}
-
-void QNetworkSessionManagerPrivate::forceSessionClose(const QNetworkConfiguration &config)
-{
- emit forcedSessionClose(config);
-}
-
void QNetworkSessionPrivateImpl::syncStateWithInterface()
{
connect(sessionManager(), SIGNAL(forcedSessionClose(QNetworkConfiguration)),
@@ -108,8 +96,7 @@ void QNetworkSessionPrivateImpl::syncStateWithInterface()
state = QNetworkSession::Invalid;
lastError = QNetworkSession::UnknownSessionError;
- qRegisterMetaType<QBearerEngineImpl::ConnectionError>
- ("QBearerEngineImpl::ConnectionError");
+ qRegisterMetaType<QBearerEngineImpl::ConnectionError>("QBearerEngineImpl::ConnectionError");
switch (publicConfig.type()) {
case QNetworkConfiguration::InternetAccessPoint:
@@ -145,9 +132,8 @@ void QNetworkSessionPrivateImpl::open()
lastError = QNetworkSession::OperationNotSupportedError;
emit QNetworkSessionPrivate::error(lastError);
} else if (!isOpen) {
- if ((activeConfig.state() & QNetworkConfiguration::Discovered) !=
- QNetworkConfiguration::Discovered) {
- lastError =QNetworkSession::InvalidConfigurationError;
+ if ((activeConfig.state() & QNetworkConfiguration::Discovered) != QNetworkConfiguration::Discovered) {
+ lastError = QNetworkSession::InvalidConfigurationError;
state = QNetworkSession::Invalid;
emit stateChanged(state);
emit QNetworkSessionPrivate::error(lastError);
@@ -221,11 +207,10 @@ void QNetworkSessionPrivateImpl::reject()
#ifndef QT_NO_NETWORKINTERFACE
QNetworkInterface QNetworkSessionPrivateImpl::currentInterface() const
{
- if (!publicConfig.isValid() || !engine || state != QNetworkSession::Connected)
+ if (!engine || state != QNetworkSession::Connected || !publicConfig.isValid())
return QNetworkInterface();
QString interface = engine->getInterfaceFromId(activeConfig.identifier());
-
if (interface.isEmpty())
return QNetworkInterface();
return QNetworkInterface::interfaceFromName(interface);
@@ -237,10 +222,7 @@ QVariant QNetworkSessionPrivateImpl::sessionProperty(const QString &key) const
if (key == QLatin1String("AutoCloseSessionTimeout")) {
if (engine && engine->requiresPolling() &&
!(engine->capabilities() & QNetworkConfigurationManager::CanStartAndStopInterfaces)) {
- if (sessionTimeout >= 0)
- return sessionTimeout * 10000;
- else
- return -1;
+ return sessionTimeout >= 0 ? sessionTimeout * 10000 : -1;
}
}
@@ -278,7 +260,8 @@ QString QNetworkSessionPrivateImpl::errorString() const
return tr("The specified configuration cannot be used.");
case QNetworkSession::RoamingError:
return tr("Roaming was aborted or is not possible.");
-
+ default:
+ break;
}
return QString();
@@ -293,24 +276,21 @@ quint64 QNetworkSessionPrivateImpl::bytesWritten() const
{
if (engine && state == QNetworkSession::Connected)
return engine->bytesWritten(activeConfig.identifier());
- else
- return Q_UINT64_C(0);
+ return Q_UINT64_C(0);
}
quint64 QNetworkSessionPrivateImpl::bytesReceived() const
{
if (engine && state == QNetworkSession::Connected)
return engine->bytesReceived(activeConfig.identifier());
- else
- return Q_UINT64_C(0);
+ return Q_UINT64_C(0);
}
quint64 QNetworkSessionPrivateImpl::activeTime() const
{
if (state == QNetworkSession::Connected && startTime != Q_UINT64_C(0))
return QDateTime::currentDateTime().toTime_t() - startTime;
- else
- return Q_UINT64_C(0);
+ return Q_UINT64_C(0);
}
void QNetworkSessionPrivateImpl::updateStateFromServiceNetwork()
@@ -323,17 +303,15 @@ void QNetworkSessionPrivateImpl::updateStateFromServiceNetwork()
if (activeConfig != config) {
if (engine) {
- disconnect(engine,
- SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
- this,
- SLOT(connectionError(QString,QBearerEngineImpl::ConnectionError)));
+ disconnect(engine, SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
+ this, SLOT(connectionError(QString,QBearerEngineImpl::ConnectionError)));
}
activeConfig = config;
engine = getEngineFromId(activeConfig.identifier());
+
if (engine) {
- connect(engine,
- SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
+ connect(engine, SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
this, SLOT(connectionError(QString,QBearerEngineImpl::ConnectionError)),
Qt::QueuedConnection);
}
@@ -362,7 +340,6 @@ void QNetworkSessionPrivateImpl::updateStateFromActiveConfig()
return;
QNetworkSession::State oldState = state;
-
state = engine->sessionStateForId(activeConfig.identifier());
bool oldActive = isOpen;
@@ -410,8 +387,7 @@ void QNetworkSessionPrivateImpl::forcedSessionClose(const QNetworkConfiguration
}
}
-void QNetworkSessionPrivateImpl::connectionError(const QString &id,
- QBearerEngineImpl::ConnectionError error)
+void QNetworkSessionPrivateImpl::connectionError(const QString &id, QBearerEngineImpl::ConnectionError error)
{
if (activeConfig.identifier() == id) {
networkConfigurationsChanged();
@@ -443,4 +419,3 @@ void QNetworkSessionPrivateImpl::decrementTimeout()
QT_END_NAMESPACE
#endif // QT_NO_BEARERMANAGEMENT
-
diff --git a/src/plugins/bearer/qnetworksession_impl.h b/src/plugins/bearer/qnetworksession_impl.h
index 3ce3618..a15ef9a 100644
--- a/src/plugins/bearer/qnetworksession_impl.h
+++ b/src/plugins/bearer/qnetworksession_impl.h
@@ -58,8 +58,6 @@
#include <QtNetwork/private/qnetworkconfigmanager_p.h>
#include <QtNetwork/private/qnetworksession_p.h>
-#include <QtCore/qdatetime.h>
-
#ifndef QT_NO_BEARERMANAGEMENT
QT_BEGIN_NAMESPACE
@@ -69,15 +67,13 @@ class QBearerEngineImpl;
class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate
{
Q_OBJECT
+
public:
QNetworkSessionPrivateImpl()
- : startTime(0), sessionTimeout(-1)
- {
- }
-
+ : startTime(0), sessionTimeout(-1)
+ {}
~QNetworkSessionPrivateImpl()
- {
- }
+ {}
//called by QNetworkSession constructor and ensures
//that the state is immediately updated (w/o actually opening
@@ -106,10 +102,6 @@ public:
quint64 bytesReceived() const;
quint64 activeTime() const;
-private:
- void updateStateFromServiceNetwork();
- void updateStateFromActiveConfig();
-
private Q_SLOTS:
void networkConfigurationsChanged();
void configurationChanged(QNetworkConfigurationPrivatePointer config);
@@ -118,6 +110,10 @@ private Q_SLOTS:
void decrementTimeout();
private:
+ void updateStateFromServiceNetwork();
+ void updateStateFromActiveConfig();
+
+private:
QBearerEngineImpl *engine;
quint64 startTime;
@@ -133,5 +129,4 @@ QT_END_NAMESPACE
#endif // QT_NO_BEARERMANAGEMENT
-#endif //QNETWORKSESSION_IMPL_H
-
+#endif // QNETWORKSESSION_IMPL_H
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index 5639c4f..fc65b86 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -45,8 +45,7 @@
#include <es_enum.h>
#include <es_sock.h>
#include <in_sock.h>
-#include <stdapis/sys/socket.h>
-#include <stdapis/net/if.h>
+#include <private/qcore_symbian_p.h>
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
#include <cmmanager.h>
@@ -61,65 +60,60 @@
QT_BEGIN_NAMESPACE
QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine)
-: CActive(CActive::EPriorityUserInput), engine(engine),
- iDynamicUnSetdefaultif(0), ipConnectionNotifier(0),
+: engine(engine), iSocketServ(qt_symbianGetSocketServer()),
+ ipConnectionNotifier(0), ipConnectionStarter(0),
iHandleStateNotificationsFromManager(false), iFirstSync(true), iStoppedByUser(false),
iClosedByUser(false), iError(QNetworkSession::UnknownSessionError), iALREnabled(0),
iConnectInBackground(false), isOpening(false)
{
- CActiveScheduler::Add(this);
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
iMobility = NULL;
#endif
- // Try to load "Open C" dll dynamically and
- // try to attach to unsetdefaultif function dynamically.
- // This is to avoid build breaks with old OpenC versions.
- if (iOpenCLibrary.Load(_L("libc")) == KErrNone) {
- iDynamicUnSetdefaultif = (TOpenCUnSetdefaultifFunction)iOpenCLibrary.Lookup(597);
- }
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
- qDebug() << "QNS this : " << QString::number((uint)this) << " - ";
- if (iDynamicUnSetdefaultif)
- qDebug() << "dynamic unsetdefaultif() is present in PIPS library. ";
- else
- qDebug() << "dynamic unsetdefaultif() not present in PIPS library. ";
-#endif
TRAP_IGNORE(iConnectionMonitor.ConnectL());
}
-QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl()
+void QNetworkSessionPrivateImpl::closeHandles()
{
- isOpen = false;
- isOpening = false;
-
+ QMutexLocker lock(&mutex);
// Cancel Connection Progress Notifications first.
- // Note: ConnectionNotifier must be destroyed before Canceling RConnection::Start()
+ // Note: ConnectionNotifier must be destroyed before RConnection::Close()
// => deleting ipConnectionNotifier results RConnection::CancelProgressNotification()
delete ipConnectionNotifier;
ipConnectionNotifier = NULL;
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
- if (iMobility) {
- delete iMobility;
- iMobility = NULL;
- }
+ // mobility monitor must be deleted before RConnection is closed
+ delete iMobility;
+ iMobility = NULL;
#endif
- // Cancel possible RConnection::Start()
- Cancel();
- iSocketServ.Close();
+ // Cancel possible RConnection::Start() - may call RConnection::Close if Start was in progress
+ delete ipConnectionStarter;
+ ipConnectionStarter = 0;
+ //close any open connection (note Close twice is safe in case Cancel did it above)
+ iConnection.Close();
- // Close global 'Open C' RConnection
- // Clears also possible unsetdefaultif() flags.
- setdefaultif(0);
+ QSymbianSocketManager::instance().setDefaultConnection(0);
iConnectionMonitor.Close();
- iOpenCLibrary.Close();
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
qDebug() << "QNS this : " << QString::number((uint)this)
- << " - destroyed (and setdefaultif(0))";
+ << " - handles closed";
+#endif
+
+}
+
+QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl()
+{
+ isOpen = false;
+ isOpening = false;
+
+ closeHandles();
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this)
+ << " - destroyed";
#endif
}
@@ -166,7 +160,7 @@ void QNetworkSessionPrivateImpl::configurationAdded(QNetworkConfigurationPrivate
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
qDebug() << "QNS this : " << QString::number((uint)this) << " - "
<< "configurationAdded IAP: "
- << toSymbianConfig(privateConfiguration(config))->numericIdentifier();
+ << toSymbianConfig(config)->numericIdentifier();
#endif
syncStateWithInterface();
@@ -324,6 +318,7 @@ QNetworkSession::SessionError QNetworkSessionPrivateImpl::error() const
void QNetworkSessionPrivateImpl::open()
{
+ QMutexLocker lock(&mutex);
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
qDebug() << "QNS this : " << QString::number((uint)this) << " - "
<< "open() called, session state is: " << state << " and isOpen is: "
@@ -363,20 +358,10 @@ void QNetworkSessionPrivateImpl::open()
iStoppedByUser = false;
iClosedByUser = false;
- TInt error = iSocketServ.Connect();
- if (error != KErrNone) {
- // Could not open RSocketServ
- newState(QNetworkSession::Invalid);
- iError = QNetworkSession::UnknownSessionError;
- emit QNetworkSessionPrivate::error(iError);
- syncStateWithInterface();
- return;
- }
-
- error = iConnection.Open(iSocketServ);
+ Q_ASSERT(!iConnection.SubSessionHandle());
+ TInt error = iConnection.Open(iSocketServ);
if (error != KErrNone) {
// Could not open RConnection
- iSocketServ.Close();
newState(QNetworkSession::Invalid);
iError = QNetworkSession::UnknownSessionError;
emit QNetworkSessionPrivate::error(iError);
@@ -414,9 +399,9 @@ void QNetworkSessionPrivateImpl::open()
pref.SetIapId(symbianConfig->numericIdentifier());
#endif
- iConnection.Start(pref, iStatus);
- if (!IsActive()) {
- SetActive();
+ if (!ipConnectionStarter) {
+ ipConnectionStarter = new ConnectionStarter(*this, iConnection);
+ ipConnectionStarter->Start(pref);
}
// Avoid flip flop of states if the configuration is already
// active. IsOpen/opened() will indicate when ready.
@@ -442,9 +427,9 @@ void QNetworkSessionPrivateImpl::open()
#else
TConnSnapPref snapPref(symbianConfig->numericIdentifier());
#endif
- iConnection.Start(snapPref, iStatus);
- if (!IsActive()) {
- SetActive();
+ if (!ipConnectionStarter) {
+ ipConnectionStarter = new ConnectionStarter(*this, iConnection);
+ ipConnectionStarter->Start(snapPref);
}
// Avoid flip flop of states if the configuration is already
// active. IsOpen/opened() will indicate when ready.
@@ -453,9 +438,9 @@ void QNetworkSessionPrivateImpl::open()
}
} else if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
iKnownConfigsBeforeConnectionStart = engine->accessPointConfigurationIdentifiers();
- iConnection.Start(iStatus);
- if (!IsActive()) {
- SetActive();
+ if (!ipConnectionStarter) {
+ ipConnectionStarter = new ConnectionStarter(*this, iConnection);
+ ipConnectionStarter->Start();
}
newState(QNetworkSession::Connecting);
}
@@ -465,9 +450,7 @@ void QNetworkSessionPrivateImpl::open()
isOpening = false;
iError = QNetworkSession::UnknownSessionError;
emit QNetworkSessionPrivate::error(iError);
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
+ closeHandles();
syncStateWithInterface();
}
}
@@ -521,31 +504,10 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals)
serviceConfig = QNetworkConfiguration();
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
- if (iMobility) {
- delete iMobility;
- iMobility = NULL;
- }
-#endif
+ closeHandles();
- if (ipConnectionNotifier && !iHandleStateNotificationsFromManager) {
- ipConnectionNotifier->StopNotifications();
- // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
- iHandleStateNotificationsFromManager = true;
- }
-
- Cancel(); // closes iConnection
- iSocketServ.Close();
-
- // Close global 'Open C' RConnection. If OpenC supports,
- // close the defaultif for good to avoid difficult timing
- // and bouncing issues of network going immediately back up
- // because of e.g. select() thread etc.
- if (iDynamicUnSetdefaultif) {
- iDynamicUnSetdefaultif();
- } else {
- setdefaultif(0);
- }
+ // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
+ iHandleStateNotificationsFromManager = true;
// If UserChoice, go down immediately. If some other configuration,
// go down immediately if there is no reports expected from the platform;
@@ -568,6 +530,7 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals)
void QNetworkSessionPrivateImpl::stop()
{
+ QMutexLocker lock(&mutex);
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
qDebug() << "QNS this : " << QString::number((uint)this) << " - "
<< "stop() called, session state is: " << state << " and isOpen is : "
@@ -642,13 +605,7 @@ void QNetworkSessionPrivateImpl::migrate()
{
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
if (iMobility) {
- // Close global 'Open C' RConnection. If openC supports, use the 'heavy'
- // version to block all subsequent requests.
- if (iDynamicUnSetdefaultif) {
- iDynamicUnSetdefaultif();
- } else {
- setdefaultif(0);
- }
+ QSymbianSocketManager::instance().setDefaultConnection(0);
// Start migrating to new IAP
iMobility->MigrateToPreferredCarrier();
}
@@ -678,12 +635,7 @@ void QNetworkSessionPrivateImpl::accept()
QNetworkConfiguration newActiveConfig = activeConfiguration(iNewRoamingIap);
- // Use name of the new IAP to open global 'Open C' RConnection
- QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
- ifreq ifr;
- memset(&ifr, 0, sizeof(struct ifreq));
- strcpy(ifr.ifr_name, nameAsByteArray.constData());
- setdefaultif(&ifr);
+ QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
newState(QNetworkSession::Connected, iNewRoamingIap);
}
@@ -701,12 +653,7 @@ void QNetworkSessionPrivateImpl::reject()
} else {
QNetworkConfiguration newActiveConfig = activeConfiguration(iOldRoamingIap);
- // Use name of the old IAP to open global 'Open C' RConnection
- QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
- ifreq ifr;
- memset(&ifr, 0, sizeof(struct ifreq));
- strcpy(ifr.ifr_name, nameAsByteArray.constData());
- setdefaultif(&ifr);
+ QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
newState(QNetworkSession::Connected, iOldRoamingIap);
}
@@ -759,12 +706,14 @@ void QNetworkSessionPrivateImpl::NewCarrierActive(TAccessPointInfo /*aNewAPInfo*
}
}
-void QNetworkSessionPrivateImpl::Error(TInt /*aError*/)
+void QNetworkSessionPrivateImpl::Error(TInt aError)
{
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
qDebug() << "QNS this : " << QString::number((uint)this) << " - "
- << "roaming Error() occurred, isOpen is: " << isOpen;
+ << "roaming Error() occurred" << aError << ", isOpen is: " << isOpen;
#endif
+ if (aError == KErrCancel)
+ return; //avoid recursive deletion
if (isOpen) {
isOpen = false;
isOpening = false;
@@ -772,10 +721,7 @@ void QNetworkSessionPrivateImpl::Error(TInt /*aError*/)
serviceConfig = QNetworkConfiguration();
iError = QNetworkSession::RoamingError;
emit QNetworkSessionPrivate::error(iError);
- Cancel();
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
+ closeHandles();
QT_TRY {
syncStateWithInterface();
// In some cases IAP is still in Connected state when
@@ -1069,13 +1015,14 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
return publicConfig;
}
-void QNetworkSessionPrivateImpl::RunL()
+void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode)
{
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
qDebug() << "QNS this : " << QString::number((uint)this) << " - "
- << "RConnection::RunL with status code: " << iStatus.Int();
+ << "RConnection::Start completed with status code: " << statusCode;
#endif
- TInt statusCode = iStatus.Int();
+ delete ipConnectionStarter;
+ ipConnectionStarter = 0;
switch (statusCode) {
case KErrNone: // Connection created successfully
@@ -1090,30 +1037,20 @@ void QNetworkSessionPrivateImpl::RunL()
// Connectivity Test, ICT, failed).
error = KErrGeneral;
} else {
- // Use name of the IAP to open global 'Open C' RConnection
- ifreq ifr;
- memset(&ifr, 0, sizeof(struct ifreq));
- QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
- strcpy(ifr.ifr_name, nameAsByteArray.constData());
- error = setdefaultif(&ifr);
+ QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
}
if (error != KErrNone) {
isOpen = false;
isOpening = false;
iError = QNetworkSession::UnknownSessionError;
QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
+ closeHandles();
if (!newActiveConfig.isValid()) {
// 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.
- iConnection.Close();
newState(QNetworkSession::Closing);
newState(QNetworkSession::Disconnected);
- } else {
- Cancel();
}
QT_TRYCATCH_LEAVING(syncStateWithInterface());
return;
@@ -1156,10 +1093,7 @@ void QNetworkSessionPrivateImpl::RunL()
serviceConfig = QNetworkConfiguration();
iError = QNetworkSession::InvalidConfigurationError;
QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
- Cancel();
+ closeHandles();
QT_TRYCATCH_LEAVING(syncStateWithInterface());
break;
case KErrCancel: // Connection attempt cancelled
@@ -1178,20 +1112,12 @@ void QNetworkSessionPrivateImpl::RunL()
iError = QNetworkSession::UnknownSessionError;
}
QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
- Cancel();
+ closeHandles();
QT_TRYCATCH_LEAVING(syncStateWithInterface());
break;
}
}
-void QNetworkSessionPrivateImpl::DoCancel()
-{
- iConnection.Close();
-}
-
// Enters newState if feasible according to current state.
// AccessPointId may be given as parameter. If it is zero, state-change is assumed to
// concern this session's configuration. If non-zero, the configuration is looked up
@@ -1216,12 +1142,7 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
#endif
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
- // Use name of the IAP to set default IAP
- QByteArray nameAsByteArray = activeConfig.name().toUtf8();
- ifreq ifr;
- strcpy(ifr.ifr_name, nameAsByteArray.constData());
-
- setdefaultif(&ifr);
+ QSymbianSocketManager::instance().setDefaultConnection(&iConnection);
#endif
}
@@ -1273,10 +1194,7 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
serviceConfig = QNetworkConfiguration();
iError = QNetworkSession::SessionAbortedError;
emit QNetworkSessionPrivate::error(iError);
- if (ipConnectionNotifier) {
- ipConnectionNotifier->StopNotifications();
- }
- Cancel();
+ closeHandles();
// Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
iHandleStateNotificationsFromManager = true;
emitSessionClosed = true; // Emit SessionClosed after state change has been reported
@@ -1544,6 +1462,11 @@ bool QNetworkSessionPrivateImpl::easyWlanTrueIapId(TUint32 &trueIapId) const
}
#endif
+RConnection* QNetworkSessionPrivateImpl::nativeSession()
+{
+ return &iConnection;
+}
+
ConnectionProgressNotifier::ConnectionProgressNotifier(QNetworkSessionPrivateImpl& owner, RConnection& connection)
: CActive(CActive::EPriorityUserInput), iOwner(owner), iConnection(connection)
{
@@ -1583,6 +1506,50 @@ void ConnectionProgressNotifier::RunL()
}
}
+ConnectionStarter::ConnectionStarter(QNetworkSessionPrivateImpl &owner, RConnection &connection)
+ : CActive(CActive::EPriorityUserInput), iOwner(owner), iConnection(connection)
+{
+ CActiveScheduler::Add(this);
+}
+
+ConnectionStarter::~ConnectionStarter()
+{
+ Cancel();
+}
+
+void ConnectionStarter::Start()
+{
+ if (!IsActive()) {
+ iConnection.Start(iStatus);
+ SetActive();
+ }
+}
+
+void ConnectionStarter::Start(TConnPref &pref)
+{
+ if (!IsActive()) {
+ iConnection.Start(pref, iStatus);
+ SetActive();
+ }
+}
+
+void ConnectionStarter::RunL()
+{
+ iOwner.ConnectionStartComplete(iStatus.Int());
+ //note owner deletes on callback
+}
+
+TInt ConnectionStarter::RunError(TInt err)
+{
+ qWarning() << "ConnectionStarter::RunError" << err;
+ return KErrNone;
+}
+
+void ConnectionStarter::DoCancel()
+{
+ iConnection.Close();
+}
+
QT_END_NAMESPACE
#endif //QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 774b988..17a051e 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -68,11 +68,12 @@
QT_BEGIN_NAMESPACE
class ConnectionProgressNotifier;
+class ConnectionStarter;
class SymbianEngine;
typedef void (*TOpenCUnSetdefaultifFunction)();
-class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate, public CActive
+class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
, public MMobilityProtocolResp
#endif
@@ -111,7 +112,8 @@ public:
quint64 bytesWritten() const;
quint64 bytesReceived() const;
quint64 activeTime() const;
-
+
+ RConnection* nativeSession();
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
public: // From MMobilityProtocolResp
void PreferredCarrierAvailable(TAccessPointInfo aOldAPInfo,
@@ -125,7 +127,7 @@ public: // From MMobilityProtocolResp
#endif
protected: // From CActive
- void RunL();
+ void ConnectionStartComplete(TInt statusCode);
void DoCancel();
private Q_SLOTS:
@@ -149,6 +151,7 @@ private:
bool easyWlanTrueIapId(TUint32 &trueIapId) const;
#endif
+ void closeHandles();
private: // data
SymbianEngine *engine;
@@ -159,19 +162,17 @@ private: // data
QDateTime startTime;
- RLibrary iOpenCLibrary;
- TOpenCUnSetdefaultifFunction iDynamicUnSetdefaultif;
-
- mutable RSocketServ iSocketServ;
+ mutable RSocketServ &iSocketServ; //not owned, shared from QtCore
mutable RConnection iConnection;
mutable RConnectionMonitor iConnectionMonitor;
ConnectionProgressNotifier* ipConnectionNotifier;
-
+ ConnectionStarter* ipConnectionStarter;
+
bool iHandleStateNotificationsFromManager;
bool iFirstSync;
bool iStoppedByUser;
bool iClosedByUser;
-
+
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
CActiveCommsMobilityApiExt* iMobility;
#endif
@@ -189,6 +190,7 @@ private: // data
bool isOpening;
friend class ConnectionProgressNotifier;
+ friend class ConnectionStarter;
};
class ConnectionProgressNotifier : public CActive
@@ -211,6 +213,24 @@ private: // Data
};
+class ConnectionStarter : public CActive
+{
+public:
+ ConnectionStarter(QNetworkSessionPrivateImpl &owner, RConnection &connection);
+ ~ConnectionStarter();
+
+ void Start();
+ void Start(TConnPref &pref);
+protected:
+ void RunL();
+ TInt RunError(TInt err);
+ void DoCancel();
+
+private: // Data
+ QNetworkSessionPrivateImpl &iOwner;
+ RConnection& iConnection;
+};
+
QT_END_NAMESPACE
#endif //QNETWORKSESSION_IMPL_H
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index 38ae0c8..fc2791a 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -258,7 +258,7 @@ void SymbianEngine::updateConfigurationsL()
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
// S60 version is >= Series60 3rd Edition Feature Pack 2
TInt error = KErrNone;
-
+
// Loop through all IAPs
RArray<TUint32> connectionMethods; // IAPs
CleanupClosePushL(connectionMethods);
@@ -292,7 +292,7 @@ void SymbianEngine::updateConfigurationsL()
CleanupStack::PopAndDestroy(&connectionMethod);
}
CleanupStack::PopAndDestroy(&connectionMethods);
-
+
// Loop through all SNAPs
RArray<TUint32> destinations;
CleanupClosePushL(destinations);
@@ -462,7 +462,7 @@ void SymbianEngine::updateConfigurationsL()
break;
}
}
- }
+ }
}
foreach (const QString &oldIface, knownSnapConfigs) {
@@ -492,13 +492,13 @@ SymbianNetworkConfigurationPrivate *SymbianEngine::configFromConnectionMethodL(
SymbianNetworkConfigurationPrivate *cpPriv = new SymbianNetworkConfigurationPrivate;
TUint32 iapId = connectionMethod.GetIntAttributeL(CMManager::ECmIapId);
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(iapId));
-
+
HBufC *pName = connectionMethod.GetStringAttributeL(CMManager::ECmName);
CleanupStack::PushL(pName);
QT_TRYCATCH_LEAVING(cpPriv->name = QString::fromUtf16(pName->Ptr(),pName->Length()));
CleanupStack::PopAndDestroy(pName);
pName = NULL;
-
+
TUint32 bearerId = connectionMethod.GetIntAttributeL(CMManager::ECmCommsDBBearerType);
switch (bearerId) {
case KCommDbBearerCSD:
@@ -523,7 +523,7 @@ SymbianNetworkConfigurationPrivate *SymbianEngine::configFromConnectionMethodL(
cpPriv->bearerType = QNetworkConfiguration::BearerUnknown;
break;
}
-
+
TInt error = KErrNone;
TUint32 bearerType = connectionMethod.GetIntAttributeL(CMManager::ECmBearerType);
switch (bearerType) {
@@ -547,13 +547,13 @@ SymbianNetworkConfigurationPrivate *SymbianEngine::configFromConnectionMethodL(
CleanupStack::PopAndDestroy(pName);
pName = NULL;
}
-
+
cpPriv->state = QNetworkConfiguration::Defined;
TBool isConnected = connectionMethod.GetBoolAttributeL(CMManager::ECmConnected);
if (isConnected) {
cpPriv->state = QNetworkConfiguration::Active;
}
-
+
cpPriv->isValid = true;
cpPriv->id = ident;
cpPriv->numericId = iapId;
@@ -569,7 +569,7 @@ bool SymbianEngine::readNetworkConfigurationValuesFromCommsDb(
{
TRAPD(error, readNetworkConfigurationValuesFromCommsDbL(aApId,apNetworkConfiguration));
if (error != KErrNone) {
- return false;
+ return false;
}
return true;
}
@@ -577,22 +577,22 @@ bool SymbianEngine::readNetworkConfigurationValuesFromCommsDb(
void SymbianEngine::readNetworkConfigurationValuesFromCommsDbL(
TUint32 aApId, SymbianNetworkConfigurationPrivate *apNetworkConfiguration)
{
- CApDataHandler* pDataHandler = CApDataHandler::NewLC(*ipCommsDB);
- CApAccessPointItem* pAPItem = CApAccessPointItem::NewLC();
+ CApDataHandler* pDataHandler = CApDataHandler::NewLC(*ipCommsDB);
+ CApAccessPointItem* pAPItem = CApAccessPointItem::NewLC();
TBuf<KCommsDbSvrMaxColumnNameLength> name;
-
+
CApUtils* pApUtils = CApUtils::NewLC(*ipCommsDB);
TUint32 apId = pApUtils->WapIdFromIapIdL(aApId);
-
+
pDataHandler->AccessPointDataL(apId,*pAPItem);
pAPItem->ReadTextL(EApIapName, name);
if (name.Compare(_L("Easy WLAN")) == 0) {
// "Easy WLAN" won't be accepted to the Configurations list
User::Leave(KErrNotFound);
}
-
+
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(aApId));
-
+
QT_TRYCATCH_LEAVING(apNetworkConfiguration->name = QString::fromUtf16(name.Ptr(),name.Length()));
apNetworkConfiguration->isValid = true;
apNetworkConfiguration->id = ident;
@@ -603,7 +603,7 @@ void SymbianEngine::readNetworkConfigurationValuesFromCommsDbL(
apNetworkConfiguration->purpose = QNetworkConfiguration::UnknownPurpose;
apNetworkConfiguration->roamingSupported = false;
switch (pAPItem->BearerTypeL()) {
- case EApBearerTypeCSD:
+ case EApBearerTypeCSD:
apNetworkConfiguration->bearerType = QNetworkConfiguration::Bearer2G;
break;
case EApBearerTypeGPRS:
@@ -628,7 +628,7 @@ void SymbianEngine::readNetworkConfigurationValuesFromCommsDbL(
apNetworkConfiguration->bearerType = QNetworkConfiguration::BearerUnknown;
break;
}
-
+
CleanupStack::PopAndDestroy(pApUtils);
CleanupStack::PopAndDestroy(pAPItem);
CleanupStack::PopAndDestroy(pDataHandler);
@@ -667,7 +667,7 @@ QNetworkConfigurationPrivatePointer SymbianEngine::defaultConfigurationL()
ptr = accessPointConfigurations.value(iface);
}
#endif
-
+
if (ptr) {
QMutexLocker configLocker(&ptr->mutex);
if (ptr->isValid)
@@ -687,7 +687,7 @@ void SymbianEngine::updateActiveAccessPoints()
TUint connectionCount;
iConnectionMonitor.GetConnectionCount(connectionCount, status);
User::WaitForRequest(status);
-
+
// Go through all connections and set state of related IAPs to Active.
// Status needs to be checked carefully, because ConnMon lists also e.g.
// WLAN connections that are being currently tried --> we don't want to
@@ -766,7 +766,7 @@ void SymbianEngine::accessPointScanningReady(TBool scanSuccessful, TConnMonIapIn
iUpdateGoingOn = false;
if (scanSuccessful) {
QList<QString> unavailableConfigs = accessPointConfigurations.keys();
-
+
// Set state of returned IAPs to Discovered
// if state is not already Active
for(TUint i=0; i<iapInfo.iCount; i++) {
@@ -783,7 +783,7 @@ void SymbianEngine::accessPointScanningReady(TBool scanSuccessful, TConnMonIapIn
}
}
}
-
+
// Make sure that state of rest of the IAPs won't be Active
foreach (const QString &iface, unavailableConfigs) {
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iface);
@@ -795,7 +795,7 @@ void SymbianEngine::accessPointScanningReady(TBool scanSuccessful, TConnMonIapIn
}
updateStatesToSnaps();
-
+
if (!iFirstUpdate) {
startCommsDatabaseNotifications();
mutex.unlock();
@@ -847,7 +847,7 @@ void SymbianEngine::updateStatesToSnaps()
} else {
changeConfigurationStateTo(ptr, QNetworkConfiguration::Defined);
}
- }
+ }
}
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
@@ -1065,7 +1065,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
if (connectionStatus == KConfigDaemonStartingRegistration) {
TUint connectionId = realEvent->ConnectionId();
TUint subConnectionCount = 0;
- TUint apId;
+ TUint apId;
TRequestStatus status;
iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
User::WaitForRequest(status);
@@ -1091,7 +1091,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
// Connection has been successfully opened
TUint connectionId = realEvent->ConnectionId();
TUint subConnectionCount = 0;
- TUint apId;
+ TUint apId;
TRequestStatus status;
iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
User::WaitForRequest(status);
@@ -1147,7 +1147,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
connectionId, QNetworkSession::Disconnected);
);
}
-
+
bool online = false;
foreach (const QString &iface, accessPointConfigurations.keys()) {
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iface);
@@ -1163,7 +1163,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
}
}
}
- break;
+ break;
case EConnMonIapAvailabilityChange:
{
@@ -1177,7 +1177,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
if (ptr) {
- // Configuration is either Discovered or Active
+ // Configuration is either Discovered or Active
QT_TRYCATCH_LEAVING(changeConfigurationStateAtMinTo(ptr, QNetworkConfiguration::Discovered));
unDiscoveredConfigs.removeOne(ident);
}
@@ -1363,7 +1363,7 @@ AccessPointsAvailabilityScanner::AccessPointsAvailabilityScanner(SymbianEngine&
RConnectionMonitor& connectionMonitor)
: CActive(CActive::EPriorityHigh), iOwner(owner), iConnectionMonitor(connectionMonitor)
{
- CActiveScheduler::Add(this);
+ CActiveScheduler::Add(this);
}
AccessPointsAvailabilityScanner::~AccessPointsAvailabilityScanner()
diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h
index 7455d25..a205c97 100644
--- a/src/plugins/bearer/symbian/symbianengine.h
+++ b/src/plugins/bearer/symbian/symbianengine.h
@@ -145,10 +145,10 @@ public:
Q_SIGNALS:
void onlineStateChanged(bool isOnline);
-
+
void configurationStateChanged(quint32 accessPointId, quint32 connMonId,
QNetworkSession::State newState);
-
+
public Q_SLOTS:
void updateConfigurations();
void delayedConfigurationUpdate();
@@ -169,8 +169,8 @@ private:
TUint32 aApId, SymbianNetworkConfigurationPrivate *apNetworkConfiguration);
void readNetworkConfigurationValuesFromCommsDbL(
TUint32 aApId, SymbianNetworkConfigurationPrivate *apNetworkConfiguration);
-#endif
-
+#endif
+
void updateConfigurationsL();
void updateActiveAccessPoints();
void updateAvailableAccessPoints();
@@ -190,7 +190,7 @@ protected:
// From CActive
void RunL();
void DoCancel();
-
+
private:
// MConnectionMonitorObserver
void EventL(const CConnMonEventBase& aEvent);
@@ -200,7 +200,7 @@ private:
#endif
private: // Data
- bool iFirstUpdate;
+ bool iFirstUpdate;
CCommsDatabase* ipCommsDB;
RConnectionMonitor iConnectionMonitor;
@@ -227,11 +227,11 @@ class AccessPointsAvailabilityScanner : public CActive
{
public:
AccessPointsAvailabilityScanner(SymbianEngine& owner,
- RConnectionMonitor& connectionMonitor);
+ RConnectionMonitor& connectionMonitor);
~AccessPointsAvailabilityScanner();
void StartScanning();
-
+
protected: // From CActive
void RunL();
void DoCancel();