summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp2
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.cpp16
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.h11
-rw-r--r--src/network/bearer/qnetworkconfiguration_p.h4
-rw-r--r--src/network/bearer/qnetworksession_p.h4
-rw-r--r--src/plugins/bearer/icd/qicdengine.h8
-rw-r--r--src/plugins/bearer/qnetworksession_impl.h8
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h8
8 files changed, 35 insertions, 26 deletions
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
index 1ba5dab..6c6e28b 100644
--- a/src/network/bearer/qnetworkconfigmanager.cpp
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
@@ -278,7 +278,7 @@ bool QNetworkConfigurationManager::isOnline() const
*/
QNetworkConfigurationManager::Capabilities QNetworkConfigurationManager::capabilities() const
{
- return connManager()->capFlags;
+ return connManager()->capabilities();
}
/*!
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp
index c665fa2..b4d4c6b 100644
--- a/src/network/bearer/qnetworkconfigmanager_p.cpp
+++ b/src/network/bearer/qnetworkconfigmanager_p.cpp
@@ -56,7 +56,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QBearerEngineFactoryInterface_iid, QLatin1String("/bearer")))
QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate()
-: capFlags(0), mutex(QMutex::Recursive), pollTimer(0), forcedPolling(0), firstUpdate(true)
+: pollTimer(0), mutex(QMutex::Recursive), forcedPolling(0), firstUpdate(true)
{
qRegisterMetaType<QNetworkConfiguration>("QNetworkConfiguration");
@@ -265,6 +265,18 @@ bool QNetworkConfigurationManagerPrivate::isOnline()
return !onlineConfigurations.isEmpty();
}
+QNetworkConfigurationManager::Capabilities QNetworkConfigurationManagerPrivate::capabilities()
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationManager::Capabilities capFlags;
+
+ foreach (QBearerEngine *engine, sessionEngines)
+ capFlags |= engine->capabilities();
+
+ return capFlags;
+}
+
void QNetworkConfigurationManagerPrivate::configurationAdded(QNetworkConfigurationPrivatePointer ptr)
{
QMutexLocker locker(&mutex);
@@ -367,8 +379,6 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations()
connect(engine, SIGNAL(configurationChanged(QNetworkConfigurationPrivatePointer)),
this, SLOT(configurationChanged(QNetworkConfigurationPrivatePointer)));
- capFlags |= engine->capabilities();
-
QMetaObject::invokeMethod(engine, "requestUpdate");
}
}
diff --git a/src/network/bearer/qnetworkconfigmanager_p.h b/src/network/bearer/qnetworkconfigmanager_p.h
index dba9d2c..4cb29e9 100644
--- a/src/network/bearer/qnetworkconfigmanager_p.h
+++ b/src/network/bearer/qnetworkconfigmanager_p.h
@@ -78,7 +78,7 @@ public:
bool isOnline();
- QNetworkConfigurationManager::Capabilities capFlags;
+ QNetworkConfigurationManager::Capabilities capabilities();
void performAsyncConfigurationUpdate();
@@ -102,19 +102,18 @@ Q_SIGNALS:
void abort();
private:
- QMutex mutex;
-
QTimer *pollTimer;
+ QMutex mutex;
+
QList<QBearerEngine *> sessionEngines;
QSet<QString> onlineConfigurations;
- QSet<int> updatingEngines;
- bool updating;
-
QSet<int> pollingEngines;
+ QSet<int> updatingEngines;
int forcedPolling;
+ bool updating;
bool firstUpdate;
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h
index ccbe670..6e146e0 100644
--- a/src/network/bearer/qnetworkconfiguration_p.h
+++ b/src/network/bearer/qnetworkconfiguration_p.h
@@ -84,6 +84,8 @@ public:
return bearer;
}
+ QList<QNetworkConfigurationPrivatePointer> serviceNetworkMembers;
+
mutable QMutex mutex;
QString bearer;
@@ -94,8 +96,6 @@ public:
QNetworkConfiguration::Type type;
QNetworkConfiguration::Purpose purpose;
- QList<QNetworkConfigurationPrivatePointer> serviceNetworkMembers;
-
bool isValid;
bool roamingSupported;
diff --git a/src/network/bearer/qnetworksession_p.h b/src/network/bearer/qnetworksession_p.h
index a341eaf..1a6159a 100644
--- a/src/network/bearer/qnetworksession_p.h
+++ b/src/network/bearer/qnetworksession_p.h
@@ -126,6 +126,8 @@ Q_SIGNALS:
void preferredConfigurationChanged(const QNetworkConfiguration &config, bool isSeamless);
protected:
+ QNetworkSession *q;
+
// The config set on QNetworkSession.
QNetworkConfiguration publicConfig;
@@ -140,8 +142,6 @@ protected:
QNetworkSession::State state;
bool isOpen;
-
- QNetworkSession *q;
};
QT_END_NAMESPACE
diff --git a/src/plugins/bearer/icd/qicdengine.h b/src/plugins/bearer/icd/qicdengine.h
index a2e9a2f..841874f 100644
--- a/src/plugins/bearer/icd/qicdengine.h
+++ b/src/plugins/bearer/icd/qicdengine.h
@@ -67,13 +67,13 @@ public:
QByteArray network_id; // typically WLAN ssid or similar
QString iap_type; // is this one WLAN or GPRS
- // Network attributes for this IAP, this is the value returned by icd and
- // passed to it when connecting.
- uint32_t network_attrs;
-
QString service_type;
QString service_id;
uint32_t service_attrs;
+
+ // Network attributes for this IAP, this is the value returned by icd and
+ // passed to it when connecting.
+ uint32_t network_attrs;
};
inline IcdNetworkConfigurationPrivate *toIcdConfig(QNetworkConfigurationPrivatePointer ptr)
diff --git a/src/plugins/bearer/qnetworksession_impl.h b/src/plugins/bearer/qnetworksession_impl.h
index 3becbf0..acf1cce 100644
--- a/src/plugins/bearer/qnetworksession_impl.h
+++ b/src/plugins/bearer/qnetworksession_impl.h
@@ -116,15 +116,15 @@ private Q_SLOTS:
void decrementTimeout();
private:
- bool opened;
-
QBearerEngineImpl *engine;
- QNetworkSession::SessionError lastError;
-
quint64 startTime;
+ QNetworkSession::SessionError lastError;
+
int sessionTimeout;
+
+ bool opened;
};
QT_END_NAMESPACE
diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h
index 2e7ae60..dfd12bd 100644
--- a/src/plugins/bearer/symbian/symbianengine.h
+++ b/src/plugins/bearer/symbian/symbianengine.h
@@ -84,14 +84,14 @@ public:
QString bearerName() const;
+ QNetworkConfigurationPrivatePointer serviceNetworkPtr;
+
+ QString mappingName;
+
Bearer bearer;
TUint32 numericId;
TUint connectionId;
-
- QNetworkConfigurationPrivatePointer serviceNetworkPtr;
-
- QString mappingName;
};
inline SymbianNetworkConfigurationPrivate *toSymbianConfig(QNetworkConfigurationPrivatePointer ptr)