# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1282203810 -10800 # Node ID 885c2596c964ed2d1ef8c69e71fa42e6d1c31225 # Parent e2d33e235f7ea09f1bcf3a36a6d6371cb6d26851 Revision: 201031 Kit: 201033 diff -r e2d33e235f7e -r 885c2596c964 group/qtmobilityheaders.flm --- a/group/qtmobilityheaders.flm Thu Jul 15 19:34:35 2010 +0300 +++ b/group/qtmobilityheaders.flm Thu Aug 19 10:43:30 2010 +0300 @@ -9,16 +9,16 @@ QTMOBILITY_ROOT := $(subst group,,$(subst \,/,$(EXTENSION_ROOT)qtmobility/)) QTMOBILITY_BIN := $(QTMOBILITY_ROOT)bin QTMOBILITY_INCLUDE := $(QTMOBILITY_ROOT)include -QTMOBILITY_BEARER_INCLUDE := $(QTMOBILITY_INCLUDE)/QtmBearer -QTMOBILITY_CONTACTS_INCLUDE := $(QTMOBILITY_INCLUDE)/QtmContacts -QTMOBILITY_LOCATION_INCLUDE := $(QTMOBILITY_INCLUDE)/QtmLocation -QTMOBILITY_MESSAGING_INCLUDE := $(QTMOBILITY_INCLUDE)/QtmMessaging -QTMOBILITY_MULTIMEDIA_INCLUDE := $(QTMOBILITY_INCLUDE)/QtMultimedia -QTMOBILITY_PUBLISHSUBSCRIBE_INCLUDE := $(QTMOBILITY_INCLUDE)/QtmPubSub -QTMOBILITY_SYSTEMINFO_INCLUDE := $(QTMOBILITY_INCLUDE)/QtmSystemInfo -QTMOBILITY_SERVICEFRAMEWORK_INCLUDE := $(QTMOBILITY_INCLUDE)/QtmServiceFramework -QTMOBILITY_VERSIT_INCLUDE := $(QTMOBILITY_INCLUDE)/QtmVersit -QTMOBILITY_SENSORS_INCLUDE := $(QTMOBILITY_INCLUDE)/QtmSensors +QTMOBILITY_BEARER_INCLUDE := $(QTMOBILITY_INCLUDE)/QtBearer +QTMOBILITY_CONTACTS_INCLUDE := $(QTMOBILITY_INCLUDE)/QtContacts +QTMOBILITY_LOCATION_INCLUDE := $(QTMOBILITY_INCLUDE)/QtLocation +QTMOBILITY_MESSAGING_INCLUDE := $(QTMOBILITY_INCLUDE)/QtMessaging +QTMOBILITY_MULTIMEDIA_INCLUDE := $(QTMOBILITY_INCLUDE)/QtMultimediaKit +QTMOBILITY_PUBLISHSUBSCRIBE_INCLUDE := $(QTMOBILITY_INCLUDE)/QtPublishSubscribe +QTMOBILITY_SYSTEMINFO_INCLUDE := $(QTMOBILITY_INCLUDE)/QtSystemInfo +QTMOBILITY_SERVICEFRAMEWORK_INCLUDE := $(QTMOBILITY_INCLUDE)/QtServiceFramework +QTMOBILITY_VERSIT_INCLUDE := $(QTMOBILITY_INCLUDE)/QtVersit +QTMOBILITY_SENSORS_INCLUDE := $(QTMOBILITY_INCLUDE)/QtSensors QTMOBILITY_SRC := $(QTMOBILITY_ROOT)src QTMOBILITY_GLOBAL_SRC := $(QTMOBILITY_SRC)/global QTMOBILITY_BEARER_SRC := $(QTMOBILITY_SRC)/bearer diff -r e2d33e235f7e -r 885c2596c964 qtmobility/bin/servicedbgen Binary file qtmobility/bin/servicedbgen has changed diff -r e2d33e235f7e -r 885c2596c964 qtmobility/bin/servicedbgen.exe Binary file qtmobility/bin/servicedbgen.exe has changed diff -r e2d33e235f7e -r 885c2596c964 qtmobility/common.pri --- a/qtmobility/common.pri Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/common.pri Thu Aug 19 10:43:30 2010 +0300 @@ -88,7 +88,7 @@ contains(TEMPLATE,.*lib) { DESTDIR = $$OUTPUT_DIR/lib symbian:defFilePath=../s60installs -# VERSION = 1.0.1 +# VERSION = 1.0.2 } else { DESTDIR = $$OUTPUT_DIR/bin } @@ -162,6 +162,9 @@ symbian { #For some reason the default include path doesn't include MOC_DIR on symbian INCLUDEPATH += $$MOC_DIR + + #This is supposed to be defined in symbian_os.hrh + DEFINES += SYMBIAN_EMULATOR_SUPPORTS_PERPROCESS_WSD } # Add the output dirs to the link path too diff -r e2d33e235f7e -r 885c2596c964 qtmobility/config.pri --- a/qtmobility/config.pri Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/config.pri Thu Aug 19 10:43:30 2010 +0300 @@ -16,7 +16,9 @@ symbiancntsim_enabled = yes MOBILITY_SD_MCL_BUILD = yes sensors_symbian_enabled = yes +hb_symbian_enabled = no audiorouting_s60_enabled = yes radioutility_s60_enabled = yes -openmaxal_symbian_enabled = yes +openmaxal_symbian_enabled = no surfaces_s60_enabled = yes +messaging_freestyle_enabled = yes diff -r e2d33e235f7e -r 885c2596c964 qtmobility/configure --- a/qtmobility/configure Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/configure Thu Aug 19 10:43:30 2010 +0300 @@ -445,7 +445,7 @@ printf "." "$MAKE" >> "$CONFIG_LOG" 2>&1 printf ". " - if ./$2 >> "$CONFIG_LOG" 2>&1; then + if [ -e ./$2 ]; then echo "OK" echo "$2_enabled = yes" >> "$CONFIG_IN" else @@ -462,39 +462,13 @@ compileTest "Maemo ICD" maemo-icd compileTest "Maemo ICD WLAN" maemo-icd-network-wlan compileTest "Maemo5 contacts dependencies" maemo5-contacts +compileTest "Bluez" bluez if [ "$LINUX_TARGET" = maemo6 ]; then compileTest sensord sensord else echo "sensord_enabled = no" >> "$CONFIG_IN" fi -# Now module selection -# using 'expr match ....' should help a bit -#if [ -n "$MOBILITY_MODULES_UNPARSED" ]; then - # In theory we should do some sanity checking here. -# MOBILITY_MODULES="$MOBILITY_MODULES_UNPARSED" -#fi - -# Test if able to build multimedia -for module in $MOBILITY_MODULES; do - case "$module" in - multimedia) - echo "contains(QT_CONFIG,multimedia):message(1)" > 1.pro - SOMETHING=`qmake 1.pro 2>&1` - if [ "$SOMETHING" = "Project MESSAGE: 1" ]; then - MOBILITY_MODULES="$(echo $MOBILITY_MODULES | sed 's:multimedia::g')" - echo "Only one multimedia module allowed, please rebuild Qt with -no-multimedia" - fi - rm 1.pro - ;; - esac -done - -if [ -z "$MOBILITY_MODULES" ]; then - echo "No module available to build." - exit 1 -fi - # It's a lot easier to make qmake do the dependency checking... echo "mobility_modules = $MOBILITY_MODULES" >> "$CONFIG_IN" echo "contains(mobility_modules,versit): mobility_modules *= contacts" >> "$CONFIG_IN" @@ -512,44 +486,44 @@ for module in $MOBILITY_MODULES; do case "$module" in bearer) - $relpath/bin/syncheaders $shadowpath/include/QtmBearer $relpath/src/bearer + $relpath/bin/syncheaders $shadowpath/include/QtBearer $relpath/src/bearer ;; publishsubscribe) - $relpath/bin/syncheaders $shadowpath/include/QtmPubSub $relpath/src/publishsubscribe + $relpath/bin/syncheaders $shadowpath/include/QtPublishSubscribe $relpath/src/publishsubscribe ;; location) - $relpath/bin/syncheaders $shadowpath/include/QtmLocation $relpath/src/location + $relpath/bin/syncheaders $shadowpath/include/QtLocation $relpath/src/location ;; serviceframework) - $relpath/bin/syncheaders $shadowpath/include/QtmServiceFramework $relpath/src/serviceframework + $relpath/bin/syncheaders $shadowpath/include/QtServiceFramework $relpath/src/serviceframework ;; systeminfo) - $relpath/bin/syncheaders $shadowpath/include/QtmSystemInfo $relpath/src/systeminfo + $relpath/bin/syncheaders $shadowpath/include/QtSystemInfo $relpath/src/systeminfo ;; contacts) - $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts - $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/details - $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/requests - $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/filters + $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts + $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/details + $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/requests + $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/filters ;; multimedia) - $relpath/bin/syncheaders $shadowpath/include/QtMultimedia $relpath/src/multimedia - $relpath/bin/syncheaders $shadowpath/include/QtMultimedia $relpath/src/multimedia/audio - $relpath/bin/syncheaders $shadowpath/include/QtMultimedia $relpath/src/multimedia/video + $relpath/bin/syncheaders $shadowpath/include/QtMultimediaKit $relpath/src/multimedia + $relpath/bin/syncheaders $shadowpath/include/QtMultimediaKit $relpath/src/multimedia/audio + $relpath/bin/syncheaders $shadowpath/include/QtMultimediaKit $relpath/src/multimedia/video ;; messaging) - $relpath/bin/syncheaders $shadowpath/include/QtmMessaging $relpath/src/messaging + $relpath/bin/syncheaders $shadowpath/include/QtMessaging $relpath/src/messaging ;; versit) #versit implies contacts - $relpath/bin/syncheaders $shadowpath/include/QtmVersit $relpath/src/versit - $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts - $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/details - $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/requests - $relpath/bin/syncheaders $shadowpath/include/QtmContacts $relpath/src/contacts/filters + $relpath/bin/syncheaders $shadowpath/include/QtVersit $relpath/src/versit + $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts + $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/details + $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/requests + $relpath/bin/syncheaders $shadowpath/include/QtContacts $relpath/src/contacts/filters ;; sensors) - $relpath/bin/syncheaders $shadowpath/include/QtmSensors $relpath/src/sensors + $relpath/bin/syncheaders $shadowpath/include/QtSensors $relpath/src/sensors ;; *) echo "Cannot generate headers for $module" diff -r e2d33e235f7e -r 885c2596c964 qtmobility/configure.bat --- a/qtmobility/configure.bat Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/configure.bat Thu Aug 19 10:43:30 2010 +0300 @@ -59,11 +59,19 @@ set BUILD_TOOLS=yes set MOBILITY_MODULES=bearer location contacts multimedia publishsubscribe versit messaging systeminfo serviceframework sensors set MOBILITY_MODULES_UNPARSED= -set MOBILITY_MULTIMEDIA=yes set VC_TEMPLATE_OPTION= set QT_PATH= set QMAKE_CACHE=%BUILD_PATH%\.qmake.cache +REM We use these variables to indicate which modules are selected +REM They are used for example to see which modules need config.tests built +set CONTACTS_SELECTED=yes +set BEARER_SELECTED=yes +set SYSTEMINFO_SELECTED=yes +set SENSORS_SELECTED=yes +set MESSAGING_SELECTED=yes +set MULTIMEDIA_SELECTED=yes +set LOCATION_SELECTED=yes if exist "%QMAKE_CACHE%" del /Q %QMAKE_CACHE% if exist "%PROJECT_LOG%" del /Q %PROJECT_LOG% if exist "%PROJECT_CONFIG%" del /Q %PROJECT_CONFIG% @@ -72,22 +80,6 @@ echo QT_MOBILITY_BUILD_TREE = %BUILD_PATH% >> %QMAKE_CACHE% set QMAKE_CACHE= -if %BUILD_PATH% == %SOURCE_PATH% ( - cd %SOURCE_PATH%\config.tests\qtmultimedia - if exist make del qtmultimedia -) else ( - rmdir /S /Q config.tests\qtmultimedia - mkdir config.tests\qtmultimedia - cd config.tests\qtmultimedia -) -for /f "tokens=3" %%i in ('call %QT_PATH%qmake %SOURCE_PATH%\config.tests\qtmultimedia\qtmultimedia.pro 2^>^&1 1^>NUL') do set QTMULTIMEDIA=%%i -if %QTMULTIMEDIA% == no-multimedia ( - set MOBILITY_MULTIMEDIA=yes -) else ( - set MOBILITY_MULTIMEDIA=no -) -cd /D %BUILD_PATH% - :cmdline_parsing if "%1" == "" goto startProcessing if "%1" == "-debug" goto debugTag @@ -264,6 +256,13 @@ REM reset default modules as we expect a modules list set MOBILITY_MODULES= +set CONTACTS_SELECTED= +set BEARER_SELECTED= +set SYSTEMINFO_SELECTED= +set SENSORS_SELECTED= +set MESSAGING_SELECTED= +set MULTIMEDIA_SELECTED= +set LOCATION_SELECTED= echo Checking selected modules: :modulesTag2 @@ -276,38 +275,38 @@ : distinguish between false and correct module names being passed if %FIRST% == bearer ( echo Bearer Management selected + set BEARER_SELECTED=yes ) else if %FIRST% == contacts ( echo Contacts selected + set CONTACTS_SELECTED=yes ) else if %FIRST% == location ( echo Location selected + set LOCATION_SELECTED=yes ) else if %FIRST% == messaging ( echo Messaging selected + set MESSAGING_SELECTED=yes ) else if %FIRST% == multimedia ( echo Multimedia selected + set MULTIMEDIA_SELECTED=yes ) else if %FIRST% == publishsubscribe ( echo PublishSubscribe selected ) else if %FIRST% == systeminfo ( echo Systeminfo selected + set SYSTEMINFO_SELECTED=yes ) else if %FIRST% == serviceframework ( echo ServiceFramework selected ) else if %FIRST% == versit ( echo Versit selected ^(implies Contacts^) + set CONTACTS_SELECTED=yes ) else if %FIRST% == sensors ( echo Sensors selected + set SENSORS_SELECTED=yes ) else ( echo Unknown module %FIRST% goto errorTag ) -if %FIRST% == multimedia ( - if %MOBILITY_MULTIMEDIA% == yes ( - set MOBILITY_MODULES=%MOBILITY_MODULES% %FIRST% - ) else ( - echo "Only one multimedia module allowed, please rebuild Qt with -no-multimedia" - ) -) else ( - set MOBILITY_MODULES=%MOBILITY_MODULES% %FIRST% -) +set MOBILITY_MODULES=%MOBILITY_MODULES% %FIRST% if "%REMAINING%" == "" ( shift @@ -320,41 +319,8 @@ SET FIRST= goto cmdline_parsing -:removeMultimedia -set MOBILITY_MODULES_TEMP=%MOBILITY_MODULES% -set MOBILITY_MODULES= - -:removeMultimedia2 - -for /f "tokens=1,*" %%a in ("%MOBILITY_MODULES_TEMP%") do ( - set FIRST=%%a - set REMAINING=%%b -) -if NOT %FIRST% == multimedia ( - set MOBILITY_MODULES=%MOBILITY_MODULES% %FIRST% -) -if "%REMAINING%" == "" ( - goto startProcessing2 -) else ( - set MOBILITY_MODULES_TEMP=%REMAINING% - goto removeMultimedia2 -) - -goto startProcessing2 - :startProcessing -for %%a in (%MOBILITY_MODULES%) do ( - if %%a == multimedia ( - if %MOBILITY_MULTIMEDIA% == no ( - echo "Only one multimedia module allowed, please rebuild Qt with -no-multimedia" - goto removeMultimedia - ) - ) -) - -:startProcessing2 - echo CONFIG += %RELEASEMODE% >> %PROJECT_CONFIG% echo CONFIG_WIN32 += %WIN32_RELEASEMODE% %RELEASEMODE% >> %PROJECT_CONFIG% set RELEASEMODE= @@ -397,10 +363,10 @@ echo qmf_enabled = no >> %PROJECT_CONFIG% -echo isEmpty($$QT_MOBILITY_INCLUDE):QT_MOBILITY_INCLUDE=$$QT_MOBILITY_PREFIX/include >> %PROJECT_CONFIG% -echo isEmpty($$QT_MOBILITY_LIB):QT_MOBILITY_LIB=$$QT_MOBILITY_PREFIX/lib >> %PROJECT_CONFIG% -echo isEmpty($$QT_MOBILITY_BIN):QT_MOBILITY_BIN=$$QT_MOBILITY_PREFIX/bin >> %PROJECT_CONFIG% -echo isEmpty($$QT_MOBILITY_PLUGINS):QT_MOBILITY_PLUGINS=$$QT_MOBILITY_PREFIX/plugins >> %PROJECT_CONFIG% +echo !symbian:isEmpty(QT_MOBILITY_INCLUDE):QT_MOBILITY_INCLUDE=$$QT_MOBILITY_PREFIX/include >> %PROJECT_CONFIG% +echo isEmpty(QT_MOBILITY_LIB):QT_MOBILITY_LIB=$$QT_MOBILITY_PREFIX/lib >> %PROJECT_CONFIG% +echo isEmpty(QT_MOBILITY_BIN):QT_MOBILITY_BIN=$$QT_MOBILITY_PREFIX/bin >> %PROJECT_CONFIG% +echo isEmpty(QT_MOBILITY_PLUGINS):QT_MOBILITY_PLUGINS=$$QT_MOBILITY_PREFIX/plugins >> %PROJECT_CONFIG% echo mobility_modules = %MOBILITY_MODULES% >> %PROJECT_CONFIG% REM no Sysinfo support on Maemo yet @@ -505,9 +471,11 @@ if "%MOBILITY_BUILDSYSTEM%" == "symbian-sbsv2" ( call %MOBILITY_MAKE% release-armv5 >> %PROJECT_LOG% 2>&1 for /f "tokens=2" %%i in ('%MOBILITY_MAKE% release-armv5 SBS^="@sbs --check"') do set FAILED=1 + call %MOBILITY_MAKE% clean >> %PROJECT_LOG% 2>&1 ) else if "%MOBILITY_BUILDSYSTEM%" == "symbian-abld" ( call %MOBILITY_MAKE% release-gcce >> %PROJECT_LOG% 2>&1 for /f "tokens=2" %%i in ('%MOBILITY_MAKE% release-gcce ABLD^="@ABLD.BAT -c" 2^>^&1') do if not %%i == bldfiles set FAILED=1 + call %MOBILITY_MAKE% clean >> %PROJECT_LOG% 2>&1 ) else { REM Make for other builds call %MOBILITY_MAKE% >> %PROJECT_LOG% 2>&1 @@ -536,20 +504,47 @@ for /f "tokens=3" %%i in ('call %QT_PATH%qmake %SOURCE_PATH%\config.tests\make\make.pro 2^>^&1 1^>NUL') do set BUILDSYSTEM=%%i if "%BUILDSYSTEM%" == "symbian-abld" goto symbianTests if "%BUILDSYSTEM%" == "symbian-sbsv2" goto symbianTests -goto noTests +goto windowsTests :symbianTests -call :compileTest LBT lbt -call :compileTest SNAP snap -call :compileTest OCC occ -call :compileTest SymbianContactSIM symbiancntsim -call :compileTest S60_Sensor_API sensors_s60_31 -call :compileTest Symbian_Sensor_Framework sensors_symbian -call :compileTest Audiorouting_s60 audiorouting_s60 -call :compileTest Tunerlibrary_for_3.1 tunerlib_s60 -call :compileTest RadioUtility_for_post_3.1 radioutility_s60 -call :compileTest OpenMaxAl_support openmaxal_symbian -call :compileTest Surfaces_s60 surfaces_s60 + +if "%MULTIMEDIA_SELECTED%" == "yes" ( + call :compileTest Audiorouting_s60 audiorouting_s60 + call :compileTest Tunerlibrary_for_3.1 tunerlib_s60 + call :compileTest RadioUtility_for_post_3.1 radioutility_s60 + call :compileTest OpenMaxAl_support openmaxal_symbian + call :compileTest Surfaces_s60 surfaces_s60 +) +if "%CONTACTS_SELECTED%" == "yes" ( + call :compileTest SymbianContactSIM symbiancntsim +) +if "%BEARER_SELECTED%" == "yes" ( + call :compileTest SNAP snap + call :compileTest OCC occ +) +if "%SENSORS_SELECTED%" == "yes" ( + call :compileTest S60_Sensor_API sensors_s60_31 + call :compileTest Symbian_Sensor_Framework sensors_symbian +) +if "%MESSAGING_SELECTED%" == "yes" ( + call :compileTest Symbian_Messaging_Freestyle messaging_freestyle +) +if "%SYSTEMINFO_SELECTED%" == "yes" ( + call :compileTest Symbian_Hb hb_symbian +) +if "%LOCATION_SELECTED%" == "yes" ( + call :compileTest LBT lbt +) +goto noTests + +:windowsTests + +if "%MULTIMEDIA_SELECTED%" == "yes" ( + call :compileTest DirectShow directshow + call :compileTest WindowsMediaSDK wmsdk + call :compileTest WindowMediaPlayer wmp + call :compileTest EnhancedVideoRenderer evr +) :noTests @@ -575,37 +570,35 @@ ) if %FIRST% == bearer ( - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmBearer %SOURCE_PATH%\src\bearer + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtBearer %SOURCE_PATH%\src\bearer ) else if %FIRST% == contacts ( - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmContacts %SOURCE_PATH%\src\contacts - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmContacts %SOURCE_PATH%\src\contacts\requests - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmContacts %SOURCE_PATH%\src\contacts\filters - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmContacts %SOURCE_PATH%\src\contacts\details + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\requests + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\filters + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\details ) else if %FIRST% == location ( - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmLocation %SOURCE_PATH%\src\location + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtLocation %SOURCE_PATH%\src\location ) else if %FIRST% == messaging ( - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmMessaging %SOURCE_PATH%\src\messaging + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMessaging %SOURCE_PATH%\src\messaging ) else if %FIRST% == multimedia ( - if %MOBILITY_MULTIMEDIA% == yes ( - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimedia %SOURCE_PATH%\src\multimedia - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimedia %SOURCE_PATH%\src\multimedia\audio - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimedia %SOURCE_PATH%\src\multimedia\video - ) + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimediaKit %SOURCE_PATH%\src\multimedia + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimediaKit %SOURCE_PATH%\src\multimedia\audio + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimediaKit %SOURCE_PATH%\src\multimedia\video ) else if %FIRST% == publishsubscribe ( - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmPubSub %SOURCE_PATH%\src\publishsubscribe + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtPublishSubscribe %SOURCE_PATH%\src\publishsubscribe ) else if %FIRST% == systeminfo ( - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmSystemInfo %SOURCE_PATH%\src\systeminfo + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtSystemInfo %SOURCE_PATH%\src\systeminfo ) else if %FIRST% == serviceframework ( - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmServiceFramework %SOURCE_PATH%\src\serviceframework + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtServiceFramework %SOURCE_PATH%\src\serviceframework ) else if %FIRST% == versit ( REM versit implies contacts - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmVersit %SOURCE_PATH%\src\versit - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmContacts %SOURCE_PATH%\src\contacts - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmContacts %SOURCE_PATH%\src\contacts\requests - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmContacts %SOURCE_PATH%\src\contacts\filters - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmContacts %SOURCE_PATH%\src\contacts\details + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtVersit %SOURCE_PATH%\src\versit + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\requests + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\filters + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\details ) else if %FIRST% == sensors ( - perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtmSensors %SOURCE_PATH%\src\sensors + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtSensors %SOURCE_PATH%\src\sensors ) if "%REMAINING%" == "" ( @@ -650,6 +643,13 @@ SET REMAINING= SET FIRST= SET MODULES_TEMP= +set CONTACTS_SELECTED= +set BEARER_SELECTED= +set SYSTEMINFO_SELECTED= +set SENSORS_SELECTED= +set MESSAGING_SELECTED= +set MULTIMEDIA_SELECTED= +set LOCATION_SELECTED= exit /b 1 :exitTag @@ -667,4 +667,11 @@ SET REMAINING= SET FIRST= SET MODULES_TEMP= +set CONTACTS_SELECTED= +set BEARER_SELECTED= +set SYSTEMINFO_SELECTED= +set SENSORS_SELECTED= +set MESSAGING_SELECTED= +set MULTIMEDIA_SELECTED= +set LOCATION_SELECTED= exit /b 0 diff -r e2d33e235f7e -r 885c2596c964 qtmobility/data/qtmobility.pkg --- a/qtmobility/data/qtmobility.pkg Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/data/qtmobility.pkg Thu Aug 19 10:43:30 2010 +0300 @@ -3,7 +3,7 @@ &EN ; SIS header: name, uid, version -#{"QtMobility"},(0x2002AC89),1,0,1,TYPE=SA,RU +#{"QtMobility"},(0x2002AC89),1,0,2,TYPE=SA,RU ; Localised Vendor name %{"Nokia"} diff -r e2d33e235f7e -r 885c2596c964 qtmobility/data/qtmobility.sisx Binary file qtmobility/data/qtmobility.sisx has changed diff -r e2d33e235f7e -r 885c2596c964 qtmobility/data/qtmobility_stub.pkg --- a/qtmobility/data/qtmobility_stub.pkg Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/data/qtmobility_stub.pkg Thu Aug 19 10:43:30 2010 +0300 @@ -3,7 +3,7 @@ &EN ; SIS header: name, uid, version -#{"QtMobility"},(0x2002AC89),1,0,1,TYPE=SA +#{"QtMobility"},(0x2002AC89),1,0,2,TYPE=SA ; Localised Vendor name %{"Nokia"} diff -r e2d33e235f7e -r 885c2596c964 qtmobility/data/qtmobility_stub.sis Binary file qtmobility/data/qtmobility_stub.sis has changed diff -r e2d33e235f7e -r 885c2596c964 qtmobility/data/qtmobilityexampleapps.pkg --- a/qtmobility/data/qtmobilityexampleapps.pkg Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/data/qtmobilityexampleapps.pkg Thu Aug 19 10:43:30 2010 +0300 @@ -2,7 +2,7 @@ &EN ; SIS header: name, uid, version -#{"QtMobilityExamples"},(0xE001E61D),1,0,0,TYPE=SA +#{"QtMobilityExamples"},(0xE001E61D),1,0,2,TYPE=SA ; Localised Vendor name %{"Nokia, Qt"} diff -r e2d33e235f7e -r 885c2596c964 qtmobility/examples/bearercloud/cloud.cpp --- a/qtmobility/examples/bearercloud/cloud.cpp Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/examples/bearercloud/cloud.cpp Thu Aug 19 10:43:30 2010 +0300 @@ -245,6 +245,8 @@ else finalOpacity = 1.0; +#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6) && \ + !defined(Q_OS_SYMBIAN) && !defined(Q_OS_WINCE) QString tooltip; if (configuration.name().isEmpty()) @@ -300,6 +302,9 @@ tooltip += tr("
Sent data: %1 bytes").arg(session->bytesWritten()); setToolTip(tooltip); +#else + Q_UNUSED(state); +#endif } //! [2] diff -r e2d33e235f7e -r 885c2596c964 qtmobility/examples/s60installs/s60installs.pro --- a/qtmobility/examples/s60installs/s60installs.pro Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/examples/s60installs/s60installs.pro Thu Aug 19 10:43:30 2010 +0300 @@ -8,17 +8,17 @@ #BearerManagement examples contains(mobility_modules, bearer) { SUBDIRS += ../bearermonitor \ - ../../tests/bearerex + ../bearercloud executables.sources += \ bearermonitor.exe \ - BearerEx.exe + bearercloud.exe reg_resource.sources += \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/bearermonitor_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/BearerEx_reg.rsc + $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/bearermonitor_reg.rsc \ + $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/bearercloud_reg.rsc resource.sources += \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/bearermonitor.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/BearerEx.rsc + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/bearermonitor.rsc \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/bearercloud.rsc } executables.path = /sys/bin diff -r e2d33e235f7e -r 885c2596c964 qtmobility/features/deploy.pri --- a/qtmobility/features/deploy.pri Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/features/deploy.pri Thu Aug 19 10:43:30 2010 +0300 @@ -1,5 +1,5 @@ headers.files = $$PUBLIC_HEADERS -headers.path = $$QT_MOBILITY_INCLUDE +headers.path = $$QT_MOBILITY_INCLUDE/$$TARGET contains(TEMPLATE,.*lib) { target.path=$$QT_MOBILITY_LIB diff -r e2d33e235f7e -r 885c2596c964 qtmobility/features/mobility.prf --- a/qtmobility/features/mobility.prf Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/features/mobility.prf Thu Aug 19 10:43:30 2010 +0300 @@ -17,6 +17,7 @@ contains(MOBILITY, bearer) { DEFINES += QT_MOBILITY_BEARER + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtBearer qtAddLibrary(QtBearer) !equals(QT_MAJOR_VERSION,4)|!equals(QT_MINOR_VERSION, 6) { message(Qt Mobility Bearer API is deprecated when using Qt 4.7 or higher.) @@ -25,44 +26,51 @@ } contains(MOBILITY, publishsubscribe) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtPublishSubscribe qtAddLibrary(QtPublishSubscribe) } contains(MOBILITY, location) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtLocation qtAddLibrary(QtLocation) } contains(MOBILITY, serviceframework) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtServiceFramework qtAddLibrary(QtServiceFramework) } contains(MOBILITY, systeminfo) { #QSystemInfo header requires QNetworkInterface QT += network + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtSystemInfo qtAddLibrary(QtSystemInfo) } contains(MOBILITY, multimedia) { QT += network contains(QT_CONFIG, opengl): QT += opengl - mac:LIBS += -framework QtMultimedia - else:win32:contains(QT_CONFIG, debug):LIBS += -lQtMultimediad - else:LIBS += -lQtMultimedia + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtMultimediaKit + qtAddLibrary(QtMultimediaKit) } contains(MOBILITY, contacts) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtContacts qtAddLibrary(QtContacts) } contains(MOBILITY, messaging) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtMessaging qtAddLibrary(QtMessaging) } contains(MOBILITY, versit) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtVersit qtAddLibrary(QtVersit) } contains(MOBILITY, sensors) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtSensors qtAddLibrary(QtSensors) } @@ -72,7 +80,7 @@ symbian:contains(CONFIG, mobility):!contains(TARGET.UID3, 0x2002AC89):!contains(TARGET.UID3, 0xE002AC89) { mobility_default_deployment.pkg_prerules += \ "; Default dependency to QtMobility libraries" \ - "(0x2002AC89), 1, 0, 1, {\"QtMobility\"}" + "(0x2002AC89), 1, 0, 2, {\"QtMobility\"}" DEPLOYMENT += mobility_default_deployment } diff -r e2d33e235f7e -r 885c2596c964 qtmobility/features/mobility.prf.template --- a/qtmobility/features/mobility.prf.template Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/features/mobility.prf.template Thu Aug 19 10:43:30 2010 +0300 @@ -17,6 +17,7 @@ contains(MOBILITY, bearer) { DEFINES += QT_MOBILITY_BEARER + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtBearer qtAddLibrary(QtBearer) !equals(QT_MAJOR_VERSION,4)|!equals(QT_MINOR_VERSION, 6) { message(Qt Mobility Bearer API is deprecated when using Qt 4.7 or higher.) @@ -25,44 +26,51 @@ } contains(MOBILITY, publishsubscribe) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtPublishSubscribe qtAddLibrary(QtPublishSubscribe) } contains(MOBILITY, location) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtLocation qtAddLibrary(QtLocation) } contains(MOBILITY, serviceframework) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtServiceFramework qtAddLibrary(QtServiceFramework) } contains(MOBILITY, systeminfo) { #QSystemInfo header requires QNetworkInterface QT += network + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtSystemInfo qtAddLibrary(QtSystemInfo) } contains(MOBILITY, multimedia) { QT += network contains(QT_CONFIG, opengl): QT += opengl - mac:LIBS += -framework QtMultimedia - else:win32:contains(QT_CONFIG, debug):LIBS += -lQtMultimediad - else:LIBS += -lQtMultimedia + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtMultimediaKit + qtAddLibrary(QtMultimediaKit) } contains(MOBILITY, contacts) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtContacts qtAddLibrary(QtContacts) } contains(MOBILITY, messaging) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtMessaging qtAddLibrary(QtMessaging) } contains(MOBILITY, versit) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtVersit qtAddLibrary(QtVersit) } contains(MOBILITY, sensors) { + INCLUDEPATH += $${MOBILITY_INCLUDE}/QtSensors qtAddLibrary(QtSensors) } @@ -72,7 +80,7 @@ symbian:contains(CONFIG, mobility):!contains(TARGET.UID3, 0x2002AC89):!contains(TARGET.UID3, 0xE002AC89) { mobility_default_deployment.pkg_prerules += \ "; Default dependency to QtMobility libraries" \ - "(0x2002AC89), 1, 0, 1, {\"QtMobility\"}" + "(0x2002AC89), 1, 0, 2, {\"QtMobility\"}" DEPLOYMENT += mobility_default_deployment } diff -r e2d33e235f7e -r 885c2596c964 qtmobility/features/mobilityconfig.prf --- a/qtmobility/features/mobilityconfig.prf Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/features/mobilityconfig.prf Thu Aug 19 10:43:30 2010 +0300 @@ -1,1 +1,5 @@ MOBILITY_CONFIG=bearer +MOBILITY_VERSION = 1.0.2 +MOBILITY_MAJOR_VERSION = 1 +MOBILITY_MINOR_VERSION = 0 +MOBILITY_PATCH_VERSION = 2 diff -r e2d33e235f7e -r 885c2596c964 qtmobility/features/qtservice.meta --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qtmobility/features/qtservice.meta Thu Aug 19 10:43:30 2010 +0300 @@ -0,0 +1,3 @@ +platform win32 +makefile gnumake +techstream qt diff -r e2d33e235f7e -r 885c2596c964 qtmobility/features/qtservice.prf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qtmobility/features/qtservice.prf Thu Aug 19 10:43:30 2010 +0300 @@ -0,0 +1,43 @@ +############################################################################### +# Service FW plug-in +############################################################################### + +symbian { + isEmpty(QTSERVICE.DESCRIPTOR) { + error("Missing service descriptor file") + } + else { + QTSERVICEDBGEN = servicedbgen.exe + QTC_COMMAND = add + contains(QTSERVICE.INITIALIZE, yes) { + QTSERVICE_INITIALIZE = -i + } + + #deploy descriptor file to service framework server's private folder + #so batch mode tool execution can include the service + QtService.sources = $$QTSERVICE.DESCRIPTOR + QtService.path = $$EPOCROOT/private/2002AC7F/des + DEPLOYMENT += QtService + + symbian-sbsv2{ + sfwextension = \ + "START EXTENSION qt/qtservice" \ + "OPTION QTSERVICE_DESCRIPTOR $$basename(QTSERVICE.DESCRIPTOR)" \ + "OPTION QTSERVICE_INITIALIZE $$QTSERVICE_INITIALIZE" \ + "END" + BLD_INF_RULES.prj_extensions += sfwextension + } + + symbian-abld{ + DUMMY = qtservice.out + qtc.output = $$DUMMY + QTC_INPUT = . + qtc.input = QTC_INPUT + qtc.CONFIG = no_link explicit_dependencies + qtc.variable_out = PRE_TARGETDEPS + qtc.commands = $$QTSERVICEDBGEN $$QTSERVICE_INITIALIZE $$QTC_COMMAND $$QTSERVICE.DESCRIPTOR + QMAKE_EXTRA_COMPILERS += qtc + } + + } +} diff -r e2d33e235f7e -r 885c2596c964 qtmobility/qtmobility.pro --- a/qtmobility/qtmobility.pro Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/qtmobility.pro Thu Aug 19 10:43:30 2010 +0300 @@ -45,6 +45,10 @@ PRF_CONFIG=$${QT_MOBILITY_BUILD_TREE}/features/mobilityconfig.prf system(echo MOBILITY_CONFIG=$${mobility_modules} > $$PRF_CONFIG) + system(echo MOBILITY_VERSION = 1.0.2 >> $$PRF_CONFIG) + system(echo MOBILITY_MAJOR_VERSION = 1 >> $$PRF_CONFIG) + system(echo MOBILITY_MINOR_VERSION = 0 >> $$PRF_CONFIG) + system(echo MOBILITY_PATCH_VERSION = 2 >> $$PRF_CONFIG) #symbian does not generate make install rule. we have to copy prf manually symbian { @@ -76,39 +80,88 @@ !symbian:defined(qtPrepareTool):SUBDIRS += translations # install Qt style headers -qtmheaders.path = $${QT_MOBILITY_INCLUDE} !symbian { - qtmheaders.files = $${QT_MOBILITY_BUILD_TREE}/include/QtmBearer/* \ - $${QT_MOBILITY_BUILD_TREE}/include/QtmContacts/* \ - $${QT_MOBILITY_BUILD_TREE}/include/QtmLocation/* \ - $${QT_MOBILITY_BUILD_TREE}/include/QtmMessaging/* \ - $${QT_MOBILITY_BUILD_TREE}/include/QtMultimedia/* \ - $${QT_MOBILITY_BUILD_TREE}/include/QtmPubSub/* \ - $${QT_MOBILITY_BUILD_TREE}/include/QtmServiceFramework/* \ - $${QT_MOBILITY_BUILD_TREE}/include/QtmVersit/* \ - $${QT_MOBILITY_BUILD_TREE}/include/QtmSystemInfo/* \ - $${QT_MOBILITY_BUILD_TREE}/include/QtmSensors/* - INSTALLS += qtmheaders + contains(mobility_modules,bearer) { + qtmheadersbearer.path = $${QT_MOBILITY_INCLUDE}/QtBearer + qtmheadersbearer.files = $${QT_MOBILITY_BUILD_TREE}/include/QtBearer/* + INSTALLS += qtmheadersbearer + } + + contains(mobility_modules,contacts) { + qtmheaderscontacts.path = $${QT_MOBILITY_INCLUDE}/QtContacts + qtmheaderscontacts.files = $${QT_MOBILITY_BUILD_TREE}/include/QtContacts/* + INSTALLS += qtmheaderscontacts + } + + contains(mobility_modules,location) { + qtmheaderslocation.path = $${QT_MOBILITY_INCLUDE}/QtLocation + qtmheaderslocation.files = $${QT_MOBILITY_BUILD_TREE}/include/QtLocation/* + INSTALLS += qtmheaderslocation + } + + contains(mobility_modules,messaging) { + qtmheadersmessaging.path = $${QT_MOBILITY_INCLUDE}/QtMessaging + qtmheadersmessaging.files = $${QT_MOBILITY_BUILD_TREE}/include/QtMessaging/* + INSTALLS += qtmheadersmessaging + } + + contains(mobility_modules,multimedia) { + qtmheadersmultimedia.path = $${QT_MOBILITY_INCLUDE}/QtMultimediaKit + qtmheadersmultimedia.files = $${QT_MOBILITY_BUILD_TREE}/include/QtMultimediaKit/* + INSTALLS += qtmheadersmultimedia + } + + contains(mobility_modules,publishsubscribe) { + qtmheaderspubsub.path = $${QT_MOBILITY_INCLUDE}/QtPublishSubscribe + qtmheaderspubsub.files = $${QT_MOBILITY_BUILD_TREE}/include/QtPublishSubscribe/* + INSTALLS += qtmheaderspubsub + } + + contains(mobility_modules,serviceframework) { + qtmheaderssfw.path = $${QT_MOBILITY_INCLUDE}/QtServiceFramework + qtmheaderssfw.files = $${QT_MOBILITY_BUILD_TREE}/include/QtServiceFramework/* + INSTALLS += qtmheaderssfw + } + + contains(mobility_modules,versit) { + qtmheadersversit.path = $${QT_MOBILITY_INCLUDE}/QtVersit + qtmheadersversit.files = $${QT_MOBILITY_BUILD_TREE}/include/QtVersit/* + INSTALLS += qtmheadersversit + } + + contains(mobility_modules,systeminfo) { + qtmheaderssysteminfo.path = $${QT_MOBILITY_INCLUDE}/QtSystemInfo + qtmheaderssysteminfo.files = $${QT_MOBILITY_BUILD_TREE}/include/QtSystemInfo/* + INSTALLS += qtmheaderssysteminfo + } + + contains(mobility_modules,sensors) { + qtmheaderssensors.path = $${QT_MOBILITY_INCLUDE}/QtSensors + qtmheaderssensors.files = $${QT_MOBILITY_BUILD_TREE}/include/QtSensors/* + INSTALLS += qtmheaderssensors + } } else { - #absolute path does not work and so is shadow building for Symbian - qtmAppHeaders = include/QtmContacts/* \ - include/QtmVersit/* + #absolute path does not work and + #include style does not work either + qtmAppHeaders = include/QtContacts/* \ + include/QtVersit/* - qtmMwHeaders = include/QtmBearer/* \ - include/QtmLocation/* \ - include/QtmMessaging/* \ - include/QtMultimedia/* \ - include/QtmPubSub/* \ - include/QtmServiceFramework/* \ - include/QtmSystemInfo/* \ - include/QtmSensors/* + qtmMwHeaders = include/QtBearer/* \ + include/QtLocation/* \ + include/QtMessaging/* \ + include/QtMultimediaKit/* \ + include/QtPublishSubscribe/* \ + include/QtServiceFramework/* \ + include/QtSystemInfo/* \ + include/QtSensors/* contains(mobility_modules,contacts|versit) { for(api, qtmAppHeaders) { INCLUDEFILES=$$files($$api); #files() attaches a ';' at the end which we need to remove cleanedFiles=$$replace(INCLUDEFILES, ;,) + cleanedFiles=$$replace(cleanedFiles, \\\,/) for(header, cleanedFiles) { exists($$header): BLD_INF_RULES.prj_exports += "$$header $$APP_LAYER_PUBLIC_EXPORT_PATH($$basename(header))" @@ -121,6 +174,7 @@ INCLUDEFILES=$$files($$api); #files() attaches a ';' at the end which we need to remove cleanedFiles=$$replace(INCLUDEFILES, ;,) + cleanedFiles=$$replace(cleanedFiles, \\\, /) for(header, cleanedFiles) { exists($$header): BLD_INF_RULES.prj_exports += "$$header $$MW_LAYER_PUBLIC_EXPORT_PATH($$basename(header))" diff -r e2d33e235f7e -r 885c2596c964 qtmobility/src/bearer/qcorewlanengine_mac.mm --- a/qtmobility/src/bearer/qcorewlanengine_mac.mm Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/src/bearer/qcorewlanengine_mac.mm Thu Aug 19 10:43:30 2010 +0300 @@ -160,7 +160,7 @@ } QScanThread::QScanThread(QObject *parent) - :QThread(parent), interfaceName(nil) + :QThread(parent) { } diff -r e2d33e235f7e -r 885c2596c964 qtmobility/src/bearer/qgenericengine.cpp --- a/qtmobility/src/bearer/qgenericengine.cpp Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/src/bearer/qgenericengine.cpp Thu Aug 19 10:43:30 2010 +0300 @@ -58,6 +58,7 @@ #include #include #include +#include #endif QTM_BEGIN_NAMESPACE diff -r e2d33e235f7e -r 885c2596c964 qtmobility/src/bearer/qnetworkconfigmanager_s60_p.cpp --- a/qtmobility/src/bearer/qnetworkconfigmanager_s60_p.cpp Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/src/bearer/qnetworkconfigmanager_s60_p.cpp Thu Aug 19 10:43:30 2010 +0300 @@ -223,7 +223,7 @@ QList knownConfigs = accessPointConfigurations.keys(); QList knownSnapConfigs = snapConfigurations.keys(); -#ifdef SNAP_FUNCTIONALITY_AVAILABLE +#ifdef SNAP_FUNCTIONALITY_AVAILABLE // S60 version is >= Series60 3rd Edition Feature Pack 2 TInt error = KErrNone; @@ -251,6 +251,8 @@ // which propagate here --> must be converted to leaves (standard // std::exception would cause any TRAP trapping this function to terminate // program). + QT_TRYCATCH_LEAVING(updateActiveAccessPoints()); + updateStatesToSnaps(); QT_TRYCATCH_LEAVING(emit configurationAdded(item)); } } @@ -265,19 +267,27 @@ iCmManager.AllDestinationsL(destinations); for(int i = 0; i < destinations.Count(); i++) { RCmDestination destination; - destination = iCmManager.DestinationL(destinations[i]); + + // Some destinatsions require ReadDeviceData -capability (MMS/WAP) + // The below function will leave in these cases. Don't. Proceed to + // next destination (if any). + TRAPD(error, destination = iCmManager.DestinationL(destinations[i])); + if (error == KErrPermissionDenied) { + continue; + } else { + User::LeaveIfError(error); + } + CleanupClosePushL(destination); QString ident = QT_BEARERMGMT_CONFIGURATION_SNAP_PREFIX+QString::number(qHash(destination.Id())); if (snapConfigurations.contains(ident)) { knownSnapConfigs.removeOne(ident); } else { QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate(); - HBufC *pName = destination.NameLC(); QT_TRYCATCH_LEAVING(cpPriv->name = QString::fromUtf16(pName->Ptr(),pName->Length())); CleanupStack::PopAndDestroy(pName); pName = NULL; - cpPriv->isValid = true; cpPriv->id = ident; cpPriv->numericId = destination.Id(); @@ -293,6 +303,8 @@ if (!iFirstUpdate) { QNetworkConfiguration item; item.d = ptr; + QT_TRYCATCH_LEAVING(updateActiveAccessPoints()); + updateStatesToSnaps(); QT_TRYCATCH_LEAVING(emit configurationAdded(item)); } } @@ -313,12 +325,14 @@ QExplicitlySharedDataPointer ptr(cpPriv); ptr.data()->serviceNetworkPtr = privSNAP; accessPointConfigurations.insert(cpPriv->id, ptr); + privSNAP->serviceNetworkMembers.append(ptr); if (!iFirstUpdate) { QNetworkConfiguration item; item.d = ptr; + QT_TRYCATCH_LEAVING(updateActiveAccessPoints()); + updateStatesToSnaps(); QT_TRYCATCH_LEAVING(emit configurationAdded(item)); } - privSNAP->serviceNetworkMembers.append(ptr); } } else { knownConfigs.removeOne(iface); @@ -335,19 +349,16 @@ privSNAP->serviceNetworkMembers.append(priv); } } - CleanupStack::PopAndDestroy(&connectionMethod); } - if (privSNAP->serviceNetworkMembers.count() > 1) { // Roaming is supported only if SNAP contains more than one IAP privSNAP->roamingSupported = true; } - CleanupStack::PopAndDestroy(&destination); } CleanupStack::PopAndDestroy(&destinations); - + #else // S60 version is < Series60 3rd Edition Feature Pack 2 CCommsDbTableView* pDbTView = ipCommsDB->OpenTableLC(TPtrC(IAP)); @@ -368,6 +379,8 @@ if (!iFirstUpdate) { QNetworkConfiguration item; item.d = ptr; + QT_TRYCATCH_LEAVING(updateActiveAccessPoints()); + updateStatesToSnaps(); QT_TRYCATCH_LEAVING(emit configurationAdded(item)); } } else { @@ -378,8 +391,9 @@ } CleanupStack::PopAndDestroy(pDbTView); #endif + QT_TRYCATCH_LEAVING(updateActiveAccessPoints()); - + foreach (const QString &oldIface, knownConfigs) { //remove non existing IAP QExplicitlySharedDataPointer priv = accessPointConfigurations.take(oldIface); @@ -411,6 +425,9 @@ QT_TRYCATCH_LEAVING(emit configurationRemoved(item)); } } +#ifdef SNAP_FUNCTIONALITY_AVAILABLE + updateStatesToSnaps(); +#endif } #ifdef SNAP_FUNCTIONALITY_AVAILABLE @@ -574,7 +591,6 @@ TRAP_IGNORE(config = defaultConfigurationL()); startCommsDatabaseNotifications(); } - return config; } @@ -637,15 +653,20 @@ User::WaitForRequest(status); QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId)); QExplicitlySharedDataPointer priv = accessPointConfigurations.value(ident); -#ifdef OCC_FUNCTIONALITY_AVAILABLE +#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE) if (!priv.data()) { // If IAP was not found, check if the update was about EasyWLAN priv = configurationFromEasyWlan(apId, connectionId); + // Change the ident correspondingly + if (priv.data()) { + ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(priv.data()->numericId)); + } } #endif if (priv.data()) { iConnectionMonitor.GetIntAttribute(connectionId, subConnectionCount, KConnectionStatus, connectionStatus, status); - User::WaitForRequest(status); + User::WaitForRequest(status); + if (connectionStatus == KLinkLayerOpen) { online = true; inactiveConfigs.removeOne(ident); @@ -935,14 +956,14 @@ QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId)); QExplicitlySharedDataPointer priv = accessPointConfigurations.value(ident); -#ifdef OCC_FUNCTIONALITY_AVAILABLE +#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE) if (!priv.data()) { // Check if status was regarding EasyWLAN priv = configurationFromEasyWlan(apId, connectionId); } #endif if (priv.data()) { - priv.data()->connectionId = connectionId; + priv.data()->connectionId = connectionId; QT_TRYCATCH_LEAVING(emit this->configurationStateChanged(priv.data()->numericId, connectionId, QNetworkSession::Connecting)); } } else if (connectionStatus == KLinkLayerOpen) { @@ -955,7 +976,7 @@ User::WaitForRequest(status); QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId)); QExplicitlySharedDataPointer priv = accessPointConfigurations.value(ident); -#ifdef OCC_FUNCTIONALITY_AVAILABLE +#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE) if (!priv.data()) { // Check for EasyWLAN priv = configurationFromEasyWlan(apId, connectionId); @@ -1035,6 +1056,8 @@ QT_TRYCATCH_LEAVING(changeConfigurationStateAtMaxTo(priv, QNetworkConfiguration::Defined)); } } + // Something has in IAPs, update states to SNAPs + updateStatesToSnaps(); } break; @@ -1051,7 +1074,7 @@ User::WaitForRequest(status); QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId)); QExplicitlySharedDataPointer priv = accessPointConfigurations.value(ident); -#ifdef OCC_FUNCTIONALITY_AVAILABLE +#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE) if (!priv.data()) { // If IAP was not found, check if the update was about EasyWLAN priv = configurationFromEasyWlan(apId, connectionId); @@ -1071,7 +1094,7 @@ } } -#ifdef OCC_FUNCTIONALITY_AVAILABLE +#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE) // Tries to derive configuration from EasyWLAN. // First checks if the interface brought up was EasyWLAN, then derives the real SSID, // and looks up configuration based on that one. @@ -1104,6 +1127,43 @@ } return QExplicitlySharedDataPointer(); } + +bool QNetworkConfigurationManagerPrivate::easyWlanTrueIapId(TUint32& trueIapId) +{ + // Check if this is easy wlan id in the first place + if (trueIapId != iCmManager.EasyWlanIdL()) { + return false; + } + // Loop through all connections that connection monitor is aware + // and check for IAPs based on easy WLAN + TRequestStatus status; + TUint connectionCount; + iConnectionMonitor.GetConnectionCount(connectionCount, status); + User::WaitForRequest(status); + TUint connectionId; + TUint subConnectionCount; + TUint apId; + if (status.Int() == KErrNone) { + for (TUint i = 1; i <= connectionCount; i++) { + iConnectionMonitor.GetConnectionInfo(i, connectionId, subConnectionCount); + iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status); + User::WaitForRequest(status); + if (apId == trueIapId) { + QExplicitlySharedDataPointer priv = + configurationFromEasyWlan(apId, connectionId); + if (priv.data()) { +#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG + qDebug() << "QNCM easyWlanTrueIapId(), found true IAP ID: " << priv.data()->numericId; +#endif + trueIapId = priv.data()->numericId; + return true; + } + } + } + } + return false; +} + #endif // Sessions may use this function to report configuration state changes, diff -r e2d33e235f7e -r 885c2596c964 qtmobility/src/bearer/qnetworkconfigmanager_s60_p.h --- a/qtmobility/src/bearer/qnetworkconfigmanager_s60_p.h Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/src/bearer/qnetworkconfigmanager_s60_p.h Thu Aug 19 10:43:30 2010 +0300 @@ -151,6 +151,7 @@ QNetworkSession::State newState); #ifdef OCC_FUNCTIONALITY_AVAILABLE QExplicitlySharedDataPointer configurationFromEasyWlan(TUint32 apId, TUint connectionId); + bool easyWlanTrueIapId(TUint32& trueIapId); #endif public: // Data diff -r e2d33e235f7e -r 885c2596c964 qtmobility/src/bearer/qnetworksession.cpp --- a/qtmobility/src/bearer/qnetworksession.cpp Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/src/bearer/qnetworksession.cpp Thu Aug 19 10:43:30 2010 +0300 @@ -630,8 +630,10 @@ If the session is based on a service network configuration the number of sent bytes across all active member configurations are returned. - This function may not always be supported on all platforms and returns - 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + This function may not always be supported on all platforms and returns 0. + The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + + \note On some platforms this function may run the main event loop. */ quint64 QNetworkSession::bytesWritten() const { @@ -647,8 +649,10 @@ If the session is based on a service network configuration the number of sent bytes across all active member configurations are returned. - This function may not always be supported on all platforms and returns - 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + This function may not always be supported on all platforms and returns 0. + The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + + \note On some platforms this function may run the main event loop. */ quint64 QNetworkSession::bytesReceived() const { diff -r e2d33e235f7e -r 885c2596c964 qtmobility/src/bearer/qnetworksession_maemo.cpp --- a/qtmobility/src/bearer/qnetworksession_maemo.cpp Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/src/bearer/qnetworksession_maemo.cpp Thu Aug 19 10:43:30 2010 +0300 @@ -208,7 +208,7 @@ } -quint64 QNetworkSessionPrivate::getStatistics(bool sent) const +QNetworkSessionPrivate::Statistics QNetworkSessionPrivate::getStatistics() const { /* This could be also implemented by using the Maemo::Icd::statistics() * that gets the statistics data for a specific IAP. Change if @@ -216,52 +216,47 @@ */ Maemo::Icd icd; QList stats_results; - quint64 counter_rx = 0, counter_tx = 0; + Statistics stats = { 0, 0, 0}; - if (!icd.statistics(stats_results)) { - return 0; - } + if (!icd.statistics(stats_results)) + return stats; foreach (const Maemo::IcdStatisticsResult &res, stats_results) { - if (res.params.network_attrs & ICD_NW_ATTR_IAPNAME) { - /* network_id is the IAP UUID */ - if (QString(res.params.network_id.data()) == activeConfig.identifier()) { - counter_tx = res.bytes_sent; - counter_rx = res.bytes_received; - } - } else { - /* We probably will never get to this branch */ - QNetworkConfigurationPrivate *d = activeConfig.d.data(); - if (res.params.network_id == d->network_id) { - counter_tx = res.bytes_sent; - counter_rx = res.bytes_received; - } - } + if (res.params.network_attrs & ICD_NW_ATTR_IAPNAME) { + /* network_id is the IAP UUID */ + if (QString(res.params.network_id.data()) == activeConfig.identifier()) { + stats.txData = res.bytes_sent; + stats.rxData = res.bytes_received; + stats.activeTime = res.time_active; + } + } else { + /* We probably will never get to this branch */ + QNetworkConfigurationPrivate *d = activeConfig.d.data(); + if (res.params.network_id == d->network_id) { + stats.txData = res.bytes_sent; + stats.rxData = res.bytes_received; + stats.activeTime = res.time_active; + } + } } - if (sent) - return counter_tx; - else - return counter_rx; + return stats; } quint64 QNetworkSessionPrivate::bytesWritten() const { - return getStatistics(true); + return getStatistics().txData; } quint64 QNetworkSessionPrivate::bytesReceived() const { - return getStatistics(false); + return getStatistics().rxData; } quint64 QNetworkSessionPrivate::activeTime() const { - if (startTime.isNull()) { - return 0; - } - return startTime.secsTo(QDateTime::currentDateTime()); + return getStatistics().activeTime; } diff -r e2d33e235f7e -r 885c2596c964 qtmobility/src/bearer/qnetworksession_maemo_p.h --- a/qtmobility/src/bearer/qnetworksession_maemo_p.h Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/src/bearer/qnetworksession_maemo_p.h Thu Aug 19 10:43:30 2010 +0300 @@ -81,7 +81,7 @@ Q_OBJECT public: QNetworkSessionPrivate() : - tx_data(0), rx_data(0), m_activeTime(0), isOpen(false), + isOpen(false), connectFlags(ICD_CONNECTION_FLAG_USER_EVENT), currentState(QNetworkSession::Invalid), m_asynchCallActive(false) @@ -161,9 +161,11 @@ private: QNetworkConfigurationManager manager; - quint64 tx_data; - quint64 rx_data; - quint64 m_activeTime; + struct Statistics { + quint64 txData; + quint64 rxData; + quint64 activeTime; + }; // The config set on QNetworkSession. QNetworkConfiguration publicConfig; @@ -196,7 +198,7 @@ friend class IcdListener; void updateState(QNetworkSession::State); void updateIdentifier(const QString &newId); - quint64 getStatistics(bool sent) const; + Statistics getStatistics() const; void cleanupSession(void); void updateProxyInformation(); diff -r e2d33e235f7e -r 885c2596c964 qtmobility/src/bearer/qnetworksession_s60_p.cpp --- a/qtmobility/src/bearer/qnetworksession_s60_p.cpp Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/src/bearer/qnetworksession_s60_p.cpp Thu Aug 19 10:43:30 2010 +0300 @@ -55,8 +55,8 @@ : CActive(CActive::EPriorityUserInput), state(QNetworkSession::Invalid), isOpen(false), iDynamicUnSetdefaultif(0), ipConnectionNotifier(0), iHandleStateNotificationsFromManager(false), iFirstSync(true), iStoppedByUser(false), - iClosedByUser(false), iDeprecatedConnectionId(0), iError(QNetworkSession::UnknownSessionError), - iALREnabled(0), iConnectInBackground(false) + iClosedByUser(false), iError(QNetworkSession::UnknownSessionError), iALREnabled(0), + iConnectInBackground(false), isOpening(false) { CActiveScheduler::Add(this); @@ -72,9 +72,9 @@ #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG qDebug() << "QNS this : " << QString::number((uint)this) << " - "; if (iDynamicUnSetdefaultif) - qDebug() << "dynamic setdefaultif() resolution succeeded. "; + qDebug() << "dynamic unsetdefaultif() is present in PIPS library. "; else - qDebug() << "dynamic setdefaultif() resolution failed. "; + qDebug() << "dynamic unsetdefaultif() not present in PIPS library. "; #endif TRAP_IGNORE(iConnectionMonitor.ConnectL()); @@ -83,6 +83,7 @@ QNetworkSessionPrivate::~QNetworkSessionPrivate() { isOpen = false; + isOpening = false; // Cancel Connection Progress Notifications first. // Note: ConnectionNotifier must be destroyed before Canceling RConnection::Start() @@ -107,6 +108,9 @@ iConnectionMonitor.Close(); iOpenCLibrary.Close(); +#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG + qDebug() << "QNS this : " << QString::number((uint)this) << " - destroyed (and setdefaultif(0))"; +#endif } void QNetworkSessionPrivate::configurationStateChanged(TUint32 accessPointId, TUint32 connMonId, QNetworkSession::State newState) @@ -114,18 +118,12 @@ if (iHandleStateNotificationsFromManager) { #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG qDebug() << "QNS this : " << QString::number((uint)this) << " - " - << "configurationStateChanged from manager for IAP : " << QString::number(accessPointId) - << "configurationStateChanged connMon ID : " << QString::number(connMonId) - << " : to a state: " << newState - << " whereas my current state is: " << state; + << "configurationStateChanged from manager for IAP : " << QString::number(accessPointId) + << "connMon ID : " << QString::number(connMonId) << " : to a state: " << newState + << "whereas my current state is: " << state; +#else + Q_UNUSED(connMonId); #endif - if (connMonId == iDeprecatedConnectionId) { -#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG - qDebug() << "QNS this : " << QString::number((uint)this) << " - " - << "however status update from manager ignored because it related to already closed connection."; -#endif - return; - } this->newState(newState, accessPointId); } } @@ -144,13 +142,29 @@ } } +void QNetworkSessionPrivate::configurationAdded(const QNetworkConfiguration& config) +{ + Q_UNUSED(config); + // If session is based on service network, some other app may create new access points + // to the SNAP --> synchronize session's state with that of interface's. + if (!publicConfig.d.data() || publicConfig.type() != QNetworkConfiguration::ServiceNetwork) { + return; + } +#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG + qDebug() << "QNS this : " << QString::number((uint)this) << " - " + << "configurationAdded IAP: " << QString::number(config.d.data()->numericId); +#endif + syncStateWithInterface(); +} + +// Function sets the state of the session to match the state +// of the underlying interface (the configuration this session is based on) void QNetworkSessionPrivate::syncStateWithInterface() { - if (!publicConfig.d) { + if (!publicConfig.d || !publicConfig.d.data()) { return; } - - if (iFirstSync && publicConfig.d.data()) { + if (iFirstSync) { QObject::connect(((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager), SIGNAL(configurationStateChanged(TUint32, TUint32, QNetworkSession::State)), this, SLOT(configurationStateChanged(TUint32, TUint32, QNetworkSession::State))); // Listen to configuration removals, so that in case the configuration @@ -158,50 +172,35 @@ QObject::connect(((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager), SIGNAL(configurationRemoved(QNetworkConfiguration)), this, SLOT(configurationRemoved(QNetworkConfiguration))); + // Connect to configuration additions, so that in case a configuration is added + // in a SNAP this session is based on, the session knows to synch its state with its + // interface. + QObject::connect(((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager), + SIGNAL(configurationAdded(QNetworkConfiguration)), + this, SLOT(configurationAdded(QNetworkConfiguration))); } // Start listening IAP state changes from QNetworkConfigurationManagerPrivate iHandleStateNotificationsFromManager = true; - // Check open connections to see if there is already - // an open connection to selected IAP or SNAP - TUint count; - TRequestStatus status; - iConnectionMonitor.GetConnectionCount(count, status); - User::WaitForRequest(status); - if (status.Int() != KErrNone) { - return; - } - - TUint numSubConnections; - TUint connectionId; - for (TUint i = 1; i <= count; i++) { - TInt ret = iConnectionMonitor.GetConnectionInfo(i, connectionId, numSubConnections); - if (ret == KErrNone) { - TUint apId; - iConnectionMonitor.GetUintAttribute(connectionId, 0, KIAPId, apId, status); - User::WaitForRequest(status); - if (status.Int() == KErrNone) { - TInt connectionStatus; - iConnectionMonitor.GetIntAttribute(connectionId, 0, KConnectionStatus, connectionStatus, status); - User::WaitForRequest(status); - if (connectionStatus == KLinkLayerOpen) { - if (state != QNetworkSession::Closing) { - if (newState(QNetworkSession::Connected, apId)) { - return; - } - } - } - } - } - } - - if (state != QNetworkSession::Connected) { - if ((publicConfig.d.data()->state & QNetworkConfiguration::Discovered) == - QNetworkConfiguration::Discovered) { - newState(QNetworkSession::Disconnected); - } else { - newState(QNetworkSession::NotAvailable); - } + // Check what is the state of the configuration this session is based on + // and set the session in appropriate state. +#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG + qDebug() << "QNS this : " << QString::number((uint)this) << " - " + << "syncStateWithInterface() state of publicConfig is: " << publicConfig.d.data()->state; +#endif + switch (publicConfig.d.data()->state) { + case QNetworkConfiguration::Active: + newState(QNetworkSession::Connected); + break; + case QNetworkConfiguration::Discovered: + newState(QNetworkSession::Disconnected); + break; + case QNetworkConfiguration::Defined: + newState(QNetworkSession::NotAvailable); + break; + case QNetworkConfiguration::Undefined: + default: + newState(QNetworkSession::Invalid); } } @@ -245,6 +244,15 @@ QNetworkInterface QNetworkSessionPrivate::currentInterface() const { +#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG + qDebug() << "QNS this : " << QString::number((uint)this) << " - " + << "currentInterface() requested, state: " << state + << "publicConfig validity: " << publicConfig.isValid(); + if (activeInterface.isValid()) + qDebug() << "QNS this : " << QString::number((uint)this) << " - " + << "interface is: " << activeInterface.humanReadableName(); +#endif + if (!publicConfig.isValid() || state != QNetworkSession::Connected) { return QNetworkInterface(); } @@ -302,10 +310,11 @@ << "open() called, session state is: " << state << " and isOpen is: " << isOpen; #endif - if (isOpen || (state == QNetworkSession::Connecting)) { + if (isOpen || isOpening) return; - } + isOpening = true; + // Stop handling IAP state change signals from QNetworkConfigurationManagerPrivate // => RConnection::ProgressNotification will be used for IAP/SNAP monitoring iHandleStateNotificationsFromManager = false; @@ -333,7 +342,6 @@ // Clear possible previous states iStoppedByUser = false; iClosedByUser = false; - iDeprecatedConnectionId = 0; TInt error = iSocketServ.Connect(); if (error != KErrNone) { @@ -366,7 +374,7 @@ } if (publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) { -#ifdef OCC_FUNCTIONALITY_AVAILABLE +#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE) // With One Click Connectivity (Symbian^3 onwards) it is possible // to connect silently, without any popups. TConnPrefList pref; @@ -385,9 +393,13 @@ if (!IsActive()) { SetActive(); } - newState(QNetworkSession::Connecting); + // Avoid flip flop of states if the configuration is already + // active. IsOpen/opened() will indicate when ready. + if (state != QNetworkSession::Connected) { + newState(QNetworkSession::Connecting); + } } else if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) { -#ifdef OCC_FUNCTIONALITY_AVAILABLE +#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE) // On Symbian^3 if service network is not reachable, it triggers a UI (aka EasyWLAN) where // user can create new IAPs. To detect this, we need to store the number of IAPs // there was before connection was started. @@ -406,7 +418,11 @@ if (!IsActive()) { SetActive(); } - newState(QNetworkSession::Connecting); + // Avoid flip flop of states if the configuration is already + // active. IsOpen/opened() will indicate when ready. + if (state != QNetworkSession::Connected) { + newState(QNetworkSession::Connecting); + } } else if (publicConfig.type() == QNetworkConfiguration::UserChoice) { iKnownConfigsBeforeConnectionStart = ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->accessPointConfigurations.keys(); iConnection.Start(iStatus); @@ -418,6 +434,7 @@ if (error != KErrNone) { isOpen = false; + isOpening = false; iError = QNetworkSession::UnknownSessionError; emit q->error(iError); if (ipConnectionNotifier) { @@ -470,12 +487,8 @@ // when reporting. iClosedByUser = true; isOpen = false; + isOpening = false; -#ifndef OCC_FUNCTIONALITY_AVAILABLE - // On Symbian^3 we need to keep track of active configuration longer - // in case of empty-SNAP-triggered EasyWLAN. - activeConfig = QNetworkConfiguration(); -#endif serviceConfig = QNetworkConfiguration(); #ifdef SNAP_FUNCTIONALITY_AVAILABLE @@ -512,15 +525,9 @@ // to go down. if (publicConfig.type() == QNetworkConfiguration::UserChoice || state == QNetworkSession::Connecting) { #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG - qDebug() << "QNS this : " << QString::number((uint)this) << " - " - << "going Disconnected right away. Deprecating connection monitor ID: " << publicConfig.d.data()->connectionId; + qDebug() << "QNS this : " << QString::number((uint)this) << " - " + << "going disconnected right away, since either UserChoice or Connecting"; #endif - - // The connection has gone down, and processing of status updates must be - // stopped. Depending on platform, there may come 'connecting/connected' states - // considerably later (almost a second). Connection id is an increasing - // number, so this does not affect next _real_ 'conneting/connected' states. - iDeprecatedConnectionId = publicConfig.d.data()->connectionId; newState(QNetworkSession::Closing); newState(QNetworkSession::Disconnected); } @@ -581,6 +588,7 @@ #endif // Since we are open, use RConnection to stop the interface isOpen = false; + isOpening = false; iStoppedByUser = true; newState(QNetworkSession::Closing); if (ipConnectionNotifier) { @@ -590,6 +598,7 @@ } iConnection.Stop(RConnection::EStopAuthoritative); isOpen = true; + isOpening = false; close(false); emit q->closed(); } @@ -721,6 +730,7 @@ #endif if (isOpen) { isOpen = false; + isOpening = false; activeConfig = QNetworkConfiguration(); serviceConfig = QNetworkConfiguration(); iError = QNetworkSession::RoamingError; @@ -870,6 +880,13 @@ if (iapId == 0) { _LIT(KSetting, "IAP\\Id"); iConnection.GetIntSetting(KSetting, iapId); +#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE) + // Check if this is an Easy WLAN configuration. On Symbian^3 RConnection may report + // the used configuration as 'EasyWLAN' IAP ID if someone has just opened the configuration + // from WLAN Scan dialog, _and_ that connection is still up. We need to find the + // real matching configuration. Function alters the Easy WLAN ID to real IAP ID (only if easy WLAN): + ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->easyWlanTrueIapId(iapId); +#endif } #ifdef SNAP_FUNCTIONALITY_AVAILABLE @@ -900,7 +917,7 @@ } } } else { -#ifdef OCC_FUNCTIONALITY_AVAILABLE +#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE) // On Symbian^3 (only, not earlier or Symbian^4) if the SNAP was not reachable, it triggers // user choice type of activity (EasyWLAN). As a result, a new IAP may be created, and // hence if was not found yet. Therefore update configurations and see if there is something new. @@ -938,7 +955,7 @@ qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "configuration was not found, returning invalid."; #endif -#endif // OCC_FUNCTIONALITY_AVAILABLE +#endif // Given IAP Id was not found from known IAPs array return QNetworkConfiguration(); } @@ -1001,6 +1018,11 @@ TInt error = KErrNone; QNetworkConfiguration newActiveConfig = activeConfiguration(); if (!newActiveConfig.isValid()) { + // RConnection startup was successfull but no configuration + // was found. That indicates that user has chosen to create a + // new WLAN configuration (from scan results), but that new + // configuration does not have access to Internet (Internet + // Connectivity Test, ICT, failed). error = KErrGeneral; } else { // Use name of the IAP to open global 'Open C' RConnection @@ -1010,15 +1032,24 @@ strcpy(ifr.ifr_name, nameAsByteArray.constData()); error = setdefaultif(&ifr); } - if (error != KErrNone) { isOpen = false; + isOpening = false; iError = QNetworkSession::UnknownSessionError; QT_TRYCATCH_LEAVING(emit q->error(iError)); - Cancel(); if (ipConnectionNotifier) { ipConnectionNotifier->StopNotifications(); } + 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; } @@ -1030,6 +1061,7 @@ } #endif isOpen = true; + isOpening = false; activeConfig = newActiveConfig; activeInterface = interface(activeConfig.d.data()->numericId); if (publicConfig.type() == QNetworkConfiguration::UserChoice) { @@ -1048,6 +1080,7 @@ break; case KErrNotFound: // Connection failed isOpen = false; + isOpening = false; activeConfig = QNetworkConfiguration(); serviceConfig = QNetworkConfiguration(); iError = QNetworkSession::InvalidConfigurationError; @@ -1062,9 +1095,12 @@ case KErrAlreadyExists: // Connection already exists default: isOpen = false; + isOpening = false; activeConfig = QNetworkConfiguration(); serviceConfig = QNetworkConfiguration(); - if (publicConfig.state() == QNetworkConfiguration::Undefined || + if (statusCode == KErrCancel) { + iError = QNetworkSession::SessionAbortedError; + } else if (publicConfig.state() == QNetworkConfiguration::Undefined || publicConfig.state() == QNetworkConfiguration::Defined) { iError = QNetworkSession::InvalidConfigurationError; } else { @@ -1127,6 +1163,12 @@ return false; } + // Make sure that some lagging 'connecting' state-changes do not overwrite + // if we are already connected (may righfully still happen with roaming though). + if (state == QNetworkSession::Connected && newState == QNetworkSession::Connecting) { + return false; + } + bool emitSessionClosed = false; // If we abruptly go down and user hasn't closed the session, we've been aborted. @@ -1140,6 +1182,7 @@ // application or session stops connection or when network drops // unexpectedly). isOpen = false; + isOpening = false; activeConfig = QNetworkConfiguration(); serviceConfig = QNetworkConfiguration(); iError = QNetworkSession::SessionAbortedError; @@ -1216,7 +1259,7 @@ } } } -#ifdef OCC_FUNCTIONALITY_AVAILABLE +#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE) // If the retVal is not true here, it means that the status update may apply to an IAP outside of // SNAP (session is based on SNAP but follows IAP outside of it), which may occur on Symbian^3 EasyWlan. if (retVal == false && activeConfig.d.data() && activeConfig.d.data()->numericId == accessPointId) { @@ -1233,20 +1276,12 @@ #endif } } - if (emitSessionClosed) { emit q->closed(); } if (state == QNetworkSession::Disconnected) { - // The connection has gone down, and processing of status updates must be - // stopped. Depending on platform, there may come 'connecting/connected' states - // considerably later (almost a second). Connection id is an increasing - // number, so this does not affect next _real_ 'conneting/connected' states. - iDeprecatedConnectionId = publicConfig.d.data()->connectionId; -#ifdef OCC_FUNCTIONALITY_AVAILABLE // Just in case clear activeConfiguration. activeConfig = QNetworkConfiguration(); -#endif } return retVal; } diff -r e2d33e235f7e -r 885c2596c964 qtmobility/src/bearer/qnetworksession_s60_p.h --- a/qtmobility/src/bearer/qnetworksession_s60_p.h Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/src/bearer/qnetworksession_s60_p.h Thu Aug 19 10:43:30 2010 +0300 @@ -64,7 +64,7 @@ #ifdef SNAP_FUNCTIONALITY_AVAILABLE #include #endif -#ifdef OCC_FUNCTIONALITY_AVAILABLE +#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE) #include #endif @@ -132,6 +132,7 @@ private Q_SLOTS: void configurationStateChanged(TUint32 accessPointId, TUint32 connMonId, QNetworkSession::State newState); void configurationRemoved(const QNetworkConfiguration& config); + void configurationAdded(const QNetworkConfiguration& config); private: TUint iapClientCount(TUint aIAPId) const; @@ -175,7 +176,6 @@ bool iFirstSync; bool iStoppedByUser; bool iClosedByUser; - TUint32 iDeprecatedConnectionId; #ifdef SNAP_FUNCTIONALITY_AVAILABLE CActiveCommsMobilityApiExt* iMobility; @@ -191,6 +191,8 @@ TUint32 iOldRoamingIap; TUint32 iNewRoamingIap; + bool isOpening; + friend class QNetworkSession; friend class ConnectionProgressNotifier; }; diff -r e2d33e235f7e -r 885c2596c964 qtmobility/src/global/qmobilityglobal.h --- a/qtmobility/src/global/qmobilityglobal.h Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/src/global/qmobilityglobal.h Thu Aug 19 10:43:30 2010 +0300 @@ -42,13 +42,13 @@ #define QMOBILITYGLOBAL_H -#define QTM_VERSION_STR "1.0.1" +#define QTM_VERSION_STR "1.0.2" /* QTM_VERSION is (major << 16) + (minor << 8) + patch. */ -#define QTM_VERSION 0x010001 +#define QTM_VERSION 0x010002 /* - can be used like #if (QTM_VERSION >= QTM_VERSION_CHECK(1, 0, 1)) + can be used like #if (QTM_VERSION >= QTM_VERSION_CHECK(1, 0, 2)) */ #define QTM_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) @@ -64,108 +64,120 @@ #endif #include -#if defined(SYMBIAN_DATABASEMANAGER_SERVER) -# define Q_SERVICEFW_EXPORT -#else -# if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) -# if defined(QT_NODLL) -# undef QT_MAKEDLL +#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +# if defined(QT_NODLL) +# undef QT_MAKEDLL +# undef QT_DLL +# elif defined(QT_MAKEDLL) +# if defined(QT_DLL) # undef QT_DLL -# elif defined(QT_MAKEDLL) -# if defined(QT_DLL) -# undef QT_DLL -# endif -# if defined(QT_BUILD_BEARER_LIB) -# define Q_BEARER_EXPORT Q_DECL_EXPORT -# else -# define Q_BEARER_EXPORT Q_DECL_IMPORT -# endif -# if defined(QT_BUILD_CFW_LIB) -# define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_EXPORT -# else -# define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_IMPORT -# endif -# if defined(QT_BUILD_CONTACTS_LIB) -# define Q_CONTACTS_EXPORT Q_DECL_EXPORT -# else -# define Q_CONTACTS_EXPORT Q_DECL_IMPORT -# endif -# if defined(QT_BUILD_VERSIT_LIB) -# define Q_VERSIT_EXPORT Q_DECL_EXPORT -# else -# define Q_VERSIT_EXPORT Q_DECL_IMPORT -# endif -# if defined(QT_BUILD_LOCATION_LIB) -# define Q_LOCATION_EXPORT Q_DECL_EXPORT -# else -# define Q_LOCATION_EXPORT Q_DECL_IMPORT -# endif -# if defined(QT_BUILD_MESSAGING_LIB) -# define Q_MESSAGING_EXPORT Q_DECL_EXPORT -# else -# define Q_MESSAGING_EXPORT Q_DECL_IMPORT -# endif +# endif +# if defined(QT_BUILD_BEARER_LIB) +# define Q_BEARER_EXPORT Q_DECL_EXPORT +# else +# define Q_BEARER_EXPORT Q_DECL_IMPORT +# endif +# if defined(QT_BUILD_CFW_LIB) +# define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_EXPORT +# else +# define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_IMPORT +# endif +# if defined(QT_BUILD_CONTACTS_LIB) +# define Q_CONTACTS_EXPORT Q_DECL_EXPORT +# else +# define Q_CONTACTS_EXPORT Q_DECL_IMPORT +# endif +# if defined(QT_BUILD_VERSIT_LIB) +# define Q_VERSIT_EXPORT Q_DECL_EXPORT +# else +# define Q_VERSIT_EXPORT Q_DECL_IMPORT +# endif +# if defined(QT_BUILD_LOCATION_LIB) +# define Q_LOCATION_EXPORT Q_DECL_EXPORT +# else +# define Q_LOCATION_EXPORT Q_DECL_IMPORT +# endif +# if defined(QT_BUILD_MESSAGING_LIB) +# define Q_MESSAGING_EXPORT Q_DECL_EXPORT +# else +# define Q_MESSAGING_EXPORT Q_DECL_IMPORT +# endif # if defined(QT_BUILD_MULTIMEDIA_LIB) # define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT -# else +# else # define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT -# endif -# if defined(QT_BUILD_SFW_LIB) -# define Q_SERVICEFW_EXPORT Q_DECL_EXPORT -# else -# define Q_SERVICEFW_EXPORT Q_DECL_IMPORT -# endif -# if defined(QT_BUILD_SYSINFO_LIB) -# define Q_SYSINFO_EXPORT Q_DECL_EXPORT -# else -# define Q_SYSINFO_EXPORT Q_DECL_IMPORT -# endif -# if defined(QT_BUILD_SENSORS_LIB) -# define Q_SENSORS_EXPORT Q_DECL_EXPORT -# else -# define Q_SENSORS_EXPORT Q_DECL_IMPORT -# endif -# elif defined(QT_DLL) /* use a Qt DLL library */ -# define Q_BEARER_EXPORT Q_DECL_IMPORT -# define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_IMPORT -# define Q_CONTACTS_EXPORT Q_DECL_IMPORT -# define Q_VERSIT_EXPORT Q_DECL_IMPORT -# define Q_LOCATION_EXPORT Q_DECL_IMPORT -# define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT -# define Q_MESSAGING_EXPORT Q_DECL_IMPORT +# endif +# if defined(QT_BUILD_SFW_LIB) +# define Q_SERVICEFW_EXPORT Q_DECL_EXPORT +# else # define Q_SERVICEFW_EXPORT Q_DECL_IMPORT +# endif +# if defined(QT_BUILD_SYSINFO_LIB) +# define Q_SYSINFO_EXPORT Q_DECL_EXPORT +# else # define Q_SYSINFO_EXPORT Q_DECL_IMPORT +# endif +# if defined(QT_BUILD_SENSORS_LIB) +# define Q_SENSORS_EXPORT Q_DECL_EXPORT +# else # define Q_SENSORS_EXPORT Q_DECL_IMPORT # endif -# else +# elif defined(QT_DLL) /* use a Qt DLL library */ +# define Q_BEARER_EXPORT Q_DECL_IMPORT +# define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_IMPORT +# define Q_CONTACTS_EXPORT Q_DECL_IMPORT +# define Q_VERSIT_EXPORT Q_DECL_IMPORT +# define Q_LOCATION_EXPORT Q_DECL_IMPORT +# define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT +# define Q_MESSAGING_EXPORT Q_DECL_IMPORT +# if QTM_SERVICEFW_SYMBIAN_DATABASEMANAGER_SERVER +# define Q_SERVICEFW_EXPORT +# else +# define Q_SERVICEFW_EXPORT Q_DECL_IMPORT +# endif +# define Q_SYSINFO_EXPORT Q_DECL_IMPORT +# define Q_SENSORS_EXPORT Q_DECL_IMPORT # endif -# if !defined(Q_SERVICEFW_EXPORT) -# if defined(QT_SHARED) -# define Q_BEARER_EXPORT Q_DECL_EXPORT -# define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_EXPORT -# define Q_CONTACTS_EXPORT Q_DECL_EXPORT -# define Q_VERSIT_EXPORT Q_DECL_EXPORT -# define Q_LOCATION_EXPORT Q_DECL_EXPORT -# define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT -# define Q_MESSAGING_EXPORT Q_DECL_EXPORT -# define Q_SERVICEFW_EXPORT Q_DECL_EXPORT -# define Q_SYSINFO_EXPORT Q_DECL_EXPORT -# define Q_SENSORS_EXPORT Q_DECL_EXPORT -# else -# define Q_BEARER_EXPORT -# define Q_PUBLISHSUBSCRIBE_EXPORT -# define Q_CONTACTS_EXPORT -# define Q_VERSIT_EXPORT -# define Q_LOCATION_EXPORT -# define Q_MULTIMEDIA_EXPORT -# define Q_MESSAGING_EXPORT -# define Q_SERVICEFW_EXPORT -# define Q_SYSINFO_EXPORT -# define Q_SENSORS_EXPORT -# endif +#endif + +#if !defined(Q_SERVICEFW_EXPORT) +# if defined(QT_SHARED) +# define Q_BEARER_EXPORT Q_DECL_EXPORT +# define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_EXPORT +# define Q_CONTACTS_EXPORT Q_DECL_EXPORT +# define Q_VERSIT_EXPORT Q_DECL_EXPORT +# define Q_LOCATION_EXPORT Q_DECL_EXPORT +# define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT +# define Q_MESSAGING_EXPORT Q_DECL_EXPORT +# define Q_SERVICEFW_EXPORT Q_DECL_EXPORT +# define Q_SYSINFO_EXPORT Q_DECL_EXPORT +# define Q_SENSORS_EXPORT Q_DECL_EXPORT +# else +# define Q_BEARER_EXPORT +# define Q_PUBLISHSUBSCRIBE_EXPORT +# define Q_CONTACTS_EXPORT +# define Q_VERSIT_EXPORT +# define Q_LOCATION_EXPORT +# define Q_MULTIMEDIA_EXPORT +# define Q_MESSAGING_EXPORT +# define Q_SERVICEFW_EXPORT +# define Q_SYSINFO_EXPORT +# define Q_SENSORS_EXPORT # endif #endif + +#ifdef QTM_SERVICEFW_SYMBIAN_DATABASEMANAGER_SERVER +# ifdef Q_SERVICEFW_EXPORT +# undef Q_SERVICEFW_EXPORT +# endif +# define Q_SERVICEFW_EXPORT +# ifdef Q_AUTOTEST_EXPORT +# undef Q_AUTOTEST_EXPORT +# endif +# define Q_AUTOTEST_EXPORT +#endif + // The namespace is hardcoded as moc has issues resolving // macros which would be a prerequisite for a dynmamic namespace #define QTM_NAMESPACE QtMobility diff -r e2d33e235f7e -r 885c2596c964 qtmobility/src/s60installs/s60installs.pro --- a/qtmobility/src/s60installs/s60installs.pro Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/src/s60installs/s60installs.pro Thu Aug 19 10:43:30 2010 +0300 @@ -9,7 +9,7 @@ TARGET = "QtMobility" TARGET.UID3 = 0x2002AC89 - VERSION = 1.0.1 + VERSION = 1.0.2 vendorinfo = \ "; Localised Vendor name" \ diff -r e2d33e235f7e -r 885c2596c964 qtmobility/staticconfig.pri --- a/qtmobility/staticconfig.pri Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/staticconfig.pri Thu Aug 19 10:43:30 2010 +0300 @@ -4,7 +4,8 @@ # Symbian MCL builds do not run configure and hence don't have # .qmake.cache which set QT_MOBILITY_SOURCE_TREE and # QT_MOBILITY_BUILD_TREE. Therefore we need to define a fallback. -# This has the disadvantage that shadow builds are not supported. +# This has the disadvantage that shadow builds are not supported for symbian +# but they are on other platforms. isEmpty(QT_MOBILITY_SOURCE_TREE):QT_MOBILITY_SOURCE_TREE = $$PWD diff -r e2d33e235f7e -r 885c2596c964 qtmobility/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp --- a/qtmobility/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp Thu Aug 19 10:43:30 2010 +0300 @@ -87,7 +87,7 @@ void sessionStop(); void roamingErrorCodes(); - + void sessionProperties_data(); void sessionProperties(); @@ -672,7 +672,7 @@ QVERIFY(openSession(&innocentSession)); qDebug("Waiting for %d ms after open to make sure all platform indications are propagated", configWaitdelayInMs); QTest::qWait(configWaitdelayInMs); - qDebug("----------4.2 Calling closedSession.stop()"); + qDebug("----------4.2 Calling closedSession.stop()"); closedSession.stop(); qDebug("Waiting for %d ms to get all configurationChange signals from platform..", configWaitdelayInMs); QTest::qWait(configWaitdelayInMs); // Wait to get all relevant configurationChange() signals @@ -878,7 +878,7 @@ // The remaining tests require the session to be not NotAvailable. if (session.state() == QNetworkSession::NotAvailable) QSKIP("Network is not available.", SkipSingle); - + QSignalSpy sessionOpenedSpy(&session, SIGNAL(opened())); QSignalSpy sessionClosedSpy(&session, SIGNAL(closed())); QSignalSpy stateChangedSpy(&session, SIGNAL(stateChanged(QNetworkSession::State))); @@ -906,9 +906,14 @@ session.waitForOpened(); #endif + // Wait until the configuration is uptodate as well, it may be signaled 'connected' + // bit later than the session + QTRY_VERIFY(configuration.state() == QNetworkConfiguration::Active); + if (session.isOpen()) QVERIFY(!sessionOpenedSpy.isEmpty() || !errorSpy.isEmpty()); if (!errorSpy.isEmpty()) { + QNetworkSession::SessionError error = qvariant_cast(errorSpy.first().at(0)); @@ -1072,21 +1077,28 @@ if (configuration.type() == QNetworkConfiguration::ServiceNetwork) { bool roamedSuccessfully = false; - QCOMPARE(stateChangedSpy2.count(), 4); + QNetworkSession::State state; + if (stateChangedSpy2.count() == 4) { + state = qvariant_cast(stateChangedSpy2.at(0).at(0)); + QVERIFY(state == QNetworkSession::Connecting); - QNetworkSession::State state = - qvariant_cast(stateChangedSpy2.at(0).at(0)); - QVERIFY(state == QNetworkSession::Connecting); + state = qvariant_cast(stateChangedSpy2.at(1).at(0)); + QVERIFY(state == QNetworkSession::Connected); + + state = qvariant_cast(stateChangedSpy2.at(2).at(0)); + QVERIFY(state == QNetworkSession::Closing); - state = qvariant_cast(stateChangedSpy2.at(1).at(0)); - QVERIFY(state == QNetworkSession::Connected); + state = qvariant_cast(stateChangedSpy2.at(3).at(0)); + QVERIFY(state == QNetworkSession::Disconnected); + } else if (stateChangedSpy2.count() == 2) { + state = qvariant_cast(stateChangedSpy2.at(0).at(0)); + QVERIFY(state == QNetworkSession::Closing); - state = qvariant_cast(stateChangedSpy2.at(2).at(0)); - QVERIFY(state == QNetworkSession::Closing); - - state = qvariant_cast(stateChangedSpy2.at(3).at(0)); - QVERIFY(state == QNetworkSession::Disconnected); - + state = qvariant_cast(stateChangedSpy2.at(1).at(0)); + QVERIFY(state == QNetworkSession::Disconnected); + } else { + QFAIL("Unexpected amount of state changes when roaming."); + } QTRY_VERIFY(session.state() == QNetworkSession::Roaming || session.state() == QNetworkSession::Connected || @@ -1108,8 +1120,9 @@ roamedSuccessfully = true; } else if (state == QNetworkSession::Closing) { QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected); - QTRY_VERIFY(session.state() == QNetworkSession::Connected); - roamedSuccessfully = true; + QTRY_VERIFY(session.state() == QNetworkSession::Connected || + session.state() == QNetworkSession::Disconnected); + roamedSuccessfully = false; } else if (state == QNetworkSession::Disconnected) { QTRY_VERIFY(!errorSpy.isEmpty()); QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected); @@ -1121,16 +1134,18 @@ QVERIFY(state == QNetworkSession::Roaming); } roamedSuccessfully = true; - } + } if (roamedSuccessfully) { + // Verify that you can open session based on the disconnected configuration QString configId = session.sessionProperty("ActiveConfiguration").toString(); - QNetworkConfiguration config = manager.configurationFromIdentifier(configId); + QNetworkConfiguration config = manager.configurationFromIdentifier(configId); QNetworkSession session3(config); QSignalSpy errorSpy3(&session3, SIGNAL(error(QNetworkSession::SessionError))); QSignalSpy sessionOpenedSpy3(&session3, SIGNAL(opened())); session3.open(); - session3.waitForOpened(); + session3.waitForOpened(); + QTest::qWait(1000); // Wait awhile to get all signals from platform if (session.isOpen()) QVERIFY(!sessionOpenedSpy3.isEmpty() || !errorSpy3.isEmpty()); session.stop(); diff -r e2d33e235f7e -r 885c2596c964 qtmobility/tests/bearerex/bearerex.cpp --- a/qtmobility/tests/bearerex/bearerex.cpp Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/tests/bearerex/bearerex.cpp Thu Aug 19 10:43:30 2010 +0300 @@ -432,6 +432,7 @@ iapLineEdit->setText(config.name()+" ("+config.identifier()+")"); } } + newState(m_NetworkSession->state()); // Update the "(open)" if (m_NetworkSession->configuration().type() == QNetworkConfiguration::UserChoice) { QVariant identifier = m_NetworkSession->sessionProperty("UserChoiceConfiguration"); @@ -522,7 +523,7 @@ QString active; if (m_NetworkSession->isOpen()) { - active = " (O)"; + active = " (open)"; } stateLineEdit->setText(stateString(state)+active); } diff -r e2d33e235f7e -r 885c2596c964 qtmobility/tests/bearerex/bearerex.pro --- a/qtmobility/tests/bearerex/bearerex.pro Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/tests/bearerex/bearerex.pro Thu Aug 19 10:43:30 2010 +0300 @@ -34,4 +34,4 @@ CONFIG += mobility MOBILITY = bearer -symbian:TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData +symbian:TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData WriteDeviceData ReadDeviceData diff -r e2d33e235f7e -r 885c2596c964 qtmobility/tests/tests.pro --- a/qtmobility/tests/tests.pro Thu Jul 15 19:34:35 2010 +0300 +++ b/qtmobility/tests/tests.pro Thu Aug 19 10:43:30 2010 +0300 @@ -8,5 +8,5 @@ } symbian { - SUBDIRS += s60installs/s60installs.pro + SUBDIRS += s60installs }