From 1e06b5e995c6df715da8db53c8375d458277144d Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Fri, 29 Jan 2010 10:30:42 +1000 Subject: Bearer Management Integration 4. --- config.tests/unix/networkmanager/main.cpp | 4 +- .../unix/networkmanager/networkmanager.pro | 3 + examples/network/bearercloud/bearercloud.pro | 2 +- examples/network/bearermonitor/bearermonitor.pro | 2 +- examples/network/bearermonitor/sessionwidget.ui | 426 +++++++++++---------- src/network/bearer/bearer.pro | 9 +- src/network/bearer/qnetworkconfigmanager_maemo.cpp | 1 - src/network/bearer/qnetworkconfiguration_s60_p.cpp | 2 +- src/network/bearer/qnetworksession.cpp | 7 +- src/network/bearer/qnetworksession_maemo_p.h | 11 +- .../qnetworkconfigmanager.pro | 6 + .../qnetworkconfiguration.pro | 6 + .../tst_qnetworksession/tst_qnetworksession.pro | 6 + 13 files changed, 258 insertions(+), 227 deletions(-) diff --git a/config.tests/unix/networkmanager/main.cpp b/config.tests/unix/networkmanager/main.cpp index 6f2bae6..60c6dfc 100644 --- a/config.tests/unix/networkmanager/main.cpp +++ b/config.tests/unix/networkmanager/main.cpp @@ -38,7 +38,9 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - +#if defined(QT_NO_DBUS) +sjkp //error is no QtDBus +#endif #include int main(int argc, char** argv) diff --git a/config.tests/unix/networkmanager/networkmanager.pro b/config.tests/unix/networkmanager/networkmanager.pro index 554f513..3af4fcb 100644 --- a/config.tests/unix/networkmanager/networkmanager.pro +++ b/config.tests/unix/networkmanager/networkmanager.pro @@ -9,3 +9,6 @@ INCLUDEPATH += . # Input SOURCES += main.cpp +!contains(QT_CONFIG,dbus): { + DEFINES += QT_NO_DBUS +} diff --git a/examples/network/bearercloud/bearercloud.pro b/examples/network/bearercloud/bearercloud.pro index 75e3049..856d3f7 100644 --- a/examples/network/bearercloud/bearercloud.pro +++ b/examples/network/bearercloud/bearercloud.pro @@ -20,4 +20,4 @@ MOBILITY = bearer CONFIG += console -symbian:TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData +symbian:TARGET.CAPABILITY = NetworkServices ReadUserData diff --git a/examples/network/bearermonitor/bearermonitor.pro b/examples/network/bearermonitor/bearermonitor.pro index acbee71..046021a 100644 --- a/examples/network/bearermonitor/bearermonitor.pro +++ b/examples/network/bearermonitor/bearermonitor.pro @@ -25,4 +25,4 @@ wince*:LIBS += -lWs2 CONFIG += console -symbian:TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData +symbian:TARGET.CAPABILITY = NetworkServices ReadUserData diff --git a/examples/network/bearermonitor/sessionwidget.ui b/examples/network/bearermonitor/sessionwidget.ui index f02f306..65ca43b 100644 --- a/examples/network/bearermonitor/sessionwidget.ui +++ b/examples/network/bearermonitor/sessionwidget.ui @@ -7,240 +7,248 @@ 0 0 340 - 220 + 286 Form - + - + - - - Session ID: - - + + + + + Session ID: + + + + + + + + 0 + 0 + + + + + + + + - - - - 0 - 0 - - - - - - - - - - - - - - - - 0 - 0 - - - - Session State: - - - - - - - - 0 - 0 - - - - Invalid - - - - - - - - - - - Configuration: - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - Bearer: - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - Interface Name: - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - Interface GUID: - - + + + + + + 0 + 0 + + + + Session State: + + + + + + + + 0 + 0 + + + + Invalid + + + + - - - - 0 - 0 - - - - - - + + + + + Configuration: + + + + + + + + 0 + 0 + + + + + + + + - - - - - - - Last Error: - - + + + + + Bearer: + + + + + + + + 0 + 0 + + + + + + + + - - - - 0 - 0 - - - - - - + + + + + Interface Name: + + + + + + + + 0 + 0 + + + + + + + + - - - - - - - Error String - - + + + + + Interface GUID: + + + + + + + + 0 + 0 + + + + + + + + - - - - 0 - 0 - - - - - - - - - - - - - - - Open - - + + + + + Last Error: + + + + + + + + 0 + 0 + + + + + + + + - - - Blocking Open - - + + + + + Error String + + + + + + + + 0 + 0 + + + + + + + + - - - Close - - + + + + + Open + + + + + + + Blocking Open + + + + - - - Stop - - + + + + + Close + + + + + + + Stop + + + + diff --git a/src/network/bearer/bearer.pro b/src/network/bearer/bearer.pro index ce39db6..b8e4d06 100644 --- a/src/network/bearer/bearer.pro +++ b/src/network/bearer/bearer.pro @@ -50,19 +50,11 @@ symbian: { TARGET.CAPABILITY = ALL -TCB TARGET.UID3 = 0x2002AC81 - deploy.path = $${EPOCROOT} - exportheaders.sources = $$PUBLIC_HEADERS - exportheaders.path = epoc32/include - for(header, exportheaders.sources) { - BLD_INF_RULES.prj_exports += "$$header $$deploy.path$$exportheaders.path/$$basename(header)" - } - QtBearerManagement.sources = QtBearer.dll QtBearerManagement.path = /sys/bin DEPLOYMENT += QtBearerManagement } else { maemo6 { - QT += dbus CONFIG += link_pkgconfig exists(../debug) { @@ -159,4 +151,5 @@ symbian: { } } +CONFIG += middleware include(../../features/deploy.pri) diff --git a/src/network/bearer/qnetworkconfigmanager_maemo.cpp b/src/network/bearer/qnetworkconfigmanager_maemo.cpp index 795b054..1482fa7 100644 --- a/src/network/bearer/qnetworkconfigmanager_maemo.cpp +++ b/src/network/bearer/qnetworkconfigmanager_maemo.cpp @@ -44,7 +44,6 @@ #include "qnetworkconfigmanager_maemo_p.h" #include -#include #include #include diff --git a/src/network/bearer/qnetworkconfiguration_s60_p.cpp b/src/network/bearer/qnetworkconfiguration_s60_p.cpp index 02115d9..ee50bd5 100644 --- a/src/network/bearer/qnetworkconfiguration_s60_p.cpp +++ b/src/network/bearer/qnetworkconfiguration_s60_p.cpp @@ -68,7 +68,7 @@ QString QNetworkConfigurationPrivate::bearerName() const case QNetworkConfigurationPrivate::BearerHSPA: return QLatin1String("HSPA"); case QNetworkConfigurationPrivate::BearerBluetooth: return QLatin1String("Bluetooth"); case QNetworkConfigurationPrivate::BearerWiMAX: return QLatin1String("WiMAX"); - default: return QLatin1String("Unknown"); + default: return QString(); } } diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index 6171350..28afcfe 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -141,7 +141,7 @@ QTM_BEGIN_NAMESPACE \value UnknownSessionError An unidentified error occurred. \value SessionAbortedError The session was aborted by the user or system. - \value RoamingError The session cannot roam to the new configuration. + \value RoamingError The session cannot roam to a new configuration. \value OperationNotSupportedError The operation is not supported for current configuration. \value InvalidConfigurationError The operation cannot currently be performed for the current configuration. @@ -328,7 +328,10 @@ void QNetworkSession::close() /*! Invalidates all open sessions against the network interface and therefore stops the underlying network interface. This function always changes the session's state() flag to - \l Disconnected. + \l Disconnected. + + On Symbian platform, a 'NetworkControl' capability is required for + full interface-level stop (without the capability, only the current session is stopped). \sa open(), close() */ diff --git a/src/network/bearer/qnetworksession_maemo_p.h b/src/network/bearer/qnetworksession_maemo_p.h index 892262d..e3b7ffb 100644 --- a/src/network/bearer/qnetworksession_maemo_p.h +++ b/src/network/bearer/qnetworksession_maemo_p.h @@ -52,7 +52,6 @@ // // We mean it. // - #include "qnetworkconfigmanager_maemo_p.h" #include "qnetworksession.h" @@ -60,7 +59,9 @@ #include #include +#ifdef Q_WS_MAEMO_6 #include +#endif QTM_BEGIN_NAMESPACE @@ -69,8 +70,12 @@ class QNetworkSessionPrivate : public QObject Q_OBJECT public: QNetworkSessionPrivate() : - tx_data(0), rx_data(0), m_activeTime(0), isOpen(false), - connectFlags(ICD_CONNECTION_FLAG_USER_EVENT) + tx_data(0), rx_data(0), m_activeTime(0), isOpen(false), +#ifdef Q_WS_MAEMO_6 + connectFlags(ICD_CONNECTION_FLAG_USER_EVENT) +#else + connectFlags(0) +#endif { } diff --git a/tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro b/tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro index bdd4926..4b60a55 100644 --- a/tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro +++ b/tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro @@ -14,3 +14,9 @@ MOBILITY = bearer symbian { TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData } + +maemo6 { + CONFIG += link_pkgconfig + + PKGCONFIG += conninet +} diff --git a/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro b/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro index c5a08b3..3cdb113 100644 --- a/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro +++ b/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro @@ -14,3 +14,9 @@ MOBILITY = bearer symbian { TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData } + +maemo6 { + CONFIG += link_pkgconfig + + PKGCONFIG += conninet +} diff --git a/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.pro b/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.pro index ccc405e..18b5c23 100644 --- a/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.pro +++ b/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.pro @@ -20,3 +20,9 @@ wince* { symbian { TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData } + +maemo6 { + CONFIG += link_pkgconfig + + PKGCONFIG += conninet +} -- cgit v0.12