Revision: 201033 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 16:02:37 +0300
branchRCL_3
changeset 9 5d007b20cfd0
parent 8 885c2596c964
child 10 cd2778e5acfe
Revision: 201033 Kit: 201035
VERSION.SHA1
group/bld.inf
group/qtextensions_pre_targetdep.flm
group/qtextensionsconfig.xml
group/qtmobilityheaders.flm
layers.sysdef.xml
qhbstyle/qhbemptystyle.cpp
qhbstyle/qhbemptystyle.h
qhbstyle/qhbstyle.cpp
qhbstyle/qhbstyle.h
qhbstyle/qhbstyle.pri
qhbstyle/qhbstyle.pro
qhbstyle/qhbstyle_p.h
qhbstyle/qhbstyleanimation.cpp
qhbstyle/qhbstyleanimation.h
qhbstyle/qhbstyleplugin.cpp
qhbstyle/qhbstyleplugin.h
qhbstyle/rom/qhbstyle.iby
qtecomplugins/bwins/xqpluginsu.def
qtecomplugins/eabi/xqpluginsu.def
qtecomplugins/examples/examples.pro
qtecomplugins/examples/testapp/src/main.cpp
qtecomplugins/examples/testapp/testapp.pro
qtecomplugins/examples/testplugin/inc/testplugin.h
qtecomplugins/examples/testplugin/inc/testplugininterface.h
qtecomplugins/examples/testplugin/src/testplugin.cpp
qtecomplugins/examples/testplugin/testplugin.pro
qtecomplugins/install.py
qtecomplugins/mkspecs/features/ecomplugin.prf
qtecomplugins/qtecomplugins.pro
qtecomplugins/rom/qtecomplugins.iby
qtecomplugins/supplements/xqecom/xqecom.py
qtecomplugins/xqplugins/inc/xqpluginhandle.h
qtecomplugins/xqplugins/inc/xqplugininfoprivate.h
qtecomplugins/xqplugins/inc/xqpluginloaderprivate.h
qtecomplugins/xqplugins/include/xqplugin.h
qtecomplugins/xqplugins/include/xqpluginfactory.h
qtecomplugins/xqplugins/include/xqplugininfo.h
qtecomplugins/xqplugins/include/xqpluginloader.h
qtecomplugins/xqplugins/include/xqtecom.hrh
qtecomplugins/xqplugins/src/xqpluginfactory.cpp
qtecomplugins/xqplugins/src/xqpluginhandle.cpp
qtecomplugins/xqplugins/src/xqplugininfo.cpp
qtecomplugins/xqplugins/src/xqplugininfoprivate.cpp
qtecomplugins/xqplugins/src/xqpluginloader.cpp
qtecomplugins/xqplugins/src/xqpluginloaderprivate.cpp
qtecomplugins/xqplugins/tests/auto/xqpluginloader/README
qtecomplugins/xqplugins/tests/auto/xqpluginloader/almostplugin/almostplugin.cpp
qtecomplugins/xqplugins/tests/auto/xqpluginloader/almostplugin/almostplugin.h
qtecomplugins/xqplugins/tests/auto/xqpluginloader/almostplugin/xalmostplugin.pro
qtecomplugins/xqplugins/tests/auto/xqpluginloader/bin/xmylib.prl
qtecomplugins/xqplugins/tests/auto/xqpluginloader/lib/lib.pro
qtecomplugins/xqplugins/tests/auto/xqpluginloader/lib/mylib.c
qtecomplugins/xqplugins/tests/auto/xqpluginloader/qttest_p4.prf
qtecomplugins/xqplugins/tests/auto/xqpluginloader/sis/tst.bat
qtecomplugins/xqplugins/tests/auto/xqpluginloader/sis/tst_xqpluginloader.pkg
qtecomplugins/xqplugins/tests/auto/xqpluginloader/theplugin/plugininterface.h
qtecomplugins/xqplugins/tests/auto/xqpluginloader/theplugin/theplugin.cpp
qtecomplugins/xqplugins/tests/auto/xqpluginloader/theplugin/theplugin.h
qtecomplugins/xqplugins/tests/auto/xqpluginloader/theplugin/theplugin.pro
qtecomplugins/xqplugins/tests/auto/xqpluginloader/tst/qmakepluginstubs/theplugin.qtplugin
qtecomplugins/xqplugins/tests/auto/xqpluginloader/tst/qmakepluginstubs/xtheplugin.qtplugin
qtecomplugins/xqplugins/tests/auto/xqpluginloader/tst/tst.pro
qtecomplugins/xqplugins/tests/auto/xqpluginloader/tst_xqpluginloader.cpp
qtecomplugins/xqplugins/tests/auto/xqpluginloader/xqpluginloader.pro
qtecomplugins/xqplugins/xqplugins.pro
qtextensions.pro
qthighway/bin/README.txt
qthighway/bin/service.prf
qthighway/bin/service2.prf
qthighway/bin/serviceold.prf
qthighway/bin/setserviceold.cmd
qthighway/bin/setserviceprf.cmd
qthighway/bin/setserviceprf2.cmd
qthighway/bin/xqsreg.exe
qthighway/bwins/xqserviceu.def
qthighway/bwins/xqserviceutilu.def
qthighway/eabi/xqserviceu.def
qthighway/eabi/xqserviceutilu.def
qthighway/examples/appmgrclient/DrmTestFiles.zip
qthighway/examples/appmgrclient/TestFiles.zip
qthighway/examples/appmgrclient/appmgrclient.pro
qthighway/examples/appmgrclient/src/appmgrclient.cpp
qthighway/examples/appmgrclient/src/appmgrclient.h
qthighway/examples/appmgrclient/src/appmgrclient.pri
qthighway/examples/appmgrclient/src/appmgrservices.h
qthighway/examples/appmgrclient/src/main.cpp
qthighway/examples/appmgrclient2/appmgrclient2.pro
qthighway/examples/appmgrclient2/src/appmgrclient2.pri
qthighway/examples/examples.pro
qthighway/examples/hbserviceclient/hbserviceclient.pro
qthighway/examples/hbserviceclient/src/hbserviceclient.pri
qthighway/examples/hbserviceclient/src/hbserviceclientmainwindow.cpp
qthighway/examples/hbserviceclient/src/hbserviceclientmainwindow.h
qthighway/examples/hbserviceclient/src/hbserviceclientview.cpp
qthighway/examples/hbserviceclient/src/hbserviceclientview.h
qthighway/examples/hbserviceclient/src/main.cpp
qthighway/examples/hbserviceprovider/hbserviceprovider.pro
qthighway/examples/hbserviceprovider/hbserviceprovider.ts
qthighway/examples/hbserviceprovider/maketestqm.cmd
qthighway/examples/hbserviceprovider/service_conf.xml
qthighway/examples/hbserviceprovider/service_conf_old_format.xml
qthighway/examples/hbserviceprovider/src/hbcontact.h
qthighway/examples/hbserviceprovider/src/hbserviceprovider.pri
qthighway/examples/hbserviceprovider/src/hbserviceprovidermainwindow.cpp
qthighway/examples/hbserviceprovider/src/hbserviceprovidermainwindow.h
qthighway/examples/hbserviceprovider/src/hbserviceproviderview.cpp
qthighway/examples/hbserviceprovider/src/hbserviceproviderview.h
qthighway/examples/hbserviceprovider/src/main.cpp
qthighway/examples/mimetestapp/mimetestapp.pro
qthighway/examples/mimetestapp/src/main.cpp
qthighway/examples/mimetestapp/src/mimetestapp.cpp
qthighway/examples/mimetestapp/src/mimetestapp.h
qthighway/examples/mimetestapp/src/mimetestapp.pri
qthighway/examples/mimetestapp2/mimetestapp2.pro
qthighway/examples/mimetestapp2/service_conf.xml
qthighway/examples/mimetestapp2/src/main.cpp
qthighway/examples/mimetestapp2/src/mimetestapp.cpp
qthighway/examples/mimetestapp2/src/mimetestapp.h
qthighway/examples/mimetestapp2/src/mimetestapp.pri
qthighway/examples/rom/xqserviceexamples.iby
qthighway/examples/serviceapp/service_conf.xml
qthighway/examples/serviceapp/service_conf_long.xml
qthighway/examples/serviceapp/service_conf_new.xml
qthighway/examples/serviceapp/service_conf_old_format.xml
qthighway/examples/serviceapp/serviceapp.pro
qthighway/examples/serviceapp/src/main.cpp
qthighway/examples/serviceapp/src/serviceapp.cpp
qthighway/examples/serviceapp/src/serviceapp.h
qthighway/examples/serviceapp/src/serviceapp.pri
qthighway/examples/serviceapp/src/testservicedata.h
qthighway/examples/serviceclient/serviceclient.pro
qthighway/examples/serviceclient/src/main.cpp
qthighway/examples/serviceclient/src/serviceclient.cpp
qthighway/examples/serviceclient/src/serviceclient.h
qthighway/examples/serviceclient/src/serviceclient.pri
qthighway/inc/README.txt
qthighway/inc/old/qserviceglobal.h
qthighway/inc/xqserviceclientinfo.h
qthighway/inc/xqserviceerrdefs.h
qthighway/inc/xqserviceglobal.h
qthighway/inc/xqserviceipcconst.h
qthighway/inc/xqservicelog.h
qthighway/qthighway.pro
qthighway/rom/xqservice.iby
qthighway/runcodescanner.cmd
qthighway/runtests.cmd
qthighway/runtestseshell.cmd
qthighway/tsrc/at_xqapplicationmanager/at_xqapplicationmanager.cpp
qthighway/tsrc/at_xqapplicationmanager/at_xqapplicationmanager.h
qthighway/tsrc/at_xqapplicationmanager/at_xqapplicationmanager.pro
qthighway/tsrc/at_xqapplicationmanager/buildtest.bat
qthighway/tsrc/at_xqapplicationmanager/drmfiles/111-test1.odf
qthighway/tsrc/at_xqapplicationmanager/drmfiles/RoAcqoffer-111-aac-i15m.ort
qthighway/tsrc/at_xqapplicationmanager/drmfiles/SD_Celebration_SP.dcf
qthighway/tsrc/at_xqapplicationmanager/drmfiles/SD_jpg_sun.dcf
qthighway/tsrc/at_xqapplicationmanager/drmfiles/STC1_128_44_16_2_CBR.wma
qthighway/tsrc/at_xqapplicationmanager/drmfiles/one.jpg
qthighway/tsrc/at_xqapplicationmanager/drmfiles/test.txt
qthighway/tsrc/at_xqapplicationmanager/sis/at_xqapplicationmanager.pkg
qthighway/tsrc/inc/testdata.h
qthighway/tsrc/rom/tsrc.iby
qthighway/tsrc/test_services/service_1/main.cpp
qthighway/tsrc/test_services/service_1/service_1.pro
qthighway/tsrc/test_services/service_1/service_conf.xml
qthighway/tsrc/test_services/service_2/main.cpp
qthighway/tsrc/test_services/service_2/service_2.pro
qthighway/tsrc/test_services/service_2/service_conf.xml
qthighway/tsrc/test_services/src/asynctimer.h
qthighway/tsrc/test_services/src/interface.cpp
qthighway/tsrc/test_services/src/interface.h
qthighway/tsrc/test_services/src/serviceview.cpp
qthighway/tsrc/test_services/src/serviceview.h
qthighway/tsrc/test_services/src/test_services.pri
qthighway/tsrc/test_services/test_services.pro
qthighway/tsrc/tests.pro
qthighway/xqservice/src/api_headers.pri
qthighway/xqservice/src/xqaiwdecl.h
qthighway/xqservice/src/xqaiwdeclplat.h
qthighway/xqservice/src/xqaiwfiledriver.cpp
qthighway/xqservice/src/xqaiwfiledriver.h
qthighway/xqservice/src/xqaiwglobal.h
qthighway/xqservice/src/xqaiwrequest.cpp
qthighway/xqservice/src/xqaiwrequest.h
qthighway/xqservice/src/xqaiwrequestdriver.h
qthighway/xqservice/src/xqaiwservicedriver.cpp
qthighway/xqservice/src/xqaiwservicedriver.h
qthighway/xqservice/src/xqaiwuridriver.cpp
qthighway/xqservice/src/xqaiwuridriver.h
qthighway/xqservice/src/xqaiwutils.cpp
qthighway/xqservice/src/xqaiwutils.h
qthighway/xqservice/src/xqapplicationmanager.h
qthighway/xqservice/src/xqappmgr.cpp
qthighway/xqservice/src/xqappmgr.h
qthighway/xqservice/src/xqappmgr_p.cpp
qthighway/xqservice/src/xqappmgr_p.h
qthighway/xqservice/src/xqservice.pri
qthighway/xqservice/src/xqserviceadaptor.cpp
qthighway/xqservice/src/xqserviceadaptor.h
qthighway/xqservice/src/xqservicechannel.cpp
qthighway/xqservice/src/xqservicechannel.h
qthighway/xqservice/src/xqserviceipcclient.cpp
qthighway/xqservice/src/xqserviceipcclient.h
qthighway/xqservice/src/xqserviceipcmarshal.cpp
qthighway/xqservice/src/xqserviceipcmarshal.h
qthighway/xqservice/src/xqserviceprovider.cpp
qthighway/xqservice/src/xqserviceprovider.h
qthighway/xqservice/src/xqservicerequest.cpp
qthighway/xqservice/src/xqservicerequest.h
qthighway/xqservice/src/xqservicethreaddata.cpp
qthighway/xqservice/src/xqservicethreaddata.h
qthighway/xqservice/xqservice.pro
qthighway/xqservicebase.pri
qthighway/xqserviceipc/README.txt
qthighway/xqserviceipc/bwins/xqserviceipcclientu.def
qthighway/xqserviceipc/bwins/xqserviceipcserveru.def
qthighway/xqserviceipc/eabi/xqserviceipcclientu.def
qthighway/xqserviceipc/eabi/xqserviceipcserveru.def
qthighway/xqserviceipc/xqserviceipc.pro
qthighway/xqserviceipc/xqserviceipc/api_headers.pri
qthighway/xqserviceipc/xqserviceipc/xqserviceipc.cpp
qthighway/xqserviceipc/xqserviceipc/xqserviceipc.h
qthighway/xqserviceipc/xqserviceipc/xqserviceipc.pro
qthighway/xqserviceipc/xqserviceipc/xqserviceipc_apasymbian.cpp
qthighway/xqserviceipc/xqserviceipc/xqserviceipc_apasymbian.h
qthighway/xqserviceipc/xqserviceipc/xqserviceipc_apasymbiansession.cpp
qthighway/xqserviceipc/xqserviceipc/xqserviceipc_apasymbiansession.h
qthighway/xqserviceipc/xqserviceipc/xqserviceipc_p.h
qthighway/xqserviceipc/xqserviceipc/xqserviceipc_symbian.cpp
qthighway/xqserviceipc/xqserviceipc/xqserviceipc_symbian.h
qthighway/xqserviceipc/xqserviceipc/xqserviceipc_symbiansession.cpp
qthighway/xqserviceipc/xqserviceipc/xqserviceipc_symbiansession.h
qthighway/xqserviceipc/xqserviceipc/xqserviceipcdefs.h
qthighway/xqserviceipc/xqserviceipc/xqserviceipcfactory.cpp
qthighway/xqserviceipc/xqserviceipc/xqserviceipcfactory.h
qthighway/xqserviceipc/xqserviceipcserver/api_headers.pri
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcobserver.h
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcrequest.cpp
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcrequest.h
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver.cpp
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver.h
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver.pro
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_apasymbianserver.cpp
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_apasymbianserver.h
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_apasymbiansession.cpp
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_apasymbiansession.h
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_p.h
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_symbianserver.cpp
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_symbianserver.h
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_symbiansession.cpp
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_symbiansession.h
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserverfactory.cpp
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserverfactory.h
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserverprivate.h
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserversession.cpp
qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserversession.h
qthighway/xqserviceutil/src/api_headers.pri
qthighway/xqserviceutil/src/xqrequestinfo.cpp
qthighway/xqserviceutil/src/xqrequestinfo.h
qthighway/xqserviceutil/src/xqrequestutil.cpp
qthighway/xqserviceutil/src/xqrequestutil.h
qthighway/xqserviceutil/src/xqservicemanager.cpp
qthighway/xqserviceutil/src/xqservicemanager.h
qthighway/xqserviceutil/src/xqservicemetadata/old/sfwinterface.cpp
qthighway/xqserviceutil/src/xqservicemetadata/old/sfwinterface_p.h
qthighway/xqserviceutil/src/xqservicemetadata/old/xqservicemetadata.cpp
qthighway/xqserviceutil/src/xqservicemetadata/old/xqservicemetadata.pri
qthighway/xqserviceutil/src/xqservicemetadata/old/xqservicemetadata_p.h
qthighway/xqserviceutil/src/xqservicemetadata/xqaiwinterfacedescriptor.cpp
qthighway/xqserviceutil/src/xqservicemetadata/xqaiwinterfacedescriptor.h
qthighway/xqserviceutil/src/xqservicemetadata/xqaiwinterfacedescriptor_p.h
qthighway/xqserviceutil/src/xqservicemetadata/xqservicemetadata.cpp
qthighway/xqserviceutil/src/xqservicemetadata/xqservicemetadata.pri
qthighway/xqserviceutil/src/xqservicemetadata/xqservicemetadata_p.h
qthighway/xqserviceutil/src/xqserviceutil.cpp
qthighway/xqserviceutil/src/xqserviceutil.h
qthighway/xqserviceutil/src/xqserviceutil.pri
qthighway/xqserviceutil/src/xqsharablefile.cpp
qthighway/xqserviceutil/src/xqsharablefile.h
qthighway/xqserviceutil/xqserviceutil.pro
qthighway/xqsreg/README.txt
qthighway/xqsreg/main.cpp
qthighway/xqsreg/service.prf
qthighway/xqsreg/xqsreg.pro
qtmobileextensions/examples/examples.pro
qtmobileextensions/examples/keycaptureex/README.txt
qtmobileextensions/examples/keycaptureex/capturerequest.cpp
qtmobileextensions/examples/keycaptureex/capturerequest.h
qtmobileextensions/examples/keycaptureex/install.txt
qtmobileextensions/examples/keycaptureex/keycaptureex.pro
qtmobileextensions/examples/keycaptureex/keycapturetestapp.cpp
qtmobileextensions/examples/keycaptureex/keycapturetestapp.h
qtmobileextensions/examples/keycaptureex/main.cpp
qtmobileextensions/examples/keycaptureex/mapping.cpp
qtmobileextensions/examples/keycaptureex/mapping.h
qtmobileextensions/examples/keycaptureex/mybutton.h
qtmobileextensions/examples/keycaptureex/txlogger.h
qtmobileextensions/examples/rom/qtmobileextensionsexamples.iby
qtmobileextensions/examples/settingsmanagerex/README.txt
qtmobileextensions/examples/settingsmanagerex/SettingsManagerEx.pro
qtmobileextensions/examples/settingsmanagerex/install.txt
qtmobileextensions/examples/settingsmanagerex/main.cpp
qtmobileextensions/examples/settingsmanagerex/settingsmanagerexwindow.cpp
qtmobileextensions/examples/settingsmanagerex/settingsmanagerexwindow.h
qtmobileextensions/examples/settingsmanagerex/settingsmanagerexwindow.ui
qtmobileextensions/examples/sysinfoex/README.txt
qtmobileextensions/examples/sysinfoex/SysInfoEx.pro
qtmobileextensions/examples/sysinfoex/install.txt
qtmobileextensions/examples/sysinfoex/main.cpp
qtmobileextensions/examples/sysinfoex/sysinfoexwindow.cpp
qtmobileextensions/examples/sysinfoex/sysinfoexwindow.h
qtmobileextensions/examples/sysinfoex/sysinfoexwindow.ui
qtmobileextensions/examples/sysinfoex/xqlistwidget.cpp
qtmobileextensions/examples/sysinfoex/xqlistwidget.h
qtmobileextensions/examples/systemtoneserviceex/sis/stsqt.pkg
qtmobileextensions/examples/systemtoneserviceex/ststest.cpp
qtmobileextensions/examples/systemtoneserviceex/ststest.h
qtmobileextensions/examples/systemtoneserviceex/systemtoneserviceex.pro
qtmobileextensions/examples/utilsex/README.txt
qtmobileextensions/examples/utilsex/UtilsEx.pro
qtmobileextensions/examples/utilsex/install.txt
qtmobileextensions/examples/utilsex/main.cpp
qtmobileextensions/examples/utilsex/utilsexwindow.cpp
qtmobileextensions/examples/utilsex/utilsexwindow.h
qtmobileextensions/examples/utilsex/utilsexwindow.ui
qtmobileextensions/include/XQCentralRepositorySearchCriteria
qtmobileextensions/include/XQCentralRepositorySettingsKey
qtmobileextensions/include/XQCentralRepositoryUtils
qtmobileextensions/include/XQConversions
qtmobileextensions/include/XQKeyCapture
qtmobileextensions/include/XQPublishAndSubscribeSecurityPolicy
qtmobileextensions/include/XQPublishAndSubscribeSettingsKey
qtmobileextensions/include/XQPublishAndSubscribeUtils
qtmobileextensions/include/XQSettingsKey
qtmobileextensions/include/XQSettingsManager
qtmobileextensions/include/XQSysInfo
qtmobileextensions/include/XQSystemToneService
qtmobileextensions/include/XQUtils
qtmobileextensions/install/install.txt
qtmobileextensions/install/keycapture.pro
qtmobileextensions/install/qt_mobile_extensions.pro
qtmobileextensions/install/settingsmanager.pro
qtmobileextensions/install/sysinfo.pro
qtmobileextensions/install/systemtoneservice.pro
qtmobileextensions/install/utils.pro
qtmobileextensions/qtmobileextensions.pro
qtmobileextensions/rom/qtmobileextensions.iby
qtmobileextensions/src/bwins/xqkeycaptureu.def
qtmobileextensions/src/bwins/xqsettingsmanageru.def
qtmobileextensions/src/bwins/xqsysinfou.def
qtmobileextensions/src/bwins/xqsystemtoneserviceu.def
qtmobileextensions/src/bwins/xqutilsu.def
qtmobileextensions/src/eabi/xqkeycaptureu.def
qtmobileextensions/src/eabi/xqsettingsmanageru.def
qtmobileextensions/src/eabi/xqsysinfou.def
qtmobileextensions/src/eabi/xqsystemtoneserviceu.def
qtmobileextensions/src/eabi/xqutilsu.def
qtmobileextensions/src/keycapture/capturerequest_s60.cpp
qtmobileextensions/src/keycapture/capturerequest_s60.h
qtmobileextensions/src/keycapture/keycapture.pri
qtmobileextensions/src/keycapture/keycapture.pro
qtmobileextensions/src/keycapture/keycapture_p.h
qtmobileextensions/src/keycapture/keycapture_s60_p.cpp
qtmobileextensions/src/keycapture/keycapture_s60_p.h
qtmobileextensions/src/keycapture/keycapture_stub_p.cpp
qtmobileextensions/src/keycapture/keycapture_stub_p.h
qtmobileextensions/src/keycapture/keymapper.cpp
qtmobileextensions/src/keycapture/keymapper.h
qtmobileextensions/src/keycapture/responsehandler.cpp
qtmobileextensions/src/keycapture/responsehandler.h
qtmobileextensions/src/keycapture/responsehandlerex.cpp
qtmobileextensions/src/keycapture/responsehandlerex.h
qtmobileextensions/src/keycapture/targetwrapper.cpp
qtmobileextensions/src/keycapture/targetwrapper.h
qtmobileextensions/src/keycapture/tsrc/mytestwindowgroup.cpp
qtmobileextensions/src/keycapture/tsrc/mytestwindowgroup.h
qtmobileextensions/src/keycapture/tsrc/test_xqkeycapture.cpp
qtmobileextensions/src/keycapture/tsrc/tsrc.pro
qtmobileextensions/src/keycapture/tsrc/xqkeycapture_test.pkg
qtmobileextensions/src/keycapture/txlogger.h
qtmobileextensions/src/keycapture/xqkeycapture.cpp
qtmobileextensions/src/keycapture/xqkeycapture.h
qtmobileextensions/src/settingsmanager/ccentralrepositoryhandler.cpp
qtmobileextensions/src/settingsmanager/ccentralrepositoryhandler.h
qtmobileextensions/src/settingsmanager/cenrepmonitor.cpp
qtmobileextensions/src/settingsmanager/cenrepmonitor.h
qtmobileextensions/src/settingsmanager/cpublishandsubscribehandler.cpp
qtmobileextensions/src/settingsmanager/cpublishandsubscribehandler.h
qtmobileextensions/src/settingsmanager/pubsubmonitor.cpp
qtmobileextensions/src/settingsmanager/pubsubmonitor.h
qtmobileextensions/src/settingsmanager/settingshandlerbase.cpp
qtmobileextensions/src/settingsmanager/settingshandlerbase.h
qtmobileextensions/src/settingsmanager/settingsmanager.pri
qtmobileextensions/src/settingsmanager/settingsmanager.pro
qtmobileextensions/src/settingsmanager/settingsmanager_global.h
qtmobileextensions/src/settingsmanager/xqcentralrepositorysearchcriteria.cpp
qtmobileextensions/src/settingsmanager/xqcentralrepositorysearchcriteria.h
qtmobileextensions/src/settingsmanager/xqcentralrepositoryutils.cpp
qtmobileextensions/src/settingsmanager/xqcentralrepositoryutils.h
qtmobileextensions/src/settingsmanager/xqcentralrepositoryutils_p.cpp
qtmobileextensions/src/settingsmanager/xqcentralrepositoryutils_p.h
qtmobileextensions/src/settingsmanager/xqpublishandsubscribesecuritypolicy.cpp
qtmobileextensions/src/settingsmanager/xqpublishandsubscribesecuritypolicy.h
qtmobileextensions/src/settingsmanager/xqpublishandsubscribeutils.cpp
qtmobileextensions/src/settingsmanager/xqpublishandsubscribeutils.h
qtmobileextensions/src/settingsmanager/xqpublishandsubscribeutils_p.cpp
qtmobileextensions/src/settingsmanager/xqpublishandsubscribeutils_p.h
qtmobileextensions/src/settingsmanager/xqsettingskey.cpp
qtmobileextensions/src/settingsmanager/xqsettingskey.h
qtmobileextensions/src/settingsmanager/xqsettingsmanager.cpp
qtmobileextensions/src/settingsmanager/xqsettingsmanager.h
qtmobileextensions/src/settingsmanager/xqsettingsmanager_p.cpp
qtmobileextensions/src/settingsmanager/xqsettingsmanager_p.h
qtmobileextensions/src/sysinfo/batterymonitor.cpp
qtmobileextensions/src/sysinfo/batterymonitor.h
qtmobileextensions/src/sysinfo/cdeviceinfo.cpp
qtmobileextensions/src/sysinfo/cdeviceinfo.h
qtmobileextensions/src/sysinfo/networksignalmonitor.cpp
qtmobileextensions/src/sysinfo/networksignalmonitor.h
qtmobileextensions/src/sysinfo/sysinfo.pri
qtmobileextensions/src/sysinfo/sysinfo.pro
qtmobileextensions/src/sysinfo/sysinfo_global.h
qtmobileextensions/src/sysinfo/xqsysinfo.cpp
qtmobileextensions/src/sysinfo/xqsysinfo.h
qtmobileextensions/src/sysinfo/xqsysinfo_p.cpp
qtmobileextensions/src/sysinfo/xqsysinfo_p.h
qtmobileextensions/src/systemtoneservice/systemtoneservice.pri
qtmobileextensions/src/systemtoneservice/systemtoneservice.pro
qtmobileextensions/src/systemtoneservice/xqsystemtoneservice.cpp
qtmobileextensions/src/systemtoneservice/xqsystemtoneservice.h
qtmobileextensions/src/systemtoneservice/xqsystemtoneservice_p.cpp
qtmobileextensions/src/systemtoneservice/xqsystemtoneservice_p.h
qtmobileextensions/src/utils/utils.pri
qtmobileextensions/src/utils/utils.pro
qtmobileextensions/src/utils/utils_global.h
qtmobileextensions/src/utils/xqconversions.cpp
qtmobileextensions/src/utils/xqconversions.h
qtmobileextensions/src/utils/xqutils.cpp
qtmobileextensions/src/utils/xqutils.h
qtmobileextensions/src/utils/xqutils_p.cpp
qtmobileextensions/src/utils/xqutils_p.h
qtmobility/INSTALL.txt
qtmobility/LGPL_EXCEPTION.txt
qtmobility/LICENSE.LGPL
qtmobility/LICENSE.PREVIEW.COMMERCIAL
qtmobility/bin/pathhelper
qtmobility/bin/purge.sh
qtmobility/bin/rununittests.bat
qtmobility/bin/rununittests.sh
qtmobility/bin/servicedbgen
qtmobility/bin/servicedbgen.exe
qtmobility/bin/syncheaders
qtmobility/bin/syncheaders.bat
qtmobility/common.pri
qtmobility/config.pri
qtmobility/configure
qtmobility/configure.bat
qtmobility/confml/qtmobility.confml
qtmobility/data/qtmobility.pkg
qtmobility/data/qtmobility.sisx
qtmobility/data/qtmobility_stub.pkg
qtmobility/data/qtmobility_stub.sis
qtmobility/data/qtmobilityexampleapps.pkg
qtmobility/examples/bearercloud/bearercloud.cpp
qtmobility/examples/bearercloud/bearercloud.h
qtmobility/examples/bearercloud/bearercloud.pro
qtmobility/examples/bearercloud/cloud.cpp
qtmobility/examples/bearercloud/cloud.h
qtmobility/examples/bearercloud/icons.qrc
qtmobility/examples/bearercloud/lan.svg
qtmobility/examples/bearercloud/main.cpp
qtmobility/examples/bearercloud/unknown.svg
qtmobility/examples/bearercloud/wlan.svg
qtmobility/examples/bearermonitor/bearermonitor.cpp
qtmobility/examples/bearermonitor/bearermonitor.h
qtmobility/examples/bearermonitor/bearermonitor.pro
qtmobility/examples/bearermonitor/bearermonitor_240_320.ui
qtmobility/examples/bearermonitor/bearermonitor_640_480.ui
qtmobility/examples/bearermonitor/bearermonitor_maemo.ui
qtmobility/examples/bearermonitor/main.cpp
qtmobility/examples/bearermonitor/sessionwidget.cpp
qtmobility/examples/bearermonitor/sessionwidget.h
qtmobility/examples/bearermonitor/sessionwidget.ui
qtmobility/examples/bearermonitor/sessionwidget_maemo.ui
qtmobility/examples/examples.pri
qtmobility/examples/examples.pro
qtmobility/examples/s60installs/qtmobilityexamples.iby
qtmobility/examples/s60installs/s60installs.pro
qtmobility/features/deploy.pri
qtmobility/features/mobility.prf
qtmobility/features/mobility.prf.template
qtmobility/features/mobilityconfig.prf
qtmobility/features/qtservice.meta
qtmobility/features/qtservice.prf
qtmobility/features/strict_flags.prf
qtmobility/implml/qtmobility_copy.implml
qtmobility/qtmobility.pro
qtmobility/src/3rdparty/icd-network-wlan/libicd-network-wlan-dev.h
qtmobility/src/bearer/bearer.pro
qtmobility/src/bearer/qcorewlanengine_mac.mm
qtmobility/src/bearer/qcorewlanengine_mac_p.h
qtmobility/src/bearer/qgenericengine.cpp
qtmobility/src/bearer/qgenericengine_p.h
qtmobility/src/bearer/qnativewifiengine_win.cpp
qtmobility/src/bearer/qnativewifiengine_win_p.h
qtmobility/src/bearer/qnetworkconfigmanager.cpp
qtmobility/src/bearer/qnetworkconfigmanager.h
qtmobility/src/bearer/qnetworkconfigmanager_maemo.cpp
qtmobility/src/bearer/qnetworkconfigmanager_maemo_p.h
qtmobility/src/bearer/qnetworkconfigmanager_p.cpp
qtmobility/src/bearer/qnetworkconfigmanager_p.h
qtmobility/src/bearer/qnetworkconfigmanager_s60_p.cpp
qtmobility/src/bearer/qnetworkconfigmanager_s60_p.h
qtmobility/src/bearer/qnetworkconfiguration.cpp
qtmobility/src/bearer/qnetworkconfiguration.h
qtmobility/src/bearer/qnetworkconfiguration_maemo_p.h
qtmobility/src/bearer/qnetworkconfiguration_p.h
qtmobility/src/bearer/qnetworkconfiguration_s60_p.cpp
qtmobility/src/bearer/qnetworkconfiguration_s60_p.h
qtmobility/src/bearer/qnetworkmanagerservice_p.cpp
qtmobility/src/bearer/qnetworkmanagerservice_p.h
qtmobility/src/bearer/qnetworksession.cpp
qtmobility/src/bearer/qnetworksession.h
qtmobility/src/bearer/qnetworksession_maemo.cpp
qtmobility/src/bearer/qnetworksession_maemo_p.h
qtmobility/src/bearer/qnetworksession_p.cpp
qtmobility/src/bearer/qnetworksession_p.h
qtmobility/src/bearer/qnetworksession_s60_p.cpp
qtmobility/src/bearer/qnetworksession_s60_p.h
qtmobility/src/bearer/qnetworksessionengine.cpp
qtmobility/src/bearer/qnetworksessionengine_p.h
qtmobility/src/bearer/qnetworksessionengine_win_p.h
qtmobility/src/bearer/qnlaengine_win.cpp
qtmobility/src/bearer/qnlaengine_win_p.h
qtmobility/src/bearer/qnmdbushelper.cpp
qtmobility/src/bearer/qnmdbushelper_p.h
qtmobility/src/bearer/qnmwifiengine_unix.cpp
qtmobility/src/bearer/qnmwifiengine_unix_p.h
qtmobility/src/global/global.pro
qtmobility/src/global/qmobilityglobal.h
qtmobility/src/global/qmobilitypluginsearch.h
qtmobility/src/s60installs/bwins/QtBeareru.def
qtmobility/src/s60installs/eabi/QtBeareru.def
qtmobility/src/s60installs/qtmobility.iby
qtmobility/src/s60installs/s60installs.pro
qtmobility/src/src.pro
qtmobility/staticconfig.pri
qtmobility/tests/auto/auto.pro
qtmobility/tests/auto/qbearertestcommon.h
qtmobility/tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro
qtmobility/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
qtmobility/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro
qtmobility/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
qtmobility/tests/auto/qnetworksession/lackey/lackey.pro
qtmobility/tests/auto/qnetworksession/lackey/main.cpp
qtmobility/tests/auto/qnetworksession/qnetworksession.pro
qtmobility/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp
qtmobility/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.pro
qtmobility/tests/bearerex/bearerex.cpp
qtmobility/tests/bearerex/bearerex.h
qtmobility/tests/bearerex/bearerex.pro
qtmobility/tests/bearerex/bearerex.ui
qtmobility/tests/bearerex/bearerex_maemo.ui
qtmobility/tests/bearerex/datatransferer.cpp
qtmobility/tests/bearerex/datatransferer.h
qtmobility/tests/bearerex/detailedinfodialog.ui
qtmobility/tests/bearerex/main.cpp
qtmobility/tests/bearerex/sessiondialog.ui
qtmobility/tests/bearerex/sessiondialog_maemo.ui
qtmobility/tests/bearerex/xqlistwidget.cpp
qtmobility/tests/bearerex/xqlistwidget.h
qtmobility/tests/s60installs/qtmobilitytests.iby
qtmobility/tests/s60installs/s60installs.pro
qtmobility/tests/tests.pro
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VERSION.SHA1	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+72d85e1da50c07243ae188eae91d0130fa60b5c6
--- a/group/bld.inf	Thu Aug 19 10:43:30 2010 +0300
+++ b/group/bld.inf	Tue Aug 31 16:02:37 2010 +0300
@@ -26,15 +26,11 @@
 
 PRJ_EXPORTS
 qtextensionsconfig.xml  /epoc32/tools/makefile_templates/qt/qtextensionsconfig.xml
-qtmobilityheaders.flm /epoc32/tools/makefile_templates/qt/qtmobilityheaders.flm
-../qtmobility/features/mobility.prf            /epoc32/tools/qt/mkspecs/features/mobility.prf
-../qtmobility/features/mobilityconfig.prf        /epoc32/tools/qt/mkspecs/features/mobilityconfig.prf
+qtextensions_pre_targetdep.flm /epoc32/tools/makefile_templates/qt/qtextensions_pre_targetdep.flm
 
-//For UDA image
-../qtmobility/confml/qtmobility.confml         CONFML_EXPORT_PATH(qtmobility.confml,uda_content)
-../qtmobility/implml/qtmobility_copy.implml    CRML_EXPORT_PATH(qtmobility_copy.implml,uda_content)
-../qtmobility/data/qtmobility.sisx             CRML_EXPORT_PATH(../content/sis/,uda_content)
-../qtmobility/data/qtmobility_stub.sis         /epoc32/data/z/system/install/qtmobility_stub.sis
+../qtecomplugins/mkspecs/features/ecomplugin.prf /epoc32/tools/qt/mkspecs/features/symbian/ecomplugin.prf
+../qtecomplugins/supplements/xqecom/xqecom.py    /epoc32/tools/xqecom.py
+../qthighway/bin/service.prf                     /epoc32/tools/qt/mkspecs/features/symbian/service.prf
 
 PRJ_MMPFILES
 
@@ -43,6 +39,3 @@
 
 
 PRJ_EXTENSIONS
-START EXTENSION qt/qtmobilityheaders
-OPTION MODULES bearer
-END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/group/qtextensions_pre_targetdep.flm	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,30 @@
+# /****************************************************************************
+# **
+# ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# ** Contact: Nokia Corporation (qt-info@nokia.com)
+# **
+# ** This file is part of symbian-sbsv2 mkspec.
+# **
+# ****************************************************************************/
+
+include $(FLMHOME)/metaflm.mk
+
+SINGLETON:=$(call sanitise,TARGET_$(PREDEP_TARGET))
+
+define qmake_extra_pre_targetdep
+EXPORT:: $(PREDEP_TARGET)
+
+# Prevent duplicate targets from being created
+$(SINGLETON):=1
+
+$(PREDEP_TARGET)::
+	$(call startrule,qmake_extra_pre_targetdep,FORCESUCCESS) \
+	cd $(EXTENSION_ROOT) && \
+	$(COMMAND) \
+	$(call endrule,qmake_extra_pre_targetdep)
+endef
+
+ifeq ($($(SINGLETON)),)
+$(eval $(qmake_extra_pre_targetdep))
+$(eval $(call GenerateStandardCleanTarget,$(PREDEP_TARGET),''))
+endif	
--- a/group/qtextensionsconfig.xml	Thu Aug 19 10:43:30 2010 +0300
+++ b/group/qtextensionsconfig.xml	Tue Aug 31 16:02:37 2010 +0300
@@ -5,9 +5,11 @@
 
 	<!-- Tools interfaces -->
 
-	<interface name="qt.qtmobilityheaders" extends="Symbian.UserFLM" flm="qtmobilityheaders.flm">
-		<param name='SYNCHEADERS' default='syncheaders' />
-		<param name='MODULES' default='' />
+	<interface name="qt.qtextensions_pre_targetdep.export" extends="Symbian.UserFLM"
+                flm="qtextensions_pre_targetdep.flm">
+    <param name='PREDEP_TARGET' />
+    <param name='DEPS' default = '' />
+    <param name='COMMAND' default = '' />
 	</interface>
-	
+
 </build>
--- a/group/qtmobilityheaders.flm	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-# /****************************************************************************
-# **
-# ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# ** Contact: 
-# **
-# ****************************************************************************/
-
-# FLM to generate Qt style headers for QtMobility
-QTMOBILITY_ROOT := $(subst group,,$(subst \,/,$(EXTENSION_ROOT)qtmobility/))
-QTMOBILITY_BIN := $(QTMOBILITY_ROOT)bin
-QTMOBILITY_INCLUDE := $(QTMOBILITY_ROOT)include
-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
-QTMOBILITY_CONTACTS_SRC := $(QTMOBILITY_SRC)/contacts
-QTMOBILITY_LOCATION_SRC := $(QTMOBILITY_SRC)/location
-QTMOBILITY_MESSAGING_SRC := $(QTMOBILITY_SRC)/messaging
-QTMOBILITY_MULTIMEDIA_SRC := $(QTMOBILITY_SRC)/multimedia
-QTMOBILITY_PUBLISHSUBSCRIBE_SRC := $(QTMOBILITY_SRC)/publishsubscribe
-QTMOBILITY_SYSTEMINFO_SRC := $(QTMOBILITY_SRC)/systeminfo
-QTMOBILITY_SERVICEFRAMEWORK_SRC := $(QTMOBILITY_SRC)/serviceframework
-QTMOBILITY_VERSIT_SRC := $(QTMOBILITY_SRC)/versit
-QTMOBILITY_SENSORS_SRC := $(QTMOBILITY_SRC)/sensors
-
-define generate_module_headers
-
-EXPORT::
-	$(call startrule,generate_module_headers,FORCESUCCESS) \
-	cd $(QTMOBILITY_ROOT) && \
-	$(PERL) -S $(QTMOBILITY_BIN)/$(SYNCHEADERS) $(1) $(2) \
-	$(call endrule,generate_module_headers)
-
-CLEAN::
-	$(call startrule,clean) \
-	$(GNURM) -rf $(1)  \
-	$(call endrule,clean)
-
-WHAT::
-	@(echo "<whatlog bldinf='$(COMPONENT_META)' mmp='$(PROJECT_META)' config='$(SBS_CONFIGURATION)'>"; \
-	$(GNUFIND) $(1) -type f -print | (read LINE; \
-	while [ $$$$? -eq 0 ]; do \
-		echo "<build>$$$$LINE</build>"; \
-		read LINE; \
-	done); \
-	echo "</whatlog>") $(if $(DESCRAMBLE),2>&1 | $(DESCRAMBLE))
-
-endef
-
-GUARD:=done_$(call sanitise,$(QTMOBILITY_INCLUDE))
-ifeq ($($(GUARD)),)
-$(GUARD) := 1
-
-ifneq (,$(findstring bearer,$(MODULES)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_BEARER_INCLUDE), $(QTMOBILITY_BEARER_SRC)))
-endif
-
-ifneq (,$(findstring contacts,$(MODULES)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_CONTACTS_INCLUDE), $(QTMOBILITY_CONTACTS_SRC)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_CONTACTS_INCLUDE), $(QTMOBILITY_CONTACTS_SRC)/requests))
-$(eval $(call generate_module_headers, $(QTMOBILITY_CONTACTS_INCLUDE), $(QTMOBILITY_CONTACTS_SRC)/filters))
-$(eval $(call generate_module_headers, $(QTMOBILITY_CONTACTS_INCLUDE), $(QTMOBILITY_CONTACTS_SRC)/details))
-endif
-
-ifneq (,$(findstring location,$(MODULES)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_LOCATION_INCLUDE), $(QTMOBILITY_LOCATION_SRC)))
-endif
-
-ifneq (,$(findstring messaging,$(MODULES)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_MESSAGING_INCLUDE), $(QTMOBILITY_MESSAGING_SRC)))
-endif
-
-ifneq (,$(findstring multimedia,$(MODULES)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_MULTIMEDIA_INCLUDE), $(QTMOBILITY_MULTIMEDIA_SRC)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_MULTIMEDIA_INCLUDE), $(QTMOBILITY_MULTIMEDIA_SRC)/audio))
-$(eval $(call generate_module_headers, $(QTMOBILITY_MULTIMEDIA_INCLUDE), $(QTMOBILITY_MULTIMEDIA_SRC)/video))
-endif
-
-ifneq (,$(findstring publishsubscribe,$(MODULES)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_PUBLISHSUBSCRIBE_INCLUDE), $(QTMOBILITY_PUBLISHSUBSCRIBE_SRC)))
-endif
-
-ifneq (,$(findstring systeminfo,$(MODULES)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_SYSTEMINFO_INCLUDE), $(QTMOBILITY_SYSTEMINFO_SRC)))
-endif
-
-ifneq (,$(findstring serviceframework,$(MODULES)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_SERVICEFRAMEWORK_INCLUDE), $(QTMOBILITY_SERVICEFRAMEWORK_SRC)))
-endif
-
-ifneq (,$(findstring versit,$(MODULES)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_VERSIT_INCLUDE), $(QTMOBILITY_VERSIT_SRC)))
-endif
-
-ifneq (,$(findstring sensors,$(MODULES)))
-$(eval $(call generate_module_headers, $(QTMOBILITY_SENSORS_INCLUDE), $(QTMOBILITY_SENSORS_SRC)))
-endif
-
-endif	
--- a/layers.sysdef.xml	Thu Aug 19 10:43:30 2010 +0300
+++ b/layers.sysdef.xml	Tue Aug 31 16:02:37 2010 +0300
@@ -17,10 +17,12 @@
     </layer>
     <layer name="app_layer">
     	<module name="qtextensionsexamples">
-    		<unit name="qtmobilityexamples" unitID="qtextensions.qtextensionsexamples.qtmobilityexamples" bldFile="&layer_real_source_path;/qtmobility/examples" mrp="" proFile="examples.pro" qmakeArgs="-r" filter="qtextensionsexamples"/>
+    		<unit name="qtecompluginsexamples" unitID="qtextensions.qtextensionsexamples.qtecompluginsexamples" bldFile="&layer_real_source_path;/qtecomplugins/examples" mrp="" proFile="examples.pro" qmakeArgs="-r" filter="qtextensionsexamples"/>
+      	<unit name="qthighwayexamples" unitID="qtextensions.qtextensionsexamples.qthighwayexamples" bldFile="&layer_real_source_path;/qthighway/examples" mrp="" proFile="examples.pro" qmakeArgs="-r" filter="qtextensionsexamples"/>
+      	<unit name="qtmobileextensionsexamples" unitID="qtextensions.qtmobileextensionsexamples.qtecompluginsexamples" bldFile="&layer_real_source_path;/qtmobileextensions/examples" mrp="" proFile="examples.pro" qmakeArgs="-r" filter="qtextensionsexamples"/>
       </module>
       <module name="qtextensionstests">
-      	<unit name="qtmobilitytests" unitID="qtextensions.qtextensionstests.qtmobilitytests" bldFile="&layer_real_source_path;/qtmobility/tests" mrp="" proFile="tests.pro" qmakeArgs="-r" filter="qtextensionstests"/>
+      	<unit name="qthighwaytests" unitID="qtextensions.qtextensionstests.qthighwaytests" bldFile="&layer_real_source_path;/qthighway/tests" mrp="" proFile="tests.pro" qmakeArgs="-r" filter="qtextensionstests"/>
       </module>
     </layer>
   </systemModel>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/qhbemptystyle.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+#include "qhbemptystyle.h"
+
+QHbEmptyStyle::QHbEmptyStyle()
+{
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/qhbemptystyle.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+#ifndef QHBEMPTYSTYLE_H
+#define QHBEMPTYSTYLE_H
+
+#include <QCommonStyle>
+
+class QHbEmptyStyle : public QCommonStyle
+{
+    Q_OBJECT
+
+public:
+    QHbEmptyStyle();
+};
+
+#endif //QHBEMPTYSTYLE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/qhbstyle.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,3368 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+//Qt includes
+#include <qapplication.h>
+#include <qpainter.h>
+#include <qstyleoption.h>
+#include <qevent.h>
+#include <qdebug.h>
+
+//Qt widgets
+#include <QtGui/qgroupbox.h>
+#include <QtGui/qheaderview.h>
+#include <QtGui/qlistview.h>
+#include <QtGui/qpushbutton.h>
+#include <QtGui/qscrollbar.h>
+#include <QtGui/qtabbar.h>
+#include <QtGui/qtableview.h>
+#include <QtGui/qtreeview.h>
+#include <QtGui/qtextedit.h>
+#include <QtGui/qtoolbar.h>
+#include <QtGui/qtoolbutton.h>
+#include <QtGui/qradiobutton.h>
+#include <QtGui/qcheckbox.h>
+#include <QtGui/qprogressbar.h>
+#include <QtGui/qcombobox.h>
+#include <QtGui/qspinbox.h>
+#include <QtGui/qlineedit.h>
+
+//Animation
+#include <QParallelAnimationGroup>
+#include <QPropertyAnimation>
+#include <QTime>
+
+//Hb includes
+#include <hbinstance.h>
+#include <hbicon.h>
+#include <hbframedrawer.h>
+#include <hbstyle.h>
+#include <hbcolorscheme.h>
+#include <hbfontspec.h>
+
+#include "qhbstyle.h"
+#include "qhbstyle_p.h"
+#include "qhbstyleanimation.h"
+
+QT_BEGIN_NAMESPACE
+
+QHbStylePrivate::QHbStylePrivate() : m_styleManager(0),
+    m_frameDrawer(0),
+    m_animationGroup(0)
+{
+}
+
+QHbStylePrivate::~QHbStylePrivate()
+{
+}
+
+HbStyle* QHbStylePrivate::styleManager()
+{
+    if (!m_styleManager) {
+        HbInstance *instance = HbInstance::instance();
+        setStyleManager(instance->style());
+    }
+    
+    return m_styleManager;
+}
+
+void QHbStylePrivate::setStyleManager(HbStyle* style)
+{
+    Q_ASSERT(style);
+    m_styleManager = style;
+}
+
+QParallelAnimationGroup* QHbStylePrivate::animationGroup()
+{
+    if (m_animationGroup.isNull())
+        m_animationGroup.reset(new QParallelAnimationGroup());
+    return m_animationGroup.data();
+}
+
+/*!
+  \internal
+ */
+QHbStyle::QHbStyle() : QCommonStyle()
+{
+    m_private = new QHbStylePrivate();
+}
+
+/*!
+  \internal
+ */
+QHbStyle::~QHbStyle()
+{
+    delete m_private;
+}
+
+void QHbStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option,
+                       QPainter *painter, const QWidget *widget) const
+{
+    switch (element) {
+        case PE_IndicatorViewItemCheck: {
+            if (const QStyleOptionViewItemV4 *itemOption = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
+                ItemStates state;
+                if (itemOption->state & State_Selected)
+                    state |= SS_Selected;
+                m_private->drawItem(SP_ItemDecoration, painter, option->rect, state);
+            }
+            break;
+        }
+        case PE_IndicatorHeaderArrow: {
+            if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
+                ItemStates state;
+                if (header->sortIndicator & QStyleOptionHeader::SortDown)
+                    m_private->drawItem(SP_HeaderOrderIndicator, painter, header->rect, ItemStates(state|SS_Flipped));
+                else if (header->sortIndicator & QStyleOptionHeader::SortUp)
+                    m_private->drawItem(SP_HeaderOrderIndicator, painter, header->rect, ItemStates(state));
+            }
+            break;
+        }
+        case PE_IndicatorBranch: {
+            if (option->state & State_Children) {
+                QRect indicatorRect = option->rect;
+                const int rectSide = proxy()->pixelMetric(PM_MenuButtonIndicator, option, widget);
+                indicatorRect = QRect(0, 0, rectSide, rectSide);
+                indicatorRect.moveCenter(option->rect.center());
+                if (option->state & State_Open)
+                    m_private->drawItem(SP_TreeViewExpanded, painter, indicatorRect);
+                else
+                    m_private->drawItem(SP_TreeViewCollapsed, painter, indicatorRect);
+            }
+            break;
+        }
+        case PE_PanelItemViewRow: {
+            if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
+            ItemStates state = SS_Active;
+            if (vopt->state & State_HasFocus)
+                state |= SS_Focused;
+            if (vopt->state & State_Sunken || vopt->state & State_Raised)
+                state |= SS_Pressed;
+
+#ifndef QT_NO_TABLEVIEW
+                if (qobject_cast<const QTableView *>(widget)) {
+                    m_private->drawMultiPartItem(SM_TableItem, painter, vopt->rect, state);
+                    break;
+                }
+#endif
+            if (vopt->features & QStyleOptionViewItemV2::Alternate)
+                state |= SS_Alternate; //@todo: how?
+            m_private->drawMultiPartItem(SM_ItemViewItem, painter, vopt->rect, state);
+            }
+            break;
+        }
+        case PE_PanelItemViewItem: {
+            if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
+                ItemStates state = SS_Active;
+                if (vopt->state & State_HasFocus)
+                    state |= SS_Focused;
+                if (vopt->state & State_Sunken || vopt->state & State_Raised)
+                    state |= SS_Pressed;
+                m_private->drawMultiPartItem(SM_ItemViewItem, painter, vopt->rect, state);
+            }
+            break;
+        }
+        case PE_IndicatorArrowLeft:
+        case PE_IndicatorArrowRight:
+        case PE_IndicatorArrowUp:
+        case PE_IndicatorArrowDown: {
+            ItemStates state;
+            if (element == PE_IndicatorArrowRight)
+                state = SS_Right;
+            else if (element == PE_IndicatorArrowLeft)
+                state = SS_Left;
+            else if (element == PE_IndicatorArrowUp)
+                state = SS_Up;
+            else
+                state = SS_Down;
+            m_private->drawItem(SP_Arrow, painter, option->rect, state);
+            break;
+        }
+        case PE_PanelTipLabel: {
+            m_private->drawMultiPartItem(SM_ToolTip, painter, option->rect);
+            break;
+        }
+        case PE_Frame: {
+            if (const QStyleOptionFrameV3 *frame = qstyleoption_cast<const QStyleOptionFrameV3 *>(option)) {
+#ifndef QT_NO_TEXTEDIT
+                if (qobject_cast<const QTextEdit *>(widget))
+                    m_private->drawMultiPartItem(SM_TextEdit, painter, frame->rect);
+#endif //QT_NO_TEXTEDIT
+            }
+            break;
+        }
+        case PE_FrameTabWidget: {
+            m_private->drawMultiPartItem(SM_Panel, painter, option->rect);
+            break;
+        }
+#ifndef QT_NO_LINEEDIT
+        case PE_PanelLineEdit: {
+#ifndef QT_NO_COMBOBOX
+            if ( (widget && qobject_cast<const QComboBox *>(widget->parentWidget()) ) && (!widget->hasFocus()))
+                break;
+#endif
+#ifndef QT_NO_SPINBOX
+            if (widget && qobject_cast<const QSpinBox *>(widget->parentWidget()))
+                break;
+#endif
+            if (const QStyleOptionFrame *lineEdit = qstyleoption_cast<const QStyleOptionFrame *>(option)) {
+                ItemStates state = (lineEdit->state & State_Enabled) ? SS_Active : SS_Inactive;
+                if (lineEdit->state & State_HasFocus)
+                    state |= SS_Selected;
+                m_private->drawMultiPartItem(SM_LineEdit, painter, lineEdit->rect, state);
+            }
+            break;
+        }
+#endif // QT_NO_LINEEDIT
+        case PE_PanelButtonTool: {
+            if (const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(option)) {
+                //draw button
+                const bool isDisabled = !(toolbutton->state & State_Enabled);
+                const bool isPressed = (toolbutton->state & State_Sunken) ||
+                                       (toolbutton->state & State_On);
+
+                // 'latched' is a checkable button that is pressed down
+                bool isLatched = false;
+#ifndef QT_NO_TOOLBUTTON
+                if (const QToolButton *toolButtonWidget = qobject_cast<const QToolButton*>(widget))
+                    isLatched = toolButtonWidget->isCheckable() && isPressed;
+#endif
+                ItemStates state = (isDisabled) ? SS_Disabled : SS_Active;
+                if (isLatched)
+                    state = state | SS_Latched;
+                else if (isPressed)
+                    state = state | SS_Pressed;
+
+                if (toolbutton->state & State_Selected || toolbutton->state & State_HasFocus)
+                    state = state | SS_Selected;
+#ifndef QT_NO_TOOLBAR
+                if (widget && !qobject_cast<const QToolBar*>(widget->parentWidget()))
+                    m_private->drawMultiPartItem(SM_ToolButton, painter, toolbutton->rect, state);
+                else
+#endif
+                    m_private->drawMultiPartItem(SM_ToolBarButton, painter, toolbutton->rect, state);
+            }
+            break;
+        }
+        case PE_IndicatorCheckBox: {
+            ItemStates state = (option->state & State_On) ? SS_Active : SS_Inactive;
+            if (option->direction == Qt::RightToLeft) state |= SS_Mirrored;
+            m_private->drawItem(SP_CheckBoxIndicator, painter, option->rect, state);
+            break;
+        }
+        case PE_IndicatorRadioButton: {
+            const ItemStates state = (option->state & State_On) ? SS_Active : SS_Inactive;
+            m_private->drawItem(SP_RadioButtonIndicator, painter, option->rect, state);
+            break;
+        }
+        case PE_FrameFocusRect: {
+            if (const QStyleOptionFocusRect *highlight = qstyleoption_cast<const QStyleOptionFocusRect *>(option)) {
+                if (false
+#ifndef QT_NO_LISTVIEW
+                        || qobject_cast<const QListView *>(widget)
+#endif
+#ifndef QT_NO_TABLEVIEW
+                        || qobject_cast<const QTableView *>(widget)
+#endif
+#ifndef QT_NO_TREEVIEW
+                        || qobject_cast<const QTreeView *>(widget)
+#endif
+                    )
+                    if (option->state & State_HasFocus)
+                        m_private->drawMultiPartItem(SM_ItemViewItem, painter, highlight->rect, SS_Focused);
+            }
+            break;
+        }
+        case PE_FrameMenu: {
+            break;
+        }
+        case PE_PanelMenu: {
+            m_private->drawMultiPartItem(SM_Menu, painter, option->rect);
+            break;
+        }
+        case PE_Widget: {
+            if (m_private->isDialog(widget))
+                m_private->drawMultiPartItem(SM_Dialog, painter, option->rect);
+            break;
+        }
+        case PE_IndicatorMenuCheckMark: {
+            m_private->drawItem(SP_ItemDecoration, painter, option->rect);
+            break;
+        }
+        case PE_FrameGroupBox: {
+            ItemStates groupBoxStates;
+            if ((option->state & State_Sunken) || (option->state & State_Raised))
+                groupBoxStates |= SS_Pressed;
+            if (option->state & State_HasFocus)
+                groupBoxStates |= SS_Selected;
+            if (option->state & State_On)
+                groupBoxStates |= SS_Active;
+            else if (option->state & State_Off)
+                groupBoxStates |= SS_Inactive;
+            m_private->drawMultiPartItem(SM_GroupBox, painter, option->rect, groupBoxStates);
+            break;
+        }
+        // Qt3 primitives are not supported
+        case PE_Q3CheckListController:
+        case PE_Q3CheckListExclusiveIndicator:
+        case PE_Q3CheckListIndicator:
+        case PE_Q3DockWindowSeparator:
+        case PE_Q3Separator: {
+            Q_ASSERT(false);
+            break;
+        }
+        case PE_PanelScrollAreaCorner: //no corner for scroll area
+        case PE_IndicatorTabTear: // no tab tear in uiemo
+        case PE_PanelMenuBar: { //no panel menu in uiemo
+            break;
+        }
+        default: {
+            QCommonStyle::drawPrimitive(element, option, painter, widget);
+            break;
+        }
+    }
+}
+
+void QHbStyle::drawControl(ControlElement element, const QStyleOption *option,
+                     QPainter *painter, const QWidget *widget) const
+{
+    switch (element) {
+        case CE_HeaderEmptyArea: {
+            const bool isHorizontal = (option->state & State_Horizontal);
+            ItemStates states = (isHorizontal) ? SS_Horizontal : ItemState(SS_Vertical);
+            if (!isHorizontal)
+                states |= (option->direction == Qt::LeftToRight) ? SS_RotatedRight : SS_RotatedLeft;
+            m_private->drawMultiPartItem(SM_ListParent, painter, option->rect, states);
+            break;
+        }
+        case CE_HeaderSection: {
+            if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
+                //Draw corner button as normal pushButton.
+                if (qobject_cast<const QAbstractButton *>(widget)) {
+                    QStyleOptionButton cornerButton;
+                    cornerButton.initFrom(widget);
+                    drawControl(CE_PushButtonBevel, &cornerButton, painter, widget);
+                } else {
+                    const bool isVertical = (header->orientation == Qt::Vertical);
+                    ItemStates states = (isVertical) ? SS_Vertical : ItemState(SS_Horizontal);
+                    if (isVertical)
+                        states |= (header->direction == Qt::LeftToRight) ? SS_RotatedRight : SS_RotatedLeft;
+                    m_private->drawMultiPartItem(SM_ListParent, painter, option->rect, states);
+                }
+            }
+            break;
+        }
+        case CE_ItemViewItem: {
+        //@todo: headerviews and listviews should show selection tick at the beginning of the row (in place of checkbox rect)
+        //@todo: headerview should select also parent when child is selected
+        //@todo: headerview should draw highlight rect
+            if (const QStyleOptionViewItemV4 *itemOption = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
+                const QRect checkRect = subElementRect(SE_ItemViewItemCheckIndicator, itemOption, widget);
+                const QRect iconRect = subElementRect(SE_ItemViewItemDecoration, itemOption, widget);
+                QRect textRect = subElementRect(SE_ItemViewItemText, itemOption, widget);
+
+                //background for list items (other itemviews use PE_PanelItemViewRow drawing)
+                if (qobject_cast<const QListView *>(widget))
+                    proxy()->drawPrimitive(PE_PanelItemViewItem, itemOption, painter, widget);
+
+                //checkbox
+                if (itemOption->features & QStyleOptionViewItemV2::HasCheckIndicator && checkRect.isValid()) {
+                    QStyleOptionViewItemV4 checkOption;
+                    checkOption.QStyleOption::operator=(*itemOption);
+                    checkOption.rect = checkRect;
+                    proxy()->drawPrimitive(PE_IndicatorViewItemCheck, &checkOption, painter, widget);
+                }
+
+                //selection indication
+                if (itemOption->state & State_Selected) {
+                    const QAbstractItemView *itemView = qobject_cast<const QAbstractItemView *>(widget);
+                    if (itemView->selectionMode() != QAbstractItemView::NoSelection) {
+                        QStyleOptionViewItemV4 selectOption;
+                        selectOption.QStyleOption::operator=(*itemOption);
+                        int iconSize = 0;
+                        if (m_private->hbParameter(QLatin1String("hb-param-graphic-size-secondary"), iconSize)) {
+                            QRect selectRect = QRect(0, 0, iconSize, iconSize);
+                            if (itemOption->direction == Qt::LeftToRight) {
+                                //translate to end of text area and reduce text area
+                                selectRect.translate(textRect.topRight().x() - selectRect.width(), textRect.topRight().y());
+                            } else {
+                                //translate to the beginning of textRect, move textRect to the right
+                                selectRect.translate(textRect.topLeft().x(), textRect.topRight().y());
+                                textRect.translate(selectRect.width(), 0);
+                            }
+                            textRect.setWidth(textRect.width() - selectRect.width());
+                            selectOption.rect = selectRect;
+                            proxy()->drawPrimitive(PE_IndicatorViewItemCheck, &selectOption, painter, widget);
+                        }
+                    }
+                }
+
+                //text
+                if (itemOption->text.length() > 0) {
+                    uint flags = Qt::AlignVCenter | Qt::TextShowMnemonic;
+                    if (!proxy()->styleHint(SH_UnderlineShortcut, itemOption, widget))
+                        flags |= Qt::TextHideMnemonic;
+
+                    drawItemText(painter, textRect, flags, itemOption->palette, (itemOption->state & State_Enabled), itemOption->text);
+                }
+                //icon
+                if (!itemOption->icon.isNull()) {
+                    QIcon::Mode mode = QIcon::Normal;
+                    if (!(option->state & State_Enabled))
+                        mode = QIcon::Disabled;
+                    else if (option->state & State_Selected)
+                        mode = QIcon::Selected;
+                    QIcon::State state = itemOption->state & State_Open ? QIcon::On : QIcon::Off;
+                    itemOption->icon.paint(painter, iconRect, itemOption->decorationAlignment, mode, state);
+                }
+            }
+            break;
+        }
+        case CE_ShapedFrame: {
+            if (const QStyleOptionFrameV3 *frame = qstyleoption_cast<const QStyleOptionFrameV3 *>(option)) {
+                const int frameShape  = frame->frameShape;
+                const int lineWidth = frame->lineWidth;
+                const int midLineWidth = frame->midLineWidth;
+                QPalette::ColorRole foregroundRole = QPalette::WindowText;
+                int frameShadow = QFrame::Plain;
+                if (frame->state & State_Sunken)
+                    frameShadow = QFrame::Sunken;
+                else if (frame->state & State_Raised)
+                    frameShadow = QFrame::Raised;
+
+                switch (frameShape) {
+                case QFrame::Box:
+                case QFrame::WinPanel:
+                    if (frameShadow == QFrame::Plain)
+                        qDrawPlainRect(painter, frame->rect, frame->palette.color(foregroundRole), lineWidth);
+                    else
+                        qDrawShadeRect(painter, frame->rect, frame->palette, frameShadow == QFrame::Sunken, lineWidth, midLineWidth);
+                    break;
+                case QFrame::StyledPanel:
+                    if (widget)
+                        widget->style()->drawPrimitive(PE_Frame, option, painter, widget);
+                    else
+                        proxy()->drawPrimitive(PE_Frame, option, painter, widget);
+                    break;
+                case QFrame::Panel:
+                    //@todo: support sunken / raised?
+                    m_private->drawMultiPartItem(SM_Panel, painter, option->rect);
+                    break;
+                case QFrame::HLine:
+                case QFrame::VLine: {
+                    ItemStates states = (frameShape == QFrame::HLine) ? SS_Horizontal : SS_Vertical;
+                    //@todo: support sunken / raised separators?
+                    m_private->drawItem(SP_SeparatorLine, painter, frame->rect, states);
+                    break;
+                    }
+                }
+            }
+            break;
+        }
+#ifndef QT_NO_TABBAR
+        case CE_TabBarTab: {
+            if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) {
+                proxy()->drawControl(CE_TabBarTabShape, tab, painter, widget);
+                proxy()->drawControl(CE_TabBarTabLabel, tab, painter, widget);
+            }
+            break;
+        }
+        case CE_TabBarTabShape: {
+            if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) {
+                ItemStates states = (tab->shape == QTabBar::TriangularSouth ||
+                                     tab->shape == QTabBar::RoundedSouth ||
+                                     tab->shape == QTabBar::TriangularNorth ||
+                                     tab->shape == QTabBar::RoundedNorth) ? SS_Horizontal : SS_Vertical;
+                if (tab->state & State_Selected)
+                    states |= SS_Selected;
+                if (tab->state & State_Raised || tab->state & State_Sunken)
+                    states |= SS_Pressed;
+                if (!(tab->state & State_Enabled))
+                    states |= SS_Disabled;
+
+                if (tab->shape == QTabBar::RoundedSouth || tab->shape == QTabBar::TriangularSouth ||
+                    tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::TriangularEast)
+                    states |= SS_Flipped;
+
+                if (tab->direction == Qt::RightToLeft) states |= SS_Mirrored;
+
+                //Tab's position
+                if (tab->position == QStyleOptionTab::Beginning)
+                    states |= (states & SS_Flipped) ? SS_End : SS_Beginning;
+                else if (tab->position == QStyleOptionTab::Middle)
+                    states |= SS_Middle;
+                if (tab->position == QStyleOptionTab::End)
+                    states |= (states & SS_Flipped) ? SS_Beginning : SS_End;
+
+                m_private->drawMultiPartItem(SM_TabShape, painter, tab->rect, states);
+            }
+            break;
+        }
+        case CE_TabBarTabLabel: {
+            if (const QStyleOptionTabV3 *tab = qstyleoption_cast<const QStyleOptionTabV3 *>(option)) {
+                const bool enabled = tab->state & State_Enabled;
+                const QPixmap icon = tab->icon.pixmap(proxy()->pixelMetric(PM_TabBarIconSize, tab, widget),
+                                             enabled ? QIcon::Normal : QIcon::Disabled);
+
+                const bool verticalTabs = tab->shape == QTabBar::RoundedEast
+                                    || tab->shape == QTabBar::RoundedWest
+                                    || tab->shape == QTabBar::TriangularEast
+                                    || tab->shape == QTabBar::TriangularWest;
+
+                QRect tr = tab->rect;
+                //add a small space so that text/icon does not start from the border
+                const int margin = proxy()->pixelMetric(PM_DefaultFrameWidth, tab, widget);
+                if (!verticalTabs)
+                    tr.adjust(margin, 0, -margin, 0);
+                else
+                    tr.adjust(0, margin, 0, -margin);
+
+                // Need to do rotation separately here, instead of in drawItem/drawMultiItemPart, since we want to rotate text as well.
+                if (verticalTabs) {
+                    painter->save();
+                    int newX, newY, newRotation;
+                    if (tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::TriangularEast) {
+                        newX = tr.width();
+                        newY = tr.y();
+                        newRotation = 90;
+                    } else {
+                        newX = 0;
+                        newY = tr.y() + tr.height();
+                        newRotation = -90;
+                    }
+                    tr.setRect(0, 0, tr.height(), tr.width());
+                    QTransform m;
+                    m.translate(newX, newY);
+                    m.rotate(newRotation);
+                    painter->setTransform(m, true);
+                }
+
+                const int frameWidth = proxy()->pixelMetric((verticalTabs) ?
+                    PM_LayoutVerticalSpacing : PM_LayoutHorizontalSpacing, option, widget);
+                const Qt::TextElideMode elideMode = (tab->direction == Qt::LeftToRight) ? Qt::ElideRight : Qt::ElideLeft;
+                const QRect textRect = QRect(0,
+                                             0,
+                                             tab->rect.width() - icon.width() - frameWidth * 2,
+                                             tab->rect.height() - icon.height() - frameWidth * 2);
+                QString txt = tab->fontMetrics.elidedText(tab->text, elideMode, (verticalTabs ? textRect.height() : textRect.width()));
+
+                //Icon
+                if (!icon.isNull()) {
+                    if (tab->text.isEmpty())
+                        painter->drawPixmap(tr.center().x() - (icon.height() >> 1),
+                                            tr.center().y() - (icon.height() >> 1),
+                                            icon);
+                    else
+                        painter->drawPixmap(tr.left(),
+                                            tr.center().y() - (icon.height() >> 1),
+                                            icon);
+                    tr.setLeft(tr.left() + icon.width() + frameWidth);
+                } else {
+                    tr.setLeft(tr.left() + frameWidth);
+                }
+
+                //Text
+                if (tab->text.length() > 0) {
+                    int alignment = Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic;
+                    if (!proxy()->styleHint(SH_UnderlineShortcut, tab, widget))
+                        alignment |= Qt::TextHideMnemonic;
+                    proxy()->drawItemText(painter, tr, alignment, tab->palette, enabled, txt, QPalette::ButtonText);
+                }
+
+                if (verticalTabs)
+                    painter->restore();
+            }
+            break;
+        }
+#ifndef QT_NO_COMBOBOX
+    case CE_ComboBoxLabel:
+        if (const QStyleOptionComboBox *combo = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
+            QRect editRect = proxy()->subControlRect(CC_ComboBox, combo, SC_ComboBoxEditField, widget);
+            const int spacing = proxy()->pixelMetric(PM_LayoutHorizontalSpacing, combo, widget);
+            if (!combo->currentIcon.isNull()) {
+                const QIcon::Mode mode = combo->state & State_Enabled ? QIcon::Normal
+                                                             : QIcon::Disabled;
+                const QPixmap pixmap = combo->currentIcon.pixmap(combo->iconSize, mode);
+                QRect iconRect(editRect);
+                iconRect.setWidth(combo->iconSize.width() + spacing);
+                iconRect = alignedRect(combo->direction,
+                                       Qt::AlignLeft | Qt::AlignVCenter,
+                                       iconRect.size(), editRect);
+                if (combo->editable)
+                    painter->fillRect(iconRect, combo->palette.brush(QPalette::Base));
+                proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap);
+
+                if (combo->direction == Qt::RightToLeft)
+                    editRect.translate(-spacing - combo->iconSize.width(), 0);
+                else
+                    editRect.translate(combo->iconSize.width() + spacing, 0);
+            }
+            if (!combo->currentText.isEmpty() && !combo->editable) {
+                const Qt::TextElideMode elideMode = (combo->direction == Qt::LeftToRight) ? Qt::ElideRight : Qt::ElideLeft;
+                const QString txt = combo->fontMetrics.elidedText(combo->currentText, elideMode, editRect.width());
+                proxy()->drawItemText(painter, editRect.adjusted(1, 0, -1, 0),
+                             visualAlignment(combo->direction, Qt::AlignLeft | Qt::AlignVCenter),
+                             combo->palette, combo->state & State_Enabled, txt);
+            }
+        }
+        break;
+#endif // QT_NO_COMBOBOX
+#endif //QT_NO_TABBAR
+        case CE_PushButton: {
+            if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(option)) {
+                proxy()->drawControl(CE_PushButtonBevel, btn, painter, widget);
+                QStyleOptionButton subopt = *btn;
+                subopt.rect = subElementRect(SE_PushButtonContents, btn, widget);
+                proxy()->drawControl(CE_PushButtonLabel, &subopt, painter, widget);
+                if ((btn->state & State_HasFocus)) {
+                    QStyleOptionFocusRect fropt;
+                    fropt.QStyleOption::operator=(*btn);
+                    fropt.rect = subElementRect(SE_PushButtonFocusRect, btn, widget);
+                    proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget);
+                }
+            }
+            break;
+        }
+        case CE_PushButtonBevel: {
+            if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
+                const bool isDisabled = !(button->state & State_Enabled);
+                const bool isFlat = button->features & QStyleOptionButton::Flat;
+                const bool isPressed = (button->state & State_Sunken) ||
+                                       (button->state & State_On);
+                // 'latched' is a checkable button that is pressed down
+                const QPushButton *pbutton = qobject_cast<const QPushButton *>(widget);
+                const bool isLatched = (!pbutton) ? false : (pbutton->isCheckable() && isPressed);
+
+                ItemStates state = (isDisabled) ? SS_Disabled : SS_Active;
+                if (isLatched)
+                    state = state | SS_Latched;
+                else if (isPressed)
+                    state = state | SS_Pressed;
+
+                if (button->state & State_Selected || button->state & State_HasFocus)
+                    state = state | SS_Selected;
+
+                //todo: does Hb have flat buttons?
+                if (button->features & QStyleOptionButton::HasMenu) {
+                    //draw menu indicator
+                    const int menuButtonIndicator = proxy()->pixelMetric(PM_MenuButtonIndicator, button, widget);
+                    QStyleOptionButton menuOpt = *button;
+                    menuOpt.rect = QRect(button->rect.right() - menuButtonIndicator,
+                                         button->rect.y() + (button->rect.height() - menuButtonIndicator) / 2,
+                                         menuButtonIndicator,
+                                         menuButtonIndicator);
+                    menuOpt.rect = visualRect(button->direction, button->rect, menuOpt.rect);
+                    proxy()->drawPrimitive(PE_IndicatorArrowDown, &menuOpt, painter, widget);
+                }
+                if (isFlat) //lets draw flat buttons as toolbuttons
+                    m_private->drawMultiPartItem(SM_ToolButton, painter, button->rect, state);
+                else
+                    m_private->drawMultiPartItem(SM_PushButton, painter, button->rect, state);
+                }
+            break;
+        }
+        case CE_MenuScroller: {
+            ItemStates states = (option->state & State_DownArrow) ? SS_Down : SS_Up;
+            painter->fillRect(option->rect, option->palette.background());
+            m_private->drawMultiPartItem(SM_MenuScroller, painter, option->rect, states);
+            QStyleOption arrowOpt = *option;
+            arrowOpt.state |= State_Enabled;
+            const int side = proxy()->pixelMetric(PM_MenuScrollerHeight, option, widget);
+            arrowOpt.rect = option->rect;
+            arrowOpt.rect.setWidth(side);
+            arrowOpt.rect.moveCenter(option->rect.center());
+            proxy()->drawPrimitive(((option->state & State_DownArrow) ? PE_IndicatorArrowDown : PE_IndicatorArrowUp),
+                    &arrowOpt, painter, widget);
+            break;
+        }
+        case CE_MenuItem: {
+            if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
+                if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
+                    const int margin = proxy()->pixelMetric(PM_MenuHMargin, menuItem, widget);
+                    const int yoff = menuItem->rect.y() - 1 + menuItem->rect.height() / 2;
+                    const int startX = menuItem->rect.x() + margin;
+                    const int endX = menuItem->rect.x() + menuItem->rect.width() - margin;
+                    QRect separatorRect = QRect(QPoint(startX, yoff), QPoint(endX, yoff));
+                    m_private->drawItem(SP_MenuSeparator, painter, separatorRect);
+                    return;
+                }
+
+                const bool isDisabled = !(menuItem->state & State_Enabled);
+                const bool isSelected = (menuItem->state & State_Selected);
+                const bool isPressed = (menuItem->state & State_Sunken) || (menuItem->state & State_Raised);
+                ItemStates state = (isDisabled) ? SS_Disabled : SS_Active;
+
+                if (isSelected)
+                    state = state | SS_Selected;
+
+                if (isPressed)
+                    state = state | SS_Pressed;
+
+                m_private->drawMultiPartItem(SM_MenuItem, painter, menuItem->rect, state);
+
+                uint text_flags = Qt::AlignLeading | Qt::TextShowMnemonic | Qt::TextDontClip
+                    | Qt::TextSingleLine | Qt::AlignVCenter;
+                if (!styleHint(SH_UnderlineShortcut, menuItem, widget))
+                    text_flags |= Qt::TextHideMnemonic;
+
+                if (menuItem->menuHasCheckableItems) {
+                    const QRect checkBoxRect = subElementRect(SE_ViewItemCheckIndicator, menuItem, widget);
+                    if (checkBoxRect.isValid()) {
+                        ItemStates checkBoxState;
+                        if (menuItem->checked) checkBoxState |= SS_Selected;
+                        if (menuItem->direction == Qt::RightToLeft) checkBoxState |= SS_Mirrored;
+                        m_private->drawItem(SP_ItemDecoration, painter, checkBoxRect, checkBoxState);
+                    }
+                }
+
+                if (!menuItem->icon.isNull()) {
+                    const QRect iconRect = subElementRect(SE_ItemViewItemDecoration, menuItem, widget);
+                    if (iconRect.isValid()) {
+                        QPixmap pix = menuItem->icon.pixmap(pixelMetric(PM_SmallIconSize),
+                                !isDisabled ? QIcon::Normal : QIcon::Disabled);
+                        drawItemPixmap(painter, iconRect, text_flags, pix);
+                    }
+                }
+
+                if (menuItem->text.length() > 0) {
+                    const QRect textRect = subElementRect(SE_ItemViewItemText, menuItem, widget);
+                    if (textRect.isValid())
+                        QCommonStyle::drawItemText(painter, textRect, text_flags, menuItem->palette,
+                            (menuItem->state & State_Enabled), menuItem->text, QPalette::Text);
+                }
+            }
+            break;
+        }
+        case CE_MenuBarEmptyArea:
+        case CE_MenuEmptyArea: {
+            break;
+        }
+#ifndef QT_NO_PROGRESSBAR
+        case CE_ProgressBar: {
+            if (const QStyleOptionProgressBarV2 *progressBar = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(option)) {
+                drawControl(CE_ProgressBarGroove, progressBar, painter, widget);
+                drawControl(CE_ProgressBarContents, progressBar, painter, widget);
+                //drawControl(CE_ProgressBarLabel, progressBar, painter, widget);
+            }
+            break;
+        }
+        case CE_ProgressBarGroove: {
+            if (const QStyleOptionProgressBarV2 *progressBar = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(option)) {
+                const QRect progressBarGroove = subElementRect(SE_ProgressBarGroove, progressBar, widget);
+                const bool horizontal = progressBar->orientation == Qt::Horizontal;
+                ItemStates state = 0;
+                if (horizontal)
+                    state = state | SS_Horizontal;
+                else
+                    state = state | SS_Vertical;
+
+                m_private->drawMultiPartItem(SM_ProgressBarGroove, painter, progressBarGroove, state);
+            }
+            break;
+        }
+        case CE_ProgressBarContents: {
+            if (const QStyleOptionProgressBarV2 *progressBar = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(option)) {
+                if (progressBar->minimum == 0 && progressBar->maximum == 0) {
+                    //waiting bar
+                    animateControl(CE_ProgressBarContents, option, painter, widget);
+                } else {
+                    QRect rect = subElementRect(SE_ProgressBarGroove, progressBar, widget);
+                    const qint64 minimum = qint64(progressBar->minimum);
+                    const qint64 maximum = qint64(progressBar->maximum);
+                    const qint64 progress = qint64(progressBar->progress);
+                    if (progressBar->orientation == Qt::Horizontal) {
+                        const qreal scale = rect.width() / qreal(maximum - minimum);
+                        qint64 width = scale * progress;
+                        width = progress >= maximum ? rect.width() : width;
+
+                        if ((progressBar->direction == Qt::LeftToRight) ^ progressBar->invertedAppearance) {
+                            rect = QRect(rect.x(), rect.y(), width, rect.height());
+                        } else {
+                            rect = QRect(rect.x() + (rect.width() - width), rect.y(), rect.width() - (rect.width() - width), rect.height());
+                        }
+                        m_private->drawMultiPartItem(SM_ProgressBarIndicator, painter, rect, SS_Horizontal);
+                    } else{ //Vertical
+                        const qreal scale = rect.height() / qreal(maximum - minimum);
+                        qint64 height = scale * progress;
+                        height = progress >= maximum ? rect.height() : height;
+                        if (progressBar->invertedAppearance) {
+                            rect = QRect(rect.x(), rect.y(), rect.width(), height);
+                        } else {
+                            rect = QRect(rect.x(), rect.y() + (rect.height() - height), rect.width(), rect.height() - (rect.height() - height));
+                        }
+                        m_private->drawMultiPartItem(SM_ProgressBarIndicator, painter, rect, SS_Vertical);
+                    }
+                }
+            }
+            break;
+        }
+        case CE_ProgressBarLabel: {
+            if (const QStyleOptionProgressBarV2 *progressBar = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(option)) {
+                if (progressBar->textVisible && (progressBar->minimum != 0 || progressBar->maximum != 0)) {
+                    const QString minText = QString().setNum(progressBar->minimum);
+                    const QString maxText = QString().setNum(progressBar->maximum);
+                    const QRect textRect = subElementRect(SE_ProgressBarGroove, progressBar, widget);
+                    if (progressBar->orientation == Qt::Horizontal) {
+                        if (progressBar->invertedAppearance) {
+                            //minText
+                            proxy()->drawItemText(painter, textRect, Qt::AlignRight | Qt::TextSingleLine, progressBar->palette,
+                                         progressBar->state & State_Enabled, minText, QPalette::Text);
+
+                            //maxText
+                            proxy()->drawItemText(painter, textRect, Qt::AlignLeft | Qt::TextSingleLine, progressBar->palette,
+                                         progressBar->state & State_Enabled, maxText, QPalette::Text);
+
+                        } else {
+                            //minText
+                            proxy()->drawItemText(painter, textRect, Qt::AlignLeft | Qt::TextSingleLine, progressBar->palette,
+                                         progressBar->state & State_Enabled, minText, QPalette::Text);
+
+                            //maxText
+                            proxy()->drawItemText(painter, textRect, Qt::AlignRight | Qt::TextSingleLine, progressBar->palette,
+                                         progressBar->state & State_Enabled, maxText, QPalette::Text);
+                        }
+                    } else { //Vertical
+                        if (progressBar->invertedAppearance) {
+                            //minText
+                            proxy()->drawItemText(painter, textRect, Qt::AlignTop | Qt::TextSingleLine, progressBar->palette,
+                                         progressBar->state & State_Enabled, minText, QPalette::Text);
+
+                            //maxText
+                            proxy()->drawItemText(painter, textRect, Qt::AlignBottom | Qt::TextSingleLine, progressBar->palette,
+                                         progressBar->state & State_Enabled, maxText, QPalette::Text);
+
+                        } else {
+                            //minText
+                            proxy()->drawItemText(painter, textRect, Qt::AlignBottom | Qt::TextSingleLine, progressBar->palette,
+                                         progressBar->state & State_Enabled, minText, QPalette::Text);
+
+                            //maxText
+                            proxy()->drawItemText(painter, textRect, Qt::AlignTop | Qt::TextSingleLine, progressBar->palette,
+                                         progressBar->state & State_Enabled, maxText, QPalette::Text);
+                        }
+
+                    }
+
+                }
+            }
+            break;
+        }
+#endif //QT_NO_PROGRESSBAR
+        case CE_ToolButtonLabel:
+        default: {
+            QCommonStyle::drawControl(element, option, painter, widget);
+            break;
+        }
+    }
+}
+
+void QHbStyle::drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
+                            QPainter *painter, const QWidget *widget) const
+{
+    switch (control) {
+#ifndef QT_NO_COMBOBOX
+        case CC_ComboBox: {
+            if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
+                const QRect cmbxFrame = cmb->rect;
+
+                const bool isDisabled = !(cmb->state & State_Enabled);
+                ItemStates state = (isDisabled) ? SS_Disabled : SS_Active;
+
+                if (cmb->state & State_Active &&
+                    cmb->state & State_Enabled &&
+                    !cmb->state & State_HasFocus &&
+                    !cmb->state & State_MouseOver &&
+                    !cmb->state & State_Selected) {
+                    state |= SS_Active;
+                }
+                if (cmb->state & State_Active &&
+                    cmb->state & State_Enabled &&
+                    cmb->state & State_On &&
+                    !cmb->state & State_HasFocus &&
+                    !cmb->state & State_MouseOver &&
+                    !cmb->state & State_Selected) {
+                    state |= SS_Active;
+                }
+                else if (cmb->state & State_Active &&
+                         cmb->state & State_Enabled &&
+                         cmb->state & State_HasFocus &&
+                         cmb->state & State_MouseOver &&
+                         cmb->state & State_Selected) {
+                    state |= SS_Pressed;
+                }
+                else if (cmb->state & State_Active &&
+                         cmb->state & State_Enabled &&
+                         cmb->state & State_HasFocus &&
+                         cmb->state & State_MouseOver) {
+                    state |= SS_Pressed;
+                }
+               /* else if (cmb->state & State_Active &&
+                         cmb->state & State_Enabled &&
+                         cmb->state & State_Sunken) {
+                    state |= SS_Pressed;
+                }*/
+
+                // Button frame
+                QStyleOptionFrame  buttonOption;
+                buttonOption.QStyleOption::operator=(*cmb);
+                const int buttonMaxHeight = cmbxFrame.height();
+                const int buttonMaxWidth = buttonMaxHeight; //button is rect
+                const int topLeftPoint = (cmb->direction == Qt::LeftToRight) ? (cmbxFrame.width() - buttonMaxWidth) : 0;
+
+                const QRect buttonRect(topLeftPoint, cmbxFrame.top(), buttonMaxHeight, buttonMaxWidth);
+                if (cmb->direction == Qt::RightToLeft){
+
+                    state |= SS_Mirrored;
+                }
+
+                if (cmb->subControls & SC_ComboBoxFrame) {
+
+                    QRect frameRect = QRect(cmb->rect);
+                    int frameWidth = pixelMetric(PM_DefaultFrameWidth);
+                    int maxRight = cmb->rect.height() - 2 * frameWidth;
+                    frameRect.adjust(0, 0, -maxRight, 0);
+
+                    const QRect frame = subControlRect(CC_ComboBox, option, SC_ComboBoxFrame, widget);
+                    //Draw the frame
+                    m_private->drawMultiPartItem(SM_BoxFrame, painter, frame, state);
+                }
+                //Draw the dropdown button
+                m_private->drawItem(SP_BoxButton, painter, buttonRect, state); //@todo: remove magic
+            }
+            break;
+        }
+#endif //QT_NO_COMBOBOX
+#ifndef QT_NO_SLIDER
+        case CC_Slider: {
+            if (const QStyleOptionSlider *optionSlider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
+                const QSlider* slider = qobject_cast<const QSlider*>(widget);
+                const QRect sliderGroove = subControlRect(control, optionSlider, SC_SliderGroove, widget);
+                const QRect sliderHandle = subControlRect(control, optionSlider, SC_SliderHandle, widget);
+                const bool horizontal = optionSlider->orientation == Qt::Horizontal;
+                const bool isDisabled = !(optionSlider->state & State_Enabled);
+                ItemStates grooveState = (isDisabled) ? SS_Disabled : SS_Active;
+                if (horizontal)
+                    grooveState = grooveState | SS_Horizontal;
+                else
+                    grooveState = grooveState | SS_Vertical;
+
+                ItemStates handleState = grooveState;
+
+                if (slider && slider->isSliderDown())
+                    handleState = handleState | SS_Pressed;
+                else if ((optionSlider->state & State_Sunken) || (optionSlider->state & State_On))
+                    grooveState = grooveState | SS_Pressed;
+
+                //Draw ticks
+                if (optionSlider->subControls & SC_SliderTickmarks) {
+                    const QRect tickRect = subControlRect(control, optionSlider, SC_SliderTickmarks, widget);
+                    const bool ticksAbove = optionSlider->tickPosition & QSlider::TicksAbove;
+                    const bool ticksBelow = optionSlider->tickPosition & QSlider::TicksBelow;
+
+                    int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, optionSlider, widget);
+                    const int thickness = proxy()->pixelMetric(PM_SliderControlThickness, optionSlider, widget);
+                    const int available = proxy()->pixelMetric(PM_SliderSpaceAvailable, optionSlider, widget);
+                    int interval = optionSlider->tickInterval;
+                    if (interval <= 0) {
+                        interval = optionSlider->singleStep;
+                        if (sliderPositionFromValue(optionSlider->minimum, optionSlider->maximum, interval,available)
+                            - sliderPositionFromValue(optionSlider->minimum, optionSlider->maximum, 0, available) < 3)
+                            interval = optionSlider->pageStep;
+                    }
+                    if (!interval)
+                        interval = 1;
+                    int pos;
+                    const int fudge = proxy()->pixelMetric(PM_SliderLength, optionSlider, widget) / 2;
+                    // Since there is no subrect for tickmarks do a translation here.
+                    int v = optionSlider->minimum;
+
+                    while (v <= (optionSlider->maximum + 1)) {
+                        if ((v == optionSlider->maximum + 1) && (interval == 1))
+                            break;
+                        const int v_ = qMin(v, optionSlider->maximum);
+                        pos = sliderPositionFromValue(optionSlider->minimum, optionSlider->maximum,
+                                                              v_, available) + fudge;
+                        QRect destRect = QRect();
+                        if (horizontal) {
+                            if (ticksAbove) {
+                                destRect = QRect(pos, tickRect.y() - tickOffset + 1, tickRect.width(), tickRect.height());
+                                m_private->drawItem(SP_SliderTick, painter, destRect, grooveState);
+                            }
+                            if (ticksBelow) {
+                                destRect = QRect(pos, tickOffset + thickness - 1, tickRect.width(), tickRect.height());
+                                m_private->drawItem(SP_SliderTick, painter, destRect, grooveState);
+                            }
+                        } else {
+                            if (ticksAbove) {
+                                destRect = QRect(tickRect.x() - tickOffset + 1, pos, tickRect.width(), tickRect.height());
+                                m_private->drawItem(SP_SliderTick, painter, destRect, grooveState);
+                            }
+                            if (ticksBelow) {
+                                destRect = QRect(tickOffset + thickness - 1, pos, tickRect.width(), tickRect.height());
+                                m_private->drawItem(SP_SliderTick, painter, destRect, grooveState);
+                            }
+                        }
+                        // in the case where maximum is max int
+                        int nextInterval = v + interval;
+                        if (nextInterval < v)
+                            break;
+                        v = nextInterval;
+                    }
+                }
+
+                QRect filledRect;
+                QRect filledRectMask;
+                if ( horizontal ){
+                    if (slider && (slider->layoutDirection() == Qt::LeftToRight) ^ slider->invertedAppearance()){
+                        filledRect = QRect( sliderGroove.x(),
+                                            sliderGroove.y(),
+                                            qMax(sliderGroove.width()-sliderHandle.right(), sliderHandle.right()),
+                                            sliderGroove.height());
+
+                        int x = qMin(sliderHandle.left(), sliderGroove.x() + sliderGroove.width()-sliderHandle.right());
+                        filledRectMask = QRect(x,
+                                               sliderGroove.y(),
+                                               sliderGroove.width()-x,
+                                               sliderGroove.height());
+                    } else {
+                        filledRect = QRect( qMin(sliderGroove.width()-sliderHandle.left(),sliderHandle.left()),
+                                            sliderGroove.y(),
+                                            qMax(sliderGroove.width()-sliderHandle.left(), sliderHandle.left()),
+                                            sliderGroove.height());
+
+                        filledRectMask = QRect( sliderGroove.x(),
+                                                sliderGroove.y(),
+                                                qMax(sliderGroove.width()-sliderHandle.right(), sliderHandle.right()),
+                                                sliderGroove.height());
+
+                    }
+                } else {
+                    if (slider && (slider->layoutDirection() == Qt::LeftToRight) ^ slider->invertedAppearance()){
+                        filledRect = QRect(sliderGroove.x(),
+                                           qMin(sliderGroove.height()-sliderHandle.top(), sliderHandle.top()),
+                                           sliderGroove.width(),
+                                           qMax(sliderGroove.height()-sliderHandle.top(), sliderHandle.top()));
+
+                        filledRectMask = QRect(sliderGroove.x(),
+                                               sliderGroove.y(),
+                                               sliderGroove.width(),
+                                               qMax(sliderGroove.height()-sliderHandle.bottom(), sliderHandle.bottom()));
+                    } else {
+                        filledRect = QRect(sliderGroove.x(),
+                                           sliderGroove.y(),
+                                           sliderGroove.width(),
+                                           qMax(sliderGroove.height()-sliderHandle.bottom(),sliderHandle.bottom()));
+
+                        int y = qMin(sliderHandle.top(), sliderGroove.y() + sliderGroove.height()-sliderHandle.bottom());
+                        filledRectMask = QRect( sliderGroove.x(),
+                                                y,
+                                                sliderGroove.width(),
+                                                sliderGroove.height()-y );
+                    }
+                }
+
+                if (filledRect.width() <  filledRectMask.width() || filledRect.height() <  filledRectMask.height()){
+                    // Progress + groove
+                    m_private->drawMultiPartItem(SM_SliderGroove, painter, filledRect, grooveState );
+                    m_private->drawMultiPartItem(SM_SliderProgress, painter, filledRect, grooveState | SS_Filled);
+
+                    // Groove
+                    m_private->drawMultiPartItem(SM_SliderGroove, painter, filledRectMask, grooveState);
+                } else {
+                    // Groove
+                    m_private->drawMultiPartItem(SM_SliderGroove, painter, filledRectMask, grooveState);
+
+                    // Progess + groove
+                    m_private->drawMultiPartItem(SM_SliderGroove, painter, filledRect, grooveState );
+                    m_private->drawMultiPartItem(SM_SliderProgress, painter, filledRect, grooveState | SS_Filled);
+                }
+
+                //handle
+                m_private->drawItem(SP_SliderHandle, painter, sliderHandle, handleState);
+            }
+            break;
+        }
+#endif //QT_NO_SLIDER
+#ifndef QT_NO_SCROLLBAR
+        case CC_ScrollBar: {
+            if (const QStyleOptionSlider *optionSlider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
+                ItemStates handleStates;
+                ItemStates grooveStates;
+                const bool horizontal = optionSlider->orientation == Qt::Horizontal;
+                const QRect handleRect = subControlRect(control, optionSlider, SC_ScrollBarSlider, widget);
+                const QRect grooveRect = subControlRect(control, optionSlider, SC_ScrollBarGroove, widget);
+                if (horizontal) {
+                    handleStates |= SS_Horizontal;
+                    grooveStates |= SS_Horizontal;
+                } else {
+                    handleStates |= SS_Vertical;
+                    grooveStates |= SS_Vertical;
+                }
+                const SubControls subControls = optionSlider->subControls;
+                const bool sliderPressed = ((optionSlider->state & State_Sunken) && (subControls & SC_ScrollBarSlider));
+                const bool groovePressed = ((optionSlider->state & State_Sunken) && (subControls & SC_ScrollBarGroove));
+
+                if (sliderPressed)
+                    handleStates |= SS_Pressed;
+                if (groovePressed)
+                    grooveStates |= SS_Pressed;
+
+                m_private->drawMultiPartItem(SM_ScrollBarGroove, painter, grooveRect, grooveStates);
+                m_private->drawMultiPartItem(SM_ScrollBarHandle, painter, handleRect, handleStates);
+            }
+            break;
+        }
+#endif // QT_NO_SCROLLBAR
+#ifndef QT_NO_GROUPBOX
+        case CC_GroupBox: {
+            if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(option)) {
+                // Draw frame
+                const QRect textRect = subControlRect(CC_GroupBox, option, SC_GroupBoxLabel, widget);
+
+                QRect headerRect = textRect;
+                headerRect.setWidth(groupBox->rect.width());
+                if (groupBox->subControls & SC_GroupBoxFrame) {
+                    QStyleOptionFrameV2 frame;
+                    frame.QStyleOption::operator=(*groupBox);
+                    frame.features = groupBox->features;
+                    frame.lineWidth = groupBox->lineWidth;
+                    frame.midLineWidth = groupBox->midLineWidth;
+                    frame.rect = subControlRect(CC_GroupBox, option, SC_GroupBoxFrame, widget);
+                    proxy()->drawPrimitive(PE_FrameGroupBox, &frame, painter, widget);
+                }
+
+                // Draw title
+                if ((groupBox->subControls & SC_GroupBoxLabel) && !groupBox->text.isEmpty()) {
+                    // Draw title background
+                    m_private->drawMultiPartItem(SM_GroupBoxTitle, painter, headerRect);
+
+                    const QColor textColor = groupBox->textColor;
+                    painter->save();
+
+                    if (textColor.isValid())
+                        painter->setPen(textColor);
+                    int alignment = int(groupBox->textAlignment);
+                    if (!styleHint(SH_UnderlineShortcut, option, widget))
+                        alignment |= Qt::TextHideMnemonic;
+
+                    proxy()->drawItemText(painter, headerRect,  Qt::TextShowMnemonic | Qt::AlignHCenter | Qt::AlignVCenter | alignment,
+                                 groupBox->palette, groupBox->state & State_Enabled, groupBox->text,
+                                 textColor.isValid() ? QPalette::NoRole : QPalette::WindowText);
+                    painter->restore();
+                }
+                const QRect checkBoxRect = subControlRect(CC_GroupBox, option, SC_GroupBoxCheckBox, widget);
+                // Draw checkbox
+                if (groupBox->subControls & SC_GroupBoxCheckBox) {
+                    QStyleOptionButton box;
+                    box.QStyleOption::operator=(*groupBox);
+                    box.rect = checkBoxRect;
+                    proxy()->drawPrimitive(PE_IndicatorCheckBox, &box, painter, widget);
+                }
+            }
+            break;
+        }
+#endif //QT_NO_GROUPBOX
+#ifndef QT_NO_TOOLBUTTON
+        case CC_ToolButton: {
+            if (const QStyleOptionToolButton *toolBtn = qstyleoption_cast<const QStyleOptionToolButton *>(option)) {
+                const QRect buttonRect(subControlRect(control, toolBtn, SC_ToolButton, widget));
+                QRect menuRect = QRect();
+                if (toolBtn->subControls & SC_ToolButtonMenu)
+                    menuRect = subControlRect(control, toolBtn, SC_ToolButtonMenu, widget);
+
+                // Draw button bevel
+                if (toolBtn->subControls & SC_ToolButton)
+                    proxy()->drawPrimitive(PE_PanelButtonTool, toolBtn, painter, widget);
+
+                //draw focus
+                if (toolBtn->state & State_HasFocus) {
+                    QStyleOptionFocusRect frameOpt;
+                    frameOpt.QStyleOption::operator=(*toolBtn);
+                    frameOpt.rect = subElementRect(SE_PushButtonFocusRect, toolBtn, widget); //can we use this, or should we just reduce the button rect?
+                    if (toolBtn->features & QStyleOptionToolButton::MenuButtonPopup)
+                        frameOpt.rect.adjust(0, 0, -proxy()->pixelMetric(PM_MenuButtonIndicator), 0);
+                    proxy()->drawPrimitive(PE_FrameFocusRect, &frameOpt, painter, widget);
+                }
+
+                if (toolBtn->text.length() > 0 || !toolBtn->icon.isNull() || (toolBtn->features & QStyleOptionToolButton::Arrow)) {
+                    //draw label
+                    QStyleOptionToolButton label = *toolBtn;
+                    int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, option, widget);
+                    label.rect = buttonRect.adjusted(fw, fw, -fw, -fw);
+                    proxy()->drawControl(CE_ToolButtonLabel, &label, painter, widget);
+                }
+                if (toolBtn->subControls & SC_ToolButtonMenu) {
+                    //draw menu indicator
+                    const int menuButtonIndicator = proxy()->pixelMetric(PM_MenuButtonIndicator, toolBtn, widget);
+                    QStyleOptionToolButton menuOpt = *toolBtn;
+                    menuOpt.rect = QRect(toolBtn->rect.right() - menuButtonIndicator,
+                                        toolBtn->rect.y() + (toolBtn->rect.height() - menuButtonIndicator) / 2,
+                                        menuButtonIndicator,
+                                        menuButtonIndicator);
+                    menuOpt.rect = visualRect(toolBtn->direction, toolBtn->rect, menuOpt.rect);
+
+                    PrimitiveElement pe;
+                    bool arrow = true;
+                    switch(toolBtn->arrowType) {
+                        case Qt::UpArrow: {
+                            pe = PE_IndicatorArrowUp;
+                            break;
+                        }
+                        case Qt::LeftArrow: {
+                            pe = PE_IndicatorArrowLeft;
+                            break;
+                        }
+                        case Qt::RightArrow: {
+                            pe = PE_IndicatorArrowRight;
+                            break;
+                        }
+                        case Qt::DownArrow: {
+                            pe = PE_IndicatorArrowDown;
+                            break;
+                        }
+                        default: {
+                            arrow = false;
+                        }
+                    }
+                    if (arrow)
+                        proxy()->drawPrimitive(pe, &menuOpt, painter, widget);
+                }
+            }
+            break;
+        }
+#endif //QT_NO_TOOLBUTTON
+        case CC_SpinBox: {
+            if (const QStyleOptionSpinBox *optionSpinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
+                const QRect spinboxFrame = subControlRect(control, optionSpinbox, SC_SpinBoxFrame, widget);
+                const QRect spinboxButtonUpRect = subControlRect(control, optionSpinbox, SC_SpinBoxUp, widget);
+                const QRect spinboxButtonDownRect = subControlRect(control, optionSpinbox, SC_SpinBoxDown, widget);
+                const QRect spinboxEditorRect = subControlRect(control, optionSpinbox, SC_SpinBoxEditField, widget);
+
+                //Frame & background
+                const bool isDisabled = !(optionSpinbox->state & State_Enabled);
+                ItemStates state = (isDisabled) ? SS_Disabled : SS_Active;
+                if (optionSpinbox->state & State_HasFocus)
+                    state |= SS_Selected;
+                //Draw the rounded border of edit field frame under button, half spin button width
+                //Label drawn to spinboxEditorRect
+                m_private->drawMultiPartItem(SM_BoxFrame, painter, spinboxEditorRect.adjusted((-0.5*spinboxButtonDownRect.width()),0,0,0), state);
+
+
+                QStyle::State buttonState;
+                //Buttons
+                if (optionSpinbox->subControls & SC_SpinBoxUp) {
+                    if (!(optionSpinbox->stepEnabled & QAbstractSpinBox::StepUpEnabled))
+                        buttonState &= ~State_Enabled;
+                    if (optionSpinbox->activeSubControls == SC_SpinBoxUp && (optionSpinbox->state & State_Sunken)) {
+                        buttonState |= State_On;
+                        buttonState |= State_Sunken;
+                    } else {
+                        buttonState |= State_Raised;
+                        buttonState &= ~State_Sunken;
+                    }
+                    const bool isPressed = (buttonState & State_Sunken);
+                    ItemStates upButtonState = (isPressed) ? ItemStates(SS_Pressed  | SS_Active) : ItemStates(SS_Active);
+                    if (optionSpinbox->direction == Qt::RightToLeft)
+                        upButtonState = upButtonState | SS_Flipped;
+                    else
+                        upButtonState = upButtonState | SS_Flipped | SS_Mirrored;
+                    if (optionSpinbox->state & State_HasFocus)
+                        upButtonState |= SS_Selected;
+                    if (!(optionSpinbox->stepEnabled & QAbstractSpinBox::StepUpEnabled))
+                        upButtonState |= SS_Disabled;
+                    m_private->drawItem(SP_BoxButton, painter, spinboxButtonUpRect, upButtonState);
+                }
+
+                if (optionSpinbox->subControls & SC_SpinBoxDown) {
+                    if (!(optionSpinbox->stepEnabled & QAbstractSpinBox::StepDownEnabled))
+                        buttonState &= ~State_Enabled;
+                    if (optionSpinbox->activeSubControls == SC_SpinBoxDown && (optionSpinbox->state & State_Sunken)) {
+                        buttonState |= State_On;
+                        buttonState |= State_Sunken;
+                    } else {
+                        buttonState |= State_Raised;
+                        buttonState &= ~State_Sunken;
+                    }
+                    const bool isPressed = (buttonState & State_Sunken);
+                    ItemStates downButtonState = (isPressed) ? ItemStates(SS_Pressed  | SS_Active) : ItemStates(SS_Active);
+                    if (optionSpinbox->direction == Qt::RightToLeft)
+                        downButtonState = downButtonState;
+                    else
+                        downButtonState = downButtonState | SS_Mirrored;
+                    if (optionSpinbox->state & State_HasFocus)
+                        downButtonState |= SS_Selected;
+                    if (!(optionSpinbox->stepEnabled & QAbstractSpinBox::StepDownEnabled))
+                        downButtonState |= SS_Disabled;
+                    m_private->drawItem(SP_BoxButton, painter, spinboxButtonDownRect, downButtonState);
+                }
+            }
+            break;
+        }
+        case CC_TitleBar:
+        case CC_Q3ListView:
+        case CC_Dial:
+        case CC_MdiControls:
+        default: {
+            QCommonStyle::drawComplexControl(control, option, painter, widget);
+            break;
+        }
+    }
+}
+
+QSize QHbStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
+                           const QSize &size, const QWidget *widget) const
+{
+    QSize newSize = QCommonStyle::sizeFromContents(type, option, size, widget);
+    switch (type) {
+#ifndef QT_NO_MENU
+        case CT_MenuItem: {
+            if (qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
+                const int verticalMargin = pixelMetric(PM_MenuVMargin);
+                const int horizontalMargin = pixelMetric(PM_MenuHMargin);
+                newSize += QSize(horizontalMargin, 2 * verticalMargin);
+            }
+            break;
+        }
+#endif
+#ifndef QT_NO_ITEMVIEWS
+        case CT_ItemViewItem: {
+            newSize += QSize(0,22);
+            break;
+        }
+#endif
+        case CT_PushButton: {
+            newSize += QSize(0, 2 * proxy()->pixelMetric(PM_ButtonMargin, option, widget));
+            break;
+        }
+        default:
+            break;
+    }
+    return newSize;
+}
+
+QRect QHbStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const
+{
+    const QRect baseSize = QCommonStyle::subElementRect(element, option, widget);
+    QRect elementSize = baseSize;
+    switch (element) {
+        case SE_LineEditContents: {
+            qreal metric = 0;
+            m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-middle-horizontal"), metric);
+            const int metricValue = metric + 0.5;
+            elementSize = visualRect(
+                option->direction, option->rect, option->rect.adjusted(metricValue, 0, 0, 0));
+            }
+            break;
+        case SE_ItemViewItemText: {
+            if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
+                elementSize = menuItem->rect;
+                const QRect iconRect = subElementRect(SE_ItemViewItemDecoration, option, widget);
+                const QRect checkBoxRect = subElementRect(SE_ViewItemCheckIndicator, option, widget);
+                const int indicatorSpacing = proxy()->pixelMetric(PM_LayoutHorizontalSpacing, option, widget);
+                int totalXMod = qMax(0, qMax((checkBoxRect.isValid() ? checkBoxRect.topRight().x() : 0),
+                                     (iconRect.isValid() ? iconRect.topRight().x() : 0)));
+                const int widthMod = checkBoxRect.width() + iconRect.width() + indicatorSpacing;
+                totalXMod = (menuItem->direction == Qt::LeftToRight) ? qMax(0, totalXMod - elementSize.topLeft().x()): 0;
+                totalXMod += indicatorSpacing;
+                elementSize.translate(totalXMod, 0);
+                elementSize.setWidth(menuItem->rect.width() - widthMod);
+            } else if (const QStyleOptionViewItemV4 *itemView = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
+                elementSize = itemView->rect;
+                if (itemView->decorationPosition == QStyleOptionViewItem::Left ||
+                    itemView->decorationPosition == QStyleOptionViewItem::Right) {
+                    const QRect iconRect = subElementRect(SE_ItemViewItemDecoration, option, widget);
+                    const QRect checkBoxRect = subElementRect(SE_ViewItemCheckIndicator, option, widget);
+                    const int indicatorSpacing = proxy()->pixelMetric(PM_LayoutHorizontalSpacing, option, widget);
+                    int totalXMod = qMax(0, qMax((checkBoxRect.isValid() ? checkBoxRect.topRight().x() : 0),
+                                         (iconRect.isValid() ? iconRect.topRight().x() : 0)));
+                    const int widthMod = checkBoxRect.width() + iconRect.width() + indicatorSpacing;
+                    totalXMod = (itemView->direction == Qt::LeftToRight) ? qMax(0, totalXMod - elementSize.topLeft().x()): 0;
+                    totalXMod += indicatorSpacing;
+                    elementSize.translate(totalXMod, 0);
+                    elementSize.setWidth(itemView->rect.width() - widthMod);
+                    elementSize = visualRect(itemView->direction, itemView->rect, elementSize);
+                } else {
+                    const QRect iconRect = subElementRect(SE_ItemViewItemDecoration, option, widget);
+                    const bool decoratorOnTop = (itemView->decorationPosition == QStyleOptionViewItem::Top);
+                    if (decoratorOnTop)
+                        elementSize.translate(0, iconRect.height());
+                    else
+                        elementSize.translate(0, -iconRect.height());
+                }
+            }
+            break;
+        }
+        case SE_ViewItemCheckIndicator: {
+            if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
+                if (menuItem->menuHasCheckableItems) {
+                    const int indicatorWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget);
+                    const int htAdjust = (menuItem->rect.height() - indicatorWidth) / 2;
+                    elementSize = QRect(menuItem->rect.x(), menuItem->rect.y() + htAdjust, indicatorWidth, indicatorWidth);
+                    elementSize = visualRect(menuItem->direction, menuItem->rect, elementSize);
+                } else { elementSize = QRect(); }
+            } else if (const QStyleOptionViewItemV4 *itemOption = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
+                if (itemOption->features & QStyleOptionViewItemV2::HasCheckIndicator) {
+                    const int indicatorWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget);
+                    const int htAdjust = (itemOption->rect.height() - indicatorWidth) / 2;
+                    elementSize = QRect(itemOption->rect.x(), itemOption->rect.y() + htAdjust, indicatorWidth, indicatorWidth);
+                    elementSize = visualRect(itemOption->direction, itemOption->rect, elementSize);
+                } else { elementSize = QRect(); }
+            }
+            break;
+        }
+        case SE_ItemViewItemDecoration: {
+            if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
+                if (!menuItem->icon.isNull()) {
+                    const QRect checkBoxRect = subElementRect(SE_ViewItemCheckIndicator, option, widget);
+                    const int imageWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget);
+                    const int indicatorSpacing = proxy()->pixelMetric(PM_LayoutHorizontalSpacing, option, widget);
+                    const int htAdjust = (menuItem->rect.height() - imageWidth) / 2;
+                    if (checkBoxRect.isValid()) {
+                        elementSize = QRect(menuItem->rect.x() + checkBoxRect.width() + indicatorSpacing, menuItem->rect.y() + htAdjust, imageWidth, imageWidth);
+                    } else {
+                        elementSize = QRect(menuItem->rect.x() + indicatorSpacing, menuItem->rect.y() + htAdjust, imageWidth, imageWidth);
+                    }
+                    elementSize = visualRect(menuItem->direction, menuItem->rect, elementSize);
+                } else { elementSize = QRect(); }
+            } else if (const QStyleOptionViewItemV4 *itemOption = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
+                if (!itemOption->icon.isNull()) {
+                    const QRect checkBoxRect = subElementRect(SE_ViewItemCheckIndicator, option, widget);
+                    const int imageWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget);
+                    const int indicatorSpacing = proxy()->pixelMetric(PM_LayoutHorizontalSpacing, option, widget);
+                    const int htAdjust = (itemOption->rect.height() - imageWidth) / 2;
+                    if (checkBoxRect.isValid()) {
+                        elementSize = QRect(itemOption->rect.x() + checkBoxRect.width() + indicatorSpacing, itemOption->rect.y() + htAdjust, imageWidth, imageWidth);
+                    } else {
+                        elementSize = QRect(itemOption->rect.x() + indicatorSpacing, itemOption->rect.y() + htAdjust, imageWidth, imageWidth);
+                    }
+                    elementSize = visualRect(itemOption->direction, itemOption->rect, elementSize);
+                } else { elementSize = QRect(); }
+            }
+            break;
+        }
+        case SE_PushButtonFocusRect: {
+            if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
+                const int margin = proxy()->pixelMetric(PM_FocusFrameHMargin, button, widget);
+                elementSize = baseSize.adjusted(-margin, -margin, margin, margin);
+            }
+            break;
+        }
+        case SE_ProgressBarGroove: {
+            if (const QStyleOptionProgressBarV2 *progressBar = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(option)) {
+                elementSize = progressBar->rect;
+            }
+            break;
+        }
+        default:
+            break;
+    }
+    return elementSize;
+}
+
+QRect QHbStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *option,
+                         SubControl sc, const QWidget *widget) const
+{
+    const QRect baseSize = QCommonStyle::subControlRect(cc, option, sc, widget);
+    QRect elementSize = baseSize;
+    switch (cc) {
+        case CC_ComboBox: {
+            if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
+                const int buttonIconSize = pixelMetric(PM_ButtonIconSize);
+                const int buttonMargin = cmb->frame ? 2 : 0;
+                const int frameThickness = cmb->frame ? pixelMetric(PM_ComboBoxFrameWidth, cmb, widget) : 0;
+                const int buttonWidth = qMax(cmb->rect.height(), buttonIconSize);
+
+                QSize buttonSize;
+                buttonSize.setWidth(buttonWidth + 2 * buttonMargin);
+                buttonSize.setHeight(qMax(8, (cmb->rect.height() >> 1) - frameThickness));
+                buttonSize = buttonSize.expandedTo(QApplication::globalStrut());
+                switch (sc) {
+                    case SC_ComboBoxArrow: {
+                       elementSize = option->rect;
+                       break;
+                   }
+                    case SC_ComboBoxFrame: {
+                        QRect frameRect = QRect(cmb->rect);
+                        int frameWidth = pixelMetric(PM_DefaultFrameWidth, cmb, widget);
+                        int maxRight = cmb->rect.height() - 2 * frameWidth;
+                        if(cmb->direction == Qt::RightToLeft) {
+                            frameRect.adjust(+ 0.25 * buttonWidth, 0, -0.25 * buttonWidth, 0);
+                        }else{
+                            frameRect.adjust(0, 0, -maxRight-4, 0);
+                        }
+                        elementSize = frameRect;
+                        break;
+                    }
+                    case SC_ComboBoxEditField: {
+                        int withFrameX = 0;
+                        int offSet = 0;
+                        if(cmb->direction == Qt::RightToLeft) {
+                            withFrameX = cmb->rect.x() + cmb->rect.width() - frameThickness;
+                            offSet = buttonWidth;
+                        }
+                        else{
+                            withFrameX = cmb->rect.x() + cmb->rect.width() - frameThickness - buttonSize.width();
+                        }
+                        elementSize = QRect(
+                            frameThickness + offSet,
+                            frameThickness - 2,
+                            withFrameX - frameThickness - offSet,
+                            cmb->rect.height() - 2 * frameThickness );
+                        break;
+                    }
+                    case SC_ComboBoxListBoxPopup: {
+                        QRect mover = cmb->rect;
+                        mover.moveBottom(cmb->rect.top() - 2);
+                        elementSize = mover;
+                        break;
+                    }
+                    default:
+                        break;
+                }
+            }
+            break;
+        }
+#ifndef QT_NO_SCROLLBAR
+//todo: this was lifted "as-is" from QS60Style. Check that it is valid for uiemo.
+        case CC_ScrollBar: {
+             if (const QStyleOptionSlider *scrollbarOption = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
+                 const QRect scrollBarRect = scrollbarOption->rect;
+                 const bool isHorizontal = scrollbarOption->orientation == Qt::Horizontal;
+                 const int maxlen = isHorizontal ? scrollBarRect.width() : scrollBarRect.height();
+                 int sliderlen;
+
+                 // calculate slider length
+                 if (scrollbarOption->maximum != scrollbarOption->minimum) {
+                     const uint range = scrollbarOption->maximum - scrollbarOption->minimum;
+                     sliderlen = (qint64(scrollbarOption->pageStep) * maxlen) / (range + scrollbarOption->pageStep);
+
+                     const int slidermin = proxy()->pixelMetric(PM_ScrollBarSliderMin, scrollbarOption, widget);
+                     if (sliderlen < slidermin || range > (INT_MAX >> 1))
+                         sliderlen = slidermin;
+                     if (sliderlen > maxlen)
+                         sliderlen = maxlen;
+                 } else {
+                     sliderlen = maxlen;
+                 }
+
+                 const int sliderstart = sliderPositionFromValue(scrollbarOption->minimum,
+                                                                 scrollbarOption->maximum,
+                                                                 scrollbarOption->sliderPosition,
+                                                                 maxlen - sliderlen,
+                                                                 scrollbarOption->upsideDown);
+
+                 switch (sc) {
+                    case SC_ScrollBarSubPage: {  // between top/left button and slider
+                         if (isHorizontal)
+                             elementSize.setRect(0, 0, sliderstart, scrollBarRect.height());
+                         else
+                             elementSize.setRect(0, 0, scrollBarRect.width(), sliderstart);
+                         break;
+                     }
+                     case SC_ScrollBarAddPage: {         // between bottom/right button and slider
+                         const int addPageLength = sliderstart + sliderlen;
+                         if (isHorizontal)
+                             elementSize = scrollBarRect.adjusted(addPageLength, 0, 0, 0);
+                         else
+                             elementSize = scrollBarRect.adjusted(0, addPageLength, 0, 0);
+                         break;
+                     }
+                     case SC_ScrollBarGroove: {
+                         elementSize = scrollBarRect;
+                         break;
+                     }
+                    case SC_ScrollBarSlider: {
+                         if (scrollbarOption->orientation == Qt::Horizontal)
+                             elementSize.setRect(sliderstart, 0, sliderlen, scrollBarRect.height());
+                         else
+                             elementSize.setRect(0, sliderstart, scrollBarRect.width(), sliderlen);
+                         break;
+                     }
+                     case SC_ScrollBarSubLine:            // top/left button
+                     case SC_ScrollBarAddLine:            // bottom/right button
+                     default: {
+                         break;
+                     }
+                 }
+                 elementSize = visualRect(scrollbarOption->direction, scrollBarRect, elementSize);
+             }
+             break;
+         }
+#endif // QT_NO_SCROLLBAR
+#ifndef QT_NO_GROUPBOX
+        case CC_GroupBox: {
+             if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(option)) {
+                 switch (sc) {
+                     case SC_GroupBoxFrame: {
+                         int topMargin = 0;
+                         int topHeight = 0;
+                         int verticalAlignment = proxy()->styleHint(SH_GroupBox_TextLabelVerticalAlignment, groupBox, widget);
+                         if (groupBox->text.size() || (groupBox->subControls & SC_GroupBoxCheckBox)) {
+                             topHeight = groupBox->fontMetrics.height();
+                             if (verticalAlignment & Qt::AlignVCenter)
+                                 topMargin = topHeight / 2;
+                             else if (verticalAlignment & Qt::AlignTop)
+                                 topMargin = topHeight;
+                         }
+
+                         QRect frameRect = groupBox->rect;
+                         frameRect.setTop(topMargin);
+                         elementSize = frameRect;
+                         break;
+                     }
+                     case SC_GroupBoxContents: {
+                         const QRect titleRect = proxy()->subControlRect(cc, option, SC_GroupBoxLabel, widget);
+                         const QRect frameRect = proxy()->subControlRect(cc, option, SC_GroupBoxFrame, widget);
+                         elementSize = frameRect;
+                         elementSize.setHeight(frameRect.height() + titleRect.height());
+                         elementSize.translate((groupBox->direction == Qt::LeftToRight) ? titleRect.bottomLeft() : titleRect.bottomRight());
+                         break;
+                     }
+                     case SC_GroupBoxCheckBox:
+                     case SC_GroupBoxLabel: {
+                         QFontMetrics fontMetrics = groupBox->fontMetrics;
+                         const int height = fontMetrics.height();
+                         //margins
+                         int labelTopMargin = 0; int labelBottomMargin = 0;
+                         m_private->hbParameter(QLatin1String("hb-param-margin-gene-top"), labelTopMargin);
+                         m_private->hbParameter(QLatin1String("hb-param-margin-gene-bottom"), labelBottomMargin);
+
+                         //height
+                         const int indicatorHeight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget);
+                         elementSize = groupBox->rect;
+                         elementSize.setHeight(qMax(height, indicatorHeight) + labelTopMargin + labelBottomMargin);
+
+                         const int indicatorSpace = proxy()->pixelMetric(PM_CheckBoxLabelSpacing, option, widget);
+                         const bool hasCheckBox = groupBox->subControls & SC_GroupBoxCheckBox;
+                         const int indicatorWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget);
+                         const int checkBoxSize = hasCheckBox ? (indicatorWidth + indicatorSpace) : 0;
+
+                         QRect totalRect;
+                         // Adjust totalRect if checkbox is set
+                         if (hasCheckBox) {
+                             int top = 0; int left = 0; int width = 0;
+                             int height = elementSize.height();
+                             // Adjust for check box
+                             if (sc == SC_GroupBoxCheckBox) {
+                                 top = labelTopMargin + elementSize.top() + (fontMetrics.height() - indicatorHeight) / 2;
+                                 const int right =  elementSize.right() - checkBoxSize;
+                                 left = right - checkBoxSize;
+                                 width = height = checkBoxSize;
+                             // Adjust for label
+                             } else {
+                                 left = (groupBox->direction == Qt::LeftToRight) ? elementSize.left()
+                                                                                 : (elementSize.left() + checkBoxSize);
+                                 width = elementSize.width() - checkBoxSize;
+                             }
+                             totalRect.setRect(left, top, width, height);
+                         }
+                         elementSize = visualRect(option->direction, option->rect, totalRect);
+                         break;
+                     }
+                     default: {
+                         break;
+                     }
+                 }
+             }
+             break;
+         }
+#endif //QT_NO_GROUPBOX
+#ifndef QT_NO_SLIDER
+        case CC_Slider: {
+             if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
+                 qreal metric = 0;
+                 m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-middle-horizontal"), metric);
+                 const int metricValue = metric + 0.5;
+                 switch (sc) {
+                     //Hb differentiates between major and minor ticks.
+                     //Unfortunately Qt does not, so we consider all ticks as major.
+                     //Tick sizes from Hb widget illustrations.
+                     case SC_SliderTickmarks: {
+                         //This just returns first tick rect for slider. Others need to be translated.
+                        const bool horizontal = (slider->orientation == Qt::Horizontal);
+                        const qreal unitValue = HbDeviceProfile::current().unitValue();
+                        qreal width = 0; qreal height = 0;
+                        //width and height unit values from Hb widget gallery
+                        if (horizontal) {
+                             width = 0.5 * unitValue + 0.5;
+                             height = unitValue + 0.5;
+                        } else {
+                             height = 0.5 * unitValue + 0.5;
+                             width = unitValue + 0.5;
+                        }
+                        const QRect sliderGroove = subControlRect(cc, slider, SC_SliderGroove, widget);
+                        QRect tickRect = QRect(sliderGroove.x(), sliderGroove.y(), width, height);
+                        if (horizontal)
+                             tickRect.translate(0, -metricValue);
+                        else
+                             tickRect.translate(-metricValue, 0);
+                        elementSize = tickRect;
+                        break;
+                     }
+                    case SC_SliderGroove: {
+                        const int thickness = proxy()->pixelMetric(PM_SliderThickness, slider, widget);
+                        const int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget);
+                         if (slider->orientation == Qt::Horizontal)
+                             elementSize.setRect(slider->rect.x(), slider->rect.y() + metricValue + tickOffset,
+                                         slider->rect.width(), thickness - 2 * (metricValue + tickOffset));
+                         else
+                             elementSize.setRect(slider->rect.x() + tickOffset + metricValue, slider->rect.y(),
+                                         thickness - 2 * (metricValue + tickOffset), slider->rect.height());
+                         break;
+                    }
+                    default: {
+                        break;
+                    }
+                 }
+             }
+             break;
+         }
+#endif //QT_NO_SLIDER
+#ifndef QT_NO_SPINBOX
+        case CC_SpinBox: {
+            if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
+                const int buttonIconSize = pixelMetric(PM_ButtonIconSize);
+                // Spinbox buttons should be no larger than one fourth of total width.
+                const int maxSize = qMax(spinbox->rect.width() / 4, buttonIconSize + 4); //@magic
+                QSize buttonSize;
+                buttonSize.setHeight(qMin(maxSize, qMax(8, spinbox->rect.height())));
+                buttonSize.setWidth(buttonSize.height()); //make buttons square
+
+                switch (sc) {
+                    case SC_SpinBoxFrame:
+                         elementSize = option->rect.adjusted(0, 0, -buttonSize.width() + 5, 0); //@magic
+                         break;
+                    case SC_SpinBoxDown: {
+                        if (option->direction == Qt::RightToLeft)
+                            elementSize = QRect(option->rect.right() - buttonSize.width(), option->rect.y(), buttonSize.width(), option->rect.height());
+                        else
+                            elementSize = QRect(option->rect.x(), option->rect.y(), buttonSize.width(), option->rect.height());
+                    }
+                    break;
+                    case SC_SpinBoxUp: {
+                        if (option->direction == Qt::RightToLeft)
+                            elementSize = QRect(option->rect.x(), option->rect.y(), buttonSize.width(), option->rect.height());
+                        else
+                            elementSize = QRect(option->rect.right() - buttonSize.width(), option->rect.y(), buttonSize.width(), option->rect.height());
+                    }
+                    break;
+                    case SC_SpinBoxEditField:
+                        elementSize = option->rect.adjusted(buttonSize.width(), 0, -buttonSize.width(), 0);
+                        break;
+                    default:
+                        break;
+                 }
+             }
+             break;
+         }
+#endif //QT_NO_SPINBOX
+         default: {
+             break;
+         }
+    }
+    return elementSize;
+}
+
+int QHbStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget,
+                  QStyleHintReturn *returnData) const
+{
+    int retValue = 0;
+    switch (hint) {
+        case SH_RequestSoftwareInputPanel:
+            retValue = RSIP_OnMouseClick;
+            break;
+        case SH_ToolButtonStyle:
+            retValue = Qt::ToolButtonIconOnly;
+            break;
+        case SH_TabWidget_DefaultTabPosition: {
+            retValue = QTabWidget::North;
+            break;
+        }
+        case SH_TabBar_ElideMode:
+            if (option)
+                retValue = (option->direction == Qt::LeftToRight) ? Qt::ElideRight : Qt::ElideLeft;
+            else if (widget)
+                retValue = (widget->layoutDirection() == Qt::LeftToRight) ? Qt::ElideRight : Qt::ElideLeft;
+            else
+                retValue = (QApplication::layoutDirection() == Qt::LeftToRight) ? Qt::ElideRight : Qt::ElideLeft;
+            break;
+        case SH_ItemView_ShowDecorationSelected:
+            retValue = true;
+            break;
+        case SH_SpinControls_DisableOnBounds: {
+            retValue = true;
+            break;
+        }
+        case SH_MessageBox_TextInteractionFlags: {
+            retValue = Qt::LinksAccessibleByMouse;
+            break;
+        }
+        case SH_MessageBox_CenterButtons: {
+            retValue = true;
+            break;
+        }
+        case SH_Button_FocusPolicy: {
+            retValue = Qt::StrongFocus;
+            break;
+        }
+        case SH_Table_GridLineColor: {
+            retValue = Qt::green; //@todo: fetch this
+            break;
+        }
+        case SH_TabBar_Alignment: {
+            retValue = Qt::AlignCenter;
+            break;
+        }
+        case SH_Header_ArrowAlignment: {
+            if (option)
+                retValue = (option->direction == Qt::LeftToRight) ? Qt::AlignLeft : Qt::AlignRight;
+            else if (widget)
+                retValue = (widget->layoutDirection() == Qt::LeftToRight) ? Qt::AlignLeft : Qt::AlignRight;
+            else
+                retValue = (QApplication::layoutDirection() == Qt::LeftToRight) ? Qt::AlignLeft : Qt::AlignRight;
+            break;
+        }
+        case SH_ToolTipLabel_Opacity: {
+            retValue = 255;
+            break;
+        }
+        case SH_ScrollBar_ContextMenu: {
+            retValue = false;
+            break;
+        }
+        case SH_Menu_MouseTracking: {
+            retValue = 0;
+            break;
+        }
+        case SH_ComboBox_ListMouseTracking: {
+            retValue = 0;
+            break;
+        }
+        case SH_ComboBox_Popup: {
+            retValue = 1;
+            break;
+        }
+        case SH_UnderlineShortcut: {
+            retValue = false;
+            break;
+        }
+        case SH_GroupBox_TextLabelColor: {
+            QColor test = HbColorScheme::color("popupforeground");
+            retValue = int(HbColorScheme::color("popupforeground").rgba()); //@todo: should use "qtc_viewtitle" but that is not yet available
+            break;
+        }
+        case SH_GroupBox_TextLabelVerticalAlignment: {
+            retValue = Qt::AlignBottom;
+            break;
+        }
+        case SH_ItemView_ActivateItemOnSingleClick: {
+            retValue = true;
+            break;
+        }
+        case SH_ItemView_ArrowKeysNavigateIntoChildren: {
+            retValue = true;
+            break;
+        }
+        case SH_ItemView_PaintAlternatingRowColorsForEmptyArea: {
+            retValue = true;
+            break;
+        }
+        default: {
+            retValue = QCommonStyle::styleHint(hint, option, widget, returnData);
+            break;
+        }
+    }
+    return retValue;
+}
+
+int QHbStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const
+{
+    qreal metricValue = 0.0;
+    const qreal unitValue = HbDeviceProfile::current().unitValue();
+    bool valueFound = false;
+    switch(metric) {
+        case PM_ButtonMargin: {
+            //Hb defines different margin values for each margin. We could use any of them,
+            // average, or mean, but lets settle for top margin for now.
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-background-button"), metricValue);
+            break;
+        }
+        case PM_ButtonDefaultIndicator: {
+            //Lets set default button indication frame width to zero as there is no such concept in uiemo
+            valueFound = true;
+            break;
+        }
+        case PM_MenuButtonIndicator: {
+            // Hb returns a square area for icon in a button.
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-secondary"), metricValue);
+            break;
+        }
+        case PM_ButtonShiftVertical:
+        case PM_ButtonShiftHorizontal: {
+            //No button shifting in Hb
+            valueFound = true;
+            break;
+        }
+        case PM_DefaultFrameWidth: {
+            valueFound = true;
+            metricValue = 2.0;
+            break;
+        }
+        case PM_SpinBoxFrameWidth: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-middle-horizontal"), metricValue);
+            break;
+        }
+        case PM_ComboBoxFrameWidth: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-top"), metricValue);
+            break;
+        }
+        case PM_MaximumDragDistance: {
+            valueFound = true;
+            metricValue = -1.0; //disable maximum drag distance functionality
+            break;
+        }
+        case PM_ScrollBarExtent: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-widget-scroll-bar-indicative-width"), metricValue);
+            break;
+        }
+        case PM_ScrollBarSliderMin: {
+            valueFound = true;
+            metricValue = 8.0 * unitValue; //8.0 from uiemo graphic designers (to be updated to the specification)
+            //todo: for indicative scrollbars the slider is 4.0uns. Can we query the state of scrollbar?
+            break;
+        }
+        case PM_SliderThickness: {
+            int numberOfTicks = 0;
+            if (const QStyleOptionSlider *optionSlider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
+                if (optionSlider->tickPosition & QSlider::TicksAbove)
+                    ++numberOfTicks;
+                if (optionSlider->tickPosition & QSlider::TicksBelow)
+                    ++numberOfTicks;
+            }
+            metricValue = proxy()->pixelMetric(PM_SliderControlThickness, option, widget) +
+                          numberOfTicks * (1.0 * unitValue + 0.5); //tickmarks are one unit tall
+            valueFound = true;
+            break;
+        }
+        // Slider handle size values from Hb widget illustrations library.
+        case PM_SliderControlThickness: {
+            valueFound = true;
+            metricValue = 4.0 * unitValue;
+            break;
+        }
+        case PM_SliderLength: {
+            valueFound = true;
+            metricValue = 2.0 * unitValue;
+            break;
+        }
+        case PM_SliderTickmarkOffset: {
+            valueFound = true;
+            if (const QStyleOptionSlider *optionSlider = qstyleoption_cast<const QStyleOptionSlider *>(option))
+                if (optionSlider->tickPosition & QSlider::TicksAbove || optionSlider->tickPosition & QSlider::TicksBelow)
+                    //tick marks are one unit tall
+                    metricValue = 1.0 * unitValue + 0.5;
+            break;
+        }
+        case PM_SliderSpaceAvailable: {       // available space for slider to move
+            if (widget) {
+                const QSize sliderSize = widget->size();
+                qreal margin = 0.0;
+                if (m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-screen"), margin)) {
+                    metricValue = qMax(sliderSize.width(), sliderSize.height()) - 2 * margin;
+                    valueFound = true;
+                }
+            } else if (const QStyleOptionSlider *optionSlider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
+                valueFound = true;
+                metricValue = (optionSlider->orientation == Qt::Horizontal) ? optionSlider->rect.width() : optionSlider->rect.height();
+            }
+            break;
+        }
+        case PM_DockWidgetTitleBarButtonMargin:
+        case PM_DockWidgetTitleMargin:
+        case PM_DockWidgetSeparatorExtent:
+        case PM_DockWidgetHandleExtent: {
+            break; //todo: no suitable values in Hb?
+        }
+        case PM_DockWidgetFrameWidth: {
+            valueFound = false; //was true
+            QSize screenSize = HbDeviceProfile::current().logicalSize();
+            metricValue = screenSize.width();
+            break;
+        }
+        //Hb does not have tabs. Lets use toolbar layout data
+        case PM_TabBarTabHSpace: {
+                qreal toolbarWidth = 0.0;
+                if (m_private->styleManager()->parameter(QLatin1String("hb-param-widget-chrome-height"), toolbarWidth)) {
+                    valueFound = true;
+                    qreal iconWidth = 0.0;
+                    if (m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-function"), iconWidth))
+                        metricValue = (toolbarWidth - iconWidth) / 2;
+                    else
+                        metricValue = toolbarWidth / 2;
+                }
+            break;
+        }
+        case PM_TabBarTabVSpace: {
+                qreal toolbarHeight = 0.0;
+                if (m_private->styleManager()->parameter(QLatin1String("hb-param-widget-toolbar-height"), toolbarHeight)) {
+                    valueFound = true;
+                    qreal iconHeight = 0.0;
+                    if (m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-function"), iconHeight))
+                        metricValue = (toolbarHeight - iconHeight) / 2;
+                    else
+                        metricValue = toolbarHeight / 2;
+                }
+                break;
+            }
+        case PM_TabBarBaseHeight: {
+            valueFound = true;
+            metricValue = 2.0;
+            break;
+        }
+        case PM_TabBarTabOverlap:
+        case PM_TabBarBaseOverlap: {
+            metricValue = 1.0;
+            valueFound = true;
+            break;
+        }
+        case PM_ProgressBarChunkWidth: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-widget-progress-bar-height"), metricValue);
+            break;
+        }
+        case PM_SplitterWidth: {
+            //No splitter in Hb, so lets use interactive scrollbar width
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-widget-scroll-bar-interactive-width"), metricValue);
+            break;
+        }
+        case PM_TitleBarHeight: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-widget-chrome-height"), metricValue);
+            break;
+        }
+        case PM_MenuScrollerHeight: {
+            //No menu scroller in Hb, lets use interactive scrollbar width
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-widget-scroll-bar-interactive-width"), metricValue);
+            break;
+        }
+        case PM_MenuHMargin: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-left"), metricValue);
+            break;
+        }
+        case PM_MenuVMargin: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-top"), metricValue);
+            break;
+        }
+        case PM_MenuPanelWidth: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-background-list-popup"), metricValue);
+            break;
+        }
+        case PM_MenuTearoffHeight: {
+            valueFound = true;
+            metricValue = 0.0;
+            break;
+        }
+        case PM_MenuDesktopFrameWidth: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-background-list-popup"), metricValue);
+            break;
+        }
+        case PM_MenuBarPanelWidth: {
+            valueFound = true;
+            metricValue = 0.0;
+            break;
+        }
+        case PM_MenuBarItemSpacing: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-middle-horizontal"), metricValue);
+            break;
+        }
+        case PM_MenuBarVMargin: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-top"), metricValue);
+            break;
+        }
+        case PM_MenuBarHMargin: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-left"), metricValue);
+            break;
+        }
+        // Hb indicators are squares and radiobuttons and checkboxes are of similar size.
+        case PM_IndicatorWidth:
+        case PM_IndicatorHeight:
+        case PM_ExclusiveIndicatorWidth:
+        case PM_ExclusiveIndicatorHeight:
+        case PM_CheckListButtonSize: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-secondary"), metricValue);
+            // todo: or hb-param-graphic-size-primary-small?
+            break;
+        }
+        case PM_CheckListControllerSize: {
+            break;
+        }
+        case PM_DialogButtonsSeparator: {
+            qreal buttonArea = 0.0;
+            if (m_private->styleManager()->parameter(QLatin1String("hb-param-widget-chrome-height"), buttonArea)) {
+                qreal buttonIconArea = 0.0;
+                valueFound = true;
+                if (m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-function"), buttonIconArea))
+                    metricValue = (buttonArea - buttonIconArea) / 2;
+                else
+                    metricValue = buttonArea / 2;
+            }
+            break;
+        }
+        case PM_DialogButtonsButtonWidth:
+        case PM_DialogButtonsButtonHeight: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-function"), metricValue);
+            break;
+        }
+        case PM_MdiSubWindowFrameWidth: {
+            valueFound = true;
+            metricValue = 0.75 * unitValue; //0.75 from uiemo documentation (margin for TitleBar)
+            break;
+        }
+        case PM_MdiSubWindowMinimizedWidth: {
+            //todo: will it cause issues, if we use Hb minimized titlebar size? Will Qt want to put dialog buttons visible?
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-widget-chrome-height"), metricValue);
+            metricValue = metricValue / 6; //from Hb documentation: minimized TitleBar width
+            break;
+        }
+        case PM_HeaderMargin: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-middle-vertical"), metricValue);
+            break;
+        }
+        case PM_HeaderMarkSize: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-secondary"), metricValue);
+            break;
+        }
+        case PM_HeaderGripMargin: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-middle-vertical"), metricValue);
+            break;
+        }
+        case PM_TabBar_ScrollButtonOverlap: {
+            valueFound = true; //Lets put the tabs side-by-side
+            break;
+        }
+        case PM_TabBarTabShiftHorizontal:
+        case PM_TabBarTabShiftVertical: {
+            //todo: should we have tab shifting?
+            break;
+        }
+        case PM_TabBarScrollButtonWidth: {
+                qreal margin = 0.0;
+                if (m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-top"), margin)) {
+                    qreal buttonIconWidth = 0.0;
+                    if (m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-secondary"), buttonIconWidth)) {
+                        metricValue = margin * 2 + buttonIconWidth;
+                        valueFound = true;
+                    }
+                }
+            break;
+        }
+        case PM_ToolBarItemSpacing:
+        case PM_ToolBarItemMargin:
+        case PM_ToolBarFrameWidth: {
+            valueFound = true; //Hb Toolbar buttons are laid out with no margins between them
+            break;
+        }
+        case PM_ToolBarHandleExtent: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-widget-chrome-height"), metricValue);
+            metricValue = (2 *  metricValue) / 3; //Use minimized Chrome width for toolbar handle size.
+            break;
+        }
+        case PM_ToolBarSeparatorExtent: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-widget-toolbar-height"), metricValue);
+            break;
+        }
+        case PM_ToolBarExtensionExtent: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-secondary"), metricValue);
+            break;
+        }
+        case PM_SpinBoxSliderHeight: {//todo: what's this...
+            break;
+        }
+        case PM_ToolBarIconSize: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-function"), metricValue);
+            break;
+        }
+        case PM_LargeIconSize:
+        case PM_ListViewIconSize: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-primary-large"), metricValue);
+            break;
+        }
+        case PM_TabBarIconSize:
+        case PM_SmallIconSize:
+        case PM_IconViewIconSize: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-primary-small"), metricValue);
+            break;
+        }
+        case PM_FocusFrameVMargin:
+        case PM_FocusFrameHMargin: {
+            valueFound = true;
+            metricValue = 4.0; //from hbstyle.cpp (P_PushButton_focus); value is already in pixels
+            break;
+        }
+        case PM_ToolTipLabelFrameWidth: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-background-popup-preview"), metricValue);
+            break;
+        }
+        case PM_CheckBoxLabelSpacing: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-middle-horizontal"), metricValue);
+            break;
+        }
+        case PM_SizeGripSize: {
+            //todo: AFAIK, Hb does not have sizegrips
+            break;
+        }
+        case PM_MessageBoxIconSize: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-primary-large"), metricValue);
+            break;
+        }
+        case PM_ButtonIconSize: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-function"), metricValue);
+            break;
+        }
+        case PM_RadioButtonLabelSpacing: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-middle-horizontal"), metricValue);
+            break;
+        }
+        case PM_LayoutLeftMargin: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-left"), metricValue);
+            break;
+        }
+        case PM_LayoutTopMargin: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-top"), metricValue);
+            break;
+        }
+        case PM_LayoutRightMargin: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-right"), metricValue);
+            break;
+        }
+        case PM_LayoutBottomMargin: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-bottom"), metricValue);
+            break;
+        }
+        case PM_LayoutHorizontalSpacing: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-middle-horizontal"), metricValue);
+            break;
+        }
+        case PM_LayoutVerticalSpacing: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-margin-gene-middle-vertical"), metricValue);
+            break;
+        }
+        case PM_TabCloseIndicatorWidth:
+        case PM_TabCloseIndicatorHeight: {
+            valueFound = m_private->styleManager()->parameter(QLatin1String("hb-param-graphic-size-primary-small"), metricValue);
+            break;
+        }
+        case PM_TextCursorWidth: {
+            valueFound = true;
+            metricValue = 1.0; //directly from Hb designers
+            break;
+        }
+        case PM_SubMenuOverlap:
+        default: {
+            break;
+        }
+    }
+    if (!valueFound)
+        return metricValue = QCommonStyle::pixelMetric(metric, option, widget);
+    else
+        return metricValue + 0.5; //rounding since hb values are qreals
+}
+
+QPixmap QHbStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *option,
+                           const QWidget *widget) const
+{
+    return QCommonStyle::standardPixmap(standardPixmap, option, widget);
+}
+
+void QHbStyle::polish(QWidget *widget)
+{
+    QCommonStyle::polish(widget);
+
+    if (!widget)
+        return;
+
+    if (false
+#ifndef QT_NO_SCROLLBAR
+        || qobject_cast<QScrollBar *>(widget)
+#endif
+        ) {
+        widget->setAttribute(Qt::WA_OpaquePaintEvent, false);
+    }
+
+    if (m_private->isDialog(widget)) {
+        widget->setAttribute(Qt::WA_StyledBackground);
+    }
+
+    m_private->polishFont(widget);
+    m_private->polishPalette(widget);
+
+#ifndef QT_NO_PROGRESSBAR
+    if (qobject_cast<QProgressBar *>(widget))
+        widget->installEventFilter(this);
+#endif
+}
+
+void QHbStyle::polish(QApplication *app)
+{
+    QCommonStyle::polish(app);
+}
+
+void QHbStyle::polish(QPalette &palette)
+{
+    QCommonStyle::polish(palette);
+}
+
+void QHbStyle::unpolish(QWidget *widget)
+{
+    if (!widget)
+        return;
+
+    if (false
+    #ifndef QT_NO_SCROLLBAR
+        || qobject_cast<QScrollBar *>(widget)
+    #endif
+        )
+        widget->setAttribute(Qt::WA_OpaquePaintEvent);
+
+    if (m_private->isDialog(widget)) {
+        widget->setAttribute(Qt::WA_StyledBackground, false);
+    }
+
+    QCommonStyle::unpolish(widget);
+
+#ifndef QT_NO_PROGRESSBAR
+    if (qobject_cast<QProgressBar *>(widget)) {
+        widget->removeEventFilter(this);
+    }
+#endif
+}
+
+void QHbStyle::unpolish(QApplication *app)
+{
+    QCommonStyle::unpolish(app);
+}
+
+QPalette QHbStyle::standardPalette() const
+{
+    // This function not called if system support system colors
+    return QCommonStyle::standardPalette();
+}
+
+QIcon QHbStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option,
+                                     const QWidget *widget) const
+{
+    QRect iconRect;
+    if (option) {
+        iconRect = option->rect;
+    } else if (widget) {
+        iconRect = widget->rect();
+    } else {
+        iconRect.setWidth(proxy()->pixelMetric(PM_SmallIconSize, option, widget));
+        iconRect.setHeight(proxy()->pixelMetric(PM_SmallIconSize, option, widget));
+    }
+    QString iconName;
+
+    switch (standardIcon) {
+        case SP_TitleBarMenuButton: {
+            break;
+        }
+        case SP_TitleBarMinButton: {
+            break;
+        }
+        case SP_TitleBarMaxButton: {
+            break;
+        }
+        case SP_TitleBarCloseButton: {
+            break;
+        }
+        case SP_TitleBarNormalButton: {
+            break;
+        }
+        case SP_TitleBarShadeButton: {
+            break;
+        }
+        case SP_TitleBarUnshadeButton: {
+            break;
+        }
+        case SP_TitleBarContextHelpButton: {
+            break;
+        }
+        case SP_DockWidgetCloseButton: {
+            break;
+        }
+        case SP_MessageBoxInformation: {
+            iconName = QLatin1String("note_info");
+            break;
+        }
+        case SP_MessageBoxWarning: {
+            iconName = QLatin1String("note_warning");
+            break;
+        }
+        case SP_MessageBoxCritical: {
+            iconName = QLatin1String("note_error");
+            break;
+        }
+        case SP_MessageBoxQuestion: {
+            iconName = QLatin1String("qtg_large_question_mark");
+            break;
+        }
+        case SP_DesktopIcon: {
+            break;
+        }
+        case SP_TrashIcon: {
+            break;
+        }
+        case SP_ComputerIcon: {
+            iconName = QLatin1String("qtg_small_mobile");
+            break;
+        }
+        case SP_DriveFDIcon:
+        case SP_DriveHDIcon:
+        case SP_DriveCDIcon:
+        case SP_DriveDVDIcon: {
+            iconName = QLatin1String("qtg_large_mmc");
+            break;
+        }
+        case SP_DriveNetIcon: {
+            break;
+        }
+        case SP_DirOpenIcon: {
+            break;
+        }
+        case SP_DirClosedIcon: {
+            break;
+        }
+        case SP_DirLinkIcon: {
+            break;
+        }
+        case SP_FileIcon: {
+            iconName = QLatin1String("qtg_large_notes");
+            break;
+        }
+        case SP_FileLinkIcon: {
+            break;
+        }
+        case SP_ToolBarHorizontalExtensionButton: {
+            iconName = QLatin1String("qtg_mono_more");
+            break;
+        }
+        case SP_ToolBarVerticalExtensionButton: {
+            iconName = QLatin1String("qtg_mono_more");
+            break;
+        }
+        case SP_FileDialogStart: {
+            break;
+        }
+        case SP_FileDialogEnd: {
+            break;
+        }
+        case SP_FileDialogToParent: {
+            break;
+        }
+        case SP_FileDialogNewFolder: {
+            break;
+        }
+        case SP_FileDialogDetailedView: {
+            break;
+        }
+        case SP_FileDialogInfoView: {
+            iconName = QLatin1String("qtg_large_info");
+            break;
+        }
+        case SP_FileDialogContentsView: {
+            break;
+        }
+        case SP_FileDialogListView: {
+            break;
+        }
+        case SP_FileDialogBack: {
+            break;
+        }
+        case SP_DirIcon: {
+            break;
+        }
+        case SP_DialogOkButton: {
+            iconName = QLatin1String("qtg_large_ok");
+            break;
+        }
+        case SP_DialogCancelButton: {
+            break;
+        }
+        case SP_DialogHelpButton: {
+            iconName = QLatin1String("qtg_large_help");
+            break;
+        }
+        case SP_DialogOpenButton: {
+            break;
+        }
+        case SP_DialogSaveButton: {
+            break;
+        }
+        case SP_DialogCloseButton: {
+            break;
+        }
+        case SP_DialogApplyButton: {
+            iconName = QLatin1String("qtg_large_ok");
+            break;
+        }
+        case SP_DialogResetButton: {
+            break;
+        }
+        case SP_DialogDiscardButton: {
+            iconName = QLatin1String("qtg_small_fail");
+            break;
+        }
+        case SP_DialogYesButton: {
+            break;
+        }
+        case SP_DialogNoButton: {
+            break;
+        }
+        case SP_ArrowUp: {
+            break;
+        }
+        case SP_ArrowDown: {
+            break;
+        }
+        case SP_ArrowLeft: {
+            break;
+        }
+        case SP_ArrowRight: {
+            break;
+        }
+        case SP_ArrowBack: {
+            break;
+        }
+        case SP_ArrowForward: {
+            break;
+        }
+        case SP_DirHomeIcon: {
+            break;
+        }
+        case SP_CommandLink: {
+            break;
+        }
+        case SP_VistaShield: {
+            break;
+        }
+        case SP_BrowserReload: {
+            break;
+        }
+        case SP_BrowserStop: {
+            break;
+        }
+        case SP_MediaPlay: {
+            iconName = QLatin1String("qtg_graf_progslider_handle_play_normal");
+            break;
+        }
+        case SP_MediaStop: {
+            break;
+        }
+        case SP_MediaPause: {
+            iconName = QLatin1String("qtg_graf_progslider_handle_pause_normal");
+            break;
+        }
+        case SP_MediaSkipForward: {
+            break;
+        }
+        case SP_MediaSkipBackward: {
+            break;
+        }
+        case SP_MediaSeekForward: {
+            break;
+        }
+        case SP_MediaSeekBackward: {
+            break;
+        }
+        case SP_MediaVolume: {
+            iconName = QLatin1String("qgn_indi_nslider_unmuted");
+            break;
+        }
+        case SP_MediaVolumeMuted: {
+            iconName = QLatin1String("qgn_indi_nslider_muted");
+            break;
+        }
+        default: {
+            break;
+        }
+    }
+
+    QIcon icon;
+    if (!iconName.isNull()) {
+        HbIcon* hbicon = new HbIcon(iconName);
+        hbicon->setSize(iconRect.size());
+        icon =  QIcon(hbicon->qicon());
+        delete hbicon;
+    } else {
+        icon = QCommonStyle::standardIconImplementation(standardIcon, option, widget);
+    }
+    return icon;
+}
+
+int QHbStyle::layoutSpacingImplementation(QSizePolicy::ControlType control1,
+                                    QSizePolicy::ControlType control2,
+                                    Qt::Orientation orientation,
+                                    const QStyleOption *option,
+                                    const QWidget *widget) const
+{
+    return QCommonStyle::layoutSpacingImplementation(control1, control2, orientation, option, widget);
+}
+
+bool QHbStyle::eventFilter(QObject *watched, QEvent *event)
+{
+    switch( event->type()) {
+#ifndef QT_NO_PROGRESSBAR
+        case QEvent::StyleChange:
+        case QEvent::Show: {
+            if (m_private->animationGroup()->state() != QAbstractAnimation::Running )
+                m_private->animationGroup()->start();
+            break;
+        }
+        case QEvent::ApplicationLayoutDirectionChange:
+        case QEvent::LayoutDirectionChange:
+        case QEvent::Resize:
+        case QEvent::Destroy:
+        case QEvent::Hide: {
+            if (QProgressBar *bar = qobject_cast<QProgressBar *>(watched)) {
+                const int count = m_private->animationGroup()->animationCount();
+                for (int i(count-1); i >= 0; i--) {
+                    QAbstractAnimation* animation = m_private->animationGroup()->animationAt(i);
+                    if (QPropertyAnimation *pAnimation = qobject_cast<QPropertyAnimation *>(animation)) {
+                        QHbStyleAnimation* styleAnimation = qobject_cast<QHbStyleAnimation *>(pAnimation->targetObject());
+                        if (bar == styleAnimation->target()) {
+                            animation = m_private->animationGroup()->takeAnimation(i);
+                            animation->deleteLater();
+                        }
+                    }
+                }
+                if (m_private->animationGroup()->animationCount() == 0 &&
+                    m_private->animationGroup()->state() == QAbstractAnimation::Running)
+                    m_private->animationGroup()->stop();
+            }
+            break;
+        }
+#endif // QT_NO_PROGRESSBAR
+        default: {
+            break;
+        }
+    };
+
+    return QCommonStyle::eventFilter(watched, event);
+}
+
+void QHbStyle::animateControl(ControlElement element, const QStyleOption *option,
+                                     QPainter *painter, const QWidget *widget) const{
+    switch(element) {
+        case CE_ProgressBarContents: {
+            if (const QProgressBar *bar = static_cast<const QProgressBar *>(widget)) {
+                 if (bar->minimum() == 0 && bar->maximum() == 0) {
+                     QHbStyleAnimation* styleAnimation = 0;
+                     const int count = m_private->animationGroup()->animationCount();
+                     bool alreadyAnimated = false;
+                     for (int i(0); i < count; i++) {
+                         QAbstractAnimation* animation = m_private->animationGroup()->animationAt(i);
+                         if (QPropertyAnimation *pAnimation = qobject_cast<QPropertyAnimation *>(animation)) {
+                             styleAnimation = qobject_cast<QHbStyleAnimation *>(pAnimation->targetObject());
+                             if (bar == styleAnimation->target()) {
+                                 alreadyAnimated = true;
+                                 break;
+                             }
+                         }
+                     }
+                     if (!alreadyAnimated) {
+                         QHbStyleAnimation* target = new QHbStyleAnimation(const_cast<QProgressBar*>(bar));
+                         target->createAnimationIcon(CE_ProgressBarContents, bar->orientation());
+                         QPropertyAnimation* animation = new QPropertyAnimation(target, "point");
+                         animation->setLoopCount(-1); //run until stopped
+                         const int chunk = pixelMetric(PM_ProgressBarChunkWidth, option, widget)-1;
+                         if (bar->orientation()== Qt::Horizontal) {
+                             if ((option->direction == Qt::LeftToRight) ^ const_cast<QProgressBar*>(bar)->invertedAppearance()) {
+                                 animation->setStartValue(bar->rect().topLeft());
+                                 animation->setEndValue(QPoint(bar->rect().x()-chunk, bar->rect().y()));
+                             } else {
+                                 animation->setStartValue(QPoint(bar->rect().x()-chunk, bar->rect().y()));
+                                 animation->setEndValue(bar->rect().topLeft());
+                             }
+                         }
+                         else {
+                             if ((option->direction == Qt::LeftToRight) ^ const_cast<QProgressBar*>(bar)->invertedAppearance()) {
+                                 animation->setStartValue(bar->rect().topLeft());
+                                 animation->setEndValue(QPoint(bar->rect().x(), bar->rect().y()-chunk));
+                             } else {
+                                 animation->setStartValue(QPoint(bar->rect().x(), bar->rect().y()-chunk));
+                                 animation->setEndValue(bar->rect().topLeft());
+                             }
+                         }
+                         m_private->animationGroup()->addAnimation(animation);
+                     } else {
+                        styleAnimation->paintAnimation(painter);
+                     }
+                 }
+             }
+            break;
+        }
+        default: {
+            break;
+        }
+    }
+
+    if (m_private->animationGroup()->animationCount() > 0 &&
+        m_private->animationGroup()->state() != QAbstractAnimation::Running)
+        m_private->animationGroup()->start();
+}
+
+bool QHbStylePrivate::drawItem(Item part, QPainter *painter, const QRect &rect, ItemStates state, const QColor &color)
+{
+    QString iconName;
+    switch(part) {
+        case SP_Arrow: {
+            if (state & SS_Up)
+                iconName = QLatin1String("qgn_indi_input_arrow_up");
+            else if (state & SS_Down)
+                iconName = QLatin1String("qgn_indi_input_arrow_down");
+            else if (state && SS_Left)
+                iconName = QLatin1String("qgn_indi_input_arrow_left");
+            else
+                iconName = QLatin1String("qgn_indi_input_arrow_right");
+            break;
+        }
+        case SP_BoxButton: {
+            if (state & SS_Disabled)
+                iconName = QString("qtg_graf_combobox_button_disabled");
+            else if (state & SS_Pressed)
+                iconName = QString("qtg_graf_combobox_button_pressed");
+            else if (state & SS_Selected)
+                iconName = QString("qtg_graf_combobox_button_highlight");
+            else
+                iconName = QString("qtg_graf_combobox_button_normal");
+            break;
+        }
+        case SP_CheckBoxIndicator: {
+            if (state & SS_Inactive)
+                iconName = QLatin1String("qtg_small_unselected");
+            else
+                iconName = QLatin1String("qtg_small_selected");
+            break;
+        }
+        case SP_HeaderOrderIndicator: {
+            iconName = QLatin1String("qtg_mono_sort");
+            break;
+        }
+        case SP_ItemDecoration: {
+            if (state & SS_Selected)
+                iconName = QString("qtg_small_tick");
+            break;
+        }
+        case SP_MenuSeparator: {
+            iconName = QLatin1String("qtg_graf_popup_separator");
+            break;
+        }
+        case SP_RadioButtonIndicator: {
+            if (state & SS_Inactive)
+                iconName = QLatin1String("qtg_small_radio_unselected");
+            else
+                iconName = QLatin1String("qtg_small_radio_selected");
+            break;
+        }
+        case SP_SliderHandle: {
+            if (state & SS_Horizontal) {
+                if (state & SS_Pressed)
+                    iconName = QLatin1String("qtg_graf_slider_h_handle_pressed");
+                else
+                    iconName = QLatin1String("qtg_graf_slider_h_handle_normal");
+            } else {
+                if (state & SS_Pressed)
+                    iconName = QLatin1String("qtg_graf_slider_v_handle_pressed");
+                else
+                    iconName = QLatin1String("qtg_graf_slider_v_handle_normal");
+            }
+            break;
+        }
+        case SP_SliderTick: {
+            if (state & SS_Horizontal)
+                iconName = QLatin1String("qtg_graf_slider_h_tick_major");
+            else
+                iconName = QLatin1String("qtg_graf_slider_v_tick_major");
+            break;
+        }
+        case SP_SeparatorLine: {
+            // @todo: or "qtg_graf_popup_separator" and states and rotation
+            if (state & SS_Horizontal)
+                iconName = QLatin1String("qtg_graf_devider_h_thin");
+            else
+                iconName = QLatin1String("qtg_graf_devider_v_thin");
+            break;
+        }
+        case SP_TreeViewExpanded: {
+            iconName = QLatin1String("qtg_small_expand");
+            break;
+        }
+        case SP_TreeViewCollapsed: {
+            iconName = QLatin1String("qtg_small_collapse");
+            break;
+        }
+        case SP_SubMenuIndicator:
+        default: {
+            return false;
+        }
+    }
+    if (!iconName.isNull() && !rect.isEmpty()) {
+        HbIcon *icon = new HbIcon(iconName);
+        icon->setSize(rect.size());
+        if (color.spec() != QColor::Invalid)
+            icon->setColor(color);
+        if (state & SS_Mirrored)
+            icon->setMirroringMode(HbIcon::Forced);
+
+        painter->save();
+        painter->setRenderHint(QPainter::Antialiasing);
+
+        if (state & SS_Flipped) {
+            QTransform m;
+            m.rotate(180);
+            m.translate(-rect.width() - 2 * rect.left(), -rect.height() - 2 * rect.top());
+            painter->setTransform(m, true);
+        }
+        icon->paint(painter, rect, Qt::IgnoreAspectRatio, Qt::AlignCenter, QIcon::Normal, QIcon::On);
+        painter->restore();
+        delete icon;
+    }
+    return true;
+}
+
+bool QHbStylePrivate::drawMultiPartItem(MultiPartItem multiPart, QPainter *painter, const QRect &rect, ItemStates state)
+{
+    //Q_Q(QHbStyle);
+
+    if (m_frameDrawer.isNull())
+        m_frameDrawer.reset(new HbFrameDrawer());
+
+    HbFrameDrawer::FrameType frameType = HbFrameDrawer::Undefined;
+    QString frameName;
+    qreal border = 0.0;
+    HbIcon::MirroringMode mirrorMode = HbIcon::Default;
+    bool fillRect = false;
+
+    QStringList framePartList;
+    QString frameGraphicsFooter;
+    QString frameGraphicsHeader;
+    switch (multiPart) {
+        case SM_BoxFrame: {
+            fillRect = true;
+            frameType = HbFrameDrawer::ThreePiecesHorizontal;
+            if (state & SS_Disabled)
+                frameName = QString("qtg_fr_combobox_disabled");
+            else if (state & SS_Pressed)
+                frameName = QString("qtg_fr_combobox_pressed");
+            else if (state & SS_Edited)
+                frameName = QString("qtg_fr_combobox_edit");
+            else if (state & SS_Selected)
+                frameName = QString("qtg_fr_combobox_highlight");
+            else
+                frameName = QString("qtg_fr_combobox_normal");
+            break;
+        }
+        case SM_Dialog: {
+            frameName = QLatin1String("qtg_fr_popup");
+            frameType = HbFrameDrawer::NinePieces;
+            break;
+        }
+        case SM_GroupBox: {
+            styleManager()->parameter(QLatin1String("hb-param-background-groupbox"), border);
+            if (state & SS_Pressed)
+                frameName = QLatin1String("qtg_fr_groupbox_pressed");
+            else if (state & SS_Selected && state & SS_Active)
+                frameName = QLatin1String("qtg_fr_groupbox_highlight");
+            else
+                frameName = QLatin1String("qtg_fr_groupbox_normal");
+            frameType = HbFrameDrawer::NinePieces;
+            break;
+        }
+        case SM_GroupBoxTitle: {
+            frameName = QLatin1String("qtg_fr_groupbox");
+            frameType = HbFrameDrawer::NinePieces;
+            break;
+        }
+        case SM_ItemViewItem: {
+            if (state & SS_Pressed)
+                frameName = QLatin1String("qtg_fr_list_pressed");
+            else if (state & SS_Focused)
+                frameName = QLatin1String("qtg_fr_list_highlight");
+            frameType = HbFrameDrawer::NinePieces;
+            styleManager()->parameter(QLatin1String("hb-param-background-list-main"), border);
+            break;
+        }
+        case SM_TextEdit: //@todo: fallthrough for now, since no specific graphic for editors in releases
+        case SM_LineEdit: {
+            styleManager()->parameter(QLatin1String("hb-param-background-editor"), border);
+            if (state & SS_Selected)
+                frameName = QLatin1String("qtg_fr_lineedit_highlight");
+            else
+                frameName = QLatin1String("qtg_fr_lineedit_normal");
+            frameType = HbFrameDrawer::NinePieces;
+            break;
+        }
+        case SM_ListParent: {
+            if (state & SS_Pressed)
+                frameName = QLatin1String("qtg_fr_list_pressed");
+            else if (state & SS_Focused)
+                frameName = QLatin1String("qtg_fr_list_highlight");
+            else
+                frameName = QLatin1String("qtg_fr_list_parent_normal");
+            frameType = HbFrameDrawer::NinePieces;
+            styleManager()->parameter(QLatin1String("hb-param-background-list-main"), border);
+            break;
+        }
+        case SM_Menu: {
+            frameName = QLatin1String("qtg_fr_popup_secondary");
+            frameType = HbFrameDrawer::NinePieces;
+            break;
+        }
+        case SM_MenuScroller: {
+            if (state & SS_Down)
+                frameName = QLatin1String("qtg_graf_list_mask_b");
+            else if (state & SS_Up)
+                frameName = QLatin1String("qtg_graf_list_mask_t");
+            frameType = HbFrameDrawer::OnePiece;
+            break;
+        }
+        case SM_MenuItem: {
+            if (state & SS_Pressed)
+                frameName = QLatin1String("qtg_fr_popup_list_pressed");
+            else if (state & SS_Selected)
+                frameName = QLatin1String("qtg_fr_popup_list_highlight");
+            else
+                frameName = QLatin1String("qtg_fr_popup_list_normal");
+            frameType = HbFrameDrawer::NinePieces;
+            break;
+        }
+        case SM_Panel: {
+            frameName = QLatin1String("qtg_fr_groupbox_normal");
+            frameType = HbFrameDrawer::NinePieces;
+            styleManager()->parameter(QLatin1String("hb-param-background-list-main"), border);
+            break;
+        }
+        case SM_ProgressBarGroove: {
+            fillRect = true;
+            if (state & SS_Horizontal) {
+                frameName = QLatin1String("qtg_fr_progbar_h_frame");
+                frameType = HbFrameDrawer::ThreePiecesHorizontal;
+            } else {
+                frameName = QLatin1String("qtg_fr_progbar_v_frame");
+                frameType = HbFrameDrawer::ThreePiecesVertical;
+            }
+            break;
+        }
+        case SM_ProgressBarIndicator: {
+            fillRect = true;
+            if (state & SS_Horizontal) {
+                frameName = QLatin1String("qtg_fr_progbar_h_filled");
+                frameType = HbFrameDrawer::ThreePiecesHorizontal;
+            } else {
+                frameName = QLatin1String("qtg_fr_progbar_v_filled");
+                frameType = HbFrameDrawer::ThreePiecesVertical;
+            }
+            break;
+        }
+        //@todo: enable separate graphic for texteditor. Graphic was not included in the wk12 release.
+        /*case SM_TextEdit: {
+            styleManager()->parameter(QLatin1String("hb-param-background-editor"), border);
+            if (state & SS_Selected)
+                frameName = QLatin1String("qtg_fr_textedit_highlight");
+            else
+                frameName = QLatin1String("qtg_fr_textedit_normal");
+            frameType = HbFrameDrawer::NinePieces;
+            break;
+        }*/
+        case SM_ToolButton: {
+            frameType = HbFrameDrawer::ThreePiecesHorizontal;
+            frameGraphicsHeader = QLatin1String("qtg_fr_tb_h_");
+
+            framePartList << QLatin1String("_cl") << QLatin1String("_c") << QLatin1String("_cr");
+
+            if (state & SS_Disabled)
+                frameGraphicsFooter = QLatin1String("disabled");
+            else if (state & SS_Pressed)
+                frameGraphicsFooter = QLatin1String("pressed");
+            else if (state & SS_Selected)
+                frameGraphicsFooter = QLatin1String("highlight");
+            else
+                frameGraphicsFooter = QLatin1String("normal");
+            break;
+        }
+        case SM_PushButton: {
+             frameType = HbFrameDrawer::NinePieces;
+             if (state & SS_Disabled)
+                 frameName = QLatin1String("qtg_fr_btn_disabled");
+             else if (state & SS_Pressed)
+                 frameName = QLatin1String("qtg_fr_btn_pressed");
+             else if (state & SS_Selected)
+                 frameName = QLatin1String("qtg_fr_btn_highlight");
+             else if (state & SS_Latched)
+                 frameName = QLatin1String("qtg_fr_btn_latched");
+             else
+                 frameName = QLatin1String("qtg_fr_btn_normal");
+             styleManager()->parameter(QLatin1String("hb-param-background-button"), border);
+             break;
+        }
+        case SM_ScrollBarGroove: {
+            fillRect = true;
+            if (state & SS_Horizontal) {
+                if (state & SS_Pressed)
+                    frameName = QLatin1String("qtg_fr_scroll_h_active_frame_pressed");
+                else
+                    frameName = QLatin1String("qtg_fr_scroll_h_active_frame_normal");
+                frameType = HbFrameDrawer::ThreePiecesHorizontal;
+            } else {
+                if (state & SS_Pressed)
+                    frameName = QLatin1String("qtg_fr_scroll_v_active_frame_pressed");
+                else
+                    frameName = QLatin1String("qtg_fr_scroll_v_active_frame_normal");
+                frameType = HbFrameDrawer::ThreePiecesVertical;
+            }
+            break;
+        }
+        case SM_ScrollBarHandle: {
+            fillRect = true;
+            if (state & SS_Horizontal) {
+                if (state & SS_Pressed)
+                    frameName = QLatin1String("qtg_fr_scroll_h_active_handle_pressed");
+                else
+                    frameName = QLatin1String("qtg_fr_scroll_h_active_handle_normal");
+                frameType = HbFrameDrawer::ThreePiecesHorizontal;
+            } else {
+                if (state & SS_Pressed)
+                    frameName = QLatin1String("qtg_fr_scroll_v_active_handle_pressed");
+                else
+                    frameName = QLatin1String("qtg_fr_scroll_v_active_handle_normal");
+                frameType = HbFrameDrawer::ThreePiecesVertical;
+            }
+            break;
+        }
+        case SM_SliderGroove: {
+            fillRect = true;
+            if (state & SS_Horizontal) {
+                if (state & SS_Pressed)
+                    frameName = QLatin1String("qtg_fr_slider_h_frame_pressed");
+                else
+                    frameName = QLatin1String("qtg_fr_slider_h_frame_normal");
+                frameType = HbFrameDrawer::ThreePiecesHorizontal;
+            } else {
+                if (state & SS_Pressed)
+                    frameName = QLatin1String("qtg_fr_slider_v_frame_pressed");
+                else
+                    frameName = QLatin1String("qtg_fr_slider_v_frame_normal");
+                frameType = HbFrameDrawer::ThreePiecesVertical;
+            }
+            break;
+        }
+        case SM_SliderProgress: {
+            fillRect = true;
+            if (state & SS_Filled) {
+                if (state & SS_Horizontal) {
+                    frameName = QLatin1String("qtg_fr_slider_h_filled");
+                    frameType = HbFrameDrawer::ThreePiecesHorizontal;
+                } else {
+                    frameName = QLatin1String("qtg_fr_slider_v_filled");
+                    frameType = HbFrameDrawer::ThreePiecesVertical;
+                }
+            }
+            break;
+        }
+        case SM_TableItem: {
+            if (state & SS_Pressed)
+                frameName = QLatin1String("qtg_fr_grid_pressed");
+            else if (state & SS_Focused)
+                frameName = QLatin1String("qtg_fr_grid_highlight");
+            frameType = HbFrameDrawer::NinePieces;
+            styleManager()->parameter(QLatin1String("hb-param-background-list-main"), border);
+            break;
+        }
+        case SM_TabShape: {
+            if (state & SS_Horizontal) {
+                frameType = HbFrameDrawer::ThreePiecesHorizontal;
+                frameGraphicsHeader = QLatin1String("qtg_fr_tb_h_");
+
+                if (state & SS_Beginning)
+                    framePartList << QLatin1String("_l") << QLatin1String("_c") << QLatin1String("_cr");
+                else if (state & SS_Middle)
+                    framePartList << QLatin1String("_cl") << QLatin1String("_c") << QLatin1String("_cr");
+                else if (state & SS_End)
+                    framePartList << QLatin1String("_cl") << QLatin1String("_c") << QLatin1String("_r");
+                else
+                    framePartList << QLatin1String("_cl") << QLatin1String("_c") << QLatin1String("_r");
+            } else if (state & SS_Vertical) {
+                frameType = HbFrameDrawer::ThreePiecesVertical;
+                frameGraphicsHeader = QLatin1String("qtg_fr_tb_v_");
+                if (state & SS_Beginning)
+                    framePartList << QLatin1String("_t") << QLatin1String("_c") << QLatin1String("_cb");
+                else if (state & SS_Middle)
+                    framePartList << QLatin1String("_ct") << QLatin1String("_c") << QLatin1String("_cb");
+                else if (state & SS_End)
+                    framePartList << QLatin1String("_ct") << QLatin1String("_c") << QLatin1String("_b");
+                else
+                    framePartList << QLatin1String("_t") << QLatin1String("_c") << QLatin1String("_b");
+            }
+            if (state & SS_Disabled)
+                frameGraphicsFooter = QLatin1String("disabled");
+            else if (state & SS_Pressed)
+                frameGraphicsFooter = QLatin1String("pressed");
+            else if (state & SS_Selected)
+                frameGraphicsFooter = QLatin1String("highlight");
+            else
+                frameGraphicsFooter = QLatin1String("normal");
+            break;
+        }
+        case SM_ToolBarButton: {
+            if (state & SS_Horizontal) {
+                frameType = HbFrameDrawer::ThreePiecesHorizontal;
+                if (state & SS_Disabled)
+                    frameName = QLatin1String("qtg_fr_tb_h_disabled");
+                else if (state & SS_Pressed)
+                    frameName = QLatin1String("qtg_fr_tb_h_pressed");
+                else if (state & SS_Latched)
+                    frameName = QLatin1String("qtg_fr_tb_h_latched");
+                else if (state & SS_Selected)
+                    frameName = QLatin1String("qtg_fr_tb_h_highlight");
+                else
+                    frameName = QLatin1String("qtg_fr_tb_h_normal");
+            } else {
+                frameType = HbFrameDrawer::ThreePiecesVertical;
+                if (state & SS_Disabled)
+                    frameName = QLatin1String("qtg_fr_tb_v_disabled");
+                else if (state & SS_Pressed)
+                    frameName = QLatin1String("qtg_fr_tb_v_pressed");
+                else if (state & SS_Latched)
+                    frameName = QLatin1String("qtg_fr_tb_v_latched");
+                else if (state & SS_Selected)
+                    frameName = QLatin1String("qtg_fr_tb_v_highlight");
+                else
+                    frameName = QLatin1String("qtg_fr_tb_v_normal");
+            }
+            styleManager()->parameter(QLatin1String("hb-param-background-button"), border);
+            break;
+        }
+        case SM_ToolBarExtension:{
+//            fillRect = true;
+//            styleManager()->parameter(QLatin1String("hb-param-background-editor"), border);
+            frameName = QLatin1String("qtg_fr_tb_ext");
+            frameType = HbFrameDrawer::NinePieces;
+            }
+            break;
+        case SM_ToolTip: {
+            fillRect = true;
+            frameType = HbFrameDrawer::NinePieces;
+            frameName = QLatin1String("qtg_fr_popup_preview");
+            break;
+        }
+        case SM_HeaderItem:
+        case SM_ThemeBackground:
+        case SM_ToolBar:
+        default: {
+            break;
+        }
+    }
+
+    if (frameType != HbFrameDrawer::Undefined)
+        m_frameDrawer->setFrameType(frameType);
+    else
+        return false;
+
+    if (!frameName.isNull()) {
+        m_frameDrawer->setFrameGraphicsName(frameName);
+    } else if (framePartList.count() > 0) {
+        m_frameDrawer->setFileNameSuffixList(framePartList);
+        m_frameDrawer->setFrameGraphicsName(QString ("%0%1").arg(frameGraphicsHeader).arg(frameGraphicsFooter));
+    } else {
+        return false;
+    }
+
+    m_frameDrawer->setBorderWidth(border);
+    m_frameDrawer->setFillWholeRect(fillRect);
+    if (state & SS_Mirrored)
+        mirrorMode = HbIcon::Forced;
+
+    m_frameDrawer->setMirroringMode(mirrorMode);
+
+    const bool rotated = (state & SS_Flipped || state & SS_RotatedRight || state & SS_RotatedLeft) ? true : false;
+    QRect validRect = rect;
+    if (rotated) {
+        QTransform m;
+        painter->save();
+
+        //Calculate new coordinates
+        int newX = 0, newY = 0;
+        if (state & SS_RotatedRight) {
+            newX = 0;
+            newY = rect.y() + rect.height() - 1;
+        } else if (state & SS_RotatedLeft) {
+            newX = rect.width();
+            newY = rect.y() - 1;
+        } else if (state & SS_Flipped) {
+            if (state & SS_Horizontal) {
+                newX = rect.width() + 2 * rect.left();
+                newY = rect.height() + rect.top();
+            } else {
+                newX = rect.width() + rect.left();
+                newY = rect.height() + 2 * rect.top();
+            }
+        }
+
+        //Translate rect and transform
+        if ((state & SS_RotatedRight) || (state & SS_RotatedLeft))
+            validRect.setRect(0, 0, rect.height(), rect.width());
+        m.translate(newX, newY);
+
+        // Set rotation
+        int rotation = 0;
+        if (state & SS_Flipped)
+            rotation = 180;
+        else if (state & SS_RotatedRight)
+            rotation = -90;
+        else if (state & SS_RotatedLeft)
+            rotation = 90;
+        m.rotate(rotation);
+        painter->setTransform(m, true);
+    }
+    m_frameDrawer->paint(painter, validRect);
+
+    if (rotated)
+        painter->restore();
+
+    //Need to clear the list after use.
+    framePartList.clear();
+    m_frameDrawer->setFileNameSuffixList(framePartList);
+    return true;
+}
+
+bool QHbStylePrivate::isDialog(const QWidget *widget)
+{
+    return (widget ? (widget->windowType() == Qt::Dialog) : false);
+}
+
+bool QHbStylePrivate::hbParameter(const QString &parameterName, int &value)
+{
+    bool retValue = false;
+    qreal valueInReal = 0.0;
+    retValue = styleManager()->parameter(parameterName, valueInReal);
+    valueInReal += 0.5; //to make the real->int to round correctly
+    value = valueInReal;
+    return retValue;
+}
+
+void QHbStylePrivate::polishFont(QWidget *widget)
+{
+    HbFontSpec::Role fontRole = HbFontSpec::Undefined;
+    qreal fontSize = 0.0;
+    bool valueFound = false;
+
+    //Widget font role specifications from hb documentation.
+    if (false
+#ifndef QT_NO_COMBOBOX
+        || qobject_cast<QComboBox *>(widget)
+#endif
+#ifndef QT_NO_SPINBOX
+        || qobject_cast<QSpinBox *>(widget)
+#endif
+        || qobject_cast<QRadioButton *>(widget)
+        ) {
+        valueFound = styleManager()->parameter(QLatin1String("b-param-text-height-secondary"), fontSize);
+        fontRole = HbFontSpec::Primary;
+    } else if (false
+        || qobject_cast<QPushButton *>(widget)
+#ifndef QT_NO_TOOLBUTTON
+        || qobject_cast<QToolButton *>(widget)
+#endif
+#ifndef QT_NO_TABWIDGET
+        || qobject_cast<QTabWidget *>(widget)
+#endif
+        ) {
+        valueFound = styleManager()->parameter(QLatin1String("hb-param-text-height-tiny"), fontSize);
+        fontRole = HbFontSpec::Primary;
+    } else if (false
+#ifndef QT_NO_HEADERVIEW
+        || qobject_cast<QHeaderView *>(widget)
+#endif
+#ifndef QT_NO_LISTVIEW
+        || qobject_cast<QListView *>(widget)
+#endif
+#ifndef QT_NO_TABLEVIEW
+        || qobject_cast<QTableView *>(widget)
+#endif
+#ifndef QT_NO_TREEVIEW
+        || qobject_cast<QTreeView *>(widget)
+#endif
+#ifndef QT_NO_LINEEDIT
+        || qobject_cast<QLineEdit *>(widget)
+#endif
+#ifndef QT_NO_TEXTEDIT
+        || qobject_cast<QTextEdit *>(widget)
+#endif
+        || qobject_cast<QSlider *>(widget)
+#ifndef QT_NO_SLIDER
+        || qobject_cast<QGroupBox *>(widget)
+#endif
+        || qobject_cast<QCheckBox *>(widget)
+        ) {
+        fontRole = HbFontSpec::Secondary;
+        valueFound = styleManager()->parameter(QLatin1String("hb-param-text-height-secondary"), fontSize);
+    } else if (false
+#ifndef QT_NO_PROGRESSBAR
+        || qobject_cast<QProgressBar *>(widget)
+#endif
+        ) {
+        fontRole = HbFontSpec::Secondary;
+        valueFound = styleManager()->parameter(QLatin1String("hb-param-text-height-tiny"), fontSize);
+    }
+
+    HbFontSpec *fontSpec = new HbFontSpec(fontRole);
+    if (valueFound) {
+        fontSpec->setTextHeight(fontSize);
+        QFont widgetFont = fontSpec->font();
+        widgetFont.setPixelSize(fontSpec->font().pixelSize());
+        widget->setFont(widgetFont);
+    }
+    delete fontSpec;
+}
+
+void QHbStylePrivate::polishPalette(QWidget *widget)
+{
+    QPalette widgetPalette = widget->palette();
+    if (false
+#ifndef QT_NO_TEXTEDIT
+        || qobject_cast<QTextEdit *>(widget)
+#endif
+    ) {
+        widgetPalette.setColor(QPalette::Active, QPalette::Highlight, HbColorScheme::color("qtc_lineedit_marker_normal"));
+        widgetPalette.setColor(QPalette::Active, QPalette::HighlightedText, HbColorScheme::color("qtc_lineedit_selected"));
+        widgetPalette.setColor(QPalette::Active, QPalette::Text, HbColorScheme::color("qtc_lineedit_normal"));
+        //QTextEdits have specific graphic in QHbStyle for background
+        widgetPalette.setColor(QPalette::Active, QPalette::Base, Qt::transparent);
+    } else if (false
+#ifndef QT_NO_LINEEDIT
+        || qobject_cast<QLineEdit *>(widget)
+#endif
+        ) {
+        widgetPalette.setColor(QPalette::Active, QPalette::Highlight, HbColorScheme::color("qtc_lineedit_marker_normal"));
+        widgetPalette.setColor(QPalette::Active, QPalette::HighlightedText, HbColorScheme::color("qtc_lineedit_selected"));
+        widgetPalette.setColor(QPalette::Active, QPalette::Text, HbColorScheme::color("qtc_lineedit_normal"));
+    }
+    widget->setPalette(widgetPalette);
+}
+
+QT_END_NAMESPACE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/qhbstyle.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+#ifndef QHBSTYLE_H
+#define QHBSTYLE_H
+
+#include <QtGui/qcommonstyle.h>
+
+class QHbStylePrivate;
+
+class QHbStyle : public QCommonStyle
+{
+    Q_OBJECT
+    Q_DECLARE_PRIVATE(QHbStyle)
+
+public:
+    QHbStyle();
+    ~QHbStyle();
+
+    void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
+                       QPainter *painter, const QWidget *widget = 0) const;
+    void drawControl(ControlElement element, const QStyleOption *option,
+                     QPainter *painter, const QWidget *widget) const;
+    void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
+                            QPainter *painter, const QWidget *widget) const;
+    QSize sizeFromContents(ContentsType type, const QStyleOption *option,
+                           const QSize &size, const QWidget *widget) const;
+
+    QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const;
+    QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,
+                         SubControl sc, const QWidget *widget) const;
+
+    int styleHint(StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0,
+                  QStyleHintReturn *returnData = 0) const;
+
+    int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const;
+
+    QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,
+                           const QWidget *widget = 0) const;
+
+    void polish(QWidget *widget);
+    void polish(QApplication *app);
+    void polish(QPalette &pal);
+    void unpolish(QWidget *widget);
+    void unpolish(QApplication *app);
+
+    QPalette standardPalette() const;
+
+protected Q_SLOTS:
+    QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *opt = 0,
+                                     const QWidget *widget = 0) const;
+    int layoutSpacingImplementation(QSizePolicy::ControlType control1,
+                                    QSizePolicy::ControlType control2,
+                                    Qt::Orientation orientation,
+                                    const QStyleOption *option = 0,
+                                    const QWidget *widget = 0) const;
+
+protected:
+    bool eventFilter(QObject *watched, QEvent *event);
+    void animateControl(ControlElement element, const QStyleOption *option,
+                         QPainter *painter, const QWidget *widget) const;
+
+
+private:
+    QHbStylePrivate* m_private;
+    Q_DISABLE_COPY(QHbStyle)
+};
+
+#endif //QHBSTYLE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/qhbstyle.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not,
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+HEADERS = qhbstyle.h \
+    qhbstyle_p.h \
+    qhbemptystyle.h \
+    qhbstyleplugin.h \
+    qhbstyleanimation.h
+SOURCES = qhbstyle.cpp \
+    qhbemptystyle.cpp \
+    qhbstyleplugin.cpp \
+    qhbstyleanimation.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/qhbstyle.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,47 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not,
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+TEMPLATE    = lib
+CONFIG     += plugin hb
+TARGET      = qhbstyle
+win32 {
+    debug:DESTDIR = ../debug/styles/
+    release:DESTDIR = ../release/styles/
+} else {
+    DESTDIR = $$[QT_INSTALL_PLUGINS]/styles
+}
+
+symbian:BLD_INF_RULES.prj_exports += "./rom/qhbstyle.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qhbstyle.iby)"
+
+include(qhbstyle.pri)
+
+
+symbian: {
+    load(data_caging_paths)
+    styleplugin.sources = qhbstyle.dll
+    styleplugin.path = $$QT_PLUGINS_BASE_DIR/styles
+    DEPLOYMENT += styleplugin
+}
+
+symbian {
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.UID3 = 0x2002FF8B
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.CAPABILITY = ALL -TCB
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/qhbstyle_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,155 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+#ifndef QHBSTYLE_P_H
+#define QHBSTYLE_P_H
+
+#include "qhbstyle.h"
+
+#ifndef QT_NO_STYLE_HB
+
+QT_BEGIN_NAMESPACE
+
+class HbStyle;
+class QParallelAnimationGroup;
+
+enum Item {
+    SP_Arrow,
+    SP_BoxButton,
+    SP_CheckBoxIndicator,
+    SP_CurrentFolderIcon,
+    SP_ErasedNoteIcon,
+    SP_ErrorNoteIcon,
+    SP_HeaderOrderIndicator,
+    SP_InfoNoteIcon,
+    SP_ItemDecoration,
+    SP_LargeMemoryCardIcon,
+    SP_MenuIndicator,
+    SP_MenuSeparator,
+    SP_NewSmallFolderIcon,
+    SP_OkNoteIcon,
+    SP_QueryNoteIcon,
+    SP_RadioButtonIndicator,
+    SP_SelectedIndicator,
+    SP_SeparatorLine,
+    SP_SliderHandle,
+    SP_SliderTick,
+    SP_SmallFileIcon,
+    SP_SmallFolderIcon,
+    SP_SubMenuIndicator,
+    SP_TreeViewCollapsed,
+    SP_TreeViewExpanded,
+    SP_WarningNoteIcon,
+};
+
+enum MultiPartItem {
+    SM_BoxFrame,
+    SM_Dialog,
+    SM_GroupBox,
+    SM_GroupBoxTitle,
+    SM_HeaderItem,
+    SM_ItemViewItem,
+    SM_LineEdit,
+    SM_ListParent,
+    SM_Menu,
+    SM_MenuItem,
+    SM_MenuScroller,
+    SM_Panel,
+    SM_ProgressBarGroove,
+    SM_ProgressBarIndicator,
+    SM_PushButton,
+    SM_ScrollBarGroove,
+    SM_ScrollBarHandle,
+    SM_SliderGroove,
+    SM_SliderProgress,
+    SM_TableItem,
+    SM_TabShape,
+    SM_TextEdit, //todo: or combine this and  SM_LineEdit to "SM_TextEditor"?
+    SM_ThemeBackground,
+    SM_ToolBar,
+    SM_ToolBarButton,
+    SM_ToolButton,
+    SM_ToolTip,
+    SM_ToolBarExtension,
+};
+
+enum ItemState {
+    SS_Active       = 0x000001,  // "On"
+    SS_Inactive     = 0x000002,  // "Off"
+    SS_Pressed      = 0x000004,
+    SS_Latched      = 0x000008,  // similar to SS_Pressed, but state remains ("toggled")
+    SS_Disabled     = 0x000010,
+    SS_Filled       = 0x000020,
+    SS_Horizontal   = 0x000040,
+    SS_Vertical     = 0x000080,
+    SS_Selected     = 0x000100,  // item is selected (not necessarily focused)
+    SS_Beginning    = 0x000200,  // beginning part of multipart item
+    SS_Middle       = 0x000400,  // middle part of multipart item
+    SS_End          = 0x000800,  // end part of multipart item
+    SS_Flipped      = 0x001000,  // 180 degree rotation
+    SS_Mirrored     = 0x002000,  // graphic is drawn mirrored
+    SS_Down         = 0x004000,
+    SS_Up           = 0x008000,
+    SS_Left         = 0x010000,
+    SS_Right        = 0x020000,
+    SS_RotatedRight = 0x040000,
+    SS_RotatedLeft  = 0x080000,
+    SS_Edited       = 0x100000,
+    SS_Alternate    = 0x200000,
+    SS_Focused      = 0x400000   // item is focused (not necessarily selected)
+};
+
+Q_DECLARE_FLAGS(ItemStates, ItemState)
+
+class QHbStylePrivate //: public QObjectPrivate
+{
+    //Q_DECLARE_PUBLIC(QHbStyle)
+
+public:
+    QHbStylePrivate();
+
+    virtual ~QHbStylePrivate();
+
+    //Call HbStyle styleManager to avoid name confusion
+    HbStyle* styleManager();
+    void setStyleManager(HbStyle* style);
+
+    QParallelAnimationGroup* animationGroup();
+
+    //These return true if drawing was done by the style successfully.
+    bool drawItem(Item part, QPainter *painter, const QRect &rect, ItemStates state = ItemStates(SS_Active | SS_Horizontal), const QColor &color = QColor(QColor::Invalid));
+    bool drawMultiPartItem(MultiPartItem multiPart, QPainter *painter, const QRect &rect, ItemStates state = ItemStates(SS_Active | SS_Horizontal));
+
+    bool isDialog(const QWidget *widget);
+    bool hbParameter(const QString &parameterName, int &value);
+    void polishFont(QWidget *widget);
+    void polishPalette(QWidget *widget);
+
+private:
+    HbStyle *m_styleManager;
+    QScopedPointer<HbFrameDrawer> m_frameDrawer;
+    QScopedPointer<QParallelAnimationGroup> m_animationGroup;
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_STYLE_HB
+
+#endif //QHBSTYLE_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/qhbstyleanimation.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,139 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+#include "qhbstyleanimation.h"
+#include <qpixmap.h>
+#include <qwidget.h>
+#include <qpainter.h>
+#include <hbicon.h>
+#include <qbitmap.h>
+
+#include "qhbstyle.h"
+#include "hbframedrawer.h"
+
+
+QHbStyleAnimation::QHbStyleAnimation(QWidget* target, QObject *parent) :
+    QObject(parent), m_animationIcon(0), m_target(target), m_point(QPoint(0, 0)), m_mask(0)
+{
+}
+
+QHbStyleAnimation::~QHbStyleAnimation()
+{
+}
+
+const QWidget* QHbStyleAnimation::target()const
+{
+    return m_target.data();
+}
+
+QPoint QHbStyleAnimation::point()
+{
+    return m_point;
+}
+
+void QHbStyleAnimation::setPoint(const QPoint& point)
+{
+    m_point = point;
+    m_target->update();
+}
+
+void QHbStyleAnimation::createAnimationIcon(QStyle::ControlElement element, Qt::Orientations orientation)
+{
+    //Create mask
+    HbFrameDrawer drawer;
+    if (orientation == Qt::Horizontal){
+        drawer.setFrameGraphicsName("qtg_fr_progbar_h_mask");
+        drawer.setFrameType(HbFrameDrawer::ThreePiecesHorizontal);
+    }
+    else {
+        drawer.setFrameGraphicsName("qtg_fr_progbar_v_mask");
+        drawer.setFrameType(HbFrameDrawer::ThreePiecesVertical);
+    }
+    drawer.setFillWholeRect(true);
+    m_mask.reset(new QPixmap(m_target->rect().size()));
+    m_mask->fill(Qt::transparent);
+    QPainter p(m_mask.data());
+    drawer.paint(&p, m_target->rect());
+    p.end();
+
+    //Create animated icon
+    QString iconName;
+    switch (element) {
+        case QStyle::CE_ProgressBarContents: {
+             if (orientation == Qt::Horizontal)
+                iconName = QLatin1String("qtg_graf_progbar_h_wait");
+             else
+                iconName = QLatin1String("qtg_graf_progbar_v_wait");
+            break;
+        }
+        default:
+            break;
+    }
+
+    if (!iconName.isNull() && !m_target->rect().isEmpty()) {
+        HbIcon* icon = new HbIcon(iconName);
+        if(orientation == Qt::Horizontal)
+            icon->setSize(QSize(icon->width(), m_target->rect().height()));
+        else
+            icon->setSize(QSize(m_target->rect().width(), icon->height()));
+
+        const qreal rectWidth = m_target->rect().width();
+        const qreal iconWidth = icon->width();
+        const qreal rectHeight = m_target->rect().height();
+        const qreal iconHeight = icon->height();
+
+        const int animationWidth = (orientation == Qt::Horizontal) ?  int(rectWidth + iconWidth) : int(rectWidth);
+        const int animationHeight = (orientation == Qt::Horizontal) ?  int(rectHeight) : int(rectHeight + iconHeight);
+
+        m_animationIcon.reset(new QPixmap(animationWidth, animationHeight));
+        m_animationIcon->fill(Qt::transparent);
+        QPainter p(m_animationIcon.data());
+
+        if (orientation == Qt::Horizontal) {
+            if (iconWidth > 0)
+                for (qreal i = 0 ; i < (rectWidth + iconWidth); i += iconWidth)
+                    icon->paint(&p, QRectF(i, 0, iconWidth, iconHeight), Qt::IgnoreAspectRatio, Qt::AlignCenter, QIcon::Normal, QIcon::On);
+        } else {
+            if (iconHeight > 0)
+                for(qreal i = 0 ; i < (rectHeight + iconHeight) ; i += iconHeight)
+                    icon->paint(&p, QRectF(0, i, iconWidth, iconHeight), Qt::IgnoreAspectRatio, Qt::AlignCenter, QIcon::Normal, QIcon::On);
+        }
+        p.end();
+    }
+}
+
+void QHbStyleAnimation::paintAnimation(QPainter *painter)
+{
+    Q_ASSERT(m_animationIcon);
+    Q_ASSERT(painter);
+
+    //Take part from animation icon
+    QPixmap icon(m_target->rect().size());
+    icon.fill(Qt::transparent);
+    QPainter p(&icon);
+    p.setCompositionMode(QPainter::CompositionMode_SourceOver);
+    p.drawPixmap(QPointF(0, 0), *m_mask);
+    p.setCompositionMode(QPainter::CompositionMode_SourceIn);
+    p.drawPixmap(m_point, *m_animationIcon, QRect(0, 0, m_target->rect().width() + m_point.rx() * -1, m_target->rect().height() + m_point.ry() * -1));
+    p.end();
+
+    //paint animation
+    painter->drawPixmap(QPointF(0, 0), icon);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/qhbstyleanimation.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+#ifndef QHBSTYLEANIMATION_H
+#define QHBSTYLEANIMATION_H
+
+#include <QObject>
+#include <qstyle.h>
+#include <qnamespace.h>
+
+class QPixmap;
+class QPainter;
+
+class QHbStyleAnimation : public QObject
+{
+Q_OBJECT
+
+Q_PROPERTY(QPoint point READ point WRITE setPoint)
+
+public:
+    QHbStyleAnimation(QWidget* target, QObject *parent = 0);
+    ~QHbStyleAnimation();
+
+    const QWidget* target() const;
+
+    QPoint point();
+    void setPoint(const QPoint& rect);
+
+    void createAnimationIcon(QStyle::ControlElement element, Qt::Orientations orientation);
+    void paintAnimation(QPainter *painter);
+
+private:
+    QScopedPointer<QPixmap> m_animationIcon;
+    QScopedPointer<QWidget> m_target;
+    QPoint m_point;
+    QScopedPointer<QPixmap> m_mask;
+};
+
+#endif // QHBSTYLEANIMATION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/qhbstyleplugin.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+#include <QtGui>
+
+#include "qhbstyleplugin.h"
+#include "qhbstyle.h"
+#include "qhbemptystyle.h"
+
+QStringList QHbStylePlugin::keys() const
+{
+    return QStringList() << "HbStyle" << "HbEmptyStyle";
+}
+
+QStyle *QHbStylePlugin::create(const QString &key)
+{
+    if (key.toLower() == "hbstyle")
+         return new QHbStyle;
+    else if (key.toLower() == "hbemptystyle")
+        return new QHbEmptyStyle;
+    else
+        return 0;
+}
+
+Q_EXPORT_PLUGIN2(qhbstyleplugin, QHbStylePlugin)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/qhbstyleplugin.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+#ifndef QHBSTYLEPLUGIN_H
+#define QHBSTYLEPLUGIN_H
+
+#include <QStylePlugin>
+
+class QStringList;
+class QStyle;
+
+class QHbStylePlugin : public QStylePlugin
+ {
+
+    Q_OBJECT
+
+    public:
+        QHbStylePlugin() {};
+
+        QStringList keys() const;
+        QStyle *create(const QString &key);
+ };
+
+#endif //QHBSTYLEPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qhbstyle/rom/qhbstyle.iby	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef __QHBSTYLE_IBY__
+#define __QHBSTYLE_IBY__
+
+#include <bldvariant.hrh>
+
+file=ABI_DIR\BUILD_DIR\qhbstyle.dll              SHARED_LIB_DIR\qhbstyle.dll          PAGED
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/bwins/xqpluginsu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,27 @@
+EXPORTS
+	?unload@XQPluginLoader@@QAE_NXZ @ 1 NONAME ; bool XQPluginLoader::unload(void)
+	?instance@XQPluginLoader@@QAEPAVQObject@@XZ @ 2 NONAME ; class QObject * XQPluginLoader::instance(void)
+	??1XQPluginInfo@@QAE@XZ @ 3 NONAME ; XQPluginInfo::~XQPluginInfo(void)
+	??_ECPluginFactory@@UAE@I@Z @ 4 NONAME ; CPluginFactory::~CPluginFactory(unsigned int)
+	?version@XQPluginInfo@@QBEIXZ @ 5 NONAME ; unsigned int XQPluginInfo::version(void) const
+	??0XQPluginInfo@@QAE@IIABVQString@@0@Z @ 6 NONAME ; XQPluginInfo::XQPluginInfo(unsigned int, unsigned int, class QString const &, class QString const &)
+	?NewL@CPluginFactory@@SAPAV1@H@Z @ 7 NONAME ; class CPluginFactory * CPluginFactory::NewL(int)
+	??_EXQPluginLoader@@UAE@I@Z @ 8 NONAME ; XQPluginLoader::~XQPluginLoader(unsigned int)
+	?dllName@XQPluginInfo@@QBEABVQString@@XZ @ 9 NONAME ; class QString const & XQPluginInfo::dllName(void) const
+	?createQtPlugin@CPluginFactory@@QAEPAVQObject@@XZ @ 10 NONAME ; class QObject * CPluginFactory::createQtPlugin(void)
+	??0XQPluginInfo@@QAE@XZ @ 11 NONAME ; XQPluginInfo::XQPluginInfo(void)
+	??0XQPluginLoader@@QAE@PAVQObject@@@Z @ 12 NONAME ; XQPluginLoader::XQPluginLoader(class QObject *)
+	?load@XQPluginLoader@@QAE_NXZ @ 13 NONAME ; bool XQPluginLoader::load(void)
+	?errorString@XQPluginLoader@@QBE?AVQString@@XZ @ 14 NONAME ; class QString XQPluginLoader::errorString(void) const
+	?opaqueData@XQPluginInfo@@QBEABVQString@@XZ @ 15 NONAME ; class QString const & XQPluginInfo::opaqueData(void) const
+	?isLoaded@XQPluginLoader@@QBE_NXZ @ 16 NONAME ; bool XQPluginLoader::isLoaded(void) const
+	?setUid@XQPluginLoader@@QAEXH@Z @ 17 NONAME ; void XQPluginLoader::setUid(int)
+	??0XQPluginInfo@@QAE@ABV0@@Z @ 18 NONAME ; XQPluginInfo::XQPluginInfo(class XQPluginInfo const &)
+	?uid@XQPluginInfo@@QBEIXZ @ 19 NONAME ; unsigned int XQPluginInfo::uid(void) const
+	??4XQPluginInfo@@QAEAAV0@ABV0@@Z @ 20 NONAME ; class XQPluginInfo & XQPluginInfo::operator=(class XQPluginInfo const &)
+	??1CPluginFactory@@UAE@XZ @ 21 NONAME ; CPluginFactory::~CPluginFactory(void)
+	?uid@XQPluginLoader@@QBEHXZ @ 22 NONAME ; int XQPluginLoader::uid(void) const
+	??1XQPluginLoader@@UAE@XZ @ 23 NONAME ; XQPluginLoader::~XQPluginLoader(void)
+	??0XQPluginLoader@@QAE@HPAVQObject@@@Z @ 24 NONAME ; XQPluginLoader::XQPluginLoader(int, class QObject *)
+	?listImplementations@XQPluginLoader@@SA_NABVQString@@AAV?$QList@VXQPluginInfo@@@@@Z @ 25 NONAME ; bool XQPluginLoader::listImplementations(class QString const &, class QList<class XQPluginInfo> &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/eabi/xqpluginsu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,39 @@
+EXPORTS
+	_ZN12XQPluginInfoC1ERKS_ @ 1 NONAME
+	_ZN12XQPluginInfoC1EjjRK7QStringS2_ @ 2 NONAME
+	_ZN12XQPluginInfoC1Ev @ 3 NONAME
+	_ZN12XQPluginInfoC2ERKS_ @ 4 NONAME
+	_ZN12XQPluginInfoC2EjjRK7QStringS2_ @ 5 NONAME
+	_ZN12XQPluginInfoC2Ev @ 6 NONAME
+	_ZN12XQPluginInfoD1Ev @ 7 NONAME
+	_ZN12XQPluginInfoD2Ev @ 8 NONAME
+	_ZN12XQPluginInfoaSERKS_ @ 9 NONAME
+	_ZN14CPluginFactory14createQtPluginEv @ 10 NONAME
+	_ZN14CPluginFactory4NewLEi @ 11 NONAME
+	_ZN14CPluginFactoryD0Ev @ 12 NONAME
+	_ZN14CPluginFactoryD1Ev @ 13 NONAME
+	_ZN14CPluginFactoryD2Ev @ 14 NONAME
+	_ZN14XQPluginLoader19listImplementationsERK7QStringR5QListI12XQPluginInfoE @ 15 NONAME
+	_ZN14XQPluginLoader4loadEv @ 16 NONAME
+	_ZN14XQPluginLoader6setUidEi @ 17 NONAME
+	_ZN14XQPluginLoader6unloadEv @ 18 NONAME
+	_ZN14XQPluginLoader8instanceEv @ 19 NONAME
+	_ZN14XQPluginLoaderC1EP7QObject @ 20 NONAME
+	_ZN14XQPluginLoaderC1EiP7QObject @ 21 NONAME
+	_ZN14XQPluginLoaderC2EP7QObject @ 22 NONAME
+	_ZN14XQPluginLoaderC2EiP7QObject @ 23 NONAME
+	_ZN14XQPluginLoaderD0Ev @ 24 NONAME
+	_ZN14XQPluginLoaderD1Ev @ 25 NONAME
+	_ZN14XQPluginLoaderD2Ev @ 26 NONAME
+	_ZNK12XQPluginInfo10opaqueDataEv @ 27 NONAME
+	_ZNK12XQPluginInfo3uidEv @ 28 NONAME
+	_ZNK12XQPluginInfo7dllNameEv @ 29 NONAME
+	_ZNK12XQPluginInfo7versionEv @ 30 NONAME
+	_ZNK14XQPluginLoader11errorStringEv @ 31 NONAME
+	_ZNK14XQPluginLoader3uidEv @ 32 NONAME
+	_ZNK14XQPluginLoader8isLoadedEv @ 33 NONAME
+	_ZTI14CPluginFactory @ 34 NONAME
+	_ZTI14XQPluginLoader @ 35 NONAME
+	_ZTV14CPluginFactory @ 36 NONAME
+	_ZTV14XQPluginLoader @ 37 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/examples/examples.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+CONFIG += qt ordered
+TEMPLATE    = subdirs
+
+SUBDIRS = testplugin testapp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/examples/testapp/src/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QtGui>
+
+#include <QObject>
+#include <QString>
+#include <QList>
+
+#include <xqplugin.h>
+#include <xqpluginloader.h>
+#include <xqplugininfo.h>
+
+#include <stdio.h>
+
+#include <testplugininterface.h>
+
+void log(const QString& aString)
+{
+    FILE* poFile = fopen( "c:/trace.log", "a" );
+    if( !poFile )
+        return;
+    fprintf( poFile, "%s\n", aString.toAscii().constData() );
+    fclose( poFile );
+}
+
+int main(int argc, char *argv[])
+{
+    QApplication app(argc, argv);
+    log("--- Start ---");
+    QList<XQPluginInfo> impls;
+    
+    XQPluginLoader::listImplementations("org.nokia.mmdt.TestPlugin/1.0", impls);
+
+    log("list plugins:");
+    
+    for (int i=0; i<impls.size(); i++) {
+        log("plugin found...");
+        QString fmtStr("%1: %2");
+        log(fmtStr.arg("dll: ").arg(impls[i].dllName()));
+        log(fmtStr.arg("opaque data: ").arg(impls[i].opaqueData()));
+        log(fmtStr.arg("uid: ").arg(impls[i].uid()));
+        log("---");
+    }
+
+    XQPluginLoader pluginLoader;
+    pluginLoader.setUid(0xE1253163);
+    
+    QObject *plugin = pluginLoader.instance();
+
+    QString pluginFmt("Plugin instance: %1");
+    log(pluginFmt.arg(reinterpret_cast<int>(plugin)));
+
+    TestPluginInterface *pluginCast = qobject_cast<TestPluginInterface*>(plugin);
+    log(pluginFmt.arg(reinterpret_cast<int>(pluginCast)));
+
+
+    if (pluginCast!=0)
+    	log(pluginFmt.arg(pluginCast->test()));
+    
+    log("--- Stop ---");
+//    return app.exec();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/examples/testapp/testapp.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,48 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = app
+TARGET = 
+TARGET.UID3 = 
+CONFIG += qt
+
+DEPENDPATH += .
+INCLUDEPATH += .
+INCLUDEPATH += /epoc32/include/domain \
+               /epoc32/include/domain/middleware \
+               /epoc32/include/domain/applications \
+               /orbit/include \
+               /epoc32/include/hb \
+               /epoc32/include/hb/hbcore \
+	       ../testplugin/inc
+
+TARGET.CAPABILITY = ALL -TCB
+TARGET.EPOCHEAPSIZE = 0x20000 0x1600000
+
+LIBS += -lxqplugins
+
+SOURCES += \
+           src/main.cpp
+          
+HEADERS += 
+		   
+
+           
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/examples/testplugin/inc/testplugin.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  
+*
+*/
+
+#ifndef TESTPLUGIN_H_
+#define TESTPLUGIN_H_
+
+#include <QObject>
+
+#include <testplugininterface.h>
+
+#ifdef BUILD_DLL
+#define DLL_EXPORT Q_DECL_EXPORT
+#else
+#define DLL_EXPORT Q_DECL_IMPORT
+#endif
+
+class TestPlugin : public QObject, public TestPluginInterface
+    {
+    Q_OBJECT
+    Q_INTERFACES(TestPluginInterface)
+
+public:
+	TestPlugin();
+	
+	virtual ~TestPlugin();
+
+	virtual QString test();
+    };
+
+#endif /* TESTPLUGIN_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/examples/testplugin/inc/testplugininterface.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  
+*
+*/
+
+#ifndef TESTPLUGININTERFACE_H_
+#define TESTPLUGININTERFACE_H_
+
+#include <QObject>
+
+#ifdef BUILD_DLL
+#define DLL_EXPORT Q_DECL_EXPORT
+#else
+#define DLL_EXPORT Q_DECL_IMPORT
+#endif
+
+class DLL_EXPORT  TestPluginInterface //: public QObject
+    {
+public:
+	virtual QString test() = 0;
+    };
+
+Q_DECLARE_INTERFACE(TestPluginInterface, "org.nokia.mmdt.QViewPlugin/1.0" );
+
+
+#endif /* TESTPLUGININTERFACE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/examples/testplugin/src/testplugin.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "testplugin.h"
+
+#include "xqplugin.h"
+
+TestPlugin::TestPlugin() 
+:
+QObject()
+{ 
+	qDebug("test plugin: construction");
+}
+	
+TestPlugin::~TestPlugin()
+{ 
+	qDebug("test plugin: deleted");
+}
+    
+QString TestPlugin::test()
+{
+	qDebug("test plugin: test() call");
+	return QString("I'm test plugin!");
+}
+
+
+XQ_EXPORT_PLUGIN2(testplugin, TestPlugin);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/examples/testplugin/testplugin.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,40 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = lib
+CONFIG += qt hb ecomplugin
+TARGET = testplugin
+
+TARGET.UID3 = 0xE1253163
+
+SERVICE.INTERFACE_NAME = org.nokia.mmdt.TestPlugin/1.0
+SERVICE.CONFIGURATION = "<t>0x10000000</t><p>0x30000001</p><i>PluginPriorityNormal</i><f>0x00000003</f>"
+
+INCLUDEPATH    += inc
+
+HEADERS         = inc/testplugin.h \
+		  inc/testplugininterface.h
+
+SOURCES         = src/testplugin.cpp
+
+TARGET.CAPABILITY = All -Tcb
+symbian:TARGET.EPOCALLOWDLLDATA = 1
+symbian:TARGETTYPE_OVERRIDE = PLUGIN
+#MMP_RULES+=EXPORTUNFROZEN
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/install.py	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,102 @@
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:  The configure script of ecomext-qt
+#
+
+import sys
+import getopt
+import os
+from optparse import OptionParser
+
+def showHelp():
+	print "Usage: 'compile [--help|-h] [--clean|-c] [--target|-t <target>] [--tool|-o]'"
+	print ""
+	print "Options:"
+	print "  --help,-h              Show help and quit"
+	print "  --clean,-c             Clean ecomext-qt"
+	print "  --target,-t <target>   Build only for specific target. Target syntax from makefiles has to be used,"
+	print "                         eg.: \'release-armv5\' \'debug-winscw\'. Default is to build without target specified. "
+	print "  --tool,-o              Compile xqecom tool instead of copying precompiled xqecom.exe (win32 version)."
+	print "                         Warning: Compilation uses qt sources directly and is very probable to broke on other qt versions."
+	
+def copyPRF():
+	os.system("qmake 1>>&0 2>&1")
+	os.system("make installprf") #this will clean exe
+
+def copyEXE():
+	os.system("qmake 1>>&0 2>&1")
+	os.system("make installtool") #this will clean exe
+	
+def compileTOOL():
+	print "compile xqecom"
+	os.chdir("xqecom")	
+	os.system("qmake -platform win32-g++")
+	os.system("make release")
+	os.chdir('..')
+	
+def compileXQPLUGINFRAMEWORK(buildArg):
+	print "compile xqplugins	",buildArg
+	os.chdir("xqplugins")
+	os.system("qmake")
+	mcommand = "make "+buildArg
+	os.system(mcommand)
+	os.chdir('..')
+	
+def cleanME():
+	os.system("qmake 1>>&0 2>&1")
+	print "Clean tool"
+	os.system("make cleantool") #this will clean exe
+	print "Clean prf"
+	os.system("make cleanprf") #this will clean prf
+	os.system("make clean 1>>&0 2>&1")
+	os.system("make distclean 1>>&0 2>&1")
+
+	
+def main(argv):
+	try:
+		opts, args = getopt.getopt(argv, "hct:o", ["help", "clean","target=","tool"])
+	except getopt.GetoptError:
+		showHelp()
+		sys.exit(2)
+	
+	buildArg = ""	
+	buildTool = 0
+	
+	for opt, arg in opts:
+#		print opt,arg
+		if opt in ("-h", "--help"):
+			showHelp()
+			sys.exit()
+		elif opt in ("-c", "--clean"):
+			cleanME()
+			sys.exit()
+		elif opt in ("-t", "--target"):
+			buildArg = arg
+		elif opt in ("-o", "--tool"):
+			buildTool = 1
+	
+	copyPRF()
+	if buildTool == 1:
+		compileTOOL()
+	else:
+		copyEXE()
+	compileXQPLUGINFRAMEWORK(buildArg)
+	
+if __name__ == "__main__":
+    main(sys.argv[1:])
+#eof
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/mkspecs/features/ecomplugin.prf	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,69 @@
+symbian {
+
+CONFIG -= def_files
+CONFIG -= def_files_disabled
+
+INCLUDEPATH += /epoc32/include/ecom
+
+LIBS *= -lecom
+LIBS *= -lcharconv
+LIBS *= -lxqplugins
+
+TARGET.UID2 = 0x10009d8d
+#generated files needs TARGET.UID3 to be set
+isEmpty(TARGET.UID3):error(Plugin has to has TARGET.UID3 assigned explicitly!)
+
+
+#Generate additional files
+XQECOMAPP = "python $${EPOCROOT}epoc32/tools/xqecom.py"
+#XQECOMAPP = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}xqecom.exe
+
+XQ_FILE_RSS_TAIL=.rss
+RSSFILE = $$TARGET$$XQ_FILE_RSS_TAIL
+
+XQ_FILE_PKG_TAIL=.pkg
+PKGFILE = $$TARGET$$XQ_FILE_PKG_TAIL
+XQ_FILE_IBY_TAIL=.iby
+IBYFILE = $$TARGET$$XQ_FILE_IBY_TAIL
+XQ_FILE_STUBSOURCE_TAIL=.cpp
+SRCFILE = ecomstub_$$TARGET.UID3$$XQ_FILE_STUBSOURCE_TAIL
+XQ_FILE_STUBHEADER_TAIL=.hrh
+HDRFILE = ecomstub_$$TARGET.UID3$$XQ_FILE_STUBHEADER_TAIL
+	
+	
+symbian-sbsv2{
+	
+ myextension = \
+    "START EXTENSION qt/qtextensions_pre_targetdep.export" \
+    "OPTION PREDEP_TARGET $$RSSFILE" \
+    "OPTION COMMAND $$XQECOMAPP $$TARGET $${TARGET.UID3} \"$${SERVICE.INTERFACE_NAME}\" \"$${SERVICE.CONFIGURATION}\" \"$${SERVICE.CONFIGURATION.FILE}\" " \
+	"END"
+ BLD_INF_RULES.prj_extensions += myextension
+}
+
+	
+symbian-abld{
+
+xqecom.output = "$$RSSFILE"
+XQECOM_INPUT = .   # Need to give some bogus input
+xqecom.input = XQECOM_INPUT
+xqecom.CONFIG = no_link combine explicit_dependencies
+xqecom.variable_out = SOURCES
+xqecom.name = xqecom
+xqecom.commands = $$XQECOMAPP $$TARGET $${TARGET.UID3} \"$${SERVICE.INTERFACE_NAME}\" \"$${SERVICE.CONFIGURATION}\" \"$${SERVICE.CONFIGURATION.FILE}\"
+QMAKE_EXTRA_COMPILERS += xqecom
+}
+
+
+
+
+myResourceInclude = \
+"SOURCEPATH . "\
+"START RESOURCE  $$RSSFILE "\
+"END"
+
+MMP_RULES += myResourceInclude
+MMP_RULES += "SOURCE ecomstub_$${TARGET.UID3}.cpp"
+MMP_RULES += "TARGETTYPE PLUGIN"
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/qtecomplugins.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+CONFIG += qt ordered
+
+TEMPLATE = subdirs
+
+SUBDIRS = xqplugins
+
+symbian:BLD_INF_RULES.prj_exports += "./rom/qtecomplugins.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qtecomplugins.iby)"
+
+defineReplace(myNativePath) {
+    win32:!win32-g++ {
+        unixstyle = false
+    } else:win32-g++:isEmpty(QMAKE_SH) {
+        unixstyle = false
+    } else {
+        unixstyle = true
+    }
+    $$unixstyle {
+        return($$quote(\"$$replace(1, "\\", "/")\"))
+    } else {
+        return($$quote(\"$$replace(1, "/", "\\")\"))
+    }
+}
+
+ecompluginprfdir = "mkspecs\features\\"
+ecompluginprffile = "ecomplugin.prf"
+ecompluginprfdestdir = "$$[QMAKE_MKSPECS]\features"
+
+tooldir = "supplements\xqecom\\"
+toolfile = "xqecom.py"
+tooldestdir = "$$[QT_INSTALL_BINS]"
+
+installprf.commands += $${QMAKE_COPY} $$myNativePath($$ecompluginprfdir$$ecompluginprffile) $$myNativePath($$ecompluginprfdestdir)
+installtool.commands += $${QMAKE_COPY} $$myNativePath($$tooldir$$toolfile) $$myNativePath($$tooldestdir)
+QMAKE_EXTRA_TARGETS += installtool installprf
+
+cleanprf.commands += \$\(DEL_FILE\) $$myNativePath($$ecompluginprfdestdir\\$$ecompluginprffile)
+cleantool.commands += \$\(DEL_FILE\) $$myNativePath($$tooldestdir\\$$toolfile)
+QMAKE_EXTRA_TARGETS += cleantool cleanprf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/rom/qtecomplugins.iby	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: 
+*
+*/
+
+#ifndef __XQECOMPLUGINS_IBY__
+#define __XQECOMPLUGINS_IBY__
+
+#include <bldvariant.hrh>
+
+file=ABI_DIR\BUILD_DIR\xqplugins.dll               SHARED_LIB_DIR\xqplugins.dll UNPAGED
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/supplements/xqecom/xqecom.py	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,255 @@
+#!/usr/bin/env python
+"""
+This is part of qtextensions/qtecomplugins extension. It pregenerates few files needed during compilation of ecom plugins.
+Those includes:
+  * registration resource file
+  * stubs
+  * pkg file
+  * iby file
+"""
+
+import logging
+import datetime
+import sys
+from optparse import OptionParser
+
+class Generator(object):
+	def __init__(self, args):
+		if len(args)==5:
+			if args[2]=="":
+				interfaceValue = args[0]+".dll"
+			else:
+				interfaceValue = args[2]
+			self.args = {
+			'target': args[0],
+			'uid3': args[1],
+			'interface': interfaceValue,
+			'configuration': args[3],
+			'configurationFile': args[4],
+			'timestamp': datetime.datetime.now()
+			}
+		else:
+			logging.fatal("illegal number of arguments: %d" % len(args))
+			sys.exit(1)
+	def generate(self):
+		logging.warning("%s is not generating anything useful" % self.__class__.__name__)
+	def strip(self, s):
+		l = len(s) - len(s.lstrip())
+		def stripOrNot(x):
+			x = x + '\n'
+			if l>=len(x):
+				return x
+			else:
+				return x[l:]
+		return ''.join(map(stripOrNot, s.splitlines(False)))
+		
+class RssGenerator(Generator):
+	"""
+	RSS generator.
+	"""
+	def __init__(self, args):
+		super(self.__class__, self).__init__(args)
+	def generate(self):
+		fileName = self.args['target'] + ".rss"
+		dllName = self.args['target'] + ".dll"
+		
+		if self.args['interface'] == "":
+			self.args['interface'] = dllName
+
+		if self.args['configurationFile'] != "":
+			opaqueDataFile = file(self.args['configurationFile'])
+			self.args['opaqueData'] = ((''.join(opaqueDataFile.readlines())).replace('\n', '').replace('"', '\\"'))[:255];
+		else:
+			self.args['opaqueData'] = self.args['configuration']
+
+		output = file(fileName, "w")
+		header = """\
+		// ==============================================================================
+		// Generated by xqecom on %(timestamp)s
+		// This file is generated by xqecom and should not be modified by the user.
+		// Name        : %(target)s.rss
+		// Part of     : 
+		// Description : Fixes common plugin symbols to known ordinals
+		// Version     : 
+		// ==============================================================================
+		
+		
+		#include <registryinfov2.rh>
+		
+		#include <xqtecom.hrh>
+		
+		#include <ecomstub_%(uid3)s.hrh>
+		
+		RESOURCE REGISTRY_INFO theInfo
+		{
+		resource_format_version = RESOURCE_FORMAT_VERSION_2;
+		dll_uid = %(uid3)s;
+		interfaces =
+			{
+			INTERFACE_INFO
+				{
+				interface_uid = KQtEcomPluginInterfaceUID;
+				implementations =
+					{
+					IMPLEMENTATION_INFO
+						{
+						implementation_uid = KQtEcomPluginImplementationUid;
+						version_no = 1;
+						display_name = "%(target)s.dll";
+						// SERVICE.INTERFACE_NAME
+						default_data = "%(interface)s";
+						// SERVICE.CONFIGURATION
+						opaque_data = "%(opaqueData)s";
+						}
+					};
+				}
+			};
+		}"""
+		
+		output.write(self.strip(header) % self.args )
+		
+
+class PkgGenerator(Generator):
+	"""
+	PKG generator.
+	"""
+	def __init__(self, args):
+		super(self.__class__, self).__init__(args)
+	def generate(self):
+		content='''\
+		// ============================================================================
+		// Generated by xqecom on %(timestamp)s
+		// This file is generated by xqecom and should not be modified by the user.
+		// ============================================================================
+
+		; Language
+		&EN
+
+		; SIS header: name, uid, version
+		#{%(target)s},(%(uid3)s),1,0,0
+
+		; Localised Vendor name
+		%%{"Nokia, Qt Software"}
+
+		; Unique Vendor name
+		:"Nokia, Qt Software"
+
+		; Dependencies
+		[0x101F7961],0,0,0,{"S60ProductID"}
+		[0x102032BE],0,0,0,{"S60ProductID"}
+		[0x102752AE],0,0,0,{"S60ProductID"}
+		[0x1028315F],0,0,0,{"S60ProductID"}
+		(0x2001E61C), 4, 5, 0, {"QtLibs pre-release"}
+
+		;files
+		"\\epoc32\\release\\armv5\\urel\\%(target)s.dll"    - "!:\\sys\\bin\\%(target)s.dll"
+		"\\epoc32\\data\\Z\\resource\\plugins\\%(target)s.rsc" - "!:\\resource\\plugins\\%(target)s.rsc"'''
+		
+		fileName = self.args['target'] + ".pkg"
+		output = file(fileName, "w")
+		output.write(self.strip(content) % self.args)
+	
+
+class IbyGenerator(Generator):
+	"""
+	IBY generator.
+	"""
+	def __init__(self, args):
+		super(self.__class__, self).__init__(args)
+	def generate(self):
+		self.args['TARGET']=self.args['target'].upper()
+		content="""\
+		// ============================================================================
+		// Generated by xqecom on %(timestamp)s
+		// This file is generated by xqecom and should not be modified by the user.
+		// ============================================================================
+
+		#ifndef %(TARGET)s_IBY
+		#define %(TARGET)s_IBY
+
+		#include <bldvariant.hrh>
+
+		ECOM_PLUGIN( %(target)s.dll, %(target)s.rsc )
+
+		#endif //%(TARGET)s_IBY"""
+		
+		fileName = self.args['target'] + ".iby"
+		output = file(fileName, "w")
+		output.write(self.strip(content) % self.args)
+	
+class StubsGenerator(Generator):
+	"""
+	Stubs generator.
+	"""
+	def __init__(self, args):
+		super(self.__class__, self).__init__(args)
+	def generate(self):
+		contentHrh="""\
+		// ============================================================================
+		// Generated by xqecom on %(timestamp)s
+		// This file is generated by xqecom and should not be modified by the user.
+		// ============================================================================
+
+		#ifndef ECOMSTUB_%(uid3)s_HRH
+		#define ECOMSTUB_%(uid3)s_HRH
+		#define KQtEcomPluginImplementationUid %(uid3)s
+		#endif //ECOMSTUB_%(uid3)s_HRH"""
+
+		fileName = "ecomstub_" + self.args['uid3'] + ".hrh"
+		output = file(fileName, "w")
+		output.write(self.strip(contentHrh) % self.args)
+
+		contentCpp="""\
+		// ============================================================================
+		// Generated by xqecom on %(timestamp)s
+		// This file is generated by xqecom and should not be modified by the user.
+		// ============================================================================
+
+		#include <xqplugin.h>
+		#include <ecomstub_%(uid3)s.hrh>
+		#include <ecom/implementationproxy.h>
+		XQ_PLUGIN_ECOM_HEADER(%(target)s)
+		const TImplementationProxy implementationTable[] = 
+			{
+			IMPLEMENTATION_PROXY_ENTRY(%(uid3)s, C%(target)sFactory::NewL)
+			};
+
+		EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+			{
+			aTableCount = sizeof( implementationTable ) / sizeof( TImplementationProxy );
+			return implementationTable;
+			}"""
+
+		fileName = "ecomstub_" + self.args['uid3'] + ".cpp"
+		output = file(fileName, "w")
+		output.write(self.strip(contentCpp) % self.args)
+	
+
+def runGenerators(generators, args):
+	for g in generators:
+		logging.debug("about to run generator: %s" % g.__name__)
+		try:
+			instance = g(args)
+			instance.generate()
+		except Exception, ex:
+			logging.error("Exception in %s: '%s'" % (g.__name__, ex))
+			logging.error("Exception in %s: '%s'" % (g.__name__, ex))
+			raise
+
+if (__name__=="__main__"):
+	arguments = sys.argv[1:]
+
+	op = OptionParser()
+	op.usage="%prog [options] [<target> <uid3> <interface> <configuration> <configurationFile>]"
+	
+#	op.add_option("-t", "--target", help="plugin target name")
+#	op.add_option("-u", "--uid3", help="plugin uid3")
+#	op.add_option("-i", "--interface", help="interface name")
+#	op.add_option("-c", "--configuration", help="configuration")
+#	op.add_option("-f", "--configuration-file", help="configuration file")
+	
+	(options, args) = op.parse_args(arguments)
+	
+	generators = [RssGenerator, PkgGenerator, IbyGenerator, StubsGenerator]
+	runGenerators(generators, args)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/inc/xqpluginhandle.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  This class is responsible for unload ECom resources
+*
+*/
+
+#ifndef XQPLUGINHANDLE_H
+#define XQPLUGINHANDLE_H
+
+#include <QObject>
+
+class XQPluginHandle : public QObject
+    {
+public:
+    XQPluginHandle(int pluginContextId, QObject* parentPtr);
+    
+    ~XQPluginHandle();
+    
+private:
+    const int pluginContextId;
+    };
+
+#endif // QPLUGINHANDLE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/inc/xqplugininfoprivate.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Private implementation of plugin description
+*
+*/
+
+#ifndef XQPLUGININFOPRIVATE_H_
+#define XQPLUGININFOPRIVATE_H_
+
+#include <QString>
+#include <QtGlobal>
+
+class XQPluginInfoPrivate
+{
+public:
+    XQPluginInfoPrivate();
+    
+    XQPluginInfoPrivate(const XQPluginInfoPrivate &pluginInfoPrivate);
+    
+    XQPluginInfoPrivate(quint32 id, quint32 version, const QString &dllName, const QString &opaqueData);
+    
+    ~XQPluginInfoPrivate();
+    
+    inline quint32 uid() const;
+    
+    inline quint32 version() const;
+    
+    inline const QString& dllName() const;
+    
+    inline const QString& opaqueData() const;
+    
+private:
+    const quint32 iUid;
+    const quint32 iVersion;
+    const QString iDllName;
+    const QString iOpaqueData;
+    
+};
+
+quint32 XQPluginInfoPrivate::uid() const { return iUid; }
+
+quint32 XQPluginInfoPrivate::version() const { return iVersion; }
+
+const QString& XQPluginInfoPrivate::dllName() const { return iDllName; }
+
+const QString& XQPluginInfoPrivate::opaqueData() const { return iOpaqueData; }
+
+#endif /* QPLUGININFOPRIVATE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/inc/xqpluginloaderprivate.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: Private plugin's loader implementation.
+*
+*/
+
+#ifndef QPLUGINLOADER2PRIVATE_H
+#define QPLUGINLOADER2PRIVATE_H
+
+#include <QObject>
+#include <QString>
+#include <QList>
+#include <QtGlobal>
+#include <QLibrary>
+#include <QSettings>
+
+#include <ecom/implementationinformation.h>
+#include <ecom/ecom.h>
+
+class XQPluginInfo;
+
+class XQPluginLoaderPrivate
+{
+public:
+    int pHnd;
+
+    QString fileName;
+    const int uid;
+    bool loadPlugin(); 
+    bool unload();
+    void release();
+
+    static XQPluginLoaderPrivate *findOrCreate(const QString &fileName, const QString &version = QString());
+    static XQPluginLoaderPrivate *findOrCreate(int, const QString &version = QString());
+
+    QString errorString;
+    QLibrary::LoadHints loadHints;
+
+    bool isPlugin(QSettings *settings = 0);
+
+    QObject* instance();
+
+    /**
+     * Function retrive plugin description information from ECom framework
+     * @param infoArr - plugins description array
+     *                  ( definition from ECom framework )
+     * @param interfaceName - reqursted plugin interface name
+     * @param impls - list of plugin descrpions. plugins implement requested 
+     *                interface 
+     */ 
+    static void listImplementationsL( 
+            RImplInfoPtrArray& infoArr, 
+            const QString &interfaceName, 
+            QList<XQPluginInfo> &impls);
+    
+private:
+    XQPluginLoaderPrivate( int uid, const QString &version= QString() );
+    ~XQPluginLoaderPrivate();
+    
+    void loadL();
+    static void findOrCreateL( XQPluginLoaderPrivate*& pluginLoader, const QString &fileName, const QString &version );
+    void setFileName(const QString& fileName);
+    QObject* pluginInstance;
+    
+    QAtomicInt loaderRefCount;
+    QAtomicInt loaderUnloadCount;    
+    
+};
+
+#endif // QPLUGINLOADER2PRIVATE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/include/xqplugin.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  
+*
+*/
+
+#ifndef XQPLUGIN_H
+#define XQPLUGIN_H
+
+#include <xqpluginfactory.h>
+#include <ecom/implementationproxy.h>
+
+#  define XQ_PLUGIN_ECOM_HEADER(PLUGIN) \
+        class C##PLUGIN##Factory : public CPluginFactory { \
+        public: \
+            static C##PLUGIN##Factory * NewL(); \
+            QObject * constructPlugin(); \
+        }; \
+
+
+#  define XQ_PLUGIN_ECOM_IMPL(PLUGIN, PLUGINCLASS) \
+    C##PLUGIN##Factory * C##PLUGIN##Factory::NewL() {return new(ELeave) C##PLUGIN##Factory;} \
+    QObject* C##PLUGIN##Factory::constructPlugin(){ return new PLUGINCLASS;}
+
+// convenience macro
+#  define XQ_EXPORT_PLUGIN(PLUGIN, PLUGINCLASS) \
+        XQ_EXPORT_PLUGIN2(PLUGIN, PLUGINCLASS)
+
+#  define XQ_EXPORT_PLUGIN2(PLUGIN, PLUGINCLASS) \
+        XQ_PLUGIN_ECOM_HEADER(PLUGIN) \
+        XQ_PLUGIN_ECOM_IMPL(PLUGIN, PLUGINCLASS)
+
+#endif // XQ_PLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/include/xqpluginfactory.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  
+*
+*/
+
+#ifndef XQPLUGINFACTORY_H
+#define XQPLUGINFACTORY_H
+
+#include <e32base.h>
+#include <qglobal.h>
+
+class QObject;
+class QString;
+
+#ifdef BUILD_XQPLUGINS_DLL
+#define DLL_EXPORT Q_DECL_EXPORT
+#else
+#define DLL_EXPORT Q_DECL_IMPORT
+#endif
+
+class DLL_EXPORT CPluginFactory : public CBase
+    {
+public:
+    static CPluginFactory* NewL(int aUid);
+       
+    virtual ~CPluginFactory();
+
+    QObject* createQtPlugin();
+
+private:
+    virtual QObject* constructPlugin() = 0;
+
+protected:
+    TUid iDtor_ID_Key;    
+
+    };
+
+#endif /*XQPLUGINFACTORY_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/include/xqplugininfo.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: This class implements a plugin's description (metadata).
+*
+*/
+
+#ifndef XQPLUGININFO_H_
+#define XQPLUGININFO_H_
+
+class XQPluginInfoPrivate;
+
+#include <QtGlobal>
+
+#ifdef BUILD_XQPLUGINS_DLL
+#define DLL_EXPORT Q_DECL_EXPORT
+#else
+#define DLL_EXPORT Q_DECL_IMPORT
+#endif
+
+class DLL_EXPORT XQPluginInfo
+    {
+public:
+
+    XQPluginInfo();
+    XQPluginInfo(const XQPluginInfo &pluginInfo);
+    XQPluginInfo(quint32 uid, quint32 version, const QString &dllName, const QString &opaqueData);
+    ~XQPluginInfo();
+    XQPluginInfo &operator=(const XQPluginInfo &other);
+    quint32 uid() const;
+    quint32 version() const;
+    const QString& dllName() const;
+    const QString& opaqueData() const;
+    
+private:
+
+    XQPluginInfoPrivate *d_ptr;
+    };
+	
+#endif /* XQPLUGININFO_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/include/xqpluginloader.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Class implement extended wrapper for ECom framework
+*
+*/
+
+#ifndef XQPLUGINLOADER_H
+#define XQPLUGINLOADER_H
+
+#include <QtGlobal>
+#include <QObject>
+#include <QList>
+#include <QString>
+
+class XQPluginInfo;
+class XQPluginLoaderPrivate;
+
+#ifdef BUILD_XQPLUGINS_DLL
+#define DLL_EXPORT Q_DECL_EXPORT
+#else
+#define DLL_EXPORT Q_DECL_IMPORT
+#endif
+
+class DLL_EXPORT XQPluginLoader : public QObject
+{
+public:
+
+    XQPluginLoader(QObject* parent = 0);
+    
+    XQPluginLoader(int uid, QObject* parent = 0);
+    
+    virtual ~XQPluginLoader();
+    
+    static bool listImplementations(const QString &interfaceName, 
+                             QList<XQPluginInfo > &impls);
+    
+    int uid()const;
+    
+    QObject* instance();
+    
+    bool isLoaded() const;
+    
+    bool load();
+    
+    bool unload();
+    
+    void setUid ( int uid );
+    
+    QString errorString () const;
+    
+private:
+    /**
+     * Private extended plugin loader implementation.
+     * Own
+     */
+    XQPluginLoaderPrivate* d;
+    
+    /**
+     * Flag that inform about loading state
+     */
+    bool did_load;
+    
+    Q_DISABLE_COPY(XQPluginLoader)
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/include/xqtecom.hrh	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQTECOM_HRH    
+#define XQTECOM_HRH
+
+#define KQtEcomPluginInterfaceUID  0x20022FCE
+
+// TODO remove?
+#define KEComDisplayNameResolverDllUid 0x20022FCD 
+#define KEComDisplayNameResolverImplementationUid 0x20022FE2
+
+// TODO remove?
+#define KResolverInterfaceUID 0x10009D90
+
+#endif // XQTECOM_HRH
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/src/xqpluginfactory.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: This class implements plugins factory.
+*
+*/
+
+#include <xqpluginfactory.h>
+
+#include "xqpluginhandle.h"
+#include <ecom/ecom.h>
+#include <QString>
+#include <QObject>
+
+/*!
+ Constructs plugin factory.
+*/
+CPluginFactory* CPluginFactory::NewL(int aUid)
+{
+    TUid requestedUid(KNullUid);
+    requestedUid.iUid = aUid;
+    return reinterpret_cast <CPluginFactory*>( 
+                REComSession::CreateImplementationL(requestedUid, 
+                                                    _FOFF(CPluginFactory, 
+                                                            iDtor_ID_Key)));
+}
+
+/*!
+  Destroys plugin factory.
+*/
+EXPORT_C CPluginFactory::~CPluginFactory()
+{
+    if (KNullUid != iDtor_ID_Key) {
+        REComSession::DestroyedImplementation(iDtor_ID_Key);
+    }
+}
+
+
+/*!
+  Plugin factorizatoin method.
+*/
+QObject* CPluginFactory::createQtPlugin()
+{
+    QObject* retVal(NULL);
+    if (KNullUid != iDtor_ID_Key) {
+        retVal = constructPlugin();
+        if (NULL != retVal){
+            new XQPluginHandle(iDtor_ID_Key.iUid, retVal);
+            iDtor_ID_Key = KNullUid;
+        }
+    }
+    return retVal;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/src/xqpluginhandle.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: This class implements a plugin handle.
+*
+*/
+
+#include "xqpluginhandle.h"
+#include <ecom/ecom.h>
+
+/*!
+  QPluginHandle.
+*/
+XQPluginHandle::XQPluginHandle(int contextId, QObject* parentPtr)
+:
+QObject(parentPtr),
+pluginContextId(contextId)
+{
+    //No implementation required
+}
+
+/*!
+  ~QPluginHandle.
+*/
+XQPluginHandle::~XQPluginHandle()
+{
+    if( KNullUid != TUid::Uid(pluginContextId) ){
+        REComSession::DestroyedImplementation( TUid::Uid( pluginContextId ) );
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/src/xqplugininfo.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: This class implements a plugin's description (metadata).
+*
+*/
+
+#include "xqplugininfo.h"
+#include "xqplugininfoprivate.h"
+
+
+/*!
+  Constructs plugin info object. 
+*/
+XQPluginInfo::XQPluginInfo()
+:
+d_ptr(new XQPluginInfoPrivate())
+{
+}
+
+/*!
+  Constructs copy of plugin info object.
+*/
+XQPluginInfo::XQPluginInfo(const XQPluginInfo &pluginInfo)
+:
+d_ptr(new XQPluginInfoPrivate(*pluginInfo.d_ptr))
+{
+}
+
+/*!
+  Constructs plugin info object with given data. 
+*/
+XQPluginInfo::XQPluginInfo(quint32 id, 
+                           quint32 version, 
+                           const QString &dllName, 
+                           const QString &opaqueData)
+:
+d_ptr(new XQPluginInfoPrivate(id, version, dllName, opaqueData))
+{
+}
+
+/*!
+  Assignment operator.
+*/
+XQPluginInfo &XQPluginInfo::operator=(const XQPluginInfo &other)
+{
+    if (this != &other) {
+        if (d_ptr != 0){
+            delete d_ptr;
+        }
+        d_ptr = new XQPluginInfoPrivate(*other.d_ptr);
+    }
+    return *this;
+}
+
+/*!
+  Destroys plugin info object.
+*/
+XQPluginInfo::~XQPluginInfo()
+{
+    if (d_ptr != 0){
+        delete d_ptr;
+    }
+}
+
+/*!
+  Returns plugin implementation UID.
+*/
+quint32 XQPluginInfo::uid() const
+{
+    return d_ptr->uid();
+}
+
+/*!
+  Returns plugin implementation version.
+*/
+quint32 XQPluginInfo::version() const
+{
+    return d_ptr->version();
+}
+
+/*!
+  Returns plugin dll name.
+*/
+const QString& XQPluginInfo::dllName() const
+{
+    return d_ptr->dllName();
+}
+
+/*!
+  Returns plugin implementation opaque data. This is given by SERVICE.CONFIGURATION variable in pro file of the plugin.
+*/
+const QString& XQPluginInfo::opaqueData() const
+{
+    return d_ptr->opaqueData();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/src/xqplugininfoprivate.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: This is a private implementation of a plugin's description.
+*
+*/
+
+#include "xqplugininfoprivate.h"
+
+/*!
+  Default constructor.
+*/
+XQPluginInfoPrivate::XQPluginInfoPrivate()
+:
+iUid(),
+iVersion(),
+iDllName(), 
+iOpaqueData()
+{
+}
+
+/*!
+  Constructor.
+*/
+XQPluginInfoPrivate::XQPluginInfoPrivate(
+        const XQPluginInfoPrivate &pluginInfoPrivate)
+:
+iUid(pluginInfoPrivate.uid()),
+iVersion(pluginInfoPrivate.version()),
+iDllName(pluginInfoPrivate.dllName()), 
+iOpaqueData(pluginInfoPrivate.opaqueData())
+{
+}
+
+/*!
+  Constructor.
+*/
+XQPluginInfoPrivate::XQPluginInfoPrivate(quint32 id, 
+                                         quint32 version, 
+                                         const QString &dllName, 
+                                         const QString &opaqueData)
+:
+iUid(id),
+iVersion(version),
+iDllName(dllName), 
+iOpaqueData(opaqueData)
+{
+}
+
+/*!
+  Destructor.
+*/
+XQPluginInfoPrivate::~XQPluginInfoPrivate()
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/src/xqpluginloader.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,172 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  This class implements an extended wrapper for the ECOM framework.
+*
+*/
+
+#include "xqpluginloader.h"
+#include "xqpluginloaderprivate.h"
+
+#include <qfileinfo.h>
+#include "qdebug.h"
+
+/*!
+  Constructs plugin loader with the given parent.
+  @param parent - address of class instance parent 
+*/
+XQPluginLoader::XQPluginLoader(QObject* parent) 
+: 
+QObject(parent),
+d(0),
+did_load( false )
+{
+}
+
+/*!
+  Constructs plugin loader with the given parent and plugin implementation UID.
+  @param uid - UID of plugin that should be loaded
+  @param parent - address of class instance parent 
+ */
+XQPluginLoader::XQPluginLoader(int requestedUid, QObject* parent) 
+: 
+QObject(parent),
+d(XQPluginLoaderPrivate::findOrCreate(requestedUid)), 
+did_load( false )
+{
+}
+
+/*!
+  Destroys plugin loader. Unless unload() was called explicitly, plugins still stays in memory.
+*/
+XQPluginLoader::~XQPluginLoader()
+{
+    if(d) {
+        d->release();
+    }
+}
+
+/*!
+  List available plugins which implement requested interface. Plugins are resolved using interface name.
+  
+  @param interfaceName - requested interface name
+  @param impls - destination list where resolved plugins info will be stored
+  @return true on success, false on any error
+*/
+bool XQPluginLoader::listImplementations(
+        const QString &interfaceName, 
+        QList< XQPluginInfo > &impls)
+{
+    RImplInfoPtrArray infoArr;
+    TRAPD( errCode, XQPluginLoaderPrivate::listImplementationsL( infoArr, interfaceName, impls ) );
+    infoArr.ResetAndDestroy();
+    return ( KErrNone == errCode );
+}
+
+/*!
+  Returns UID of requested plugin.
+ */
+int XQPluginLoader::uid()const
+{
+    return ( d ? d->uid : KNullUid.iUid );
+}
+
+/*!
+  Return pointer to plugin root-component instance
+  @return instance address on success, 0 otherwise  
+ */
+QObject* XQPluginLoader::instance()
+{
+    if (!load())
+        return 0;
+#ifndef Q_OS_SYMBIAN
+    if (d->instance)
+        return d->instance();
+	else
+		return 0;
+#else
+    return d->instance();
+#endif
+    
+}
+
+/*!
+  Return information if plugin have been loaded
+  @return true if plugin have been loaded, false otherwise 
+ */
+bool XQPluginLoader::isLoaded() const
+{
+    return d && d->pHnd
+#ifndef Q_OS_SYMBIAN
+        && d->instance;
+#else
+        ;
+#endif    
+}
+
+/*!
+  Load requested plugin.
+  @return true on success, false otherwise
+ */
+bool XQPluginLoader::load()
+{
+    if (!d)
+        return false;
+    if (did_load)
+        return d->pHnd;
+    did_load = true;
+    return d->loadPlugin();
+}
+
+/*!
+  Unloads the plugin and returns true if plugin could be unloaded. All plugins are unloaded at aplication exit 
+  so calling this method is not mandatory. 
+  Actual unloading will succed only when all instances of given plugin loaders calls unload.
+  @return true on success, false otherwise
+ */
+bool XQPluginLoader::unload()
+{
+    if (did_load) {
+        did_load = false;
+        return d->unload();
+    }
+    if (d)  // Ouch
+        d->errorString = tr("The plugin was not loaded.");
+    return false;
+}
+
+/*!
+  Setter for UID of plugin. It is the same UID that may be specified in constructor.
+*/
+void XQPluginLoader::setUid ( int uid )
+{
+    if (d) {
+        d->release();
+        d = 0;
+        did_load = false;
+    }
+    d = XQPluginLoaderPrivate::findOrCreate( uid );
+}
+
+/*!
+  Return string.with description of last error that occured.
+  @return error description
+*/
+QString XQPluginLoader::errorString () const
+{
+    return (!d || d->errorString.isEmpty()) ? tr("Unknown error") : d->errorString;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/src/xqpluginloaderprivate.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,235 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: This is the private implementation of the XQPluginLoader class.
+*
+*/
+
+#include "xqpluginloaderprivate.h"
+#include "xqplugininfo.h"
+
+#include <qglobal.h>
+#include <QObject>
+#include <QLibrary>
+#include <QSettings>
+
+#include <xqplugin.h>
+
+#include "xqpluginfactory.h"
+
+#include <qstring.h>
+#include <qmutex.h>
+#include <qfileinfo.h>
+
+//TODO warning: use of internal include ??
+#include <qglobal.h>
+
+#include <ecom/ecom.h>
+#include <e32base.h>
+#include <e32std.h>
+#include <utf.h>
+
+#include "xqtecom.hrh"
+
+//TODO warning: use of Qt internal macro
+Q_GLOBAL_STATIC(QMutex, qt_pluginloader_mutex)
+
+typedef QMap<int, XQPluginLoaderPrivate*> PluginLoadersMap;
+//TODO warning: use of Qt internal macro
+Q_GLOBAL_STATIC(PluginLoadersMap, pluginLoadersMap)
+
+
+XQPluginLoaderPrivate::XQPluginLoaderPrivate( int requestedUid, const QString &version)
+:
+pHnd(0),
+fileName(),
+uid( requestedUid ),
+pluginInstance(0),
+loaderRefCount(1), 
+loaderUnloadCount(0)
+{ 
+    pluginLoadersMap()->insert(uid, this);
+    Q_UNUSED(version);
+}
+
+XQPluginLoaderPrivate::~XQPluginLoaderPrivate()
+{
+    PluginLoadersMap * const map = pluginLoadersMap();
+    if (map) {
+        XQPluginLoaderPrivate *that = map->take( uid );
+        Q_ASSERT(this == that);
+        Q_UNUSED(that);
+    }
+}
+
+void XQPluginLoaderPrivate::release()
+{
+    QMutexLocker locker(qt_pluginloader_mutex());
+    if (!loaderRefCount.deref()) {
+        delete this;
+    }
+}
+
+XQPluginLoaderPrivate *XQPluginLoaderPrivate::findOrCreate(const QString &requestedFileName, const QString &version)
+{
+    QString fileName(requestedFileName);
+    if (fileName.endsWith(".qtplugin", Qt::CaseInsensitive)) {
+        fileName.chop(8);
+        fileName.append("dll");
+    }
+    
+    XQPluginLoaderPrivate* retVal( NULL );
+    TRAPD( err, findOrCreateL( retVal, fileName, version ) );
+    if( KErrNone != err ) {
+        retVal = findOrCreate( KNullUid.iUid, version );
+        retVal->errorString = QString( "Unknown error %1" ).arg( err );
+    }
+    return retVal;
+}
+
+XQPluginLoaderPrivate *XQPluginLoaderPrivate::findOrCreate(int id, const QString &version)
+{
+    QMutexLocker locker(qt_pluginloader_mutex());
+    XQPluginLoaderPrivate *pluginLoader = pluginLoadersMap()->value( id );
+    if ( pluginLoader ) {
+        pluginLoader->loaderRefCount.ref();
+    } else {
+        pluginLoader = new XQPluginLoaderPrivate(id, version);
+    }
+    return pluginLoader;
+}
+
+void XQPluginLoaderPrivate::findOrCreateL( XQPluginLoaderPrivate*& pluginLoader, const QString &requestedFileName , const QString &version )
+{
+    if( 0 >= requestedFileName.length() ) {
+        User::Leave( KErrBadName );
+    }
+    TPtrC symbianFileName( requestedFileName.utf16(), requestedFileName.length() ); //set string content into descriptor
+    TEComResolverParams resolverParams;
+    RImplInfoPtrArray infoArr;
+    TUid customResolverUid( KNullUid ), pluginInterfaceUid( KNullUid );
+    customResolverUid.iUid = KEComDisplayNameResolverImplementationUid;
+    pluginInterfaceUid.iUid  = KQtEcomPluginInterfaceUID;
+    
+    HBufC8* symbianFileNamePtr( CnvUtfConverter::ConvertFromUnicodeToUtf8L( symbianFileName ) );//convert file name to UTF8
+    CleanupStack::PushL( symbianFileNamePtr );
+    resolverParams.SetDataType( *symbianFileNamePtr );//initialize resolver params struct
+    REComSession::ListImplementationsL( pluginInterfaceUid, resolverParams, customResolverUid, infoArr );//list matching plugins using custom resolver
+    CleanupStack::PopAndDestroy( symbianFileNamePtr );
+    
+    if( 0 >= infoArr.Count() ) {
+        User::Leave( KErrNotFound );
+    }
+    //analyse available plugins versions
+    int optimalPluginOffset( 0 );
+    for( int i( 0 ); i < infoArr.Count(); ++i ) {
+        if( infoArr[ optimalPluginOffset ]->Version() < infoArr[ i ]->Version() ) {
+            optimalPluginOffset = i;
+        }
+    }
+    const int resolvedUid( infoArr[ optimalPluginOffset ]->ImplementationUid().iUid );
+    infoArr.ResetAndDestroy();
+    
+    pluginLoader = findOrCreate( resolvedUid, version );
+    User::LeaveIfNull( pluginLoader ); 
+    pluginLoader->setFileName( requestedFileName );
+}
+
+bool XQPluginLoaderPrivate::isPlugin(QSettings *settings)
+{
+    Q_UNUSED(settings)
+    return true;
+}
+
+bool XQPluginLoaderPrivate::loadPlugin()
+{
+    loaderUnloadCount.ref();
+    if (pluginInstance) {
+        return true;
+    }
+    pHnd = 0;
+    errorString = "Can't load plugin.";
+    if( KNullUid.iUid != uid ) {
+        TRAPD(loadError, loadL());
+        if( KErrNone == loadError ) {
+            pHnd = 1;
+            errorString.clear();
+        }
+    }
+    return pHnd; 
+}
+
+void XQPluginLoaderPrivate::loadL()
+{
+    CPluginFactory* pluginFactory = CPluginFactory::NewL( uid );
+    pluginInstance = pluginFactory->createQtPlugin();
+}
+
+QObject* XQPluginLoaderPrivate::instance()
+{
+    return pluginInstance;
+}
+
+bool XQPluginLoaderPrivate::unload()
+{
+    if (!pHnd)
+        return false;
+    
+    if (!loaderUnloadCount.deref()) { // only unload if ALL loader instances wanted to
+        if (pluginInstance)
+            delete pluginInstance;
+            pHnd = 0;
+    }
+    
+    return (pHnd == 0);
+}
+
+void XQPluginLoaderPrivate::setFileName( const QString& value )
+{
+    fileName = value;
+}
+
+void XQPluginLoaderPrivate::listImplementationsL( 
+        RImplInfoPtrArray& infoArr, 
+        const QString &interfaceName, 
+        QList<XQPluginInfo> &impls)
+{
+    const TUid uid = { 0x20022FCE };
+    TEComResolverParams resolverParams;
+
+    HBufC8* ifName = HBufC8::NewLC(interfaceName.length());
+    ifName->Des().Copy(TPtrC(interfaceName.utf16()));
+    resolverParams.SetDataType(*ifName);
+    REComSession::ListImplementationsL(uid, resolverParams, infoArr);
+    CleanupStack::PopAndDestroy( ifName );
+    for (int i( 0 ); i < infoArr.Count(); ++i) {
+        const TDesC &name = infoArr[i]->DisplayName();
+        QString dllName = QString::fromUtf16( 
+                reinterpret_cast<const ushort*>(name.Ptr()), 
+                    name.Length());
+        
+        const TDesC8 &opaque_data = infoArr[i]->OpaqueData();
+        QString opaqueData = QString::fromAscii( 
+                        reinterpret_cast<const char*>( opaque_data.Ptr() ), 
+                            opaque_data.Length());
+        
+        impls.append(XQPluginInfo(infoArr[i]->ImplementationUid().iUid, 
+                                 infoArr[i]->Version(),
+                                 dllName, 
+                                 opaqueData));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/README	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,3 @@
+Important note:
+
+To succesfully compile tests one need to have qttest_p4.prf file in your %qtdir%/mkspecs/features dir. If this file is not present already in qt sources, one should copy file that can be found directly in this directory.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/almostplugin/almostplugin.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*/ 
+
+#include <QtCore/QString>
+#include "almostplugin.h"
+#include <QtCore/qplugin.h>
+
+QString AlmostPlugin::pluginName() const
+{
+    unresolvedSymbol();
+    return QLatin1String("Plugin ok");
+}
+
+Q_EXPORT_PLUGIN2(almostplugin, AlmostPlugin)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/almostplugin/almostplugin.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*/ 
+
+#ifndef ALMOSTPLUGIN_H
+#define ALMOSTPLUGIN_H
+
+#include <QObject>
+#include "../theplugin/plugininterface.h"
+
+class AlmostPlugin : public QObject, public PluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(PluginInterface)
+
+public:
+    QString pluginName() const;
+    void unresolvedSymbol() const;
+};
+
+#endif // ALMOSTPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/almostplugin/xalmostplugin.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE      = lib
+CONFIG       += plugin
+HEADERS       = almostplugin.h
+SOURCES       = almostplugin.cpp
+TARGET        = xalmostplugin
+DESTDIR       = ../bin
+*-g++*:QMAKE_LFLAGS -= -Wl,--no-undefined
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/bin/xmylib.prl	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,4 @@
+QMAKE_PRL_BUILD_DIR = x:\qt\tests\auto\qpluginloader\lib
+QMAKE_PRO_INPUT = xlib.pro
+QMAKE_PRL_TARGET = xmylib
+QMAKE_PRL_CONFIG = lex yacc warn_on debug uic resources stl_off qt warn_on incremental debug shared exceptions_off minimal-config small-config medium-config large-config full-config build_all debug cross_compile incremental create_prl link_prl depend_includepath QTDIR_build dll shared dll qtmain moc thread
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/lib/lib.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = lib
+CONFIG += dll
+CONFIG -= staticlib
+SOURCES = mylib.c
+TARGET = xmylib
+DESTDIR = ../bin
+QT = core
+
+win32-msvc: DEFINES += WIN32_MSVC
+win32-borland: DEFINES += WIN32_BORLAND
+
+#no special install rule for the library used by test
+INSTALLS =
+
+symbian: {
+    TARGET.CAPABILITY=ALL -TCB
+    TARGET.UID3 = 0xE6E9EB83
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/lib/mylib.c	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <qglobal.h>
+
+#if defined(Q_CC_MSVC) || defined(Q_CC_MSVC_NET) || defined(Q_CC_BOR)
+#define LIB_EXPORT __declspec(dllexport)
+#else
+#define LIB_EXPORT
+#endif
+
+#if defined(Q_CC_BOR)
+# define BORLAND_STDCALL __stdcall
+#else
+# define BORLAND_STDCALL
+#endif
+
+LIB_EXPORT int BORLAND_STDCALL version()
+{
+    return 1;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/qttest_p4.prf	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,120 @@
+isEmpty(TEMPLATE):TEMPLATE=app
+CONFIG          += qt warn_on console depend_includepath
+
+wince*:{
+LIBS += corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
+CONFIG(debug, debug|release) {
+   LIBS += $$[QT_INSTALL_LIBS]/qtmaind.lib
+} else {
+   LIBS += $$[QT_INSTALL_LIBS]/qtmain.lib
+}
+}
+
+symbian:{
+# qt.prf sets TARGET.EPOCSTACKSIZE and TARGET.EPOCHEAPSIZE
+#    DEFINES += QTEST_NO_SPECIALIZATIONS
+    TARGET.UID3 = $$generate_test_uid($$TARGET)
+    TARGET.CAPABILITY="ALL -TCB"
+    RSS_RULES ="group_name=\"QtTests\";" 
+}
+
+# find testlib's prl file and extract the librarie's name
+QTEST_LIB =
+mac:exists($$[QT_INSTALL_LIBS]/QtTest.framework):QTEST_LIB = QtTest.framework
+CONFIG(debug, debug|release) {
+    isEmpty(QTEST_LIB) {
+       win32 {
+          QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/QtTest$${QT_LIBINFIX}d.prl, QMAKE_PRL_TARGET)4.dll
+       }
+       mac {
+          QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/libQtTest$${QT_LIBINFIX}_debug.prl, QMAKE_PRL_TARGET)
+       }
+       unix:!mac:!symbian {
+          QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/libQtTest$${QT_LIBINFIX}.prl, QMAKE_PRL_TARGET)
+       }
+       symbian {
+          QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/QtTest$${QT_LIBINFIX}.prl, QMAKE_PRL_TARGET).dll
+       }
+    }
+    OBJECTS_DIR     = tmp/debug
+    MOC_DIR         = tmp/debug
+} else {
+    isEmpty(QTEST_LIB) {
+       win32 {
+          QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/QtTest$${QT_LIBINFIX}.prl, QMAKE_PRL_TARGET)4.dll
+       } symbian {
+       	  QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/QtTest$${QT_LIBINFIX}.prl, QMAKE_PRL_TARGET).dll
+       } else {
+          QTEST_LIB = $$fromfile($$[QT_INSTALL_LIBS]/libQtTest$${QT_LIBINFIX}.prl, QMAKE_PRL_TARGET)
+       }
+    }
+    OBJECTS_DIR     = tmp/release
+    MOC_DIR         = tmp/release
+}
+
+isEmpty(QTEST_LIB) {
+    warning("Cannot find testlib's prl file, run qmake in $QTDIR/src/testlib")
+    CONFIG += embed_testlib
+} else {
+    # Never embed automatically in Symbian, as checking for existence is not reliable
+    # due to the fact that we support multiple platforms (WINSCW, ARMV5, GCCE, ...), which
+    # each build the lib to different location.
+    !symbian {
+        !exists($$[QT_INSTALL_LIBS]/$$QTEST_LIB):CONFIG += embed_testlib
+    }
+}
+
+# make sure the test is build according to your Qt configuration
+contains(QT_CONFIG, embedded):CONFIG += embedded
+
+embed_testlib {
+    QTESTDIR = $${QT_SOURCE_TREE}
+    isEmpty(QTESTDIR):QTESTDIR = $$(QTSRCDIR)
+    isEmpty(QTESTDIR):QTESTDIR = $$(QTDIR)
+    isEmpty(QTESTDIR):warning("Cannot find QTestLib sources, set QTDIR or QTSRCDIR")
+    QTESTDIR = $${QTESTDIR}/src/testlib
+    HEADERS += $${QTESTDIR}/qtesteventloop.h
+    SOURCES += $${QTESTDIR}/qasciikey.cpp \
+               $${QTESTDIR}/qabstracttestlogger.cpp \
+               $${QTESTDIR}/qsignaldumper.cpp \
+               $${QTESTDIR}/qtestdata.cpp \
+               $${QTESTDIR}/qtestresult.cpp \
+               $${QTESTDIR}/qxmltestlogger.cpp \
+               $${QTESTDIR}/qplaintestlogger.cpp \
+               $${QTESTDIR}/qtestcase.cpp \
+               $${QTESTDIR}/qbenchmark.cpp \
+               $${QTESTDIR}/qbenchmarkevent.cpp \
+               $${QTESTDIR}/qbenchmarkmeasurement.cpp \
+               $${QTESTDIR}/qbenchmarkvalgrind.cpp \
+               $${QTESTDIR}/qtestlog.cpp \
+               $${QTESTDIR}/qtesttable.cpp
+    DEFINES += QTEST_EMBED QTEST_LIGHT
+} else {
+    CONFIG += qtestlib
+}
+
+embedded:QMAKE_CXXFLAGS+=-fno-rtti
+
+# prefix test binary with tst_
+!contains(TARGET, ^tst_.*):TARGET = $$join(TARGET,,"tst_")
+
+########################################################################
+# Use install rule to run test application.
+# This lets you do 'make install' on a test to both build and run it,
+# and lets you easily build and run all tests from the parent directory.
+# ----------------------------------------------------------------------
+
+runme.files                =
+runme.path                 = .
+!isEmpty(DESTDIR): runme.commands = cd ./$(DESTDIR) &&
+macx:      runme.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
+else:unix: runme.commands += ./$(QMAKE_TARGET)
+else:win32: {
+    CONFIG(debug, debug|release):runme.commands += debug\\$(QMAKE_TARGET)
+    else:runme.commands += release\\$(QMAKE_TARGET)
+}
+embedded:  runme.commands += -qws
+INSTALLS += runme
+
+
+########################################################################
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/sis/tst.bat	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,21 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+@rem All rights reserved.
+@rem
+@rem This program is free software: you can redistribute it and/or modify
+@rem it under the terms of the GNU Lesser General Public License as published by
+@rem the Free Software Foundation, version 2.1 of the License.
+@rem 
+@rem This program is distributed in the hope that it will be useful,
+@rem but WITHOUT ANY WARRANTY; without even the implied warranty of
+@rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@rem GNU Lesser General Public License for more details.
+@rem
+@rem You should have received a copy of the GNU Lesser General Public License
+@rem along with this program.  If not, 
+@rem see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+@rem
+@rem Description:
+@rem
+
+tst_xqpluginloader.exe -o f:/tst_xqpluginloader.txt
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/sis/tst_xqpluginloader.pkg	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,32 @@
+; hbmusicapp_armv5_urel.pkg generated by qmake at Thu Mar 19 17:32:55 2009
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"tst_xqplugins"},(0x10207C62),1,0,0
+
+; Localised Vendor name
+%{"Nokia, Qt Software"}
+
+; Unique Vendor name
+:"Nokia, Qt Software"
+
+; Dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+
+"/epoc32/release/armv5/urel/tst_xqpluginloader.exe"    - "C:\sys\bin\tst_xqpluginloader.exe"
+"/epoc32/release/armv5/urel/xtheplugin.dll"    - "C:\sys\bin\xtheplugin.dll"
+"/epoc32/data/z/resource/plugins/xtheplugin.rsc"    - "C:\resource\plugins\xtheplugin.rsc"
+"/epoc32/release/armv5/urel/xmylib.dll"    - "C:\sys\bin\xmylib.dll"
+
+; uncomment this if you want easy way of running tests mannualy from eshell
+;"./tst.bat" - "c:\tst.bat"
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/theplugin/plugininterface.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*/ 
+
+#ifndef PLUGININTERFACE_H
+#define PLUGININTERFACE_H
+
+struct PluginInterface {
+    virtual ~PluginInterface() {}
+    virtual QString pluginName() const = 0;
+};
+Q_DECLARE_INTERFACE(PluginInterface, "com.trolltect.autotests.plugininterface/1.0")
+
+#endif // PLUGININTERFACE_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/theplugin/theplugin.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*/ 
+
+#include <QString>
+#include <xqplugin.h>
+#include "theplugin.h"
+
+QString XThePlugin::pluginName() const
+{
+    return QLatin1String("Plugin ok");
+}
+
+XQ_EXPORT_PLUGIN2(xtheplugin, XThePlugin)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/theplugin/theplugin.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*/ 
+
+#ifndef THEPLUGIN_H
+#define THEPLUGIN_H
+
+#include <QObject>
+#include "plugininterface.h"
+
+class XThePlugin : public QObject, public PluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(PluginInterface)
+
+public:
+    virtual QString pluginName() const;
+};
+
+#endif // THEPLUGIN_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/theplugin/theplugin.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE      = lib
+CONFIG       += ecomplugin
+HEADERS       = theplugin.h
+SOURCES       = theplugin.cpp
+TARGET        = $$qtLibraryTarget(xtheplugin)
+DESTDIR       = ../bin
+
+symbian: {
+    TARGET.EPOCALLOWDLLDATA=1
+    TARGET.CAPABILITY=ALL -TCB
+    TARGET.UID3 = 0xE6E9EB84
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/tst/qmakepluginstubs/theplugin.qtplugin	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+This file is a Qt plugin stub file. The real Qt plugin is located in \sys\bin. Created:Wed 6. May 14:26:41 2009
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/tst/qmakepluginstubs/xtheplugin.qtplugin	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+This file is a Qt plugin stub file. The real Qt plugin is located in \sys\bin. Created:Thu 7. May 14:36:35 2009
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/tst/tst.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,53 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+load(qttest_p4)
+SOURCES         += ../tst_xqpluginloader.cpp
+TARGET  = ../tst_xqpluginloader
+QT = core
+HEADERS += ../theplugin/plugininterface.h
+
+LIBS += -lxqplugins.dll
+
+win32 {
+  CONFIG(debug, debug|release) {
+    TARGET = ../../debug/tst_qpluginloader
+} else {
+    TARGET = ../../release/tst_xqpluginloader
+  }
+}
+
+
+wince*: {
+   addFiles.sources = ../bin/*.dll
+   addFiles.path = bin
+   DEPLOYMENT += addFiles
+}
+
+symbian: {
+   libDep.sources = xmylib.dll
+   libDep.path = /sys/bin
+   pluginDep.sources = xtheplugin.dll
+   pluginDep.path = bin
+   
+   DEPLOYMENT += libDep pluginDep
+   TARGET.UID3 = 0xE6E9EB85
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/tst_xqpluginloader.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,287 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*/ 
+
+#include <QtTest/QtTest>
+#include <qdir.h>
+#include <xqpluginloader.h>
+#include <xqplugininfo.h>
+#include "theplugin/plugininterface.h"
+
+#include <e32cmn.h>
+// Helper macros to let us know if some suffixes are valid
+#define bundle_VALID    false
+#define dylib_VALID     false
+#define sl_VALID        false
+#define a_VALID         false
+#define so_VALID        false
+#define dll_VALID       false
+
+#if defined(Q_OS_DARWIN)
+# undef bundle_VALID
+# undef dylib_VALID
+# undef so_VALID
+# define bundle_VALID   true
+# define dylib_VALID    true
+# define so_VALID       true
+# define SUFFIX         ".dylib"
+# define PREFIX         "lib"
+
+#elif defined(Q_OS_HPUX) && !defined(__ia64)
+# undef sl_VALID
+# define sl_VALID       true
+# define SUFFIX         ".sl"
+# define PREFIX         "lib"
+
+#elif defined(Q_OS_AIX)
+# undef a_VALID
+# undef so_VALID
+# define a_VALID        true
+# define so_VALID       true
+# define SUFFIX         ".so"
+# define PREFIX         "lib"
+
+#elif defined(Q_OS_WIN)
+# undef dll_VALID
+# define dll_VALID      true
+# ifdef QT_NO_DEBUG
+#  define SUFFIX         ".dll"
+# else
+#  define SUFFIX         "d.dll"
+# endif
+# define PREFIX         ""
+
+#elif defined(Q_OS_SYMBIAN)
+# undef dll_VALID
+# define dll_VALID      true
+# define SUFFIX         ".dll"
+# define PREFIX         ""
+
+#else  // all other Unix
+# undef so_VALID
+# define so_VALID       true
+# define SUFFIX         ".so"
+# define PREFIX         "lib"
+#endif
+
+static QString sys_qualifiedLibraryName(const QString &fileName)
+{
+    QString currDir = QDir::currentPath();
+    return currDir + "/bin/" + PREFIX + fileName + SUFFIX;
+}
+
+//TESTED_CLASS=
+//TESTED_FILES=
+
+QT_FORWARD_DECLARE_CLASS(QPluginLoader)
+class tst_XQPluginLoader : public QObject
+{
+    Q_OBJECT
+
+public:
+    tst_XQPluginLoader();
+    virtual ~tst_XQPluginLoader();
+
+private slots:
+    void errorString();
+    void deleteinstanceOnUnload();
+    void listThePlugins();
+
+};
+
+tst_XQPluginLoader::tst_XQPluginLoader()
+
+{
+}
+
+tst_XQPluginLoader::~tst_XQPluginLoader()
+{
+}
+
+//#define SHOW_ERRORS 1
+
+void tst_XQPluginLoader::errorString()
+{
+#if defined(Q_OS_WINCE)
+    // On WinCE we need an QCoreApplication object for current dir
+    int argc = 0;
+    QCoreApplication app(argc,0);
+#endif
+    const QString unknown(QLatin1String("Unknown error"));
+
+    {
+    XQPluginLoader loader; // default constructed
+    bool loaded = loader.load();
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QCOMPARE(loaded, false);
+    QCOMPARE(loader.errorString(), unknown);
+
+    QObject *obj = loader.instance();
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QCOMPARE(obj, static_cast<QObject*>(0));
+    QCOMPARE(loader.errorString(), unknown);
+
+    bool unloaded = loader.unload();
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QCOMPARE(unloaded, false);
+    QCOMPARE(loader.errorString(), unknown);
+    }
+    {
+    XQPluginLoader loader( 0xE6E9EB83 );     //not a plugin sys_qualifiedLibraryName("mylib")
+    bool loaded = loader.load();
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QCOMPARE(loaded, false);
+    QVERIFY(loader.errorString() != unknown);
+
+    QObject *obj = loader.instance();
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QCOMPARE(obj, static_cast<QObject*>(0));
+    QVERIFY(loader.errorString() != unknown);
+
+    bool unloaded = loader.unload();
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QCOMPARE(unloaded, false);
+    QVERIFY(loader.errorString() != unknown);
+    }
+
+    {
+    XQPluginLoader loader( KNullUid.iUid );     //not a file sys_qualifiedLibraryName("nosuchfile")
+    bool loaded = loader.load();
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QCOMPARE(loaded, false);
+    QVERIFY(loader.errorString() != unknown);
+
+    QObject *obj = loader.instance();
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QCOMPARE(obj, static_cast<QObject*>(0));
+    QVERIFY(loader.errorString() != unknown);
+
+    bool unloaded = loader.unload();
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QCOMPARE(unloaded, false);
+    QVERIFY(loader.errorString() != unknown);
+    }
+
+#if !defined Q_OS_WIN && !defined Q_OS_MAC && !defined Q_OS_HPUX && !defined Q_OS_SYMBIAN
+    {
+    XQPluginLoader loader(  );     //a plugin with unresolved symbols sys_qualifiedLibraryName("almostplugin")
+    QCOMPARE(loader.load(), false);
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QVERIFY(loader.errorString() != unknown);
+
+    QCOMPARE(loader.instance(), static_cast<QObject*>(0));
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QVERIFY(loader.errorString() != unknown);
+
+    QCOMPARE(loader.unload(), false);
+#ifdef SHOW_ERRORS
+    qDebug() << loader.errorString();
+#endif
+    QVERIFY(loader.errorString() != unknown);
+    }
+#endif
+
+    {
+    XQPluginLoader loader( 0xE6E9EB84 );     //a plugin sys_qualifiedLibraryName("theplugin")
+    QCOMPARE(loader.load(), true);
+    QCOMPARE(loader.errorString(), unknown);
+
+    QVERIFY(loader.instance() !=  static_cast<QObject*>(0));
+    QCOMPARE(loader.errorString(), unknown);
+
+    // Make sure that plugin really works
+    PluginInterface* theplugin = qobject_cast<PluginInterface*>(loader.instance());
+    QString pluginName = theplugin->pluginName();
+    QCOMPARE(pluginName, QLatin1String("Plugin ok"));
+
+    QCOMPARE(loader.unload(), true);
+    QCOMPARE(loader.errorString(), unknown);
+    }
+}
+
+void tst_XQPluginLoader::deleteinstanceOnUnload()
+{
+    for (int pass = 0; pass < 2; ++pass) {
+        XQPluginLoader loader1;
+        loader1.setUid( 0xE6E9EB84 ); // sys_qualifiedLibraryName("theplugin")
+        if (pass == 0)
+            loader1.load(); // not recommended, instance() should do the job.
+        PluginInterface *instance1 = qobject_cast<PluginInterface*>(loader1.instance());
+        QCOMPARE(instance1->pluginName(), QLatin1String("Plugin ok"));
+
+        XQPluginLoader loader2;
+        loader2.setUid( 0xE6E9EB84 ); // sys_qualifiedLibraryName("theplugin")
+        if (pass == 0)
+            loader2.load(); // not recommended, instance() should do the job.
+        PluginInterface *instance2 = qobject_cast<PluginInterface*>(loader2.instance());
+        QCOMPARE(instance2->pluginName(), QLatin1String("Plugin ok"));
+
+        QSignalSpy spy1(loader1.instance(), SIGNAL(destroyed()));
+        QSignalSpy spy2(loader2.instance(), SIGNAL(destroyed()));
+        QCOMPARE(loader1.unload(), false);  // refcount not reached 0, not really unloaded
+        QCOMPARE(spy1.count(), 0);
+        QCOMPARE(spy2.count(), 0);
+        QCOMPARE(instance1->pluginName(), QLatin1String("Plugin ok"));
+        QCOMPARE(instance2->pluginName(), QLatin1String("Plugin ok"));
+        QCOMPARE(loader2.unload(), true);   // refcount reached 0, did really unload
+        QCOMPARE(spy1.count(), 1);
+        QCOMPARE(spy2.count(), 1);
+    }
+}
+void tst_XQPluginLoader::listThePlugins()
+{
+    QList<XQPluginInfo> plugins;
+    XQPluginLoader loader;
+    loader.listImplementations( tr( "xtheplugin.dll" ), plugins );
+    QVERIFY( plugins.count() !=  0 );
+    for( int i( 0 ); i < plugins.count(); ++i ) {
+        
+        loader.setUid( plugins[i ].uid() );
+        QCOMPARE( loader.load(), true );
+        PluginInterface *instance = qobject_cast<PluginInterface*>(loader.instance());
+        QCOMPARE(instance->pluginName(), QLatin1String("Plugin ok"));
+        QCOMPARE(loader.unload(), true);
+        
+    }
+    plugins.clear();
+}
+
+QTEST_APPLESS_MAIN(tst_XQPluginLoader)
+#include "tst_xqpluginloader.moc"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/tests/auto/xqpluginloader/xqpluginloader.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+QT = core
+TEMPLATE    = subdirs
+CONFIG  += ordered
+SUBDIRS =   lib \
+            theplugin \
+            tst
+
+!win32: !macx-*: !symbian: SUBDIRS += almostplugin
+TARGET = tst_xqpluginloader
+
+# no special install rule for subdir
+INSTALLS =
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtecomplugins/xqplugins/xqplugins.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,65 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = lib
+TARGET = 
+TARGET.UID3=0x20022FCD
+
+DEFINES += BUILD_XQPLUGINS_DLL
+
+QT -= gui
+LIBS += -lecom.dll
+LIBS += -lcharconv.dll
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+HEADERS = include/xqplugin.h \
+    include/xqpluginloader.h \
+    include/xqtecom.hrh \
+    include/xqpluginfactory.h \
+    include/xqplugininfo.h \
+    inc/xqpluginloaderprivate.h \
+    inc/xqpluginhandle.h \
+    inc/xqplugininfoprivate.h
+SOURCES = src/xqpluginfactory.cpp \
+    src/xqpluginloader.cpp \
+    src/xqpluginloaderprivate.cpp \
+    src/xqpluginhandle.cpp \
+    src/xqplugininfo.cpp \
+    src/xqplugininfoprivate.cpp
+symbian { 
+    TARGET.CAPABILITY = All -TCB
+    TARGET.EPOCALLOWDLLDATA = 1
+    defFilePath=..
+
+#    deploy.path = /
+#    headers.path = epoc32/include/mw
+#    headers.sources = include/xqpluginfactory.h \
+#        include/xqplugin.h \
+#    	include/xqplugininfo.h \
+#        include/xqpluginloader.h \
+#        include/xqtecom.hrh
+#    DEPLOYMENT += headers
+
+BLD_INF_RULES.prj_exports += "include/xqpluginfactory.h /epoc32/include/mw/xqpluginfactory.h"
+BLD_INF_RULES.prj_exports += "include/xqplugin.h /epoc32/include/mw/xqplugin.h"
+BLD_INF_RULES.prj_exports += "include/xqplugininfo.h /epoc32/include/mw/xqplugininfo.h"
+BLD_INF_RULES.prj_exports += "include/xqpluginloader.h /epoc32/include/mw/xqpluginloader.h"
+BLD_INF_RULES.prj_exports += "include/xqtecom.hrh /epoc32/include/mw/xqtecom.hrh"
+}
+
--- a/qtextensions.pro	Thu Aug 19 10:43:30 2010 +0300
+++ b/qtextensions.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -19,4 +19,7 @@
 #
 
 TEMPLATE = subdirs
-SUBDIRS = qtmobility
+SUBDIRS = qtecomplugins \
+          qthighway \
+          qtmobileextensions \
+          qhbstyle
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/bin/README.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,6 @@
+XQ Service registration
+
+The New service.prf (same as service2.prf) has been taken into use in MCLwk22
+The old one renamed to servicefold.prf
+
+The QtHighway MCL wk22 supports both new and old the formats.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/bin/service.prf	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,21 @@
+!exists($$_PRO_FILE_PWD_/$$SERVICE.FILE) {
+    error("Missing service configuration file '$$_PRO_FILE_PWD_/$$SERVICE.FILE'")
+} else {
+    XQSRESOURCE_FILE_TAIL = _reg.rss
+    XQSRESOURCE_FILE = $$TARGET$$XQSRESOURCE_FILE_TAIL
+
+    SERVICE_DETAILS = $$cat( $$_PRO_FILE_PWD_/$$SERVICE.FILE)
+    SERVICE_DETAILS = $$escape_expand($$SERVICE_DETAILS)
+    SERVICE_DETAILS ~= s/\"/\\\"/
+
+    # The below four section will be removed in the nearest future
+    contains (SERVICE.OPTIONS, embeddable) { RSS_RULES *= "embeddability = KAppEmbeddable;" }	
+    contains (SERVICE.OPTIONS, hidden)     { RSS_RULES *= "hidden = KAppIsHidden;" }
+
+    RSS_RULES *= "newfile = KAppDoesNotSupportNewFile;"
+
+    RSS_RULES.header *= "$${LITERAL_HASH}include <xqserviceipcconst.h>"
+    RSS_RULES.header *= "$${LITERAL_HASH}include <eikon.rh>"
+    RSS_RULES.service_list += "uid = KXQServiceUid2; datatype_list = {}; opaque_data = r_service_configuration_reg;"
+    RSS_RULES.footer += "RESOURCE TBUF r_service_configuration_reg " {" buf = \"$$SERVICE_DETAILS\""; " }" 
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/bin/service2.prf	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,21 @@
+!exists($$_PRO_FILE_PWD_/$$SERVICE.FILE) {
+    error("Missing service configuration file '$$_PRO_FILE_PWD_/$$SERVICE.FILE'")
+} else {
+    XQSRESOURCE_FILE_TAIL = _reg.rss
+    XQSRESOURCE_FILE = $$TARGET$$XQSRESOURCE_FILE_TAIL
+
+    SERVICE_DETAILS = $$cat( $$_PRO_FILE_PWD_/$$SERVICE.FILE)
+    SERVICE_DETAILS = $$escape_expand($$SERVICE_DETAILS)
+    SERVICE_DETAILS ~= s/\"/\\\"/
+
+    # The below four section will be removed in the nearest future
+    contains (SERVICE.OPTIONS, embeddable) { RSS_RULES *= "embeddability = KAppEmbeddable;" }	
+    contains (SERVICE.OPTIONS, hidden)     { RSS_RULES *= "hidden = KAppIsHidden;" }
+
+    RSS_RULES *= "newfile = KAppDoesNotSupportNewFile;"
+
+    RSS_RULES.header *= "$${LITERAL_HASH}include <xqserviceipcconst.h>"
+    RSS_RULES.header *= "$${LITERAL_HASH}include <eikon.rh>"
+    RSS_RULES.service_list += "uid = KXQServiceUid2; datatype_list = {}; opaque_data = r_service_configuration_reg;"
+    RSS_RULES.footer += "RESOURCE TBUF r_service_configuration_reg " {" buf = \"$$SERVICE_DETAILS\""; " }" 
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/bin/serviceold.prf	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,38 @@
+######################################################################
+# XQService Feature
+######################################################################
+
+isEmpty(SERVICE.FILE) {
+	error("Missing service configuration file")
+}
+else {
+	XQSREG = xqsreg.exe
+	XQSRESOURCE_FILE_TAIL=_reg.rss
+	XQSRESOURCE_FILE=$$TARGET$$XQSRESOURCE_FILE_TAIL
+	
+	
+symbian-sbsv2{
+
+	
+ myextension = \
+    "START EXTENSION qt/qtextensions_pre_targetdep.export" \
+    "OPTION PREDEP_TARGET $$XQSRESOURCE_FILE" \
+    "OPTION COMMAND $$XQSREG $$TARGET $${TARGET.UID3} $$SERVICE.FILE $$XQSRESOURCE_FILE $$SERVICE.OPTIONS" \
+    "END"
+ BLD_INF_RULES.prj_extensions += myextension
+}
+
+symbian-abld{
+
+
+  DUMMY = xqs_dummy
+	xqs.output = $$DUMMY
+	XQS_INPUT = .
+	xqs.input = XQS_INPUT
+	xqs.CONFIG = no_link explicit_dependencies
+	xqs.variable_out = SOURCES
+	xqs.commands = $$XQSREG $$TARGET $${TARGET.UID3} $$SERVICE.FILE $$XQSRESOURCE_FILE $$SERVICE.OPTIONS
+	QMAKE_EXTRA_COMPILERS += xqs
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/bin/setserviceold.cmd	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,2 @@
+rem Switch to service.prf
+copy /y serviceold.prf \epoc32\tools\qt\mkspecs\features\symbian\service.prf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/bin/setserviceprf.cmd	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,2 @@
+rem Switch to service.prf
+copy /y service.prf \epoc32\tools\qt\mkspecs\features\symbian
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/bin/setserviceprf2.cmd	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,2 @@
+rem Switch to service2.prf
+copy /y service2.prf \epoc32\tools\qt\mkspecs\features\symbian\service.prf
Binary file qthighway/bin/xqsreg.exe has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/bwins/xqserviceu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,195 @@
+EXPORTS
+	?lastErrorMessage@XQAiwRequest@@QBEABVQString@@XZ @ 1 NONAME ; class QString const & XQAiwRequest::lastErrorMessage(void) const
+	?results@XQAiwRequest@@MBEABVQVariant@@XZ @ 2 NONAME ; class QVariant const & XQAiwRequest::results(void) const
+	?trUtf8@XQServiceAdaptor@@SA?AVQString@@PBD0@Z @ 3 NONAME ; class QString XQServiceAdaptor::trUtf8(char const *, char const *)
+	?connectLocalToRemote@XQServiceAdaptor@@AAE_NPAVQObject@@ABVQByteArray@@1@Z @ 4 NONAME ; bool XQServiceAdaptor::connectLocalToRemote(class QObject *, class QByteArray const &, class QByteArray const &)
+	?cancelPendingSend@XQServiceChannel@@SA_NABVQString@@@Z @ 5 NONAME ; bool XQServiceChannel::cancelPendingSend(class QString const &)
+	?list@XQApplicationManager@@QAE?AV?$QList@VXQAiwInterfaceDescriptor@@@@ABVQString@@0@Z @ 6 NONAME ; class QList<class XQAiwInterfaceDescriptor> XQApplicationManager::list(class QString const &, class QString const &)
+	?serializeArguments@XQServiceRequest@@SA?AVQByteArray@@ABV1@@Z @ 7 NONAME ; class QByteArray XQServiceRequest::serializeArguments(class XQServiceRequest const &)
+	?qt_metacast@XQApplicationManager@@UAEPAXPBD@Z @ 8 NONAME ; void * XQApplicationManager::qt_metacast(char const *)
+	?latestError@XQServiceRequest@@QAEHXZ @ 9 NONAME ; int XQServiceRequest::latestError(void)
+	?staticMetaObject@XQApplicationManager@@2UQMetaObject@@B @ 10 NONAME ; struct QMetaObject const XQApplicationManager::staticMetaObject
+	?received@XQServiceChannel@@IAEXABVQString@@ABVQByteArray@@@Z @ 11 NONAME ABSENT ; void XQServiceChannel::received(class QString const &, class QByteArray const &)
+	??_EXQServiceAdaptor@@UAE@I@Z @ 12 NONAME ; XQServiceAdaptor::~XQServiceAdaptor(unsigned int)
+	?metaObject@XQApplicationManager@@UBEPBUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const * XQApplicationManager::metaObject(void) const
+	?qt_metacast@XQServiceProvider@@UAEPAXPBD@Z @ 14 NONAME ; void * XQServiceProvider::qt_metacast(char const *)
+	?qt_metacall@XQServiceAdaptor@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 15 NONAME ; int XQServiceAdaptor::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?send@XQServiceRequest@@QAE_NXZ @ 16 NONAME ; bool XQServiceRequest::send(void)
+	?returnValueDelivered@XQServiceAdaptor@@IAEXXZ @ 17 NONAME ; void XQServiceAdaptor::returnValueDelivered(void)
+	?connectChannel@XQServiceChannel@@QAE_NXZ @ 18 NONAME ; bool XQServiceChannel::connectChannel(void)
+	?lastError@XQAiwRequest@@QBEHXZ @ 19 NONAME ; int XQAiwRequest::lastError(void) const
+	?tr@XQApplicationManager@@SA?AVQString@@PBD0H@Z @ 20 NONAME ; class QString XQApplicationManager::tr(char const *, char const *, int)
+	?isConnected@XQServiceAdaptor@@QAE_NABVQByteArray@@@Z @ 21 NONAME ; bool XQServiceAdaptor::isConnected(class QByteArray const &)
+	??0XQApplicationManager@@QAE@XZ @ 22 NONAME ; XQApplicationManager::XQApplicationManager(void)
+	?getStaticMetaObject@XQServiceProvider@@SAABUQMetaObject@@XZ @ 23 NONAME ; struct QMetaObject const & XQServiceProvider::getStaticMetaObject(void)
+	?channel@XQServiceAdaptor@@QBE?AVQString@@XZ @ 24 NONAME ; class QString XQServiceAdaptor::channel(void) const
+	?send@XQServiceRequest@@QAE_NAAVQVariant@@@Z @ 25 NONAME ; bool XQServiceRequest::send(class QVariant &)
+	?qt_metacast@XQServiceChannel@@UAEPAXPBD@Z @ 26 NONAME ; void * XQServiceChannel::qt_metacast(char const *)
+	?message@XQServiceRequest@@QBE?AVQString@@XZ @ 27 NONAME ; class QString XQServiceRequest::message(void) const
+	??0XQAiwRequest@@QAE@ABVXQAiwInterfaceDescriptor@@ABVQString@@_N@Z @ 28 NONAME ; XQAiwRequest::XQAiwRequest(class XQAiwInterfaceDescriptor const &, class QString const &, bool)
+	?trUtf8@XQApplicationManager@@SA?AVQString@@PBD0H@Z @ 29 NONAME ; class QString XQApplicationManager::trUtf8(char const *, char const *, int)
+	?publish@XQServiceAdaptor@@IAE_NABVQByteArray@@@Z @ 30 NONAME ; bool XQServiceAdaptor::publish(class QByteArray const &)
+	?tr@XQServiceRequest@@SA?AVQString@@PBD0H@Z @ 31 NONAME ; class QString XQServiceRequest::tr(char const *, char const *, int)
+	?tr@XQServiceChannel@@SA?AVQString@@PBD0H@Z @ 32 NONAME ; class QString XQServiceChannel::tr(char const *, char const *, int)
+	?qt_metacall@XQServiceRequest@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 33 NONAME ; int XQServiceRequest::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?trUtf8@XQServiceProvider@@SA?AVQString@@PBD0H@Z @ 34 NONAME ; class QString XQServiceProvider::trUtf8(char const *, char const *, int)
+	??0XQServiceProvider@@QAE@ABVQString@@PAVQObject@@@Z @ 35 NONAME ; XQServiceProvider::XQServiceProvider(class QString const &, class QObject *)
+	?trUtf8@XQServiceRequest@@SA?AVQString@@PBD0@Z @ 36 NONAME ; class QString XQServiceRequest::trUtf8(char const *, char const *)
+	?requestCompleted@XQServiceRequest@@IAEXABVQVariant@@@Z @ 37 NONAME ; void XQServiceRequest::requestCompleted(class QVariant const &)
+	?cancelPendingSend@XQServiceAdaptor@@SA_NABVQString@@@Z @ 38 NONAME ; bool XQServiceAdaptor::cancelPendingSend(class QString const &)
+	?qt_metacall@XQServiceProvider@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 39 NONAME ; int XQServiceProvider::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?metaObject@XQServiceRequest@@UBEPBUQMetaObject@@XZ @ 40 NONAME ; struct QMetaObject const * XQServiceRequest::metaObject(void) const
+	?metaObject@XQServiceChannel@@UBEPBUQMetaObject@@XZ @ 41 NONAME ; struct QMetaObject const * XQServiceChannel::metaObject(void) const
+	??0XQServiceRequest@@QAE@XZ @ 42 NONAME ; XQServiceRequest::XQServiceRequest(void)
+	?tr@XQServiceChannel@@SA?AVQString@@PBD0@Z @ 43 NONAME ; class QString XQServiceChannel::tr(char const *, char const *)
+	?qt_metacast@XQServiceRequest@@UAEPAXPBD@Z @ 44 NONAME ; void * XQServiceRequest::qt_metacast(char const *)
+	?getStaticMetaObject@XQServiceChannel@@SAABUQMetaObject@@XZ @ 45 NONAME ; struct QMetaObject const & XQServiceChannel::getStaticMetaObject(void)
+	?receiverDestroyed@XQServiceAdaptor@@AAEXXZ @ 46 NONAME ; void XQServiceAdaptor::receiverDestroyed(void)
+	?requestError@XQAiwRequest@@IAEXHABVQString@@@Z @ 47 NONAME ; void XQAiwRequest::requestError(int, class QString const &)
+	?send@XQServiceAdaptor@@QAE_NABVQByteArray@@ABV?$QList@VQVariant@@@@AAVQVariant@@@Z @ 48 NONAME ; bool XQServiceAdaptor::send(class QByteArray const &, class QList<class QVariant> const &, class QVariant &)
+	?staticMetaObject@XQServiceChannel@@2UQMetaObject@@B @ 49 NONAME ; struct QMetaObject const XQServiceChannel::staticMetaObject
+	?sendExecute@XQAiwRequest@@MAE_NXZ @ 50 NONAME ; bool XQAiwRequest::sendExecute(void)
+	?trUtf8@XQApplicationManager@@SA?AVQString@@PBD0@Z @ 51 NONAME ; class QString XQApplicationManager::trUtf8(char const *, char const *)
+	?tr@XQApplicationManager@@SA?AVQString@@PBD0@Z @ 52 NONAME ; class QString XQApplicationManager::tr(char const *, char const *)
+	?latestError@XQServiceChannel@@SAHXZ @ 53 NONAME ; int XQServiceChannel::latestError(void)
+	?trUtf8@XQServiceRequest@@SA?AVQString@@PBD0H@Z @ 54 NONAME ; class QString XQServiceRequest::trUtf8(char const *, char const *, int)
+	?setCurrentRequestAsync@XQServiceAdaptor@@QAEHXZ @ 55 NONAME ; int XQServiceAdaptor::setCurrentRequestAsync(void)
+	??4XQServiceRequest@@QAEAAV0@ABV0@@Z @ 56 NONAME ; class XQServiceRequest & XQServiceRequest::operator=(class XQServiceRequest const &)
+	?trUtf8@XQServiceChannel@@SA?AVQString@@PBD0H@Z @ 57 NONAME ; class QString XQServiceChannel::trUtf8(char const *, char const *, int)
+	?commandReceive@XQServiceChannel@@UAEXW4XQServiceCommand@1@@Z @ 58 NONAME ; void XQServiceChannel::commandReceive(enum XQServiceChannel::XQServiceCommand)
+	?setCurrentRequestAsync@XQServiceProvider@@IAEHXZ @ 59 NONAME ; int XQServiceProvider::setCurrentRequestAsync(void)
+	?tr@XQServiceAdaptor@@SA?AVQString@@PBD0@Z @ 60 NONAME ; class QString XQServiceAdaptor::tr(char const *, char const *)
+	??_EXQServiceChannel@@UAE@I@Z @ 61 NONAME ; XQServiceChannel::~XQServiceChannel(unsigned int)
+	?getStaticMetaObject@XQServiceAdaptor@@SAABUQMetaObject@@XZ @ 62 NONAME ; struct QMetaObject const & XQServiceAdaptor::getStaticMetaObject(void)
+	?send@XQServiceAdaptor@@QAE_NABVQByteArray@@ABVQVariant@@11AAV3@@Z @ 63 NONAME ; bool XQServiceAdaptor::send(class QByteArray const &, class QVariant const &, class QVariant const &, class QVariant const &, class QVariant &)
+	?setService@XQServiceRequest@@QAEXABVQString@@@Z @ 64 NONAME ; void XQServiceRequest::setService(class QString const &)
+	??0XQServiceAdaptor@@QAE@ABVQString@@PAVQObject@@@Z @ 65 NONAME ; XQServiceAdaptor::XQServiceAdaptor(class QString const &, class QObject *)
+	?createAction@XQAiwRequest@@QAEPAVQAction@@XZ @ 66 NONAME ; class QAction * XQAiwRequest::createAction(void)
+	??0XQServiceRequest@@QAE@ABV0@@Z @ 67 NONAME ; XQServiceRequest::XQServiceRequest(class XQServiceRequest const &)
+	?returnValueDelivered@XQServiceProvider@@IAEXXZ @ 68 NONAME ; void XQServiceProvider::returnValueDelivered(void)
+	?tr@XQAiwRequest@@SA?AVQString@@PBD0@Z @ 69 NONAME ; class QString XQAiwRequest::tr(char const *, char const *)
+	?qt_metacast@XQAiwRequest@@UAEPAXPBD@Z @ 70 NONAME ; void * XQAiwRequest::qt_metacast(char const *)
+	??0XQServiceChannel@@QAE@ABVQString@@_NPAVQObject@@@Z @ 71 NONAME ; XQServiceChannel::XQServiceChannel(class QString const &, bool, class QObject *)
+	?setSynchronous@XQServiceRequest@@QAEXAB_N@Z @ 72 NONAME ; void XQServiceRequest::setSynchronous(bool const &)
+	?qt_metacall@XQApplicationManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 73 NONAME ; int XQApplicationManager::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?handleAsyncResponse@XQAiwRequest@@AAEXABVQVariant@@@Z @ 74 NONAME ; void XQAiwRequest::handleAsyncResponse(class QVariant const &)
+	??1XQServiceRequest@@UAE@XZ @ 75 NONAME ; XQServiceRequest::~XQServiceRequest(void)
+	?receive@XQServiceChannel@@UAE?AVQVariant@@ABVQString@@ABVQByteArray@@@Z @ 76 NONAME ABSENT ; class QVariant XQServiceChannel::receive(class QString const &, class QByteArray const &)
+	?connectRemoteToLocal@XQServiceAdaptor@@AAE_NABVQByteArray@@PAVQObject@@0@Z @ 77 NONAME ; bool XQServiceAdaptor::connectRemoteToLocal(class QByteArray const &, class QObject *, class QByteArray const &)
+	?triggered@XQAiwRequest@@IAEXXZ @ 78 NONAME ; void XQAiwRequest::triggered(void)
+	?tr@XQAiwRequest@@SA?AVQString@@PBD0H@Z @ 79 NONAME ; class QString XQAiwRequest::tr(char const *, char const *, int)
+	?channel@XQServiceChannel@@QBE?AVQString@@XZ @ 80 NONAME ; class QString XQServiceChannel::channel(void) const
+	?send@XQServiceAdaptor@@QAE_NABVQByteArray@@ABVQVariant@@AAV3@@Z @ 81 NONAME ; bool XQServiceAdaptor::send(class QByteArray const &, class QVariant const &, class QVariant &)
+	?descriptor@XQAiwRequest@@QBEABVXQAiwInterfaceDescriptor@@XZ @ 82 NONAME ; class XQAiwInterfaceDescriptor const & XQAiwRequest::descriptor(void) const
+	?send@XQServiceChannel@@SA_NABVQString@@0ABVQByteArray@@AAVQVariant@@_NPAVXQServiceRequestCompletedAsync@@@Z @ 83 NONAME ; bool XQServiceChannel::send(class QString const &, class QString const &, class QByteArray const &, class QVariant &, bool, class XQServiceRequestCompletedAsync *)
+	?addArg@XQServiceRequest@@AAEXABVQVariant@@@Z @ 84 NONAME ; void XQServiceRequest::addArg(class QVariant const &)
+	?setMessage@XQServiceRequest@@QAEXABVQString@@@Z @ 85 NONAME ; void XQServiceRequest::setMessage(class QString const &)
+	??1XQAiwRequest@@UAE@XZ @ 86 NONAME ; XQAiwRequest::~XQAiwRequest(void)
+	?qt_metacall@XQAiwRequest@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 87 NONAME ; int XQAiwRequest::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?arguments@XQServiceRequest@@QBEABV?$QList@VQVariant@@@@XZ @ 88 NONAME ; class QList<class QVariant> const & XQServiceRequest::arguments(void) const
+	?tr@XQServiceRequest@@SA?AVQString@@PBD0@Z @ 89 NONAME ; class QString XQServiceRequest::tr(char const *, char const *)
+	?getStaticMetaObject@XQServiceRequest@@SAABUQMetaObject@@XZ @ 90 NONAME ; struct QMetaObject const & XQServiceRequest::getStaticMetaObject(void)
+	?SetPlugin@XQServiceProvider@@QAEXPAVQObject@@@Z @ 91 NONAME ; void XQServiceProvider::SetPlugin(class QObject *)
+	??1XQServiceProvider@@UAE@XZ @ 92 NONAME ; XQServiceProvider::~XQServiceProvider(void)
+	??1XQApplicationManager@@UAE@XZ @ 93 NONAME ; XQApplicationManager::~XQApplicationManager(void)
+	?commandReceived@XQServiceChannel@@IAEXW4XQServiceCommand@1@@Z @ 94 NONAME ; void XQServiceChannel::commandReceived(enum XQServiceChannel::XQServiceCommand)
+	?create@XQApplicationManager@@QAEPAVXQAiwRequest@@ABVQString@@0_N@Z @ 95 NONAME ; class XQAiwRequest * XQApplicationManager::create(class QString const &, class QString const &, bool)
+	?tr@XQServiceAdaptor@@SA?AVQString@@PBD0H@Z @ 96 NONAME ; class QString XQServiceAdaptor::tr(char const *, char const *, int)
+	?qt_metacast@XQServiceAdaptor@@UAEPAXPBD@Z @ 97 NONAME ; void * XQServiceAdaptor::qt_metacast(char const *)
+	?tr@XQServiceProvider@@SA?AVQString@@PBD0H@Z @ 98 NONAME ; class QString XQServiceProvider::tr(char const *, char const *, int)
+	?qt_metacall@XQServiceChannel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 99 NONAME ; int XQServiceChannel::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?latestError@XQServiceAdaptor@@SAHXZ @ 100 NONAME ; int XQServiceAdaptor::latestError(void)
+	??1XQServiceAdaptor@@UAE@XZ @ 101 NONAME ; XQServiceAdaptor::~XQServiceAdaptor(void)
+	?staticMetaObject@XQServiceAdaptor@@2UQMetaObject@@B @ 102 NONAME ; struct QMetaObject const XQServiceAdaptor::staticMetaObject
+	?metaObject@XQAiwRequest@@UBEPBUQMetaObject@@XZ @ 103 NONAME ; struct QMetaObject const * XQAiwRequest::metaObject(void) const
+	?metaObject@XQServiceAdaptor@@UBEPBUQMetaObject@@XZ @ 104 NONAME ; struct QMetaObject const * XQServiceAdaptor::metaObject(void) const
+	?setArguments@XQServiceRequest@@QAEXABV?$QList@VQVariant@@@@@Z @ 105 NONAME ; void XQServiceRequest::setArguments(class QList<class QVariant> const &)
+	??6XQServiceRequest@@QAEAAV0@PBD@Z @ 106 NONAME ; class XQServiceRequest & XQServiceRequest::operator<<(char const *)
+	??_EXQServiceProvider@@UAE@I@Z @ 107 NONAME ; XQServiceProvider::~XQServiceProvider(unsigned int)
+	?send@XQAiwRequest@@QAE_NXZ @ 108 NONAME ; bool XQAiwRequest::send(void)
+	??_EXQAiwRequest@@UAE@I@Z @ 109 NONAME ; XQAiwRequest::~XQAiwRequest(unsigned int)
+	?trUtf8@XQAiwRequest@@SA?AVQString@@PBD0@Z @ 110 NONAME ; class QString XQAiwRequest::trUtf8(char const *, char const *)
+	?sendMessage@XQServiceAdaptor@@AAE_NABVQString@@ABV?$QList@VQVariant@@@@AAVQVariant@@@Z @ 111 NONAME ; bool XQServiceAdaptor::sendMessage(class QString const &, class QList<class QVariant> const &, class QVariant &)
+	??_EXQServiceRequest@@UAE@I@Z @ 112 NONAME ; XQServiceRequest::~XQServiceRequest(unsigned int)
+	?sendCommand@XQServiceChannel@@SAXABVQString@@W4XQServiceCommand@1@@Z @ 113 NONAME ; void XQServiceChannel::sendCommand(class QString const &, enum XQServiceChannel::XQServiceCommand)
+	?memberToMessage@XQServiceAdaptor@@MAE?AVQString@@ABVQByteArray@@@Z @ 114 NONAME ; class QString XQServiceAdaptor::memberToMessage(class QByteArray const &)
+	?tr@XQServiceProvider@@SA?AVQString@@PBD0@Z @ 115 NONAME ; class QString XQServiceProvider::tr(char const *, char const *)
+	?requestError@XQServiceRequest@@IAEXH@Z @ 116 NONAME ; void XQServiceRequest::requestError(int)
+	?sendFromAction@XQAiwRequest@@AAEX_N@Z @ 117 NONAME ; void XQAiwRequest::sendFromAction(bool)
+	?trUtf8@XQServiceAdaptor@@SA?AVQString@@PBD0H@Z @ 118 NONAME ; class QString XQServiceAdaptor::trUtf8(char const *, char const *, int)
+	?trUtf8@XQAiwRequest@@SA?AVQString@@PBD0H@Z @ 119 NONAME ; class QString XQAiwRequest::trUtf8(char const *, char const *, int)
+	??1XQServiceChannel@@UAE@XZ @ 120 NONAME ; XQServiceChannel::~XQServiceChannel(void)
+	?isNull@XQServiceRequest@@QBE_NXZ @ 121 NONAME ; bool XQServiceRequest::isNull(void) const
+	?publishAll@XQServiceProvider@@IAEXXZ @ 122 NONAME ; void XQServiceProvider::publishAll(void)
+	?staticMetaObject@XQServiceProvider@@2UQMetaObject@@B @ 123 NONAME ; struct QMetaObject const XQServiceProvider::staticMetaObject
+	?requestOk@XQAiwRequest@@IAEXABVQVariant@@@Z @ 124 NONAME ; void XQAiwRequest::requestOk(class QVariant const &)
+	?getStaticMetaObject@XQApplicationManager@@SAABUQMetaObject@@XZ @ 125 NONAME ; struct QMetaObject const & XQApplicationManager::getStaticMetaObject(void)
+	?sendLocally@XQServiceChannel@@SA?AVQVariant@@ABVQString@@0ABVQByteArray@@@Z @ 126 NONAME ABSENT ; class QVariant XQServiceChannel::sendLocally(class QString const &, class QString const &, class QByteArray const &)
+	?completeRequest@XQServiceProvider@@IAE_NHABVQVariant@@@Z @ 127 NONAME ; bool XQServiceProvider::completeRequest(int, class QVariant const &)
+	?service@XQServiceRequest@@QBE?AVQString@@XZ @ 128 NONAME ; class QString XQServiceRequest::service(void) const
+	?deserializeArguments@XQServiceRequest@@SAXAAV1@ABVQByteArray@@@Z @ 129 NONAME ; void XQServiceRequest::deserializeArguments(class XQServiceRequest &, class QByteArray const &)
+	?create@XQApplicationManager@@QAEPAVXQAiwRequest@@ABVXQAiwInterfaceDescriptor@@ABVQString@@_N@Z @ 130 NONAME ; class XQAiwRequest * XQApplicationManager::create(class XQAiwInterfaceDescriptor const &, class QString const &, bool)
+	?send@XQServiceAdaptor@@SA_NABVQString@@0ABV?$QList@VQVariant@@@@AAVQVariant@@_NPAVXQServiceRequestCompletedAsync@@@Z @ 131 NONAME ; bool XQServiceAdaptor::send(class QString const &, class QString const &, class QList<class QVariant> const &, class QVariant &, bool, class XQServiceRequestCompletedAsync *)
+	??_EXQApplicationManager@@UAE@I@Z @ 132 NONAME ; XQApplicationManager::~XQApplicationManager(unsigned int)
+	?staticMetaObject@XQServiceRequest@@2UQMetaObject@@B @ 133 NONAME ; struct QMetaObject const XQServiceRequest::staticMetaObject
+	?publishAll@XQServiceAdaptor@@IAEXW4PublishType@1@@Z @ 134 NONAME ; void XQServiceAdaptor::publishAll(enum XQServiceAdaptor::PublishType)
+	?metaObject@XQServiceProvider@@UBEPBUQMetaObject@@XZ @ 135 NONAME ; struct QMetaObject const * XQServiceProvider::metaObject(void) const
+	?publishAll@XQServiceAdaptor@@AAEXPAVQObject@@HW4PublishType@1@@Z @ 136 NONAME ; void XQServiceAdaptor::publishAll(class QObject *, int, enum XQServiceAdaptor::PublishType)
+	?trUtf8@XQServiceChannel@@SA?AVQString@@PBD0@Z @ 137 NONAME ; class QString XQServiceChannel::trUtf8(char const *, char const *)
+	?getStaticMetaObject@XQAiwRequest@@SAABUQMetaObject@@XZ @ 138 NONAME ; struct QMetaObject const & XQAiwRequest::getStaticMetaObject(void)
+	?trUtf8@XQServiceProvider@@SA?AVQString@@PBD0@Z @ 139 NONAME ; class QString XQServiceProvider::trUtf8(char const *, char const *)
+	?connect@XQServiceAdaptor@@SA_NPAVQObject@@ABVQByteArray@@01@Z @ 140 NONAME ; bool XQServiceAdaptor::connect(class QObject *, class QByteArray const &, class QObject *, class QByteArray const &)
+	?addVariantArg@XQServiceRequest@@QAEXABVQVariant@@@Z @ 141 NONAME ; void XQServiceRequest::addVariantArg(class QVariant const &)
+	??0XQServiceRequest@@QAE@ABVQString@@0AB_N@Z @ 142 NONAME ; XQServiceRequest::XQServiceRequest(class QString const &, class QString const &, bool const &)
+	?isSynchronous@XQServiceRequest@@QBE_NXZ @ 143 NONAME ; bool XQServiceRequest::isSynchronous(void) const
+	?received@XQServiceAdaptor@@AAE?AVQVariant@@ABVQString@@ABVQByteArray@@@Z @ 144 NONAME ABSENT ; class QVariant XQServiceAdaptor::received(class QString const &, class QByteArray const &)
+	?send@XQServiceAdaptor@@QAE_NABVQByteArray@@ABVQVariant@@1AAV3@@Z @ 145 NONAME ; bool XQServiceAdaptor::send(class QByteArray const &, class QVariant const &, class QVariant const &, class QVariant &)
+	?setArguments@XQAiwRequest@@QAEXABV?$QList@VQVariant@@@@@Z @ 146 NONAME ; void XQAiwRequest::setArguments(class QList<class QVariant> const &)
+	?staticMetaObject@XQAiwRequest@@2UQMetaObject@@B @ 147 NONAME ; struct QMetaObject const XQAiwRequest::staticMetaObject
+	?completeRequest@XQServiceAdaptor@@QAE_NHABVQVariant@@@Z @ 148 NONAME ; bool XQServiceAdaptor::completeRequest(int, class QVariant const &)
+	?handleAsyncError@XQAiwRequest@@AAEXH@Z @ 149 NONAME ; void XQAiwRequest::handleAsyncError(int)
+	?create@XQApplicationManager@@QAEPAVXQAiwRequest@@ABVQString@@00_N@Z @ 150 NONAME ; class XQAiwRequest * XQApplicationManager::create(class QString const &, class QString const &, class QString const &, bool)
+	?send@XQServiceAdaptor@@SA_NABVQString@@0ABV?$QList@VQVariant@@@@AAVQVariant@@_NPAVXQServiceRequestCompletedAsync@@PBX@Z @ 151 NONAME ; bool XQServiceAdaptor::send(class QString const &, class QString const &, class QList<class QVariant> const &, class QVariant &, bool, class XQServiceRequestCompletedAsync *, void const *)
+	?clientDisconnected@XQServiceAdaptor@@IAEXXZ @ 152 NONAME ; void XQServiceAdaptor::clientDisconnected(void)
+	?setEmbedded@XQAiwRequest@@QAEX_N@Z @ 153 NONAME ; void XQAiwRequest::setEmbedded(bool)
+	?clientDisconnected@XQServiceProvider@@IAEXXZ @ 154 NONAME ; void XQServiceProvider::clientDisconnected(void)
+	?create@XQApplicationManager@@QAEPAVXQAiwRequest@@ABVQUrl@@_N@Z @ 155 NONAME ; class XQAiwRequest * XQApplicationManager::create(class QUrl const &, bool)
+	?list@XQApplicationManager@@QAE?AV?$QList@VXQAiwInterfaceDescriptor@@@@ABVQString@@00@Z @ 156 NONAME ; class QList<class XQAiwInterfaceDescriptor> XQApplicationManager::list(class QString const &, class QString const &, class QString const &)
+	??0XQServiceRequest@@QAE@ABVXQAiwInterfaceDescriptor@@ABVQString@@AB_N@Z @ 157 NONAME ; XQServiceRequest::XQServiceRequest(class XQAiwInterfaceDescriptor const &, class QString const &, bool const &)
+	?create@XQApplicationManager@@QAEPAVXQAiwRequest@@ABVQFile@@ABVXQAiwInterfaceDescriptor@@_N@Z @ 158 NONAME ; class XQAiwRequest * XQApplicationManager::create(class QFile const &, class XQAiwInterfaceDescriptor const &, bool)
+	?send@XQServiceChannel@@SA_NABVQString@@0ABVQByteArray@@AAVQVariant@@_NPAVXQServiceRequestCompletedAsync@@PBX@Z @ 159 NONAME ; bool XQServiceChannel::send(class QString const &, class QString const &, class QByteArray const &, class QVariant &, bool, class XQServiceRequestCompletedAsync *, void const *)
+	?send@XQAiwRequest@@QAE_NAAVQVariant@@@Z @ 160 NONAME ; bool XQAiwRequest::send(class QVariant &)
+	?list@XQApplicationManager@@QAE?AV?$QList@VXQAiwInterfaceDescriptor@@@@ABVQFile@@@Z @ 161 NONAME ; class QList<class XQAiwInterfaceDescriptor> XQApplicationManager::list(class QFile const &)
+	?setOperation@XQAiwRequest@@QAEXABVQString@@@Z @ 162 NONAME ; void XQAiwRequest::setOperation(class QString const &)
+	??0XQAiwRequest@@QAE@ABVQUrl@@ABVXQAiwInterfaceDescriptor@@ABVQString@@@Z @ 163 NONAME ; XQAiwRequest::XQAiwRequest(class QUrl const &, class XQAiwInterfaceDescriptor const &, class QString const &)
+	??0XQAiwRequest@@QAE@ABVQFile@@ABVXQAiwInterfaceDescriptor@@ABVQString@@@Z @ 164 NONAME ; XQAiwRequest::XQAiwRequest(class QFile const &, class XQAiwInterfaceDescriptor const &, class QString const &)
+	?create@XQApplicationManager@@QAEPAVXQAiwRequest@@ABVQFile@@_N@Z @ 165 NONAME ; class XQAiwRequest * XQApplicationManager::create(class QFile const &, bool)
+	?isEmbedded@XQAiwRequest@@QBE_NXZ @ 166 NONAME ; bool XQAiwRequest::isEmbedded(void) const
+	?list@XQApplicationManager@@QAE?AV?$QList@VXQAiwInterfaceDescriptor@@@@ABVQUrl@@@Z @ 167 NONAME ; class QList<class XQAiwInterfaceDescriptor> XQApplicationManager::list(class QUrl const &)
+	?create@XQApplicationManager@@QAEPAVXQAiwRequest@@ABVQUrl@@ABVXQAiwInterfaceDescriptor@@_N@Z @ 168 NONAME ; class XQAiwRequest * XQApplicationManager::create(class QUrl const &, class XQAiwInterfaceDescriptor const &, bool)
+	?operation@XQAiwRequest@@QBEABVQString@@XZ @ 169 NONAME ; class QString const & XQAiwRequest::operation(void) const
+	?received@XQServiceChannel@@IAEXABVQString@@ABVQByteArray@@ABVXQSharableFile@@@Z @ 170 NONAME ; void XQServiceChannel::received(class QString const &, class QByteArray const &, class XQSharableFile const &)
+	?receive@XQServiceChannel@@UAE?AVQVariant@@ABVQString@@ABVQByteArray@@ABVXQSharableFile@@@Z @ 171 NONAME ; class QVariant XQServiceChannel::receive(class QString const &, class QByteArray const &, class XQSharableFile const &)
+	?setBackground@XQAiwRequest@@QAEX_N@Z @ 172 NONAME ; void XQAiwRequest::setBackground(bool)
+	?info@XQServiceRequest@@QBE?AVXQRequestInfo@@XZ @ 173 NONAME ; class XQRequestInfo XQServiceRequest::info(void) const
+	?info@XQAiwRequest@@QBE?AVXQRequestInfo@@XZ @ 174 NONAME ; class XQRequestInfo XQAiwRequest::info(void) const
+	?setSynchronous@XQAiwRequest@@QAEX_N@Z @ 175 NONAME ; void XQAiwRequest::setSynchronous(bool)
+	?handleSharableFileArgs@XQServiceRequest@@AAE_NXZ @ 176 NONAME ; bool XQServiceRequest::handleSharableFileArgs(void)
+	?requestInfo@XQServiceProvider@@IBE?AVXQRequestInfo@@XZ @ 177 NONAME ; class XQRequestInfo XQServiceProvider::requestInfo(void) const
+	?requestInfo@XQServiceAdaptor@@QBE?AVXQRequestInfo@@XZ @ 178 NONAME ; class XQRequestInfo XQServiceAdaptor::requestInfo(void) const
+	?sendLocally@XQServiceChannel@@SA?AVQVariant@@ABVQString@@0ABVQByteArray@@ABVXQSharableFile@@@Z @ 179 NONAME ; class QVariant XQServiceChannel::sendLocally(class QString const &, class QString const &, class QByteArray const &, class XQSharableFile const &)
+	?isBackground@XQAiwRequest@@QBE_NXZ @ 180 NONAME ; bool XQAiwRequest::isBackground(void) const
+	?setInfo@XQAiwRequest@@QAEXABVXQRequestInfo@@@Z @ 181 NONAME ; void XQAiwRequest::setInfo(class XQRequestInfo const &)
+	?received@XQServiceAdaptor@@AAE?AVQVariant@@ABVQString@@ABVQByteArray@@ABVXQSharableFile@@@Z @ 182 NONAME ; class QVariant XQServiceAdaptor::received(class QString const &, class QByteArray const &, class XQSharableFile const &)
+	?isSynchronous@XQAiwRequest@@QBE_NXZ @ 183 NONAME ; bool XQAiwRequest::isSynchronous(void) const
+	?setInfo@XQServiceRequest@@QAEXABVXQRequestInfo@@@Z @ 184 NONAME ; void XQServiceRequest::setInfo(class XQRequestInfo const &)
+	?lastError@XQApplicationManager@@QBEHXZ @ 185 NONAME ; int XQApplicationManager::lastError(void) const
+	?create@XQApplicationManager@@QAEPAVXQAiwRequest@@ABVXQSharableFile@@ABVXQAiwInterfaceDescriptor@@_N@Z @ 186 NONAME ; class XQAiwRequest * XQApplicationManager::create(class XQSharableFile const &, class XQAiwInterfaceDescriptor const &, bool)
+	?list@XQApplicationManager@@QAE?AV?$QList@VXQAiwInterfaceDescriptor@@@@ABVXQSharableFile@@@Z @ 187 NONAME ; class QList<class XQAiwInterfaceDescriptor> XQApplicationManager::list(class XQSharableFile const &)
+	?create@XQApplicationManager@@QAEPAVXQAiwRequest@@ABVXQSharableFile@@_N@Z @ 188 NONAME ; class XQAiwRequest * XQApplicationManager::create(class XQSharableFile const &, bool)
+	??0XQAiwRequest@@QAE@ABVXQSharableFile@@ABVXQAiwInterfaceDescriptor@@ABVQString@@@Z @ 189 NONAME ; XQAiwRequest::XQAiwRequest(class XQSharableFile const &, class XQAiwInterfaceDescriptor const &, class QString const &)
+	?isRunning@XQApplicationManager@@QBE_NABVXQAiwInterfaceDescriptor@@@Z @ 190 NONAME ; bool XQApplicationManager::isRunning(class XQAiwInterfaceDescriptor const &) const
+	?getDrmAttributes@XQApplicationManager@@QAE_NABVXQSharableFile@@ABV?$QList@H@@AAV?$QList@VQVariant@@@@@Z @ 191 NONAME ; bool XQApplicationManager::getDrmAttributes(class XQSharableFile const &, class QList<int> const &, class QList<class QVariant> &)
+	?getDrmAttributes@XQApplicationManager@@QAE_NABVQFile@@ABV?$QList@H@@AAV?$QList@VQVariant@@@@@Z @ 192 NONAME ; bool XQApplicationManager::getDrmAttributes(class QFile const &, class QList<int> const &, class QList<class QVariant> &)
+	?status@XQApplicationManager@@QAE?AW4ServiceStatus@1@ABVXQAiwInterfaceDescriptor@@@Z @ 193 NONAME ; enum XQApplicationManager::ServiceStatus XQApplicationManager::status(class XQAiwInterfaceDescriptor const &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/bwins/xqserviceutilu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,89 @@
+EXPORTS
+	??0XQServiceManager@@QAE@XZ @ 1 NONAME ; XQServiceManager::XQServiceManager(void)
+	?qt_metacall@XQServiceManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2 NONAME ; int XQServiceManager::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?minorVersion@XQAiwInterfaceDescriptor@@QBEHXZ @ 3 NONAME ; int XQAiwInterfaceDescriptor::minorVersion(void) const
+	?metaObject@XQServiceManager@@UBEPBUQMetaObject@@XZ @ 4 NONAME ; struct QMetaObject const * XQServiceManager::metaObject(void) const
+	??0XQAiwInterfaceDescriptor@@QAE@XZ @ 5 NONAME ; XQAiwInterfaceDescriptor::XQAiwInterfaceDescriptor(void)
+	??8XQAiwInterfaceDescriptor@@QBE_NABV0@@Z @ 6 NONAME ; bool XQAiwInterfaceDescriptor::operator==(class XQAiwInterfaceDescriptor const &) const
+	?tr@XQServiceManager@@SA?AVQString@@PBD0@Z @ 7 NONAME ; class QString XQServiceManager::tr(char const *, char const *)
+	??_EXQServiceManager@@UAE@I@Z @ 8 NONAME ; XQServiceManager::~XQServiceManager(unsigned int)
+	?getStaticMetaObject@XQServiceManager@@SAABUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const & XQServiceManager::getStaticMetaObject(void)
+	?interfaceName@XQAiwInterfaceDescriptor@@QBE?AVQString@@XZ @ 10 NONAME ; class QString XQAiwInterfaceDescriptor::interfaceName(void) const
+	??9XQAiwInterfaceDescriptor@@QBE_NABV0@@Z @ 11 NONAME ; bool XQAiwInterfaceDescriptor::operator!=(class XQAiwInterfaceDescriptor const &) const
+	?staticMetaObject@XQServiceManager@@2UQMetaObject@@B @ 12 NONAME ; struct QMetaObject const XQServiceManager::staticMetaObject
+	?toBackground@XQServiceUtil@@YAX_N@Z @ 13 NONAME ; void XQServiceUtil::toBackground(bool)
+	?customProperty@XQAiwInterfaceDescriptor@@QBE?AVQString@@ABV2@@Z @ 14 NONAME ; class QString XQAiwInterfaceDescriptor::customProperty(class QString const &) const
+	?qt_metacast@XQServiceManager@@UAEPAXPBD@Z @ 15 NONAME ; void * XQServiceManager::qt_metacast(char const *)
+	?isValid@XQAiwInterfaceDescriptor@@QBE_NXZ @ 16 NONAME ; bool XQAiwInterfaceDescriptor::isValid(void) const
+	??6@YAAAVQDataStream@@AAV0@ABVXQAiwInterfaceDescriptor@@@Z @ 17 NONAME ; class QDataStream & operator<<(class QDataStream &, class XQAiwInterfaceDescriptor const &)
+	?property@XQAiwInterfaceDescriptor@@QBE?AVQVariant@@W4PropertyKey@1@@Z @ 18 NONAME ; class QVariant XQAiwInterfaceDescriptor::property(enum XQAiwInterfaceDescriptor::PropertyKey) const
+	?trUtf8@XQServiceManager@@SA?AVQString@@PBD0H@Z @ 19 NONAME ; class QString XQServiceManager::trUtf8(char const *, char const *, int)
+	?inSystemScope@XQAiwInterfaceDescriptor@@QBE_NXZ @ 20 NONAME ; bool XQAiwInterfaceDescriptor::inSystemScope(void) const
+	?startServer@XQServiceManager@@QAEHABVQString@@_NAAHAA_K@Z @ 21 NONAME ; int XQServiceManager::startServer(class QString const &, bool, int &, unsigned long long &)
+	?findInterfaces@XQServiceManager@@QBE?AV?$QList@VXQAiwInterfaceDescriptor@@@@ABVQString@@@Z @ 22 NONAME ; class QList<class XQAiwInterfaceDescriptor> XQServiceManager::findInterfaces(class QString const &) const
+	??1XQAiwInterfaceDescriptor@@QAE@XZ @ 23 NONAME ; XQAiwInterfaceDescriptor::~XQAiwInterfaceDescriptor(void)
+	??5@YAAAVQDataStream@@AAV0@AAVXQAiwInterfaceDescriptor@@@Z @ 24 NONAME ; class QDataStream & operator>>(class QDataStream &, class XQAiwInterfaceDescriptor &)
+	??4XQAiwInterfaceDescriptor@@QAEAAV0@ABV0@@Z @ 25 NONAME ; class XQAiwInterfaceDescriptor & XQAiwInterfaceDescriptor::operator=(class XQAiwInterfaceDescriptor const &)
+	??6@YA?AVQDebug@@V0@ABVXQAiwInterfaceDescriptor@@@Z @ 26 NONAME ; class QDebug operator<<(class QDebug, class XQAiwInterfaceDescriptor const &)
+	?trUtf8@XQServiceManager@@SA?AVQString@@PBD0@Z @ 27 NONAME ; class QString XQServiceManager::trUtf8(char const *, char const *)
+	?setProperty@XQAiwInterfaceDescriptor@@QAE_NW4PropertyKey@1@VQVariant@@@Z @ 28 NONAME ; bool XQAiwInterfaceDescriptor::setProperty(enum XQAiwInterfaceDescriptor::PropertyKey, class QVariant)
+	??1XQServiceManager@@UAE@XZ @ 29 NONAME ; XQServiceManager::~XQServiceManager(void)
+	?isEmbedded@XQServiceUtil@@YA_NXZ @ 30 NONAME ; bool XQServiceUtil::isEmbedded(void)
+	?tr@XQServiceManager@@SA?AVQString@@PBD0H@Z @ 31 NONAME ; class QString XQServiceManager::tr(char const *, char const *, int)
+	?majorVersion@XQAiwInterfaceDescriptor@@QBEHXZ @ 32 NONAME ; int XQAiwInterfaceDescriptor::majorVersion(void) const
+	?serviceName@XQAiwInterfaceDescriptor@@QBE?AVQString@@XZ @ 33 NONAME ; class QString XQAiwInterfaceDescriptor::serviceName(void) const
+	??0XQAiwInterfaceDescriptor@@QAE@ABV0@@Z @ 34 NONAME ; XQAiwInterfaceDescriptor::XQAiwInterfaceDescriptor(class XQAiwInterfaceDescriptor const &)
+	?findInterfaces@XQServiceManager@@QBE?AV?$QList@VXQAiwInterfaceDescriptor@@@@ABVQString@@0@Z @ 35 NONAME ; class QList<class XQAiwInterfaceDescriptor> XQServiceManager::findInterfaces(class QString const &, class QString const &) const
+	?customPropertyKeys@XQAiwInterfaceDescriptor@@QBE?AVQStringList@@XZ @ 36 NONAME ; class QStringList XQAiwInterfaceDescriptor::customPropertyKeys(void) const
+	?isService@XQServiceUtil@@YA_NXZ @ 37 NONAME ; bool XQServiceUtil::isService(void)
+	?startServer@XQServiceManager@@QAEHABVQString@@_NAAHAA_KPBX@Z @ 38 NONAME ; int XQServiceManager::startServer(class QString const &, bool, int &, unsigned long long &, void const *)
+	??_EXQRequestInfo@@UAE@I@Z @ 39 NONAME ; XQRequestInfo::~XQRequestInfo(unsigned int)
+	?setHandle@XQSharableFile@@QAE_NAAVRFile@@@Z @ 40 NONAME ; bool XQSharableFile::setHandle(class RFile &)
+	?clientVendorId@XQRequestInfo@@QBEIXZ @ 41 NONAME ; unsigned int XQRequestInfo::clientVendorId(void) const
+	??8XQSharableFile@@QAE_NABV0@@Z @ 42 NONAME ; bool XQSharableFile::operator==(class XQSharableFile const &)
+	?setEmbedded@XQRequestInfo@@QAEX_N@Z @ 43 NONAME ; void XQRequestInfo::setEmbedded(bool)
+	?getHandle@XQSharableFile@@QBE_NAAVRFile@@@Z @ 44 NONAME ; bool XQSharableFile::getHandle(class RFile &) const
+	?isValid@XQSharableFile@@QBE_NXZ @ 45 NONAME ; bool XQSharableFile::isValid(void) const
+	?infoKeys@XQRequestInfo@@QBE?AVQStringList@@XZ @ 46 NONAME ; class QStringList XQRequestInfo::infoKeys(void) const
+	??_EXQRequestUtil@@UAE@I@Z @ 47 NONAME ; XQRequestUtil::~XQRequestUtil(unsigned int)
+	??0XQSharableFile@@QAE@AAVRFile@@@Z @ 48 NONAME ; XQSharableFile::XQSharableFile(class RFile &)
+	?clientSecureId@XQRequestInfo@@QBEIXZ @ 49 NONAME ; unsigned int XQRequestInfo::clientSecureId(void) const
+	?setInfo@XQRequestInfo@@QAEXABVQString@@ABVQVariant@@@Z @ 50 NONAME ; void XQRequestInfo::setInfo(class QString const &, class QVariant const &)
+	??0XQRequestUtil@@QAE@XZ @ 51 NONAME ; XQRequestUtil::XQRequestUtil(void)
+	?open@XQSharableFile@@QAE_NABVQString@@@Z @ 52 NONAME ; bool XQSharableFile::open(class QString const &)
+	?getSharableFile@XQRequestUtil@@QBEPBVXQSharableFile@@H@Z @ 53 NONAME ; class XQSharableFile const * XQRequestUtil::getSharableFile(int) const
+	??0XQRequestInfo@@QAE@XZ @ 54 NONAME ; XQRequestInfo::XQRequestInfo(void)
+	??1XQRequestUtil@@UAE@XZ @ 55 NONAME ; XQRequestUtil::~XQRequestUtil(void)
+	??1XQSharableFile@@UAE@XZ @ 56 NONAME ; XQSharableFile::~XQSharableFile(void)
+	?fileName@XQSharableFile@@QBE?AVQString@@XZ @ 57 NONAME ; class QString XQSharableFile::fileName(void) const
+	??1XQRequestInfo@@UAE@XZ @ 58 NONAME ; XQRequestInfo::~XQRequestInfo(void)
+	??_EXQSharableFile@@UAE@I@Z @ 59 NONAME ; XQSharableFile::~XQSharableFile(unsigned int)
+	?setSecurityInfo@XQRequestUtil@@QAEXIII@Z @ 60 NONAME ; void XQRequestUtil::setSecurityInfo(unsigned int, unsigned int, unsigned int)
+	?isBackground@XQRequestInfo@@QBE_NXZ @ 61 NONAME ; bool XQRequestInfo::isBackground(void) const
+	?isValid@XQRequestInfo@@QBE_NXZ @ 62 NONAME ; bool XQRequestInfo::isValid(void) const
+	?setBackground@XQRequestInfo@@QAEX_N@Z @ 63 NONAME ; void XQRequestInfo::setBackground(bool)
+	?info@XQRequestInfo@@QBE?AVQVariant@@ABVQString@@@Z @ 64 NONAME ; class QVariant XQRequestInfo::info(class QString const &) const
+	?close@XQSharableFile@@QAEXXZ @ 65 NONAME ; void XQSharableFile::close(void)
+	?setSynchronous@XQRequestUtil@@QAEX_N@Z @ 66 NONAME ; void XQRequestUtil::setSynchronous(bool)
+	?clientCapabilities@XQRequestInfo@@QBE?AV?$QSet@H@@XZ @ 67 NONAME ; class QSet<int> XQRequestInfo::clientCapabilities(void) const
+	?isSynchronous@XQRequestInfo@@QBE_NXZ @ 68 NONAME ; bool XQRequestInfo::isSynchronous(void) const
+	?isEmbedded@XQRequestInfo@@QBE_NXZ @ 69 NONAME ; bool XQRequestInfo::isEmbedded(void) const
+	??0XQSharableFile@@QAE@XZ @ 70 NONAME ; XQSharableFile::XQSharableFile(void)
+	?latestError@XQServiceManager@@QBEHXZ @ 71 NONAME ; int XQServiceManager::latestError(void) const
+	?mapError@XQRequestUtil@@SAHH@Z @ 72 NONAME ; int XQRequestUtil::mapError(int)
+	?interfaceName@XQServiceUtil@@YA?AVQString@@XZ @ 73 NONAME ; class QString XQServiceUtil::interfaceName(void)
+	?operationName@XQServiceUtil@@YA?AVQString@@XZ @ 74 NONAME ; class QString XQServiceUtil::operationName(void)
+	?id@XQRequestInfo@@QBEHXZ @ 75 NONAME ; int XQRequestInfo::id(void) const
+	?isRunning@XQServiceManager@@QBE_NABVXQAiwInterfaceDescriptor@@@Z @ 76 NONAME ; bool XQServiceManager::isRunning(class XQAiwInterfaceDescriptor const &) const
+	?setForeground@XQRequestInfo@@QAEX_N@Z @ 77 NONAME ; void XQRequestInfo::setForeground(bool)
+	?isForeground@XQRequestInfo@@QBE_NXZ @ 78 NONAME ; bool XQRequestInfo::isForeground(void) const
+	?channelName@XQRequestUtil@@SA?AVQString@@ABV2@@Z @ 79 NONAME ; class QString XQRequestUtil::channelName(class QString const &)
+	?findFirstInterface@XQServiceManager@@QBE?AV?$QList@VXQAiwInterfaceDescriptor@@@@ABVQString@@@Z @ 80 NONAME ; class QList<class XQAiwInterfaceDescriptor> XQServiceManager::findFirstInterface(class QString const &) const
+	?findFirstInterface@XQServiceManager@@QBE?AV?$QList@VXQAiwInterfaceDescriptor@@@@ABVQString@@0@Z @ 81 NONAME ; class QList<class XQAiwInterfaceDescriptor> XQServiceManager::findFirstInterface(class QString const &, class QString const &) const
+	?operationName@XQServiceUtil@@YA?AVQString@@HPAPAD@Z @ 82 NONAME ; class QString XQServiceUtil::operationName(int, char * *)
+	?serviceName@XQServiceUtil@@YA?AVQString@@HPAPAD@Z @ 83 NONAME ; class QString XQServiceUtil::serviceName(int, char * *)
+	?serviceName@XQServiceUtil@@YA?AVQString@@XZ @ 84 NONAME ; class QString XQServiceUtil::serviceName(void)
+	?isEmbedded@XQServiceUtil@@YA_NHPAPAD@Z @ 85 NONAME ; bool XQServiceUtil::isEmbedded(int, char * *)
+	?isService@XQServiceUtil@@YA_NHPAPAD@Z @ 86 NONAME ; bool XQServiceUtil::isService(int, char * *)
+	?interfaceName@XQServiceUtil@@YA?AVQString@@HPAPAD@Z @ 87 NONAME ; class QString XQServiceUtil::interfaceName(int, char * *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/eabi/xqserviceu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,199 @@
+EXPORTS
+	_ZN12XQAiwRequest11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+	_ZN12XQAiwRequest11qt_metacastEPKc @ 2 NONAME
+	_ZN12XQAiwRequest11sendExecuteEv @ 3 NONAME
+	_ZN12XQAiwRequest12createActionEv @ 4 NONAME
+	_ZN12XQAiwRequest12requestErrorEiRK7QString @ 5 NONAME
+	_ZN12XQAiwRequest12setArgumentsERK5QListI8QVariantE @ 6 NONAME
+	_ZN12XQAiwRequest14sendFromActionEb @ 7 NONAME
+	_ZN12XQAiwRequest16staticMetaObjectE @ 8 NONAME DATA 16
+	_ZN12XQAiwRequest19getStaticMetaObjectEv @ 9 NONAME
+	_ZN12XQAiwRequest19handleAsyncResponseERK8QVariant @ 10 NONAME
+	_ZN12XQAiwRequest4sendEv @ 11 NONAME
+	_ZN12XQAiwRequest9requestOkERK8QVariant @ 12 NONAME
+	_ZN12XQAiwRequest9triggeredEv @ 13 NONAME
+	_ZN12XQAiwRequestC1ERK24XQAiwInterfaceDescriptorRK7QStringb @ 14 NONAME
+	_ZN12XQAiwRequestC2ERK24XQAiwInterfaceDescriptorRK7QStringb @ 15 NONAME
+	_ZN12XQAiwRequestD0Ev @ 16 NONAME
+	_ZN12XQAiwRequestD1Ev @ 17 NONAME
+	_ZN12XQAiwRequestD2Ev @ 18 NONAME
+	_ZN16XQServiceAdaptor10publishAllENS_11PublishTypeE @ 19 NONAME
+	_ZN16XQServiceAdaptor10publishAllEP7QObjectiNS_11PublishTypeE @ 20 NONAME
+	_ZN16XQServiceAdaptor11isConnectedERK10QByteArray @ 21 NONAME
+	_ZN16XQServiceAdaptor11latestErrorEv @ 22 NONAME
+	_ZN16XQServiceAdaptor11qt_metacallEN11QMetaObject4CallEiPPv @ 23 NONAME
+	_ZN16XQServiceAdaptor11qt_metacastEPKc @ 24 NONAME
+	_ZN16XQServiceAdaptor11sendMessageERK7QStringRK5QListI8QVariantERS4_ @ 25 NONAME
+	_ZN16XQServiceAdaptor15completeRequestEiRK8QVariant @ 26 NONAME
+	_ZN16XQServiceAdaptor15memberToMessageERK10QByteArray @ 27 NONAME
+	_ZN16XQServiceAdaptor16staticMetaObjectE @ 28 NONAME DATA 16
+	_ZN16XQServiceAdaptor17cancelPendingSendERK7QString @ 29 NONAME
+	_ZN16XQServiceAdaptor17receiverDestroyedEv @ 30 NONAME
+	_ZN16XQServiceAdaptor19getStaticMetaObjectEv @ 31 NONAME
+	_ZN16XQServiceAdaptor20connectLocalToRemoteEP7QObjectRK10QByteArrayS4_ @ 32 NONAME
+	_ZN16XQServiceAdaptor20connectRemoteToLocalERK10QByteArrayP7QObjectS2_ @ 33 NONAME
+	_ZN16XQServiceAdaptor20returnValueDeliveredEv @ 34 NONAME
+	_ZN16XQServiceAdaptor22setCurrentRequestAsyncEv @ 35 NONAME
+	_ZN16XQServiceAdaptor4sendERK10QByteArrayRK5QListI8QVariantERS4_ @ 36 NONAME
+	_ZN16XQServiceAdaptor4sendERK10QByteArrayRK8QVariantRS3_ @ 37 NONAME
+	_ZN16XQServiceAdaptor4sendERK10QByteArrayRK8QVariantS5_RS3_ @ 38 NONAME
+	_ZN16XQServiceAdaptor4sendERK10QByteArrayRK8QVariantS5_S5_RS3_ @ 39 NONAME
+	_ZN16XQServiceAdaptor4sendERK7QStringS2_RK5QListI8QVariantERS4_bP30XQServiceRequestCompletedAsync @ 40 NONAME
+	_ZN16XQServiceAdaptor7connectEP7QObjectRK10QByteArrayS1_S4_ @ 41 NONAME
+	_ZN16XQServiceAdaptor7publishERK10QByteArray @ 42 NONAME
+	_ZN16XQServiceAdaptor8receivedERK7QStringRK10QByteArray @ 43 NONAME ABSENT
+	_ZN16XQServiceAdaptorC1ERK7QStringP7QObject @ 44 NONAME
+	_ZN16XQServiceAdaptorC2ERK7QStringP7QObject @ 45 NONAME
+	_ZN16XQServiceAdaptorD0Ev @ 46 NONAME
+	_ZN16XQServiceAdaptorD1Ev @ 47 NONAME
+	_ZN16XQServiceAdaptorD2Ev @ 48 NONAME
+	_ZN16XQServiceChannel11latestErrorEv @ 49 NONAME
+	_ZN16XQServiceChannel11qt_metacallEN11QMetaObject4CallEiPPv @ 50 NONAME
+	_ZN16XQServiceChannel11qt_metacastEPKc @ 51 NONAME
+	_ZN16XQServiceChannel11sendCommandERK7QStringNS_16XQServiceCommandE @ 52 NONAME
+	_ZN16XQServiceChannel11sendLocallyERK7QStringS2_RK10QByteArray @ 53 NONAME ABSENT
+	_ZN16XQServiceChannel14commandReceiveENS_16XQServiceCommandE @ 54 NONAME
+	_ZN16XQServiceChannel14connectChannelEv @ 55 NONAME
+	_ZN16XQServiceChannel15commandReceivedENS_16XQServiceCommandE @ 56 NONAME
+	_ZN16XQServiceChannel16staticMetaObjectE @ 57 NONAME DATA 16
+	_ZN16XQServiceChannel17cancelPendingSendERK7QString @ 58 NONAME
+	_ZN16XQServiceChannel19getStaticMetaObjectEv @ 59 NONAME
+	_ZN16XQServiceChannel4sendERK7QStringS2_RK10QByteArrayR8QVariantbP30XQServiceRequestCompletedAsync @ 60 NONAME
+	_ZN16XQServiceChannel7receiveERK7QStringRK10QByteArray @ 61 NONAME ABSENT
+	_ZN16XQServiceChannel8receivedERK7QStringRK10QByteArray @ 62 NONAME ABSENT
+	_ZN16XQServiceChannelC1ERK7QStringbP7QObject @ 63 NONAME
+	_ZN16XQServiceChannelC2ERK7QStringbP7QObject @ 64 NONAME
+	_ZN16XQServiceChannelD0Ev @ 65 NONAME
+	_ZN16XQServiceChannelD1Ev @ 66 NONAME
+	_ZN16XQServiceChannelD2Ev @ 67 NONAME
+	_ZN16XQServiceRequest10setMessageERK7QString @ 68 NONAME
+	_ZN16XQServiceRequest10setServiceERK7QString @ 69 NONAME
+	_ZN16XQServiceRequest11latestErrorEv @ 70 NONAME
+	_ZN16XQServiceRequest11qt_metacallEN11QMetaObject4CallEiPPv @ 71 NONAME
+	_ZN16XQServiceRequest11qt_metacastEPKc @ 72 NONAME
+	_ZN16XQServiceRequest12requestErrorEi @ 73 NONAME
+	_ZN16XQServiceRequest12setArgumentsERK5QListI8QVariantE @ 74 NONAME
+	_ZN16XQServiceRequest14setSynchronousERKb @ 75 NONAME
+	_ZN16XQServiceRequest16requestCompletedERK8QVariant @ 76 NONAME
+	_ZN16XQServiceRequest16staticMetaObjectE @ 77 NONAME DATA 16
+	_ZN16XQServiceRequest18serializeArgumentsERKS_ @ 78 NONAME
+	_ZN16XQServiceRequest19getStaticMetaObjectEv @ 79 NONAME
+	_ZN16XQServiceRequest20deserializeArgumentsERS_RK10QByteArray @ 80 NONAME
+	_ZN16XQServiceRequest4sendER8QVariant @ 81 NONAME
+	_ZN16XQServiceRequest4sendEv @ 82 NONAME
+	_ZN16XQServiceRequest6addArgERK8QVariant @ 83 NONAME
+	_ZN16XQServiceRequestC1ERK7QStringS2_RKb @ 84 NONAME
+	_ZN16XQServiceRequestC1ERKS_ @ 85 NONAME
+	_ZN16XQServiceRequestC1Ev @ 86 NONAME
+	_ZN16XQServiceRequestC2ERK7QStringS2_RKb @ 87 NONAME
+	_ZN16XQServiceRequestC2ERKS_ @ 88 NONAME
+	_ZN16XQServiceRequestC2Ev @ 89 NONAME
+	_ZN16XQServiceRequestD0Ev @ 90 NONAME
+	_ZN16XQServiceRequestD1Ev @ 91 NONAME
+	_ZN16XQServiceRequestD2Ev @ 92 NONAME
+	_ZN16XQServiceRequestaSERKS_ @ 93 NONAME
+	_ZN17XQServiceProvider10publishAllEv @ 94 NONAME
+	_ZN17XQServiceProvider11qt_metacallEN11QMetaObject4CallEiPPv @ 95 NONAME
+	_ZN17XQServiceProvider11qt_metacastEPKc @ 96 NONAME
+	_ZN17XQServiceProvider15completeRequestEiRK8QVariant @ 97 NONAME
+	_ZN17XQServiceProvider16staticMetaObjectE @ 98 NONAME DATA 16
+	_ZN17XQServiceProvider19getStaticMetaObjectEv @ 99 NONAME
+	_ZN17XQServiceProvider20returnValueDeliveredEv @ 100 NONAME
+	_ZN17XQServiceProvider22setCurrentRequestAsyncEv @ 101 NONAME
+	_ZN17XQServiceProvider9SetPluginEP7QObject @ 102 NONAME
+	_ZN17XQServiceProviderC1ERK7QStringP7QObject @ 103 NONAME
+	_ZN17XQServiceProviderC2ERK7QStringP7QObject @ 104 NONAME
+	_ZN17XQServiceProviderD0Ev @ 105 NONAME
+	_ZN17XQServiceProviderD1Ev @ 106 NONAME
+	_ZN17XQServiceProviderD2Ev @ 107 NONAME
+	_ZN20XQApplicationManager11qt_metacallEN11QMetaObject4CallEiPPv @ 108 NONAME
+	_ZN20XQApplicationManager11qt_metacastEPKc @ 109 NONAME
+	_ZN20XQApplicationManager16staticMetaObjectE @ 110 NONAME DATA 16
+	_ZN20XQApplicationManager19getStaticMetaObjectEv @ 111 NONAME
+	_ZN20XQApplicationManager4listERK7QStringS2_ @ 112 NONAME
+	_ZN20XQApplicationManager6createERK24XQAiwInterfaceDescriptorRK7QStringb @ 113 NONAME
+	_ZN20XQApplicationManager6createERK7QStringS2_b @ 114 NONAME
+	_ZN20XQApplicationManagerC1Ev @ 115 NONAME
+	_ZN20XQApplicationManagerC2Ev @ 116 NONAME
+	_ZN20XQApplicationManagerD0Ev @ 117 NONAME
+	_ZN20XQApplicationManagerD1Ev @ 118 NONAME
+	_ZN20XQApplicationManagerD2Ev @ 119 NONAME
+	_ZNK12XQAiwRequest10descriptorEv @ 120 NONAME
+	_ZNK12XQAiwRequest10metaObjectEv @ 121 NONAME
+	_ZNK12XQAiwRequest16lastErrorMessageEv @ 122 NONAME
+	_ZNK12XQAiwRequest7resultsEv @ 123 NONAME
+	_ZNK12XQAiwRequest9lastErrorEv @ 124 NONAME
+	_ZNK16XQServiceAdaptor10metaObjectEv @ 125 NONAME
+	_ZNK16XQServiceAdaptor7channelEv @ 126 NONAME
+	_ZNK16XQServiceChannel10metaObjectEv @ 127 NONAME
+	_ZNK16XQServiceChannel7channelEv @ 128 NONAME
+	_ZNK16XQServiceRequest10metaObjectEv @ 129 NONAME
+	_ZNK16XQServiceRequest13isSynchronousEv @ 130 NONAME
+	_ZNK16XQServiceRequest6isNullEv @ 131 NONAME
+	_ZNK16XQServiceRequest7messageEv @ 132 NONAME
+	_ZNK16XQServiceRequest7serviceEv @ 133 NONAME
+	_ZNK16XQServiceRequest9argumentsEv @ 134 NONAME
+	_ZNK17XQServiceProvider10metaObjectEv @ 135 NONAME
+	_ZNK20XQApplicationManager10metaObjectEv @ 136 NONAME
+	_ZTI12XQAiwRequest @ 137 NONAME
+	_ZTI16XQServiceAdaptor @ 138 NONAME
+	_ZTI16XQServiceChannel @ 139 NONAME
+	_ZTI16XQServiceRequest @ 140 NONAME
+	_ZTI17XQServiceProvider @ 141 NONAME
+	_ZTI20XQApplicationManager @ 142 NONAME
+	_ZTV12XQAiwRequest @ 143 NONAME
+	_ZTV16XQServiceAdaptor @ 144 NONAME
+	_ZTV16XQServiceChannel @ 145 NONAME
+	_ZTV16XQServiceRequest @ 146 NONAME
+	_ZTV17XQServiceProvider @ 147 NONAME
+	_ZTV20XQApplicationManager @ 148 NONAME
+	_ZN12XQAiwRequest16handleAsyncErrorEi @ 149 NONAME
+	_ZN20XQApplicationManager6createERK7QStringS2_S2_b @ 150 NONAME
+	_ZN12XQAiwRequest11setEmbeddedEb @ 151 NONAME
+	_ZN12XQAiwRequest12setOperationERK7QString @ 152 NONAME
+	_ZN12XQAiwRequest4sendER8QVariant @ 153 NONAME
+	_ZN12XQAiwRequestC1ERK4QUrlRK24XQAiwInterfaceDescriptorRK7QString @ 154 NONAME
+	_ZN12XQAiwRequestC1ERK5QFileRK24XQAiwInterfaceDescriptorRK7QString @ 155 NONAME
+	_ZN12XQAiwRequestC2ERK4QUrlRK24XQAiwInterfaceDescriptorRK7QString @ 156 NONAME
+	_ZN12XQAiwRequestC2ERK5QFileRK24XQAiwInterfaceDescriptorRK7QString @ 157 NONAME
+	_ZN16XQServiceAdaptor18clientDisconnectedEv @ 158 NONAME
+	_ZN16XQServiceAdaptor4sendERK7QStringS2_RK5QListI8QVariantERS4_bP30XQServiceRequestCompletedAsyncPKv @ 159 NONAME
+	_ZN16XQServiceChannel4sendERK7QStringS2_RK10QByteArrayR8QVariantbP30XQServiceRequestCompletedAsyncPKv @ 160 NONAME
+	_ZN16XQServiceRequestC1ERK24XQAiwInterfaceDescriptorRK7QStringRKb @ 161 NONAME
+	_ZN16XQServiceRequestC2ERK24XQAiwInterfaceDescriptorRK7QStringRKb @ 162 NONAME
+	_ZN17XQServiceProvider18clientDisconnectedEv @ 163 NONAME
+	_ZN20XQApplicationManager4listERK4QUrl @ 164 NONAME
+	_ZN20XQApplicationManager4listERK5QFile @ 165 NONAME
+	_ZN20XQApplicationManager4listERK7QStringS2_S2_ @ 166 NONAME
+	_ZN20XQApplicationManager6createERK4QUrlRK24XQAiwInterfaceDescriptorb @ 167 NONAME
+	_ZN20XQApplicationManager6createERK4QUrlb @ 168 NONAME
+	_ZN20XQApplicationManager6createERK5QFileRK24XQAiwInterfaceDescriptorb @ 169 NONAME
+	_ZN20XQApplicationManager6createERK5QFileb @ 170 NONAME
+	_ZNK12XQAiwRequest10isEmbeddedEv @ 171 NONAME
+	_ZNK12XQAiwRequest9operationEv @ 172 NONAME
+	_ZN12XQAiwRequest13setBackgroundEb @ 173 NONAME
+	_ZN12XQAiwRequest14setSynchronousEb @ 174 NONAME
+	_ZN12XQAiwRequest7setInfoERK13XQRequestInfo @ 175 NONAME
+	_ZN16XQServiceAdaptor8receivedERK7QStringRK10QByteArrayRK14XQSharableFile @ 176 NONAME
+	_ZN16XQServiceChannel11sendLocallyERK7QStringS2_RK10QByteArrayRK14XQSharableFile @ 177 NONAME
+	_ZN16XQServiceChannel7receiveERK7QStringRK10QByteArrayRK14XQSharableFile @ 178 NONAME
+	_ZN16XQServiceChannel8receivedERK7QStringRK10QByteArrayRK14XQSharableFile @ 179 NONAME
+	_ZN16XQServiceRequest22handleSharableFileArgsEv @ 180 NONAME
+	_ZN16XQServiceRequest7setInfoERK13XQRequestInfo @ 181 NONAME
+	_ZNK12XQAiwRequest12isBackgroundEv @ 182 NONAME
+	_ZNK12XQAiwRequest13isSynchronousEv @ 183 NONAME
+	_ZNK12XQAiwRequest4infoEv @ 184 NONAME
+	_ZNK16XQServiceAdaptor11requestInfoEv @ 185 NONAME
+	_ZNK16XQServiceRequest4infoEv @ 186 NONAME
+	_ZNK17XQServiceProvider11requestInfoEv @ 187 NONAME
+	_ZNK20XQApplicationManager9lastErrorEv @ 188 NONAME
+	_ZN12XQAiwRequestC1ERK14XQSharableFileRK24XQAiwInterfaceDescriptorRK7QString @ 189 NONAME
+	_ZN12XQAiwRequestC2ERK14XQSharableFileRK24XQAiwInterfaceDescriptorRK7QString @ 190 NONAME
+	_ZN20XQApplicationManager4listERK14XQSharableFile @ 191 NONAME
+	_ZN20XQApplicationManager6createERK14XQSharableFileRK24XQAiwInterfaceDescriptorb @ 192 NONAME
+	_ZN20XQApplicationManager6createERK14XQSharableFileb @ 193 NONAME
+	_ZNK20XQApplicationManager9isRunningERK24XQAiwInterfaceDescriptor @ 194 NONAME
+	_ZN20XQApplicationManager16getDrmAttributesERK14XQSharableFileRK5QListIiERS3_I8QVariantE @ 195 NONAME
+	_ZN20XQApplicationManager16getDrmAttributesERK5QFileRK5QListIiERS3_I8QVariantE @ 196 NONAME
+	_ZN20XQApplicationManager6statusERK24XQAiwInterfaceDescriptor @ 197 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/eabi/xqserviceutilu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,104 @@
+EXPORTS
+	_ZN13XQServiceUtil10isEmbeddedEv @ 1 NONAME
+	_ZN13XQServiceUtil12toBackgroundEb @ 2 NONAME
+	_ZN16XQServiceManager11qt_metacallEN11QMetaObject4CallEiPPv @ 3 NONAME
+	_ZN16XQServiceManager11qt_metacastEPKc @ 4 NONAME
+	_ZN16XQServiceManager11startServerERK7QStringbRiRy @ 5 NONAME
+	_ZN16XQServiceManager16staticMetaObjectE @ 6 NONAME DATA 16
+	_ZN16XQServiceManager19getStaticMetaObjectEv @ 7 NONAME
+	_ZN16XQServiceManagerC1Ev @ 8 NONAME
+	_ZN16XQServiceManagerC2Ev @ 9 NONAME
+	_ZN16XQServiceManagerD0Ev @ 10 NONAME
+	_ZN16XQServiceManagerD1Ev @ 11 NONAME
+	_ZN16XQServiceManagerD2Ev @ 12 NONAME
+	_ZN24XQAiwInterfaceDescriptor11setPropertyENS_11PropertyKeyE8QVariant @ 13 NONAME
+	_ZN24XQAiwInterfaceDescriptorC1ERKS_ @ 14 NONAME
+	_ZN24XQAiwInterfaceDescriptorC1Ev @ 15 NONAME
+	_ZN24XQAiwInterfaceDescriptorC2ERKS_ @ 16 NONAME
+	_ZN24XQAiwInterfaceDescriptorC2Ev @ 17 NONAME
+	_ZN24XQAiwInterfaceDescriptorD1Ev @ 18 NONAME
+	_ZN24XQAiwInterfaceDescriptorD2Ev @ 19 NONAME
+	_ZN24XQAiwInterfaceDescriptoraSERKS_ @ 20 NONAME
+	_ZNK16XQServiceManager10metaObjectEv @ 21 NONAME
+	_ZNK16XQServiceManager14findInterfacesERK7QString @ 22 NONAME
+	_ZNK24XQAiwInterfaceDescriptor11serviceNameEv @ 23 NONAME
+	_ZNK24XQAiwInterfaceDescriptor12majorVersionEv @ 24 NONAME
+	_ZNK24XQAiwInterfaceDescriptor12minorVersionEv @ 25 NONAME
+	_ZNK24XQAiwInterfaceDescriptor13inSystemScopeEv @ 26 NONAME
+	_ZNK24XQAiwInterfaceDescriptor13interfaceNameEv @ 27 NONAME
+	_ZNK24XQAiwInterfaceDescriptor14customPropertyERK7QString @ 28 NONAME
+	_ZNK24XQAiwInterfaceDescriptor7isValidEv @ 29 NONAME
+	_ZNK24XQAiwInterfaceDescriptor8propertyENS_11PropertyKeyE @ 30 NONAME
+	_ZNK24XQAiwInterfaceDescriptoreqERKS_ @ 31 NONAME
+	_ZTI16XQServiceManager @ 32 NONAME
+	_ZTV16XQServiceManager @ 33 NONAME
+	_Zls6QDebugRK24XQAiwInterfaceDescriptor @ 34 NONAME
+	_ZlsR11QDataStreamRK24XQAiwInterfaceDescriptor @ 35 NONAME
+	_ZrsR11QDataStreamR24XQAiwInterfaceDescriptor @ 36 NONAME
+	_ZNK16XQServiceManager14findInterfacesERK7QStringS2_ @ 37 NONAME
+	_ZN13XQServiceUtil9isServiceEv @ 38 NONAME
+	_ZNK24XQAiwInterfaceDescriptor18customPropertyKeysEv @ 39 NONAME
+	_ZN16XQServiceManager11startServerERK7QStringbRiRyPKv @ 40 NONAME
+	_ZN13XQRequestInfo11setEmbeddedEb @ 41 NONAME
+	_ZN13XQRequestInfo13setBackgroundEb @ 42 NONAME
+	_ZN13XQRequestInfo7setInfoERK7QStringRK8QVariant @ 43 NONAME
+	_ZN13XQRequestInfoC1Ev @ 44 NONAME
+	_ZN13XQRequestInfoC2Ev @ 45 NONAME
+	_ZN13XQRequestInfoD0Ev @ 46 NONAME
+	_ZN13XQRequestInfoD1Ev @ 47 NONAME
+	_ZN13XQRequestInfoD2Ev @ 48 NONAME
+	_ZN13XQRequestUtil14setSynchronousEb @ 49 NONAME
+	_ZN13XQRequestUtil15setSecurityInfoEjjj @ 50 NONAME
+	_ZN13XQRequestUtilC1Ev @ 51 NONAME
+	_ZN13XQRequestUtilC2Ev @ 52 NONAME
+	_ZN13XQRequestUtilD0Ev @ 53 NONAME
+	_ZN13XQRequestUtilD1Ev @ 54 NONAME
+	_ZN13XQRequestUtilD2Ev @ 55 NONAME
+	_ZN14XQSharableFile4openERK7QString @ 56 NONAME
+	_ZN14XQSharableFile5closeEv @ 57 NONAME
+	_ZN14XQSharableFile9setHandleER5RFile @ 58 NONAME
+	_ZN14XQSharableFileC1ER5RFile @ 59 NONAME
+	_ZN14XQSharableFileC1Ev @ 60 NONAME
+	_ZN14XQSharableFileC2ER5RFile @ 61 NONAME
+	_ZN14XQSharableFileC2Ev @ 62 NONAME
+	_ZN14XQSharableFileD0Ev @ 63 NONAME
+	_ZN14XQSharableFileD1Ev @ 64 NONAME
+	_ZN14XQSharableFileD2Ev @ 65 NONAME
+	_ZN14XQSharableFileeqERKS_ @ 66 NONAME
+	_ZNK13XQRequestInfo10isEmbeddedEv @ 67 NONAME
+	_ZNK13XQRequestInfo12isBackgroundEv @ 68 NONAME
+	_ZNK13XQRequestInfo13isSynchronousEv @ 69 NONAME
+	_ZNK13XQRequestInfo14clientSecureIdEv @ 70 NONAME
+	_ZNK13XQRequestInfo14clientVendorIdEv @ 71 NONAME
+	_ZNK13XQRequestInfo18clientCapabilitiesEv @ 72 NONAME
+	_ZNK13XQRequestInfo4infoERK7QString @ 73 NONAME
+	_ZNK13XQRequestInfo7isValidEv @ 74 NONAME
+	_ZNK13XQRequestInfo8infoKeysEv @ 75 NONAME
+	_ZNK13XQRequestUtil15getSharableFileEi @ 76 NONAME
+	_ZNK14XQSharableFile7isValidEv @ 77 NONAME
+	_ZNK14XQSharableFile8fileNameEv @ 78 NONAME
+	_ZNK14XQSharableFile9getHandleER5RFile @ 79 NONAME
+	_ZTI13XQRequestInfo @ 80 NONAME
+	_ZTI13XQRequestUtil @ 81 NONAME
+	_ZTI14XQSharableFile @ 82 NONAME
+	_ZTV13XQRequestInfo @ 83 NONAME
+	_ZTV13XQRequestUtil @ 84 NONAME
+	_ZTV14XQSharableFile @ 85 NONAME
+	_ZNK16XQServiceManager11latestErrorEv @ 86 NONAME
+	_ZN13XQRequestUtil8mapErrorEi @ 87 NONAME
+	_ZN13XQServiceUtil13interfaceNameEv @ 88 NONAME
+	_ZN13XQServiceUtil13operationNameEv @ 89 NONAME
+	_ZNK13XQRequestInfo2idEv @ 90 NONAME
+	_ZNK16XQServiceManager9isRunningERK24XQAiwInterfaceDescriptor @ 91 NONAME
+	_ZN13XQRequestInfo13setForegroundEb @ 92 NONAME
+	_ZNK13XQRequestInfo12isForegroundEv @ 93 NONAME
+	_ZN13XQRequestUtil11channelNameERK7QString @ 94 NONAME
+	_ZNK16XQServiceManager18findFirstInterfaceERK7QString @ 95 NONAME
+	_ZNK16XQServiceManager18findFirstInterfaceERK7QStringS2_ @ 96 NONAME
+	_ZN13XQServiceUtil10isEmbeddedEiPPc @ 97 NONAME
+	_ZN13XQServiceUtil11serviceNameEiPPc @ 98 NONAME
+	_ZN13XQServiceUtil11serviceNameEv @ 99 NONAME
+	_ZN13XQServiceUtil13interfaceNameEiPPc @ 100 NONAME
+	_ZN13XQServiceUtil13operationNameEiPPc @ 101 NONAME
+	_ZN13XQServiceUtil9isServiceEiPPc @ 102 NONAME
+
Binary file qthighway/examples/appmgrclient/DrmTestFiles.zip has changed
Binary file qthighway/examples/appmgrclient/TestFiles.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/appmgrclient/appmgrclient.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE=app
+TARGET=appmgrclient
+
+symbian: TARGET.UID3 = 0xE0022E74
+
+XQSERVICE_ROOT=../..
+include(../../xqservicebase.pri)
+include(src/appmgrclient.pri)
+
+symbian: TARGET.CAPABILITY = CAP_APPLICATION
+LIBS+=-lxqservice -lxqserviceutil
+
+libFiles.sources = xqservice.dll
+libFiles.path = "!:\sys\bin"
+DEPLOYMENT += libFiles
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/appmgrclient/src/appmgrclient.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1266 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QtGlobal>
+#include <QApplication>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QStackedWidget>
+#include <QImageReader>
+#include <QDebug>
+#include <QTimer>
+#include <QPushButton>
+#include <QList>
+#include <QLineEdit>
+#include <QString>
+#include <QCheckBox>
+#include <QAction>
+#include <QListView>
+#include <QUrl>
+#include <QFileInfo>
+#include <math.h>
+#include <QCompleter>
+#include <xqserviceglobal.h>
+#include <QDir>
+#include <QTranslator>
+#include <cntservicescontact.h>
+
+#include <XQSharableFile.h>
+
+// Include declarations to see if any compilation issues
+#include <xqaiwdecl.h>
+#include <xqaiwdeclplat.h>
+
+#include "appmgrservices.h"
+#include "appmgrclient.h"
+
+
+//
+// TODO: Better UI for test cases which allows
+// more test cases.
+//
+AppMgrClient::AppMgrClient(QWidget *parent, Qt::WFlags f)
+    : QWidget(parent, f),
+      actionButton(0),
+      req1(0),
+      req2(0),
+      req3(0),
+      req4(0),
+      req5(0),
+      req6(0),
+      req7(0),
+      req8(0),
+      req9(0),
+      req10(0),
+      anyReq(0),
+      mImplIndex(0)      
+{
+    /* Adjust the palette */
+#if defined(Q_WS_S60)
+    QPalette p = qApp->palette();
+    QColor color(192,192,192);
+    QColor bg(0,128,192);
+    p.setColor(QPalette::Highlight, color.lighter(200));
+    p.setColor(QPalette::Text, Qt::black);
+    p.setColor(QPalette::Base, bg);
+    p.setColor(QPalette::WindowText, Qt::black);
+    p.setColor(QPalette::Window, bg);
+    p.setColor(QPalette::ButtonText, Qt::black);
+    p.setColor(QPalette::Button, color.lighter(150));
+    p.setColor(QPalette::Link, QColor(240,40,40));
+    qApp->setPalette(p);
+#endif
+
+    QPushButton *quitButton = new QPushButton(tr("quit"));
+    connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+
+    
+    QPushButton *testButton1 = 0;
+    QPushButton *anyTestButton = 0;
+
+    testButton1 = new QPushButton("Tests");
+    mMenu = new QMenu(this);
+    testButton1->setMenu(mMenu);
+    anyTestButton = new QPushButton(tr("Any test"));
+    connect(anyTestButton, SIGNAL(clicked()), this, SLOT(anyTest()));
+
+    QAction *test1 = new QAction("1:Interface", this);
+    connect(test1, SIGNAL(triggered()), this, SLOT(test1()));
+    QAction *test2 = new QAction("2:Descriptor", this);
+    connect(test2, SIGNAL(triggered()), this, SLOT(test2()));
+    QAction *test3 = new QAction("3:Big data", this);
+    connect(test3, SIGNAL(triggered()), this, SLOT(test3()));
+    QAction *test4 = new QAction("4:QAction", this);
+    connect(test4, SIGNAL(triggered()), this, SLOT(test4()));
+    QAction *test5 = new QAction("5:appto:", this);
+    connect(test5, SIGNAL(triggered()), this, SLOT(test5()));
+    QAction *test6 = new QAction("6:testto:", this);
+   connect(test6, SIGNAL(triggered()), this, SLOT(test6()));
+    QAction *test7 = new QAction("7:MIME", this);
+    connect(test7, SIGNAL(triggered()), this, SLOT(test7()));
+    QAction *test8 = new QAction("8:URI", this);
+    connect(test8, SIGNAL(triggered()), this, SLOT(test8()));
+    QAction *test9 = new QAction("9:XQSharableFile", this);
+    connect(test9, SIGNAL(triggered()), this, SLOT(test9()));
+    QAction *test10 = new QAction("10:Select contact", this);
+    connect(test10,  SIGNAL(triggered()), this, SLOT(test10()));
+    QAction *test11 = new QAction("11:getDrmAttr", this);
+    connect(test11, SIGNAL(triggered()), this, SLOT(test11()));
+
+    mMenu = new QMenu(this);
+    mMenu->addAction(test1);
+    mMenu->addAction(test2);
+    mMenu->addAction(test3);
+    mMenu->addAction(test4);
+    mMenu->addAction(test5);
+    mMenu->addAction(test6);
+    mMenu->addAction(test7);
+    mMenu->addAction(test8);
+    mMenu->addAction(test9);
+    mMenu->addAction(test10);
+    mMenu->addAction(test11);
+
+    testButton1->setMenu(mMenu);
+    
+    mCheckEmbedded = new QCheckBox("Embedded");
+    mSynchronous = new QCheckBox("Synchronous");
+    mBackground = new QCheckBox("Background");
+    mForeground = new QCheckBox("Foreground");
+    mCheckDeleteRequest = new QCheckBox("Delete request");
+    mGenericSend = new QCheckBox("Use generic send()");
+    mCheckEmbedded->setCheckState(Qt::Checked);
+    mSynchronous->setCheckState(Qt::Checked);
+    mGenericSend->setCheckState(Qt::Checked);  // Apply one send() for both embedded/non-embedded
+
+
+    QLabel *inputData = new QLabel(tr("Data size"));
+    mDataSpinBox = new QSpinBox;
+    mDataSpinBox->setMinimum(0);
+    mDataSpinBox->setMaximum(1024*1024);
+    mDataSpinBox->setValue(1024);
+    mDataSpinBox->setSingleStep(1024*10);
+       
+    mReqArg = new QLineEdit("0");
+    mTextRetValue = new QLineEdit("no ret value set");
+
+    QFileInfo appinfo (qApp->applicationFilePath());
+    mAppName = "XQTESTER " + appinfo.baseName();
+
+    QLabel *label = new QLabel(mAppName);
+
+    vl = new QVBoxLayout;
+    vl->setMargin(0);
+    vl->setSpacing(0);
+
+    vl->addWidget(label);
+    vl->addWidget(mCheckEmbedded);
+    vl->addWidget(mSynchronous);
+    vl->addWidget(mBackground);
+    vl->addWidget(mForeground);
+    vl->addWidget(mCheckDeleteRequest);
+    vl->addWidget(mGenericSend);
+    vl->addWidget(inputData);
+    vl->addWidget(mDataSpinBox);
+    vl->addWidget(mReqArg);
+    vl->addWidget(mTextRetValue);
+    vl->addWidget(new QLabel(" "));
+    vl->addWidget(testButton1);
+    vl->addWidget(anyTestButton);
+    vl->addWidget(quitButton);
+
+    setLayout(vl);
+
+#if defined(Q_WS_X11) || defined(Q_WS_WIN)
+    setFixedSize(QSize(360,640)); // nHD
+#elif defined(Q_WS_S60)
+    // showMaximized();
+    showFullScreen();
+#endif
+
+}
+
+AppMgrClient::~AppMgrClient()
+{
+    delete req1;
+    delete req2;
+    delete req3;
+    delete req4;
+    delete req5;
+    delete req6;
+    delete req7;
+    delete req8;
+    delete req9;
+    delete req10;
+    delete mMenu;
+    
+}
+
+// Tester helper function
+bool AppMgrClient::test(XQAiwRequest **req, const QString& interface, const QString& operation)
+{
+    bool embed = (mCheckEmbedded->checkState() == Qt::Checked);
+    bool sync = (mSynchronous->checkState() == Qt::Checked);
+    bool background = (mBackground->checkState() == Qt::Checked);
+    
+    qDebug() << mAppName << " test options: embed=" << embed << ",sync=" << sync << "background=" << background;
+    
+    if (!*req)
+    {
+        *req = appmgr.create(interface, operation);
+        assert(mTestCase + ".req != NULL", *req != NULL);
+        if (!*req)
+        {
+            qDebug() <<  mAppName << " AIW-ERROR::NULL request";
+            qDebug() << mAppName << " Last error=" << appmgr.lastError();
+            return false;
+        }
+        connectSignals(*req);        
+    }
+    // Test embedded funcions
+    (*req)->setEmbedded(embed);
+    (*req)->setSynchronous(sync);
+    (*req)->setBackground(background);
+    
+    
+    bool ret=test(req, mReqArg->text());
+
+    return ret;
+    
+}
+
+
+// Tester helper function
+bool AppMgrClient::test(XQAiwRequest **req, XQAiwInterfaceDescriptor &impl, const QString& operation)
+{
+    if (!*req)
+    {
+        *req = appmgr.create(impl, operation);
+        assert(mTestCase + ".req != NULL", *req != NULL);
+        connectSignals(*req);        
+    }
+    bool ret = test(req, mReqArg->text());
+
+    return ret;
+}
+
+
+
+// Tester helper function
+bool AppMgrClient::test(XQAiwRequest **req, const QString &arg)
+{
+
+    if (!req || !*req)
+    {
+        qDebug() <<  mAppName << " AIW-ERROR::NULL request";
+        return false;
+    }
+
+    
+    bool embed = (mCheckEmbedded->checkState() == Qt::Checked);
+    bool sync = (mSynchronous->checkState() == Qt::Checked);
+    bool background = (mBackground->checkState() == Qt::Checked);
+    bool foreground = (mForeground->checkState() == Qt::Checked);
+    qDebug() << mAppName << " test options: embed=" << embed << ",sync=" << sync << "background=" << background;
+    
+    bool ret=true;
+    
+    // Set arguments for request
+    QList<QVariant> args;
+    args << arg;
+    if ((*req)->operation() == OPERATION1)
+    {
+        args << QVariant(!sync);
+    }
+    (*req)->setArguments(args);
+
+    bool genericSend = (mGenericSend->checkState() == Qt::Checked);
+    (*req)->setEmbedded(embed);
+    (*req)->setSynchronous(sync);
+    (*req)->setBackground(background);
+    
+    // Apply additional options
+    XQRequestInfo options;
+    options.setForeground(foreground);
+    // Save the test case to options as tester data. This data is also passed to service app
+    // The test case is utilized in requestOk and requestError signal handlers
+    options.setInfo(TESTCASE_INFO_KEY, mTestCase);
+    (*req)->setInfo(options);
+    
+    // Make the request
+    if (genericSend || !sync)
+    {
+        if (!(*req)->send())
+        {
+            qDebug() << mAppName << " AIW-ERROR:test: Send failed" << (*req)->lastError();;
+            ret=false;
+        }
+    }
+    else if (!genericSend && sync)
+    {
+        QVariant retValue;
+        if (!(*req)->send(retValue))
+        {
+            qDebug() << mAppName <<  " AIW-ERROR: test: Send(retValue) failed" << (*req)->lastError();;
+            ret=false;
+        }
+        else
+        {
+            if (retValue.canConvert<QString>())
+            {
+                qDebug("%s::retValue=%s,%s", qPrintable(mAppName),
+                       retValue.typeName(),
+                       qPrintable(retValue.value<QString>()));
+                mTextRetValue->setText(retValue.value<QString>());
+            }
+            else
+            {
+                qDebug("%s:retValue=%s", qPrintable(mAppName),
+                       retValue.typeName());
+                mTextRetValue->setText("Not displayable");
+            }
+
+        }
+    }
+
+    assert(mTestCase + ".lastError==0", !(*req)->lastError());
+    
+    // Delete request if wanted
+    bool deleteRequest = (mCheckDeleteRequest->checkState() == Qt::Checked);
+    
+    if ((*req)->lastError() == XQService::EMessageNotFound)
+    {
+        // Slot was not found
+        deleteRequest = true;
+    }
+        
+    if (deleteRequest)
+    {
+        qDebug() << mAppName <<  " AIW-NOTE: Request deleted";
+        delete *req;
+        *req = 0;
+    }
+
+    update();
+
+    return ret;
+    
+
+}
+
+
+// Tester helper function
+void AppMgrClient::connectSignals(XQAiwRequest *req)
+{
+    if (req)
+    {
+            // Connect signals once
+        connect(req, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleOk(const QVariant&)));
+        connect(req, SIGNAL(requestError(int,const QString&)), this, SLOT(handleError(int,const QString&)));
+    }
+}
+
+
+// Tester helper function
+void AppMgrClient::createTestFile(const QString &dir, const QString &fileName)
+{
+
+    QDir d(".");
+    d.mkpath(dir);
+    qDebug() << dir;
+
+    QFile file(dir + "/" + fileName);
+    if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
+    {
+        qDebug() << mAppName <<  " Creating file failed " << QString(dir + "/" + fileName);
+        return;
+    }
+    QTextStream out(&file);
+    out << "Text in file" << "\n";
+    file.close();
+    
+}
+
+// Tester helper function
+void AppMgrClient::assert(const QString &testName, bool testResult)
+{
+    qDebug("%s,ASSERT,%s,%s", qPrintable(mAppName), qPrintable(testName),testResult?"OK" : "FAILED");
+}
+
+
+// Tester helper function
+bool AppMgrClient::testRunning(const QString & service, const QString & interface)
+{
+
+    QList<XQAiwInterfaceDescriptor> impls = appmgr.list(service, interface, QString(""));
+    if (impls.count() > 0)
+    {
+        bool b = appmgr.isRunning(impls[0]);
+        return b;
+    }
+    else
+    {
+        return false;
+    }
+   
+}
+
+
+/*
+* Test1:
+* - Call the first IDIAL interface found.
+* - Test XQAplicationManager::isRunning
+* See appmgrservices.h
+*/
+void AppMgrClient::test1()
+{
+
+    mTestCase = "Test1";
+    qDebug() << mAppName << " test1 START";
+    assert("Test1",test(&req1, IDIAL, OPERATION1));
+
+    bool embed = (mCheckEmbedded->checkState() == Qt::Checked);
+    if (!embed)
+    {
+        // Works only for non-embedded cases (no point to check embedded case)
+        assert("Test1.isRunning", testRunning("serviceapp", IDIAL));
+    }
+    qDebug() << mAppName << " test1 END";
+  
+}
+
+/*
+* Test2:
+* - List all the IDIAL interfaces
+* - List all the IDIAL interfaces of the old serviceapp service name
+* - List all the IDIAL interfaces of the new serviceapp service name
+* See appmgrservices.h
+*/
+void AppMgrClient::test2()
+{
+    mTestCase = "Test2";
+    
+    qDebug() << mAppName << " test2 START";
+    
+    QList<XQAiwInterfaceDescriptor> list=appmgr.list(IDIAL, "");
+    qDebug() << mAppName << " list implementations: " << list.count();
+    int i=0;
+    assert("Test2.list.count() > 0", list.count() > 0);
+    foreach (XQAiwInterfaceDescriptor d, list)
+    {
+        qDebug("%s::Service[%d]=%s",qPrintable(mAppName),i,qPrintable(d.serviceName()));
+        qDebug("%s::Interface[%d]=%s",qPrintable(mAppName),i,qPrintable(d.interfaceName()));
+        qDebug("%s::Implementation Id[%d]=%x",qPrintable(mAppName),i,d.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+        qDebug("%s::isRunning=%d", qPrintable(mAppName), testRunning(d.serviceName(), d.interfaceName()));
+        qDebug("%s::status=%d", qPrintable(mAppName), appmgr.status(d));
+        i++;
+    }
+
+    // Old, deprecated service name
+    QList<XQAiwInterfaceDescriptor> list2=appmgr.list("com.nokia.services.serviceapp", IDIAL, "");
+    qDebug() << mAppName << " list implementations 2: " << list2.count();
+    i=0;
+    assert("Test2.list2.count() > 0",list2.count() > 0);
+    foreach (XQAiwInterfaceDescriptor d, list2)
+    {
+        qDebug("%s::Service[%d]=%s",qPrintable(mAppName),i,qPrintable(d.serviceName()));
+        qDebug("%s::Interface[%d]=%s",qPrintable(mAppName),i,qPrintable(d.interfaceName()));
+        qDebug("%s::Implementation Id[%d]=%x",qPrintable(mAppName),i,d.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+        i++;
+    }
+
+    // Service name
+    QList<XQAiwInterfaceDescriptor> list3=appmgr.list("serviceapp", IDIAL, "");
+    qDebug() << mAppName << " New: list implementations: " << list3.count();
+    i=0;
+    assert("Test2.list3.count() > 0", list3.count() > 0);
+    foreach (XQAiwInterfaceDescriptor d, list3)
+    {
+        qDebug("%s::Service[%d]=%s",qPrintable(mAppName),i,qPrintable(d.serviceName()));
+        qDebug("%s::Interface[%d]=%s",qPrintable(mAppName),i,qPrintable(d.interfaceName()));
+        qDebug("%s::Implementation Id[%d]=%x",qPrintable(mAppName),i,d.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+        i++;
+    }
+    
+    if (!list.isEmpty())
+    {
+        // Use the first found
+        qDebug() << mAppName << " Using implementation nbr: " << mImplIndex;
+        test(&req2,list[mImplIndex], OPERATION1);
+    }
+
+    qDebug() << mAppName << " test2 END";
+    
+}
+
+/*
+* Test3:
+* - Using serviceapp and IDIAL interface test passing big amount of data.
+    The datasize can be given in the mDataSpinBox field.
+    At least 0.5 MB shall be passed OK
+* See appmgrservices.h
+*/
+void AppMgrClient::test3()
+{
+
+    mTestCase = "Test3";
+    qDebug() << mAppName << " test3 START";
+    
+    QByteArray data;
+    qDebug() << mAppName << "Data size=" << mDataSpinBox->value();
+    data.fill('X', mDataSpinBox->value());
+
+    bool embed = (mCheckEmbedded->checkState() == Qt::Checked);
+    bool sync = (mSynchronous->checkState() == Qt::Checked);
+    bool background = (mBackground->checkState() == Qt::Checked);
+
+    XQAiwRequest *req=0;
+    req = appmgr.create(QLatin1String("serviceapp"), IDIAL, QLatin1String(""));
+    assert("Test3.req != NULL", req != NULL);
+
+    if (!req)
+    {
+        return;
+    }
+
+    // Apply this operation
+    req->setOperation(QLatin1String("testVariant(QVariant)"));
+
+    connectSignals(req);        
+
+    // Set request attributes
+    req->setEmbedded(embed);
+    req->setSynchronous(sync);
+    req->setBackground(background);
+
+    XQRequestInfo info;
+    // Save the test case to options as tester data. This data is also passed to service app
+    // The test case is utilized in requestOk and requestError signal handlers
+    info.setInfo(TESTCASE_INFO_KEY, mTestCase);
+    req->setInfo(info);
+    
+    QList<QVariant> args;
+
+    args.clear();
+    args << qVariantFromValue(data);
+    req->setArguments(args);
+    
+    assert("Test3.send", req->send());
+
+    bool deleteRequest = (mCheckDeleteRequest->checkState() == Qt::Checked);
+    if (deleteRequest)
+    {
+        delete req;
+        req = 0;
+    }
+   
+    qDebug() << mAppName << " test3 END";
+    
+}
+
+/*
+* Test4:
+* - Test QAction creation using the service "com.nokia.services.hbserviceprovider" and IDIAL interface
+    (The com.nokia.services.hbserviceprovider is implemented by the examples/hbserviceprovider
+    which should be built and included in ROM)
+    The successfully created QAction adds a Test button to UI.
+    Pressing the button emits the signal "test4ActionTriggered" to get input args
+    (the actual "send" happens after returning from the signal)
+* See appmgrservices.h
+*/
+void AppMgrClient::test4()
+{
+    mTestCase = "Test4";
+    qDebug() << mAppName << " test4 START";
+
+    bool embed = (mCheckEmbedded->checkState() == Qt::Checked);
+    bool sync = (mSynchronous->checkState() == Qt::Checked);
+    bool foreground = (mForeground->checkState() == Qt::Checked);
+
+    if (req4)
+    {
+        delete req4;  // Previous
+        req4 = 0;
+    }
+
+    // Only hbserviceprovider support localization
+    req4 = appmgr.create("com.nokia.services.hbserviceprovider", IDIAL, OPERATION1, true);
+    assert("Test4.req4 != NULL", req4 != NULL);
+    if (!req4)
+    {
+        return;
+    }
+
+    connectSignals(req4);
+    req4->setSynchronous(sync);
+
+    // In this test case, apply "options" for other options
+    XQRequestInfo options;
+    options.setEmbedded(embed);
+    options.setForeground(foreground);
+    // Save the test case to options as tester data. This data is also passed to service app
+    // The test case is utilized in requestOk and requestError signal handlers
+    options.setInfo(TESTCASE_INFO_KEY, mTestCase);
+    req4->setInfo(options);
+
+    if (actionButton)
+    {
+        // Previous
+        vl->removeWidget(actionButton);
+        delete actionButton;
+        actionButton = 0;
+        update();
+    }
+    
+    QAction *action = req4->createAction();  // Also connects the triggered event to req !!!!
+    assert("Test4.action != NULL", action != NULL);
+    
+    // Create UI
+    if (action)
+    {
+        actionButton = new QPushButton(action->text());
+        actionButton->addAction(action);
+        vl->addWidget(actionButton);
+        setLayout(vl);
+        // For some reason triggered does not come from request
+        // Workaround...
+        connect(actionButton, SIGNAL(clicked()), action, SIGNAL(triggered()));
+        connect(req4, SIGNAL(triggered()), this, SLOT(test4ActionTriggered()));
+        qDebug() << mAppName << " Press Test button";
+    }
+
+    
+}
+
+// Test button pressed from UI
+void AppMgrClient::test4ActionTriggered()
+{
+    XQAiwRequest *r = (XQAiwRequest *)sender();
+    
+    // Set arguments for request
+    bool embed = (mCheckEmbedded->checkState() == Qt::Checked);
+    QList<QVariant> args;
+    args << QVariant(mReqArg->text());
+    args << QVariant(!embed);
+    r->setArguments(args);
+}
+
+/*
+* Test5:
+* - Test launching activity URI for the UID E0022E70 (fire-and-forget launch)
+    (The E0022E70 is the examples/hbserviceclient which should be built and included in ROM)
+* See appmgrservices.h
+*/
+void AppMgrClient::test5()
+{
+    mTestCase = "Test5";
+    qDebug() << mAppName << " test5 START";
+
+    QUrl uri(XQURI_SCHEME_ACTIVITY + "://E0022E70?" + XQURI_KEY_ACTIVITY_NAME + "=MainView&key1=data1&key2=data2"); 
+    qDebug() << mAppName << " Uri=" << uri.toString();
+    qDebug() << mAppName << " isValid=" << uri.isValid();
+    qDebug() << mAppName << " Uri authority=" << uri.authority();
+    QString old=mReqArg->text();
+    if (!req5)
+    {
+        req5 = appmgr.create(uri);
+        assert("Test5.req5 != NULL", req5 != NULL);
+        connectSignals(req5); 
+    }
+    
+    mReqArg->setText(uri.encodedQuery()); 
+    assert("Test5", test(&req5, mReqArg->text()));
+    mReqArg->setText(old);
+    
+    qDebug() << mAppName << " test5 END";
+    
+}
+
+/*
+* Test6:
+* - Test launching URI scheme "testto" implemented by the examples/serviceapp
+*/
+void AppMgrClient::test6()
+{
+
+    mTestCase = "Test5";
+    qDebug() << mAppName << " test6 START";
+
+    // QUrl uri("testto://authority?param1=value1&param1=value2"); 
+    QUrl uri("testto://authority?param1=value1&param1=value2"); 
+    qDebug() << mAppName << " Uri=" << uri.toString();
+    qDebug() << mAppName << " isValid=" << uri.isValid();
+    qDebug() << mAppName << " Uri authority=" << uri.authority();
+
+    QList<XQAiwInterfaceDescriptor> uriHandlers = appmgr.list(uri);
+    assert("Test6.uriHandlers.count() > 0", uriHandlers.count() > 0);
+    
+    // Note : Only services supporting custom property are returned
+    foreach (XQAiwInterfaceDescriptor d, uriHandlers)
+    {
+        qDebug() << mAppName << " Service=" << d.serviceName();
+        qDebug() << mAppName << " Interface=" << d.interfaceName();
+        qDebug("%s::Implementation Id=%x",qPrintable(mAppName),d.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+        qDebug("%s::isRunning=%d", qPrintable(mAppName), testRunning(d.serviceName(), d.interfaceName()));
+    }
+
+    if (!req6)
+    {
+        req6 = appmgr.create(uri);
+        assert("Test5.req6 != NULL", req6 != NULL);
+        connectSignals(req6); 
+    }
+
+    assert("Test6",test(&req6, uri.toString()));
+
+    qDebug() << mAppName << " test6 END";
+    
+}
+
+/*
+* Test7:
+* - Test launching com.nokia.symbian.IFileView for non-data-caged text file (MIME type text/plain)
+*   At least the examples/serviceapp implements support for interface
+*/
+void AppMgrClient::test7()
+{
+    mTestCase = "Test7";
+    qDebug() << mAppName << " test7 START";
+    
+    // Create test file  (MIME type text/plain)
+    createTestFile("C:/data/Others", "test.txt");
+
+    
+    QFile file("C:/data/Others/test.txt");
+    qDebug() << mAppName << " File=" << file.fileName();
+    qDebug() << mAppName << " exists=" << file.exists();
+
+    QList<XQAiwInterfaceDescriptor> fileHandlers = appmgr.list(file);
+    assert("Test7.fileHandlers.count() > 0", fileHandlers.count() > 0);
+    foreach (XQAiwInterfaceDescriptor d, fileHandlers)
+    {
+        qDebug() << mAppName << " Service=" << d.serviceName();
+        qDebug() << mAppName << " Interface=" << d.interfaceName();
+        qDebug("%s::Implementation Id=%x",qPrintable(mAppName),d.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+    }
+    
+    if (!req7)
+    {
+        req7 = appmgr.create(file);
+        assert("Test5.req7 != NULL", req7 != NULL);
+        connectSignals(req7); 
+    }
+    assert("Test7",test(&req7, file.fileName()));
+
+    qDebug() << mAppName << " test7 END";
+    
+}
+
+
+/*
+* Test8:
+* - Test launching http URI which should be implemented by the Browser
+    Note ! http scheme is handled by the QDesktopServices::openUrl.
+*/
+void AppMgrClient::test8()
+{
+    mTestCase = "Test8";
+    qDebug() << mAppName << " test8 START";
+
+    // E0022E73 == ServiceApp
+    QUrl uri("http://www.nokia.com"); 
+    qDebug() << mAppName << " Uri=" << uri.toString();
+    qDebug() << mAppName << " isValid=" << uri.isValid();
+    qDebug() << mAppName << " Uri authority=" << uri.authority();
+
+    if (!req8)
+    {
+        req8 = appmgr.create(uri);
+        assert("Test8.req8 != NULL", req8 != NULL);
+        connectSignals(req8); 
+    }
+    assert("Test8", test(&req8, uri.toString()));
+
+    qDebug() << mAppName << " test8 END";
+    
+}
+
+/*
+* Test9:
+* - Test launching com.nokia.symbian.IFileView for data-caged text file (MIME type text/plain)
+*   At least the examples/serviceapp implements support for interface
+*/
+void AppMgrClient::test9()
+{
+
+    mTestCase = "Test9";
+    qDebug() << mAppName << " test9 START";    
+
+    bool embed = (mCheckEmbedded->checkState() == Qt::Checked);
+    bool sync = (mSynchronous->checkState() == Qt::Checked);
+    bool deleteRequest = (mCheckDeleteRequest->checkState() == Qt::Checked);
+
+
+    // Access data-caged file 
+    XQSharableFile sf;
+    QString fileDir = "c:/private/e0022e74";
+    
+    if (mAppName == "appmgrclient2")
+    {
+        fileDir = "c:/private/e0022e76";
+    }
+
+    createTestFile(fileDir, "test.txt");
+    if (!sf.open(fileDir + "\\test.txt"))
+    {
+        qDebug() << mAppName << " file open failed " << (fileDir + "/test.txt");
+        return;
+    }
+
+    // Just test listing by sharable file
+    QList<XQAiwInterfaceDescriptor> fileHandlers = appmgr.list(sf);
+    assert("Test9.fileHandlers.count() > 0", fileHandlers.count() > 0);
+    if (fileHandlers.count() > 0)
+    {
+        XQAiwInterfaceDescriptor d = fileHandlers.first();
+        qDebug() << mAppName << " File Service=" << d.serviceName();
+        qDebug() << mAppName << " File Interface=" << d.interfaceName();
+        qDebug("%s::Implementation Id=%x",qPrintable(mAppName),d.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+        if (!req9)
+        {
+            // Create by descriptor
+            req9 = appmgr.create(sf, d);
+            assert("Test9.req9 != NULL", req9 != NULL);
+        }
+        if (!req9)
+        {
+            sf.close();
+            return ;
+        }
+    }
+    else
+    {
+        sf.close();
+    }
+
+    connectSignals(req9);        
+    req9->setEmbedded(embed);
+    req9->setSynchronous(sync);
+    
+    QList<QVariant> args;
+    args << qVariantFromValue(sf);
+    req9->setArguments(args);
+
+    XQRequestInfo info;
+    // Save the test case to options as tester data. This data is also passed to service app
+    // The test case is utilized in requestOk and requestError signal handlers
+    info.setInfo(TESTCASE_INFO_KEY, mTestCase);
+    req9->setInfo(info);
+    
+    assert("Test9.send", req9->send());
+    assert(mTestCase + ".lastError==0", !req9->lastError());
+    
+    // Remember to close the file !!!
+    sf.close();
+
+    if (deleteRequest)
+    {
+        delete req9;
+        req9 = 0;
+    }
+
+    qDebug() << mAppName << " test9 END";
+    
+}
+
+/*
+* Test10:
+* - Test fetching contacts via the "com.nokia.services.phonebookservices" interfaces
+    Note ! This is deprecated interface name still used. The official name is "com.nokia.symbian.IContactFetch"
+           once phonebook supports that.
+*/
+void AppMgrClient::test10()
+{
+
+    mTestCase = "Test10";
+    qDebug() << mAppName << " test10 START";
+
+    bool embed = (mCheckEmbedded->checkState() == Qt::Checked);
+    bool sync = (mSynchronous->checkState() == Qt::Checked);
+    bool background = (mBackground->checkState() == Qt::Checked);
+
+    qDebug() << mAppName <<  " test10: embed=" << embed << ",sync=" << sync << "background=" << background;
+
+    if (!req10)
+    {
+        req10 = appmgr.create(QLatin1String("com.nokia.services.phonebookservices"), QLatin1String("Fetch"), QLatin1String(""));
+        assert("Test10.req10 != NULL", req10 != NULL);
+        if (req10)
+        {
+            connect(req10, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleOk(const QVariant&)));
+            connect(req10, SIGNAL(requestError(int,const QString&)), this, SLOT(handleError(int,const QString&)));
+        }
+    }
+
+    if (!req10)
+    {
+        return;
+    }
+
+    // Set request attributes
+    req10->setOperation("fetch(QString,QString,QString)");
+    req10->setEmbedded(embed);
+    req10->setSynchronous(sync);
+    req10->setBackground(background);
+
+    // Set arguments
+    QList<QVariant> args;
+    args << "Contact"; 
+    args << KCntActionAll;   
+    args << KCntFilterDisplayAll;
+    req10->setArguments(args);
+    
+    XQRequestInfo info;
+    // Save the test case to options as tester data. This data is also passed to service app
+    // The test case is utilized in requestOk and requestError signal handlers
+    info.setInfo(TESTCASE_INFO_KEY, mTestCase);
+    req10->setInfo(info);
+
+    // Send the request
+    assert("Test10.send", req10->send());
+    assert(mTestCase + ".lastError==0", !req10->lastError());
+
+    bool deleteRequest = (mCheckDeleteRequest->checkState() == Qt::Checked);
+    if (deleteRequest)
+    {
+        delete req10;
+        req10 = 0;
+    }
+    
+    qDebug() << mAppName << " test10 END";
+
+
+}
+
+
+/*
+* Test10:
+* - Test getting DRM attributes of the files included in the examples\appmgrclient\DrmTestFiles.zip
+    (You need to unzip/transfer these files in correct location)
+*/
+void AppMgrClient::test11()
+{
+    mTestCase = "Test11";
+    qDebug() << mAppName << " test11 START";
+
+    // Copy files from DrmTestFiles.zip into correct location
+    QList<QString> drmFiles;
+    drmFiles.append("C:/data/Others/RoAcqoffer-111-aac-i15m.ort");
+    drmFiles.append("C:/data/Others/SD_Celebration_SP.dcf");
+    drmFiles.append("C:/data/Others/111-test1.odf");
+    drmFiles.append("C:/data/Others/SD_jpg_sun.dcf");
+    drmFiles.append("C:/data/Others/STC1_128_44_16_2_CBR.wma");
+    drmFiles.append("C:/data/Others/test.txt");
+    drmFiles.append("C:/data/Others/some-nonexisting-file.txt");  // Error
+
+    QList<int> attrNames;
+    attrNames.append(XQApplicationManager::MimeType);
+    attrNames.append(XQApplicationManager::IsProtected);
+    attrNames.append(XQApplicationManager::IsForwardable);
+    // See other attributes from epoc32/include/caf/caftypes.h
+
+    // Test with file names
+    foreach (QString f, drmFiles)
+    {
+        QFile file(f);
+        QVariantList attrValues;
+        bool ok = appmgr.getDrmAttributes(file, attrNames, attrValues);
+        assert("Test11.getDrmAttributes.QFile/" + f,
+               f != QString("C:/data/Others/some-nonexisting-file.txt") ? ok : !ok);
+        int i=0;
+        foreach (QVariant v, attrValues)
+        {
+            qDebug() << mAppName << " Attribute " << attrNames[i] << "=" << qPrintable(v.toString());
+            i++;
+        }
+    }
+
+    // Test with file handles
+    foreach (QString f, drmFiles)
+    {
+        XQSharableFile file;
+        file.open(f);  // Create handle manually
+        QVariantList attrValues;
+        bool ok = appmgr.getDrmAttributes(file, attrNames, attrValues);
+        assert("Test11.getDrmAttributes.XQSharableFile/" + f,
+               f != QString("C:/data/Others/some-nonexisting-file.txt") ? ok : !ok);
+        int i=0;
+        foreach (QVariant v, attrValues)
+        {
+            qDebug() << mAppName << " Attribute " << attrNames[i] << "=" << qPrintable(v.toString());
+            i++;
+        }
+        file.close();
+    }
+    
+    qDebug() << mAppName << " test11 END";
+
+}
+
+
+#define TXT_ID QLatin1String("txt_aiw_action_text")
+
+//
+// Miscellanous ad-hoc tests for trying bugs, etc.
+//
+void AppMgrClient::anyTest()
+{
+
+#if 0
+    bool embed = (mCheckEmbedded->checkState() == Qt::Checked);
+    bool sync = (mSynchronous->checkState() == Qt::Checked);
+    bool background = (mBackground->checkState() == Qt::Checked);
+
+    XQAiwRequest *req=0;
+    req = appmgr.create(QLatin1String("serviceapp"), IDIAL, QLatin1String(""));
+
+    if (!req)
+    {
+        qDebug() << mAppName << " AIW-ERROR NULL request";
+        return;
+    }
+
+    // Apply this operation
+    req->setOperation(QLatin1String("testVariant(QVariant)"));
+    
+    connectSignals(req);        
+
+    // Set request attributes
+    req->setEmbedded(embed);
+    req->setSynchronous(sync);
+    req->setBackground(background);
+
+    QList<QVariant> args;
+
+    /*
+    // Just construct dummies
+    MetaDummy1 dummy1;
+    MetaDummy2 dummy2;
+    */
+
+    /*
+    // THIS WORKS
+    CntServicesContact cnt1;
+    cnt1.mDisplayName = "Test1";
+    cnt1.mPhoneNumber = "050-1111111";
+    cnt1.mEmailAddress = "test1.test@nokia.com";
+    
+    CntServicesContact cnt2;
+    cnt2.mDisplayName = "Test2";
+    cnt2.mPhoneNumber = "050-2222222";
+    cnt2.mEmailAddress = "test2.test@nokia.com";
+
+    CntServicesContactList list;
+    list.append(cnt1);
+    list.append(cnt2);
+    */
+
+    QVariant v1;
+    QVariant v2;
+    QVariant v3;
+    v1.setValue((int)-99);
+    v2.setValue((bool)true);
+    v3.setValue(QString("Variant3"));
+    TestServiceData data1(1, v1);
+    TestServiceData data2(2, v2);
+    TestServiceData data3(3, v3);
+    TestServiceDataList list;
+    list.append(data1);
+    list.append(data2);
+    list.append(data3);
+    
+    args.clear();
+    args << qVariantFromValue(list);
+    req->setArguments(args);
+
+    req->send();
+    
+    bool deleteRequest = (mCheckDeleteRequest->checkState() == Qt::Checked);
+    if (deleteRequest)
+    {
+        delete req;
+        req = 0;
+    }
+
+    qDebug() << mAppName << " test END";
+
+    //  ---- OLD TESTS ------
+    
+    /*
+    qDebug() << mAppName << "  name" << qApp->applicationName();
+    qDebug() << mAppName << " dirpath" << qApp->applicationDirPath();
+    qDebug() << mAppName << " filename" << qApp->applicationFilePath();
+    qDebug() << mAppName << " pid" << qApp->applicationPid();
+
+    QFileInfo appinfo (qApp->applicationFilePath());
+    qDebug() << mAppName << " appinfo.applicationFilePath" << qApp->applicationFilePath();
+    qDebug() << mAppName << " appinfo.absolutePath" << appinfo.absolutePath();
+    qDebug() << mAppName << " appinfo.baseName" << appinfo.baseName();
+
+    QString lang = QLocale::system().name();
+    qDebug() << mAppName << " anyTest:" << lang;
+
+    // QString textFile = "z:/resource/qt/translations/hbserviceprovider";
+    QString textFile = "hbserviceprovider";
+    QFileInfo info(textFile);
+    qDebug() << mAppName << " base" << info.baseName();
+    qDebug() << mAppName << " path" << info.filePath();
+    if (info.baseName() == info.filePath())
+    {
+        textFile = qApp->applicationFilePath().left(2) + "/resource/qt/translations/" + textFile;
+        qDebug() << mAppName << " path added" << textFile;
+    }
+
+    textFile += "_"; 
+    textFile += lang;
+    qDebug() << mAppName << " anyTest:" << textFile;
+
+    QTranslator translator;
+    bool res = translator.load(textFile);
+    qDebug() << mAppName << " anyTest:" << res;
+    if (res)
+    {
+        qApp->installTranslator(&translator);
+    }
+
+    QString textId = TXT_ID;
+    QByteArray ba = textId.toLatin1();
+    const char *textPtr = ba.data();
+
+    QString text = qtTrId(textPtr);  // translate
+    qDebug() << mAppName << " translated text:" << text;
+
+    qApp->removeTranslator(&translator);
+
+    Q_ASSERT(0==1);
+
+    QString str("e0022e70");
+    uint ui = str.toUInt();
+    qDebug() << mAppName << " toUInt value=" << ui;
+    bool b=false;
+    ui=str.toUInt(&b,16);
+    qDebug() << mAppName << " toUInt status=" << b <<  ",value=" << ui;
+
+    
+    */
+
+#endif
+}
+
+
+
+
+// Aiw request responses
+void AppMgrClient::handleOk(const QVariant& result)
+{
+    XQAiwRequest *r = static_cast<XQAiwRequest *>(sender());
+    QString testCase = (r->info().info(TESTCASE_INFO_KEY)).toString();
+    
+    int impl=-1;
+    impl = (r->descriptor().property(XQAiwInterfaceDescriptor::ImplementationId)).toInt();
+    QString interface = r->descriptor().interfaceName();
+    QString service = r->descriptor().serviceName();
+
+    qDebug("%s,%s::requestOk,from [%s.%s,%x]",
+           qPrintable(mAppName),
+           qPrintable(testCase),
+           qPrintable(service),
+           qPrintable(interface),
+           impl);
+    qDebug("%s,%s::requestOk,result type=%s",
+           qPrintable(mAppName),
+           qPrintable(testCase),
+           result.typeName());
+    
+    if (result.canConvert<CntServicesContactList>())
+    {
+        CntServicesContactList list;
+        list = qVariantValue<CntServicesContactList>(result);
+        for (int i = 0; i < list.count(); ++i)
+        {
+            qDebug() << mAppName << "," << testCase <<  ",result[" << i << "].mDisplayName=" << list[i].mDisplayName;
+            qDebug() << mAppName << "," << testCase <<  " result[" << i << "].mPhoneNumber=" << list[i].mPhoneNumber;
+            qDebug() << mAppName << "," << testCase <<  ",result[" << i << "].mEmailAddress=" << list[i].mEmailAddress;
+
+        }
+    }
+    else if (result.canConvert<TestServiceDataList>())
+    {
+        TestServiceDataList list = qVariantValue<TestServiceDataList>(result);
+        for (int i = 0; i < list.count(); ++i)
+        {
+            qDebug() << mAppName << "," << testCase << ",result[" << i << "].mType=" << list[i].mType;
+            qDebug() << mAppName << "," << testCase << ",result[" << i << "].mData=" << list[i].mData.toString();
+        }
+        
+    }
+    else if (result.canConvert<QString>())
+    {
+        qDebug("%s,%s,result=%s",
+               qPrintable(mAppName),
+               qPrintable(testCase),
+               qPrintable(result.value<QString>()));
+        mTextRetValue->setText(result.value<QString>());
+    }
+
+    else
+    {
+        mTextRetValue->setText("Not displayable");
+    }
+}
+  
+void AppMgrClient::handleError(int errorCode, const QString& errorMessage)
+{
+    XQAiwRequest *r = static_cast<XQAiwRequest *>(sender());
+    QString interface = r->descriptor().interfaceName();
+    QString service = r->descriptor().serviceName();
+    QString testCase = (r->info().info(TESTCASE_INFO_KEY)).toString();
+    
+    int impl=-1;
+    impl = (r->descriptor().property(XQAiwInterfaceDescriptor::ImplementationId)).toInt();
+
+    qDebug("%s,%s::requestError,from [%s.%s,%x]=(%d,%s)",
+           qPrintable(mAppName),
+           qPrintable(testCase),
+           qPrintable(service),
+           qPrintable(interface),
+           impl, errorCode, qPrintable(errorMessage));
+    
+    mTextRetValue->setText(errorMessage);
+}
+
+
+
+Q_IMPLEMENT_USER_METATYPE(MetaDummy1)
+Q_IMPLEMENT_USER_METATYPE(MetaDummy2)
+Q_IMPLEMENT_USER_METATYPE(CntServicesContact)
+Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(CntServicesContactList)
+Q_IMPLEMENT_USER_METATYPE(TestServiceData)
+Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(TestServiceDataList)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/appmgrclient/src/appmgrclient.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef APPMGRCLIENT_H
+#define APPMGRCLIENT_H
+
+#include <QVBoxLayout>
+#include <QWidget>
+#include <QModelIndex>
+#include <QMap>
+#include <QStringList>
+#include <QPushButton>
+#include <QMenu>
+#include <QSpinBox>
+#include <xqappmgr.h>
+#include <XQSharableFile.h>
+
+class QLineEdit;
+class QCheckBox;
+class QLabel;
+
+class AppMgrClient : public QWidget
+{
+    Q_OBJECT
+            
+public:
+        AppMgrClient( QWidget *parent = 0, Qt::WFlags f = 0 );
+        ~AppMgrClient();
+
+private slots:
+        void test1();
+        void test2();
+        void test3();
+        void test4();
+        void test5();
+        void test6();
+        void test7();
+        void test8();
+        void test9();
+        void test10();
+        void test11();
+        void anyTest();
+        
+       // Aiw request responses
+        void handleOk(const QVariant &result);
+        void handleError(int errorCode, const QString& errorMessage);
+        void test4ActionTriggered();
+
+              
+private:
+        bool test(XQAiwRequest **req,const QString& interface, const QString& operation);
+        bool test(XQAiwRequest **req, XQAiwInterfaceDescriptor &impl, const QString& operation);
+        bool test(XQAiwRequest **req, const QString &arg);
+        void connectSignals(XQAiwRequest *req);
+        void createTestFile(const QString &dir, const QString &file);
+        bool testRunning(const QString & service, const QString & interface);
+        void assert(const QString &testName, bool testResult);
+
+private:
+        QCheckBox* mCheckEmbedded;
+        QCheckBox* mCheckDeleteRequest;
+        QCheckBox* mBackground;
+        QCheckBox* mForeground;
+        QCheckBox* mGenericSend;
+        QCheckBox* mSynchronous;
+        QLineEdit *mReqArg;
+        QLineEdit *mTextRetValue;
+        QLabel* mRetunSignal;
+        QVBoxLayout *vl;
+        XQApplicationManager appmgr;
+        QPushButton *actionButton;
+        QMenu *mMenu;
+        QSpinBox* mDataSpinBox;
+        XQAiwRequest* req1;
+        XQAiwRequest* req2;
+        XQAiwRequest* req3;
+        XQAiwRequest* req4;
+        XQAiwRequest* req5;
+        XQAiwRequest* req6;
+        XQAiwRequest* req7;
+        XQAiwRequest* req8;
+        XQAiwRequest* req9;
+        XQAiwRequest* req10;
+        XQAiwRequest* anyReq;
+
+        int mImplIndex;
+        
+        RFs fs;
+        RFile file;
+
+        QString mAppName;
+        QString mTestCase;
+};
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/appmgrclient/src/appmgrclient.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+SOURCES=\
+    src/main.cpp\
+    src/appmgrclient.cpp
+
+HEADERS=\
+    src/appmgrclient.h\
+    src/appmgrservices.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/appmgrclient/src/appmgrservices.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef APPMGR_SERVICES_H
+#define APPMGR_SERVICES_H
+
+#include <xqaiwdecl.h>
+
+// All the services should be declared in a component specific header file
+// In order to avoid any mistakes in service naming.
+// In QtHighway service interface is described in XML file, operation is not
+
+// Service interfaces and related operations
+#define SERVICE1 QLatin1String("serviceapp")
+#define IDIAL QLatin1String("dialer")
+#define OPERATION1 QLatin1String("dial(QString,bool)")
+
+// Erroneus services
+#define ERR_IDIAL QLatin1String("xxxx.yyy")
+#define ERR_OPERATION1 QLatin1String("dial(QString,QString)")
+
+#define TESTCASE_INFO_KEY QLatin1String("XQTestCase")
+
+// Few dummy metatypes
+class MetaDummy1
+{
+    public:
+        MetaDummy1() {};
+        virtual ~MetaDummy1() {};
+
+        QString mTest;
+        template <typename Stream> void serialize(Stream &stream) const;
+        template <typename Stream> void deserialize(Stream &stream);
+};
+
+template <typename Stream> inline void MetaDummy1::serialize(Stream &s) const
+{
+    s << mTest;
+}
+
+template <typename Stream> inline void MetaDummy1::deserialize(Stream &s)
+{
+    s >> mTest;
+}
+
+
+class MetaDummy2
+{
+    public:
+        MetaDummy2() {};
+        virtual ~MetaDummy2() {};
+
+        QString mTest;
+        template <typename Stream> void serialize(Stream &stream) const;
+        template <typename Stream> void deserialize(Stream &stream);
+};
+
+template <typename Stream> inline void MetaDummy2::serialize(Stream &s) const
+{
+    s << mTest;
+}
+
+template <typename Stream> inline void MetaDummy2::deserialize(Stream &s)
+{
+    s >> mTest;
+}
+
+// Testing QVariant
+class TestServiceData
+{
+    public:
+
+        TestServiceData() : mType(-1) {}
+        TestServiceData(int aType, const QVariant &aData) :
+                mType(aType),
+                mData(aData)
+                {}
+
+        virtual ~TestServiceData() {}
+
+       
+        int        mType;
+        QVariant   mData;
+
+        template <typename Stream> void serialize(Stream &aStream) const;
+        template <typename Stream> void deserialize(Stream &aStream);
+};
+
+template <typename Stream> inline void TestServiceData::serialize(Stream &aStream) const
+{
+    qDebug() << "TestServiceData::serialize 1";
+    aStream << mType;
+    qDebug() << "TestServiceData::serialize 2";
+    aStream << mData;
+    qDebug() << "TestServiceData::serialize 3";
+}
+
+template <typename Stream> inline void TestServiceData::deserialize(Stream &aStream)
+{
+    qDebug() << "TestServiceData::deserialize 1";
+    aStream >> mType;
+    qDebug() << "TestServiceData::deserialize 2";
+    aStream >> mData;
+    qDebug() << "TestServiceData::deserialize 3";
+}
+
+typedef QList<TestServiceData> TestServiceDataList;
+
+Q_DECLARE_USER_METATYPE(TestServiceData)
+Q_DECLARE_USER_METATYPE_NO_OPERATORS(TestServiceDataList)
+Q_DECLARE_USER_METATYPE(MetaDummy1)
+Q_DECLARE_USER_METATYPE(MetaDummy2)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/appmgrclient/src/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QApplication>
+#include "appmgrclient.h"
+
+int main(int argc, char **argv)
+{
+    QApplication a( argc, argv );
+
+    AppMgrClient *cl = new AppMgrClient();
+    cl->show();
+    int rv = a.exec();
+    delete cl;
+    return rv;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/appmgrclient2/appmgrclient2.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE=app
+TARGET=appmgrclient2
+
+symbian: TARGET.UID3 = 0xE0022E76
+
+XQSERVICE_ROOT=../..
+include(../../xqservicebase.pri)
+include(src/appmgrclient2.pri)
+
+symbian: TARGET.CAPABILITY = CAP_APPLICATION
+LIBS+=-lxqservice -lxqserviceutil
+
+libFiles.sources = xqservice.dll
+libFiles.path = "!:\sys\bin"
+DEPLOYMENT += libFiles
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/appmgrclient2/src/appmgrclient2.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+SOURCES=\
+    ../appmgrclient/src/main.cpp\
+    ../appmgrclient/src/appmgrclient.cpp
+
+HEADERS=\
+    ../appmgrclient/src/appmgrclient.h\
+    ../appmgrclient/src/appmgrservices.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/examples.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+TEMPLATE=subdirs
+
+CONFIG += ordered
+SUBDIRS= \
+         serviceapp \
+         serviceclient \
+         appmgrclient \
+         appmgrclient2
+
+# If Orbit configured 
+#include($$[QMAKE_MKSPECS]/features/hb.prf) {
+#SUBDIRS += \
+#         hbserviceprovider \
+#         hbserviceclient
+#}
+
+symbian:BLD_INF_RULES.prj_exports += "./rom/xqserviceexamples.iby $$CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(xqserviceexamples.iby)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceclient/hbserviceclient.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE=app
+TARGET=hbserviceclient
+
+CONFIG += hb
+symbian:TARGET.UID3 = 0xE0022E70
+
+XQSERVICE_ROOT=../..
+include(../../xqservicebase.pri)
+include(src/hbserviceclient.pri)
+
+LIBS+=-lxqservice -lflogger -lxqserviceutil.dll
+
+libFiles.sources = hbserviceclient xqservice.dll 
+libFiles.path = "!:\sys\bin"
+DEPLOYMENT += libFiles
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceclient/src/hbserviceclient.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+SOURCES=\
+    src/main.cpp\
+    src/hbserviceclientmainwindow.cpp\
+    src/hbserviceclientview.cpp
+
+HEADERS=\
+    src/hbserviceclientmainwindow.h\
+    src/hbserviceclientview.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceclient/src/hbserviceclientmainwindow.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <hbmainwindow.h>
+
+#include "hbserviceclientmainwindow.h"
+#include "hbserviceclientview.h"
+
+
+HbServiceClientMainWindow::HbServiceClientMainWindow(QWidget *parent)
+    : HbMainWindow(parent)
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceClientMainWindow::HbServiceClientMainWindow");
+    mView = new HbServiceClientView();
+    addView(mView);   
+}
+
+HbServiceClientMainWindow::~HbServiceClientMainWindow()
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceClientMainWindow::~HbServiceClientMainWindow");
+    delete mView;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceclient/src/hbserviceclientmainwindow.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef HBSERVICECLIENTMAINWINDOW_H
+#define HBSERVICECLIENTMAINWINDOW_H
+
+#include <hbmainwindow.h>
+
+class HbServiceClientView;
+
+class HbServiceClientMainWindow : public HbMainWindow
+{
+    Q_OBJECT
+
+public:
+    HbServiceClientMainWindow(QWidget *parent=0);
+    ~HbServiceClientMainWindow();
+
+public slots:
+    
+private slots:
+    
+private:
+    
+private:
+    HbServiceClientView*    mView;
+
+};
+
+#endif // HBSERVICECLIENTMAINWINDOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceclient/src/hbserviceclientview.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,263 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <QGraphicsLinearLayout>
+#include <hbtoolbar.h>
+#include <hbaction.h>
+#include <hblineedit.h>
+#include <hblabel.h>
+//#include <hbcheckbox.h>
+#include <hbmessagebox.h>
+#include <cntservicescontact.h>
+
+
+#include <QMessageBox>
+#include <QVariant>
+
+#include "hbserviceclientview.h"
+
+#include <xqservicerequest.h>
+
+#include "../hbserviceprovider/src/hbcontact.h"
+
+
+HbServiceClientView::HbServiceClientView(QGraphicsItem *parent)
+    : HbView(parent)
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceClientView::HbServiceClientView");
+    setTitle(tr("HB Service client view"));
+
+    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical,this);
+
+    layout->addItem(new HbLabel("Call service",this));
+    mNumberEdit = new HbLineEdit(this);
+    mNumberEdit->setText("+35850123456789");
+    layout->addItem(mNumberEdit);
+
+    mServiceEdit = new HbLineEdit(this);
+    mServiceEdit->setText("com.nokia.services.hbserviceprovider.Dialer");
+    layout->addItem(mServiceEdit);
+
+    /*
+    mServiceEmbedded = HbCheckBox("Embedded",this)
+    mServiceEmbedded->setTristate(true);
+    layout->addItem(mServiceEmbedded);
+    */
+    
+    mRetValue = new HbLineEdit(this);
+    mRetValue->setText("*****");
+    layout->addItem(mRetValue);
+
+    layout->addItem(new HbLabel("Map service",this));
+    mAddressEdit = new HbLineEdit(this);
+    mAddressEdit->setText("Karakaari 13");
+    layout->addItem(mAddressEdit);
+
+    mCityEdit = new HbLineEdit(this);
+    mCityEdit->setText("Espoo");
+    layout->addItem(mCityEdit);
+
+    mCountryEdit = new HbLineEdit(this);
+    mCountryEdit->setText("Finland");
+    layout->addItem(mCountryEdit);
+
+    mServiceMapEdit = new HbLineEdit(this);
+    mServiceMapEdit->setText("com.nokia.services.hbserviceprovider.Map");
+    layout->addItem(mServiceMapEdit);
+
+    mRetMapValue = new HbLineEdit(this);
+    mRetMapValue->setText("*****");
+    layout->addItem(mRetMapValue);
+    
+    setLayout(layout);
+
+    HbToolBar* toolBar = this->toolBar();
+    
+    HbAction* callAction = new HbAction("Call"); 
+    connect(callAction, SIGNAL(triggered()), this, SLOT(callContact()));
+
+    HbAction* callEmbeddedAction = new HbAction("Call Embedded"); 
+    connect(callEmbeddedAction, SIGNAL(triggered()), this, SLOT(callContactEmbedded()));
+
+    HbAction* showAddressesAction = new HbAction("Select contacts"); 
+    connect(showAddressesAction, SIGNAL(triggered()), this, SLOT(launchContactSelecting()));
+    
+    toolBar->addAction(callAction);
+    toolBar->addAction(callEmbeddedAction);
+    toolBar->addAction(showAddressesAction);
+    sndAsync = NULL;
+}
+
+HbServiceClientView::~HbServiceClientView()
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceClientView::~HbServiceClientView");
+}
+
+void HbServiceClientView::callContact()
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceClientView::callContact");
+    doCallContact(false);
+}
+
+void HbServiceClientView::callContactEmbedded()
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceClientView::callContactEmbedded");
+    doCallContact(true);
+}
+
+void HbServiceClientView::doCallContact(bool isEmbedded)
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceClientView::doCallContact");
+    if (isEmbedded) {
+        XQRequestInfo info;  // matti
+        info.setEmbedded(isEmbedded);
+        
+        XQServiceRequest snd(mServiceEdit->text(),
+                             "dial(QString)",isEmbedded);
+        snd << mNumberEdit->text();
+        snd.setInfo(info);   // matti
+        
+        QVariant retValue;
+        
+        bool res=snd.send(retValue);
+        if (!res) {
+            int returnvalue = snd.latestError();
+            mRetValue->setText(QString::number(returnvalue));
+           // mRetValue->setText("send fail!");
+        }
+        else {
+            if (retValue.isNull() || !retValue.isValid())
+                mRetValue->setText("ret value null or not valid");
+            else    
+                mRetValue->setText(retValue.toString());
+        }
+    }
+    else {
+        if (sndAsync)
+            delete sndAsync;
+        sndAsync = new XQServiceRequest(mServiceEdit->text(),
+                           "dial(QString)",isEmbedded);
+        connect(sndAsync, SIGNAL(requestCompleted(QVariant)), this, SLOT(requestCompleted(QVariant)));
+        *sndAsync << mNumberEdit->text();
+        bool res=sndAsync->send();
+        if (!res) {
+            int returnvalue = sndAsync->latestError();
+            mRetValue->setText(QString::number(returnvalue));
+        }
+        else {
+            mRetValue->setText("call on going...");
+        }
+    }
+}
+
+void HbServiceClientView::requestCompleted(const QVariant& val)
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceClientView::requestCompleted");
+    mRetValue->setText(val.toString());
+}
+
+void HbServiceClientView::showAddresses()
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceClientView::showAddresses");
+    XQServiceRequest snd(mServiceMapEdit->text(),"showAddresses(QString,QString,QString)");
+    snd << mAddressEdit->text();
+    snd << mCityEdit->text();
+    snd << mCountryEdit->text();
+    HbContactList retValue;
+    bool res=snd.send(retValue);
+    if (!res) {
+        mRetMapValue->setText("send fail!");
+    }
+    else {
+        QString data;
+        int count = 0;
+        foreach (HbContact cnt,retValue) {
+            //HbContact cnt = qVariantValue<HbContact>(v);
+            QString tmp = QString::number(++count) + " : " + cnt.mLabel + " " + cnt.mNumber + "\n";
+            data.append(tmp) ;
+        }
+        HbMessageBox::information(data);
+        // QMessageBox msgBox;
+        // msgBox.setWindowTitle("Return value");
+        // msgBox.setText(data);
+        // msgBox.exec();
+        //mRetMapValue->setText(QString::number(retValue));
+    }
+}
+
+void HbServiceClientView::launchContactSelecting()
+{
+    if (sndAsync)
+        delete sndAsync;
+    sndAsync = new XQServiceRequest("com.nokia.services.phonebookservices.Fetch",
+                                    "fetch(QString,QString,QString)", false);
+
+    connect(sndAsync, SIGNAL(requestCompleted(QVariant)),
+            this, SLOT(addSelectedRecipients(QVariant)));
+    *sndAsync << "Select contact"; 
+    *sndAsync << KCntActionAll;   
+    *sndAsync << KCntFilterDisplayAll;
+
+    bool result = sndAsync->send();
+    if (!result) {
+    }  
+
+}
+
+void HbServiceClientView::addSelectedRecipients(const QVariant &value)
+{
+    CntServicesContactList list;
+    if(value.canConvert<CntServicesContactList>()) {
+        list = qVariantValue<CntServicesContactList>(value);
+    }
+    else {
+        ;
+    }    
+
+    if (list.count() == 0) {
+        HbMessageBox::information(tr("Nothing returned"));
+        // note.setTimeout(10000);
+        // "Nothing returned" will be replaced by a hbTrId when it is ready
+        // note.setText(tr("Nothing returned"));
+        // note.information();
+    }
+    else {
+        QString data;
+        foreach (CntServicesContact cnt, list)
+        {
+            QString recipientName = cnt.mDisplayName;
+            data += recipientName + "\n";
+        }
+        HbMessageBox::information(data);
+        //HbMessageBox msgBox;
+        //msgBox.setWindowTitle("Returned value");
+        //msgBox.setText(data);
+        //msgBox.information();
+    }
+}
+    
+Q_IMPLEMENT_USER_METATYPE(HbContact)
+Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(HbContactList)
+
+Q_IMPLEMENT_USER_METATYPE(CntServicesContact)
+Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(CntServicesContactList)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceclient/src/hbserviceclientview.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef HBSERVICECLIENTVIEW_H
+#define HBSERVICECLIENTVIEW_H
+
+#include <hbview.h>
+
+class HbAction;
+class HbLineEdit;
+class XQServiceRequest;
+//class HbCheckBox;
+
+class HbServiceClientView : public HbView
+{
+    Q_OBJECT
+
+public:
+    HbServiceClientView(QGraphicsItem *parent = 0);
+    ~HbServiceClientView();
+
+signals:
+    
+protected slots:
+    void callContact();
+    void callContactEmbedded();
+    void showAddresses();
+    void requestCompleted(const QVariant& value);
+    void launchContactSelecting();
+    void addSelectedRecipients(const QVariant &value);
+    
+private:
+    void doCallContact(bool isEmbedded);
+    HbLineEdit* mNumberEdit;
+    HbLineEdit* mServiceEdit;
+    HbLineEdit* mRetValue;
+
+    HbLineEdit* mAddressEdit;
+    HbLineEdit* mCityEdit;
+    HbLineEdit* mCountryEdit;
+    HbLineEdit* mServiceMapEdit;
+    HbLineEdit* mRetMapValue;
+    XQServiceRequest* sndAsync;
+    XQServiceRequest* mSnd;
+};
+
+#endif // HBSERVICECLIENTVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceclient/src/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+#include <hbapplication.h>
+#include "hbserviceclientmainwindow.h"
+
+int main(int argc, char **argv)
+{
+    // qInstallMsgHandler(XQSERVICEMESSAGEHANDLER);
+    XQSERVICE_DEBUG_PRINT("HbServiceClient::main");
+    HbApplication app( argc, argv ); 
+
+    
+    HbServiceClientMainWindow mainWindow;
+
+    // Let's figure out why application was started?
+    if(app.activateReason()== Hb::ActivationReasonActivity )
+    {
+        QString id = app.activateId();
+        QVariant data = app.activateData();
+        XQSERVICE_DEBUG_PRINT("HbServiceClient::main Hb::ActivationReasonActivity=%s,data=%s",
+                             qPrintable(id), qPrintable(data.toString()));
+        QVariantHash params = app.activateParams();
+        QHashIterator<QString, QVariant> i(params);
+        while (i.hasNext())
+        {
+            i.next();
+            XQSERVICE_DEBUG_PRINT("HbServiceClient::param key=%s,value=%s",
+                                  qPrintable(i.key()), qPrintable(i.value().toString()));
+        }        
+    }
+    else if (app.activateReason() == Hb::ActivationReasonNormal)
+    {
+        XQSERVICE_DEBUG_PRINT("HbServiceClient::main Hb::ActivationReasonNormal");
+    }
+    else if(app.activateReason() == Hb::ActivationReasonService)
+    {
+        // This applicatiob does not support services
+        XQSERVICE_DEBUG_PRINT("HbServiceClient::main Hb::ActivationReasonService");
+    }
+    else
+    {
+        // This applicatiob does not support services
+        XQSERVICE_DEBUG_PRINT("HbServiceClient::main UNKNOWN reason");
+    }
+        
+    
+    mainWindow.show();
+
+    return app.exec();     
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/hbserviceprovider.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,41 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE=app
+TARGET=hbserviceprovider
+
+CONFIG += hb service
+symbian:TARGET.UID3 = 0xE0022E71
+
+XQSERVICE_ROOT=../..
+include(../../xqservicebase.pri)
+include(src/hbserviceprovider.pri)
+
+LIBS+=-lxqservice -lxqserviceutil -lflogger
+
+SERVICE.FILE = service_conf.xml
+SERVICE.OPTIONS = embeddable
+# SERVICE.OPTIONS += hidden
+
+libFiles.sources = xqservice.dll
+libFiles.path = "!:\sys\bin"
+DEPLOYMENT += libFiles
+
+# TRANSLATIONS=hbserviceprovider.ts
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/hbserviceprovider.ts	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="1.0" language="en">
+<context>
+     <name>QAction test</name>
+    <message id="txt_aiw_action_text">
+        <source>aiw_text</source>
+        <translation variants="no">Test</translation>
+    </message>
+</context>
+</TS>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/maketestqm.cmd	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,6 @@
+copy hbserviceprovider.ts \epoc32\include\platform\qt\translations\hbserviceprovider_en.ts
+
+call lrelease -idbased /epoc32/include/platform/qt/translations/hbserviceprovider_en.ts -qm /epoc32/release/winscw/urel/z/resource/qt/translations/hbserviceprovider_en.qm
+call lrelease -idbased /epoc32/include/platform/qt/translations/hbserviceprovider_en.ts -qm /epoc32/release/winscw/udeb/z/resource/qt/translations/hbserviceprovider_en.qm
+
+copy  \epoc32\release\winscw\urel\z\resource\qt\translations\hbserviceprovider_en.qm \epoc32\data\z\resource\qt\translations\*.*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/service_conf.xml	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service>
+  <name>com.nokia.services.hbserviceprovider</name>
+  <filepath>="must-not-be-empty"</filepath>
+  <description>Telephony service</description>
+  <interface>
+     <name>Dialer</name>
+     <version>1.0</version>
+     <description>Dial interface</description>
+     <customproperty key="aiw_action_text_file">hbserviceprovider</customproperty>
+     <customproperty key="aiw_action_text">txt_aiw_action_text</customproperty>
+  </interface>
+  <interface>
+     <name>Map</name>
+     <version>1.0</version>
+     <description>Map interface</description>
+  </interface>
+</service>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/service_conf_old_format.xml	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service name="com.nokia.services.hbserviceprovider"  filepath="must-not-be-empty" >
+  <description>Telephony service</description>
+  <interface name="Dialer" version="1.0" capabilities="">
+    <description>Dial interface</description>
+  </interface>
+  <interface name="Map" version="1.0" capabilities="">
+    <description>Map interface</description>
+  </interface>
+</service>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/src/hbcontact.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef HBSERVICEPROVIDERCONTACT_H
+#define HBSERVICEPROVIDERCONTACT_H
+
+#include <QList>
+#include <QString>
+#include <QUuid>
+#include <xqserviceipcmarshal.h>
+
+
+class HbContact
+{
+public:
+    HbContact() {}; 
+    virtual ~HbContact() {};
+
+    QString mLabel;
+    QString mNumber;
+    QString mAddress;
+    QString mCity;
+    QString mCountry;
+    QUuid mUid;
+   
+    template <typename Stream> void serialize(Stream &stream) const;
+    template <typename Stream> void deserialize(Stream &stream);
+};
+
+/*
+struct HbContact
+{
+public:
+    QString mLabel;
+    QString mNumber;
+    QString mAddress;
+    QString mCity;
+    QString mCountry;
+    QUuid mUid;
+   
+    template <typename Stream> void serialize(Stream &stream) const;
+    template <typename Stream> void deserialize(Stream &stream);
+};
+*/
+
+template <typename Stream> inline void HbContact::serialize(Stream &s) const
+{
+    s << mLabel;
+    s << mNumber;
+    s << mUid;
+}
+
+template <typename Stream> inline void HbContact::deserialize(Stream &s)
+{
+    s >> mLabel;
+    s >> mNumber;
+    s >> mUid;
+}
+
+typedef QList<HbContact> HbContactList;
+
+Q_DECLARE_USER_METATYPE(HbContact)
+Q_DECLARE_USER_METATYPE_NO_OPERATORS(HbContactList)
+
+#endif // HBSERVICEPROVIDERCONTACT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/src/hbserviceprovider.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+
+SOURCES=\
+    src/main.cpp\
+    src/hbserviceprovidermainwindow.cpp\
+    src/hbserviceproviderview.cpp
+
+HEADERS=\
+    src/hbserviceprovidermainwindow.h\
+    src/hbserviceproviderview.h \
+    src/hbcontact.h
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/src/hbserviceprovidermainwindow.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <hbmainwindow.h>
+
+#include <hbserviceprovidermainwindow.h>
+#include <hbserviceproviderview.h>
+
+
+HbServiceProviderMainWindow::HbServiceProviderMainWindow(QWidget *parent)
+    : HbMainWindow(parent)
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceProviderMainWindow::HbServiceProviderMainWindow");
+    mMapService = new MapService();
+    connect(mMapService,SIGNAL(showView(QString)), 
+            this, SLOT(showView(QString)));
+
+    mMapView = new HbMapView(mMapService);
+    connect(mMapService,SIGNAL(setAddress(QString,QString,QString)), 
+            mMapView, SLOT(setAddress(QString,QString,QString)));
+    mDialerService = new DialerService();
+    connect(mDialerService,SIGNAL(showView(QString)), 
+            this, SLOT(showView(QString)));
+
+    mDialerView = new HbDialerView(mDialerService);
+    connect(mDialerService,SIGNAL(setNumber(QString)), 
+            mDialerView, SLOT(setNumber(QString)));
+}
+
+HbServiceProviderMainWindow::~HbServiceProviderMainWindow()
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceProviderMainWindow::~HbServiceProviderMainWindow");
+    delete mMapService;
+    delete mDialerService;
+    delete mMapView;
+    delete mDialerView;
+}
+
+void HbServiceProviderMainWindow::showView(const QString& name)
+{
+    XQSERVICE_DEBUG_PRINT("HbServiceProviderMainWindow::showView");
+    if (name == "map") {    
+        addView(mMapView);    
+    }
+    else if (name == "dialer") {
+        addView(mDialerView);    
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/src/hbserviceprovidermainwindow.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef HBSERVICEPROVIDERMAINWINDOW_H
+#define HBSERVICEPROVIDERMAINWINDOW_H
+
+#include <hbmainwindow.h>
+
+class HbDialerView;
+class HbMapView;
+class DialerService;
+class MapService;
+
+class HbServiceProviderMainWindow : public HbMainWindow
+{
+    Q_OBJECT
+
+public:
+    HbServiceProviderMainWindow(QWidget *parent=0);
+    ~HbServiceProviderMainWindow();
+
+public slots:
+    void showView(const QString& name);
+
+private slots:
+    
+private:
+    
+private:
+    DialerService*      mDialerService;
+    MapService*         mMapService; 
+    HbDialerView*       mDialerView;
+    HbMapView*          mMapView;
+};
+
+#endif // HBSERVICEPROVIDERMAINWINDOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/src/hbserviceproviderview.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,290 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <hbapplication.h>
+#include <hbtoolbar.h>
+#include <hbaction.h>
+#include <HbLineEdit.h>
+#include <QTimer>
+#include <QGraphicsLinearLayout>
+
+#include <hbserviceproviderview.h>
+#include <xqserviceprovider.h>
+#include <xqservicerequest.h>
+#include <xqserviceutil.h>
+
+HbDialerView::HbDialerView(DialerService* service,QGraphicsItem *parent)
+    : mService(service),HbView(parent)
+
+{
+    XQSERVICE_DEBUG_PRINT("HbDialerView::HbDialerView");
+    sndEmbedded = NULL;
+    if (XQServiceUtil::isService())
+    {
+        setTitle(tr("HB Dialer As Service"));
+    }
+    else
+    {
+        setTitle(tr("HB Dialer As Non-Service"));
+    }
+
+    HbToolBar* toolBar = this->toolBar();
+    
+    HbAction* endAction = new HbAction("End Call"); 
+    connect(endAction, SIGNAL(triggered()), this, SLOT(quit()));
+    
+    toolBar->addAction(endAction);
+
+    if (XQServiceUtil::isEmbedded()) {
+        HbAction* embeddedAction = new HbAction("Embed"); 
+        connect(embeddedAction, SIGNAL(triggered()), this, SLOT(embed()));
+        toolBar->addAction(embeddedAction);
+    }
+    
+    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical,this);
+
+    mTextEdit = new HbLineEdit(this);
+    mRetValue = new HbLineEdit(this);
+    layout->addItem(mTextEdit);
+    layout->addItem(mRetValue);
+    setLayout(layout);    
+}
+
+HbDialerView::~HbDialerView()
+{
+    XQSERVICE_DEBUG_PRINT("HbDialerView::~HbDialerView");
+}
+
+void HbDialerView::quit()
+{
+    XQSERVICE_DEBUG_PRINT("HbDialerView::quit");
+    connect(mService, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
+    mService->complete();
+}
+
+void HbDialerView::embed()
+{
+    XQSERVICE_DEBUG_PRINT("HbDialerView::embed");
+    if (sndEmbedded)
+        delete sndEmbedded;
+    
+    //XQServiceRequest snd("com.nokia.services.hbserviceprovider.Dialer","dial(QString)",true);
+    sndEmbedded = new XQServiceRequest("com.nokia.services.serviceapp.Dialer","dial(QString,bool)",true);
+    connect(sndEmbedded, SIGNAL(requestCompleted(QVariant)), this, SLOT(requestCompleted(QVariant)));
+    *sndEmbedded << mTextEdit->text();
+    *sndEmbedded << true;
+    QVariant retValue;
+    bool res=sndEmbedded->send();
+    if (!res) {
+        mRetValue->setText("send fail!");
+    }
+}
+
+void HbDialerView::requestCompleted(const QVariant& value)
+{
+    XQSERVICE_DEBUG_PRINT("HbDialerView::requestCompleted");
+    mRetValue->setText(value.toString());
+}
+
+void HbDialerView::setNumber(const QString& number)
+{
+    XQSERVICE_DEBUG_PRINT("HbDialerView::setNumber");
+    mTextEdit->setText("Call from " + number);
+}
+
+DialerService::DialerService(QObject* parent)
+: XQServiceProvider("com.nokia.services.hbserviceprovider.Dialer",parent)
+{
+    XQSERVICE_DEBUG_PRINT("DialerService::DialerService");
+    publishAll();
+}
+
+DialerService::~DialerService()
+{
+    XQSERVICE_DEBUG_PRINT("DialerService::~DialerService");
+}
+
+void DialerService::complete()
+{
+    XQSERVICE_DEBUG_PRINT("DialerService::complete");
+    QString retvalue =  "retValue="+mNumber;
+    completeRequest(1,retvalue);
+}
+
+QString DialerService::dial(const QString& number)
+{
+    XQSERVICE_DEBUG_PRINT("DialerService::dial");
+    mNumber = number ;
+    emit showView("dialer");
+    emit setNumber(number);
+    setCurrentRequestAsync();
+    return "retValue="+number;
+}
+
+QString DialerService::dial(const QString& number, bool async)
+{
+    XQSERVICE_DEBUG_PRINT("DialerService::dial (2)");
+    return dial(number);
+}
+
+
+HbMapView::HbMapView(MapService* service, QGraphicsItem *parent)
+    : mMapService(service), HbView(parent) 
+
+{
+    XQSERVICE_DEBUG_PRINT("HbMapView::HbMapView");
+    setTitle(tr("HB Map Service"));
+    
+    HbToolBar* toolBar = this->toolBar();
+    
+    HbAction* endAction = new HbAction("Done"); 
+    connect(endAction, SIGNAL(triggered()), this, SLOT(quit()));
+
+    HbAction* addAction = new HbAction("Add"); 
+    connect(addAction, SIGNAL(triggered()), this, SLOT(addAddress()));
+
+    HbAction* embedAction = new HbAction("Embed");
+    connect(embedAction, SIGNAL(triggered()), this, SLOT(embed()));
+
+    toolBar->addAction(endAction);
+    toolBar->addAction(addAction);
+    toolBar->addAction(embedAction);
+    
+    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical,this);
+
+    mTextAddress = new HbLineEdit(this);
+    mTextCity = new HbLineEdit(this);
+    mTextCountry = new HbLineEdit(this);
+    mTextLabel = new HbLineEdit("stefano pironato", this);
+    mTextNumber = new HbLineEdit("+358504876679", this);
+    mRetValue = new HbLineEdit("******", this);
+
+    layout->addItem(mTextLabel);
+    layout->addItem(mTextNumber);
+    layout->addItem(mTextAddress);
+    layout->addItem(mTextCity);
+    layout->addItem(mTextCountry);
+    layout->addItem(mRetValue);
+    setLayout(layout);
+}
+
+HbMapView::~HbMapView()
+{
+    XQSERVICE_DEBUG_PRINT("HbMapView::~HbMapView");
+}
+
+void HbMapView::quit()
+{
+    XQSERVICE_DEBUG_PRINT("HbMapView::quit");
+    mMapService->complete();
+    connect(mMapService, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
+//  NO quit now... we have to wait the signal that data has been delivered
+//    qApp->quit();
+}
+
+void HbMapView::embed()
+{
+    XQSERVICE_DEBUG_PRINT("HbMapView::embed");
+    //XQServiceRequest snd("com.nokia.services.hbserviceprovider.Dialer","dial(QString)",true);
+    XQServiceRequest snd("com.nokia.services.serviceapp.Dialer","dial(QString,bool)",true);
+    snd << mTextNumber->text();
+    snd << true;
+    QVariant retValue;
+    bool res=snd.send(retValue);
+    if (!res) {
+        mRetValue->setText("send fail!");
+    }
+    else {
+        if (retValue.isNull() || !retValue.isValid())
+            mRetValue->setText("ret value null or not valid");
+        else
+            mRetValue->setText(retValue.toString());
+    }
+}
+
+void HbMapView::setAddress(const QString& address,const QString& city,const QString& country)
+{
+    XQSERVICE_DEBUG_PRINT("HbMapView::setAddress");
+    mTextAddress->setText("Address:" + address);
+    mTextCity->setText("City:" + city);
+    mTextCountry->setText("Country:" + country);
+}
+
+void HbMapView::addAddress()
+{
+    XQSERVICE_DEBUG_PRINT("HbMapView::addAddress");
+    HbContact cnt;
+    cnt.mLabel = mTextLabel->text();
+    cnt.mNumber = mTextNumber->text();
+    cnt.mAddress = mTextAddress->text();
+    cnt.mCity = mTextCity->text();
+    cnt.mCountry = mTextCountry->text();
+    cnt.mUid = QUuid::createUuid();
+    mMapService->addContact(cnt);
+}
+
+MapService::MapService(QObject* parent)
+: XQServiceProvider(QLatin1String("com.nokia.services.hbserviceprovider.Map"),parent)
+{
+    XQSERVICE_DEBUG_PRINT("MapService::MapService");
+    publishAll();
+    mCurrentRequestIndex = 0;
+}
+
+MapService::~MapService()
+{
+    XQSERVICE_DEBUG_PRINT("MapService::~MapService");
+}
+
+void MapService::complete()
+{
+    XQSERVICE_DEBUG_PRINT("MapService::complete");
+//    QVariant retValue;
+//    retValue.setValue(contactList);
+//    completeRequest(mCurrentRequestIndex, retValue);
+    completeRequest(mCurrentRequestIndex, contactList);
+    mCurrentRequestIndex = 0;
+}
+
+void MapService::addContact(const HbContact& cnt)
+{
+    XQSERVICE_DEBUG_PRINT("MapService::addContact");
+    //QVariant v;
+    //v.setValue(cnt);
+    contactList.append(cnt);
+}
+
+HbContactList MapService::showAddresses(const QString& address,const QString& city,const QString& country)
+{
+    XQSERVICE_DEBUG_PRINT("MapService::showAddresses");
+    emit showView("map");
+    emit setAddress(address,city,country);
+    mCurrentRequestIndex=setCurrentRequestAsync();
+    HbContactList list;
+    return list;
+}
+
+
+Q_IMPLEMENT_USER_METATYPE(HbContact)
+Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(HbContactList)
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/src/hbserviceproviderview.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,133 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef HBSERVICEPROVIDERVIEW_H
+#define HBSERVICEPROVIDERVIEW_H
+
+#include <hbview.h>
+#include <xqserviceprovider.h>
+
+#include "hbcontact.h"
+
+class HbLineEdit;
+class MapService;
+class DialerService;
+class XQServiceRequest;
+
+class HbDialerView : public HbView
+{
+    Q_OBJECT
+
+public:
+    HbDialerView(DialerService* service,QGraphicsItem *parent = 0);
+    ~HbDialerView();
+
+signals:
+
+public slots:
+    void setNumber(const QString& number);
+    void embed();
+    void requestCompleted(const QVariant& value);
+    
+protected slots:
+    void quit();
+    
+private:
+    HbLineEdit* mTextEdit;
+    HbLineEdit* mRetValue;
+    DialerService* mService;
+    XQServiceRequest* sndEmbedded;
+};
+
+class HbMapView : public HbView
+{
+    Q_OBJECT
+
+public:
+    HbMapView(MapService * service, QGraphicsItem *parent = 0);
+    ~HbMapView();
+
+signals:
+
+public slots:
+    void addAddress();
+    void setAddress(const QString& address,const QString& city,const QString& country);
+       
+protected slots:
+    void quit();
+    void embed();
+
+private:
+    HbLineEdit* mTextAddress;
+    HbLineEdit* mTextCity;
+    HbLineEdit* mTextCountry;
+    HbLineEdit* mTextLabel;
+    HbLineEdit* mTextNumber;
+    HbLineEdit* mRetValue;
+
+    MapService* mMapService ;
+};
+
+class DialerService : public XQServiceProvider
+{
+    Q_OBJECT
+public:
+    DialerService( QObject *parent = 0 );
+    ~DialerService();
+
+    void complete();
+
+Q_SIGNALS:
+    void setNumber(const QString& number);
+    void showView(const QString& name);
+    
+public slots:
+    QString dial(const QString& number);
+    QString dial(const QString& number, bool async);
+    
+private:
+    QString mNumber;
+};
+
+class MapService : public XQServiceProvider
+{
+    Q_OBJECT
+public:
+    MapService( QObject *parent = 0 );
+    ~MapService();
+
+    void complete();    
+    void addContact(const HbContact& cnt);
+
+Q_SIGNALS:    
+    void setAddress(const QString& address,const QString& city,const QString& country);
+    void showView(const QString& name);
+    
+public slots:
+    HbContactList showAddresses(const QString& address,const QString& city,const QString& country);
+
+private:
+    HbContactList contactList;    
+    QString mNumber;
+    int mCurrentRequestIndex;
+};
+
+#endif // HBSERVICEPROVIDERVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/hbserviceprovider/src/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+#include <xqserviceutil.h>
+
+#include <hbapplication.h>
+#include <hbserviceprovidermainwindow.h>
+
+int main(int argc, char **argv)
+{
+    // qInstallMsgHandler(XQSERVICEMESSAGEHANDLER);
+    XQSERVICE_DEBUG_PRINT("HbServiceProvider::main");
+
+    XQSERVICE_DEBUG_PRINT("HbServiceProvider::main:isService (argv)=%d", XQServiceUtil::isService(argc,argv));
+    XQSERVICE_DEBUG_PRINT("HbServiceProvider::main:interfaceName (argv)=%s", qPrintable(XQServiceUtil::interfaceName(argc,argv)));
+    XQSERVICE_DEBUG_PRINT("HbServiceProvider::main:serviceName (argv)=%s", qPrintable(XQServiceUtil::serviceName(argc,argv)));
+    XQSERVICE_DEBUG_PRINT("HbServiceProvider::main:isEmbbedded (argv)=%d", XQServiceUtil::isEmbedded(argc,argv));
+    XQSERVICE_DEBUG_PRINT("HbServiceProvider::main:operationName (argv)=%s", qPrintable(XQServiceUtil::operationName(argc,argv)));
+    
+    HbApplication app( argc, argv ); 
+
+    XQSERVICE_DEBUG_PRINT("HbServiceProvider::main:isService =%d", XQServiceUtil::isService());
+    XQSERVICE_DEBUG_PRINT("HbServiceProvider::main:interfaceName=%s", qPrintable(XQServiceUtil::interfaceName()));
+    XQSERVICE_DEBUG_PRINT("HbServiceProvider::main:serviceName =%s", qPrintable(XQServiceUtil::serviceName()));
+    XQSERVICE_DEBUG_PRINT("HbServiceProvider::main:isEmbbedded =%d", XQServiceUtil::isEmbedded());
+    XQSERVICE_DEBUG_PRINT("HbServiceProvider::main:operationName =%s", qPrintable(XQServiceUtil::operationName()));
+
+    // Let's figure out why application was started?
+    if(app.activateReason()== Hb::ActivationReasonActivity )
+    {
+        QString id = app.activateId();
+        QVariant data = app.activateData();
+        XQSERVICE_DEBUG_PRINT("HbServiceProvider::main Hb::ActivationReasonActivity=%s,data=%s",
+                              qPrintable(id), qPrintable(data.toString()));
+        QVariantHash params = app.activateParams();
+        QHashIterator<QString, QVariant> i(params);
+        while (i.hasNext())
+        {
+            i.next();
+            XQSERVICE_DEBUG_PRINT("HbServiceProvider::param key=%s,value=%s",
+                                  qPrintable(i.key()), qPrintable(i.value().toString()));
+        }        
+    }
+    else if (app.activateReason() == Hb::ActivationReasonNormal)
+    {
+        XQSERVICE_DEBUG_PRINT("HbServiceProvider::main Hb::ActivationReasonNormal");
+    }
+    else if(app.activateReason() == Hb::ActivationReasonService)
+    {
+        // Does not come here: Bug MPAN-84QL7V entered for this
+        XQSERVICE_DEBUG_PRINT("HbServiceProvider::main Hb::ActivationReasonService");
+    }
+    else
+    {
+        // This applicatiob does not support services
+        XQSERVICE_DEBUG_PRINT("HbServiceProvider::main UNKNOWN reason");
+    }
+    
+    HbServiceProviderMainWindow mainWindow;
+
+    mainWindow.show();
+
+    return app.exec();     
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/mimetestapp/mimetestapp.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE=app
+TARGET=mimetestapp
+
+symbian:TARGET.UID3 = 0xE0022E75
+
+XQSERVICE_ROOT=../..
+include(../../xqservicebase.pri)
+include(src/mimetestapp.pri)
+
+LIBS+=-lxqservice -lxqserviceutil
+
+libFiles.sources = xqservice.dll
+libFiles.path = "!:\sys\bin"
+DEPLOYMENT += libFiles
+
+RSS_RULES += \
+  "datatype_list = " \
+  "      {" \
+  "      DATATYPE" \
+  "          {" \
+  "          priority = EDataTypePriorityNormal;" \
+  "          type = \"text/plain\";" \
+  "          }" \
+  "      };" \
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/mimetestapp/src/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QApplication>
+#include <QDebug>
+
+#include "mimetestapp.h"
+
+int main(int argc, char **argv)
+{
+    QApplication a( argc, argv );
+
+    QStringList args = QApplication::arguments();
+    
+    foreach (QString arg, args) {
+        qDebug() << "MimeTestApp: cmdline arg=" << qPrintable(arg);
+    }
+    
+    MimeTestApp *cl = new MimeTestApp();
+    cl->show();
+    int rv = a.exec();
+    delete cl;
+    return rv;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/mimetestapp/src/mimetestapp.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QtGlobal>
+#include <QApplication>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QStackedWidget>
+#include <QImageReader>
+#include <QDebug>
+#include <QTimer>
+#include <QPushButton>
+#include <QList>
+#include <QLineEdit>
+#include <QString>
+#include <QCheckBox>
+#include <QAction>
+#include <QListView>
+#include <QUrl>
+#include <math.h>
+
+#include "mimetestapp.h"
+
+// Erroneus services
+#define ERR_INTERFACE1 "xxxx.yyy"
+#define ERR_OPERATION1 "dial(QString,QString)"
+
+MimeTestApp::MimeTestApp(QWidget *parent, Qt::WFlags f)
+    : QWidget(parent, f)
+{
+    /* Adjust the palette */
+#if defined(Q_WS_S60)
+    QPalette p = qApp->palette();
+    QColor color(192,192,192);
+    QColor bg(201,250,250);
+    p.setColor(QPalette::Highlight, color.lighter(200));
+    p.setColor(QPalette::Text, Qt::black);
+    p.setColor(QPalette::Base, bg);
+    p.setColor(QPalette::WindowText, Qt::black);
+    p.setColor(QPalette::Window, bg);
+    p.setColor(QPalette::ButtonText, Qt::black);
+    p.setColor(QPalette::Button, color.lighter(150));
+    p.setColor(QPalette::Link, QColor(240,40,40));
+
+    qApp->setPalette(p);
+#endif
+
+    QPushButton *quitButton = new QPushButton(tr("quit"));
+    connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+
+    vl = new QVBoxLayout;
+    vl->setMargin(0);
+    vl->setSpacing(0);
+
+    QStringList args = QApplication::arguments();
+    foreach (QString arg, args)
+    {
+        QLabel *label = new QLabel(arg);
+        vl->addWidget(label);
+    }
+    vl->addWidget(quitButton);
+    setLayout(vl);
+
+#if defined(Q_WS_X11) || defined(Q_WS_WIN)
+    setFixedSize(QSize(360,640)); // nHD
+#elif defined(Q_WS_S60)
+    showMaximized();
+    showFullScreen();
+#endif
+}
+
+MimeTestApp::~MimeTestApp()
+{
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/mimetestapp/src/mimetestapp.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef MIMETESTAPP_H
+#define MIMETESTAPP_H
+
+#include <QVBoxLayout>
+#include <QWidget>
+
+class MimeTestApp : public QWidget
+{
+    Q_OBJECT
+            
+public:
+        MimeTestApp( QWidget *parent = 0, Qt::WFlags f = 0 );
+        ~MimeTestApp();
+
+private slots:
+
+private:
+        QVBoxLayout *vl;
+};
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/mimetestapp/src/mimetestapp.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+SOURCES=\
+    src/main.cpp\
+    src/mimetestapp.cpp
+
+HEADERS=\
+    src/mimetestapp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/mimetestapp2/mimetestapp2.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,49 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE=app
+TARGET=mimetestapp2
+CONFIG += service
+
+symbian:TARGET.UID3 = 0xE0022E77
+symbian: TARGET.CAPABILITY = CAP_APPLICATION
+
+SERVICE.FILE = service_conf.xml
+
+XQSERVICE_ROOT=../..
+include(../../xqservicebase.pri)
+include(src/mimetestapp.pri)
+
+LIBS+=-lxqservice -lxqserviceutil
+
+libFiles.sources = xqservice.dll
+libFiles.path = "!:\sys\bin"
+DEPLOYMENT += libFiles
+
+RSS_RULES += \
+  "datatype_list = " \
+  "      {" \
+  "      DATATYPE" \
+  "          {" \
+  "          priority = EDataTypePriorityNormal;" \
+  "          type = \"text/plain\";" \
+  "          }" \
+  "      };" \
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/mimetestapp2/service_conf.xml	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service>
+  <name>mimetestapp2</name>
+  <filepath>No path</filepath>
+  <description>File viewer test app</description>
+  <interface>
+     <name>com.nokia.symbian.IFileView</name>
+     <version>1.0</version>
+     <description>Interface for showing files</description>
+   </interface>
+</service>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/mimetestapp2/src/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QApplication>
+#include <QDebug>
+
+#include "mimetestapp.h"
+
+int main(int argc, char **argv)
+{
+    QApplication a( argc, argv );
+
+    QStringList args = QApplication::arguments();
+    
+    foreach (QString arg, args) {
+        qDebug() << "MimeTestApp2: cmdline arg=" << qPrintable(arg);
+    }
+    
+    MimeTestApp *cl = new MimeTestApp();
+    cl->show();
+    int rv = a.exec();
+    delete cl;
+    return rv;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/mimetestapp2/src/mimetestapp.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,161 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QtGlobal>
+#include <QApplication>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QStackedWidget>
+#include <QImageReader>
+#include <QDebug>
+#include <QTimer>
+#include <QPushButton>
+#include <QList>
+#include <QLineEdit>
+#include <QString>
+#include <QCheckBox>
+#include <QAction>
+#include <QListView>
+#include <QUrl>
+#include <math.h>
+#include "xqservicelog.h"
+
+#include "mimetestapp.h"
+
+MimeTestApp::MimeTestApp(QWidget *parent, Qt::WFlags f)
+    : QWidget(parent, f), mFileService(0), mLabel(0), mVl(0)
+{
+    /* Adjust the palette */
+#if defined(Q_WS_S60)
+    QPalette p = qApp->palette();
+    QColor color(192,192,192);
+    QColor bg(201,250,250);
+    p.setColor(QPalette::Highlight, color.lighter(200));
+    p.setColor(QPalette::Text, Qt::black);
+    p.setColor(QPalette::Base, bg);
+    p.setColor(QPalette::WindowText, Qt::black);
+    p.setColor(QPalette::Window, bg);
+    p.setColor(QPalette::ButtonText, Qt::black);
+    p.setColor(QPalette::Button, color.lighter(150));
+    p.setColor(QPalette::Link, QColor(240,40,40));
+
+    qApp->setPalette(p);
+#endif
+
+    QPushButton *quitButton = new QPushButton(tr("quit"));
+    connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+
+    mVl = new QVBoxLayout;
+    mVl->setMargin(0);
+    mVl->setSpacing(0);
+
+    mLabel = new QLabel("");
+    mVl->addWidget(mLabel);
+    
+    QStringList args = QApplication::arguments();
+    QString argsTxt;
+    foreach (QString arg, args)
+    {
+        argsTxt += arg + "\n";
+    }
+
+    QLabel *cmdArgsLabel = new QLabel(argsTxt);
+    mVl->addWidget(cmdArgsLabel);
+    
+    mVl->addWidget(quitButton);
+    setLayout(mVl);
+
+#if defined(Q_WS_X11) || defined(Q_WS_WIN)
+    setFixedSize(QSize(360,640)); // nHD
+#elif defined(Q_WS_S60)
+    showMaximized();
+    showFullScreen();
+#endif
+
+    // Activate service
+    mFileService = new FileService(this);
+    
+}
+
+MimeTestApp::~MimeTestApp()
+{
+    delete mFileService;
+}
+
+void MimeTestApp::setLabel(QString label)
+{
+    XQSERVICE_DEBUG_PRINT("MimeTestApp2::setLabel");
+    mLabel->setText(label);
+}
+
+
+// ----------FileService---------------
+
+FileService::FileService(MimeTestApp* parent)
+: XQServiceProvider(QLatin1String("mimetestapp2.com.nokia.symbian.IFileView"),parent),
+  mMimeTestApp(parent)
+
+{
+    XQSERVICE_DEBUG_PRINT("MimeTestApp2::FileService (mimetestapp2)");
+    publishAll();
+}
+
+FileService::~FileService()
+{
+    XQSERVICE_DEBUG_PRINT("MimeTestApp2::~FileService  (mimetestapp2)");
+}
+
+bool FileService::view(QString file)
+{
+    XQSERVICE_DEBUG_PRINT("MimeTestApp2::view(QString) (mimetestapp2) %s",
+                         qPrintable(file));
+
+    QString label = "IFileView:" + QString ("File=%1\n").arg(file);
+    mMimeTestApp->setLabel(label);
+    
+    return true;
+}
+
+
+bool FileService::view(XQSharableFile sf)
+{
+    XQSERVICE_DEBUG_PRINT("MimeTestApp2::view(XQSharebleFile) (mimetestapp2)");
+    QString label = "IFileView:" + QString ("File=%1\n").arg(sf.fileName());
+
+    RFile file;
+    bool ok = sf.getHandle( file );
+    if (ok)
+    {
+        HBufC8* data = HBufC8::NewL(100);
+        TPtr8 ptr = data->Des();
+        TInt err  = file.Read( ptr );
+        QString text = QString::fromUtf8((const char *)(data->Ptr()), data->Length());
+        XQSERVICE_DEBUG_PRINT("MimeTestApp2::file read,%d,%s", err, qPrintable(text));
+        sf.close();
+        delete data;
+    }
+
+    mMimeTestApp->setLabel(label);
+    
+    return true;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/mimetestapp2/src/mimetestapp.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef MIMETESTAPP_H
+#define MIMETESTAPP_H
+
+#include <QVBoxLayout>
+#include <QWidget>
+#include <QLabel>
+#include <xqserviceprovider.h>
+#include <xqsharablefile.h>
+
+class FileService;
+class MimeTestApp : public QWidget
+{
+    Q_OBJECT
+            
+public:
+        MimeTestApp( QWidget *parent = 0, Qt::WFlags f = 0 );
+        ~MimeTestApp();
+        
+        void setLabel(QString label);
+
+private slots:
+
+private:
+        QVBoxLayout *mVl;
+        QLabel *mLabel;
+        FileService *mFileService;
+};
+
+
+class FileService : public XQServiceProvider
+{
+    Q_OBJECT
+    public:
+        FileService( MimeTestApp *parent = 0 );
+        ~FileService();
+
+    public slots:
+        bool view(QString file);
+        bool view(XQSharableFile file);
+
+    private:
+        MimeTestApp* mMimeTestApp;
+};
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/mimetestapp2/src/mimetestapp.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+SOURCES=\
+    src/main.cpp\
+    src/mimetestapp.cpp
+
+HEADERS=\
+    src/mimetestapp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/rom/xqserviceexamples.iby	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: 
+*
+*/
+
+#ifndef __XQSERVICEEXAMPLES_IBY__
+#define __XQSERVICEEXAMPLES_IBY__
+
+#include <bldvariant.hrh>
+
+#define UPGRADABLE_APP_REG_RSC(NAME) data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\ ## NAME ## _reg.rsc        Private\10003a3f\import\apps\ ## NAME ## _reg.rsc
+
+S60_APP_EXE(serviceapp)
+S60_APP_RESOURCE(serviceapp)
+UPGRADABLE_APP_REG_RSC(serviceapp)
+
+S60_APP_EXE(serviceclient)
+S60_APP_RESOURCE(serviceclient)
+UPGRADABLE_APP_REG_RSC(serviceclient)
+
+S60_APP_EXE(appmgrclient)
+S60_APP_RESOURCE(appmgrclient)
+UPGRADABLE_APP_REG_RSC(appmgrclient)
+
+S60_APP_EXE(appmgrclient2)
+S60_APP_RESOURCE(appmgrclient2)
+UPGRADABLE_APP_REG_RSC(appmgrclient2)
+
+/*
+S60_APP_EXE(hbserviceprovider)
+S60_APP_RESOURCE(hbserviceprovider)
+UPGRADABLE_APP_REG_RSC(hbserviceprovider)
+data=DATAZ_\resource\qt\translations\hbserviceprovider_en.qm  resource\qt\translations\hbserviceprovider_en.qm
+
+S60_APP_EXE(hbserviceclient)
+S60_APP_RESOURCE(hbserviceclient)
+UPGRADABLE_APP_REG_RSC(hbserviceclient)
+*/
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceapp/service_conf.xml	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service>
+  <name>serviceapp</name>
+  <filepath>No path</filepath>
+  <description>Telephony service</description>
+  <interface>
+     <name>Dialer</name>
+     <version>1.0</version>
+     <description>Interface which may do something</description>
+     <customproperty key="aiw_status">0x00000001</customproperty>
+     <customproperty key="deprecatedsn">com.nokia.services.serviceapp</customproperty>
+   </interface>
+  <interface>
+     <name>com.nokia.symbian.IUriView</name>
+     <version>1.0</version>
+     <description>Interface for showing URIs</description>
+     <customproperty key="schemes">testto,test2to</customproperty>
+     <customproperty key="deprecatedsn">com.nokia.services.serviceapp</customproperty>
+  </interface>
+  <interface>
+     <name>com.nokia.symbian.IFileView</name>
+     <version>1.0</version>
+     <description>Interface for showing Files</description>
+     <customproperty key="deprecatedsn">com.nokia.services.serviceapp</customproperty>
+   </interface>
+</service>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceapp/service_conf_long.xml	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service>
+  <name>serviceapp</name>
+  <filepath>No path</filepath>
+  <description>Telephony service</description>
+  <interface>
+     <name>Dialer</name>
+     <version>1.0</version>
+     <description>Interface which may do something</description>
+     <customproperty key="aiw_status">0x00000001</customproperty>
+     <customproperty key="deprecatedsn">com.nokia.services.serviceapp</customproperty>
+   </interface>
+  <interface>
+     <name>com.nokia.symbian.IUriView</name>
+     <version>1.0</version>
+     <description>Interface for showing URIs</description>
+     <customproperty key="schemes">testto</customproperty>
+     <customproperty key="deprecatedsn">com.nokia.services.serviceapp</customproperty>
+  </interface>
+  <interface>
+     <name>com.nokia.symbian.IFileView</name>
+     <version>1.0</version>
+     <description>Interface for showing Files</description>
+     <customproperty key="deprecatedsn">com.nokia.services.serviceapp</customproperty>
+   </interface>
+  <interface>
+     <name>com.nokia.symbian.ITest1</name>
+     <version>1.0</version>
+     <description>Interface for testing</description>
+   </interface>
+  <interface>
+     <name>com.nokia.symbian.ITest2</name>
+     <version>1.0</version>
+     <description>Interface for testing</description>
+   </interface>
+  <interface>
+     <name>com.nokia.symbian.ITest3</name>
+     <version>1.0</version>
+     <description>Interface for testing</description>
+   </interface>
+  <interface>
+     <name>com.nokia.symbian.ITest4</name>
+     <version>1.0</version>
+     <description>Interface for testing</description>
+   </interface>
+  <interface>
+     <name>com.nokia.symbian.ITest5</name>
+     <version>1.0</version>
+     <description>Interface for testing</description>
+   </interface>
+  <interface>
+     <name>com.nokia.symbian.ITest6</name>
+     <version>1.0</version>
+     <description>Interface for testing</description>
+   </interface>
+</service>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceapp/service_conf_new.xml	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service>
+  <name>com.nokia.services.serviceapp</name>
+  <filepath>No path</filepath>
+  <description>Telephony service</description>
+  <interface>
+     <name>Dialer</name>
+     <version>1.0</version>
+     <description>Interface which may do something</description>
+     <customproperty key="txt_aiw_action_text">Dial now</customproperty>
+   </interface>
+</service>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceapp/service_conf_old_format.xml	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service name="com.nokia.services.serviceapp"  filepath="must-not-be-empty" >
+  <description>Telephony service</description>
+  <interface name="Dialer" version="1.0" capabilities="">
+    <description>Dial interface</description>
+  </interface>
+</service>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceapp/serviceapp.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,52 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE=app
+TARGET=serviceapp
+
+CONFIG += service
+
+symbian:TARGET.UID3 = 0xE0022E78
+
+XQSERVICE_ROOT=../..
+include(../../xqservicebase.pri)
+include(src/serviceapp.pri)
+
+symbian: TARGET.CAPABILITY = CAP_APPLICATION
+
+LIBS+=-lxqservice -lxqserviceutil -lflogger -lefsrv
+
+SERVICE.FILE = service_conf.xml
+SERVICE.OPTIONS = embeddable
+SERVICE.OPTIONS += hidden
+
+libFiles.sources = serviceapp.exe 
+libFiles.path = "!:\sys\bin"
+DEPLOYMENT += libFiles
+
+RSS_RULES += \
+  "datatype_list = " \
+  "      {" \
+  "      DATATYPE" \
+  "          {" \
+  "          priority = EDataTypePriorityNormal;" \
+  "          type = \"text/plain\";" \
+  "          }" \
+  "      };" \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceapp/src/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqservicelog.h"
+#include <xqserviceutil.h>
+
+#include <QApplication>
+#include "serviceapp.h"
+
+int main(int argc, char **argv)
+{
+    // qInstallMsgHandler(XQSERVICEMESSAGEHANDLER);
+    XQSERVICE_DEBUG_PRINT("ServiceApp::main");
+    XQSERVICE_DEBUG_PRINT("ServiceApp::main:isService (argv)=%d", XQServiceUtil::isService(argc,argv));
+    XQSERVICE_DEBUG_PRINT("ServiceApp::main:interfaceName (argv)=%s", qPrintable(XQServiceUtil::interfaceName(argc,argv)));
+    XQSERVICE_DEBUG_PRINT("ServiceApp::main:serviceName (argv)=%s", qPrintable(XQServiceUtil::serviceName(argc,argv)));
+    XQSERVICE_DEBUG_PRINT("ServiceApp::main:isEmbbedded (argv)=%d", XQServiceUtil::isEmbedded(argc,argv));
+    XQSERVICE_DEBUG_PRINT("ServiceApp::main:operationName (argv)=%s", qPrintable(XQServiceUtil::operationName(argc,argv)));
+    
+    QApplication a( argc, argv );
+
+    XQSERVICE_DEBUG_PRINT("ServiceApp::main:isService =%d", XQServiceUtil::isService());
+    XQSERVICE_DEBUG_PRINT("ServiceApp::main:interfaceName=%s", qPrintable(XQServiceUtil::interfaceName()));
+    XQSERVICE_DEBUG_PRINT("ServiceApp::main:serviceName =%s", qPrintable(XQServiceUtil::serviceName()));
+    XQSERVICE_DEBUG_PRINT("ServiceApp::main:isEmbbedded =%d", XQServiceUtil::isEmbedded());
+    XQSERVICE_DEBUG_PRINT("ServiceApp::main:operationName =%s", qPrintable(XQServiceUtil::operationName()));
+    
+    ServiceApp *cl = new ServiceApp();
+    cl->show();
+    int rv = a.exec();
+    delete cl;
+    return rv;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceapp/src/serviceapp.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1070 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <QApplication>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QVBoxLayout>
+#include <QStackedWidget>
+#include <QImageReader>
+#include <QDebug>
+#include <QTimer>
+#include <QPushButton>
+#include <QLineEdit>
+#include <QListView>
+#include <QMessageBox>
+#include <xqsharablefile.h>
+
+#include "testservicedata.h"
+#include "serviceapp.h"
+#include <xqserviceutil.h>
+
+ServiceApp::ServiceApp(QWidget *parent, Qt::WFlags f)
+    : QWidget(parent, f),
+      mDialService(NULL),
+      mUriService(NULL),
+      mFileService(NULL),
+      mNewDialService(NULL),
+      mNewFileService(NULL),
+      mNewUriService(NULL)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceApp::ServiceApp");
+    if (XQServiceUtil::isService())
+    {
+        mDialService = new DialerService(this);
+        mUriService = new UriService(this);
+        mFileService = new FileService(this);
+        mNewDialService = new NewDialerService(this);
+        mNewUriService = new NewUriService(this);
+        mNewFileService = new NewFileService(this);
+    }
+    /* Adjust the palette */
+#if defined(Q_WS_S60)
+    QPalette p = qApp->palette();
+    QColor color(192,192,192);
+    QColor bg(201,250,250);
+    p.setColor(QPalette::Highlight, color.lighter(200));
+    p.setColor(QPalette::Text, Qt::black);
+    p.setColor(QPalette::Base, bg);
+    p.setColor(QPalette::WindowText, Qt::black);
+    p.setColor(QPalette::Window, bg);
+    p.setColor(QPalette::ButtonText, Qt::black);
+    p.setColor(QPalette::Button, color.lighter(150));
+    p.setColor(QPalette::Link, QColor(240,40,40));
+
+    qApp->setPalette(p);
+#endif
+
+    QPushButton *quitButton = new QPushButton(tr("Quit"));
+    QPushButton *answerButtonDial = new QPushButton(tr("Dial answer"));
+    QPushButton *answerButtonUri = new QPushButton(tr("Uri answer"));
+    QPushButton *answerButtonFile = new QPushButton(tr("File answer"));
+    connect(quitButton, SIGNAL(clicked()), this, SLOT(quit()));
+    connect(answerButtonDial, SIGNAL(clicked()), this, SLOT(answerDial()));
+    connect(answerButtonUri, SIGNAL(clicked()), this, SLOT(answerUri()));
+    connect(answerButtonFile, SIGNAL(clicked()), this, SLOT(answerFile()));
+
+    /*
+    mEndCallButton = new QPushButton(tr("End Call"));
+    mEndCallButton->setEnabled(false);
+    connect(mEndCallButton, SIGNAL(clicked()), this, SLOT(endCall()));
+    */
+    bool isService = XQServiceUtil::isService();
+    QString interface = XQServiceUtil::interfaceName();
+    QString operation = XQServiceUtil::operationName();
+    
+    QString t = "SERVICEAPP:\n";
+    t = t + (isService ?  "    Service launch\n" : "    Normal launch\n");
+    t = t + (XQServiceUtil::isEmbedded() ? "    Embedded\n" : "    Not embedded\n");
+    t = t + ("    Interface=" + interface + "\n");
+    t = t + ("    Operation=" + operation + "\n");
+
+    QLabel *title = new QLabel(t);
+
+    mLabel = new QLabel("");
+    mNumber = new QLineEdit("");
+    
+    QVBoxLayout *vl = new QVBoxLayout;
+    vl->setMargin(0);
+    vl->setSpacing(0);
+
+    vl->addWidget(quitButton);
+    vl->addWidget(answerButtonDial);
+    vl->addWidget(answerButtonUri);
+    vl->addWidget(answerButtonFile);
+    vl->addWidget(title);
+    vl->addWidget(mLabel);
+    vl->addWidget(mNumber);
+
+    setLayout(vl);
+   
+#if defined(Q_WS_X11) || defined(Q_WS_WIN)
+    setFixedSize(QSize(360,640)); // nHD
+#elif defined(Q_WS_S60)
+    // showMaximized();
+    showFullScreen();
+#endif
+//    new DialerService(this);
+}
+
+
+ServiceApp::~ServiceApp()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceApp::~ServiceApp");
+    delete mDialService;
+    delete mUriService;
+    delete mFileService;
+}
+
+void ServiceApp::quit()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceApp::quit");
+    qApp->quit();
+}
+
+void ServiceApp::answerDial()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceApp::answerDial");
+    if (mDialService && mDialService->asyncAnswer())
+    {
+        mDialService->complete(mNumber->text());
+    }
+    if (mNewDialService && mNewDialService->asyncAnswer())
+    {
+        mNewDialService->complete(mNumber->text());
+    }
+}
+
+
+void ServiceApp::answerUri()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceApp::answerUri");
+    if (mUriService && mUriService->asyncAnswer())
+    {
+        mUriService->complete(true);
+    }
+    if (mNewUriService && mNewUriService->asyncAnswer())
+    {
+        mNewUriService->complete(true);
+    }
+}
+
+void ServiceApp::answerFile()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceApp::answerFile");
+    if (mFileService && mFileService->asyncAnswer())
+    {
+        mFileService->complete(true);
+    }
+    if (mNewFileService && mNewFileService->asyncAnswer())
+    {
+        mNewFileService->complete(true);
+    }
+}
+
+
+
+void ServiceApp::endCall()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceApp::endCall");
+    //QVBoxLayout *vl = qobject_cast<QVBoxLayout *>(layout()) ;
+    //vl->removeWidget(mEndCallButton);
+
+    //XQServiceUtil::toBackground(true);
+}
+
+void ServiceApp::setLabelNumber(QString label,QString number)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceApp::setLabelNumber");
+    mLabel->setText(label);
+    mNumber->setText(number);
+}
+
+// ----------DialerService---------------
+
+DialerService::DialerService(ServiceApp* parent)
+: XQServiceProvider(QLatin1String("com.nokia.services.serviceapp.Dialer"),parent),
+  mServiceApp(parent)
+{
+    XQSERVICE_DEBUG_PRINT("DialerService::DialerService");
+    publishAll();
+}
+
+DialerService::~DialerService()
+{
+    XQSERVICE_DEBUG_PRINT("DialerService::~DialerService");
+}
+
+void DialerService::complete(QString number)
+{
+    XQSERVICE_DEBUG_PRINT("DialerService::complete");
+
+    // Complete all IDs
+    foreach (quint32 reqId, mAsyncReqIds)
+    {
+        XQSERVICE_DEBUG_PRINT("DialerService::complete %d", reqId);
+        completeRequest(reqId, number.toInt());
+    }
+}
+
+int DialerService::dial(const QString& number, bool asyncAnswer)
+{
+    Q_UNUSED(asyncAnswer);
+    
+    XQRequestInfo info = requestInfo();
+    QString testCase = (info.info(TESTCASE_INFO_KEY)).toString();
+    XQSERVICE_DEBUG_PRINT("XQTESTER serviceapp,%s,DialerService::dial", qPrintable(testCase));
+    
+    XQSERVICE_DEBUG_PRINT("\tRequest info: id=%d,sid=%X,vid=%X", info.id(), info.clientSecureId(), info.clientVendorId());
+    QSet<int> caps = info.clientCapabilities();
+    QSetIterator<int> i(caps);
+    while (i.hasNext())
+        qDebug() << "Has capability " << i.next();    
+    XQSERVICE_DEBUG_PRINT("\tRequest info: embed=%d,sync=%d", info.isEmbedded(), info.isSynchronous());
+
+    bool isAsync = !info.isSynchronous();
+    QString label = "Dialer::dial:\n";
+    label += QString("number=%1\n").arg(number);
+    label += QString("async=%1\n").arg(isAsync);
+    
+    connect(this, SIGNAL(returnValueDelivered()), this, SLOT(handleAnswerDelivered()));
+    
+    mNumber = number ;
+    mServiceApp->setLabelNumber(label, number);
+    int ret = 0;
+    if (isAsync)
+    {
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
+        connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
+    }
+    else
+    {
+        ret = number.toInt();
+    }
+    return ret;
+}
+
+CntServicesContactList DialerService::testContactList(CntServicesContactList list)
+{
+    XQSERVICE_DEBUG_PRINT("DialerService::testContactList");
+    showRecipients(list);
+
+    // Create output
+    CntServicesContact cnt1;
+    cnt1.mDisplayName = "Test1-Return";
+    cnt1.mPhoneNumber = "060-1111111";
+    cnt1.mEmailAddress = "test1.return@nokia.com";
+
+    CntServicesContact cnt2;
+    cnt2.mDisplayName = "Test1-Return";
+    cnt2.mPhoneNumber = "060-2222222";
+    cnt2.mEmailAddress = "test2.return@nokia.com";
+
+    CntServicesContactList ret;
+    ret.append(cnt1);
+    ret.append(cnt2);
+
+    return ret;
+    
+}
+
+QVariant DialerService::testVariant(QVariant variant)
+{
+    XQRequestInfo info = requestInfo();
+    QString testCase = (info.info(TESTCASE_INFO_KEY)).toString();
+    XQSERVICE_DEBUG_PRINT("XQTESTER serviceapp,%s,DialerService::testVariant", qPrintable(testCase));
+
+    XQSERVICE_DEBUG_PRINT("DialerService::testVariant::variant(%d,%d,%s)",
+                          variant.type(), variant.userType(), variant.typeName());
+    XQSERVICE_DEBUG_PRINT("DialerService::testVariant::variant value=%s", qPrintable(variant.toString()));
+
+    if (variant.typeName() == QLatin1String("QStringList"))
+    {
+        qDebug() << "DialerService::testVariant QStringList";
+        QStringList ret = variant.toStringList();
+        return qVariantFromValue(ret);
+    }
+    else if (variant.typeName() == QLatin1String("XQShabarableFile"))
+    {
+        qDebug() << "DialerService::testVariant XQShabarableFile";
+        XQSharableFile sf = variant.value<XQSharableFile>();
+        
+        RFile file;
+        bool ok = sf.getHandle( file );
+        if (ok)
+        {
+            HBufC8* data = HBufC8::NewL(100);
+            TPtr8 ptr = data->Des();
+            TInt err  = file.Read( ptr );
+            QString text = QString::fromUtf8((const char *)(data->Ptr()), data->Length());
+            XQSERVICE_DEBUG_PRINT("DialerService::testVariant ::file content,%d,%s", err, qPrintable(text));
+            sf.close();
+            delete data;
+        }
+
+        return QVariant(ok);
+        
+    }
+    else if (variant.typeName() == QLatin1String("XQRequestInfo"))
+    {
+        qDebug() << "DialerService::testVariant XQRequestInfo";
+        XQRequestInfo info = variant.value<XQRequestInfo>();
+        QStringList keys = info.infoKeys();
+        foreach (QString key, keys)
+        {
+            XQSERVICE_DEBUG_PRINT("DialerService::testVariant: info %s=%s",
+                                  qPrintable(key),
+                                  qPrintable(info.info(key).toString()));
+        }
+
+        return qVariantFromValue(info);
+        
+    }
+    else if (variant.typeName() == QLatin1String("CntServicesContactList"))
+    {
+        qDebug() << "DialerService::testVariant CntServicesContactList";
+        // Show input
+        showRecipients(variant);
+
+        // Create output
+        CntServicesContact cnt1;
+        cnt1.mDisplayName = "Test1-Return";
+        cnt1.mPhoneNumber = "060-1111111";
+        cnt1.mEmailAddress = "test1.return@nokia.com";
+
+        CntServicesContact cnt2;
+        cnt2.mDisplayName = "Test1-Return";
+        cnt2.mPhoneNumber = "060-2222222";
+        cnt2.mEmailAddress = "test2.return@nokia.com";
+
+        CntServicesContactList list;
+        list.append(cnt1);
+        list.append(cnt2);
+
+        // Return contact list back
+        return qVariantFromValue(list);
+    }
+    else
+    {
+        return variant.toString();
+    }
+}
+
+void DialerService::handleClientDisconnect()
+{
+    XQSERVICE_DEBUG_PRINT("DialerService::handleClientDisconnect");
+
+    // Get the info of the cancelled request
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tDisconnected request info: id=%d,sid=%X,vid=%X", info.id(),info.clientSecureId(), info.clientVendorId());
+    
+    // Just quit service application if client ends
+    mServiceApp->quit();
+}
+
+void DialerService::handleAnswerDelivered()
+{
+    XQSERVICE_DEBUG_PRINT("DialerService::handleAnswerDelivered");
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tRequest info: sid=%X,vid=%X", info.clientSecureId(), info.clientVendorId());
+    // Done
+    mAsyncReqIds.remove(info.clientSecureId());
+}
+
+
+
+void DialerService::showRecipients(QVariant &value)
+{
+    CntServicesContactList list;
+    if(value.canConvert<CntServicesContactList>())
+    {
+        qDebug() << "DialerService::showRecipients: canConvert";
+        list = qVariantValue<CntServicesContactList>(value);
+    }
+    else
+    {
+        qDebug() << "DialerService::showRecipients: canConvert NOK";
+        return;
+    }    
+
+    showRecipients(list);
+}
+
+void DialerService::showRecipients(CntServicesContactList &list)
+{
+    if (list.count() == 0)
+    {
+        qDebug() << "DialerService::showRecipients(2): Count==0";
+    }
+    else
+    {
+        for (int i = 0; i < list.count(); ++i)
+        {
+            qDebug() << "DialerService::showRecipients(2)[" << i << "]=" << list[i].mDisplayName;
+            qDebug() << "DialerService::showRecipients(2)[" << i << "]=" << list[i].mPhoneNumber;
+            qDebug() << "DialerService::showRecipients(2)[" << i << "]=" << list[i].mEmailAddress;
+        }
+    }
+}
+
+
+// ----------New dialler service---------------
+
+NewDialerService::NewDialerService(ServiceApp* parent)
+: XQServiceProvider(QLatin1String("serviceapp.Dialer"),parent),
+mServiceApp(parent)
+{
+    XQSERVICE_DEBUG_PRINT("NewDialerService::NewDialerService");
+    publishAll();
+}
+
+NewDialerService::~NewDialerService()
+{
+    XQSERVICE_DEBUG_PRINT("NewDialerService::~NewDialerService");
+}
+
+void NewDialerService::complete(QString number)
+{
+    XQSERVICE_DEBUG_PRINT("NewDialerService::complete");
+
+    // Complete all IDs
+    foreach (quint32 reqId, mAsyncReqIds)
+    {
+        XQSERVICE_DEBUG_PRINT("NewDialerService::complete %d", reqId);
+        completeRequest(reqId, number.toInt());
+    }
+}
+
+int NewDialerService::dial(const QString& number, bool asyncAnswer)
+{
+    Q_UNUSED(asyncAnswer);
+
+    XQRequestInfo info = requestInfo();
+    QString testCase = (info.info(TESTCASE_INFO_KEY)).toString();
+    XQSERVICE_DEBUG_PRINT("XQTESTER serviceapp,%s,NewDialerService::dial", qPrintable(testCase));
+    
+    XQSERVICE_DEBUG_PRINT("\tRequest info: id=%d,sid=%X,vid=%X", info.id(), info.clientSecureId(), info.clientVendorId());
+    QSet<int> caps = info.clientCapabilities();
+    QSetIterator<int> i(caps);
+    while (i.hasNext())
+        qDebug() << "Has capability " << i.next();    
+    XQSERVICE_DEBUG_PRINT("\tRequest info: embed=%d,sync=%d", info.isEmbedded(), info.isSynchronous());
+
+    bool isAsync = !info.isSynchronous();
+    
+    QString label = "NewDialer::dial:\n";
+    label += QString("number=%1\n").arg(number);
+    label += QString("async=%1\n").arg(isAsync);
+
+    connect(this, SIGNAL(returnValueDelivered()), this, SLOT(handleAnswerDelivered()));
+
+    mNumber = number ;
+    mServiceApp->setLabelNumber(label, number);
+    int ret = 0;
+    if (isAsync)
+    {
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
+        connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
+    }
+    else
+    {
+        ret = number.toInt();
+    }
+    return ret;
+}
+
+CntServicesContactList NewDialerService::testContactList(CntServicesContactList list)
+{
+    XQSERVICE_DEBUG_PRINT("NewDialerService::testContactList");
+    showRecipients(list);
+
+    // Create output
+    CntServicesContact cnt1;
+    cnt1.mDisplayName = "Test1-Return";
+    cnt1.mPhoneNumber = "060-1111111";
+    cnt1.mEmailAddress = "test1.return@nokia.com";
+
+    CntServicesContact cnt2;
+    cnt2.mDisplayName = "Test1-Return";
+    cnt2.mPhoneNumber = "060-2222222";
+    cnt2.mEmailAddress = "test2.return@nokia.com";
+
+    CntServicesContactList ret;
+    ret.append(cnt1);
+    ret.append(cnt2);
+
+    return ret;
+
+}
+
+QVariant NewDialerService::testVariant(QVariant variant)
+{
+    XQRequestInfo info = requestInfo();
+    QString testCase = (info.info(TESTCASE_INFO_KEY)).toString();
+    XQSERVICE_DEBUG_PRINT("XQTESTER serviceapp,%s,NewDialerService::testVariant", qPrintable(testCase));
+    
+    XQSERVICE_DEBUG_PRINT("NewDialerService::testVariant::variant(%d,%d,%s)",
+                          variant.type(), variant.userType(), variant.typeName());
+    XQSERVICE_DEBUG_PRINT("NewDialerService::testVariant::variant value=%s", qPrintable(variant.toString()));
+
+    if (variant.typeName() == QLatin1String("QStringList"))
+    {
+        QStringList ret = variant.toStringList();
+        return qVariantFromValue(ret);
+    }
+    else if (variant.typeName() == QLatin1String("TestServiceDataList"))
+    {
+        qDebug() << "DialerService::testVariant TestServiceDataList";
+        TestServiceDataList list;
+        if(variant.canConvert<TestServiceDataList>())
+        {
+            qDebug() << "DialerService::TestServiceDataList: canConvert OK";
+            list = qVariantValue<TestServiceDataList>(variant);
+            for (int i = 0; i < list.count(); ++i)
+            {
+                qDebug() << "DialerService::TestServiceDataList[" << i << "]=" << list[i].mType;
+                qDebug() << "DialerService::TestServiceDataList[" << i << "]=" << list[i].mData.toString();
+            }
+        }
+        else
+        {
+            qDebug() << "DialerService::TestServiceDataList: canConvert NOK";
+        }    
+
+        TestServiceDataList resultList;
+        QVariant v1;
+        QVariant v2;
+        QVariant v3;
+        v1.setValue((int)99);
+        v2.setValue((bool)false);
+        v3.setValue(QString("Variant3 return"));
+        TestServiceData data1(1, v1);
+        TestServiceData data2(2, v2);
+        TestServiceData data3(3, v3);
+        resultList.append(data1);
+        resultList.append(data2);
+        resultList.append(data3);
+        
+        // Return some data back
+        return qVariantFromValue(resultList);
+    }
+    else if (variant.typeName() == QLatin1String("XQShabarableFile"))
+    {
+        XQSharableFile sf = variant.value<XQSharableFile>();
+
+        RFile file;
+        bool ok = sf.getHandle( file );
+        if (ok)
+        {
+            HBufC8* data = HBufC8::NewL(100);
+            TPtr8 ptr = data->Des();
+            TInt err  = file.Read( ptr );
+            QString text = QString::fromUtf8((const char *)(data->Ptr()), data->Length());
+            XQSERVICE_DEBUG_PRINT("NewDialerService::testVariant ::file content,%d,%s", err, qPrintable(text));
+            sf.close();
+            delete data;
+        }
+
+        return QVariant(ok);
+
+    }
+    else if (variant.typeName() == QLatin1String("XQRequestInfo"))
+    {
+        XQRequestInfo info = variant.value<XQRequestInfo>();
+        QStringList keys = info.infoKeys();
+        foreach (QString key, keys)
+        {
+            XQSERVICE_DEBUG_PRINT("NewDialerService::testVariant: info %s=%s",
+                                  qPrintable(key),
+                                  qPrintable(info.info(key).toString()));
+        }
+
+        return qVariantFromValue(info);
+
+    }
+    else if (variant.typeName() == QLatin1String("CntServicesContactList"))
+    {
+        // Show input
+        showRecipients(variant);
+
+        // Create output
+        CntServicesContact cnt1;
+        cnt1.mDisplayName = "Test1-Return";
+        cnt1.mPhoneNumber = "060-1111111";
+        cnt1.mEmailAddress = "test1.return@nokia.com";
+
+        CntServicesContact cnt2;
+        cnt2.mDisplayName = "Test1-Return";
+        cnt2.mPhoneNumber = "060-2222222";
+        cnt2.mEmailAddress = "test2.return@nokia.com";
+
+        CntServicesContactList list;
+        list.append(cnt1);
+        list.append(cnt2);
+
+        // Return contact list back
+        return qVariantFromValue(list);
+    }
+    else if (variant.typeName() == QLatin1String("QByteArray"))
+    {
+        QByteArray val = variant.value<QByteArray>();
+        qDebug() << "DialerService::QByteArray size=" << val.size();
+        return qVariantFromValue(val);
+    }
+    else
+    {
+        return variant.toString();
+    }
+}
+
+void NewDialerService::handleClientDisconnect()
+{
+    XQSERVICE_DEBUG_PRINT("NewDialerService::handleClientDisconnect");
+
+    // Get the info of the cancelled request
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tDisconnected request info: id=%d,sid=%X,vid=%X", info.id(),info.clientSecureId(), info.clientVendorId());
+
+    // Just quit service application if client ends
+    mServiceApp->quit();
+}
+
+void NewDialerService::handleAnswerDelivered()
+{
+    XQSERVICE_DEBUG_PRINT("NewDialerService::handleAnswerDelivered");
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tRequest info: sid=%X,vid=%X", info.clientSecureId(), info.clientVendorId());
+    // Done
+    mAsyncReqIds.remove(info.clientSecureId());
+}
+
+
+
+void NewDialerService::showRecipients(QVariant &value)
+{
+    CntServicesContactList list;
+    if(value.canConvert<CntServicesContactList>())
+    {
+        qDebug() << "NewDialerService::showRecipients: canConvert";
+        list = qVariantValue<CntServicesContactList>(value);
+    }
+    else
+    {
+        qDebug() << "NewDialerService::showRecipients: canConvert NOK";
+        return;
+    }    
+
+    showRecipients(list);
+}
+
+void NewDialerService::showRecipients(CntServicesContactList &list)
+{
+    if (list.count() == 0)
+    {
+        qDebug() << "NewDialerService::showRecipients(2): Count==0";
+    }
+    else
+    {
+        for (int i = 0; i < list.count(); ++i)
+        {
+            qDebug() << "NewDialerService::showRecipients(2)[" << i << "]=" << list[i].mDisplayName;
+            qDebug() << "NewDialerService::showRecipients(2)[" << i << "]=" << list[i].mPhoneNumber;
+            qDebug() << "NewDialerService::showRecipients(2)[" << i << "]=" << list[i].mEmailAddress;
+        }
+    }
+}
+
+
+
+Q_IMPLEMENT_USER_METATYPE(CntServicesContact)
+Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(CntServicesContactList)
+
+Q_IMPLEMENT_USER_METATYPE(TestServiceData)
+Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(TestServiceDataList)
+
+// ----------UriService---------------
+
+UriService::UriService(ServiceApp* parent)
+: XQServiceProvider(QLatin1String("com.nokia.services.serviceapp.com.nokia.symbian.IUriView"),parent),
+    mServiceApp(parent)
+    
+{
+    XQSERVICE_DEBUG_PRINT("UriService::UriService");
+    publishAll();
+}
+
+UriService::~UriService()
+{
+    XQSERVICE_DEBUG_PRINT("UriService::~UriService");
+}
+
+void UriService::complete(bool ok)
+{
+    Q_UNUSED(ok)
+    XQSERVICE_DEBUG_PRINT("UriService::complete");
+    // Complete all IDs
+    foreach (quint32 reqId, mAsyncReqIds)
+    {
+        XQSERVICE_DEBUG_PRINT("UriService::complete %d", reqId);
+        completeRequest(reqId, QVariant(mRetValue));
+    }
+}
+
+bool UriService::view(const QString& uri)
+{
+    XQSERVICE_DEBUG_PRINT("UriService::view(1)");
+    return view(uri, true);
+}
+
+bool UriService::view(const QString& uri, bool retValue)
+{
+    XQRequestInfo info = requestInfo();
+    QString testCase = (info.info(TESTCASE_INFO_KEY)).toString();
+    XQSERVICE_DEBUG_PRINT("XQTESTER serviceapp,%s,UriService::view", qPrintable(testCase));
+    
+    QString label = "IUriView::view\n:";
+    label += QString ("Uri=%1\n").arg(uri);
+    label += QString ("retValue=%1\n").arg(retValue);
+    QString param = QString ("retValue=%1\n").arg(retValue);
+
+    bool isAsync = !info.isSynchronous();;
+    connect(this, SIGNAL(returnValueDelivered()), this, SLOT(handleAnswerDelivered()));
+
+    mRetValue = retValue;
+    mServiceApp->setLabelNumber(label,param);
+    if (isAsync)
+    {
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
+        connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
+    }
+    
+    return retValue;
+}
+
+void UriService::handleClientDisconnect()
+{
+    XQSERVICE_DEBUG_PRINT("UriService::handleClientDisconnect");
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tRequest info: id=%d,sid=%X,vid=%X", info.id(),info.clientSecureId(), info.clientVendorId());
+
+    mAsyncReqIds.remove(info.clientSecureId());
+    mServiceApp->quit();
+}
+
+void UriService::handleAnswerDelivered()
+{
+    XQSERVICE_DEBUG_PRINT("UriService::handleAnswerDelivered");
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tRequest info: sid=%X,vid=%X", info.clientSecureId(), info.clientVendorId());
+    // Done
+    mAsyncReqIds.remove(info.clientSecureId());
+    
+}
+
+// ----------NewUriService---------------
+
+NewUriService::NewUriService(ServiceApp* parent)
+: XQServiceProvider(QLatin1String("serviceapp.com.nokia.symbian.IUriView"),parent),
+mServiceApp(parent)
+
+{
+    XQSERVICE_DEBUG_PRINT("NewUriService::NewUriService");
+    publishAll();
+}
+
+NewUriService::~NewUriService()
+{
+    XQSERVICE_DEBUG_PRINT("NewUriService::~NewUriService");
+}
+
+void NewUriService::complete(bool ok)
+{
+    Q_UNUSED(ok);
+    XQSERVICE_DEBUG_PRINT("NewUriService::complete");
+    // Complete all IDs
+    foreach (quint32 reqId, mAsyncReqIds)
+    {
+        XQSERVICE_DEBUG_PRINT("NewUriService::complete %d", reqId);
+        completeRequest(reqId, QVariant(mRetValue));
+    }
+}
+
+bool NewUriService::view(const QString& uri)
+{
+    XQSERVICE_DEBUG_PRINT("NewUriService::view(1)");
+    return view(uri, true);
+}
+
+bool NewUriService::view(const QString& uri, bool retValue)
+{
+    XQRequestInfo info = requestInfo();
+    QString testCase = (info.info(TESTCASE_INFO_KEY)).toString();
+    XQSERVICE_DEBUG_PRINT("XQTESTER serviceapp,%s,NewUriService::view", qPrintable(testCase));
+    
+    QString label = "New IUriView::view\n:";
+    label += QString ("Uri=%1\n").arg(uri);
+    label += QString ("retValue=%1\n").arg(retValue);
+    QString param = QString ("retValue=%1\n").arg(retValue);
+
+    bool isAsync = !info.isSynchronous();;
+    connect(this, SIGNAL(returnValueDelivered()), this, SLOT(handleAnswerDelivered()));
+
+    mRetValue = retValue;
+    mServiceApp->setLabelNumber(label,param);
+    if (isAsync)
+    {
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
+        connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
+    }
+
+    return retValue;
+}
+
+void NewUriService::handleClientDisconnect()
+{
+    XQSERVICE_DEBUG_PRINT("NewUriService::handleClientDisconnect");
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tRequest info: id=%d,sid=%X,vid=%X", info.id(),info.clientSecureId(), info.clientVendorId());
+
+    mAsyncReqIds.remove(info.clientSecureId());
+    mServiceApp->quit();
+}
+
+void NewUriService::handleAnswerDelivered()
+{
+    XQSERVICE_DEBUG_PRINT("NewUriService::handleAnswerDelivered");
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tRequest info: sid=%X,vid=%X", info.clientSecureId(), info.clientVendorId());
+    // Done
+    mAsyncReqIds.remove(info.clientSecureId());
+
+}
+
+
+// ----------FileService---------------
+
+FileService::FileService(ServiceApp* parent)
+: XQServiceProvider(QLatin1String("com.nokia.services.serviceapp.com.nokia.symbian.IFileView"),parent),
+    mServiceApp(parent)
+
+{
+    XQSERVICE_DEBUG_PRINT("FileService::FileService");
+    publishAll();
+}
+
+FileService::~FileService()
+{
+    XQSERVICE_DEBUG_PRINT("FileService::~FileService");
+}
+
+void FileService::complete(bool ok)
+{
+    XQSERVICE_DEBUG_PRINT("FileService::complete");
+    // Complete all
+    foreach (quint32 reqId, mAsyncReqIds)
+    {
+        XQSERVICE_DEBUG_PRINT("FileService::complete %d", reqId);
+        completeRequest(reqId, QVariant(ok));
+    }
+}
+
+bool FileService::view(QString file)
+{
+    XQRequestInfo info = requestInfo();
+    QString testCase = (info.info(TESTCASE_INFO_KEY)).toString();
+    XQSERVICE_DEBUG_PRINT("XQTESTER serviceapp,%s,FileService::view", qPrintable(testCase));
+
+    QString label = "IFileView::view\n:";
+    QString param = QString ("File=%1\n").arg(file);
+
+    bool isAsync = !info.isSynchronous();;
+    connect(this, SIGNAL(returnValueDelivered()), this, SLOT(handleAnswerDelivered()));
+
+    mServiceApp->setLabelNumber(label,param);
+    if (isAsync)
+    {
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
+        connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
+    }
+    
+    return true;
+}
+
+
+bool FileService::view(XQSharableFile sf)
+{
+    XQSERVICE_DEBUG_PRINT("FileService::view(XQSharebleFile)");
+    QString label = "IFile::view\n:";
+    QString param = QString ("File=%1\n").arg(sf.fileName());
+
+    RFile file;
+    bool ok = sf.getHandle( file );
+    if (ok)
+    {
+        HBufC8* data = HBufC8::NewL(100);
+        TPtr8 ptr = data->Des();
+        TInt err  = file.Read( ptr );
+        QString text = QString::fromUtf8((const char *)(data->Ptr()), data->Length());
+        XQSERVICE_DEBUG_PRINT("FileService::file read,%d,%s", err, qPrintable(text));
+        sf.close();
+        delete data;
+    }
+
+    XQRequestInfo info = requestInfo();
+    bool isAsync = !info.isSynchronous();;
+    
+    mServiceApp->setLabelNumber(label,param);
+    if (isAsync)
+    {
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
+        connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
+    }
+    return true;
+}
+
+
+void FileService::handleClientDisconnect()
+{
+    XQSERVICE_DEBUG_PRINT("FileService::handleClientDisconnect");
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tRequest info: id=%d,sid=%X,vid=%X", info.id(),info.clientSecureId(), info.clientVendorId());
+
+    mAsyncReqIds.remove(info.clientSecureId());
+    mServiceApp->quit();
+}
+
+
+void FileService::handleAnswerDelivered()
+{
+    XQSERVICE_DEBUG_PRINT("FileService::handleAnswerDelivered");
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tRequest info: sid=%X,vid=%X", info.clientSecureId(), info.clientVendorId());
+    // Done
+    mAsyncReqIds.remove(info.clientSecureId());
+    
+}
+
+
+// ----------NewFileService---------------
+
+NewFileService::NewFileService(ServiceApp* parent)
+: XQServiceProvider(QLatin1String("serviceapp.com.nokia.symbian.IFileView"),parent),
+mServiceApp(parent)
+
+{
+    XQSERVICE_DEBUG_PRINT("NewFileService::NewFileService");
+    publishAll();
+}
+
+NewFileService::~NewFileService()
+{
+    XQSERVICE_DEBUG_PRINT("NewFileService::~NewFileService");
+}
+
+void NewFileService::complete(bool ok)
+{
+    XQSERVICE_DEBUG_PRINT("NewFileService::complete");
+    // Complete all
+    foreach (quint32 reqId, mAsyncReqIds)
+    {
+        XQSERVICE_DEBUG_PRINT("NewFileService::complete %d", reqId);
+        completeRequest(reqId, QVariant(ok));
+    }
+}
+
+bool NewFileService::view(QString file)
+{
+    XQRequestInfo info = requestInfo();
+    QString testCase = (info.info(TESTCASE_INFO_KEY)).toString();
+    XQSERVICE_DEBUG_PRINT("XQTESTER serviceapp,%s,NewFileService::view", qPrintable(testCase));
+    
+    QString label = "New IFileView::view\n:";
+    QString param = QString ("File=%1\n").arg(file);
+
+    bool isAsync = !info.isSynchronous();;
+    connect(this, SIGNAL(returnValueDelivered()), this, SLOT(handleAnswerDelivered()));
+
+    mServiceApp->setLabelNumber(label,param);
+    if (isAsync)
+    {
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
+        connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
+    }
+
+    return true;
+}
+
+
+bool NewFileService::view(XQSharableFile sf)
+{
+    XQSERVICE_DEBUG_PRINT("NewFileService::view(XQSharebleFile)");
+    QString label = "IFile::view\n:";
+    QString param = QString ("File=%1\n").arg(sf.fileName());
+
+    RFile file;
+    bool ok = sf.getHandle( file );
+    if (ok)
+    {
+        HBufC8* data = HBufC8::NewL(100);
+        TPtr8 ptr = data->Des();
+        TInt err  = file.Read( ptr );
+        QString text = QString::fromUtf8((const char *)(data->Ptr()), data->Length());
+        XQSERVICE_DEBUG_PRINT("NewFileService::file read,%d,%s", err, qPrintable(text));
+        sf.close();
+        delete data;
+    }
+
+    XQRequestInfo info = requestInfo();
+    bool isAsync = !info.isSynchronous();;
+
+    mServiceApp->setLabelNumber(label,param);
+    if (isAsync)
+    {
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
+        connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
+    }
+    return true;
+}
+
+
+void NewFileService::handleClientDisconnect()
+{
+    XQSERVICE_DEBUG_PRINT("NewFileService::handleClientDisconnect");
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tRequest info: id=%d,sid=%X,vid=%X", info.id(),info.clientSecureId(), info.clientVendorId());
+
+    mAsyncReqIds.remove(info.clientSecureId());
+    mServiceApp->quit();
+}
+
+
+void NewFileService::handleAnswerDelivered()
+{
+    XQSERVICE_DEBUG_PRINT("NewFileService::handleAnswerDelivered");
+    XQRequestInfo info = requestInfo();
+    XQSERVICE_DEBUG_PRINT("\tRequest info: sid=%X,vid=%X", info.clientSecureId(), info.clientVendorId());
+    // Done
+    mAsyncReqIds.remove(info.clientSecureId());
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceapp/src/serviceapp.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,235 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef PHONESERVICE_H
+#define PHONESERVICE_H
+
+#include <QWidget>
+#include <QModelIndex>
+#include <QMap>
+#include <QStringList>
+#include <xqserviceprovider.h>
+#include <xqsharablefile.h>
+#include <cntservicescontact.h>
+
+class QLineEdit;
+class QPushButton;
+class DialerService;
+class UriService;
+class QLabel;
+class FileService;
+class XQSharableFile;
+class NewDialerService;
+class NewUriService;
+class NewFileService;
+
+
+class ServiceApp : public QWidget
+{
+    Q_OBJECT
+public:
+    ServiceApp( QWidget *parent = 0, Qt::WFlags f = 0 );
+    ~ServiceApp();
+
+    void setLabelNumber(QString label,QString number);
+
+public slots:    
+    void endCall();
+    
+public slots:
+    void quit();
+    void answerDial();
+    void answerUri();
+    void answerFile();
+    
+private:
+    QLabel *mLabel;
+    QLineEdit *mNumber;
+    //QPushButton *mEndCallButton;
+    DialerService* mDialService;
+    UriService* mUriService;
+    FileService* mFileService;
+    NewDialerService* mNewDialService;
+    NewUriService* mNewUriService;
+    NewFileService* mNewFileService;
+};
+
+class DialerService : public XQServiceProvider
+{
+    Q_OBJECT
+public:
+    DialerService( ServiceApp *parent = 0 );
+    ~DialerService();
+    
+    void complete(QString number);
+    bool asyncAnswer() {return mAsyncReqIds.count() > 0;}
+    
+public slots:
+    int dial(const QString& number, bool asyncAnswer);
+    QVariant testVariant(QVariant variant);
+    CntServicesContactList testContactList(CntServicesContactList list);
+
+protected slots:
+   void handleClientDisconnect();
+   void handleAnswerDelivered();
+
+protected:
+    void showRecipients(QVariant &value);
+    void showRecipients(CntServicesContactList &value);
+
+protected:
+    ServiceApp* mServiceApp;
+    QString mNumber;
+    QMap<quint32,int> mAsyncReqIds;
+};
+
+
+class NewDialerService : public XQServiceProvider
+{
+    Q_OBJECT
+    public:
+        NewDialerService( ServiceApp *parent = 0 );
+        ~NewDialerService();
+
+        void complete(QString number);
+        bool asyncAnswer() {return mAsyncReqIds.count() > 0;}
+
+    public slots:
+            int dial(const QString& number, bool asyncAnswer);
+    QVariant testVariant(QVariant variant);
+    CntServicesContactList testContactList(CntServicesContactList list);
+
+    protected slots:
+            void handleClientDisconnect();
+    void handleAnswerDelivered();
+
+    protected:
+        void showRecipients(QVariant &value);
+        void showRecipients(CntServicesContactList &value);
+
+    protected:
+        ServiceApp* mServiceApp;
+        QString mNumber;
+        QMap<quint32,int> mAsyncReqIds;
+};
+
+
+
+class UriService : public XQServiceProvider
+{
+    Q_OBJECT
+    public:
+        UriService( ServiceApp *parent = 0 );
+        ~UriService();
+        bool asyncAnswer() {return mAsyncReqIds.count() > 0;}
+        void complete(bool ok);
+        
+    public slots:
+        bool view(const QString& uri);
+        bool view(const QString& uri, bool returnValue);
+        
+    private slots:
+        void handleClientDisconnect();
+        void handleAnswerDelivered();
+
+    private:
+        ServiceApp* mServiceApp;
+        QMap<quint32,int> mAsyncReqIds;
+        bool mRetValue;
+};
+
+
+class NewUriService : public XQServiceProvider
+{
+    Q_OBJECT
+    public:
+        NewUriService( ServiceApp *parent = 0 );
+        ~NewUriService();
+        bool asyncAnswer() {return mAsyncReqIds.count() > 0;}
+        void complete(bool ok);
+
+    public slots:
+            bool view(const QString& uri);
+    bool view(const QString& uri, bool returnValue);
+
+    private slots:
+            void handleClientDisconnect();
+    void handleAnswerDelivered();
+
+    private:
+        ServiceApp* mServiceApp;
+        QMap<quint32,int> mAsyncReqIds;
+        bool mRetValue;
+};
+
+
+class FileService : public XQServiceProvider
+{
+    Q_OBJECT
+    public:
+        FileService( ServiceApp *parent = 0 );
+        ~FileService();
+        bool asyncAnswer() {return mAsyncReqIds.count() > 0;}
+        void complete(bool ok);
+
+    public slots:
+            bool view(QString file);
+    bool view(XQSharableFile file);
+
+    private slots:
+            void handleClientDisconnect();
+    void handleAnswerDelivered();
+
+    private:
+        ServiceApp* mServiceApp;
+        QMap<quint32,int> mAsyncReqIds;
+        bool mRetValue;
+};
+
+
+class NewFileService : public XQServiceProvider
+{
+    Q_OBJECT
+    public:
+        NewFileService( ServiceApp *parent = 0 );
+        ~NewFileService();
+        bool asyncAnswer() {return mAsyncReqIds.count() > 0;}
+        void complete(bool ok);
+
+    public slots:
+        bool view(QString file);
+        bool view(XQSharableFile file);
+        
+    private slots:
+        void handleClientDisconnect();
+        void handleAnswerDelivered();
+
+    private:
+        ServiceApp* mServiceApp;
+        QMap<quint32,int> mAsyncReqIds;
+        bool mRetValue;
+};
+
+
+#define TESTCASE_INFO_KEY QLatin1String("XQTestCase")
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceapp/src/serviceapp.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+SOURCES=\
+    src/main.cpp\
+    src/serviceapp.cpp
+
+HEADERS=\
+    src/serviceapp.h
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceapp/src/testservicedata.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef TESTSERVICEDATA_H
+#define TESTSERVICEDATA_H
+
+#include <QVariant>
+
+// Custom metatype
+class TestServiceData
+{
+    public:
+
+        TestServiceData() : mType(-1) {}
+        TestServiceData(int aType, const QVariant &aData) :
+                mType(aType),
+                mData(aData)
+                {}
+
+        virtual ~TestServiceData() {}
+
+    public:
+        template <typename Stream> void serialize(Stream &aStream) const;
+        template <typename Stream> void deserialize(Stream &aStream);
+        
+    public:
+        int        mType;
+        QVariant   mData;
+
+};
+
+template <typename Stream> inline void TestServiceData::serialize(Stream &aStream) const
+{
+    aStream << mType;
+    aStream << mData;
+}
+
+template <typename Stream> inline void TestServiceData::deserialize(Stream &aStream)
+{
+    aStream >> mType;
+    aStream >> mData;
+}
+
+typedef QList<TestServiceData> TestServiceDataList;
+
+Q_DECLARE_USER_METATYPE(TestServiceData)
+Q_DECLARE_USER_METATYPE_NO_OPERATORS(TestServiceDataList)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceclient/serviceclient.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE=app
+TARGET=serviceclient
+
+symbian:TARGET.UID3 = 0xE0022E72
+
+XQSERVICE_ROOT=../..
+include(../../xqservicebase.pri)
+include(src/serviceclient.pri)
+
+LIBS+=-lxqservice -lflogger
+
+libFiles.sources = xqservice.dll
+libFiles.path = "!:\sys\bin"
+DEPLOYMENT += libFiles
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceclient/src/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <QApplication>
+#include "serviceclient.h"
+
+int main(int argc, char **argv)
+{
+    // qInstallMsgHandler(XQSERVICEMESSAGEHANDLER);
+    XQSERVICE_DEBUG_PRINT("ServiceClient::main");
+    QApplication a( argc, argv );
+    ServiceClient *cl = new ServiceClient();
+    cl->show();
+    int rv = a.exec();
+    delete cl;
+    return rv;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceclient/src/serviceclient.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,154 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <QApplication>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QVBoxLayout>
+#include <QStackedWidget>
+#include <QImageReader>
+#include <QDebug>
+#include <QTimer>
+#include <QPushButton>
+#include <QLineEdit>
+#include <QDebug>
+#include <QString>
+#include <QCheckBox>
+
+#include <QListView>
+
+#include <xqservicerequest.h>
+
+#include "serviceclient.h"
+
+ServiceClient::ServiceClient(QWidget *parent, Qt::WFlags f)
+    : QWidget(parent, f)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceClient::ServiceClient");
+    snd = NULL;
+    /* Adjust the palette */
+#if defined(Q_WS_S60)
+    QPalette p = qApp->palette();
+    QColor color(80,20,20);
+    QColor bg(256,20,20);
+    p.setColor(QPalette::Highlight, color.lighter(200));
+    p.setColor(QPalette::Text, Qt::white);
+    p.setColor(QPalette::Base, bg);
+    p.setColor(QPalette::WindowText, Qt::white);
+    p.setColor(QPalette::Window, bg);
+    p.setColor(QPalette::ButtonText, Qt::white);
+    p.setColor(QPalette::Button, color.lighter(150));
+    p.setColor(QPalette::Link, QColor(240,40,40));
+
+    qApp->setPalette(p);
+#endif
+
+    QPushButton *quitButton = new QPushButton(tr("quit"));
+    connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+
+    QPushButton *callButton = new QPushButton(tr("call"));
+    connect(callButton, SIGNAL(clicked()), this, SLOT(dial()));
+
+    mCheckSync = new QCheckBox("Synchronous send");
+    mCheckAsyncAnswer = new QCheckBox("Asynchronous Answer");
+    mCheckDeleteRequest = new QCheckBox("Delete request");
+    mCheckDeleteRequest->setCheckState(Qt::Checked);
+    
+    mTextEdit = new QLineEdit("+123456");
+    
+    mTextRetValue = new QLineEdit("no ret value set");
+
+    QLabel *label = new QLabel("CLIENT TEST");
+
+    QVBoxLayout *vl = new QVBoxLayout;
+    vl->setMargin(0);
+    vl->setSpacing(0);
+
+    vl->addWidget(label);
+    vl->addWidget(mCheckSync);
+    vl->addWidget(mCheckAsyncAnswer);
+    vl->addWidget(mCheckDeleteRequest);
+    vl->addWidget(mTextEdit);
+    vl->addWidget(mTextRetValue);
+    vl->addWidget(new QLabel(" "));
+    vl->addWidget(callButton);
+    vl->addWidget(quitButton);
+
+    setLayout(vl);
+
+#if defined(Q_WS_X11) || defined(Q_WS_WIN)
+    setFixedSize(QSize(360,640)); // nHD
+#elif defined(Q_WS_S60)
+    showMaximized();
+    showFullScreen();
+#endif
+}
+
+ServiceClient::~ServiceClient()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceClient::~ServiceClient");
+}
+
+void ServiceClient::dial()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceClient::dial");
+    if (snd) {
+        delete snd ;
+    }
+    mTextRetValue->setText("no ret value set");
+
+    bool isSync = (mCheckSync->checkState() == Qt::Checked);
+    bool asyncAnswer = (mCheckAsyncAnswer->checkState() == Qt::Checked);
+    bool deleteRequest = (mCheckDeleteRequest->checkState() == Qt::Checked);
+    snd = new XQServiceRequest("com.nokia.services.serviceapp.Dialer","dial(QString,bool)",isSync);
+    *snd << mTextEdit->text();
+    *snd << asyncAnswer;
+
+    if (isSync) {
+        int retValue;
+        connect(snd, SIGNAL(requestError(int)), this, SLOT(requestError(int)));
+        bool ret = snd->send(retValue);    
+        mTextRetValue->setText(QString::number(retValue));
+    }
+    else {
+        bool ret = snd->send();    
+        connect(snd, SIGNAL(requestCompleted(QVariant)), this, SLOT(requestCompleted(QVariant)));
+        connect(snd, SIGNAL(requestError(int)), this, SLOT(requestError(int)));
+    }
+    if (deleteRequest) {
+        delete snd;
+        snd = NULL;
+    }
+}
+
+void ServiceClient::requestCompleted(const QVariant& value)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceClient::requestCompleted");
+    mTextRetValue->setText(value.toString());
+}
+
+void ServiceClient::requestError(int err)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceClient::requestError");
+    mTextRetValue->setText("error: " + QString::number(err));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceclient/src/serviceclient.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef SERVICECLIENT_H
+#define SERVICECLIENT_H
+
+#include <QWidget>
+#include <QModelIndex>
+#include <QMap>
+#include <QStringList>
+
+class QLineEdit;
+class QCheckBox;
+class QLabel;
+class XQServiceRequest;
+QT_BEGIN_HEADER
+class ServiceClient : public QWidget
+{
+    Q_OBJECT
+public:
+    ServiceClient( QWidget *parent = 0, Qt::WFlags f = 0 );
+    ~ServiceClient();
+
+protected slots:
+    void requestCompleted(const QVariant& value);
+    void requestError(int err);
+    
+private slots:
+    void dial();
+
+private:
+    
+private:
+    QCheckBox* mCheckSync;
+    QCheckBox* mCheckAsyncAnswer;
+    QCheckBox* mCheckDeleteRequest;
+    QLineEdit *mTextEdit;
+    QLineEdit *mTextRetValue;
+    QLabel* mRetunSignal;
+    XQServiceRequest* snd;
+};
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/examples/serviceclient/src/serviceclient.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+SOURCES=\
+    src/main.cpp\
+    src/serviceclient.cpp
+
+HEADERS=\
+    src/serviceclient.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/inc/README.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,2 @@
+Files xqserviceclientinfo.h and xqserviceerrdefs.h from S&S Service Framework http://nwiki.nokia.com/WestStream/ServiceFrameworkDevelopment.
+Check folder qthighway\xqserviceipc.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/inc/old/qserviceglobal.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef QSERVICEFRAMEWORKGLOBAL_H
+#define QSERVICEFRAMEWORKGLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(Q_OS_WIN)
+#  if defined(QT_NODLL)
+#    undef QT_MAKEDLL
+#    undef QT_DLL
+#  elif defined(QT_MAKEDLL)
+#    if defined(QT_DLL)
+#      undef QT_DLL
+#    endif
+#    if defined(QT_BUILD_SFW_LIB)
+#      define Q_SFW_EXPORT Q_DECL_EXPORT
+#    else
+#      define Q_SFW_EXPORT Q_DECL_IMPORT
+#    endif
+#  elif defined(QT_DLL) /* use a Qt DLL library */
+#    define Q_SFW_EXPORT Q_DECL_IMPORT
+#  endif
+#else
+#endif
+
+#if !defined(Q_SFW_EXPORT)
+#  if defined(QT_SHARED)
+#    define Q_SFW_EXPORT Q_DECL_EXPORT
+#  else
+#    define Q_SFW_EXPORT
+#  endif
+#endif
+
+QT_BEGIN_HEADER
+QT_BEGIN_NAMESPACE
+//TODO remove
+static const char DefaultVersion[]          = "-1"; //Get lastest version, when the default value being set
+
+QT_END_NAMESPACE
+QT_END_HEADER
+
+#endif // QSERVICEFRAMEWORKGLOBAL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/inc/xqserviceclientinfo.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQSERVICECLIENTINFO_H
+#define XQSERVICECLIENTINFO_H
+
+#include <QObject>
+#include <QString>
+#include <QBitArray>
+
+namespace QtService {
+
+/*!
+    \class ClientInfo
+    \brief Container class for client information in ipc requests.
+*/
+    // FORWARD DECLARATIONS
+    class ClientInfo: public QObject
+    {
+
+    public:    
+        /*!
+            Sets the client's name.
+            \param aName Client's name.
+        */
+        inline void setName(const QString &aName) { iName = aName; }
+
+        /*!
+            Gets the client's name.
+            \return Client's name as QString.
+        */
+        inline QString name() { return iName; }
+
+        /*!
+            Sets the client's process ID.
+            \param aProcessId Id of the process.
+        */
+        inline void setProcessId(const qint64 aProcessId) { iProcessId = aProcessId; }
+
+        /*!
+            Gets the client's process ID.
+            \return Process ID.
+        */
+        inline qint64 processId() { return iProcessId; }
+
+        /*!
+            Sets the client's vendor ID.
+            \param aVendorId Vendor ID.
+        */
+        inline void setVendorId(const qint64 aVendorId) { iVendorId = aVendorId; }
+
+        /*!
+            Gets the client's vendor ID.
+            \return Vendor ID.
+        */
+        inline const qint64 vendorId() { return iVendorId; }
+
+        /*!
+            Sets the client's capabilities.
+            \param capabilities Capabilities to be set.
+        */
+        inline void setCapabilities(const quint32 capabilities) { iCapabilities = capabilities; }
+
+        /*!
+            Gets the client's capabilities.
+            \return Client capabilities.
+        */
+        inline const quint32 capabilities() { return iCapabilities; }
+
+        
+    private:
+        QString iName;
+        qint64 iProcessId;
+        qint64 iVendorId;
+        quint32 iCapabilities;
+    };
+}
+
+#endif //XQSERVICECLIENTINFO_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/inc/xqserviceerrdefs.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Set range of errors for each component
+*
+*/
+
+#ifndef XQSERVICEERRORDEFS
+#define XQSERVICEERRORDEFS
+
+namespace QtService{
+
+const int BASE_ERR_START_VALUE = -1000;
+const int DATABASE_ERR_START_VALUE = -2000;
+const int METADATA_ERR_START_VALUE = -3000;
+const int RESOLVER_ERR_START_VALUE = -4000;
+const int IPC_ERR_START_VALUE = -5000;
+
+enum BaseErr {   
+    ERROR_NoError = BASE_ERR_START_VALUE 
+};
+
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/inc/xqserviceglobal.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Globals from XQService
+*
+*/
+
+#ifndef XQSERVICEGLOBAL_H
+#define XQSERVICEGLOBAL_H
+
+#include <QtCore/qglobal.h>
+#include <QtCore/qplugin.h>
+#include <xqserviceerrdefs.h>
+
+#if defined(Q_OS_WIN)
+#  if defined(QT_NODLL)
+#    undef QT_MAKEDLL
+#    undef QT_DLL
+#  elif defined(QT_MAKEDLL)
+#    if defined(QT_DLL)
+#      undef QT_DLL
+#    endif
+#    if defined(QT_BUILD_SFW_LIB)
+#      define Q_SFW_EXPORT Q_DECL_EXPORT
+#    else
+#      define Q_SFW_EXPORT Q_DECL_IMPORT
+#    endif
+#  elif defined(QT_DLL) /* use a Qt DLL library */
+#    define Q_SFW_EXPORT Q_DECL_IMPORT
+#  endif
+#else
+#endif
+
+#if !defined(Q_SFW_EXPORT)
+#  if defined(QT_SHARED)
+#    define Q_SFW_EXPORT Q_DECL_EXPORT
+#  else
+#    define Q_SFW_EXPORT
+#  endif
+#endif
+
+#if !defined(XQSERVICE_EXPORT)
+#if defined(XQ_BUILD_XQSERVICE_LIB)
+#define XQSERVICE_EXPORT Q_DECL_EXPORT
+#else
+#define XQSERVICE_EXPORT Q_DECL_IMPORT
+#endif
+#endif
+
+#if !defined(XQSERVICEUTIL_EXPORT)
+#if defined(XQ_BUILD_XQSERVICEUTIL_LIB)
+#define XQSERVICEUTIL_EXPORT Q_DECL_EXPORT
+#else
+#define XQSERVICEUTIL_EXPORT Q_DECL_IMPORT
+#endif
+#endif
+
+namespace XQService
+{
+	enum ServiceIPCErrors
+	    {
+	    ENoError=0, 
+	    EConnectionError = QtService::IPC_ERR_START_VALUE ,  /*!< Error in IPC Connection */
+	    EConnectionClosed,                      /*!< IPC Connection is closed             */
+	    EServerNotFound,                        /*!< Can not find server                  */
+	    EIPCError,                              /*!< Known IPC error                      */
+	    EUnknownError,                          /*!< Unknown IPC error                    */
+        ERequestPending,                        /*!< Already pending request              */
+        EMessageNotFound,                       /*!< Message slot not found               */
+        EArgumentError                          /*!< Argument error                       */
+	    };
+
+    enum ServiceMetadataErrors
+    {
+        EMetaNoService = QtService::METADATA_ERR_START_VALUE,    /*!< Can not find service root node in XML file                  */
+        EMetaNoServiceName,                          /*!< Can not find service name in XML file                                   */
+        EMetaNoServiceFilepath,                      /*!< Can not find service filepath in XML file                               */
+        EMetaNoServiceInterface,                     /*!< No interface for the service in XML file                                */
+        EMetaNoInterfaceVersion,                     /*!< Can not find interface version in XML file                              */
+        EMetaNoInterfaceName,                        /*!< Can not find interface name in XML file                                 */
+        EMetaUnableToOpenFile,                       /*!< Error opening XML file                                                  */
+        EMetaInvalidXmlFile,                         /*!< Not a valid XML file                                                    */
+        EMetaParseService,                           /*!< Error parsing service node                                              */
+        EMetaParseInterface,                         /*!< Error parsing interface node                                            */
+        EMetaDuplicatedInterface,                    /*!< The same interface is defined twice                                     */
+        EMetaInvalidVersion,
+        EMetaDuplicatedTag,                          /*!< The tag appears twice                                                   */
+        EMetaInvalidCustomTag,                       /*!< The customproperty tag is not corectly formatted or otherwise incorrect */
+        EMetaDuplicatedCustomKey                     /*!< The customproperty appears twice                                        */
+    };
+
+    enum ServiceManagerErrors
+    {
+        EMgrInternalError = QtService::RESOLVER_ERR_START_VALUE  /* Internal error */
+    };
+    
+}            
+            
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/inc/xqserviceipcconst.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQ_SERVICEIPCCONST_H
+#define XQ_SERVICEIPCCONST_H
+
+// The UID for the service.prf (old format needing xqsreg tool)
+#define KXQServiceUid    0x2002A535
+
+// UID for the new service2.prf  (new format)
+#define KXQServiceUid2 0x2002EAD4
+
+#endif //XQ_SERVICEIPCCONST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/inc/xqservicelog.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQSERVICELOG_H
+#define XQSERVICELOG_H
+
+//#define XQSERVICE_DEBUG
+//#define XQSERVICE_DEBUG_FILE
+
+#include <qglobal.h>
+
+#ifdef XQSERVICE_DEBUG
+#include <e32std.h>
+#include <e32debug.h>
+#ifdef XQSERVICE_DEBUG_FILE
+#include <f32file.h>
+#include <flogger.h>
+#endif //XQSERVICE_DEBUG_FILE
+#endif //XQSERVICE_DEBUG
+
+#ifdef XQSERVICE_DEBUG
+#define XQSERVICE_DEBUG_PRINT(args...) qDebug(args);
+#define XQSERVICE_WARNING_PRINT(args...) qWarning(args);
+#define XQSERVICE_CRITICAL_PRINT(args...) qCritical(args);
+#define XQSERVICE_FATAL_PRINT(args...) qFatal(args);
+#define XQSERVICEMESSAGEHANDLER XqServiceMessageHandler::xqServiceMessageHandler
+#else //XQSERVICE_DEBUG not defined
+#define XQSERVICE_DEBUG_PRINT(args...)
+#define XQSERVICE_WARNING_PRINT(args...)
+#define XQSERVICE_CRITICAL_PRINT(args...)
+#define XQSERVICE_FATAL_PRINT(args...)
+#define XQSERVICEMESSAGEHANDLER 0
+#endif //XQSERVICE_DEBUG
+
+#ifdef XQSERVICE_DEBUG
+
+class XqServiceMessageHandler
+    {
+    
+    public:
+    
+        static void xqServiceMessageHandler(QtMsgType /*type*/, const char *msg)
+        {
+        	_LIT(format, "[Qt Message] %S");
+        	const TPtrC8 ptr(reinterpret_cast<const TUint8*>(msg));
+#ifndef XQSERVICE_DEBUG_FILE
+            // RDebug::Print has a cap of 256 characters so break it up
+            const int maxBlockSize = 256 - ((const TDesC &)format).Length();
+            HBufC* hbuffer = q_check_ptr(HBufC::New(qMin(maxBlockSize, ptr.Length())));
+            for (int i = 0; i < ptr.Length(); i += hbuffer->Length()) {
+                hbuffer->Des().Copy(ptr.Mid(i, qMin(maxBlockSize, ptr.Length()-i)));
+                RDebug::Print(format, hbuffer);
+            }
+            delete hbuffer;
+#else //XQSERVICE_DEBUG_FILE defined
+            _LIT(KLogDir, "qt");
+            _LIT(KLogFile, "xqservice.log");
+            _LIT(KLogStarting, "*** Starting XQService application ***");
+            static bool logStarted;
+            if ( !logStarted ){
+                RFileLogger::Write(KLogDir, KLogFile, EFileLoggingModeAppend, KLogStarting);        
+                logStarted = true; 
+            }
+            RFileLogger::Write(KLogDir, KLogFile, EFileLoggingModeAppend, ptr);
+#endif //XQSERVICE_DEBUG_FILE
+        }
+    
+    };
+
+#endif //XQSERVICE_DEBUG
+
+#endif //XQSERVICELOG_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/qthighway.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,29 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+TEMPLATE = subdirs
+
+CONFIG += ordered
+SUBDIRS= \
+      xqserviceutil \
+			xqserviceipc \
+			xqservice
+
+symbian:BLD_INF_RULES.prj_exports += "./rom/xqservice.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(xqservice.iby)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/rom/xqservice.iby	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: 
+*
+*/
+
+#ifndef __XQSERVICE_IBY__
+#define __XQSERVICE_IBY__
+
+#include <bldvariant.hrh>
+
+file=ABI_DIR\BUILD_DIR\xqservice.dll              SHARED_LIB_DIR\xqservice.dll          PAGED
+file=ABI_DIR\BUILD_DIR\xqserviceutil.dll          SHARED_LIB_DIR\xqserviceutil.dll      PAGED
+
+file=ABI_DIR\BUILD_DIR\xqserviceipcclient.dll     SHARED_LIB_DIR\xqserviceipcclient.dll PAGED
+file=ABI_DIR\BUILD_DIR\xqserviceipcserver.dll     SHARED_LIB_DIR\xqserviceipcserver.dll PAGED
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/runcodescanner.cmd	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,25 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+@rem All rights reserved.
+@rem
+@rem This program is free software: you can redistribute it and/or modify
+@rem it under the terms of the GNU Lesser General Public License as published by
+@rem the Free Software Foundation, version 2.1 of the License.
+@rem 
+@rem This program is distributed in the hope that it will be useful,
+@rem but WITHOUT ANY WARRANTY; without even the implied warranty of
+@rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@rem GNU Lesser General Public License for more details.
+@rem
+@rem You should have received a copy of the GNU Lesser General Public License
+@rem along with this program.  If not, 
+@rem see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+@rem
+@rem Description:
+@rem
+
+@echo on
+
+codescanner xqservice cs/xqservice
+codescanner xqserviceutil cs/xqserviceutil
+codescanner xqserviceipc cs/xqserviceipc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/runtests.cmd	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,55 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+@rem All rights reserved.
+@rem
+@rem This program is free software: you can redistribute it and/or modify
+@rem it under the terms of the GNU Lesser General Public License as published by
+@rem the Free Software Foundation, version 2.1 of the License.
+@rem 
+@rem This program is distributed in the hope that it will be useful,
+@rem but WITHOUT ANY WARRANTY; without even the implied warranty of
+@rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@rem GNU Lesser General Public License for more details.
+@rem
+@rem You should have received a copy of the GNU Lesser General Public License
+@rem along with this program.  If not, 
+@rem see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+@rem
+@rem Description:
+@rem
+
+@echo on
+
+IF ["%1"] EQU [""] GOTO :NODEL
+call del MON.sym
+call del MON.dat
+
+:NODEL
+call qmake -platform symbian-abld
+call bldmake bldfiles
+call abld clean
+call abld reallyclean
+
+IF ["%1"] EQU [""] GOTO :NORMAL
+
+echo -- Build and instrument QtHighway for Code coverage --
+call ctcwrap -i d -C "EXCLUDE+*\moc*.cpp" abld build winscw udeb
+
+:NORMAL
+echo -- Build QtHighway --
+call abld build winscw udeb
+
+call cd xqservice\tsrc
+call runall.cmd %1
+call cd \qthighway
+
+IF ["%1"] EQU [""] GOTO :END
+
+call ctcpost MON.sym MON.dat xqservice\tsrc\tst_xqservicechannel\MON.sym xqservice\tsrc\tst_xqservicechannel\MON.dat xqservice\tsrc\ut_xqserviceadaptor\MON.sym xqservice\tsrc\ut_xqserviceadaptor\MON.dat xqservice\tsrc\ut_xqservicechannel\MON.sym xqservice\tsrc\ut_xqservicechannel\MON.dat xqservice\tsrc\ut_xqserviceprovider\MON.sym xqservice\tsrc\ut_xqserviceprovider\MON.dat xqservice\tsrc\ut_xqservicerequest\MON.sym xqservice\tsrc\ut_xqservicerequest\MON.dat -p profile.txt
+
+echo -- Coverage calculated --
+
+:END
+echo -- Build Complete --
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/runtestseshell.cmd	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,28 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+@rem All rights reserved.
+@rem
+@rem This program is free software: you can redistribute it and/or modify
+@rem it under the terms of the GNU Lesser General Public License as published by
+@rem the Free Software Foundation, version 2.1 of the License.
+@rem 
+@rem This program is distributed in the hope that it will be useful,
+@rem but WITHOUT ANY WARRANTY; without even the implied warranty of
+@rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@rem GNU Lesser General Public License for more details.
+@rem
+@rem You should have received a copy of the GNU Lesser General Public License
+@rem along with this program.  If not, 
+@rem see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+@rem
+@rem Description:
+@rem
+
+@echo off
+echo Run all tests typing in eshell runall (at the end exit)
+del \epoc32\winscw\c\runall.bat
+set list=ut_xqservicechannel,ut_xqserviceadaptor,ut_xqserviceprovider,ut_xqservicerequest,tst_xqservicechannel
+for %%X in (%list%) do (echo %%X.exe -o c:\%%X.log >> \epoc32\winscw\c\runall.bat)
+call \epoc32\release\winscw\udeb\eshell.exe
+for %%X in (%list%) do (type \epoc32\winscw\c\%%X.log >> .\runall.log && del \epoc32\winscw\c\%%X.log )
+call type runall.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/at_xqapplicationmanager/at_xqapplicationmanager.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,710 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+
+#include <QtTest/QtTest>
+#include <QObject>
+#include <QUrl>
+#include <QFile>
+#include <QVariantList>
+
+#include <xqaiwrequest.h>
+#include <xqsharablefile.h>
+
+#include "at_xqapplicationmanager.h"
+#include "../inc/testdata.h"
+
+namespace
+{
+    const QString endOfLine("\n");
+    const QString testString("TestString");
+    const QString operation("request(QString)");
+    const QString operation_async("asyncRequest(QString)");
+    const QString testFileStr(drive + ":\\data\\Others\\test.txt");
+
+    const QUrl testUrl("testto://address");
+    
+    const QFile testFile(testFileStr);
+}
+
+
+void Test_XQApplicationManager::init()
+{
+    testSharableFile = new XQSharableFile();
+    QVERIFY2(testSharableFile->open(testFileStr), mLog.join(endOfLine).toAscii());
+    mAppManager = new XQApplicationManager();
+    QVERIFY2(mAppManager != NULL, mLog.join(endOfLine).toAscii()); 
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii()); 
+}
+
+void Test_XQApplicationManager::drm_file()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] drm_file";
+
+#ifdef __WINS__
+    QSKIP("Checking drm attributes does not work correctly on emulator", SkipAll);
+#endif
+    
+    QStringList logmem = mLog;
+    
+    foreach (QString fileStr, testData.files.keys()) {
+        QFile file(fileStr);
+        QVariantList drmValues;
+        mAppManager->getDrmAttributes(file, listDrmAttr(), drmValues);
+        
+        mLog << "[QTH] [Test_XQApplicationManager] drm_file:" + fileStr;
+        
+        foreach (QVariant value, testData.files[fileStr].values()) {
+            if (!value.isValid())
+                mLog << "[QTH] [Test_XQApplicationManager] test attribute: not valid";
+            else if (value.type() == QVariant::Int)
+                mLog << "[QTH] [Test_XQApplicationManager] test attribute:" + QString::number(value.toInt());
+            else if (value.type() == QVariant::String)
+                mLog << "[QTH] [Test_XQApplicationManager] test attribute:" + value.toString();
+        }
+        
+        foreach (QVariant value, drmValues) {
+            if (!value.isValid())
+                mLog << "[QTH] [Test_XQApplicationManager] getDrmAttributes: not valid";
+            else if (value.type() == QVariant::Int)
+                mLog << "[QTH] [Test_XQApplicationManager] getDrmAttributes:" + QString::number(value.toInt());
+            else if (value.type() == QVariant::String)
+                mLog << "[QTH] [Test_XQApplicationManager] getDrmAttributes:" + value.toString();
+        }
+        
+        QVERIFY2(testData.files[fileStr].values() == drmValues, mLog.join(endOfLine).toAscii());
+        mLog = logmem;
+    }
+            
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] drm_file end";
+}
+
+void Test_XQApplicationManager::drm_sharablefile()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] drm_sharablefile";
+    
+#ifdef __WINS__
+    QSKIP("Checking drm attributes does not work correctly on emulator", SkipAll);
+#endif
+    
+    QStringList logmem = mLog;
+
+    foreach (QString fileStr, testData.files.keys()) {
+        XQSharableFile sharableFile;
+        QVariantList drmValues;
+        
+        sharableFile.open(fileStr);
+        mAppManager->getDrmAttributes(sharableFile, listDrmAttr(), drmValues);
+        sharableFile.close();
+        
+        mLog << "[QTH] [Test_XQApplicationManager] drm_sharablefile:" + fileStr;
+        foreach (QVariant value, testData.files[fileStr].values()) {
+            if (!value.isValid())
+                mLog << "[QTH] [Test_XQApplicationManager] test attribute: not valid";
+            else if (value.type() == QVariant::Int)
+                mLog << "[QTH] [Test_XQApplicationManager] test attribute:" + QString::number(value.toInt());
+            else if (value.type() == QVariant::String)
+                mLog << "[QTH] [Test_XQApplicationManager] test attribute:" + value.toString();
+        }
+        
+        foreach (QVariant value, drmValues) {
+            if (!value.isValid())
+                mLog << "[QTH] [Test_XQApplicationManager] getDrmAttributes: not valid";
+            else if (value.type() == QVariant::Int)
+                mLog << "[QTH] [Test_XQApplicationManager] getDrmAttributes:" + QString::number(value.toInt());
+            else if (value.type() == QVariant::String)
+                mLog << "[QTH] [Test_XQApplicationManager] getDrmAttributes:" + value.toString();
+        }
+        
+        QVERIFY2(testData.files[fileStr].values() == drmValues, mLog.join(endOfLine).toAscii());
+        mLog = logmem;
+    }
+            
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] drm_sharablefile end";
+}
+
+void Test_XQApplicationManager::list_interface()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] list_interface";
+    
+    foreach (QString interface, testData.interfaces.keys()) {
+        if (interface == IUriView || interface == IFileView)
+            continue;
+    
+        QList<XQAiwInterfaceDescriptor> list = mAppManager->list(interface, operation);
+        
+        mLog << "[QTH] [Test_XQApplicationManager] list_interface interfaces defined:" 
+                 + QString::number(testData.interfaces.values(interface).count());
+        mLog << "[QTH] [Test_XQApplicationManager] list_interface system interfaces:" 
+                 + QString::number(list.count());
+        QVERIFY2(list.count() == testData.interfaces.values(interface).count(), mLog.join(endOfLine).toAscii());
+        
+        foreach (XQAiwInterfaceDescriptor interfaceDesc, list) {
+            bool equal = false;
+            foreach (InterfaceData* interfaceData, testData.interfaces.values(interface)) {
+                if (interfaceData->compare(interfaceDesc, mLog)) {
+                    equal = true;
+                    break;
+                }
+            }
+            
+            mLog << "[QTH] [Test_XQApplicationManager] list_interface service name:" + interfaceDesc.serviceName();
+            mLog << "[QTH] [Test_XQApplicationManager] list_interface interface name:" + interfaceDesc.interfaceName();
+            mLog << "[QTH] [Test_XQApplicationManager] list_interface interface OK?:" + QString::number((int)equal) << QString::number((int)interfaceDesc.isValid());
+            
+            QVERIFY2(equal, mLog.join(endOfLine).toAscii());
+            QVERIFY2(interfaceDesc.isValid(), mLog.join(endOfLine).toAscii());
+        }
+    }
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] list_interface end";
+}
+
+void Test_XQApplicationManager::list_service_interface()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] list_service_interface";
+    
+    foreach (InterfaceData* interfaceData1, testData.interfaces.values()) {
+        if (interfaceData1->mInterfaceName == IUriView || interfaceData1->mInterfaceName == IFileView)
+            continue;
+        
+        QList<XQAiwInterfaceDescriptor> list = mAppManager->list(interfaceData1->mServiceName, interfaceData1->mInterfaceName, operation);
+        
+        int countInterfaces = 0;
+        foreach (XQAiwInterfaceDescriptor interfaceDesc, list) {
+            bool equal = false;
+            foreach (InterfaceData* interfaceData2, testData.interfaces.values(interfaceData1->mInterfaceName))
+            {
+                if (interfaceData2->compare(interfaceDesc, mLog))
+                    equal = true;
+                if (interfaceData2->mServiceName == interfaceData1->mServiceName)
+                    countInterfaces++;
+            }
+            
+            mLog << "[QTH] [Test_XQApplicationManager] list_service_interface service name:" + interfaceDesc.serviceName();
+            mLog << "[QTH] [Test_XQApplicationManager] list_service_interface interface name:" + interfaceDesc.interfaceName();
+            mLog << "[QTH] [Test_XQApplicationManager] list_service_interface interface OK?:" + QString::number((int)equal)
+                                                                                              + QString::number((int)interfaceDesc.isValid());
+            
+            QVERIFY2(equal, mLog.join(endOfLine).toAscii());
+            QVERIFY2(interfaceDesc.isValid(), mLog.join(endOfLine).toAscii());
+        }
+        
+        mLog << "[QTH] [Test_XQApplicationManager] list_service_interface interfaces defined:" 
+                 + QString::number(countInterfaces);
+        mLog << "[QTH] [Test_XQApplicationManager] list_service_interface system interfaces:" 
+                 + QString::number(list.count());
+        QVERIFY2(list.count() == countInterfaces, mLog.join(endOfLine).toAscii());
+    }
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] list_service_interface end";
+}
+
+void Test_XQApplicationManager::list_uri()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] list_uri";
+    
+    QList<XQAiwInterfaceDescriptor> list = mAppManager->list(testUrl);
+    
+    mLog << "[QTH] [Test_XQApplicationManager] list_uri interfaces defined:" 
+             + QString::number(testData.interfaces.values(IUriView).count());
+    mLog << "[QTH] [Test_XQApplicationManager] list_uri system interfaces:" 
+             + QString::number(list.count());    
+    QVERIFY2(list.count() == testData.interfaces.values(IUriView).count(), mLog.join(endOfLine).toAscii());
+    
+    foreach (XQAiwInterfaceDescriptor interfaceDesc, list) {
+        bool equal = false;
+        foreach (InterfaceData* interfaceData, testData.interfaces.values(IUriView))
+            if (interfaceData->compare(interfaceDesc, mLog))
+            {
+                equal = true;
+                break;
+            }
+        
+        mLog << "[QTH] [Test_XQApplicationManager] list_uri service name:" + interfaceDesc.serviceName();
+        mLog << "[QTH] [Test_XQApplicationManager] list_uri interface name:" + interfaceDesc.interfaceName();
+        mLog << "[QTH] [Test_XQApplicationManager] list_uri interface OK?:" + QString::number((int)equal) 
+                                                                            + QString::number((int)interfaceDesc.isValid());
+                    
+        QVERIFY2(equal, mLog.join(endOfLine).toAscii());
+        QVERIFY2(interfaceDesc.isValid(), mLog.join(endOfLine).toAscii());
+    }
+    
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] list_uri end";
+}
+
+void Test_XQApplicationManager::list_file()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] list_file";
+    
+    QSKIP("Currently function list(const QFile& file) returns maximum one interface", SkipAll);
+    
+    QList<XQAiwInterfaceDescriptor> list = mAppManager->list(testFile);
+    
+    foreach (InterfaceData* interfaceData, testData.interfaces.values(IFileView)) {
+        bool equal = false;
+        foreach (XQAiwInterfaceDescriptor interfaceDesc, list)
+            if (interfaceData->compare(interfaceDesc, mLog)) {
+                equal = true;
+                break;
+            }
+        
+        mLog << "[QTH] [Test_XQApplicationManager] list_file service name:" + interfaceData->mServiceName;
+        mLog << "[QTH] [Test_XQApplicationManager] list_file interface name:" + interfaceData->mInterfaceName;
+        mLog << "[QTH] [Test_XQApplicationManager] list_file interface OK?:" + QString::number((int)equal);
+        
+        QVERIFY2(equal, mLog.join(endOfLine).toAscii());
+    }
+    
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] list_file end";
+}
+
+void Test_XQApplicationManager::list_sharablefile()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] list_sharablefile";
+
+    QSKIP("Currently function list(const XQSharableFile& file) returns maximum one interface", SkipAll);
+    
+    QList<XQAiwInterfaceDescriptor> list = mAppManager->list(*testSharableFile);
+    
+    foreach (InterfaceData* interfaceData, testData.interfaces.values(IFileView)) {
+        bool equal = false;
+        foreach (XQAiwInterfaceDescriptor interfaceDesc, list) {
+            if (interfaceData->compare(interfaceDesc, mLog)) {
+                equal = true;
+                break;
+            }
+        }
+        
+        mLog << "[QTH] [Test_XQApplicationManager] list_sharablefile service name:" + interfaceData->mServiceName;
+        mLog << "[QTH] [Test_XQApplicationManager] list_sharablefile interface name:" + interfaceData->mInterfaceName;
+        mLog << "[QTH] [Test_XQApplicationManager] list_sharablefile interface OK?:" + QString::number((int)equal);
+        
+        QVERIFY2(equal, mLog.join(endOfLine).toAscii());
+    }
+    
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] list_sharablefile end";
+}
+
+void Test_XQApplicationManager::create_interface()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] create_interface";
+    
+    foreach (QString interface, testData.interfaces.keys()) {
+        if (interface == IUriView || interface == IFileView)
+            continue;
+        
+        mLog << "[QTH] [Test_XQApplicationManager] create_interface:" + interface;
+        
+        {
+            XQAiwRequest* request = mAppManager->create(interface, operation, true);
+            testRequest(request, operation, testString, true, true);
+            delete request;
+        }
+        
+        {
+            XQAiwRequest* request = mAppManager->create(interface, operation_async, true);
+            testRequest(request, operation_async, testString, true, false);
+            delete request;
+        }
+        
+        {
+            XQAiwRequest* request = mAppManager->create(interface, operation, false);
+            testRequest(request, operation, testString, false, true);
+            delete request;
+        }
+        
+        {
+            XQAiwRequest* request = mAppManager->create(interface, operation_async, false);
+            testRequest(request, operation_async, testString, false, false);
+            delete request;
+        }
+    }
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] create_interface end";
+}
+
+void Test_XQApplicationManager::create_service_interface()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] create_service_interface";
+
+    foreach (InterfaceData* interfaceData, testData.interfaces.values()) {
+        if (interfaceData->mInterfaceName == IUriView || interfaceData->mInterfaceName == IFileView)
+           continue;
+    
+        mLog << "[QTH] [Test_XQApplicationManager] create_service_interface service:" + interfaceData->mServiceName;
+        mLog << "[QTH] [Test_XQApplicationManager] create_service_interface interface:" + interfaceData->mInterfaceName;
+        
+        {
+            XQAiwRequest* request = mAppManager->create(interfaceData->mServiceName, interfaceData->mInterfaceName, operation, true);
+            testRequest(request, operation, testString, true, true);
+            delete request;
+        }
+            
+        {
+            XQAiwRequest* request = mAppManager->create(interfaceData->mServiceName, interfaceData->mInterfaceName, operation_async, true);
+            testRequest(request, operation_async, testString, true, false);
+            delete request;
+        }
+            
+        {
+            XQAiwRequest* request = mAppManager->create(interfaceData->mServiceName, interfaceData->mInterfaceName, operation, false);
+            testRequest(request, operation, testString, false, true);
+            delete request;
+        }
+            
+        {
+            XQAiwRequest* request = mAppManager->create(interfaceData->mServiceName, interfaceData->mInterfaceName, operation_async, false);
+            testRequest(request, operation_async, testString, false, false);
+            delete request;
+        }
+    }
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] create_service_interface end";
+}
+
+void Test_XQApplicationManager::create_implementation()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] create_implementation";
+
+    foreach (InterfaceData* interfaceData, testData.interfaces.values()) {
+        if (interfaceData->mInterfaceName == IUriView || interfaceData->mInterfaceName == IFileView)
+            continue;
+        foreach (XQAiwInterfaceDescriptor interfaceDesc, mAppManager->list(interfaceData->mServiceName, interfaceData->mInterfaceName, operation)) {
+            mLog << "[QTH] [Test_XQApplicationManager] create_implementation service:" + interfaceDesc.interfaceName();
+            mLog << "[QTH] [Test_XQApplicationManager] create_implementation interface:" + interfaceDesc.serviceName();
+            mLog << "[QTH] [Test_XQApplicationManager] create_implementation version:" 
+                     + QString::number(interfaceDesc.majorVersion()) + "." + QString::number(interfaceDesc.minorVersion());
+            
+            {
+                XQAiwRequest* request = mAppManager->create(interfaceDesc, operation, true);
+                testRequest(request, operation, testString, true, true);
+                delete request;
+            }
+                
+            {
+                XQAiwRequest* request = mAppManager->create(interfaceDesc, operation_async, true);
+                testRequest(request, operation_async, testString, true, false);
+                delete request;
+            }
+                
+            {
+                XQAiwRequest* request = mAppManager->create(interfaceDesc, operation, false);
+                testRequest(request, operation, testString, false, true);
+                delete request;
+            }
+                
+            {
+                XQAiwRequest* request = mAppManager->create(interfaceDesc, operation_async, false);
+                testRequest(request, operation_async, testString, false, false);
+                delete request;
+            }
+        }
+    }
+    
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] create_implementation end";
+}
+
+void Test_XQApplicationManager::create_uri()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] create_uri";
+
+    {
+        XQAiwRequest* request = mAppManager->create(testUrl, true);
+        testRequest(request, QString(), testUrl.toString(), true, true);
+        delete request;
+    }
+        
+    {
+        XQAiwRequest* request = mAppManager->create(testUrl, false);
+        testRequest(request, QString(), testUrl.toString(), false, true);
+        delete request;
+    }
+            
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] create_uri end";
+}
+
+void Test_XQApplicationManager::create_uri_implementation()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] create_uri_implementation";
+
+    QList<XQAiwInterfaceDescriptor> list = mAppManager->list(testUrl);
+    
+    foreach (XQAiwInterfaceDescriptor interfaceDesc, list)
+        foreach (InterfaceData* interfaceData, testData.interfaces.values(IUriView))
+        {
+            if (interfaceData->compare(interfaceDesc, mLog)) {
+                {
+                    XQAiwRequest* request = mAppManager->create(testUrl, interfaceDesc, true);
+                    testRequest(request, QString(), testUrl.toString(), true, true);
+                    delete request;
+                }
+                    
+                {
+                    XQAiwRequest* request = mAppManager->create(testUrl, interfaceDesc, false);
+                    testRequest(request, QString(), testUrl.toString(), false, true);
+                    delete request;
+                }
+            }
+        
+        mLog << "[QTH] [Test_XQApplicationManager] create_uri_implementation service:" + interfaceDesc.interfaceName();
+        mLog << "[QTH] [Test_XQApplicationManager] create_uri_implementation interface:" + interfaceDesc.serviceName();
+        mLog << "[QTH] [Test_XQApplicationManager] create_uri_implementation version:" 
+                 + QString::number(interfaceDesc.majorVersion()) + "." + QString::number(interfaceDesc.minorVersion());
+        
+        QVERIFY2(interfaceDesc.isValid(), mLog.join(endOfLine).toAscii());
+    }
+            
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] create_uri_implementation end";
+}
+
+void Test_XQApplicationManager::create_file()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] create_file";
+
+    {
+        XQAiwRequest* request = mAppManager->create(testFile, true);
+        testRequest(request, QString(), testFileStr, true, true);
+        delete request;
+    }
+        
+    {
+        XQAiwRequest* request = mAppManager->create(testFile, false);
+        testRequest(request, QString(), testFileStr, false, true);
+        delete request;
+    }
+            
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] create_file end";
+}
+
+void Test_XQApplicationManager::create_file_implementation()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] create_file_implementation";
+
+    QList<XQAiwInterfaceDescriptor> list = mAppManager->list(testFile);
+    QVERIFY2(list.count() > 0, mLog.join(endOfLine).toAscii());
+    
+    foreach (XQAiwInterfaceDescriptor interfaceDesc, list)
+        foreach (InterfaceData* interfaceData, testData.interfaces.values(IFileView)) {
+            if (interfaceData->compare(interfaceDesc, mLog)) {
+                {
+                    XQAiwRequest* request = mAppManager->create(testFile, interfaceDesc, true);
+                    testRequest(request, QString(), testFileStr, true, true);
+                    delete request;
+                }
+                    
+                {
+                    XQAiwRequest* request = mAppManager->create(testFile, interfaceDesc, false);
+                    testRequest(request, QString(), testFileStr, false, true);
+                    delete request;
+                }
+            }
+        
+        mLog << "[QTH] [Test_XQApplicationManager] create_file_implementation service:" + interfaceDesc.interfaceName();
+        mLog << "[QTH] [Test_XQApplicationManager] create_file_implementation interface:" + interfaceDesc.serviceName();
+        mLog << "[QTH] [Test_XQApplicationManager] create_file_implementation version:" 
+                 + QString::number(interfaceDesc.majorVersion()) + "." + QString::number(interfaceDesc.minorVersion());
+        
+        QVERIFY2(interfaceDesc.isValid(), mLog.join(endOfLine).toAscii());
+    }
+            
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] create_file_implementation end";
+}
+
+void Test_XQApplicationManager::create_sharablefile()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] create_sharablefile";
+    
+    {
+        XQAiwRequest* request = mAppManager->create(*testSharableFile, true);
+        testRequest(request, QString(), QString(), true, true, testSharableFile);
+        delete request;
+    }
+        
+    {
+        XQAiwRequest* request = mAppManager->create(*testSharableFile, false);
+        testRequest(request, QString(), testFileStr, false, true, testSharableFile);
+        delete request;
+    }
+            
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] create_sharablefile end";
+}
+
+void Test_XQApplicationManager::create_sharablefile_implementation()
+{
+    mLog << "[QTH] [Test_XQApplicationManager] create_sharablefile_implementation";
+    
+    QList<XQAiwInterfaceDescriptor> list = mAppManager->list(*testSharableFile);
+    QVERIFY2(list.count() > 0, mLog.join(endOfLine).toAscii());
+    
+    foreach (XQAiwInterfaceDescriptor interfaceDesc, list) {
+        foreach (InterfaceData* interfaceData, testData.interfaces.values(IFileView)) {
+            if (interfaceData->compare(interfaceDesc, mLog)) {
+                {
+                    XQAiwRequest* request = mAppManager->create(*testSharableFile, interfaceDesc, true);
+                    testRequest(request, QString(), testFileStr, true, true, testSharableFile);
+                    delete request;
+                }
+                    
+                {
+                    XQAiwRequest* request = mAppManager->create(*testSharableFile, interfaceDesc, false);
+                    testRequest(request, QString(), testFileStr, false, true, testSharableFile);
+                    delete request;
+                }
+            }
+        }
+        
+        mLog << "[QTH] [Test_XQApplicationManager] create_sharablefile_implementation service:" + interfaceDesc.interfaceName();
+        mLog << "[QTH] [Test_XQApplicationManager] create_sharablefile_implementation interface:" + interfaceDesc.serviceName();
+        mLog << "[QTH] [Test_XQApplicationManager] create_sharablefile_implementation version:" 
+                 + QString::number(interfaceDesc.majorVersion()) + "." + QString::number(interfaceDesc.minorVersion());
+        
+        QVERIFY2(interfaceDesc.isValid(), mLog.join(endOfLine).toAscii());
+    }
+            
+    QVERIFY2(mAppManager->lastError() == XQService::ENoError, mLog.join(endOfLine).toAscii());
+    
+    mLog << "[QTH] [Test_XQApplicationManager] create_sharablefile_implementation end";
+}
+
+const QList<int> Test_XQApplicationManager::listDrmAttr()
+{
+    QList<int> attr;
+    
+    attr.append(XQApplicationManager::IsProtected);
+    attr.append(XQApplicationManager::IsForwardable);
+    attr.append(XQApplicationManager::Description);
+    attr.append(XQApplicationManager::MimeType);
+    
+    return attr;
+}
+
+
+void Test_XQApplicationManager::cleanup()
+{
+    delete mAppManager;
+    mAppManager = NULL;
+    mLog.clear();
+    testSharableFile->close();
+    delete testSharableFile;
+    testSharableFile = NULL;
+}
+
+void Test_XQApplicationManager::testRequest(XQAiwRequest* request, const QString &operation, 
+        const QString &arguments, bool embedded, bool synchronous, XQSharableFile *sharablefile)
+{
+    QVERIFY2(request != NULL, mLog.join(endOfLine).toAscii());
+    
+    QVERIFY2(request->isEmbedded() == embedded, mLog.join(endOfLine).toAscii());
+    
+    request->setSynchronous(synchronous);
+    QVERIFY2(request->isSynchronous() == synchronous, mLog.join(endOfLine).toAscii());
+    
+    if (!operation.isEmpty())
+        QVERIFY2(request->operation() == operation, mLog.join(endOfLine).toAscii());
+    
+    QList<QVariant> args;
+    if (sharablefile) {
+        args << qVariantFromValue(*sharablefile);
+    } else {
+        args << arguments;
+    }
+    
+    request->setArguments(args);
+    
+    connect(request, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleOk(const QVariant&)));
+    connect(request, SIGNAL(requestError(int,const QString&)), this, SLOT(handleError(int,const QString&)));
+    
+    mLog << "[QTH] [Test_XQApplicationManager] send " + operation;
+    mServiceAnswered = false;
+    QVERIFY2(request->send(), mLog.join(endOfLine).toAscii());
+   
+    if (!operation.isEmpty()) {
+        while (!mServiceAnswered)
+            QTest::qWait(20);
+        
+        QStringList retList = returnValue.toStringList();
+        
+        QVERIFY2(retList.value(0) == request->descriptor().serviceName(), mLog.join(endOfLine).toAscii());
+        QVERIFY2(retList.value(1) == request->descriptor().interfaceName(), mLog.join(endOfLine).toAscii());
+        QVERIFY2(retList.value(2) == testString, mLog.join(endOfLine).toAscii());
+    }
+    else
+        QTest::qWait(100);
+}
+
+void Test_XQApplicationManager::handleOk(const QVariant& ret)
+{
+    mLog << "[QTH] [Test_XQApplicationManager] request results:" + ret.toStringList().join(", ");
+    returnValue = ret;
+    mServiceAnswered = true;
+}
+
+void Test_XQApplicationManager::handleError(int err ,const QString& errString)
+{
+    mLog << "[QTH] [Test_XQApplicationManager] handleError: " + errString; 
+    mLog << "[QTH] [Test_XQApplicationManager] err: " + QString::number(err);
+    mServiceAnswered = true;
+}
+
+int main (int argc, char* argv[]) 
+{
+    QApplication app(argc, argv);
+    QTEST_DISABLE_KEYPAD_NAVIGATION
+    Test_XQApplicationManager tc;
+    int ret = 0;
+    if (argc == 1) {
+        int c = 5;
+        char* v[] = {argv[0], "-o", "c:/at_am.txt", "-maxwarnings", "0"};
+        ret = QTest::qExec(&tc, c, v);
+    }
+    else {
+        ret = QTest::qExec(&tc, argc, argv);
+    }
+    return ret;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/at_xqapplicationmanager/at_xqapplicationmanager.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef AT_XQAPPLICATIONMANAGER_H
+#define AT_XQAPPLICATIONMANAGER_H
+
+#include <QObject>
+#include <QStringList>
+#include <QList>
+#include <xqappmgr.h>
+#include <QVariant>
+
+class Test_XQApplicationManager: public QObject
+{
+     Q_OBJECT
+
+private slots:
+
+    void init();
+    
+    void drm_file();
+    void drm_sharablefile();
+    void list_interface();
+    void list_service_interface();
+    void list_uri();
+    void list_file();
+    void list_sharablefile();
+    void create_interface();
+    void create_service_interface();
+    void create_implementation();
+    void create_uri();
+    void create_uri_implementation();
+    void create_file();
+    void create_file_implementation();
+    void create_sharablefile();
+    void create_sharablefile_implementation();
+
+    void cleanup();
+    
+    void handleOk(const QVariant& ret);
+    void handleError(int err ,const QString& errString);
+
+private:
+    void testRequest(XQAiwRequest* request, const QString &operation, 
+            const QString &arguments, bool embedded, bool synchronous, XQSharableFile *sharablefile = NULL);
+    
+private:
+    const QList<int> listDrmAttr();
+    QStringList mLog;
+    XQApplicationManager *mAppManager;
+    QVariant returnValue;
+    bool mServiceAnswered;
+    XQSharableFile* testSharableFile;
+ };
+
+
+#endif // AT_XQAPPLICATIONMANAGER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/at_xqapplicationmanager/at_xqapplicationmanager.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+TEMPLATE = app
+
+QT += testlib
+CONFIG  += qtestlib
+
+HEADERS += at_xqapplicationmanager.h \
+		   ../inc/testdata.h
+SOURCES += at_xqapplicationmanager.cpp
+
+#DEFINES += QT_NO_DEBUG_STREAM
+
+# capability
+TARGET.CAPABILITY = ALL -TCB
+
+drmfiles.sources += drmfiles/test.txt
+drmfiles.sources += drmfiles/111-test1.odf
+drmfiles.sources += drmfiles/one.jpg
+drmfiles.sources += drmfiles/RoAcqoffer-111-aac-i15m.ort
+drmfiles.sources += drmfiles/SD_Celebration_SP.dcf
+drmfiles.sources += drmfiles/SD_jpg_sun.dcf
+drmfiles.sources += drmfiles/STC1_128_44_16_2_CBR.wma
+
+drmfiles.path = c:/data/Others/
+
+DEPLOYMENT += drmfiles
+
+LIBS+= -lxqservice -lxqserviceutil
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/at_xqapplicationmanager/buildtest.bat	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,38 @@
+@echo off
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+@echo on
+
+IF ["%1"] EQU [""] GOTO :NODEL
+call del MON.sym
+call del MON.dat
+
+:NODEL
+call qmake
+call bldmake bldfiles
+call abld clean
+call abld reallyclean
+
+IF ["%1"] EQU [""] GOTO :NORMAL
+
+call ctcwrap -i d -C "EXCLUDE+*\moc*.cpp" -C "EXCLUDE+*\t_*.cpp" -C "EXCLUDE+*\stub_*.cpp" abld build winscw udeb
+goto :FINAL
+
+:NORMAL
+call build winscw_udeb
+
+:FINAL
+
Binary file qthighway/tsrc/at_xqapplicationmanager/drmfiles/111-test1.odf has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/at_xqapplicationmanager/drmfiles/RoAcqoffer-111-aac-i15m.ort	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+<roap:roapTrigger xmlns:roap="urn:oma:bac:dldrm:roap-1.0" version="1.0"><roAcquisition id="id1"><riID><keyIdentifier xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xsi:type="roap:X509SPKIHash"><hash>NZf1zwAtT5SS/f60f34BZ+mOeEE=</hash></keyIdentifier></riID><riAlias>CoreMedia DRM Test Server</riAlias><roapURL>http://195.134.231.81:8081/iop-server/roap.cm?folder=HTTP_Downloads&amp;u=drm&amp;offer=offer-111-aac-i15m&amp;procedure=AAC-File</roapURL><roID>offer-111-aac-i15m.offer-111-aac-i15m.cLDuUOgMlfYRPhiv</roID><contentID>cid:cid-111-aac</contentID></roAcquisition></roap:roapTrigger>
\ No newline at end of file
Binary file qthighway/tsrc/at_xqapplicationmanager/drmfiles/SD_Celebration_SP.dcf has changed
Binary file qthighway/tsrc/at_xqapplicationmanager/drmfiles/SD_jpg_sun.dcf has changed
Binary file qthighway/tsrc/at_xqapplicationmanager/drmfiles/STC1_128_44_16_2_CBR.wma has changed
Binary file qthighway/tsrc/at_xqapplicationmanager/drmfiles/one.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/at_xqapplicationmanager/drmfiles/test.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+Text in file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/at_xqapplicationmanager/sis/at_xqapplicationmanager.pkg	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,40 @@
+; XQApplicationManager black box tests
+
+; Language
+&EN
+
+
+; SIS header: name, uid, version
+#{"at_xqapplicationmanager"},(0xE7ca591c),1,0,0
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+
+; Manual PKG pre-rules from PRO files
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 6, 3, {"Qt"}
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+ 
+
+; Executable and default resource files
+"/epoc32/release/armv5/urel/at_xqapplicationmanager.exe"    - "!:\sys\bin\at_xqapplicationmanager.exe"
+"/epoc32/data/z/resource/apps/at_xqapplicationmanager.rsc"    - "!:\resource\apps\at_xqapplicationmanager.rsc"
+"/epoc32/data/z/private/10003a3f/import/apps/at_xqapplicationmanager_reg.rsc"    - "!:\private\10003a3f\import\apps\at_xqapplicationmanager_reg.rsc"
+; DEPLOYMENT
+"/epoc32/data/z/data/Others/test.txt"    - "z:\data\Others\test.txt"
+"/epoc32/data/z/data/Others/111-test1.odf"    - "z:\data\Others\111-test1.odf"
+"/epoc32/data/z/data/Others/one.jpg"    - "z:\data\Others\one.jpg"
+"/epoc32/data/z/data/Others/RoAcqoffer-111-aac-i15m.ort"    - "z:\data\Others\RoAcqoffer-111-aac-i15m.ort"
+"/epoc32/data/z/data/Others/SD_Celebration_SP.dcf"    - "z:\data\Others\SD_Celebration_SP.dcf"
+"/epoc32/data/z/data/Others/SD_jpg_sun.dcf"    - "z:\data\Others\SD_jpg_sun.dcf"
+"/epoc32/data/z/data/Others/STC1_128_44_16_2_CBR.wma"    - "z:\data\Others\STC1_128_44_16_2_CBR.wma"
+
+; Manual PKG post-rules from PRO files
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/inc/testdata.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,341 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef TESTDATA_H_
+#define TESTDATA_H_
+
+#include <xqaiwinterfacedescriptor.h>
+#include <QString>
+#include <QStringList>
+#include <QHash>
+#include <QMultiHash>
+#include <xqappmgr.h>
+#include <QDebug>
+
+const QString IUriView = "com.nokia.symbian.IUriView"; 
+const QString IFileView = "com.nokia.symbian.IFileView";
+
+#ifdef __WINS__
+    const QString drive = "c";
+#else
+    const QString drive = "z";
+#endif
+
+typedef QHash<int, QVariant> FileDrm; 
+
+class InterfaceData
+{
+public:
+    InterfaceData(QString serviceName, QString interfaceName,int major, int minor):
+        mServiceName(serviceName), mInterfaceName(interfaceName), mMajor(major), mMinor(minor){}
+    
+    void addProperty(XQAiwInterfaceDescriptor::PropertyKey key, QVariant value)
+    {
+        mProperties[key] = value;
+    }
+    
+    void addCustomProperty(QString key, QString value)
+    {
+        mCustomProperties[key] = value;
+    }
+    
+    bool compare(const XQAiwInterfaceDescriptor& interface, QStringList& log)
+    {
+        if(mServiceName != interface.serviceName())
+        {
+            return false;
+        }
+        
+        if(mInterfaceName != interface.interfaceName())
+        {
+            return false;
+        }
+               
+        if(mMajor != interface.majorVersion())
+        {
+            return false;
+        }
+               
+        if(mMinor != interface.minorVersion())
+        {
+            return false;
+        }
+               
+        if(mProperties[XQAiwInterfaceDescriptor::Capabilities] != interface.property(XQAiwInterfaceDescriptor::Capabilities))
+        {
+            log << "[QTH] [Test_XQApplicationManager] different capabilities";
+            return false;
+        }
+               
+        if(mProperties[XQAiwInterfaceDescriptor::Location] != interface.property(XQAiwInterfaceDescriptor::Location))
+        {
+            log << "[QTH] [Test_XQApplicationManager] different location";
+            return false;
+        }
+               
+        if(mProperties[XQAiwInterfaceDescriptor::ServiceDescription] != interface.property(XQAiwInterfaceDescriptor::ServiceDescription))
+        {
+            log << "[QTH] [Test_XQApplicationManager] different service description";
+            return false;
+        }
+               
+        if(mProperties[XQAiwInterfaceDescriptor::InterfaceDescription] != interface.property(XQAiwInterfaceDescriptor::InterfaceDescription))
+        {
+            log << "[QTH] [Test_XQApplicationManager] different interface description";
+            return false;
+        }
+               
+        if(mProperties[XQAiwInterfaceDescriptor::ImplementationId] != interface.property(XQAiwInterfaceDescriptor::ImplementationId))
+        {
+            log << "[QTH] [Test_XQApplicationManager] different implementation ID";
+            return false;
+        }
+        
+        QStringList customPropKeys = interface.customPropertyKeys();
+        foreach(QString key, customPropKeys)
+        {
+            if(mCustomProperties[key] != interface.customProperty(key))
+            {
+                log << "[QTH] [Test_XQApplicationManager] different custom property:" 
+                         << key << " test value:" << mCustomProperties[key] << " system value:" << interface.customProperty(key);
+                return false;
+            }
+        }
+        
+        return true;
+    }
+           
+public:
+    QString mServiceName;
+    QString mInterfaceName;
+    QHash<XQAiwInterfaceDescriptor::PropertyKey, QVariant> mProperties;
+    QHash<QString, QString> mCustomProperties;
+    int mMajor;
+    int mMinor;
+};
+
+class TestData
+{
+public:
+    TestData()
+    {
+        // interfaces
+        {
+            QString serviceName("com.nokia.services.qthighway.test.service_1");
+            QString interfaceName("interface_1");
+            InterfaceData* interface = new InterfaceData(serviceName, interfaceName, 1, 0);
+            interface->addProperty(XQAiwInterfaceDescriptor::ServiceDescription, QVariant(QString("QtHighway automatic tests server 1")));
+            interface->addProperty(XQAiwInterfaceDescriptor::InterfaceDescription, QVariant(QString("Interface 1")));
+            interface->addProperty(XQAiwInterfaceDescriptor::Location, QVariant(QString("No path")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(int(0xE42DF0E6)));
+            services.insert(serviceName, interface);
+            interfaces.insert(interfaceName, interface);
+        }
+           
+        {
+            QString serviceName("com.nokia.services.qthighway.test.service_1");
+            QString interfaceName("interface_2");
+            InterfaceData* interface = new InterfaceData(serviceName, interfaceName, 1, 0);
+            interface->addProperty(XQAiwInterfaceDescriptor::ServiceDescription, QVariant(QString("QtHighway automatic tests server 1")));
+            interface->addProperty(XQAiwInterfaceDescriptor::InterfaceDescription, QVariant(QString("Interface 2")));
+            interface->addProperty(XQAiwInterfaceDescriptor::Location, QVariant(QString("No path")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(int(0xE42DF0E6)));
+            services.insert(serviceName, interface);
+            interfaces.insert(interfaceName, interface);
+        }
+        
+        {
+            QString serviceName("com.nokia.services.qthighway.test.service_1");
+            QString interfaceName("interface_3");
+            InterfaceData* interface = new InterfaceData(serviceName, interfaceName, 1, 0);
+            interface->addProperty(XQAiwInterfaceDescriptor::ServiceDescription, QVariant(QString("QtHighway automatic tests server 1")));
+            interface->addProperty(XQAiwInterfaceDescriptor::InterfaceDescription, QVariant(QString("Interface 3")));
+            interface->addProperty(XQAiwInterfaceDescriptor::Location, QVariant(QString("No path")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(int(0xE42DF0E6)));
+            services.insert(serviceName, interface);
+            interfaces.insert(interfaceName, interface);
+        }
+        
+        {
+            QString serviceName("com.nokia.services.qthighway.test.service_1");
+            QString interfaceName(IUriView);
+            InterfaceData* interface = new InterfaceData(serviceName, interfaceName, 1, 0);
+            interface->addProperty(XQAiwInterfaceDescriptor::InterfaceDescription, QVariant(QString("Interface for showing URIs")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ServiceDescription, QVariant(QString("QtHighway automatic tests server 1")));
+            interface->addProperty(XQAiwInterfaceDescriptor::Location, QVariant(QString("No path")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(int(0xE42DF0E6)));
+            interface->addCustomProperty("schemes","qhattestto");
+            services.insert(serviceName, interface);
+            interfaces.insert(interfaceName, interface);
+        }
+        
+        {
+            QString serviceName("com.nokia.services.qthighway.test.service_1");
+            QString interfaceName(IFileView);
+            InterfaceData* interface = new InterfaceData(serviceName, interfaceName, 1, 0);
+            interface->addProperty(XQAiwInterfaceDescriptor::InterfaceDescription, QVariant(QString("Interface for showing Files")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ServiceDescription, QVariant(QString("QtHighway automatic tests server 1")));
+            interface->addProperty(XQAiwInterfaceDescriptor::Location, QVariant(QString("No path")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(int(0xE42DF0E6)));
+            services.insert(serviceName, interface);
+            interfaces.insert(interfaceName, interface);
+        }
+    
+        {
+            QString serviceName("com.nokia.services.qthighway.test.service_2");
+            QString interfaceName("interface_1");
+            InterfaceData* interface = new InterfaceData(serviceName, interfaceName, 1, 0);
+            interface->addProperty(XQAiwInterfaceDescriptor::InterfaceDescription, QVariant(QString("Interface 1")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ServiceDescription, QVariant(QString("QtHighway automatic tests server 2")));
+            interface->addProperty(XQAiwInterfaceDescriptor::Location, QVariant(QString("No path")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(int(0xED698FE0)));
+            services.insert(serviceName, interface);
+            interfaces.insert(interfaceName, interface);
+        }
+        
+        {
+            QString serviceName("com.nokia.services.qthighway.test.service_2");
+            QString interfaceName("interface_2");
+            InterfaceData* interface = new InterfaceData(serviceName, interfaceName, 1, 0);
+            interface->addProperty(XQAiwInterfaceDescriptor::InterfaceDescription, QVariant(QString("Interface 2")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ServiceDescription, QVariant(QString("QtHighway automatic tests server 2")));
+            interface->addProperty(XQAiwInterfaceDescriptor::Location, QVariant(QString("No path")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(int(0xED698FE0)));
+            services.insert(serviceName, interface);
+            interfaces.insert(interfaceName, interface);
+        }
+        
+        {
+            QString serviceName("com.nokia.services.qthighway.test.service_2");
+            QString interfaceName(IUriView);
+            InterfaceData* interface = new InterfaceData(serviceName, interfaceName, 1, 0);
+            interface->addProperty(XQAiwInterfaceDescriptor::InterfaceDescription, QVariant(QString("Interface for showing URIs")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ServiceDescription, QVariant(QString("QtHighway automatic tests server 2")));
+            interface->addProperty(XQAiwInterfaceDescriptor::Location, QVariant(QString("No path")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(int(0xED698FE0)));
+            interface->addCustomProperty("schemes","qhattestto");
+            services.insert(serviceName, interface);
+            interfaces.insert(interfaceName, interface);
+        }
+        
+        {
+            QString serviceName("com.nokia.services.qthighway.test.service_2");
+            QString interfaceName(IFileView);
+            InterfaceData* interface = new InterfaceData(serviceName, interfaceName, 1, 0);
+            interface->addProperty(XQAiwInterfaceDescriptor::InterfaceDescription, QVariant(QString("Interface for showing Files")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ServiceDescription, QVariant(QString("QtHighway automatic tests server 2")));
+            interface->addProperty(XQAiwInterfaceDescriptor::Location, QVariant(QString("No path")));
+            interface->addProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(int(0xED698FE0)));
+            services.insert(serviceName, interface);
+            interfaces.insert(interfaceName, interface);
+        }
+        
+        // DRM files
+        
+        {
+            FileDrm drm;
+            drm[XQApplicationManager::IsProtected] = QVariant(0);
+            drm[XQApplicationManager::IsForwardable] = QVariant(1);
+            drm[XQApplicationManager::Description] = QVariant();
+            drm[XQApplicationManager::MimeType] = QVariant(QString("text/plain"));
+            
+            files[QString(drive + ":\\data\\Others\\test.txt")] = drm;
+            
+        }
+        
+        {
+            FileDrm drm;
+            drm[XQApplicationManager::IsProtected] = QVariant(1);
+            drm[XQApplicationManager::IsForwardable] = QVariant(1);
+            drm[XQApplicationManager::Description] = QVariant();
+            drm[XQApplicationManager::MimeType] = QVariant(QString("audio/aac"));
+            
+            files[QString(drive + ":\\data\\Others\\111-test1.odf")] = drm;
+        }
+        
+        {
+            FileDrm drm;
+            drm[XQApplicationManager::IsProtected] = QVariant(0);
+            drm[XQApplicationManager::IsForwardable] = QVariant(1);
+            drm[XQApplicationManager::Description] = QVariant();
+            drm[XQApplicationManager::MimeType] = QVariant(QString("image/jpeg"));
+            
+            files[QString(drive + ":\\data\\Others\\one.jpg")] = drm;
+        }
+        
+        {
+            FileDrm drm;
+            drm[XQApplicationManager::IsProtected] = QVariant(0);
+            drm[XQApplicationManager::IsForwardable] = QVariant(1);
+            drm[XQApplicationManager::Description] = QVariant();
+            drm[XQApplicationManager::MimeType] = QVariant(QString("application/vnd.oma.drm.roap-trigger+xml"));
+            
+            files[QString(drive + ":\\data\\Others\\RoAcqoffer-111-aac-i15m.ort")] = drm;
+        }
+        
+        {
+            FileDrm drm;
+            drm[XQApplicationManager::IsProtected] = QVariant(1);
+            drm[XQApplicationManager::IsForwardable] = QVariant(1);
+            drm[XQApplicationManager::Description] = QVariant();
+            drm[XQApplicationManager::MimeType] = QVariant(QString("audio/sp-midi"));
+            
+            files[QString(drive + ":\\data\\Others\\SD_Celebration_SP.dcf")] = drm;
+        }
+        
+        {
+            FileDrm drm;
+            drm[XQApplicationManager::IsProtected] = QVariant(1);
+            drm[XQApplicationManager::IsForwardable] = QVariant(1);
+            drm[XQApplicationManager::Description] = QVariant();
+            drm[XQApplicationManager::MimeType] = QVariant(QString("image/jpeg"));
+            
+            files[QString(drive + ":\\data\\Others\\SD_jpg_sun.dcf")] = drm;
+        }
+        
+        {
+            FileDrm drm;
+            drm[XQApplicationManager::IsProtected] = QVariant(1);
+            drm[XQApplicationManager::IsForwardable] = QVariant(1);
+            drm[XQApplicationManager::Description] = QVariant(QString(""));
+            drm[XQApplicationManager::MimeType] = QVariant(QString("audio/x-ms-wma"));
+            
+            files[QString(drive + ":\\data\\Others\\STC1_128_44_16_2_CBR.wma")] = drm;
+        }
+            
+
+    }
+    
+    ~TestData()
+    {
+        foreach(InterfaceData* interface , interfaces.values())
+            delete interface;
+    }
+    
+public:
+    QMultiHash<QString, InterfaceData*> services;
+    QMultiHash<QString, InterfaceData*> interfaces;
+    QHash<QString, FileDrm> files;
+};
+
+TestData testData;
+
+#endif /* TESTDATA_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/rom/tsrc.iby	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: 
+*
+*/
+
+#ifndef __TSRC_IBY__
+#define __TSRC_IBY__
+
+#include <bldvariant.hrh>
+
+#define UPGRADABLE_APP_REG_RSC(NAME) data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\ ## NAME ## _reg.rsc        Private\10003a3f\import\apps\ ## NAME ## _reg.rsc
+
+S60_APP_EXE(service_1)
+S60_APP_RESOURCE(service_1)
+UPGRADABLE_APP_REG_RSC(service_1)
+
+S60_APP_EXE(service_2)
+S60_APP_RESOURCE(service_2)
+UPGRADABLE_APP_REG_RSC(service_2)
+
+S60_APP_EXE(at_xqapplicationmanager)
+S60_APP_RESOURCE(at_xqapplicationmanager)
+UPGRADABLE_APP_REG_RSC(at_xqapplicationmanager)
+data=\epoc32\data\z\data\Others\test.txt data\Others\test.txt
+data=\epoc32\data\z\data\Others\111-test1.odf data\Others\111-test1.odf
+data=\epoc32\data\z\data\Others\one.jpg data\Others\one.jpg
+data=\epoc32\data\z\data\Others\RoAcqoffer-111-aac-i15m.ort data\Others\RoAcqoffer-111-aac-i15m.ort
+data=\epoc32\data\z\data\Others\SD_Celebration_SP.dcf data\Others\SD_Celebration_SP.dcf
+data=\epoc32\data\z\data\Others\SD_jpg_sun.dcf data\Others\SD_jpg_sun.dcf
+data=\epoc32\data\z\data\Others\STC1_128_44_16_2_CBR.wma data\Others\STC1_128_44_16_2_CBR.wma
+
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/service_1/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QApplication>
+#include "../src/serviceview.h"
+#include "../../inc/testdata.h"
+
+const QString serviceName = "com.nokia.services.qthighway.test.service_1";
+
+int main(int argc, char **argv)
+{
+    QApplication a(argc, argv);
+    TestServiceView view(serviceName);
+    foreach(InterfaceData* interface, testData.services.values(serviceName))
+    {
+        view.addInterface(interface->mInterfaceName);
+    }
+
+    return a.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/service_1/service_1.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not,
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = app
+TARGET = service_1
+
+symbian:TARGET.UID3 = 0xE42DF0E6
+
+CONFIG += service
+
+include(../src/test_services.pri)
+
+SOURCES += main.cpp
+
+HEADERS += ../../inc/testdata.h
+
+SERVICE.FILE = service_conf.xml
+SERVICE.OPTIONS = embeddable
+
+RSS_RULES += \
+  "datatype_list = " \
+  "      {" \
+  "      DATATYPE" \
+  "          {" \
+  "          priority = EDataTypePriorityNormal;" \
+  "          type = \"text/plain\";" \
+  "          }" \
+  "      };" \
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/service_1/service_conf.xml	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service>
+  <name>com.nokia.services.qthighway.test.service_1</name>
+  <filepath>No path</filepath>
+  <description>QtHighway automatic tests server 1</description>
+  <interface>
+    <name>interface_1</name>
+    <version>1.0</version>
+    <description>Interface 1</description>
+  </interface>
+  <interface>
+    <name>interface_2</name>
+    <version>1.0</version>
+    <description>Interface 2</description>
+  </interface>
+  <interface>
+    <name>interface_3</name>
+    <version>1.0</version>
+    <description>Interface 3</description>
+  </interface>
+  <interface>
+    <name>com.nokia.symbian.IUriView</name>
+    <version>1.0</version>
+    <description>Interface for showing URIs</description>
+    <customproperty key="schemes">qhattestto</customproperty>
+  </interface>
+  <interface>
+	<name>com.nokia.symbian.IFileView</name>
+    <version>1.0</version>
+    <description>Interface for showing Files</description>
+  </interface>
+</service>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/service_2/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QApplication>
+#include "../src/serviceview.h"
+#include "../../inc/testdata.h"
+
+const QString serviceName = "com.nokia.services.qthighway.test.service_2";
+
+int main(int argc, char **argv)
+{
+    QApplication a(argc, argv);
+    TestServiceView view(serviceName);
+    foreach(InterfaceData* interface, testData.services.values(serviceName))
+    {
+        view.addInterface(interface->mInterfaceName);
+    }
+
+    return a.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/service_2/service_2.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not,
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = app
+TARGET = service_2
+
+symbian:TARGET.UID3 = 0xED698FE0
+
+CONFIG += service
+
+include(../src/test_services.pri)
+
+SOURCES += main.cpp
+
+HEADERS += ../../inc/testdata.h
+
+SERVICE.FILE = service_conf.xml
+SERVICE.OPTIONS = embeddable
+
+RSS_RULES += \
+  "datatype_list = " \
+  "      {" \
+  "      DATATYPE" \
+  "          {" \
+  "          priority = EDataTypePriorityNormal;" \
+  "          type = \"text/plain\";" \
+  "          }" \
+  "      };" \
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/service_2/service_conf.xml	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service>
+  <name>com.nokia.services.qthighway.test.service_2</name>
+  <filepath>No path</filepath>
+  <description>QtHighway automatic tests server 2</description>
+  <interface>
+    <name>interface_1</name>
+    <version>1.0</version>
+    <description>Interface 1</description>
+  </interface>
+  <interface>
+    <name>interface_2</name>
+    <version>1.0</version>
+    <description>Interface 2</description>
+  </interface>
+  <interface>
+    <name>com.nokia.symbian.IUriView</name>
+    <version>1.0</version>
+    <description>Interface for showing URIs</description>
+    <customproperty key="schemes">qhattestto</customproperty>
+  </interface>
+  <interface>
+	<name>com.nokia.symbian.IFileView</name>
+    <version>1.0</version>
+    <description>Interface for showing Files</description>
+  </interface>
+</service>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/src/asynctimer.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef ASYNCTIMER_H
+#define ASYNCTIMER_H
+
+#include <QObject>
+#include <QStringList>
+#include <qtimer.h>
+
+class AsyncTimer : public QTimer
+{
+    Q_OBJECT
+
+public:
+    AsyncTimer(int requestId, QString input):mRequestID(requestId), mInput(input)
+        {connect(this, SIGNAL(timeout()), this, SLOT(handle_timeout()));}
+    void setRequestID(int requestId){mRequestID = requestId;}
+    
+public slots:
+    void handle_timeout(){emit timeout(mRequestID, mInput); delete this;}
+    
+signals:
+    void timeout(int requestId, QString input);
+
+private:
+    int mRequestID; 
+    QString mInput;
+};
+
+#endif // ASYNCTIMER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/src/interface.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+
+#include "interface.h"
+#include <asynctimer.h>
+
+#include <QDebug>
+
+
+TestInterface::TestInterface(QString service, QString interface) 
+ : XQServiceProvider(QLatin1String((service + "." + interface).toLatin1())), 
+   mService(service), 
+   mInterface(interface)
+{
+    publishAll();
+}
+
+TestInterface::~TestInterface()
+{
+
+}
+
+QStringList TestInterface::request(QString input)
+{
+    qDebug() << "[QTH] [TestInterface] request";
+     
+    qDebug() << "[QTH] [TestInterface] service:" << mService; 
+    qDebug() << "[QTH] [TestInterface] interface:" << mInterface; 
+    qDebug() << "[QTH] [TestInterface] input:" << input; 
+    
+    QStringList ret;
+    
+    ret.append(mService);
+    ret.append(mInterface);
+    ret.append(input);
+    
+    qDebug() << "[QTH] [TestInterface] request end";
+    
+    return ret;
+}
+
+void TestInterface::asyncRequest(QString input)
+{
+    qDebug() << "[QTH] [TestInterface] async request";
+     
+    AsyncTimer* timer = new AsyncTimer(setCurrentRequestAsync(), input); 
+    connect(timer, SIGNAL(timeout(int, QString)), this, SLOT(complete(int, QString)));
+    timer->start(10);
+    
+    qDebug() << "[QTH] [TestInterface] async request end";
+}
+
+void TestInterface::complete(int requestID, QString input)
+{
+    qDebug() << "[QTH] [TestInterface] complete request";
+     
+    qDebug() << "[QTH] [TestInterface] service:" << mService; 
+    qDebug() << "[QTH] [TestInterface] interface:" << mInterface; 
+    qDebug() << "[QTH] [TestInterface] input:" << input; 
+    
+    QStringList ret;
+    
+    ret.append(mService);
+    ret.append(mInterface);
+    ret.append(input);
+    
+    completeRequest(requestID,  QVariant(ret)); 
+    
+    qDebug() << "[QTH] [TestInterface] complete request end";
+}
+
+void TestInterface::view(QString pathOrUri)
+{
+    qDebug() << "[QTH] [TestInterface] view";
+     
+    if(mInterface == "com.nokia.symbian.IUriView")
+    {
+        qDebug() << "[QTH] [TestInterface] uri:" << pathOrUri;
+    }
+    else if(mInterface == "com.nokia.symbian.IFileView")
+    {
+        qDebug() << "[QTH] [TestInterface] path:" << pathOrUri;
+    }
+    
+    qDebug() << "[QTH] [TestInterface] view end";
+}
+
+void TestInterface::view(XQSharableFile file)
+{
+    qDebug() << "[QTH] [TestInterface] view sharable file";
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/src/interface.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef INTERFACE_H
+#define INTERFACE_H
+
+#include <QObject>
+#include <QStringList>
+#include <QLatin1String>
+#include <xqserviceprovider.h>
+#include <xqsharablefile.h>
+
+class TestInterface : public XQServiceProvider
+{
+    Q_OBJECT
+
+public:
+    TestInterface(QString service, QString interface);
+    ~TestInterface();
+
+public slots:
+    // request handling methods
+    QStringList request(QString input);
+    void asyncRequest(QString input); 
+    void complete(int requestID, QString input);
+    void view(QString pathOrUri);
+    void view(XQSharableFile file);
+    
+private:
+    QString mService;
+    QString mInterface;
+};
+
+#endif // INTERFACE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/src/serviceview.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QDebug>
+#include <QVBoxLayout>
+#include <QLineEdit>
+#include <QApplication>
+#include <QLabel>
+#include <QThread>
+
+#include "serviceview.h"
+
+class SleeperThread : public QThread
+{
+public:
+    static void msleep(unsigned long msecs)
+    {
+    QThread::msleep(msecs);
+    }
+};
+
+TestServiceView::TestServiceView(QString service, QWidget *parent, Qt::WFlags f) 
+    :QWidget( parent,f ), mService(service)
+{
+    qDebug() << "[QTH] [AutoTestServices] TestServiceView::TestServiceView START";
+
+    QLabel *label = new QLabel(service);
+
+    QVBoxLayout *vLayout = new QVBoxLayout;
+
+    vLayout->addWidget(label);
+
+    setLayout(vLayout);
+    
+    showFullScreen();
+    
+    qDebug() << "[QTH] [AutoTestServices] TestServiceView::TestServiceView END";
+}
+
+TestServiceView::~TestServiceView()
+{
+    qDebug() << "[QTH] [AutoTestServices] TestServiceView::~TestServiceView START";
+    
+    foreach(TestInterface* interface, mInterfaces)
+        delete interface;
+    
+    qDebug() << "[QTH] [AutoTestServices] TestServiceView::~TestServiceView END";
+}
+
+void TestServiceView::addInterface(QString interface)
+{
+    TestInterface *testInterface = new TestInterface(mService, interface);
+    connect(testInterface, SIGNAL(clientDisconnected()), this, SLOT(requestCompleted()));
+    connect(testInterface, SIGNAL(returnValueDelivered()), this, SLOT(requestCompleted()));
+    connect(this, SIGNAL(quit()), qApp, SLOT(quit()));
+    mInterfaces.append(testInterface);
+    qDebug() << "[QTH] [AutoTestServices] TestServiceView::addInterface:" << interface;
+}
+
+void TestServiceView::requestCompleted()
+{
+//    SleeperThread::msleep(3000);
+    emit quit();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/src/serviceview.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef SERVICE_H_
+#define SERVICE_H_
+
+#include <QObject>
+#include <QWidget>
+#include <QList>
+#include <QString>
+
+#include "interface.h"
+
+class TestServiceView : public QWidget
+{
+    Q_OBJECT
+
+public:
+  
+    TestServiceView(QString service, QWidget *parent = 0, Qt::WFlags f = 0);
+    ~TestServiceView();
+    
+    void addInterface(QString interface);
+    
+public slots:
+    void requestCompleted();
+    
+signals:
+    void quit();
+    
+private:
+    QList<TestInterface*> mInterfaces;
+    QString mService;
+};
+
+
+#endif /* SERVICE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/src/test_services.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+SOURCES += ../src/serviceview.cpp \
+    ../src/interface.cpp
+
+HEADERS += ../src/serviceview.h \
+    ../src/interface.h \
+	../src/asynctimer.h
+
+LIBS += -lxqservice \
+    -lxqserviceutil \
+    -lflogger
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/test_services/test_services.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not,
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+
+TEMPLATE = subdirs
+
+CONFIG += ordered
+SUBDIRS= \
+	service_1 \
+	service_2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/tsrc/tests.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+TEMPLATE = subdirs
+
+SUBDIRS = \
+    at_xqapplicationmanager \
+    test_services
+    
+symbian:BLD_INF_RULES.prj_exports += "./rom/tsrc.iby $$CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(tsrc.iby)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/api_headers.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+XQSERVICE_API_HEADERS = \
+				src/xqservicerequest.h \
+				src/xqserviceprovider.h \
+				src/xqserviceipcmarshal.h \
+				../inc/xqserviceglobal.h \
+				../inc/xqserviceipcconst.h \
+				../inc/xqserviceclientinfo.h \
+				../inc/xqserviceerrdefs.h \
+				src/xqaiwglobal.h \
+				src/xqaiwrequest.h \
+				src/xqappmgr.h \
+				src/xqaiwdecl.h \
+				src/xqapplicationmanager.h \
+
+XQSERVICE_API_HEADERS_INTERNAL = 
+
+XQSERVICE_API_HEADERS_PLATFORM = src/xqaiwdeclplat.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwdecl.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,650 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: Common application interworking declarations 
+*              All declations shall have XQ prefix
+*
+*/
+
+#ifndef XQAIWDECL_H
+#define XQAIWDECL_H
+
+#include <QLatin1String>
+
+//
+// All declations shall have XQ prefix
+//
+
+
+//
+// Common Application Interworking declarations
+// ---------------------------------------------
+//
+
+/*!
+    \file xqaiwdecl.h
+*/
+
+/*!
+    \def XQI_FILE_VIEW
+    File viewing interface.
+    \sa XQOP_FILE_VIEW, XQOP_FILE_VIEW_SHARABLE for related operations.
+*/
+/*!
+    \def XQOP_FILE_VIEW
+    File viewing interface related operation.
+    \sa XQI_FILE_VIEW for interface definition.
+*/
+/*!
+    \def XQOP_FILE_VIEW_SHARABLE
+    File viewing interface and related operation.
+    \sa XQI_FILE_VIEW interface definition.
+*/
+
+#define XQI_FILE_VIEW QLatin1String("com.nokia.symbian.IFileView")
+#define XQOP_FILE_VIEW QLatin1String("view(QString)")
+#define XQOP_FILE_VIEW_SHARABLE QLatin1String("view(XQSharableFile)")
+
+/*!
+    \def XQI_URI_VIEW
+    URI viewing interface.
+    \sa XQOP_URI_VIEW for related operation.
+*/
+/*!
+    \def XQOP_URI_VIEW
+    URI viewing interface related operations.
+    \sa XQI_URI_VIEW for interface definition.
+*/
+#define XQI_URI_VIEW QLatin1String("com.nokia.symbian.IUriView")
+#define XQOP_URI_VIEW QLatin1String("view(QString)")
+
+/*!
+    \def XQI_FILE_SHARE
+    File sharing interface.
+    \sa XQOP_FILE_SHARE for related operations.
+*/
+/*!
+    \def XQOP_FILE_SHARE
+    File sharing interface related operation.
+    \sa XQI_FILE_SHARE for interface definition.
+*/
+#define XQI_FILE_SHARE QLatin1String("com.nokia.symbian.IFileShare")
+#define XQOP_FILE_SHARE QLatin1String("send(QVariant)")
+
+/*!
+    \def XQURI_SCHEME_ACTIVITY
+    The scheme of the activity URI.
+*/
+#define XQURI_SCHEME_ACTIVITY QLatin1String("appto")
+/*!
+    \def XQURI_KEY_ACTIVITY_NAME
+    Activity key name in query part of the activity URI.
+*/
+#define XQURI_KEY_ACTIVITY_NAME QLatin1String("activityname")
+
+/*!
+    \def XQURI_SCHEME_HTTP
+    Miscellaneous needed URI scheme.
+    \sa XQURI_SCHEME_HTTPS, XQURI_SCHEME_MAILTO, XQURI_SCHEME_FILE for other URI schemes.
+*/
+/*!
+    \def XQURI_SCHEME_HTTPS
+    Miscellaneous needed URI scheme.
+    \sa XQURI_SCHEME_HTTP, XQURI_SCHEME_MAILTO, XQURI_SCHEME_FILE for other URI schemes.
+*/
+/*!
+    \def XQURI_SCHEME_MAILTO
+    Miscellaneous needed URI scheme.
+    \sa XQURI_SCHEME_HTTP, XQURI_SCHEME_HTTPS, XQURI_SCHEME_FILE for other URI schemes.
+*/
+/*!
+    \def XQURI_SCHEME_FILE
+    Miscellaneous needed URI scheme.
+    \sa XQURI_SCHEME_HTTP, XQURI_SCHEME_HTTPS, XQURI_SCHEME_MAILTO for other URI schemes.
+*/
+#define XQURI_SCHEME_HTTP QLatin1String("http")
+#define XQURI_SCHEME_HTTPS QLatin1String("https")
+#define XQURI_SCHEME_MAILTO QLatin1String("mailto")
+#define XQURI_SCHEME_FILE QLatin1String("file")
+
+
+/*!
+    \def XQCUSTOM_PROP_AIW_TEXT_FILE
+    Service XML custom property, which contains the name of text resource file that
+    contains the CUSTOM_PROP_AIW_TEXT.
+    \sa XQAiwRequest::createAction()
+*/
+#define XQCUSTOM_PROP_AIW_TEXT_FILE QLatin1String("aiw_action_text_file")
+
+/*!
+    \def XQCUSTOM_PROP_AIW_TEXT
+    Service XML custom property, that contains the Text Id within the
+    CUSTOM_PROP_AIW_TEXT_FILE.  The localized text is attached to
+    QAction returned by the XQAiwRequest::createAction().
+*/
+#define XQCUSTOM_PROP_AIW_TEXT QLatin1String("aiw_action_text")
+
+/*!
+    \def XQCUSTOM_PROP_AIW_ICON
+    Service XML custom property, that contains the name of the icon to be attached
+    to QAction returned by the XQAiwRequest::createAction().
+*/
+#define XQCUSTOM_PROP_AIW_ICON QLatin1String("aiw_action_icon")
+
+/*!
+    \def XQCUSTOM_PROP_SCHEMES
+    Service XML custom property, that contains schemes the XQI_URI_VIEW can handle.
+*/
+#define XQCUSTOM_PROP_SCHEMES QLatin1String("schemes")
+
+/*!
+    \def XQCUSTOM_PROP_AIW_SERVICE_STATUS
+    Service XML custom property, which contains the name of text key that
+    contains the service status.
+    \sa XQApplicationManager::status()
+*/
+#define XQCUSTOM_PROP_AIW_SERVICE_STATUS QLatin1String("aiw_status")
+
+/*!
+    \def XQINFO_KEY_WINDOW_TITLE
+    A key name for XQRequestInfo object to pass a window title
+    to be shown in service application instead of the default title.
+    Service application is responsible to handle the key value.
+    \sa XQRequestInfo::setInfo()
+*/
+#define XQINFO_KEY_WINDOW_TITLE QLatin1String("WindowTitle")
+
+
+//
+// Media related Application Interworking declarations
+// ---------------------------------------------------
+//
+
+/*!
+    \def XQI_IMAGE_FETCH
+    Image fetching interface.
+    \sa XQOP_IMAGE_FETCH for related operations.
+*/
+/*!
+    \def XQOP_IMAGE_FETCH
+    Image fetching interface related operation.
+    \sa XQI_IMAGE_FETCH interface definition.
+*/
+#define XQI_IMAGE_FETCH QLatin1String("com.nokia.symbian.IImageFetch")
+#define XQOP_IMAGE_FETCH QLatin1String("fetch()")
+
+/*!
+    \def XQI_MUSIC_FETCH
+    Music fetching interface.
+    \sa XQOP_MUSIC_FETCH for related operations.
+*/
+/*!
+    \def XQOP_MUSIC_FETCH
+    Music fetching  interface related operation.
+    \sa XQI_MUSIC_FETCH for interface definition.
+*/
+#define XQI_MUSIC_FETCH QLatin1String("com.nokia.symbian.IMusicFetch")
+#define XQOP_MUSIC_FETCH QLatin1String("fetch()")
+
+/*!
+    \def XQI_TONE_FETCH
+    Tones fetching interface.
+    \sa XQOP_TONE_FETCH for related operations.
+*/
+/*!
+    \def XQOP_TONE_FETCH
+    Tones fetching interface related operation.
+    \sa XQI_TONE_FETCH for interface definition.
+*/
+#define XQI_TONE_FETCH QLatin1String("com.nokia.symbian.IToneFetch")
+#define XQOP_TONE_FETCH QLatin1String("fetch()")
+
+/*!
+    \def XQI_VIDEO_FETCH
+    Video fetching interface.
+    \sa XQOP_VIDEO_FETCH for related operations.
+*/
+/*!
+    \def XQOP_VIDEO_FETCH
+    Video fetching interface related operation.
+    \sa XQI_VIDEO_FETCH for interface definition.
+*/
+#define XQI_VIDEO_FETCH QLatin1String("com.nokia.symbian.IVideoFetch")
+#define XQOP_VIDEO_FETCH QLatin1String("fetch()")
+
+/*!
+    \enum XQService::VideoBrowseSortKey
+    Video collection browser sort parameter.
+    \sa XQOP_VIDEO_BROWSE for operation definition.
+*/
+/*!
+    \var XQService::VideoBrowseSortKey  XQService::SortUndefined
+    Sort type undefined.
+*/
+/*!
+    \var XQService::VideoBrowseSortKey  XQService::SortDateTime
+    Sort by date/time.
+*/
+/*!
+    \var XQService::VideoBrowseSortKey  XQService::SortTitle
+    Sort by title.
+*/
+/*!
+    \var XQService::VideoBrowseSortKey  XQService::SortSize
+    Sort by size.
+*/
+namespace XQService
+{
+    enum VideoBrowseSortKey
+    {
+        SortUndefined = 0,
+        SortDateTime  = 1,
+        SortTitle     = 2,
+        SortSize      = 3
+    };
+}
+
+/*!
+    \def XQI_VIDEO_BROWSE
+    Video collection browser interface.
+    \sa XQOP_VIDEO_BROWSE for related operations.
+*/
+/*!
+    \def XQOP_VIDEO_BROWSE
+    Video collection browser interface related operation.
+    \sa XQI_VIDEO_BROWSE for interface definition.
+*/
+#define XQI_VIDEO_BROWSE QLatin1String("com.nokia.symbian.IVideoBrowse")
+#define XQOP_VIDEO_BROWSE QLatin1String("browseVideos(int, int)")
+
+/*!
+    \def XQI_VIDEO_PLAY
+    Video player interface.
+    \sa XQOP_VIDEO_PLAY, XQOP_VIDEO_PLAY_PD, XQOP_VIDEO_CLOSE
+        for related operations.
+*/
+/*!
+    \def XQOP_VIDEO_PLAY
+    Video player interface related operation.
+    \sa XQI_VIDEO_PLAY for interface definition.
+*/
+/*!
+    \def XQOP_VIDEO_PLAY_PD
+    Video player interface related operation.
+    \sa XQI_VIDEO_PLAY for interface definition.
+*/
+/*!
+    \def XQOP_VIDEO_CLOSE
+    Video player interface related operation.
+    \sa XQI_VIDEO_PLAY for interface definition.
+*/
+#define XQI_VIDEO_PLAY QLatin1String("com.nokia.symbian.IVideoView")
+#define XQOP_VIDEO_PLAY QLatin1String("playMedia(QString)")
+#define XQOP_VIDEO_PLAY_PD QLatin1String("playMedia(QString, int)")
+#define XQOP_VIDEO_CLOSE QLatin1String("closePlayer()")
+
+/*!
+    \def XQI_CAMERA_CAPTURE
+    Camera capture interface.
+    \sa XQOP_CAMERA_CAPTURE for related operations.
+*/
+/*!
+    \def XQOP_CAMERA_CAPTURE
+    Camera capture interface related operation.
+    \sa XQI_CAMERA_CAPTURE for interface definition, \n
+        XQCAMERA_INDEX, XQCAMERA_QUALITY, XQCAMERA_MODE_SWITCH,
+        XQCAMERA_INDEX_SWITCH, XQCAMERA_QUALITY_CHANGE for operation
+        parameters
+*/
+/*!
+    \def XQCAMERA_INDEX
+    XQOP_CAMERA_CAPTURE operation parameter.\n \b Values (int):
+    - 0 = primary
+    - 1 = secondary
+    \sa XQOP_CAMERA_CAPTURE for operation definition.
+*/
+/*!
+    \def XQCAMERA_QUALITY
+    XQOP_CAMERA_CAPTURE operation parameter.\n \b Values (int):
+    - 0 = default
+    - 1 = lowest
+    - 2 = highest
+    \sa XQOP_CAMERA_CAPTURE for operation definition.
+*/
+/*!
+    \def XQCAMERA_MODE_SWITCH
+    XQOP_CAMERA_CAPTURE operation parameter.\n \b Values (bool)
+    \sa XQOP_CAMERA_CAPTURE for operation definition.
+*/
+/*!
+    \def XQCAMERA_INDEX_SWITCH
+    XQOP_CAMERA_CAPTURE operation parameter.\n \b Values (bool)
+    \sa XQOP_CAMERA_CAPTURE for operation definition.
+*/
+/*!
+    \def XQCAMERA_QUALITY_CHANGE
+    XQOP_CAMERA_CAPTURE operation parameter.\n \b Values (bool)
+    \sa XQOP_CAMERA_CAPTURE for operation definition.
+*/
+#define XQI_CAMERA_CAPTURE QLatin1String("com.nokia.symbian.ICameraCapture")
+#define XQOP_CAMERA_CAPTURE QLatin1String("capture(int,QVariantMap)")
+#define XQCAMERA_INDEX QLatin1String("CameraIndex")
+#define XQCAMERA_QUALITY QLatin1String("Quality")
+#define XQCAMERA_MODE_SWITCH QLatin1String("AllowModeSwitch")
+#define XQCAMERA_INDEX_SWITCH QLatin1String("AllowCameraSwitch")
+#define XQCAMERA_QUALITY_CHANGE QLatin1String("AllowQualityChange")
+
+
+//
+// Logs related Application Interworking declarations
+// ---------------------------------------------------
+//
+
+/*!
+    \enum XQService::LogsViewIndex
+    XQLOGS_VIEW_INDEX parameter values.
+    \sa XQOP_LOGS_SHOW for operation definition.
+*/
+/*!
+    \var XQService::LogsViewIndex  XQService::LogsViewAll
+    All recent.
+*/
+/*!
+    \var XQService::LogsViewIndex  XQService::LogsViewReceived
+    Received.
+*/
+/*!
+    \var XQService::LogsViewIndex  XQService::LogsViewCalled
+    Called.
+*/
+/*!
+    \var XQService::LogsViewIndex  XQService::LogsViewMissed
+    Missed.
+*/
+namespace XQService
+{  
+    enum LogsViewIndex
+    {
+        LogsViewAll = 0,
+        LogsViewReceived,
+        LogsViewCalled,
+        LogsViewMissed
+    };
+}
+
+/*!
+    \def XQI_LOGS_VIEW
+    Logs view interface.
+    \sa XQOP_LOGS_SHOW for related operations.
+*/
+/*!
+    \def XQOP_LOGS_SHOW
+    Logs view interface related operation.
+    \sa XQI_LOGS_VIEW for interface definition, \n
+        XQLOGS_VIEW_INDEX, XQLOGS_SHOW_DIALPAD, XQLOGS_DIALPAD_TEXT
+        for operation parameters.
+*/
+/*!
+    \def XQLOGS_VIEW_INDEX
+    XQOP_LOGS_SHOW operation parameter. \n
+    \b Values (XQService::LogsViewIndex)
+    \sa XQOP_LOGS_SHOW for operation definition.
+*/
+/*!
+    \def XQLOGS_SHOW_DIALPAD
+    XQOP_LOGS_SHOW operation parameter. \n
+    \b Values (bool)
+    \sa XQOP_LOGS_SHOW for operation definition.
+*/
+/*!
+    \def XQLOGS_DIALPAD_TEXT
+    XQOP_LOGS_SHOW operation parameter. \n
+    \b Values (QString)
+    \sa XQOP_LOGS_SHOW for operation definition.
+*/
+#define XQI_LOGS_VIEW QLatin1String("com.nokia.symbian.ILogsView") 
+#define XQOP_LOGS_SHOW QLatin1String("show(QVariantMap)")
+#define XQLOGS_VIEW_INDEX QLatin1String("ViewIndex")
+#define XQLOGS_SHOW_DIALPAD QLatin1String("ShowDialpad")
+#define XQLOGS_DIALPAD_TEXT QLatin1String("DialpadText")
+
+//
+// Contacts related Application Interworking declarations
+// ------------------------------------------------------
+//
+
+/*!
+    \def XQI_CONTACTS_EDIT
+    Contacts related Application Interworking declaration.
+    \sa XQOP_CONTACTS_EDIT_CREATE_NEW, XQOP_CONTACTS_EDIT_CREATE_NEW_WITH_SUBTYPE, XQOP_CONTACTS_EDIT_CREATE_NEW_VCARD,
+        XQOP_CONTACTS_EDIT_EXISTING, XQOP_CONTACTS_EDIT_UPDATE_EXISTING, XQOP_CONTACTS_EDIT_UPDATE_EXISTING_WITH_SUBTYPE for related operations.
+*/
+/*!
+    \def XQOP_CONTACTS_EDIT_CREATE_NEW
+    Launches editor for creating a new contact with a given detail.
+    \param Parameter1 (QString) Indicates what type of contact field is supplied.
+        One of the following values (you need to include qcontactdetails.h):
+        - QContactPhoneNumber::DefinitionName
+        - QContactEmailAddress::DefinitionName
+        - QContactOnlineAccount::DefinitionName
+    \param Parameter2 (QString) The actual detail value, for eg. "123456" 
+    \return One of these constants defined in cntservicescontact.h:
+        - KCntServicesReturnValueContactSaved
+        - KCntServicesReturnValueContactDeleted
+        - KCntServicesReturnValueContactNotModified
+    \sa XQI_CONTACTS_EDIT for interface definition
+*/
+/*!
+    \def XQOP_CONTACTS_EDIT_CREATE_NEW_WITH_SUBTYPE
+    Launches editor for creating a new contact with a given detail.
+    \param Parameter1 (QString) Indicates what type of contact field is supplied.
+        One of the following values (you need to include qcontactdetails.h):
+        - QContactPhoneNumber::DefinitionName
+        - QContactEmailAddress::DefinitionName
+        - QContactOnlineAccount::DefinitionName
+    \param Parameter2 (QString) The actual detail value, for eg. "123456"
+    \param Parameter3 (QString) sub type, for eg. QContactPhoneNumber::SubTypeMobile
+    \return One of these constants defined in cntservicescontact.h:
+        - KCntServicesReturnValueContactSaved
+        - KCntServicesReturnValueContactDeleted
+        - KCntServicesReturnValueContactNotModified
+    \sa XQI_CONTACTS_EDIT for interface definition
+*/
+/*!
+    \def XQOP_CONTACTS_EDIT_CREATE_NEW_VCARD
+    Launches editor for creating a new contact based on vCard  indicated in arg.
+    The user is able to edit and save the contact. 
+    \param Parameter1 (QString) vCard file name including the full path.
+    \return One of these constants defined in cntservicescontact.h:
+        - KCntServicesReturnValueContactSaved
+        - KCntServicesReturnValueContactDeleted
+        - KCntServicesReturnValueContactNotModified
+    \sa XQI_CONTACTS_EDIT for interface definition
+*/
+/*!
+    \def XQOP_CONTACTS_EDIT_EXISTING
+    Launch editor for existing contact that is specified with contact ID. 
+    Only the default backend storage is supported.
+    \param Parameter1 (int) Contact ID.
+    \return One of these constants defined in cntservicescontact.h:
+        - KCntServicesReturnValueContactSaved
+        - KCntServicesReturnValueContactDeleted
+        - KCntServicesReturnValueContactNotModified
+    \sa XQI_CONTACTS_EDIT for interface definition
+*/
+/*!
+    \def XQOP_CONTACTS_EDIT_UPDATE_EXISTING
+    Launch editor for updating an existing contact with a given detail.
+    A contact fetch view is opened first, where the user can choose which contact
+    to update. 
+    \param Parameter1 (QString) Indicates what type of contact field is supplied.
+        One of the following values (you need to include qcontactdetails.h):
+        - QContactPhoneNumber::DefinitionName
+        - QContactEmailAddress::DefinitionName
+        - QContactOnlineAccount::DefinitionName
+    \param Parameter2 (QString) The actual detail value, for eg. "123456"
+    \return One of these constants defined in cntservicescontact.h:
+        - KCntServicesReturnValueContactSaved
+        - KCntServicesReturnValueContactDeleted
+        - KCntServicesReturnValueContactNotModified
+    \sa XQI_CONTACTS_EDIT for interface definition
+*/
+/*!
+    \def XQOP_CONTACTS_EDIT_UPDATE_EXISTING_WITH_SUBTYPE
+    Launch editor for updating an existing contact with a given detail.
+    Becomes available in wk30.
+    A contact fetch view is opened first, where the user can choose which contact
+    to update. 
+    \param Parameter1 (QString) Indicates what type of contact field is supplied.
+        One of the following values (you need to include qcontactdetails.h):
+        - QContactPhoneNumber::DefinitionName
+        - QContactEmailAddress::DefinitionName
+        - QContactOnlineAccount::DefinitionName
+    \param Parameter2 (QString) The actual detail value, for eg. "123456"
+    \param Parameter3 (QString) Sub type
+    \return One of these constants defined in cntservicescontact.h:
+        - KCntServicesReturnValueContactSaved
+        - KCntServicesReturnValueContactDeleted
+        - KCntServicesReturnValueContactNotModified
+    \sa XQI_CONTACTS_EDIT for interface definition
+ */
+#define XQI_CONTACTS_EDIT QLatin1String("com.nokia.symbian.IContactsEdit")
+#define XQOP_CONTACTS_EDIT_CREATE_NEW QLatin1String("editCreateNew(QString,QString)")
+#define XQOP_CONTACTS_EDIT_CREATE_NEW_WITH_SUBTYPE QLatin1String("editCreateNew(QString,QString,QString)")
+#define XQOP_CONTACTS_EDIT_CREATE_NEW_VCARD QLatin1String("editCreateNewFromVCard(QString)")
+#define XQOP_CONTACTS_EDIT_EXISTING QLatin1String("editExisting(int)")
+#define XQOP_CONTACTS_EDIT_UPDATE_EXISTING QLatin1String("editUpdateExisting(QString,QString)")
+#define XQOP_CONTACTS_EDIT_UPDATE_EXISTING_WITH_SUBTYPE QLatin1String("editUpdateExisting(QString,QString,QString)")
+
+/*!
+    \def XQI_CONTACTS_FETCH
+    Contacts related Application Interworking declaration.
+    \sa XQOP_CONTACTS_FETCH_MULTIPLE, XQOP_CONTACTS_FETCH_SINGLE for related operations.
+*/
+/*!
+    \def XQOP_CONTACTS_FETCH_MULTIPLE
+    Fetch multiple contacts. cntservicescontact.h has some constant definitions
+    and a class for transforming the result.
+    \param Parameter1 (QString) Title string.
+    \param Parameter2 (QString) Action type string, from cntservicescontact.h 
+    \return An object of type CntServicesContactList containing the contact ID.
+    \sa XQI_CONTACTS_FETCH for interface definition.
+*/
+ /*!
+    \def XQOP_CONTACTS_FETCH_SINGLE
+    Fetch single contact. cntservicescontact.h has some constant definitions
+    and a class for transforming the result.
+    \param Parameter1 (QString) Title string.
+    \param Parameter2 (QString) Action type string, from cntservicescontact.h 
+    \return An object of type CntServicesContactList containing the contact ID.
+    \sa XQI_CONTACTS_FETCH for interface definition.
+*/
+#define XQI_CONTACTS_FETCH QLatin1String("com.nokia.symbian.IContactsFetch")
+#define XQOP_CONTACTS_FETCH_MULTIPLE QLatin1String("multiFetch(QString,QString)")
+#define XQOP_CONTACTS_FETCH_SINGLE QLatin1String("singleFetch(QString,QString)")
+
+
+/*!
+    \def XQI_CONTACTS_VIEW
+    Contacts related Application Interworking declaration.
+    \sa XQOP_CONTACTS_VIEW_CONTACT_CARD, XQOP_CONTACTS_VIEW_TEMP_CONTACT_CARD_WITH_DETAIL,
+        XQOP_CONTACTS_VIEW_GROUP for related operations.
+*/
+/*!
+    \def XQOP_CONTACTS_VIEW_CONTACT_CARD
+    Opens contact card.
+    \param Parameter1 (int) Contact ID.
+    \sa XQI_CONTACTS_VIEW for interface definition.
+*/
+/*!
+    \def XQOP_CONTACTS_VIEW_TEMP_CONTACT_CARD_WITH_DETAIL
+    Open contact card for in-memory contact which is not saved yet.
+    In the UI there is an option to save the contact either by updating an
+    existing contact or by creating a new one.
+    \param Parameter1 (QString) Indicates what type of contact field is supplied.
+        One of the following values (you need to include qcontactdetails.h):
+        - QContactPhoneNumber::DefinitionName
+        - QContactEmailAddress::DefinitionName
+        - QContactOnlineAccount::DefinitionName
+    \param Parameter2 (QString) The actual detail value, for eg. "123456"
+    \sa XQI_CONTACTS_VIEW for interface definition.
+*/
+/*!
+    \def XQOP_CONTACTS_VIEW_GROUP
+    Open the group members view.
+    On the flip side of the group members view, there is the "group action" view.
+    \param Parameter1 (int) The group ID (native ID).
+           Only groups in the main Qt Mobility backend are supported.
+    \sa XQI_CONTACTS_VIEW for interface definition.
+*/
+#define XQI_CONTACTS_VIEW QLatin1String("com.nokia.symbian.IContactsView")
+#define XQOP_CONTACTS_VIEW_CONTACT_CARD QLatin1String("openContactCard(int)")
+#define XQOP_CONTACTS_VIEW_TEMP_CONTACT_CARD_WITH_DETAIL QLatin1String("openTemporaryContactCard(QString,QString)")
+#define XQOP_CONTACTS_VIEW_GROUP QLatin1String("openGroup(int)")
+
+//
+// Messaging related Application Interworking declarations
+// ------------------------------------------------------
+//
+
+/*!
+    \def XQI_MESSAGE_SEND
+    Messaging related Application Interworking declaration.
+    \sa XQOP_MESSAGE_SEND, XQOP_MESSAGE_SEND_WITH_ID, XQOP_MESSAGE_SEND_WITH_ALIAS for related operations.
+*/
+/*!
+    \def XQOP_MESSAGE_SEND
+    Messaging related Application Interworking interface related operation.
+    \sa XQI_MESSAGE_SEND for interface definition.
+*/
+/*!
+    \def XQOP_MESSAGE_SEND_WITH_ID
+    Messaging related Application Interworking interface related operation.
+    \sa XQI_MESSAGE_SEND for interface definition.
+*/
+/*!
+    \def XQOP_MESSAGE_SEND_WITH_ALIAS
+    Messaging related Application Interworking interface related operation.
+    \sa XQI_MESSAGE_SEND for interface definition.
+*/
+#define XQI_MESSAGE_SEND QLatin1String("com.nokia.symbian.IMessageSend")
+#define XQOP_MESSAGE_SEND QLatin1String("send(QVariantMap,QString)")
+#define XQOP_MESSAGE_SEND_WITH_ID QLatin1String("send(QString,qint32,QString)")
+#define XQOP_MESSAGE_SEND_WITH_ALIAS QLatin1String("send(QString,QString,QString)")
+
+/*!
+    \def XQI_MESSAGE_VIEW
+    Messaging related Application Interworking declaration.
+    \sa XQOP_MESSAGE_VIEW for related operations.
+*/
+/*!
+    \def XQOP_MESSAGE_VIEW
+    Messaging related Application Interworking interface related operation.
+    \sa XQI_MESSAGE_VIEW for interface definition.
+*/
+#define XQI_MESSAGE_VIEW QLatin1String("com.nokia.symbian.IMessageView")
+#define XQOP_MESSAGE_VIEW QLatin1String("view(int)")
+
+/*!
+ Incomplete list of interfaces.
+ To be completed with operation signatures and related declarations.
+*/
+#define XQI_FILE_FETCH QLatin1String("com.nokia.symbian.IFileFetch")
+
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwdeclplat.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: Platform wide application interworking declarations
+*              All declations shall have XQ prefix
+*
+*/
+
+#ifndef XQAIWDECLPLAT_H
+#define XQAIWDECLPLAT_H
+
+#include <QLatin1String>
+
+//
+// All declations shall have XQ prefix
+//
+
+/*!
+ FM Radio controlling interface and related operations
+ Operation: command( int commandId )
+  commandId: defined in radioserviceconst.h
+  
+*/
+#define XQI_RADIO_CONTROL QLatin1String("com.nokia.symbian.IRadioControl")
+#define XQOP_RADIO_CONTROL QLatin1String("command(int)")
+
+/*!
+ FM Radio monitoring interface and related operations
+*/
+#define XQI_RADIO_MONITOR QLatin1String("com.nokia.symbian.IRadioMonitor")
+#define XQOP_RADIO_MONITOR QLatin1String("requestNotifications(void)")
+
+/*!
+ WLAN sniffer interface and operations for
+ the WLAN Sniffer list view. 
+*/
+#define XQI_WLAN_SNIFFER  QLatin1String("com.nokia.symbian.IWlanSniffer")
+#define XQOP_WLAN_SNIFFER  QLatin1String("listView()")
+
+/*!
+ WLAN Login interface and operations for
+ the WLAN Login start and stop. 
+*/
+#define XQI_WLAN_LOGIN  QLatin1String("com.nokia.symbian.IWlanLogin")
+#define XQOP1_WLAN_LOGIN QLatin1String("start(int,int,QUrl)")
+#define XQOP2_WLAN_LOGIN QLatin1String("stop()")
+
+/*!
+ Incomplete list of interfaces.
+ To be completed with operation signatures and related declarations.
+*/
+#define XQI_EMAIL_INBOX_VIEW  QLatin1String("com.nokia.symbian.IEmailInboxView")
+#define XQOP_EMAIL_INBOX_VIEW  QLatin1String("displayInboxByMailboxId(QVariant)")
+
+#define XQI_EMAIL_MESSAGE_VIEW   QLatin1String("com.nokia.symbian.IEmailMessageView")
+#define XQOP_EMAIL_MESSAGE_VIEW   QLatin1String("viewMessage(QVariant,QVariant,QVariant)")
+
+#define XQI_EMAIL_MESSAGE_SEND   QLatin1String("com.nokia.symbian.IEmailMessageSend")
+#define XQOP_EMAIL_MESSAGE_SEND   QLatin1String("send(QVariant)")
+
+#define XQI_EMAIL_REGISTER_ACCOUNT   QLatin1String("com.nokia.symbian.IEmailRegisterAccount")
+#define XQOP_EMAIL_REGISTER_ACCOUNT   QLatin1String("registerNewMailbox(quint64,QString,QString)")
+#define XQOP_EMAIL_UPDATE_MAILBOX   QLatin1String("updateMailboxName(quint64,QString)")
+#define XQOP_EMAIL_UNREGISTER_MAILBOX   QLatin1String("unregisterMailbox(quint64)")
+
+#define XQI_EMAIL_MAILBOX_CONFIGURE   QLatin1String("com.nokia.symbian.IEmailMailboxConfigure")
+#define XQOP_EMAIL_MAILBOX_CONFIGURE   QLatin1String("launchWizard(QVariant)")
+
+#define XQI_CALL_DIAL   QLatin1String("com.nokia.symbian.ICallDial")
+#define XQI_DTMF_PLAY   QLatin1String("com.nokia.symbian.IDtmfPlay ")
+
+// Platform service related constants
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwfiledriver.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,176 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QObject>
+#include <qglobal.h>
+
+#include "xqservicelog.h"
+#include "xqaiwutils.h"
+#include "xqaiwfiledriver.h"
+
+XQAiwFileDriver::XQAiwFileDriver(const QFile &file, const XQAiwInterfaceDescriptor& descriptor, const QString &operation)
+    : XQAiwRequestDriver(),
+      mUtilities(NULL)
+{
+
+    mErrorMsg = "";
+    mDescr = descriptor; 
+    mOperation = operation;
+    mFile = file.fileName();
+    
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::XQAiwFileDriver: %s",
+                          qPrintable(file.fileName()));
+    
+}
+
+XQAiwFileDriver::XQAiwFileDriver(const XQSharableFile &file, const XQAiwInterfaceDescriptor& descriptor, const QString &operation)
+    : XQAiwRequestDriver(),
+      mUtilities(NULL)
+{
+
+    mErrorMsg = "";
+    mDescr = descriptor; 
+    mOperation = operation;
+    mFile = qVariantFromValue(file);
+
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::XQAiwFileDriver: sharable %s",
+                          qPrintable(file.fileName()));
+
+}
+
+
+XQAiwFileDriver::~XQAiwFileDriver()
+{
+    XQSERVICE_DEBUG_PRINT("~XQAiwFileDriver::XQAiwFileDriver");
+    delete mUtilities;
+    
+}
+
+QAction *XQAiwFileDriver::createAction()
+{
+    return NULL;  //  Not supported
+}
+
+void XQAiwFileDriver::setArguments(const QList<QVariant> &arguments)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::setArguments");
+    mArguments =  arguments;
+}
+
+
+bool XQAiwFileDriver::send(QVariant& retValue)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::send");
+
+    if (mUtilities == NULL)
+        mUtilities = new XQAiwUtils();
+    if (mUtilities == NULL)
+    {
+        XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::Can not create aiw utils");
+        return false;
+    }
+    QVariant applicationId =  mDescr.property(XQAiwInterfaceDescriptor::ImplementationId);
+    XQSERVICE_DEBUG_PRINT("Application id %x", applicationId.toInt());
+
+    mErrorCode = mUtilities->launchFile(applicationId.toInt(), mFile);
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::errorCode %d", mErrorCode);
+    QVariant ret(!mErrorCode);
+    retValue = ret;
+    return (!mErrorCode);
+}
+
+const QString& XQAiwFileDriver::lastErrorMessage() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::lastErrorMessage: %s", qPrintable(mErrorMsg));
+    return mErrorMsg;
+}
+
+int XQAiwFileDriver::lastError() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::lastError %d", mErrorCode);
+    return mErrorCode;
+}
+
+const XQAiwInterfaceDescriptor &XQAiwFileDriver::descriptor() const 
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::descriptor");
+    return mDescr; 
+}
+
+void XQAiwFileDriver::setEmbedded(bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::setEmbedded");
+    mEmbedded = embedded;
+}
+bool XQAiwFileDriver::isEmbedded() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::isEmbedded");
+    return mEmbedded;
+}
+
+void XQAiwFileDriver::setOperation(const QString &operation)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::setOperation");
+    mOperation = operation;
+}
+const QString &XQAiwFileDriver::operation() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::operation");
+    return mOperation;
+}
+
+void XQAiwFileDriver::setSynchronous(bool synchronous)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::setSynchronous");
+    mSynchronous = synchronous;
+}
+bool XQAiwFileDriver::isSynchronous() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::isSynchronous");
+    return mSynchronous;
+}
+
+void XQAiwFileDriver::handleAsyncResponse(const QVariant& value)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::handleAsyncResponse");
+    emit requestOk(value);
+}
+
+void XQAiwFileDriver::handleAsyncError(int err)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::handleAsyncError");
+
+   mErrorCode = err;
+   mErrorMsg = XQAiwUtils::createErrorMessage(mErrorCode, "XQAiwFileDriver");
+   emit requestError(mErrorCode, mErrorMsg);
+}
+
+void XQAiwFileDriver::setBackground(bool background )
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::setBackground");
+    mBackground = background;
+}
+bool XQAiwFileDriver::isBackground() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwFileDriver::isBackground");
+    return mBackground;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwfiledriver.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQAIWFILEDRIVER_H
+#define XQAIWFILEDRIVER_H
+
+#include <xqaiwglobal.h>
+
+#include <QObject>
+#include <qglobal.h>
+
+#include <QList>
+#include <QVariant>
+#include <QAction>
+#include <QFile>
+#include <xqaiwinterfacedescriptor.h>
+#include "xqaiwrequestdriver.h"
+#include "xqaiwutils.h"
+
+class XQServiceRequest;
+
+class XQAiwFileDriver : public XQAiwRequestDriver
+    {
+    Q_OBJECT
+
+public:
+
+    XQAiwFileDriver(const QFile &file, const XQAiwInterfaceDescriptor& descriptor, const QString &operation);
+    XQAiwFileDriver(const XQSharableFile &file, const XQAiwInterfaceDescriptor& descriptor, const QString &operation);
+    
+    virtual ~XQAiwFileDriver();
+    
+    void setArguments(const QList<QVariant> &arguments);
+
+    bool send(QVariant& retValue);
+
+    QAction *createAction();
+
+    int lastError() const;
+
+    const QString& lastErrorMessage() const;
+
+    const XQAiwInterfaceDescriptor &descriptor() const;
+
+    void setEmbedded(bool embedded);
+    bool isEmbedded() const;
+
+    void setOperation(const QString &operation);
+    const QString &operation() const;
+
+    void setSynchronous(bool synchronous);
+    bool isSynchronous() const;
+
+    void setBackground(bool background );
+    bool isBackground() const;
+    
+private slots:
+
+   void handleAsyncResponse(const QVariant& value);
+   void handleAsyncError(int err);
+    
+private:
+    QVariant mFile;
+    XQAiwUtils * mUtilities;
+    };
+
+#endif /* XQAIWFILEDRIVER_H */ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwglobal.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQAIWGLOBAL_H_
+#define XQAIWGLOBAL_H_
+
+#if !defined(XQAIW_EXPORT)
+#if defined(XQ_BUILD_XQSERVICE_LIB) // TODO !!! REMEMBER TO CHANGE THAT IF MOVED TO DIFFERENT LIB !!!
+#define XQAIW_EXPORT Q_DECL_EXPORT
+#else
+#define XQAIW_EXPORT Q_DECL_IMPORT
+#endif
+#endif
+
+#endif /* XQAIWGLOBAL_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwrequest.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,657 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QObject>
+#include <qglobal.h>
+
+#include "xqservicelog.h"
+#include "xqaiwservicedriver.h"
+#include "xqaiwfiledriver.h"
+#include "xqaiwuridriver.h"
+#include "xqaiwrequest.h"
+
+/*!
+    \class XQAiwRequest
+    \inpublicgroup QtBaseModule
+
+    \ingroup ipc
+    \brief Encapsulates the core functionality of the interworking requests
+    
+    The XQAiwRequest class encapsulates the core functionality of the interworking requests and hides the implementation details. 
+    This object is created by the XQApplicationManager::create factory method.
+    
+    This class is a part of API to be used by the applications instead of using XQServiceRequest directly.
+    
+    The Application Manager API offers centric place for applications UIs to handle application to application interworking use cases, like:
+    - Synchronous out-of-process service call from client to service provider, where service provider needs to complete the request before
+      control comes back to requesting client.
+    - Asynchronous out-of-process service call from client to service provider, where Service provider completes the request whenever suitable.
+      The control returns back requesting as soon the service provider has received the asynchronous call (can be applied to notifications as well).
+    - Embedded out-of-process service call. In this case window groups are chained and "Back" returns to client window.
+    - Any named Qt type in the Qt meta-object system can be used as a service call parameter or return value. Also own, custom meta-types are supported.
+    - Launched service provider application (.exe) if not already running when client makes service call to it.
+    - List and discover services dynamically.
+    - Apply UI related options upon service launch, like "launch as embedded", "launch to foreground" and "launch to backround".
+    - Opening files to be viewed by a file viewing interface.
+    - Opening URI to be viewed by a URI viewing interface. Includes also launching activity URIs (appto) as fire-and-forget manner.
+    - Miscellanous AIW support, like get service stasus or get DRM attributes.
+    
+    See the "examples/appmgrclient" included in the QtHighway release for usage examples.
+    
+    <b>Example usage:</b> \n
+    The usage pattern for all the XQAiwRequest variants implemented as service providers , interface, QUrl, QFile, is similar both embedded
+    and non-embedded usage.
+    \code
+        // Recommended way is to add XQApplicationManager as member variable to class
+        // Later on when caching of services
+        // You can use the class also as local variable.
+        class Client
+        {
+
+        public:
+             // Service access
+            bool accessService(void);
+
+        private slots:
+                void handleOk(const QVariant &result);
+                void handleError(int errorCode, const QString& errorMessage);
+        private:
+              XQApplicationManager mAiwMgr;
+        };
+
+
+        //  In client.cpp
+        bool Client::accessService(void)
+        {
+            QString parameter1("+3581234567890");
+            int parameter2 = 3;
+
+            bool embedded=true;  // or false
+
+            XQAiwRequest *request;
+            // Create request by interface name, the very first service implementation
+            // applied.
+            request = mAiwMgr.create("Interface", "functionName2(QString, int)", embedded);
+
+            // If dedicated service is wanted, apply this 
+            // request = mAiwMgr.create("Service", "Interface", 
+            //                          "functionName2(QString, int)", embedded);
+
+            if (request == NULL)
+            {
+                // Service not found 
+                return false;
+            }
+
+            // Connect result handling signal
+            connect(request, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleOk(const QVariant&)));
+            // Connect error handling signal or apply lastError function instead.
+            connect(request, SIGNAL(requestError(int,const QString&)), this, SLOT(handleError(int,const QString&)));
+
+            // Set function parameters
+           QList<QVariant> args;
+           args << parameter1;
+           args << parameter2;
+           request->setArguments(args);
+
+           // In this example, request embedded launch (window groups chained)
+           request->setEmbedded(true);
+
+           // Send the request
+           bool res = request.send();
+           if  (!res) 
+           {
+               // Request failed. 
+              return false;
+           }
+         
+           // If making multiple requests to same service, you can save the request as member variable
+           // In this example all done.
+           delete request;
+           return true;
+        }
+
+        void Client::handleOk(const QVariant& result)
+        {
+           // Handle result here or just save them.
+           // Result could be a service specific error code also.
+           // 
+        }
+
+        void Client::handleError(int errorCode, const QString& errorMessage)
+        {
+           // Handle error
+        }
+    \endcode
+    
+    \sa XQApplicationManager
+*/
+
+/*!
+    Constructs interworking request to service application by the given interface \a descriptor
+    which points to the dedicated implementation. The service application is not started during
+    creation of the request.
+    \param descriptor Points to the dedicated service implementation. Obtained via the XQApplicationManager::list function.
+    \param operation Service function to be called, equals \a message parameter in XQServiceRequest.
+    \param embedded True if window groups should be chained, false otherwise
+    \return Constructed interworking request to service application object.
+*/
+XQAiwRequest::XQAiwRequest(const XQAiwInterfaceDescriptor& descriptor, const QString &operation, bool embedded)
+    : QObject(),
+      currentRequest(NULL),
+      errorMsg(),
+      errorCode(0),
+      completeSignalConnected(false),
+      errorSignalConnected(false)
+{
+
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::XQAiwRequest: %s %s,%d,%x",
+                          qPrintable(descriptor.interfaceName()),
+                          qPrintable(operation),
+                          embedded,
+                          descriptor.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+    
+    // Initialize service request
+    // The XQServiceRequest should actually accept service descriptor as input....
+    currentRequest = new XQAiwServiceDriver(descriptor, operation);
+    if (currentRequest)
+    {
+        currentRequest->setEmbedded(embedded);
+    }
+}
+
+/*!
+    Constructs interworking request to service application by the given uri and the interface \a descriptor
+    which points to the dedicated implementation. The service application is not started during
+    creation of the request.
+    \param uri Uri for the given interworking request to service application.
+    \param descriptor Points to the dedicated service implementation. Obtained via the XQApplicationManager::list function.
+    \param operation Service function to be called, equals \a message parameter in XQServiceRequest.
+    \return Constructed interworking request to service application object.
+*/
+XQAiwRequest::XQAiwRequest(
+    const QUrl &uri, const XQAiwInterfaceDescriptor& descriptor, const QString &operation)
+    : QObject(),
+      currentRequest(NULL),
+      errorMsg(),
+      errorCode(0),
+      completeSignalConnected(false),
+      errorSignalConnected(false)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::XQAiwRequest (uri): %s %s,%x",
+                          qPrintable(descriptor.interfaceName()),
+                          qPrintable(operation),
+                          descriptor.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+
+    if (XQAiwUriDriver::hasCustomHandler(uri))
+    {
+        // Custom handling goes via URI driver
+        currentRequest = new XQAiwUriDriver(uri, descriptor, operation);
+    }
+    else
+    {
+        // Otherwise, apply service based URI access
+        currentRequest = new XQAiwServiceDriver(descriptor, operation);
+    }
+    
+}
+
+
+/*!
+    Constructs interworking request to service application by the file and the interface \a descriptor
+    which points to the dedicated implementation. The service application is not started during
+    creation of the request.
+    \param file File for the given interworking request to service application.
+    \param descriptor Points to the dedicated service implementation. Obtained via the XQApplicationManager::list function.
+    \param operation Service function to be called, equals \a message parameter in XQServiceRequest.
+    \return Constructed interworking request to service application object.
+*/
+XQAiwRequest::XQAiwRequest(
+    const QFile &file, const XQAiwInterfaceDescriptor& descriptor, const QString &operation)
+    : QObject(),
+     currentRequest(NULL),
+      errorMsg(),
+      errorCode(0),
+      completeSignalConnected(false),
+      errorSignalConnected(false)
+{
+
+   XQSERVICE_DEBUG_PRINT("XQAiwRequest::XQAiwRequest (file): %s %x",
+                          qPrintable(file.fileName()),
+                          descriptor.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+
+    // Initialize file service request
+   if (!descriptor.interfaceName().isEmpty())
+   {
+       // Apply normal service request
+       XQSERVICE_DEBUG_PRINT("Apply service driver");
+       currentRequest = new XQAiwServiceDriver(descriptor, operation);
+   }
+   else 
+   {
+       // The is no service provider for the file.
+       // So as backup plan, apply file driver to handle non-service file launches
+       XQSERVICE_DEBUG_PRINT("Apply file driver");
+       currentRequest = new XQAiwFileDriver(file, descriptor, operation);
+   }
+       
+}
+
+/*!
+    Constructs interworking request to service application by the sharable file and the interface \a descriptor
+    which points to the dedicated implementation. The service application is not started during
+    creation of the request.
+    \param file Sharable file for the given interworking request to service application.
+    \param descriptor Points to the dedicated service implementation. Obtained via the XQApplicationManager::list function.
+    \param operation Service function to be called, equals \a message parameter in XQServiceRequest.
+    \return Constructed interworking request to service application object.
+*/
+XQAiwRequest::XQAiwRequest(
+     const XQSharableFile &file, const XQAiwInterfaceDescriptor& descriptor, const QString &operation)
+    : QObject(),
+      currentRequest(NULL),
+      errorMsg(),
+      errorCode(0),
+      completeSignalConnected(false),
+      errorSignalConnected(false)
+{
+
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::XQAiwRequest (file handle): %x",
+                          descriptor.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+
+    // Initialize file service request
+    if (!descriptor.interfaceName().isEmpty())
+    {
+       // Apply normal service request
+        XQSERVICE_DEBUG_PRINT("Apply service driver");
+        currentRequest = new XQAiwServiceDriver(descriptor, operation);
+    }
+    else 
+    {
+       // The is no service provider for the file.
+       // So as backup plan, apply file driver to handle non-service file launches
+        XQSERVICE_DEBUG_PRINT("Apply file driver");
+        currentRequest = new XQAiwFileDriver(file, descriptor, operation);
+    }
+
+}
+
+
+XQAiwRequest::~XQAiwRequest()
+{
+    XQSERVICE_DEBUG_PRINT("~XQAiwRequest::XQAiwRequest");
+
+    // Disconnect signals
+    if (completeSignalConnected)
+    {
+        disconnect(currentRequest, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleAsyncResponse(const QVariant&)));
+    }
+    if (errorSignalConnected)
+    {
+        disconnect(currentRequest, SIGNAL(requestError(int,const QString&)), this, SLOT(handleAsyncError(int)));
+    }
+    
+    delete currentRequest; // Destructor cancels the async request
+    
+    for (int i=0; i<actionList.size(); i++)
+    {
+        delete actionList[i];
+    }
+}
+
+/*!
+    Create a QAction related to request from the registration data. Caller can
+    add the action to wanted UI widget. When the action  is triggered the XQAiwRequest
+    emits triggered() signal for caller.
+    The XQAiwRequest owns the action (caller shall not delete the action object).
+    \return QAction object, if there was action attached to request. Otherwise 0.
+*/
+QAction *XQAiwRequest::createAction()
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::createAction");
+
+    QAction * action = currentRequest->createAction();
+    if (action)
+    {
+        if (!connect(action, SIGNAL(triggered(bool)), this, SLOT(sendFromAction(bool)))) {
+            XQSERVICE_CRITICAL_PRINT("Failed to connect QAction triggered signal to XQAiwRequest.");
+        }
+        actionList.append(action);
+        return action; 
+    }
+    
+    return NULL;
+}
+
+/*!
+    Set arguments for the request. This shall be called before sending
+    add the action to wanted UI widget. For the attached action, the
+    triggered() signal emitted by the request is the last chance to
+    add aguments.
+    \param arguments List of arguments that will be transferred to service provider function
+                     to be called
+*/
+void XQAiwRequest::setArguments(const QList<QVariant> &arguments)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::setArguments");
+    currentRequest->setArguments(arguments);
+}
+
+
+/*!
+    Returns the last error code occured.
+    IPC errors:
+        - ENoError          = 0
+        - EConnectionError  = -5000,  (Server might be busy)
+        - EConnectionClosed = -4999,  
+        - EServerNotFound   = -4998,
+        - EIPCError         = -4997,
+        - EUnknownError     = -4996,
+        - ERequestPending   = -4995,  (already pending request exists)
+        - EMessageNotFound  = -4994,
+        - EArgumentError    = -4993
+    \return Error code as integer value.
+    \sa xqserviceglobal.h for error codes
+
+*/
+int XQAiwRequest::lastError() const
+{
+    int err = currentRequest->lastError();
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::lastError %d", err);
+    return err;
+}
+
+/*!
+    Returns the last error as text for debugging purposes.
+    The content and details of the text may vary over API
+    development time evolution.
+    \return Error code as QString value.
+*/
+const QString& XQAiwRequest::lastErrorMessage() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::lastErrorMessage");
+    return currentRequest->lastErrorMessage();
+}
+
+
+/*!
+    Returns the implementation descriptor of a service attached to request.
+    Caller can check meta-data information of the request.
+    \return Implementation descriptor attached to the request.
+*/
+const XQAiwInterfaceDescriptor &XQAiwRequest::descriptor() const 
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::descriptor");
+    return currentRequest->descriptor();
+}
+
+/*!
+    Starts the service application if necessary and sends request on-ward.
+    The results are delivered via requestOk() and requestError() signals.
+    If the request is synchronous, the client application is blocked until
+    service provider completes the request.
+    \return True on success, false otherwise
+*/
+bool XQAiwRequest::send()
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::send");
+
+    // do request
+    if (sendExecute())
+    {
+        if (currentRequest->isSynchronous())
+        {
+            XQSERVICE_DEBUG_PRINT("XQAiwRequest::emit requestOk");
+            emit requestOk(result);
+            result.clear();
+        }
+        return true;
+    } else
+    {
+        XQSERVICE_DEBUG_PRINT("XQAiwRequest::emit requestError");
+        emit requestError(lastError(), lastErrorMessage());
+        return false;
+    }
+}
+
+
+/*!
+    Convinience method for sending a synchronous request on-ward.
+    The returnValue delivered via the output parameter.
+    \return True on success, false otherwise
+*/
+bool XQAiwRequest::send(QVariant &returnValue)
+{
+
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::send(retValue)");
+
+    // do request
+    if (sendExecute())
+    {
+        if (currentRequest->isSynchronous())
+        {
+            XQSERVICE_DEBUG_PRINT("XQAiwRequest::set retValue ");
+            // Do not emit requestOk as return value delivered directly
+            returnValue = result; // Copy return value
+            result.clear();
+        }
+        return true;
+    } else
+    {
+        XQSERVICE_DEBUG_PRINT("XQAiwRequest::emit requestError");
+        emit requestError(lastError(), lastErrorMessage());
+        return false;
+    }
+   
+}
+
+/*!
+    Request service application to be launched in embedded mode.
+    \param embedded If set to true, service application will be launched
+                    in embedded mode
+*/
+void XQAiwRequest::setEmbedded(bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::setEmbedded=%d",embedded);
+    currentRequest->setEmbedded(embedded);
+}
+
+/*!
+    Get the value of embedded option of the request.
+    \return True if request is set to launch service application in embedded
+            mode, false otherwise
+*/
+bool XQAiwRequest::isEmbedded() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::isEmbedded");
+    return currentRequest->isEmbedded();
+}
+
+/*!
+    Sets service operation. The XQApplicationManager::create() functions for
+    files and URLs set the default operation, but it can be overriden using
+    this function.
+    \param operation Operation to be set to the request.
+*/
+void XQAiwRequest::setOperation(const QString &operation)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::setOperation");
+    currentRequest->setOperation(operation);
+}
+
+/*!
+    Returns operation attached to the request.
+    \return Operation attached to the request
+*/
+const QString &XQAiwRequest::operation() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::operation");
+    return currentRequest->operation();
+}
+
+/*!
+    Sets request as synchronous or asynchronous, based on the \a synchronous value.
+    \param synchronous If set to true, request will be synchronous.
+                       If set to false, request will be asynchronous
+*/
+void XQAiwRequest::setSynchronous(bool synchronous)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::setSynchronous=%d", synchronous);
+    currentRequest->setSynchronous(synchronous);
+}
+
+/*!
+    Returns the value of the synchronous option.
+    \return True if request is synchronous, false otherwise
+*/
+bool XQAiwRequest::isSynchronous() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::isSynchronous");
+    return currentRequest->isSynchronous();
+}
+
+/*!
+    Requests service application to be launched to background initially,
+    or if already running, to go to background.
+    \param background If set to true, service application will be launched
+                      to background
+*/
+void XQAiwRequest::setBackground(bool background )
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::setbackground=%d", background);
+    currentRequest->setBackground(background);
+}
+
+/*!
+    Returns the value of the background option.
+    \return True if request is set to launch service
+                 application to background
+*/
+bool XQAiwRequest::isBackground() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::isBackground");
+    return currentRequest->isBackground();
+}
+
+/*!
+    Used to set additional UI behavior type options to the request.
+    Embedded and background options are handled by their own functions.
+    This function should not be used to implement additional data
+    parameters for operations!
+    \param info UI bahavior type option to be set to the request.
+*/
+void XQAiwRequest::setInfo(const XQRequestInfo &info)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::setInfo");
+    return currentRequest->setInfo(info);
+}
+
+/*!
+    Returns additional options attached to the request.
+    \return Additional options attached to the request.
+*/
+XQRequestInfo XQAiwRequest::info() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::info");
+    return currentRequest->info();
+}
+
+
+
+const QVariant &XQAiwRequest::results() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::results");
+    return result;
+}
+
+
+void XQAiwRequest::sendFromAction(bool checked)
+{
+    Q_UNUSED(checked);
+    
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::sendFromAction");
+    
+    emit triggered(); // Last chance to setup request parameters
+
+    // do request
+    if (sendExecute())
+    {
+        if (isSynchronous())
+        {
+            emit requestOk(result);
+            result.clear();
+        }
+    } else
+    {
+        emit requestError(lastError(), lastErrorMessage());
+    }
+}
+
+bool XQAiwRequest::sendExecute()
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::sendExecute>>>");
+
+    QStringList list;
+    bool res = true;
+    if (!isSynchronous() && !completeSignalConnected)
+    {
+        // Set async request signals once
+        XQSERVICE_DEBUG_PRINT("request::async send");
+        connect(currentRequest, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleAsyncResponse(const QVariant&)));
+        completeSignalConnected = true;
+    }
+    if (!errorSignalConnected)
+    {
+        // Connect always error signal  once
+        connect(currentRequest, SIGNAL(requestError(int,const QString&)), this, SLOT(handleAsyncError(int)));
+        errorSignalConnected = true;
+    }
+    
+    XQSERVICE_DEBUG_PRINT("request::send>>>");
+    res = currentRequest->send(result);  // Result is valid for sync request only    
+    XQSERVICE_DEBUG_PRINT("request::send: %d<<<", res);
+    
+    errorCode = currentRequest->lastError(); // ask always
+    if (errorCode || !res)
+    {
+        res = false;
+    }
+    
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::sendExecute: %d<<<", res);
+    
+    return res;
+
+}
+
+
+
+void XQAiwRequest::handleAsyncResponse(const QVariant& value)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::handleAsyncResponse");
+    emit requestOk(value);
+}
+
+void XQAiwRequest::handleAsyncError(int err)
+{
+   XQSERVICE_DEBUG_PRINT("XQAiwRequest::handleAsyncError");
+   errorCode = err;
+   emit requestError(lastError(), lastErrorMessage());
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwrequest.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,140 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQAIWREQUEST_H_
+#define XQAIWREQUEST_H_
+
+#include <f32file.h>
+
+#include <xqaiwglobal.h>
+
+#include <QObject>
+#include <qglobal.h>
+
+#include <QList>
+#include <QStringList>
+#include <QVariant>
+#include <QAction>
+#include <QUrl>
+#include <QFile>
+#include <xqaiwinterfacedescriptor.h>
+#include <xqrequestinfo.h>
+#include <xqsharablefile.h>
+
+class XQAiwRequestDriver;
+
+class XQSERVICE_EXPORT XQAiwRequest : public QObject
+    {
+    Q_OBJECT
+
+public:
+
+    XQAiwRequest(const XQAiwInterfaceDescriptor &descriptor, const QString &operation, bool embedded = true);
+    XQAiwRequest(const QUrl &uri, const XQAiwInterfaceDescriptor &descriptor, const QString &operation);
+    XQAiwRequest(const QFile &file, const XQAiwInterfaceDescriptor &descriptor, const QString &operation);
+    XQAiwRequest(const XQSharableFile &file, const XQAiwInterfaceDescriptor &descriptor, const QString &operation);
+    virtual ~XQAiwRequest();
+
+public slots:
+    
+    QAction *createAction();
+    
+    void setArguments(const QList<QVariant> &arguments);
+
+    int lastError() const;
+
+    const QString& lastErrorMessage() const;
+
+    const XQAiwInterfaceDescriptor &descriptor() const;
+
+    bool send();
+    bool send(QVariant &returnValue);
+
+    void setEmbedded(bool embedded);
+    bool isEmbedded() const;
+
+    void setOperation(const QString &operation);
+    const QString &operation() const;
+
+    void setSynchronous(bool synchronous);
+    bool isSynchronous() const;
+    
+    void setBackground(bool background );
+    bool isBackground() const;
+
+    void setInfo(const XQRequestInfo &info);
+    XQRequestInfo info() const;
+
+    
+signals:
+
+/*!
+    Emitted when the QAction attached to request has been triggered.
+    Upon this signal is the latest time to call
+    setArguments(const QList<QVariant> &arguments) if not done earlier.
+*/
+    void triggered();
+    
+/*!
+    This signal is emitted when interworking request has been successfully
+    executed (synchronous or asynchronous). That is, the service has returned
+    data back according to the slot spec. The return value may be real data
+    or indicate an service specific error.
+    \param result Result of the executed request
+*/
+    void requestOk(const QVariant& result);
+    
+/*!
+    This signal is emitted when an error has happened in interworking request
+    handling. That is, e.g. the required slot could not be called or connection
+    to server is lost. If the service itself return service specific errors,
+    those should be returned as successfull return value of the slot
+    (requestOk(const QVariant& result)).
+    \param errorCode Error code as integer value
+    \param errorMessage Contains needed R&D specific data that will be added to support error debugging
+    \sa xqserviceglobal.h for error codes.
+*/
+    void requestError(int errorCode, const QString& errorMessage);
+
+protected:
+    
+    virtual const QVariant& results() const;
+    virtual bool sendExecute();
+    
+private slots:
+
+   void handleAsyncResponse(const QVariant& value);
+   void sendFromAction(bool checked);
+   void handleAsyncError(int err);
+    
+private:
+
+    XQAiwRequestDriver* currentRequest;
+    QString errorMsg;
+    int errorCode;
+    QVariant result;  // Client can use results whenever wants
+    QList<QAction*> actionList;
+    bool completeSignalConnected;
+    bool errorSignalConnected;
+    
+    };
+
+#endif /* XQAIWREQUEST_H_ */ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwrequestdriver.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQAIWREQUESTDRIVER_H
+#define XQAIWREQUESTDRIVER_H
+
+#include <f32file.h>
+#include <xqaiwglobal.h>
+
+#include <QObject>
+#include <qglobal.h>
+#include <QList>
+#include <QVariant>
+#include <QAction>
+#include <xqaiwinterfacedescriptor.h>
+#include <xqrequestinfo.h>
+
+class XQAiwRequestDriver : public QObject
+    {
+    Q_OBJECT
+    
+public:
+
+    XQAiwRequestDriver() :
+            mEmbedded(false),
+            mErrorCode(0),
+            mSynchronous(false),
+            mBackground(false)
+    {};
+
+    virtual ~XQAiwRequestDriver() {};
+    
+    virtual void setArguments(const QList<QVariant> &arguments) = 0;
+
+    virtual bool send(QVariant& retValue) = 0;
+
+    virtual QAction *createAction() = 0;
+
+    virtual int lastError() const = 0;
+
+    virtual const QString& lastErrorMessage() const = 0;
+
+    virtual const XQAiwInterfaceDescriptor &descriptor() const = 0;
+
+    virtual void setEmbedded(bool embedded) = 0;
+    virtual bool isEmbedded() const = 0;
+
+    virtual void setOperation(const QString &operation) = 0;
+    virtual const QString &operation() const = 0;
+
+    virtual void setSynchronous(bool synchronous)= 0;
+    virtual bool isSynchronous() const = 0;
+    
+    virtual void setBackground(bool background )= 0;
+    virtual bool isBackground() const = 0;
+
+    virtual void setInfo(const XQRequestInfo &info) {mInfo = info;};
+    virtual XQRequestInfo info() const {return mInfo;};
+   
+signals:
+
+    void requestOk(const QVariant& result);
+    void requestError(int errorCode, const QString& errorMessage);
+  
+protected:
+
+    QString mOperation;
+    bool mEmbedded;
+    XQAiwInterfaceDescriptor mDescr;
+    QString mErrorMsg;
+    int mErrorCode;
+    QList<QVariant> mArguments;
+    bool mSynchronous;
+    bool mBackground;
+    XQRequestInfo mInfo;
+    };
+
+#endif /* XQAIWREQUESTDRIVER_H */ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwservicedriver.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,361 @@
+/*
+*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QObject>
+#include <qglobal.h>
+#include <QApplication>
+#include <QLatin1String>
+#include <QLocale>
+#include <QIcon>
+#include <QFileInfo>
+
+#include <xqaiwdecl.h>
+#include <xqservicerequest.h>
+#include "xqrequestutil.h"
+#include "xqservicelog.h"
+#include "xqaiwutils.h"
+#include "xqaiwservicedriver.h"
+
+// Constants
+
+XQAiwServiceDriver::XQAiwServiceDriver(const XQAiwInterfaceDescriptor& descriptor, const QString &operation)
+    : XQAiwRequestDriver(),
+      currentRequest(NULL),
+      completeSignalConnected(false),
+      errorSignalConnected(false)
+    {
+    mErrorMsg = "";
+    mDescr = descriptor; 
+    mOperation = operation; 
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::XQAiwServiceDriver: %s %s,%x",
+                          qPrintable(mDescr.interfaceName()),
+                          qPrintable(mOperation),
+                          mDescr.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+    
+    // Allocate QtHighway request
+    currentRequest = new XQServiceRequest(mDescr, mOperation);
+    }
+
+XQAiwServiceDriver::~XQAiwServiceDriver()
+{
+    XQSERVICE_DEBUG_PRINT("~XQAiwServiceDriver::XQAiwServiceDriver");
+
+    // Disconnect signals
+    if (completeSignalConnected)
+    {
+        disconnect(currentRequest, SIGNAL(requestCompleted(const QVariant&)), this, SLOT(handleAsyncResponse(const QVariant&)));
+    }
+    if (errorSignalConnected)
+    {
+        disconnect(currentRequest, SIGNAL(requestError(int)), this, SLOT(handleAsyncError(int)));
+    }
+    
+    delete currentRequest; // Destructor cancels the async request
+
+    XQSERVICE_DEBUG_PRINT("~XQAiwServiceDriver::XQAiwServiceDriver 2");
+    removeTranslator();
+    currentRequest = NULL;
+}
+
+
+
+QAction *XQAiwServiceDriver::createAction()
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::createAction");
+    
+    if (!qApp)
+        return NULL;  // Not supported in non-GUI environments
+
+    installTranslator();
+    
+    QString textId = mDescr.customProperty(XQCUSTOM_PROP_AIW_TEXT);
+    if (textId.isEmpty())
+    {
+        // Applye the key name and make it visible to client as indication of
+        // missing property ..
+        textId = "#missing " + XQCUSTOM_PROP_AIW_TEXT;
+    }
+    
+    QByteArray ba = textId.toLatin1();
+    const char *textPtr = ba.data();
+    QString text = qtTrId(textPtr);  // translate
+    XQSERVICE_DEBUG_PRINT("Translated text %s", qPrintable(text));
+
+    QAction *action=0;
+    QIcon icon;
+    QString iconFile = mDescr.customProperty(XQCUSTOM_PROP_AIW_ICON);
+    if (!iconFile.isEmpty())
+    {
+        XQSERVICE_DEBUG_PRINT("QAction with icon and text");
+        icon.addFile(iconFile);
+        action = new QAction(icon, text, 0);
+    }
+    else
+    {
+        XQSERVICE_DEBUG_PRINT("QAction with text");
+        action = new QAction(text,0);
+    }
+
+    return action;
+}
+
+void XQAiwServiceDriver::setArguments(const QList<QVariant> &arguments)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::setArguments");
+    currentRequest->setArguments(arguments);
+}
+
+
+bool XQAiwServiceDriver::send(QVariant& retValue)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::send>>>");
+
+    // Update info  (these ones  can be given via XQAiwRequest function count)
+    XQRequestInfo opt = info();
+    QVariant emb = opt.info(XQServiceUtils::OptEmbedded);
+    QVariant bg = opt.info(XQServiceUtils::OptBackground);
+    if (!emb.isValid())
+    {
+        // Not set via setInfo
+        opt.setEmbedded(mEmbedded); 
+    }
+    if (!bg.isValid())
+    {
+        // Not set via setInfo
+        opt.setBackground(mBackground);
+    }
+    currentRequest->setInfo(opt);
+    
+    QStringList list;
+    bool res = true;
+    if (!currentRequest->isSynchronous() && !completeSignalConnected)
+    {
+        // Async request. Connect signal only once
+        XQSERVICE_DEBUG_PRINT("request::async send");
+        connect(currentRequest, SIGNAL(requestCompleted(const QVariant&)), this, SLOT(handleAsyncResponse(const QVariant&)));
+        completeSignalConnected = true;
+    }
+    if (!errorSignalConnected)
+    {
+        // Connect error signal only once
+        connect(currentRequest, SIGNAL(requestError(int)), this, SLOT(handleAsyncError(int)));
+        errorSignalConnected = true;
+    }
+    
+    XQSERVICE_DEBUG_PRINT("request::send>>>");
+    res = currentRequest->send(retValue);  // Result is valid for sync request only
+    XQSERVICE_DEBUG_PRINT("request::send: %d<<<", res);
+    
+    mErrorCode = XQRequestUtil::mapError(currentRequest->latestError());
+    if (res && !mErrorCode)
+    {
+        mErrorMsg = "";
+    }
+    else
+    {
+        // This is for debugging/trace purposes only,  no need to localize
+        mErrorMsg = XQAiwUtils::createErrorMessage(mErrorCode, "XQAiwServiceDriver", "sync send");
+    }
+    
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::send: %d<<<", res);
+    
+    return res;
+
+}
+
+const QString& XQAiwServiceDriver::lastErrorMessage() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::lastErrorMessage: %s", qPrintable(mErrorMsg));
+    return mErrorMsg;
+}
+
+int XQAiwServiceDriver::lastError() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::lastError %d", mErrorCode);
+    return mErrorCode;
+}
+
+const XQAiwInterfaceDescriptor &XQAiwServiceDriver::descriptor() const 
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::descriptor");
+    return mDescr; 
+}
+
+void XQAiwServiceDriver::setEmbedded(bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::setEmbedded");
+    // Embedded is option
+    mEmbedded = embedded;
+}
+bool XQAiwServiceDriver::isEmbedded() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::isEmbedded");
+    // Embedded is option
+    return mEmbedded;
+}
+
+
+void XQAiwServiceDriver::setBackground(bool background )
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::setBackground");
+    mBackground = background;
+}
+bool XQAiwServiceDriver::isBackground() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::isBackground");
+    return mBackground;
+}
+
+
+void XQAiwServiceDriver::setOperation(const QString &operation)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::setOperation");
+    mOperation = operation;
+    currentRequest->setMessage(operation);
+}
+const QString &XQAiwServiceDriver::operation() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwRequest::operation");
+    return mOperation;
+}
+
+void XQAiwServiceDriver::setSynchronous(bool synchronous)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::setSynchronous");
+    currentRequest->setSynchronous(synchronous);
+}
+bool XQAiwServiceDriver::isSynchronous() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::isSynchronous");
+    
+    return currentRequest->isSynchronous();
+}
+
+void XQAiwServiceDriver::setInfo(const XQRequestInfo &info)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::setInfo");
+    currentRequest->setInfo(info);
+}
+
+XQRequestInfo XQAiwServiceDriver::info() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::info");
+    return currentRequest->info();
+}
+
+void XQAiwServiceDriver::handleAsyncResponse(const QVariant& value)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::handleAsyncResponse");
+    emit requestOk(value);
+}
+
+void XQAiwServiceDriver::handleAsyncError(int err)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::handleAsyncError");
+
+   mErrorCode = XQRequestUtil::mapError(err);
+   mErrorMsg = XQAiwUtils::createErrorMessage(mErrorCode, "XQAiwServiceDriver", "async send");
+   emit requestError(mErrorCode, mErrorMsg);
+
+}
+
+
+bool XQAiwServiceDriver::installTranslator()
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::installTranslator");
+
+    if (!qApp)
+    {
+        XQSERVICE_DEBUG_PRINT("\tNo application context");
+        return false;
+    }
+
+    // The the name of the resource file containing the text
+    QString textFile = mDescr.customProperty(XQCUSTOM_PROP_AIW_TEXT_FILE);
+    if (textFile.isEmpty())
+    {
+        XQSERVICE_DEBUG_PRINT("\tCustom property missing for text file");
+        return false;
+    }
+    
+    // Check if locale has changed since last request
+    QString lang = QLocale::system().name();
+    XQSERVICE_DEBUG_PRINT("\tLanguage now is%s", qPrintable(lang));
+    if (!this->lastLang.isEmpty() && (this->lastLang != lang))
+    { 
+        // Language has changed since last time
+        // Remove previous translator, if any
+        removeTranslator();
+    }
+
+    textFile = makeFileName(textFile);
+    
+    bool res=false;
+    if (this->translator.isEmpty())
+    {
+        // Construct the full name of the localized resource
+        XQSERVICE_DEBUG_PRINT("textFile name is %s", qPrintable(textFile));
+        res = this->translator.load(textFile);
+        if (res)
+        {
+            qApp->installTranslator(&this->translator);
+            this->lastLang = lang;  // Remember the current language
+            XQSERVICE_DEBUG_PRINT("Translator installed %s", qPrintable(lang));
+        }
+    }
+    
+    return res;
+    
+}
+
+void XQAiwServiceDriver::removeTranslator()
+{
+    if (qApp && !this->translator.isEmpty())
+    {
+        qApp->removeTranslator(&this->translator);
+    }
+}
+
+QString XQAiwServiceDriver::makeFileName(const QString &textFile) const
+{
+    QFileInfo info(textFile);
+    QString ret = textFile;
+    
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::makeFileName %s", qPrintable(textFile));
+    
+    if (info.baseName() == info.filePath())
+    {
+        // No path, apply the default path
+        // Drive is where app is loaded, like "C:" or "Z:"
+        ret = qApp->applicationFilePath().left(2) + "/resource/qt/translations/" + textFile;
+    }
+
+    // Add current language
+    QString lang = QLocale::system().name();
+    ret += "_"; 
+    ret += lang;
+    
+    XQSERVICE_DEBUG_PRINT("XQAiwServiceDriver::makeFileName ret=%s", qPrintable(ret));
+
+    return ret;
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwservicedriver.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQAIWSERVICEDRIVER_H
+#define XQAIWSERVICEDRIVER_H
+
+#include <xqaiwglobal.h>
+
+#include <QObject>
+#include <qglobal.h>
+#include <qtranslator.h>
+
+#include <QList>
+#include <QVariant>
+#include <QAction>
+#include <xqaiwinterfacedescriptor.h>
+#include "xqaiwrequestdriver.h"
+
+class XQServiceRequest;
+
+class XQAiwServiceDriver : public XQAiwRequestDriver
+    {
+    Q_OBJECT
+
+public:
+
+    XQAiwServiceDriver(const XQAiwInterfaceDescriptor& descriptor, const QString &operation);
+    
+    virtual ~XQAiwServiceDriver();
+    
+    void setArguments(const QList<QVariant> &arguments);
+
+    bool send(QVariant& retValue);
+
+    QAction *createAction();
+
+    int lastError() const;
+
+    const QString& lastErrorMessage() const;
+
+    const XQAiwInterfaceDescriptor &descriptor() const;
+
+    void setEmbedded(bool embedded);
+    bool isEmbedded() const;
+
+    void setOperation(const QString &operation);
+    const QString &operation() const;
+
+    void setSynchronous(bool synchronous);
+    bool isSynchronous() const;
+    
+    void setBackground(bool background );
+    bool isBackground() const;
+
+    void setInfo(const XQRequestInfo &info);
+    XQRequestInfo info() const;
+    
+private slots:
+
+   void handleAsyncResponse(const QVariant& value);
+   void handleAsyncError(int err);
+
+private:
+   bool installTranslator();
+   void removeTranslator();
+   QString makeFileName(const QString &textFile) const;
+   
+private:
+
+    XQServiceRequest * currentRequest;
+    bool completeSignalConnected;
+    bool errorSignalConnected;
+    QTranslator translator;
+    QString lastLang;
+    };
+
+#endif /* XQAIWSERVICEDRIVER_H */ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwuridriver.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,238 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QObject>
+#include <qglobal.h>
+#include <QDesktopServices>
+#include <QLatin1String>
+
+#include <xqaiwdecl.h>
+#include "xqserviceglobal.h"
+#include "xqservicelog.h"
+#include "xqaiwuridriver.h"
+#include <qservicemanager.h>  // Integrate to activity manager
+
+using namespace QtMobility;
+
+XQAiwUriDriver::XQAiwUriDriver(const QUrl &uri, const XQAiwInterfaceDescriptor& descriptor, const QString &operation)
+    : XQAiwRequestDriver(),
+       mUtilities(NULL)
+{
+
+    mErrorMsg = "";
+    mDescr = descriptor;
+    mUri = uri;
+    mOperation = operation;
+
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::XQAiwUriDriver: %s",
+                          qPrintable(mUri.toString()));
+    
+}
+
+XQAiwUriDriver::~XQAiwUriDriver()
+{
+    XQSERVICE_DEBUG_PRINT("~XQAiwUriDriver::XQAiwUriDriver");
+    delete mUtilities;
+    
+}
+
+QAction *XQAiwUriDriver::createAction()
+{
+    return NULL;  //  Not supported
+}
+
+void XQAiwUriDriver::setArguments(const QList<QVariant> &arguments)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::setArguments");
+    mArguments =  arguments;
+}
+
+
+bool XQAiwUriDriver::send(QVariant& retValue)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::send %s", qPrintable(mUri.toString()));
+
+    mErrorCode = XQService::ENoError;
+    
+    // Browser URI
+    if (mUri.scheme().compare("http", Qt::CaseInsensitive) == 0 ||
+        mUri.scheme().compare("https", Qt::CaseInsensitive) == 0)
+    {
+        XQSERVICE_DEBUG_PRINT("Apply QDesktopServices::openUrl");
+        bool b = QDesktopServices::openUrl(mUri);
+        if (!b)
+        {
+            mErrorCode = XQService::EConnectionError;
+            mErrorMsg = XQAiwUtils::createErrorMessage(mErrorCode, "QDesktopServices::openUrl", mUri.toString());
+        }
+        return b;
+    }
+
+    // "appto" URI
+    if (mUri.scheme().compare(XQURI_SCHEME_ACTIVITY,Qt::CaseInsensitive) == 0)
+    {
+        return handleApptoUri(mUri);
+    }
+
+    //
+    // The rest
+    //
+    mErrorCode = XQService::EArgumentError;
+    mErrorMsg = XQAiwUtils::createErrorMessage(mErrorCode, "XQAiwUriDriver:Not custom handler for", mUri.toString());
+    
+    return false;
+    
+}
+
+const QString& XQAiwUriDriver::lastErrorMessage() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::lastErrorMessage: %s", qPrintable(mErrorMsg));
+    return mErrorMsg;
+}
+
+int XQAiwUriDriver::lastError() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::lastError %d", mErrorCode);
+    return mErrorCode;
+}
+
+const XQAiwInterfaceDescriptor &XQAiwUriDriver::descriptor() const 
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::descriptor");
+    return mDescr; 
+}
+
+void XQAiwUriDriver::setEmbedded(bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::setEmbedded");
+    mEmbedded = embedded;
+}
+bool XQAiwUriDriver::isEmbedded() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::isEmbedded");
+    return mEmbedded;
+}
+
+void XQAiwUriDriver::setOperation(const QString &operation)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::setOperation");
+    mOperation = operation;
+}
+const QString &XQAiwUriDriver::operation() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::operation");
+    return mOperation;
+}
+
+void XQAiwUriDriver::setSynchronous(bool synchronous)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::setSynchronous");
+    mSynchronous = synchronous;
+}
+bool XQAiwUriDriver::isSynchronous() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::isSynchronous");
+    return mSynchronous;
+}
+
+//
+// Check if we can handle the URI
+//
+bool XQAiwUriDriver::hasCustomHandler(const QUrl &uri)
+{
+    QString scheme = uri.scheme();
+    return  (scheme.compare(XQURI_SCHEME_ACTIVITY,Qt::CaseInsensitive) == 0 ||
+            scheme.compare(XQURI_SCHEME_HTTP,Qt::CaseInsensitive) == 0 ||
+            scheme.compare(XQURI_SCHEME_HTTPS,Qt::CaseInsensitive) == 0);
+}
+
+
+void XQAiwUriDriver::handleAsyncResponse(const QVariant& value)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::handleAsyncResponse");
+    emit requestOk(value);
+}
+
+void XQAiwUriDriver::handleAsyncError(int err)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::handleAsyncError");
+
+   mErrorCode = err;
+   mErrorMsg = XQAiwUtils::createErrorMessage(mErrorCode,"XQAiwUriDriver", "async send");
+   emit requestError(mErrorCode, mErrorMsg);
+}
+
+void XQAiwUriDriver::setBackground(bool background )
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::setBackground");
+    mBackground = background;
+}
+bool XQAiwUriDriver::isBackground() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::isBackground");
+    return mBackground;
+}
+
+bool XQAiwUriDriver::handleApptoUri(const QUrl &uri)
+{
+    //
+    // Use Qt service framework errors as is (they are in different range than XQ errors)
+    //
+    QLatin1String xml("Z:/resource/activity/activityserviceplugin.xml");
+    mErrorCode = QServiceManager::NoError;
+                
+    QtMobility::QServiceManager serviceManager;
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::handleApptoUri");
+
+    bool b = serviceManager.addService(xml);
+    mErrorCode = serviceManager.error();
+    XQSERVICE_DEBUG_PRINT("\taddService=%d", mErrorCode);
+    switch (mErrorCode)
+    {
+        case QServiceManager::NoError:
+        case QServiceManager::ServiceAlreadyExists:
+        case QServiceManager::ImplementationAlreadyExists:
+            // These are OK cases.
+            mErrorCode = QServiceManager::NoError;
+            break;
+        default:
+            return false;
+    }
+    
+    QObject* activityManager = serviceManager.loadInterface("com.nokia.qt.activities.ActivityManager");
+    mErrorCode = serviceManager.error();
+    XQSERVICE_DEBUG_PRINT("\tloadInterface %s=%d", "com.nokia.qt.activities.ActivityManager", mErrorCode);
+    if (!activityManager)
+    {
+       mErrorCode = serviceManager.error();
+       return false;
+    }
+    
+    QMetaObject::invokeMethod(activityManager, "launchActivity", Q_ARG(QUrl,uri));
+    mErrorCode = serviceManager.error();
+    
+    XQSERVICE_DEBUG_PRINT("\tinvokeMethod=%d", mErrorCode);
+    delete activityManager;
+
+    XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::handleApptoUri done");
+    
+    return mErrorCode == QServiceManager::NoError;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwuridriver.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQAIWURIDRIVER_H
+#define XQAIWURIDRIVER_H
+
+#include <xqaiwglobal.h>
+
+#include <QObject>
+#include <qglobal.h>
+
+#include <QList>
+#include <QVariant>
+#include <QAction>
+#include <QUrl>
+#include <xqaiwinterfacedescriptor.h>
+#include "xqaiwrequestdriver.h"
+#include "xqaiwutils.h"
+
+class XQServiceRequest;
+
+class XQAiwUriDriver : public XQAiwRequestDriver
+    {
+    Q_OBJECT
+
+public:
+
+    XQAiwUriDriver(
+         const QUrl &uri, const XQAiwInterfaceDescriptor& descriptor, const QString &operation);
+    
+    virtual ~XQAiwUriDriver();
+    
+    void setArguments(const QList<QVariant> &arguments);
+
+    bool send(QVariant& retValue);
+
+    QAction *createAction();
+
+    int lastError() const;
+
+    const QString& lastErrorMessage() const;
+
+    const XQAiwInterfaceDescriptor &descriptor() const;
+
+    void setEmbedded(bool embedded);
+    bool isEmbedded() const;
+
+    void setOperation(const QString &operation);
+    const QString &operation() const;
+
+    void setSynchronous(bool synchronous);
+    bool isSynchronous() const;
+
+    static bool hasCustomHandler(const QUrl &uri);
+
+    void setBackground(bool background );
+    bool isBackground() const;
+    
+private slots:
+
+   void handleAsyncResponse(const QVariant& value);
+   void handleAsyncError(int err);
+   
+private:   
+   bool handleApptoUri(const QUrl &url);
+   
+private:
+    QUrl mUri;
+    XQAiwUtils * mUtilities;
+
+    };
+
+#endif /* XQAIWURIDRIVER_H */ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwutils.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,620 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <e32std.h>
+#include <apgcli.h>
+#include <apacmdln.h> 
+#include <apparc.h>
+#include <apmstd.h>
+#include <w32std.h>
+#include <apgtask.h>
+#include <caf/content.h>
+
+#include "xqaiwdecl.h"
+#include "xqservicelog.h"
+#include <xqserviceglobal.h>  // Error codes
+#include <xqserviceipcconst.h>
+#include <xqapplicationmanager.h>
+#include "xqaiwutils.h"
+
+
+class XQAiwUtilsPrivate : public QObject
+{
+    public:
+
+        XQAiwUtilsPrivate();
+        virtual ~XQAiwUtilsPrivate();
+        
+        void launchApplicationL(int applicationId, const QString &cmdArguments);
+        int launchFile(const QVariant &file);
+        int findApplicationFromApa(const QString &file, int &applicationId, QString &mimeType);
+        int findApplicationFromApa(const XQSharableFile &file, int &applicationId, QString &mimeType);
+        bool applicationExists(int applicationId);
+        int toIntFromHex(const QString &str, bool *ok);
+        void GetDrmAttributesL(ContentAccess::CContent *c, const QList<int> & attributes, QVariantList &result);
+        
+    public:
+        RApaLsSession apaSession;
+    
+};
+
+
+XQAiwUtils::XQAiwUtils()
+   : d(NULL)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUtils::XQAiwUtils");
+    d = new XQAiwUtilsPrivate();
+}
+
+XQAiwUtils::~XQAiwUtils()
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUtils::~XQAiwUtils");
+    delete d;
+};
+
+int XQAiwUtils::launchApplication(int applicationId, const QList<QVariant> &arguments)
+{
+    TInt error = KErrNone;
+    
+    // Create space separated command line args
+    QString args = createCmdlineArgs(arguments);
+    XQSERVICE_DEBUG_PRINT("args %s", qPrintable(args));
+    
+    TRAP(error, d->launchApplicationL(applicationId, args));
+    return mapError(error);
+}
+
+int XQAiwUtils::launchFile(int applicationId, const QVariant &file)
+{
+    Q_UNUSED(applicationId);
+    TInt error = KErrNone;
+    error=d->launchFile(file);
+    return mapError(error);
+}
+
+
+int XQAiwUtils::mapError(int symbianError)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUtils::doMapErrors");
+    XQSERVICE_DEBUG_PRINT("error: %d", symbianError);
+    int error(XQService::ENoError);
+    switch (symbianError)
+    {
+        case KErrNone:
+        {
+            error = XQService::ENoError;
+            break;
+        }
+        
+        case KErrPermissionDenied:
+        case KErrServerTerminated:
+        {
+            error = XQService::EConnectionClosed;
+            break;
+        }
+        case KErrServerBusy:
+        {
+            error = XQService::EConnectionError;
+            break;
+        }
+        case KErrArgument:
+        {
+            error = XQService::EArgumentError;
+            break;
+        }
+        case KErrNoMemory:
+        {
+            error = XQService::EIPCError;
+            break;
+        }
+        case KErrNotFound:
+        {
+            error = XQService::EServerNotFound;
+            break;
+        }
+        
+        default:
+        {
+            error = XQService::EUnknownError;
+            break;
+        }
+    }
+    XQSERVICE_DEBUG_PRINT("error: %d", error);
+    return error;
+    
+}
+
+int XQAiwUtils::findApplication(const QFile &file, int &applicationId)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUtils::findApplication %s", qPrintable(file.fileName()));
+    TInt error = KErrNone;
+    int appId = 0;
+    QString mimeType;
+    error = d->findApplicationFromApa(file.fileName(), appId, mimeType);
+    if (!error)
+    {
+        applicationId = appId;
+    }
+    return error;
+
+}
+
+int XQAiwUtils::findApplication(const XQSharableFile &file, int &applicationId)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUtils::findApplication (handle)");
+    TInt error = KErrNone;
+    int appId = 0;
+    QString mimeType;
+    error = d->findApplicationFromApa(file, appId, mimeType);
+    if (!error)
+    {
+        applicationId = appId;
+    }
+    return error;
+
+}
+
+
+int XQAiwUtils::findApplication(const QUrl &uri, int &applicationId)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUtils::findapplication %s", qPrintable(uri.toString()));
+    int appId = 0;
+    bool idOk = false;
+    if (uri.scheme() == XQURI_SCHEME_ACTIVITY)  // application://uid3
+    {
+        QString uid = uri.authority(); 
+        XQSERVICE_DEBUG_PRINT("findApplication::authority=%s", qPrintable(uid));
+        appId = d->toIntFromHex(uid, &idOk);
+        XQSERVICE_DEBUG_PRINT("XQAiwUriDriver::appid=%x,%d", appId, idOk);
+
+        if (idOk)
+        {
+            idOk = d->applicationExists(appId);
+        }
+    }
+    else if (uri.scheme() == XQURI_SCHEME_FILE)  // file://
+    {
+        QString mimeType;
+        TInt err = d->findApplicationFromApa(uri.toLocalFile(), appId, mimeType);
+        idOk = (err == KErrNone);
+    }
+
+    if (idOk)
+    {
+        applicationId = appId;
+        return mapError(KErrNone);
+    }
+
+    return mapError(KErrNotFound);
+
+}
+
+// Create space separated command line args
+QString XQAiwUtils::createCmdlineArgs(const QList<QVariant> &args)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUtils::createCmdlineArgs");
+    
+    QString argsStr = "";
+    for ( int i = 0; i < args.size(); ++i )
+    {
+        QVariant v = args.at(i);
+        QString s = v.toString();
+        if (!s.isEmpty())
+        {
+            argsStr += (i==0 ? "" : " ");
+            argsStr += s;
+        }
+    }
+
+    return argsStr;
+    
+}
+
+
+// Error error message for R&D purposes
+QString XQAiwUtils::createErrorMessage(int errorCode, const QString context, const QString detail)
+{
+    QString txt;
+    switch (errorCode)
+    {
+        case XQService::ENoError:
+                txt =  "ENoError";
+        break;
+
+        case XQService::EConnectionError:
+                txt ="EConnectionError";
+        break;
+
+        case XQService::EConnectionClosed:
+                txt = "EConnectionClosed";
+        break;
+
+        case XQService::EServerNotFound:
+                txt = "EServerNotFound";
+        break;
+
+        case XQService::EIPCError:
+                txt = "EIPCError";
+        break;
+
+        case XQService::EUnknownError:
+                txt = "EUnknownError";
+        break;
+
+        case XQService::ERequestPending:
+                txt = "ERequestPending";
+        break;
+
+        case XQService::EMessageNotFound:
+                txt = "EMessageNotFound";
+        break;
+
+        case XQService::EArgumentError:
+                txt = "EArgumentError";
+        break;
+
+        default:
+            txt = QString("AIW error: %1").arg(errorCode);
+            break;
+
+    }
+
+    QString ret = "AIW error: ";
+    ret += txt;
+    ret += " (";
+    ret += context;
+    ret += ",";
+    ret += detail;
+    ret += ")";
+
+    return ret;
+}
+
+bool XQAiwUtils::getDrmAttributes(const QString &file, const QList<int> & attributes, QVariantList &result)
+{
+
+    QString fileName = file;
+    fileName.replace("/", "\\");  // Normalize
+    
+    XQSERVICE_DEBUG_PRINT("XQAiwUtilsPrivate::getDrmAttributes %s", qPrintable(fileName));
+    
+    TPtrC fileNameSymbian( reinterpret_cast<const TUint16*>(fileName.utf16()));
+    
+    TInt err=KErrNone;
+    ContentAccess::CContent* c = 0;
+
+    TRAP(err,c = ContentAccess::CContent::NewL(fileNameSymbian));
+    if (err != KErrNone)
+    {
+        XQSERVICE_DEBUG_PRINT("XQAiwUtilsPrivate::getDrmAttributes leave %d", err);
+        return false;
+    }
+    CleanupStack::PushL(c);
+
+    d->GetDrmAttributesL(c, attributes, result);
+
+    CleanupStack::PopAndDestroy();  // c
+
+    return true;
+}
+
+
+bool XQAiwUtils::getDrmAttributes(const XQSharableFile &file, const QList<int> & attributes, QVariantList &result)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUtilsPrivate::getDrmAttributes (handle) %s", qPrintable(file.fileName()));
+
+    RFile fileHandle;
+    if (!file.getHandle(fileHandle))
+    {
+        XQSERVICE_DEBUG_PRINT("\tInvalid handle");
+        return false;
+    }
+    TInt err=KErrNone;
+    ContentAccess::CContent* c = 0;
+    TRAP(err,c = ContentAccess::CContent::NewL(fileHandle));
+    if (err != KErrNone)
+    {
+        XQSERVICE_DEBUG_PRINT("XQAiwUtilsPrivate::getDrmAttributes leave %d", err);
+        return false;
+    }
+    CleanupStack::PushL(c);
+
+    d->GetDrmAttributesL(c, attributes, result);
+
+    CleanupStack::PopAndDestroy();  // c
+
+    return true;
+}
+
+int XQAiwUtils::toIntFromHex(const QString &str, bool *ok)
+{
+    return d->toIntFromHex(str,ok);
+    
+}
+
+
+// --- XQAiwUtilsPrivate--
+
+XQAiwUtilsPrivate::XQAiwUtilsPrivate()
+{
+    apaSession.Connect();
+}
+
+XQAiwUtilsPrivate::~XQAiwUtilsPrivate()
+{
+    apaSession.Close();
+}
+
+void XQAiwUtilsPrivate::launchApplicationL(int applicationId, const QString &cmdArguments)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUtils::launchApplication");
+    XQSERVICE_DEBUG_PRINT("applicationId=%x, cmdArguments %s", applicationId, qPrintable(cmdArguments));
+
+    TPtrC cmdArgs( reinterpret_cast<const TUint16*>(cmdArguments.utf16()) );
+    TUid uid;
+    uid.iUid = applicationId;
+
+    RWsSession wsSession;
+    User::LeaveIfError(wsSession.Connect());
+    CleanupClosePushL(wsSession);
+
+    TApaTaskList taskList( wsSession );
+    TApaTask task = taskList.FindApp( uid );
+
+    if ( task.Exists() )
+    {
+        // Switching
+        XQSERVICE_DEBUG_PRINT("XQAiwUtils::launchApplication: switch to existing");
+        // TODO: How to pass new aguments to  running process ? Use SendMessage ?
+        task.BringToForeground();
+        CleanupStack::PopAndDestroy();  // wsSession
+    }
+    else
+    {
+        // Start application
+        TApaAppInfo aInfo;
+        User::LeaveIfError( apaSession.GetAppInfo( aInfo, uid ) );
+        CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
+        cmdLine->SetExecutableNameL( aInfo.iFullName );
+        RProcess newApp;
+        User::LeaveIfError(newApp.Create(aInfo.iFullName, cmdArgs));
+        cmdLine->SetProcessEnvironmentL(newApp);
+        newApp.Resume();
+        newApp.Close(); // Close the handle (not the app)
+        CleanupStack::PopAndDestroy(2);  // cmdLine, wsSession
+    }
+
+    XQSERVICE_DEBUG_PRINT("application started");
+
+}
+
+
+int  XQAiwUtilsPrivate::launchFile(const QVariant &file)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUtils::launchFile");
+
+    TThreadId startedApp;
+    TInt err=KErrNone;
+    if (file.typeName() == QString("XQSharableFile"))
+    {
+        XQSharableFile sharableFile = file.value<XQSharableFile>();
+        RFile fileHandle;
+        XQSERVICE_DEBUG_PRINT("\tStarting file by handle %s", qPrintable(sharableFile.fileName()));
+        if (!sharableFile.getHandle(fileHandle))
+        {
+            err=KErrArgument;
+        }
+        else
+        {
+            err = apaSession.StartDocument(fileHandle, startedApp);
+        }
+    }
+    else
+    {
+        QString fileName = file.toString();
+        fileName.replace("/", "\\");  // Normalize just-in case
+        XQSERVICE_DEBUG_PRINT("\tStarting file %s", qPrintable(fileName));
+        TPtrC fname( reinterpret_cast<const TUint16*>(fileName.utf16()) );
+        err=apaSession.StartDocument(fname, startedApp);
+    }
+
+    XQSERVICE_DEBUG_PRINT("XQAiwUtils::launchFile status=%d", err);
+    return err;
+
+}
+
+
+
+
+int XQAiwUtilsPrivate::findApplicationFromApa(const QString &file, int &applicationId, QString &mimeType)
+{
+    QString fileName = file;
+    
+    XQSERVICE_DEBUG_PRINT("XQAiwUtilsPrivate::::findApplicationFromApa file=%s", qPrintable(fileName));
+
+    fileName.replace("/", "\\");  // Normalize
+    
+    TPtrC name( reinterpret_cast<const TUint16*>(fileName.utf16()) );
+
+    // Get the UID and MIME type for the given file name.
+    TUid uid;
+    uid.iUid=0;
+    TDataType dataType;
+    TInt err = apaSession.AppForDocument(name, uid, dataType);
+    XQSERVICE_DEBUG_PRINT("\tFind status %d,%x", err, uid.iUid);
+    if (err || uid.iUid == 0)
+    {
+        XQSERVICE_DEBUG_PRINT("\tHandler not found");
+        return KErrNotFound;
+    }
+
+    applicationId = uid.iUid;  // return value
+    QString mime = QString::fromUtf16(dataType.Des().Ptr(), dataType.Des().Length());
+    mimeType = mime;
+    
+    XQSERVICE_DEBUG_PRINT("\tapplicationId=%x,mime-type=%s", applicationId, qPrintable(mime));
+    
+    return KErrNone;
+    
+}
+
+int XQAiwUtilsPrivate::findApplicationFromApa(const XQSharableFile &file, int &applicationId, QString &mimeType)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwUtilsPrivate::findApplicationFromApa by handle, file=%s", qPrintable(file.fileName()));
+    RFile fileHandle;
+    if (!file.getHandle(fileHandle))
+    {
+        XQSERVICE_DEBUG_PRINT("\tInvalid handle");
+        return KErrArgument;
+    }
+
+    // Get the UID and MIME type for the given file name.
+    TUid uid;
+    uid.iUid=0;
+    TDataType dataType;
+    TInt err = apaSession.AppForDocument(fileHandle, uid, dataType);
+    XQSERVICE_DEBUG_PRINT("\tFind status %d,%x", err, uid.iUid);
+    if (err || uid.iUid == 0)
+    {
+        XQSERVICE_DEBUG_PRINT("\tHandler not found");
+        return KErrNotFound;
+    }
+
+    applicationId = uid.iUid;  // return value
+    QString mime = QString::fromUtf16(dataType.Des().Ptr(), dataType.Des().Length());
+    mimeType = mime;
+    
+    XQSERVICE_DEBUG_PRINT("\tapplicationId=%x,mime-type=%s", applicationId, qPrintable(mime));
+    return KErrNone;
+
+}
+
+
+bool XQAiwUtilsPrivate::applicationExists(int applicationId)
+{
+    TUid uid;
+    uid.iUid = applicationId;
+
+    TApaAppInfo aInfo;
+    return apaSession.GetAppInfo( aInfo, uid ) == KErrNone;
+    
+}
+
+//
+// For some reason QString::toInt(0,16) does not work...
+// Implement own converter
+//
+int XQAiwUtilsPrivate::toIntFromHex(const QString &str, bool *ok)
+{
+    int result=0;
+    int power = 0;
+    int base=16;
+    QString s = str.toUpper();
+    s.replace("0X", "");  // Remove possible 0x
+
+    XQSERVICE_DEBUG_PRINT("XQAiwUtilsPrivate::toIntFromHex=%s", qPrintable(s));
+    
+    for (int i=s.length()-1; i >= 0; i--)
+    {
+        int val = (int)s[i].toLatin1();
+        int num;
+        if ((val >= (int)'A') && (val <= (int)'F'))
+            num = 10 + (val - (int)'A');
+        else if ((val >= (int)'0') && (val <= (int)'9'))
+            num = val - (int)'0';
+        else
+        {
+            *ok = false;
+            return 0;
+        }
+        
+        int multiplier = 1;
+        for (int j=0; j < power; j++) 
+            multiplier *= base; // Calculate power
+        
+        result += multiplier*num;
+        power++;
+    }
+
+    *ok = true;
+
+    return result;
+}
+
+
+
+void XQAiwUtilsPrivate::GetDrmAttributesL(ContentAccess::CContent *c, const QList<int> & attributes, QVariantList &result)
+{
+
+    XQSERVICE_DEBUG_PRINT("XQAiwUtilsPrivate::GetDrmAttributesL");
+    
+    HBufC* buffer = 0;
+
+    foreach (int attrName, attributes)
+    {
+        QVariant v; // By default invalid
+        bool isStringAttribute = attrName >= XQApplicationManager::DrmStringAttributeBase;
+        if (isStringAttribute && !buffer)
+        {
+            // Assume 512 characters is enough
+            buffer = HBufC::NewLC(512);
+            XQSERVICE_DEBUG_PRINT("XQAiwUtilsPrivate::buffer allocated");
+        }
+        
+        if (!isStringAttribute)
+        {
+            TInt value = 0;
+            TInt err = c->GetAttribute(attrName, value);
+            if(err == KErrNone)
+            {
+                // Ok, set the value
+                v.setValue(value);
+            }
+            XQSERVICE_DEBUG_PRINT("XQAiwUtilsPrivate::GetDrmAttributesL (int):%d,%d=%d", err, attrName, value);
+        }
+        else
+        {
+            // String attribute
+            attrName -= XQApplicationManager::DrmStringAttributeBase;  // CAF uses same values for int and string attributes 
+            TPtr value( buffer->Des() );
+            value.Zero();
+            TInt err = c->GetStringAttribute(attrName, value);
+            QString strValue;            
+            if(err == KErrNone)
+            {
+                // Ok, set the value
+                strValue = QString::fromUtf16(value.Ptr(), value.Length());
+                v.setValue(strValue);
+            }
+            XQSERVICE_DEBUG_PRINT("XQAiwUtilsPrivate::GetDrmAttributesL (string):%d,%d=%s", err, attrName, qPrintable(strValue));
+
+        }
+        // On error value remains invalid and client can check that
+        // v.isValid()
+        result.append(v);
+    }
+
+    if (buffer)
+    {
+        CleanupStack::PopAndDestroy();  // buffer
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqaiwutils.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQAIWUTILS_H
+#define XQAIWUTILS_H
+
+#include <xqaiwglobal.h>
+#include <xqaiwinterfacedescriptor.h>
+
+#include <QObject>
+#include <QFile>
+#include <QUrl>
+#include <QVariant>
+#include <QList>
+#include <qglobal.h>
+#include <xqsharablefile.h>
+
+class XQAiwUtilsPrivate;
+class XQAiwUtils : public QObject
+    {
+public:
+
+    XQAiwUtils();
+    virtual ~XQAiwUtils();
+    int launchApplication(int applicationId, const QList<QVariant> &arguments);
+    int launchFile(int applicationId, const QVariant &file);
+    int mapError(int symbianError);
+    int findApplication(const QFile &file, int &applicationId);
+    int findApplication(const XQSharableFile &file, int &applicationId);
+    int findApplication(const QUrl &uri, int &applicationId);
+    QString createCmdlineArgs(const QList<QVariant> &args);
+    static QString createErrorMessage(int errorCode, const QString context, const QString detail = "");
+    
+    bool getDrmAttributes(const QString &file, const QList<int> &attributes, QVariantList & result);
+    bool getDrmAttributes(const XQSharableFile &file, const QList<int> & attributes, QVariantList & result);
+    int toIntFromHex(const QString &str, bool *ok);
+    
+private:
+
+private:
+    XQAiwUtilsPrivate * d;
+    
+    };
+
+#endif /* XQAIWUTILS_H */ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqapplicationmanager.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+// Include the header with shortened name
+#include "xqappmgr.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqappmgr.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,566 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqservicelog.h"
+#include "xqappmgr.h"
+#include <xqaiwrequest.h>
+#include <xqaiwinterfacedescriptor.h>
+#include <QList>
+#include "xqappmgr_p.h"
+
+/*!
+    \class XQApplicationManager
+    \inpublicgroup QtBaseModule
+
+    \ingroup ipc
+    \brief Factory class to list interface descriptors and create interworking objects (XQAiwRequest)
+    
+    XQApplicationManager lists interface descriptors by interface and /or service name. It is also used to
+    create interworking objects (XQAiwRequest).
+    
+    This class is a part of API to be used by the applications instead of using XQServiceRequest directly.
+    
+    The Application Manager API offers centric place for applications UIs to handle application to application interworking use cases, like:
+    - Synchronous out-of-process service call from client to service provider, where service provider needs to complete the request before
+      control comes back to requesting client.
+    - Asynchronous out-of-process service call from client to service provider, where Service provider completes the request whenever suitable.
+      The control returns back requesting as soon the service provider has received the asynchronous call (can be applied to notifications as well).
+    - Embedded out-of-process service call. In this case window groups are chained and "Back" returns to client window.
+    - Any named Qt type in the Qt meta-object system can be used as a service call parameter or return value. Also own, custom meta-types are supported.
+    - Launched service provider application (.exe) if not already running when client makes service call to it.
+    - List and discover services dynamically.
+    - Apply UI related options upon service launch, like "launch as embedded", "launch to foreground" and "launch to backround".
+    - Opening files to be viewed by a file viewing interface.
+    - Opening URI to be viewed by a URI viewing interface. Includes also launching activity URIs (appto) as fire-and-forget manner.
+    - Miscellanous AIW support, like get service stasus or get DRM attributes.
+    
+    <b>Example usage:</b> \n
+    
+    The usage pattern for all the XQApplicationManager variants implemented as service providers , interface, QUrl, QFile, is similar both embedded
+    and non-embedded usage:
+    \code
+        // Recommended way is to add XQApplicationManager as member variable to class
+        // Later on when caching of services
+        // You can use the class also as local variable.
+        class Client
+        {
+
+        public:
+             // Service access
+            bool accessService(void);
+
+        private slots:
+                void handleOk(const QVariant &result);
+                void handleError(int errorCode, const QString& errorMessage);
+        private:
+              XQApplicationManager mAiwMgr;
+        };
+
+
+        //  In client.cpp
+        bool Client::accessService(void)
+        {
+            QString parameter1("+3581234567890");
+            int parameter2 = 3;
+
+            bool embedded=true;  // or false
+
+            XQAiwRequest *request;
+            // Create request by interface name, the very first service implementation
+            // applied.
+            request = mAiwMgr.create("Interface", "functionName2(QString, int)", embedded);
+
+            // If dedicated service is wanted, apply this 
+            // request = mAiwMgr.create("Service", "Interface", 
+            //                          "functionName2(QString, int)", embedded);
+
+            if (request == NULL)
+            {
+                // Service not found 
+                return false;
+            }
+            // ... Perform further processing
+        }
+    \endcode
+    
+    Access service by descriptor:
+    \code
+        QList<XQAiwInterfaceDescriptor> implementations = appmgr.list("Interface");
+
+       // Display service in UI and make selection possible.
+        foreach (XQAiwInterfaceDescriptor d, implementations)
+        {
+            qDebug() << "Service=" << d.serviceName();
+            qDebug() << "Interface=" << d.interfaceName();
+            qDebug("Implementation Id=%x",d.property(XQAiwInterfaceDescriptor::ImplementationId).toInt());
+        }
+
+
+        // Select correct implementation
+        XQAiwInterfaceDescriptor selectedImpl = doSelectService();
+
+        // The difference to the previous example is is how request is created
+        // via application mgr.
+
+        // ...See previous example
+        request = mAiwMgr.create(selectedImpl, embedded);
+        // ....See previous example
+    \endcode
+    
+    The XQApplicationManager supports opening activity (see Terminology) URIs (appto scheme) as fire-and-forget mannner:
+    \code
+        QUrl url("appto://10207C62?activityname=MusicMainView"); 
+
+        // The difference to the previous example is is how request is created
+        // via application mgr.
+        request = mAiwMgr.create(url);
+        if (request == NULL)
+        {
+            // No handlers for the URI
+            return;
+        }
+
+        // Set function parameters
+        QList<QVariant> args;
+        args << uri.toSring();
+        request->setArguments(args);
+
+        // Send the request
+        bool res = request.send();
+        if  (!res) 
+        {
+            // Request failed. 
+            int error = request->lastError();
+            // Handle error
+        }
+     
+       // All done.
+       delete request;
+    \endcode
+    
+    \sa XQAiwRequest
+*/
+
+XQApplicationManager::XQApplicationManager()
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::XQApplicationManager");
+    d = new XQApplicationManagerPrivate();
+    
+}
+XQApplicationManager::~XQApplicationManager()
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::~XQApplicationManager");
+    delete d;
+};
+
+/*!
+    Creates AIW request by interface and operation name.
+    The first found service implementation is returned. If you need to activate specific implementation
+    you shall first list() implementations and use the overloaded create() with XQAiwInterfaceDescriptor
+    to select the correct implementation. 
+    
+    \param interface Interface name as mentioned in the service registry file.
+                     Apply the xqaiwdecl.h file for common constants.
+    \param operation The function signature to be called via the interface.
+                     Can be set later via XQAiwRequest::setOperation.
+                     Apply the xqaiwdecl.h file for common constants.
+    \param embedded True if embedded (window groups chained) call, false otherwise.
+                    Can be set later via XQAiwRequest::setEmbedded.
+    \return The application interworking request instance, NULL if no service is available
+    \sa list(const QString &interface, const QString &operation)
+    \sa create( const XQAiwInterfaceDescriptor &implementation, const QString &operation, bool embedded);
+    \sa xqaiwdecl.h for constants values
+    
+    Example usage:
+    \code
+    #include <xqaiwdecl.h>
+    #include <xqapplicationmanager.h>
+    
+    // XQApplicationManager mAppMgr;  // Set manager as class member
+    
+    XQAiwRequest * req = this->mAppMgr.create(XQI_IMAGE_FETCH, XQOP_IMAGE_FETCH, false);
+    if (req)
+    {
+        // There was service available
+        QList<QVariant> args;
+        args << folder;
+        args << previewOn;
+        req->setArguments(args);
+        
+        connect(req, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleOk(const QVariant&)));
+        connect(req, SIGNAL(requestError(int,const QString&)), this, SLOT(handleError(int,const QString&)));
+
+        req->send();
+    }
+    \endcode
+*/
+XQAiwRequest* XQApplicationManager::create(
+    const QString &interface, const QString &operation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(interface)");
+    return d->create(interface, operation, embedded);
+}
+
+
+/*!
+    Creates AIW request by interface implementation descriptor and operation name.
+    The descriptor is got from the list() call.
+    As combination [service,interface,version] shall be unique,
+    the descriptor points to one implementation and thus selects correct
+    implementation.
+    
+    \param implementation Valid interface descriptor obtained by the list() call.
+    \param operation The function signature to be called via the interface.
+                     Can be set later via XQAiwRequest::setOperation.
+                     Apply the xqaiwdecl.h file for common constants.
+    \param embedded True if embedded call, false otherwise.
+                     Can be set later via XQAiwRequest::setEmbedded.
+    \return The application interworking request instance, NULL if no service is available
+    \sa list()
+    \sa create( const QString &interface, const QString &operation, bool embedded)
+    \sa create( const QString &service, const QString &interface, const QString &operation, bool embedded)
+    \sa xqaiwdecl.h for constants values
+
+    Example usage:
+    \code
+    #include <xqaiwdecl.h>
+    #include <xqapplicationmanager.h>
+    
+    XQApplicationManager appMgr;  // Prefer one instance only 
+    QList<XQAiwInterfaceDescriptor> list = appMgr.list(XQI_CAMERA_CAPTURE, "");
+    //
+    // Populate a user interface widget and select proper implementation via descriptor
+    // ... 
+    XQAiwRequest * req = appMgr.create(selectedDescriptor, XQOP_CAMERA_CAPTURE);
+    //
+    // ... the rest as usual...
+    //
+    \endcode
+*/
+XQAiwRequest* XQApplicationManager::create(
+    const XQAiwInterfaceDescriptor &implementation, const QString &operation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::create (impl.)");
+    return d->create(implementation, operation, embedded);
+}
+
+
+/*!
+    Creates AIW request by service and interface name.  You should not normally use this
+    overload as typically service request are done by the interface name only.
+    Internally this applies list() operation and applies the first found service
+    implementation.
+    
+    \param service Service name as mentioned in the service registry file
+    \param interface Interface name as mentioned in the service registry file
+    \param operation The function signature to be called via the interface.
+                     Can be set later via XQAiwRequest::setOperation.
+    \param embedded True if embedded (window groups chained) call, false otherwise.
+                     Can be set later via XQAiwRequest::setEmbedded.
+    \return The application interworking request instance, NULL if no service is available
+    \sa XQApplicationManager::create( const QString &interface, const QString &operation, bool embedded)
+    \sa create( const XQAiwInterfaceDescriptor &implementation, const QString &operation, bool embedded);
+    \sa xqaiwdecl.h for constants values
+
+    Example usage:
+    \code
+    #include <xqaiwdecl.h>
+    #include <xqapplicationmanager.h>
+
+    #include <xqappmgr.h>;
+    #include "componentglobal.h";
+
+    // XQApplicationManager mAppMgr;  // manager as class member
+
+    // Use embedded call.
+    XQAiwRequest * req = this->mAppMgr.create(QLatin1String("photos"), XQI_IMAGE_FETCH, XQOP_IMAGE_FETCH, true);
+    if (req)
+    {
+        ...
+    }
+    \endcode
+*/
+XQAiwRequest* XQApplicationManager::create(
+    const QString &service, const QString &interface, const QString &operation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(service+interface)");
+    return d->create(service, interface, operation, embedded);
+}
+
+/*!
+    List implementation descriptors by interface name.
+    \param interface Interface name as mentioned in the service registry file
+    \param operation The operation signature to be called.  Reserved for future use.
+    \return The list of implementation descriptors, or empty list if no implementations found.
+    \sa xqaiwdecl.h for constants values
+
+    Example usage:
+    \code
+    #include <xqaiwdecl.h>
+    #include <xqapplicationmanager.h>
+    QList<XQAiwInterfaceDescriptor> list = this->mAppmgr.list(XQI_IMAGE_FETCH, "");
+    //
+    // Populate a user interface widget and select proper implementation via descriptor
+    // ... 
+    XQAiwRequest * req = this->mAppMgr.create(selectedDescriptor, XQOP_IMAGE_FETCH);
+    //
+    // ... the rest as usual...
+    //
+    \endcode
+*/
+QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(const QString &interface, const QString &operation)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::list");
+    return d->list(interface, operation);
+}
+
+/*!
+    List available implementations for the given \a service and \a interface names from the service registry.
+    The \a operation is reserved for future use.
+    \param service Service name as mentioned in the service registry file
+    \param interface Interface name as mentioned in the service registry file
+    \param operation The operation signature to be called.  Reserved for future use.
+    \return List of found interface descriptors that matched to both the \a service and \a interface names, otherwise empty list.
+    \sa list(const QString &interface, const QString &operation)
+*/
+QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(
+    const QString &service, const QString &interface, const QString &operation)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::list");
+    return d->list(service, interface, operation);
+}
+
+/*!
+    Creates AIW request to view the  given URI (having a attached scheme).
+    The interface name applied implicitly is the XQI_URI_VIEW (from xqaiwdecl.h),
+    unless there is custom handling attached to URI scheme.
+    The first found service implementation is applied.
+    A service declares support for scheme(s) (CSV list) by adding the custom property key
+    (see the constant XQCUSTOM_PROP_SCHEMES value) to the service XML.
+    By default, the operation name declared by constant XQOP_URI_VIEW is used.
+    Custom handling for certainsoverride the default service handling:
+     - "http:" and "https: schemes are handled by QDesktopServices::openUrl()
+     - "appto"  URIs is handled by corresponding Activity Manager Framework
+     - "file": Local file scheme is handled via the XQI_FILE_VIEW interface
+               (the same as applie to e.g. create(QFile))
+         
+    \param uri The URI to be viewed
+    \param embedded True if embedded (window groups chained) call, false otherwise
+    \return The application interworking request instance, or NULL if no URI viewer found.
+    \sa xqaiwdecl.h for constants values
+*/
+XQAiwRequest* XQApplicationManager::create( const QUrl &uri, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(url)");
+    return d->create(uri, NULL, embedded);
+}
+
+/*!
+    Creates AIW request to view the given URI by service implementation.
+    The interface name applied implicitly is the XQI_URI_VIEW (from xqaiwdecl.h),
+    unless there is custom handling attached to URI scheme.
+    A service declares support for scheme(s) (CSV list) by adding the custom property key
+    (see the constant XQCUSTOM_PROP_SCHEMES value) to the service XML.
+    Custom handling for certainsoverride the default service handling:
+     - "http:" and "https: schemes are handled by QDesktopServices::openUrl()
+     - "appto"  URIs is handled by corresponding Activity Manager Framework
+     - "file": Local file scheme is handled via the XQI_FILE_VIEW interface
+               (the same as applie to e.g. create(QFile))
+
+    \param uri The URI to be viewed
+    \param embedded True if embedded (window groups chained) call, false otherwise
+    \param implementation Valid interface descriptor obtained by the "list(QUrl)" call.
+    \return The application interworking request instance, or NULL if no URI viewer found.
+    \sa xqaiwdecl.h for constants values
+*/
+XQAiwRequest* XQApplicationManager::create(
+    const QUrl &uri, const XQAiwInterfaceDescriptor& implementation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(uri+impl)");
+    return d->create(uri, &implementation, embedded);
+}
+
+/*!
+    Create AIW requests to view the given file and having the MIME type attached.
+    The interface name applied implicitly is declared by the constant XQI_FILE_VIEW
+    The first found service implementation is applied.
+    \param file The file to be viewed
+    \param embedded True if embedded (window groups chained) call, false otherwise
+    \return The application interworking request instance, or NULL if no viewer found.
+    \sa xqaiwdecl.h for constants values
+*/
+XQAiwRequest* XQApplicationManager::create( const QFile &file, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(file)");
+    return d->create(file, NULL, embedded);
+}
+
+/*!
+    Same as basic create(const QFile &file, bool embedded), but applies the interface descriptor to select the dedicated implementation.
+    \param file The file to be viewed
+    \param implementation Valid interface descriptor obtained by the list(const QFile &file) call.
+    \param embedded True if embedded (window groups chained) call, false otherwise
+    \return The application interworking request instance, or NULL if no viewer found.
+    \sa xqaiwdecl.h for constants values
+*/
+XQAiwRequest* XQApplicationManager::create(
+    const QFile &file, const XQAiwInterfaceDescriptor& implementation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(file+impl)");
+    return d->create(file, &implementation, embedded);
+}
+
+
+/*!
+    List implementations that support handling the URI scheme of the given uri.
+    The interface name applied implicitly is declared by the constant XQI_URI_VIEW.
+    \param uri The URI scheme that should be matched to the interface
+    \return List of found interface descriptors that matched to the URI scheme, otherwise empty list.
+    \sa list(const QString &interface, const QString &operation)
+*/
+
+QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(const QUrl &uri)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::list(uri)");
+    return d->list(uri);
+}
+
+/*!
+    List implementations that support handling the MIME type of the given file.
+    The interface name applied implicitly is declared by the constant XQI_FILE_VIEW.
+    \param file File which MIME type should be supported by the interface.
+    \return List of found interface descriptors for applications that can handle the file, otherwise empty list.
+    \sa list(const QString &interface, const QString &operation)
+*/
+QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(const QFile &file)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::list(file)");
+    return d->list(file);
+}
+
+/*!
+    List implementations that support handling the MIME type of of the given sharable file.
+    The interface name applied implicitly is declared by the constant XQI_FILE_VIEW.
+    \param file Sharable file which MIME type should be supported by the interface.
+    \return List of found interface descriptors for applications that can handle the file, otherwise empty list.
+    \sa list(const QString &interface, const QString &operation)
+*/
+QList<XQAiwInterfaceDescriptor> XQApplicationManager::list(const XQSharableFile &file)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::list(XQSharableFile)");
+    return d->list(file);
+}
+
+/*!
+    Create AIW request for the given file and the MIME type attached to the sharable file
+    The interface name applied implicitly is declared by the constant XQI_FILE_VIEW
+    By default, the operation name declared by constant XQOP_FILE_VIEW_SHARABLE is used.
+    \param file The sharable file to be viewed
+    \param embedded True if embedded (window groups chained) call, false otherwise
+    \return The application interworking request instance, or NULL if no viewer found.
+*/
+XQAiwRequest* XQApplicationManager::create(const XQSharableFile &file, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(XQSharableFile)");
+    return d->create(file, NULL, embedded);
+}
+
+/*!
+    Same as basic create(const XQSharableFile &file, bool embedded), but applies the interface descriptor to select the dedicated implementation.
+    \param file The sharable file to be viewed
+    \param implementation Valid interface descriptor obtained by the list(const XQSharableFile &file) call.
+    \param embedded True if embedded (window groups chained) call, false otherwise
+    \return The application interworking request instance, or NULL if no viewer found.
+    \sa xqaiwdecl.h for constants values
+*/
+XQAiwRequest* XQApplicationManager::create(
+    const XQSharableFile &file, const XQAiwInterfaceDescriptor& implementation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::create(XQSharableFile+impl)");
+    return d->create(file, &implementation, embedded);
+}
+
+/*!
+    Returns error code of the last performed operation.
+    \return Error code of the last operation, 0 if no error occured.
+*/
+int XQApplicationManager::lastError() const
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::lastError");
+    return d->lastError();
+}
+
+/*!
+    Tests whether given implementation is running. That is, the service provider has published
+    the full service name attached to the given interface descriptor.
+    \param implementation Interface that is tested for being run.
+    \return True if the implementation is running, false otherwise.
+*/
+bool XQApplicationManager::isRunning(const XQAiwInterfaceDescriptor& implementation) const
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::isRunning");
+    return d->isRunning(implementation);
+}
+
+/*!
+    Gets the values of the DRM related \a attributeNames, like "IsProtected",
+    "IsForwardable", "MimeType" for a given \a file.
+    \param file File for which DRM attributes are retrieved
+    \param attributeNames List of attributes that should be retrieved (check #DrmAttribute)
+    \param attributeValues On success fills this list whith values, where each value is QVariant of the integer or string type.
+                           If attribute value does not exists or other error occurs when reading the attribute, the invalid QVariant
+                           value is returned.
+    \return True on success, upon error returns false (e.g file does not exists or other general error).
+*/
+bool XQApplicationManager::getDrmAttributes(const QFile &file, const QList<int> &attributeNames, QVariantList &attributeValues)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::drmAttributes (file)");
+    return d->getDrmAttributes(file, attributeNames, attributeValues);
+}
+
+/*!
+    Gets the values of the DRM related \a attributeNames, like "IsProtected",
+    "IsForwardable", "MimeType" for a given sharable file.
+    \param file Sharable file for which DRM attributes are retrieved
+    \param attributeNames List of attributes that should be retrieved (check #DrmAttribute)
+    \param attributeValues On success fills this list whith values, where each value is QVariant of the integer or string type.
+                           If attribute value does not exists or other error occurs when reading the attribute, the invalid QVariant
+                           value is returned.
+    \return True on success, upon error returns false (e.g file does not exists or other general error).
+*/
+bool XQApplicationManager::getDrmAttributes(const XQSharableFile &file, const QList<int> &attributeNames, QVariantList &attributeValues)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::drmAttributes (XQSharableFile)");
+    return d->getDrmAttributes(file, attributeNames, attributeValues);
+}
+
+/*!
+    Checks the status of the given service interface.
+    \param implementation Interface which status is being checked.
+    \return Status of the service.
+*/
+XQApplicationManager::ServiceStatus XQApplicationManager::status(const XQAiwInterfaceDescriptor& implementation)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManager::status");
+    return (ServiceStatus)d->status(implementation);
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqappmgr.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQAPPLICATIONMANAGER_H
+#define XQAPPLICATIONMANAGER_H
+
+#include<QObject>
+#include<QString>
+#include<QList>
+#include<QUrl>
+#include<QFile>
+
+#include <xqaiwglobal.h>
+#include <xqaiwinterfacedescriptor.h>
+#include <xqaiwrequest.h>
+#include <xqsharablefile.h>
+
+class XQApplicationManagerPrivate;
+
+class XQAIW_EXPORT XQApplicationManager : public QObject
+{
+    Q_OBJECT
+
+public:
+
+    /*!
+    For the getDrmAttributes() function
+    */
+    enum DrmAttribute
+    {
+       DrmIntAttributeBase=0,      // Base value for the  DRM integer attributes
+       IsProtected   = DrmIntAttributeBase+0, /*!< */
+       IsForwardable = DrmIntAttributeBase+1, /*!< */
+       // For others DrmIntAttributeBase+N, see N from the caf/caftypes.h
+       
+       DrmStringAttributeBase = 100,  // Base value for the  DRM string attributes
+       Description = DrmStringAttributeBase+0, /*!< */
+       MimeType    = DrmStringAttributeBase+1 /*!< */
+       // For others, DrmIntAttributeBase+N, see N from the caf/caftypes.h
+    };
+
+    /*!
+    For the status() function
+    */
+    enum ServiceStatus
+    {
+        Unknown=0,  /*!< Not known */
+        Enabled,    /*!< Service enabled */
+        Disabled    /*!< Service disabled, e.g. required config not OK */
+    };
+    
+    XQApplicationManager();
+    virtual ~XQApplicationManager();
+
+public:
+            
+    XQAiwRequest* create( const QString& interface, const QString& operation, bool embedded = true);
+
+    XQAiwRequest* create( const XQAiwInterfaceDescriptor& implementation, const QString& operation, bool embedded = true);
+
+    XQAiwRequest* create( const QString& service, const QString& interface, const QString& operation, bool embedded = true);
+
+    QList<XQAiwInterfaceDescriptor> list(const QString& interface, const QString& operation);
+    QList<XQAiwInterfaceDescriptor> list(const QString& service, const QString& interface, const QString& operation);
+
+    XQAiwRequest* create( const QUrl &url, bool embedded = true);
+    XQAiwRequest* create( const QUrl &url, const XQAiwInterfaceDescriptor& implementation, bool embedded = true);
+    XQAiwRequest* create( const QFile &file, bool embedded = true);
+    XQAiwRequest* create( const QFile &file, const XQAiwInterfaceDescriptor& implementation, bool embedded = true);
+    
+    QList<XQAiwInterfaceDescriptor> list(const QUrl& uri);
+    QList<XQAiwInterfaceDescriptor> list(const QFile& file);
+    
+    QList<XQAiwInterfaceDescriptor> list(const XQSharableFile& file);
+    XQAiwRequest* create( const XQSharableFile &file, bool embedded = true);
+    XQAiwRequest* create( const XQSharableFile &file, const XQAiwInterfaceDescriptor& implementation, bool embedded = true);
+
+    int lastError() const;
+    bool isRunning(const XQAiwInterfaceDescriptor& implementation) const;
+
+    bool getDrmAttributes(const QFile &file, const QList<int> &attributeNames, QVariantList &attributeValues);
+    bool getDrmAttributes(const XQSharableFile &file, const QList<int> &attributeNames, QVariantList &attributeValues);
+    
+    ServiceStatus status(const XQAiwInterfaceDescriptor& implementation);
+
+signals:
+    
+private:
+    // Disable copy contructor
+    Q_DISABLE_COPY(XQApplicationManager)
+    XQApplicationManagerPrivate *d;
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqappmgr_p.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,542 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <xqservicerequest.h>
+#include <xqservicemanager.h>
+#include <QList>
+#include <xqsettingsmanager.h>
+#include <xqsettingskey.h>
+#include <e32std.h>
+
+#include "xqservicelog.h"
+#include "xqaiwutils.h"
+#include "xqaiwuridriver.h"
+#include "xqaiwdecl.h"
+#include "xqappmgr_p.h"
+
+/*!
+    \class XQApplicationManagerPrivate
+    \brief Private implementation of the XQApplicationManager
+*/
+
+XQApplicationManagerPrivate::XQApplicationManagerPrivate():
+   serviceMgr(0),
+   aiwUtilities(0)
+   
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate");
+    serviceMgr = new XQServiceManager();
+}
+
+XQApplicationManagerPrivate::~XQApplicationManagerPrivate()
+{
+    XQSERVICE_DEBUG_PRINT("~XQApplicationManagerPrivate");
+    delete serviceMgr;
+    delete aiwUtilities;
+}
+
+XQAiwRequest* XQApplicationManagerPrivate::create( const QString &interface, const QString &operation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::create(interface)");
+    return create("", interface, operation, embedded);
+}
+
+XQAiwRequest* XQApplicationManagerPrivate::create(
+    const QString &service, const QString &interface, const QString &operation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::create(service+interface)");
+
+    QList<XQAiwInterfaceDescriptor> impls;
+    if (service.isEmpty())
+        impls = serviceMgr->findFirstInterface(interface);
+    else
+        impls = serviceMgr->findFirstInterface(service, interface);
+
+    // Pick up the first implementation
+    if (impls.count())
+    {
+        return new XQAiwRequest(impls[0], operation, embedded);
+    }
+    return 0;
+}
+
+
+XQAiwRequest* XQApplicationManagerPrivate::create(
+    const XQAiwInterfaceDescriptor &implementation, const QString &operation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::create (impl)");
+    return new XQAiwRequest(implementation, operation, embedded);
+}
+
+XQAiwRequest* XQApplicationManagerPrivate::create(
+    const QUrl &uri, const XQAiwInterfaceDescriptor *implementation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::create (uri)");
+    XQSERVICE_DEBUG_PRINT("uri=%s", qPrintable(uri.toString()));
+    
+    if (!uri.isValid())
+    {
+        XQSERVICE_CRITICAL_PRINT("Invalid URI %s", qPrintable(uri.toString()));
+        return 0;
+    }
+
+    if (hasCustomHandler(uri))
+    {
+        XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::custom handler applied");
+        XQAiwInterfaceDescriptor nullDescr;
+        return new XQAiwRequest(uri, nullDescr, XQOP_URI_VIEW);
+    }
+    
+    const XQAiwInterfaceDescriptor *impl = implementation;
+    QList<XQAiwInterfaceDescriptor> impls;
+    if (impl == 0) 
+    {
+        // Implementation not given, find first one        
+        impls = list(uri);
+        if (impls.count())
+        {
+            impl = &impls[0];
+            XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::create (impl) use first)");
+        }
+    }
+
+    XQAiwRequest *req = 0;
+    if (impl != 0)
+    {
+        // Create service request for viewing the URI
+        XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::create (impl) creating request)");
+        req = new XQAiwRequest(uri, *impl, XQOP_URI_VIEW);
+        if (req)
+        {
+            req->setEmbedded(embedded);
+        }
+    }
+
+    return req;
+
+    
+}
+
+XQAiwRequest* XQApplicationManagerPrivate::create(
+     const QFile &file, const XQAiwInterfaceDescriptor *implementation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::create(file)");
+    XQSERVICE_DEBUG_PRINT("file=%s", qPrintable(file.fileName()));
+
+    const XQAiwInterfaceDescriptor *impl = implementation;
+    QList<XQAiwInterfaceDescriptor> impls;
+    if (impl == 0) 
+    {
+        // Implementation not given, find services capable of handling the "file"
+        impls = list(file);
+        if (impls.count())
+        {
+            impl = &impls[0];
+        }
+    }
+
+    XQAiwRequest * req = 0;
+    if (impl != 0)
+    {
+        QVariant v = impl->property(XQAiwInterfaceDescriptor::ImplementationId);
+        req = new XQAiwRequest(file, *impl, XQOP_FILE_VIEW);
+        if (req)
+        {
+            req->setEmbedded(embedded);
+            XQSERVICE_DEBUG_PRINT("File handled by %x", v.toInt());
+        }
+    }
+    
+    return req;
+}
+
+XQAiwRequest* XQApplicationManagerPrivate::create(
+    const XQSharableFile &file, const XQAiwInterfaceDescriptor *implementation, bool embedded)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::create(XQSharableFile)");
+    if (!file.isValid())
+    {
+        XQSERVICE_DEBUG_PRINT("\tInvalid XQSharableFile)");
+        return 0;
+    }
+    
+    const XQAiwInterfaceDescriptor *impl = implementation;
+    QList<XQAiwInterfaceDescriptor> impls;
+    if (impl == 0) 
+    {
+        // Implementation not given, find services capable of handling the "file"
+        impls = list(file);
+        if (impls.count())
+        {
+            impl = &impls[0];
+        }
+    }
+
+    XQAiwRequest * req = 0;
+    if (impl != 0)
+    {
+        QVariant v = impl->property(XQAiwInterfaceDescriptor::ImplementationId);
+        req = new XQAiwRequest(file, *impl, XQOP_FILE_VIEW_SHARABLE);
+        if (req)
+        {
+            req->setEmbedded(embedded);
+            XQSERVICE_DEBUG_PRINT("File handled by %x", v.toInt());
+        }
+    }
+
+    return req;
+}
+
+
+
+QList<XQAiwInterfaceDescriptor> XQApplicationManagerPrivate::list(
+    const QString &interface, const QString& operation)
+{
+
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::list(interface)");
+    Q_UNUSED(operation);
+
+    return serviceMgr->findInterfaces(interface);
+}
+
+QList<XQAiwInterfaceDescriptor> XQApplicationManagerPrivate::list(
+    const QString &service, const QString& interface, const QString& operation)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::list (service+interface)");
+    Q_UNUSED(operation);
+
+    return serviceMgr->findInterfaces(service, interface);
+}
+
+QList<XQAiwInterfaceDescriptor> XQApplicationManagerPrivate::list(
+    const QUrl &uri)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::list (uri) %s", qPrintable(uri.toString()));
+
+    QList<XQAiwInterfaceDescriptor> result;
+    if (!uri.isValid())
+    {
+        XQSERVICE_CRITICAL_PRINT("Invalid URI %s", qPrintable(uri.toString()));
+        return result; // Empty
+    }
+
+    QString scheme = uri.scheme();
+    
+    if (scheme.compare(XQURI_SCHEME_FILE,Qt::CaseInsensitive) == 0)
+    {
+        QFile file (uri.toLocalFile());
+        return list(file);  // Apply file based listing
+    }
+    
+    //  Find all services implementing URI interface and support URI scheme
+    QList<XQAiwInterfaceDescriptor> uriHandlers;
+    uriHandlers = list(XQI_URI_VIEW, "");
+
+    // Pick up services supporting the required scheme
+    foreach (XQAiwInterfaceDescriptor uh, uriHandlers)
+    {
+        //  Find services that support the scheme
+        if (uh.customProperty(XQCUSTOM_PROP_SCHEMES).contains(scheme,Qt::CaseInsensitive))  // Allow multiple schemes in same string
+        {
+            XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate:: Service %s can handle scheme %s",
+                                  qPrintable(uh.serviceName()), qPrintable(scheme))
+            result.append(uh);
+        }
+    }
+
+    return result;
+}
+
+//
+// List services capable of handling the file by MIME type
+//
+QList<XQAiwInterfaceDescriptor> XQApplicationManagerPrivate::list(const QFile &file)
+{
+
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::list (file) %s", qPrintable(file.fileName()));
+
+    // List first MIME handlers for file
+    QList<XQAiwInterfaceDescriptor> mimeHandlers;
+    mimeHandlers = listMimeHandlers(file);
+
+    // Then list those file services that can support the MIME type
+    return listFileHandlers(mimeHandlers);
+}
+
+//
+// List services capable of handling the sharable file by MIME type
+//
+QList<XQAiwInterfaceDescriptor> XQApplicationManagerPrivate::list(const XQSharableFile &file)
+{
+
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::list (handle)");
+
+    // List first MIME handlers for the sharable file
+    QList<XQAiwInterfaceDescriptor> mimeHandlers;
+    if (!file.isValid())
+    {
+        return mimeHandlers; // Empty set
+    }
+    mimeHandlers = listMimeHandlers(file);
+
+    // Then list those file services that can support the MIME type
+    return listFileHandlers(mimeHandlers);
+}
+
+
+int XQApplicationManagerPrivate::lastError() const
+{
+    int err=0;
+    err = serviceMgr->latestError();
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate:: lastError=%d", err);
+    return err;
+}
+
+bool XQApplicationManagerPrivate::isRunning(const XQAiwInterfaceDescriptor& implementation) const
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate isRunning");
+    return serviceMgr->isRunning(implementation);
+}
+
+bool XQApplicationManagerPrivate::getDrmAttributes(const QFile &file, const QList<int> &attributeNames, QVariantList &attributeValues)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate drmAttributes");
+    if (aiwUtilities == 0)
+        aiwUtilities = new XQAiwUtils();
+    return aiwUtilities->getDrmAttributes(file.fileName(), attributeNames, attributeValues);
+}
+
+bool XQApplicationManagerPrivate::getDrmAttributes(const XQSharableFile &file, const QList<int> &attributeNames, QVariantList &attributeValues)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate drmAttributes");
+    if (aiwUtilities == 0)
+        aiwUtilities = new XQAiwUtils();
+    return aiwUtilities->getDrmAttributes(file,attributeNames, attributeValues);
+}
+
+int XQApplicationManagerPrivate::status(const XQAiwInterfaceDescriptor& implementation)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate status");
+    QString statusKeyValue = implementation.customProperty(XQCUSTOM_PROP_AIW_SERVICE_STATUS);
+    if (statusKeyValue.isEmpty())
+    {
+        // No custom property,  have to assume service is enabled
+        XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate no custom property %s",
+                              XQCUSTOM_PROP_AIW_SERVICE_STATUS);
+        return XQApplicationManager::Unknown;
+    }
+
+    if (aiwUtilities == 0)
+        aiwUtilities = new XQAiwUtils();
+    
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate custom property value=%s",
+                          qPrintable(statusKeyValue));
+    
+    bool b=false;
+    int keyId = aiwUtilities->toIntFromHex(statusKeyValue, &b);
+    if (!b)
+    {
+        XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate bad custom property value");
+        return XQApplicationManager::Unknown;
+    }
+    
+    XQSettingsManager settingsManager;
+    int implId = implementation.property(XQAiwInterfaceDescriptor::ImplementationId).toInt();
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate %x,%x", keyId, implId);
+    
+    XQSettingsKey statusKey (XQSettingsKey::TargetCentralRepository, implId, keyId);
+    QVariant value = settingsManager.readItemValue(statusKey);
+    if (value.isNull())
+    {
+        XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate Cenrep %x does not contain key %x",
+                              implId, keyId);
+        return XQApplicationManager::Unknown;
+    }
+
+    
+    int status = value.toInt(&b);
+    if (!b)
+    {
+        XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate invalid status value %s",
+                              qPrintable(value.toString()));
+        return XQApplicationManager::Unknown;
+    }
+        
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate status=%d", status);
+    
+    return status;
+   
+}
+
+// ---- PRIVATE FUNCTIONS ----
+
+bool XQApplicationManagerPrivate::hasCustomHandler(const QUrl &uri) const
+{
+    return XQAiwUriDriver::hasCustomHandler(uri);
+}
+
+//
+// Get file handlers
+// TODO: Currently only one, default handler is returned !!!
+//       Possibly later all handlers need to be returned.
+//
+QList<XQAiwInterfaceDescriptor> XQApplicationManagerPrivate::listMimeHandlers(const QFile &file)
+{
+
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::listMimeHandlers %s", qPrintable(file.fileName()));
+    QList<XQAiwInterfaceDescriptor> mimeHandlers;
+
+    if (aiwUtilities == 0)
+        aiwUtilities = new XQAiwUtils();
+    if (aiwUtilities == 0)
+    {
+        XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate:: Can not create aiw utils");
+        return mimeHandlers;
+    }
+
+    XQAiwInterfaceDescriptor descriptor;
+
+    // Find default application that can handle MIME type (only one at the moment)
+    int applicationId = 0;
+    if (aiwUtilities->findApplication(file, applicationId) != XQService::ENoError)
+    {
+        return mimeHandlers;  // Empty set
+    }
+
+    // Set incomplete descriptor
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate:: Found file handler %x", applicationId);
+    descriptor.setProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(applicationId));
+    
+    mimeHandlers.append(descriptor);
+
+    return mimeHandlers;
+}
+
+//
+// Get handlers for sharable file
+// TODO: Currently only one, default handler is returned !!!
+//       Possibly later all handlers need to be returned.
+//
+QList<XQAiwInterfaceDescriptor> XQApplicationManagerPrivate::listMimeHandlers(const XQSharableFile &file)
+{
+
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::listMimeHandlers (handle)");
+    QList<XQAiwInterfaceDescriptor> mimeHandlers;
+
+    if (aiwUtilities == 0)
+        aiwUtilities = new XQAiwUtils();
+    if (aiwUtilities == 0)
+    {
+        XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate:: Can not create aiw utils");
+        return mimeHandlers;
+    }
+
+    XQAiwInterfaceDescriptor descriptor;
+
+    // Find default application that can handle MIME type (only one at the moment)
+    int applicationId = 0;
+    if (aiwUtilities->findApplication(file, applicationId) != XQService::ENoError)
+    {
+        return mimeHandlers;  // Empty set
+    }
+
+    // Set incomplete descriptor
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate:: Found file handler %x", applicationId);
+    descriptor.setProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(applicationId));
+
+    mimeHandlers.append(descriptor);
+
+    return mimeHandlers;
+}
+
+
+// To be called only for URI having scheme XQURI_SCHEME_ACTIVITY
+// Check that application exists and fill in only the implementationId
+bool XQApplicationManagerPrivate::getAppDescriptor(const QUrl &uri,  XQAiwInterfaceDescriptor *descriptor)
+{
+
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::getAppDescriptor %s)", qPrintable(uri.toString()));
+
+    if (aiwUtilities == 0)
+        aiwUtilities = new XQAiwUtils();
+    if (aiwUtilities == 0)
+    {
+        XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate:: Can not create aiw utils");
+        return false;
+    }
+
+    int applicationId = 0;
+    if (aiwUtilities->findApplication(uri, applicationId) != XQService::ENoError)
+    {
+        return false;  // No application registered for file
+    }
+
+    // Create incomplete descriptor
+    descriptor->setProperty(XQAiwInterfaceDescriptor::ImplementationId, QVariant(applicationId));
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate:: Found uri handler %x", applicationId);
+
+    return  true; 
+}
+
+
+//
+// Get file handlers that can support the give MIME type
+//
+QList<XQAiwInterfaceDescriptor> XQApplicationManagerPrivate::listFileHandlers(
+    const QList<XQAiwInterfaceDescriptor> &mimeHandlers)
+{
+    XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate::listFileHandlers");
+
+    //  Find all services implementing URI interface, support "file" scheme and can handle the file
+    //  by MIME type
+    QList<XQAiwInterfaceDescriptor> fileServices;
+    fileServices = list(XQI_FILE_VIEW, "");
+    if (fileServices.count() == 0)
+    {
+        return fileServices; // Empty set
+    }
+
+    QList<XQAiwInterfaceDescriptor> result;
+    foreach (XQAiwInterfaceDescriptor fs, fileServices)
+    {
+        //  Find services that support the file scheme
+        XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate:: Service %s can handle file", qPrintable(fs.serviceName()));
+        int serviceAppId = fs.property(XQAiwInterfaceDescriptor::ImplementationId).toInt();
+        foreach (XQAiwInterfaceDescriptor mh, mimeHandlers)
+        {
+            int mimeAppId = mh.property(XQAiwInterfaceDescriptor::ImplementationId).toInt();
+            if (mimeAppId == serviceAppId)
+            {
+                // Return only those services that support file scheme and claim to support also MIME type
+                XQSERVICE_DEBUG_PRINT("XQApplicationManagerPrivate:: Service %s (UID=%x) can handle file and MIME type",
+                                      qPrintable(fs.serviceName()), serviceAppId);
+                result.append(fs);
+            }
+        }
+    }
+
+    if (result.isEmpty())
+    {
+        // No service support present, try using the MIME handlers via old way
+        return mimeHandlers;
+    }
+    return result;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqappmgr_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQAPPMGR_P_H
+#define XQAPPMGR_P_H
+
+#include<QString>
+#include<QList>
+#include<QUrl>
+#include<QUrl>
+#include<QFile>
+#include <xqaiwrequest.h>
+#include <xqaiwinterfacedescriptor.h>
+#include <xqsharablefile.h>
+#include <xqapplicationmanager.h>
+
+class XQServiceManager;
+class XQAiwUtils;
+
+class XQApplicationManagerPrivate 
+{
+public:
+    XQApplicationManagerPrivate();
+    virtual ~XQApplicationManagerPrivate();
+    
+    XQAiwRequest* create( const QString &interface, const QString &operation, bool embedded = true);
+    XQAiwRequest* create( const QString &service, const QString &interface, const QString &operation, bool embedded = true);
+    XQAiwRequest* create( const XQAiwInterfaceDescriptor &implementation, const QString &operation, bool embedded = true);
+    XQAiwRequest* create( const QUrl &uri, const XQAiwInterfaceDescriptor *implementation, bool embedded);
+    XQAiwRequest* create( const QFile &file, const XQAiwInterfaceDescriptor *implementation, bool embedded);
+    XQAiwRequest* create( const XQSharableFile &file, const XQAiwInterfaceDescriptor *implementation, bool embedded);
+
+    QList<XQAiwInterfaceDescriptor> list(const QString &interface, const QString &operation);
+    QList<XQAiwInterfaceDescriptor> list(const QString &service, const QString &interface, const QString &operation);
+    QList<XQAiwInterfaceDescriptor> list(const QUrl &uri);
+    QList<XQAiwInterfaceDescriptor> list(const QFile &file);
+    QList<XQAiwInterfaceDescriptor> list(const XQSharableFile &file);
+
+    bool hasCustomHandler(const QUrl &uri) const;
+    
+    int lastError() const;
+    bool isRunning(const XQAiwInterfaceDescriptor& implementation) const;
+    bool getDrmAttributes(const QFile &file, const QList<int> &attributeNames, QVariantList &attributeValues);
+    bool getDrmAttributes(const XQSharableFile &file, const QList<int> &attributeNames, QVariantList &attributeValues);
+    int status(const XQAiwInterfaceDescriptor& implementation);
+    
+private:
+    
+    QList<XQAiwInterfaceDescriptor> listMimeHandlers(const QFile &file);
+    QList<XQAiwInterfaceDescriptor> listMimeHandlers(const XQSharableFile &file);
+    bool getAppDescriptor(const QUrl &uri, XQAiwInterfaceDescriptor *descriptor);
+    QList<XQAiwInterfaceDescriptor> listFileHandlers(const QList<XQAiwInterfaceDescriptor> &mimeHandlers);
+    
+private:
+    XQServiceManager * serviceMgr;
+    XQAiwUtils * aiwUtilities;
+    
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqservice.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,54 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+HEADERS += \
+    src/xqserviceadaptor.h \
+    src/xqservicechannel.h \
+    src/xqserviceipcmarshal.h\
+    src/xqservicerequest.h\
+    src/xqserviceprovider.h\
+    src/xqserviceipcclient.h \
+    src/xqservicethreaddata.h\
+    src/xqaiwglobal.h\
+    src/xqaiwrequest.h\
+    src/xqaiwrequestdriver.h \
+    src/xqaiwservicedriver.h \
+    src/xqaiwfiledriver.h \
+    src/xqaiwuridriver.h \
+    src/xqappmgr.h \
+    src/xqaiwutils.h
+
+SOURCES += \
+    src/xqserviceadaptor.cpp \
+    src/xqservicechannel.cpp \
+    src/xqserviceipcmarshal.cpp\
+    src/xqservicerequest.cpp\
+    src/xqserviceprovider.cpp\
+    src/xqserviceipcclient.cpp \
+    src/xqservicethreaddata.cpp\
+    src/xqaiwrequest.cpp\
+    src/xqappmgr.cpp \
+    src/xqappmgr_p.cpp \
+    src/xqaiwservicedriver.cpp \
+    src/xqaiwfiledriver.cpp \
+    src/xqaiwuridriver.cpp \
+    src/xqaiwutils.cpp
+
+LIBS+=-lapmime
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqserviceadaptor.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,982 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/                                                                    
+  
+#include "xqservicelog.h"
+
+#include "xqserviceglobal.h"
+#include "xqserviceadaptor.h"
+#include "xqservicechannel.h"
+#include "xqservicethreaddata.h"
+#include "xqserviceipcclient.h"
+
+#include <xqserviceutil.h>
+#include <xqrequestutil.h>
+#include <qmetaobject.h>
+#include <QMap>
+#include <QDataStream>
+#include <qatomic.h>
+#include <QDebug>
+#include <QVarLengthArray>
+#include <e32err.h>
+#include <xqsharablefile.h>
+
+/*!
+    \class XQServiceAdaptor
+    \inpublicgroup QtBaseModule
+
+    \ingroup ipc
+    \brief The XQServiceAdaptor class provides an interface to messages on a XQService IPC channel which simplifies remote signal and slot invocations.
+
+    Using this class, it is very easy to convert a signal emission into an IPC
+    message on a channel, and to convert an IPC message on a channel into a
+    slot invocation.  In the following example, when the signal \c{valueChanged(int)}
+    is emitted from the object \c source, the IPC message \c{changeValue(int)} will
+    be sent on the channel \c{QPE/Foo}:
+
+    \code
+    XQServiceAdaptor *adaptor = new XQServiceAdaptor("QPE/Foo");
+    XQServiceAdaptor::connect
+        (source, SIGNAL(valueChanged(int)), adaptor, MESSAGE(changeValue(int)));
+    \endcode
+
+    Note that we use XQServiceAdaptor::connect() to connect the signal to the
+    IPC message, not QObject::connect().  A common error is to use \c{connect()}
+    without qualifying it with \c{XQServiceAdaptor::} and picking up
+    QObject::connect() by mistake.
+
+    On the server side of an IPC protocol, the \c{changeValue(int)} message can
+    be connected to the slot \c{setValue()} on \c dest:
+
+    \code
+    XQServiceAdaptor *adaptor = new XQServiceAdaptor("QPE/Foo");
+    XQServiceAdaptor::connect
+        (adaptor, MESSAGE(changeValue(int)), dest, SLOT(setValue(int)));
+    \endcode
+
+    Now, whenever the client emits the \c{valueChanged(int)} signal, the
+    \c{setValue(int)} slot will be automatically invoked on the server side,
+    with the \c int parameter passed as its argument.
+
+    Only certain parameter types can be passed across an IPC boundary in this fashion.
+    The type must be visible to QVariant as a meta-type.  Many simple built-in
+    types are already visible; for user-defined types, use Q_DECLARE_METATYPE()
+    and qRegisterMetaTypeStreamOperators().
+
+    \sa XQServiceChannel
+*/
+
+class XQServiceAdaptorChannel : public XQServiceChannel
+{
+    Q_OBJECT
+public:
+    XQServiceAdaptorChannel(const QString& channel, XQServiceAdaptor *adapt)
+        : XQServiceChannel(channel, true, adapt), adaptor(adapt) 
+    {
+        XQSERVICE_DEBUG_PRINT("XQServiceAdaptorChannel::XQServiceAdaptorChannel");
+    }
+    
+    ~XQServiceAdaptorChannel() 
+    {
+        XQSERVICE_DEBUG_PRINT("XQServiceAdaptorChannel::~XQServiceAdaptorChannel");
+    }
+
+    QVariant receive(const QString& msg, const QByteArray &data, const XQSharableFile &sf);
+    void commandReceive(const XQServiceCommand cmd);
+
+private slots:
+    
+private:
+    XQServiceAdaptor *adaptor;
+};
+
+QVariant XQServiceAdaptorChannel::receive(const QString& msg, const QByteArray &data, const XQSharableFile &sf)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptorChannel::receive");
+    return adaptor->received(msg, data, sf);
+}
+
+void XQServiceAdaptorChannel::commandReceive(const XQServiceCommand cmd)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptorChannel::commandReceive %d", cmd);
+    switch (cmd)
+    {
+        case ReturnValueDelivered:
+            emit adaptor->returnValueDelivered() ;
+            break;
+            
+        case ClientDisconnected:
+            emit adaptor->clientDisconnected() ;
+            break;
+            
+        default:
+            XQSERVICE_DEBUG_PRINT("XQServiceAdaptorChannel::unhandled command %d", cmd);
+        break;
+    }
+}
+
+class XQServiceAdaptorSignalInfo
+{
+public:
+    QObject *sender;
+    int signalIndex;
+    int destroyIndex;
+    QString message;
+    int *types;
+    int numArgs;
+};
+
+class XQServiceAdaptorSlotInfo
+{
+public:
+    ~XQServiceAdaptorSlotInfo()
+    {
+        XQSERVICE_DEBUG_PRINT("XQServiceAdaptorSlotInfo::~XQServiceAdaptorSlotInfo");
+        qFree(types);
+    }
+
+    QObject *receiver;
+    int memberIndex;
+    bool destroyed;
+    int returnType;
+    int *types;
+    int numArgs;
+};
+
+class XQServiceAdaptorPrivate : public QObject
+{
+    // Do not put Q_OBJECT here.
+public:
+    XQServiceAdaptorPrivate(XQServiceAdaptor *obj, const QString& chan);
+    ~XQServiceAdaptorPrivate();
+
+    QAtomicInt ref;
+    XQServiceAdaptor *parent;
+    QString channelName;
+    bool connected;
+    const QMetaObject *publishedTo;
+    QMultiMap<QString, XQServiceAdaptorSlotInfo *> invokers;
+    QList<XQServiceAdaptorSignalInfo *> signalList;
+    int slotIndex;
+
+    static const int QVariantId = -243;
+    static int *connectionTypes(const QByteArray& member, int& nargs);
+    static int typeFromName(const QByteArray& name);
+
+protected:
+    int qt_metacall(QMetaObject::Call c, int id, void **a);
+};
+
+XQServiceAdaptorPrivate::XQServiceAdaptorPrivate(XQServiceAdaptor *obj, const QString& chan)
+    : ref(1), channelName(chan)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptorPrivate::XQServiceAdaptorPrivate");
+    parent = obj;
+    connected = false;
+    publishedTo = 0;
+
+    // Fake slots start at this index in the QMetaObject.
+    slotIndex = staticMetaObject.methodCount();
+}
+
+XQServiceAdaptorPrivate::~XQServiceAdaptorPrivate()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptorPrivate::~XQServiceAdaptorPrivate");
+    qDeleteAll(invokers);
+
+    // Disconnect all of the signals associated with this adaptor.
+    int index = slotIndex;
+    XQSERVICE_DEBUG_PRINT("index: %d", index);
+    foreach (XQServiceAdaptorSignalInfo *info, signalList) {
+        XQSERVICE_DEBUG_PRINT("info->signalIndex: %d", info->signalIndex);
+        if (info->signalIndex >= 0) {
+            QMetaObject::disconnect(info->sender, info->signalIndex,
+                                    this, index);
+        }
+        XQSERVICE_DEBUG_PRINT("info->destroyIndex: %d", info->destroyIndex);
+        if (info->destroyIndex >= 0) {
+            QMetaObject::disconnect(info->sender, info->destroyIndex,
+                                    this, index + 1);
+        }
+        qFree(info->types);
+        delete info;
+        index += 2;
+    }
+}
+
+// Get the QVariant type number for a type name.
+int XQServiceAdaptorPrivate::typeFromName( const QByteArray& type )
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptorPrivate::typeFromName");
+    XQSERVICE_DEBUG_PRINT("type: %s", type.constData());
+    if (type.endsWith('*')){
+        XQSERVICE_DEBUG_PRINT("Pointer");
+        return QMetaType::VoidStar;
+    }
+    else if ( type.size() == 0 || type == "void" ){
+        XQSERVICE_DEBUG_PRINT("Void");
+        return QMetaType::Void;
+    }
+    else if ( type == "QVariant" ){
+        XQSERVICE_DEBUG_PRINT("QVariant");
+        return XQServiceAdaptorPrivate::QVariantId;
+    }
+    int id = QMetaType::type( type.constData() );
+    XQSERVICE_DEBUG_PRINT("id: %d", id);
+    if ( id != (int)QMetaType::Void )
+        return id;
+    return QVariant::nameToType(type);
+}
+
+// Returns the connection types associated with a signal or slot member.
+int *XQServiceAdaptorPrivate::connectionTypes( const QByteArray& member, int& nargs )
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptorPrivate::connectionTypes");
+    XQSERVICE_DEBUG_PRINT("member: %s", member.constData());
+    // Based on Qt's internal queuedConnectionTypes function.
+    nargs = 0;
+    int *types = 0;
+    const char *s = member.constData();
+    while (*s != '\0' && *s != '(') { ++s; }
+    if ( *s == '\0' )
+        return 0;
+    ++s;
+    const char *e = s;
+    while (*e != ')') {
+        ++e;
+        if (*e == ')' || *e == ',')
+            ++nargs;
+    }
+
+    types = (int *) qMalloc((nargs+1)*sizeof(int));
+    types[nargs] = 0;
+    for (int n = 0; n < nargs; ++n) {
+        e = s;
+        while (*s != ',' && *s != ')')
+            ++s;
+        QByteArray type(e, s-e);
+        ++s;
+
+        types[n] = typeFromName(type);
+        if (!types[n]) {
+            XQSERVICE_WARNING_PRINT("XQServiceAdaptorPrivate::connectionTypes: Cannot marshal arguments of type '%s'", type.constData());
+            qFree(types);
+            return 0;
+        }
+    }
+    XQSERVICE_DEBUG_PRINT("types: %d", types);
+    return types;
+}
+
+int XQServiceAdaptorPrivate::qt_metacall(QMetaObject::Call c, int id, void **a)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptorPrivate::qt_metacall");
+    id = QObject::qt_metacall(c, id, a);
+    XQSERVICE_DEBUG_PRINT("id: %d", id);
+    if (id < 0)
+        return id;
+    if (c == QMetaObject::InvokeMetaMethod) {
+        XQSERVICE_DEBUG_PRINT("InvokeMetaMethod");
+        // Each signal that we have intercepted has two fake slots
+        // associated with it.  The first is the activation slot.
+        // The second is the destroyed() slot for the signal's object.
+        if (id < signalList.size() * 2) {
+            XQServiceAdaptorSignalInfo *info = signalList[id / 2];
+            if ((id % 2) == 0) {
+                // The signal we are interested in has been activated.
+                if (info->types) {
+                    XQSERVICE_DEBUG_PRINT("Signal has been activated");
+                    QList<QVariant> args;
+                    XQSERVICE_DEBUG_PRINT("info->numArgs: %d", info->numArgs);
+                    for (int i = 0; i < info->numArgs; ++i) {
+                        if (info->types[i] != XQServiceAdaptorPrivate::QVariantId) {
+                            QVariant arg(info->types[i], a[i + 1]);
+                            XQSERVICE_DEBUG_PRINT("arg: %s", qPrintable(arg.toString()));
+                            args.append(arg);
+                        } else {
+                            args.append(*((const QVariant *)(a[i + 1])));
+                        }
+                    }
+                    //TODO: CHECK HERE
+                    QVariant retValue;
+                    parent->sendMessage(info->message, args,retValue);
+                }
+            } else {
+                XQSERVICE_DEBUG_PRINT("Sender has been destroyed");
+                // The sender has been destroyed.  Clear the signal indices
+                // so that we don't try to do a manual disconnect when our
+                // own destructor is called.
+                info->signalIndex = -1;
+                info->destroyIndex = -1;
+            }
+        }
+        id -= signalList.size() * 2;
+    }
+    XQSERVICE_DEBUG_PRINT("id: %d", id);
+    return id;
+}
+
+/*!
+    Construct a Qt Extended IPC message object for \a channel and attach it to \a parent.
+    If \a channel is empty, then messages are taken from the application's
+    \c{appMessage} channel.
+*/
+XQServiceAdaptor::XQServiceAdaptor(const QString& channel, QObject *parent)
+    : QObject(parent)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::XQServiceAdaptor");
+    d = new XQServiceAdaptorPrivate(this, channel);
+}
+
+/*!
+*/
+XQServiceAdaptor::~XQServiceAdaptor()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::~XQServiceAdaptor");
+    if (!d->ref.deref())
+        delete d;
+    d = 0;
+}
+
+/*!
+    Returns the name of the channel that this adaptor is associated with.
+*/
+QString XQServiceAdaptor::channel() const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::channel");
+    XQSERVICE_DEBUG_PRINT("d->channelName: %s", qPrintable(d->channelName));
+    return d->channelName;
+}
+
+/*!
+    Connects \a signal on \a sender to \a member on \a receiver.  Returns true
+    if the receiveion was possible; otherwise returns false.
+
+    If either \a sender or \a receiver are instances of
+    XQServiceAdaptor, this function will arrange for the signal
+    to be delivered over a Qt Extended IPC channel.  If both \a sender and
+    \a receiver are local, this function is identical
+    to QObject::connect().
+
+    If the same signal is connected to same slot multiple times,
+    then signal delivery will happen that many times.
+
+    \sa XQServiceAdaptor::ChannelSelector
+*/
+bool XQServiceAdaptor::connect(QObject *sender, const QByteArray& signal,
+                          QObject *receiver, const QByteArray& member)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::connect");
+    XQSERVICE_DEBUG_PRINT("signal: %s", signal.constData());
+    XQSERVICE_DEBUG_PRINT("member: %s", member.constData());
+    XQServiceAdaptor *senderProxy;
+    XQServiceAdaptor *receiverProxy;
+
+    // Bail out if the parameters are invalid.
+    if (!sender || signal.isEmpty() || !receiver || member.isEmpty()){
+        XQSERVICE_DEBUG_PRINT("Parameters are invalid");
+        return false;
+    }
+
+    // Resolve the objects to find the remote proxies.
+    senderProxy = qobject_cast<XQServiceAdaptor *>(sender);
+    receiverProxy = qobject_cast<XQServiceAdaptor *>(receiver);
+
+    // Remove proxies if the signal or member is not tagged with MESSAGE().
+    if (!member.startsWith(QMESSAGE_CODE + '0')){
+        XQSERVICE_DEBUG_PRINT("No received proxy");
+        receiverProxy = 0;
+    }
+    if (!signal.startsWith(QMESSAGE_CODE + '0')){
+        XQSERVICE_DEBUG_PRINT("No sender proxy");
+        senderProxy = 0;
+    }
+
+    // If neither has a proxy, then use a local connect.
+    if (!senderProxy && !receiverProxy){
+        XQSERVICE_DEBUG_PRINT("Local connect");
+        return QObject::connect(sender, signal, receiver, member);
+    }
+
+    // If both are still remote proxies, then fail the request.
+    if (senderProxy && receiverProxy) {
+        XQSERVICE_WARNING_PRINT("XQServiceAdaptor::connect: cannot connect MESSAGE() to MESSAGE()");
+        return false;
+    }
+
+    // Determine which direction the connect needs to happen in.
+    if (receiverProxy) {
+        XQSERVICE_DEBUG_PRINT("Connecting a local signal to a remote slot");
+        // Connecting a local signal to a remote slot.
+        return receiverProxy->connectLocalToRemote(sender, signal, member);
+    } else {
+        XQSERVICE_DEBUG_PRINT("Connecting a remote signal to a local slot");
+        // Connecting a remote signal to a local slot.
+        return senderProxy->connectRemoteToLocal(signal, receiver, member);
+    }
+}
+
+/*!
+    Publishes the signal or slot called \a member on this object on
+    the Qt Extended IPC channel represented by this XQServiceAdaptor.
+
+    If \a member is a slot, then whenever an application sends a
+    message to the channel with that name, the system will arrange
+    for the slot to be invoked.
+
+    If \a member is a signal, then whenever this object emits that
+    signal, the system will arrange for a message with that name to
+    be sent on the channel.
+
+    Returns false if \a member does not refer to a valid signal or slot.
+
+    \sa publishAll()
+*/
+bool XQServiceAdaptor::publish(const QByteArray& member)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::publish");
+    XQSERVICE_DEBUG_PRINT("member: %s", member.constData());
+    // '1' is QSLOT_CODE in Qt 4.4 and below,
+    // '5' is QSLOT_CODE in Qt 4.5 and higher.
+    if (member.size() >= 1 && (member[0] == '1' || member[0] == '5')) {
+        XQSERVICE_DEBUG_PRINT("Exporting a slot");
+        // Exporting a slot.
+        return connectRemoteToLocal("3" + member.mid(1), this, member);
+    } else {
+        XQSERVICE_DEBUG_PRINT("Exporting a sigal");
+        // Exporting a signal.
+        return connectLocalToRemote(this, member, member);
+    }
+}
+
+/*!
+    \enum XQServiceAdaptor::PublishType
+    Type of members to publish via XQServiceAdaptor.
+
+    \value Signals Publish only signals.
+    \value Slots Publish only public slots.
+    \value SignalsAndSlots Publish both signals and public slots.
+*/
+
+/*!
+    Publishes all signals or public slots on this object within subclasses of
+    XQServiceAdaptor.  This is typically called from a subclass constructor.
+    The \a type indicates if all signals, all public slots, or both, should
+    be published.  Private and protected slots will never be published.
+
+    \sa publish()
+*/
+void XQServiceAdaptor::publishAll(XQServiceAdaptor::PublishType type)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::publishAll(1)");
+    publishAll(this,XQServiceAdaptor::staticMetaObject.methodCount(),type);
+}
+
+void XQServiceAdaptor::publishAll(QObject* object,int metCount, XQServiceAdaptor::PublishType type)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::publishAll(2)");
+    XQSERVICE_DEBUG_PRINT("metCount: %d", metCount);
+    const QMetaObject *meta = object->metaObject();
+    if (meta != d->publishedTo) {
+        int count = meta->methodCount();
+        XQSERVICE_DEBUG_PRINT("count: %d", count);
+        int index;
+        if (d->publishedTo)
+            index = d->publishedTo->methodCount();
+        else
+            index = metCount;
+        XQSERVICE_DEBUG_PRINT("index: %d", index);
+        for (; index < count; ++index) {
+
+            QMetaMethod method = meta->method(index);
+            if (method.methodType() == QMetaMethod::Slot &&
+                 method.access() == QMetaMethod::Public &&
+                 (type == Slots || type == SignalsAndSlots)) {
+                QByteArray name = method.signature();
+                XQSERVICE_DEBUG_PRINT("name: %s", name.constData());
+                XQSERVICE_DEBUG_PRINT("connectRemoteToLocal");
+                connectRemoteToLocal("3" + name, object, "1" + name);
+            } else if (method.methodType() == QMetaMethod::Signal &&
+                        (type == Signals || type == SignalsAndSlots)) {
+                QByteArray name = method.signature();
+                XQSERVICE_DEBUG_PRINT("name: %s", name.constData());
+                XQSERVICE_DEBUG_PRINT("connectLocalToRemote");
+                connectLocalToRemote(object, "2" + name, "3" + name);
+            }
+        }
+        d->publishedTo = meta;
+    }
+}
+
+/*!
+    Sends a message on the Qt Extended IPC channel which will cause the invocation
+    of the single-argument \a member on receiving objects, with the
+    argument \a arg1.
+*/
+bool XQServiceAdaptor::send(const QByteArray& member, const QVariant &arg1, QVariant &retData)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::send(1)");
+    XQSERVICE_DEBUG_PRINT("member: %s", member.constData());
+    XQSERVICE_DEBUG_PRINT("arg1: %s", qPrintable(arg1.toString()));
+    QList<QVariant> args;
+    args.append(arg1);
+    return sendMessage(memberToMessage(member), args, retData);
+}
+
+/*!
+    Sends a message on the Qt Extended IPC channel which will cause the invocation
+    of the double-argument \a member on receiving objects, with the
+    arguments \a arg1 and \a arg2.
+*/
+bool XQServiceAdaptor::send(const QByteArray& member, const QVariant &arg1, const QVariant &arg2, QVariant &retData)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::send(2)");
+    XQSERVICE_DEBUG_PRINT("member: %s", member.constData());
+    XQSERVICE_DEBUG_PRINT("arg1: %s, arg2: %s", qPrintable(arg1.toString()), qPrintable(arg2.toString()));
+    QList<QVariant> args;
+    args.append(arg1);
+    args.append(arg2);
+    return sendMessage(memberToMessage(member), args, retData);
+}
+
+/*!
+    Sends a message on the Qt Extended IPC channel which will cause the invocation
+    of the triple-argument \a member on receiving objects, with the
+    arguments \a arg1, \a arg2, and \a arg3.
+*/
+bool XQServiceAdaptor::send(const QByteArray& member, const QVariant &arg1,
+                       const QVariant &arg2, const QVariant &arg3, QVariant &retData)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::send(3)");
+    XQSERVICE_DEBUG_PRINT("member: %s", member.constData());
+    XQSERVICE_DEBUG_PRINT("arg1: %s, arg2: %s, arg3: %s", qPrintable(arg1.toString()), qPrintable(arg2.toString()), qPrintable(arg3.toString()));
+    QList<QVariant> args;
+    args.append(arg1);
+    args.append(arg2);
+    args.append(arg3);
+    return sendMessage(memberToMessage(member), args, retData);
+}
+
+/*!
+    Sends a message on the Qt Extended IPC channel which will cause the invocation
+    of the multi-argument \a member on receiving objects, with the
+    argument list \a args.
+*/
+bool XQServiceAdaptor::send(const QByteArray& member, const QList<QVariant>& args, QVariant &retData)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::send(4)");
+    XQSERVICE_DEBUG_PRINT("member: %s", member.constData());
+    for(int i=0;i<args.size();++i){
+        XQSERVICE_DEBUG_PRINT("args[%d]: %s", i, qPrintable(args[i].toString()));
+    }
+    return sendMessage(memberToMessage(member), args, retData);
+}
+
+/*!
+    Returns true if the message on the Qt Extended IPC channel corresponding to \a signal
+    has been connected to a local slot; otherwise returns false.
+*/
+bool XQServiceAdaptor::isConnected(const QByteArray& signal)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::isConnected");
+    XQSERVICE_DEBUG_PRINT("signal: %s", signal.constData());
+    return d->invokers.contains(memberToMessage(signal));
+}
+
+/*!
+    Converts a signal or slot \a member name into a Qt Extended IPC message name.
+    The default implementation strips the signal or slot prefix number
+    from \a member and then normalizes the name to convert types
+    such as \c{const QString&} into QString.
+
+    \sa QMetaObject::normalizedSignature()
+*/
+QString XQServiceAdaptor::memberToMessage(const QByteArray& member)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::memberToMessage");
+    XQSERVICE_DEBUG_PRINT("member: %s", member.constData());
+    if (member.size() >= 1 && member[0] >= '0' && member[0] <= '9') {
+        return QString::fromLatin1
+            (QMetaObject::normalizedSignature(member.constData() + 1));
+    } else {
+        return QString::fromLatin1(member.data(), member.size());
+    }
+}
+
+QVariant XQServiceAdaptor::received(const QString& msg, const QByteArray& data, const XQSharableFile &sf)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::received");
+    XQSERVICE_DEBUG_PRINT("\tmsg: %s", qPrintable(msg));
+    XQSERVICE_DEBUG_PRINT("\tdata: %s", data.constData());
+    QVariant returnValue;
+    bool found = false;
+    // Increase the reference count on the private data just
+    // in case the XQServiceAdaptor is deleted by one of the slots.
+    XQServiceAdaptorPrivate *priv = d;
+    priv->ref.ref();
+
+    // Iterate through the slots for the message and invoke them.
+    QMultiMap<QString, XQServiceAdaptorSlotInfo *>::ConstIterator iter;
+    for (iter = priv->invokers.find(msg);
+         iter != priv->invokers.end() && iter.key() == msg; ++iter) {
+        XQServiceAdaptorSlotInfo *info = iter.value();
+        if (info->destroyed){
+            XQSERVICE_DEBUG_PRINT("\tDestroyed");
+            continue;
+        }
+
+        // Convert "data" into a set of arguments suitable for qt_metacall.
+        QDataStream stream(data);
+        QList<QVariant> args;
+        // a[0] is return value (numArgs+1)
+        QVarLengthArray<void *, 32> a(info->numArgs + 1);
+        
+        XQSERVICE_DEBUG_PRINT("\tinfo->returnType: %d", info->returnType);
+        
+        if (info->returnType != (int)QVariant::Invalid) {
+            returnValue = QVariant(info->returnType, (const void *)0);
+            a[0] = returnValue.data();
+        } else {
+            a[0] = 0;
+        }
+        // Need to pick also the last XQRequestInfo form the stream
+        // That's why iterating up to numArgs+1
+        
+        int reqInfoIndex = info->numArgs;
+
+        
+        for (int arg = 0; arg < info->numArgs+1; ++arg)             
+            {
+            XQSERVICE_DEBUG_PRINT("\tDesserialize argument: %d", arg);
+            if (arg == reqInfoIndex)
+            {
+                // The last argument should be the request index
+                XQSERVICE_DEBUG_PRINT("\tDesserialize XQRequestInfo");
+                QVariant v;
+                stream >> v;
+                XQSERVICE_DEBUG_PRINT("\tXQRequestInfo:QVariant type=%s", v.typeName());
+                if (QString(v.typeName()) == QString("XQRequestInfo"))
+                {
+                    XQRequestInfo info = v.value<XQRequestInfo>();
+                    
+                    //bring foreground or background based on RequestInfo from client side.
+                    bool bg = info.isBackground();
+                    bool fg = info.isForeground();
+                    if (bg && !fg)
+                    {
+                        XQSERVICE_DEBUG_PRINT("\tApply background option");
+                        XQServiceUtil::toBackground(true);
+                    }
+                    else if (fg && !bg)
+                    {
+                        XQSERVICE_DEBUG_PRINT("\tApply foreground option");
+                        XQServiceUtil::toBackground(false);
+                    }
+                    // If both off or both on, do not do anything
+                    
+                    XQServiceIpcClient *cl = XQService::serviceThreadData()->clientConnection(d->channelName);
+                    // Attach to current request before the metacall below !
+                    cl->setRequestInfo(info);
+                }
+            }
+            else if (info->types[arg] == XQServiceAdaptorPrivate::QVariantId)
+            {
+                // We need to handle QVariant specially because we actually
+                // need the type header in this case.
+                QVariant temp;
+                stream >> temp;
+
+                XQSERVICE_DEBUG_PRINT("\tQVariantId:QVariant type=%s", temp.typeName());
+
+                if (QString(temp.typeName()) == QString("XQSharableFile"))
+                {
+                    //apply the patch
+                    if ( sf.isValid())
+                    {
+                        temp = qVariantFromValue( sf );
+                    }
+                }
+
+                args.append(temp);
+                a[arg + 1] = (void *)&(args[arg]);
+            }
+            else {
+                //
+                // The default handling
+                //
+                QVariant temp;
+                stream >> temp;
+                
+                XQSERVICE_DEBUG_PRINT("\tDefault:QVariant type=%s", temp.typeName());
+                
+                if (QString(temp.typeName()) == QString("XQSharableFile"))
+                    {
+                    //apply the patch
+                    if ( sf.isValid())
+                        {
+                        temp = qVariantFromValue( sf );
+                        }
+                    }
+                
+                args.append(temp);
+                a[arg + 1] = (void *)(args[arg].data());
+            }
+        }
+
+        // Invoke the specified slot.
+    #if !defined(QT_NO_EXCEPTIONS)
+        try {
+    #endif
+            XQSERVICE_DEBUG_PRINT("Try to make metacall");
+            info->receiver->qt_metacall
+                (QMetaObject::InvokeMetaMethod, info->memberIndex, a.data());
+            found = true;
+    #if !defined(QT_NO_EXCEPTIONS)
+        } catch (...) {
+        }
+    #endif
+    }
+    if (!found)
+        {
+        XQSERVICE_DEBUG_PRINT("Not found");
+        XQService::serviceThreadData()->setLatestError(XQService::EMessageNotFound);
+        }
+    // Decrease the reference count and delete if necessary.
+    if (!priv->ref.deref())
+        delete priv;
+    
+    XQSERVICE_DEBUG_PRINT("returnValue: %s", qPrintable(returnValue.toString()));
+    return returnValue;
+}
+
+void XQServiceAdaptor::receiverDestroyed()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::receiverDestroyed");
+    // Mark all slot information blocks that match the receiver
+    // as destroyed so that we don't try to invoke them again.
+    QObject *obj = sender();
+    QMultiMap<QString, XQServiceAdaptorSlotInfo *>::Iterator it;
+    for (it = d->invokers.begin(); it != d->invokers.end(); ++it) {
+        if (it.value()->receiver == obj)
+            it.value()->destroyed = true;
+    }
+}
+
+bool XQServiceAdaptor::connectLocalToRemote
+    (QObject *sender, const QByteArray& signal, const QByteArray& member)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::connectLocalToRemote");
+    XQSERVICE_DEBUG_PRINT("sender->objectName(): %s", qPrintable(sender->objectName()));
+    XQSERVICE_DEBUG_PRINT("signal: %s", signal.constData());
+    XQSERVICE_DEBUG_PRINT("member: %s", member.constData());
+    XQServiceAdaptorSignalInfo *info = new XQServiceAdaptorSignalInfo();
+    info->sender = sender;
+    info->message = memberToMessage(member);
+
+    // Resolve the signal name on the sender object.
+    if (signal.size() > 0) {
+        if (signal[0] != (QSIGNAL_CODE + '0')) {
+            XQSERVICE_WARNING_PRINT("XQServiceAdaptor: `%s' is not a valid signal specification", signal.constData());
+            delete info;
+            return false;
+        }
+        QByteArray signalName =
+            QMetaObject::normalizedSignature(signal.constData() + 1);
+        info->signalIndex
+            = sender->metaObject()->indexOfSignal(signalName.constData());
+        XQSERVICE_DEBUG_PRINT("info->signalIndex: %d", info->signalIndex);
+        if (info->signalIndex < 0) {
+            XQSERVICE_WARNING_PRINT("XQServiceAdaptor: no such signal: %s::%s",
+                                    sender->metaObject()->className(), signalName.constData());
+            delete info;
+            return false;
+        }
+        info->destroyIndex
+            = sender->metaObject()->indexOfSignal("destroyed()");
+        info->types = XQServiceAdaptorPrivate::connectionTypes
+            (signalName, info->numArgs);
+    } else {
+        XQSERVICE_DEBUG_PRINT("No signal");
+        delete info;
+        return false;
+    }
+
+    // Connect up the signals.
+    int index = d->slotIndex + d->signalList.size() * 2;
+    XQSERVICE_DEBUG_PRINT("index: %d", index);
+    QMetaObject::connect(sender, info->signalIndex, d, index,
+                         Qt::DirectConnection, 0);
+    if (info->destroyIndex >= 0) {
+        QMetaObject::connect(sender, info->destroyIndex, d, index + 1,
+                             Qt::DirectConnection, 0);
+    }
+
+    // Add the signal information to the active list.
+    d->signalList.append(info);
+    return true;
+}
+
+bool XQServiceAdaptor::connectRemoteToLocal
+    (const QByteArray& signal, QObject *receiver, const QByteArray& member)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::connectRemoteToLocal");
+    XQSERVICE_DEBUG_PRINT("signal: %s", signal.constData());
+    XQSERVICE_DEBUG_PRINT("receiver->objectName(): %s", qPrintable(receiver->objectName()));
+    XQSERVICE_DEBUG_PRINT("member: %s", member.constData());
+    // Make sure that we are actively monitoring the channel for messages.
+    if (!d->connected) {
+        XQSERVICE_DEBUG_PRINT("Try to connect to channel");
+        QString chan = d->channelName;
+        // Short-cut the signal emits in XQServiceChannel for greater
+        // performance when dispatching incoming messages.
+        XQServiceAdaptorChannel* adaptorChannel = new XQServiceAdaptorChannel(chan, this);
+        bool ret = adaptorChannel ? adaptorChannel->connectChannel() : false;
+        XQSERVICE_DEBUG_PRINT("ret: %d", ret);
+        if (!ret) {
+            return ret;
+        }
+        d->connected = true;
+    }
+
+    // Create a slot invoker to handle executing the member when necessary.
+    XQServiceAdaptorSlotInfo *info = new XQServiceAdaptorSlotInfo();
+    QByteArray name;
+    if (member.size() > 0 && member[0] >= '0' && member[0] <= '9') {
+        // Strip off the member type code.
+        name = QMetaObject::normalizedSignature(member.constData() + 1);
+    } else {
+        name = QMetaObject::normalizedSignature(member.constData());
+    }
+    info->receiver = receiver;
+    info->returnType = 0;
+    info->types = 0;
+    info->numArgs = 0;
+    info->destroyed = false;
+    if (receiver && name.size() > 0) {
+        info->memberIndex
+            = receiver->metaObject()->indexOfMethod(name.constData());
+        XQSERVICE_DEBUG_PRINT("info->memberIndex: %d", info->memberIndex);
+        if (info->memberIndex != -1) {
+            connect(receiver, SIGNAL(destroyed()), this, SLOT(receiverDestroyed()));
+            QMetaMethod method = receiver->metaObject()->method(info->memberIndex);
+            info->returnType = XQServiceAdaptorPrivate::typeFromName(method.typeName());
+            info->types = XQServiceAdaptorPrivate::connectionTypes(name, info->numArgs);
+            if (!(info->types))
+                info->destroyed = true;
+        } else {
+            XQSERVICE_WARNING_PRINT("XQServiceAdaptor: no such member: %s::%s",
+                                     receiver->metaObject()->className(), name.constData());
+        }
+    } else {
+        info->memberIndex = -1;
+    }
+    if (info->memberIndex == -1) {
+        XQSERVICE_DEBUG_PRINT("No receiver");
+        delete info;
+        return false;
+    }
+    d->invokers.insert(memberToMessage(signal), info);
+    return true;
+}
+
+bool XQServiceAdaptor::sendMessage(const QString& msg, const QList<QVariant>& args, QVariant &retData)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::sendMessage");
+    return send(d->channelName, msg, args, retData);
+}
+
+
+bool XQServiceAdaptor::send(const QString& channel,
+                            const QString& msg, 
+                            const QList<QVariant>& args,
+                            QVariant& retValue,
+                            bool sync,
+                            XQServiceRequestCompletedAsync* rc)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::send(1). No user data");
+    return send(channel,msg,args,retValue,sync,rc,NULL);
+}
+
+bool XQServiceAdaptor::send(const QString& channel,
+                            const QString& msg, 
+                            const QList<QVariant>& args,
+                            QVariant& retValue,
+                            bool sync,
+                            XQServiceRequestCompletedAsync* rc,
+                            const void *userData)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::send(2)");
+    XQSERVICE_DEBUG_PRINT("channel: %s, sync: %d", qPrintable(channel), sync);
+    XQSERVICE_DEBUG_PRINT("msg: %s", qPrintable(msg));
+    XQSERVICE_DEBUG_PRINT("userdata: %x",(int)userData);
+    for(int i=0;i<args.size();++i){
+        XQSERVICE_DEBUG_PRINT("args[%d]:type=%s,value=%s", i, args[i].typeName(), qPrintable(args[i].toString()));
+    }
+    if (!sync && !rc) {
+        // Something wrong as no callback given
+        XQService::serviceThreadData()->setLatestError(XQService::EArgumentError);
+        return false;
+    }
+    QByteArray array;
+    QDataStream stream(&array, QIODevice::WriteOnly | QIODevice::Append);
+    QList<QVariant>::ConstIterator iter;
+    for (iter = args.begin(); iter != args.end(); ++iter) {
+        stream << *iter;
+    }
+    // Stream is flushed and closed at this point.
+    return XQServiceChannel::send(channel, msg, array, retValue, sync, rc, userData);
+}
+
+bool XQServiceAdaptor::cancelPendingSend(const QString& channel)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::cancelPendingSend");
+    return XQServiceChannel::cancelPendingSend(channel);
+}
+
+int XQServiceAdaptor::latestError()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::latestError");
+    return XQServiceChannel::latestError();
+}
+
+
+
+int XQServiceAdaptor::setCurrentRequestAsync()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::setCurrentRequestAsync");
+    XQServiceIpcClient *cl = XQService::serviceThreadData()->clientConnection(d->channelName);
+    return cl->setCurrentRequestAsync();
+}
+
+bool XQServiceAdaptor::completeRequest(int index, const QVariant& retValue)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceAdaptor::completeRequest");
+    XQServiceIpcClient *cl = XQService::serviceThreadData()->clientConnection(d->channelName);
+    return cl->completeRequest(index, retValue);
+}
+
+
+XQRequestInfo XQServiceAdaptor::requestInfo() const
+{
+    XQServiceIpcClient *cl = XQService::serviceThreadData()->clientConnection(d->channelName);
+    return cl->requestInfo();
+}
+
+#include "xqserviceadaptor.moc"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqserviceadaptor.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,128 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/                                                                    
+
+#ifndef XQSERVICEADAPTOR_H
+#define XQSERVICEADAPTOR_H
+
+#include <xqserviceglobal.h>
+
+#include <QObject>
+#include <QString>
+#include <QByteArray>
+#include <QVariant>
+#include <QStringList>
+
+#include <xqrequestinfo.h>
+
+class XQServiceAdaptorPrivate;
+class XQServiceRequestCompletedAsync;
+class XQSharableFile;
+
+class XQSERVICE_EXPORT XQServiceAdaptor : public QObject
+{
+    Q_OBJECT
+    friend class XQServiceAdaptorPrivate;
+    friend class XQServiceAdaptorChannel;
+    friend class XQServiceProvider;
+    
+public:
+    explicit XQServiceAdaptor(const QString& channel, QObject *parent = 0);
+    virtual ~XQServiceAdaptor();
+
+    QString channel() const;
+
+    static bool connect(QObject *sender, const QByteArray& signal,
+                        QObject *receiver, const QByteArray& member);
+
+    bool send(const QByteArray& member, const QVariant &arg1, QVariant &retData);
+    bool send(const QByteArray& member, const QVariant &arg1,
+              const QVariant &arg2, QVariant &retData);
+    bool send(const QByteArray& member, const QVariant &arg1,
+              const QVariant &arg2, const QVariant &arg3, QVariant &retData);
+    bool send(const QByteArray& member, const QList<QVariant>& args, QVariant &retData);
+
+    bool isConnected(const QByteArray& signal);
+
+    //todo: proposed to change in channel in 2 separate api sendSync sendAsync
+    static bool send(const QString& channel,
+                     const QString& msg, 
+                     const QList<QVariant>& args, 
+                     QVariant& retValue, 
+                     bool sync = true,
+                     XQServiceRequestCompletedAsync* rc = NULL);
+
+    static bool send(const QString& channel,
+                     const QString& msg, 
+                     const QList<QVariant>& args, 
+                     QVariant& retValue, 
+                     bool sync,
+                     XQServiceRequestCompletedAsync* rc,
+                     const void *userData);
+    
+    static bool cancelPendingSend(const QString& channel);
+
+    static int latestError();
+
+    int setCurrentRequestAsync();
+
+    bool completeRequest(int index, const QVariant& retValue);
+
+    XQRequestInfo requestInfo() const;
+    
+ Q_SIGNALS:
+    void returnValueDelivered() ;
+    void clientDisconnected() ;
+        
+protected:
+    enum PublishType
+    {
+        Signals,
+        Slots,
+        SignalsAndSlots
+    };
+
+    bool publish(const QByteArray& member);
+    void publishAll(XQServiceAdaptor::PublishType type);
+    virtual QString memberToMessage(const QByteArray& member);
+
+private slots:
+    void receiverDestroyed();
+
+private:
+    QVariant received(const QString& msg, const QByteArray& data,const XQSharableFile &sf);
+
+    bool connectLocalToRemote(QObject *sender, const QByteArray& signal,
+                              const QByteArray& member);
+    bool connectRemoteToLocal(const QByteArray& signal, QObject *receiver,
+                              const QByteArray& member);
+    bool sendMessage(const QString& msg, const QList<QVariant>& args, QVariant &retData);
+    
+    void publishAll(QObject* object, int metCount, XQServiceAdaptor::PublishType type);
+
+private:
+    XQServiceAdaptorPrivate *d;
+};
+
+// Useful alias to make it clearer when connecting to messages on a channel.
+#define MESSAGE(x)      "3"#x
+#define QMESSAGE_CODE   3
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqservicechannel.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,366 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/   
+
+#include "xqservicelog.h"
+
+#include "xqservicechannel.h"
+
+#include "xqservicethreaddata.h"
+#include "xqserviceipcclient.h"
+
+#include <xqserviceutil.h>
+#include <xqsharablefile.h>
+
+
+
+/*!
+    \class XQServiceChannel
+    \inpublicgroup QtBaseModule
+    \ingroup qws
+
+    \brief The XQServiceChannel class provides communication capabilities
+    between clients.
+
+    XQSERVICE is a many-to-many communication protocol for transferring
+    messages on various channels. A channel is identified by a name,
+    and anyone who wants to can listen to it. The XQSERVICE protocol allows
+    clients to communicate both within the same address space and
+    between different processes, but it is currently only available
+    for \l {Qt for Embedded Linux} (on X11 and Windows we are exploring the use
+    of existing standards such as DCOP and COM).
+
+    Typically, XQServiceChannel is either used to send messages to a
+    channel using the provided static functions, or to listen to the
+    traffic on a channel by deriving from the class to take advantage
+    of the provided functionality for receiving messages.
+
+    XQServiceChannel provides a couple of static functions which are usable
+    without an object: The send() function, which sends the given
+    message and data on the specified channel, and the isRegistered()
+    function which queries the server for the existence of the given
+    channel.
+
+    In addition, the XQServiceChannel class provides the channel() function
+    which returns the name of the object's channel, the virtual
+    receive() function which allows subclasses to process data
+    received from their channel, and the received() signal which is
+    emitted with the given message and data when a XQServiceChannel
+    subclass receives a message from its channel.
+
+    \sa XQServiceServer, {Running Qt for Embedded Linux Applications}
+*/
+
+/*!
+    Constructs a XQService channel with the given \a parent, and registers it
+    with the server using the given \a channel name.
+    \param channel Channel name.
+    \param isServer 
+    \param parent Parent of this object.
+    \sa isRegistered(), channel()
+*/
+
+XQServiceChannel::XQServiceChannel(const QString& channel, bool isServer, QObject *parent)
+    : QObject(parent)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::XQServiceChannel");
+    XQSERVICE_DEBUG_PRINT("channel: %s, isServer: %d", qPrintable(channel), isServer );
+    d = new XQServiceChannelPrivate(this, channel, isServer);
+    d->ref.ref();
+
+    XQServiceThreadData *td = XQService::serviceThreadData();
+
+    // do we need a new channel list ?
+    XQServiceClientMap::Iterator it = td->clientMap.find(channel);
+    if (it != td->clientMap.end()) {
+        XQSERVICE_DEBUG_PRINT("Channel exits");
+        it.value().append(XQServiceChannelPrivatePointer(d));
+        return;
+    }
+    XQSERVICE_DEBUG_PRINT("New channel");
+    it = td->clientMap.insert(channel, QList<XQServiceChannelPrivatePointer>());
+    it.value().append(XQServiceChannelPrivatePointer(d));
+}
+
+/*!
+    Destroys the client's end of the channel and notifies the server
+    that the client has closed its connection. The server will keep
+    the channel open until the last registered client detaches.
+
+    \sa XQServiceChannel()
+*/
+
+XQServiceChannel::~XQServiceChannel()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::~XQServiceChannel");
+    XQServiceThreadData *td = XQService::serviceThreadData();
+
+    XQServiceClientMap::Iterator it = td->clientMap.find(d->channel);
+    Q_ASSERT(it != td->clientMap.end());
+    it.value().removeAll(XQServiceChannelPrivatePointer(d));
+    // still any clients connected locally ?
+    if (it.value().isEmpty()) {
+        if (td->hasClientConnection(d->channel))
+            td->closeClientConnection(d->channel);
+        td->clientMap.remove(d->channel);
+    }
+
+    // Dereference the private data structure.  It may stay around
+    // for a little while longer if it is in use by sendLocally().
+    d->object = 0;
+    if (!d->ref.deref())
+        delete d;
+}
+
+bool XQServiceChannel::connectChannel()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::connectChannel");
+    bool ret = true;
+
+    XQServiceThreadData *td = XQService::serviceThreadData();
+    
+    if (!td->hasClientConnection(d->channel)) {
+        XQSERVICE_DEBUG_PRINT("Create new client connection (1)");
+        ret = td->createClientConnection(d->channel,d->server);
+    }
+    return ret;
+}
+
+/*!
+    Returns the name of the channel.
+
+    \sa XQServiceChannel()
+*/
+
+QString XQServiceChannel::channel() const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::channel");
+    XQSERVICE_DEBUG_PRINT("channel: %s", qPrintable(d->channel));
+    return d->channel;
+}
+
+/*!
+    \fn void XQServiceChannel::receive(const QString& message, const QByteArray &data)
+
+    This virtual function allows subclasses of XQServiceChannel to process
+    the given \a message and \a data received from their channel. The default
+    implementation emits the received() signal.
+
+    Note that the format of the given \a data has to be well defined
+    in order to extract the information it contains. In addition, it
+    is recommended to use the DCOP convention. This is not a
+    requirement, but you must ensure that the sender and receiver
+    agree on the argument types.
+
+    Example:
+
+    \code
+        void MyClass::receive(const QString &message, const QByteArray &data)
+        {
+            QDataStream in(data);
+            if (message == "execute(QString,QString)") {
+                QString cmd;
+                QString arg;
+                in >> cmd >> arg;
+                ...
+            } else if (message == "delete(QString)") {
+                QString fileName;
+                in >> fileName;
+                ...
+            } else {
+                ...
+            }
+        }
+    \endcode
+
+    This example assumes that the \c message is a DCOP-style function
+    signature and the \c data contains the function's arguments.
+
+    \sa send()
+ */
+QVariant XQServiceChannel::receive(const QString& msg, const QByteArray &data, const XQSharableFile &sf )
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::receive");
+    XQSERVICE_DEBUG_PRINT("msg: %s, data: %s", qPrintable(msg), data.constData());
+    emit received(msg, data,sf);
+    return QVariant();
+}
+
+void XQServiceChannel::commandReceive(const XQServiceCommand cmd)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::commandReceive %d", cmd);
+    emit commandReceived(cmd);
+}
+
+/*!
+    \fn void XQServiceChannel::received(const QString& message, const QByteArray &data)
+
+    This signal is emitted with the given \a message and \a data whenever the
+    receive() function gets incoming data.
+
+    \sa receive()
+*/
+
+/*!
+    \fn bool XQServiceChannel::send(const QString& channel, const QString& message,
+                       const QByteArray &data)
+
+    Sends the given \a message on the specified \a channel with the
+    given \a data.  The message will be distributed to all clients
+    subscribed to the channel. Returns true if the message is sent
+    successfully; otherwise returns false.
+
+    It is recommended to use the DCOP convention. This is not a
+    requirement, but you must ensure that the sender and receiver
+    agree on the argument types.
+
+    Note that QDataStream provides a convenient way to fill the byte
+    array with auxiliary data.
+
+    Example:
+
+    \code
+        QByteArray data;
+        QDataStream out(&data, QIODevice::WriteOnly);
+        out << QString("cat") << QString("file.txt");
+        XQServiceChannel::send("System/Shell", "execute(QString,QString)", data);
+    \endcode
+
+    Here the channel is \c "System/Shell". The \c message is an
+    arbitrary string, but in the example we've used the DCOP
+    convention of passing a function signature. Such a signature is
+    formatted as \c "functionname(types)" where \c types is a list of
+    zero or more comma-separated type names, with no whitespace, no
+    consts and no pointer or reference marks, i.e. no "*" or "&".
+
+    \sa receive()
+*/
+
+bool XQServiceChannel::send(const QString& channel, const QString& msg,
+                            const QByteArray &data, QVariant &retValue,
+                            bool sync, XQServiceRequestCompletedAsync* rc)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::send(1). No user data");
+    // Delegate to actual send.
+    // No user data argument present in this version
+    return send(channel,msg,data,retValue,sync,rc,NULL);
+}
+
+
+
+bool XQServiceChannel::send(const QString& channel, const QString& msg,
+                       const QByteArray &data, QVariant &retValue,
+                       bool sync, XQServiceRequestCompletedAsync* rc,
+                       const void* userData)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::send(2) start");
+    XQSERVICE_DEBUG_PRINT("\t channel: %s, msg: %s", qPrintable(channel), qPrintable(msg));
+    XQSERVICE_DEBUG_PRINT("\t data: %s, sync: %d", data.constData(), sync);
+    bool ret=true;
+    
+    if (!XQService::serviceThreadData()->hasClientConnection(channel)) {
+        XQSERVICE_DEBUG_PRINT("\t Create new client connection (2)");
+        ret = XQService::serviceThreadData()->createClientConnection(channel,false,sync,rc, userData);
+        XQSERVICE_DEBUG_PRINT("\t creation succeeded: %d", ret);
+    }
+    if (ret) {
+        XQSERVICE_DEBUG_PRINT("\t ret = true");
+        XQServiceIpcClient *cl = XQService::serviceThreadData()->clientConnection(channel);
+        QByteArray retData ;
+        ret = cl ? cl->send(channel, msg, data, retData) : false;
+        if (sync) {
+            retValue = XQServiceThreadData::deserializeRetData(retData);
+        }
+    }
+    XQSERVICE_DEBUG_PRINT("\t ret: %d", ret);
+	XQSERVICE_DEBUG_PRINT("XQServiceChannel::send(2) end");
+    return ret;
+}
+
+
+bool XQServiceChannel::cancelPendingSend(const QString& channel)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::cancelPendingSend start");
+    XQSERVICE_DEBUG_PRINT("\t channel: %s", qPrintable(channel));
+    bool ret=true;
+    
+    if (ret) {
+        XQServiceIpcClient *cl = XQService::serviceThreadData()->clientConnection(channel);
+        XQSERVICE_DEBUG_PRINT("\t XQService::serviceThreadData()->clientConnection(channel): %d", cl);
+        XQSERVICE_DEBUG_PRINT("\t cl->cancelPendingSend(%s)", qPrintable(channel));
+        ret = cl ? cl->cancelPendingSend(channel) : false;
+    }
+    
+    XQSERVICE_DEBUG_PRINT("\t ret: %d", ret);
+	XQSERVICE_DEBUG_PRINT("XQServiceChannel::cancelPendingSend end");
+    return ret;
+}
+
+/*!
+    \internal
+    Client side: distribute received event to the XQService instance managing the
+    channel.
+*/
+QVariant XQServiceChannel::sendLocally(const QString& ch, const QString& msg,
+                                const QByteArray &data, const XQSharableFile &sf )
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::sendLocally");
+    XQSERVICE_DEBUG_PRINT("channel: %s, msg: %s", qPrintable(ch), qPrintable(msg));
+    XQSERVICE_DEBUG_PRINT("data: %s", data.constData());
+    QVariant ret;
+    
+    // feed local clients with received data
+    XQServiceThreadData *td = XQService::serviceThreadData();
+    QList<XQServiceChannelPrivatePointer> clients = td->clientMap[ch];
+    for (int i = 0; i < clients.size(); ++i) {
+        XQServiceChannelPrivate *channel = clients.at(i).data();
+        if (channel->object)
+            ret = channel->object->receive(msg, data,sf );
+    }
+
+#ifdef XQSERVICE_DEBUG
+    QString s = ret.toString();
+    int len=s.length();
+    XQSERVICE_DEBUG_PRINT("sendLocally ret: type=%s,len=%d,value(max.1024)=%s",
+                          ret.typeName(),len,qPrintable(s.left(1024)));
+#endif
+    return ret ;
+}
+
+int XQServiceChannel::latestError()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::latestError");
+    return XQService::serviceThreadData()->latestError();
+}
+
+void XQServiceChannel::sendCommand(const QString& ch,const XQServiceCommand cmd)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceChannel::sendCommand");
+    XQSERVICE_DEBUG_PRINT("channel: %s, cmd: %d", qPrintable(ch), cmd);
+    // feed local clients with received data
+    XQServiceThreadData *td = XQService::serviceThreadData();
+    QList<XQServiceChannelPrivatePointer> clients = td->clientMap[ch];
+    for (int i = 0; i < clients.size(); ++i) {
+        XQServiceChannelPrivate *channel = clients.at(i).data();
+        if (channel->object)
+            channel->object->commandReceive(cmd);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqservicechannel.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/   
+
+#ifndef XQSERVICECHANNEL_H
+#define XQSERVICECHANNEL_H
+
+#include <xqserviceglobal.h>
+#include <QObject>
+#include <QVariant>
+
+
+class XQServiceChannelPrivate;
+class XQSharableFile;
+
+class XQServiceRequestCompletedAsync
+{
+public:
+    virtual void requestCompletedAsync(const QVariant &retValue) = 0;
+    virtual void requestErrorAsync(int err) = 0;
+};
+
+class XQSERVICE_EXPORT XQServiceChannel : public QObject
+{
+    Q_OBJECT
+public:
+    enum XQServiceCommand {
+        ReturnValueDelivered = 1,
+        ClientDisconnected
+    };
+    explicit XQServiceChannel(const QString& channel, bool isServer, QObject *parent=0);
+    virtual ~XQServiceChannel();
+
+    bool connectChannel();
+    
+    QString channel() const;
+
+    //TODO: implement 2 separate apis sendSync sendAsync
+    static bool send(const QString& channel, 
+                     const QString& msg,
+                     const QByteArray &data, QVariant &retValue, 
+                     bool sync, XQServiceRequestCompletedAsync* rc = NULL);
+    
+    static bool send(const QString& channel, 
+                     const QString& msg,
+                     const QByteArray &data,
+                     QVariant &retValue, 
+                     bool sync,
+                     XQServiceRequestCompletedAsync* rc,
+                     const void *userData);  // Any caller given data
+
+    static bool cancelPendingSend(const QString& channel);
+
+    static QVariant sendLocally(const QString& ch, const QString& msg,
+                                const QByteArray &data, const XQSharableFile &sf );
+    
+    static void sendCommand(const QString& ch,const XQServiceCommand cmd);
+    static int latestError();
+	
+	
+    virtual QVariant receive(const QString& msg, const QByteArray &data, const XQSharableFile &sf );
+    virtual void commandReceive(const XQServiceCommand cmd);
+    
+Q_SIGNALS:
+    void received(const QString& msg, const QByteArray &data, const XQSharableFile &sf);
+    void commandReceived(const XQServiceCommand cmd);
+    
+protected:
+
+private:
+    XQServiceChannelPrivate* d;
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqserviceipcclient.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,827 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqserviceipcclient.h"
+#include "xqservicechannel.h"
+#include "xqservicethreaddata.h"
+#include "xqrequestutil.h"
+
+#include <xqserviceutil.h>
+#include <xqserviceipc.h>
+#include <xqserviceipcserver.h>
+#include <xqserviceipcrequest.h>
+#include <QProcess>
+#ifdef QT_S60_AIW_PLUGIN
+#include <xqplugin.h>
+#include <xqpluginloader.h>
+#include <xqplugininfo.h>
+#endif
+#include <QList>
+#include <xqserviceprovider.h>
+#include <e32err.h>
+
+#include <xqsharablefile.h>
+
+struct XQServicePacketHeader
+{
+    int totalLength;
+    int command;
+    int chLength;
+    int msgLength;
+    int dataLength;
+};
+
+XQServiceIpcClient::XQServiceIpcClient(const QString& ipcConName, bool isServer, 
+                                       bool isSync, XQServiceRequestCompletedAsync* rc,
+                                      const void *userData)
+    : QObject(), cancelledRequest(NULL), serviceIpc(NULL), serviceIpcServer(NULL), callBackRequestComplete(rc),
+      mUserData(userData)  // User data can be NULL !
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::XQServiceIpcClient");
+    XQSERVICE_DEBUG_PRINT("ipcConName: %s, isServer: %d, isSync: %d", qPrintable(ipcConName), isServer, isSync);
+    XQSERVICE_DEBUG_PRINT("userData: %x, (int)userData)");
+
+	
+	mIpcConName = ipcConName;
+    server = isServer;
+    synchronous = isSync ;
+    sendSyncLoop = NULL;
+	
+	// Incomplete in-process plugin support (just null data members)
+    plugin=NULL;
+    localProvider=NULL;
+    lastId = 0;  // Start IDs from 1
+    
+#ifdef QT_S60_AIW_PLUGIN
+    QList<XQPluginInfo> impls;  
+    XQPluginLoader pluginLoader;
+         
+    pluginLoader.listImplementations(ipcConName, impls);
+    if (impls.count()) {
+        pluginLoader.setUid(impls.at(0).uid()); 
+		// Use the very first plugin found, otherwise impl. ui need to be passed here
+		plugin = pluginLoader.instance();
+    }
+#endif
+}
+
+XQServiceIpcClient::~XQServiceIpcClient()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::~XQServiceIpcClient");
+#ifdef QT_S60_AIW_PLUGIN
+	delete plugin;
+    delete localProvider;
+#endif
+//    disconnected();
+}
+
+bool XQServiceIpcClient::listen()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::listen,isServer?=%d", server);
+#    
+#ifdef QT_S60_AIW_PLUGIN
+    if (plugin) return true;
+#endif
+
+    if (server) {
+        serviceIpcServer = new ServiceFwIPCServer(this, this, ESymbianApaServer);
+        bool embedded = XQServiceUtil::isEmbedded();
+        XQSERVICE_DEBUG_PRINT("embedded: %d", embedded);
+        QString conName = mIpcConName;
+        if (embedded) {
+            // For embedded launch ass the server app ID to connection name
+            // The client side will check the same embedded options and use the
+            // same pattern
+            quint64 processId = qApp->applicationPid();
+            conName = mIpcConName + "." + QString::number(processId);
+        }
+        XQSERVICE_DEBUG_PRINT("conName: %s", qPrintable(conName));
+        return serviceIpcServer->listen(conName);
+    }
+    XQSERVICE_DEBUG_PRINT("No server");
+    return false;
+}
+
+bool XQServiceIpcClient::connectToServer()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::connectToServer, isServer?=%d", server);
+#ifdef QT_S60_AIW_PLUGIN
+	if (plugin)
+        {
+        localProvider= new XQServiceProvider( mIpcConName, NULL);
+        localProvider->SetPlugin(plugin);
+        // localProvider->publishAll();  
+        return true;
+        }
+#endif
+
+    // Attension.
+    // The 'mIpcConName' may contai the unique session identifier to separate connections using the same
+    // By default server name is the same as the channel name.
+    // When embedded launch, we add the server process ID to name to make it unique
+    QString serverName = XQRequestUtil::channelName(mIpcConName);
+    
+    if (!serviceIpc) {
+        XQSERVICE_DEBUG_PRINT("New serviceIpc:mIpcConName=%s,serverName=%s",
+                              qPrintable(mIpcConName), qPrintable(serverName));
+        
+        serviceIpc = new ServiceFwIPC(this, ESymbianApaServer);
+        serviceIpc->setUserData(mUserData); // Attach user data, if any, to request
+        const XQRequestUtil *util = static_cast<const XQRequestUtil*>(mUserData);
+        bool embedded = util->mInfo.isEmbedded();
+        
+        connect(serviceIpc, SIGNAL(error(int)), this, SLOT(clientError(int)));
+        connect(serviceIpc, SIGNAL(readyRead()), this, SLOT(readyRead()));
+        XQSERVICE_DEBUG_PRINT("\tembedded: %d", embedded);
+        if (embedded) {
+            quint64 processId=0;
+            // Embedded server launch.
+            // Server executable is always started with common name.
+            // The server has to add the it's process ID to server names when creating Symbian server names to
+            // be connected to. That's how client and server can establish unique connection.
+            // 
+            bool ret = serviceIpc->startServer(serverName,"", processId, ServiceFwIPC::EStartInEmbeddedMode);
+            XQSERVICE_DEBUG_PRINT("ret: %d", ret);
+            if (ret && (processId > 0)) {
+                // 
+                // Start application in embedded mode. Add process ID to server name to make
+                // server connection unique.
+                serverName  = serverName  + "." + QString::number(processId);
+                XQSERVICE_DEBUG_PRINT("Try connect to embedded service: %s", qPrintable(serverName));
+                retryCount = 0;
+                while (!serviceIpc->connect(serverName) && retryCount < retryToServerMax) {
+                    XQSERVICE_DEBUG_PRINT("retryCount: %d", retryCount+1);
+                    ++retryCount;
+                    wait(200);
+                }
+                if (retryCount == retryToServerMax) {
+                    XQSERVICE_DEBUG_PRINT("Couldn't connect to embedded server");
+                    XQService::serviceThreadData()->setLatestError(ServiceFwIPC::EConnectionError);  // Set error also
+                    processId = 0;
+                }
+            }
+            if (!processId) {
+                XQSERVICE_WARNING_PRINT("Could not connect to embedded service %s", qPrintable(serverName));
+                delete serviceIpc;
+                serviceIpc = NULL;
+                return false;                
+            }
+            XQSERVICE_DEBUG_PRINT("Embedded connection created");
+        }
+        else {
+            // Not embedded 
+            XQSERVICE_DEBUG_PRINT("Use existing serviceIpc:mIpcConName=%s, serverName=%s",
+                                  qPrintable(mIpcConName), qPrintable(serverName));
+            if (!serviceIpc->connect(serverName)) {
+                XQSERVICE_DEBUG_PRINT("Trying to start server %s", qPrintable(serverName));
+                quint64 processId=0;
+                bool ret=serviceIpc->startServer(serverName,"",processId);
+                XQSERVICE_DEBUG_PRINT("starServer ret=%d", ret);
+                if (ret && (processId > 0)) {
+                    retryCount = 0;
+                    while (!serviceIpc->connect(serverName) && retryCount < retryToServerMax) {
+                        XQSERVICE_DEBUG_PRINT("retryCount: %d", retryCount+1);
+                        ++retryCount;
+                        wait(200);
+                    }
+                    if (retryCount == retryToServerMax) {
+                        XQSERVICE_DEBUG_PRINT("Couldn't connect to server");
+                        XQService::serviceThreadData()->setLatestError(ServiceFwIPC::EConnectionError);  // Set error also
+                        processId = 0;
+                    }
+                }
+                if (!processId) {
+                    XQSERVICE_WARNING_PRINT("Could not connect to the service %s", qPrintable(serverName));
+                    delete serviceIpc;
+                    serviceIpc = NULL;
+                    return false;                
+                }
+            }
+        XQSERVICE_DEBUG_PRINT("Connection created");
+        }
+    }
+    return true;
+}
+
+bool XQServiceIpcClient::handleRequest( ServiceIPCRequest *aRequest )
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::handleRequest,isServer?=%d", server);
+	XQService::serviceThreadData()->setLatestError(KErrNone);
+    bool result(true);
+    int index = setCurrentRequest(aRequest);
+    XQSERVICE_DEBUG_PRINT("index: %d", index);
+    const QString oper = aRequest->getOperation();
+    XQSERVICE_DEBUG_PRINT("oper: %s", qPrintable(oper));
+    const QByteArray packet=aRequest->getData();
+    const char *startPtr = packet.constData();
+    XQSERVICE_DEBUG_PRINT("packet: %s", packet.constData());
+    
+    
+    // We have a full packet to be processed.  Parse the command
+    // and the channel name, but nothing else just yet.
+    XQServicePacketHeader *header = (XQServicePacketHeader *)startPtr;
+    int command = header->command;
+    XQSERVICE_DEBUG_PRINT("command: %d", command);
+    QString channel;
+    const char *ptr = startPtr + sizeof(XQServicePacketHeader);
+    if (header->chLength > 0) {
+        channel = QString::fromUtf16
+            ((const ushort *)ptr, header->chLength);
+        ptr += header->chLength * 2;
+    }
+    XQSERVICE_DEBUG_PRINT("channel: %s", qPrintable(channel));
+    // Parse the rest of the packet now that we know we need it.
+    QString msg;
+    QByteArray data;
+    if (header->msgLength > 0) {
+        msg = QString::fromUtf16
+            ((const ushort *)ptr, header->msgLength);
+        ptr += header->msgLength * 2;
+    }
+    XQSERVICE_DEBUG_PRINT("msg: %s", qPrintable(msg));
+    if (header->dataLength > 0) {
+        data = QByteArray ((const char *)ptr, header->dataLength);
+        ptr += header->dataLength;
+    }
+    XQSERVICE_DEBUG_PRINT("data: %s", data.constData());
+    QVariant ret;
+    // Processing command on server side.
+    if (command == XQServiceCmd_Send) {    
+        //Only support 1 sharable file, so index is 0
+        ret=XQServiceChannel::sendLocally(channel, msg, data, aRequest->sharableFile(0) );
+    }
+    else if (command == XQServiceCmd_ReturnValueDelivered) {
+       XQServiceChannel::sendCommand(channel,XQServiceChannel::ReturnValueDelivered);
+    }
+
+    if (XQService::serviceThreadData()->latestError() || 
+        !aRequest->isAsync()) {
+        ret=completeRequest(index,ret);
+    }
+    XQSERVICE_DEBUG_PRINT("ret: %d", result);
+    return result;
+}
+
+/*!
+ * From MServiceIPCObserver
+ * \see MServiceIPCObserver::handleCancelRequest( ServiceIPCRequest *aRequest )
+ */
+void XQServiceIpcClient::handleCancelRequest(ServiceIPCRequest* aRequest)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::handleCancelRequest isServer?=%d", server);
+    if (server)
+    {
+        // Save the request to be cancelled if service provider wants to as
+        // XQRequestInfo for details
+        // Valid only upon sendCommand call
+        cancelledRequest = aRequest; 
+        
+        //Attention! At the moment in server side channel name and connection name are the same
+        // it might be that in the future will be different then this is not valid anymore.
+        XQServiceChannel::sendCommand(mIpcConName,XQServiceChannel::ClientDisconnected);
+
+        // Remember to reset immediatelly
+        cancelledRequest = 0;
+        
+        cancelRequest(aRequest);
+    }
+}
+
+/*
+* From MServiceIPCObserver
+* \see MServiceIPCObserver::handleDeleteRequest( ServiceIPCRequest *aRequest )
+*/
+void XQServiceIpcClient::handleDeleteRequest(ServiceIPCRequest* aRequest)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::handleDeleteRequest isServer?=%d, reqId=", server);
+    if (server)
+    {
+        cancelRequest(aRequest);
+    }
+}
+
+bool XQServiceIpcClient::cancelRequest(ServiceIPCRequest* aRequest) {
+    bool ret(false);
+    
+    if (aRequest == NULL)
+        return ret;
+    
+    if (server) {
+        XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::cancelRequest, isServer?=%d, reqId=%d", server, aRequest->id());
+        if (requestsMap.contains(aRequest->id())) {
+            requestsMap.take(aRequest->id());  // Use "take" not to delete the request !!
+            ret = true;
+        } else {
+            ret = false;
+        }
+        XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::cancelRequest, ret=%d", ret);
+    }
+    return ret;
+}
+
+bool XQServiceIpcClient::sendChannelCommand(int cmd, const QString& ch)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::sendChannelCommand, isServer?=%d", server);
+    XQSERVICE_DEBUG_PRINT("cmd: %d, ch: %s", cmd, qPrintable(ch));
+    if (!connectToServer()){
+        XQSERVICE_DEBUG_PRINT("Couldn't connect to the server");
+        return false;
+    }
+    int len = ch.length() * 2 + sizeof(XQServicePacketHeader);
+    XQSERVICE_DEBUG_PRINT("cmd: %d", len);
+    int writelen;
+    char *buf;
+    bool freeBuf = false;
+    if (len <= minPacketSize) {
+        buf = outBuffer;
+        memset(buf + len, 0, minPacketSize - len);
+        writelen = minPacketSize;
+    } else {
+        buf = new char [len];
+        writelen = len;
+        freeBuf = true;
+    }
+    XQSERVICE_DEBUG_PRINT("writelen: %d", writelen);
+    XQServicePacketHeader *header = (XQServicePacketHeader *)buf;
+    header->command = cmd;
+    header->totalLength = len;
+    header->chLength = ch.length();
+    header->msgLength = 0;
+    header->dataLength = 0;
+    char *ptr = buf + sizeof(XQServicePacketHeader);
+    memcpy(ptr, ch.constData(), ch.length() * 2);
+    QByteArray sndBuf(buf,writelen);
+    XQSERVICE_DEBUG_PRINT("sndBuf: %s", sndBuf.constData());
+	
+    bool ret = serviceIpc->sendSync("sendChannelCommand",sndBuf);   
+    
+    if (freeBuf)
+        delete[] buf;
+    
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::sendChannelCommand: ret=%d", ret);
+    return ret;
+}
+
+bool XQServiceIpcClient::send(const QString& ch, 
+                              const QString& msg, 
+                              const QByteArray& data, 
+                              QByteArray &retData, 
+                              int cmd)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::send, isServer?=%d", server);
+    
+    // Attension. The 'ch' name may contain unique session identifier to separate requests going
+    // the same channel. Before real IPC calls need to get the normalized channel name.
+    // The 'mIpcConName' contains the same session identifier to separate connections using the same
+    // channel name.
+    QString channel = XQRequestUtil::channelName(ch);
+    
+    XQSERVICE_DEBUG_PRINT("\tchannel: %s, msg: %s", qPrintable(channel), qPrintable(msg));
+    XQSERVICE_DEBUG_PRINT("\tdata: %s, cmd: %d", data.constData(), cmd);
+    
+    XQService::serviceThreadData()->setLatestError(KErrNone);
+    if (!connectToServer()){
+        XQSERVICE_DEBUG_PRINT("\tCouldn't connect to the server");
+        return false;
+	}
+
+#ifdef QT_S60_AIW_PLUGIN
+    if (plugin) {     
+        QVariant ret=XQServiceChannel::sendLocally(channel, msg, data);     
+        retData = XQServiceThreadData::serializeRetData(ret, XQService::serviceThreadData()->latestError());
+        return true;
+        }
+#endif
+    int len = channel.length() * 2 + msg.length() * 2 + data.length();
+    len += sizeof(XQServicePacketHeader);
+    XQSERVICE_DEBUG_PRINT("\tcmd: %d", len);
+    int writelen;
+    char *buf;
+    bool freeBuf = false;
+    if (len <= minPacketSize) {
+        buf = outBuffer;
+        memset(buf + len, 0, minPacketSize - len);
+        writelen = minPacketSize;
+    } else {
+        buf = new char [len];
+        writelen = len;
+        freeBuf = true;
+    }
+    XQSERVICE_DEBUG_PRINT("\twritelen: %d", writelen);
+    XQServicePacketHeader *header = (XQServicePacketHeader *)buf;
+    header->command = cmd;
+    header->totalLength = len;
+    header->chLength = channel.length();
+    header->msgLength = msg.length();
+    header->dataLength = data.length();
+    char *ptr = buf + sizeof(XQServicePacketHeader);
+    memcpy(ptr, channel.constData(), channel.length() * 2);
+    ptr += channel.length() * 2;
+    memcpy(ptr, msg.constData(), msg.length() * 2);
+    ptr += msg.length() * 2;
+    memcpy(ptr, data.constData(), data.length());
+    QByteArray sndBuf(buf,writelen);
+    XQSERVICE_DEBUG_PRINT("\tsndBuf: %s", sndBuf.constData());
+    bool ret = true;
+    XQSERVICE_DEBUG_PRINT("\tsynchronous: %d", synchronous);
+    
+    if (synchronous) {
+       
+        ret=serviceIpc->sendSync("send",sndBuf);
+        if (ret) {
+            retData=serviceIpc->readAll();
+            XQSERVICE_DEBUG_PRINT("\t readAll done, error=%d", XQService::serviceThreadData()->latestError());
+            if (!XQService::serviceThreadData()->latestError())
+            {
+                // No point to send channel command on error. Error could be also
+                // caused by server exit without completing the actual request
+                sendChannelCommand(XQServiceCmd_ReturnValueDelivered,channel);
+            }
+            else
+                ret = false;
+        }
+    }
+    else {
+        // At the moment we can not have multiple send async 
+        if (serviceIpc->requestPending()) {
+            XQSERVICE_DEBUG_PRINT("Request already pending");
+            XQService::serviceThreadData()->setLatestError(ServiceFwIPC::ERequestPending);  // maparnan
+            ret = false ;
+        }
+        else {
+            serviceIpc->sendAsync("send",sndBuf);
+            ret = true;
+        }
+    }
+    if (freeBuf)
+        delete[] buf;
+    XQSERVICE_DEBUG_PRINT("\tret: %d", ret);
+    return ret;
+}
+
+
+/*!
+ * This method cancels requests.
+ */
+bool XQServiceIpcClient::cancelPendingSend(const QString& ch)
+{
+    Q_UNUSED(ch);  // 
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::cancelPendingSend, isServer?=%d", server);
+    if (serviceIpc) {
+        // Close the client connection silently
+        disconnect(serviceIpc, SIGNAL(error(int)), this, SLOT(clientError(int)));
+        XQService::serviceThreadData()->closeClientConnection(mIpcConName);
+        // No callback wanted any more
+        callBackRequestComplete = NULL;
+    }
+
+    return true;
+}
+
+void XQServiceIpcClient::disconnected()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::disconnected START");
+    XQSERVICE_DEBUG_PRINT("\t server: %d, lastId=%d", server, lastId);
+    if (server) {
+        // Closing down IPC
+        ServiceIPCRequest* request = NULL;
+
+        //
+        // Go through all requests and send disconnected error to them
+        //
+        QHashIterator<int, ServiceIPCRequest*> iter(requestsMap);
+        while (iter.hasNext()) {
+            iter.next();
+            int reqId = iter.key();
+            request=iter.value();
+            XQSERVICE_DEBUG_PRINT("\t request iter: id=%d", reqId);
+            XQSERVICE_DEBUG_PRINT("\t request iter requestAsync=%d", request->isAsync());
+            if (request->isAsync()) {
+                QVariant ret;
+                // Consider server side end as connection closure.
+                XQService::serviceThreadData()->setLatestError(ServiceFwIPC::EConnectionClosed);
+                completeRequest(reqId, ret);
+                // In disconnnect phase let's wait a bit in order to be sure 
+                // That completeRequest and application exit notification event goes in the client side
+                wait(200);
+            }
+        }
+        if (serviceIpcServer) {
+            serviceIpcServer->disconnect();
+            delete serviceIpcServer;
+            serviceIpcServer = NULL;
+            XQSERVICE_DEBUG_PRINT("\tXQServiceIpcClient deleteLater");
+            wait(200);
+            XQSERVICE_DEBUG_PRINT("\tXQServiceIpcClient deleteLater over");
+        }
+    } else {
+        if (sendSyncLoop && sendSyncLoop->isRunning()) {
+            XQSERVICE_DEBUG_PRINT("Quit sendSyncLoop");
+            sendSyncLoop->quit();
+        }
+        if (serviceIpc) {
+            XQSERVICE_DEBUG_PRINT("Disconnect serviceIpc");
+            serviceIpc->disconnect();
+            delete serviceIpc;
+            serviceIpc = NULL;
+        }
+    }
+    deleteLater();
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::disconnected END");
+}
+
+void XQServiceIpcClient::clientError(int error)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::clientError, isServer?=%d", server);
+    XQSERVICE_DEBUG_PRINT("error: %d", error);
+
+    
+    if (serviceIpc) {
+        XQService::serviceThreadData()->setLatestError(error);
+        disconnect(serviceIpc, SIGNAL(error(int)), this, SLOT(clientError(int)));
+        //disconnected();
+        XQService::serviceThreadData()->closeClientConnection(mIpcConName);
+    }
+    
+    //complete the client request with error value
+    if (callBackRequestComplete) {
+        XQSERVICE_DEBUG_PRINT("requestErrorAsync mapped error=%d", error);
+       callBackRequestComplete->requestErrorAsync(error);
+    }       
+    XQSERVICE_DEBUG_PRINT("clientError end mapped error=%d", error);
+}
+
+/**
+* Async read operation
+*/
+
+void XQServiceIpcClient::readyRead()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::readyRead, isServer?=%d", server);
+
+    // Clear error
+    XQService::serviceThreadData()->setLatestError(KErrNone);
+    
+    //in case it has been connected before
+    //this prevents calling twice of the callback functions
+    disconnect(serviceIpc, SIGNAL(ReadDone()), this, SLOT(readDone()));
+    connect(serviceIpc, SIGNAL(ReadDone()), this, SLOT(readDone()));
+	serviceIpc->readAll( iRetData );
+}
+
+
+/**
+* readDone, send return value back to client
+*/
+void XQServiceIpcClient::readDone()
+    {
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::readDone");
+    QVariant retValue = XQServiceThreadData::deserializeRetData(iRetData);
+
+#ifdef XQSERVICE_DEBUG
+    QString s = retValue.toString();
+    int len=s.length();
+    XQSERVICE_DEBUG_PRINT("retValue: type=%s,len=%d,value(max.1024)=%s",
+                          retValue.typeName(),len,qPrintable(s.left(1024)));
+#endif
+    int err = XQService::serviceThreadData()->latestError();
+    XQSERVICE_DEBUG_PRINT("err: %d", err);
+
+    if (err)
+        {
+        XQSERVICE_DEBUG_PRINT("there is error!");
+        //emitError(err);
+        clientError(err);
+        }
+    else if (iRetData.length())
+        {
+        XQSERVICE_DEBUG_PRINT("there is return data");
+        if (callBackRequestComplete && 
+//         !retValue.isNull() && (retValue.type() != QVariant::Invalid))  maparnan
+           retValue.isValid())
+            {
+            XQSERVICE_DEBUG_PRINT("before compelete async request");
+            
+            //should this send before compete the request ?
+            //Attention ! Map mIpcConName name may contain unique identifier to separate connections using the same
+            //            channel name. So need to get channel name.
+            QString channel = XQRequestUtil::channelName(mIpcConName);
+            sendChannelCommand(XQServiceCmd_ReturnValueDelivered, channel);
+            
+            callBackRequestComplete->requestCompletedAsync( retValue );
+            XQSERVICE_DEBUG_PRINT("After complete async request");
+            }        
+        else
+            {
+            clientError( KErrUnknown );
+            }
+        //attention at the moment channel name and connection name are the same
+        // it might be that in the future will be different then this is not valid anymore.
+        //sendChannelCommand(XQServiceCmd_ReturnValueDelivered,mIpcConName);
+        }
+    else
+        {
+        //err is KErrNone but no return value
+        //reading failed 
+        clientError( KErrUnknown );
+        }
+    }
+
+
+int XQServiceIpcClient::setCurrentRequest(ServiceIPCRequest* request)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::setCurrentRequest START");
+    XQSERVICE_DEBUG_PRINT("\t isServer=%d", server);
+    int id = -1;
+    if (request) {
+        lastId = lastId + 1;
+        XQSERVICE_DEBUG_PRINT("\t new id=%d assigned to current request", lastId);
+        request->setAsync(false);
+        request->setId(lastId);
+        requestsMap.insert(lastId, request);
+        id = lastId;
+    } else {
+        XQSERVICE_DEBUG_PRINT("\t request was NULL");
+    }
+    XQSERVICE_DEBUG_PRINT("\t returning id=%d", id);
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::setCurrentRequest END");
+    return id;
+}
+
+//
+// This function need to be called during a slot call before returning from
+// the slot.
+// The lastId might change after returning from the slot call as
+// other possible requests may arrive
+//
+int XQServiceIpcClient::setCurrentRequestAsync()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::setCurrentRequestAsync");
+    XQSERVICE_DEBUG_PRINT("\t isServer=%d", server);
+    ServiceIPCRequest* request = requestPtr(lastId);
+    int id = -1;
+
+    if (request) {
+        request->setAsync(true);
+        id = request->id();
+    }
+    
+    XQSERVICE_DEBUG_PRINT("\t returning request's id=%d", id);
+    return id;
+}
+
+bool XQServiceIpcClient::completeRequest(int index, const QVariant& retValue)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::completeRequest START");
+    XQSERVICE_DEBUG_PRINT("\t isServer=%d", server);
+    XQSERVICE_DEBUG_PRINT("\t index=%d", index);
+#ifdef XQSERVICE_DEBUG
+    QString s = retValue.toString();
+    int len=s.length();
+    XQSERVICE_DEBUG_PRINT("retValue: type=%s,len=%d,value(max.1024)=%s",
+                          retValue.typeName(),len,qPrintable(s.left(1024)));
+#endif
+
+    ServiceIPCRequest* request = requestPtr(index);
+    if (!request){
+        XQSERVICE_DEBUG_PRINT("\t request = NULL");
+        XQSERVICE_DEBUG_PRINT("\t return false");
+        XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::completeRequest END (1)");
+        return false;
+    }
+#ifdef QT_S60_AIW_PLUGIN
+    if (plugin) {
+        if (callBackRequestComplete && 
+                !retValue.isNull() && (retValue.type() != QVariant::Invalid))
+                {
+                callBackRequestComplete->requestCompletedAsync(retValue);
+                }        
+        XQSERVICE_DEBUG_PRINT("\t return true");
+        XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::completeRequest END (2)");
+        return true;
+    }
+#endif    
+    QByteArray array = XQServiceThreadData::serializeRetData(retValue,
+                            XQService::serviceThreadData()->latestError() );
+    XQSERVICE_DEBUG_PRINT("\t array: %s", array.constData());
+    XQService::serviceThreadData()->setLatestError(KErrNone);
+    request->write(array);
+    bool ret = request->completeRequest();
+    // cancelRequest(request);
+    XQSERVICE_DEBUG_PRINT("\t return %d", ret);
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::completeRequest END (3)");
+    return ret;
+}
+
+
+//
+// This function need to be called during a slot call before returning from
+// the slot.
+// The lastId might change after returning from the slot call as
+// other possible requests may arrive
+//
+XQRequestInfo XQServiceIpcClient::requestInfo() const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::requestInfo");
+    XQSERVICE_DEBUG_PRINT("\t isServer=%d", server);
+    ServiceIPCRequest* request = requestPtr(lastId);
+    
+    if (request) {
+        return request->requestInfo();
+    } 
+    return XQRequestInfo();
+}
+
+//
+// This internal function need to be called before a slot call to set the request info
+// The provider can then call requestInfo() to get the data.
+// The lastId might change after returning from the slot call as
+// other possible requests may arrive
+//
+bool XQServiceIpcClient::setRequestInfo(XQRequestInfo &info)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::setRequestInfo");
+    XQSERVICE_DEBUG_PRINT("\t isServer=%d", server);
+    ServiceIPCRequest* request = requestPtr(lastId);
+
+    if (request) {
+        request->setRequestInfo(&info);
+    } 
+    return request != NULL;
+}
+
+
+// in disconnnect phase let's wait a bit in order to be sure 
+// that completeRequest and application exit notification event goes in the client side
+void XQServiceIpcClient::wait(int msec)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::wait, isServer?=%d", server);
+
+    if (server)
+        return;
+
+    User::After(1000 * msec); //Contribution from Seppo
+
+    /*
+    if (!QCoreApplication::instance())
+    {
+        User::After(1000 * msec); //Contribution from Seppo
+        return;
+    }
+
+    QTime t1 = QTime::currentTime();
+    QEventLoop w = QEventLoop();
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::wait start");
+    QTimer::singleShot(msec, &w, SLOT(quit()));
+    w.exec();
+    QTime t2 = QTime::currentTime();
+    XQSERVICE_DEBUG_PRINT("XQServiceIpcClient::wait end elapsed=%d", t1.msecsTo(t2));
+    */
+}
+
+//
+// Returns the handle of the current request
+//
+ServiceIPCRequest *XQServiceIpcClient::requestPtr(int index) const
+{
+    ServiceIPCRequest* request = NULL;
+
+    // If request is being cancelled (saved by handleCancelRequest()) use it's id instead
+    // By that way service provider can access the XQRequestInfo of the cancelled request
+    // Upon handling clientDisconnected
+    if (cancelledRequest)
+    {
+        index = cancelledRequest->id();
+        XQSERVICE_DEBUG_PRINT("\t Cancelled request id=%d", index);
+    }
+    
+    if (requestsMap.contains(index)) {
+        XQSERVICE_DEBUG_PRINT("\t request having id=%d FOUND", index);
+        request = requestsMap[index];
+    } else {
+        XQSERVICE_DEBUG_PRINT("\t request having id=%d NOT FOUND", index);
+    }
+    
+    return request;
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqserviceipcclient.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef XQSERVICECLIENT_H
+#define XQSERVICECLIENT_H
+
+#include <QtCore/qobject.h>
+
+#include <xqserviceipcobserver.h>
+#include <xqrequestinfo.h>
+
+namespace QtService {
+class MServiceIPCObserver;
+class ServiceIPCRequest;
+class ServiceFwIPCServer;
+class ServiceFwIPC;
+}
+using namespace QtService;
+
+#include <QtCore/qshareddata.h>
+#include <QtCore/qregexp.h>
+
+class QEventLoop;
+class XQServiceChannel;
+class XQServiceRequestCompletedAsync;
+class XQServiceProvider;
+
+#define	XQServiceCmd_Send		        	1
+#define XQServiceCmd_ReturnValueDelivered   2
+
+class XQServiceIpcClient : public QObject,
+                           public MServiceIPCObserver
+{
+    Q_OBJECT
+public:
+    XQServiceIpcClient(const QString& ipcConName, bool isServer, 
+                       bool isSync, XQServiceRequestCompletedAsync* rc,
+                       const void *userData);
+    ~XQServiceIpcClient();
+
+    bool listen();
+    bool connectToServer();
+
+    bool sendChannelCommand(int cmd, const QString& ch);
+    bool send(const QString& ch, const QString& msg, const QByteArray& data, QByteArray &retData,
+              int cmd = XQServiceCmd_Send);
+    bool cancelPendingSend(const QString& ch);
+    
+    bool isServer() const { return server; }
+
+    int setCurrentRequest(ServiceIPCRequest* request);
+    int setCurrentRequestAsync();
+    bool completeRequest(int index, const QVariant& retValue);
+    bool cancelRequest(ServiceIPCRequest* request);
+    XQRequestInfo requestInfo() const;
+    bool setRequestInfo(XQRequestInfo &info);
+    
+signals:
+
+public slots:
+    void disconnected();
+    
+private slots:
+    // ServiceFwIPC error
+    void clientError(int);
+    void readyRead();
+    void readDone();
+    
+private: // from MServiceIPCObserver
+    bool handleRequest(ServiceIPCRequest *aRequest);
+    void handleCancelRequest(ServiceIPCRequest* aRequest);
+    void handleDeleteRequest(ServiceIPCRequest* aRequest);
+    bool isEmbedded();
+    
+private:    
+    void wait(int msec);
+    ServiceIPCRequest *requestPtr(int index) const; 
+    
+private:
+    bool server;
+    bool synchronous;
+    int retryCount;
+    
+    QEventLoop* sendSyncLoop;
+
+    QString mIpcConName ;
+
+    ServiceIPCRequest* cancelledRequest; 
+    
+    ServiceFwIPC* serviceIpc;
+    ServiceFwIPCServer* serviceIpcServer;    
+    
+    static const int minPacketSize = 256;
+    static const int retryToServerMax = 50;
+    
+    char outBuffer[minPacketSize];
+    XQServiceRequestCompletedAsync* callBackRequestComplete;
+    QObject* plugin;
+    XQServiceProvider* localProvider;
+	
+	QByteArray iRetData;
+    const void *mUserData;
+    
+    int lastId;
+    QHash<int, ServiceIPCRequest*> requestsMap;
+    
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqserviceipcmarshal.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,209 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqserviceipcmarshal.h"
+
+/*!
+    \file xqserviceipcmarshal.h
+*/
+
+/*!
+    \def Q_DECLARE_USER_METATYPE_NO_OPERATORS(TYPE)
+
+    This macro declares \a TYPE as a user-defined type within the Qt
+    metatype system. It should be used in header files, just after
+    the declaration of TYPE. A corresponding invocation of
+    Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(TYPE) should appear in
+    a source file. This macro should be used instead of
+    Q_DECLARE_USER_METATYPE when no need to declare datastream operators.
+    
+    This example declares the class MyClass that doesn't need to declare
+    datastream operators:
+    
+    \code
+        Q_DECLARE_USER_METATYPE(MyClass)
+    \endcode
+    
+    \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
+*/
+
+/*!
+    \def Q_DECLARE_USER_METATYPE(TYPE)
+
+    This macro declares \a TYPE as a user-defined type within the
+    Qt metatype system.  It should be used in header files, just
+    after the declaration of \a TYPE.  A corresponding invocation
+    of Q_IMPLEMENT_USER_METATYPE should appear in a source file.
+
+    This example declares the class \c{MyClass}:
+
+    \code
+        Q_DECLARE_USER_METATYPE(MyClass)
+    \endcode
+
+    \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
+*/
+
+/*!
+    \def Q_DECLARE_USER_METATYPE_TYPEDEF(TAG,TYPE)
+
+    This macro declares \a TYPE as a user-defined type within the
+    Qt metatype system, but declares it as a typedef for a pre-existing
+    metatype.  The \a TAG is an identifier that will usually be the same
+    as \a TYPE, but may be slightly different if \a TYPE is nested.
+    For example, if \a TYPE is \c{Foo::Bar}, then \a TAG should be
+    \c{Foo_Bar} to make it a valid identifier.
+
+    This macro should be used in header files, just after the declaration
+    of \a TYPE.  A corresponding invocation of
+    Q_IMPLEMENT_USER_METATYPE_TYPEDEF should appear in a source file.
+
+    This example declares the types \c{Foo} and \c{Bar} as typedef aliases.
+
+    \code
+        typedef Foo Bar;
+        Q_DECLARE_USER_METATYPE(Foo)
+        Q_DECLARE_USER_METATYPE_TYPEDEF(Bar, Bar)
+    \endcode
+
+    \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
+*/
+
+/*!
+    \def Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(TYPE)
+
+    This macro implements the code necessary to register \a TYPE as a user-defined
+    type within the Qt metatype system.
+    
+    This example implements the registration, logic for the class MyClass that
+    doesn't need to declare datastream operators:
+    
+    \code
+        Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(MyClass)
+    \endcode
+    
+    On most systems, this macro will arrange for registration to be performed at program
+    startup. On systems that don't support global constructors properly, it may be
+    necessary to manually call Q_REGISTER_USER_METATYPE().
+
+    \sa Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_DECLARE_METATYPE(), Q_REGISTER_USER_METATYPE()
+*/
+
+/*!
+    \def Q_DECLARE_USER_METATYPE_ENUM(TYPE)
+
+    This macro declares \a TYPE as a user-defined enumerated type within
+    the Qt metatype system.  It should be used in header files, just
+    after the declaration of \a TYPE.  A corresponding invocation
+    of Q_IMPLEMENT_USER_METATYPE_ENUM should appear in a source file.
+
+    This example declares the enumerated type \c{MyEnum}:
+
+    \code
+        Q_DECLARE_USER_METATYPE_ENUM(MyEnum)
+    \endcode
+
+    This macro differs from Q_DECLARE_USER_METATYPE in that it explicitly
+    declares datastream operators for the type.
+
+    \sa Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_DECLARE_METATYPE(), Q_REGISTER_USER_METATYPE()
+*/
+
+/*!
+    \def Q_IMPLEMENT_USER_METATYPE(TYPE)
+
+    This macro implements the code necessary to register \a TYPE
+    as a user-defined type within the Qt metatype system.
+
+    This example implements the registration logic for the class \c{MyClass}:
+
+    \code
+        Q_IMPLEMENT_USER_METATYPE(MyClass)
+    \endcode
+
+    On most systems, this macro will arrange for registration to be
+    performed at program startup.  On systems that don't support
+    global constructors properly, it may be necessary to manually
+    call Q_REGISTER_USER_METATYPE().
+
+    \sa Q_DECLARE_USER_METATYPE(), Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
+*/
+
+/*!
+    \def Q_IMPLEMENT_USER_METATYPE_TYPEDEF(TAG,TYPE)
+
+    This macro implements the code necessary to register \a TYPE
+    as a user-defined typedef alias within the Qt metatype system.
+    The \a TAG should be the same as the tag used in the
+    corresponding invocation of Q_DECLARE_USER_METATYPE_TYPEDEF.
+
+    This example implements the registration logic for the typedef'ed
+    types \c{Foo} and \c{Bar}:
+
+    \code
+        typedef Foo Bar;
+        Q_IMPLEMENT_USER_METATYPE(Foo)
+        Q_IMPLEMENT_USER_METATYPE_TYPEDEF(Bar, Bar)
+    \endcode
+
+    On most systems, this macro will arrange for registration to be
+    performed at program startup.  On systems that don't support
+    global constructors properly, it may be necessary to manually
+    call Q_REGISTER_USER_METATYPE().
+
+    \sa Q_DECLARE_USER_METATYPE(), Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE()
+*/
+
+/*!
+    \def Q_IMPLEMENT_USER_METATYPE_ENUM(TYPE)
+
+    This macro implements the code necessary to register \a TYPE
+    as a user-defined type within the Qt metatype system.  \a TYPE
+    is assumed to be an enumerated type.  Using this macro relieves
+    the need to manually declare \c{operator<<} and \c{operator>>}
+    for the enumerated type.  Non-enumerated types should use
+    Q_IMPLEMENT_USER_METATYPE() instead.
+
+    This example implements the registration logic for the type \c{MyEnum}:
+
+    \code
+        Q_IMPLEMENT_USER_METATYPE_ENUM(MyEnum)
+    \endcode
+
+    On most systems, this macro will arrange for registration to be
+    performed at program startup.  On systems that don't support
+    global constructors properly, it may be necessary to manually
+    call Q_REGISTER_USER_METATYPE().
+
+    \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_DECLARE_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE(), Q_REGISTER_USER_METATYPE()
+*/
+
+/*!
+    \def Q_REGISTER_USER_METATYPE(TYPE)
+
+    This macro can be called as a function to manually register \a TYPE
+    as a user-defined type within the Qt metatype system.  It is only
+    needed if the system does not support global constructors properly.
+
+    \sa Q_DECLARE_USER_METATYPE(), Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM()
+*/
+
+Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(QUuid)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqserviceipcmarshal.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef XQSERVICEIPCMARSHAL_H
+#define XQSERVICEIPCMARSHAL_H
+
+#include <xqserviceglobal.h>
+
+#include <qvariant.h>
+#include <qmetatype.h>
+#include <qdatastream.h>
+#include <qatomic.h>
+#include <quuid.h>
+
+/// @cond
+/*!
+    Excluded from documentation.
+*/
+
+template <typename T>
+struct QMetaTypeRegister
+{
+    static int registerType() { return 1; }
+};
+
+/// @endcond
+
+#ifdef Q_CC_GNU
+# define _QATOMIC_ONCE() do {} while(0)
+#else
+# define _QATOMIC_ONCE()                \
+    static QAtomicInt once;             \
+    if ( once.fetchAndStoreOrdered(1) ) \
+        return 1
+#endif
+
+#define Q_DECLARE_USER_METATYPE_NO_OPERATORS(TYPE) \
+    Q_DECLARE_METATYPE(TYPE) \
+    template<> \
+    struct QMetaTypeRegister< TYPE > \
+    { \
+        static int registerType() \
+        { \
+            _QATOMIC_ONCE(); \
+            int id = qMetaTypeId( reinterpret_cast<TYPE *>(0) ); \
+            if ( id >= static_cast<int>(QMetaType::User) ) \
+                qRegisterMetaTypeStreamOperators< TYPE >( #TYPE ); \
+            return 1; \
+        } \
+        static int __init_variable__; \
+    };
+
+#define Q_DECLARE_USER_METATYPE(TYPE) \
+    Q_DECLARE_USER_METATYPE_NO_OPERATORS(TYPE) \
+    QDataStream &operator<<(QDataStream &stream, const TYPE &var); \
+    QDataStream &operator>>( QDataStream &stream, TYPE &var );
+
+#define Q_DECLARE_USER_METATYPE_TYPEDEF(TAG,TYPE)       \
+    template <typename T> \
+    struct QMetaTypeRegister##TAG \
+    { \
+        static int registerType() { return 1; } \
+    }; \
+    template<> struct QMetaTypeRegister##TAG< TYPE > { \
+        static int registerType() { \
+            _QATOMIC_ONCE(); \
+            qRegisterMetaType< TYPE >( #TYPE ); \
+            qRegisterMetaTypeStreamOperators< TYPE >( #TYPE ); \
+            return 1; \
+        } \
+        static int __init_variable__; \
+    };
+
+#define Q_DECLARE_USER_METATYPE_ENUM(TYPE)      \
+    Q_DECLARE_USER_METATYPE(TYPE)
+
+#define Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(TYPE) \
+    int QMetaTypeRegister< TYPE >::__init_variable__ = \
+        QMetaTypeRegister< TYPE >::registerType();
+
+#define Q_IMPLEMENT_USER_METATYPE(TYPE) \
+    QDataStream &operator<<(QDataStream &stream, const TYPE &var) \
+    { \
+        var.serialize(stream); \
+        return stream; \
+    } \
+    \
+    QDataStream &operator>>( QDataStream &stream, TYPE &var ) \
+    { \
+        var.deserialize(stream); \
+        return stream; \
+    } \
+    Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(TYPE)
+
+#define Q_IMPLEMENT_USER_METATYPE_TYPEDEF(TAG,TYPE)     \
+    int QMetaTypeRegister##TAG< TYPE >::__init_variable__ = \
+        QMetaTypeRegister##TAG< TYPE >::registerType();
+
+#define Q_IMPLEMENT_USER_METATYPE_ENUM(TYPE)    \
+    QDataStream& operator<<( QDataStream& stream, const TYPE &v ) \
+    { \
+        stream << static_cast<qint32>(v); \
+        return stream; \
+    } \
+    QDataStream& operator>>( QDataStream& stream, TYPE& v ) \
+    { \
+        qint32 _v; \
+        stream >> _v; \
+        v = static_cast<TYPE>(_v); \
+        return stream; \
+    } \
+    Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(TYPE)
+
+#define Q_REGISTER_USER_METATYPE(TYPE)  \
+    QMetaTypeRegister< TYPE >::registerType()
+
+
+Q_DECLARE_USER_METATYPE_NO_OPERATORS(QUuid)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqserviceprovider.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,758 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <xqserviceprovider.h>
+#include <qmetaobject.h>
+#include <QByteArray>
+
+#include <xqserviceadaptor.h>
+//#include <xqserviceservice.h>
+#include <xqserviceutil.h>
+
+/*!
+    \class ServiceAdaptorProxy
+    \brief Proxy class for converting signal and slot members into IPC message names
+*/
+class ServiceAdaptorProxy : public XQServiceAdaptor
+{
+    Q_OBJECT
+
+public:
+    ServiceAdaptorProxy(const QString &channel, QObject *parent=0);
+    virtual ~ServiceAdaptorProxy() ;
+    
+    QString memberToMessage( const QByteArray& member );
+};
+
+ServiceAdaptorProxy::ServiceAdaptorProxy(const QString &channel, QObject *parent) :
+        XQServiceAdaptor(channel, parent) 
+{
+    XQSERVICE_DEBUG_PRINT("ServiceAdaptorProxy::ServiceAdaptorProxy");
+    XQSERVICE_DEBUG_PRINT("channel: %s", qPrintable(channel));
+}
+
+ServiceAdaptorProxy::~ServiceAdaptorProxy()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceAdaptorProxy::~ServiceAdaptorProxy");
+}
+
+QString ServiceAdaptorProxy::memberToMessage( const QByteArray& member )
+{
+    XQSERVICE_DEBUG_PRINT("ServiceAdaptorProxy::memberToMessage");
+    XQSERVICE_DEBUG_PRINT("member: %s", member.constData());
+// TO BE CHECKED
+//    return m_channel + "::" + XQServiceAdaptor::memberToMessage( member );
+    return XQServiceAdaptor::memberToMessage( member );
+}
+
+/*!
+    \class XQServiceProvider_Private
+    \inpublicgroup QtBaseModule
+
+    \brief Private implementation of XQServiceProvider
+*/
+class XQServiceProvider_Private
+{
+public:
+    XQServiceProvider_Private(const QString &service);
+
+    ~XQServiceProvider_Private();
+    
+    XQServiceAdaptor *m_adaptor;
+
+    QString m_service;
+    bool m_publishAllCalled;
+    QObject* plugin;
+};
+
+XQServiceProvider_Private::XQServiceProvider_Private(const QString &service) :
+        m_adaptor(NULL),
+        m_service(service),
+        m_publishAllCalled(false),
+		plugin(NULL)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceProvider_Private::XQServiceProvider_Private");
+    XQSERVICE_DEBUG_PRINT("service: %s", qPrintable(service));
+    m_adaptor = new ServiceAdaptorProxy(service);
+}
+
+XQServiceProvider_Private::~XQServiceProvider_Private()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceProvider_Private::~XQServiceProvider_Private");
+    delete m_adaptor;
+}
+
+/*!
+    \class XQServiceProvider
+    \inpublicgroup QtBaseModule
+
+    \brief The XQServiceProvider class provides an interface to messages on a XQService service
+    which simplifies remote slot invocations
+
+    Service messages consist of a service name, a message name, and a list of parameter values.
+    Qt extension dispatches service messages to the applications associated with the service
+    name, on the application's \c{QPE/Application/appname} channel, where
+    \c{appname} is the application's name.
+
+    <b>Service registration</b> \n
+    Service provider need to register it's service into the system before they can be used by
+    the service client. Registration is done by creating a XML formatted service configuration
+    file and defining the service in the provider's .pro-file. QMake will notice service provider
+    from the .pro-file, with help of the service.prf file, and generate a make file that uses
+    a helper application xqsreg.exe. The helper application sqsreg.exe will generate an application
+    registration resource file ( _reg.rss) from the configuration-file and provider's definitions
+    that include the needed declarations for the services provided.
+    
+    <b>Service Names Allocation</b> \n
+    The harmonize service and interface names the Symba specific names and guidelines can be found
+    from http://s60wiki.nokia.com/S60Wiki/QtFw_for_S60_coding_conventions/Service_name_registry#Service.
+
+    Before implementing a service you need to allocate the name according to the guidelines. Please
+    inform intended service clients (customers) and matti.parnanen@nokia.com.
+    
+    <b>Service Configuration File</b> \n
+    All the service configuration are added to the run-time service registry to make them available
+    for service discovery and creating service requests.
+    \note Only one service element with multiple interface is supported!
+    
+    To support services a new configuration was introduced to qmake and two new variables for
+    that configuration:
+    
+    \code
+        CONFIG = service
+        service.file = <service configuration file path>
+        service.options = <embeddable> (optional, default not embeddable), <hidden> (optional, default not hidden) 
+    \endcode
+    
+    The fornat of the service configuration file is same as XML format used in Qt Service Framework.
+    Example configuration file:
+    
+    \code
+        <?xml version="1.0" encoding="utf-8" ?>
+        <service>
+            <name>Music Fetcher</name>
+            <filepath>No path</filepath>
+            <description>Music Fetcher</description>
+            <interface>
+                <name><b>com.nokia.symbian.IMusicFetch</b></name>
+                <version>1.0</version>
+                <description>Interface for fetching music files</description>
+            </interface>
+        </service>
+    \endcode
+    
+    \code
+        <ELEMENT service ( name, filepath, description?, interface+ ) >
+        <ELEMENT description ( #CDATA ) >
+        <ELEMENT filepath ( #PCDATA ) >
+        <ELEMENT interface ( '''name''', version, description?, capabilities?, customproperty* ) >
+        <ELEMENT capabilities ( #PCDATA ) >
+        <ELEMENT name ( #PCDATA ) >
+        <ELEMENT version ( #PCDATA ) >
+        <ELEMENT customproperty ( #CDATA ) >
+        <ATTLIST customproperty key NMTOKEN #REQUIRED >
+    \endcode
+    
+    Also the old format described below is supported, With old format you can not have custom properties, which
+    for example are used for AIW purposes.
+    \code
+        <ELEMENT service ( description?, interface+ ) >
+        <ATTLIST service name #CDATA  #REQUIRED >
+        <ATTLIST service filepath #CDATA  #REQUIRED >
+        <ELEMENT description ( #CDATA ) >
+        <ELEMENT interface ( description? ) >
+        <ATTLIST interface '''name''' #CDATA  #REQUIRED >
+        <ATTLIST interface version #CDATA  #REQUIRED >
+        <ATTLIST interface capabilities #CDATA  #REQUIRED >
+    \endcode
+    
+    <b>Changing service or interface names</b> \n
+    Before you think about changing the name of the already released and used service implementation, read this
+    http://s60wiki.nokia.com/S60Wiki/QtFw_for_S60_coding_conventions/Service_name_registry#About_changing_service_or_interface_names
+    first.
+    
+    The basic message is the service name, interface name and operation (message) slot signatures for the API. And for API changes you have to apply development time API deprecation process.
+    
+    <b>Service Registration tools</b> \n
+    The needed utility files for service registration:
+    - xqsreg.exe should be in \epoc32\tools or some other directory that can be found from the path
+    - service.prf should be in \epoc32\tools\qt\mkspecs\features\symbian directory.
+    
+    If necessary you can copy those files to target directories from qthighway/bin.
+    
+    Sources for the xqsreg.exe can be found from the qthighway\xqsreg and it is also possible to compile it.
+        - cd \qthighway\xqsreg
+        - qmake -platform win32-mwc
+        - make
+    
+    Usage: \n
+    How to create a simple synchronously working service provider?
+    \code
+        class YourService : public XQServiceProvider
+            {
+            Q_OBJECT
+
+            public:
+                YourService ( ServiceApp *parent = 0 );
+                ~YourService ();
+
+            public slots:
+                void functionName1(); 
+                int functionName2(const QString& number, int times);
+
+            private:
+                ServiceApp *mServiceApp;
+            };
+    \endcode
+    
+    Implementation:
+    \code
+        YourService::YourService(ServiceApp* parent) 
+        : XQServiceProvider(QLatin1String("yourservice.Interface"), parent), mServiceApp(parent)
+            {
+            publishAll();
+            }
+
+        YourService::~YourService() { } 
+
+        void YourService::functionName1() { } 
+
+        int YourService::functionName2(const QString& number, int times)
+            {
+            int returnValue = 1;
+            return returnValue;
+            }
+    \endcode
+    
+    Additions to .pro-file:
+    \code
+        CONFIG += service
+        SERVICE.FILE = service_conf.xml
+        SERVICE.OPTIONS = embeddable
+        SERVICE.OPTIONS += hidden
+    \endcode
+    
+    Service configuration file (service_conf.xml):
+    \code
+    <?xml version="1.0" encoding="utf-8" ?>
+    <service>
+        <name>yourservice</name>
+        <filepath>No path</filepath>
+        <description>Service description</description>
+        <interface>
+            <name>Interface</name>
+            <version>1.0</version>
+            <description>Interface description</description>
+        </interface>
+    </service>
+    \endcode
+    
+    How to create a simple asynchronously working service provider?
+    Header:
+    \code
+        class YourService : public XQServiceProvider
+        {
+
+        Q_OBJECT
+
+        public:
+            YourService ( ServiceApp *parent = 0 );
+            ~YourService ();
+            void compleAsyncFunction();
+
+        public slots:
+            void functionName1(); 
+            int functionName2(const QString& number, int times);
+
+        private:
+            ServiceApp *mServiceApp;
+            int mAsyncRequestIndex;
+            QVariant mReturnValue;
+         
+        };
+    \endcode
+    
+    Implementation:
+    \code
+        YourService::YourService(ServiceApp* parent) 
+        : XQServiceProvider(QLatin1String("yourservice.Interface"), parent), mServiceApp(parent)
+            {
+            publishAll();
+            }
+
+        YourService::~YourService() { } 
+
+        void YourService::compleAsyncFunction()
+            {
+            completeRequest(mAsyncRequestIndex, mReturnValue);
+            }
+
+        void YourService::functionName1() 
+            { 
+            mAsyncRequestIndex = setCurrentRequestAsync();
+            mReturnValue.setValue(0);
+            } 
+
+        int YourService::functionName2(const QString& number, int times)
+            {
+            mAsyncRequestIndex = setCurrentRequestAsync();
+            mReturnValue.setValue(1);
+            return mReturnValue.toInt();
+            }
+    \endcode
+    
+    <b>Examples:</b> \n
+    The use of XQServiceProvider will be demonstrated using the \c{Time}
+    service.  This has a single message called \c{editTime()} which asks
+    the service to pop up a dialog allowing the user to edit the current time.
+    \code
+    class TimeService : public XQServiceProvider
+    {
+        Q_OBJECT
+    public:
+        TimeService( QObject *parent = 0 );
+
+    public slots:
+        void editTime(QTime time);
+    };
+
+    TimeService::TimeService( QObject *parent )
+        : XQServiceProvider( "Time", parent )
+    {
+        publishAll();
+    }
+    \endcode
+
+    The call to publishAll() causes all public slots within \c{TimeService}
+    to be automatically registered as Service messages.  This can be
+    useful if the service has many message types.
+
+    The client can send a request to the service using QtopiaServiceRequest:
+
+    \code
+    XQServiceRequest req( "Time", "editTime()" );
+    req << QTime::currentTime();
+    req.send();
+    \endcode
+    
+    <b>URI viewer</b> \n
+    This is a simple example for implementing out-of-process scheme handlers.
+    - "http", "https" and are handled via standard QDesktopServices::openUrl() function. 
+       This is fire-and-forget launch. The options are ignored and no control and signals available after the launch.
+    - "appto" is routed to Activity Manager for opening the attached activity.
+      This is fire-and-forget launch. The options are ignored and no control and signals available after the launch.
+    - The "file" scheme is handled as the QFile based create below. 
+      So the com.nokia.symbian.IFileView interface is applied as for the QFile.
+    
+    Service application needs to publish support for:
+    - The common interface "com.nokia.symbian.IUriView", and
+    - The scheme(s), like "testo" in the example below. The custom custom property "schemes" contains one or more schemes as comma separated list (CSV)
+    - The slot "view(QString)" to view the URI
+
+    \code
+        <?xml version="1.0" encoding="utf-8" ?>
+        <service>
+          <name>serviceapp</name>
+          <filepath>No path</filepath>
+          <description>Test service</description>
+          <interface>
+             <name>com.nokia.symbian.IUriView</name>
+             <version>1.0</version>
+             <description>Interface for showing URIs</description>
+             <customproperty key="schemes">testto</customproperty>
+           </interface>
+        </service>
+    \endcode
+    
+    An service application that offers support for a scheme implements the common "UriService" with the pre-defined "view" slot:
+    
+    \code
+        class UriService : public XQServiceProvider
+        {
+            Q_OBJECT
+            public:
+                UriService( ServiceApp *parent = 0 );
+                ~UriService();
+                bool asyncAnswer() {return mAsyncAnswer;}
+                void complete(bool ok);
+                
+            public slots:
+                bool view(const QString& uri);
+                
+            private slots:
+                void handleClientDisconnect();
+
+            private:
+                ServiceApp* mServiceApp;
+                bool mAsyncAnswer;
+                int mAsyncReqId;
+                bool mRetValue;
+        };
+    \endcode
+    
+    Client application accesses the service via the URI:
+    
+    \code
+        // Assume in example we have own scheme "testo" but this can be applied to 
+        // "mailto", etc. standard schemes.
+        //
+        // (As mentioned in the documentation, some schemes are CURRENTLY handled specially,
+        // like "http" scheme uses QDesktopServices::openUrl).  
+        // 
+        QUrl url("testto://authority?param1=value1&param1=value2"); 
+
+        // The difference to the previous example is is how request is created
+        // via application mgr.
+
+        request = mAiwMgr.create(url);
+        if (request == NULL)
+        {
+            // No handlers for the URI
+            return;
+         }
+
+        // Set function parameters
+        QList<QVariant> args;
+        args << uri.toSring();
+        request->setArguments(args);
+
+        // Send the request
+        bool res = request.send();
+        if  (!res) 
+        {
+            // Request failed. 
+            int error = request->lastError();
+            // Handle error
+        }
+
+        // If making multiple requests to same service, you can save the request as member variable
+        // In this example all done.
+        delete request;
+    \endcode
+   
+    <b>File viewer</b> \n
+    As for URis, a service application that support viewing a file with a dedicated MIME-type need to publish support for:
+    - The common interface "com.nokia.symbian.IFileView".
+    - The slot "view(QString)" to view the non-data-caged file by file name.
+    - The slot "view(XQSharable)" to view the data-caged file by sharable file handle.
+    - MIME type list (registered in the .pro file).
+    So there are multiple service applications implementing the same interface.
+    
+    In service provider side you need the following entry in XML:
+    
+    \code
+        <interface>
+            <name>com.nokia.symbian.IFileView</name>
+            <version>1.0</version>
+            <description>Interface for showing Files</description>
+        </interface>
+    \endcode
+    
+    The file viewer application shall offer slots both for viewing filename (QString) and viewing sharable file (XQSharable):
+    
+    \code
+    class FileService : public XQServiceProvider
+    {
+        Q_OBJECT
+        public:
+            FileService( ServiceApp *parent = 0 );
+            ~FileService();
+            bool asyncAnswer() {return mAsyncAnswer;}
+            void complete(bool ok);
+
+        public slots:
+            bool view(QString file);
+            bool view(XQSharableFile file);
+            
+        private slots:
+            void handleClientDisconnect();
+
+        private:
+            ServiceApp* mServiceApp;
+            bool mAsyncAnswer;
+            int mAsyncReqId;
+            bool mRetValue;
+    };
+    \endcode
+    
+    In the .pro file the service publishes the supported MIME types, e.g:
+    
+    \code
+        RSS_RULES += \
+          "datatype_list = " \
+          "      {" \
+          "      DATATYPE" \
+          "          {" \
+          "          priority = EDataTypePriorityNormal;" \
+          "          type = \"text/plain\";" \
+          "          }" \
+          "      };" \
+    \endcode
+    
+    In the client side (see the "examples/appmgrclient" and "examples/serviceapp" included in the QtHighway release) access to
+    file:
+    
+    \code
+        // Not data caged file
+        QFile file("C:\\data\\Others\\test.txt");
+
+        request = mAiwMgr.create(file);
+        if (request == NULL)
+        {
+               // No handlers for the URI
+               return;
+         }
+        // By default operation is "view(QString)"
+
+        // Set function parameters
+        QList<QVariant> args;
+        args << file.fileName();
+        request->setArguments(args);
+
+        // Send the request
+        bool res = request.send();
+        if  (!res) 
+        {
+           // Request failed. 
+          int error = request->lastError();
+
+          // Handle error
+        }
+     
+        // If making multiple requests to same service, you can save the request as member variable
+        // In this example all done.
+        delete request;
+    \endcode
+    
+    <b>Sharable file viewer</b> \n
+    The same rules as for file name based view applies, but different argument type (XQSharableFile) used
+    in request. See the "examples/appmgrclient" and "examples/serviceapp" included in the QtHighway release.
+    
+    \code
+        XQSharableFile sf;
+        // Open the file for sharing from own private  directory
+        // If you have handle available, just set it by "setHandle()" function
+        if (!sf.open("c:\\private\\e0022e74\\test.txt"))
+        {
+            // Failed to open sharable file
+            return;
+        }
+
+        // Create request for the sharable file
+        XQAiwreqiuest req = mAiwMgr.create(sf);
+        if (!req)
+        {
+            // No viewer app found for the file
+            // As we opened the handle, we need to close it !
+            sf.close(); 
+            return;  
+        }
+        // By default operation is "view(XQSharableFile)"
+
+        // Set function parameters
+        // Not only one sharable handle supported,  otherwise upon send EArgumentError error occurs
+        QList<QVariant> args;
+        args << qVariantFromValue(sf);  
+        req->setArguments(args);
+
+        // Send the request
+        bool res = request.send();
+        if  (!res) 
+        {
+            // Request failed. 
+            int error = request->lastError();
+            // Handle error
+        }
+
+        // As we opened the handle, we need to close it !
+        sf.close(); 
+
+        // If making multiple requests to same service, you can save the request as member variable
+        // In this example all done.
+        delete request;
+    \endcode
+    
+    <b> Create interface action </b> \n
+    One interface XML may offer one action to be displayed by client application.
+    See the "examples/appmgrclient" and "examples/hbserviceprovider" included in the QtHighway release.
+    
+    \code
+    HbAction* ShareUiPrivate::fetchServiceAction(XQAiwInterfaceDescriptor interfaceDescriptor)
+        {
+        QDEBUG_WRITE("ShareUiPrivate::fetchServiceAction start");
+        // create the request for each descriptor.
+        
+        XQAiwRequest* request = mAppManager.create(interfaceDescriptor,SELECT_OP,false);
+        QAction action = request->createAction());
+        if (!action)
+            return 0;
+
+        // if Orbit widgets do not support QAction
+        // Need to convert QAction to HbAction first
+        HbAction* hbAction = convertAction(action);
+        if(hbAction)
+            {
+            // Connect triggered signals to enable the request to emit triggered 
+            connect(hbAction, SIGNAL(triggered()), action, SIGNAL(triggered()));
+
+            // connect the request's triggered action to the slot in app
+            connect(request, SIGNAL(triggered()), this, SLOT(onTriggered()));
+            }
+            
+        return hbAction;
+        }
+    \endcode
+    
+    In service provider side you need to have the following entries in XML to be converted to QAction by the create:
+    
+    \code
+        <interface>
+            <name>Dialer></name>
+            <version=1.0</version>
+            <description>Dial interface</description>
+            <customproperty key="aiw_action_text_file">hbserviceprovider</customproperty>
+            <customproperty key="aiw_action_text">txt_aiw_action_text</customproperty>
+        </interface>
+    \endcode
+*/
+
+/*!
+    \fn void XQServiceProvider::returnValueDelivered()
+    
+    This signal is emitted when asynchronous request has been completed and its
+    return value has been delivered to the service client.
+*/
+
+/*!
+    \fn void XQServiceProvider::clientDisconnected()
+    
+    This signal is emitted if client accessing a service application terminates.
+    The counterpart in client side (when service application terminates) is
+    the error XQService::EConnectionClosed.
+*/
+
+/*!
+    Construct a remote service object for \a service and attach it to \a parent.
+    \param service Defines the full service name that is implemented. 
+                   The full service name is:
+                   - The name of the service from the service configuration file
+                   - Character *.* (dot)
+                   - The name of the interface from the service configuration file
+    \param parent Parent of this QObject
+*/
+XQServiceProvider::XQServiceProvider( const QString& service, QObject *parent )
+    : QObject( parent )
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceProvider::XQServiceProvider");
+    XQSERVICE_DEBUG_PRINT("service: %s", qPrintable(service));
+    m_data = new XQServiceProvider_Private(service);
+    connect(m_data->m_adaptor, SIGNAL(returnValueDelivered()), this, SIGNAL(returnValueDelivered())); 
+    connect(m_data->m_adaptor, SIGNAL(clientDisconnected()), this, SIGNAL(clientDisconnected())); 
+}
+
+/*!
+    Destroys this service handling object.
+*/
+XQServiceProvider::~XQServiceProvider()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceProvider::~XQServiceProvider");
+    if (m_data)
+        delete m_data;
+}
+
+
+void XQServiceProvider::SetPlugin(QObject* impl_plugin)
+    {
+    m_data->plugin=impl_plugin;
+    }
+
+
+/*!
+    Publishes all slots on this object within subclasses of XQServiceProvider.
+    This is typically called from a subclass constructor.
+*/
+void XQServiceProvider::publishAll()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceProvider::publishAll");
+	if (!m_data->plugin) {
+	    m_data->m_adaptor->publishAll(this,XQServiceProvider::staticMetaObject.methodCount(),XQServiceAdaptor::Slots);
+	}
+    else {
+        m_data->m_adaptor->publishAll(m_data->plugin, 0, XQServiceAdaptor::Slots);
+    } 
+}
+
+/*!
+    Sets current request to asynchronous mode so that provider can complete the
+    request later via the completeRequest() call.
+    \return Request ID which shall be used in the completeRequest() call.
+    \note There can be several clients accessing the same service at the same time. Avoid saving
+          the index to XQServiceProvider instance as member variable as when another new request
+          comes in, it will have different index and you will potentially override the index of
+          the first request. You should ensure the completeRequest() gets the correct index e.g.
+          by attaching the index as user data to data object maintain a map of indexes based on
+          some key.
+*/
+int XQServiceProvider::setCurrentRequestAsync()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceProvider::setCurrentRequestAsync");
+    return m_data->m_adaptor->setCurrentRequestAsync();
+}
+
+/*!
+    \fn bool XQServiceProvider::completeRequest(int index, const T& retValue)
+    
+    Completes asynchronous request.
+    \param index Defines the index of the asynchronous request to complete. 
+    \param retValue defines the return value for the request.
+    \return true if request could be completed successfully, otherwise false.
+    \sa completeRequest()
+*/
+
+/*!
+    Completes the asynchronous request with the given value
+    \param index Request ID got from the setCurrentRequestAsync call.
+    \param retValue Returned value.
+    \return true on success, false if index points to non-existing request.
+    \note <b>You need to check the return value. </b>
+          If false it means connection to client has been lost and the complete will not ever succeed. 
+          So if you have e.g. a code that quits application using the ReturnValueDelived signal only,
+          that signal will never be emitted as request can not be completed.
+*/
+bool XQServiceProvider::completeRequest(int index, const QVariant& retValue)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceProvider::completeRequest");
+    XQSERVICE_DEBUG_PRINT("index: %d, retValue: %s", index, qPrintable(retValue.toString()));
+    return m_data->m_adaptor->completeRequest(index, retValue);
+}
+
+/*!
+    Return additional request information attached to request
+    \return Request info.
+*/
+XQRequestInfo XQServiceProvider::requestInfo() const
+{
+    return m_data->m_adaptor->requestInfo();
+}
+
+#include "xqserviceprovider.moc"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqserviceprovider.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef XQSERVICEABSTRACTSERVICE_H
+#define XQSERVICEABSTRACTSERVICE_H
+
+#include <xqserviceglobal.h>
+
+#include <qobject.h>
+#include <qstring.h>
+#include <QVariant>
+#include <xqrequestinfo.h>
+
+class XQServiceProvider_Private;
+class XQSERVICE_EXPORT XQServiceProvider : public QObject
+{
+    Q_OBJECT
+public:
+    explicit XQServiceProvider( const QString& service, QObject *parent = 0 );
+    ~XQServiceProvider();
+    void SetPlugin(QObject* impl_plugin);
+
+Q_SIGNALS:
+    void returnValueDelivered() ;
+    void clientDisconnected() ;
+    
+protected:    
+    void publishAll();
+    int setCurrentRequestAsync();
+    bool completeRequest(int index, const QVariant& retValue);
+    XQRequestInfo requestInfo() const;
+
+    template <typename T> 
+    inline bool completeRequest(int index, const T& retValue)
+    {
+        QVariant retValueVariant;        
+        retValueVariant.setValue(retValue);
+        return completeRequest(index, retValueVariant);
+    }
+    
+private:
+    XQServiceProvider_Private *m_data;
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqservicerequest.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,707 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqservicerequest.h"
+#include "xqservicethreaddata.h"
+
+#include "xqservicechannel.h"
+#include "xqserviceadaptor.h"
+#include "xqrequestutil.h"
+#include <QStringList>
+#include <xqservicemanager.h>
+
+/*!
+    \class XQServiceRequest_Private
+    \inpublicgroup QtBaseModule
+
+    \ingroup ipc
+    \brief Private implementation of the XQServiceRequest.
+*/
+
+class XQServiceRequest_Private : public XQServiceRequestCompletedAsync
+{
+public:
+    XQServiceRequest_Private(XQServiceRequest* parent)
+        : mSynchronous(true), mParent(parent),mServiceManager(NULL)
+    {    
+        XQSERVICE_DEBUG_PRINT("XQServiceRequest_Private::XQServiceRequest_Private(1)");
+        
+    };
+
+    XQServiceRequest_Private(const QString& fullServiceName, 
+                             const QString& message, 
+                             const bool &synchronous, 
+                             XQServiceRequest* parent)
+        : mService(fullServiceName), mMessage(message), mSynchronous(synchronous), mParent(parent),mServiceManager(NULL)
+    {    
+        XQSERVICE_DEBUG_PRINT("XQServiceRequest_Private::XQServiceRequest_Private(2)");
+    };
+
+    XQServiceRequest_Private(const XQAiwInterfaceDescriptor &descriptor, 
+                             const QString& message, 
+                             const bool &synchronous, 
+                            XQServiceRequest* parent)
+            : mMessage(message), mSynchronous(synchronous), mParent(parent),mServiceManager(NULL)
+    {
+        XQSERVICE_DEBUG_PRINT("XQServiceRequest_Private::XQServiceRequest_Private(3)");
+        
+        // Construct service name understood by the QtHighway FW
+        // (The descriptor has been created from the  XML)
+        mService = descriptor.serviceName() + "." + descriptor.interfaceName();
+        XQSERVICE_DEBUG_PRINT("XQServiceRequest_Private(3)::service=%s", qPrintable(mService));
+
+        // Remember the descriptor
+        mRequestUtil.mDescriptor = descriptor; 
+    };
+    
+    ~XQServiceRequest_Private();
+    // from XQServiceRequestCompletedAsync
+    void requestCompletedAsync(const QVariant &retValue);
+    void requestErrorAsync(int err);
+    
+    QList<QVariant> mArguments;
+    QString mService;
+    QString mMessage;
+    bool mSynchronous;
+    XQServiceRequest* mParent;
+    XQRequestUtil mRequestUtil;
+    XQServiceManager* mServiceManager;
+    QString mUniqueChannelName;
+    
+};
+
+XQServiceRequest_Private::~XQServiceRequest_Private()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest_Private::~XQServiceRequest_Private");
+    delete mServiceManager;
+};
+
+void XQServiceRequest_Private::requestCompletedAsync(const QVariant &retValue)
+{    
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest_Private::requestCompletedAsync");
+    emit mParent->requestCompleted(retValue);
+}
+
+void XQServiceRequest_Private::requestErrorAsync(int err)
+{    
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest_Private::requestErrorAsync");
+    emit mParent->requestError(err);
+}
+
+/*!
+    \class XQServiceRequest
+    \inpublicgroup QtBaseModule
+
+    \ingroup ipc
+    \brief Allows applications to request services from other applications.
+    
+    The XQServiceRequest class allows applications to request services from other applications.
+    A XQServiceRequest encapsulates a service name and the message to be sent to that service.
+    
+    \note One should be using XQApplicationManager and the related XQAiwRequest instead of XQServiceRequest.
+          The XQApplicationManager and related classes encapsulate basic, target-architecture approved
+          support for out-of-process Application Interworking, e.g. support for launching URLs
+          (including activity URLs), normal files, sharable files, etc. (whatever needed).
+    
+    \b Examples: \n
+    
+    How to create synchronous request without parameters and return value? 
+    \note The full name (yourservice.Interface) need to be used (with dot (.) between service name and interface name).
+    
+    \code
+        XQServiceRequest request("yourservice.<b>Interface</b>", "functionName1()");
+        bool res = request.send();
+        if  (!res) {
+            int error = request.latestError();
+        }
+    \endcode
+    
+    How to create synchronous request with several parameters and return value?
+    
+    \code
+        QString parameter1("+3581234567890");
+        int parameter2 = 3;
+        XQServiceRequest request("yourservice.<b>Interface</b>", "functionName2(QString, int)");
+        request << parameter1;
+        request << parameter2;
+        int returnvalue;
+        bool res = request.send(returnvalue);
+        if  (!res) {
+            int error = request.latestError();
+        }
+    \endcode
+    
+    How to create asynchronous request without return value?
+    
+    \code
+        QString parameter1("+3581234567890");
+        int parameter2 = 3;
+        XQServiceRequest request("yourservice.Interface", "functionName2(QString, int)", false);
+        request << parameter1;
+        request << parameter2;
+        bool res = request.send();
+        if (!res) {
+            int error = request.latestError();
+        }
+    \endcode
+    
+    How to create asynchronous request with return value?
+    
+    \code
+        QString parameter1("+3581234567890");
+        int parameter2 = 3;
+        XQServiceRequest request("yourservice.Interface", "functionName2(QString, int)", false);
+        request << parameter1;
+        request << parameter2;
+        connect(request, SIGNAL(requestCompleted(QVariant)), this, SLOT(requestCompleted(QVariant)));
+        bool res = request.send();
+        if (!res) {
+            int error = request.latestError();
+        }
+
+        ...
+
+        void requestCompleted(const QVariant& value)
+        {
+            int returnvalue = value.toInt();
+        }
+    \endcode
+    
+    How to use declare custom type?
+    
+    Header:
+    \code
+        class CustomType 
+        { 
+        public: 
+            CustomType (){}; 
+            virtual ~CustomType(){};
+
+            QString mString1; 
+            QString mString2; 
+            QUuid mUid;
+
+            template <typename Stream> void serialize(Stream &stream) const; 
+            template <typename Stream> void deserialize(Stream &stream); 
+        };
+
+        Q_DECLARE_USER_METATYPE(CustomType)
+    \endcode
+    
+    Implementation:
+    \code        
+        template <typename Stream> void CustomType::serialize(Stream &s) const 
+            { 
+            s << mString1; 
+            s << mString2; 
+            s << mUid; 
+            }
+
+        template <typename Stream> void CustomType::deserialize(Stream &s) 
+            { 
+            s >> mString1; 
+            s >> mString2; 
+            s >> mUid; 
+            }
+
+        Q_IMPLEMENT_USER_METATYPE(CustomType)
+    \endcode
+    
+    How to declare custom type that doesn't need data stream operators?
+    
+    Header:
+    \code
+        typedef QList<CustomType> CustomTypeList;
+
+        Q_DECLARE_USER_METATYPE_NO_OPERATORS(CustomTypeList)
+    \endcode
+    
+    Implementation:
+    \code
+        Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(CustomTypeList)
+    \endcode
+*/
+
+/*!
+    \fn bool XQServiceRequest::send(T& retValue)
+
+    Sends the request. If the request is synchronous, then client is blocked
+    until service provider completes the request or request fails for some reason.
+    If the request is asynchronous, then client won't be blocked.
+    \param retValue Defines refence to a value service provider will return after service.
+    \return False if there was no application that could service the request, otherwise true.
+*/
+
+/*!
+    \fn XQServiceRequest &XQServiceRequest::operator<< (const T &var)
+
+    Adds \a var to the list of arguments for this service request.
+    \param var Defines the argument value to add to the list of arguments.
+*/
+
+/*!
+    \fn XQServiceRequest &XQServiceRequest::operator<< (const char *var)
+
+    Adds \a var to the list of arguments for this service request.
+    \param var Defines the argument value to add to the list of arguments.
+*/
+
+/*!
+    \fn void XQServiceRequest::requestCompleted(const QVariant& value)
+
+    This signal is emitted when service provider returns a return value asynchronously back to the client.
+    \param value Result of the request.
+*/
+
+/*!
+    \fn void XQServiceRequest::requestError(int err);
+
+    This signal is emitted when error has happened in request handling.
+    \param err Error code as integer value.
+    \sa XQService::ServiceIPCErrors
+*/
+
+/*!
+    \fn void XQServiceRequest::addVariantArg(const QVariant& var)
+
+    Adds the variant value to the list of arguments, so that the variant's
+    value is serialized in send() rather than the variant itself.
+    \param var Value to be added to the list of arguments.
+*/
+
+/*!
+    Construct a null service request.
+    setService() and setMessage() must be called before send(), but the
+    service may be written prior to the calls.
+ */
+XQServiceRequest::XQServiceRequest()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::XQServiceRequest(1)");
+    mData = new XQServiceRequest_Private(this);
+}
+
+/*!
+    Construct a service request that will send \a message to
+    a \a service when send() is called. The service may be written
+    prior to the calls.
+    \param service Defines the full service name to send message. The full name is:
+                   - The name of the service in the service configuration file
+                   - Character *.* (dot)
+                   - The name of the interface from the service XML.
+    \param message Defines the message to send to the service provider i.e. it is
+                 the signature of the service provider function to be called.
+    \param synchronous Defines should message be sent synchronously or asynchronously.
+                     By default message is sent synchronously.
+*/
+XQServiceRequest::XQServiceRequest(const QString& service, const QString& message, const bool &synchronous)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::XQServiceRequest(2)");
+    XQSERVICE_DEBUG_PRINT("service: %s, message: %s, synchronous: %d", qPrintable(service), qPrintable(message), synchronous);
+    mData = new XQServiceRequest_Private(service,message,synchronous,this);
+}
+
+/*!
+    Copy constructor. Any data previously written to the \a orig
+    service will be in the copy.
+    \param orig XQServiceRequest from which data will be copied to this object.
+*/
+XQServiceRequest::XQServiceRequest(const XQServiceRequest& orig)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::XQServiceRequest(3)");
+    mData = new XQServiceRequest_Private(orig.mData->mService,orig.mData->mMessage,orig.mData->mSynchronous,this);
+    mData->mArguments = orig.mData->mArguments;
+}
+
+/*!
+    Construct a service request by service descriptor which contains exact details of the service and interface.
+    The service may be written prior to the calls.
+    \param descriptor Defines details of the service and it's interface.
+    \param message Message to be sent when send() is called.
+    \param synchronous Defines should message be sent synchronously or asynchronously.
+                       By default message is sent synchronously.
+*/
+XQServiceRequest::XQServiceRequest(const XQAiwInterfaceDescriptor &descriptor, const QString& message, const bool &synchronous)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::XQServiceRequest(2)");
+    XQSERVICE_DEBUG_PRINT("service: %s, interface %s, message: %s, synchronous: %d",
+                          qPrintable(descriptor.serviceName()), qPrintable(descriptor.interfaceName()),
+                          qPrintable(message), synchronous);
+    mData = new XQServiceRequest_Private(descriptor,message,synchronous,this);
+}
+
+/*!
+    Assignment operator.
+    Any data previously written to the \a orig
+    service will be in the copy.
+*/
+XQServiceRequest& XQServiceRequest::operator=(const XQServiceRequest& orig)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::operator=");
+    if( &orig == this )
+        return *this;
+
+    mData->mService = orig.mData->mService;
+    mData->mMessage = orig.mData->mMessage;
+    mData->mArguments = orig.mData->mArguments;
+    mData->mRequestUtil = orig.mData->mRequestUtil;
+
+    return *this;
+}
+
+/*!
+    Destroys the service request. Unlike QtopiaIpcEnvelope, the
+    request is not automatically sent.
+*/
+XQServiceRequest::~XQServiceRequest()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::~XQServiceRequest %s", qPrintable(mData->mUniqueChannelName));
+    XQServiceAdaptor::cancelPendingSend(mData->mUniqueChannelName);
+    delete mData;
+}
+
+/*!
+    Checks if request is NULL.
+    \return True if either the service() or message() is not set.
+    \sa service(), message()
+ */
+bool XQServiceRequest::isNull() const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::isNull");
+    bool ret = mData->mService.isEmpty() || mData->mService.isNull() || mData->mMessage.isNull();
+	XQSERVICE_DEBUG_PRINT("mData->mService.isEmpty() = %d", mData->mService.isEmpty());
+	XQSERVICE_DEBUG_PRINT("mData->mService.isNull() = %d", mData->mService.isNull());
+	XQSERVICE_DEBUG_PRINT("mData->mMessage.isNull() = %d", mData->mMessage.isNull());
+	XQSERVICE_DEBUG_PRINT("return %d", ret);
+	return ret;
+}
+
+/*!
+    Checks if request is synchronous or asynchronous.
+    \return True if request is synchronous, false if request is asynchronous.
+    \sa setSynchronous()
+ */
+bool XQServiceRequest::isSynchronous() const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::isSynchronous");
+    return mData->mSynchronous;
+}
+
+/*!
+    Sets request to be synchronous or asynchronous.
+    \param synchronous If set to true, request will be synchronous.
+                       If set to false, request will be asynchronous.
+    \sa isSynchronous()
+ */
+void XQServiceRequest::setSynchronous(const bool& synchronous)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::setSynchronous");
+    mData->mSynchronous = synchronous;
+}
+/*!
+    Sends the request. If the request is synchronous, then client is blocked
+    until service provider completes the request or request fails for some reason.
+    If the request is asynchronous, then client won't be blocked. If the request
+    is asynchronous and clients wants to receive a return value from the service
+    provider, then clients should connect to the requestCompleted() signal.
+    \return False if there was no application that could service the request, otherwise true.
+*/
+bool XQServiceRequest::send()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::send(1)");
+    QVariant retValue;
+    return send(retValue);
+}
+
+/*!
+    Sends the request. If the request is synchronous, then client is blocked
+    until service provider completes the request or request fails for some reason.
+    If the request is asynchronous, then client won't be blocked.
+    \param retData Defines refence to a value service provider will return after service.
+    \return False if there was no application that could service the request, otherwise true.
+*/
+bool XQServiceRequest::send(QVariant& retData)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::send(2)");
+    if (isNull())
+    {
+        XQSERVICE_DEBUG_PRINT("XQServiceRequest::send error: null request");
+        XQService::serviceThreadData()->setLatestError(XQService::EArgumentError);
+        return false;
+    }
+    
+    // Handle sharable file argument(s), if any
+    if (!handleSharableFileArgs())
+    {
+        XQSERVICE_DEBUG_PRINT("XQServiceRequest::send error:invalid sharable file");
+        XQService::serviceThreadData()->setLatestError(XQService::EArgumentError);
+        return false;
+    }
+    
+    mData->mRequestUtil.setSynchronous(mData->mSynchronous); // Ensure option is set !
+    mData->mRequestUtil.mOperation = mData->mMessage;  // Save the operation name for startup
+    
+    // !!!
+    // Add the info as extra argument to the request
+    // This shall be removed by the server
+    // !!!
+    addArg(qVariantFromValue(mData->mRequestUtil.mInfo));
+       
+    // Pass always the util instance onwards as user data.
+    // It can be utilized by the XQServiceManager::startServer
+    // e.g. to optimize startup of a service server
+
+    // Create unique channel name to separate multiple client requests to same channel name.
+    quint32 handle = (unsigned int)mData;
+    mData->mUniqueChannelName = QString("%1:").arg(handle) + mData->mService;
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::send(2):uniqueChannel=%s", qPrintable(mData->mUniqueChannelName));
+    return XQServiceAdaptor::send(mData->mUniqueChannelName,  message(), mData->mArguments, retData, mData->mSynchronous,mData,
+                                 (const void *)&mData->mRequestUtil);
+}
+/*!
+    Sets the full name of the service to which the request will be sent.
+    \param fullServiceName Full name of the service to send message to. See
+                           XQServiceRequest(const QString& service, const QString& message, const bool &synchronous)
+                           for the full name definition.
+    \sa service()
+ */
+void XQServiceRequest::setService(const QString& fullServiceName)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::setService");
+    XQSERVICE_DEBUG_PRINT("service: %s", qPrintable(fullServiceName));
+    mData->mService = fullServiceName;
+    mData->mArguments.clear();
+    mData->mRequestUtil.mDescriptor = XQAiwInterfaceDescriptor(); // Invalid descriptor
+}
+
+/*!
+    Gets the service name to which this request will be sent.
+    \return Full service name to which request will be sent.
+    \sa setService()
+*/
+QString XQServiceRequest::service() const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::service");
+    XQSERVICE_DEBUG_PRINT("service: %s", qPrintable(mData->mService));
+    return mData->mService;
+}
+
+/*!
+    Sets the \a message to be sent to the service.
+    \param message Defines the message to send to a service provider. The message
+                   is a valid Qt slot signature published by the service provider.
+                   For example, "view(QString)".
+    \sa message()
+*/
+void XQServiceRequest::setMessage(const QString& message)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::setMessage");
+    XQSERVICE_DEBUG_PRINT("message: %s", qPrintable(message));
+    mData->mMessage = message;
+    mData->mArguments.clear();
+}
+
+/*!
+    Gets the message set for the request.
+    \return Message of the request as QString.
+    \sa setMessage()
+*/
+QString XQServiceRequest::message() const
+{ 
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::message");
+    XQSERVICE_DEBUG_PRINT("message: %s", qPrintable(mData->mMessage));
+    return mData->mMessage;
+}
+
+/*!
+    Gets the complete list of arguments for this service request.
+    \return List of arguments set to the request.
+    \sa setArguments()
+*/
+const QList<QVariant> &XQServiceRequest::arguments() const 
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::arguments");
+    return mData->mArguments; 
+}
+
+/*!
+    Sets \a arguments for this service request.
+    \param arguments Complete list of arguments for this service request
+                     i.e. the values to be transferred to service provider
+                     function to be called.
+    \sa arguments()
+*/
+void XQServiceRequest::setArguments(const QList<QVariant> &arguments)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::setArguments");
+    mData->mArguments = arguments;
+}
+
+/*!
+    Gets the latest error that happened in the request execution.
+    \return The latest error that happened in the request execution.
+            Errors are defined in xqserviceglobal.h. 
+    \sa XQService::ServiceIPCErrors.
+*/
+int XQServiceRequest::latestError()
+    {
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::latestError");
+    return XQServiceAdaptor::latestError();
+    }
+
+/*!
+    Sets additional options for the request, like embedding or start to background.
+    \param info Additional info to be set to the request.
+    \sa info()
+*/
+void XQServiceRequest::setInfo(const XQRequestInfo &info)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::setInfo");
+    mData->mRequestUtil.mInfo = info;
+}
+
+/*!
+    Gets current info set for the request.
+    \return Info data set to the request.
+    \sa setInfo()
+*/
+XQRequestInfo XQServiceRequest::info() const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::info");
+    return mData->mRequestUtil.mInfo;
+}
+
+/*!
+    \internal
+    Adds the variant \a var to the list of arguments, so that the variant's
+    value is serialized in send() rather than the variant itself.
+*/
+void XQServiceRequest::addArg(const QVariant& v)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::addArg %s,%d", v.typeName());
+    XQSERVICE_DEBUG_PRINT("v: %s", qPrintable(v.toString()));
+    mData->mArguments.append(v);
+}
+
+/*!
+    \internal
+    Picks the XQSharableFile argument, if any, into the request util
+    This way scan parameter is listed only once.
+*/
+bool XQServiceRequest::handleSharableFileArgs()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::handleSharableFile");
+
+    bool ret = true;
+    mData->mRequestUtil.mSharableFileArgs.clear();
+    
+    for(int i=0; i < mData->mArguments.size(); i++)
+    {
+        if (QString(mData->mArguments[i].typeName()) == QString("XQSharableFile"))
+        {
+            XQSERVICE_DEBUG_PRINT("XQServiceRequest::sharable file detected");
+            // Pick up the sharable file(s) to utility so that no need to scan any more later
+            XQSharableFile file = mData->mArguments[i].value<XQSharableFile>();
+            if (!file.isValid())
+            {
+                // No point to pass invalid file handle onwards
+                XQSERVICE_DEBUG_PRINT("\t Invalid sharable file");
+                ret = false;
+                break;
+            }
+            if (mData->mRequestUtil.mSharableFileArgs.count() > 0)
+            {
+                XQSERVICE_DEBUG_PRINT("\t Too many sharable files");
+                ret = false;
+                break;
+            }
+            mData->mRequestUtil.mSharableFileArgs.append(file);
+            XQSERVICE_DEBUG_PRINT("XQServiceRequest::sharable file added");
+        }
+    }
+
+    if (!ret)
+    {
+        mData->mRequestUtil.mSharableFileArgs.clear();
+    }
+
+    return ret;
+}
+
+
+/*!
+    Serializes all the arguments from the service request.
+    \param action Defines the request having arguments to be serialized.
+    \return Serialized arguments in byte array.
+*/
+QByteArray XQServiceRequest::serializeArguments(const XQServiceRequest &action)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::serializeArguments");
+    QByteArray ret;
+    QBuffer *buffer = new QBuffer(&ret);
+    buffer->open(QIODevice::WriteOnly);
+    QDataStream stream(buffer);
+    stream << action.mData->mArguments;
+
+    delete buffer;
+    return ret;
+}
+/*!
+    Deserializes all the arguments from the byte array to service request.
+    \param action Defines the request where arguments are deserialized.
+    \param data Defines the byte array of serialized arguments.
+*/
+void XQServiceRequest::deserializeArguments(XQServiceRequest &action,
+        const QByteArray &data)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::deserializeArguments");
+    QDataStream stream(data);
+    stream >> action.mData->mArguments;
+}
+
+/*!
+    Serializes this request to the stream.
+    \param stream Defines stream this request is serialized to.
+*/
+template <typename Stream> void XQServiceRequest::serialize(Stream &stream) const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::serialize");
+    stream << mData->mArguments;
+    stream << mData->mService;
+    stream << mData->mMessage;
+    stream << mData->mSynchronous;
+}
+
+/*!
+    Deserializes this request from the stream.
+    \param stream Defines the stream this request is deserialized from.
+*/
+template <typename Stream> void XQServiceRequest::deserialize(Stream &stream)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceRequest::deserialize");
+    stream >> mData->mArguments;
+    stream >> mData->mService;
+    stream >> mData->mMessage;
+    stream >> mData->mSynchronous;
+}
+
+Q_IMPLEMENT_USER_METATYPE(XQServiceRequest)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqservicerequest.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,129 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef XQSERVICEREQUEST_H
+#define XQSERVICEREQUEST_H
+
+#include <xqserviceglobal.h>
+#include <qdatastream.h>
+#include <qbuffer.h>
+#include <QVariant>
+#include <xqserviceipcmarshal.h>
+#include <xqaiwinterfacedescriptor.h>
+#include <xqrequestinfo.h>
+
+class XQServiceRequest_Private;
+
+class XQSERVICE_EXPORT XQServiceRequest : public QObject
+{
+    friend bool operator==( const XQServiceRequest &m1, const XQServiceRequest &m2 );
+    friend class XQServiceRequest_Private;
+    
+    Q_OBJECT
+
+public:
+    
+    XQServiceRequest();
+    XQServiceRequest(const QString& fullServiceName, const QString& message, const bool& synchronous = true);
+    XQServiceRequest(const XQServiceRequest& orig);
+    XQServiceRequest(const XQAiwInterfaceDescriptor &descriptor, const QString& message, const bool& synchronous = true);
+    
+    ~XQServiceRequest();
+
+    bool send();
+    bool send(QVariant& retValue) ;
+    
+    template <typename T> 
+    inline bool send(T& retValue)
+    {
+        QVariant retData;     
+        bool ret=send(retData);        
+        retValue = qVariantValue<T>(retData);
+        return ret;
+    }
+    
+    bool isNull() const;
+
+    void setSynchronous(const bool &synchronous);
+    bool isSynchronous() const;
+
+    void setService(const QString &fullServiceName);
+    QString service() const;
+    void setMessage(const QString& message);
+    QString message() const;
+
+    const QList<QVariant> &arguments() const;
+    void setArguments(const QList<QVariant> &arguments);
+    
+    int latestError();
+
+    void setInfo(const XQRequestInfo &info);
+    XQRequestInfo info() const;
+    
+    XQServiceRequest& operator=(const XQServiceRequest& orig);
+    
+    template<typename T>
+    inline XQServiceRequest &operator<< (const T &var)
+    {
+        QVariant v = qVariantFromValue(var);
+        addArg(v);
+        return *this;
+    }
+
+    inline XQServiceRequest &operator<< (const char *var)
+    {
+        QVariant v = QVariant(QString(var));
+        addArg(v);
+        return *this;
+    }
+
+    inline void addVariantArg(const QVariant& var)
+    {
+        addArg(var);
+    }
+
+    static QByteArray serializeArguments(const XQServiceRequest &action);
+    static void deserializeArguments(XQServiceRequest &action, const QByteArray &data);
+
+    template <typename Stream> void serialize(Stream &stream) const;
+    template <typename Stream> void deserialize(Stream &stream);
+
+signals:
+    void requestCompleted(const QVariant& value) ;
+    void requestError(int err);
+
+private:
+    void addArg(const QVariant& v);
+    bool handleSharableFileArgs();
+    
+private:
+    XQServiceRequest_Private *mData;
+};
+
+inline bool operator==( const XQServiceRequest &m1, const XQServiceRequest &m2 )
+{
+    return (m1.service() == m2.service()) && (m1.message() == m2.message())
+            && (m1.arguments() == m2.arguments());
+}
+
+Q_DECLARE_USER_METATYPE(XQServiceRequest)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqservicethreaddata.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,227 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqservicethreaddata.h"
+#include "xqservicechannel.h"
+#include "xqserviceipcclient.h"
+
+#include <QThreadStorage>
+#include <qthread.h>
+
+#ifndef QT_NO_THREAD
+
+static QThreadStorage<XQServiceThreadData *> xqserviceThreadStorage;
+
+XQServiceThreadData *XQService::serviceThreadData()
+{
+    XQSERVICE_DEBUG_PRINT("XQService::serviceThreadData");
+    if (!xqserviceThreadStorage.hasLocalData()) {
+        xqserviceThreadStorage.setLocalData(new XQServiceThreadData());
+    }
+    return xqserviceThreadStorage.localData() ;
+}
+
+#else
+
+Q_GLOBAL_STATIC(XQServiceThreadData, serviceThreadData);
+
+#endif
+
+
+XQServiceThreadData *XQServiceThreadData::instance()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::instance");
+    return XQService::serviceThreadData();
+}
+
+XQServiceThreadData::~XQServiceThreadData()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::~XQServiceThreadData");
+    qDeleteAll(ipcConnMap);
+    ipcConnMap.clear();
+}
+
+QString XQServiceThreadData::getIpcConnectioName(const QString& channel)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::getIpcConnectioName");
+    XQSERVICE_DEBUG_PRINT("channel: %s", qPrintable(channel));
+/*
+    // name of the connection is the name of application without interface
+    int pos = channel.lastIndexOf('.');
+    return pos != -1 ? channel.left(pos) : channel;
+*/
+    //TODO: this should avoid to have multiple connection in the same application if provide multiple interfaces
+    return channel;
+}
+
+// Get the client connection object for this thread.
+bool XQServiceThreadData::createClientConnection(const QString& channel, bool isServer, 
+                                                 bool isSync, XQServiceRequestCompletedAsync* rc,
+                                                const void *userData)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::createClientConnection start");
+    XQSERVICE_DEBUG_PRINT("channel: %s, isServer: %d, isSync: %d", qPrintable(channel), isServer, isSync);
+    XQSERVICE_DEBUG_PRINT("userdata: %x", (int)userData);
+    
+    QString ipcConName = getIpcConnectioName(channel);
+    XQSERVICE_DEBUG_PRINT("ipcConName: %s", qPrintable(ipcConName));
+    XQServiceIpcClientMap::Iterator it = ipcConnMap.find(ipcConName);
+    if (it == ipcConnMap.end()) {
+        XQSERVICE_DEBUG_PRINT("Create new connection");
+        // userData may be NULL !
+        XQServiceIpcClient* conn = new XQServiceIpcClient(ipcConName,isServer,isSync,rc, userData);
+        if (conn) {
+            XQSERVICE_DEBUG_PRINT("conn created");
+            bool ret=true;
+            if (isServer) {
+                XQSERVICE_DEBUG_PRINT("Listen server");
+                ret=conn->listen();
+            }
+            else {
+                XQSERVICE_DEBUG_PRINT("Connect to server");
+                ret=conn->connectToServer();        
+            }
+            if (ret) {
+                XQSERVICE_DEBUG_PRINT("Add connection to mapping");
+                it = ipcConnMap.insert(ipcConName, conn);
+            }
+            else {
+                XQSERVICE_DEBUG_PRINT("Couldn't connect");
+                delete conn;        
+            }
+            XQSERVICE_DEBUG_PRINT("\t ret: %d", ret);
+            XQSERVICE_DEBUG_PRINT("XQServiceThreadData::createClientConnection end (1)");
+            return ret;
+        }
+    }
+    
+    XQSERVICE_DEBUG_PRINT("\t Connection already exists or creation failed");
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::createClientConnection end (2)");
+    return false;
+}
+
+// Get the client connection object for this thread.
+XQServiceIpcClient *XQServiceThreadData::clientConnection(const QString& channel)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::clientConnection");
+    XQSERVICE_DEBUG_PRINT("channel: %s", qPrintable(channel));
+    QString ipcConName = getIpcConnectioName(channel);
+    XQSERVICE_DEBUG_PRINT("ipcConName: %s", qPrintable(ipcConName));
+    XQServiceIpcClientMap::Iterator it = ipcConnMap.find(ipcConName);
+    if (it == ipcConnMap.end()) {
+        XQSERVICE_DEBUG_PRINT("No client connection");
+        return NULL;
+    }
+    return it.value();
+}
+
+void XQServiceThreadData::closeClientConnection(const QString& channel)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::closeClientConnection");
+    XQSERVICE_DEBUG_PRINT("channel: %s", qPrintable(channel));
+    QString ipcConName = getIpcConnectioName(channel);
+    XQSERVICE_DEBUG_PRINT("ipcConName: %s", qPrintable(ipcConName));
+    XQServiceIpcClientMap::Iterator it = ipcConnMap.find(ipcConName);
+    if (it != ipcConnMap.end()) {
+        XQSERVICE_DEBUG_PRINT("disconnect");
+        it.value()->disconnected();
+        ipcConnMap.erase(it);
+    }
+}
+
+// Determine if we have a client connection object for this thread.
+bool XQServiceThreadData::hasClientConnection(const QString& channel)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::hasClientConnection");
+    XQSERVICE_DEBUG_PRINT("channel: %s", qPrintable(channel));
+    QString ipcConName = getIpcConnectioName(channel);
+    XQSERVICE_DEBUG_PRINT("ipcConName: %s", qPrintable(ipcConName));
+    XQServiceIpcClientMap::Iterator it = ipcConnMap.find(ipcConName);
+    XQSERVICE_DEBUG_PRINT("hasClientConnection: %d", it != ipcConnMap.end());
+    return it != ipcConnMap.end();
+}
+
+int XQServiceThreadData::latestError()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::latestError");
+    XQSERVICE_DEBUG_PRINT("m_latestError: %d", m_latestError);
+    return m_latestError;
+}
+
+void XQServiceThreadData::setLatestError(int latestError)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::setLatestError %d", latestError);
+    m_latestError = latestError;
+}
+
+QByteArray XQServiceThreadData::serializeRetData(const QVariant &value, int error)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::serializeRetData");
+    XQSERVICE_DEBUG_PRINT("value type: %d, null?=%d, valid?=%d, error: %d", value.type(), value.isNull(), value.isValid(), error);
+    QByteArray array;
+    // if (!value.isNull() && (value.type() != QVariant::Invalid)) {    maparnan
+    if (value.isValid()) {    // 
+        QDataStream stream(&array, QIODevice::WriteOnly | QIODevice::Append);
+        
+        stream << CmdRetData;
+        stream << value;
+    }
+    else {
+        if (error)
+            {
+            QVariant value(error);
+            QDataStream stream(&array, 
+                        QIODevice::WriteOnly | QIODevice::Append);
+            stream << CmdErrData;
+            stream << value;
+            }
+        }
+    return array;
+}
+
+QVariant XQServiceThreadData::deserializeRetData(const QByteArray &retData)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceThreadData::deserializeRetData");
+    XQSERVICE_DEBUG_PRINT("retData: %s", retData.constData());
+    if (retData.length()) 
+        {
+        QDataStream stream(retData);
+        int cmd ;
+        stream >> cmd ;
+        if (cmd == CmdRetData) 
+            {
+            QVariant retServiceData(stream);
+            return retServiceData;
+        }
+        else
+            {
+            if (cmd == CmdErrData)
+                {
+                QVariant retServiceData(stream);
+                int error = retServiceData.toInt();
+                XQService::serviceThreadData()->setLatestError(error);
+                }
+            }
+    }
+    return QVariant();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/src/xqservicethreaddata.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef XQSERVICETHREADDATA_H
+#define XQSERVICETHREADDATA_H
+
+#include "xqservicelog.h"
+
+#include <QtCore/qobject.h>
+
+#include <QtCore/qshareddata.h>
+#include <QtCore/qregexp.h>
+#include <QMap>
+#include <QVariant>
+
+const int CmdRetData = 0xF001 ;
+const int CmdErrData = 0xF010 ;
+
+class XQServiceChannel;
+class XQServiceIpcClient;
+class XQServiceRequestCompletedAsync;
+
+// Special variant class that can perform QDataStream operations
+// without the QVariant header information.
+class XQServiceVariant : public QVariant
+{
+public:
+    XQServiceVariant() : QVariant() {}
+    explicit XQServiceVariant(const QVariant& value)
+        : QVariant(value) 
+    {
+        XQSERVICE_DEBUG_PRINT("XQServiceVariant::XQServiceVariant");
+        XQSERVICE_DEBUG_PRINT("value: %s", qPrintable(value.toString()));
+    }
+
+    void load(QDataStream& stream, int typeOrMetaType)
+    {
+        XQSERVICE_DEBUG_PRINT("XQServiceVariant::load");
+        clear();
+        create(typeOrMetaType, 0);
+        d.is_null = false;
+        QMetaType::load(stream, d.type, const_cast<void *>(constData()));
+    }
+
+    void save(QDataStream& stream) const
+    {
+        XQSERVICE_DEBUG_PRINT("XQServiceVariant::save");
+        QMetaType::save(stream, d.type, constData());
+    }
+};
+
+/*!
+    \class XQServiceChannelPrivate
+    \brief Private implementation of XQServiceChannelPrivate
+*/
+class XQServiceChannelPrivate : public QSharedData
+{
+public:
+    XQServiceChannelPrivate(XQServiceChannel *obj, const QString& chan, bool isServer)
+        : object(obj), channel(chan), server(isServer)
+    {
+        XQSERVICE_DEBUG_PRINT("XQServiceChannelPrivate::XQServiceChannelPrivate");        
+    }
+
+    XQServiceChannel *object;
+    QString channel;
+    bool server;
+};
+
+typedef QExplicitlySharedDataPointer<XQServiceChannelPrivate> XQServiceChannelPrivatePointer;
+typedef QMap<QString, QList<XQServiceChannelPrivatePointer> > XQServiceClientMap;
+typedef QMap<QString, XQServiceIpcClient*> XQServiceIpcClientMap;
+
+// Thread-specific data for XQService client and server implementations.
+class XQServiceThreadData
+{
+public:
+    XQServiceThreadData()
+    {
+        XQSERVICE_DEBUG_PRINT("XQServiceThreadData::XQServiceThreadData");
+        m_latestError = 0; 
+    }
+
+    virtual ~XQServiceThreadData();
+
+
+    static XQServiceThreadData *instance();
+    
+    bool createClientConnection(const QString& channel,bool isServer=false, 
+                                bool isSync=true, XQServiceRequestCompletedAsync* rc=NULL,
+                               const void *userData=NULL);
+    void closeClientConnection(const QString& channel);
+
+    XQServiceIpcClient *clientConnection(const QString& channel);
+    
+    // Determine if we have a client connection object for this thread.
+    bool hasClientConnection(const QString& ipcConName);
+    QString getIpcConnectioName(const QString& channel);
+
+    static QVariant deserializeRetData(const QByteArray &retData);
+    static QByteArray serializeRetData(const QVariant &value, int error);
+    
+	int latestError();
+    
+    void setLatestError(int latestError);
+    // Map client-side channel names to lists of XQServiceChannel objects.
+    XQServiceClientMap clientMap;
+
+    XQServiceIpcClientMap ipcConnMap;
+	
+	int m_latestError;
+};
+
+namespace XQService
+{
+    XQServiceThreadData *serviceThreadData();
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservice/xqservice.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,53 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+TEMPLATE = lib
+TARGET   = xqservice
+CONFIG  += dll warn_on
+
+#QT -=gui # QAction used for AIW
+
+# Try to put useful things in one place on win
+win32:DESTDIR = ../../bin
+
+DEFINES += XQ_BUILD_XQSERVICE_LIB
+symbian {
+	DEFINES += QT_S60_AIW
+	TARGET.UID3 = 0x20022E72
+	TARGET.EPOCSTACKSIZE = 0x5000
+	TARGET.EPOCHEAPSIZE = "0x20000 0x1000000"
+	TARGET.EPOCALLOWDLLDATA = 1
+	TARGET.CAPABILITY = ALL -TCB
+}
+
+XQSERVICE_ROOT=..
+        
+include(src/api_headers.pri)
+include(../xqservicebase.pri)
+include(src/xqservice.pri)
+
+LIBS+=-lxqserviceutil -lxqserviceipcclient -lxqserviceipcserver -lQtGui -lQtServiceFramework -lws32 -lefsrv -lapparc -lapgrfx
+LIBS+=-lcaf
+LIBS+=-lxqsettingsmanager
+
+libFiles.sources = xqservice.dll xqserviceutil.dll
+libFiles.path = "!:\sys\bin"
+DEPLOYMENT += libFiles
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqservicebase.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,49 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+# Still sorting out the Qt caps..
+#symbian:TARGET.CAPABILITY = All -Tcb -DRM -AllFiles -DiskAdmin
+symbian:TARGET.CAPABILITY = All -Tcb
+
+DEPENDPATH += .
+
+INCLUDEPATH += .
+INCLUDEPATH += $$XQSERVICE_ROOT/inc
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+CONFIG(release):XQSERVICE_OUTPUT_DIR=$$XQSERVICE_ROOT/build/$$TARGET/rel
+CONFIG(debug):XQSERVICE_OUTPUT_DIR=$$XQSERVICE_ROOT/build/$$TARGET/deb
+     
+OBJECTS_DIR = $$XQSERVICE_OUTPUT_DIR/obj
+DESTDIR = $$XQSERVICE_OUTPUT_DIR/bin
+MOC_DIR=$$XQSERVICE_OUTPUT_DIR/moc
+RCC_DIR=$$XQSERVICE_OUTPUT_DIR/rcc
+TEMPDIR=$$XQSERVICE_OUTPUT_DIR/tmp
+QMAKE_RPATHDIR = $$DESTDIR $$QMAKE_RPATHDIR
+QMAKE_LIBDIR = $$DESTDIR $$QMAKE_LIBDIR
+
+symbian {
+defFilePath=..
+deploy.path = /
+# This is for new exporting system coming in garden
+for(header_public, XQSERVICE_API_HEADERS):BLD_INF_RULES.prj_exports += "$$header_public $$MW_LAYER_PUBLIC_EXPORT_PATH($$basename(header_public))"
+for(header_internal, XQSERVICE_API_HEADERS_INTERNAL):BLD_INF_RULES.prj_exports += "$$header_internal |../inc/$$basename(header_internal)"
+for(header_platform, XQSERVICE_API_HEADERS_PLATFORM):BLD_INF_RULES.prj_exports += "$$header_platform $$MW_LAYER_PLATFORM_EXPORT_PATH($$basename(header_platform))"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/README.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,3 @@
+Xqserviceipc and xqserviceipcserver component come from S&S Service Framework http://nwiki.nokia.com/WestStream/ServiceFrameworkDevelopment.
+specifically we got the S&S Service FW IPC http://nwiki.nokia.com/WestStream/ServiceFWIPC.
+Added new ipc backend using Symbian OS Server Application Framework: classes apa*. 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/bwins/xqserviceipcclientu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,35 @@
+EXPORTS
+	?tr@ServiceFwIPC@QtService@@SA?AVQString@@PBD0@Z @ 1 NONAME ; class QString QtService::ServiceFwIPC::tr(char const *, char const *)
+	?qt_metacall@ServiceFwIPC@QtService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2 NONAME ; int QtService::ServiceFwIPC::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?isIPCTypeSupported@ServiceFwIPCFactory@QtService@@SA_NW4TServiceIPCBackends@2@@Z @ 3 NONAME ; bool QtService::ServiceFwIPCFactory::isIPCTypeSupported(enum QtService::TServiceIPCBackends)
+	??_EServiceFwIPC@QtService@@UAE@I@Z @ 4 NONAME ; QtService::ServiceFwIPC::~ServiceFwIPC(unsigned int)
+	?getStaticMetaObject@ServiceFwIPC@QtService@@SAABUQMetaObject@@XZ @ 5 NONAME ; struct QMetaObject const & QtService::ServiceFwIPC::getStaticMetaObject(void)
+	??0ServiceFwIPC@QtService@@QAE@PAVQObject@@W4TServiceIPCBackends@1@@Z @ 6 NONAME ; QtService::ServiceFwIPC::ServiceFwIPC(class QObject *, enum QtService::TServiceIPCBackends)
+	?send@ServiceFwIPC@QtService@@QAE_NABVQString@@ABVQByteArray@@@Z @ 7 NONAME ABSENT ; bool QtService::ServiceFwIPC::send(class QString const &, class QByteArray const &)
+	?readAll@ServiceFwIPC@QtService@@QAEXAAVQByteArray@@@Z @ 8 NONAME ; void QtService::ServiceFwIPC::readAll(class QByteArray &)
+	??1ServiceFwIPC@QtService@@UAE@XZ @ 9 NONAME ; QtService::ServiceFwIPC::~ServiceFwIPC(void)
+	?SendReceive@RApaIPCSession@QtService@@QBEXHAAVTRequestStatus@@@Z @ 10 NONAME ; void QtService::RApaIPCSession::SendReceive(int, class TRequestStatus &) const
+	??_EServiceFwIPCFactory@QtService@@UAE@I@Z @ 11 NONAME ; QtService::ServiceFwIPCFactory::~ServiceFwIPCFactory(unsigned int)
+	?trUtf8@ServiceFwIPC@QtService@@SA?AVQString@@PBD0H@Z @ 12 NONAME ; class QString QtService::ServiceFwIPC::trUtf8(char const *, char const *, int)
+	?trUtf8@ServiceFwIPC@QtService@@SA?AVQString@@PBD0@Z @ 13 NONAME ; class QString QtService::ServiceFwIPC::trUtf8(char const *, char const *)
+	?qt_metacast@ServiceFwIPC@QtService@@UAEPAXPBD@Z @ 14 NONAME ; void * QtService::ServiceFwIPC::qt_metacast(char const *)
+	?requestPending@ServiceFwIPC@QtService@@QAE_NXZ @ 15 NONAME ; bool QtService::ServiceFwIPC::requestPending(void)
+	?ReadDone@ServiceFwIPC@QtService@@IAEXXZ @ 16 NONAME ; void QtService::ServiceFwIPC::ReadDone(void)
+	?sendAsync@ServiceFwIPC@QtService@@QAEXABVQString@@ABVQByteArray@@@Z @ 17 NONAME ; void QtService::ServiceFwIPC::sendAsync(class QString const &, class QByteArray const &)
+	?connect@ServiceFwIPC@QtService@@QAE_NABVQString@@@Z @ 18 NONAME ; bool QtService::ServiceFwIPC::connect(class QString const &)
+	?tr@ServiceFwIPC@QtService@@SA?AVQString@@PBD0H@Z @ 19 NONAME ; class QString QtService::ServiceFwIPC::tr(char const *, char const *, int)
+	??1ServiceFwIPCFactory@QtService@@UAE@XZ @ 20 NONAME ; QtService::ServiceFwIPCFactory::~ServiceFwIPCFactory(void)
+	?SendReceive@RServiceIPCSession@QtService@@QBEXHAAVTRequestStatus@@@Z @ 21 NONAME ; void QtService::RServiceIPCSession::SendReceive(int, class TRequestStatus &) const
+	?metaObject@ServiceFwIPC@QtService@@UBEPBUQMetaObject@@XZ @ 22 NONAME ; struct QMetaObject const * QtService::ServiceFwIPC::metaObject(void) const
+	?startServer@ServiceFwIPC@QtService@@QAE_NABVQString@@0AA_KW4ServiceIPCStartServerOptions@12@@Z @ 23 NONAME ; bool QtService::ServiceFwIPC::startServer(class QString const &, class QString const &, unsigned long long &, enum QtService::ServiceFwIPC::ServiceIPCStartServerOptions)
+	??0ServiceFwIPCFactory@QtService@@QAE@XZ @ 24 NONAME ; QtService::ServiceFwIPCFactory::ServiceFwIPCFactory(void)
+	?readAll@ServiceFwIPC@QtService@@QAE?AVQByteArray@@XZ @ 25 NONAME ; class QByteArray QtService::ServiceFwIPC::readAll(void)
+	?waitForRead@ServiceFwIPC@QtService@@AAE_NXZ @ 26 NONAME ; bool QtService::ServiceFwIPC::waitForRead(void)
+	?staticMetaObject@ServiceFwIPC@QtService@@2UQMetaObject@@B @ 27 NONAME ; struct QMetaObject const QtService::ServiceFwIPC::staticMetaObject
+	?createBackend@ServiceFwIPCFactory@QtService@@SAPAVServiceFwIPCPrivate@2@W4TServiceIPCBackends@2@@Z @ 28 NONAME ; class QtService::ServiceFwIPCPrivate * QtService::ServiceFwIPCFactory::createBackend(enum QtService::TServiceIPCBackends)
+	?error@ServiceFwIPC@QtService@@IAEXH@Z @ 29 NONAME ; void QtService::ServiceFwIPC::error(int)
+	?sendSync@ServiceFwIPC@QtService@@QAE_NABVQString@@ABVQByteArray@@@Z @ 30 NONAME ; bool QtService::ServiceFwIPC::sendSync(class QString const &, class QByteArray const &)
+	?disconnect@ServiceFwIPC@QtService@@QAEXXZ @ 31 NONAME ; void QtService::ServiceFwIPC::disconnect(void)
+	?readyRead@ServiceFwIPC@QtService@@IAEXXZ @ 32 NONAME ; void QtService::ServiceFwIPC::readyRead(void)
+	?setUserData@ServiceFwIPC@QtService@@QAEXPBX@Z @ 33 NONAME ; void QtService::ServiceFwIPC::setUserData(void const *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/bwins/xqserviceipcserveru.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,28 @@
+EXPORTS
+	?getSession@ServiceIPCRequest@QtService@@QAEPAVServiceIPCSession@2@XZ @ 1 NONAME ; class QtService::ServiceIPCSession * QtService::ServiceIPCRequest::getSession(void)
+	??_EServiceFwIPCServer@QtService@@UAE@I@Z @ 2 NONAME ; QtService::ServiceFwIPCServer::~ServiceFwIPCServer(unsigned int)
+	??1ServiceFwIPCServer@QtService@@UAE@XZ @ 3 NONAME ; QtService::ServiceFwIPCServer::~ServiceFwIPCServer(void)
+	?disconnect@ServiceFwIPCServer@QtService@@QAEXXZ @ 4 NONAME ; void QtService::ServiceFwIPCServer::disconnect(void)
+	?completeRequest@ServiceIPCRequest@QtService@@QAE_NXZ @ 5 NONAME ; bool QtService::ServiceIPCRequest::completeRequest(void)
+	??0ServiceIPCRequest@QtService@@QAE@AAV01@@Z @ 6 NONAME ; QtService::ServiceIPCRequest::ServiceIPCRequest(class QtService::ServiceIPCRequest &)
+	??0ServiceIPCRequest@QtService@@QAE@PAVServiceIPCSession@1@_JABVQString@@@Z @ 7 NONAME ; QtService::ServiceIPCRequest::ServiceIPCRequest(class QtService::ServiceIPCSession *, long long, class QString const &)
+	?write@ServiceIPCRequest@QtService@@QAE_NABVQByteArray@@@Z @ 8 NONAME ; bool QtService::ServiceIPCRequest::write(class QByteArray const &)
+	?setClientInfo@ServiceIPCRequest@QtService@@QAEXPAVClientInfo@2@@Z @ 9 NONAME ; void QtService::ServiceIPCRequest::setClientInfo(class QtService::ClientInfo *)
+	?getOperation@ServiceIPCRequest@QtService@@QAEABVQString@@XZ @ 10 NONAME ; class QString const & QtService::ServiceIPCRequest::getOperation(void)
+	??1ServiceIPCRequest@QtService@@UAE@XZ @ 11 NONAME ; QtService::ServiceIPCRequest::~ServiceIPCRequest(void)
+	??_EServiceIPCRequest@QtService@@UAE@I@Z @ 12 NONAME ; QtService::ServiceIPCRequest::~ServiceIPCRequest(unsigned int)
+	?listen@ServiceFwIPCServer@QtService@@QAE_NABVQString@@@Z @ 13 NONAME ; bool QtService::ServiceFwIPCServer::listen(class QString const &)
+	??0ServiceFwIPCServer@QtService@@QAE@PAVMServiceIPCObserver@1@PAVQObject@@W4TServiceIPCBackends@1@@Z @ 14 NONAME ; QtService::ServiceFwIPCServer::ServiceFwIPCServer(class QtService::MServiceIPCObserver *, class QObject *, enum QtService::TServiceIPCBackends)
+	?clientInfo@ServiceIPCRequest@QtService@@QAEPAVClientInfo@2@XZ @ 15 NONAME ; class QtService::ClientInfo * QtService::ServiceIPCRequest::clientInfo(void)
+	?addRequestdata@ServiceIPCRequest@QtService@@QAE_NABVQByteArray@@@Z @ 16 NONAME ; bool QtService::ServiceIPCRequest::addRequestdata(class QByteArray const &)
+	??4ServiceIPCRequest@QtService@@QAEAAV01@AAV01@@Z @ 17 NONAME ; class QtService::ServiceIPCRequest & QtService::ServiceIPCRequest::operator=(class QtService::ServiceIPCRequest &)
+	?getData@ServiceIPCRequest@QtService@@QAEABVQByteArray@@XZ @ 18 NONAME ; class QByteArray const & QtService::ServiceIPCRequest::getData(void)
+	?isAsync@ServiceIPCRequest@QtService@@QBE_NXZ @ 19 NONAME ; bool QtService::ServiceIPCRequest::isAsync(void) const
+	?setAsync@ServiceIPCRequest@QtService@@QAEX_N@Z @ 20 NONAME ; void QtService::ServiceIPCRequest::setAsync(bool)
+	?setId@ServiceIPCRequest@QtService@@QAEXH@Z @ 21 NONAME ; void QtService::ServiceIPCRequest::setId(int)
+	?id@ServiceIPCRequest@QtService@@QBEHXZ @ 22 NONAME ; int QtService::ServiceIPCRequest::id(void) const
+	?requestInfo@ServiceIPCRequest@QtService@@QBE?AVXQRequestInfo@@XZ @ 23 NONAME ; class XQRequestInfo QtService::ServiceIPCRequest::requestInfo(void) const
+	?sharableFile@ServiceIPCRequest@QtService@@QBE?AVXQSharableFile@@H@Z @ 24 NONAME ; class XQSharableFile QtService::ServiceIPCRequest::sharableFile(int) const
+	?addSharableFile@ServiceIPCRequest@QtService@@QAEXPAVXQSharableFile@@H@Z @ 25 NONAME ; void QtService::ServiceIPCRequest::addSharableFile(class XQSharableFile *, int)
+	?setRequestInfo@ServiceIPCRequest@QtService@@QAEXPAVXQRequestInfo@@@Z @ 26 NONAME ; void QtService::ServiceIPCRequest::setRequestInfo(class XQRequestInfo *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/eabi/xqserviceipcclientu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,39 @@
+EXPORTS
+	_ZN9QtService12ServiceFwIPC10disconnectEv @ 1 NONAME
+	_ZN9QtService12ServiceFwIPC11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
+	_ZN9QtService12ServiceFwIPC11qt_metacastEPKc @ 3 NONAME
+	_ZN9QtService12ServiceFwIPC11startServerERK7QStringS3_RyNS0_28ServiceIPCStartServerOptionsE @ 4 NONAME
+	_ZN9QtService12ServiceFwIPC11waitForReadEv @ 5 NONAME
+	_ZN9QtService12ServiceFwIPC14requestPendingEv @ 6 NONAME
+	_ZN9QtService12ServiceFwIPC16staticMetaObjectE @ 7 NONAME DATA 16
+	_ZN9QtService12ServiceFwIPC19getStaticMetaObjectEv @ 8 NONAME
+	_ZN9QtService12ServiceFwIPC4sendERK7QStringRK10QByteArray @ 9 NONAME ABSENT
+	_ZN9QtService12ServiceFwIPC5errorEi @ 10 NONAME
+	_ZN9QtService12ServiceFwIPC7connectERK7QString @ 11 NONAME
+	_ZN9QtService12ServiceFwIPC7readAllER10QByteArray @ 12 NONAME
+	_ZN9QtService12ServiceFwIPC7readAllEv @ 13 NONAME
+	_ZN9QtService12ServiceFwIPC8ReadDoneEv @ 14 NONAME
+	_ZN9QtService12ServiceFwIPC8sendSyncERK7QStringRK10QByteArray @ 15 NONAME
+	_ZN9QtService12ServiceFwIPC9readyReadEv @ 16 NONAME
+	_ZN9QtService12ServiceFwIPC9sendAsyncERK7QStringRK10QByteArray @ 17 NONAME
+	_ZN9QtService12ServiceFwIPCC1EP7QObjectNS_19TServiceIPCBackendsE @ 18 NONAME
+	_ZN9QtService12ServiceFwIPCC2EP7QObjectNS_19TServiceIPCBackendsE @ 19 NONAME
+	_ZN9QtService12ServiceFwIPCD0Ev @ 20 NONAME
+	_ZN9QtService12ServiceFwIPCD1Ev @ 21 NONAME
+	_ZN9QtService12ServiceFwIPCD2Ev @ 22 NONAME
+	_ZN9QtService19ServiceFwIPCFactory13createBackendENS_19TServiceIPCBackendsE @ 23 NONAME
+	_ZN9QtService19ServiceFwIPCFactory18isIPCTypeSupportedENS_19TServiceIPCBackendsE @ 24 NONAME
+	_ZN9QtService19ServiceFwIPCFactoryC1Ev @ 25 NONAME
+	_ZN9QtService19ServiceFwIPCFactoryC2Ev @ 26 NONAME
+	_ZN9QtService19ServiceFwIPCFactoryD0Ev @ 27 NONAME
+	_ZN9QtService19ServiceFwIPCFactoryD1Ev @ 28 NONAME
+	_ZN9QtService19ServiceFwIPCFactoryD2Ev @ 29 NONAME
+	_ZNK9QtService12ServiceFwIPC10metaObjectEv @ 30 NONAME
+	_ZNK9QtService14RApaIPCSession11SendReceiveEiR14TRequestStatus @ 31 NONAME
+	_ZNK9QtService18RServiceIPCSession11SendReceiveEiR14TRequestStatus @ 32 NONAME
+	_ZTIN9QtService12ServiceFwIPCE @ 33 NONAME
+	_ZTIN9QtService19ServiceFwIPCFactoryE @ 34 NONAME
+	_ZTVN9QtService12ServiceFwIPCE @ 35 NONAME
+	_ZTVN9QtService19ServiceFwIPCFactoryE @ 36 NONAME
+	_ZN9QtService12ServiceFwIPC11setUserDataEPKv @ 37 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/eabi/xqserviceipcserveru.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,37 @@
+EXPORTS
+	_ZN9QtService17ServiceIPCRequest10clientInfoEv @ 1 NONAME
+	_ZN9QtService17ServiceIPCRequest10getSessionEv @ 2 NONAME
+	_ZN9QtService17ServiceIPCRequest12getOperationEv @ 3 NONAME
+	_ZN9QtService17ServiceIPCRequest13setClientInfoEPNS_10ClientInfoE @ 4 NONAME
+	_ZN9QtService17ServiceIPCRequest14addRequestdataERK10QByteArray @ 5 NONAME
+	_ZN9QtService17ServiceIPCRequest15completeRequestEv @ 6 NONAME
+	_ZN9QtService17ServiceIPCRequest5writeERK10QByteArray @ 7 NONAME
+	_ZN9QtService17ServiceIPCRequest7getDataEv @ 8 NONAME
+	_ZN9QtService17ServiceIPCRequestC1EPNS_17ServiceIPCSessionExRK7QString @ 9 NONAME
+	_ZN9QtService17ServiceIPCRequestC1ERS0_ @ 10 NONAME
+	_ZN9QtService17ServiceIPCRequestC2EPNS_17ServiceIPCSessionExRK7QString @ 11 NONAME
+	_ZN9QtService17ServiceIPCRequestC2ERS0_ @ 12 NONAME
+	_ZN9QtService17ServiceIPCRequestD0Ev @ 13 NONAME
+	_ZN9QtService17ServiceIPCRequestD1Ev @ 14 NONAME
+	_ZN9QtService17ServiceIPCRequestD2Ev @ 15 NONAME
+	_ZN9QtService17ServiceIPCRequestaSERS0_ @ 16 NONAME
+	_ZN9QtService18ServiceFwIPCServer10disconnectEv @ 17 NONAME
+	_ZN9QtService18ServiceFwIPCServer6listenERK7QString @ 18 NONAME
+	_ZN9QtService18ServiceFwIPCServerC1EPNS_19MServiceIPCObserverEP7QObjectNS_19TServiceIPCBackendsE @ 19 NONAME
+	_ZN9QtService18ServiceFwIPCServerC2EPNS_19MServiceIPCObserverEP7QObjectNS_19TServiceIPCBackendsE @ 20 NONAME
+	_ZN9QtService18ServiceFwIPCServerD0Ev @ 21 NONAME
+	_ZN9QtService18ServiceFwIPCServerD1Ev @ 22 NONAME
+	_ZN9QtService18ServiceFwIPCServerD2Ev @ 23 NONAME
+	_ZTIN9QtService17ServiceIPCRequestE @ 24 NONAME
+	_ZTIN9QtService18ServiceFwIPCServerE @ 25 NONAME
+	_ZTVN9QtService17ServiceIPCRequestE @ 26 NONAME
+	_ZTVN9QtService18ServiceFwIPCServerE @ 27 NONAME
+	_ZN9QtService17ServiceIPCRequest5setIdEi @ 28 NONAME
+	_ZN9QtService17ServiceIPCRequest8setAsyncEb @ 29 NONAME
+	_ZNK9QtService17ServiceIPCRequest2idEv @ 30 NONAME
+	_ZNK9QtService17ServiceIPCRequest7isAsyncEv @ 31 NONAME
+	_ZN9QtService17ServiceIPCRequest14setRequestInfoEP13XQRequestInfo @ 32 NONAME
+	_ZN9QtService17ServiceIPCRequest15addSharableFileEP14XQSharableFilei @ 33 NONAME
+	_ZNK9QtService17ServiceIPCRequest11requestInfoEv @ 34 NONAME
+	_ZNK9QtService17ServiceIPCRequest12sharableFileEi @ 35 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+TEMPLATE = subdirs
+CONFIG += ordered
+
+SUBDIRS = \
+		xqserviceipc \
+		xqserviceipcserver
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/api_headers.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+XQSERVICE_API_HEADERS = \
+        xqserviceipcdefs.h \
+        xqserviceipc.h
+
+XQSERVICE_API_HEADERS_INTERNAL =
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,205 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  IPC Client side implementation
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqserviceipc.h"
+#include "xqserviceipc_p.h"
+#include "xqserviceipcfactory.h"
+
+namespace QtService
+{
+
+/*!
+    \class ServiceFwIPC
+    \brief Public interface class for IPC operations
+*/
+
+/*!
+    Destructor
+*/
+ServiceFwIPC::~ServiceFwIPC()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::~ServiceFwIPC");
+    delete d;
+}
+
+/*!
+    Constructor.
+    \param aParent Parent to this QObject
+    \param aBackend IPC backend to use
+*/
+ServiceFwIPC::ServiceFwIPC(QObject* aParent, TServiceIPCBackends aBackend) :
+                           QObject(aParent), iAsyncRequestPending(false)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::ServiceFwIPC");
+    // Private implementation pattern
+    //
+    d = ServiceFwIPCFactory::createBackend(aBackend);
+    d->q = this;
+}
+
+/*!
+    Connect to the server.
+    \param aServerName name of the server to connect to.
+    \return true if connected, false if not.
+*/
+bool ServiceFwIPC::connect(const QString& aServerName)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::connect");
+    return d->connect(aServerName);
+}
+
+/*!
+    Disconnect from the server.
+*/
+void ServiceFwIPC::disconnect()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::disconnect");
+    d->disconnect();
+}
+
+/*!
+    Starts the service.
+    \param aServerName Name of the server.
+    \param aExeName Executable of the server.
+    \return true if connected.
+*/
+bool ServiceFwIPC::startServer(const QString& aServerName,
+                                  const QString& aExeName,
+                                  quint64& processId,
+                                  ServiceIPCStartServerOptions options)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::startServer");
+    return d->startServer(aServerName, aExeName, processId, options);
+}
+
+/*!
+    Send a request synchronously.
+    \param aRequestType Name of the request.
+    \param aData Data to send.
+    \return true if sent successful, otherwise false.
+*/
+bool ServiceFwIPC::sendSync(const QString& aRequestType,
+                            const QByteArray& aData)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::sendSync");
+#ifdef _DEBUG
+    Q_ASSERT_X( aRequestType.contains(";") == false, "", "aRequestType cannot contain semicolons!" );
+#endif // _DEBUG
+    bool sent = d->sendSync(aRequestType, aData);
+    if (sent) {
+        sent = waitForRead();
+    }
+    return sent;
+}
+
+
+/*!
+    Send a request asynchronously.
+    \param aRequestType Name of the request.
+    \param aData Data to send.
+    \note Errors will be emitted via error() signal.
+*/
+void ServiceFwIPC::sendAsync(const QString& aRequestType,
+                             const QByteArray& aData)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::sendAsync");
+#ifdef _DEBUG
+    Q_ASSERT_X( aRequestType.contains(";") == false, "", "aRequestType cannot contain semicolons!" );
+#endif // _DEBUG
+    d->sendAsync(aRequestType, aData);
+    iAsyncRequestPending = true;
+}
+
+/*!
+    Asynchronous read.
+    \param aArray Array where read data will be put.
+*/
+void ServiceFwIPC::readAll(QByteArray& aArray)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::readAll(1)");
+    d->readAll(aArray);
+}
+
+/*!
+    Synchronous read.
+    \return Array which where read data is put.
+*/
+QByteArray ServiceFwIPC::readAll()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::readAll(2)");
+    return d->readAll();
+}
+
+/*!
+    Waits until data is available for reading.
+    \return true if data is available for reading.
+*/
+bool ServiceFwIPC::waitForRead()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::waitForRead");
+    return d->waitForRead();
+}
+
+/*!
+    Check if an async request is already pending.
+    \return true if an async request is pending,
+            false otherwise.
+*/
+bool ServiceFwIPC::requestPending()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::requestPending");
+    return iAsyncRequestPending;
+}
+
+void ServiceFwIPC::setUserData(const void *data)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPC::setUserData: %x", (int)data);
+    d->setUserData(data);
+}
+
+}
+
+
+
+/*!
+    \fn QtService::ServiceFwIPC::error( int aError )
+ 
+    Signal emitted to handle any errors.
+    \param aError error code
+    \note For local socket implementation, the error can be interpreted 
+          as QLocalSocket::LocalSocketError
+*/
+
+/*!
+    \fn QtService::ServiceFwIPC::readyRead()
+
+    Handle when a reply has been received for async requests.
+    Emitted when the entire data packet has been received
+*/
+
+/*!
+    \fn QtService::ServiceFwIPC::ReadDone()
+
+    Emitted when reading has completed.
+*/
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Service framework IPC Client side API
+*
+*/
+
+#ifndef XQ_SERVICEIPC_CLIENT_H
+#define XQ_SERVICEIPC_CLIENT_H
+
+#include <QtCore>
+#include "xqserviceipcdefs.h"
+#include <xqserviceerrdefs.h>
+
+namespace QtService {
+    
+    class ServiceFwIPCPrivate;
+    
+    class SFWIPC_EXPORT ServiceFwIPC : public QObject
+    {
+    Q_OBJECT
+    public:
+
+        //! ServiceFwIPC::ServiceIPCErrors
+        /*!
+         This enum describes the errors that may be returned by the IPC.
+         */
+        enum ServiceIPCErrors
+            {
+            EConnectionError = IPC_ERR_START_VALUE, /*!< Error in IPC Connection */
+            EConnectionClosed,                      /*!< IPC Connection is closed */
+            EServerNotFound,                        /*!< Can not find server */
+            EIPCError,                              /*!< Known IPC error defined by SDK */
+            EUnknownError,                          /*!< Unknown IPC error */
+            ERequestPending,                        /*!< Already pending request */
+            EMessageNotFound,                       /*!< Message slot not found */
+            EArgumentError                          /*!< Argument error */
+            };
+
+        enum ServiceIPCStartServerOptions
+            {
+            EStartInNormalMode = 0,
+            EStartInEmbeddedMode = 1
+            };
+
+    public:
+        virtual ~ServiceFwIPC();
+    
+        ServiceFwIPC(QObject* aParent, TServiceIPCBackends aBackend = EDefaultIPC);
+    
+    public:
+        bool connect(const QString& aServerName);
+    
+        void disconnect();
+    
+        bool startServer(const QString& aServerName, const QString& aExeName, quint64& processId, ServiceIPCStartServerOptions options = EStartInNormalMode);
+    
+        bool sendSync(const QString& aRequestType, const QByteArray& aData);
+    
+        void sendAsync(const QString& aRequestType, const QByteArray& aData);
+        
+	        
+        //async
+        void readAll(QByteArray& aArray);
+        
+        //sync
+        QByteArray readAll();
+    
+        bool requestPending();
+
+        void setUserData(const void *data);
+    
+    private:
+        bool waitForRead();
+    
+        signals:
+    
+        void error(int aError);
+    
+        void readyRead();
+        
+        void ReadDone();
+    
+        // Member Variables
+    protected:
+        bool iAsyncRequestPending;
+
+        friend class ServiceFwIPCPrivate;
+        ServiceFwIPCPrivate* d;
+    };
+
+}
+#endif // XQ_SERVICEIPC_CLIENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,64 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:  Service Framework IPC
+#
+
+TEMPLATE = lib
+TARGET = xqserviceipcclient
+
+XQSERVICE_ROOT=../..
+        
+include(api_headers.pri)
+include($$XQSERVICE_ROOT/xqservicebase.pri)
+
+QT -=gui
+QT +=network
+
+#Sources
+HEADERS += xqserviceipcdefs.h \
+           xqserviceipc_p.h \
+           xqserviceipc.h \ 
+           xqserviceipcfactory.h
+SOURCES += xqserviceipc.cpp \ 
+           xqserviceipcfactory.cpp
+
+
+LIBS += -lxqserviceutil -lapparc -lefsrv
+
+DEFINES += QT_MAKE_IPC_DLL
+
+# Symbian Specifics
+# Old UID3 102829E9
+symbian {
+    TARGET.UID3 = 0x2002871A
+    TARGET.VID = VID_DEFAULT
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+    TARGET.EPOCALLOWDLLDATA = 1
+
+    HEADERS += xqserviceipc_symbian.h \
+               xqserviceipc_symbiansession.h \
+               xqserviceipc_apasymbian.h \
+               xqserviceipc_apasymbiansession.h
+    SOURCES += xqserviceipc_symbian.cpp \
+               xqserviceipc_symbiansession.cpp \
+               xqserviceipc_apasymbian.cpp \
+               xqserviceipc_apasymbiansession.cpp
+#    BLD_INF_RULES.prj_exports += \
+#        "xqserviceipcdefs.h       ..\..\inc\xqserviceipcdefs.h" \
+#        "xqserviceipc.h           ..\..\inc\xqserviceipc.h" 
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc_apasymbian.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,488 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Implementation for a Symbian APA SERVER IPC Client
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <QtCore/qobject.h>
+#include <e32base.h>
+#include <e32cmn.h>
+#include <apaserverapp.h>
+#include <coemain.h>
+#include "xqserviceipc_apasymbian.h"
+#include "xqrequestutil.h"
+
+#include <xqservicemanager.h>
+
+namespace QtService
+{
+const TInt KIPCOperation = RApaAppServiceBase::KServiceCmdBase;
+const TInt KIPCGetBuffer = KIPCOperation+1;
+const TInt KIPCOperationWithSharableFile = KIPCOperation+2;  // Sharable file support
+
+const TInt KServerMajorVersionNumber = 1;
+const TInt KServerMinorVersionNumber = 0;
+const TInt KServerBuildVersionNumber = 0;
+
+
+/*!
+    \class CApaSymbianIPC
+    \brief Symbian Client backend for the service IPC
+*/
+
+/*!
+    Constructor.
+*/
+CApaSymbianIPC::CApaSymbianIPC() :
+    CActive(CActive::EPriorityStandard), iDataSize(0)
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::CApaSymbianIPC");
+    CActiveScheduler::Add(this);
+}
+
+/*!
+    Destructor.
+*/
+CApaSymbianIPC::~CApaSymbianIPC()
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::~CApaSymbianIPC");
+    Cancel();
+    delete iAsyncData;
+    delete iRequestData;
+}
+
+/*!
+    2nd phased constructor.
+*/
+void CApaSymbianIPC::ConstructL()
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::ConstructL");
+	iServerExitMonitor = NULL;
+}
+
+/*!
+    Two Phased Constructor.
+*/
+CApaSymbianIPC* CApaSymbianIPC::NewL()
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::NewL");
+    CApaSymbianIPC* self = new(ELeave) CApaSymbianIPC();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+}
+
+/*!
+    Connect to the server.
+    \param aServerName Name of the server to connect to.
+    \return true if connected, false if not.
+*/
+bool CApaSymbianIPC::connect( const QString& aServerName )
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::connect");
+    // Version informaton
+    TVersion version(KServerMajorVersionNumber, 
+                     KServerMinorVersionNumber, 
+                     KServerBuildVersionNumber);
+    TPtrC serverName(reinterpret_cast<const TUint16*> (aServerName.utf16()));
+    TInt err = iSession.Connect(serverName, version);
+
+    if (!err) {
+        StartExitMonitor();
+    }
+    
+    return (err == KErrNone);
+}
+
+/*!
+    Disconnect from the server.
+*/
+void CApaSymbianIPC::disconnect()
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::disconnect");
+    // Note !
+    // iServerExitMonitor->Cancel will cause request cancellation 
+    // in CApaServerSymbianSession::ServiceL() with error code KErrCancel
+    if (iServerExitMonitor) {
+        iServerExitMonitor->Cancel();
+        delete iServerExitMonitor;
+        iServerExitMonitor = NULL;
+    }
+    iSession.Close();
+}
+
+/*!
+    Starts the service.
+    \param aServerName Server name.
+    \param aExeName Server executable name.
+    \return true if start was successful.
+*/
+bool CApaSymbianIPC::startServer( const QString& aServerName, 
+                                  const QString& /*aExeName*/, 
+                                  quint64& processId,
+                                  int options)
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::startServer");
+    XQServiceManager mng;
+    bool embedded = (options == ServiceFwIPC::EStartInEmbeddedMode) ? true : false;
+    int appUid = 0;
+    int ret=0;
+    if (userData == NULL)
+    {
+        XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::No user data in start");
+        ret = mng.startServer(aServerName,embedded,appUid,processId);
+    }
+    else
+    {
+        XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::Apply user data in start");
+        ret = mng.startServer(aServerName,embedded,appUid,processId, userData);
+    }
+    
+    if (ret)
+        {
+        emitError(ret);
+        }
+    iSession.setServiceUid(appUid);
+    return (ret == KErrNone);
+}
+
+/*!
+    Send a request synchronously.
+    \param aRequestType Type of request to send to the server.
+    \param aData Data to send to the server.
+    \return true if send was successful.
+*/
+bool CApaSymbianIPC::sendSync( const QString& aRequestType, const QByteArray& aData )
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::sendSync");
+    // Convert from QString to TPtr
+    TPtrC request(reinterpret_cast<const TUint16*> (aRequestType.utf16()));
+    TPtrC8 data(reinterpret_cast<const TUint8*> (aData.constData()), aData.length());
+
+    // Send data, 0 is new op
+    TInt err=KErrNone;
+    TInt dataSize=0;
+    TIpcArgs args(&request, &data);
+    TInt cmd = KIPCOperation;
+    if (userData != 0)
+    {
+        XQRequestUtil *util = (XQRequestUtil *)userData;
+        // Only the first transferred
+        if (TransferSharableFile(&args, util->getSharableFile(0)))
+        {
+            cmd = KIPCOperationWithSharableFile;
+        }
+    }
+    
+    TRAP( err, dataSize = iSession.SendReceiveL(cmd,args) );
+
+    // map return value
+    if (err == KErrNone) {
+        iDataSize = dataSize;
+    }
+    
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::sendSync status=%s", err);
+    
+    return (err == KErrNone);
+}
+
+
+/*!
+    Read sync.
+    \return Result of read as QByteArray.
+*/
+QByteArray CApaSymbianIPC::readAll()
+{
+    // this is sync operation
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::readAll");
+    QByteArray rtn;
+    TInt err(KErrNone);
+    TRAP( err, rtn = doReadAllL() );
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::readAll status=%d",err);
+    if ( err )
+        {
+        emitError(err);
+        }
+    return rtn;
+}
+
+/**
+* read sync
+*/
+QByteArray CApaSymbianIPC::doReadAllL()
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::doReadAllL");
+    // Read the data via IPC
+    CBufBase* buf = CBufFlat::NewL(iDataSize);
+    CleanupStack::PushL(buf);
+    buf->ResizeL(iDataSize);
+    TPtr8 ptr(buf->Ptr(0));
+    iSession.SendReceiveL(KIPCGetBuffer, TIpcArgs(&ptr));
+
+    QByteArray retData((char*) ptr.Ptr(), ptr.Length());
+
+    CleanupStack::PopAndDestroy(buf);
+
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::doReadAllL DONE");
+    
+    // Deep copy, return variable is implicitly shared
+    return retData;
+}
+
+
+
+/*!
+    Send a request asynchronously.
+    \param aRequestType Type of request to send to the server.
+    \param aData Data to send to the server.
+*/
+void CApaSymbianIPC::sendAsync(const QString& aRequestType,
+							   const QByteArray& aData )
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::sendAsync");
+    delete iRequestData;
+    iRequestData = NULL;
+    TPtrC request(reinterpret_cast<const TUint16*> (aRequestType.utf16()));
+    iRequestData = request.Alloc();
+    delete iAsyncData;
+    iAsyncData = NULL;
+    TPtrC8 data(reinterpret_cast<const TUint8*> (aData.constData()), aData.length());
+    iAsyncData = data.Alloc();
+
+    // Send data
+    iRequestDataPtr.Set(*iRequestData);
+    iAsyncDataPtr.Set(*iAsyncData);
+    TIpcArgs args(&iRequestDataPtr, &iAsyncDataPtr);
+
+    TInt cmd = KIPCOperation;
+    if (userData != 0)
+    {
+        XQRequestUtil *util = (XQRequestUtil *)userData;
+        // Only the first transferred
+        if (TransferSharableFile(&args, util->getSharableFile(0)))
+        {
+            cmd = KIPCOperationWithSharableFile;
+        }
+    }
+    
+    iSession.SendReceive(cmd, args, iStatus);
+    iState = ESend;
+    SetActive();
+}
+
+/*
+ * read async
+ */
+void CApaSymbianIPC::readAll(QByteArray& aArray)
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::readAll");
+
+	// this is async operation
+    TInt err(KErrNone);
+    TRAP(err, doReadAllL(aArray ));
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::readAll status=%d",err);
+    if (err)
+        {
+        emitError(err);
+        }
+    
+}
+
+/*!
+    Reads all data pending in the buffer, leaves if an error occured
+    \return QByteArray Containing the result data.
+*/
+void CApaSymbianIPC::doReadAllL(QByteArray& aArray)
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::doReadAllL");
+    
+	//shouldn't be active when this is called
+    if (IsActive())
+        {
+        User::LeaveIfError(KErrGeneral);
+        }
+	
+    iArray = &aArray;
+          
+    
+    iBuf.CreateL(iDataSize);
+    
+    iSession.SendReceive(KIPCGetBuffer, TIpcArgs(&iBuf), iStatus);
+    
+    iState = ERead;
+    SetActive();
+}
+
+
+/*!
+    Maps error codes from Symbian error codes to Service IPC error codes
+    \param aError Symbian error code.
+    \return Mapped error code.
+*/
+int CApaSymbianIPC::doMapErrors(TInt aError)
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::doMapErrors");
+    int error(ERROR_NoError);
+    switch (aError) {
+    case KErrNone: {
+        error = ERROR_NoError;
+        break;
+    }
+    case KErrPermissionDenied:
+    case KErrServerTerminated: {
+        error = ServiceFwIPC::EConnectionClosed;
+        break;
+    }
+                               
+    case KErrServerBusy:
+    case KErrCouldNotConnect:
+    {
+        error = ServiceFwIPC::EConnectionError;
+        break;
+    }
+    case KErrArgument:
+    {
+        error = ServiceFwIPC::EArgumentError;
+        break;
+    }
+        
+    case KErrNoMemory: {
+        error = ServiceFwIPC::EIPCError;
+        break;
+    }
+    case KErrNotFound: {
+        error = ServiceFwIPC::EServerNotFound;
+        break;
+    }
+    default: {
+        error = ServiceFwIPC::EUnknownError;
+        break;
+    }
+    }
+    return error;
+}
+/*!
+    Waits until data is available for reading.
+    \return bool always true, no need to wait.
+*/
+bool CApaSymbianIPC::waitForRead()
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::waitForRead");
+    // Symbian Client-server is blocking, so no need to wait for read
+    return true;
+}
+
+/*!
+    Active object callback
+*/
+TInt CApaSymbianIPC::RunError(TInt err)
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::error %d", err);
+    emitError(doMapErrors(err));
+    
+    return KErrNone;
+}
+
+/*!
+    Active object RunL function.
+*/
+void CApaSymbianIPC::RunL()
+{
+    int err = iStatus.Int();
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::RunL %d", err);
+    User::LeaveIfError( err );
+    //todo: here the err is used to return le lenght of the data i would change this
+    // Callback to observers
+    //
+    switch (iState)
+        {
+        case ESend:
+            {
+            //here the err variable contains the length of retdata
+            if (err >= KErrNone)
+                {
+                iDataSize = err;
+                emitReadyRead();
+                }
+            
+            break;
+            }
+        case ERead:
+            {
+            QByteArray retData((char*) iBuf.Ptr(), iBuf.Length());
+            //pass the value back to upper layer
+            *iArray = retData;
+
+            delete iRequestData;
+            iRequestData = NULL;
+            delete iAsyncData;
+            iAsyncData = NULL;
+            iRequestDataPtr.Set(KNullDesC);
+            iAsyncDataPtr.Set(KNullDesC8);
+
+            emitReadDone();
+
+            break;
+            }
+        }
+}
+
+/*!
+    Active object cancel
+*/
+void CApaSymbianIPC::DoCancel()
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::DoCancel");
+    // We can't cancel in the IPC design.
+ 
+}
+
+void CApaSymbianIPC::StartExitMonitor()
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::StartExitMonitor");
+    if (iServerExitMonitor == NULL)
+        {
+        TInt err(KErrNone);
+        TRAP( err, iServerExitMonitor = CApaServerAppExitMonitor::NewL(iSession,
+                                                                        *this,
+                                                                        CActive::EPriorityStandard ));    
+        XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::StartExitMonitor status=%d",err);
+        }
+}
+
+/*!
+    HandleServerAppExit
+*/
+void CApaSymbianIPC::HandleServerAppExit(int aReason)
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianIPC::HandleServerAppExit");
+    if (iServerExitMonitor) {
+        iServerExitMonitor->Cancel();
+        delete iServerExitMonitor;
+        iServerExitMonitor = NULL;
+    }
+    emitError(doMapErrors(aReason));
+}
+
+
+
+} // namespace QtService
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc_apasymbian.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,119 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Symbian client side implementation for APA SERVER IPC
+*
+*/
+
+#ifndef C_XQSERVICEIPC_APASYMBIAN_H
+#define C_XQSERVICEIPC_APASYMBIAN_H
+
+#include <xqserviceipc_p.h>
+#include <xqsharablefile.h>
+#include "xqserviceipc_apasymbiansession.h"
+
+namespace QtService {
+
+    // Sharable file utility
+    bool TransferSharableFile(TIpcArgs *args, const XQSharableFile *file);
+    
+    class CApaSymbianIPC : public CActive, public ServiceFwIPCPrivate,
+                           public MApaServerAppExitObserver
+        {
+    
+    public:
+    
+        virtual ~CApaSymbianIPC();
+    
+        static CApaSymbianIPC* NewL();
+    
+        // From ServiceFwIPCPrivate
+    protected:
+    
+        bool connect(const QString& aServerName);
+    
+        void disconnect();
+    
+        bool startServer(const QString& aServerName, const QString& aExeName, quint64& processId, int options = 0);
+
+        bool sendSync(const QString& aRequestType, const QByteArray& aData);
+    
+        void sendAsync(const QString& aRequestType, const QByteArray& aData);
+    
+        void readAll(QByteArray& aArray);
+        
+        QByteArray readAll();
+    
+        bool waitForRead();
+    
+        // From CActive
+    protected:
+    
+        void RunL();
+        
+        TInt RunError(TInt err);
+        
+        void DoCancel();
+        
+        // From MApaServerAppExitObserver
+    protected:
+        /**
+        * HandleServerAppExit
+        * Gets called when server application exits
+        */
+        void HandleServerAppExit( int aReason );   
+        
+    private:
+    
+        enum TState
+            {
+            ESend,
+            ERead,
+            EDone
+            };
+        
+        void doReadAllL(QByteArray& aArray);
+        
+        QByteArray doReadAllL();
+    
+        int doMapErrors( TInt aError );
+        
+    private:
+    
+        CApaSymbianIPC();
+        
+        void ConstructL();
+        
+        void StartExitMonitor();
+        
+    private:
+        RApaIPCSession iSession;
+        HBufC8* iAsyncData;  // member variable to keep alive any data for async ops
+        TPtrC8 iAsyncDataPtr;
+        HBufC* iRequestData;
+        TPtrC  iRequestDataPtr;
+        TInt iDataSize;
+        TState iState;
+        /**
+        * Exit monitor
+        */
+        CApaServerAppExitMonitor* iServerExitMonitor; 
+        QByteArray* iArray; //not owed
+        RBuf8 iBuf;
+    };
+}
+#endif // C_XQSERVICEIPC_APASYMBIAN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc_apasymbiansession.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,142 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqserviceipc_apasymbiansession.h"
+
+#include "xqserviceipcconst.h"
+#include <QString>
+
+#include <xqservicemanager.h>
+
+#include <QString>
+
+namespace QtService
+{
+// ============================== MEMBER FUNCTIONS ============================
+
+/*!
+    \class RApaIPCSession
+    \brief Symbian class encapsulating RMessage2 interface
+*/
+
+/*!
+    Send a message.
+    \param aFunction Function code.
+    \return message Completion code.
+*/
+TInt RApaIPCSession::SendReceiveL(TInt aFunction) const
+{
+    XQSERVICE_DEBUG_PRINT("RApaIPCSession::SendReceiveL(1)");
+    return User::LeaveIfError(RSessionBase::SendReceive(aFunction));
+}
+
+/*!
+    Send a message.
+    \param aFunction Function code.
+    \param aArgs Parameter to server.
+    \return Message completion code.
+*/
+TInt RApaIPCSession::SendReceiveL(TInt aFunction, const TIpcArgs& aArgs) const
+{
+    XQSERVICE_DEBUG_PRINT("RApaIPCSession::SendReceiveL(2)");
+    return User::LeaveIfError(RSessionBase::SendReceive(aFunction,aArgs));
+}
+
+/*!
+    Send message asynchronously.
+    \param aFunction Function code.
+    \param aStatus The request status object used to contain the 
+           completion status of the request.
+*/
+EXPORT_C void RApaIPCSession::SendReceive(TInt aFunction,
+                                          TRequestStatus& aStatus) const
+{
+    XQSERVICE_DEBUG_PRINT("RApaIPCSession::SendReceive(1)");
+    RSessionBase::SendReceive(aFunction,aStatus);
+    XQSERVICE_DEBUG_PRINT("RApaIPCSession::SendReceive(1) done");
+}
+
+/*!
+    Send message asynchronously.
+    \param aFunction Function code.
+    \param aArgs Parameter to server.
+    \param aStatus The request status object used to contain the 
+           completion status of the request.
+*/
+void RApaIPCSession::SendReceive(TInt aFunction,
+                                       const TIpcArgs& aArgs,
+                                       TRequestStatus& aStatus) const
+{
+    XQSERVICE_DEBUG_PRINT("RApaIPCSession::SendReceive(2)");
+    RSessionBase::SendReceive(aFunction,aArgs,aStatus);
+    XQSERVICE_DEBUG_PRINT("RApaIPCSession::SendReceive(2) done");
+}
+
+/*!
+    Connect to server.
+    \param aServer Server name.
+    \param aVersion Version of the server.
+    \return KErrNone on success, otherwise system error code.
+*/
+TInt RApaIPCSession::Connect(const TDesC& aServer, 
+                                 const TVersion& aVersion)
+{
+    QString server = QString::fromUtf16(aServer.Ptr(), aServer.Length());
+    XQSERVICE_DEBUG_PRINT("RApaIPCSession::Connect %s", qPrintable(server));
+    iVersion = aVersion;
+    return CreateSession(aServer, aVersion, 10);
+}
+
+/*!
+    Get version info.
+    \return Version info.
+*/
+TVersion RApaIPCSession::Version() const
+{
+    XQSERVICE_DEBUG_PRINT("RApaIPCSession::Version");
+    return iVersion;
+}
+
+/*!
+    Get service uid.
+    \return Service uid.
+*/
+TUid RApaIPCSession::ServiceUid() const
+{
+    XQSERVICE_DEBUG_PRINT("RApaIPCSession::ServiceUid");
+    return iUid;
+}
+
+/*!
+    Set service uid.
+    \param uid Service uid to set.
+*/
+void RApaIPCSession::setServiceUid(TInt uid)
+{
+    XQSERVICE_DEBUG_PRINT("RApaIPCSession::setServiceUid %x", uid);
+    iUid.iUid = uid;
+}
+
+}
+
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc_apasymbiansession.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Client session class to  server
+*
+*/
+
+#ifndef C_XQSERVICEIPC_APASYMBIANSESSION_H
+#define C_XQSERVICEIPC_APASYMBIANSESSION_H
+
+#include <QtCore/qobject.h>
+#include <e32std.h>
+#include <apaserverapp.h>
+
+#include <apaid.h>
+
+namespace QtService {
+    
+    class RApaIPCSession : public RApaAppServiceBase
+        {
+    public:
+        TInt  Connect(const TDesC& aServer, 
+                      const TVersion& aVersion);
+    
+        TVersion Version() const;
+    
+        TInt SendReceiveL(TInt aFunction) const;
+    
+        TInt SendReceiveL(TInt aFunction, const TIpcArgs& aArgs) const;
+    
+        void SendReceive(TInt aFunction, TRequestStatus& aStatus) const;
+    
+        void SendReceive(TInt aFunction,
+                         const TIpcArgs& aArgs,
+                         TRequestStatus& aStatus) const;
+        /**
+        * from RApaAppServiceBase
+        */
+        TUid ServiceUid() const;
+
+        void setServiceUid(TInt uid);
+        
+    private:
+        TVersion iVersion;
+        TUid         iUid;
+        };
+}
+#endif // C_XQSERVICEIPC_APASYMBIANSESSION_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Service Framework Secure IPC Private implementation base class
+*
+*/
+
+#ifndef XQ_SERVICEIPC_PRIVATE_H
+#define XQ_SERVICEIPC_PRIVATE_H
+
+#include <QtCore>
+#include <QByteArray>
+#include "xqserviceipc.h"
+
+namespace QtService {
+
+    /*!
+        \class ServiceFwIPCPrivate
+        \brief Private implementation class for IPC
+    */
+    class ServiceFwIPC;
+    class ServiceFwIPCPrivate
+    {
+    public:
+        /*!
+            Virtual destructor
+        */
+        virtual ~ServiceFwIPCPrivate() {};
+
+    
+        // Virtual functions 
+    
+        /*!
+            Connect to the server.
+            \param aServerName Name of the server to connect to.
+            \return true if connected, false if not.
+        */
+        virtual bool connect(const QString& aServerName) = 0;
+    
+        /*!
+            Disconnect from the server.
+        */
+        virtual void disconnect() = 0;
+    
+        /*!
+            Starts the service.
+            \note Refer to public API ServiceFwIPC.
+        */
+        virtual bool startServer(const QString& aServerName,
+                                 const QString& aExeName,
+                                 quint64& processId,
+                                 int options = 0 ) = 0;
+    
+        /*!
+            Send a request synchronously.
+            \note Refer to public API ServiceFwIPC.
+        */
+        virtual bool sendSync(const QString& aRequestType,
+                              const QByteArray& aData) = 0;
+    
+        /*!
+            Send a request asynchronously.
+            \note Refer to public API ServiceFwIPC.
+        */
+        virtual void sendAsync(const QString& aRequestType,
+                               const QByteArray& aData) = 0;
+    
+        /*!
+            Reads all data pending in the buffer.
+            \note Refer to public API ServiceFwIPC.
+        */
+        virtual void readAll(QByteArray& aArray) = 0;
+        
+        virtual QByteArray readAll() = 0;
+		
+        /*!
+            Waits until data is available for reading.
+            \note Refer to public API ServiceFwIPC.
+        */
+        virtual bool waitForRead() = 0;
+
+        virtual void setUserData(const void *data) {userData = data;};
+        
+    protected:
+        // TODO: Move to inl file
+        inline void emitReadyRead()
+        {
+            if (q->iAsyncRequestPending) {
+                q->iAsyncRequestPending = false;
+                emit q->readyRead();
+            }
+        }
+    
+        inline void emitError(int aError)
+        {
+            emit q->error(aError);
+        }
+        
+        inline void emitReadDone()
+        {
+            emit q->ReadDone();
+        }
+        
+        inline bool asyncPending()
+        {
+            return q->requestPending();
+        }
+
+    protected:
+        const void *userData;  // not owned
+        
+    private:
+        friend class ServiceFwIPC;
+        ServiceFwIPC* q;  // not owned
+    };
+
+}
+#endif // XQ_SERVICEIPC_PRIVATE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc_symbian.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,451 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Implementation for a Symbian IPC Client
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <QtCore/qobject.h>
+#include <e32base.h>
+#include <e32cmn.h>
+#include "xqserviceipc_symbian.h"
+#include "xqrequestutil.h"
+
+namespace QtService
+{
+const TInt KIPCOperation = 0;
+const TInt KIPCGetBuffer = 1;
+const TInt KIPCCancel = 2;
+const TInt KIPCOperationWithSharableFile = 3;  // Sharable file support
+
+const TInt KServerMajorVersionNumber = 1;
+const TInt KServerMinorVersionNumber = 0;
+const TInt KServerBuildVersionNumber = 0;
+
+
+
+/*!
+    \class CServiceSymbianIPC
+    \brief Symbian Client backend for the service IPC
+*/
+
+/*!
+    Constructor.
+*/
+CServiceSymbianIPC::CServiceSymbianIPC() :
+    CActive(CActive::EPriorityStandard), iDataSize(0)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::CServiceSymbianIPC");
+    CActiveScheduler::Add(this);
+}
+
+/*!
+    Destructor.
+*/
+CServiceSymbianIPC::~CServiceSymbianIPC()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::~CServiceSymbianIPC");
+    Cancel();
+    delete iAsyncData;
+    delete iRequestData;
+}
+
+/*!
+    2nd phased constructor.
+*/
+void CServiceSymbianIPC::ConstructL()
+{
+}
+
+/*!
+    Two Phased Constructor.
+*/
+CServiceSymbianIPC* CServiceSymbianIPC::NewL()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::NewL");
+    CServiceSymbianIPC* self = new (ELeave) CServiceSymbianIPC();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+}
+
+/*!
+    Connect to the server.
+    \param aServerName Name of the server to connect to.
+    \return true if connected, false if not.
+*/
+bool CServiceSymbianIPC::connect(const QString& aServerName)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::connect");
+    // Version informaton
+    TVersion version(KServerMajorVersionNumber, 
+                     KServerMinorVersionNumber, 
+                     KServerBuildVersionNumber);
+    TPtrC serverName(reinterpret_cast<const TUint16*> (aServerName.utf16()));
+    TInt err = iSession.Connect(serverName, version);
+
+    return (err == KErrNone);
+}
+
+/*!
+    Disconnect from the server.
+*/
+void CServiceSymbianIPC::disconnect()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::disconnect");
+    Cancel();
+    iSession.Close();
+}
+
+/*!
+    Starts the service.
+    \param aServerName Server name.
+    \param aExeName Server executable name.
+    \return true if successful.
+*/
+bool CServiceSymbianIPC::startServer(const QString& /*aServerName*/,
+                                     const QString& aExeName,
+                                     quint64& /*processId*/,
+                                     int /*options*/)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::startServer");
+    TPtrC serverName(reinterpret_cast<const TUint16*> (aExeName.utf16()));
+    TInt err = iSession.StartServer(serverName);
+    return (err == KErrNone);
+}
+
+/*!
+    Send a request synchronously.
+    \param aRequestType Type of request to send to the server.
+    \param aData Data to send to the server.
+    \return true if successful.
+*/
+bool CServiceSymbianIPC::sendSync(const QString& aRequestType,
+                                  const QByteArray& aData)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::sendSync");
+    // Convert from QString to TPtr
+    TPtrC request(reinterpret_cast<const TUint16*> (aRequestType.utf16()));
+    TPtrC8 data(reinterpret_cast<const TUint8*> (aData.constData()), aData.length());
+
+    // Send data, 0 is new op
+    TInt err=KErrNone;
+    TInt dataSize=0;
+    TIpcArgs args(&request, &data);
+    TInt cmd = KIPCOperation;
+    if (userData != 0)
+    {
+        XQRequestUtil *util = (XQRequestUtil *)userData;
+        // Only the first transferred
+        if (TransferSharableFile(&args, util->getSharableFile(0)))
+        {
+            cmd = KIPCOperationWithSharableFile;
+        }
+    }
+    TRAP( err, dataSize = iSession.SendReceiveL(cmd,args) );
+
+    // map return value
+    if (err == KErrNone) {
+        iDataSize = dataSize;
+    }
+    
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::sendSync status%d", err);
+    return (err == KErrNone);
+}
+
+
+/*!
+    Read sync.
+    \return Result of the read.
+*/
+QByteArray CServiceSymbianIPC::readAll()
+{
+// this is sync operation
+
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::readAll");
+    QByteArray rtn;
+    
+    TInt err(KErrNone);
+    TRAP( err, rtn = doReadAllL() );
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::readAll status=%d",err);
+    
+    if ( err )
+        {
+        emitError(err);
+        }
+    
+    return rtn;
+}
+
+/*!
+    Read sync.
+*/
+QByteArray CServiceSymbianIPC::doReadAllL()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::doReadAllL");
+    // Read the data via IPC
+    //
+    CBufBase* buf = CBufFlat::NewL(iDataSize);
+    CleanupStack::PushL(buf);
+    buf->ResizeL(iDataSize);
+    TPtr8 ptr(buf->Ptr(0));
+    iSession.SendReceiveL(KIPCGetBuffer, TIpcArgs(&ptr));
+
+    QByteArray retData((char*) ptr.Ptr(), ptr.Length());
+
+    CleanupStack::PopAndDestroy(buf);
+
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::doReadAllL DONE");
+    // Deep copy, return variable is implicitly shared
+    return retData;
+}
+
+
+
+/*!
+    Send a request asynchronously.
+    \param aRequestType Type of request to send to the server.
+    \param aData Data to send to the server.
+*/
+void CServiceSymbianIPC::sendAsync(const QString& aRequestType,
+                                   const QByteArray& aData)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::sendAsync");
+    delete iRequestData;
+    iRequestData = NULL;
+    TPtrC request(reinterpret_cast<const TUint16*> (aRequestType.utf16()));
+    iRequestData = request.Alloc();
+    delete iAsyncData;
+    iAsyncData = NULL;
+    TPtrC8 data(reinterpret_cast<const TUint8*> (aData.constData()), aData.length());
+    iAsyncData = data.Alloc();
+
+    // Send data
+    iRequestDataPtr.Set(*iRequestData);
+    iAsyncDataPtr.Set(*iAsyncData);
+    TIpcArgs args(&iRequestDataPtr, &iAsyncDataPtr);
+
+    TInt cmd = KIPCOperation;
+    if (userData != 0)
+    {
+        XQRequestUtil *util = (XQRequestUtil *)userData;
+        // Only the first transferred
+        if (TransferSharableFile(&args, util->getSharableFile(0)))
+        {
+            cmd = KIPCOperationWithSharableFile;
+        }
+    }
+
+    iSession.SendReceive(cmd, args, iStatus);
+    iState = ESend;
+    SetActive();
+}
+/*!
+    Read async.
+    \param aArray Array where result will be put.
+*/
+void CServiceSymbianIPC::readAll(QByteArray& aArray)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::readAll");
+	
+    // this is async operation
+    TInt err(KErrNone);
+    TRAP(err, doReadAllL(aArray));
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::readAll status=%d", err);
+    if (err)
+        {
+        emitError(err);
+        }
+    
+}
+
+/*!
+    Reads all data pending in the buffer, leaves if an error occured.
+    \param aArray QByteArray containing the result data.
+*/
+void CServiceSymbianIPC::doReadAllL(QByteArray& aArray)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::doReadAllL");
+    //shouldn't be active when this is called
+    if ( IsActive() )
+        {
+        User::LeaveIfError( KErrGeneral );
+        }  
+
+    iArray = &aArray;
+        
+    iBuf.CreateL(iDataSize);
+    
+    iSession.SendReceive(KIPCGetBuffer, TIpcArgs(&iBuf), iStatus );
+    
+    iState = ERead;
+    SetActive();
+}
+
+
+/*!
+    Maps error codes from Symbian error codes to Service IPC error codes.
+    \param aError Symbian error code.
+    \return Mapped error code.
+*/
+int CServiceSymbianIPC::doMapErrors(TInt aError)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::doMapErrors");
+    int error(ERROR_NoError);
+    switch (aError) {
+    case KErrNone: {
+        error = ERROR_NoError;
+        break;
+    }
+    case KErrPermissionDenied:
+    case KErrServerTerminated: {
+        error = ServiceFwIPC::EConnectionClosed;
+        break;
+    }
+    case KErrServerBusy: {
+        error = ServiceFwIPC::EConnectionError;
+        break;
+    }
+                         
+    case KErrArgument:
+    {
+        error = XQService::EArgumentError;
+        break;
+    }
+        
+    case KErrNoMemory: {
+        error = ServiceFwIPC::EIPCError;
+        break;
+    }
+    default: {
+        error = ServiceFwIPC::EUnknownError;
+        break;
+    }
+    }
+    return error;
+}
+/*!
+    Waits until data is available for reading 
+    \return bool Always true, no need to wait
+*/
+bool CServiceSymbianIPC::waitForRead()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::waitForRead");   
+    // Symbian Client-server is blocking, so no need to wait for read
+    return true;
+}
+
+/*!
+    Active object callback.
+*/
+TInt CServiceSymbianIPC::RunError(TInt err)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::error");
+    emitError(doMapErrors(err));
+    return KErrNone;
+}
+
+/*!
+    Active object RunL() function.
+*/
+void CServiceSymbianIPC::RunL()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::RunL");   
+    TInt err = iStatus.Int();
+    User::LeaveIfError(err);
+    //todo: here the err is used to return le lenght of the data i would change this
+    // Callback to observers
+    //
+    switch (iState)
+        {
+        case ESend:
+            {
+            //here the err variable contains the length of retdata
+            if (err >= KErrNone)
+                {
+                iDataSize = err;
+                emitReadyRead();
+                }
+            
+            break;
+            }
+        case ERead:
+            {
+            QByteArray retData((char*) iBuf.Ptr(), iBuf.Length());
+            //pass the value back to upper layer
+            *iArray = retData;
+            
+            delete iRequestData;
+            iRequestData = NULL;
+            delete iAsyncData;
+            iAsyncData = NULL;
+            iRequestDataPtr.Set(KNullDesC);
+            iAsyncDataPtr.Set(KNullDesC8);
+
+            emitReadDone();
+            
+            break;
+            }
+        }
+}
+
+/*!
+    Active object cancel.
+*/
+void CServiceSymbianIPC::DoCancel()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::DoCancel");
+    TRAP_IGNORE(iSession.SendReceiveL(KIPCCancel));
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianIPC::DoCancel DONE");
+}
+
+// Sharable file utility
+const TInt KRFsSlot = 2;
+const TInt KRFileSlot = 3;
+
+bool TransferSharableFile(TIpcArgs *args, const XQSharableFile *file)
+{
+    XQSERVICE_DEBUG_PRINT("TransferSharableFile");
+    if (!file)
+    {
+        XQSERVICE_DEBUG_PRINT("\tNo file");
+        return false;
+    }
+    
+    bool ret=false;
+    RFile handle;
+    if (file->getHandle(handle))
+    {
+        XQSERVICE_DEBUG_PRINT("\thandle OK");
+        TInt err = handle.TransferToServer(*args, KRFsSlot, KRFileSlot);
+        XQSERVICE_DEBUG_PRINT("TransferSharableFile:status=%d", err);
+        ret = (err == KErrNone);
+    }
+    else
+    {
+        XQSERVICE_DEBUG_PRINT("\thandle NOT OK");
+    }
+    
+    return ret;
+}
+
+
+}
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc_symbian.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Symbian client side implementation for IPC
+*
+*/
+
+#ifndef C_XQSERVICEIPC_SYMBIAN_H
+#define C_XQSERVICEIPC_SYMBIAN_H
+
+#include <QtCore/qobject.h>
+#include <xqserviceipc_p.h>
+#include <e32base.h>
+#include <xqsharablefile.h>
+#include "xqserviceipc_symbiansession.h"
+
+namespace QtService {
+    // Sharable file utility
+    bool TransferSharableFile(TIpcArgs *args, const XQSharableFile *file);
+    
+    class CServiceSymbianIPC : public CActive, public ServiceFwIPCPrivate
+    {
+    
+    public:
+    
+        virtual ~CServiceSymbianIPC();
+    
+        static CServiceSymbianIPC* NewL();
+    
+        // From ServiceFwIPCPrivate
+    protected:
+    
+        bool connect(const QString& aServerName);
+    
+        void disconnect();
+    
+        bool startServer(const QString& aServerName, const QString& aExeName, quint64& processId, int options = 0);
+    
+        bool sendSync(const QString& aRequestType, const QByteArray& aData);
+    
+        void sendAsync(const QString& aRequestType, const QByteArray& aData);
+    
+        void readAll( QByteArray& aArray );
+        
+        QByteArray readAll();
+    
+        bool waitForRead();
+    
+        // From CActive
+    protected:
+    
+        void RunL();
+
+        TInt RunError(TInt err);
+    
+        void DoCancel();
+    
+    private:
+        
+        enum TState
+            {
+            ESend,
+            ERead,
+            EDone
+            };
+        
+        void doReadAllL(QByteArray& aArray);
+        
+        QByteArray doReadAllL();
+    
+        int doMapErrors( TInt aError );
+        
+    private:
+    
+        CServiceSymbianIPC();
+    
+        void ConstructL();
+    
+    private:
+        RServiceIPCSession iSession;
+        HBufC8* iAsyncData; // member variable to keep alive any data for async ops
+        TPtrC8 iAsyncDataPtr;
+        HBufC* iRequestData;
+        TPtrC iRequestDataPtr;
+        TInt iDataSize;
+        TState iState;
+        QByteArray* iArray; //not owed
+        RBuf8 iBuf;
+    };
+
+}
+#endif // C_XQSERVICEIPC_SYMBIAN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc_symbiansession.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,144 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  implementation of playback session
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqserviceipc_symbiansession.h"
+
+namespace QtService
+{
+// ============================== MEMBER FUNCTIONS ============================
+
+/*!
+    \class RServiceIPCSession
+    \brief Symbian class encapsulating RMessage2 interface
+ */
+
+/*!
+    Send a message.
+    \param aFunction Function code.
+    \return Message completion code.
+ */
+TInt RServiceIPCSession::SendReceiveL(TInt aFunction) const
+{
+    XQSERVICE_DEBUG_PRINT("RServiceIPCSession::SendReceiveL(1)");
+    return User::LeaveIfError(RSessionBase::SendReceive(aFunction));
+}
+
+TInt RServiceIPCSession::Send(TInt aFunction, const TIpcArgs& aArgs) const
+{
+    XQSERVICE_DEBUG_PRINT("RServiceIPCSession::Send");
+    return RSessionBase::Send(aFunction, aArgs);
+}
+
+/*!
+    Send a message.
+    \param aFunction Function code.
+    \param aArgs Parameter to server.
+    \return Message completion code.
+ */
+TInt RServiceIPCSession::SendReceiveL(TInt aFunction, const TIpcArgs& aArgs) const
+{
+    XQSERVICE_DEBUG_PRINT("RServiceIPCSession::SendReceiveL(2)");
+    return User::LeaveIfError(RSessionBase::SendReceive(aFunction, aArgs));
+}
+
+/*!
+    Send message asynchronously.
+    \param aFunction Function code.
+    \param aStatus The request status object used to contain the 
+                   completion status of the request.
+*/
+EXPORT_C void RServiceIPCSession::SendReceive(TInt aFunction,
+                                              TRequestStatus& aStatus) const
+{
+    XQSERVICE_DEBUG_PRINT("RServiceIPCSession::SendReceive(1)");
+    RSessionBase::SendReceive(aFunction, aStatus);
+}
+
+/*!
+    Send message asynchronously.
+    \param aFunction Function code.
+    \param aArgs Parameter to server.
+    \param aStatus The request status object used to contain the
+                   completion status of the request.
+*/
+void RServiceIPCSession::SendReceive(TInt aFunction,
+                                     const TIpcArgs& aArgs,
+                                     TRequestStatus& aStatus) const
+{
+    XQSERVICE_DEBUG_PRINT("RServiceIPCSession::SendReceive(2)");
+    RSessionBase::SendReceive(aFunction, aArgs, aStatus);
+}
+
+/*!
+    Connect to server.
+    \param aServer server name.
+    \param aVersion version of the server.
+    \return KErrNone success, otherwise system error code.
+*/
+TInt RServiceIPCSession::Connect(const TDesC& aServer, const TVersion& aVersion)
+{
+    QString server = QString::fromUtf16(aServer.Ptr(), aServer.Length());
+    XQSERVICE_DEBUG_PRINT("RServiceIPCSession::Connect %s", qPrintable(server));
+    iVersion = aVersion;
+    return CreateSession(aServer, aVersion, 1);
+}
+
+/*!
+    Get version info.
+    \return Version info.
+*/
+TVersion RServiceIPCSession::Version() const
+{
+    XQSERVICE_DEBUG_PRINT("RServiceIPCSession::Version");
+    return iVersion;
+}
+
+/*!
+    Start the server .
+    \param aImage Binary name to start.
+    \return KErrNone if started properly.
+*/
+TInt RServiceIPCSession::StartServer(const TDesC& aImage)
+{
+    XQSERVICE_DEBUG_PRINT("RServiceIPCSession::StartServer");
+    RProcess server;
+    TInt ret = server.Create(aImage, KNullDesC);
+    if (ret == KErrNone) {
+        TRequestStatus status;
+        XQSERVICE_DEBUG_PRINT("RServiceIPCSession::Rendezvouz");
+        server.Rendezvous(status);
+        if (status != KRequestPending)
+            server.Kill(0);
+        else
+            server.Resume();
+        User::WaitForRequest(status);
+        XQSERVICE_DEBUG_PRINT("RServiceIPCSession::Rendezvouz done");
+        ret = (server.ExitType() == EExitPanic) ? KErrGeneral : status.Int();
+        server.Close();
+    }
+    return ret;
+}
+
+}
+
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipc_symbiansession.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Client session class to  server
+*
+*/
+
+#ifndef C_XQSERVICEIPC_SYMBIANSESSION_H
+#define C_XQSERVICEIPC_SYMBIANSESSION_H
+
+#include <QtCore/qobject.h>
+#include <e32std.h>
+namespace QtService {
+    
+    class RServiceIPCSession : public RSessionBase
+    {
+    public:
+        TInt Connect(const TDesC& aServer, const TVersion& aVersion);
+    
+        TVersion Version() const;
+    
+        TInt SendReceiveL(TInt aFunction) const;
+    
+        TInt SendReceiveL(TInt aFunction, const TIpcArgs& aArgs) const;
+    
+        void SendReceive(TInt aFunction, TRequestStatus& aStatus) const;
+    
+        void SendReceive(TInt aFunction,
+                         const TIpcArgs& aArgs,
+                         TRequestStatus& aStatus) const;
+        
+		TInt Send(TInt aFunction, const TIpcArgs& aArgs) const;
+		
+        TInt StartServer(const TDesC& aImage);
+    
+    private:
+        TVersion iVersion;
+    };
+}
+#endif // C_XQSERVICEIPC_SYMBIANSESSION_H
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipcdefs.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQSERVICEIPCDEFS_H
+#define XQSERVICEIPCDEFS_H
+
+#include <Qt/qglobal.h>
+
+namespace QtService {
+
+#ifdef QT_MAKE_IPC_DLL
+    # define SFWIPC_EXPORT Q_DECL_EXPORT
+#else
+    # define SFWIPC_EXPORT Q_DECL_IMPORT
+#endif
+
+#ifdef QT_MAKE_IPC_SERVER_DLL
+    # define SFWIPCSRV_EXPORT Q_DECL_EXPORT
+#else
+    # define SFWIPCSRV_EXPORT Q_DECL_IMPORT
+#endif
+
+enum TServiceIPCBackends
+    {
+    EDefaultIPC, 
+    ESymbianServer, 
+    ESymbianApaServer,
+    };
+
+static const char FUNCTIONSEM[] = "_funclock";
+static const char SERVERSEM[] = "_serverlock";
+static const char SERVERNOTSTARTED[] = "0";
+static const char SERVERSTARTED[] = "1";
+
+}
+#endif // XQSERVICEIPCDEFS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipcfactory.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Service Framework IPC Factory
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqserviceipcfactory.h"
+#include "xqserviceipc_p.h"
+#ifdef __SYMBIAN32__
+#include "xqserviceipc_symbian.h"
+#include "xqserviceipc_apasymbian.h"
+#endif // __SYMBIAN32__
+namespace QtService
+{
+
+/*!
+    \class ServiceFwIPCFactory
+    \brief Factory class for constructing the IPC backend
+*/
+
+/*!
+    Constructor.
+*/
+ServiceFwIPCFactory::ServiceFwIPCFactory()
+{
+}
+
+/*!
+    Destructor.
+*/
+ServiceFwIPCFactory::~ServiceFwIPCFactory()
+{
+}
+
+/*!
+    Check to see if the particular IPC type is supported.
+    \param aIPCType Type of the IPC.
+    \return true If the IPC type is supported, false otherwise.
+*/
+bool ServiceFwIPCFactory::isIPCTypeSupported(TServiceIPCBackends aIPCType)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPCFactory::isIPCTypeSupported");
+    bool supported(false);
+#ifdef __SYMBIAN32__
+    if (aIPCType == ESymbianServer) {
+        supported = true;
+	}
+    if (aIPCType == ESymbianApaServer) {
+        supported = true;
+    }    
+#endif
+
+    return supported;
+}
+
+/*!
+    Create an instance of the Service IPC backend.
+    \param aBackend Type of backend to create.
+    \return ServiceFwIPCPrivate instance.
+*/
+ServiceFwIPCPrivate* ServiceFwIPCFactory::createBackend(TServiceIPCBackends aBackend)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPCFactory::createBackend");
+    ServiceFwIPCPrivate* backend(NULL);
+#ifdef __SYMBIAN32__
+    // Symbian server is default
+    if (aBackend == ESymbianServer || aBackend == EDefaultIPC) {
+        TRAP_IGNORE( backend = CServiceSymbianIPC::NewL() );
+    }
+    if (aBackend == ESymbianApaServer) {
+        TRAP_IGNORE( backend = CApaSymbianIPC::NewL() );
+    }
+#endif
+    return backend;
+    }
+}
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipc/xqserviceipcfactory.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Factory class to construct the proper IPC backend
+*
+*/
+
+#ifndef XQ_SERVICE_FW_IPC_FACTORY
+#define XQ_SERVICE_FW_IPC_FACTORY
+
+#include <QtCore>
+#include "xqserviceipcdefs.h"
+
+namespace QtService {
+    
+    class ServiceFwIPCPrivate;
+    
+    class SFWIPC_EXPORT ServiceFwIPCFactory : public QObject
+    {
+    public:
+    
+        ServiceFwIPCFactory();
+    
+        virtual ~ServiceFwIPCFactory();
+    
+    public:
+    
+        static bool isIPCTypeSupported(TServiceIPCBackends aIPCType);
+    
+        static ServiceFwIPCPrivate* createBackend(TServiceIPCBackends aBackend =
+                                                                     EDefaultIPC);
+    
+    private:
+        // data
+    
+    };
+
+}
+#endif // XQ_SERVICE_FW_IPC_FACTORY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/api_headers.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+XQSERVICE_API_HEADERS = \
+				xqserviceipcrequest.h \
+				xqserviceipcobserver.h \
+				xqserviceipcserver.h
+
+XQSERVICE_API_HEADERS_INTERNAL = 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcobserver.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Observer class used for callback of async requests
+*
+*/
+
+#ifndef M_XQSERVICE_IPC_OBSERVER
+#define M_XQSERVICE_IPC_OBSERVER
+
+#include <QtCore>
+
+namespace QtService {
+    
+    class ServiceIPCRequest;
+    
+    /*!
+        \brief Interface Observer class to handle IPC related events
+    */
+    class MServiceIPCObserver
+    {
+    public:
+
+        /*!
+            Handle a new request.
+            \param aRequest Request object, ownership NOT passed.
+            \return true if handled.
+        */
+        virtual bool handleRequest(ServiceIPCRequest *aRequest) = 0;
+    
+        /*!
+            Handle cancellation of the given request object.
+            \param aRequest Request object that is going to be cancelled, ownership NOT passed.
+        */
+        virtual void handleCancelRequest(ServiceIPCRequest *aRequest) = 0;
+
+        /*!
+            About to delete the given request object. Observer can make necessary cleanup.
+            \param aRequest Request object that is going to be cancelled, ownership NOT passed.
+                            Object will be deleted after callback returns.
+        */
+        virtual void handleDeleteRequest(ServiceIPCRequest *aRequest) = 0;
+        
+    };
+
+}
+#endif // M_XQSERVICE_IPC_OBSERVER
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcrequest.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,330 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  IPC request class
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <xqserviceclientinfo.h>
+#include "xqserviceipcrequest.h"
+#include "xqserviceipcserversession.h"
+#include "xqrequestutil.h"
+
+namespace QtService
+{
+/*!
+    \class ServiceIPCRequest
+    \brief Class to encapsulate a service request
+*/
+
+/*!
+    Constructor.
+    \param aSession Session associated with this request.
+    \param aDataLength Amount of data to be received in this request.
+    \param aRequestOp Operation name.
+*/
+ServiceIPCRequest::ServiceIPCRequest(ServiceIPCSession* aSession,
+                                     qint64 aDataLength,
+                                     const QString& aRequestOp) :
+    QObject(NULL),
+    iSession(aSession), 
+    iClientInfo(NULL),
+    iRequestOp(aRequestOp), 
+    iDatalength(aDataLength),
+    iId(-1),
+    iAsync(false)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::ServiceIPCRequest(1)");
+    XQSERVICE_DEBUG_PRINT("aDataLength: %d", aDataLength);
+    XQSERVICE_DEBUG_PRINT("aRequestOp: %s", qPrintable(aRequestOp));
+}
+
+/*!
+    Copy Constructor.
+    \param aRequest Request to be copied.
+*/
+ServiceIPCRequest::ServiceIPCRequest(ServiceIPCRequest& aRequest)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::ServiceIPCRequest(2)");
+    //session
+    iSession = aRequest.getSession();
+    
+    //client info
+    iClientInfo = new ClientInfo();
+    iClientInfo->setName((aRequest.clientInfo())->name());
+    iClientInfo->setProcessId(aRequest.clientInfo()->processId());
+    iClientInfo->setVendorId(aRequest.clientInfo()->vendorId());
+    
+    // request operation
+    iRequestOp = aRequest.getOperation();
+    
+    //data part
+    iRequestData = aRequest.getData();
+    iDatalength = iRequestData.length();
+
+    // Request options
+    iRequestInfo = aRequest.requestInfo();
+
+}
+
+/*!
+    Destructor.
+*/
+ServiceIPCRequest::~ServiceIPCRequest()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::~ServiceIPCRequest");
+    delete iClientInfo;
+}
+
+/*!
+    Assignment operator.
+    \param aRequest Request to be assigned.
+    \return ServiceIPCRequest assigned request.
+*/
+ServiceIPCRequest& ServiceIPCRequest::operator=(ServiceIPCRequest& aRequest)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::operator=");
+    if (this != &aRequest) {
+        //session
+        iSession = aRequest.getSession();
+        
+        //client info
+        ClientInfo* info = new ClientInfo();
+        info->setName((aRequest.clientInfo())->name());
+        info->setProcessId(aRequest.clientInfo()->processId());
+        info->setVendorId(aRequest.clientInfo()->vendorId());
+        delete iClientInfo;
+        iClientInfo = info;    
+        
+        // request operation
+        iRequestOp = aRequest.getOperation();
+            
+        //data part
+        iRequestData = aRequest.getData();
+        iDatalength = iRequestData.length();
+
+        // Request options
+        iRequestInfo = aRequest.requestInfo();
+        
+    }
+    return *this;
+}
+
+/*!
+    Get the requested operation.
+    \return QString operation ID.
+*/
+const QString& ServiceIPCRequest::getOperation()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::getOperation");
+    XQSERVICE_DEBUG_PRINT("iRequestOp: %s", qPrintable(iRequestOp));
+    return iRequestOp;
+}
+
+/*!
+    Get the requested data.
+    \return QByteArray data for this operation.
+*/
+const QByteArray& ServiceIPCRequest::getData()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::getData");
+    XQSERVICE_DEBUG_PRINT("iRequestData: %s", iRequestData.constData());
+    return iRequestData;
+}
+
+/*!
+    Write some data to the request.
+    \param aData Data to write to the socket.
+*/
+bool ServiceIPCRequest::write(const QByteArray& aData)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::write");
+    XQSERVICE_DEBUG_PRINT("aData: %s", aData.constData());
+    // Do we want to buffer the writes?
+    return iSession->write(aData);
+}
+
+/*!
+    Complete the request.
+    \return true if request completed successfully.
+*/
+bool ServiceIPCRequest::completeRequest()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::completeRequest");
+    return iSession->completeRequest();
+}
+
+/*!
+    Append more data when creating the request.
+    \param aMoreData Data to be appended to the request.
+    \return true if iDataLength now equals the full length.
+*/
+bool ServiceIPCRequest::addRequestdata(const QByteArray& aMoreData)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::addRequestdata");
+    XQSERVICE_DEBUG_PRINT("aMoreData: %s", aMoreData.constData());
+    iRequestData.append(aMoreData);
+    return (iRequestData.length() == iDatalength);
+}
+
+/*!
+    Sets the client info. Onwership of the object is passed in.
+    \param aClientInfo Client information.
+*/
+void ServiceIPCRequest::setClientInfo(ClientInfo *aClientInfo)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setClientInfo");
+    delete iClientInfo;
+    iClientInfo = aClientInfo;
+
+    // Fill in the implicit info generated by the server
+    iRequestInfo.setInfo(XQServiceUtils::InfoSID, iClientInfo->processId());
+    iRequestInfo.setInfo(XQServiceUtils::InfoVID, iClientInfo->vendorId());
+    iRequestInfo.setInfo(XQServiceUtils::InfoCap, iClientInfo->capabilities());
+    
+}
+
+/*!
+    Gets the client info.
+    \return Client Information object, NULL if none is available.
+*/
+ClientInfo* ServiceIPCRequest::clientInfo()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::clientInfo");
+    return iClientInfo;
+}
+
+/*!
+    Gets the session.
+    \return ServiceIPCSession, NULL if none is available.
+*/
+ServiceIPCSession* ServiceIPCRequest::getSession()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::getSession");
+    return iSession;
+}
+
+/*!
+    Sets id of the request.
+    \param aId Identifier of the request.
+*/
+void ServiceIPCRequest::setId(int aId)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setId");
+    XQSERVICE_DEBUG_PRINT("\t aId = %d", aId);
+    iId = aId;
+}
+
+/*!
+    Returns id of the request.
+    \return Id of the request.
+*/
+int ServiceIPCRequest::id() const
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::id");
+    XQSERVICE_DEBUG_PRINT("\t iId = %d", iId);
+    return iId;
+}
+
+/*!
+    Sets asynchcronous flag to true or false.
+    \param aAsync Value of the async flag.
+*/
+void ServiceIPCRequest::setAsync(bool aAsync)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setAsync");
+    XQSERVICE_DEBUG_PRINT("\t iAsync = %d", aAsync);
+    iAsync = aAsync;
+}
+
+/*!
+    Returns async flag.
+    \return True if the request is asynchronous. False, if synchronous.
+*/
+bool ServiceIPCRequest::isAsync() const
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::getAsync");
+    XQSERVICE_DEBUG_PRINT("\t iAsync = %d", iAsync);
+    return iAsync;
+}
+
+/*!
+    Set request info passed along with the request.
+    \param info Info to be passed with the request.
+*/
+void ServiceIPCRequest::setRequestInfo(XQRequestInfo *info)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setRequestInfo");
+    if (info)
+    {
+        iRequestInfo = *info;
+        // Restore the overridden id value
+        if (iClientInfo)
+        {
+            // Fill in the implicit info generated by the server
+            XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setRequestInfo fill from clientInfo");
+            iRequestInfo.setInfo(XQServiceUtils::InfoSID, iClientInfo->processId());
+            iRequestInfo.setInfo(XQServiceUtils::InfoVID, iClientInfo->vendorId());
+            iRequestInfo.setInfo(XQServiceUtils::InfoCap, iClientInfo->capabilities());
+            iRequestInfo.setInfo(XQServiceUtils::InfoId, id());
+        }
+    }
+}
+
+/*!
+    Get info added to the request.
+    \return Info to be passed with the request.
+*/
+XQRequestInfo ServiceIPCRequest::requestInfo() const
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::requestInfo");
+    return iRequestInfo;
+}
+
+/*!
+    Add sharable file to be passed with the request.
+    \param file Sharable file to be added to the request.
+    \param index Currently not used.
+*/
+void ServiceIPCRequest::addSharableFile(XQSharableFile *file, int index)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setSharableFile");
+    if (file != NULL)
+        iSharableFiles.append(*file);
+}
+
+/*!
+    Get sharable file from request.
+    \param index Index of the sharable file to get.
+*/
+XQSharableFile ServiceIPCRequest::sharableFile(int index) const
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setSharableFile");
+    if (index >= 0 && index < iSharableFiles.size())
+    {
+        XQSharableFile file = iSharableFiles.at(index);
+        XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setSharableFile valid=%d", file.isValid());
+        return file;
+    }
+    return XQSharableFile();
+}
+
+
+}
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcrequest.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Class to represent a IPC request
+*
+*/
+
+#ifndef XQ_SERVICEIPC_REQUEST_H
+#define XQ_SERVICEIPC_REQUEST_H
+
+#include <QtCore>
+#include <QList>
+#include <xqserviceipcdefs.h>
+#include <xqrequestinfo.h>
+#include <xqsharablefile.h>
+
+namespace QtService {
+        
+    class ServiceIPCSession;
+    class ClientInfo;
+    
+    class SFWIPCSRV_EXPORT ServiceIPCRequest : public QObject
+    {
+    public:
+        virtual ~ServiceIPCRequest();
+    
+        ServiceIPCRequest(ServiceIPCSession* aSession,
+                          qint64 aDataLength,
+                          const QString& aRequestOp);
+        
+        ServiceIPCRequest(ServiceIPCRequest& aRequest);
+        
+        ServiceIPCRequest& operator=(ServiceIPCRequest& aRequest);
+    
+    public:
+        // New function
+    
+        const QString& getOperation();
+    
+        const QByteArray& getData();
+    
+        bool write(const QByteArray& aData);
+    
+        bool completeRequest();
+    
+        bool addRequestdata(const QByteArray& aMoreData);
+
+        void setClientInfo(ClientInfo *aClientInfo);
+
+        ClientInfo* clientInfo();
+        
+        ServiceIPCSession* getSession();
+        
+        void setId(int id);
+        
+        int id() const;
+        
+        void setAsync(bool aAsync);
+        
+        bool isAsync() const;
+
+        void setRequestInfo(XQRequestInfo *info);
+        XQRequestInfo requestInfo() const;
+        
+        void addSharableFile(XQSharableFile *file, int index);
+        XQSharableFile sharableFile(int index) const;
+        
+    private:
+        ServiceIPCSession* iSession; // not owned
+        ClientInfo *iClientInfo;  // owned
+        QString iRequestOp;
+        QByteArray iRequestData;
+        qint64 iDatalength;
+        int iId;
+        bool iAsync;
+        XQRequestInfo iRequestInfo;  // owned
+        QList<XQSharableFile> iSharableFiles;  // owned
+    };
+
+}
+#endif // XQ_SERVICEIPC_REQUEST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Service Framework IPC Server
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqserviceipcserver.h"
+#include "xqserviceipcserver_p.h"
+#include "xqserviceipcserverfactory.h"
+#include "xqserviceipcobserver.h"
+
+namespace QtService
+{
+/*!
+    \class ServiceFwIPCServer
+    \brief Service Framework IPC Server public class
+*/
+
+/*!
+    Constructor.
+    \param aObserver Engine observer to call back to handle new requests.
+    \param aParent QObject's parent.
+    \param aBackend Backend to instantiate.
+*/
+ServiceFwIPCServer::ServiceFwIPCServer( MServiceIPCObserver* aObserver, 
+                                        QObject* aParent, 
+                                        TServiceIPCBackends aBackend ) :
+                                        QObject(aParent ),
+                                        iObserver( aObserver )
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPCServer::ServiceFwIPCServer");
+    XQSERVICE_DEBUG_PRINT("aBackend: %d", aBackend);
+    d = ServiceFwIPCServerFactory::createBackend( aParent,aBackend );
+    d->q = this;
+}
+
+/*!
+    Destructor.
+*/
+ServiceFwIPCServer::~ServiceFwIPCServer()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPCServer::~ServiceFwIPCServer");
+    delete d;
+}
+
+/*!
+    Start listening for new service requests.
+    \param aServerName Name of the server.
+    \return true if connected.
+*/
+bool ServiceFwIPCServer::listen(const QString& aServerName)
+{
+    XQSERVICE_DEBUG_PRINT("aServerName: %s", qPrintable(aServerName));
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPCServer::listen");
+    return d->listen(aServerName);
+}
+
+/*!
+    Shutdown the server and stop serving clients.
+*/
+void ServiceFwIPCServer::disconnect()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPCServer::disconnect");
+    d->disconnect();
+}
+}
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Service framework IPC Server declaration
+*
+*/
+
+#ifndef XQ_SERVICE_FRAMEWORK_IPC_SERVER_H
+#define XQ_SERVICE_FRAMEWORK_IPC_SERVER_H
+
+#include <QtCore>
+#include <xqserviceipcdefs.h>
+
+namespace QtService {
+    
+    // Forward Declarations
+    class ServiceFwIPCServerPrivate;
+    class MServiceIPCObserver;
+    
+    class SFWIPCSRV_EXPORT ServiceFwIPCServer : public QObject
+    {
+    public:
+    
+        ServiceFwIPCServer(MServiceIPCObserver* aObserver,
+                           QObject* aParent,
+                           TServiceIPCBackends aBackend = EDefaultIPC);
+    
+        virtual ~ServiceFwIPCServer();
+    
+    // APIs provided
+    public:
+    
+        bool listen(const QString& aServerName);
+    
+        void disconnect();
+    
+    protected:
+        // data
+        MServiceIPCObserver* iObserver;
+    private:
+        friend class ServiceFwIPCServerPrivate;
+        ServiceFwIPCServerPrivate* d;
+    };
+
+}
+#endif // XQ_SERVICE_FRAMEWORK_IPC_SERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,71 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:  Service Framework IPC
+#
+
+TEMPLATE = lib
+TARGET = xqserviceipcserver
+
+XQSERVICE_ROOT=../..
+        
+include(api_headers.pri)
+include($$XQSERVICE_ROOT/xqservicebase.pri)
+
+QT -=gui
+QT +=network
+
+#Sources
+HEADERS += xqserviceipcserverfactory.h \
+           xqserviceipcserver.h \
+           xqserviceipcserver_p.h \ 
+           xqserviceipcobserver.h \
+           xqserviceipcserversession.h \
+           xqserviceipcrequest.h
+
+SOURCES += xqserviceipcserverfactory.cpp \
+           xqserviceipcserver.cpp \
+           xqserviceipcserversession.cpp \
+           xqserviceipcrequest.cpp
+           
+DEFINES += QT_MAKE_IPC_SERVER_DLL
+
+# Symbian Specifics
+# Old UID3 102829E8
+symbian {
+    TARGET.UID3 = 0x2002871B
+    TARGET.VID = VID_DEFAULT
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+    TARGET.EPOCALLOWDLLDATA = 1
+
+    HEADERS += xqserviceipcserver_symbianserver.h \
+               xqserviceipcserver_symbiansession.h \
+               xqserviceipcserver_apasymbianserver.h \
+               xqserviceipcserver_apasymbiansession.h
+    SOURCES += xqserviceipcserver_symbianserver.cpp \
+               xqserviceipcserver_symbiansession.cpp \
+               xqserviceipcserver_apasymbianserver.cpp \
+               xqserviceipcserver_apasymbiansession.cpp
+
+#    BLD_INF_RULES.prj_exports += \
+#        "xqserviceipcserver.h         ..\..\inc\xqserviceipcserver.h" \
+#        "xqserviceipcobserver.h       ..\..\inc\xqserviceipcobserver.h" \
+#        "xqserviceipcserversession.h  ..\..\inc\xqserviceipcserversession.h" \
+#        "xqserviceipcrequest.h        ..\..\inc\xqserviceipcrequest.h" 
+    
+    LIBS += -lapgrfx -lws32 -lapparc -lxqserviceutil -lefsrv
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_apasymbianserver.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,167 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Symbian implementation for IPC server
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqserviceipcserver_apasymbianserver.h"
+#include "xqserviceipcserver_apasymbiansession.h"
+
+namespace QtService
+{
+// Server Security Policy
+const TUint KServerRangeCount = 2;
+const TInt KServerRanges[KServerRangeCount] = { 
+                0, //range is [0-1)
+                2 //range is [2-KMaxTInt] 
+                };
+const TUint8 KSeverElementsIndex[KServerRangeCount] = { 
+                0,
+                CPolicyServer::ENotSupported };
+
+const CPolicyServer::TPolicyElement KServerPolicyElements[] = { {
+                _INIT_SECURITY_POLICY_C1(ECapabilityWriteDeviceData),
+                CPolicyServer::EFailClient } };
+
+const CPolicyServer::TPolicy KServerPolicy = {
+                CPolicyServer::EAlwaysPass, //specifies all connect attempts should pass
+                KServerRangeCount, KServerRanges, KSeverElementsIndex,
+                KServerPolicyElements };
+
+enum
+{
+    EServerPriority = CActive::EPriorityStandard
+};
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    \class CApaSymbianServer
+    \brief Symbian client server implementation
+*/
+
+/*!
+    Constructor.
+*/
+CApaSymbianServer::CApaSymbianServer() /*:
+CPolicyServer( EServerPriority,  KServerPolicy)*/                                                 
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianServer::CApaSymbianServer");
+    SetPriority(EServerPriority);
+}
+
+/*!
+    2nd phased constructor
+*/
+void CApaSymbianServer::ConstructL()
+{
+}
+
+/*!
+    Two phased constructor
+*/
+CApaSymbianServer* CApaSymbianServer::NewL()
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianServer::NewL");
+    CApaSymbianServer* self = new( ELeave ) CApaSymbianServer;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+}
+
+/*!
+    Destructor
+*/
+CApaSymbianServer::~CApaSymbianServer()
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianServer::~CApaSymbianServer");
+}
+
+/*!
+    Start listening for new service requests.
+    \param aServerName name of the server.
+    \return true if successful.
+*/
+bool CApaSymbianServer::listen( const QString& aServerName )
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianServer::listen");
+    XQSERVICE_DEBUG_PRINT("aServerName: %s", qPrintable(aServerName));
+    bool listening(true);
+
+    // Needs to be here becuase Q_Ptr isonly set after constructor of public
+    iObserver = Observer();
+    TPtrC serverName(reinterpret_cast<const TUint16*> (aServerName.utf16()));
+    TInt err=0;
+    TRAP( err, StartL(serverName) );
+    XQSERVICE_DEBUG_PRINT("listen status=%d", err);
+    if (err != KErrNone) {
+        listening = false;
+    }
+    // Complete the server rendezvous that th client started
+    XQSERVICE_DEBUG_PRINT("CApaSymbianServer::Rendezvouz");
+    RProcess::Rendezvous(KErrNone);
+    XQSERVICE_DEBUG_PRINT("CApaSymbianServer::Rendezvouz done");
+    XQSERVICE_DEBUG_PRINT("listening: %d", listening);
+    return listening;
+}
+
+/*!
+    Shutdown the server and stop serving clients.
+*/
+void CApaSymbianServer::disconnect()
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianServer::disconnect");
+    // Symbian Servers do not have disconnect, 
+    // the process has to exit
+}
+
+/*!
+    Create a new session, derived from CPolicyServer.
+    \param aVersion Version of the server.
+    \param aMessage Message object.
+*/
+CSession2* CApaSymbianServer::NewSessionL(const TVersion& aVersion,
+                                          const RMessage2& aMessage) const
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianServer::NewSessionL");
+    TVersion v(1, 0, 0);
+    if (!User::QueryVersionSupported(v, aVersion)) {
+        XQSERVICE_DEBUG_PRINT("Not supported version");
+        User::Leave(KErrNotSupported);
+    }
+
+    // Create a new Symbian Session for the client
+  return CApaServerSymbianSession::NewL(iObserver);
+}
+
+CPolicyServer::TCustomResult CApaSymbianServer::CreateServiceSecurityCheckL
+                                    ( TUid /*aServiceType*/, 
+                                      const RMessage2& /*aMsg*/, 
+                                      TInt& /*aAction*/,
+                                      TSecurityInfo& /*aMissing*/ )
+{
+    XQSERVICE_DEBUG_PRINT("CApaSymbianServer::CreateServiceSecurityCheckL");
+    return CPolicyServer::EPass;
+}
+
+}
+
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_apasymbianserver.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Symbian implementation for IPC backend
+*
+*/
+
+#ifndef C_XQSERVICEIPCSERVER_APA_SYMBIAN_SERVER_H
+#define C_XQSERVICEIPCSERVER_APA_SYMBIAN_SERVER_H
+
+#include <QtCore/qobject.h>
+#include <e32base.h>
+#include <QtCore>
+#include "xqserviceipcserver.h"
+#include "xqserviceipcserver_p.h"
+
+#include <apaserverapp.h>
+
+class CApaServerSymbianSession;
+
+namespace QtService {
+    class MServiceIPCObserver;
+    
+    class CApaSymbianServer : public CApaAppServer,
+                      public ServiceFwIPCServerPrivate 
+    {
+    public:
+    
+        static CApaSymbianServer* NewL();
+    
+        virtual ~CApaSymbianServer();
+
+        CPolicyServer::TCustomResult CreateServiceSecurityCheckL(
+                                                                TUid aServiceType,
+                                                                const RMessage2& aMsg,
+                                                                TInt& aAction,
+                                                                TSecurityInfo& aMissing );
+
+        // From ServiceFwIPCServerPrivate
+    protected:
+    
+        bool listen(const QString& aServerName);
+    
+        void disconnect();
+    
+        // From CPolicyServer
+    protected:
+    
+        CSession2* NewSessionL(const TVersion& aVersion,
+                               const RMessage2& aMessage) const;
+    
+    private:
+    
+        CApaSymbianServer();
+    
+        void ConstructL();
+ 
+    private:
+        // data
+        MServiceIPCObserver* iObserver;
+    };
+}
+#endif // C_XQSERVICEIPCSERVER_APA_SYMBIAN_SERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_apasymbiansession.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,313 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Service IPC Session
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <xqserviceclientinfo.h>
+#include "xqserviceipcobserver.h"
+#include "xqserviceipcrequest.h"
+#include "xqserviceipcserver_apasymbiansession.h"
+#include "xqrequestutil.h"
+
+namespace QtService
+{
+
+// Constants for the IPC operation id
+const TInt KIPCOperation = RApaAppServiceBase::KServiceCmdBase;
+const TInt KIPCGetBuffer = KIPCOperation+1;
+const TInt KIPCOperationWithSharableFile = KIPCOperation+2;  // Sharable file support
+
+
+/*!
+    \class CApaServerSymbianSession
+    \brief Symbian Session class
+*/
+
+/*!
+    Constructor.
+    \param aObserver Observer to the server.
+*/
+CApaServerSymbianSession::CApaServerSymbianSession(MServiceIPCObserver* aObserver) :
+    ServiceIPCSession(aObserver)
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::CApaServerSymbianSession");
+}
+
+/*!
+    2nd phased constructor.
+*/
+void CApaServerSymbianSession::ConstructL()
+{
+}
+
+/*!
+    Two-Phased Constructor.
+    \param aObserver Observer to the server.
+*/
+CApaServerSymbianSession* CApaServerSymbianSession::NewL(MServiceIPCObserver* aObserver)
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::NewL");
+    CApaServerSymbianSession* self = 
+	                   new( ELeave ) CApaServerSymbianSession(aObserver);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+}
+
+/*!
+    Destructor.
+*/
+CApaServerSymbianSession::~CApaServerSymbianSession()
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::~CApaServerSymbianSession");
+    if (iCurRequest) {
+        iObserver->handleDeleteRequest(iCurRequest); 
+        delete iCurRequest;
+    }
+    iCurRequest = NULL;
+}
+
+/*!
+    Write some data in response to a request.
+    \param aData Some data to write as response.
+    \return bool If write was successful.
+*/
+bool CApaServerSymbianSession::write( const QByteArray& aData )
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::write");
+    XQSERVICE_DEBUG_PRINT("aData: %s,length=%d", aData.constData(), aData.length());
+    // Implicitly shared
+    iData = aData;
+    return false;
+}
+
+/*!
+    Complete a request.
+    \return true if request completed 
+*/
+bool CApaServerSymbianSession::completeRequest()
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::completeRequest");
+    TPtrC8 data(reinterpret_cast<const TUint8*> (iData.constData()), iData.length());    
+    XQSERVICE_DEBUG_PRINT("data: %s, length=%d", iData.constData(), data.Length() );
+    iMessage.Complete(data.Length());
+    if (iCurRequest) {
+        iObserver->handleDeleteRequest(iCurRequest); 
+        delete iCurRequest;
+    }
+    iCurRequest = NULL;
+    return true;
+}
+
+/*!
+    Close a session and gracefully shutdown.
+*/
+void CApaServerSymbianSession::close()
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::close");
+    // Symbian doens't really do anything
+}
+
+/*!
+    From CSession2. Service request.
+    \param aMessage Message object.
+*/
+void CApaServerSymbianSession::ServiceL(const RMessage2& aMessage)
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::ServiceL");
+    // Default ServiceErrorL() will complete the message if this method leaves
+    TInt operation(aMessage.Function());
+    XQSERVICE_DEBUG_PRINT("\toperation: %d", operation);
+    switch (operation) {
+    case KIPCOperation:
+    case KIPCOperationWithSharableFile:
+    {
+    
+        XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::ServiceL handleRequest");
+        handleRequestL(aMessage);
+        XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::ServiceL handleRequest end");
+        //and here
+        break;
+    }
+    case KIPCGetBuffer: {
+        XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::ServiceL handleGetBufferL");
+        handleGetBufferL(aMessage);
+        XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::ServiceL handleGetBufferL end");
+        break;
+    }
+                        
+    default: {
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::ServiceL default");
+        if (operation == 2 && iCurRequest)  // maparnan
+        {
+            // Need to complete the pending request when handling the 
+            // the EApaAppServerCancelNotifyServerExit (2) from the client
+            // It is too late to complete that in session disconnect
+            XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::ServiceL request cancelled");
+            iMessage.Complete(KErrCancel);
+        }
+        
+        CApaAppServiceBase::ServiceL( aMessage );
+        //aMessage.Complete(KErrNotFound);
+        XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::ServiceL default end");    
+        break;
+    }
+    }
+}
+
+/*!
+    From CSession2.
+    Handle any disconnection from the client.
+    \param aMessage Message Object.
+*/
+void CApaServerSymbianSession::Disconnect(const RMessage2 &aMessage)
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::Disconnect");
+    if (iCurRequest) {
+         // Inform also observer, that current pending  request is about to go
+        iObserver->handleCancelRequest(iCurRequest); 
+    }
+    CApaAppServiceBase::Disconnect(aMessage);
+}
+
+/*!
+    Handle an IPC request.
+    \param aMessage Message Object.
+*/
+void CApaServerSymbianSession::handleRequestL( const RMessage2& aMessage )
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::handleRequestL");
+    // Store the message
+    iMessage = aMessage;
+
+    // Convert from Symbian to QT
+    HBufC* request = ReadDesLC(aMessage, 0);
+    HBufC8* data = ReadDes8LC(aMessage, 1);
+
+    XQSharableFile *file = 0;
+    if (aMessage.Function() == KIPCOperationWithSharableFile)
+    {
+        // Only one file support now !
+        file = new XQSharableFile();
+        AdoptSharableFile(aMessage, file);
+    }
+            
+    // Shallow copy only, we want a deep copy
+    QString d = QString::fromUtf16(request->Ptr(), request->Length());
+    QString operation;
+    operation += d;
+    XQSERVICE_DEBUG_PRINT("operation: %s", qPrintable(operation));
+
+    /*
+    //QByteArray convertData;
+    TPtr8 ptr8(data->Des());
+    const char* ptrz = reinterpret_cast<const char*> (ptr8.PtrZ());
+    //convertData.append(ptrz);
+	QByteArray convertData(ptrz,data->Length());
+    */
+    QByteArray convertData( reinterpret_cast<const char*>(data->Ptr()), data->Length() );
+    XQSERVICE_DEBUG_PRINT("convertData: %s", convertData.constData());
+    
+	// New request
+    Q_ASSERT(!iCurRequest);
+    iCurRequest = new ServiceIPCRequest(this, 0, operation);
+    iData.clear();
+
+    // Get client info
+    ClientInfo *client = new ClientInfo();
+    client->setProcessId(aMessage.SecureId().iId);
+    client->setVendorId(aMessage.VendorId().iId);
+    RThread clientThread;
+    aMessage.ClientL(clientThread);
+    RProcess clientProc;
+    User::LeaveIfError( clientThread.Process(clientProc) );
+    client->setName(QString::fromUtf16(clientProc.Name().Ptr(), 
+                                       clientProc.Name().Length()));
+    client->setCapabilities(ClientCapabilities(aMessage));
+    clientThread.Close();  // close handle
+
+    // Set the picked sharable file if any
+    if (file != 0)
+    {
+        // Support only one sharable file
+        iCurRequest->addSharableFile(file, 0);
+    }
+
+    //
+    // Add data and callback to the observer
+    // 
+    iCurRequest->addRequestdata(convertData);
+    iCurRequest->setClientInfo(client); // ownership passed
+    iObserver->handleRequest(iCurRequest);
+
+    CleanupStack::PopAndDestroy(2, request);
+}
+
+/*!
+    Handle getting the result buffer.
+    \param aMessage Message Object.
+*/
+void CApaServerSymbianSession::handleGetBufferL( const RMessage2& aMessage )
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::handleGetBufferL");
+    XQSERVICE_DEBUG_PRINT("iData: %s", iData.constData());
+    TPtrC8 data(reinterpret_cast<const TUint8*> (iData.constData()), iData.length());  
+    TInt err = aMessage.Write(0, data);
+    aMessage.Complete(err);
+ }
+
+/*!
+    Read a 16 bit descriptor from the message.
+    \param aMessage Message to read from.
+    \param aMsgSlot Slot to read from.
+*/
+HBufC* CApaServerSymbianSession::ReadDesLC(const RMessage2& aMessage,
+                                           TInt aMsgSlot)
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::ReadDesLC");
+    TInt length = aMessage.GetDesLengthL(aMsgSlot);
+    HBufC* des = HBufC::NewLC(length);
+    TPtr ptr = des->Des();
+    aMessage.ReadL(aMsgSlot, ptr);
+    return des;
+}
+
+/*!
+    Read a 8 bit descriptor from the message.
+    \param aMessage Message to read from.
+    \param aMsgSlot Slot to read from.
+ */
+HBufC8* CApaServerSymbianSession::ReadDes8LC(const RMessage2& aMessage,
+                                             TInt aMsgSlot)
+{
+    XQSERVICE_DEBUG_PRINT("CApaServerSymbianSession::ReadDes8LC");
+    TInt length = aMessage.GetDesLengthL(aMsgSlot);
+    HBufC8* des = HBufC8::NewLC(length + 1); // 1 more for null terminator
+    TPtr8 ptr = des->Des();
+    aMessage.ReadL(aMsgSlot, ptr);
+    return des;
+}
+
+}
+
+// END OF FILE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_apasymbiansession.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  IPC Server class using Symbian client-server
+*
+*/
+
+#ifndef C_XQSERVICEIPCSERVER_APA_SYMBIAN_SESSION_H
+#define C_XQSERVICEIPCSERVER_APA_SYMBIAN_SESSION_H
+
+#include <QtCore/qobject.h>
+#include <e32base.h>
+#include <e32cmn.h> 
+#include <apaserverapp.h>
+#include "xqserviceipcserversession.h"
+#include "xqsharablefile.h"
+
+namespace QtService {
+
+    // Utilities
+    bool AdoptSharableFile(const RMessage2& aMsg, XQSharableFile *file);
+    quint32 ClientCapabilities(const RMessage2& aMsg);
+    
+    class CApaServerSymbianSession : public CApaAppServiceBase, public ServiceIPCSession
+    {
+    public:
+    
+        static CApaServerSymbianSession* NewL( MServiceIPCObserver* aObserver );
+    
+        virtual ~CApaServerSymbianSession();
+    
+        // From ServiceIPCSession
+    protected:
+    
+        bool write(const QByteArray& aData);
+    
+        bool completeRequest();
+    
+        void close();
+    
+        // From CSession2
+    protected:
+    
+        void ServiceL(const RMessage2& aMessage);
+    
+        void Disconnect(const RMessage2 &aMessage);
+    
+        // Service methods
+    private:
+    
+        void handleRequestL(const RMessage2& aMessage);
+    
+        void handleGetBufferL(const RMessage2& aMessage);
+    
+        HBufC* ReadDesLC(const RMessage2& aMessage, TInt aMsgSlot);
+    
+        HBufC8* ReadDes8LC(const RMessage2& aMessage, TInt aMsgSlot);
+    private:
+    
+        CApaServerSymbianSession(MServiceIPCObserver* aObserver);
+    
+        void ConstructL();
+           
+    private:
+        // data
+        RMessage2 iMessage;
+        QByteArray iData;
+        };
+}
+#endif // C_XQSERVICEIPCSERVER_APA_SYMBIAN_SESSION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Service Framework IPC Private implementation
+*
+*/
+
+#ifndef XQ_SERVICE_FRAMEWORK_IPC_PRIVATE_SERVER_H
+#define XQ_SERVICE_FRAMEWORK_IPC_PRIVATE_SERVER_H
+
+#include <QtCore>
+#include "xqserviceipcserver_p.h"
+#include "xqserviceipcserver.h"
+
+namespace QtService {
+    
+    class ServiceFwIPCServer;
+    class ServiceIPCSession;
+    class MServiceIPCObserver;
+    
+    /**
+     *  Private implementation interface for service framework server
+     *  This class is the abstract interface for all server backends
+     */
+    class ServiceFwIPCServerPrivate
+    {
+    public:
+        /**
+        * Virtual destructor
+        */
+        virtual ~ServiceFwIPCServerPrivate() {};
+
+    public:
+    
+        /**
+         * Start listening for new service requests
+         * @param aServerName name of the server
+         * @return true if listen was successful
+         */
+        virtual bool listen(const QString& aServerName) = 0;
+    
+        /**
+         * Shutdown the server and stop serving clients 
+         * @return void
+         */
+        virtual void disconnect() = 0;
+    
+    protected:
+    
+        /**
+         * Get the server observer
+         * @return MServiceIPCObserver* observer to this server
+         */
+        inline MServiceIPCObserver* Observer()
+        {
+            return q->iObserver;
+        };
+    
+    protected:
+        QList<ServiceIPCSession*> iSessions;
+    
+    private:
+        friend class ServiceFwIPCServer;
+        ServiceFwIPCServer* q;
+    };
+
+}
+#endif // XQ_SERVICE_FRAMEWORK_IPC_PRIVATE_SERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_symbianserver.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,154 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Symbian implementation for IPC server
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqserviceipcserver_symbianserver.h"
+#include "xqserviceipcserver_symbiansession.h"
+
+namespace QtService
+{
+// Server Security Policy
+const TUint KServerRangeCount = 2;
+const TInt KServerRanges[KServerRangeCount] = { 
+                0, //range is [0-2)
+                3 //range is [3-KMaxTInt] 
+                };
+const TUint8 KSeverElementsIndex[KServerRangeCount] = { 
+                0,
+                CPolicyServer::ENotSupported };
+
+const CPolicyServer::TPolicyElement KServerPolicyElements[] = { {
+                _INIT_SECURITY_POLICY_C1(ECapabilityWriteDeviceData),
+                CPolicyServer::EFailClient } };
+
+const CPolicyServer::TPolicy KServerPolicy = {
+                CPolicyServer::EAlwaysPass, //specifies all connect attempts should pass
+                KServerRangeCount, KServerRanges, KSeverElementsIndex,
+                KServerPolicyElements };
+
+enum
+{
+    EServerPriority = CActive::EPriorityStandard
+};
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    \class CServiceSymbianServer
+    \brief Symbian client server implementation
+*/
+
+/*!
+    Constructor.
+*/
+CServiceSymbianServer::CServiceSymbianServer() :
+    CPolicyServer(EServerPriority, KServerPolicy)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianServer::CServiceSymbianServer");
+}
+
+/*!
+    2nd phased constructor.
+*/
+void CServiceSymbianServer::ConstructL()
+{
+}
+
+/*!
+    Two phased constructor.
+*/
+CServiceSymbianServer* CServiceSymbianServer::NewL()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianServer::NewL");
+    CServiceSymbianServer* self = new (ELeave) CServiceSymbianServer;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+}
+
+/*!
+    Destructor.
+*/
+CServiceSymbianServer::~CServiceSymbianServer()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianServer::~CServiceSymbianServer");
+}
+
+/*!
+    Start listening for new service requests.
+    \param aServerName Name of the server.
+    \return true if successful.
+*/
+bool CServiceSymbianServer::listen(const QString& aServerName)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianServer::listen");
+    XQSERVICE_DEBUG_PRINT("aServerName: %s", qPrintable(aServerName));
+    bool listening(true);
+
+    // Needs to be here becuase Q_Ptr isonly set after constructor of public
+    iObserver = Observer();
+    TPtrC serverName(reinterpret_cast<const TUint16*> (aServerName.utf16()));
+    TInt err=0;
+    TRAP( err, StartL(serverName) );
+    XQSERVICE_DEBUG_PRINT("listen status=%d", err);
+    if (err != KErrNone) {
+        listening = false;
+    }
+    // Complete the server rendezvous that th client started
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianServer::Rendezvouz");
+    RProcess::Rendezvous(KErrNone);
+    XQSERVICE_DEBUG_PRINT("listening: %d", listening);
+    return listening;
+}
+
+/*!
+    Shutdown the server and stop serving clients.
+*/
+void CServiceSymbianServer::disconnect()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianServer::disconnect");
+    // Symbian Servers do not have disconnect, 
+    // the process has to exit
+}
+
+/*!
+    Create a new session, derived from CPolicyServer.
+    \param aVersion Version of the server.
+    \param aMessage Message object.
+*/
+CSession2* CServiceSymbianServer::NewSessionL(const TVersion& aVersion,
+                                              const RMessage2& aMessage) const
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianServer::NewSessionL");
+    TVersion v(1, 0, 0);
+    if (!User::QueryVersionSupported(v, aVersion)) {
+        XQSERVICE_DEBUG_PRINT("Not supported version");
+        User::Leave(KErrNotSupported);
+    }
+
+    // Create a new Symbian Session for the client
+    return CServiceSymbianSession::NewL(iObserver);
+}
+}
+
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_symbianserver.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Symbian implementation for IPC backend
+*
+*/
+
+#ifndef C_XQSERVICE_IPC_SYMBIAN_SERVER_H
+#define C_XQSERVICE_IPC_SYMBIAN_SERVER_H
+
+#include <QtCore/qobject.h>
+#include <e32base.h>
+#include <QtCore>
+#include "xqserviceipcserver.h"
+#include "xqserviceipcserver_p.h"
+
+namespace QtService {
+    class MServiceIPCObserver;
+    
+    class CServiceSymbianServer : public CPolicyServer,
+                    public ServiceFwIPCServerPrivate
+    {
+    public:
+    
+        static CServiceSymbianServer* NewL();
+    
+        virtual ~CServiceSymbianServer();
+    
+        // From ServiceFwIPCServerPrivate
+    protected:
+    
+        bool listen(const QString& aServerName);
+    
+        void disconnect();
+    
+        // From CPolicyServer
+    protected:
+    
+        CSession2* NewSessionL(const TVersion& aVersion,
+                               const RMessage2& aMessage) const;
+    
+    private:
+    
+        CServiceSymbianServer();
+    
+        void ConstructL();
+    
+    private:
+        // data
+        MServiceIPCObserver* iObserver;
+    };
+}
+#endif // C_XQSERVICE_IPC_SYMBIAN_SERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_symbiansession.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,337 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Service IPC Session
+*
+*/
+
+#include <e32capability.h> 
+
+#include "xqservicelog.h"
+
+#include <xqserviceclientinfo.h>
+#include "xqserviceipcobserver.h"
+#include "xqserviceipcrequest.h"
+#include "xqserviceipcserver_symbiansession.h"
+#include "xqrequestutil.h"
+
+namespace QtService
+{
+
+// Constants for the IPC operation id
+const TInt KIPCNewOperation = 0;
+const TInt KIPCGetData = 1;
+const TInt KIPCCancelAsync = 2;
+const TInt KIPCOperationWithSharableFile = 3;  // Sharable file support
+
+
+/*!
+    \class CServiceSymbianSession
+    \brief Symbian Session class
+*/
+
+/*!
+    Constructor.
+    \param aObserver Observer to the server.
+*/
+CServiceSymbianSession::CServiceSymbianSession(MServiceIPCObserver* aObserver) :
+    ServiceIPCSession(aObserver)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::CServiceSymbianSession");
+}
+
+/*!
+    2nd phased constructor.
+*/
+void CServiceSymbianSession::ConstructL()
+{
+}
+
+/*!
+    Two-Phased Constructor.
+    \param aObserver Observer to the server.
+*/
+CServiceSymbianSession* CServiceSymbianSession::NewL(MServiceIPCObserver* aObserver)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::NewL");
+    CServiceSymbianSession* self =
+                    new (ELeave) CServiceSymbianSession(aObserver);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+}
+
+/*!
+    Destructor.
+*/
+CServiceSymbianSession::~CServiceSymbianSession()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::~CServiceSymbianSession");
+    if (iCurRequest) {
+        iObserver->handleDeleteRequest(iCurRequest); 
+        delete iCurRequest;
+    }
+    iCurRequest = NULL;
+}
+
+/*!
+    Write some data in response to a request.
+    \param aData Some data to write as response.
+    \return bool if write was successful.
+*/
+bool CServiceSymbianSession::write(const QByteArray& aData)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::write");
+    XQSERVICE_DEBUG_PRINT("aData: %s", aData.constData());
+    // Implicitly shared
+    iData = aData;
+    return false;
+}
+
+/*!
+    Complete a Request.
+    \return bool if request completed 
+*/
+bool CServiceSymbianSession::completeRequest()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::completeRequest");
+    XQSERVICE_DEBUG_PRINT("iData: %s", iData.constData());
+    TPtrC8 data(reinterpret_cast<const TUint8*> (iData.constData()), iData.length());
+    iMessage.Complete(data.Length());
+    return true;
+}
+
+/*!
+    Close a session and gracefully shutdown.
+*/
+void CServiceSymbianSession::close()
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::close");
+    // Symbian doens't really do anything
+}
+
+/*!
+    From CSession2.
+    Service request.
+    \param aMessage Message object.
+*/
+void CServiceSymbianSession::ServiceL(const RMessage2& aMessage)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::ServiceL");
+    // Default ServiceErrorL() will complete the message if this method leaves
+    TInt operation(aMessage.Function());
+    XQSERVICE_DEBUG_PRINT("operation: %d", operation);
+    switch (operation) {
+    case KIPCNewOperation:
+    case KIPCOperationWithSharableFile:
+    {
+        handleRequestL(aMessage);
+        break;
+    }
+    case KIPCGetData: {
+        handleGetBufferL(aMessage);
+        break;
+    }
+    case KIPCCancelAsync: {
+        if (iCurRequest) {
+            // Inform also observer, that current pending  request is about to go
+            iObserver->handleCancelRequest(iCurRequest);
+            iCurRequest->completeRequest();
+        }
+        aMessage.Complete(KErrCancel);
+        break;
+    }
+    default: {
+        aMessage.Complete(KErrNotFound);
+        break;
+    }
+    }
+}
+
+/*!
+    From CSession2.
+    Handle any disconnection from the client.
+    \param aMessage Message object.
+*/
+void CServiceSymbianSession::Disconnect(const RMessage2 &aMessage)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::Disconnect");
+    CSession2::Disconnect(aMessage);
+}
+
+/*!
+    Handle an IPC request.
+    \param aMessage Message object.
+*/
+void CServiceSymbianSession::handleRequestL(const RMessage2& aMessage)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::handleRequestL");
+    // Store the message
+    iMessage = aMessage;
+
+    // Convert from Symbian to QT
+    HBufC* request = ReadDesLC(aMessage, 0);
+    HBufC8* data = ReadDes8LC(aMessage, 1);
+           
+    XQSharableFile *file = 0;
+    if (aMessage.Function() == KIPCOperationWithSharableFile)
+    {
+        // Only one file support now !
+        file = new XQSharableFile();
+        AdoptSharableFile(aMessage, file);
+    }
+    
+    // Shallow copy only, we want a deep copy
+    QString d = QString::fromUtf16(request->Ptr(), request->Length());
+    QString operation;
+    operation += d;
+    XQSERVICE_DEBUG_PRINT("operation: %s", qPrintable(operation));
+
+    //QByteArray convertData;
+    TPtr8 ptr8(data->Des());
+    const char* ptrz = reinterpret_cast<const char*> (ptr8.PtrZ());
+    //convertData.append(ptrz);
+	QByteArray convertData(ptrz,data->Length());
+	XQSERVICE_DEBUG_PRINT("convertData: %s", convertData.constData());
+
+    // New request
+    if (iCurRequest) {
+        iObserver->handleDeleteRequest(iCurRequest); 
+        delete iCurRequest;
+    }
+    iCurRequest = NULL;
+    iCurRequest = new ServiceIPCRequest(this, 0, operation);
+    iData.clear();
+
+    // Get client info
+    ClientInfo *client = new ClientInfo();
+    client->setProcessId(aMessage.SecureId().iId);
+    client->setVendorId(aMessage.VendorId().iId);
+    RThread clientThread;
+    aMessage.ClientL(clientThread);
+    RProcess clientProc;
+    clientThread.Process(clientProc);
+    client->setName(QString::fromUtf16(clientProc.Name().Ptr(), 
+                                       clientProc.Name().Length()));
+    client->setCapabilities(ClientCapabilities(aMessage));
+    clientThread.Close();
+
+    // Set the picked sharable file if any
+    if (file != 0)
+    {
+        // Support only one sharable file
+        iCurRequest->addSharableFile(file, 0);
+    }
+    
+    // Add data and callback to the observer
+    // 
+    iCurRequest->addRequestdata(convertData);
+    iCurRequest->setClientInfo(client); // ownership passed
+    iObserver->handleRequest(iCurRequest);
+
+    CleanupStack::PopAndDestroy(2, request);
+}
+
+/*!
+    Handle getting the result buffer.
+    \param aMessage Message object.
+*/
+void CServiceSymbianSession::handleGetBufferL(const RMessage2& aMessage)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::handleGetBufferL");
+    XQSERVICE_DEBUG_PRINT("iData: %s", iData.constData());
+    TPtrC8 data(reinterpret_cast<const TUint8*> (iData.constData()), iData.length());
+    TInt err = aMessage.Write(0, data);
+    aMessage.Complete(err);
+}
+
+/*!
+    Read a 16 bit descriptor from the message.
+    \param aMessage Message to read from.
+    \param aMsgSlot Slot to read from.
+ */
+HBufC* CServiceSymbianSession::ReadDesLC(const RMessage2& aMessage,
+                                         TInt aMsgSlot)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::ReadDesLC");
+    TInt length = aMessage.GetDesLengthL(aMsgSlot);
+    HBufC* des = HBufC::NewLC(length);
+    TPtr ptr = des->Des();
+    aMessage.ReadL(aMsgSlot, ptr);
+    return des;
+}
+
+/*!
+    Read a 8 bit descriptor from the message.
+    \param aMessage Message to read from.
+    \param aMsgSlot Slot to read from.
+*/
+HBufC8* CServiceSymbianSession::ReadDes8LC(const RMessage2& aMessage,
+                                           TInt aMsgSlot)
+{
+    XQSERVICE_DEBUG_PRINT("CServiceSymbianSession::ReadDes8LC");
+    TInt length = aMessage.GetDesLengthL(aMsgSlot);
+    HBufC8* des = HBufC8::NewLC(length + 1); // 1 more for null terminator
+    TPtr8 ptr = des->Des();
+    aMessage.ReadL(aMsgSlot, ptr);
+    return des;
+}
+
+// Sharable file utility
+const TInt KRFsSlot = 2;
+const TInt KRFileSlot = 3;
+
+bool AdoptSharableFile(const RMessage2& aMsg, XQSharableFile *file)
+{
+    XQSERVICE_DEBUG_PRINT("AdoptSharableFile");
+    RFile handle;
+    TInt err = handle.AdoptFromClient(aMsg, KRFsSlot, KRFileSlot);
+
+    bool ret = (err == KErrNone);
+   
+     if (ret)
+    {
+        file->setHandle(handle);
+    }
+    
+    // On error the handle remains invalid !
+    return ret;
+}
+
+/*!
+    Get client capabilities from the IPC request.
+*/
+quint32 ClientCapabilities(const RMessage2& aMsg)
+{
+    quint32 caps = 0;
+    for(int i = 0; i < ECapability_Limit; i++)
+    {
+        if (aMsg.HasCapability(static_cast<TCapability>(i)))
+        {
+            caps |= 1 << i;
+        }
+    }
+
+    return caps;
+}
+
+}
+
+
+// END OF FILE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserver_symbiansession.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  IPC Server class using Symbian client-server
+*
+*/
+
+#ifndef C_XQSERVICE_IPC_SYMBIAN_SESSION_H
+#define C_XQSERVICE_IPC_SYMBIAN_SESSION_H
+
+#include <QtCore/qobject.h>
+#include <e32base.h>
+#include <e32cmn.h> 
+#include "xqserviceipcserversession.h"
+#include "xqsharablefile.h"
+
+namespace QtService
+{
+
+    // Utilities
+    bool AdoptSharableFile(const RMessage2& aMsg, XQSharableFile *file);
+    quint32 ClientCapabilities(const RMessage2& aMsg);
+    
+    class CServiceSymbianSession : public CSession2, public ServiceIPCSession
+    {
+    public:
+    
+        static CServiceSymbianSession* NewL(MServiceIPCObserver* aObserver);
+    
+        virtual ~CServiceSymbianSession();
+    
+        // From ServiceIPCSession
+    protected:
+    
+        bool write(const QByteArray& aData);
+    
+        bool completeRequest();
+    
+        void close();
+    
+        // From CSession2
+    protected:
+    
+        void ServiceL(const RMessage2& aMessage);
+    
+        void Disconnect(const RMessage2 &aMessage);
+    
+        // Service methods
+    private:
+    
+        void handleRequestL(const RMessage2& aMessage);
+    
+        void handleGetBufferL(const RMessage2& aMessage);
+    
+        HBufC* ReadDesLC(const RMessage2& aMessage, TInt aMsgSlot);
+    
+        HBufC8* ReadDes8LC(const RMessage2& aMessage, TInt aMsgSlot);
+    private:
+    
+        CServiceSymbianSession(MServiceIPCObserver* aObserver);
+    
+        void ConstructL();
+    
+    private:
+        // data
+        RMessage2 iMessage;
+        QByteArray iData;
+    };
+}
+#endif // C_XQSERVICE_IPC_SYMBIAN_SESSION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserverfactory.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Factory class to construct the server backend
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqserviceipcserverfactory.h"
+#ifdef __SYMBIAN32__
+#include "xqserviceipcserver_symbianserver.h"
+#include "xqserviceipcserver_apasymbianserver.h"
+#endif // __SYMBIAN32__
+namespace QtService
+{
+
+/*!
+    \class ServiceFwIPCServerFactory
+    \brief Factory class to construct IPC server backend
+*/
+
+/*!
+    Destructor.
+*/
+ServiceFwIPCServerFactory::~ServiceFwIPCServerFactory()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPCServerFactory::~ServiceFwIPCServerFactory");
+}
+
+/*!
+    Constructor.
+*/
+ServiceFwIPCServerFactory::ServiceFwIPCServerFactory()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPCServerFactory::ServiceFwIPCServerFactory");
+}
+
+/*!
+    Construct a backend.
+    \param aBackend Backend to construct.
+    \param aParent Parent to this QObject.
+*/
+ServiceFwIPCServerPrivate* ServiceFwIPCServerFactory::createBackend(QObject* aParent,
+                                                                    TServiceIPCBackends aBackend)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceFwIPCServerFactory::createBackend");
+    XQSERVICE_DEBUG_PRINT("aBackend: %d", aBackend);
+    ServiceFwIPCServerPrivate* backend(NULL);
+#ifdef __SYMBIAN32__
+    // Symbian server is default
+    if (aBackend == ESymbianServer || aBackend == EDefaultIPC) {
+        TRAP_IGNORE( backend = CServiceSymbianServer::NewL(); );
+	}
+    if (aBackend == ESymbianApaServer) {
+        TRAP_IGNORE( backend = CApaSymbianServer::NewL(); );
+	}
+#endif
+    return backend;
+    }
+}
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserverfactory.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Server class
+*
+*/
+
+#ifndef XQ_SERVICEFW_IPC_FACTORY_H
+#define XQ_SERVICEFW_IPC_FACTORY_H
+
+#include <QtCore>
+#include <xqserviceipcdefs.h>
+
+namespace QtService {
+    
+    // FORWARD DECLARATIONS
+    class ServiceFwIPCServerPrivate;
+    
+    class ServiceFwIPCServerFactory : public QObject
+    {
+    
+    public:
+    
+        virtual ~ServiceFwIPCServerFactory();
+    
+        ServiceFwIPCServerFactory();
+    
+    public:
+    
+        static ServiceFwIPCServerPrivate* createBackend(QObject* aParent,
+                                                        TServiceIPCBackends aBackend);
+    
+    };
+
+}
+#endif // XQ_SERVICEFW_IPC_FACTORY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserverprivate.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Service Framework IPC Private implementation
+*
+*/
+
+#ifndef XQ_SERVICE_FRAMEWORK_IPC_PRIVATE_SERVER_H
+#define XQ_SERVICE_FRAMEWORK_IPC_PRIVATE_SERVER_H
+
+#include <QtCore>
+#include <QtCore\Private\qobject_p.h>
+#include "xqserviceipcserverprivate.h"
+#include "xqserviceipcserver.h"
+
+namespace QtService {
+
+    class ServiceFwIPCServer;
+    class ServiceIPCSession;
+    class MServiceIPCObserver;
+
+    /*!
+        \class ServiceFwIPCServerPrivate
+        \brief Private implementation interface for service framework server
+        
+        This class is the abstract interface for all server backends.
+    */
+    class ServiceFwIPCServerPrivate : public QObjectPrivate
+        {
+    protected:
+        Q_DECLARE_PUBLIC(ServiceFwIPCServer);
+
+    public:
+
+        /*!
+            Start listening for new service requests.
+            \param aServerName Name of the server.
+            \return true if listen was successful.
+        */
+        virtual bool listen( const QString& aServerName ) = 0;
+
+        /*!
+            Shutdown the server and stop serving clients.
+        */
+        virtual void disconnect() = 0;
+
+    protected:
+
+        /*!
+            Get the server observer.
+            \return MServiceIPCObserver* observer to this server.
+        */
+        inline MServiceIPCObserver* Observer() { Q_Q(ServiceFwIPCServer); return q->iObserver; };
+
+    protected:
+        QList<ServiceIPCSession*> iSessions;
+        };
+
+}
+#endif // XQ_SERVICE_FRAMEWORK_IPC_PRIVATE_SERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserversession.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Session class for server side IPC communication
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqserviceipcobserver.h"
+#include "xqserviceipcserversession.h"
+
+namespace QtService
+{
+/*!
+    \class ServiceIPCSession
+    \brief Session class to hold the state of each connected client
+*/
+
+/*!
+    Constructor.
+    \param aObserver Observer to the session.
+*/
+ServiceIPCSession::ServiceIPCSession(MServiceIPCObserver* aObserver) :
+    iPendingRequest(false), iObserver(aObserver), iCurRequest(NULL)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCSession::ServiceIPCSession");
+}
+
+/*!
+    Destructor.
+*/
+ServiceIPCSession::~ServiceIPCSession()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceIPCSession::~ServiceIPCSession");
+}
+
+/*!
+    \fn QtService::ServiceIPCSession::write( const QByteArray& aData )
+ 
+    Write some data in response to a request.
+    \param aData Some data to write as response.
+    \return bool If write was successful.
+*/
+
+/*!
+    \fn QtService::ServiceIPCSession::completeRequest()
+ 
+    Complete a request.
+    \return bool if request completed .
+*/
+
+/*!
+    \fn QtService::ServiceIPCSession::close()
+ 
+    Close a session and gracefully shutdown.
+*/
+}
+// END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceipc/xqserviceipcserver/xqserviceipcserversession.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Session class 
+*
+*/
+
+#ifndef XQ_SERVICE_IPC_SESSION_H
+#define XQ_SERVICE_IPC_SESSION_H
+
+#include <QtCore>
+
+namespace QtService {
+    
+    class MServiceIPCObserver;
+    class ServiceIPCRequest;
+    
+    class ServiceIPCSession : public QObject
+    {
+    Q_OBJECT
+    public:
+    
+        ServiceIPCSession(MServiceIPCObserver* aObserver);
+    
+        virtual ~ServiceIPCSession();
+    
+        virtual bool write(const QByteArray& aData) = 0;
+    
+        virtual bool completeRequest() = 0;
+    
+        virtual void close() = 0;
+    
+    protected:
+        // data
+        bool iPendingRequest;
+        MServiceIPCObserver* iObserver;
+        ServiceIPCRequest* iCurRequest;
+    };
+
+}
+#endif // XQ_SERVICE_IPC_SESSION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/api_headers.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,29 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+XQSERVICE_API_HEADERS = \
+       src/xqserviceutil.h \
+       src/xqservicemetadata/xqaiwinterfacedescriptor.h \
+       src/xqservicemanager.h \
+       src/xqrequestinfo.h \
+       src/xqsharablefile.h
+
+XQSERVICE_API_HEADERS_INTERNAL =  \
+       src/xqrequestutil.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqrequestinfo.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,272 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+#include "xqrequestinfo.h"
+#include "xqrequestutil.h"
+
+/*!
+    \class XQRequestInfo
+    \inpublicgroup QtBaseModule
+
+    \ingroup ipc
+    \brief The XQRequestInfo class encapsulates additional information of a service request
+    
+    The XQRequestInfo class encapsulates additional information of a service request:
+    - For service provider it contains additional information of the service request, some set by the client, some set by the QtHighway framework.
+    - For client it gives possibility to add UI oriented options of the request
+    The XQRequestInfo is exported by the xqserviceutil library
+*/
+
+/*!
+    Constructor.
+*/
+XQRequestInfo::XQRequestInfo()
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::XQRequestInfo");
+}
+
+/*!
+    Destructor.
+*/
+XQRequestInfo::~XQRequestInfo()
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::~XQRequestInfo");
+}
+
+/*!
+    Requests service application to be launched as embedded mode.
+    \param on Set to true to turn embedded mode on.
+*/
+void XQRequestInfo::setEmbedded(bool on)
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::setEmbedded %d", on);
+    setInfo(XQServiceUtils::OptEmbedded, on);
+}
+
+/*!
+    Get embedded option value.
+    \return True if embedded mode is turned on, false otherwise.
+*/
+bool XQRequestInfo::isEmbedded() const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::isEmbedded");
+    return info(XQServiceUtils::OptEmbedded).toBool();
+}
+
+/*!
+    Requests service application to be set to background before a slot call to service provider. 
+    If this option is set to false or not set, the QtHighway does not alter the Z-order.
+    \param on Set to true if service application should be launched to background.
+*/
+void XQRequestInfo::setBackground(bool on)
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::setBackground %d", on);
+    setInfo(XQServiceUtils::OptBackground, on);
+}
+
+/*!
+    Get the value of the background option.
+    \return True if option has been set on, false otherwise.
+*/
+bool XQRequestInfo::isBackground() const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::isBackground");
+    return info(XQServiceUtils::OptBackground).toBool();
+}
+
+/*!
+    Requests service application to be brought to foreground before a slot call to service provider.
+    If this option is false or not set, the QtHighway does not alter the Z-order.
+    \param on Set to true if service application should be launched to foreground.
+*/
+void XQRequestInfo::setForeground(bool on)
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::setForeground %d", on);
+    setInfo(XQServiceUtils::OptForeground, on);
+}
+
+/*!
+    Get the value of the foreground option.
+    \return True if option has been set on, false otherwise.
+*/
+bool XQRequestInfo::isForeground() const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::isForeground");
+    return info(XQServiceUtils::OptForeground).toBool();
+}
+
+/*!
+    Gets the vaule of the synchronous option.
+    \return True if request is synchronous , false if asynchronous.
+*/
+bool XQRequestInfo::isSynchronous() const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::isSynchronous");
+    return info(XQServiceUtils::OptSynchronous).toBool();
+}
+
+/*!
+    Gets the client's secure id option. Valid only for service provider.
+    \return Calling client's secure ID as defined by the Symbian OS platform security model.
+*/
+quint32 XQRequestInfo::clientSecureId() const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::clientSecureId");
+    bool b=false;
+    quint32 id = info(XQServiceUtils::InfoSID).toUInt(&b);
+    XQSERVICE_DEBUG_PRINT("\tSID status=%d", b);
+    return id;
+}
+
+/*!
+    Gets the clients's vendor id option. Valid only for service provider.
+    \return Calling client's vendor ID as defined by the Symbian OS platform security model.
+*/
+quint32 XQRequestInfo::clientVendorId() const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::clientVendorId");
+    bool b=false;
+    quint32 id = info(XQServiceUtils::InfoVID).toUInt(&b);
+    XQSERVICE_DEBUG_PRINT("\tVID status=%d", b);
+    return id;
+}
+
+/*!
+    Gets the client's capabilities. Valid only for service provider.
+    \return Calling client's capabilities as defined by the Symbian OS platform security model. 
+            The values in the QSet are compatible with the TCapability values in e32capability.h.
+*/
+QSet<int> XQRequestInfo::clientCapabilities() const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::clientCapabilities");
+    bool b=false;
+    quint32 caps = info(XQServiceUtils::InfoCap).toUInt(&b);
+    XQSERVICE_DEBUG_PRINT("\tCaps status", b);
+    QSet<int> ret;
+    if (!b)
+        return ret;  // Empty set
+    
+    for(int i = 0; i < 32; i++)
+    {
+        quint32 ix = 0;
+        ix |= 1 << i;
+        if (caps & ix)
+        {
+            ret.insert(i);
+        }
+    }
+    
+    return ret;
+}
+
+/*!
+    Sets a \a value of the named info \a key. Key names starting with "XQ" are reserved for
+    the QtHighway internal usage. If the service operation (message) does not accept
+    these parameters already, the recommened way is to pass these in the XQRequestInfo
+    and use the following pre-defined keys:
+    - XQINFO_KEY_WINDOW_TITLE for passing the title string be shown in the service application
+      window (QtHighway does not pick the Orbit window title automatically).
+    - ViewName (QString) for passing the view to be activated in the service application.
+    \param key Info key for which \a value will be set.
+    \param value Value to be set to a \a key
+*/
+void XQRequestInfo::setInfo(const QString &key, const QVariant &value)
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::setInfo %s:%s,%s",
+        qPrintable(key), qPrintable(value.toString()), value.typeName());
+    mInfo.insert(key, value);
+}
+
+/*!
+    Gets the set value of the \a key. The returned value may be invalid if not set.
+    \param key Key name for which value is retrieved.
+    \return Value set to the key, or invalid QVariant if not set.
+*/
+QVariant XQRequestInfo::info(const QString &key) const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::info %s", qPrintable(key));
+    QVariant v =  mInfo.value(key);
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::info type=%s,valid=%d,str=%s", v.typeName(), v.isValid(), qPrintable(v.toString()));
+    return v;
+}
+
+/*!
+    Gets the list of key names set for the object.
+    \return List of key names set for the object.
+*/
+QStringList XQRequestInfo::infoKeys() const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::infoKeys");
+    return mInfo.keys();
+}
+
+/*!
+    Gets the internal id of the current request. As there can be several
+    requests ongoing to the same interface, this separates multiple requests.
+    Once the request has been completed the ID becomes invalid.
+    This is the same value as returned by the XQServiceProvider::setCurrentRequestAsync()
+    to set response asynchronous.
+    \return Id of the current request as integer value.
+*/
+int XQRequestInfo::id() const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::id");
+    bool b=false;
+    int id = info(XQServiceUtils::InfoId).toInt(&b);
+    XQSERVICE_DEBUG_PRINT("\tId status=%d", b);
+    if (!b)
+    {
+        return -1;
+    }
+    return id;
+}
+
+/*!
+    Checks if object is valid.
+    \return True if object is valid, false otherwise.
+*/
+bool XQRequestInfo::isValid() const
+{
+    return !mInfo.isEmpty();
+}
+
+/*!
+    Serializes this XQRequestInfo data into the given stream.
+    \param s Stream the data is serialized into.
+*/
+template <typename Stream> void XQRequestInfo::serialize(Stream &s) const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::serialize");
+    s << mInfo;
+}
+
+/*!
+    Deserializes XQRequestInfo data from the given stream.
+    \param s Stream the data is deserialized from.
+*/
+template <typename Stream> void XQRequestInfo::deserialize(Stream &s)
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::de-serialize");
+    s >> mInfo;
+}
+
+Q_IMPLEMENT_USER_METATYPE(XQRequestInfo)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqrequestinfo.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef XQREQUESTINFO_H
+#define XQREQUESTINFO_H
+
+#include <QVariant>
+#include <QStringList>
+#include <QSet>
+#include <xqserviceglobal.h>
+#include <xqserviceipcmarshal.h>
+
+
+class XQSERVICEUTIL_EXPORT XQRequestInfo
+{
+    public:
+        XQRequestInfo() ;
+        virtual ~XQRequestInfo() ;
+        
+    public:
+        
+        bool isValid() const;
+        
+        void setEmbedded(bool on);
+        bool isEmbedded() const;
+        void setBackground(bool on);
+        bool isBackground() const;
+        bool isSynchronous() const;
+        void setForeground(bool on);
+        bool isForeground() const;
+        
+        quint32 clientSecureId() const;
+        quint32 clientVendorId() const;
+        QSet<int> clientCapabilities() const;
+        int id() const;
+
+        void setInfo(const QString &key, const QVariant &value);
+        QVariant info(const QString &key) const;
+        QStringList infoKeys() const;
+        
+        template <typename Stream> void serialize(Stream &stream) const;
+        template <typename Stream> void deserialize(Stream &stream);
+
+    private:
+        QHash<QString, QVariant> mInfo;
+};
+
+Q_DECLARE_USER_METATYPE(XQRequestInfo)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqrequestutil.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+#include "xqserviceerrdefs.h"
+
+#include "xqrequestutil.h"
+   
+XQRequestUtil::XQRequestUtil()
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestUtil::XQRequestUtil");
+}
+
+XQRequestUtil::~XQRequestUtil()
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestUtil::~XQRequestUtil");
+}
+
+void XQRequestUtil::setSynchronous(bool on)
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::setSynchronous %d", on);
+    mInfo.setInfo(XQServiceUtils::OptSynchronous, on);
+}
+
+
+const XQSharableFile *XQRequestUtil::getSharableFile(int index) const
+{
+    if (index >= 0 && index < mSharableFileArgs.size())
+    {
+        return &mSharableFileArgs.at(index);
+    }
+
+    return 0;
+}
+
+void XQRequestUtil::setSecurityInfo(const quint32 sid, const quint32 vid, const quint32 caps )
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestUtil::setSecurityInfo");
+
+    mInfo.setInfo(XQServiceUtils::InfoSID, sid);
+    mInfo.setInfo(XQServiceUtils::InfoVID, vid);
+    mInfo.setInfo(XQServiceUtils::InfoCap, caps);
+
+}
+
+
+int XQRequestUtil::mapError(int error)
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestUtil::mapError");
+    XQSERVICE_DEBUG_PRINT("\terror=%d", error);
+    
+    int mappedError(XQService::ENoError);
+
+    switch (error)
+    {
+        case KErrNone:
+        {
+            mappedError = XQService::ENoError;
+            break;
+        }
+        
+        case KErrPermissionDenied:
+        case KErrServerTerminated:
+        {
+            mappedError = XQService::EConnectionClosed;
+            break;
+        }
+        case KErrServerBusy:
+        {
+            mappedError = XQService::EConnectionError;
+            break;
+        }
+        case KErrArgument:
+        {
+            mappedError = XQService::EArgumentError;
+            break;
+        }
+
+        case KErrNoMemory:
+        {
+            mappedError = XQService::EIPCError;
+            break;
+        }
+        case KErrNotFound:
+        {
+            mappedError = XQService::EServerNotFound;
+            break;
+        }
+        
+
+        default:
+        {
+            mappedError = error;  // Leave it as is
+            break;
+        }
+    }
+
+
+    XQSERVICE_DEBUG_PRINT("\tmapper error=%d", mappedError);
+    return mappedError;
+
+}
+
+// connectionName=[requesthandle:]channel
+QString XQRequestUtil::channelName(const QString &connectionName)
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestUtil::channelName %s", qPrintable(connectionName));
+    QString ret = connectionName;
+    QStringList l = ret.split(":");
+    if (l.count() > 1)
+    {
+        ret = l.at(1);
+    }
+
+    XQSERVICE_DEBUG_PRINT("XQRequestUtil::channelName ret=%s", qPrintable(ret));
+    return ret;
+    
+}
+   
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqrequestutil.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef XQREQUESTUTIL_H
+#define XQREQUESTUTIL_H
+
+#include <QList>
+#include <QVariant>
+
+#include <xqserviceglobal.h>
+#include <xqaiwinterfacedescriptor.h>
+#include "xqrequestinfo.h"
+#include "xqsharablefile.h"
+
+
+//
+// XQRequestUtil is internal helper class for starting QtHigway service app
+// and for request handling
+//
+// Option key names for XQRequestInfo
+
+namespace XQServiceUtils
+{
+    static const char * OptEmbedded= "XQEmb";    // Option Embedded (off=Non-Embedded)
+    static const char * OptBackground= "XQBg";   // Option Service to Background (missing=no changes in Z-order)
+    static const char * OptForeground= "XQFg";   // Set service app to foreground (missing=no changes in Z-order)
+    static const char * OptSynchronous= "XQSync"; // Option Syncronous / Asynchronous call
+    static const char * InfoSID= "XQSid"; // Client secure ID
+    static const char * InfoVID= "XQVid"; // Client vendor ID
+    static const char * InfoCap= "XQCap"; //Client cap
+    static const char * InfoId= "XQId"; // Request ID
+    
+    // Startup arguments
+    static const char * StartupArgEmbedded = "embedded=yes";
+    static const char * StartupArgService = "service=yes";
+    static const char * StartupArgInterfaceName = "intf=";
+    static const char * StartupArgOperationName = "oper=";
+    static const char * StartupArgServiceName = "xqsn=";
+}
+
+
+class XQSERVICEUTIL_EXPORT XQRequestUtil
+{
+    public:
+        XQRequestUtil() ;
+        virtual ~XQRequestUtil() ;
+
+    // Helper to set the option OptSynchronous 
+    void setSynchronous(bool on);
+    void setSecurityInfo(const quint32 sid, const quint32 vid, const quint32 caps );
+    const XQSharableFile *getSharableFile(int index) const;
+    static int mapError(int error);
+    static QString channelName(const QString &connectionName);
+        
+    public:
+        XQAiwInterfaceDescriptor mDescriptor;  // Contains e.g. service and interface name 
+        XQRequestInfo mInfo;
+        QList<XQSharableFile> mSharableFileArgs;   // Use list even though one file possible to transfer
+        QString mOperation;  // Operation (message) wanted
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemanager.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1051 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include <e32std.h>
+#include <w32std.h>
+#include <apaidpartner.h>
+#include <apparc.h>
+#include <apgcli.h>
+#include <apacln.h>
+#include <apgtask.h>
+#include <barsread2.h>
+#include <apacmdln.h>
+#include <coemain.h>
+
+#include <QBuffer>
+#include <QString>
+#include <QCoreApplication>
+#include <QHash>
+
+#include "xqservicelog.h"
+#include <xqserviceglobal.h>
+#include "xqrequestutil.h"
+#include "xqservicemanager.h"
+#include "xqserviceipcconst.h"
+
+#include "xqservicemetadata/xqservicemetadata_p.h"
+#include <xqservicemetadata/xqaiwinterfacedescriptor.h>
+#include "xqconversions.h"
+
+
+#define TIMER_DELAY 3000
+
+class CProcessInfo : public CActive
+    {
+    public:
+        static void AddProcessL(const TUid& appUid, RProcess& appProcess);
+        static void EnsureProcessCanStartL(const TUid& appUid);
+        
+    protected:
+        CProcessInfo(const TUid& appUid);
+        ~CProcessInfo();
+        void ConstructL(RProcess& appProcess);
+        void DoCancel();
+        void RunL();
+        
+    protected:
+        class ProcessInfoMap
+        {
+        public:
+            ~ProcessInfoMap()
+            {
+                foreach (CProcessInfo* info, map.values())
+                    delete info;
+            }
+            QHash<TInt32, CProcessInfo*> map;
+        };
+        
+        static ProcessInfoMap iProcessInfoMap;
+        const TUid iAppUid;
+    };
+
+
+
+CProcessInfo::ProcessInfoMap CProcessInfo::iProcessInfoMap;
+
+CProcessInfo::CProcessInfo(const TUid& appUid):
+        CActive(CActive::EPriorityStandard), 
+        iAppUid(appUid)
+{
+    XQSERVICE_DEBUG_PRINT("CProcessInfo::CProcessInfo");
+    
+    CActiveScheduler::Add(this);
+}
+
+CProcessInfo::~CProcessInfo()
+{
+    XQSERVICE_DEBUG_PRINT("CProcessInfo::~CProcessInfo");
+    
+    // Cancel asynch request, normally it should be done in DoCancel() 
+    // but we dont wont to cancel request when we cancel active object
+    User::CancelMiscNotifier(iStatus);
+    
+    Cancel();
+}
+
+void CProcessInfo::AddProcessL(const TUid& appUid, RProcess& appProcess)
+{
+    XQSERVICE_DEBUG_PRINT("CProcessInfo::AddProcessL");
+    
+    CProcessInfo* self = new(ELeave) CProcessInfo(appUid);
+    CleanupStack::PushL(self);
+    self->ConstructL(appProcess);
+    CleanupStack::Pop(self);
+}
+
+void CProcessInfo::EnsureProcessCanStartL(const TUid& appUid)
+{
+    XQSERVICE_DEBUG_PRINT("CProcessInfo::EnsureProcessCanStartL");
+    
+    CProcessInfo* previousProcess = iProcessInfoMap.map[appUid.iUid];
+    if (previousProcess) {
+        previousProcess->Cancel();
+        
+        // Timer is for ensure that wait will end. 
+        // Maybe there is possibility that destroing process notification could be lost.
+        RTimer securityTimer;
+        securityTimer.CreateLocal();
+        CleanupClosePushL(securityTimer);
+        
+        TRequestStatus timerStatus;
+        securityTimer.After(timerStatus, TIMER_DELAY);
+        User::WaitForRequest(previousProcess->iStatus, timerStatus);
+        
+        CleanupStack::PopAndDestroy();
+        delete previousProcess;
+        iProcessInfoMap.map.remove(appUid.iUid);
+    }
+}
+
+void CProcessInfo::RunL()
+{
+    XQSERVICE_DEBUG_PRINT("CProcessInfo::RunL");
+    
+    iProcessInfoMap.map.remove(iAppUid.iUid);
+    delete this;
+}
+
+void CProcessInfo::ConstructL(RProcess& appProcess)
+{
+    XQSERVICE_DEBUG_PRINT("CProcessInfo::ConstructL");
+    
+    SetActive();
+    
+    EnsureProcessCanStartL(iAppUid);
+    iProcessInfoMap.map.insert(iAppUid.iUid, this);
+    appProcess.NotifyDestruction(iStatus);
+}
+
+void CProcessInfo::DoCancel()
+{
+    XQSERVICE_DEBUG_PRINT("CProcessInfo::DoCancel");
+    
+    // Cancel asynch request, normally it should be done in DoCancel() 
+    // but we dont wont to cancel request when we cancel active object.
+    // Cancel asynch request is in ~CProcessInfo().
+}
+
+/*!
+    \class XQServiceManagerPrivate
+    \brief Private implementation of the XQServiceManager.
+*/
+class XQServiceManagerPrivate 
+    {
+    public:
+        XQServiceManagerPrivate();
+        ~XQServiceManagerPrivate();
+
+        enum matchMode
+        {
+            MatchInterfaceName,
+            MatchServiceAndInterfaceName
+        };
+        
+        int StartServer(const QString& aService,  bool embedded, int& applicationUid, quint64& processId,
+                       XQRequestUtil *util);
+        TInt Discover(const QString& aService,TUid& aAppUid, QList<XQAiwInterfaceDescriptor>& interfaces, int matchMode,
+                      bool findFirst=false);
+        int  LatestError() const {return iLatestError;};
+        bool IsRunning(const XQAiwInterfaceDescriptor& implementation) const;
+        
+    private:
+        void StartServerL(const TUid& uid, bool embedded, TUint64& processId, XQRequestUtil *util);
+        TInt Discover(const TDesC& aService,TUid& aAppUid, QList<XQAiwInterfaceDescriptor>& interfaces, int matchMode,
+                      bool findFirst=false);
+        TInt Discover1(const TDesC& aService,TUid& aAppUid, QList<XQAiwInterfaceDescriptor>& interfaces, int matchMode,
+                       bool findFirst=false);
+        TInt Discover2(const TDesC& aService,TUid& aAppUid, QList<XQAiwInterfaceDescriptor>& interfaces, int matchMode,
+                       bool findFirst=false);
+        CApaAppServiceInfoArray* AvailableServiceImplementations1L();
+        CApaAppServiceInfoArray* AvailableServiceImplementations2L();
+        TUint64 getAppPid(const TUid& aAppUid);   
+        int doMapErrors(TInt aError);
+        
+        TVersion iVersion;
+        TApaAppInfo  iAppInfo;
+        int iLatestError;
+        RApaLsSession iApaSession;
+        XQAiwInterfaceDescriptor iImplDescriptor; 
+    };
+
+/*!
+    \class XQServiceManager
+    \brief Discovery and service startup. 
+*/
+
+/*!
+    Constructor.
+*/
+XQServiceManager::XQServiceManager()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManager::XQServiceManager");
+    d = new XQServiceManagerPrivate();
+}
+
+/*!
+    Destructor.
+*/
+XQServiceManager::~XQServiceManager()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManager::~XQServiceManager");
+    delete d;
+}
+
+/*!
+    Starts service
+    \param service The full name of service (servicename + interfacename).
+    \param embedded Start in embedded mode.
+    \param applicationUid Returned applicatiion.
+    \param threadId Returned process id of the application.
+    \return Error code if error occured, 0 otherwise.
+*/
+int XQServiceManager::startServer(const QString& service, bool embedded, int& applicationUid, quint64& threadId)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManager::startServer(1)");
+    return startServer(service,embedded,applicationUid,threadId,NULL);
+}
+
+/*!
+    Starts service
+    \param service The full name of service (servicename + interfacename).
+    \param embedded Start in embedded mode.
+    \param applicationUid Returned applicatiion.
+    \param threadId Returned process id of the application.
+    \param userData Additional user data.
+    \return Error code if error occured, 0 otherwise.
+*/
+int XQServiceManager::startServer(const QString& service, bool embedded, int& applicationUid, quint64& threadId,
+                                 const void *userData)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManager::startServer(2)");
+
+    // The "XQServiceRequest::send(QVariant& retData)" function passed the utility as user data
+    // the IPC layer. Could be NULL if no descriptor was given upon creating the request.
+    // The util data is known to be writeable (though passed as const userData)
+    XQRequestUtil *util = static_cast<XQRequestUtil*>((void *)userData);
+    if (util == 0)
+    {
+        // Something is badly wrong as this should be always avaible
+        return XQService::EMgrInternalError;
+    }
+    
+    return d->StartServer(service,embedded,applicationUid,threadId, util);
+}
+
+
+/*!
+    Finds implementations for the given interface.
+    \param interfaceName Interfacename to match.
+    \return List of implementations.
+*/
+QList<XQAiwInterfaceDescriptor>  XQServiceManager::findInterfaces ( const QString &interfaceName ) const
+    {
+    XQSERVICE_DEBUG_PRINT("XQServiceManager::findInterfaces 1");
+    QList<XQAiwInterfaceDescriptor> interfaces;
+    TUid appUid;
+    interfaces.clear();
+    TInt error=d->Discover(interfaceName, appUid, interfaces, XQServiceManagerPrivate::MatchInterfaceName);
+    return interfaces;
+    }
+
+/*!
+    Finds implementations for the given interface implemented by given service.
+    \param serviceName Service name.
+    \param interfaceName Interfacename to match.
+    \return List of implementations.
+*/
+QList<XQAiwInterfaceDescriptor>  XQServiceManager::findInterfaces ( const QString &serviceName, const QString &interfaceName ) const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManager::findInterfaces 2");
+    QList<XQAiwInterfaceDescriptor> interfaces;
+    TUid appUid;
+    interfaces.clear(); 
+    TInt error=d->Discover(serviceName + "." + interfaceName, appUid, interfaces,
+                           XQServiceManagerPrivate::MatchServiceAndInterfaceName);
+    return interfaces;
+}
+
+
+/*!
+    Finds the first implementation for the given interface name.
+    \param interfaceName Interfacename to match.
+    \return List of implementations.
+*/
+QList<XQAiwInterfaceDescriptor>  XQServiceManager::findFirstInterface ( const QString &interfaceName ) const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManager::findFirstInterface 1");
+    QList<XQAiwInterfaceDescriptor> interfaces;
+    TUid appUid;
+    interfaces.clear();
+    TInt error=d->Discover(interfaceName, appUid, interfaces, XQServiceManagerPrivate::MatchInterfaceName, true);
+    return interfaces;
+}
+
+/*!
+    Finds the first implementation for the given service + interface names.
+    \param serviceName Service name.
+    \param interfaceName Interfacename to match.
+    \return List of implementations.
+*/
+QList<XQAiwInterfaceDescriptor>  XQServiceManager::findFirstInterface ( const QString &serviceName, const QString &interfaceName ) const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManager::findFirstInterface 2");
+    QList<XQAiwInterfaceDescriptor> interfaces;
+    TUid appUid;
+    interfaces.clear(); 
+    // Catenate to get full name
+    TInt error=d->Discover(serviceName + "." + interfaceName, appUid, interfaces,
+                           XQServiceManagerPrivate::MatchServiceAndInterfaceName, true);
+    return interfaces;
+}
+
+
+/*!
+    Gets the latest error occured.
+    \return Latest error code as integer value.
+*/
+int XQServiceManager::latestError() const
+{
+    return d->LatestError();
+}
+
+/*!
+    Checks if the given \a implmentation is running.
+    \param implementation Implementation to be checked.
+    \return true if given \a implementation is running, false otherwise.
+*/
+bool XQServiceManager::isRunning(const XQAiwInterfaceDescriptor& implementation) const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManager::isRunning");
+    return d->IsRunning(implementation);
+}
+
+// ====== Private part ==============
+
+XQServiceManagerPrivate::XQServiceManagerPrivate()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::XQServiceManagerPrivate");
+    iLatestError = 0;
+    iApaSession.Connect();    
+}
+
+XQServiceManagerPrivate::~XQServiceManagerPrivate()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::~XQServiceManagerPrivate");
+    iApaSession.Close();
+};
+
+// aService is here the full name (service + interface)
+int XQServiceManagerPrivate::StartServer(const QString& aService,  bool embedded, int& applicationUid, quint64& processId,
+                                        XQRequestUtil *util)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::startServer(2)");
+    XQSERVICE_DEBUG_PRINT("aService: %s", qPrintable(aService));
+    
+    TUid appUid;
+    appUid.iUid=0;
+    
+    TInt error = KErrNone;
+    QList<XQAiwInterfaceDescriptor> interfaces;
+    TPtrC serverName( reinterpret_cast<const TUint16*>(aService.utf16()) );
+    if (util->mDescriptor.isValid()) 
+    {
+        iImplDescriptor=util->mDescriptor;  // Descriptor given by caller
+        appUid.iUid = util->mDescriptor.property(XQAiwInterfaceDescriptor::ImplementationId).toInt();
+        XQSERVICE_DEBUG_PRINT("ApplicationUid from descriptor: %x", appUid.iUid);
+    }
+    
+    // Need to discover service first if descriptor did not contained valid UID
+    // Otherwise, go directly starting the service server
+    if (appUid.iUid == 0)
+    {
+        // Find the first implementation
+        error = Discover(serverName,appUid,interfaces, XQServiceManagerPrivate::MatchServiceAndInterfaceName, true);
+        if (interfaces.count())
+        {
+            iImplDescriptor=interfaces[0];  // Descriptor search upon start
+        }
+    }
+    if (error)
+        {
+        return doMapErrors(error);
+        }
+
+    TRAP(error, StartServerL(appUid,embedded,processId, util));
+    applicationUid = appUid.iUid ;
+
+    XQSERVICE_DEBUG_PRINT("ApplicationUid: %x, processId: %d", applicationUid, processId);
+    XQSERVICE_DEBUG_PRINT("error: %d", error);
+    return doMapErrors(error);
+}
+
+void XQServiceManagerPrivate::StartServerL(const TUid& uid, bool embedded, TUint64& processId,
+                                           XQRequestUtil *util)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::StartServerL");
+    Q_UNUSED(embedded);  // Not used any more. XQRequestUtil applied instead
+    
+    bool toBackground = false;
+    // Apply the utility's option for embedding  instead
+    bool embed = util->mInfo.isEmbedded();
+    toBackground = util->mInfo.isBackground();
+    
+    XQSERVICE_DEBUG_PRINT("\tembedded got from utility=%d", embed);
+    XQSERVICE_DEBUG_PRINT("\tbackground got from utility=%d", toBackground);
+
+    // retrieve application information
+    User::LeaveIfError( iApaSession.GetAppInfo( iAppInfo, uid ) );
+
+    TApaAppCapabilityBuf caps;
+    User::LeaveIfError(iApaSession.GetAppCapability(caps, uid));
+    if (!toBackground)
+    {
+        // If service wants to be launched to background.. respect it
+        toBackground = caps().iLaunchInBackground;
+        XQSERVICE_DEBUG_PRINT("\tbackground from apparch=%d", toBackground);
+    }
+
+    // Consistency check
+    if (embed && toBackground)
+    {
+        User::Leave(KErrArgument);
+    }
+
+    /*
+    // Using the "iAppInfo.iCaption" is wrong as the channel name (full servicename) shall be used:
+    // e.g. tester's "com.nokia.servicesd.serviceapp.Dialer" or
+    //       "com.nokia.servicesd.serviceapp.Dialer.PROCESS-ID" in case of embedded launch
+    // Anyway, this is not needed as the "XQServiceIpcClient::connectToServer()" takes care of the checking logic
+    // earlier (the "startServer" logic will be applied only when needed)
+    TFindServer find( iAppInfo.iCaption );
+    TFullName fullName;
+    TInt err = find.Next( fullName );
+    XQSERVICE_DEBUG_PRINT("err: %d", err);
+    */
+    TInt err = KErrNotFound;  // Assume not found
+    if ( err != KErrNone )
+        {
+        CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
+        cmdLine->SetExecutableNameL( iAppInfo.iFullName );
+        TApaCommand  aLaunchCommand = toBackground ? EApaCommandBackground : EApaCommandRun;
+        cmdLine->SetCommandL(aLaunchCommand);
+
+        // just use the Secure ID as server differentiator
+        //cmdLine->SetServerRequiredL( uid.iUid );
+        RProcess client;
+        cmdLine->SetServerRequiredL(client.Id().Id());
+        if (embed) {
+            CCoeEnv* env= CCoeEnv::Static();
+            if (env)  // Could be NULL 
+            {
+                RWindowGroup& wg = env->RootWin();
+                wg.AllowProcessToCreateChildWindowGroups(iAppInfo.iUid);
+                TInt parentId = wg.Identifier();
+                if (parentId)
+                {
+                    // pass our window group ID to the embedded child process
+                    cmdLine->SetParentWindowGroupID(parentId);
+                    XQSERVICE_DEBUG_PRINT("\tParent ID %x set for %x (%x)", (int)parentId, iAppInfo.iUid, uid.iUid);
+                }
+            }
+            else
+            {
+                // Can not be embedded (non GUI client)
+                embed = false;
+            }
+        }
+        else {
+            CProcessInfo::EnsureProcessCanStartL(uid);
+        }
+        TRequestStatus requestStatusForRendezvous;
+        
+        // start application with command line parameters
+        //User::LeaveIfError( iApaSession.StartApp( *cmdLine, threadId, &requestStatusForRendezvous) );
+        QString startupArgs = QString::fromLatin1(XQServiceUtils::StartupArgService);
+        if (embed)
+        {
+            startupArgs += (" " + QString::fromLatin1(XQServiceUtils::StartupArgEmbedded));
+        }
+
+        //
+        // Add interface name and operation (message) name to the command line as startup args.
+        // Usable in practise only for the embedded launch
+        // Can be used  by service application to prepare the UI to the coming call.
+        //
+        QStringList l = util->mOperation.split("("); 
+        QString oper = l.value(0); //  // Pick only the function name and ignore parameters
+        
+        startupArgs += (" " + QString::fromLatin1(XQServiceUtils::StartupArgInterfaceName) + iImplDescriptor.interfaceName() );
+        startupArgs += (" " + QString::fromLatin1(XQServiceUtils::StartupArgServiceName) + iImplDescriptor.serviceName() );
+        startupArgs += (" " + QString::fromLatin1(XQServiceUtils::StartupArgOperationName) + oper);
+        
+        XQSERVICE_DEBUG_PRINT("\tStartupArgs:%s", qPrintable(startupArgs));
+        TPtrC cmdLineArgs( reinterpret_cast<const TUint16*>(startupArgs.utf16()) );
+        
+        RProcess newApp;
+        XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::Creating process");
+        User::LeaveIfError(newApp.Create(iAppInfo.iFullName, cmdLineArgs));
+        CleanupClosePushL(newApp);
+        
+        XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::Created process");
+        cmdLine->SetProcessEnvironmentL(newApp);
+        TProcessId newAppId = newApp.Id();
+        processId = newAppId.Id();
+        XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::Rendezvous for %x", processId);
+        newApp.Rendezvous(requestStatusForRendezvous);  // Asynchronous
+        newApp.Resume();
+        
+        User::WaitForRequest( requestStatusForRendezvous ); // Make the  rendezvouz
+        XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::Rendezvous done %d", requestStatusForRendezvous.Int());
+
+        if (!embed) {
+            CProcessInfo::AddProcessL(uid, newApp);
+        }
+        
+        User::LeaveIfError( requestStatusForRendezvous.Int()); 
+        CleanupStack::PopAndDestroy(2,cmdLine); // newApp, cmdLine
+        
+        XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::Done"); 
+        }
+    
+}
+
+
+TUint64 XQServiceManagerPrivate::getAppPid(const TUid& aAppUid)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::getAppPid");
+    TUint64 pid = 0;
+    // Get the current task
+    RWsSession ws;
+    if (ws.Connect()==KErrNone) {
+        XQSERVICE_DEBUG_PRINT("Connected to window server");
+        TApaTaskList tasklist( ws );
+        TApaTask task = tasklist.FindApp( aAppUid );        
+        if (task.Exists()) {
+            XQSERVICE_DEBUG_PRINT("Application found");
+            pid=task.ThreadId().Id();
+        }
+    }
+    return pid;
+}
+
+CApaAppServiceInfoArray* XQServiceManagerPrivate::AvailableServiceImplementations1L()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::AvailableServiceImplementations1L");
+    // retrieve list of available services implementations from apparc
+    CApaAppServiceInfoArray* apaInfo = 
+                    iApaSession.GetServiceImplementationsLC(TUid::Uid(KXQServiceUid));
+    CleanupStack::Pop( apaInfo );
+    return apaInfo;
+}
+
+CApaAppServiceInfoArray* XQServiceManagerPrivate::AvailableServiceImplementations2L()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::AvailableServiceImplementations2L");
+    // retrieve list of available services implementations from apparc
+    CApaAppServiceInfoArray* apaInfo = 
+                    iApaSession.GetServiceImplementationsLC(TUid::Uid(KXQServiceUid2));
+    CleanupStack::Pop( apaInfo );
+    return apaInfo;
+}
+
+TInt XQServiceManagerPrivate::Discover(const QString& aService,TUid& aAppUid, QList<XQAiwInterfaceDescriptor>& interfaces,
+                                      int matchMode, bool findFirst)
+    {
+    TPtrC serverName( reinterpret_cast<const TUint16*>(aService.utf16()) );
+    TInt error=Discover(serverName, aAppUid, interfaces, matchMode, findFirst);
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::Discover (1)");
+    return error;
+    }
+
+TInt XQServiceManagerPrivate::Discover( const TDesC& aService,
+                                      TUid& aAppUid, QList<XQAiwInterfaceDescriptor>& interfaces,
+                                      int matchMode, bool findFirst)
+    {
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::Discover (2)");
+    TInt discoverResult1 = KErrNotFound;
+    TInt discoverResult2 = KErrNotFound;
+
+    // Discover first possible reg files with old format
+    discoverResult1 = Discover1(aService, aAppUid, interfaces, matchMode, findFirst);
+    // Discover then  reg files with new format (add results)
+    discoverResult2 = Discover2(aService, aAppUid, interfaces, matchMode, findFirst);
+    
+    if (discoverResult1 == KErrNone || discoverResult2 == KErrNone)
+        {
+        // Results merged
+        return KErrNone;
+        }
+    else
+        {
+        return KErrNotFound;
+        }
+    }
+
+TInt XQServiceManagerPrivate::Discover1( const TDesC& aService,
+                                      TUid& aAppUid, QList<XQAiwInterfaceDescriptor>& interfaces,
+                                      int matchMode, bool findFirst)
+    {
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::Discover1");
+        
+    CApaAppServiceInfoArray* apaInfo = NULL;
+    TInt error = KErrNone;
+    TRAP(error, apaInfo = AvailableServiceImplementations1L());
+    XQSERVICE_DEBUG_PRINT("Discover status=%d", error);
+    if (error)
+        {
+        return error;  // This is fatal as nothing found
+        }
+    TArray<TApaAppServiceInfo> implArray( apaInfo->Array() );
+    XQSERVICE_DEBUG_PRINT("implArray.Count(): %d", implArray.Count());
+    if ( !implArray.Count() )
+        {
+        delete apaInfo;
+        return KErrNotFound;   // No services found
+        }
+    
+    TBool found( EFalse );
+    QString serviceName = QString::fromUtf16(aService.Ptr(),aService.Length());
+    XQSERVICE_DEBUG_PRINT("serviceName: %s", qPrintable(serviceName));
+    TBool firstUidPicked(EFalse);
+    
+    for ( TInt ii = 0; ii < implArray.Count(); ii++ )  
+        {
+
+        //
+        // Reset error for each check round
+        //
+        error = KErrNone;
+            
+        TUid uid = implArray[ii].Uid();
+        XQSERVICE_DEBUG_PRINT("implArray[%d].UID=%x", ii, uid);
+            
+        RResourceReader res;
+        // read opaque data
+        TRAP(error,res.OpenL( implArray[ii].OpaqueData() ) )
+        if ( error )
+            {
+            XQSERVICE_DEBUG_PRINT("OpaqueData error: %d", error);
+            delete apaInfo;
+            apaInfo = NULL;
+            continue;  // Next could be OK
+            }
+        
+        //the first WORD contains the number of elements in the resource
+        int count = 0;
+        TRAP(error,count = res.ReadInt16L());
+        if ( error )
+            {
+            XQSERVICE_DEBUG_PRINT("resource error1: %d", error);
+            res.Close();
+            delete apaInfo;
+            apaInfo = NULL;
+            continue;  // Next could be OK
+            }      
+        QByteArray xmlConf ;
+        XQSERVICE_DEBUG_PRINT("resource line count: %d", count);
+        for (int i=0; i < count ; i++) 
+            {
+            TPtrC16 xmlBuf;
+            TRAP(error, xmlBuf.Set( res.ReadTPtrC16L() ));
+            if (error)
+                {
+                XQSERVICE_DEBUG_PRINT("resource error2: %d", error);
+                res.Close();
+                delete apaInfo;
+                apaInfo = NULL;
+                break;
+                }
+            else
+                {
+                QString str=QString::fromUtf16(xmlBuf.Ptr(),xmlBuf.Length());
+                XQSERVICE_DEBUG_PRINT("resource str: %s", qPrintable(str));
+                xmlConf.append(str.toAscii());
+                }
+            }
+
+        // If we stop loop for the first resource error,
+        // it will hit cases where same interface has been implemented by multiple services
+        // So go on checking all the resource files
+        if (error)
+        {
+            continue; // Next could be OK
+        }
+        
+        XQSERVICE_DEBUG_PRINT("resource data: %s", xmlConf.constData());
+        QBuffer buf(&xmlConf);
+        ServiceMetaData* metaData = new ServiceMetaData(&buf);
+        if (metaData->extractMetadata()) 
+            {
+            ServiceMetaDataResults results=metaData->parseResults();
+            // interfaces = results.interfaces;  // return value set here ???!!
+
+            // Go through all interfaces and pick the UI for the first matching one.
+            // THIS NEED TO BE FIXED IF SOMEONE WANTS DEDICATED IMPLEMENTATION
+            // Fill in the implementationId for all interfaces
+            foreach (XQAiwInterfaceDescriptor interface,results.interfaces)
+                {
+                QString sn;
+                QString snDeprecated;
+                if (results.version == ServiceMetaDataResults::VERSION_1)
+                    {
+                    // Old version of the XML format. The parser took care of adaptation
+                    // discovery-name = service-name + interface name
+                    XQSERVICE_DEBUG_PRINT("version 1");
+                    }
+                else
+                    {
+                    // discovery-name = interface name
+                   XQSERVICE_DEBUG_PRINT("version 2");
+                    }
+
+                // Deprecated service name, if any
+                QString deprecatedServiceName = interface.customProperty("deprecatedsn");
+                bool deprNameExists = !deprecatedServiceName.isEmpty();
+                if (deprNameExists)
+                {
+                    XQSERVICE_DEBUG_PRINT("deprecatedServiceName: %s", qPrintable(deprecatedServiceName));
+                }
+                
+                // This is the name used in match
+                // TODO: Version handling support: Take the latest version if multiple matches
+                switch (matchMode)
+                {
+                    case MatchInterfaceName :
+                        sn = interface.interfaceName();
+                        break;
+                    case MatchServiceAndInterfaceName :
+                        sn =interface.serviceName() + "." + interface.interfaceName();
+                        snDeprecated = deprecatedServiceName + "." + interface.interfaceName();
+                        break;
+                    default:
+                        sn = interface.interfaceName();
+                       break;
+                }
+
+                XQSERVICE_DEBUG_PRINT("compare name is: %s", qPrintable(sn));
+                XQSERVICE_DEBUG_PRINT("requested name: %s", qPrintable(serviceName));
+                if ((!serviceName.compare(sn,Qt::CaseInsensitive)) ||
+                    (deprNameExists && !serviceName.compare(snDeprecated,Qt::CaseInsensitive)))
+                    {
+                    TUid appUid = implArray[ii].Uid();
+                    if (!firstUidPicked)
+                        {
+                        aAppUid = appUid;
+                        firstUidPicked = ETrue;
+                        XQSERVICE_DEBUG_PRINT("First service found UID3=%x", appUid.iUid);
+                        }
+                    XQSERVICE_DEBUG_PRINT("Service found UID3=%x", appUid.iUid);
+                    //  Add impl. UID to interface
+                    interface.setProperty(XQAiwInterfaceDescriptor::ImplementationId, (int)appUid.iUid);
+                    found = ETrue;
+
+                    // Add the matched interface to result set
+                    interfaces.append(interface);
+                    
+                    }
+                } // forearch interface
+            } 
+        else
+            {
+             error = metaData->getLatestError();
+             iLatestError = error;
+             XQSERVICE_DEBUG_PRINT("metadata error: %d", error); 
+            }  
+        
+        delete metaData;
+        metaData = NULL;
+        res.Close();
+
+
+        // If only first found needed, quit the loop.
+        if (findFirst && firstUidPicked)
+            {
+            XQSERVICE_DEBUG_PRINT("First service returned UID3=%x", aAppUid.iUid);
+            break;
+            }
+        
+        } // for implArray ...
+    
+    delete apaInfo;
+    if (!found)
+        {
+        error = KErrNotFound;
+        }
+    if (found)
+        {
+        error = KErrNone;
+        }
+    
+    XQSERVICE_DEBUG_PRINT("Discover error: %d", error);
+    
+    return error;
+    }
+
+
+TInt XQServiceManagerPrivate::Discover2( const TDesC& aService,
+                                      TUid& aAppUid, QList<XQAiwInterfaceDescriptor>& interfaces,
+                                      int matchMode, bool findFirst)
+    {
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::Discover2");
+        
+    CApaAppServiceInfoArray* apaInfo = NULL;
+    TInt error = KErrNone;
+    
+    TRAP(error, apaInfo = AvailableServiceImplementations2L());
+    XQSERVICE_DEBUG_PRINT("Discover status=%d", error);
+    
+    if (error)
+        {
+        return error;  // This is fatal as nothing found
+        }
+    TArray<TApaAppServiceInfo> implArray( apaInfo->Array() );
+    XQSERVICE_DEBUG_PRINT("implArray.Count(): %d", implArray.Count());
+    
+    if ( !implArray.Count() )
+        {
+        delete apaInfo;
+        return KErrNotFound;   // No services found
+        }
+    
+    TBool found( EFalse );
+    
+    QString serviceName = QString::fromUtf16(aService.Ptr(),aService.Length());
+    XQSERVICE_DEBUG_PRINT("serviceName: %s", qPrintable(serviceName));
+    TBool firstUidPicked(EFalse);
+
+    for ( TInt ii = 0; ii < implArray.Count(); ii++ )  
+        {
+        TUid uid = implArray[ii].Uid();
+        XQSERVICE_DEBUG_PRINT("implArray[%d].UID=%x", ii, uid);
+
+        QByteArray xmlConf ;
+
+        TPtrC8 opaque = implArray[ii].OpaqueData();
+        const TPtrC16 tmpXml((TText16*) opaque.Ptr(),(opaque.Length()+1)>>1);
+        QString strXml = XQConversions:: s60DescToQString( tmpXml ) ;
+        // XQSERVICE_DEBUG_PRINT("XML conf: %s", qPrintable(strXml));
+        XQSERVICE_DEBUG_PRINT("size of xml conf.: %d characters", strXml.size());
+        xmlConf.append(strXml.toAscii());
+        
+        XQSERVICE_DEBUG_PRINT("resource data: %s", xmlConf.constData());
+        QBuffer buf(&xmlConf);
+        ServiceMetaData* metaData = new ServiceMetaData(&buf);
+        if (metaData->extractMetadata()) 
+            {
+            ServiceMetaDataResults results=metaData->parseResults();
+
+            // Go through all interfaces and pick the UI for the first matching one.
+            // THIS NEED TO BE FIXED IF SOMEONE WANTS DEDICATED IMPLEMENTATION
+            // Fill in the implementationId for all interfaces
+            foreach (XQAiwInterfaceDescriptor interface,results.interfaces)
+                {
+                QString sn;
+                QString snDeprecated;
+                if (results.version == ServiceMetaDataResults::VERSION_1)
+                    {
+                    // Old version of the XML format. The parser took care of adaptation
+                    // discovery-name = service-name + interface name
+                    XQSERVICE_DEBUG_PRINT("version 1");
+                    }
+                else
+                    {
+                    // discovery-name = interface name
+                   XQSERVICE_DEBUG_PRINT("version 2");
+                    }
+
+                // Deprecated service name, if any
+                QString deprecatedServiceName = interface.customProperty("deprecatedsn");
+                bool deprNameExists = !deprecatedServiceName.isEmpty();
+                if (deprNameExists)
+                {
+                    XQSERVICE_DEBUG_PRINT("deprecatedServiceName: %s", qPrintable(deprecatedServiceName));
+                }
+                // This is the name used in match
+                // TODO: Version handling support: Take the latest version if multiple matches
+                switch (matchMode)
+                {
+                    case MatchInterfaceName :
+                        sn = interface.interfaceName();
+                        break;
+                    case MatchServiceAndInterfaceName :
+                        sn =interface.serviceName() + "." + interface.interfaceName();
+                        snDeprecated = deprecatedServiceName + "." + interface.interfaceName();
+                        break;
+                    default:
+                        sn = interface.interfaceName();
+                        break;
+                }
+
+                XQSERVICE_DEBUG_PRINT("compare name is: %s", qPrintable(sn));
+                XQSERVICE_DEBUG_PRINT("requested name: %s", qPrintable(serviceName));
+                if ((!serviceName.compare(sn,Qt::CaseInsensitive)) ||
+                    (deprNameExists && !serviceName.compare(snDeprecated,Qt::CaseInsensitive)))
+                    {
+                    TUid appUid = implArray[ii].Uid();
+                    if (!firstUidPicked)
+                        {
+                        aAppUid = appUid;
+                        firstUidPicked = ETrue;
+                        XQSERVICE_DEBUG_PRINT("First service found UID3=%x", appUid.iUid);
+                        }
+                    XQSERVICE_DEBUG_PRINT("Service found UID3=%x", appUid.iUid);
+                    //  Add impl. UID to interface
+                    interface.setProperty(XQAiwInterfaceDescriptor::ImplementationId, (int)appUid.iUid);
+                    found = ETrue;
+
+                    // Add the matched interface to result set
+                    interfaces.append(interface);
+                    }
+
+                    if (found)
+                    {
+                        error = KErrNone;
+                    }
+                } // forearch interface
+            }
+        else
+            {
+             error = metaData->getLatestError();
+             iLatestError = error;
+             XQSERVICE_DEBUG_PRINT("metadata error: %d", error); 
+            }  
+        
+        delete metaData;
+        metaData = NULL;
+
+        // If only first found needed, quit the loop.
+        if (findFirst && firstUidPicked)
+            {
+            XQSERVICE_DEBUG_PRINT("First service returned UID3=%x", aAppUid.iUid);
+            break;
+            }
+        } // for implArray ...
+    
+    delete apaInfo;
+    if (!found)
+        {
+        error = KErrNotFound;
+        }
+    
+    if (found)
+        {
+        error = KErrNone;
+        }
+    
+    XQSERVICE_DEBUG_PRINT("Discover error: %d", error);
+    
+    return error;
+}
+
+bool XQServiceManagerPrivate::IsRunning(const XQAiwInterfaceDescriptor& implementation) const
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::IsRunning");
+    QString fullServiceName = implementation.serviceName() + "." +  implementation.interfaceName();
+    TPtrC serverName( reinterpret_cast<const TUint16*>(fullServiceName.utf16()) );
+    
+    TFindServer findServer(serverName);
+    TFullName name;
+    bool b = findServer.Next(name) == KErrNone;
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::IsRunning=%d",b);
+    return b;
+}
+
+    
+int XQServiceManagerPrivate::doMapErrors(TInt aError)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceManagerPrivate::doMapErrors");
+    XQSERVICE_DEBUG_PRINT("aError: %d", aError);
+    int error(XQService::ENoError);
+    
+    switch (aError)
+    {
+    case KErrNone: {
+        error = XQService::ENoError;
+        break;
+    }
+    case KErrPermissionDenied:
+    case KErrServerTerminated: {
+        error = XQService::EConnectionClosed;
+        break;
+    }
+    case KErrServerBusy: {
+        error = XQService::EConnectionError;
+        break;
+    }
+    case KErrArgument:
+    {
+        error = XQService::EArgumentError;
+        break;
+    }
+        
+    case KErrNoMemory: {
+        error = XQService::EIPCError;
+        break;
+    }
+    case KErrNotFound: {
+        error = XQService::EServerNotFound;
+        break;
+    }
+
+    default:
+    {
+
+        if (aError >= XQService::EMetaNoService && aError <= XQService::EMetaDuplicatedCustomKey)
+        {
+            iLatestError = error;
+            return error;  // Already real error
+        }
+        
+        error = XQService::EUnknownError;
+        break;
+    }
+    }
+
+    // Save error
+    iLatestError = error;
+    
+    XQSERVICE_DEBUG_PRINT("error: %d", error);
+    return error;
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemanager.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef XQSERVICEMANAGER_H
+#define XQSERVICEMANAGER_H
+
+#include <xqserviceglobal.h>
+#include <xqaiwinterfacedescriptor.h>
+#include <QString>
+#include <QList>
+
+class XQServiceManagerPrivate;
+
+class XQSERVICEUTIL_EXPORT XQServiceManager : public QObject
+    {
+    Q_OBJECT
+    public:
+        XQServiceManager() ;
+        virtual ~XQServiceManager() ;
+        
+        int startServer(const QString& service, bool embedded, int& applicationUid, quint64& processId);
+        QList<XQAiwInterfaceDescriptor>  findInterfaces ( const QString &interfaceName ) const;
+        QList<XQAiwInterfaceDescriptor>  findInterfaces ( const QString &serviceName, const QString &interfaceName ) const;
+        QList<XQAiwInterfaceDescriptor>  findFirstInterface ( const QString &interfaceName ) const;
+        QList<XQAiwInterfaceDescriptor>  findFirstInterface ( const QString &serviceName, const QString &interfaceName ) const;
+        
+        // Extended starter to allow passing XQAiwInterfaceDescriptor as user data
+        // The user data has been attached by the XQServiceRequest
+        int startServer(const QString& service, bool embedded, int& applicationUid, quint64& processId,
+                        const void *userData);
+        
+        int latestError() const;
+        bool isRunning(const XQAiwInterfaceDescriptor& implementation) const;
+        
+    private:   
+   
+    private:
+        XQServiceManagerPrivate* d;
+    };
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemetadata/old/sfwinterface.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,192 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqservicelog.h"
+
+#include "xqsfwinterface_p.h"
+
+QT_BEGIN_NAMESPACE
+/*!
+    \class SFWInterface
+
+    SFWInterface class is used by service metadata parser to keep interface related information (interface name and description) 
+    from service XML registry file\n
+*/
+
+    
+/*! 
+ *  Class constructor 
+ *
+ * @param anInterfaceName interface name
+ */
+SFWInterface::SFWInterface(const QString& anInterfaceName)
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::SFWInterface(1)");
+    XQSERVICE_DEBUG_PRINT("anInterfaceName: %s", qPrintable(anInterfaceName));
+    interfaceName = anInterfaceName;
+}
+
+/*!
+    Creates a copy of \a other.
+*/
+SFWInterface::SFWInterface(const SFWInterface& other)
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::SFWInterface(2)");
+    (*this) = other; //use assignment operator
+
+}
+
+/*
+    Copies the content of the SFWInterface object \a other 
+    into this one.
+*/
+SFWInterface& SFWInterface::operator=(const SFWInterface&other)
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::operator=");
+    interfaceName = other.interfaceName;
+    serviceName = other.serviceName;
+    interfaceDescription = other.interfaceDescription;
+    interfaceCapabilities = other.interfaceCapabilities;
+    interfaceVersion = other.interfaceVersion;
+
+    return *this;
+}
+
+
+/*!
+ *  Class destructor 
+ */
+SFWInterface::~SFWInterface()
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::~SFWInterface");
+}
+
+/*!
+ *  Gets the interface name
+ *
+ * @return interface name or default value (empty string) if it is not available
+ */
+QString SFWInterface::name() const
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::name");
+    XQSERVICE_DEBUG_PRINT("interfaceName: %s", qPrintable(interfaceName));
+    return interfaceName;
+}
+
+/*!
+ *  Gets the interface description
+ *
+ * @return interface description or default value (empty string) if it is not available
+ */
+QString  SFWInterface::description() const
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::description");
+    XQSERVICE_DEBUG_PRINT("interfaceDescription: %s", qPrintable(interfaceDescription));
+    return interfaceDescription;
+}
+
+
+/*! 
+ *  Sets the interface description
+ *
+ * @param aDescription 
+ */
+void SFWInterface::setDescription(const QString& aDescription)
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::setDescription");
+    XQSERVICE_DEBUG_PRINT("aDescription: %s", qPrintable(aDescription));
+    interfaceDescription = aDescription;
+}
+
+/*!
+    Returns the list of capabilities required by this interface.
+*/
+QStringList SFWInterface::capabilities() const
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::capabilities");
+    for (int i = 0; i < interfaceCapabilities.size(); ++i){
+        XQSERVICE_DEBUG_PRINT("capability: %s", qPrintable(interfaceCapabilities.at(i)));
+    }
+    return interfaceCapabilities;
+}
+
+/*!
+    Sets the interface \a apabilites.
+*/
+void SFWInterface::setCapabilities(const QList<QString>& capabilities)
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::setCapabilities");
+    for (int i = 0; i < capabilities.size(); ++i){
+        XQSERVICE_DEBUG_PRINT("capability: %s", qPrintable(capabilities.at(i)));
+    }
+    interfaceCapabilities = capabilities;
+}
+
+/*!
+    Returns the version tag of the interface.
+*/
+QString SFWInterface::version() const
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::version");
+    XQSERVICE_DEBUG_PRINT("interfaceVersion: %s", qPrintable(interfaceVersion));
+    return interfaceVersion;
+}
+
+/*!
+    Sets the version tag of this interface to \a version.
+*/
+void SFWInterface::setVersion(const QString& version)
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::setVersion(1)");
+    XQSERVICE_DEBUG_PRINT("version: %s", qPrintable(version));
+    interfaceVersion = version;
+}
+
+/*!
+    Sets the version tag of this interface based on \a maj and \a min.
+*/
+void SFWInterface::setVersion(int maj, int min)
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::setVersion(2)");
+    XQSERVICE_DEBUG_PRINT("maj: %d, min: %d", maj, min);
+    interfaceVersion = QString::number(maj) + "." + QString::number(min);
+}
+
+/*!
+    Returns the service associated with this interface.
+*/
+QString SFWInterface::service() const
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::service");
+    XQSERVICE_DEBUG_PRINT("serviceName: %s", qPrintable(serviceName));
+    return serviceName;
+}
+
+/*!
+    Sets the service name associated with this interface
+*/
+void SFWInterface::setService(const QString &service)
+{
+    XQSERVICE_DEBUG_PRINT("SFWInterface::setService");
+    XQSERVICE_DEBUG_PRINT("service: %s", qPrintable(service));
+    serviceName = service;
+}
+QT_END_NAMESPACE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemetadata/old/sfwinterface_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQSFWINTERFACE_H_
+#define XQSFWINTERFACE_H_
+
+#include <QString>
+#include <QList>
+#include <QStringList>
+#include "xqqserviceglobal.h"
+
+QT_BEGIN_NAMESPACE
+
+class Q_SFW_EXPORT SFWInterface
+{
+public:
+
+    SFWInterface(const QString& anInterfaceName);
+    SFWInterface(const SFWInterface& other);
+    virtual ~SFWInterface();
+
+    SFWInterface &operator=(const SFWInterface&other);
+
+    QString name() const;
+    QString service() const;
+    QString description() const;
+    QStringList capabilities() const;
+    QString version() const;
+
+    void setDescription(const QString& aDescription);
+    void setCapabilities(const QList<QString>& capabilities);
+    void setVersion(const QString& version);
+    void setVersion(int maj = 1, int min = 0);
+    void setService(const QString &service);
+
+private:
+    QString interfaceName;
+    QString interfaceDescription;
+    QStringList interfaceCapabilities;
+    QString interfaceVersion;
+    QString serviceName;
+};
+
+QT_END_NAMESPACE
+
+#endif /*XQSFWINTERFACE_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemetadata/old/xqservicemetadata.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,473 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:  Service metadata parser class implementation 
+*
+*/
+
+#include "xqservicelog.h"
+
+#include <QFile>
+#include "xqservicemetadata_p.h"
+#include "xqsfwinterface_p.h"
+ 
+
+//XML tags and attributes
+//General
+#define NAME_TAG  "name"
+#define DESCRIPTION_TAG "description"
+
+//Service related
+#define SERVICE_TAG "service" 
+#define SERVICE_FILEPATH "filepath"
+
+//Interface related
+#define INTERFACE_TAG "interface"
+#define INTERFACE_VERSION "version" 
+#define INTERFACE_CAPABILITY "capabilities"
+
+
+QT_BEGIN_NAMESPACE
+
+static const char  PATH_SEPARATOR[] = "\\";
+
+/*!
+    \class ServiceMetaData
+
+    Utility class (used by service database) that offers support for 
+    parsing metadata service xml registry file during service registration. \n
+    
+    It uses QXMLStreamReader class for parsing. Supproted Operations are:
+        - Parse the service and interfaces defined in XML file
+        - name, version, capabilitiesList, description and filePath of service can be retrieved
+        - each interface can be retrieved
+*/
+
+/*!
+ *  Class constructor
+ *
+ * @param aXmlFilePath path to the xml file that describes the service. 
+ */
+ServiceMetaData::ServiceMetaData(const QString &aXmlFilePath)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::ServiceMetaData(1)");
+    XQSERVICE_DEBUG_PRINT("aXmlFilePath: %s", qPrintable(aXmlFilePath));
+    xmlDevice = new QFile(aXmlFilePath);
+    ownsXmlDevice = true;
+    latestError = 0;
+}
+
+/*!
+ *  Class constructor
+ *
+ * @param device QIODevice that contains the XML data that describes the service.
+ */
+ServiceMetaData::ServiceMetaData(QIODevice *device)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::ServiceMetaData(2)");
+    xmlDevice = device;
+    ownsXmlDevice = false;
+    latestError = 0;
+}
+
+/*!
+ *  Class destructor
+ * 
+ */
+ServiceMetaData::~ServiceMetaData()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::~ServiceMetaData");
+    if (ownsXmlDevice)
+        delete xmlDevice;
+}
+
+/*!
+    Sets the device containing the XML data that describes the service to \a device.
+ */
+void ServiceMetaData::setDevice(QIODevice *device)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::setDevice");
+    clearMetadata();
+    xmlDevice = device;
+    ownsXmlDevice = false;
+}
+
+/*!
+    Returns the device containing the XML data that describes the service.
+*/
+QIODevice *ServiceMetaData::device() const
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::device");
+    return xmlDevice;
+}
+
+/*!
+ *  Gets the service name
+ *
+ * @return service name or default value (empty string) if it is not available
+ */
+QString ServiceMetaData::name()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::name");
+    XQSERVICE_DEBUG_PRINT("serviceName: %s", qPrintable(serviceName));
+    return serviceName;
+}
+ 
+/*!
+ *  Sets the path of service implementation file
+ *
+ * @param aFilePath path of service implementation file
+ */
+void ServiceMetaData::setServiceFilePath(const QString &aFilePath)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::setServiceFilePath");
+    XQSERVICE_DEBUG_PRINT("aFilePath: %s", qPrintable(aFilePath));
+    serviceFilePath = aFilePath;
+}
+ 
+/*!
+ *  Gets the path of the service implementation file
+ *
+ * @return service implementation filepath
+ */
+QString ServiceMetaData::filePath()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::filePath");
+    XQSERVICE_DEBUG_PRINT("serviceFilePath: %s", qPrintable(serviceFilePath));
+    return serviceFilePath;
+}
+ 
+/*!
+ *  Gets the service description
+ *
+ * @return service description or default value (empty string) if it is not available
+ */
+QString ServiceMetaData::description()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::description");
+    XQSERVICE_DEBUG_PRINT("serviceDescription: %s", qPrintable(serviceDescription));
+    return serviceDescription;
+}
+ 
+/*!
+   Returns the number of interfaces provided by the service description
+ */
+int ServiceMetaData::interfaceCount()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::interfaceCount"); 
+    XQSERVICE_DEBUG_PRINT("serviceInterfaces.count(): %d", serviceInterfaces.count());
+    return serviceInterfaces.count();
+}
+ 
+/*!
+   Returns the metadata of the interace at \a index; otherwise
+   returns 0.
+ */
+QList<SFWInterface> ServiceMetaData::getInterfaces()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::getInterfaces");
+    return serviceInterfaces;
+} 
+
+/*!
+    Parses the file and extracts the service metadata \n
+    Custom error codes: \n
+    SFW_ERROR_UNABLE_TO_OPEN_FILE in case can not open the XML file \n
+    SFW_ERROR_INVALID_XML_FILE in case service registry is not a valid XML file \n
+    SFW_ERROR_NO_SERVICE in case XML file has no service tag\n
+    @return true if the metadata was read properly, false if there is an error
+ */
+bool ServiceMetaData::extractMetadata()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::extractMetadata");
+    latestError = 0;
+    clearMetadata();                   
+    QXmlStreamReader xmlReader;
+    bool parseError = false;
+    //Open xml file
+    if (!xmlDevice->isOpen() && !xmlDevice->open(QIODevice::ReadOnly)) {
+        XQSERVICE_DEBUG_PRINT("Couldn't open the file");
+        latestError = ServiceMetaData::SFW_ERROR_UNABLE_TO_OPEN_FILE;
+        parseError = true;
+    } else {
+        //Load xml content
+        xmlReader.setDevice(xmlDevice);
+        // Read XML doc 
+        while (!xmlReader.atEnd() && !parseError) {
+            xmlReader.readNext();
+            //Found a <service> node, read service related metadata
+            if (xmlReader.isStartElement() && xmlReader.name() == SERVICE_TAG) {
+                if (!processServiceElement(xmlReader)) {
+                    XQSERVICE_DEBUG_PRINT("Couldn't process service element");
+                    parseError = true;
+                }
+            }
+            else if (xmlReader.isStartElement() && xmlReader.name() != SERVICE_TAG) {
+                XQSERVICE_DEBUG_PRINT("No service");
+                latestError = ServiceMetaData::SFW_ERROR_NO_SERVICE;
+                parseError = true;
+            }
+            else if (xmlReader.tokenType() == QXmlStreamReader::Invalid) {
+                XQSERVICE_DEBUG_PRINT("Invalid XML");
+                latestError = ServiceMetaData::SFW_ERROR_INVALID_XML_FILE;
+                parseError = true;
+            }
+        }
+        if (ownsXmlDevice)
+            xmlDevice->close();
+    }
+    if (parseError) {
+        clearMetadata();
+    }
+    XQSERVICE_DEBUG_PRINT("parseError: %d", parseError);
+    return !parseError;
+}
+ 
+/*!
+    Gets the latest parsing error \n
+    @return parsing error(negative value) or 0 in case there is none
+ */
+int ServiceMetaData::getLatestError()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::getLatestError");
+    XQSERVICE_DEBUG_PRINT("latestError: %d", latestError);
+    return latestError;
+}
+ 
+/*!
+    Gets the value of the attribute from the XML node \n
+    @param aDomElement xml node
+    @param aAttributeName attribute name
+    @param aValue [out] attribute value
+    @return true if the value was read, false otherwise
+ */
+bool ServiceMetaData::getAttributeValue(const QXmlStreamReader &aXMLReader, const QString &aAttributeName, QString &aValue)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::getAttributeValue");
+    XQSERVICE_DEBUG_PRINT("aAttributeName: %s", qPrintable(aAttributeName));
+    bool result = false;
+    for (int i = 0; i < aXMLReader.attributes().count(); i++){
+        QXmlStreamAttribute att = aXMLReader.attributes()[i];
+        if (att.name() == aAttributeName) {
+            if (att.value().isNull() || att.value().isEmpty()) {
+                result = false;
+            } else {
+                result = true;
+                aValue = att.value().toString();
+                XQSERVICE_DEBUG_PRINT("aValue: %s", qPrintable(aValue));
+            }
+        }
+    }
+    // Capability attribute is allowed to be empty
+    if (aAttributeName == INTERFACE_CAPABILITY) {
+        result = true;
+    }
+    XQSERVICE_DEBUG_PRINT("result: %d", result);
+    return result;
+}
+  
+/*!
+    Parses and extracts the service metadata from the current xml <service> node \n
+    Custom error codes: \n
+    SFW_ERROR_NO_SERVICE_NAME in case no service name in XML file \n
+    SFW_ERROR_NO_INTERFACE_VERSION in case no interface version in XML file \n
+    SFW_ERROR_PARSE_SERVICE in case can not parse service section in XML file \n
+    SFW_ERROR_NO_SERVICE_FILEPATH in case no service file path in XML file \n
+    SFW_ERROR_INVALID_XML_FILE in case XML file is not valid \n
+    SFW_ERROR_NO_SERVICE_INTERFACE in case no interface defined for service in XML file \n
+    @param aXMLReader xml stream reader 
+    @return true if the metadata was read properly, false if there is an error
+ */
+bool ServiceMetaData::processServiceElement(QXmlStreamReader &aXMLReader)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::processServiceElement");
+    Q_ASSERT(aXMLReader.isStartElement() && aXMLReader.name() == SERVICE_TAG);
+    bool parseError = false;
+
+    if (!getAttributeValue(aXMLReader, NAME_TAG, serviceName)) {
+        XQSERVICE_DEBUG_PRINT("No service name");
+        latestError = ServiceMetaData::SFW_ERROR_NO_SERVICE_NAME;
+        parseError = true;
+    }
+
+    if (!parseError) {
+        if (!getAttributeValue(aXMLReader, SERVICE_FILEPATH, serviceFilePath)) {
+            XQSERVICE_DEBUG_PRINT("No service filepath");
+            latestError = ServiceMetaData::SFW_ERROR_NO_SERVICE_FILEPATH;
+            parseError = true;
+        }
+    }
+
+    while (!parseError && !aXMLReader.atEnd()) {
+        aXMLReader.readNext();  
+        if (aXMLReader.name() == DESCRIPTION_TAG) {
+            serviceDescription = aXMLReader.readElementText();
+            XQSERVICE_DEBUG_PRINT("serviceDescription: %s", qPrintable(serviceDescription));
+        //Found a <interface> node, read module related metadata  
+        } else if (aXMLReader.isStartElement() && aXMLReader.name() == INTERFACE_TAG) {
+            if (!processInterfaceElement(aXMLReader)){
+                XQSERVICE_DEBUG_PRINT("Couldn't process interface element");
+                parseError = true;
+            }
+        //Found </service>, leave the loop
+        } else if (aXMLReader.isEndElement() && aXMLReader.name() == SERVICE_TAG) {
+            XQSERVICE_DEBUG_PRINT("Service element handled");
+            break;
+        } else if (aXMLReader.isEndElement() || aXMLReader.isStartElement()) {
+            XQSERVICE_DEBUG_PRINT("Service parse error");
+            latestError = ServiceMetaData::SFW_ERROR_PARSE_SERVICE;
+            parseError = true;            
+        } else if (aXMLReader.tokenType() == QXmlStreamReader::Invalid) {
+            XQSERVICE_DEBUG_PRINT("Invalid XML");
+            latestError = ServiceMetaData::SFW_ERROR_INVALID_XML_FILE;
+            parseError = true;
+        }
+    }
+
+    if (serviceInterfaces.count() == 0 && latestError == 0) {
+        XQSERVICE_DEBUG_PRINT("No service interface");
+        latestError = ServiceMetaData::SFW_ERROR_NO_SERVICE_INTERFACE;
+        parseError = true;
+    }
+    if (parseError) {
+        clearMetadata();
+    }
+    XQSERVICE_DEBUG_PRINT("parseError: %d", parseError);
+    return !parseError;
+}
+
+/*!
+    Parses and extracts the interface metadata from the current xml <interface> node \n
+    Custome error codes: \n
+    SFW_ERROR_NO_INTERFACE_NAME in case no interface name in XML file \n
+    SFW_ERROR_PARSE_INTERFACE in case error parsing interface section \n
+    SFW_ERROR_INVALID_XML_FILE in case XML file is not valid \n
+    @param aXMLReader xml stream reader 
+    @return true if the metadata was read properly, false if there is an error
+ */
+bool ServiceMetaData::processInterfaceElement(QXmlStreamReader &aXMLReader)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::processInterfaceElement");
+    Q_ASSERT(aXMLReader.isStartElement() && aXMLReader.name() == INTERFACE_TAG);
+    bool parseError = false;
+
+    //Read interface parameter
+    QString tmp;
+    SFWInterface aInterface("");
+    if (getAttributeValue(aXMLReader, NAME_TAG, tmp)) {
+        XQSERVICE_DEBUG_PRINT("Name attribute value");
+        aInterface = SFWInterface(tmp);
+        tmp.clear();
+        if (getAttributeValue(aXMLReader, INTERFACE_VERSION, tmp)) {
+            XQSERVICE_DEBUG_PRINT("Interface version value");
+            bool success = checkVersion(tmp);
+            if ( success ) {
+                aInterface.setVersion(tmp);
+                tmp.clear();
+                if (getAttributeValue(aXMLReader, INTERFACE_CAPABILITY, tmp)) {
+                    XQSERVICE_DEBUG_PRINT("Interface capability value");
+                    aInterface.setCapabilities(tmp.split(",", QString::SkipEmptyParts));
+                }
+            } else {
+                XQSERVICE_DEBUG_PRINT("Invalid interface version");
+                latestError = ServiceMetaData::SFW_ERROR_INVALID_VERSION;
+                parseError = true;
+            }
+        }
+        else{
+            XQSERVICE_DEBUG_PRINT("No interface version");
+            latestError = ServiceMetaData::SFW_ERROR_NO_INTERFACE_VERSION;
+            parseError = true;
+        }
+    } else {
+        XQSERVICE_DEBUG_PRINT("No interface name");
+        latestError = ServiceMetaData::SFW_ERROR_NO_INTERFACE_NAME;
+        parseError = true;
+    }
+
+    while (!parseError && !aXMLReader.atEnd()) {
+        aXMLReader.readNext();
+        //Read interface description
+        if (aXMLReader.isStartElement() && aXMLReader.name() == DESCRIPTION_TAG) {
+            XQSERVICE_DEBUG_PRINT("Interface description");
+            aInterface.setDescription(aXMLReader.readElementText());
+        //Found </interface>, leave the loop
+        } else if (aXMLReader.isEndElement() && aXMLReader.name() == INTERFACE_TAG) {
+            XQSERVICE_DEBUG_PRINT("Interface handled");
+            break;  
+        } else if (aXMLReader.isStartElement() || aXMLReader.isEndElement()) {
+            XQSERVICE_DEBUG_PRINT("Interface parse error");
+            latestError = ServiceMetaData::SFW_ERROR_PARSE_INTERFACE;
+            parseError = true;
+        } else if (aXMLReader.tokenType() == QXmlStreamReader::Invalid) {
+            XQSERVICE_DEBUG_PRINT("Invalid XML");
+            latestError = ServiceMetaData::SFW_ERROR_INVALID_XML_FILE;
+            parseError = true;
+        }
+    }
+
+    if (!parseError) {
+        const QString ident = aInterface.name()+aInterface.version();
+        XQSERVICE_DEBUG_PRINT("ident: %s", qPrintable(ident));
+        if (duplicates.contains(ident.toLower())) {
+            XQSERVICE_DEBUG_PRINT("Duplicate interface");
+            latestError = ServiceMetaData::SFW_ERROR_DUPLICATED_INTERFACE;
+            parseError = true;
+        } else {
+            duplicates.insert(ident.toLower());
+            serviceInterfaces.append(aInterface);
+        }
+    }
+    XQSERVICE_DEBUG_PRINT("parseError: %d", parseError);
+    return !parseError;
+}
+
+bool ServiceMetaData::checkVersion(const QString &version)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::checkVersion");
+    //match x.y as version format
+    QRegExp rx("^([1-9][0-9]*)\\.(0+|[1-9][0-9]*)$");
+    int pos = rx.indexIn(version);
+    QStringList list = rx.capturedTexts();
+    bool success = false;
+    if (pos == 0 && list.count() == 3
+            && rx.matchedLength() == version.length() )
+    {
+        list[1].toInt(&success);
+        if ( success ) {
+            list[2].toInt(&success);
+        }
+    }
+    XQSERVICE_DEBUG_PRINT("success: %d", success);
+    return success;
+}
+
+/*!
+ *  Clears the service metadata
+ *
+ */
+void ServiceMetaData::clearMetadata()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::clearMetadata");
+    serviceName.clear();
+    serviceFilePath.clear();
+    serviceDescription.clear();
+    serviceInterfaces.clear();
+    duplicates.clear();
+}
+
+QT_END_NAMESPACE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemetadata/old/xqservicemetadata.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+HEADERS +=  ../inc/qserviceglobal.h \
+            src/xqservicemetadata/xqsfwinterface_p.h \
+            src/xqservicemetadata/xqservicemetadata_p.h 
+
+SOURCES +=  src/xqservicemetadata/xqsfwinterface.cpp \
+            src/xqservicemetadata/xqservicemetadata.cpp 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemetadata/old/xqservicemetadata_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,156 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQSERVICEMETADATA_H
+#define XQSERVICEMETADATA_H
+
+#include <QXmlStreamReader>
+#include <QStringList>
+#include <QList>
+#include <QSet>
+#include "qserviceglobal.h"
+#include "xqaiwinterfacedescriptor.h"
+
+class QIODevice;
+
+QT_BEGIN_NAMESPACE
+
+// FORWARD DECLARATIONS
+class XQAiwInterfaceDescriptor;
+
+class ServiceMetaDataResults 
+{
+public:
+    ServiceMetaDataResults() {}
+
+    ServiceMetaDataResults(const ServiceMetaDataResults& other)
+    {
+        description = other.description;
+        location = other.location;
+        name = other.name;
+        interfaces = other.interfaces;
+        latestInterfaces = other.latestInterfaces;
+    }
+    
+    QString location;
+    QString name;
+    QString description;
+    QList<XQAiwInterfaceDescriptor> interfaces;
+    QList<XQAiwInterfaceDescriptor> latestInterfaces;
+};
+
+#ifndef QT_NO_DATASTREAM
+Q_SFW_EXPORT QDataStream &operator<<(QDataStream &, const ServiceMetaDataResults &);
+Q_SFW_EXPORT QDataStream &operator>>(QDataStream &, ServiceMetaDataResults &);
+#endif
+
+class Q_SFW_EXPORT ServiceMetaData 
+{
+public:
+
+    //! ServiceMetaData::ServiceMetadataErr
+    /*!
+     This enum describes the errors that may be returned by the Service metadata parser.
+     */
+    enum ServiceMetadataErr {
+        SFW_ERROR_NO_SERVICE = 0,                           /* Can not find service root node in XML file*/
+        SFW_ERROR_NO_SERVICE_NAME,                          /* Can not find service name in XML file */
+        SFW_ERROR_NO_SERVICE_FILEPATH,                      /* Can not find service filepath in XML file */
+        SFW_ERROR_NO_SERVICE_INTERFACE,                     /* No interface for the service in XML file*/
+        SFW_ERROR_NO_INTERFACE_VERSION,                     /* Can not find interface version in XML file */
+        SFW_ERROR_NO_INTERFACE_NAME,                        /* Can not find interface name in XML file*/
+        SFW_ERROR_UNABLE_TO_OPEN_FILE,                      /* Error opening XML file*/
+        SFW_ERROR_INVALID_XML_FILE,                         /* Not a valid XML file*/
+        SFW_ERROR_PARSE_SERVICE,                            /* Error parsing service node */
+        SFW_ERROR_PARSE_INTERFACE,                          /* Error parsing interface node */
+        SFW_ERROR_DUPLICATED_INTERFACE,                     /* The same interface is defined twice */
+        SFW_ERROR_INVALID_VERSION,                          /* Invalid version number */
+        SFW_ERROR_DUPLICATED_TAG,                           /* The tag appears twice */
+        SFW_ERROR_INVALID_CUSTOM_TAG,                       /* The customproperty tag is not corectly formatted or otherwise incorrect*/
+        SFW_ERROR_DUPLICATED_CUSTOM_KEY                     /* The customproperty appears twice*/
+    };
+
+public:
+
+    ServiceMetaData(const QString &aXmlFilePath);
+
+    ServiceMetaData(QIODevice *device);
+
+    ~ServiceMetaData();
+
+    void setDevice(QIODevice *device);
+
+    QIODevice *device() const;
+
+    /*TBR: void setServiceFilePath(const QString &aFilePath); */
+
+    bool extractMetadata();
+
+    int getLatestError();
+
+    /*TBR:
+    QString name();
+
+    QString filePath();
+
+    QString description();
+
+    int interfaceCount();
+    
+    QList<SFWInterface> getInterfaces();
+    
+    bool checkVersion(const QString &version);
+    */
+
+    ServiceMetaDataResults parseResults() const;
+
+
+private:
+    bool getAttributeValue(const QXmlStreamReader &aDomElement,
+            const QString &aAttributeName, QString &aValue);
+    QList<XQAiwInterfaceDescriptor> latestInterfaces() const;
+    XQAiwInterfaceDescriptor latestInterfaceVersion(const QString &interfaceName);
+    bool processServiceElement(QXmlStreamReader &aXMLReader);
+    
+    bool processInterfaceElement(QXmlStreamReader &aXMLReader);
+
+    void clearMetadata();
+
+private:
+    bool lessThan(const XQAiwInterfaceDescriptor &d1,
+                    const XQAiwInterfaceDescriptor &d2) const;
+    bool checkVersion(const QString &version) const;
+    void transformVersion(const QString &version, int *major, int *minor) const;
+
+    QIODevice *xmlDevice;
+    bool ownsXmlDevice;
+    QString serviceName;
+    QString serviceLocation;
+    QString serviceDescription;
+    QList<XQAiwInterfaceDescriptor> serviceInterfaces;
+    QSet<QString> duplicates;
+    int latestError;
+    QHash<QString, int> m_latestIndex;
+};
+
+QT_END_NAMESPACE
+
+#endif // XQSERVICEMETADATA_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemetadata/xqaiwinterfacedescriptor.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,455 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqservicelog.h"
+#include <xqaiwinterfacedescriptor_p.h>
+#include <xqaiwinterfacedescriptor.h>
+#ifndef QT_NO_DATASTREAM
+#include <qdatastream.h>
+#endif
+
+#include <QDebug>
+
+//QT_BEGIN_NAMESPACE
+
+/*!
+    \class XQAiwInterfaceDescriptor
+    \brief The XQAiwInterfaceDescriptor class identifies a service implementation.
+
+    A service can implement multiple interfaces and each interface can have multiple implementations. 
+    The XQAiwInterfaceDescriptor class enscapsulates this information, as illustrated
+    by the diagram below.
+
+    \image XQAiwInterfaceDescriptor.png Service-Interface-Implementation
+
+    The major version tag indicates the interface version and the minor version tag identifies the implementation
+    version. Subsequent versions of the same interface must be binary compatible to previous versions 
+    of the same interface. 
+
+    In the above example service A and B implement the interface \i com.nokia.qt.x.
+    In fact Service A provides two different implementations for the very same interface. 
+    This is indicated by the changed minor version number. Although Service B is 
+    using the same interface it's implementation actually utilizes the second version of
+    the interface \i com.nokia.qt.x. Binary compatibility guarantees that clients 
+    who know version 1 can utilize version 2. If an existing interface has to be changed
+    in a non-compatible way a new interface (name) is required.
+
+    \section1 Namespaces
+
+    A XQAiwInterfaceDescriptor (the quadruble of service name, 
+    interface name, interface version and implementation version) uniquely 
+    identifies a service implementation on a device. Interface names follow 
+    the java namespace convention.
+    
+    The namespace \i com.nokia.qt.* is reserved for future Qt development.
+
+    \sa QServiceFilter, QServiceManager
+*/
+
+/*!
+    \enum XQAiwInterfaceDescriptor::PropertyKey
+
+    This enum describes the possible property types which can be attached
+    to a XQAiwInterfaceDescriptor.
+*/
+
+/*! \var XQAiwInterfaceDescriptor::PropertyKey  XQAiwInterfaceDescriptor::Capabilities
+    
+    The capabilities property is a QStringList and
+    describes the capabilities that a service client
+    would require to use the service if capability 
+    checks are enforced.
+*/
+
+/*! \var XQAiwInterfaceDescriptor::PropertyKey  XQAiwInterfaceDescriptor::Location
+    
+    This property points to the location
+    where the plug-in providing this service is stored.
+    If the service is plug-in based the location is the
+    name and/or path of the plugin.
+*/
+
+/*! \var XQAiwInterfaceDescriptor::PropertyKey  XQAiwInterfaceDescriptor::ServiceDescription
+    
+    This property provides a general description for
+    the service.
+*/
+
+/*! \var XQAiwInterfaceDescriptor::PropertyKey  XQAiwInterfaceDescriptor::InterfaceDescription
+    
+    This property provides a description for the interface 
+    implementation.
+*/
+
+/*! \var XQAiwInterfaceDescriptor::PropertyKey  XQAiwInterfaceDescriptor::ImplementationId
+
+    Extension: settable property, contains implementation id
+*/
+
+/*!
+    Creates a new XQAiwInterfaceDescriptor.
+*/
+XQAiwInterfaceDescriptor::XQAiwInterfaceDescriptor()
+    :  d(0)
+{
+  XQSERVICE_DEBUG_PRINT("XQAiwInterfaceDescriptor");
+  // Memory allocated in assigment operator !!!
+}
+
+/*!
+    Destroys the XQAiwInterfaceDescriptor object.
+*/
+XQAiwInterfaceDescriptor::~XQAiwInterfaceDescriptor()
+{
+    XQSERVICE_DEBUG_PRINT("~XQAiwInterfaceDescriptor");
+    if (d)
+        delete d;
+}
+
+/*!
+    Creates a copy of XQAiwInterfaceDescriptor contained in \a other.
+    \param other Reference to the other XQAiwInterfaceDescriptor object, from
+                 which new object will be created
+*/
+XQAiwInterfaceDescriptor::XQAiwInterfaceDescriptor(const XQAiwInterfaceDescriptor& other)
+    : d(0)
+{
+    (*this) = other; //use assignment operator
+}
+
+
+/*!
+    Copies the content of the XQAiwInterfaceDescriptor object contained 
+    in \a other into this one.
+    \param other Reference to XQAiwInterfaceDescriptor object, from which content will be copied
+*/
+XQAiwInterfaceDescriptor& XQAiwInterfaceDescriptor::operator=(const XQAiwInterfaceDescriptor& other)
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwInterfaceDescriptor: operator=");
+    if ( !other.isValid() ) {
+        XQSERVICE_DEBUG_PRINT("other is invalid !!!");
+        if (d) 
+            delete d;
+        d = 0;
+        return *this;  // Create empty descriptor
+    }
+    if (!d)
+        d = new XQAiwInterfaceDescriptorPrivate;
+    (*d) = *(other.d);
+    XQSERVICE_DEBUG_PRINT("XQAiwInterfaceDescriptor: operator= done");
+    return *this;
+}
+
+/*!
+    Compares a XQAiwInterfaceDescriptor to \a other.
+    \param other Reference to XQAiwInterfaceDescriptor object, which will be compared
+                 to this one.
+    \return True if both instances are equal, false otherwise.
+*/
+bool XQAiwInterfaceDescriptor::operator==(const XQAiwInterfaceDescriptor& other) const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwInterfaceDescriptor: operator==");
+    
+    if (! (isValid() && other.isValid()) )
+        return false;
+
+    if (!d)
+        return false;
+
+    if ((*d) == *(other.d))
+    {
+        XQSERVICE_DEBUG_PRINT("== true");
+        return true;
+    }
+    
+    XQSERVICE_DEBUG_PRINT("== false");
+    return false;
+}
+
+/*!
+    \fn bool XQAiwInterfaceDescriptor::operator!=(const XQAiwInterfaceDescriptor& other) const
+
+    Compares a XQAiwInterfaceDescriptor to \a other. Returns true
+    if they are not equal and false otherwise.
+    \param other Reference to XQAiwInterfaceDescriptor object, which will be compared
+                 to this one.
+    \return False if both instances are equal, true otherwise.
+*/
+
+/*!
+    Checks if the descriptor is valid.
+    \return True if this descriptor is valid, false otherwise
+*/
+bool XQAiwInterfaceDescriptor::isValid() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwInterfaceDescriptor:isValid");
+    if (d)
+    {
+        XQSERVICE_DEBUG_PRINT("isValid=yes");
+        return true;
+    }
+    XQSERVICE_DEBUG_PRINT("isValid=false");
+    return false;
+}
+
+/*!
+    Checks if this implementation is provided for all users on the system.
+    \return True if this implementation is provided for all users on the system,
+            false otherwise
+
+    \sa QServiceManager::Scope
+*/
+bool XQAiwInterfaceDescriptor::inSystemScope() const
+{
+    return d ? d->systemScope : false;
+}
+
+/*!
+    Gets the name of service that provides this implementation.
+    \return Name of service
+*/
+QString XQAiwInterfaceDescriptor::serviceName() const
+{
+    return d ? d->serviceName : QString();
+}
+
+/*!
+    Gets the name of the interface that is implemented.
+    \return Name of the interface
+*/
+QString XQAiwInterfaceDescriptor::interfaceName() const
+{
+    return d ? d->interfaceName : QString();
+}
+
+
+/*!
+    Gets the version of the interface. 
+    Subsequent versions of an interface are binary compatible 
+    to previous versions of the same interface. If an intcerface 
+    is broken it must use a new interface name.
+    \return Interface version as integer value
+*/
+int XQAiwInterfaceDescriptor::majorVersion() const
+{
+    return d ? d->major : -1;
+}
+
+/*!
+    Gets the version of the implementation.
+    \return Implementation version as integer value
+*/
+int XQAiwInterfaceDescriptor::minorVersion() const
+{
+    return d ? d->minor : -1;
+}
+
+/*!
+    Gets the value for the property.
+    \param key Key of the property
+    \return Value of the property, invalid QVariant if does not exist
+*/
+QVariant XQAiwInterfaceDescriptor::property(XQAiwInterfaceDescriptor::PropertyKey key) const
+{
+    if (d)
+    {
+        return d->properties.value(key);
+    }
+    return QVariant();
+}
+
+/*!
+    Extension:
+    Sets given property. To be used by service management only.
+*/
+bool XQAiwInterfaceDescriptor::setProperty(XQAiwInterfaceDescriptor::PropertyKey key, const QVariant value )
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwInterfaceDescriptor::setPropery %d", key);
+    if (key < ImplementationId)
+    {
+        return false;  // Do not allow changing other properties
+    }
+    
+    if (!d)
+        d = new XQAiwInterfaceDescriptorPrivate;  // Ensure allocation
+    
+    if (d)
+    {
+        d->properties[key] = value;
+        return true;
+    }
+    return false;
+}
+
+
+/*!
+    Gets the value for the property.
+    \param key Key of the custom property
+    \return Value of the custom property, invalid null if does not exist
+*/
+QString XQAiwInterfaceDescriptor::customProperty(const QString& key) const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwInterfaceDescriptor::customProperty %s", qPrintable(key));
+    QString val;
+    if (d)
+    {
+        val = d->customProperties[key];
+    }
+    XQSERVICE_DEBUG_PRINT("XQAiwInterfaceDescriptor::customProperty value %s", qPrintable(val));
+    
+    return val;
+}
+
+/*!
+    Gets list of custom property keys.
+    \return list of custom property keys
+*/
+QStringList XQAiwInterfaceDescriptor::customPropertyKeys() const
+{
+    XQSERVICE_DEBUG_PRINT("XQAiwInterfaceDescriptor::customPropertyKeys");
+    if (d)
+    {
+        return d->customProperties.keys();
+    }
+
+    return QStringList();
+}
+
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const XQAiwInterfaceDescriptor &desc)
+{
+    if (desc.isValid()) {
+        QString interface = QString("%1 %2.%3").arg(desc.interfaceName())
+                .arg(desc.majorVersion() < 0 ? '?' : desc.majorVersion())
+                .arg(desc.minorVersion() < 0 ? '?' : desc.minorVersion());
+        dbg.nospace() << "XQAiwInterfaceDescriptor(";
+        dbg.nospace() << "service=" << desc.serviceName() << ", ";
+        dbg.nospace() << "interface=" << interface;
+        dbg.nospace() << ")";
+    } else {
+        dbg.nospace() << "XQAiwInterfaceDescriptor(invalid)";
+    }
+    return dbg.space();
+}
+#endif
+
+#ifndef QT_NO_DATASTREAM
+
+QDataStream &operator<<(QDataStream &out, const XQAiwInterfaceDescriptor::PropertyKey &k)
+{
+    out << qint8(k);
+    return out;
+}
+
+QDataStream &operator>>(QDataStream &in, XQAiwInterfaceDescriptor::PropertyKey &k)
+{
+    quint8 key;
+    in >> key;
+    k = (XQAiwInterfaceDescriptor::PropertyKey)key;
+    return in;
+}
+/*! 
+    \fn QDataStream &operator<<(QDataStream &out, const XQAiwInterfaceDescriptor &dc)
+    \relates XQAiwInterfaceDescriptor
+
+    Writes service interface descriptor \a dc to the stream \a out and returns a reference
+    to the stream.
+    \param out Stream to write to
+    \param dc Interface descriptor written to stream
+    \return Reference to the stream
+*/
+
+QDataStream &operator<<(QDataStream &out, const XQAiwInterfaceDescriptor &dc)
+{
+    const quint32 magicNumber = 0x77AFAFA;
+    const quint16 majorVersion = 1;
+    const quint16 minorVersion = 0;
+    const qint8 valid = dc.isValid();
+    out << magicNumber << majorVersion << minorVersion;
+    out << valid;
+    if (valid) {
+       out << dc.d->serviceName; 
+       out << dc.d->interfaceName;
+       out << dc.d->major;
+       out << dc.d->minor;
+       out << dc.d->properties;
+       out << dc.d->customProperties;
+       out << dc.d->systemScope;
+    }
+    return out;
+}
+
+/*!
+    \fn QDataStream &operator>>(QDataStream &in, XQAiwInterfaceDescriptor &dc)
+    \relates XQAiwInterfaceDescriptor
+
+    Reads a service interface descriptor into \a dc from the stream \a in and returns a
+    reference to the stream.
+    \param in Stream to read from
+    \param dc Interface descriptor read from stream
+    \return Reference to the stream
+*/
+QDataStream &operator>>(QDataStream &in, XQAiwInterfaceDescriptor &dc)
+{
+    const quint32 magicNumber = 0x77AFAFA;
+    quint32 storedMagicNumber;
+    in >> storedMagicNumber;
+    if (storedMagicNumber != magicNumber) {
+        qWarning() << "Datastream doesn't provide searialized XQAiwInterfaceDescriptor";
+        return in;
+    }
+    
+    const quint16 currentMajorVersion = 1;
+    quint16 majorVersion = 0;
+    quint16 minorVersion = 0;
+
+    in >> majorVersion >> minorVersion;
+    if (majorVersion != currentMajorVersion) {
+        qWarning() << "Unknown serialization format for XQAiwInterfaceDescriptor.";
+        return in;
+    }
+    //Allow all minor versions.
+
+    qint8 valid;
+    in >> valid;
+    if (valid) {
+        if (!dc.isValid())
+            dc.d = new XQAiwInterfaceDescriptorPrivate;
+        in >> dc.d->serviceName;
+        in >> dc.d->interfaceName;
+        in >> dc.d->major;
+        in >> dc.d->minor;
+        in >> dc.d->properties;
+        in >> dc.d->customProperties;
+        in >> dc.d->systemScope;
+    } else { //input stream contains invalid descriptor
+        //use assignment operator
+        dc = XQAiwInterfaceDescriptor();
+    }
+
+    return in;
+}
+#endif //QT_NO_DATASTREAM
+
+
+
+//QT_END_NAMESPACE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemetadata/xqaiwinterfacedescriptor.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,103 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQAIWINTERFACEDESCRIPTOR_H
+#define XQAIWINTERFACEDESCRIPTOR_H
+
+#include <QString>
+#include <QVariant>
+#include <QStringList>
+#include <xqserviceglobal.h>
+
+class XQAiwInterfaceDescriptorPrivate;
+
+// Custom keys
+namespace XQAiw
+{
+// NOTE !!! Names need to be fixed when service naming policy has been decided !!!
+//
+static const char *CustomKeyScheme = "schemes";  // CSV of schemes
+static const char *CustomKeyActionText = "txt_aiw_action_text";
+static const char *InterfaceUri = "com.nokia.symbian.IUriView";  // Interface to handle URIs (http://, file://, etc.)
+static const char *InterfaceFile = "com.nokia.symbian.IFileView"; // Interface to handle local files in file system
+static const char *OperationView = "view(QString)";  // Default operation signature for viewing files
+static const char *OperationViewSharable = "view(XQSharableFile)";  // Default signature for viewing sharable files
+static const char *UriSchemeApp = "appto"; // Custom scheme: appto://uid3?query-part
+static const char *UriSchemeFile = "file";  // Standard  file sceheme
+
+}
+
+class XQSERVICEUTIL_EXPORT XQAiwInterfaceDescriptor
+{
+public:
+    enum PropertyKey {
+        Capabilities = 0,
+        Location, 
+        ServiceDescription,
+        InterfaceDescription,
+        ImplementationId = 100  // Extension: Settable property, contains impl. id
+
+    };
+    
+public:
+    XQAiwInterfaceDescriptor();
+    XQAiwInterfaceDescriptor(const XQAiwInterfaceDescriptor& other);
+    ~XQAiwInterfaceDescriptor();
+    XQAiwInterfaceDescriptor& operator=(const XQAiwInterfaceDescriptor& other);
+    bool operator==(const XQAiwInterfaceDescriptor& other) const;
+    inline bool operator!=(const XQAiwInterfaceDescriptor& other) const { return !operator==(other); };
+    QString serviceName() const;
+    QString interfaceName() const;
+    int majorVersion() const;
+    int minorVersion() const;
+    bool isValid() const;
+    bool inSystemScope() const;
+    QVariant property(XQAiwInterfaceDescriptor::PropertyKey key) const;
+    QString customProperty(const QString& key) const;
+    QStringList customPropertyKeys() const;
+public:
+    // Extensions: For service management
+    bool setProperty(XQAiwInterfaceDescriptor::PropertyKey key, const QVariant value );
+
+private:
+    XQAiwInterfaceDescriptorPrivate* d;
+    friend class XQAiwInterfaceDescriptorPrivate;
+    friend class ServiceMetaData;
+    
+#ifndef QT_NO_DATASTREAM
+    friend XQSERVICEUTIL_EXPORT QDataStream &operator<<(QDataStream &, const XQAiwInterfaceDescriptor &);
+    friend XQSERVICEUTIL_EXPORT QDataStream &operator>>(QDataStream &, XQAiwInterfaceDescriptor &);
+#endif
+};
+
+
+#ifndef QT_NO_DATASTREAM
+XQSERVICEUTIL_EXPORT QDataStream &operator<<(QDataStream &, const XQAiwInterfaceDescriptor &);
+XQSERVICEUTIL_EXPORT QDataStream &operator>>(QDataStream &, XQAiwInterfaceDescriptor &);
+#endif
+#ifndef QT_NO_DEBUG_STREAM
+XQSERVICEUTIL_EXPORT QDebug operator<<(QDebug, const XQAiwInterfaceDescriptor &);
+#endif
+
+
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemetadata/xqaiwinterfacedescriptor_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** If you have questions regarding the use of this file, please
+** contact Nokia at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XQSAIWINTERFACEDESCRIPTOR_P_H
+#define XQSAIWINTERFACEDESCRIPTOR_P_H
+
+//
+//  W A R N I N G
+//  -------------
+//
+// This file is not part of the Qt API.  It exists for the convenience
+// of the QLibrary class.  This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "xqaiwinterfacedescriptor.h"
+
+#include <QString>
+#include <QHash>
+
+QT_BEGIN_NAMESPACE
+
+class XQAiwInterfaceDescriptorPrivate
+{
+public:
+    XQAiwInterfaceDescriptorPrivate()
+    {
+        major = -1;
+        minor = -1;
+        systemScope = false;
+    }
+
+    bool operator==(const XQAiwInterfaceDescriptorPrivate& other) const
+    {
+        if (major == other.major 
+                && minor == other.minor
+                && interfaceName == other.interfaceName
+                && serviceName == other.serviceName
+                && properties == other.properties 
+                && customProperties == other.customProperties
+                && systemScope == other.systemScope)
+            return true;
+        return false;
+    }
+
+    XQAiwInterfaceDescriptorPrivate& operator=(const XQAiwInterfaceDescriptorPrivate& other)
+    {
+        serviceName = other.serviceName;
+        interfaceName = other.interfaceName;
+        minor = other.minor;
+        major = other.major;
+        properties = other.properties;
+        customProperties = other.customProperties;
+        systemScope = other.systemScope;
+
+        return *this;
+    }
+
+    static XQAiwInterfaceDescriptorPrivate *getPrivate(XQAiwInterfaceDescriptor *descriptor)
+    {
+        return descriptor->d;
+    }
+
+    static const XQAiwInterfaceDescriptorPrivate *getPrivate(const XQAiwInterfaceDescriptor *descriptor)
+    {
+        return descriptor->d;
+    }
+
+    static void setPrivate(XQAiwInterfaceDescriptor *descriptor, XQAiwInterfaceDescriptorPrivate *p)
+    {
+        descriptor->d = p;
+    }
+
+    QString serviceName;
+    QString interfaceName;
+    QHash<XQAiwInterfaceDescriptor::PropertyKey, QVariant> properties;
+    QHash<QString, QString> customProperties;
+    int major;
+    int minor;
+    bool systemScope;
+};
+QT_END_NAMESPACE
+
+#endif //XQSAIWINTERFACEDESCRIPTOR_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemetadata/xqservicemetadata.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,832 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QFile>
+#include "xqservicelog.h"
+#include "xqservicemetadata_p.h"
+#include <xqaiwinterfacedescriptor_p.h>
+
+//XML tags and attributes
+//General
+#define NAME_TAG  "name"
+#define DESCRIPTION_TAG "description"
+
+//Service related
+#define SERVICE_TAG "service" 
+#define SERVICE_FILEPATH "filepath"
+
+//Interface related
+#define INTERFACE_TAG "interface"
+#define INTERFACE_VERSION "version" 
+#define INTERFACE_CAPABILITY "capabilities"
+#define INTERFACE_CUSTOM_PROPERTY "customproperty"
+
+QT_BEGIN_NAMESPACE
+
+#ifndef QT_NO_DATASTREAM
+QDataStream &operator<<(QDataStream &out, const ServiceMetaDataResults &r)
+{
+    out << r.name << r.location;
+    out << r.description << r.interfaces << r.latestInterfaces;
+
+    return out;
+}
+
+QDataStream &operator>>(QDataStream &in, ServiceMetaDataResults &r)
+{
+    in >> r.name >> r.location;
+    in >> r.description >> r.interfaces >> r.latestInterfaces;
+
+    return in;
+}
+#endif
+
+/*!
+    \class ServiceMetaData
+    \brief Utility class offering support for parsing metadata
+           service xml registry files.
+
+    Utility class (used by service database) that offers support for 
+    parsing metadata service xml registry file during service registration. \n
+    
+    It uses QXMLStreamReader class for parsing. Supproted Operations are:
+        - Parse the service and interfaces defined in XML file
+        - name, version, capabilitiesList, description and filePath of service can be retrieved
+        - each interface can be retrieved
+*/
+
+/*!
+    Constructor
+    \param aXmlFilePath Path to the xml file that describes the service. 
+*/
+ServiceMetaData::ServiceMetaData(const QString &aXmlFilePath)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::ServiceMetaData(1)");
+    XQSERVICE_DEBUG_PRINT("aXmlFilePath: %s", qPrintable(aXmlFilePath));
+    xmlDevice = new QFile(aXmlFilePath);
+    ownsXmlDevice = true;
+    latestError = 0;
+}
+
+/*!
+    Constructor
+    \param device QIODevice that contains the XML data that describes the service.
+*/
+ServiceMetaData::ServiceMetaData(QIODevice *device)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::ServiceMetaData(2)");
+    xmlDevice = device;
+    ownsXmlDevice = false;
+    latestError = 0;
+}
+
+/*!
+    Destructor
+*/
+ServiceMetaData::~ServiceMetaData()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::~ServiceMetaData");
+    if (ownsXmlDevice)
+        delete xmlDevice;
+}
+
+/*!
+    Sets the device containing the XML data that describes the service to \a device.
+    \param device Device containing XML data.
+*/
+void ServiceMetaData::setDevice(QIODevice *device)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::setDevice");
+    clearMetadata();
+    xmlDevice = device;
+    ownsXmlDevice = false;
+}
+
+/*!
+    Gets the device containing the XML data that describes the service.
+    \return Device containing the XML data.
+*/
+QIODevice *ServiceMetaData::device() const
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::device");
+    return xmlDevice;
+}
+
+/*!
+    Gets the service name.
+    \return Service name or default value (empty string) if it is not available.
+*/
+ 
+/*QString ServiceMetaData::name() const
+{
+    return serviceName;
+}*/
+ 
+/*!
+    Gets the path of the service implementation file.
+    \return Service implementation filepath.
+*/
+/*QString ServiceMetaData::location() const
+{
+    return serviceLocation;
+}*/
+ 
+/*!
+    Gets the service description.
+    \return Service description or default value (empty string) if it is not available.
+*/
+/*QString ServiceMetaData::description() const
+{
+    return serviceDescription;
+}*/
+ 
+/*!
+    Gets the list of interfaces.
+    \return List interfaces.
+*/
+/*QList<XQServiceInterfaceDescriptor> ServiceMetaData::getInterfaces() const
+{
+    return serviceInterfaces;
+} */
+
+/*!
+    \internal
+    Returns a streamable object containing the results of the parsing.
+*/
+ServiceMetaDataResults ServiceMetaData::parseResults() const
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::parseResults");
+    
+    ServiceMetaDataResults results;
+    results.location = serviceLocation;
+    results.name = serviceName;
+    results.description = serviceDescription;
+    results.interfaces = serviceInterfaces;
+    results.latestInterfaces = latestInterfaces();
+    results.version = version;
+
+    return results;
+}
+
+/*!
+    Parses the file and extracts the service metadata \n
+    Custom error codes: \n
+    SFW_ERROR_UNABLE_TO_OPEN_FILE in case can not open the XML file \n
+    SFW_ERROR_INVALID_XML_FILE in case service registry is not a valid XML file \n
+    SFW_ERROR_NO_SERVICE in case XML file has no service tag\n
+    \return true if the metadata was read properly, false if there is an error.
+ */
+bool ServiceMetaData::extractMetadata()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::extractMetadata");
+    latestError = 0;
+    clearMetadata();
+    version = ServiceMetaDataResults::VERSION_2;  // default
+    
+    QXmlStreamReader xmlReader;
+    bool parseError = false;
+    //Open xml file
+    if (!xmlDevice->isOpen() && !xmlDevice->open(QIODevice::ReadOnly)) {
+        XQSERVICE_DEBUG_PRINT("XML error:Couldn't open the file");
+        latestError = ServiceMetaData::SFW_ERROR_UNABLE_TO_OPEN_FILE;
+        parseError = true;
+    } else {
+        //Load xml content
+        xmlReader.setDevice(xmlDevice);
+        // Read XML doc 
+        while (!xmlReader.atEnd() && !parseError) {
+            xmlReader.readNext();
+            //Found a <service> node, read service related metadata
+            if (xmlReader.isStartElement() && xmlReader.name() == SERVICE_TAG) {
+
+                // Support for previous XML version. Check if service element has name attribute
+                // If so, assume the old element
+                if (getAttributeValue(xmlReader, NAME_TAG, serviceName)) {
+                    if (!processServiceElementPrevVersion(xmlReader)) {
+                        XQSERVICE_DEBUG_PRINT("XML error: Couldn't process service element");
+                        parseError = true;
+                    }
+                }
+                else if (!processServiceElement(xmlReader)) {
+                    XQSERVICE_DEBUG_PRINT("XML error: Couldn't process service element");
+                    parseError = true;
+                }
+            }
+            else if (xmlReader.isStartElement() && xmlReader.name() != SERVICE_TAG) {
+                XQSERVICE_DEBUG_PRINT("XML error: No service");
+                latestError = ServiceMetaData::SFW_ERROR_NO_SERVICE;
+                parseError = true;
+            }
+            else if (xmlReader.tokenType() == QXmlStreamReader::Invalid) {
+                XQSERVICE_DEBUG_PRINT("XML error: Invalid XML");
+                latestError = ServiceMetaData::SFW_ERROR_INVALID_XML_FILE;
+                parseError = true;
+            }
+        }
+        if (ownsXmlDevice)
+            xmlDevice->close();
+    }
+    if (parseError) {
+        {
+        XQSERVICE_DEBUG_PRINT("XML Parse error, line=%d,column=%d", xmlReader.lineNumber(), xmlReader.columnNumber());
+        clearMetadata();
+        }
+    }
+    XQSERVICE_DEBUG_PRINT("XML parseError: %d", parseError);
+    return !parseError;
+}
+ 
+/*!
+    Gets the latest parsing error.
+    \return Parsing error(negative value) or 0 in case there is none.
+*/
+int ServiceMetaData::getLatestError() const
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::getLatestError");
+    XQSERVICE_DEBUG_PRINT("latestError: %d", latestError);
+    return latestError;
+}
+ 
+/*!
+    Parses and extracts the service from the current xml <service> node
+    using the new format (Version 2).
+    Schema:    
+     <!ELEMENT service ( name, filepath, description?, interface+ ) >
+        <!ELEMENT description ( #CDATA ) >
+        <!ELEMENT filepath ( #PCDATA ) >
+        <!ELEMENT interface ( name, version, description?, capabilities?, customproperty* ) >
+        <!ELEMENT capabilities ( #PCDATA ) >
+        <!ELEMENT name ( #PCDATA ) >
+        <!ELEMENT version ( #PCDATA ) >
+        <!ELEMENT customproperty ( #CDATA ) >
+        <!ATTLIST customproperty key NMTOKEN #REQUIRED >    
+ */
+bool ServiceMetaData::processServiceElement(QXmlStreamReader &aXMLReader)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::processServiceElement");
+    Q_ASSERT(aXMLReader.isStartElement() && aXMLReader.name() == SERVICE_TAG);
+    bool parseError = false;
+
+    int dupSTags[3] = {0 //->tag name
+        ,0 //-> service description
+        ,0 //-> filepath
+    };
+    while(!parseError && !aXMLReader.atEnd()) {
+        aXMLReader.readNext();
+        if (aXMLReader.isStartElement() && aXMLReader.name() == DESCRIPTION_TAG) {
+            //Found <description> tag
+            serviceDescription = aXMLReader.readElementText();
+            dupSTags[1]++;
+        } else if (aXMLReader.isStartElement() && aXMLReader.name() == NAME_TAG) {
+            serviceName = aXMLReader.readElementText();
+            dupSTags[0]++;
+        } else if (aXMLReader.isStartElement() && aXMLReader.name() == INTERFACE_TAG) {
+            //Found a <interface> node, read module related metadata  
+            if (!processInterfaceElement(aXMLReader)) 
+                parseError = true;
+        } else if (aXMLReader.isStartElement() && aXMLReader.name() == SERVICE_FILEPATH ) {
+            //Found <filepath> tag
+            dupSTags[2]++;
+            serviceLocation = aXMLReader.readElementText();
+        } else if (aXMLReader.isStartElement() && aXMLReader.name() == "version") {
+            //FOUND <version> tag on service level. We ignore this for now
+            aXMLReader.readElementText();
+        } else if (aXMLReader.isEndElement() && aXMLReader.name() == SERVICE_TAG) {
+            //Found </service>, leave the loop
+            break;
+        } else if (aXMLReader.isEndElement() || aXMLReader.isStartElement()) {
+            latestError = ServiceMetaData::SFW_ERROR_PARSE_SERVICE;
+            parseError = true;            
+        } else if (aXMLReader.tokenType() == QXmlStreamReader::Invalid) {
+            latestError = ServiceMetaData::SFW_ERROR_INVALID_XML_FILE;
+            parseError = true;
+        }
+    }
+    if ( !parseError ) {
+        if (serviceName.isEmpty()) {
+            latestError = ServiceMetaData::SFW_ERROR_NO_SERVICE_NAME;
+            parseError = true;
+        } else if (serviceLocation.isEmpty()) {
+            latestError = ServiceMetaData::SFW_ERROR_NO_SERVICE_FILEPATH;
+            parseError = true;
+        }
+    }
+
+    for(int i=0;!parseError && i<3;i++) {
+        if (dupSTags[i] > 1) {
+            parseError = true;
+            latestError = SFW_ERROR_DUPLICATED_TAG;
+            break;
+        }
+    }
+        
+    //update all interfaces with service data
+    const int icount = serviceInterfaces.count();
+    if (icount == 0 && latestError == 0) {
+        latestError = ServiceMetaData::SFW_ERROR_NO_SERVICE_INTERFACE;
+        parseError = true;
+    }
+    for (int i = 0; i<icount; i++) {
+        serviceInterfaces.at(i).d->serviceName = serviceName;
+        serviceInterfaces.at(i).d->properties[XQAiwInterfaceDescriptor::Location] = serviceLocation;
+        serviceInterfaces.at(i).d->properties[XQAiwInterfaceDescriptor::ServiceDescription] = serviceDescription;
+    }
+
+    if (parseError) {
+        clearMetadata();
+    }
+    XQSERVICE_DEBUG_PRINT("processServiceElement parseError: %d", parseError);
+    return !parseError;
+}
+
+/*!
+    Parses and extracts the service from the current xml <service> node
+    using the new format (Version 1) \n
+    
+    <!ELEMENT service ( description?, interface+ ) >
+    <!ATTLIST service name #CDATA  #REQUIRED >
+    <!ATTLIST service filepath #CDATA  #REQUIRED >
+    <!ELEMENT description ( #CDATA ) >
+    <!ELEMENT interface ( description? ) >
+    <!ATTLIST interface name #CDATA  #REQUIRED >
+    <!ATTLIST interface version #CDATA  #REQUIRED >
+    <!ATTLIST interface capabilities #CDATA  >
+    
+    Custom error codes: \n
+    SFW_ERROR_NO_SERVICE_NAME in case no service name in XML file \n
+    SFW_ERROR_NO_INTERFACE_VERSION in case no interface version in XML file \n
+    SFW_ERROR_PARSE_SERVICE in case can not parse service section in XML file \n
+    SFW_ERROR_NO_SERVICE_FILEPATH in case no service file path in XML file \n
+    SFW_ERROR_INVALID_XML_FILE in case XML file is not valid \n
+    SFW_ERROR_NO_SERVICE_INTERFACE in case no interface defined for service in XML file.
+    \param aXMLReader xml stream reader .
+    \return true if the metadata was read properly, false if there is an error.
+
+    
+ */
+bool ServiceMetaData::processServiceElementPrevVersion(QXmlStreamReader &aXMLReader)
+{
+    version = ServiceMetaDataResults::VERSION_1;  // Previous version
+    
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::processServiceElementPrevVersion");
+    Q_ASSERT(aXMLReader.isStartElement() && aXMLReader.name() == SERVICE_TAG);
+    bool parseError = false;
+
+    QString tmp;
+    if (!getAttributeValue(aXMLReader, NAME_TAG, tmp)) {
+        XQSERVICE_DEBUG_PRINT("No service name");
+        latestError = ServiceMetaData::SFW_ERROR_NO_SERVICE_NAME;
+        parseError = true;
+    }
+
+    if (!parseError) {
+        if (!getAttributeValue(aXMLReader, SERVICE_FILEPATH, serviceLocation)) {
+            XQSERVICE_DEBUG_PRINT("No service filepath");
+            latestError = ServiceMetaData::SFW_ERROR_NO_SERVICE_FILEPATH;
+            parseError = true;
+        }
+    }
+
+    while (!parseError && !aXMLReader.atEnd()) {
+        aXMLReader.readNext();  
+        if (aXMLReader.name() == DESCRIPTION_TAG) {
+            serviceDescription = aXMLReader.readElementText();
+            XQSERVICE_DEBUG_PRINT("serviceDescription: %s", qPrintable(serviceDescription));
+        //Found a <interface> node, read module related metadata  
+        } else if (aXMLReader.isStartElement() && aXMLReader.name() == INTERFACE_TAG) {
+            if (!processInterfaceElementPrevVersion(aXMLReader)){
+                XQSERVICE_DEBUG_PRINT("Couldn't process interface element");
+                parseError = true;
+            }
+        //Found </service>, leave the loop
+        } else if (aXMLReader.isEndElement() && aXMLReader.name() == SERVICE_TAG) {
+            XQSERVICE_DEBUG_PRINT("Service element handled");
+            break;
+        } else if (aXMLReader.isEndElement() || aXMLReader.isStartElement()) {
+            XQSERVICE_DEBUG_PRINT("Service parse error");
+            latestError = ServiceMetaData::SFW_ERROR_PARSE_SERVICE;
+            parseError = true;            
+        } else if (aXMLReader.tokenType() == QXmlStreamReader::Invalid) {
+            XQSERVICE_DEBUG_PRINT("Invalid XML");
+            latestError = ServiceMetaData::SFW_ERROR_INVALID_XML_FILE;
+            parseError = true;
+        }
+    }
+
+    if (serviceInterfaces.count() == 0 && latestError == 0) {
+        XQSERVICE_DEBUG_PRINT("No service interface");
+        latestError = ServiceMetaData::SFW_ERROR_NO_SERVICE_INTERFACE;
+        parseError = true;
+    }
+    if (parseError) {
+        clearMetadata();
+    }
+    XQSERVICE_DEBUG_PRINT("parseError: %d", parseError);
+    return !parseError;
+}
+
+
+/*!
+    Parses and extracts the interface metadata from the current xml <interface> node.
+    \param aXMLReader xml stream reader .
+    \return true if the metadata was read properly, false if there is an error.
+*/
+bool ServiceMetaData::processInterfaceElement(QXmlStreamReader &aXMLReader)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::processInterfaceElement");
+    Q_ASSERT(aXMLReader.isStartElement() && aXMLReader.name() == INTERFACE_TAG);
+    bool parseError = false;
+
+    //Read interface parameter
+    QString tmp;
+    XQAiwInterfaceDescriptor aInterface;
+    int dupITags[4] = {
+        0,  //->iface name tag
+        0,  //->version
+        0,  //->capabilities
+        0   //->description
+    };
+    aInterface.d = new XQAiwInterfaceDescriptorPrivate;
+    while (!parseError && !aXMLReader.atEnd()) {
+        aXMLReader.readNext();
+        //Read interface description
+        if (aXMLReader.isStartElement() && aXMLReader.name() == NAME_TAG) {
+            aInterface.d->interfaceName = aXMLReader.readElementText();
+            dupITags[0]++;
+            //Found <name> tag for interface
+        } else if (aXMLReader.isStartElement() && aXMLReader.name() == DESCRIPTION_TAG) {
+            //Found <description> tag
+            aInterface.d->properties[XQAiwInterfaceDescriptor::InterfaceDescription] = aXMLReader.readElementText();
+            dupITags[3]++;
+        //Found </interface>, leave the loop
+        } else if (aXMLReader.isStartElement() && aXMLReader.name() == INTERFACE_VERSION) {
+            tmp.clear();
+            tmp = aXMLReader.readElementText();
+            if (tmp.isEmpty())
+                continue;  //creates NO_INTERFACE_VERSION error further below
+            bool success = checkVersion(tmp);
+            if ( success ) {
+                int majorVer = -1;
+                int minorVer = -1;
+                transformVersion(tmp, &majorVer, &minorVer);
+                aInterface.d->major = majorVer;
+                aInterface.d->minor = minorVer;
+                dupITags[1]++;
+            } else {
+                latestError = ServiceMetaData::SFW_ERROR_INVALID_VERSION;
+                parseError = true;
+            }
+        } else if (aXMLReader.isStartElement() && aXMLReader.name() == INTERFACE_CAPABILITY) {
+            tmp.clear();
+            tmp= aXMLReader.readElementText();
+            aInterface.d->properties[XQAiwInterfaceDescriptor::Capabilities] = tmp.split(",", QString::SkipEmptyParts);
+            dupITags[2]++;
+        } else if (aXMLReader.isStartElement() && aXMLReader.name() == INTERFACE_CUSTOM_PROPERTY) {
+            parseError = true;
+            if (aXMLReader.attributes().hasAttribute("key")) {
+                const QString ref = aXMLReader.attributes().value("key").toString();
+                XQSERVICE_DEBUG_PRINT("Custom property key: %s", qPrintable(ref));
+                if (!ref.isEmpty()) {
+                    if (aInterface.d->customProperties.contains(ref)) {
+                        latestError = SFW_ERROR_DUPLICATED_CUSTOM_KEY;
+                        continue;
+                    } else {
+                        QString value = aXMLReader.readElementText();
+                        if (value.isEmpty() || value.isNull())
+                            value = QString("");
+                        XQSERVICE_DEBUG_PRINT("Custom property value: %s", qPrintable(value));
+                        aInterface.d->customProperties[ref] = value;
+                        parseError = false;
+                    }
+                }
+            }
+            if (parseError)
+                latestError = SFW_ERROR_INVALID_CUSTOM_TAG;
+        } else if (aXMLReader.isEndElement() && aXMLReader.name() == INTERFACE_TAG) {
+            break;
+        } else if (aXMLReader.isStartElement() || aXMLReader.isEndElement()) {
+            latestError = ServiceMetaData::SFW_ERROR_PARSE_INTERFACE;
+            parseError = true;
+        } else if (aXMLReader.tokenType() == QXmlStreamReader::Invalid) {
+            latestError = ServiceMetaData::SFW_ERROR_INVALID_XML_FILE;
+            parseError = true;
+        }
+    }
+
+    if (!parseError) {
+        if (dupITags[1] == 0) { //no version tag found
+            latestError = ServiceMetaData::SFW_ERROR_NO_INTERFACE_VERSION;
+            parseError = true;
+        } else if (aInterface.d->interfaceName.isEmpty()) {
+            latestError = ServiceMetaData::SFW_ERROR_NO_INTERFACE_NAME;
+            parseError = true;
+        }
+    }
+    
+    for(int i=0;!parseError && i<4;i++) {
+        if (dupITags[i] > 1) {
+            parseError = true;
+            latestError = SFW_ERROR_DUPLICATED_TAG;
+            break;
+        }
+    }
+
+    if (!parseError) {
+        const QString ident = aInterface.d->interfaceName
+                                + QString::number(aInterface.majorVersion())
+                                + "."
+                                + QString::number(aInterface.minorVersion());
+        if (duplicates.contains(ident.toLower())) {
+            latestError = ServiceMetaData::SFW_ERROR_DUPLICATED_INTERFACE;
+            parseError = true;
+        } else {
+            duplicates.insert(ident.toLower());
+            serviceInterfaces.append(aInterface);
+            if (!m_latestIndex.contains(aInterface.d->interfaceName.toLower())
+                    || lessThan(latestInterfaceVersion(aInterface.d->interfaceName), aInterface))
+
+            {
+                    m_latestIndex[aInterface.d->interfaceName.toLower()] = serviceInterfaces.count() - 1;
+            }
+        }
+    }
+
+    if (parseError)
+    {
+        // Delete garbage
+        delete aInterface.d;
+        aInterface.d = 0;
+    }
+   XQSERVICE_DEBUG_PRINT("processInterfaceElement parseError: %d", parseError);
+    return !parseError;
+}
+
+/*!
+    Parses and extracts the interface metadata from the current xml <interface> node. \n
+    Custome error codes: \n
+    SFW_ERROR_NO_INTERFACE_NAME in case no interface name in XML file \n
+    SFW_ERROR_PARSE_INTERFACE in case error parsing interface section \n
+    SFW_ERROR_INVALID_XML_FILE in case XML file is not valid \n
+    \param aXMLReader xml stream reader. 
+    \return true if the metadata was read properly, false if there is an error.
+*/
+bool ServiceMetaData::processInterfaceElementPrevVersion(QXmlStreamReader &aXMLReader)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::processInterfaceElementPrevVersion");
+    Q_ASSERT(aXMLReader.isStartElement() && aXMLReader.name() == INTERFACE_TAG);
+    bool parseError = false;
+
+    //Read interface parameter
+    QString tmp;
+    XQAiwInterfaceDescriptor aInterface;
+    aInterface.d = new XQAiwInterfaceDescriptorPrivate;
+    aInterface.d->serviceName = serviceName;  // picked earlier !!!
+    XQSERVICE_DEBUG_PRINT("Service name  %s", qPrintable(serviceName));
+    
+    int dupITags[4] = {
+        0,  //->iface name tag
+        0,  //->version
+        0,  //->capabilities
+        0   //->description
+    };
+    
+    if (getAttributeValue(aXMLReader, NAME_TAG, tmp)) {
+        XQSERVICE_DEBUG_PRINT("Name attribute value");
+        aInterface.d->interfaceName = tmp;
+        tmp.clear();
+        if (getAttributeValue(aXMLReader, INTERFACE_VERSION, tmp)) {
+            XQSERVICE_DEBUG_PRINT("Interface version value");
+            bool success = checkVersion(tmp);
+            if ( success ) {
+                int majorVer = -1;
+                int minorVer = -1;
+                transformVersion(tmp, &majorVer, &minorVer);
+                aInterface.d->major = majorVer;
+                aInterface.d->minor = minorVer;
+                dupITags[1]++;
+
+                tmp.clear();  // Rememember to clear
+                if (getAttributeValue(aXMLReader, INTERFACE_CAPABILITY, tmp)) {
+                    XQSERVICE_DEBUG_PRINT("Interface capability value");
+                    aInterface.d->properties[XQAiwInterfaceDescriptor::Capabilities] = tmp.split(",", QString::SkipEmptyParts);
+                }
+            } else {
+                XQSERVICE_DEBUG_PRINT("Invalid interface version");
+                latestError = ServiceMetaData::SFW_ERROR_INVALID_VERSION;
+                parseError = true;
+            }
+        }
+        else{
+            XQSERVICE_DEBUG_PRINT("No interface version");
+            latestError = ServiceMetaData::SFW_ERROR_NO_INTERFACE_VERSION;
+            parseError = true;
+        }
+    } else {
+        XQSERVICE_DEBUG_PRINT("No interface name");
+        latestError = ServiceMetaData::SFW_ERROR_NO_INTERFACE_NAME;
+        parseError = true;
+    }
+
+    while (!parseError && !aXMLReader.atEnd()) {
+        aXMLReader.readNext();
+        //Read interface description
+        if (aXMLReader.isStartElement() && aXMLReader.name() == DESCRIPTION_TAG) {
+            XQSERVICE_DEBUG_PRINT("Interface description");
+            aInterface.d->properties[XQAiwInterfaceDescriptor::InterfaceDescription] = aXMLReader.readElementText();
+        //Found </interface>, leave the loop
+        } else if (aXMLReader.isEndElement() && aXMLReader.name() == INTERFACE_TAG) {
+            XQSERVICE_DEBUG_PRINT("Interface handled");
+            break;  
+        } else if (aXMLReader.isStartElement() || aXMLReader.isEndElement()) {
+            XQSERVICE_DEBUG_PRINT("Interface parse error");
+            latestError = ServiceMetaData::SFW_ERROR_PARSE_INTERFACE;
+            parseError = true;
+        } else if (aXMLReader.tokenType() == QXmlStreamReader::Invalid) {
+            XQSERVICE_DEBUG_PRINT("Invalid XML");
+            latestError = ServiceMetaData::SFW_ERROR_INVALID_XML_FILE;
+            parseError = true;
+        }
+    }
+
+    // Consistency check
+    if (!parseError) {
+        if (dupITags[1] == 0) { //no version tag found
+            latestError = ServiceMetaData::SFW_ERROR_NO_INTERFACE_VERSION;
+            parseError = true;
+        } else if (aInterface.d->interfaceName.isEmpty()) {
+            latestError = ServiceMetaData::SFW_ERROR_NO_INTERFACE_NAME;
+            parseError = true;
+        }
+    }
+
+    if (!parseError) {
+        const QString ident = aInterface.d->interfaceName
+                              + QString::number(aInterface.majorVersion())
+                              + "."
+                              + QString::number(aInterface.minorVersion());
+        XQSERVICE_DEBUG_PRINT("ident: %s", qPrintable(ident));
+        if (duplicates.contains(ident.toLower())) {
+            XQSERVICE_DEBUG_PRINT("Duplicate interface");
+            latestError = ServiceMetaData::SFW_ERROR_DUPLICATED_INTERFACE;
+            parseError = true;
+        } else {
+            duplicates.insert(ident.toLower());
+            serviceInterfaces.append(aInterface);
+            if (!m_latestIndex.contains(aInterface.d->interfaceName.toLower())
+                || lessThan(latestInterfaceVersion(aInterface.d->interfaceName), aInterface))
+
+            {
+                m_latestIndex[aInterface.d->interfaceName.toLower()] = serviceInterfaces.count() - 1;
+            }
+        }
+    }
+
+    if (parseError)
+    {
+        // Delete garbage
+        delete aInterface.d;
+        aInterface.d = 0;
+    }
+    
+    XQSERVICE_DEBUG_PRINT("processInterfaceElementPrevVersion parseError: %d", parseError);
+    return !parseError;
+}
+
+
+/*!
+    Gets the value of the attribute from the XML node.
+    \param aDomElement Xml node.
+    \param aAttributeName Attribute name.
+    \param aValue [out] attribute value.
+    \return true if the value was read, false otherwise.
+*/
+bool ServiceMetaData::getAttributeValue(const QXmlStreamReader &aXMLReader, const QString &aAttributeName, QString &aValue)
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::getAttributeValue");
+    XQSERVICE_DEBUG_PRINT("aAttributeName: %s", qPrintable(aAttributeName));
+    bool result = false;
+    for (int i = 0; i < aXMLReader.attributes().count(); i++){
+        QXmlStreamAttribute att = aXMLReader.attributes()[i];
+        if (att.name() == aAttributeName) {
+            if (att.value().isNull() || att.value().isEmpty()) {
+                result = false;
+            } else {
+                result = true;
+                aValue = att.value().toString();
+                XQSERVICE_DEBUG_PRINT("aValue: %s", qPrintable(aValue));
+            }
+        }
+    }
+    // Capability attribute is allowed to be empty
+    if (aAttributeName == INTERFACE_CAPABILITY) {
+        result = true;
+    }
+    XQSERVICE_DEBUG_PRINT("result: %d", result);
+    return result;
+}
+
+
+XQAiwInterfaceDescriptor ServiceMetaData::latestInterfaceVersion(const QString &interfaceName)
+{
+    XQAiwInterfaceDescriptor ret;
+    if (m_latestIndex.contains(interfaceName.toLower()))
+        return serviceInterfaces[m_latestIndex[interfaceName.toLower()]];
+    else
+        return ret;
+}
+
+QList<XQAiwInterfaceDescriptor> ServiceMetaData::latestInterfaces() const
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::latestInterfaces");
+    QList<XQAiwInterfaceDescriptor> interfaces;
+    QHash<QString,int>::const_iterator i = m_latestIndex.constBegin();
+    while(i != m_latestIndex.constEnd())
+    {
+        interfaces.append(serviceInterfaces[i.value()]);
+        ++i;
+    }
+    return interfaces;
+}
+
+bool ServiceMetaData::lessThan(const XQAiwInterfaceDescriptor &d1,
+                                const XQAiwInterfaceDescriptor &d2) const
+{
+    return (d1.majorVersion() < d2.majorVersion())
+            || ( d1.majorVersion() == d2.majorVersion()
+                    && d1.minorVersion() < d2.minorVersion());
+
+}
+
+bool ServiceMetaData::checkVersion(const QString &version) const
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::checkVersion");
+    //match x.y as version format
+    QRegExp rx("^([1-9][0-9]*)\\.(0+|[1-9][0-9]*)$");
+    int pos = rx.indexIn(version);
+    QStringList list = rx.capturedTexts();
+    bool success = false;
+    if (pos == 0 && list.count() == 3
+            && rx.matchedLength() == version.length() )
+    {
+        list[1].toInt(&success);
+        if ( success ) {
+            list[2].toInt(&success);
+        }
+    }
+    XQSERVICE_DEBUG_PRINT("success: %d", success);
+    return success;
+}
+
+void ServiceMetaData::transformVersion(const QString &version, int *major, int *minor) const
+{
+    Q_ASSERT(major != NULL);
+    Q_ASSERT(minor != NULL);
+    if(!checkVersion(version)) {
+        *major = -1;
+        *minor = -1;
+    } else {
+        QRegExp rx("^([1-9][0-9]*)\\.(0+|[1-9][0-9]*)$");
+        rx.indexIn(version);
+        QStringList list = rx.capturedTexts();
+        Q_ASSERT(list.count() == 3);
+        *major = list[1].toInt();
+        *minor = list[2].toInt();
+    }
+}
+
+/*!
+    Clears the service metadata.
+*/
+void ServiceMetaData::clearMetadata()
+{
+    XQSERVICE_DEBUG_PRINT("ServiceMetaData::clearMetadata");
+    serviceName.clear();
+    serviceLocation.clear();
+    serviceDescription.clear();
+    serviceInterfaces.clear();
+    duplicates.clear();
+    m_latestIndex.clear();
+    version = 0;
+}
+
+
+
+QT_END_NAMESPACE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemetadata/xqservicemetadata.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+HEADERS +=  ../inc/xqserviceglobal.h \
+            src/xqservicemetadata/xqservicemetadata_p.h\
+            src/xqservicemetadata/xqaiwinterfacedescriptor.h\
+            src/xqservicemetadata/xqaiwinterfacedescriptor_p.h\
+             
+
+SOURCES +=  src/xqservicemetadata/xqservicemetadata.cpp \
+            src/xqservicemetadata/xqaiwinterfacedescriptor.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqservicemetadata/xqservicemetadata_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** If you have questions regarding the use of this file, please
+** contact Nokia at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XQSERVICEMETADATA_H
+#define XQSERVICEMETADATA_H
+
+//
+//  W A R N I N G
+//  -------------
+//
+// This file is not part of the Qt API.  It exists for the convenience
+// of the QLibrary class.  This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+#include <QXmlStreamReader>
+#include <QStringList>
+#include <QList>
+#include <QSet>
+#include "xqserviceglobal.h"
+#include "xqserviceerrdefs.h" // error codes
+#include "xqaiwinterfacedescriptor.h"
+
+class QIODevice;
+
+QT_BEGIN_NAMESPACE
+
+// FORWARD DECLARATIONS
+class XQAiwInterfaceDescriptor;
+
+class ServiceMetaDataResults 
+{
+public:
+    enum ServiceMetadataVersion {
+        VERSION_1 = 1,
+        VERSION_2 = 2  // default
+    };
+    
+    ServiceMetaDataResults() {};
+    
+    ServiceMetaDataResults(const ServiceMetaDataResults& other)
+    {
+        description = other.description;
+        location = other.location;
+        name = other.name;
+        interfaces = other.interfaces;
+        latestInterfaces = other.latestInterfaces;
+        version = other.version;
+    };
+    
+    QString location;
+    QString name;
+    QString description;
+    QList<XQAiwInterfaceDescriptor> interfaces;
+    QList<XQAiwInterfaceDescriptor> latestInterfaces;
+    int version;  // ServiceMetadataVersion
+};
+
+#ifndef QT_NO_DATASTREAM
+Q_SFW_EXPORT QDataStream &operator<<(QDataStream &, const ServiceMetaDataResults &);
+Q_SFW_EXPORT QDataStream &operator>>(QDataStream &, ServiceMetaDataResults &);
+#endif
+
+class Q_SFW_EXPORT ServiceMetaData 
+{
+public:
+
+    //! ServiceMetaData::ServiceMetadataErr
+    /*!
+     This enum describes the errors that may be returned by the Service metadata parser.
+     */
+    enum ServiceMetadataErr {
+        SFW_ERROR_NO_SERVICE = QtService::METADATA_ERR_START_VALUE,    /* Can not find service root node in XML file*/
+        SFW_ERROR_NO_SERVICE_NAME,                          /* Can not find service name in XML file */
+        SFW_ERROR_NO_SERVICE_FILEPATH,                      /* Can not find service filepath in XML file */
+        SFW_ERROR_NO_SERVICE_INTERFACE,                     /* No interface for the service in XML file*/
+        SFW_ERROR_NO_INTERFACE_VERSION,                     /* Can not find interface version in XML file */
+        SFW_ERROR_NO_INTERFACE_NAME,                        /* Can not find interface name in XML file*/
+        SFW_ERROR_UNABLE_TO_OPEN_FILE,                      /* Error opening XML file*/
+        SFW_ERROR_INVALID_XML_FILE,                         /* Not a valid XML file*/
+        SFW_ERROR_PARSE_SERVICE,                            /* Error parsing service node */
+        SFW_ERROR_PARSE_INTERFACE,                          /* Error parsing interface node */
+        SFW_ERROR_DUPLICATED_INTERFACE,                     /* The same interface is defined twice */
+        SFW_ERROR_INVALID_VERSION,
+        SFW_ERROR_DUPLICATED_TAG,                           /* The tag appears twice */
+        SFW_ERROR_INVALID_CUSTOM_TAG,                       /* The customproperty tag is not corectly formatted or otherwise incorrect*/
+        SFW_ERROR_DUPLICATED_CUSTOM_KEY                     /* The customproperty appears twice*/
+    };
+
+public:
+
+    ServiceMetaData(const QString &aXmlFilePath);
+
+    ServiceMetaData(QIODevice *device);
+
+    ~ServiceMetaData();
+
+    void setDevice(QIODevice *device);
+    
+    QIODevice *device() const;
+
+    bool extractMetadata();
+
+    int getLatestError() const;
+
+    ServiceMetaDataResults parseResults() const;
+
+private:
+    QList<XQAiwInterfaceDescriptor> latestInterfaces() const;
+    XQAiwInterfaceDescriptor latestInterfaceVersion(const QString &interfaceName);
+    bool processServiceElement(QXmlStreamReader &aXMLReader);
+    bool processInterfaceElement(QXmlStreamReader &aXMLReader);
+
+    // Support for old XML format
+    bool getAttributeValue(const QXmlStreamReader &aDomElement,
+                           const QString &aAttributeName, QString &aValue);
+    bool processServiceElementPrevVersion(QXmlStreamReader &aXMLReader);
+    bool processInterfaceElementPrevVersion(QXmlStreamReader &aXMLReader);
+
+    void clearMetadata();
+
+private:
+    bool lessThan(const XQAiwInterfaceDescriptor &d1,
+                    const XQAiwInterfaceDescriptor &d2) const;
+    bool checkVersion(const QString &version) const;
+    void transformVersion(const QString &version, int *major, int *minor) const;
+
+    QIODevice *xmlDevice;
+    bool ownsXmlDevice;
+    QString serviceName;
+    QString serviceLocation;
+    QString serviceDescription;
+    QList<XQAiwInterfaceDescriptor> serviceInterfaces;
+    QSet<QString> duplicates;
+    int latestError;
+    QHash<QString, int> m_latestIndex;
+    int version;  // data version 
+};
+
+QT_END_NAMESPACE
+
+#endif // XQSERVICEMETADATA_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqserviceutil.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,267 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+#include "xqrequestutil.h"
+#include "xqserviceutil.h"
+
+#include <QCoreApplication>
+#include <QStringList>
+
+#include <apgcli.h>
+#include <apacmdln.h>
+#include <apgtask.h>
+#include <coemain.h>
+#include <e32std.h>
+#include <w32std.h> // RWsSession
+#include <apacmdln.h>
+#include <eikenv.h>
+
+// ======== LOCAL FUNCTIONS ========
+static bool isKeySet(const QString &key)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil isKeySet %s", qPrintable(key));
+    QStringList args = QCoreApplication::arguments();
+    foreach (QString arg, args)
+    {
+        XQSERVICE_DEBUG_PRINT("arg: %s", qPrintable(arg));
+        if (!arg.compare(key,Qt::CaseInsensitive))
+        {
+            XQSERVICE_DEBUG_PRINT("Key set");
+            return true;
+        }
+    }
+    XQSERVICE_DEBUG_PRINT("Key not set");
+    return false;
+    
+}
+
+static bool isKeySet(int argc, char **argv, const QString &key)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil argv isKeySet %s", qPrintable(key));
+    for (int i=0; i < argc; i++)
+    {
+        QString arg(argv[i]);
+        XQSERVICE_DEBUG_PRINT("arg: %s", qPrintable(arg));
+        if (!arg.compare(key,Qt::CaseInsensitive)) {
+            XQSERVICE_DEBUG_PRINT("Key set");
+            return true;
+        }
+    }
+    XQSERVICE_DEBUG_PRINT("Key not set");
+    return false;
+
+}
+
+
+
+static QString keyValue(const QString &key)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil keyValue %s", qPrintable(key));
+    QString ret;
+    QStringList args = QCoreApplication::arguments();
+    foreach (QString arg, args) {
+        if (arg.contains(key,Qt::CaseInsensitive)) {
+            QStringList l= arg.split("=");
+            ret = l.value(1);
+        }
+    }
+    XQSERVICE_DEBUG_PRINT("key value=%s", qPrintable(ret));
+    return ret;
+}
+
+
+static QString keyValue(int argc, char **argv, const QString &key)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil argv keyValue %s", qPrintable(key));
+    QString ret;
+    for (int i=0; i < argc; i++)
+    {
+        QString arg(argv[i]);
+        XQSERVICE_DEBUG_PRINT("arg: %s", qPrintable(arg));
+        if (arg.contains(key,Qt::CaseInsensitive)) {
+            QStringList l= arg.split("=");
+            ret = l.value(1);
+        }
+    }
+    XQSERVICE_DEBUG_PRINT("key value=%s", qPrintable(ret));
+    return ret;
+}
+
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Send service application to backround in asynchronous service call.
+    \param value Defines should application be send to backround (if set to true)
+                 or to be brought back to foreground (if set to false)
+*/
+void XQServiceUtil::toBackground( bool value )
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil::toBackground");
+    XQSERVICE_DEBUG_PRINT("value: %d", value);
+    RWsSession ws;
+    int sid = RProcess().SecureId().iId;  // Assumes UID3 == SID !!!
+    XQSERVICE_DEBUG_PRINT("sid: %d", sid);
+    if (ws.Connect() == KErrNone) {
+        XQSERVICE_DEBUG_PRINT("Connected to window server");
+        TApaTaskList tasklist(ws);
+        TApaTask task = tasklist.FindApp(TUid::Uid(sid));
+        XQSERVICE_DEBUG_PRINT("task.Exists(): %x", task.Exists());
+        if (task.Exists()) {
+            if (value) {
+                task.SendToBackground();
+            }
+            else {
+                task.BringToForeground();
+            }
+        }
+
+        ws.Close();
+    }
+}
+
+/*!
+    Check if service application is being launched as an embedded application.
+    This information is passed in the command line arguments to started service application.
+    \return true if service application is as an embedded application, otherwise false.
+*/
+bool XQServiceUtil::isEmbedded()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil::isEmbedded");
+    return isKeySet(QString::fromLatin1(XQServiceUtils::StartupArgEmbedded));
+}
+
+/*!
+    Check if service application is being launched as service (other include stand-alone launch
+    or activity launch). This information is valid upon service application launch. It is passed
+    in the command line arguments so can be used already in main() function before initializing any UI. 
+    \return true if launched as service, false otherwise (lanched as stand-alone or activity or other mode).
+*/
+bool XQServiceUtil::isService()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil::isService");
+    return isKeySet(QString::fromLatin1(XQServiceUtils::StartupArgService));
+}
+
+/*!
+    Returns the interface name part of the full service name to be called later.
+    This information is valid upon service application launch. It is passed
+    in the command line arguments so can be used already in main() function before
+    initializing any UI. For example for initializing only necessary components,
+    for generating interface specific UI etc.
+    \return Interface name part of the full service name.
+    - \b Note: The service name part should be known already by the service provider implicitly.
+*/
+QString XQServiceUtil::interfaceName()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil::interfaceName");
+    return keyValue(QString::fromLatin1(XQServiceUtils::StartupArgInterfaceName));
+}
+
+/*!
+    Returns the operation name within the interfaceName() to be called later.
+    This information is valid upon service application launch. It is passed
+    in the command line arguments so can be used already in main() function before
+    initializing any UI. For example for initializing only necessary components
+    for the coming slot call.
+    \return Operation name within the interfaceName()
+*/
+QString XQServiceUtil::operationName()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil::operationName");
+    return keyValue(QString::fromLatin1(XQServiceUtils::StartupArgOperationName));
+}
+
+/*!
+    
+*/
+QString XQServiceUtil::serviceName()
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil::serviceName");
+    return keyValue(QString::fromLatin1(XQServiceUtils::StartupArgServiceName));
+}
+
+/*!
+    Check if service application is being launched as an embedded application,
+    based on passed \a argv arguments.
+    \param argc Number of command line arguments.
+    \param argv List of command line arguments.
+    \return true if service application is as an embedded application, otherwise false.
+    \sa isEmbedded()
+*/
+bool XQServiceUtil::isEmbedded(int argc, char **argv)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil::isEmbedded argv");
+    return isKeySet(argc,argv,QString::fromLatin1(XQServiceUtils::StartupArgEmbedded));
+}
+
+/*!
+    Check if service application is being launched as service (other include stand-alone launch
+    or activity launch), based on passed \a argv arguments.
+    \param argc Number of command line arguments.
+    \param argv List of command line arguments.
+    \return true if launched as service, false otherwise (lanched as stand-alone or activity or other mode).
+    \sa isService()
+*/
+bool XQServiceUtil::isService(int argc, char **argv)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil::isService argv");
+    return isKeySet(argc,argv,QString::fromLatin1(XQServiceUtils::StartupArgService));
+}
+
+/*!
+    Returns the interface name part of the full service name to be called later,
+    based on passed \a argv arguments.
+    \param argc Number of command line arguments.
+    \param argv List of command line arguments.
+    \return Interface name part of the full service name.
+    \sa interfaceName()
+*/
+QString XQServiceUtil::interfaceName(int argc, char **argv)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil::interfaceName");
+    return keyValue(argc,argv,QString::fromLatin1(XQServiceUtils::StartupArgInterfaceName));
+}
+
+/*!
+    Returns the operation name within the interfaceName() to be called later,
+    based on passed \a argv arguments.
+    \param argc Number of command line arguments.
+    \param argv List of command line arguments.
+    \return Operation name within the interfaceName()
+    \sa operationName()
+*/
+QString XQServiceUtil::operationName(int argc, char **argv)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil::operationName argv");
+    return keyValue(argc,argv,QString::fromLatin1(XQServiceUtils::StartupArgOperationName));
+}
+
+/*!
+    
+*/
+QString XQServiceUtil::serviceName(int argc, char **argv)
+{
+    XQSERVICE_DEBUG_PRINT("XQServiceUtil::serviceName argv");
+    return keyValue(argc,argv,QString::fromLatin1(XQServiceUtils::StartupArgServiceName));
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqserviceutil.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef XQSERVICEUTIL_H
+#define XQSERVICEUTIL_H
+
+#include <xqserviceglobal.h>
+
+/*!
+    \brief Provides static utility functions for service provider (used also by QtHighway impl.)
+*/
+namespace XQServiceUtil
+{
+    // Utility to set started application to background
+    XQSERVICEUTIL_EXPORT void toBackground(bool value);
+
+    // Utilities to extract startup command line arguments
+    XQSERVICEUTIL_EXPORT bool isEmbedded();  // 
+    XQSERVICEUTIL_EXPORT bool isService();
+    XQSERVICEUTIL_EXPORT QString interfaceName();
+    XQSERVICEUTIL_EXPORT QString operationName();
+    XQSERVICEUTIL_EXPORT bool isEmbedded(int argc, char **argv);
+    XQSERVICEUTIL_EXPORT bool isService(int argc, char **argv);
+    XQSERVICEUTIL_EXPORT QString interfaceName(int argc, char **argv);
+    XQSERVICEUTIL_EXPORT QString operationName(int argc, char **argv);
+    XQSERVICEUTIL_EXPORT QString serviceName();
+    XQSERVICEUTIL_EXPORT QString serviceName(int argc, char **argv);
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqserviceutil.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,33 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+HEADERS += \    
+				src/xqserviceutil.h \
+    			src/xqservicemanager.h \
+                src/xqsharablefile.h \
+                src/xqrequestinfo.h \
+                src/xqrequestutil.h
+
+SOURCES += \
+    			src/xqserviceutil.cpp \
+    			src/xqservicemanager.cpp \
+                src/xqsharablefile.cpp \
+                src/xqrequestinfo.cpp \
+                src/xqrequestutil.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqsharablefile.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,228 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#include "xqservicelog.h"
+#include "xqsharablefile.h"
+#include <QVariant>
+
+/*!
+    \class XQSharableFile
+    \inpublicgroup QtBaseModule
+
+    \ingroup ipc
+    \brief Encapsulates needed functionality to pass one Symbian data-caged file handle to service provider.
+*/
+
+/*!
+    Constructor.
+*/
+XQSharableFile::XQSharableFile() :
+   mHandle(0)
+{
+    XQSERVICE_DEBUG_PRINT("XQSharableFile::XQSharableFile");
+}
+
+/*!
+    Constructor.
+    \param file Existing and valid file handle to be set to this XQSharableFile.
+*/
+XQSharableFile::XQSharableFile(RFile &file)
+{
+    XQSERVICE_DEBUG_PRINT("XQSharableFile::XQSharableFile(RFile)");
+    setHandle(file);
+}
+
+/*!
+    Destroys the descriptor.
+
+    \b Note!
+    The destructor does not close the file handle. 
+    You have to close it via the close() method.
+*/
+XQSharableFile::~XQSharableFile()
+{
+    XQSERVICE_DEBUG_PRINT("XQSharableFile::~XQSharableFile");
+    // One need to call close() explicitelly when all done
+}
+
+/*!
+    Sets the existing and valid sharable file. Use this
+    function if you obtained the handle from the other APIs.
+    \return True if the handle is valid and can be set, 
+            false otherwise.
+*/
+bool XQSharableFile::setHandle(RFile &file)
+{
+    XQSERVICE_DEBUG_PRINT("XQSharableFile::setHandle");
+    
+    TFileName name;
+    TInt err = file.FullName(name);
+    if (err != KErrNone)
+    {
+        XQSERVICE_DEBUG_PRINT("XQSharableFile::fullName err%d", err);
+        mHandle = 0;
+        return false;
+    }
+        
+    mFileName = QString::fromUtf16(name.Ptr(), name.Length());
+
+    mHandle = *((qlonglong *)&file);
+    QString s = QString("File handle is %1").arg(mHandle);
+    XQSERVICE_DEBUG_PRINT("%s", qPrintable(s));
+
+    return true;
+}
+
+/*!
+    Gets the set handle, if any.
+    \param handle Reference to handle to be set with
+                  this XQSharableFile's handle.
+    \return True if the handle is valid, false otherwise.
+*/
+bool XQSharableFile::getHandle(RFile &handle) const
+{
+    XQSERVICE_DEBUG_PRINT("XQSharableFile::getHandle");
+    QString s = QString("File handle is %1").arg(mHandle);
+    if (mHandle == 0)
+        return false;
+    handle = *((RFile *)&mHandle);
+    return true;
+}
+
+/*!
+    Get file name associated with this XQSharableFile.
+    \return Full file name associated with this XQSharableFile.
+*/
+QString XQSharableFile::fileName() const
+{
+    XQSERVICE_DEBUG_PRINT("XQSharableFile::fileName");
+    return mFileName;
+}
+
+/*!
+    Checks if this XQSharableFile is valid, that is if the associated
+    file handle is valid.
+    \return True if file handle of this XQSharableFile is valid,
+            false otherwise.
+*/
+bool XQSharableFile::isValid() const
+{
+    XQSERVICE_DEBUG_PRINT("XQSharableFile::isValid=%d", mHandle != 0);
+    return mHandle != 0;
+}
+
+/*!
+    Creates and sets the sharable file handle of the given file.
+    The file can be private, data-caged directory.
+    Currently only supported access mode is R/O.
+    \b Note! After opening the file, it should be closed by calling close().
+    \param fileName File to be opened.
+    \return True if the file name was ok and the file was opened successfuly,
+            false otherwise.
+*/
+bool XQSharableFile::open(const QString &fileName)
+{
+    close();   // Close possibly existing old one
+
+    QString symbianFileName = fileName;
+    symbianFileName.replace("/", "\\");
+    
+    TInt err = mSharableFS.Connect();
+    if (err != KErrNone)
+    {
+        return false;
+    }
+    
+    mSharableFS.ShareProtected();
+    TPtrC name( reinterpret_cast<const TUint16*>(symbianFileName.utf16()));
+    RFile f;
+    err = f.Open(mSharableFS, name, EFileShareReadersOnly);
+    if (err != KErrNone)
+    {
+        // Error in opening, close the created session
+        mSharableFS.Close();
+        return false;
+    }
+
+    this->setHandle(f);
+    return true;
+}
+
+/*!
+    Close the sharable file handle.
+    <b>It is very important to close the handle if it is no longer needed.</b>
+*/
+void XQSharableFile::close()
+{
+    XQSERVICE_DEBUG_PRINT("XQSharableFile::close");
+    RFile f;
+    if (getHandle(f))
+    {
+        f.Close();
+    }
+
+    if (mSharableFS.Handle() != NULL)
+    {
+        mSharableFS.Close();
+    }
+    
+}
+
+/*!
+    Serializes XQSharableFile into a stream.
+    \param s Stream to which this XQSharableFile will be serialized.
+*/
+template <typename Stream> void XQSharableFile::serialize(Stream &s) const
+{
+    XQSERVICE_DEBUG_PRINT("XQSharableFile::serialize");
+    s << mFileName;
+    s << mHandle;
+    QString str = QString("\tFile handle is %1").arg(mHandle);
+    XQSERVICE_DEBUG_PRINT("%s", qPrintable(str));
+}
+
+/*!
+    Deserializes XQSharableFile from a stream.
+    \param s Stream from which XQSharableFile will be deserialized.
+*/
+template <typename Stream> void XQSharableFile::deserialize(Stream &s)
+{
+    XQSERVICE_DEBUG_PRINT("XQSharableFile::deserialize");
+    
+    s >> mFileName;
+    s >> mHandle;
+    
+    QString str = QString("\tFile handle is %1").arg(mHandle);
+    XQSERVICE_DEBUG_PRINT("%s", qPrintable(str));
+    
+}
+
+/*!
+    Compares two XQSharableFile objects.
+    \return True if both XQSharableFile objects are equal, false otherwise.
+*/
+bool XQSharableFile::operator==( const XQSharableFile &other )
+{
+    return (mFileName == other.mFileName) && (mHandle == other.mHandle);
+}
+
+
+Q_IMPLEMENT_USER_METATYPE(XQSharableFile)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/src/xqsharablefile.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:                                                         
+*
+*/
+
+#ifndef XQSHARABLEFILE_H
+#define XQSHARABLEFILE_H
+
+#include <f32file.h>
+#include <xqserviceglobal.h>
+#include <xqserviceipcmarshal.h>
+
+class XQSERVICEUTIL_EXPORT XQSharableFile
+{
+
+public:
+    XQSharableFile() ;
+    XQSharableFile(RFile &file) ;
+    virtual ~XQSharableFile() ;
+
+public:
+    
+    bool setHandle(RFile &file);
+    bool getHandle(RFile &file) const;
+    QString fileName() const;
+    bool isValid() const;
+
+    bool open(const QString &fileName);
+    void close();
+        
+    template <typename Stream> void serialize(Stream &stream) const;
+    template <typename Stream> void deserialize(Stream &stream);
+    bool operator==( const XQSharableFile &other);
+        
+private:
+    QString mFileName;
+    qlonglong mHandle;
+    RFs mSharableFS;
+};  
+
+Q_DECLARE_USER_METATYPE(XQSharableFile)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqserviceutil/xqserviceutil.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,48 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+TEMPLATE = lib
+TARGET   = xqserviceutil
+CONFIG  += dll warn_on
+
+QT -= gui
+
+DEFINES += XQ_BUILD_XQSERVICEUTIL_LIB
+symbian {
+	TARGET.UID3 = 0x20022E73
+	TARGET.EPOCSTACKSIZE = 0x5000
+	TARGET.EPOCHEAPSIZE = "0x20000 0x1000000"
+	TARGET.EPOCALLOWDLLDATA = 1
+	TARGET.CAPABILITY = ALL -TCB
+}
+
+XQSERVICE_ROOT=..
+        
+include(src/api_headers.pri)
+include(../xqservicebase.pri)
+include(src/xqserviceutil.pri)
+
+include(src/xqservicemetadata/xqservicemetadata.pri)
+
+LIBS+=-lapparc -lapgrfx -lws32 -lcone -lbafl -leikcore -lefsrv -lxqutils
+
+libFiles.sources = xqserviceutil.dll
+libFiles.path = "!:\sys\bin"
+DEPLOYMENT += libFiles
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqsreg/README.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,42 @@
+XQ Service registration application
+
+============= IMPORTANT NOTE: ==========
+
+Due to notoriously returning problem with xqsreg compilation with
+ever-changing private implementation in QT (which is understandable
+but yet annoying) there is major change to build process.
+
+
+============= BUILD STEPS: =============
+
+1. Copy WHOLE xqsreg directory (one containing this README file)
+   to: 
+
+     [QTDIR]\src\tools
+
+   where QTDIR is path to your qt sources (typically for SDK release: \sf\mw\qt\)
+
+
+2. Ensure that QT is properly configured. In just-downoladed SDK one
+   need to run such command in qt directory:
+
+   # configure.exe -platform win32-g++ -make make -xplatform symbian-abld -nokia-developer -dont-process -no-qmake
+
+
+3. Rebuild project in [QTDIR]\src\tools\bootstrap library:
+
+   # qmake -platform win32-g++ -spec \sf\mw\qt\mkspecs\win32-g++    
+   # make
+
+
+4. Rebuild project in [QTDIR]\src\tools\xqsreg directory:
+
+   # qmake -platform win32-g++ -spec \sf\mw\qt\mkspecs\win32-g++ 
+   # make
+
+
+5. Check if xqsreg.exe tool is in proper bin directory:
+
+   # dir \epoc32\tools\xqsreg.exe
+
+   (exact path depends on where QT_INSTALL_BINS points to, during compilation)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqsreg/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,311 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QString>
+#include <QStringList>
+#include <QDebug>
+#include <QFile>
+#include <QIODevice>
+#include <QTextStream>
+#include <QDateTime>
+#include <QDir>
+#include <QFileInfo>
+
+#include <QRegExp>
+
+#include <iostream>
+
+using namespace std;
+
+#define RESOURCE_DIRECTORY_RESOURCE "\\\\resource\\\\apps\\\\"
+#define _s(a) QString::fromLatin1(a)
+const char *FINGERPRINT = "/* xqsreg.exe fingerprint */";
+
+QString appName;
+QString uid3;
+QString configurationFileName;
+QString configurationFile;
+QString resourceFileName;
+QString embeddable;
+QString hidden;
+
+QString epocRoot()
+{
+     QString test=QDir::root().absolutePath() ;
+     qDebug() << QString::fromLatin1("epocroot=") + test;
+     return test;
+}
+
+QString canonizePath(const QString& origPath)
+{
+    // Since current path gets appended almost always anyway, use it as default
+    // for nonexisting paths.
+    static QString defaultPath;
+    if (defaultPath.isEmpty()) {
+        QFileInfo fi(QString::fromLatin1("."));
+        defaultPath = fi.canonicalFilePath();
+    }
+
+    // Prepend epocroot to any paths beginning with "/epoc32/"
+    QString resultPath = QDir::fromNativeSeparators(origPath);
+    if (resultPath.startsWith(QString::fromLatin1("/epoc32/"), Qt::CaseInsensitive))
+        resultPath = QDir::fromNativeSeparators(epocRoot()) + resultPath.mid(1);
+
+    QFileInfo fi(resultPath);
+    if(fi.isDir()) {
+        resultPath = fi.canonicalFilePath();
+    } else {
+        resultPath = fi.canonicalPath();
+    }
+
+    resultPath = QDir::cleanPath(resultPath);
+
+    if (resultPath.isEmpty())
+        resultPath = defaultPath;
+
+    return resultPath;
+}
+
+
+bool checkIfPatched(const QString &rssContent)
+{
+	return rssContent.contains(_s(FINGERPRINT));
+}
+
+int parseProperties(const QStringList &params) 
+{
+	int paramCount = params.size();
+	
+    if (paramCount < 5) {
+        fprintf(stderr, "Warning: invalid parameters!\n");
+        fprintf(stderr, "Usage: xqsreg <application name> <application uid> <conf_file.xml> <resource file name> [embeddable] [hidden]");
+        return 1;
+    }
+
+	appName = params[1];
+    uid3=params[2];
+    configurationFileName=params[3];
+    configurationFile = QDir::fromNativeSeparators(canonizePath(QString::fromLatin1(".")) + QString::fromLatin1("/") + configurationFileName);
+    resourceFileName=params[4];
+	
+	embeddable = QString::fromLatin1("KAppNotEmbeddable");
+    hidden = QString::fromLatin1("KAppNotHidden");
+
+    if (paramCount >= 6) {
+		if(!params[5].compare(QString::fromLatin1("embeddable"), Qt::CaseInsensitive)) {
+			embeddable = QString::fromLatin1("KAppEmbeddable");
+
+		} else if(!params[5].compare(QString::fromLatin1("hidden"), Qt::CaseInsensitive)) {
+            hidden = QString::fromLatin1("KAppIsHidden"); 
+        }
+    }
+    
+	if (paramCount == 7) {
+        if(!params[6].compare(QString::fromLatin1("embeddable"), Qt::CaseInsensitive)) {
+            embeddable = QString::fromLatin1("KAppEmbeddable");
+        } else if(!params[6].compare(QString::fromLatin1("hidden"), Qt::CaseInsensitive)) {
+            hidden = QString::fromLatin1("KAppIsHidden"); 
+        }
+    }	
+	
+	return 0;
+}
+
+int populateBeforeRegInfo(QTextStream& t) 
+{
+	t << endl << endl;
+	t << FINGERPRINT << endl;
+/*    t << "// ============================================================================" << endl;
+    t << "// * Generated by xqrs on " << QDateTime::currentDateTime().toString() << endl;
+    t << "// * This file is generated by xqrs and should not be modified by the" << endl;
+    t << "// * user." << endl;
+	t << "// ============================================================================" << endl;
+    t << endl; */
+	
+	t << "#include <xqserviceipcconst.h>" << endl;
+	t << "STRUCT SERVICE_CONFIGURATION {LTEXT xmldata;}" << endl;
+	t << "STRUCT SERVICE_CONFIGURATION_ARRAY {STRUCT service_configuration_array[];}" << endl;
+
+	t << endl;
+
+/*	t << "UID2 " << "KUidAppRegistrationResourceFile" << endl;
+	t << "UID3 " << uid3 << endl << endl; */
+
+	return 0;
+}
+
+int populateInsideRegInfo(QTextStream& t) 
+{
+	t << endl << endl;
+/*	t << "\tapp_file=\"" << appName << "\";" << endl;
+	t << "\tlocalisable_resource_file=\"" RESOURCE_DIRECTORY_RESOURCE << appName << "\";" << endl;
+	t << endl;*/
+
+	t << "\t" << "embeddability   = " << embeddable << ";" <<  endl;
+	t << "\t" << "hidden          = " << hidden << ";" <<  endl;
+	t << "\t" << "newfile         = KAppDoesNotSupportNewFile;" <<  endl;
+	t << "\t" << "service_list =" <<  endl;
+	t << "\t\t" << "{" <<  endl;
+	t << "\t\t" << "SERVICE_INFO" <<  endl;
+	t << "\t\t\t" << "{" <<  endl;
+	t << "\t\t\t" << "uid = KXQServiceUid;" <<  endl;
+	t << "\t\t\t" << "datatype_list = {};" <<  endl;
+	t << "\t\t\t" << "opaque_data = r_service_configuration_reg;" <<  endl;
+	t << "\t\t\t" << "}" <<  endl;
+	t << "\t\t" << "};" <<  endl;
+			
+	return 0;
+}
+
+int populateAfterRegInfo(QTextStream& t) 
+{
+	t << endl << endl;
+	t << "RESOURCE SERVICE_CONFIGURATION_ARRAY r_service_configuration_reg" << endl;
+	t << "\t{" << endl;
+	t << "\t\tservice_configuration_array=" << endl;
+	t << "\t\t\t{" << endl;
+
+    QFile cf(configurationFile);	
+
+	int err = 0;
+	
+	QByteArray escapedQuotationMark = QByteArray("\\\"");
+	
+	if (cf.open(QIODevice::ReadOnly | QIODevice::Text)) {
+		QByteArray xmlConf;
+
+		xmlConf = cf.readAll();
+		xmlConf = xmlConf.replace("\"","\\\"");
+		if (xmlConf.count()) {
+			QByteArray xml = xmlConf.simplified();
+			for (int n=0;;n++) {
+				int splitCount = 255;
+				if (xml.size() > 255 && (xml.mid(254, 2) == escapedQuotationMark)) {
+					splitCount = 254;
+				}
+				QByteArray split = xml.left(splitCount);
+				if (!split.count()) {
+					break;
+				}
+				if (n) {
+					t << "\t\t\t\t,"  << endl;
+				}
+				t << "\t\t\t\tSERVICE_CONFIGURATION"  << endl;
+				t << "\t\t\t\t{" <<  endl;
+				t << "\t\t\t\txmldata = \"" << split <<"\";" <<  endl;
+				t << "\t\t\t\t}" <<  endl;
+
+				xml = xml.mid(splitCount);
+			}
+		}	
+	} else {
+		fprintf(stderr, "Error: Cannot open %s file for reading.", qPrintable(configurationFile));
+		err = 1;
+	}
+	
+	t << endl;
+	t << "\t\t\t};" << endl;
+	t << "\t}" << endl;
+	
+	return err;
+}
+
+int runXQSRegGenerator(QStringList params)
+{
+	QFile ftR(resourceFileName);
+	QString fileContent(_s(""));
+	
+	if ( ftR.open(QIODevice::ReadOnly | QIODevice::Text) ) {       
+	    QTextStream t(&ftR);
+		fileContent = t.readAll(); // let's hope file won't be too big ;)
+	    ftR.close();
+    } else {
+        fprintf(stderr, "Error: file %s not found.\n", qPrintable(resourceFileName));
+        return 1;
+	}
+	
+	if (checkIfPatched(fileContent)) {
+        fprintf(stderr, "Warning: matched xqsreg.exe fingerprint in resource file %s. Skipping rewriting action.\n", qPrintable(configurationFile));
+        return 0;
+	}
+
+	QRegExp qr(_s("RESOURCE\\s+APP_REGISTRATION_INFO\\s+[{]"));
+
+	int pos = qr.indexIn(fileContent, 0);
+
+	QString beforeRegistrationInfo;
+	QString insideRegistrationInfo;
+	QString afterRegistrationInfo;
+	
+	QTextStream tsBeforeRegistrationInfo(&beforeRegistrationInfo);
+	QTextStream tsInsideRegistrationInfo(&insideRegistrationInfo);
+	QTextStream tsAfterRegistrationInfo(&afterRegistrationInfo);
+	
+	if (populateBeforeRegInfo(tsBeforeRegistrationInfo)) {
+		return 1;
+	}
+		
+	if (populateInsideRegInfo(tsInsideRegistrationInfo)) {
+		return 1;
+	}
+
+	if (populateAfterRegInfo(tsAfterRegistrationInfo)) {
+		return 1;
+	}
+	
+	if (pos != -1) {
+		fileContent.insert(pos, beforeRegistrationInfo);
+		pos += qr.matchedLength() + beforeRegistrationInfo.size();
+		fileContent.insert(pos, insideRegistrationInfo);
+		fileContent.append(afterRegistrationInfo);
+	} else {
+        fprintf(stderr, "Error: RESOURCE APP_REGISTRATION_INFO not found in: %s.", qPrintable(configurationFile));
+        return 1;
+	}
+	
+    QFile ft(resourceFileName);
+    if(ft.open(QIODevice::WriteOnly)) {
+        QTextStream t(&ft);
+		t << fileContent;
+	} else {
+        fprintf(stderr, "Error: cannot open file %s for writing.", qPrintable(configurationFile));
+        return 1;
+	}
+	ft.close();
+
+    return 0;
+}
+
+int main(int argc, char *argv[])
+{
+    QStringList params;
+    for (int i=0 ; i < argc ; i++) {
+        params << QString::fromLatin1(argv[i]);
+        //printf("par%d=%s\n",i,argv[i]);
+    }
+	
+	int err = parseProperties(params);
+	
+	if (err == 0) {
+		err = runXQSRegGenerator(params);
+	}
+	return err;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqsreg/service.prf	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,38 @@
+######################################################################
+# XQService Feature
+######################################################################
+
+isEmpty(SERVICE.FILE) {
+	error("Missing service configuration file")
+}
+else {
+	XQSREG = xqsreg.exe
+	XQSRESOURCE_FILE_TAIL=_reg.rss
+	XQSRESOURCE_FILE=$$TARGET$$XQSRESOURCE_FILE_TAIL
+	
+	
+symbian-sbsv2{
+
+	
+ myextension = \
+    "START EXTENSION qt/qtextensions_pre_targetdep.export" \
+    "OPTION PREDEP_TARGET $$XQSRESOURCE_FILE" \
+    "OPTION COMMAND $$XQSREG $$TARGET $${TARGET.UID3} $$SERVICE.FILE $$XQSRESOURCE_FILE $$SERVICE.OPTIONS" \
+    "END"
+ BLD_INF_RULES.prj_extensions += myextension
+}
+
+symbian-abld{
+
+
+  DUMMY = xqs_dummy
+	xqs.output = $$DUMMY
+	XQS_INPUT = .
+	xqs.input = XQS_INPUT
+	xqs.CONFIG = no_link explicit_dependencies
+	xqs.variable_out = SOURCES
+	xqs.commands = $$XQSREG $$TARGET $${TARGET.UID3} $$SERVICE.FILE $$XQSRESOURCE_FILE $$SERVICE.OPTIONS
+	QMAKE_EXTRA_COMPILERS += xqs
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qthighway/xqsreg/xqsreg.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,42 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE	= app
+TARGET		= xqsreg
+
+CONFIG += console
+CONFIG -= app_bundle
+
+
+DESTDIR = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}#../../../bin
+
+INCLUDEPATH	+= . 
+DEPENDPATH	+= .
+LIBS	        =
+OBJECTS_DIR	= .
+
+HEADERS += 
+SOURCES += main.cpp
+
+include(../bootstrap/bootstrap.pri)
+
+#target.path=$$[QT_INSTALL_BINS]
+#INSTALLS += target
+#include(../../qt_targets.pri)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/examples.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+TEMPLATE=subdirs
+
+CONFIG += ordered
+SUBDIRS= settingsmanagerex \
+         sysinfoex \
+         utilsex \
+         keycaptureex \
+         systemtoneserviceex
+
+symbian:BLD_INF_RULES.prj_exports += "./rom/qtmobileextensionsexamples.iby $$CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(qtmobileextensionsexamples.iby)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/README.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,22 @@
+KeyCapture
+
+Application description:
+This application is for testing the KeyCapture API.
+
+Features:
+- Shows scancodes of captured keys including those specific to hw
+
+
+Tested platforms:
+- Qt 4.6
+- S60 5th edition SDK v1.0
+
+Phones tested with:
+-
+
+Notes:
+None
+
+Further improvements:
+None
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/capturerequest.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,142 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "capturerequest.h"
+
+#include <QAction>
+
+#include "mapping.h"
+
+CaptureRequest::CaptureRequest(Mapping *mapping_)
+{
+    mRequestType = RequestTypeUndefined;
+    mKey = Qt::Key_unknown;    
+    mModifiersMap = Qt::NoModifier;
+    mModifier = Qt::NoModifier;
+    mLongFlags = XQKeyCapture::LongNormal;
+    
+    this->mapping = mapping_;
+}
+
+CaptureRequest::~CaptureRequest()
+{
+}
+
+QString CaptureRequest::toString()
+{
+    QString res = "Request ";
+    
+    switch (mRequestType) {
+        case CaptureRequest::RequestTypeKey :
+            res +="Key(";
+            break;
+        case CaptureRequest::RequestTypeLongKey :
+            res +="LongKey(";            
+            break;
+        case CaptureRequest::RequestTypeKeyUpAndDowns :
+            res +="UpAndDowns(";  
+            break;
+        case CaptureRequest::RequestTypeCancelKey :
+            res +="CancelKey(";
+            break;
+        case CaptureRequest::RequestTypeCancelLongKey :
+            res +="CancelLongKey(";
+            break;
+        case CaptureRequest::RequestTypeCancelKeyUpAndDowns :
+            res +="CancelUpAndDowns(";
+            break;
+        default:
+            res +="Unknown";
+            break;
+    }
+    
+    if ( mRequestType == RequestTypeUndefined)
+        return res;
+    
+//    res +=QString("%1").arg(mKey, 0, 16);
+    
+    res += mapping->name(mKey);
+    
+    res += QString("(0x%1)").arg(mKey, 0, 16);
+    
+    //TODO::put to res mModifiersMap    
+    //TODO::put to res mModifier
+    if ( mRequestType == RequestTypeLongKey || mRequestType == RequestTypeCancelLongKey)
+        res +=QString(",%1)").arg(mLongFlags, 0, 16);
+    else
+        res +=")";
+    
+    return res;
+}
+
+bool CaptureRequest::setType(QAction* action)
+{
+    if (!action)
+        return false;
+    
+    bool ok;
+    
+    int act = action->data().toInt(&ok);
+    
+    if (ok){
+        switch (act){
+            case 1 : mRequestType = RequestTypeKey; break;
+            case 2 : mRequestType = RequestTypeLongKey; break;
+            case 3 : mRequestType = RequestTypeKeyUpAndDowns; break;
+            case 4 : mRequestType = RequestTypeCancelKey; break;
+            case 5 : mRequestType = RequestTypeCancelLongKey; break;
+            case 6 : mRequestType = RequestTypeCancelKeyUpAndDowns; break;
+        }
+        return mRequestType!=RequestTypeUndefined;
+    }else{
+        return false;
+    }
+}
+
+bool CaptureRequest::setKey(QAction* action, QMap<QString, Qt::Key> *map)
+{
+    if (!action || !map || map->count()==0)
+        return false;
+    
+    QString key = action->data().toString();
+    
+    if (!key.isNull() && map->contains(key)) {
+        mKey = map->value(key);
+        return true;
+    }
+    
+    return false;
+}
+
+bool CaptureRequest::setLongFlags(QAction* action, QMap<QString, XQKeyCapture::LongFlags> *map)
+{
+    if (!action || !map || map->count()==0)
+        return false;
+    
+    QString flag = action->data().toString();
+    
+    if ( !flag.isNull() && map->contains(flag)){
+        mLongFlags = map->value(flag);
+        return true;
+    }
+    
+    return false;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/capturerequest.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef CAPTUREREQUEST_H_
+#define CAPTUREREQUEST_H_
+
+#include <QMap>
+#include <QString>
+#include <QtGlobal>
+
+#include <XQKeyCapture>
+
+class Mapping;
+class QAction;
+
+class CaptureRequest
+{
+public:
+    
+    enum RequestType {
+        RequestTypeUndefined =-1,
+        RequestTypeKey,
+        RequestTypeLongKey,
+        RequestTypeKeyUpAndDowns,
+        RequestTypeCancelKey,
+        RequestTypeCancelLongKey,
+        RequestTypeCancelKeyUpAndDowns        
+    };
+    
+public:
+    CaptureRequest(Mapping *);
+    ~CaptureRequest();
+    
+    bool setType(QAction* action);
+    bool setKey(QAction* action, QMap<QString, Qt::Key> *map);
+    bool setLongFlags(QAction* action, QMap<QString, XQKeyCapture::LongFlags> *map);
+    
+    QString toString();
+
+public:
+    RequestType mRequestType;
+    Qt::Key mKey;    
+    Qt::KeyboardModifier mModifiersMap;
+    Qt::KeyboardModifier mModifier;
+    XQKeyCapture::LongFlags mLongFlags;
+
+    Mapping *mapping;
+
+};
+
+#endif /* CAPTUREREQUEST_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/install.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,55 @@
+IMPORTANT: READ CAREFULLY BEFORE INSTALLING, DOWNLOADING, OR USING THE SOFTWARE
+ 
+NOKIA CORPORATION END-USER SOFTWARE AGREEMENT
+ 
+This Software Agreement ("Agreement") is between You (either an individual or an entity), the End User, and Nokia Corporation ("Nokia").  The Agreement authorizes You to use the Software specified in Clause 1 below, which may be stored on a CD-ROM, sent to You by electronic mail, or downloaded from Nokia’s Web pages or Servers or from other sources under the terms and conditions set forth below. This is an agreement on end-user rights and not an agreement for sale. Nokia continues to own the copy of the Software and the physical media contained in the sales package and any other copy that You are authorized to make pursuant to this Agreement.
+ 
+Read this Agreement carefully before installing, downloading, or using the Software.  By clicking on the "I Accept" button while installing, downloading, and/or using the Software, You agree to the terms and conditions of this Agreement.  If You do not agree to all of the terms and conditions of this Agreement, promptly click the "Decline" or "I Do Not Accept" button, cancel the installation or downloading, or destroy or return the Software and accompanying documentation to Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS.
+ 
+1. SOFTWARE.  As used in this Agreement, the term "Software" means, collectively: (i) the software product identified above (ii) all the contents of the disk(s), CD-ROM(s), electronic mail and its file attachments, or other media with which this Agreement is provided, including the object code form of the software delivered via a CD-ROM, electronic mail, or Web page (iii) digital images, stock photographs, clip art, or other artistic works ("Stock Files") (iv) related explanatory written materials and any other possible documentation related thereto ("Documentation"); (v) fonts, and (vi) upgrades, modified versions, updates, additions, and copies of the Software (collectively "Updates"), if any, licensed to You by Nokia under this Agreement.
+ 
+2. END-USER RIGHTS AND USE. Nokia grants to You non-exclusive, non-transferable end-user rights to install the Software on the local hard disk(s) or other permanent storage media of one computer and use the Software on a single computer or terminal at a time.
+ 
+3. LIMITATIONS ON END-USER RIGHTS.  You may not copy, distribute, or make derivative works of the Software except as follows:
+ 
+(a) You may make one copy of the Software on magnetic media as an archival backup copy, provided Your archival backup copy is not installed or used on any computer. Any other copies You make of the Software are in violation of this Agreement.
+ 
+(b) You may not use, modify, translate, reproduce, or transfer the right to use the Software or copy the Software except as expressly provided in this Agreement.
+ 
+(c) You may not resell, sublicense, rent, lease, or lend the Software.
+ 
+(d) You may not reverse engineer, reverse compile, disassemble, or otherwise attempt to discover the source code of the Software (except to the extent that this restriction is expressly prohibited by law) or create derivative works based on the Software.
+ 
+(e) Unless stated otherwise in the Documentation, You shall not display, modify, reproduce, or distribute any of the Stock Files included with the Software. In the event that the Documentation allows You to display the Stock Files, You shall not distribute the Stock Files on a stand-alone basis, i.e., in circumstances in which the Stock Files constitute the primary value of the product being distributed. You should review the "Readme" files associated with the Stock Files that You use to ascertain what rights You have with respect to such materials. Stock Files may not be used in the production of libelous, defamatory, fraudulent, infringing, lewd, obscene, or pornographic material or in any otherwise illegal manner. You may not register or claim any rights in the Stock Files or derivative works thereof.  
+(f) You agree that You shall only use the Software in a manner that complies with all applicable laws in the jurisdiction in which You use the Software, including, but not limited to, applicable restrictions concerning copyright and other intellectual property rights.
+ 
+4. COPYRIGHT.  The Software and all rights, without limitation including proprietary rights therein, are owned by Nokia and/or its licensors and affiliates and are protected by international treaty provisions and all other applicable national laws of the country in which it is being used. The structure, organization, and code of the Software are the valuable trade secrets and confidential information of Nokia and/or its licensors and affiliates. You must not copy the Software, except as set forth in clause 3 (Limitations On End-User Rights). Any copies which You are permitted to make pursuant to this Agreement must contain the same copyright and other proprietary notices that appear on the Software. 
+ 
+5. MULTIPLE ENVIRONMENT SOFTWARE / MULTIPLE LANGUAGE SOFTWARE / DUAL MEDIA SOFTWARE / MULTIPLE COPIES / UPDATES. If the Software supports multiple platforms or languages, if You receive the Software on multiple media, or if You otherwise receive multiple copies of the Software, the number of computers on which all versions of the Software are installed shall be one computer. You may not rent, lease, sublicense, lend, or transfer versions or copies of the Software You do not use. If the Software is an Update to a previous version of the Software, You must possess valid end-user rights to such a previous version in order to use the Update, and You may use the previous version for ninety (90) days after You receive the Update in order to assist You in the transition to the Update. After such time You no longer have a right to use the previous version, except for the sole purpose of enabling You to install the Update. 
+ 
+6. COMMENCEMENT & TERMINATION.  This Agreement is effective from the first date You install the Software. You may terminate this Agreement at any time by permanently deleting, destroying, and returning, at Your own costs, the Software, all backup copies, and all related materials provided by Nokia. Your end-user rights automatically and immediately terminate without notice from Nokia if You fail to comply with any provision of this Agreement. In such an event, You must immediately delete, destroy, or return at Your own cost, the Software, all backup copies, and all related material to Nokia.
+ 
+7. YOU ACKNOWLEDGE THAT THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NEITHER NOKIA, ITS LICENSORS OR AFFILIATES, NOR THE COPYRIGHT HOLDERS MAKE ANY REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR THAT THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS, OR OTHER RIGHTS.  THERE IS NO WARRANTY BY NOKIA OR BY ANY OTHER PARTY THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE.  YOU ASSUME ALL RESPONSIBILITY AND RISK FOR THE SELECTION OF THE SOFTWARE TO ACHIEVE YOUR INTENDED RESULTS AND FOR THE INSTALLATION, USE, AND RESULTS OBTAINED FROM IT. 
+ 
+8. NO OTHER OBLIGATIONS.  This Agreement creates no obligations on the part of Nokia other than as specifically set forth herein.  
+ 
+9. LIMITATION OF LIABILITY.   TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL NOKIA, ITS EMPLOYEES OR LICENSORS OR AFFILIATES BE LIABLE FOR ANY LOST PROFITS, REVENUE, SALES, DATA, OR COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, PROPERTY DAMAGE, PERSONAL INJURY, INTERRUPTION OF BUSINESS, LOSS OF BUSINESS INFORMATION, OR FOR ANY SPECIAL, DIRECT, INDIRECT, INCIDENTAL, ECONOMIC, COVER, PUNITIVE, SPECIAL, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND WHETHER ARISING UNDER CONTRACT, TORT, NEGLIGENCE, OR OTHER THEORY OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF NOKIA OR ITS LICENSORS OR AFFILIATES ARE ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME COUNTRIES/STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF LIABILITY, BUT MAY ALLOW LIABILITY TO BE LIMITED, IN SUCH CASES, NOKIA, ITS EMPLOYEES OR LICENSORS OR AFFILIATES' LIABILITY SHALL BE LIMITED TO U.S. $50. 
+Nothing contained in this Agreement shall prejudice the statutory rights of any party dealing as a consumer. Nothing contained in this Agreement limits Nokia's liability to You in the event of death or personal injury resulting from Nokia's negligence. Nokia is acting on behalf of its employees and licensors or affiliates for the purpose of disclaiming, excluding, and/or restricting obligations, warranties, and liability as provided in this clause 9, but in no other respects and for no other purpose. 
+10. TECHNICAL SUPPORT.  Nokia has no obligation to furnish You with technical support unless separately agreed in writing between You and Nokia.
+ 
+11. EXPORT CONTROL. The Software, including technical data, includes cryptographic software subject to export controls under the U.S. Export Administration Regulations ("EAR") and may be subject to import or export controls in other countries. The EAR prohibits the use of the Software and technical data by a Government End User, as defined hereafter, without a license from the U.S. government. A Government End User is defined in Part 772 of the EAR as "any foreign central, regional, or local government department, agency, or other entity performing governmental functions; including governmental research institutions, governmental corporations, or their separate business units (as defined in part 772 of the EAR) which are engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List, and international governmental organizations. This term does not include: utilities (telecommunications companies and Internet service providers; banks and financial institutions; transportation; broadcast or entertainment; educational organizations; civil health and medical organizations; retail or wholesale firms; and manufacturing or industrial entities not engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List.)" You agree to strictly comply with all applicable import and export regulations and acknowledge that You have the responsibility to obtain licenses to export, re-export, transfer, or import the Software. You further represent that You are not a Government End User as defined above, and You will not transfer the Software to any Government End User without a license.
+ 
+12. NOTICES.  All notices and return of the Software and Documentation should be delivered to:  
+ 
+NOKIA CORPORATION
+P.O. Box 100 
+FIN-00045 NOKIA GROUP
+FINLAND
+ 
+13.  APPLICABLE LAW & GENERAL PROVISIONS.
+ 
+This Agreement is governed by the laws of Finland.  All disputes arising from or relating to this Agreement shall be settled by a single arbitrator appointed by the Central Chamber of Commerce of Finland. The arbitration procedure shall take place in Helsinki, Finland in the English language. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. This Agreement may only be modified in writing by an authorized officer of Nokia.
+ 
+This is the entire agreement between Nokia and You relating to the Software, and it supersedes any prior representations, discussions, undertakings, end-user agreements, communications, or advertising relating to the Software.
+ 
+PLEASE SUBMIT ANY ACCOMPANYING REGISTRATION FORMS TO RECEIVE REGISTRATION BENEFITS WHERE APPLICABLE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/keycaptureex.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,61 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = app
+TARGET = KeyCaptureEx
+
+QT        += core gui
+
+SOURCES = \
+    main.cpp \
+    mapping.cpp \
+    keycapturetestapp.cpp \
+    capturerequest.cpp
+    
+HEADERS = \
+    keycapturetestapp.h \
+    mybutton.h \
+    mapping.h \
+    txlogger.h \
+    capturerequest.h
+
+symbian { 
+	TARGET.EPOCSTACKSIZE = 0x14000
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.CAPABILITY = ALL -TCB
+    
+    MMP_RULES += EXPORTUNFROZEN
+
+    LIBS += -lflogger \
+        -lxqkeycapture
+    
+    INCLUDEPATH += /epoc32/include \
+           ../keycapture/
+    
+}
+
+# enable for debug traces
+#DEFINES += ENABLETRACE
+#DEFINES += TRACE_FILE
+
+symbian: {
+    license.depends = "\"install.txt\" - \"\", FILETEXT, TEXTEXIT"
+    DEPLOYMENT += license
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/keycapturetestapp.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,328 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QDebug>
+#include <QApplication>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QVBoxLayout>
+#include <QStackedWidget>
+#include <QImageReader>
+#include <QDebug>
+#include <QTimer>
+#include <QPushButton>
+#include <QLineEdit>
+#include <QDebug>
+#include <QString>
+#include <QCheckBox>
+#include <QPlainTextEdit>
+#include <QString>
+#include <QMenu>
+#include <QMenuBar>
+#include <QAction>
+#include <QEvent>
+
+
+#include <QFont>
+
+#include "keycapturetestapp.h"
+#include "txlogger.h"
+
+#include "mapping.h"
+#include "capturerequest.h"
+
+KeyCaptureTestApp::KeyCaptureTestApp( QWidget *parent) : QMainWindow(parent)
+{   
+    TX_ENTRY
+    
+    qApp->installEventFilter(this);
+    QCoreApplication::instance()->installEventFilter(this);
+    
+    
+	setWindowTitle(tr("KeyCaptureTestApp"));
+    
+    mKeyCapture = new XQKeyCapture();
+    
+    mKeysMap.insert("Up", Qt::Key_Up);
+    mKeysMap.insert("Down", Qt::Key_Down);
+    mKeysMap.insert("Menu", Qt::Key_Menu);
+    
+    
+    mKeysMenu = new QMenu(this);
+    foreach (QString value, mKeysMap.keys())
+        mKeysMenu->addAction(value)->setData( QVariant(value) );
+    
+    mLongFlagsMap.insert("LongNormal", XQKeyCapture::LongNormal);
+    mLongFlagsMap.insert("LongRepeatEvents", XQKeyCapture::LongRepeatEvents);
+    mLongFlagsMap.insert("LongShortEventImmediately", XQKeyCapture::LongShortEventImmediately);
+    mLongFlagsMap.insert("LongWaitNotApplicable", XQKeyCapture::LongWaitNotApplicable);
+    mLongFlagsMap.insert("LongWaitShort", XQKeyCapture::LongWaitShort);
+    
+    mLongFlagsMenu = new QMenu(this);
+    foreach (QString value, mLongFlagsMap.keys())
+        mLongFlagsMenu->addAction(value)->setData( QVariant(value) );
+    
+	QMenu *captureMenu = menuBar()->addMenu(QString("Capture"));
+    connect(captureMenu, SIGNAL(triggered(QAction*)), this, SLOT(triggered(QAction*)));
+	captureMenu->addAction(QString("Key"))->setData( QVariant(1) );
+	captureMenu->addAction(QString("Long Key"))->setData( QVariant(2) );
+	captureMenu->addAction(QString("Up and Down Key"))->setData( QVariant(3) );
+
+	QMenu *cancelCaptureMenu = menuBar()->addMenu(QString("Cancel Capture"));
+    connect(cancelCaptureMenu, SIGNAL(triggered(QAction*)), this, SLOT(triggered(QAction*)));
+	cancelCaptureMenu->addAction(QString("Cancel Key"))->setData( QVariant(4) );
+	cancelCaptureMenu->addAction(QString("Cancel Long Key"))->setData( QVariant(5) );
+	cancelCaptureMenu->addAction(QString("Cancel Up and Down Key"))->setData( QVariant(6) );
+
+    QMenu *remoteMenu = menuBar()->addMenu(QString("Remote"));
+
+    // *** remcon ***
+    
+    remoteAllOn = remoteMenu->addAction(QString("Turn on all"));
+    remoteAllOff = remoteMenu->addAction(QString("Turn off all"));
+    
+    toggleRemoteBasic = remoteMenu->addAction(QString("Basic Remote"));
+    toggleRemoteBasic->setCheckable(true);
+    
+    toggleRemoteCallHandlingEx = remoteMenu->addAction(QString("Call Handl. Ex Remote"));
+    toggleRemoteCallHandlingEx->setCheckable(true);
+    
+    toggleRemoteExtEvents = remoteMenu->addAction(QString("Extended Remote Events"));
+    toggleRemoteExtEvents->setCheckable(true);
+
+    connect(toggleRemoteBasic, SIGNAL(toggled(bool)), this, SLOT(enableRemBasic(bool)));
+    connect(toggleRemoteCallHandlingEx, SIGNAL(toggled(bool)), this, SLOT(enableRemCallHandlingEx(bool)));
+    connect(toggleRemoteExtEvents, SIGNAL(toggled(bool)), this, SLOT(enableRemoteExtEvents(bool)));
+
+    connect(remoteAllOn, SIGNAL(triggered(bool)), this, SLOT(remoteAll(bool)));
+    connect(remoteAllOff, SIGNAL(triggered(bool)), this, SLOT(remoteNone(bool)));
+    
+    // *** utilities ***
+
+    connect(menuBar()->addAction(QString("Clear Log")), SIGNAL(triggered()), this, SLOT(cleanLog()));
+    connect(menuBar()->addAction(QString("Exit")), SIGNAL(triggered()), qApp, SLOT(quit()));
+
+    QWidget *window = new QWidget;
+    QVBoxLayout* layout = new QVBoxLayout;
+
+	mTextArea = new QPlainTextEdit("");
+	mTextArea->setTextInteractionFlags(Qt::NoTextInteraction);
+	QFont font = QFont(mTextArea->font());
+	font.setPixelSize(10);
+	mTextArea->setFont(font);
+	
+	layout->addWidget(mTextArea);
+	
+    window->setLayout(layout);
+    setCentralWidget(window);
+    window->show();;
+
+    mappingPtr = new Mapping();
+    
+    TX_EXIT
+}
+	
+KeyCaptureTestApp::~KeyCaptureTestApp()
+{
+    delete mappingPtr;
+}
+
+void KeyCaptureTestApp::triggered(QAction* aAction)
+{
+    CaptureRequest request(mappingPtr);
+    if (!request.setType(aAction)){
+        return;
+    }
+    if (!request.setKey(mKeysMenu->exec(), &mKeysMap)){
+        return;
+    }
+//TODO: add modifiersMap selection menu;
+//TODO: add modifier selection menu;
+    if ( request.mRequestType == CaptureRequest::RequestTypeLongKey || request.mRequestType == CaptureRequest::RequestTypeCancelLongKey){
+        if (!request.setLongFlags(mLongFlagsMenu->exec(), &mLongFlagsMap)){
+            return;
+        }
+    }
+    procesAction(request);
+}
+
+void KeyCaptureTestApp::cleanLog()
+{
+    mTextArea->setPlainText("");
+}
+
+void KeyCaptureTestApp::procesAction(CaptureRequest request)
+{
+    TX_ENTRY
+    switch (request.mRequestType) {
+        case CaptureRequest::RequestTypeKey :
+            mKeyCapture->captureKey(request.mKey, request.mModifiersMap, request.mModifier );
+            addTextLine(QString("%1:%2\n").arg(request.toString()).arg(mKeyCapture->errorString()));
+            break;
+        case CaptureRequest::RequestTypeLongKey :
+            mKeyCapture->captureLongKey(request.mKey, request.mModifiersMap, request.mModifier, request.mLongFlags);
+            addTextLine(QString("%1:%2\n").arg(request.toString()).arg(mKeyCapture->errorString()));
+            break;
+        case CaptureRequest::RequestTypeKeyUpAndDowns :
+            mKeyCapture->captureKeyUpAndDowns(request.mKey, request.mModifiersMap, request.mModifier );
+            addTextLine(QString("%1:%2\n").arg(request.toString()).arg(mKeyCapture->errorString()));
+            break;
+        case CaptureRequest::RequestTypeCancelKey :
+            mKeyCapture->cancelCaptureKey(request.mKey, request.mModifiersMap, request.mModifier );
+            addTextLine(QString("%1:%2\n").arg(request.toString()).arg(mKeyCapture->errorString()));
+            break;
+        case CaptureRequest::RequestTypeCancelLongKey :
+            mKeyCapture->cancelCaptureLongKey(request.mKey, request.mModifiersMap, request.mModifier, request.mLongFlags);
+            addTextLine(QString("%1:%2\n").arg(request.toString()).arg(mKeyCapture->errorString()));
+            break;
+        case CaptureRequest::RequestTypeCancelKeyUpAndDowns :
+            mKeyCapture->cancelCaptureKeyUpAndDowns(request.mKey, request.mModifiersMap, request.mModifier );
+            addTextLine(QString("%1:%2\n").arg(request.toString()).arg(mKeyCapture->errorString()));
+            break;
+        default:
+            break;
+    }
+
+    TX_EXIT    
+}
+
+void KeyCaptureTestApp::addTextLine(QString aText)
+{
+    TX_LOG_ARGS( QString("aText=%1").arg(aText));
+	if ( !aText.endsWith("\n"))
+		aText = aText + "\n";
+	QString msg = mTextArea->toPlainText();
+	msg = aText + msg;
+	mTextArea->setPlainText(msg);
+}
+
+bool KeyCaptureTestApp::event(QEvent *ev)
+{
+    processEvent(ev);
+    return QMainWindow::event(ev);
+}
+
+bool KeyCaptureTestApp::eventFilter(QObject *o, QEvent *ev)
+{
+    processEvent(ev);
+    return QMainWindow::eventFilter(o, ev);
+}
+
+void KeyCaptureTestApp::processEvent(QEvent *ev)
+{
+    if (ev){
+        if (ev->type() == QEvent::KeyPress){
+           QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev);
+           QString keyName = mappingPtr->name(static_cast<Qt::Key>(keyEvent->key())); 
+           
+           addTextLine(QString("KeyPress:%1\n").arg(keyName));
+        } else if (ev->type() == QEvent::KeyRelease){
+           QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev);
+           QString keyName = mappingPtr->name(static_cast<Qt::Key>(keyEvent->key()));
+           
+           addTextLine(QString("KeyRelease:%1\n").arg(keyName));
+        } else if (ev->type() == XQKeyCapture::remoteEventType_KeyPress()){
+           QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev);
+                      
+           QString keyName = mappingPtr->name(static_cast<Qt::Key>(keyEvent->key()));
+                      
+           addTextLine(QString("KeyPress:%1\n").arg(keyName));
+           addTextLine(QString("Native virtual key:%1\n").arg((int)keyEvent->nativeVirtualKey()));
+        } else if (ev->type() == XQKeyCapture::remoteEventType_KeyRelease()){
+           QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev);
+                      
+           QString keyName = mappingPtr->name(static_cast<Qt::Key>(keyEvent->key()));
+                      
+           addTextLine(QString("KeyRelease:%1\n").arg(keyName));
+           addTextLine(QString("Native virtual key:%1\n").arg((int)keyEvent->nativeVirtualKey()));
+        }
+    }
+}
+
+void KeyCaptureTestApp::enableRemBasic(bool enable)
+{
+    if (enable) {
+        addTextLine("Remote Basic enabled");
+        QFlags<XQKeyCapture::CapturingFlag> flags = XQKeyCapture::CaptureNone;
+        if (toggleRemoteExtEvents->isChecked())
+            flags = XQKeyCapture::CaptureEnableRemoteExtEvents;
+        if (toggleRemoteCallHandlingEx->isChecked())
+            flags |= XQKeyCapture::CaptureCallHandlingExt;
+        mKeyCapture->captureRemoteKeys(flags |= XQKeyCapture::CaptureBasic);
+    } else {
+        addTextLine("Remote Basic disabled");
+        mKeyCapture->cancelCaptureRemoteKeys(XQKeyCapture::CaptureBasic);
+    }
+}
+
+void KeyCaptureTestApp::enableRemCallHandlingEx(bool enable)
+{
+    if (enable) {
+        addTextLine("Remote Call Handling Ext. enabled");
+        QFlags<XQKeyCapture::CapturingFlag> flags = XQKeyCapture::CaptureNone;
+        if (toggleRemoteExtEvents->isChecked())
+            flags = XQKeyCapture::CaptureEnableRemoteExtEvents;
+        if (toggleRemoteBasic->isChecked())
+            flags |= XQKeyCapture::CaptureBasic;
+        mKeyCapture->captureRemoteKeys(flags | XQKeyCapture::CaptureCallHandlingExt);
+    } else {
+        addTextLine("Remote Call Handling Ext. disabled");
+        mKeyCapture->cancelCaptureRemoteKeys(XQKeyCapture::CaptureCallHandlingExt);
+    }
+}
+
+void KeyCaptureTestApp::enableRemoteExtEvents(bool enable)
+{
+    if (enable) {
+        addTextLine("Remote Events Ext. enabled");
+        QFlags<XQKeyCapture::CapturingFlag> flags = XQKeyCapture::CaptureNone;
+        if (toggleRemoteCallHandlingEx->isChecked())
+            flags = XQKeyCapture::CaptureCallHandlingExt;
+        if (toggleRemoteBasic->isChecked())
+            flags |= XQKeyCapture::CaptureBasic;
+        mKeyCapture->captureRemoteKeys(flags | XQKeyCapture::CaptureEnableRemoteExtEvents);
+    } else {
+        addTextLine("Remote Events Ext. disabled");
+        mKeyCapture->cancelCaptureRemoteKeys(XQKeyCapture::CaptureEnableRemoteExtEvents);
+    }
+}
+
+void KeyCaptureTestApp::remoteAll(bool enable)
+{
+    Q_UNUSED(enable);
+    toggleRemoteBasic->setChecked(true);
+    toggleRemoteCallHandlingEx->setChecked(true);
+    toggleRemoteExtEvents->setChecked(true);
+    addTextLine("Remote: enable all");
+    mKeyCapture->captureRemoteKeys(XQKeyCapture::CaptureCallHandlingExt |  XQKeyCapture::CaptureBasic | 
+            XQKeyCapture::CaptureEnableRemoteExtEvents);
+}
+
+void KeyCaptureTestApp::remoteNone(bool enable)
+{
+    Q_UNUSED(enable);
+    toggleRemoteBasic->setChecked(false);
+    toggleRemoteCallHandlingEx->setChecked(false);
+    toggleRemoteExtEvents->setChecked(false);
+    addTextLine("Remote: disable all");
+    mKeyCapture->cancelCaptureRemoteKeys(XQKeyCapture::CaptureCallHandlingExt | XQKeyCapture::CaptureBasic | 
+            XQKeyCapture::CaptureEnableRemoteExtEvents);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/keycapturetestapp.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef KeyCaptureTestApp_H
+#define KEYCAPTUREMAINWINDOW_H
+
+#include <QMainWindow>
+#include <QMap>
+#include <XQKeyCapture>
+
+#include "mapping.h"
+
+class QPlainTextEdit;
+class QAction;
+class QWidget;
+class QMenu;
+class CaptureRequest;
+
+class KeyCaptureTestApp : public QMainWindow
+{
+Q_OBJECT
+public:
+    KeyCaptureTestApp(QWidget *parent = 0);
+	~KeyCaptureTestApp();
+	void addTextLine(QString);
+	
+    bool event(QEvent *event);    
+    bool eventFilter(QObject *, QEvent *);
+public slots:
+    void triggered(QAction* aAction);
+	void cleanLog();
+	
+	void enableRemBasic(bool);
+    void enableRemCallHandlingEx(bool);
+    void enableRemoteExtEvents(bool);
+	
+    void remoteAll(bool enable);
+    void remoteNone(bool enable);
+
+private:
+    void procesAction(CaptureRequest request);
+    void processEvent(QEvent *event);
+private:	
+    QPlainTextEdit *mTextArea;
+
+    XQKeyCapture *mKeyCapture;
+    
+    QAction *toggleRemoteBasic;
+    QAction *toggleRemoteCallHandlingEx;
+    QAction *toggleRemoteExtEvents;
+    
+    QAction *remoteAllOn;
+    QAction *remoteAllOff;
+    
+    QMap<QString, Qt::Key> mKeysMap;
+    QMenu* mKeysMenu;
+    
+    QMap<QString, XQKeyCapture::LongFlags> mLongFlagsMap;
+    QMenu* mLongFlagsMenu;
+  
+    Mapping *mappingPtr;
+};
+
+#endif // KEYCAPTUREMAINWINDOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QApplication>
+
+#include "keycapturetestapp.h"
+#include "txlogger.h"
+
+TX_MAIN(argc, argv) {
+    TX_STATIC_ENTRY
+	
+    QApplication app(argc, argv);
+
+	KeyCaptureTestApp* tester = new KeyCaptureTestApp();
+    tester->showMaximized();
+
+	int rv = app.exec();
+    TX_STATIC_EXIT
+    return rv;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/mapping.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,460 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "mapping.h"
+
+#include <QtCore>
+#include <QMap>
+#include <QString>
+
+Mapping::Mapping() 
+{
+}
+
+void Mapping::init()
+{
+    mapping.insert(Qt::Key_Escape, "Qt::Key_Escape");
+    mapping.insert(Qt::Key_Tab, "Qt::Key_Tab");
+    mapping.insert(Qt::Key_Backtab, "Qt::Key_Backtab");
+    mapping.insert(Qt::Key_Backspace, "Qt::Key_Backspace");
+    mapping.insert(Qt::Key_Return, "Qt::Key_Return");
+    mapping.insert(Qt::Key_Enter, "Qt::Key_Enter");
+    mapping.insert(Qt::Key_Insert, "Qt::Key_Insert");
+    mapping.insert(Qt::Key_Delete, "Qt::Key_Delete");
+    mapping.insert(Qt::Key_Pause, "Qt::Key_Pause");
+    mapping.insert(Qt::Key_Print, "Qt::Key_Print");
+    mapping.insert(Qt::Key_SysReq, "Qt::Key_SysReq");
+    mapping.insert(Qt::Key_Clear, "Qt::Key_Clear");
+    mapping.insert(Qt::Key_Home, "Qt::Key_Home");
+    mapping.insert(Qt::Key_End, "Qt::Key_End");
+    mapping.insert(Qt::Key_Left, "Qt::Key_Left");
+    mapping.insert(Qt::Key_Up, "Qt::Key_Up");
+    mapping.insert(Qt::Key_Right, "Qt::Key_Right");
+    mapping.insert(Qt::Key_Down, "Qt::Key_Down");
+    mapping.insert(Qt::Key_PageUp, "Qt::Key_PageUp");
+    mapping.insert(Qt::Key_PageDown, "Qt::Key_PageDown");
+    mapping.insert(Qt::Key_Shift, "Qt::Key_Shift");
+    mapping.insert(Qt::Key_Control, "Qt::Key_Control");
+    mapping.insert(Qt::Key_Meta, "Qt::Key_Meta");
+    mapping.insert(Qt::Key_Alt, "Qt::Key_Alt");
+    mapping.insert(Qt::Key_CapsLock, "Qt::Key_CapsLock");
+    mapping.insert(Qt::Key_NumLock, "Qt::Key_NumLock");
+    mapping.insert(Qt::Key_ScrollLock, "Qt::Key_ScrollLock");
+    mapping.insert(Qt::Key_F1, "Qt::Key_F1");
+    mapping.insert(Qt::Key_F2, "Qt::Key_F2");
+    mapping.insert(Qt::Key_F3, "Qt::Key_F3");
+    mapping.insert(Qt::Key_F4, "Qt::Key_F4");
+    mapping.insert(Qt::Key_F5, "Qt::Key_F5");
+    mapping.insert(Qt::Key_F6, "Qt::Key_F6");
+    mapping.insert(Qt::Key_F7, "Qt::Key_F7");
+    mapping.insert(Qt::Key_F8, "Qt::Key_F8");
+    mapping.insert(Qt::Key_F9, "Qt::Key_F9");
+    mapping.insert(Qt::Key_F10, "Qt::Key_F10");
+    mapping.insert(Qt::Key_F11, "Qt::Key_F11");
+    mapping.insert(Qt::Key_F12, "Qt::Key_F12");
+    mapping.insert(Qt::Key_F13, "Qt::Key_F13");
+    mapping.insert(Qt::Key_F14, "Qt::Key_F14");
+    mapping.insert(Qt::Key_F15, "Qt::Key_F15");
+    mapping.insert(Qt::Key_F16, "Qt::Key_F16");
+    mapping.insert(Qt::Key_F17, "Qt::Key_F17");
+    mapping.insert(Qt::Key_F18, "Qt::Key_F18");
+    mapping.insert(Qt::Key_F19, "Qt::Key_F19");
+    mapping.insert(Qt::Key_F20, "Qt::Key_F20");
+    mapping.insert(Qt::Key_F21, "Qt::Key_F21");
+    mapping.insert(Qt::Key_F22, "Qt::Key_F22");
+    mapping.insert(Qt::Key_F23, "Qt::Key_F23");
+    mapping.insert(Qt::Key_F24, "Qt::Key_F24");
+    mapping.insert(Qt::Key_F25, "Qt::Key_F25");
+    mapping.insert(Qt::Key_F26, "Qt::Key_F26");
+    mapping.insert(Qt::Key_F27, "Qt::Key_F27");
+    mapping.insert(Qt::Key_F28, "Qt::Key_F28");
+    mapping.insert(Qt::Key_F29, "Qt::Key_F29");
+    mapping.insert(Qt::Key_F30, "Qt::Key_F30");
+    mapping.insert(Qt::Key_F31, "Qt::Key_F31");
+    mapping.insert(Qt::Key_F32, "Qt::Key_F32");
+    mapping.insert(Qt::Key_F33, "Qt::Key_F33");
+    mapping.insert(Qt::Key_F34, "Qt::Key_F34");
+    mapping.insert(Qt::Key_F35, "Qt::Key_F35");
+    mapping.insert(Qt::Key_Super_L, "Qt::Key_Super_L");
+    mapping.insert(Qt::Key_Super_R, "Qt::Key_Super_R");
+    mapping.insert(Qt::Key_Menu, "Qt::Key_Menu");
+    mapping.insert(Qt::Key_Hyper_L, "Qt::Key_Hyper_L");
+    mapping.insert(Qt::Key_Hyper_R, "Qt::Key_Hyper_R");
+    mapping.insert(Qt::Key_Help, "Qt::Key_Help");
+    mapping.insert(Qt::Key_Direction_L, "Qt::Key_Direction_L");
+    mapping.insert(Qt::Key_Direction_R, "Qt::Key_Direction_R");
+    mapping.insert(Qt::Key_Space, "Qt::Key_Space");
+    mapping.insert(Qt::Key_Any, "Qt::Key_Any");
+    mapping.insert(Qt::Key_Exclam, "Qt::Key_Exclam");
+    mapping.insert(Qt::Key_QuoteDbl, "Qt::Key_QuoteDbl");
+    mapping.insert(Qt::Key_NumberSign, "Qt::Key_NumberSign");
+    mapping.insert(Qt::Key_Dollar, "Qt::Key_Dollar");
+    mapping.insert(Qt::Key_Percent, "Qt::Key_Percent");
+    mapping.insert(Qt::Key_Ampersand, "Qt::Key_Ampersand");
+    mapping.insert(Qt::Key_Apostrophe, "Qt::Key_Apostrophe");
+    mapping.insert(Qt::Key_ParenLeft, "Qt::Key_ParenLeft");
+    mapping.insert(Qt::Key_ParenRight, "Qt::Key_ParenRight");
+    mapping.insert(Qt::Key_Asterisk, "Qt::Key_Asterisk");
+    mapping.insert(Qt::Key_Plus, "Qt::Key_Plus");
+    mapping.insert(Qt::Key_Comma, "Qt::Key_Comma");
+    mapping.insert(Qt::Key_Minus, "Qt::Key_Minus");
+    mapping.insert(Qt::Key_Period, "Qt::Key_Period");
+    mapping.insert(Qt::Key_Slash, "Qt::Key_Slash");
+    mapping.insert(Qt::Key_0, "Qt::Key_0");
+    mapping.insert(Qt::Key_1, "Qt::Key_1");
+    mapping.insert(Qt::Key_2, "Qt::Key_2");
+    mapping.insert(Qt::Key_3, "Qt::Key_3");
+    mapping.insert(Qt::Key_4, "Qt::Key_4");
+    mapping.insert(Qt::Key_5, "Qt::Key_5");
+    mapping.insert(Qt::Key_6, "Qt::Key_6");
+    mapping.insert(Qt::Key_7, "Qt::Key_7");
+    mapping.insert(Qt::Key_8, "Qt::Key_8");
+    mapping.insert(Qt::Key_9, "Qt::Key_9");
+    mapping.insert(Qt::Key_Colon, "Qt::Key_Colon");
+    mapping.insert(Qt::Key_Semicolon, "Qt::Key_Semicolon");
+    mapping.insert(Qt::Key_Less, "Qt::Key_Less");
+    mapping.insert(Qt::Key_Equal, "Qt::Key_Equal");
+    mapping.insert(Qt::Key_Greater, "Qt::Key_Greater");
+    mapping.insert(Qt::Key_Question, "Qt::Key_Question");
+    mapping.insert(Qt::Key_At, "Qt::Key_At");
+    mapping.insert(Qt::Key_A, "Qt::Key_A");
+    mapping.insert(Qt::Key_B, "Qt::Key_B");
+    mapping.insert(Qt::Key_C, "Qt::Key_C");
+    mapping.insert(Qt::Key_D, "Qt::Key_D");
+    mapping.insert(Qt::Key_E, "Qt::Key_E");
+    mapping.insert(Qt::Key_F, "Qt::Key_F");
+    mapping.insert(Qt::Key_G, "Qt::Key_G");
+    mapping.insert(Qt::Key_H, "Qt::Key_H");
+    mapping.insert(Qt::Key_I, "Qt::Key_I");
+    mapping.insert(Qt::Key_J, "Qt::Key_J");
+    mapping.insert(Qt::Key_K, "Qt::Key_K");
+    mapping.insert(Qt::Key_L, "Qt::Key_L");
+    mapping.insert(Qt::Key_M, "Qt::Key_M");
+    mapping.insert(Qt::Key_N, "Qt::Key_N");
+    mapping.insert(Qt::Key_O, "Qt::Key_O");
+    mapping.insert(Qt::Key_P, "Qt::Key_P");
+    mapping.insert(Qt::Key_Q, "Qt::Key_Q");
+    mapping.insert(Qt::Key_R, "Qt::Key_R");
+    mapping.insert(Qt::Key_S, "Qt::Key_S");
+    mapping.insert(Qt::Key_T, "Qt::Key_T");
+    mapping.insert(Qt::Key_U, "Qt::Key_U");
+    mapping.insert(Qt::Key_V, "Qt::Key_V");
+    mapping.insert(Qt::Key_W, "Qt::Key_W");
+    mapping.insert(Qt::Key_X, "Qt::Key_X");
+    mapping.insert(Qt::Key_Y, "Qt::Key_Y");
+    mapping.insert(Qt::Key_Z, "Qt::Key_Z");
+    mapping.insert(Qt::Key_BracketLeft, "Qt::Key_BracketLeft");
+    mapping.insert(Qt::Key_Backslash, "Qt::Key_Backslash");
+    mapping.insert(Qt::Key_BracketRight, "Qt::Key_BracketRight");
+    mapping.insert(Qt::Key_AsciiCircum, "Qt::Key_AsciiCircum");
+    mapping.insert(Qt::Key_Underscore, "Qt::Key_Underscore");
+    mapping.insert(Qt::Key_QuoteLeft, "Qt::Key_QuoteLeft");
+    mapping.insert(Qt::Key_BraceLeft, "Qt::Key_BraceLeft");
+    mapping.insert(Qt::Key_Bar, "Qt::Key_Bar");
+    mapping.insert(Qt::Key_BraceRight, "Qt::Key_BraceRight");
+    mapping.insert(Qt::Key_AsciiTilde, "Qt::Key_AsciiTilde");
+    mapping.insert(Qt::Key_nobreakspace, "Qt::Key_nobreakspace");
+    mapping.insert(Qt::Key_exclamdown, "Qt::Key_exclamdown");
+    mapping.insert(Qt::Key_cent, "Qt::Key_cent");
+    mapping.insert(Qt::Key_sterling, "Qt::Key_sterling");
+    mapping.insert(Qt::Key_currency, "Qt::Key_currency");
+    mapping.insert(Qt::Key_yen, "Qt::Key_yen");
+    mapping.insert(Qt::Key_brokenbar, "Qt::Key_brokenbar");
+    mapping.insert(Qt::Key_section, "Qt::Key_section");
+    mapping.insert(Qt::Key_diaeresis, "Qt::Key_diaeresis");
+    mapping.insert(Qt::Key_copyright, "Qt::Key_copyright");
+    mapping.insert(Qt::Key_ordfeminine, "Qt::Key_ordfeminine");
+    mapping.insert(Qt::Key_guillemotleft, "Qt::Key_guillemotleft");
+    mapping.insert(Qt::Key_notsign, "Qt::Key_notsign");
+    mapping.insert(Qt::Key_hyphen, "Qt::Key_hyphen");
+    mapping.insert(Qt::Key_registered, "Qt::Key_registered");
+    mapping.insert(Qt::Key_macron, "Qt::Key_macron");
+    mapping.insert(Qt::Key_degree, "Qt::Key_degree");
+    mapping.insert(Qt::Key_plusminus, "Qt::Key_plusminus");
+    mapping.insert(Qt::Key_twosuperior, "Qt::Key_twosuperior");
+    mapping.insert(Qt::Key_threesuperior, "Qt::Key_threesuperior");
+    mapping.insert(Qt::Key_acute, "Qt::Key_acute");
+    mapping.insert(Qt::Key_mu, "Qt::Key_mu");
+    mapping.insert(Qt::Key_paragraph, "Qt::Key_paragraph");
+    mapping.insert(Qt::Key_periodcentered, "Qt::Key_periodcentered");
+    mapping.insert(Qt::Key_cedilla, "Qt::Key_cedilla");
+    mapping.insert(Qt::Key_onesuperior, "Qt::Key_onesuperior");
+    mapping.insert(Qt::Key_masculine, "Qt::Key_masculine");
+    mapping.insert(Qt::Key_guillemotright, "Qt::Key_guillemotright");
+    mapping.insert(Qt::Key_onequarter, "Qt::Key_onequarter");
+    mapping.insert(Qt::Key_onehalf, "Qt::Key_onehalf");
+    mapping.insert(Qt::Key_threequarters, "Qt::Key_threequarters");
+    mapping.insert(Qt::Key_questiondown, "Qt::Key_questiondown");
+    mapping.insert(Qt::Key_Agrave, "Qt::Key_Agrave");
+    mapping.insert(Qt::Key_Aacute, "Qt::Key_Aacute");
+    mapping.insert(Qt::Key_Acircumflex, "Qt::Key_Acircumflex");
+    mapping.insert(Qt::Key_Atilde, "Qt::Key_Atilde");
+    mapping.insert(Qt::Key_Adiaeresis, "Qt::Key_Adiaeresis");
+    mapping.insert(Qt::Key_Aring, "Qt::Key_Aring");
+    mapping.insert(Qt::Key_AE, "Qt::Key_AE");
+    mapping.insert(Qt::Key_Ccedilla, "Qt::Key_Ccedilla");
+    mapping.insert(Qt::Key_Egrave, "Qt::Key_Egrave");
+    mapping.insert(Qt::Key_Eacute, "Qt::Key_Eacute");
+    mapping.insert(Qt::Key_Ecircumflex, "Qt::Key_Ecircumflex");
+    mapping.insert(Qt::Key_Ediaeresis, "Qt::Key_Ediaeresis");
+    mapping.insert(Qt::Key_Igrave, "Qt::Key_Igrave");
+    mapping.insert(Qt::Key_Iacute, "Qt::Key_Iacute");
+    mapping.insert(Qt::Key_Icircumflex, "Qt::Key_Icircumflex");
+    mapping.insert(Qt::Key_Idiaeresis, "Qt::Key_Idiaeresis");
+    mapping.insert(Qt::Key_ETH, "Qt::Key_ETH");
+    mapping.insert(Qt::Key_Ntilde, "Qt::Key_Ntilde");
+    mapping.insert(Qt::Key_Ograve, "Qt::Key_Ograve");
+    mapping.insert(Qt::Key_Oacute, "Qt::Key_Oacute");
+    mapping.insert(Qt::Key_Ocircumflex, "Qt::Key_Ocircumflex");
+    mapping.insert(Qt::Key_Otilde, "Qt::Key_Otilde");
+    mapping.insert(Qt::Key_Odiaeresis, "Qt::Key_Odiaeresis");
+    mapping.insert(Qt::Key_multiply, "Qt::Key_multiply");
+    mapping.insert(Qt::Key_Ooblique, "Qt::Key_Ooblique");
+    mapping.insert(Qt::Key_Ugrave, "Qt::Key_Ugrave");
+    mapping.insert(Qt::Key_Uacute, "Qt::Key_Uacute");
+    mapping.insert(Qt::Key_Ucircumflex, "Qt::Key_Ucircumflex");
+    mapping.insert(Qt::Key_Udiaeresis, "Qt::Key_Udiaeresis");
+    mapping.insert(Qt::Key_Yacute, "Qt::Key_Yacute");
+    mapping.insert(Qt::Key_THORN, "Qt::Key_THORN");
+    mapping.insert(Qt::Key_ssharp, "Qt::Key_ssharp");
+    mapping.insert(Qt::Key_division, "Qt::Key_division");
+    mapping.insert(Qt::Key_ydiaeresis, "Qt::Key_ydiaeresis");
+    mapping.insert(Qt::Key_AltGr, "Qt::Key_AltGr");
+    mapping.insert(Qt::Key_Multi_key, "Qt::Key_Multi_key");
+    mapping.insert(Qt::Key_Codeinput, "Qt::Key_Codeinput");
+    mapping.insert(Qt::Key_SingleCandidate, "Qt::Key_SingleCandidate");
+    mapping.insert(Qt::Key_MultipleCandidate, "Qt::Key_MultipleCandidate");
+    mapping.insert(Qt::Key_PreviousCandidate, "Qt::Key_PreviousCandidate");
+    mapping.insert(Qt::Key_Mode_switch, "Qt::Key_Mode_switch");
+    mapping.insert(Qt::Key_Kanji, "Qt::Key_Kanji");
+    mapping.insert(Qt::Key_Muhenkan, "Qt::Key_Muhenkan");
+    mapping.insert(Qt::Key_Henkan, "Qt::Key_Henkan");
+    mapping.insert(Qt::Key_Romaji, "Qt::Key_Romaji");
+    mapping.insert(Qt::Key_Hiragana, "Qt::Key_Hiragana");
+    mapping.insert(Qt::Key_Katakana, "Qt::Key_Katakana");
+    mapping.insert(Qt::Key_Hiragana_Katakana, "Qt::Key_Hiragana_Katakana");
+    mapping.insert(Qt::Key_Zenkaku, "Qt::Key_Zenkaku");
+    mapping.insert(Qt::Key_Hankaku, "Qt::Key_Hankaku");
+    mapping.insert(Qt::Key_Zenkaku_Hankaku, "Qt::Key_Zenkaku_Hankaku");
+    mapping.insert(Qt::Key_Touroku, "Qt::Key_Touroku");
+    mapping.insert(Qt::Key_Massyo, "Qt::Key_Massyo");
+    mapping.insert(Qt::Key_Kana_Lock, "Qt::Key_Kana_Lock");
+    mapping.insert(Qt::Key_Kana_Shift, "Qt::Key_Kana_Shift");
+    mapping.insert(Qt::Key_Eisu_Shift, "Qt::Key_Eisu_Shift");
+    mapping.insert(Qt::Key_Eisu_toggle, "Qt::Key_Eisu_toggle");
+    mapping.insert(Qt::Key_Hangul, "Qt::Key_Hangul");
+    mapping.insert(Qt::Key_Hangul_Start, "Qt::Key_Hangul_Start");
+    mapping.insert(Qt::Key_Hangul_End, "Qt::Key_Hangul_End");
+    mapping.insert(Qt::Key_Hangul_Hanja, "Qt::Key_Hangul_Hanja");
+    mapping.insert(Qt::Key_Hangul_Jamo, "Qt::Key_Hangul_Jamo");
+    mapping.insert(Qt::Key_Hangul_Romaja, "Qt::Key_Hangul_Romaja");
+    mapping.insert(Qt::Key_Hangul_Jeonja, "Qt::Key_Hangul_Jeonja");
+    mapping.insert(Qt::Key_Hangul_Banja, "Qt::Key_Hangul_Banja");
+    mapping.insert(Qt::Key_Hangul_PreHanja, "Qt::Key_Hangul_PreHanja");
+    mapping.insert(Qt::Key_Hangul_PostHanja, "Qt::Key_Hangul_PostHanja");
+    mapping.insert(Qt::Key_Hangul_Special, "Qt::Key_Hangul_Special");
+    mapping.insert(Qt::Key_Dead_Grave, "Qt::Key_Dead_Grave");
+    mapping.insert(Qt::Key_Dead_Acute, "Qt::Key_Dead_Acute");
+    mapping.insert(Qt::Key_Dead_Circumflex, "Qt::Key_Dead_Circumflex");
+    mapping.insert(Qt::Key_Dead_Tilde, "Qt::Key_Dead_Tilde");
+    mapping.insert(Qt::Key_Dead_Macron, "Qt::Key_Dead_Macron");
+    mapping.insert(Qt::Key_Dead_Breve, "Qt::Key_Dead_Breve");
+    mapping.insert(Qt::Key_Dead_Abovedot, "Qt::Key_Dead_Abovedot");
+    mapping.insert(Qt::Key_Dead_Diaeresis, "Qt::Key_Dead_Diaeresis");
+    mapping.insert(Qt::Key_Dead_Abovering, "Qt::Key_Dead_Abovering");
+    mapping.insert(Qt::Key_Dead_Doubleacute, "Qt::Key_Dead_Doubleacute");
+    mapping.insert(Qt::Key_Dead_Caron, "Qt::Key_Dead_Caron");
+    mapping.insert(Qt::Key_Dead_Cedilla, "Qt::Key_Dead_Cedilla");
+    mapping.insert(Qt::Key_Dead_Ogonek, "Qt::Key_Dead_Ogonek");
+    mapping.insert(Qt::Key_Dead_Iota, "Qt::Key_Dead_Iota");
+    mapping.insert(Qt::Key_Dead_Voiced_Sound, "Qt::Key_Dead_Voiced_Sound");
+    mapping.insert(Qt::Key_Dead_Semivoiced_Sound, "Qt::Key_Dead_Semivoiced_Sound");
+    mapping.insert(Qt::Key_Dead_Belowdot, "Qt::Key_Dead_Belowdot");
+    mapping.insert(Qt::Key_Dead_Hook, "Qt::Key_Dead_Hook");
+    mapping.insert(Qt::Key_Dead_Horn, "Qt::Key_Dead_Horn");
+    mapping.insert(Qt::Key_Back, "Qt::Key_Back");
+    mapping.insert(Qt::Key_Forward, "Qt::Key_Forward");
+    mapping.insert(Qt::Key_Stop, "Qt::Key_Stop");
+    mapping.insert(Qt::Key_Refresh, "Qt::Key_Refresh");
+    mapping.insert(Qt::Key_VolumeDown, "Qt::Key_VolumeDown");
+    mapping.insert(Qt::Key_VolumeMute, "Qt::Key_VolumeMute");
+    mapping.insert(Qt::Key_VolumeUp, "Qt::Key_VolumeUp");
+    mapping.insert(Qt::Key_BassBoost, "Qt::Key_BassBoost");
+    mapping.insert(Qt::Key_BassUp, "Qt::Key_BassUp");
+    mapping.insert(Qt::Key_BassDown, "Qt::Key_BassDown");
+    mapping.insert(Qt::Key_TrebleUp, "Qt::Key_TrebleUp");
+    mapping.insert(Qt::Key_TrebleDown, "Qt::Key_TrebleDown");
+    mapping.insert(Qt::Key_MediaPlay, "Qt::Key_MediaPlay");
+    mapping.insert(Qt::Key_MediaStop, "Qt::Key_MediaStop");
+    mapping.insert(Qt::Key_MediaPrevious, "Qt::Key_MediaPrevious");
+    mapping.insert(Qt::Key_MediaNext, "Qt::Key_MediaNext");
+    mapping.insert(Qt::Key_MediaRecord, "Qt::Key_MediaRecord");
+    mapping.insert(Qt::Key_HomePage, "Qt::Key_HomePage");
+    mapping.insert(Qt::Key_Favorites, "Qt::Key_Favorites");
+    mapping.insert(Qt::Key_Search, "Qt::Key_Search");
+    mapping.insert(Qt::Key_Standby, "Qt::Key_Standby");
+    mapping.insert(Qt::Key_OpenUrl, "Qt::Key_OpenUrl");
+    mapping.insert(Qt::Key_LaunchMail, "Qt::Key_LaunchMail");
+    mapping.insert(Qt::Key_LaunchMedia, "Qt::Key_LaunchMedia");
+    mapping.insert(Qt::Key_Launch0, "Qt::Key_Launch0");
+    mapping.insert(Qt::Key_Launch1, "Qt::Key_Launch1");
+    mapping.insert(Qt::Key_Launch2, "Qt::Key_Launch2");
+    mapping.insert(Qt::Key_Launch3, "Qt::Key_Launch3");
+    mapping.insert(Qt::Key_Launch4, "Qt::Key_Launch4");
+    mapping.insert(Qt::Key_Launch5, "Qt::Key_Launch5");
+    mapping.insert(Qt::Key_Launch6, "Qt::Key_Launch6");
+    mapping.insert(Qt::Key_Launch7, "Qt::Key_Launch7");
+    mapping.insert(Qt::Key_Launch8, "Qt::Key_Launch8");
+    mapping.insert(Qt::Key_Launch9, "Qt::Key_Launch9");
+    mapping.insert(Qt::Key_LaunchA, "Qt::Key_LaunchA");
+    mapping.insert(Qt::Key_LaunchB, "Qt::Key_LaunchB");
+    mapping.insert(Qt::Key_LaunchC, "Qt::Key_LaunchC");
+    mapping.insert(Qt::Key_LaunchD, "Qt::Key_LaunchD");
+    mapping.insert(Qt::Key_LaunchE, "Qt::Key_LaunchE");
+    mapping.insert(Qt::Key_LaunchF, "Qt::Key_LaunchF");
+    mapping.insert(Qt::Key_MonBrightnessUp, "Qt::Key_MonBrightnessUp");
+    mapping.insert(Qt::Key_MonBrightnessDown, "Qt::Key_MonBrightnessDown");
+    mapping.insert(Qt::Key_KeyboardLightOnOff, "Qt::Key_KeyboardLightOnOff");
+    mapping.insert(Qt::Key_KeyboardBrightnessUp, "Qt::Key_KeyboardBrightnessUp");
+    mapping.insert(Qt::Key_KeyboardBrightnessDown, "Qt::Key_KeyboardBrightnessDown");
+    mapping.insert(Qt::Key_PowerOff, "Qt::Key_PowerOff");
+    mapping.insert(Qt::Key_WakeUp, "Qt::Key_WakeUp");
+    mapping.insert(Qt::Key_Eject, "Qt::Key_Eject");
+    mapping.insert(Qt::Key_ScreenSaver, "Qt::Key_ScreenSaver");
+    mapping.insert(Qt::Key_WWW, "Qt::Key_WWW");
+    mapping.insert(Qt::Key_Memo, "Qt::Key_Memo");
+    mapping.insert(Qt::Key_LightBulb, "Qt::Key_LightBulb");
+    mapping.insert(Qt::Key_Shop, "Qt::Key_Shop");
+    mapping.insert(Qt::Key_History, "Qt::Key_History");
+    mapping.insert(Qt::Key_AddFavorite, "Qt::Key_AddFavorite");
+    mapping.insert(Qt::Key_HotLinks, "Qt::Key_HotLinks");
+    mapping.insert(Qt::Key_BrightnessAdjust, "Qt::Key_BrightnessAdjust");
+    mapping.insert(Qt::Key_Finance, "Qt::Key_Finance");
+    mapping.insert(Qt::Key_Community, "Qt::Key_Community");
+    mapping.insert(Qt::Key_AudioRewind, "Qt::Key_AudioRewind");
+    mapping.insert(Qt::Key_BackForward, "Qt::Key_BackForward");
+    mapping.insert(Qt::Key_ApplicationLeft, "Qt::Key_ApplicationLeft");
+    mapping.insert(Qt::Key_ApplicationRight, "Qt::Key_ApplicationRight");
+    mapping.insert(Qt::Key_Book, "Qt::Key_Book");
+    mapping.insert(Qt::Key_CD, "Qt::Key_CD");
+    mapping.insert(Qt::Key_Calculator, "Qt::Key_Calculator");
+    mapping.insert(Qt::Key_ToDoList, "Qt::Key_ToDoList");
+    mapping.insert(Qt::Key_ClearGrab, "Qt::Key_ClearGrab");
+    mapping.insert(Qt::Key_Close, "Qt::Key_Close");
+    mapping.insert(Qt::Key_Copy, "Qt::Key_Copy");
+    mapping.insert(Qt::Key_Cut, "Qt::Key_Cut");
+    mapping.insert(Qt::Key_Display, "Qt::Key_Display");
+    mapping.insert(Qt::Key_DOS, "Qt::Key_DOS");
+    mapping.insert(Qt::Key_Documents, "Qt::Key_Documents");
+    mapping.insert(Qt::Key_Excel, "Qt::Key_Excel");
+    mapping.insert(Qt::Key_Explorer, "Qt::Key_Explorer");
+    mapping.insert(Qt::Key_Game, "Qt::Key_Game");
+    mapping.insert(Qt::Key_Go, "Qt::Key_Go");
+    mapping.insert(Qt::Key_iTouch, "Qt::Key_iTouch");
+    mapping.insert(Qt::Key_LogOff, "Qt::Key_LogOff");
+    mapping.insert(Qt::Key_Market, "Qt::Key_Market");
+    mapping.insert(Qt::Key_Meeting, "Qt::Key_Meeting");
+    mapping.insert(Qt::Key_MenuKB, "Qt::Key_MenuKB");
+    mapping.insert(Qt::Key_MenuPB, "Qt::Key_MenuPB");
+    mapping.insert(Qt::Key_MySites, "Qt::Key_MySites");
+    mapping.insert(Qt::Key_News, "Qt::Key_News");
+    mapping.insert(Qt::Key_OfficeHome, "Qt::Key_OfficeHome");
+    mapping.insert(Qt::Key_Option, "Qt::Key_Option");
+    mapping.insert(Qt::Key_Paste, "Qt::Key_Paste");
+    mapping.insert(Qt::Key_Phone, "Qt::Key_Phone");
+    mapping.insert(Qt::Key_Calendar, "Qt::Key_Calendar");
+    mapping.insert(Qt::Key_Reply, "Qt::Key_Reply");
+    mapping.insert(Qt::Key_Reload, "Qt::Key_Reload");
+    mapping.insert(Qt::Key_RotateWindows, "Qt::Key_RotateWindows");
+    mapping.insert(Qt::Key_RotationPB, "Qt::Key_RotationPB");
+    mapping.insert(Qt::Key_RotationKB, "Qt::Key_RotationKB");
+    mapping.insert(Qt::Key_Save, "Qt::Key_Save");
+    mapping.insert(Qt::Key_Send, "Qt::Key_Send");
+    mapping.insert(Qt::Key_Spell, "Qt::Key_Spell");
+    mapping.insert(Qt::Key_SplitScreen, "Qt::Key_SplitScreen");
+    mapping.insert(Qt::Key_Support, "Qt::Key_Support");
+    mapping.insert(Qt::Key_TaskPane, "Qt::Key_TaskPane");
+    mapping.insert(Qt::Key_Terminal, "Qt::Key_Terminal");
+    mapping.insert(Qt::Key_Tools, "Qt::Key_Tools");
+    mapping.insert(Qt::Key_Travel, "Qt::Key_Travel");
+    mapping.insert(Qt::Key_Video, "Qt::Key_Video");
+    mapping.insert(Qt::Key_Word, "Qt::Key_Word");
+    mapping.insert(Qt::Key_Xfer, "Qt::Key_Xfer");
+    mapping.insert(Qt::Key_ZoomIn, "Qt::Key_ZoomIn");
+    mapping.insert(Qt::Key_ZoomOut, "Qt::Key_ZoomOut");
+    mapping.insert(Qt::Key_Away, "Qt::Key_Away");
+    mapping.insert(Qt::Key_Messenger, "Qt::Key_Messenger");
+    mapping.insert(Qt::Key_WebCam, "Qt::Key_WebCam");
+    mapping.insert(Qt::Key_MailForward, "Qt::Key_MailForward");
+    mapping.insert(Qt::Key_Pictures, "Qt::Key_Pictures");
+    mapping.insert(Qt::Key_Music, "Qt::Key_Music");
+    mapping.insert(Qt::Key_Battery, "Qt::Key_Battery");
+    mapping.insert(Qt::Key_Bluetooth, "Qt::Key_Bluetooth");
+    mapping.insert(Qt::Key_WLAN, "Qt::Key_WLAN");
+    mapping.insert(Qt::Key_UWB, "Qt::Key_UWB");
+    mapping.insert(Qt::Key_AudioForward, "Qt::Key_AudioForward");
+    mapping.insert(Qt::Key_AudioRepeat, "Qt::Key_AudioRepeat");
+    mapping.insert(Qt::Key_AudioRandomPlay, "Qt::Key_AudioRandomPlay");
+    mapping.insert(Qt::Key_Subtitle, "Qt::Key_Subtitle");
+    mapping.insert(Qt::Key_AudioCycleTrack, "Qt::Key_AudioCycleTrack");
+    mapping.insert(Qt::Key_Time, "Qt::Key_Time");
+    mapping.insert(Qt::Key_Hibernate, "Qt::Key_Hibernate");
+    mapping.insert(Qt::Key_View, "Qt::Key_View");
+    mapping.insert(Qt::Key_TopMenu, "Qt::Key_TopMenu");
+    mapping.insert(Qt::Key_PowerDown, "Qt::Key_PowerDown");
+    mapping.insert(Qt::Key_Suspend, "Qt::Key_Suspend");
+    mapping.insert(Qt::Key_ContrastAdjust, "Qt::Key_ContrastAdjust");
+    mapping.insert(Qt::Key_MediaLast, "Qt::Key_MediaLast");
+    mapping.insert(Qt::Key_Select, "Qt::Key_Select");
+    mapping.insert(Qt::Key_Yes, "Qt::Key_Yes");
+    mapping.insert(Qt::Key_No, "Qt::Key_No");
+    mapping.insert(Qt::Key_Cancel, "Qt::Key_Cancel");
+    mapping.insert(Qt::Key_Printer, "Qt::Key_Printer");
+    mapping.insert(Qt::Key_Execute, "Qt::Key_Execute");
+    mapping.insert(Qt::Key_Sleep, "Qt::Key_Sleep");
+    mapping.insert(Qt::Key_Play, "Qt::Key_Play");
+    mapping.insert(Qt::Key_Zoom, "Qt::Key_Zoom");
+    mapping.insert(Qt::Key_Context1, "Qt::Key_Context1");
+    mapping.insert(Qt::Key_Context2, "Qt::Key_Context2");
+    mapping.insert(Qt::Key_Context3, "Qt::Key_Context3");
+    mapping.insert(Qt::Key_Context4, "Qt::Key_Context4");
+    mapping.insert(Qt::Key_Call, "Qt::Key_Call");
+    mapping.insert(Qt::Key_Hangup, "Qt::Key_Hangup");
+    mapping.insert(Qt::Key_Flip, "Qt::Key_Flip");
+    mapping.insert(Qt::Key_unknown, "Qt::Key_unknown");
+}
+
+const QString Mapping::name(Qt::Key key)
+{
+    if (mapping.size() == 0) {
+        init();
+    }
+    
+    const QString &val = mapping.value(key);
+    
+    if (val.isEmpty()) {
+        return QString("???");
+    } else {   
+        return mapping.value(key);
+    }
+}
+
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/mapping.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef MAPPING_H_
+#define MAPPING_H_
+
+#include <Qt>
+#include <QMap>
+
+class Mapping {
+    
+public:
+    Mapping();
+    
+    const QString name(Qt::Key);
+    
+private:
+    
+    void init();
+
+private:    
+    QMap<Qt::Key, QString> mapping;
+};
+
+#endif /* MAPPING_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/mybutton.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef MYKEY_H_
+#define MYKEY_H_
+
+#include <QPushButton>
+#include <QPlainTextEdit>
+#include <QEvent>
+#include <QKeyEvent>
+#include <QMap>
+
+class MyKeyButton : public QPushButton 
+{
+    Q_OBJECT
+    
+public:
+    MyKeyButton(QPlainTextEdit *logger, QWidget *parent = 0)
+    :
+    QPushButton(QString("dummy"), parent)
+    {
+        justLogger = logger;
+        keyLabels.insert(Qt::Key_VolumeUp, "Volume Up");        
+        keyLabels.insert(Qt::Key_VolumeDown, "Volume Down");        
+    }
+    
+    ~MyKeyButton() 
+    {
+    }
+    
+    bool event(QEvent *event)
+    {
+        if (justLogger) {
+            if (event->type() != QEvent::KeyPress) {
+//                QString keyName = mapNaturalName((dynamic_cast<QKeyEvent*>event)->key());
+//                justLogger->appendPlainText(QString("P> %1").arg(keyName));
+                justLogger->appendPlainText(QString("P> %1").arg(static_cast<QKeyEvent*>(event)->key()));
+            }
+            if (event->type() != QEvent::KeyRelease) {
+//                QString keyName = mapNaturalName((dynamic_cast<QKeyEvent*>event)->key());
+//                justLogger->appendPlainText(QString("r> %1").arg(keyName));
+                justLogger->appendPlainText(QString("R> %1").arg(static_cast<QKeyEvent*>(event)->key()));
+            }
+        }
+        return QPushButton::event(event);
+    }
+    
+private:
+    
+    QString mapNaturalName(Qt::Key key) {
+        QString name = keyLabels[key];
+        if (name.isEmpty()) {
+            name = QString("0x%1").arg(static_cast<int>(key), 0, 16);
+        }
+        return name;
+    }
+    
+private:
+    // not own
+    QPlainTextEdit *justLogger;
+    QMap<Qt::Key, QString> keyLabels;
+};
+
+
+#endif /* MYKEY_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/keycaptureex/txlogger.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,92 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef __TXLOGGER_H
+#define __TXLOGGER_H
+
+//To enable tracking define ENABLETRACE
+//if TRACE_FILENAME is set then trace will go to file, otherwise to RDebug
+
+#include <QObject>
+#include <qglobal.h>
+
+#define XQCONNECT_ASSERT(a, b, c, d) if (!(QObject::connect((a),(b), (c), (d)))) { qFatal("Connection failed: connect(%s, %s, %s, %s)", #a, #b, #c, #d); }
+
+// stolen from qt-music :)
+#ifdef ENABLETRACE
+    #include <QString>
+    #include <QDebug>
+    #include <QTime>
+    #include <stdio.h>
+    #include <stdlib.h>
+    #include <e32debug.h>
+
+    #ifdef TRACE_FILE
+        #define _TRACE_FILENAME "c:/trace.txt"
+        #define _TX_INIT void __tx_myMessageOutput(QtMsgType type, const char *msg) {\
+             static const QString timeFmt("hh:mm:ss.zzz");\
+             FILE *f = fopen(_TRACE_FILENAME, "a");\
+             fprintf(f, "%s ", QTime::currentTime().toString(timeFmt).toLatin1().data() );\
+             switch (type) {\
+             case QtDebugMsg: fprintf(f, "[DEB] %s\n", msg); break;\
+             case QtWarningMsg: fprintf(f, "[WRN] %s\n", msg); break;\
+             case QtCriticalMsg: fprintf(f, "[CRT] %s\n", msg); break;\
+             case QtFatalMsg: fprintf(f, "[FTL] %s\n", msg); fclose(f); abort();\
+             } fclose(f);\
+        }
+    #else
+        #define _TX_INIT void __tx_myMessageOutput(QtMsgType /*type*/, const char *msg) {\
+            RDebug::Printf("[KeyCaptureTestApp] %s", msg);\
+            }
+    #endif // TRACE_FILE
+
+    #define _TX_INSTALL qInstallMsgHandler(__tx_myMessageOutput);
+    #define TX_MAIN(a, b) _TX_INIT \
+            int __tx__main(int, char**); int main(int (a), char **(b)) { _TX_INSTALL return __tx__main(a, b); } int __tx__main(int (a), char **(b))
+
+    #define TX_UNUSED(name);
+    #define TX_STATIC_ENTRY qDebug() << __PRETTY_FUNCTION__ << "entry";
+    #define TX_STATIC_ENTRY_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "entry," << args;
+    #define TX_STATIC_EXIT qDebug() << __PRETTY_FUNCTION__ << "exit";
+    #define TX_STATIC_EXIT_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "exit," << args; 
+    #define TX_ENTRY qDebug() << __PRETTY_FUNCTION__ << "this" << (void *)this << "entry";
+    #define TX_ENTRY_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "this" << (void *)this << "entry," << args;
+    #define TX_EXIT qDebug() << __PRETTY_FUNCTION__ << "exit";
+    #define TX_EXIT_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "exit," << args;
+    #define TX_LOG qDebug() << __PRETTY_FUNCTION__ << "this" << (void *)this;
+    #define TX_LOG_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << args;
+#else
+    #define TX_MAIN(a,b) int main(int (a), char **(b))
+    #define TX_UNUSED(name) Q_UNUSED(name);
+    #define TX_STATIC_ENTRY ;
+    #define TX_STATIC_ENTRY_ARGS(args) ;
+    #define TX_STATIC_EXIT ;
+    #define TX_STATIC_EXIT_ARGS(args) ;
+    #define TX_ENTRY ;
+    #define TX_ENTRY_ARGS(args) ;
+    #define TX_EXIT ;
+    #define TX_EXIT_ARGS(args) ;
+    #define TX_LOG ;
+    #define TX_LOG_ARGS(args) ;
+#endif // ENABLETRACE
+
+
+#endif /* __TXLOGGER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/rom/qtmobileextensionsexamples.iby	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: 
+*
+*/
+
+#ifndef __QT_MOBILEEXTENSIONSEXAMPLES_IBY__
+#define __QT_MOBILEEXTENSIONSEXAMPLES_IBY__
+
+#include <bldvariant.hrh>
+
+#define UPGRADABLE_APP_REG_RSC(NAME) data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\ ## NAME ## _reg.rsc        Private\10003a3f\import\apps\ ## NAME ## _reg.rsc
+
+S60_APP_EXE(SettingsManagerEx)
+S60_APP_RESOURCE(SettingsManagerEx)
+UPGRADABLE_APP_REG_RSC(SettingsManagerEx)
+
+S60_APP_EXE(SysInfoEx)
+S60_APP_RESOURCE(SysInfoEx)
+UPGRADABLE_APP_REG_RSC(SysInfoEx)
+
+S60_APP_EXE(UtilsEx)
+S60_APP_RESOURCE(UtilsEx)
+UPGRADABLE_APP_REG_RSC(UtilsEx)
+
+/* optional to add because of external library dependencies;
+S60_APP_EXE(KeyCaptureEx)
+S60_APP_RESOURCE(KeyCaptureEx)
+UPGRADABLE_APP_REG_RSC(KeyCaptureEx)
+*/
+
+/* optional 
+S60_APP_EXE(SystemToneServiceEx)
+S60_APP_RESOURCE(SystemToneServiceEx)
+UPGRADABLE_APP_REG_RSC(SystemToneServiceEx)
+*/
+
+#endif //__QT_MOBILEEXTENSIONSEXAMPLES_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/settingsmanagerex/README.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,26 @@
+Settings Manager example
+
+Application description:
+This application is for testing the Settings Manager API.
+
+Features:
+- Shows the current device profile
+- Shows the status of the charger.
+- Shows basic usage of the Publish and Subscribe mechanism.
+
+Tested platforms:
+- Qt 4.5.2-tower
+- S60 3rd edition FP2 SDK v1.1
+- S60 5th edition SDK v1.0
+
+Phones tested with:
+- N82
+- N95
+- N96
+- 5800 XpressMusic
+
+Notes:
+None
+
+Further improvements:
+None
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/settingsmanagerex/SettingsManagerEx.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,41 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TARGET = SettingsManagerEx
+TEMPLATE = app
+
+SOURCES += main.cpp \
+    settingsmanagerexwindow.cpp
+
+HEADERS += settingsmanagerexwindow.h
+
+FORMS	  += settingsmanagerexwindow.ui
+
+INCLUDEPATH += ..\..\include
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+symbian:LIBS += -lxqsettingsmanager
+
+symbian: {
+    license.depends = "\"install.txt\" - \"\", FILETEXT, TEXTEXIT"
+    DEPLOYMENT += license
+}
+
+symbian:TARGET.UID3 = 0xE2F629E4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/settingsmanagerex/install.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,55 @@
+IMPORTANT: READ CAREFULLY BEFORE INSTALLING, DOWNLOADING, OR USING THE SOFTWARE
+ 
+NOKIA CORPORATION END-USER SOFTWARE AGREEMENT
+ 
+This Software Agreement ("Agreement") is between You (either an individual or an entity), the End User, and Nokia Corporation ("Nokia").  The Agreement authorizes You to use the Software specified in Clause 1 below, which may be stored on a CD-ROM, sent to You by electronic mail, or downloaded from Nokia’s Web pages or Servers or from other sources under the terms and conditions set forth below. This is an agreement on end-user rights and not an agreement for sale. Nokia continues to own the copy of the Software and the physical media contained in the sales package and any other copy that You are authorized to make pursuant to this Agreement.
+ 
+Read this Agreement carefully before installing, downloading, or using the Software.  By clicking on the "I Accept" button while installing, downloading, and/or using the Software, You agree to the terms and conditions of this Agreement.  If You do not agree to all of the terms and conditions of this Agreement, promptly click the "Decline" or "I Do Not Accept" button, cancel the installation or downloading, or destroy or return the Software and accompanying documentation to Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS.
+ 
+1. SOFTWARE.  As used in this Agreement, the term "Software" means, collectively: (i) the software product identified above (ii) all the contents of the disk(s), CD-ROM(s), electronic mail and its file attachments, or other media with which this Agreement is provided, including the object code form of the software delivered via a CD-ROM, electronic mail, or Web page (iii) digital images, stock photographs, clip art, or other artistic works ("Stock Files") (iv) related explanatory written materials and any other possible documentation related thereto ("Documentation"); (v) fonts, and (vi) upgrades, modified versions, updates, additions, and copies of the Software (collectively "Updates"), if any, licensed to You by Nokia under this Agreement.
+ 
+2. END-USER RIGHTS AND USE. Nokia grants to You non-exclusive, non-transferable end-user rights to install the Software on the local hard disk(s) or other permanent storage media of one computer and use the Software on a single computer or terminal at a time.
+ 
+3. LIMITATIONS ON END-USER RIGHTS.  You may not copy, distribute, or make derivative works of the Software except as follows:
+ 
+(a) You may make one copy of the Software on magnetic media as an archival backup copy, provided Your archival backup copy is not installed or used on any computer. Any other copies You make of the Software are in violation of this Agreement.
+ 
+(b) You may not use, modify, translate, reproduce, or transfer the right to use the Software or copy the Software except as expressly provided in this Agreement.
+ 
+(c) You may not resell, sublicense, rent, lease, or lend the Software.
+ 
+(d) You may not reverse engineer, reverse compile, disassemble, or otherwise attempt to discover the source code of the Software (except to the extent that this restriction is expressly prohibited by law) or create derivative works based on the Software.
+ 
+(e) Unless stated otherwise in the Documentation, You shall not display, modify, reproduce, or distribute any of the Stock Files included with the Software. In the event that the Documentation allows You to display the Stock Files, You shall not distribute the Stock Files on a stand-alone basis, i.e., in circumstances in which the Stock Files constitute the primary value of the product being distributed. You should review the "Readme" files associated with the Stock Files that You use to ascertain what rights You have with respect to such materials. Stock Files may not be used in the production of libelous, defamatory, fraudulent, infringing, lewd, obscene, or pornographic material or in any otherwise illegal manner. You may not register or claim any rights in the Stock Files or derivative works thereof.  
+(f) You agree that You shall only use the Software in a manner that complies with all applicable laws in the jurisdiction in which You use the Software, including, but not limited to, applicable restrictions concerning copyright and other intellectual property rights.
+ 
+4. COPYRIGHT.  The Software and all rights, without limitation including proprietary rights therein, are owned by Nokia and/or its licensors and affiliates and are protected by international treaty provisions and all other applicable national laws of the country in which it is being used. The structure, organization, and code of the Software are the valuable trade secrets and confidential information of Nokia and/or its licensors and affiliates. You must not copy the Software, except as set forth in clause 3 (Limitations On End-User Rights). Any copies which You are permitted to make pursuant to this Agreement must contain the same copyright and other proprietary notices that appear on the Software. 
+ 
+5. MULTIPLE ENVIRONMENT SOFTWARE / MULTIPLE LANGUAGE SOFTWARE / DUAL MEDIA SOFTWARE / MULTIPLE COPIES / UPDATES. If the Software supports multiple platforms or languages, if You receive the Software on multiple media, or if You otherwise receive multiple copies of the Software, the number of computers on which all versions of the Software are installed shall be one computer. You may not rent, lease, sublicense, lend, or transfer versions or copies of the Software You do not use. If the Software is an Update to a previous version of the Software, You must possess valid end-user rights to such a previous version in order to use the Update, and You may use the previous version for ninety (90) days after You receive the Update in order to assist You in the transition to the Update. After such time You no longer have a right to use the previous version, except for the sole purpose of enabling You to install the Update. 
+ 
+6. COMMENCEMENT & TERMINATION.  This Agreement is effective from the first date You install the Software. You may terminate this Agreement at any time by permanently deleting, destroying, and returning, at Your own costs, the Software, all backup copies, and all related materials provided by Nokia. Your end-user rights automatically and immediately terminate without notice from Nokia if You fail to comply with any provision of this Agreement. In such an event, You must immediately delete, destroy, or return at Your own cost, the Software, all backup copies, and all related material to Nokia.
+ 
+7. YOU ACKNOWLEDGE THAT THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NEITHER NOKIA, ITS LICENSORS OR AFFILIATES, NOR THE COPYRIGHT HOLDERS MAKE ANY REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR THAT THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS, OR OTHER RIGHTS.  THERE IS NO WARRANTY BY NOKIA OR BY ANY OTHER PARTY THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE.  YOU ASSUME ALL RESPONSIBILITY AND RISK FOR THE SELECTION OF THE SOFTWARE TO ACHIEVE YOUR INTENDED RESULTS AND FOR THE INSTALLATION, USE, AND RESULTS OBTAINED FROM IT. 
+ 
+8. NO OTHER OBLIGATIONS.  This Agreement creates no obligations on the part of Nokia other than as specifically set forth herein.  
+ 
+9. LIMITATION OF LIABILITY.   TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL NOKIA, ITS EMPLOYEES OR LICENSORS OR AFFILIATES BE LIABLE FOR ANY LOST PROFITS, REVENUE, SALES, DATA, OR COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, PROPERTY DAMAGE, PERSONAL INJURY, INTERRUPTION OF BUSINESS, LOSS OF BUSINESS INFORMATION, OR FOR ANY SPECIAL, DIRECT, INDIRECT, INCIDENTAL, ECONOMIC, COVER, PUNITIVE, SPECIAL, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND WHETHER ARISING UNDER CONTRACT, TORT, NEGLIGENCE, OR OTHER THEORY OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF NOKIA OR ITS LICENSORS OR AFFILIATES ARE ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME COUNTRIES/STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF LIABILITY, BUT MAY ALLOW LIABILITY TO BE LIMITED, IN SUCH CASES, NOKIA, ITS EMPLOYEES OR LICENSORS OR AFFILIATES' LIABILITY SHALL BE LIMITED TO U.S. $50. 
+Nothing contained in this Agreement shall prejudice the statutory rights of any party dealing as a consumer. Nothing contained in this Agreement limits Nokia's liability to You in the event of death or personal injury resulting from Nokia's negligence. Nokia is acting on behalf of its employees and licensors or affiliates for the purpose of disclaiming, excluding, and/or restricting obligations, warranties, and liability as provided in this clause 9, but in no other respects and for no other purpose. 
+10. TECHNICAL SUPPORT.  Nokia has no obligation to furnish You with technical support unless separately agreed in writing between You and Nokia.
+ 
+11. EXPORT CONTROL. The Software, including technical data, includes cryptographic software subject to export controls under the U.S. Export Administration Regulations ("EAR") and may be subject to import or export controls in other countries. The EAR prohibits the use of the Software and technical data by a Government End User, as defined hereafter, without a license from the U.S. government. A Government End User is defined in Part 772 of the EAR as "any foreign central, regional, or local government department, agency, or other entity performing governmental functions; including governmental research institutions, governmental corporations, or their separate business units (as defined in part 772 of the EAR) which are engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List, and international governmental organizations. This term does not include: utilities (telecommunications companies and Internet service providers; banks and financial institutions; transportation; broadcast or entertainment; educational organizations; civil health and medical organizations; retail or wholesale firms; and manufacturing or industrial entities not engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List.)" You agree to strictly comply with all applicable import and export regulations and acknowledge that You have the responsibility to obtain licenses to export, re-export, transfer, or import the Software. You further represent that You are not a Government End User as defined above, and You will not transfer the Software to any Government End User without a license.
+ 
+12. NOTICES.  All notices and return of the Software and Documentation should be delivered to:  
+ 
+NOKIA CORPORATION
+P.O. Box 100 
+FIN-00045 NOKIA GROUP
+FINLAND
+ 
+13.  APPLICABLE LAW & GENERAL PROVISIONS.
+ 
+This Agreement is governed by the laws of Finland.  All disputes arising from or relating to this Agreement shall be settled by a single arbitrator appointed by the Central Chamber of Commerce of Finland. The arbitration procedure shall take place in Helsinki, Finland in the English language. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. This Agreement may only be modified in writing by an authorized officer of Nokia.
+ 
+This is the entire agreement between Nokia and You relating to the Software, and it supersedes any prior representations, discussions, undertakings, end-user agreements, communications, or advertising relating to the Software.
+ 
+PLEASE SUBMIT ANY ACCOMPANYING REGISTRATION FORMS TO RECEIVE REGISTRATION BENEFITS WHERE APPLICABLE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/settingsmanagerex/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "settingsmanagerexwindow.h"
+
+#include <QtGui>
+#include <QApplication>
+
+int main(int argc, char* argv[])
+{
+    QApplication a(argc, argv);
+    SettingsManagerExWindow w;
+    w.showMaximized();
+    return a.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/settingsmanagerex/settingsmanagerexwindow.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,201 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "settingsmanagerexwindow.h"
+
+#include <ProfileEngineSDKCRKeys.h>
+#include <HWRMPowerStateSDKPSKeys.h>
+#include <QMenuBar>
+#include <QTimer>
+
+#include "xqsettingsmanager.h"
+#include "xqsettingskey.h"
+#include "xqpublishandsubscribeutils.h"
+
+const quint32 KExampleKey = 0x00000001;
+const qint32 KExampleProperty = {0xE2F629E4}; //Same as SID
+
+SettingsManagerExWindow::SettingsManagerExWindow(QWidget* parent) : QMainWindow(parent)
+{
+	setupUi(this);
+	createMenus();
+
+    m_settingsManager = new XQSettingsManager(this);
+
+    XQSettingsKey profileKey (XQSettingsKey::TargetCentralRepository, KCRUidProfileEngine.iUid, KProEngActiveProfile);
+    m_settingsManager->startMonitoring(profileKey);
+    currentProfile(m_settingsManager->readItemValue(profileKey));
+    
+    XQSettingsKey chargerKey(XQSettingsKey::TargetPublishAndSubscribe, KPSUidHWRMPowerState.iUid, KHWRMChargingStatus);
+    m_settingsManager->startMonitoring(chargerKey);
+    currentChargerStatus(m_settingsManager->readItemValue(chargerKey));
+    
+    connect(m_settingsManager, SIGNAL(itemDeleted(XQSettingsKey)), this, SLOT(itemDeleted(XQSettingsKey)));
+    connect(m_settingsManager, SIGNAL(valueChanged(XQSettingsKey, QVariant)), this, SLOT(handleChanges(XQSettingsKey, QVariant)));
+}
+
+void SettingsManagerExWindow::createMenus()
+{
+    m_createAction = new QAction(tr("Create item"), this);
+    m_deleteAction = new QAction(tr("Delete item"), this);
+    m_deleteAction->setDisabled(true);
+    QAction* exitAct = new QAction(tr("Exit"), this);
+    menuBar()->addAction(m_createAction);
+    menuBar()->addAction(m_deleteAction);
+    menuBar()->addAction(exitAct);
+    
+    connect(m_createAction, SIGNAL(triggered()), this, SLOT(createPropertyItem()));
+    connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(deletePropertyItem()));
+    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+}
+
+void SettingsManagerExWindow::handleChanges(const XQSettingsKey& key, const QVariant& value)
+
+{
+    if (key.uid() == KCRUidProfileEngine.iUid && key.key() == KProEngActiveProfile) 
+    {
+        currentProfile(value);
+    } 
+    if (key.uid() == KPSUidHWRMPowerState.iUid && key.key() == KHWRMChargingStatus) 
+    {
+        currentChargerStatus(value);
+    }
+}
+
+void SettingsManagerExWindow::currentProfile(QVariant value)
+{ 
+    switch (value.toInt()) 
+    {
+        case 0:
+        {
+            profileLabel->setText("Profile: General");
+            break;
+        }
+        case 1:
+        {
+            profileLabel->setText("Profile: Silent");
+            break;
+        }
+        case 2:
+        {
+            profileLabel->setText("Profile: Meeting");
+            break;
+        }
+        case 3:
+        {
+            profileLabel->setText("Profile: Outdoor");
+            break;
+        }
+        case 4 :
+        {
+            profileLabel->setText("Profile: Pager");
+            break;
+        }
+        case 5:
+        {
+            profileLabel->setText("Profile: Off-line");
+            break;
+        }
+        case 6:
+        {
+            profileLabel->setText("Profile:: Drive");
+            break;
+        }
+        default:
+        {
+            profileLabel->setText("Profile: User defined");
+        }
+    }
+}
+
+void SettingsManagerExWindow::currentChargerStatus(QVariant value)
+{
+    switch (value.toInt()) 
+    {
+        case EChargingStatusNotConnected:
+        {
+            chargerLabel->setText("Charger: Is not connected");
+            break;
+        }
+        case EChargingStatusCharging:
+        {
+            chargerLabel->setText("Charger: Charging");
+            break;
+        }
+        case EChargingStatusNotCharging:
+        {
+            chargerLabel->setText("Charger: Not charging");
+            break;
+        }
+        case EChargingStatusAlmostComplete:
+        {
+            chargerLabel->setText("Charger: Almost complete");
+            break;
+        }
+        case EChargingStatusChargingComplete:
+        {
+            chargerLabel->setText("Charger: Battery full");
+            break;    
+        }
+        case EChargingStatusChargingContinued :
+        {
+            chargerLabel->setText("Charger: Continued after brief interruption");
+            break;
+        }
+        default:
+        {
+            chargerLabel->setText("Charger: Error");
+        }
+    }
+}
+
+void SettingsManagerExWindow::deletePropertyItem()
+{
+    XQPublishAndSubscribeUtils utils(*m_settingsManager);
+
+    XQPublishAndSubscribeSettingsKey testKey(KExampleProperty, KExampleKey);
+    utils.deleteProperty(testKey);
+}
+
+void SettingsManagerExWindow::itemDeleted(const XQSettingsKey& key)
+{
+    if (key.uid() == KExampleProperty && key.key() == KExampleKey) 
+    {
+        testLabel->setText("Property item deleted!");
+    }
+    m_deleteAction->setDisabled(true);
+    m_createAction->setEnabled(true);
+}
+
+void SettingsManagerExWindow::createPropertyItem()
+{
+    XQPublishAndSubscribeUtils utils(*m_settingsManager);
+
+    XQPublishAndSubscribeSettingsKey testKey(KExampleProperty, KExampleKey);
+    utils.defineProperty(testKey, XQSettingsManager::TypeByteArray);
+
+    m_settingsManager->writeItemValue(testKey, QByteArray("Property item created!"));
+    
+    m_settingsManager->startMonitoring(testKey);
+    testLabel->setText(m_settingsManager->readItemValue(testKey).toString());
+    m_createAction->setDisabled(true);
+    m_deleteAction->setEnabled(true);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/settingsmanagerex/settingsmanagerexwindow.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef SETTINGSMANAGEREXWINDOW_H
+#define SETTINGSMANAGEREXWINDOW_H
+
+// INCLUDES
+#include <QMainWindow>
+#include "ui_settingsmanagerexwindow.h"
+
+// FORWARD DECLARATIONS
+class XQSettingsManager;
+class XQSettingsKey;
+
+// CLASS DECLARATION
+class SettingsManagerExWindow : public QMainWindow,
+    public Ui::SettingsManagerExClass
+{
+    Q_OBJECT
+
+public:
+	SettingsManagerExWindow(QWidget* parent = 0);
+	
+    void createMenus();
+    void currentProfile(QVariant value);
+    void currentChargerStatus(QVariant value);
+
+public slots:
+    void deletePropertyItem();
+    void createPropertyItem();
+    void itemDeleted(const XQSettingsKey& key);
+    void handleChanges(const XQSettingsKey& key, const QVariant& value);
+
+private:
+    XQSettingsManager* m_settingsManager;
+    QAction* m_createAction;
+    QAction* m_deleteAction;
+};
+
+#endif // SETTINGSMANAGEREXWINDOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/settingsmanagerex/settingsmanagerexwindow.ui	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,56 @@
+<ui version="4.0" >
+ <class>SettingsManagerExClass</class>
+ <widget class="QMainWindow" name="SettingsManagerExClass" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>277</width>
+    <height>329</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget" >
+   <layout class="QVBoxLayout" name="verticalLayout" >
+    <item>
+     <widget class="QLabel" name="profileLabel" >
+      <property name="text" >
+       <string>Unknown profile</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QLabel" name="chargerLabel" >
+      <property name="text" >
+       <string>Charger state is unknown</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QLabel" name="testLabel" >
+      <property name="text" >
+       <string>No property items</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <spacer name="verticalSpacer" >
+      <property name="orientation" >
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0" >
+       <size>
+        <width>20</width>
+        <height>40</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/sysinfoex/README.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,25 @@
+SysInfo
+
+Application description:
+This application is for testing the SysInfo API.
+
+Features:
+- Retrieve information about the phone (model, imei, language, etc.).
+- Get information about the supported/unsupported features in the device.
+
+Tested platforms:
+- Qt 4.5.2-tower
+- S60 3rd edition FP2 SDK v1.1
+- S60 5th edition SDK v1.0
+
+Phones tested with:
+- N82
+- N95
+- N96
+- 5800 XpressMusic
+
+Notes:
+None
+
+Further improvements:
+None
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/sysinfoex/SysInfoEx.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,42 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TARGET = SysInfoEx
+TEMPLATE = app
+
+SOURCES += main.cpp \
+    sysinfoexwindow.cpp \
+    xqlistwidget.cpp
+
+HEADERS += sysinfoexwindow.h \
+    xqlistwidget.h
+
+FORMS += sysinfoexwindow.ui
+
+INCLUDEPATH += ..\..\include
+
+symbian:LIBS += -lxqsysinfo
+
+symbian:TARGET.CAPABILITY = ReadDeviceData
+
+symbian: {
+    license.depends = "\"install.txt\" - \"\", FILETEXT, TEXTEXIT"
+    DEPLOYMENT += license
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/sysinfoex/install.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,55 @@
+IMPORTANT: READ CAREFULLY BEFORE INSTALLING, DOWNLOADING, OR USING THE SOFTWARE
+ 
+NOKIA CORPORATION END-USER SOFTWARE AGREEMENT
+ 
+This Software Agreement ("Agreement") is between You (either an individual or an entity), the End User, and Nokia Corporation ("Nokia").  The Agreement authorizes You to use the Software specified in Clause 1 below, which may be stored on a CD-ROM, sent to You by electronic mail, or downloaded from Nokia’s Web pages or Servers or from other sources under the terms and conditions set forth below. This is an agreement on end-user rights and not an agreement for sale. Nokia continues to own the copy of the Software and the physical media contained in the sales package and any other copy that You are authorized to make pursuant to this Agreement.
+ 
+Read this Agreement carefully before installing, downloading, or using the Software.  By clicking on the "I Accept" button while installing, downloading, and/or using the Software, You agree to the terms and conditions of this Agreement.  If You do not agree to all of the terms and conditions of this Agreement, promptly click the "Decline" or "I Do Not Accept" button, cancel the installation or downloading, or destroy or return the Software and accompanying documentation to Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS.
+ 
+1. SOFTWARE.  As used in this Agreement, the term "Software" means, collectively: (i) the software product identified above (ii) all the contents of the disk(s), CD-ROM(s), electronic mail and its file attachments, or other media with which this Agreement is provided, including the object code form of the software delivered via a CD-ROM, electronic mail, or Web page (iii) digital images, stock photographs, clip art, or other artistic works ("Stock Files") (iv) related explanatory written materials and any other possible documentation related thereto ("Documentation"); (v) fonts, and (vi) upgrades, modified versions, updates, additions, and copies of the Software (collectively "Updates"), if any, licensed to You by Nokia under this Agreement.
+ 
+2. END-USER RIGHTS AND USE. Nokia grants to You non-exclusive, non-transferable end-user rights to install the Software on the local hard disk(s) or other permanent storage media of one computer and use the Software on a single computer or terminal at a time.
+ 
+3. LIMITATIONS ON END-USER RIGHTS.  You may not copy, distribute, or make derivative works of the Software except as follows:
+ 
+(a) You may make one copy of the Software on magnetic media as an archival backup copy, provided Your archival backup copy is not installed or used on any computer. Any other copies You make of the Software are in violation of this Agreement.
+ 
+(b) You may not use, modify, translate, reproduce, or transfer the right to use the Software or copy the Software except as expressly provided in this Agreement.
+ 
+(c) You may not resell, sublicense, rent, lease, or lend the Software.
+ 
+(d) You may not reverse engineer, reverse compile, disassemble, or otherwise attempt to discover the source code of the Software (except to the extent that this restriction is expressly prohibited by law) or create derivative works based on the Software.
+ 
+(e) Unless stated otherwise in the Documentation, You shall not display, modify, reproduce, or distribute any of the Stock Files included with the Software. In the event that the Documentation allows You to display the Stock Files, You shall not distribute the Stock Files on a stand-alone basis, i.e., in circumstances in which the Stock Files constitute the primary value of the product being distributed. You should review the "Readme" files associated with the Stock Files that You use to ascertain what rights You have with respect to such materials. Stock Files may not be used in the production of libelous, defamatory, fraudulent, infringing, lewd, obscene, or pornographic material or in any otherwise illegal manner. You may not register or claim any rights in the Stock Files or derivative works thereof.  
+(f) You agree that You shall only use the Software in a manner that complies with all applicable laws in the jurisdiction in which You use the Software, including, but not limited to, applicable restrictions concerning copyright and other intellectual property rights.
+ 
+4. COPYRIGHT.  The Software and all rights, without limitation including proprietary rights therein, are owned by Nokia and/or its licensors and affiliates and are protected by international treaty provisions and all other applicable national laws of the country in which it is being used. The structure, organization, and code of the Software are the valuable trade secrets and confidential information of Nokia and/or its licensors and affiliates. You must not copy the Software, except as set forth in clause 3 (Limitations On End-User Rights). Any copies which You are permitted to make pursuant to this Agreement must contain the same copyright and other proprietary notices that appear on the Software. 
+ 
+5. MULTIPLE ENVIRONMENT SOFTWARE / MULTIPLE LANGUAGE SOFTWARE / DUAL MEDIA SOFTWARE / MULTIPLE COPIES / UPDATES. If the Software supports multiple platforms or languages, if You receive the Software on multiple media, or if You otherwise receive multiple copies of the Software, the number of computers on which all versions of the Software are installed shall be one computer. You may not rent, lease, sublicense, lend, or transfer versions or copies of the Software You do not use. If the Software is an Update to a previous version of the Software, You must possess valid end-user rights to such a previous version in order to use the Update, and You may use the previous version for ninety (90) days after You receive the Update in order to assist You in the transition to the Update. After such time You no longer have a right to use the previous version, except for the sole purpose of enabling You to install the Update. 
+ 
+6. COMMENCEMENT & TERMINATION.  This Agreement is effective from the first date You install the Software. You may terminate this Agreement at any time by permanently deleting, destroying, and returning, at Your own costs, the Software, all backup copies, and all related materials provided by Nokia. Your end-user rights automatically and immediately terminate without notice from Nokia if You fail to comply with any provision of this Agreement. In such an event, You must immediately delete, destroy, or return at Your own cost, the Software, all backup copies, and all related material to Nokia.
+ 
+7. YOU ACKNOWLEDGE THAT THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NEITHER NOKIA, ITS LICENSORS OR AFFILIATES, NOR THE COPYRIGHT HOLDERS MAKE ANY REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR THAT THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS, OR OTHER RIGHTS.  THERE IS NO WARRANTY BY NOKIA OR BY ANY OTHER PARTY THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE.  YOU ASSUME ALL RESPONSIBILITY AND RISK FOR THE SELECTION OF THE SOFTWARE TO ACHIEVE YOUR INTENDED RESULTS AND FOR THE INSTALLATION, USE, AND RESULTS OBTAINED FROM IT. 
+ 
+8. NO OTHER OBLIGATIONS.  This Agreement creates no obligations on the part of Nokia other than as specifically set forth herein.  
+ 
+9. LIMITATION OF LIABILITY.   TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL NOKIA, ITS EMPLOYEES OR LICENSORS OR AFFILIATES BE LIABLE FOR ANY LOST PROFITS, REVENUE, SALES, DATA, OR COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, PROPERTY DAMAGE, PERSONAL INJURY, INTERRUPTION OF BUSINESS, LOSS OF BUSINESS INFORMATION, OR FOR ANY SPECIAL, DIRECT, INDIRECT, INCIDENTAL, ECONOMIC, COVER, PUNITIVE, SPECIAL, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND WHETHER ARISING UNDER CONTRACT, TORT, NEGLIGENCE, OR OTHER THEORY OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF NOKIA OR ITS LICENSORS OR AFFILIATES ARE ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME COUNTRIES/STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF LIABILITY, BUT MAY ALLOW LIABILITY TO BE LIMITED, IN SUCH CASES, NOKIA, ITS EMPLOYEES OR LICENSORS OR AFFILIATES' LIABILITY SHALL BE LIMITED TO U.S. $50. 
+Nothing contained in this Agreement shall prejudice the statutory rights of any party dealing as a consumer. Nothing contained in this Agreement limits Nokia's liability to You in the event of death or personal injury resulting from Nokia's negligence. Nokia is acting on behalf of its employees and licensors or affiliates for the purpose of disclaiming, excluding, and/or restricting obligations, warranties, and liability as provided in this clause 9, but in no other respects and for no other purpose. 
+10. TECHNICAL SUPPORT.  Nokia has no obligation to furnish You with technical support unless separately agreed in writing between You and Nokia.
+ 
+11. EXPORT CONTROL. The Software, including technical data, includes cryptographic software subject to export controls under the U.S. Export Administration Regulations ("EAR") and may be subject to import or export controls in other countries. The EAR prohibits the use of the Software and technical data by a Government End User, as defined hereafter, without a license from the U.S. government. A Government End User is defined in Part 772 of the EAR as "any foreign central, regional, or local government department, agency, or other entity performing governmental functions; including governmental research institutions, governmental corporations, or their separate business units (as defined in part 772 of the EAR) which are engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List, and international governmental organizations. This term does not include: utilities (telecommunications companies and Internet service providers; banks and financial institutions; transportation; broadcast or entertainment; educational organizations; civil health and medical organizations; retail or wholesale firms; and manufacturing or industrial entities not engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List.)" You agree to strictly comply with all applicable import and export regulations and acknowledge that You have the responsibility to obtain licenses to export, re-export, transfer, or import the Software. You further represent that You are not a Government End User as defined above, and You will not transfer the Software to any Government End User without a license.
+ 
+12. NOTICES.  All notices and return of the Software and Documentation should be delivered to:  
+ 
+NOKIA CORPORATION
+P.O. Box 100 
+FIN-00045 NOKIA GROUP
+FINLAND
+ 
+13.  APPLICABLE LAW & GENERAL PROVISIONS.
+ 
+This Agreement is governed by the laws of Finland.  All disputes arising from or relating to this Agreement shall be settled by a single arbitrator appointed by the Central Chamber of Commerce of Finland. The arbitration procedure shall take place in Helsinki, Finland in the English language. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. This Agreement may only be modified in writing by an authorized officer of Nokia.
+ 
+This is the entire agreement between Nokia and You relating to the Software, and it supersedes any prior representations, discussions, undertakings, end-user agreements, communications, or advertising relating to the Software.
+ 
+PLEASE SUBMIT ANY ACCOMPANYING REGISTRATION FORMS TO RECEIVE REGISTRATION BENEFITS WHERE APPLICABLE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/sysinfoex/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QtGui/QApplication>
+#include "sysinfoexwindow.h"
+
+int main(int argc, char *argv[])
+{
+    QApplication a(argc, argv);
+    SysInfoExWindow w;
+    w.showMaximized();
+    return a.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/sysinfoex/sysinfoexwindow.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,170 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "sysinfoexwindow.h"
+#include "xqsysinfo.h"
+#include "xqlistwidget.h"
+#ifndef KFeatureIdMmc   //Workaround for RnD SDKs
+    #include <featureinfo.h>
+#endif
+
+#include <QSignalMapper>
+#include <QMenu>
+#include <QMenuBar>
+
+SysInfoExWindow::SysInfoExWindow(QWidget* parent)
+    : QMainWindow(parent)
+{
+    setupUi(this);
+    createMenus();
+    
+    // Initializing sysinfo
+    XQSysInfo* sysInfo = new XQSysInfo(this);
+    
+    // System Info
+    modelLabel->setText("Model: "+sysInfo->model());
+    manufacturerLabel->setText("Manufacturer: " + sysInfo->manufacturer());
+    versionLabel->setText("Version: "+sysInfo->softwareVersion());
+    languageLabel->setText("Language: "+handleLanguage(sysInfo->currentLanguage()));
+    imeiLabel->setText("Imei: "+sysInfo->imei());
+    imsiLabel->setText("Imsi: "+sysInfo->imsi());
+    
+    // System Info 2
+    signalStrengthLabel->setText("Signal strenght: " + QString::number(sysInfo->signalStrength()));
+    batteryLevelLabel->setText("Battery level: " + QString::number(sysInfo->batteryLevel()));
+    diskSpaceLabel->setText("Free space (c:): " + QString::number(sysInfo->diskSpace(XQSysInfo::DriveC)/1048576,'f',1) + "MB");
+    
+    if (sysInfo->isDiskSpaceCritical(XQSysInfo::DriveC))
+    {
+        criticalDiskSpaceLabel = new QLabel("Disk space (c:): Critical");
+    }
+    else
+    {
+        criticalDiskSpaceLabel = new QLabel("Disk space (c:): ok");   
+    }
+    
+    // Feature Discover
+    listWidget->addItem("MMC: "+boolToString(XQSysInfo::isSupported(KFeatureIdMmc)));
+    listWidget->addItem("Camera: "+boolToString(XQSysInfo::isSupported(KFeatureIdCamera)));
+    listWidget->addItem("Cover display: "+boolToString(XQSysInfo::isSupported(KFeatureIdCoverDisplay)));
+    listWidget->addItem("Video recorder: "+boolToString(XQSysInfo::isSupported(KFeatureIdVideoRecorder)));
+    listWidget->addItem("Flight mode: "+boolToString(XQSysInfo::isSupported(KFeatureIdFlightMode)));
+    listWidget->addItem("Offline mode: "+boolToString(XQSysInfo::isSupported(KFeatureIdOfflineMode)));
+    listWidget->addItem("OpenGL: "+boolToString(XQSysInfo::isSupported(KFeatureIdOpenGLES3DApi)));
+    listWidget->addItem("IrDA: "+boolToString(XQSysInfo::isSupported(KFeatureIdIrda))); 
+    listWidget->addItem("Bluetooth: "+boolToString(XQSysInfo::isSupported(KFeatureIdBt)));
+    listWidget->addItem("Qwerty: "+boolToString(XQSysInfo::isSupported(KFeatureIdQwertyInput)));
+    listWidget->addItem("USB: "+boolToString(XQSysInfo::isSupported(KFeatureIdUsb)));
+    listWidget->addItem("BT Fax Profile: "+boolToString(XQSysInfo::isSupported(KFeatureIdBtFaxProfile)));
+    listWidget->addItem("BT Imaging Profile: "+boolToString(XQSysInfo::isSupported(KFeatureIdBtImagingProfile)));
+    listWidget->addItem("Instant Messaging: "+boolToString(XQSysInfo::isSupported(KFeatureIdIm)));
+    listWidget->addItem("Precense feature: "+boolToString(XQSysInfo::isSupported(KFeatureIdPresence)));
+    listWidget->addItem("SVGT: "+boolToString(XQSysInfo::isSupported(KFeatureIdSvgt)));
+    listWidget->addItem("Audio effects: "+boolToString(XQSysInfo::isSupported(KFeatureIdAudioEffectsApi)));
+    listWidget->addItem("Equalizer: "+boolToString(XQSysInfo::isSupported(KFeatureIdEqualizer)));
+    listWidget->addItem("GSM cellular stack: "+boolToString(XQSysInfo::isSupported(KFeatureIdProtocolGsm)));
+    listWidget->addItem("WCDMA cellular stack: "+boolToString(XQSysInfo::isSupported(KFeatureIdProtocolWcdma)));
+    listWidget->addItem("CDMA cellular stack: "+boolToString(XQSysInfo::isSupported(KFeatureIdProtocolCdma)));
+    listWidget->addItem("Wlan: "+boolToString(XQSysInfo::isSupported(KFeatureIdProtocolWlan)));
+    listWidget->addItem("Location: "+boolToString(XQSysInfo::isSupported(KFeatureIdLocationFrameworkCore)));
+    listWidget->addItem("Landmarks: "+boolToString(XQSysInfo::isSupported(KFeatureIdLandmarks)));
+    
+    stackedWidget->setCurrentIndex(0);
+}
+
+SysInfoExWindow::~SysInfoExWindow()
+{
+}
+
+void SysInfoExWindow::createMenus()
+{
+    m_systemInfoAction = new QAction(tr("System Info"), this);
+    menuBar()->addAction(m_systemInfoAction);
+    connect(m_systemInfoAction, SIGNAL(triggered()), this, SLOT(handleSystemInfoAction()));
+    
+    m_systemInfo2Action = new QAction(tr("System Info 2"), this);
+    menuBar()->addAction(m_systemInfo2Action);
+    connect(m_systemInfo2Action, SIGNAL(triggered()), this, SLOT(handleSystemInfo2Action()));
+    
+    m_featureDiscoverAction = new QAction(tr("Feature discover"), this);
+    menuBar()->addAction(m_featureDiscoverAction);
+    connect(m_featureDiscoverAction, SIGNAL(triggered()), this, SLOT(handleFeatureDiscoverAction()));
+    
+    m_exitAction = new QAction(tr("Exit"), this);
+    menuBar()->addAction(m_exitAction);
+    connect(m_exitAction, SIGNAL(triggered()), this, SLOT(close()));
+}
+
+void SysInfoExWindow::handleSystemInfoAction()
+{
+    stackedWidget->setCurrentIndex(0);
+}
+
+void SysInfoExWindow::handleSystemInfo2Action()
+{
+    stackedWidget->setCurrentIndex(1);
+}
+
+void SysInfoExWindow::handleFeatureDiscoverAction()
+{
+    stackedWidget->setCurrentIndex(2);
+}
+
+QString SysInfoExWindow::boolToString(bool boolean)
+{
+    if (boolean) 
+    {
+        return "Supported";
+    } 
+    else 
+    {
+        return "Not supported";
+    }
+}
+
+QString SysInfoExWindow::handleLanguage(XQSysInfo::Language language)
+{
+    switch (language) 
+    {
+        case XQSysInfo::LangEnglish:
+            return "English";
+        case XQSysInfo::LangFinnish:
+            return "Finnish";
+        case XQSysInfo::LangSwedish:
+            return "Swedish";
+        case XQSysInfo::LangNorwegian:
+            return "Norwegian";
+        case XQSysInfo::LangIcelandic:
+            return "Icelandic";
+        case XQSysInfo::LangFrench:
+            return "French";
+        case XQSysInfo::LangGerman:
+            return "German";
+        case XQSysInfo::LangSpanish:
+            return "Spanish";
+        case XQSysInfo::LangItalian:
+            return "Italian";
+        case XQSysInfo::LangPortuguese:
+            return "Portuguese";
+        default:
+            return "Unknown";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/sysinfoex/sysinfoexwindow.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef SYSINFOEXWINDOW_H
+#define SYSINFOEXWINDOW_H
+
+#include <QtGui>
+#include "xqsysinfo.h"
+
+#include "ui_sysinfoexwindow.h"
+
+class SysInfoExWindow : public QMainWindow,
+    public Ui::SysInfoExWindowClass
+{
+    Q_OBJECT
+public:
+    SysInfoExWindow(QWidget* parent = 0);
+    ~SysInfoExWindow();
+    
+public Q_SLOTS:
+    QString handleLanguage(XQSysInfo::Language language);
+    void handleSystemInfoAction();
+    void handleSystemInfo2Action();
+    void handleFeatureDiscoverAction();
+    
+public:
+    QString boolToString(bool boolean);
+    void createMenus();
+    
+private:
+    QAction* m_systemInfoAction;
+    QAction* m_systemInfo2Action;
+    QAction* m_featureDiscoverAction;
+    QAction* m_exitAction;
+};
+
+#endif // SYSINFOEXWINDOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/sysinfoex/sysinfoexwindow.ui	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,171 @@
+<ui version="4.0" >
+ <class>SysInfoExWindowClass</class>
+ <widget class="QMainWindow" name="SysInfoExWindowClass" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>528</width>
+    <height>417</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>SysInfoEx</string>
+  </property>
+  <widget class="QWidget" name="centralWidget" >
+   <layout class="QVBoxLayout" name="verticalLayout" >
+    <property name="spacing" >
+     <number>0</number>
+    </property>
+    <property name="sizeConstraint" >
+     <enum>QLayout::SetDefaultConstraint</enum>
+    </property>
+    <property name="margin" >
+     <number>0</number>
+    </property>
+    <item>
+     <widget class="QStackedWidget" name="stackedWidget" >
+      <property name="sizePolicy" >
+       <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="currentIndex" >
+       <number>0</number>
+      </property>
+      <widget class="QWidget" name="page" >
+       <layout class="QVBoxLayout" name="verticalLayout_4" >
+        <item>
+         <widget class="QLabel" name="modelLabel" >
+          <property name="text" >
+           <string>TextLabel</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="manufacturerLabel" >
+          <property name="text" >
+           <string>TextLabel</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="versionLabel" >
+          <property name="text" >
+           <string>TextLabel</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="languageLabel" >
+          <property name="text" >
+           <string>TextLabel</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="imeiLabel" >
+          <property name="text" >
+           <string>TextLabel</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="imsiLabel" >
+          <property name="text" >
+           <string>TextLabel</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="verticalSpacer_2" >
+          <property name="orientation" >
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeHint" stdset="0" >
+           <size>
+            <width>20</width>
+            <height>276</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="page_2" >
+       <layout class="QVBoxLayout" name="verticalLayout_3" >
+        <item>
+         <widget class="QLabel" name="signalStrengthLabel" >
+          <property name="text" >
+           <string>TextLabel</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="batteryLevelLabel" >
+          <property name="text" >
+           <string>TextLabel</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="diskSpaceLabel" >
+          <property name="text" >
+           <string>TextLabel</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="criticalDiskSpaceLabel" >
+          <property name="text" >
+           <string>TextLabel</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="verticalSpacer" >
+          <property name="orientation" >
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeHint" stdset="0" >
+           <size>
+            <width>20</width>
+            <height>316</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="page_3" >
+       <layout class="QVBoxLayout" name="verticalLayout_2" >
+        <item>
+         <widget class="QListWidget" name="listWidget" />
+        </item>
+       </layout>
+      </widget>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <action name="actionSystemInfo" >
+   <property name="text" >
+    <string>System Info</string>
+   </property>
+  </action>
+  <action name="actionSystemInfo2" >
+   <property name="text" >
+    <string>System Info 2</string>
+   </property>
+  </action>
+  <action name="actionFeatureDiscover" >
+   <property name="text" >
+    <string>Feature Discover</string>
+   </property>
+  </action>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/sysinfoex/xqlistwidget.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqlistwidget.h"
+
+XQListWidget::XQListWidget(QWidget* parent) : QListWidget(parent)
+{    
+}
+
+void XQListWidget::keyPressEvent(QKeyEvent* event)
+{
+    switch (event->key())
+    {
+        case Qt::Key_Left:
+        {
+            focusPreviousChild();
+            break;
+        }
+        case Qt::Key_Right:
+        {
+            focusNextChild();
+            break;
+        }
+        default: 
+        {
+            QListWidget::keyPressEvent(event);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/sysinfoex/xqlistwidget.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQLISTWIDGET_H
+#define XQLISTWIDGET_H
+
+#include <QListWidget>
+#include <QKeyEvent>
+
+class XQListWidget: public QListWidget
+{
+public:
+    XQListWidget(QWidget* parent = 0);  
+    
+protected:
+    void keyPressEvent(QKeyEvent* event);
+};
+
+#endif // XQLISTWIDGET_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/systemtoneserviceex/sis/stsqt.pkg	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,38 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: System Tone Service - UDEB build
+;
+;File: systemtoneservice.pkg
+
+;Languages
+&EN
+
+;Header
+; SIS header: name, uid, version
+#{"SystemToneServiceEx"},(0xE9e86548),1,0,0, TYPE=SA, RU
+
+;Series 60 v5.0
+[0x1028315F], 0,0,0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
+;Files To Copy...<src> <destination>
+; Executable and default resource files
+"/epoc32/release/armv5/urel/SystemToneServiceEx.exe" - "!:\sys\bin\SystemToneServiceEx.exe"
+"/epoc32/data/z/resource/apps/SystemToneServiceEx.rsc" - "!:\resource\apps\SystemToneServiceEx.rsc"
+"/epoc32/data/z/private/10003a3f/import/apps/SystemToneServiceEx_reg.rsc" - "!:\private\10003a3f\import\apps\SystemToneServiceEx_reg.rsc"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/systemtoneserviceex/ststest.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,257 @@
+/*
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not,
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+*/
+
+#include <QDebug>
+#include <QApplication>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QVBoxLayout>
+#include <QGridLayout>
+#include <QStackedWidget>
+#include <QImageReader>
+#include <QDebug>
+#include <QTimer>
+#include <QPushButton>
+#include <QLineEdit>
+#include <QDebug>
+#include <QString>
+#include <QCheckBox>
+
+#include <QListView>
+#include <QMap>
+#include <QAction>
+
+#include "ststest.h"
+#include <XQSystemToneService>
+
+STSTest::STSTest( QWidget *parent) 
+:
+QMainWindow(parent),
+sts(new XQSystemToneService())
+{
+    qDebug() << QString("[sts] STSTest::STSTest 1");
+    QWidget *window = new QWidget(this);
+    qDebug() << QString("[sts] STSTest::STSTest 2");
+    QVBoxLayout* layout = new QVBoxLayout(this);
+
+    callbackCleanTimer.setSingleShot(true);
+    connect(&callbackCleanTimer, SIGNAL(timeout()), this, SLOT(cleanCallback()));
+    
+    QPushButton *quitButton = new QPushButton("QUIT", this);
+    connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+
+    QPushButton *playToneButton = new QPushButton("Play Tone", this);
+    connect(playToneButton, SIGNAL(clicked()), this, SLOT(playTone()));
+
+    QPushButton *playAlarmButton = new QPushButton("Play Alarm", this);
+    connect(playAlarmButton, SIGNAL(clicked()), this, SLOT(playAlarm()));
+
+    QPushButton *playAlarmAsToneButton = new QPushButton("Play Alarm as Tone", this);
+    connect(playAlarmAsToneButton, SIGNAL(clicked()), this, SLOT(playAlarmAsTone()));
+
+    QPushButton *stopAlarmButton = new QPushButton("Stop Alarm", this);
+    connect(stopAlarmButton, SIGNAL(clicked()), this, SLOT(stopAlarm()));
+    
+
+    connect(sts, SIGNAL(toneStarted()), this, SLOT(startCallback()));
+    connect(sts, SIGNAL(alarmStarted(unsigned int)), this, SLOT(startCallback(unsigned int)));
+    connect(sts, SIGNAL(alarmFinished(unsigned int)), this, SLOT(stopCallback(unsigned int)));
+
+    qDebug() << QString("[sts] STSTest::STSTest 3");
+
+    box = new QComboBox(this);
+    spinBox = new QSpinBox(this);
+    
+    layout->setMargin(10);
+    layout->setSpacing(0);
+    qDebug() << QString("[sts] STSTest::STSTest 4"); 
+    QList<QPair<int, QString> > tonesList;
+    
+
+    // alarms
+    tonesList.append(QPair<int,QString>(XQSystemToneService::CalendarAlarmTone, "[A] Calendar Alarm"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::ClockAlarmTone, "[A] Clock Alarm"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::ToDoAlarmTone, "[A] ToDo Alarm"));
+
+    tonesList.append(QPair<int,QString>(XQSystemToneService::IncomingCallTone, "[A] Incoming Call"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::IncomingCallLine2Tone, "[A] Incomming Call Line 2"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::IncomingDataCallTone, "[A] Incomming Data Call"));
+
+    // tones
+    tonesList.append(QPair<int,QString>(XQSystemToneService::BurstModeTone, "[T] Burst Mode"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::CaptureTone, "[T] Capture"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::CallRecordingTone, "[T] Call Recording"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::RecordingStartTone, "[T] Recording Start"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::SelfTimerTone, "[T] Self Timer"));
+
+    tonesList.append(QPair<int,QString>(XQSystemToneService::ConfirmationBeepTone, "[T] Confirmation Beep"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::DefaultBeepTone, "[T] Default Beep"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::ErrorBeepTone, "[T] Error Beep"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::InformationBeepTone, "[T] Information Beep"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::WarningBeepTone, "[T] Warning Beep"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::IntegratedHandsFreeActivatedTone, "[T] Integrated Hands Free Act."));
+
+    tonesList.append(QPair<int,QString>(XQSystemToneService::TouchScreenTone, "[T] Touch Screen"));
+
+    tonesList.append(QPair<int,QString>(XQSystemToneService::ChatAlertTone, "[T] Chat Alert"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::EmailAlertTone, "[T] Email Alert"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::MmsAlertTone, "[T] MMS Alert"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::SmsAlertTone, "[T] SMS Alert"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::DeliveryReportTone, "[T] Delivery Report"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::MessageSendFailureTone, "[T] Message Send Failure"));
+
+    tonesList.append(QPair<int,QString>(XQSystemToneService::BatteryLowTone, "[T] Battery Low"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::BatteryRechargedTone, "[T] Battery Recharge"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::PowerOnTone, "[T] Power On"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::PowerOffTone, "[T] Power Off"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::WakeUpTone, "[T] Wake Up"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::WrongChargerTone, "[T] Wrong Charger"));
+
+    tonesList.append(QPair<int,QString>(XQSystemToneService::AutomaticRedialCompleteTone, "[T] Automatic Redial Compl."));
+
+    tonesList.append(QPair<int,QString>(XQSystemToneService::VoiceStartTone, "[T] Voice Start"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::VoiceErrorTone, "[T] Voice Error"));
+    tonesList.append(QPair<int,QString>(XQSystemToneService::VoiceAbortTone, "[T] Voice Abort"));
+
+    qDebug() << QString("[sts] STSTest::STSTest 5");
+    QListIterator<QPair<int, QString> > iter(tonesList);
+    while (iter.hasNext()) {
+        QPair<int, QString> item = iter.next();
+        box->addItem(item.second, item.first);
+    }
+
+    layout->addStretch(4);
+    layout->addWidget(box);
+
+    qDebug() << QString("[sts] STSTest::STSTest 6");
+    layout->addStretch(1);
+    layout->addWidget(playToneButton);
+    layout->addStretch(1);
+    layout->addWidget(playAlarmButton);
+    layout->addStretch(1);
+    layout->addWidget(playAlarmAsToneButton);
+    layout->addStretch(1);	
+    currCtxLabel = new QLabel("Last context: ?", this);
+    layout->addWidget(currCtxLabel);
+    layout->addStretch(2);
+    layout->addWidget(stopAlarmButton);
+    layout->addStretch(1);
+    layout->addWidget(new QLabel("Context:", this));
+    layout->addWidget(spinBox);
+
+    layout->addStretch(1);
+    callbackLabel = new QLabel("SIGNALS: ---", this);
+    layout->addWidget(callbackLabel);
+    
+    layout->addStretch(4);
+    layout->addWidget(quitButton);
+
+    
+    window->setLayout(layout);
+    setCentralWidget(window);
+    window->show();;
+
+}
+
+STSTest::~STSTest()
+{
+    delete sts;
+}
+
+void STSTest::playTone()
+{
+    int id = box->itemData(box->currentIndex(), Qt::UserRole).toInt();
+    
+    qDebug("Beep!!! (%d)", id);
+    
+    sts->playTone((XQSystemToneService::ToneType)id);
+    
+    currCtxLabel->setText(QString("Last context: -"));
+}
+
+void STSTest::playAlarm()
+{
+    int id = box->itemData(box->currentIndex(), Qt::UserRole).toInt();
+    
+    qDebug("Beep!!! (%d)", id);
+    unsigned int ctx = 0;
+    
+    sts->playAlarm((XQSystemToneService::AlarmType)id, ctx);
+    
+    currCtxLabel->setText(QString("Last context: %1").arg(ctx));
+}
+
+void STSTest::playAlarmAsTone()
+{
+    int id = box->itemData(box->currentIndex(), Qt::UserRole).toInt();
+    
+    qDebug("Beep!!! (%d)", id);
+    unsigned int ctx = 0;
+    
+    sts->playAlarm((XQSystemToneService::ToneType)id, ctx);
+    
+    currCtxLabel->setText(QString("Last context: %1").arg(ctx));
+}
+
+void STSTest::stopAlarm()
+{
+    int ctx = spinBox->value();
+
+    qDebug("Silence! (%d)", ctx);
+    sts->stopAlarm(ctx);
+}
+
+void STSTest::startCallback()
+{
+    callbackLabel->setText(QString("SIGNALS: playing tone started..."));
+    callbackCleanTimer.start(1000);
+}
+
+void STSTest::startCallback(unsigned int ctx)
+{
+    callbackLabel->setText(QString("SIGNALS: (%1) playing alarm started...").arg(ctx));
+    callbackCleanTimer.start(1000);
+}
+
+void STSTest::stopCallback(unsigned int ctx)
+{
+    callbackLabel->setText(QString("SIGNALS: (%1) playing alarm finished...").arg(ctx));
+    callbackCleanTimer.start(1000);
+}
+
+void STSTest::cleanCallback()
+{
+    callbackLabel->setText("SIGNALS: ---");
+}
+
+int main(int argc, char* argv[])
+{  
+    QApplication app(argc, argv);
+
+    STSTest* tester = new STSTest();
+    tester->showMaximized();
+
+    int rv = app.exec();
+    delete tester;
+    return rv;
+}
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/systemtoneserviceex/ststest.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,79 @@
+/*
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not,
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+*/
+
+#ifndef T_TEST5_H
+#define T_TEST5_H
+
+#include <QObject>
+#include <QVariant>
+#include <QMainWindow>
+#include <QWidget>
+#include <QComboBox>
+#include <QSpinBox>
+#include <QLabel>
+#include <QTimer>
+
+#include <xqsystemtoneservice.h>
+
+class STSTest : public QMainWindow
+{
+
+Q_OBJECT
+
+public:
+   
+    STSTest(QWidget *parent = 0);
+    
+    ~STSTest();
+    
+public slots: 
+
+    void playTone();
+
+    void playAlarm();
+	
+    void playAlarmAsTone();
+
+    void stopAlarm();
+
+
+    void startCallback();
+
+    void startCallback(unsigned int ctx);
+
+    void stopCallback(unsigned int ctx);
+    
+    void cleanCallback();
+
+private:
+
+    QLabel *callbackLabel;
+    QTimer callbackCleanTimer;
+
+    QLabel *currCtxLabel;
+    QSpinBox *spinBox;
+    QComboBox *box;
+    XQSystemToneService *sts;
+    
+};
+
+#endif // T_TEST5_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/systemtoneserviceex/systemtoneserviceex.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,41 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not,
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = app
+TARGET = SystemToneServiceEx
+QT        += core gui
+
+
+
+INCLUDEPATH += ../../include
+
+SOURCES = ststest.cpp
+
+HEADERS = ststest.h
+		  
+LIBS += -lflogger \
+        -lxqsystemtoneservice
+
+symbian {
+	TARGET.EPOCSTACKSIZE = 0x14000
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.CAPABILITY = ALL -TCB
+    MMP_RULES += EXPORTUNFROZEN
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/utilsex/README.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,24 @@
+Utils
+
+Application description:
+This example is for testing the Utils API.
+
+Features:
+- Shows how to set on/off backlight by resetting the inactivity time
+
+Tested platforms:
+- Qt 4.5.2-tower
+- S60 3th edition FP2 SDK v1.1
+- S60 5th edition SDK v1.0
+
+Phones tested with:
+- N82
+- N95
+- N96
+- 5800 XpressMusic
+
+Notes:
+None
+
+Further improvements:
+None
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/utilsex/UtilsEx.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TARGET = UtilsEx
+TEMPLATE = app
+
+SOURCES += main.cpp \
+    utilsexwindow.cpp
+
+HEADERS += utilsexwindow.h
+
+FORMS += utilsexwindow.ui
+
+INCLUDEPATH += ..\..\include
+
+symbian:LIBS += -lxqutils
+
+symbian: {
+    license.depends = "\"install.txt\" - \"\", FILETEXT, TEXTEXIT"
+    DEPLOYMENT += license
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/utilsex/install.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,55 @@
+IMPORTANT: READ CAREFULLY BEFORE INSTALLING, DOWNLOADING, OR USING THE SOFTWARE
+ 
+NOKIA CORPORATION END-USER SOFTWARE AGREEMENT
+ 
+This Software Agreement ("Agreement") is between You (either an individual or an entity), the End User, and Nokia Corporation ("Nokia").  The Agreement authorizes You to use the Software specified in Clause 1 below, which may be stored on a CD-ROM, sent to You by electronic mail, or downloaded from Nokia’s Web pages or Servers or from other sources under the terms and conditions set forth below. This is an agreement on end-user rights and not an agreement for sale. Nokia continues to own the copy of the Software and the physical media contained in the sales package and any other copy that You are authorized to make pursuant to this Agreement.
+ 
+Read this Agreement carefully before installing, downloading, or using the Software.  By clicking on the "I Accept" button while installing, downloading, and/or using the Software, You agree to the terms and conditions of this Agreement.  If You do not agree to all of the terms and conditions of this Agreement, promptly click the "Decline" or "I Do Not Accept" button, cancel the installation or downloading, or destroy or return the Software and accompanying documentation to Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS.
+ 
+1. SOFTWARE.  As used in this Agreement, the term "Software" means, collectively: (i) the software product identified above (ii) all the contents of the disk(s), CD-ROM(s), electronic mail and its file attachments, or other media with which this Agreement is provided, including the object code form of the software delivered via a CD-ROM, electronic mail, or Web page (iii) digital images, stock photographs, clip art, or other artistic works ("Stock Files") (iv) related explanatory written materials and any other possible documentation related thereto ("Documentation"); (v) fonts, and (vi) upgrades, modified versions, updates, additions, and copies of the Software (collectively "Updates"), if any, licensed to You by Nokia under this Agreement.
+ 
+2. END-USER RIGHTS AND USE. Nokia grants to You non-exclusive, non-transferable end-user rights to install the Software on the local hard disk(s) or other permanent storage media of one computer and use the Software on a single computer or terminal at a time.
+ 
+3. LIMITATIONS ON END-USER RIGHTS.  You may not copy, distribute, or make derivative works of the Software except as follows:
+ 
+(a) You may make one copy of the Software on magnetic media as an archival backup copy, provided Your archival backup copy is not installed or used on any computer. Any other copies You make of the Software are in violation of this Agreement.
+ 
+(b) You may not use, modify, translate, reproduce, or transfer the right to use the Software or copy the Software except as expressly provided in this Agreement.
+ 
+(c) You may not resell, sublicense, rent, lease, or lend the Software.
+ 
+(d) You may not reverse engineer, reverse compile, disassemble, or otherwise attempt to discover the source code of the Software (except to the extent that this restriction is expressly prohibited by law) or create derivative works based on the Software.
+ 
+(e) Unless stated otherwise in the Documentation, You shall not display, modify, reproduce, or distribute any of the Stock Files included with the Software. In the event that the Documentation allows You to display the Stock Files, You shall not distribute the Stock Files on a stand-alone basis, i.e., in circumstances in which the Stock Files constitute the primary value of the product being distributed. You should review the "Readme" files associated with the Stock Files that You use to ascertain what rights You have with respect to such materials. Stock Files may not be used in the production of libelous, defamatory, fraudulent, infringing, lewd, obscene, or pornographic material or in any otherwise illegal manner. You may not register or claim any rights in the Stock Files or derivative works thereof.  
+(f) You agree that You shall only use the Software in a manner that complies with all applicable laws in the jurisdiction in which You use the Software, including, but not limited to, applicable restrictions concerning copyright and other intellectual property rights.
+ 
+4. COPYRIGHT.  The Software and all rights, without limitation including proprietary rights therein, are owned by Nokia and/or its licensors and affiliates and are protected by international treaty provisions and all other applicable national laws of the country in which it is being used. The structure, organization, and code of the Software are the valuable trade secrets and confidential information of Nokia and/or its licensors and affiliates. You must not copy the Software, except as set forth in clause 3 (Limitations On End-User Rights). Any copies which You are permitted to make pursuant to this Agreement must contain the same copyright and other proprietary notices that appear on the Software. 
+ 
+5. MULTIPLE ENVIRONMENT SOFTWARE / MULTIPLE LANGUAGE SOFTWARE / DUAL MEDIA SOFTWARE / MULTIPLE COPIES / UPDATES. If the Software supports multiple platforms or languages, if You receive the Software on multiple media, or if You otherwise receive multiple copies of the Software, the number of computers on which all versions of the Software are installed shall be one computer. You may not rent, lease, sublicense, lend, or transfer versions or copies of the Software You do not use. If the Software is an Update to a previous version of the Software, You must possess valid end-user rights to such a previous version in order to use the Update, and You may use the previous version for ninety (90) days after You receive the Update in order to assist You in the transition to the Update. After such time You no longer have a right to use the previous version, except for the sole purpose of enabling You to install the Update. 
+ 
+6. COMMENCEMENT & TERMINATION.  This Agreement is effective from the first date You install the Software. You may terminate this Agreement at any time by permanently deleting, destroying, and returning, at Your own costs, the Software, all backup copies, and all related materials provided by Nokia. Your end-user rights automatically and immediately terminate without notice from Nokia if You fail to comply with any provision of this Agreement. In such an event, You must immediately delete, destroy, or return at Your own cost, the Software, all backup copies, and all related material to Nokia.
+ 
+7. YOU ACKNOWLEDGE THAT THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NEITHER NOKIA, ITS LICENSORS OR AFFILIATES, NOR THE COPYRIGHT HOLDERS MAKE ANY REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR THAT THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS, OR OTHER RIGHTS.  THERE IS NO WARRANTY BY NOKIA OR BY ANY OTHER PARTY THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE.  YOU ASSUME ALL RESPONSIBILITY AND RISK FOR THE SELECTION OF THE SOFTWARE TO ACHIEVE YOUR INTENDED RESULTS AND FOR THE INSTALLATION, USE, AND RESULTS OBTAINED FROM IT. 
+ 
+8. NO OTHER OBLIGATIONS.  This Agreement creates no obligations on the part of Nokia other than as specifically set forth herein.  
+ 
+9. LIMITATION OF LIABILITY.   TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL NOKIA, ITS EMPLOYEES OR LICENSORS OR AFFILIATES BE LIABLE FOR ANY LOST PROFITS, REVENUE, SALES, DATA, OR COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, PROPERTY DAMAGE, PERSONAL INJURY, INTERRUPTION OF BUSINESS, LOSS OF BUSINESS INFORMATION, OR FOR ANY SPECIAL, DIRECT, INDIRECT, INCIDENTAL, ECONOMIC, COVER, PUNITIVE, SPECIAL, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND WHETHER ARISING UNDER CONTRACT, TORT, NEGLIGENCE, OR OTHER THEORY OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF NOKIA OR ITS LICENSORS OR AFFILIATES ARE ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME COUNTRIES/STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF LIABILITY, BUT MAY ALLOW LIABILITY TO BE LIMITED, IN SUCH CASES, NOKIA, ITS EMPLOYEES OR LICENSORS OR AFFILIATES' LIABILITY SHALL BE LIMITED TO U.S. $50. 
+Nothing contained in this Agreement shall prejudice the statutory rights of any party dealing as a consumer. Nothing contained in this Agreement limits Nokia's liability to You in the event of death or personal injury resulting from Nokia's negligence. Nokia is acting on behalf of its employees and licensors or affiliates for the purpose of disclaiming, excluding, and/or restricting obligations, warranties, and liability as provided in this clause 9, but in no other respects and for no other purpose. 
+10. TECHNICAL SUPPORT.  Nokia has no obligation to furnish You with technical support unless separately agreed in writing between You and Nokia.
+ 
+11. EXPORT CONTROL. The Software, including technical data, includes cryptographic software subject to export controls under the U.S. Export Administration Regulations ("EAR") and may be subject to import or export controls in other countries. The EAR prohibits the use of the Software and technical data by a Government End User, as defined hereafter, without a license from the U.S. government. A Government End User is defined in Part 772 of the EAR as "any foreign central, regional, or local government department, agency, or other entity performing governmental functions; including governmental research institutions, governmental corporations, or their separate business units (as defined in part 772 of the EAR) which are engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List, and international governmental organizations. This term does not include: utilities (telecommunications companies and Internet service providers; banks and financial institutions; transportation; broadcast or entertainment; educational organizations; civil health and medical organizations; retail or wholesale firms; and manufacturing or industrial entities not engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List.)" You agree to strictly comply with all applicable import and export regulations and acknowledge that You have the responsibility to obtain licenses to export, re-export, transfer, or import the Software. You further represent that You are not a Government End User as defined above, and You will not transfer the Software to any Government End User without a license.
+ 
+12. NOTICES.  All notices and return of the Software and Documentation should be delivered to:  
+ 
+NOKIA CORPORATION
+P.O. Box 100 
+FIN-00045 NOKIA GROUP
+FINLAND
+ 
+13.  APPLICABLE LAW & GENERAL PROVISIONS.
+ 
+This Agreement is governed by the laws of Finland.  All disputes arising from or relating to this Agreement shall be settled by a single arbitrator appointed by the Central Chamber of Commerce of Finland. The arbitration procedure shall take place in Helsinki, Finland in the English language. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. This Agreement may only be modified in writing by an authorized officer of Nokia.
+ 
+This is the entire agreement between Nokia and You relating to the Software, and it supersedes any prior representations, discussions, undertakings, end-user agreements, communications, or advertising relating to the Software.
+ 
+PLEASE SUBMIT ANY ACCOMPANYING REGISTRATION FORMS TO RECEIVE REGISTRATION BENEFITS WHERE APPLICABLE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/utilsex/main.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QtGui/QApplication>
+#include "utilsexwindow.h"
+
+int main(int argc, char* argv[])
+{
+    QApplication a(argc, argv);
+    UtilsExWindow w;
+    w.showMaximized();
+    return a.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/utilsex/utilsexwindow.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+ #include <QInputDialog>
+#include "utilsexwindow.h"
+#include "xqutils.h"
+
+UtilsExWindow::UtilsExWindow(QWidget* parent)
+    : QMainWindow(parent)
+{
+    setupUi(this);
+    
+    m_utils = new XQUtils(this);
+    m_timer = new QTimer(this);
+    
+    
+    QString imagesPath = XQUtils::imagesPath();
+    
+    useResetInactivityTime();
+    setuUiComponents();
+}
+
+UtilsExWindow::~UtilsExWindow()
+{
+}
+
+void UtilsExWindow::useResetInactivityTime()
+{
+    m_timer->setInterval(1000);
+    m_timer->start();
+    connect(m_timer, SIGNAL(timeout()), m_utils, SLOT(resetInactivityTime()));
+}
+
+void UtilsExWindow::setuUiComponents()
+{
+    startLitButton->hide();
+    connect(stopLitButton, SIGNAL(clicked()), m_timer, SLOT(stop()));
+    connect(stopLitButton, SIGNAL(clicked()), stopLitButton, SLOT(hide()));
+    connect(startLitButton, SIGNAL(clicked()), m_timer, SLOT(start()));
+    connect(startLitButton, SIGNAL(clicked()), startLitButton, SLOT(hide()));
+    connect(startLitButton, SIGNAL(clicked()), stopLitButton, SLOT(show()));
+    connect(startLitButton, SIGNAL(clicked()), stopLitButton, SLOT(setFocus()));
+    connect(stopLitButton, SIGNAL(clicked()), startLitButton, SLOT(show()));
+    connect(stopLitButton, SIGNAL(clicked()), startLitButton, SLOT(setFocus()));
+    
+    m_exitAction = new QAction(tr("Exit"), this);
+    menuBar()->addAction(m_exitAction);
+    connect(m_exitAction, SIGNAL(triggered()), this, SLOT(close()));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/utilsex/utilsexwindow.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef UTILSEXWINDOW_H
+#define UTILSEXWINDOW_H
+
+#include <QtGui>
+#include "xqutils.h"
+
+#include "ui_utilsexwindow.h"
+
+class XQUtils;
+
+class UtilsExWindow : public QMainWindow,
+    public Ui::UtilsExWindowClass
+{
+    Q_OBJECT
+public:
+    UtilsExWindow(QWidget* parent = 0);
+    ~UtilsExWindow();
+    
+public:
+    void useResetInactivityTime();
+    void setuUiComponents();
+    
+private:
+    XQUtils* m_utils;
+    QTimer* m_timer;
+    QAction* m_exitAction;
+};
+
+#endif // UTILSEXWINDOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/examples/utilsex/utilsexwindow.ui	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,46 @@
+<ui version="4.0" >
+ <class>UtilsExWindowClass</class>
+ <widget class="QMainWindow" name="UtilsExWindowClass" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>459</width>
+    <height>485</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string>UtilsEx</string>
+  </property>
+  <widget class="QWidget" name="centralwidget" >
+   <layout class="QVBoxLayout" name="verticalLayout_2" >
+    <item>
+     <layout class="QVBoxLayout" name="verticalLayout" >
+      <item>
+       <widget class="QPushButton" name="startLitButton" >
+        <property name="text" >
+         <string>Light ON</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="stopLitButton" >
+        <property name="text" >
+         <string>Light OFF</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQCentralRepositorySearchCriteria	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqcentralrepositorysearchcriteria.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQCentralRepositorySettingsKey	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqsettingskey.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQCentralRepositoryUtils	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqcentralrepositoryutils.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQConversions	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqconversions.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQKeyCapture	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqkeycapture.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQPublishAndSubscribeSecurityPolicy	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqpublishandsubscribesecuritypolicy.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQPublishAndSubscribeSettingsKey	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqsettingskey.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQPublishAndSubscribeUtils	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqpublishandsubscribeutils.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQSettingsKey	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqsettingskey.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQSettingsManager	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqsettingsmanager.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQSysInfo	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqsysinfo.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQSystemToneService	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqsystemtoneservice.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/include/XQUtils	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1 @@
+#include "xqutils.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/install/install.txt	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,55 @@
+IMPORTANT: READ CAREFULLY BEFORE INSTALLING, DOWNLOADING, OR USING THE SOFTWARE
+ 
+NOKIA CORPORATION END-USER SOFTWARE AGREEMENT
+ 
+This Software Agreement ("Agreement") is between You (either an individual or an entity), the End User, and Nokia Corporation ("Nokia").  The Agreement authorizes You to use the Software specified in Clause 1 below, which may be stored on a CD-ROM, sent to You by electronic mail, or downloaded from Nokia’s Web pages or Servers or from other sources under the terms and conditions set forth below. This is an agreement on end-user rights and not an agreement for sale. Nokia continues to own the copy of the Software and the physical media contained in the sales package and any other copy that You are authorized to make pursuant to this Agreement.
+ 
+Read this Agreement carefully before installing, downloading, or using the Software.  By clicking on the "I Accept" button while installing, downloading, and/or using the Software, You agree to the terms and conditions of this Agreement.  If You do not agree to all of the terms and conditions of this Agreement, promptly click the "Decline" or "I Do Not Accept" button, cancel the installation or downloading, or destroy or return the Software and accompanying documentation to Nokia. YOU AGREE THAT YOUR USE OF THE SOFTWARE ACKNOWLEDGES THAT YOU HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS.
+ 
+1. SOFTWARE.  As used in this Agreement, the term "Software" means, collectively: (i) the software product identified above (ii) all the contents of the disk(s), CD-ROM(s), electronic mail and its file attachments, or other media with which this Agreement is provided, including the object code form of the software delivered via a CD-ROM, electronic mail, or Web page (iii) digital images, stock photographs, clip art, or other artistic works ("Stock Files") (iv) related explanatory written materials and any other possible documentation related thereto ("Documentation"); (v) fonts, and (vi) upgrades, modified versions, updates, additions, and copies of the Software (collectively "Updates"), if any, licensed to You by Nokia under this Agreement.
+ 
+2. END-USER RIGHTS AND USE. Nokia grants to You non-exclusive, non-transferable end-user rights to install the Software on the local hard disk(s) or other permanent storage media of one computer and use the Software on a single computer or terminal at a time.
+ 
+3. LIMITATIONS ON END-USER RIGHTS.  You may not copy, distribute, or make derivative works of the Software except as follows:
+ 
+(a) You may make one copy of the Software on magnetic media as an archival backup copy, provided Your archival backup copy is not installed or used on any computer. Any other copies You make of the Software are in violation of this Agreement.
+ 
+(b) You may not use, modify, translate, reproduce, or transfer the right to use the Software or copy the Software except as expressly provided in this Agreement.
+ 
+(c) You may not resell, sublicense, rent, lease, or lend the Software.
+ 
+(d) You may not reverse engineer, reverse compile, disassemble, or otherwise attempt to discover the source code of the Software (except to the extent that this restriction is expressly prohibited by law) or create derivative works based on the Software.
+ 
+(e) Unless stated otherwise in the Documentation, You shall not display, modify, reproduce, or distribute any of the Stock Files included with the Software. In the event that the Documentation allows You to display the Stock Files, You shall not distribute the Stock Files on a stand-alone basis, i.e., in circumstances in which the Stock Files constitute the primary value of the product being distributed. You should review the "Readme" files associated with the Stock Files that You use to ascertain what rights You have with respect to such materials. Stock Files may not be used in the production of libelous, defamatory, fraudulent, infringing, lewd, obscene, or pornographic material or in any otherwise illegal manner. You may not register or claim any rights in the Stock Files or derivative works thereof.  
+(f) You agree that You shall only use the Software in a manner that complies with all applicable laws in the jurisdiction in which You use the Software, including, but not limited to, applicable restrictions concerning copyright and other intellectual property rights.
+ 
+4. COPYRIGHT.  The Software and all rights, without limitation including proprietary rights therein, are owned by Nokia and/or its licensors and affiliates and are protected by international treaty provisions and all other applicable national laws of the country in which it is being used. The structure, organization, and code of the Software are the valuable trade secrets and confidential information of Nokia and/or its licensors and affiliates. You must not copy the Software, except as set forth in clause 3 (Limitations On End-User Rights). Any copies which You are permitted to make pursuant to this Agreement must contain the same copyright and other proprietary notices that appear on the Software. 
+ 
+5. MULTIPLE ENVIRONMENT SOFTWARE / MULTIPLE LANGUAGE SOFTWARE / DUAL MEDIA SOFTWARE / MULTIPLE COPIES / UPDATES. If the Software supports multiple platforms or languages, if You receive the Software on multiple media, or if You otherwise receive multiple copies of the Software, the number of computers on which all versions of the Software are installed shall be one computer. You may not rent, lease, sublicense, lend, or transfer versions or copies of the Software You do not use. If the Software is an Update to a previous version of the Software, You must possess valid end-user rights to such a previous version in order to use the Update, and You may use the previous version for ninety (90) days after You receive the Update in order to assist You in the transition to the Update. After such time You no longer have a right to use the previous version, except for the sole purpose of enabling You to install the Update. 
+ 
+6. COMMENCEMENT & TERMINATION.  This Agreement is effective from the first date You install the Software. You may terminate this Agreement at any time by permanently deleting, destroying, and returning, at Your own costs, the Software, all backup copies, and all related materials provided by Nokia. Your end-user rights automatically and immediately terminate without notice from Nokia if You fail to comply with any provision of this Agreement. In such an event, You must immediately delete, destroy, or return at Your own cost, the Software, all backup copies, and all related material to Nokia.
+ 
+7. YOU ACKNOWLEDGE THAT THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NEITHER NOKIA, ITS LICENSORS OR AFFILIATES, NOR THE COPYRIGHT HOLDERS MAKE ANY REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR THAT THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS, OR OTHER RIGHTS.  THERE IS NO WARRANTY BY NOKIA OR BY ANY OTHER PARTY THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE.  YOU ASSUME ALL RESPONSIBILITY AND RISK FOR THE SELECTION OF THE SOFTWARE TO ACHIEVE YOUR INTENDED RESULTS AND FOR THE INSTALLATION, USE, AND RESULTS OBTAINED FROM IT. 
+ 
+8. NO OTHER OBLIGATIONS.  This Agreement creates no obligations on the part of Nokia other than as specifically set forth herein.  
+ 
+9. LIMITATION OF LIABILITY.   TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL NOKIA, ITS EMPLOYEES OR LICENSORS OR AFFILIATES BE LIABLE FOR ANY LOST PROFITS, REVENUE, SALES, DATA, OR COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, PROPERTY DAMAGE, PERSONAL INJURY, INTERRUPTION OF BUSINESS, LOSS OF BUSINESS INFORMATION, OR FOR ANY SPECIAL, DIRECT, INDIRECT, INCIDENTAL, ECONOMIC, COVER, PUNITIVE, SPECIAL, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND WHETHER ARISING UNDER CONTRACT, TORT, NEGLIGENCE, OR OTHER THEORY OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF NOKIA OR ITS LICENSORS OR AFFILIATES ARE ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME COUNTRIES/STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF LIABILITY, BUT MAY ALLOW LIABILITY TO BE LIMITED, IN SUCH CASES, NOKIA, ITS EMPLOYEES OR LICENSORS OR AFFILIATES' LIABILITY SHALL BE LIMITED TO U.S. $50. 
+Nothing contained in this Agreement shall prejudice the statutory rights of any party dealing as a consumer. Nothing contained in this Agreement limits Nokia's liability to You in the event of death or personal injury resulting from Nokia's negligence. Nokia is acting on behalf of its employees and licensors or affiliates for the purpose of disclaiming, excluding, and/or restricting obligations, warranties, and liability as provided in this clause 9, but in no other respects and for no other purpose. 
+10. TECHNICAL SUPPORT.  Nokia has no obligation to furnish You with technical support unless separately agreed in writing between You and Nokia.
+ 
+11. EXPORT CONTROL. The Software, including technical data, includes cryptographic software subject to export controls under the U.S. Export Administration Regulations ("EAR") and may be subject to import or export controls in other countries. The EAR prohibits the use of the Software and technical data by a Government End User, as defined hereafter, without a license from the U.S. government. A Government End User is defined in Part 772 of the EAR as "any foreign central, regional, or local government department, agency, or other entity performing governmental functions; including governmental research institutions, governmental corporations, or their separate business units (as defined in part 772 of the EAR) which are engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List, and international governmental organizations. This term does not include: utilities (telecommunications companies and Internet service providers; banks and financial institutions; transportation; broadcast or entertainment; educational organizations; civil health and medical organizations; retail or wholesale firms; and manufacturing or industrial entities not engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List.)" You agree to strictly comply with all applicable import and export regulations and acknowledge that You have the responsibility to obtain licenses to export, re-export, transfer, or import the Software. You further represent that You are not a Government End User as defined above, and You will not transfer the Software to any Government End User without a license.
+ 
+12. NOTICES.  All notices and return of the Software and Documentation should be delivered to:  
+ 
+NOKIA CORPORATION
+P.O. Box 100 
+FIN-00045 NOKIA GROUP
+FINLAND
+ 
+13.  APPLICABLE LAW & GENERAL PROVISIONS.
+ 
+This Agreement is governed by the laws of Finland.  All disputes arising from or relating to this Agreement shall be settled by a single arbitrator appointed by the Central Chamber of Commerce of Finland. The arbitration procedure shall take place in Helsinki, Finland in the English language. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. This Agreement may only be modified in writing by an authorized officer of Nokia.
+ 
+This is the entire agreement between Nokia and You relating to the Software, and it supersedes any prior representations, discussions, undertakings, end-user agreements, communications, or advertising relating to the Software.
+ 
+PLEASE SUBMIT ANY ACCOMPANYING REGISTRATION FORMS TO RECEIVE REGISTRATION BENEFITS WHERE APPLICABLE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/install/keycapture.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+SUBDIRS = ../src/keycapture
+    
+symbian: {
+    load(data_caging_paths)
+    VERSION=0.1.0
+
+    qtmobileextension.sources = xqkeycapture.dll
+    qtmobileextension.path = /sys/bin
+    qtmobileextension.depends = "(0x2001e61c), 4, 5, 0, {\"QtLibs pre-release\"}"
+
+    license.depends = "\"install.txt\" - \"\", FILETEXT, TEXTEXIT"
+    DEPLOYMENT += license qtmobileextension
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/install/qt_mobile_extensions.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+
+symbian: {
+    load(data_caging_paths)
+
+    SUBDIRS=
+    TARGET = "Qt S60 Mobile Extensions pre-release"
+    TARGET.UID3 = 0x2001EC61
+    VERSION=0.1.0
+
+    qtmobileextensions.sources = \
+        xqsettingsmanager.dll \
+        xqsysinfo.dll \
+        xqutils.dll \
+        
+    qtmobileextensions.path = /sys/bin
+    qtmobileextensions.depends = "(0x2001e61c), 4, 5, 0, {\"QtLibs pre-release\"}"
+
+    DEPLOYMENT += qtmobileextensions
+
+    license.depends = "\"install.txt\" - \"\", FILETEXT, TEXTEXIT"
+    DEPLOYMENT += license
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/install/settingsmanager.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+SUBDIRS = ../src/settingsmanager
+    
+symbian: {
+    load(data_caging_paths)
+    VERSION=0.1.0
+
+    qtmobileextension.sources = xqsettingsmanager.dll
+    qtmobileextension.path = /sys/bin
+    qtmobileextension.depends = "(0x2001e61c), 4, 5, 0, {\"QtLibs pre-release\"}"
+
+    license.depends = "\"install.txt\" - \"\", FILETEXT, TEXTEXIT"
+    DEPLOYMENT += license qtmobileextension
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/install/sysinfo.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+SUBDIRS = ../src/sysinfo
+    
+symbian: {
+    load(data_caging_paths)
+    VERSION=0.1.0
+
+    qtmobileextension.sources = xqsysinfo.dll
+    qtmobileextension.path = /sys/bin
+    qtmobileextension.depends = "(0x2001e61c), 4, 5, 0, {\"QtLibs pre-release\"}"
+
+    license.depends = "\"install.txt\" - \"\", FILETEXT, TEXTEXIT"
+    DEPLOYMENT += license qtmobileextension
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/install/systemtoneservice.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+SUBDIRS = ../src/systemtoneservice
+    
+symbian: {
+    load(data_caging_paths)
+    VERSION=0.1.0
+
+    qtmobileextension.sources = xqsystemtoneservice.dll
+    qtmobileextension.path = /sys/bin
+    qtmobileextension.depends = "(0x2001e61c), 4, 5, 0, {\"QtLibs pre-release\"}"
+
+    license.depends = "\"install.txt\" - \"\", FILETEXT, TEXTEXIT"
+    DEPLOYMENT += license qtmobileextension
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/install/utils.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+SUBDIRS = ../src/utils
+    
+symbian: {
+    load(data_caging_paths)
+    VERSION=0.1.0
+
+    qtmobileextension.sources = xqutils.dll
+    qtmobileextension.path = /sys/bin
+    qtmobileextension.depends = "(0x2001e61c), 4, 5, 0, {\"QtLibs pre-release\"}"
+
+    license.depends = "\"install.txt\" - \"\", FILETEXT, TEXTEXIT"
+    DEPLOYMENT += license qtmobileextension
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/qtmobileextensions.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:                                                         
+#
+
+TEMPLATE = subdirs
+CONFIG += ordered
+SUBDIRS = src/settingsmanager \
+          src/sysinfo \
+          src/utils \
+          src/keycapture \
+          src/systemtoneservice
+
+symbian {
+BLD_INF_RULES.prj_exports += "./src/settingsmanager/settingsmanager_global.h               $$MW_LAYER_PLATFORM_EXPORT_PATH(settingsmanager_global.h)"
+BLD_INF_RULES.prj_exports += "./src/settingsmanager/xqcentralrepositorysearchcriteria.h    $$MW_LAYER_PLATFORM_EXPORT_PATH(xqcentralrepositorysearchcriteria.h)"
+BLD_INF_RULES.prj_exports += "./include/XQCentralRepositorySearchCriteria                  $$MW_LAYER_PLATFORM_EXPORT_PATH(XQCentralRepositorySearchCriteria)"
+BLD_INF_RULES.prj_exports += "./src/settingsmanager/xqcentralrepositoryutils.h             $$MW_LAYER_PLATFORM_EXPORT_PATH(xqcentralrepositoryutils.h)"
+BLD_INF_RULES.prj_exports += "./include/XQCentralRepositoryUtils                           $$MW_LAYER_PLATFORM_EXPORT_PATH(XQCentralRepositoryUtils)"
+BLD_INF_RULES.prj_exports += "./src/settingsmanager/xqpublishandsubscribesecuritypolicy.h  $$MW_LAYER_PLATFORM_EXPORT_PATH(xqpublishandsubscribesecuritypolicy.h)"
+BLD_INF_RULES.prj_exports += "./include/XQPublishAndSubscribeSecurityPolicy                $$MW_LAYER_PLATFORM_EXPORT_PATH(XQPublishAndSubscribeSecurityPolicy)"
+BLD_INF_RULES.prj_exports += "./src/settingsmanager/xqpublishandsubscribeutils.h           $$MW_LAYER_PLATFORM_EXPORT_PATH(xqpublishandsubscribeutils.h)"
+BLD_INF_RULES.prj_exports += "./include/XQPublishAndSubscribeUtils                         $$MW_LAYER_PLATFORM_EXPORT_PATH(XQPublishAndSubscribeUtils)"
+BLD_INF_RULES.prj_exports += "./src/settingsmanager/xqsettingskey.h                        $$MW_LAYER_PLATFORM_EXPORT_PATH(xqsettingskey.h)"
+BLD_INF_RULES.prj_exports += "./include/XQCentralRepositorySettingsKey                     $$MW_LAYER_PLATFORM_EXPORT_PATH(XQCentralRepositorySettingsKey)"
+BLD_INF_RULES.prj_exports += "./include/XQPublishAndSubscribeSettingsKey                   $$MW_LAYER_PLATFORM_EXPORT_PATH(XQPublishAndSubscribeSettingsKey)"
+BLD_INF_RULES.prj_exports += "./include/XQSettingsKey                                      $$MW_LAYER_PLATFORM_EXPORT_PATH(XQSettingsKey)"
+BLD_INF_RULES.prj_exports += "./src/settingsmanager/xqsettingsmanager.h                    $$MW_LAYER_PLATFORM_EXPORT_PATH(xqsettingsmanager.h)"
+BLD_INF_RULES.prj_exports += "./include/XQSettingsManager                                  $$MW_LAYER_PLATFORM_EXPORT_PATH(XQSettingsManager)"
+BLD_INF_RULES.prj_exports += "./src/sysinfo/sysinfo_global.h                               $$MW_LAYER_PLATFORM_EXPORT_PATH(sysinfo_global.h)"
+BLD_INF_RULES.prj_exports += "./src/sysinfo/xqsysinfo.h                                    $$MW_LAYER_PLATFORM_EXPORT_PATH(xqsysinfo.h)"
+BLD_INF_RULES.prj_exports += "./include/XQSysInfo                                          $$MW_LAYER_PLATFORM_EXPORT_PATH(XQSysInfo)"
+BLD_INF_RULES.prj_exports += "./src/utils/utils_global.h                                   $$MW_LAYER_PLATFORM_EXPORT_PATH(utils_global.h)"
+BLD_INF_RULES.prj_exports += "./src/utils/xqutils.h                                        $$MW_LAYER_PLATFORM_EXPORT_PATH(xqutils.h)"
+BLD_INF_RULES.prj_exports += "./include/XQUtils                                            $$MW_LAYER_PLATFORM_EXPORT_PATH(XQUtils)"
+BLD_INF_RULES.prj_exports += "./src/utils/xqconversions.h                                  $$MW_LAYER_PLATFORM_EXPORT_PATH(xqconversions.h)"
+BLD_INF_RULES.prj_exports += "./include/XQConversions                                      $$MW_LAYER_PLATFORM_EXPORT_PATH(XQConversions)"
+BLD_INF_RULES.prj_exports += "./src/keycapture/xqkeycapture.h                              $$MW_LAYER_PLATFORM_EXPORT_PATH(xqkeycapture.h)"
+BLD_INF_RULES.prj_exports += "./include/XQKeyCapture                                       $$MW_LAYER_PLATFORM_EXPORT_PATH(XQKeyCapture)"
+BLD_INF_RULES.prj_exports += "./src/systemtoneservice/xqsystemtoneservice.h                $$MW_LAYER_PLATFORM_EXPORT_PATH(xqsystemtoneservice.h)"
+BLD_INF_RULES.prj_exports += "./include/XQSystemToneService                                $$MW_LAYER_PLATFORM_EXPORT_PATH(XQSystemToneService)"
+BLD_INF_RULES.prj_exports += "./rom/qtmobileextensions.iby                                 $$CORE_MW_LAYER_IBY_EXPORT_PATH(qtmobileextensions.iby)"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/rom/qtmobileextensions.iby	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description: 
+*
+*/
+
+#ifndef __QT_MOBILEEXTENSIONS_IBY__
+#define __QT_MOBILEEXTENSIONS_IBY__
+
+#include <bldvariant.hrh>
+
+file=ABI_DIR\BUILD_DIR\xqsettingsmanager.dll     SHARED_LIB_DIR\xqsettingsmanager.dll    PAGED
+file=ABI_DIR\BUILD_DIR\xqsysinfo.dll             SHARED_LIB_DIR\xqsysinfo.dll            PAGED
+file=ABI_DIR\BUILD_DIR\xqutils.dll               SHARED_LIB_DIR\xqutils.dll              PAGED
+file=ABI_DIR\BUILD_DIR\xqkeycapture.dll          SHARED_LIB_DIR\xqkeycapture.dll         PAGED
+file=ABI_DIR\BUILD_DIR\xqsystemtoneservice.dll   SHARED_LIB_DIR\xqsystemtoneservice.dll  PAGED
+
+#endif // __QT_MOBILEEXTENSIONS_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/bwins/xqkeycaptureu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,62 @@
+EXPORTS
+	?errorId@XqKeyCapture@@QBEHXZ @ 1 NONAME ; int XqKeyCapture::errorId(void) const
+	?captureLongKey@XqKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 2 NONAME ; bool XqKeyCapture::captureLongKey(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XqKeyCapture::LongFlags)
+	?captureKeyUpAndDowns@XqKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 3 NONAME ; bool XqKeyCapture::captureKeyUpAndDowns(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	??0XqKeyCapture@@QAE@XZ @ 4 NONAME ; XqKeyCapture::XqKeyCapture(void)
+	?cancelCaptureKeyUpAndDowns@XqKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 5 NONAME ; bool XqKeyCapture::cancelCaptureKeyUpAndDowns(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureLongKey@XqKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 6 NONAME ; bool XqKeyCapture::cancelCaptureLongKey(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XqKeyCapture::LongFlags)
+	?cancelCaptureKey@XqKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 7 NONAME ; bool XqKeyCapture::cancelCaptureKey(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?errorString@XqKeyCapture@@QBE?AVQString@@XZ @ 8 NONAME ; class QString XqKeyCapture::errorString(void) const
+	?captureKey@XqKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 9 NONAME ; bool XqKeyCapture::captureKey(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	??1XqKeyCapture@@QAE@XZ @ 10 NONAME ; XqKeyCapture::~XqKeyCapture(void)
+	?captureKeyUpAndDowns@XqKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0@Z @ 11 NONAME ; bool XqKeyCapture::captureKeyUpAndDowns(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureKey@XqKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0@Z @ 12 NONAME ; bool XqKeyCapture::captureKey(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureKeyUpAndDowns@XqKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0@Z @ 13 NONAME ; bool XqKeyCapture::cancelCaptureKeyUpAndDowns(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureLongKey@XqKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0W4LongFlags@1@@Z @ 14 NONAME ; bool XqKeyCapture::captureLongKey(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XqKeyCapture::LongFlags)
+	?cancelCaptureKey@XqKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0@Z @ 15 NONAME ; bool XqKeyCapture::cancelCaptureKey(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureLongKey@XqKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0W4LongFlags@1@@Z @ 16 NONAME ; bool XqKeyCapture::cancelCaptureLongKey(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XqKeyCapture::LongFlags)
+	?captureKey@XqKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 17 NONAME ; bool XqKeyCapture::captureKey(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureKeyUpAndDowns@XqKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 18 NONAME ; bool XqKeyCapture::cancelCaptureKeyUpAndDowns(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureLongKey@XqKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 19 NONAME ; bool XqKeyCapture::cancelCaptureLongKey(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XqKeyCapture::LongFlags)
+	?captureLongKey@XqKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 20 NONAME ; bool XqKeyCapture::captureLongKey(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XqKeyCapture::LongFlags)
+	?captureKeyUpAndDowns@XqKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 21 NONAME ; bool XqKeyCapture::captureKeyUpAndDowns(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureKeyUpAndDowns@XqKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 22 NONAME ; bool XqKeyCapture::captureKeyUpAndDowns(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureKey@XqKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 23 NONAME ; bool XqKeyCapture::cancelCaptureKey(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureLongKey@XqKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 24 NONAME ; bool XqKeyCapture::captureLongKey(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XqKeyCapture::LongFlags)
+	?cancelCaptureKey@XqKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 25 NONAME ; bool XqKeyCapture::cancelCaptureKey(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureLongKey@XqKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 26 NONAME ; bool XqKeyCapture::cancelCaptureLongKey(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XqKeyCapture::LongFlags)
+	?cancelCaptureKeyUpAndDowns@XqKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 27 NONAME ; bool XqKeyCapture::cancelCaptureKeyUpAndDowns(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureKey@XqKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 28 NONAME ; bool XqKeyCapture::captureKey(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureLongKey@XQKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 29 NONAME ; bool XQKeyCapture::captureLongKey(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XQKeyCapture::LongFlags)
+	?captureLongKey@XQKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 30 NONAME ; bool XQKeyCapture::captureLongKey(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XQKeyCapture::LongFlags)
+	?cancelCaptureKey@XQKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0@Z @ 31 NONAME ; bool XQKeyCapture::cancelCaptureKey(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureKeyUpAndDowns@XQKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 32 NONAME ; bool XQKeyCapture::captureKeyUpAndDowns(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureKey@XQKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 33 NONAME ; bool XQKeyCapture::cancelCaptureKey(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureLongKey@XQKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 34 NONAME ; bool XQKeyCapture::captureLongKey(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XQKeyCapture::LongFlags)
+	?captureKey@XQKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0@Z @ 35 NONAME ; bool XQKeyCapture::captureKey(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureKey@XQKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 36 NONAME ; bool XQKeyCapture::cancelCaptureKey(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureKey@XQKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 37 NONAME ; bool XQKeyCapture::cancelCaptureKey(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureKeyUpAndDowns@XQKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0@Z @ 38 NONAME ; bool XQKeyCapture::cancelCaptureKeyUpAndDowns(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureLongKey@XQKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0W4LongFlags@1@@Z @ 39 NONAME ; bool XQKeyCapture::captureLongKey(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XQKeyCapture::LongFlags)
+	??0XQKeyCapture@@QAE@XZ @ 40 NONAME ; XQKeyCapture::XQKeyCapture(void)
+	?cancelCaptureKeyUpAndDowns@XQKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 41 NONAME ; bool XQKeyCapture::cancelCaptureKeyUpAndDowns(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureKey@XQKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 42 NONAME ; bool XQKeyCapture::captureKey(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?errorId@XQKeyCapture@@QBEHXZ @ 43 NONAME ; int XQKeyCapture::errorId(void) const
+	?captureKey@XQKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 44 NONAME ; bool XQKeyCapture::captureKey(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureKeyUpAndDowns@XQKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0@Z @ 45 NONAME ; bool XQKeyCapture::captureKeyUpAndDowns(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureKeyUpAndDowns@XQKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 46 NONAME ; bool XQKeyCapture::cancelCaptureKeyUpAndDowns(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureLongKey@XQKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 47 NONAME ; bool XQKeyCapture::cancelCaptureLongKey(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XQKeyCapture::LongFlags)
+	?captureKey@XQKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 48 NONAME ; bool XQKeyCapture::captureKey(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureLongKey@XQKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 49 NONAME ; bool XQKeyCapture::cancelCaptureLongKey(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XQKeyCapture::LongFlags)
+	?captureKeyUpAndDowns@XQKeyCapture@@QAE_NV?$QList@W4Key@Qt@@@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 50 NONAME ; bool XQKeyCapture::captureKeyUpAndDowns(class QList<enum Qt::Key>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?captureKeyUpAndDowns@XQKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 51 NONAME ; bool XQKeyCapture::captureKeyUpAndDowns(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	??1XQKeyCapture@@QAE@XZ @ 52 NONAME ; XQKeyCapture::~XQKeyCapture(void)
+	?captureRemoteKeys@XQKeyCapture@@QAE_NV?$QFlags@W4CapturingFlag@XQKeyCapture@@@@@Z @ 53 NONAME ; bool XQKeyCapture::captureRemoteKeys(class QFlags<enum XQKeyCapture::CapturingFlag>)
+	?cancelCaptureRemoteKeys@XQKeyCapture@@QAE_NV?$QFlags@W4CapturingFlag@XQKeyCapture@@@@@Z @ 54 NONAME ; bool XQKeyCapture::cancelCaptureRemoteKeys(class QFlags<enum XQKeyCapture::CapturingFlag>)
+	?errorString@XQKeyCapture@@QBE?AVQString@@XZ @ 55 NONAME ; class QString XQKeyCapture::errorString(void) const
+	?cancelCaptureLongKey@XQKeyCapture@@QAE_NV?$QList@I@@V?$QFlags@W4KeyboardModifier@Qt@@@@1W4LongFlags@1@@Z @ 56 NONAME ; bool XQKeyCapture::cancelCaptureLongKey(class QList<unsigned int>, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XQKeyCapture::LongFlags)
+	?cancelCaptureKeyUpAndDowns@XQKeyCapture@@QAE_NW4Key@Qt@@V?$QFlags@W4KeyboardModifier@Qt@@@@1@Z @ 57 NONAME ; bool XQKeyCapture::cancelCaptureKeyUpAndDowns(enum Qt::Key, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>)
+	?cancelCaptureLongKey@XQKeyCapture@@QAE_NIV?$QFlags@W4KeyboardModifier@Qt@@@@0W4LongFlags@1@@Z @ 58 NONAME ; bool XQKeyCapture::cancelCaptureLongKey(unsigned int, class QFlags<enum Qt::KeyboardModifier>, class QFlags<enum Qt::KeyboardModifier>, enum XQKeyCapture::LongFlags)
+	?remoteEventType_KeyRelease@XQKeyCapture@@SA?AW4Type@QEvent@@XZ @ 59 NONAME ; enum QEvent::Type XQKeyCapture::remoteEventType_KeyRelease(void)
+	?remoteEventType_KeyPress@XQKeyCapture@@SA?AW4Type@QEvent@@XZ @ 60 NONAME ; enum QEvent::Type XQKeyCapture::remoteEventType_KeyPress(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/bwins/xqsettingsmanageru.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,68 @@
+EXPORTS
+	??_EXQPublishAndSubscribeUtils@@UAE@I@Z @ 1 NONAME ; XQPublishAndSubscribeUtils::~XQPublishAndSubscribeUtils(unsigned int)
+	?commitTransaction@XQCentralRepositoryUtils@@QAE_NJ@Z @ 2 NONAME ; bool XQCentralRepositoryUtils::commitTransaction(long)
+	??1XQSettingsKey@@QAE@XZ @ 3 NONAME ; XQSettingsKey::~XQSettingsKey(void)
+	?tr@XQSettingsManager@@SA?AVQString@@PBD0@Z @ 4 NONAME ; class QString XQSettingsManager::tr(char const *, char const *)
+	?itemDeleted@XQSettingsManager@@IAEXABVXQSettingsKey@@@Z @ 5 NONAME ; void XQSettingsManager::itemDeleted(class XQSettingsKey const &)
+	??0XQPublishAndSubscribeSecurityPolicy@@QAE@VVendorId@0@V?$QList@W4Capability@XQPublishAndSubscribeSecurityPolicy@@@@@Z @ 6 NONAME ; XQPublishAndSubscribeSecurityPolicy::XQPublishAndSubscribeSecurityPolicy(class XQPublishAndSubscribeSecurityPolicy::VendorId, class QList<enum XQPublishAndSubscribeSecurityPolicy::Capability>)
+	?startMonitoring@XQSettingsManager@@QAE_NABVXQSettingsKey@@W4Type@1@@Z @ 7 NONAME ; bool XQSettingsManager::startMonitoring(class XQSettingsKey const &, enum XQSettingsManager::Type)
+	?findKeys@XQCentralRepositoryUtils@@QAE?AV?$QList@VXQCentralRepositorySettingsKey@@@@ABVXQCentralRepositorySearchCriteria@@@Z @ 8 NONAME ; class QList<class XQCentralRepositorySettingsKey> XQCentralRepositoryUtils::findKeys(class XQCentralRepositorySearchCriteria const &)
+	??0XQPublishAndSubscribeSecurityPolicy@@QAE@V?$QList@W4Capability@XQPublishAndSubscribeSecurityPolicy@@@@@Z @ 9 NONAME ; XQPublishAndSubscribeSecurityPolicy::XQPublishAndSubscribeSecurityPolicy(class QList<enum XQPublishAndSubscribeSecurityPolicy::Capability>)
+	?bitMask@XQCentralRepositorySearchCriteria@@QBEKXZ @ 10 NONAME ; unsigned long XQCentralRepositorySearchCriteria::bitMask(void) const
+	?metaObject@XQSettingsManager@@UBEPBUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const * XQSettingsManager::metaObject(void) const
+	??_EXQCentralRepositorySettingsKey@@QAE@I@Z @ 12 NONAME ; XQCentralRepositorySettingsKey::~XQCentralRepositorySettingsKey(unsigned int)
+	??0XQCentralRepositorySettingsKey@@QAE@JK@Z @ 13 NONAME ; XQCentralRepositorySettingsKey::XQCentralRepositorySettingsKey(long, unsigned long)
+	??0XQPublishAndSubscribeUtils@@QAE@AAVXQSettingsManager@@PAVQObject@@@Z @ 14 NONAME ; XQPublishAndSubscribeUtils::XQPublishAndSubscribeUtils(class XQSettingsManager &, class QObject *)
+	?stopMonitoring@XQSettingsManager@@QAE_NABVXQSettingsKey@@@Z @ 15 NONAME ; bool XQSettingsManager::stopMonitoring(class XQSettingsKey const &)
+	?secureId@XQPublishAndSubscribeSecurityPolicy@@QBE?AVSecureId@1@XZ @ 16 NONAME ; class XQPublishAndSubscribeSecurityPolicy::SecureId XQPublishAndSubscribeSecurityPolicy::secureId(void) const
+	?negativeCriteria@XQCentralRepositorySearchCriteria@@QBE_NXZ @ 17 NONAME ; bool XQCentralRepositorySearchCriteria::negativeCriteria(void) const
+	??0XQPublishAndSubscribeSettingsKey@@QAE@JK@Z @ 18 NONAME ; XQPublishAndSubscribeSettingsKey::XQPublishAndSubscribeSettingsKey(long, unsigned long)
+	??1XQCentralRepositorySettingsKey@@QAE@XZ @ 19 NONAME ; XQCentralRepositorySettingsKey::~XQCentralRepositorySettingsKey(void)
+	?deleteKey@XQCentralRepositoryUtils@@QAE_NABVXQCentralRepositorySettingsKey@@@Z @ 20 NONAME ; bool XQCentralRepositoryUtils::deleteKey(class XQCentralRepositorySettingsKey const &)
+	?createKey@XQCentralRepositoryUtils@@QAE_NABVXQCentralRepositorySettingsKey@@ABVQVariant@@@Z @ 21 NONAME ; bool XQCentralRepositoryUtils::createKey(class XQCentralRepositorySettingsKey const &, class QVariant const &)
+	?cancelTransaction@XQCentralRepositoryUtils@@QAEXJ@Z @ 22 NONAME ; void XQCentralRepositoryUtils::cancelTransaction(long)
+	??1XQPublishAndSubscribeSettingsKey@@QAE@XZ @ 23 NONAME ; XQPublishAndSubscribeSettingsKey::~XQPublishAndSubscribeSettingsKey(void)
+	?deleteProperty@XQPublishAndSubscribeUtils@@QAE_NABVXQPublishAndSubscribeSettingsKey@@@Z @ 24 NONAME ; bool XQPublishAndSubscribeUtils::deleteProperty(class XQPublishAndSubscribeSettingsKey const &)
+	?repositoryUid@XQCentralRepositorySearchCriteria@@QBEJXZ @ 25 NONAME ; long XQCentralRepositorySearchCriteria::repositoryUid(void) const
+	?readItemValue@XQSettingsManager@@QAE?AVQVariant@@ABVXQSettingsKey@@W4Type@1@@Z @ 26 NONAME ; class QVariant XQSettingsManager::readItemValue(class XQSettingsKey const &, enum XQSettingsManager::Type)
+	?uid@XQSettingsKey@@QBEJXZ @ 27 NONAME ; long XQSettingsKey::uid(void) const
+	?trUtf8@XQSettingsManager@@SA?AVQString@@PBD0@Z @ 28 NONAME ; class QString XQSettingsManager::trUtf8(char const *, char const *)
+	?failTransaction@XQCentralRepositoryUtils@@QAEXJ@Z @ 29 NONAME ; void XQCentralRepositoryUtils::failTransaction(long)
+	??0XQCentralRepositorySettingsKey@@QAE@ABV0@@Z @ 30 NONAME ; XQCentralRepositorySettingsKey::XQCentralRepositorySettingsKey(class XQCentralRepositorySettingsKey const &)
+	?transactionState@XQCentralRepositoryUtils@@QBE?AW4TransactionState@1@J@Z @ 31 NONAME ; enum XQCentralRepositoryUtils::TransactionState XQCentralRepositoryUtils::transactionState(long) const
+	?setValueCriteria@XQCentralRepositorySearchCriteria@@QAEXABVQVariant@@_N@Z @ 32 NONAME ; void XQCentralRepositorySearchCriteria::setValueCriteria(class QVariant const &, bool)
+	?error@XQSettingsManager@@QBE?AW4Error@1@XZ @ 33 NONAME ; enum XQSettingsManager::Error XQSettingsManager::error(void) const
+	??1XQPublishAndSubscribeUtils@@UAE@XZ @ 34 NONAME ; XQPublishAndSubscribeUtils::~XQPublishAndSubscribeUtils(void)
+	??1XQSettingsManager@@UAE@XZ @ 35 NONAME ; XQSettingsManager::~XQSettingsManager(void)
+	??0XQPublishAndSubscribeSecurityPolicy@@QAE@VSecureId@0@V?$QList@W4Capability@XQPublishAndSubscribeSecurityPolicy@@@@@Z @ 36 NONAME ; XQPublishAndSubscribeSecurityPolicy::XQPublishAndSubscribeSecurityPolicy(class XQPublishAndSubscribeSecurityPolicy::SecureId, class QList<enum XQPublishAndSubscribeSecurityPolicy::Capability>)
+	?qt_metacall@XQSettingsManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 37 NONAME ; int XQSettingsManager::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?writeItemValue@XQSettingsManager@@QAE_NABVXQSettingsKey@@ABVQVariant@@@Z @ 38 NONAME ; bool XQSettingsManager::writeItemValue(class XQSettingsKey const &, class QVariant const &)
+	?key@XQSettingsKey@@QBEKXZ @ 39 NONAME ; unsigned long XQSettingsKey::key(void) const
+	??_EXQSettingsManager@@UAE@I@Z @ 40 NONAME ; XQSettingsManager::~XQSettingsManager(unsigned int)
+	?resetRepository@XQCentralRepositoryUtils@@QAE_NJ@Z @ 41 NONAME ; bool XQCentralRepositoryUtils::resetRepository(long)
+	?value@XQCentralRepositorySearchCriteria@@QBEABVQVariant@@XZ @ 42 NONAME ; class QVariant const & XQCentralRepositorySearchCriteria::value(void) const
+	??0XQSettingsKey@@QAE@W4Target@0@JK@Z @ 43 NONAME ; XQSettingsKey::XQSettingsKey(enum XQSettingsKey::Target, long, unsigned long)
+	??0XQCentralRepositorySearchCriteria@@QAE@JKK@Z @ 44 NONAME ; XQCentralRepositorySearchCriteria::XQCentralRepositorySearchCriteria(long, unsigned long, unsigned long)
+	?staticMetaObject@XQSettingsManager@@2UQMetaObject@@B @ 45 NONAME ; struct QMetaObject const XQSettingsManager::staticMetaObject
+	?partialKey@XQCentralRepositorySearchCriteria@@QBEKXZ @ 46 NONAME ; unsigned long XQCentralRepositorySearchCriteria::partialKey(void) const
+	?tr@XQSettingsManager@@SA?AVQString@@PBD0H@Z @ 47 NONAME ; class QString XQSettingsManager::tr(char const *, char const *, int)
+	??1XQPublishAndSubscribeSecurityPolicy@@QAE@XZ @ 48 NONAME ; XQPublishAndSubscribeSecurityPolicy::~XQPublishAndSubscribeSecurityPolicy(void)
+	?capabilities@XQPublishAndSubscribeSecurityPolicy@@QBE?AV?$QList@W4Capability@XQPublishAndSubscribeSecurityPolicy@@@@XZ @ 49 NONAME ; class QList<enum XQPublishAndSubscribeSecurityPolicy::Capability> XQPublishAndSubscribeSecurityPolicy::capabilities(void) const
+	?valueChanged@XQSettingsManager@@IAEXABVXQSettingsKey@@ABVQVariant@@@Z @ 50 NONAME ; void XQSettingsManager::valueChanged(class XQSettingsKey const &, class QVariant const &)
+	?secPolicyType@XQPublishAndSubscribeSecurityPolicy@@QBE?AW4SecPolicyType@1@XZ @ 51 NONAME ; enum XQPublishAndSubscribeSecurityPolicy::SecPolicyType XQPublishAndSubscribeSecurityPolicy::secPolicyType(void) const
+	?vendorId@XQPublishAndSubscribeSecurityPolicy@@QBE?AVVendorId@1@XZ @ 52 NONAME ; class XQPublishAndSubscribeSecurityPolicy::VendorId XQPublishAndSubscribeSecurityPolicy::vendorId(void) const
+	??1XQCentralRepositorySearchCriteria@@QAE@XZ @ 53 NONAME ; XQCentralRepositorySearchCriteria::~XQCentralRepositorySearchCriteria(void)
+	??1XQCentralRepositoryUtils@@UAE@XZ @ 54 NONAME ; XQCentralRepositoryUtils::~XQCentralRepositoryUtils(void)
+	??_EXQCentralRepositoryUtils@@UAE@I@Z @ 55 NONAME ; XQCentralRepositoryUtils::~XQCentralRepositoryUtils(unsigned int)
+	??0XQPublishAndSubscribeSecurityPolicy@@QAE@W4SecPolicyType@0@@Z @ 56 NONAME ; XQPublishAndSubscribeSecurityPolicy::XQPublishAndSubscribeSecurityPolicy(enum XQPublishAndSubscribeSecurityPolicy::SecPolicyType)
+	?trUtf8@XQSettingsManager@@SA?AVQString@@PBD0H@Z @ 57 NONAME ; class QString XQSettingsManager::trUtf8(char const *, char const *, int)
+	?qt_metacast@XQSettingsManager@@UAEPAXPBD@Z @ 58 NONAME ; void * XQSettingsManager::qt_metacast(char const *)
+	?getStaticMetaObject@XQSettingsManager@@SAABUQMetaObject@@XZ @ 59 NONAME ; struct QMetaObject const & XQSettingsManager::getStaticMetaObject(void)
+	?defineProperty@XQPublishAndSubscribeUtils@@QAE_NABVXQPublishAndSubscribeSettingsKey@@W4Type@XQSettingsManager@@ABVXQPublishAndSubscribeSecurityPolicy@@2@Z @ 60 NONAME ; bool XQPublishAndSubscribeUtils::defineProperty(class XQPublishAndSubscribeSettingsKey const &, enum XQSettingsManager::Type, class XQPublishAndSubscribeSecurityPolicy const &, class XQPublishAndSubscribeSecurityPolicy const &)
+	??0XQSettingsManager@@QAE@PAVQObject@@@Z @ 61 NONAME ; XQSettingsManager::XQSettingsManager(class QObject *)
+	??0XQCentralRepositoryUtils@@QAE@AAVXQSettingsManager@@PAVQObject@@@Z @ 62 NONAME ; XQCentralRepositoryUtils::XQCentralRepositoryUtils(class XQSettingsManager &, class QObject *)
+	?target@XQSettingsKey@@QBE?AW4Target@1@XZ @ 63 NONAME ; enum XQSettingsKey::Target XQSettingsKey::target(void) const
+	?resetKey@XQCentralRepositoryUtils@@QAE_NABVXQCentralRepositorySettingsKey@@@Z @ 64 NONAME ; bool XQCentralRepositoryUtils::resetKey(class XQCentralRepositorySettingsKey const &)
+	?defineProperty@XQPublishAndSubscribeUtils@@QAE_NABVXQPublishAndSubscribeSettingsKey@@W4Type@XQSettingsManager@@@Z @ 65 NONAME ; bool XQPublishAndSubscribeUtils::defineProperty(class XQPublishAndSubscribeSettingsKey const &, enum XQSettingsManager::Type)
+	?startTransaction@XQCentralRepositoryUtils@@QAE_NJW4TransactionMode@1@@Z @ 66 NONAME ; bool XQCentralRepositoryUtils::startTransaction(long, enum XQCentralRepositoryUtils::TransactionMode)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/bwins/xqsysinfou.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,31 @@
+EXPORTS
+	??1XQSysInfo@@UAE@XZ @ 1 NONAME ; XQSysInfo::~XQSysInfo(void)
+	?metaObject@XQSysInfo@@UBEPBUQMetaObject@@XZ @ 2 NONAME ; struct QMetaObject const * XQSysInfo::metaObject(void) const
+	?error@XQSysInfo@@QBE?AW4Error@1@XZ @ 3 NONAME ; enum XQSysInfo::Error XQSysInfo::error(void) const
+	?trUtf8@XQSysInfo@@SA?AVQString@@PBD0@Z @ 4 NONAME ; class QString XQSysInfo::trUtf8(char const *, char const *)
+	?batteryLevelChanged@XQSysInfo@@IAEXI@Z @ 5 NONAME ; void XQSysInfo::batteryLevelChanged(unsigned int)
+	?isSupported@XQSysInfo@@SA_NH@Z @ 6 NONAME ; bool XQSysInfo::isSupported(int)
+	?isDiskSpaceCritical@XQSysInfo@@QBE_NW4Drive@1@@Z @ 7 NONAME ; bool XQSysInfo::isDiskSpaceCritical(enum XQSysInfo::Drive) const
+	?imsi@XQSysInfo@@QBE?AVQString@@XZ @ 8 NONAME ; class QString XQSysInfo::imsi(void) const
+	?isNetwork@XQSysInfo@@QBE_NXZ @ 9 NONAME ; bool XQSysInfo::isNetwork(void) const
+	?tr@XQSysInfo@@SA?AVQString@@PBD0@Z @ 10 NONAME ; class QString XQSysInfo::tr(char const *, char const *)
+	?softwareVersion@XQSysInfo@@QBE?AVQString@@XZ @ 11 NONAME ; class QString XQSysInfo::softwareVersion(void) const
+	??0XQSysInfo@@QAE@PAVQObject@@@Z @ 12 NONAME ; XQSysInfo::XQSysInfo(class QObject *)
+	?currentLanguage@XQSysInfo@@QBE?AW4Language@1@XZ @ 13 NONAME ; enum XQSysInfo::Language XQSysInfo::currentLanguage(void) const
+	?diskSpace@XQSysInfo@@QBE_JW4Drive@1@@Z @ 14 NONAME ; long long XQSysInfo::diskSpace(enum XQSysInfo::Drive) const
+	?getStaticMetaObject@XQSysInfo@@SAABUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const & XQSysInfo::getStaticMetaObject(void)
+	??_EXQSysInfo@@UAE@I@Z @ 16 NONAME ; XQSysInfo::~XQSysInfo(unsigned int)
+	?qt_metacall@XQSysInfo@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 17 NONAME ; int XQSysInfo::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?trUtf8@XQSysInfo@@SA?AVQString@@PBD0H@Z @ 18 NONAME ; class QString XQSysInfo::trUtf8(char const *, char const *, int)
+	?model@XQSysInfo@@QBE?AVQString@@XZ @ 19 NONAME ; class QString XQSysInfo::model(void) const
+	?networkSignalChanged@XQSysInfo@@IAEXK@Z @ 20 NONAME ; void XQSysInfo::networkSignalChanged(unsigned long)
+	?manufacturer@XQSysInfo@@QBE?AVQString@@XZ @ 21 NONAME ; class QString XQSysInfo::manufacturer(void) const
+	?signalStrength@XQSysInfo@@QBEHXZ @ 22 NONAME ; int XQSysInfo::signalStrength(void) const
+	?imei@XQSysInfo@@QBE?AVQString@@XZ @ 23 NONAME ; class QString XQSysInfo::imei(void) const
+	?browserVersion@XQSysInfo@@QBE?AVQString@@XZ @ 24 NONAME ; class QString XQSysInfo::browserVersion(void) const
+	?qt_metacast@XQSysInfo@@UAEPAXPBD@Z @ 25 NONAME ; void * XQSysInfo::qt_metacast(char const *)
+	?memory@XQSysInfo@@QBEHXZ @ 26 NONAME ; int XQSysInfo::memory(void) const
+	?staticMetaObject@XQSysInfo@@2UQMetaObject@@B @ 27 NONAME ; struct QMetaObject const XQSysInfo::staticMetaObject
+	?tr@XQSysInfo@@SA?AVQString@@PBD0H@Z @ 28 NONAME ; class QString XQSysInfo::tr(char const *, char const *, int)
+	?batteryLevel@XQSysInfo@@QBEIXZ @ 29 NONAME ; unsigned int XQSysInfo::batteryLevel(void) const
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/bwins/xqsystemtoneserviceu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,11 @@
+EXPORTS
+	?alarmStarted@XQSystemToneService@@IAEXI@Z @ 1 NONAME ; void XQSystemToneService::alarmStarted(unsigned int)
+	??1XQSystemToneService@@UAE@XZ @ 2 NONAME ; XQSystemToneService::~XQSystemToneService(void)
+	?playTone@XQSystemToneService@@QAEXW4ToneType@1@@Z @ 3 NONAME ; void XQSystemToneService::playTone(enum XQSystemToneService::ToneType)
+	?toneStarted@XQSystemToneService@@IAEXXZ @ 4 NONAME ; void XQSystemToneService::toneStarted(void)
+	?alarmFinished@XQSystemToneService@@IAEXI@Z @ 5 NONAME ; void XQSystemToneService::alarmFinished(unsigned int)
+	??0XQSystemToneService@@QAE@PAVQObject@@@Z @ 6 NONAME ; XQSystemToneService::XQSystemToneService(class QObject *)
+	?stopAlarm@XQSystemToneService@@QAEXI@Z @ 7 NONAME ; void XQSystemToneService::stopAlarm(unsigned int)
+	?playAlarm@XQSystemToneService@@QAEXW4AlarmType@1@AAI@Z @ 8 NONAME ; void XQSystemToneService::playAlarm(enum XQSystemToneService::AlarmType, unsigned int &)
+	?playAlarm@XQSystemToneService@@QAEXW4ToneType@1@AAI@Z @ 9 NONAME ; void XQSystemToneService::playAlarm(enum XQSystemToneService::ToneType, unsigned int &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/bwins/xqutilsu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,40 @@
+EXPORTS
+	?qByteArrayToS60Desc8@XQConversions@@SAPAVHBufC8@@ABVQByteArray@@@Z @ 1 NONAME ; class HBufC8 * XQConversions::qByteArrayToS60Desc8(class QByteArray const &)
+	?simpleSoundsPath@XQUtils@@SA?AVQString@@XZ @ 2 NONAME ; class QString XQUtils::simpleSoundsPath(void)
+	?tr@XQUtils@@SA?AVQString@@PBD0H@Z @ 3 NONAME ; class QString XQUtils::tr(char const *, char const *, int)
+	?launchFile@XQUtils@@QAE_NABVQString@@@Z @ 4 NONAME ; bool XQUtils::launchFile(class QString const &)
+	?s60DescToQString@XQConversions@@SA?AVQString@@ABVTDesC16@@@Z @ 5 NONAME ; class QString XQConversions::s60DescToQString(class TDesC16 const &)
+	?othersPath@XQUtils@@SA?AVQString@@XZ @ 6 NONAME ; class QString XQUtils::othersPath(void)
+	?romRootPath@XQUtils@@SA?AVQString@@XZ @ 7 NONAME ; class QString XQUtils::romRootPath(void)
+	?soundsPath@XQUtils@@SA?AVQString@@XZ @ 8 NONAME ; class QString XQUtils::soundsPath(void)
+	?resetInactivityTime@XQUtils@@QAEXXZ @ 9 NONAME ; void XQUtils::resetInactivityTime(void)
+	??_EXQUtils@@UAE@I@Z @ 10 NONAME ; XQUtils::~XQUtils(unsigned int)
+	?getStaticMetaObject@XQUtils@@SAABUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const & XQUtils::getStaticMetaObject(void)
+	?qStringToS60Desc@XQConversions@@SAPAVHBufC16@@ABVQString@@@Z @ 12 NONAME ; class HBufC16 * XQConversions::qStringToS60Desc(class QString const &)
+	?mmsBackgroundImagesPath@XQUtils@@SA?AVQString@@XZ @ 13 NONAME ; class QString XQUtils::mmsBackgroundImagesPath(void)
+	?s60Desc8ToQString@XQConversions@@SA?AVQString@@ABVTDesC8@@@Z @ 14 NONAME ; class QString XQConversions::s60Desc8ToQString(class TDesC8 const &)
+	?imagesThumbnailPath@XQUtils@@SA?AVQString@@XZ @ 15 NONAME ; class QString XQUtils::imagesThumbnailPath(void)
+	??1XQUtils@@UAE@XZ @ 16 NONAME ; XQUtils::~XQUtils(void)
+	?metaObject@XQUtils@@UBEPBUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const * XQUtils::metaObject(void) const
+	?gamesPath@XQUtils@@SA?AVQString@@XZ @ 18 NONAME ; class QString XQUtils::gamesPath(void)
+	?memoryCardContactsPath@XQUtils@@SA?AVQString@@XZ @ 19 NONAME ; class QString XQUtils::memoryCardContactsPath(void)
+	?qStringToS60Desc8@XQConversions@@SAPAVHBufC8@@ABVQString@@@Z @ 20 NONAME ; class HBufC8 * XQConversions::qStringToS60Desc8(class QString const &)
+	?gmsPicturesPath@XQUtils@@SA?AVQString@@XZ @ 21 NONAME ; class QString XQUtils::gmsPicturesPath(void)
+	?memoryCardRootPath@XQUtils@@SA?AVQString@@XZ @ 22 NONAME ; class QString XQUtils::memoryCardRootPath(void)
+	?staticMetaObject@XQUtils@@2UQMetaObject@@B @ 23 NONAME ; struct QMetaObject const XQUtils::staticMetaObject
+	?phoneMemoryRootPath@XQUtils@@SA?AVQString@@XZ @ 24 NONAME ; class QString XQUtils::phoneMemoryRootPath(void)
+	?qt_metacast@XQUtils@@UAEPAXPBD@Z @ 25 NONAME ; void * XQUtils::qt_metacast(char const *)
+	?error@XQUtils@@QBE?AW4Error@1@XZ @ 26 NONAME ; enum XQUtils::Error XQUtils::error(void) const
+	?imagesPath@XQUtils@@SA?AVQString@@XZ @ 27 NONAME ; class QString XQUtils::imagesPath(void)
+	?s60Desc8ToQByteArray@XQConversions@@SA?AVQByteArray@@ABVTDesC8@@@Z @ 28 NONAME ; class QByteArray XQConversions::s60Desc8ToQByteArray(class TDesC8 const &)
+	?trUtf8@XQUtils@@SA?AVQString@@PBD0H@Z @ 29 NONAME ; class QString XQUtils::trUtf8(char const *, char const *, int)
+	?picturesPath@XQUtils@@SA?AVQString@@XZ @ 30 NONAME ; class QString XQUtils::picturesPath(void)
+	?installsPath@XQUtils@@SA?AVQString@@XZ @ 31 NONAME ; class QString XQUtils::installsPath(void)
+	?tr@XQUtils@@SA?AVQString@@PBD0@Z @ 32 NONAME ; class QString XQUtils::tr(char const *, char const *)
+	??0XQUtils@@QAE@PAVQObject@@@Z @ 33 NONAME ; XQUtils::XQUtils(class QObject *)
+	?digitalSoundsPath@XQUtils@@SA?AVQString@@XZ @ 34 NONAME ; class QString XQUtils::digitalSoundsPath(void)
+	?presenceLogosPath@XQUtils@@SA?AVQString@@XZ @ 35 NONAME ; class QString XQUtils::presenceLogosPath(void)
+	?trUtf8@XQUtils@@SA?AVQString@@PBD0@Z @ 36 NONAME ; class QString XQUtils::trUtf8(char const *, char const *)
+	?videosPath@XQUtils@@SA?AVQString@@XZ @ 37 NONAME ; class QString XQUtils::videosPath(void)
+	?qt_metacall@XQUtils@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 38 NONAME ; int XQUtils::qt_metacall(enum QMetaObject::Call, int, void * *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/eabi/xqkeycaptureu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,66 @@
+EXPORTS
+	_ZN12XqKeyCapture10captureKeyEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_ @ 1 NONAME
+	_ZN12XqKeyCapture14captureLongKeyEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_NS_9LongFlagsE @ 2 NONAME
+	_ZN12XqKeyCapture16cancelCaptureKeyEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_ @ 3 NONAME
+	_ZN12XqKeyCapture20cancelCaptureLongKeyEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_NS_9LongFlagsE @ 4 NONAME
+	_ZN12XqKeyCapture20captureKeyUpAndDownsEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_ @ 5 NONAME
+	_ZN12XqKeyCapture26cancelCaptureKeyUpAndDownsEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_ @ 6 NONAME
+	_ZN12XqKeyCaptureC1Ev @ 7 NONAME
+	_ZN12XqKeyCaptureC2Ev @ 8 NONAME
+	_ZN12XqKeyCaptureD1Ev @ 9 NONAME
+	_ZN12XqKeyCaptureD2Ev @ 10 NONAME
+	_ZNK12XqKeyCapture11errorStringEv @ 11 NONAME
+	_ZNK12XqKeyCapture7errorIdEv @ 12 NONAME
+	_ZN12XqKeyCapture10captureKeyEj6QFlagsIN2Qt16KeyboardModifierEES3_ @ 13 NONAME
+	_ZN12XqKeyCapture14captureLongKeyEj6QFlagsIN2Qt16KeyboardModifierEES3_NS_9LongFlagsE @ 14 NONAME
+	_ZN12XqKeyCapture16cancelCaptureKeyEj6QFlagsIN2Qt16KeyboardModifierEES3_ @ 15 NONAME
+	_ZN12XqKeyCapture20cancelCaptureLongKeyEj6QFlagsIN2Qt16KeyboardModifierEES3_NS_9LongFlagsE @ 16 NONAME
+	_ZN12XqKeyCapture20captureKeyUpAndDownsEj6QFlagsIN2Qt16KeyboardModifierEES3_ @ 17 NONAME
+	_ZN12XqKeyCapture26cancelCaptureKeyUpAndDownsEj6QFlagsIN2Qt16KeyboardModifierEES3_ @ 18 NONAME
+	_ZN12XqKeyCapture10captureKeyE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_ @ 19 NONAME
+	_ZN12XqKeyCapture10captureKeyE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_ @ 20 NONAME
+	_ZN12XqKeyCapture14captureLongKeyE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_NS_9LongFlagsE @ 21 NONAME
+	_ZN12XqKeyCapture14captureLongKeyE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_NS_9LongFlagsE @ 22 NONAME
+	_ZN12XqKeyCapture16cancelCaptureKeyE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_ @ 23 NONAME
+	_ZN12XqKeyCapture16cancelCaptureKeyE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_ @ 24 NONAME
+	_ZN12XqKeyCapture20cancelCaptureLongKeyE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_NS_9LongFlagsE @ 25 NONAME
+	_ZN12XqKeyCapture20cancelCaptureLongKeyE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_NS_9LongFlagsE @ 26 NONAME
+	_ZN12XqKeyCapture20captureKeyUpAndDownsE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_ @ 27 NONAME
+	_ZN12XqKeyCapture20captureKeyUpAndDownsE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_ @ 28 NONAME
+	_ZN12XqKeyCapture26cancelCaptureKeyUpAndDownsE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_ @ 29 NONAME
+	_ZN12XqKeyCapture26cancelCaptureKeyUpAndDownsE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_ @ 30 NONAME
+	_ZN12XQKeyCapture10captureKeyE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_ @ 31 NONAME
+	_ZN12XQKeyCapture10captureKeyE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_ @ 32 NONAME
+	_ZN12XQKeyCapture10captureKeyEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_ @ 33 NONAME
+	_ZN12XQKeyCapture10captureKeyEj6QFlagsIN2Qt16KeyboardModifierEES3_ @ 34 NONAME
+	_ZN12XQKeyCapture14captureLongKeyE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_NS_9LongFlagsE @ 35 NONAME
+	_ZN12XQKeyCapture14captureLongKeyE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_NS_9LongFlagsE @ 36 NONAME
+	_ZN12XQKeyCapture14captureLongKeyEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_NS_9LongFlagsE @ 37 NONAME
+	_ZN12XQKeyCapture14captureLongKeyEj6QFlagsIN2Qt16KeyboardModifierEES3_NS_9LongFlagsE @ 38 NONAME
+	_ZN12XQKeyCapture16cancelCaptureKeyE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_ @ 39 NONAME
+	_ZN12XQKeyCapture16cancelCaptureKeyE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_ @ 40 NONAME
+	_ZN12XQKeyCapture16cancelCaptureKeyEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_ @ 41 NONAME
+	_ZN12XQKeyCapture16cancelCaptureKeyEj6QFlagsIN2Qt16KeyboardModifierEES3_ @ 42 NONAME
+	_ZN12XQKeyCapture20cancelCaptureLongKeyE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_NS_9LongFlagsE @ 43 NONAME
+	_ZN12XQKeyCapture20cancelCaptureLongKeyE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_NS_9LongFlagsE @ 44 NONAME
+	_ZN12XQKeyCapture20cancelCaptureLongKeyEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_NS_9LongFlagsE @ 45 NONAME
+	_ZN12XQKeyCapture20cancelCaptureLongKeyEj6QFlagsIN2Qt16KeyboardModifierEES3_NS_9LongFlagsE @ 46 NONAME
+	_ZN12XQKeyCapture20captureKeyUpAndDownsE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_ @ 47 NONAME
+	_ZN12XQKeyCapture20captureKeyUpAndDownsE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_ @ 48 NONAME
+	_ZN12XQKeyCapture20captureKeyUpAndDownsEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_ @ 49 NONAME
+	_ZN12XQKeyCapture20captureKeyUpAndDownsEj6QFlagsIN2Qt16KeyboardModifierEES3_ @ 50 NONAME
+	_ZN12XQKeyCapture26cancelCaptureKeyUpAndDownsE5QListIN2Qt3KeyEE6QFlagsINS1_16KeyboardModifierEES6_ @ 51 NONAME
+	_ZN12XQKeyCapture26cancelCaptureKeyUpAndDownsE5QListIjE6QFlagsIN2Qt16KeyboardModifierEES5_ @ 52 NONAME
+	_ZN12XQKeyCapture26cancelCaptureKeyUpAndDownsEN2Qt3KeyE6QFlagsINS0_16KeyboardModifierEES4_ @ 53 NONAME
+	_ZN12XQKeyCapture26cancelCaptureKeyUpAndDownsEj6QFlagsIN2Qt16KeyboardModifierEES3_ @ 54 NONAME
+	_ZN12XQKeyCaptureC1Ev @ 55 NONAME
+	_ZN12XQKeyCaptureC2Ev @ 56 NONAME
+	_ZN12XQKeyCaptureD1Ev @ 57 NONAME
+	_ZN12XQKeyCaptureD2Ev @ 58 NONAME
+	_ZNK12XQKeyCapture11errorStringEv @ 59 NONAME
+	_ZNK12XQKeyCapture7errorIdEv @ 60 NONAME
+	_ZN12XQKeyCapture17captureRemoteKeysE6QFlagsINS_13CapturingFlagEE @ 61 NONAME
+	_ZN12XQKeyCapture23cancelCaptureRemoteKeysE6QFlagsINS_13CapturingFlagEE @ 62 NONAME
+	_ZN12XQKeyCapture24remoteEventType_KeyPressEv @ 63 NONAME
+	_ZN12XQKeyCapture26remoteEventType_KeyReleaseEv @ 64 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/eabi/xqsettingsmanageru.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,87 @@
+EXPORTS
+	_ZN13XQSettingsKeyC1ENS_6TargetElm @ 1 NONAME
+	_ZN13XQSettingsKeyC2ENS_6TargetElm @ 2 NONAME
+	_ZN13XQSettingsKeyD1Ev @ 3 NONAME
+	_ZN13XQSettingsKeyD2Ev @ 4 NONAME
+	_ZN17XQSettingsManager11itemDeletedERK13XQSettingsKey @ 5 NONAME
+	_ZN17XQSettingsManager11qt_metacallEN11QMetaObject4CallEiPPv @ 6 NONAME
+	_ZN17XQSettingsManager11qt_metacastEPKc @ 7 NONAME
+	_ZN17XQSettingsManager12valueChangedERK13XQSettingsKeyRK8QVariant @ 8 NONAME
+	_ZN17XQSettingsManager13readItemValueERK13XQSettingsKeyNS_4TypeE @ 9 NONAME
+	_ZN17XQSettingsManager14stopMonitoringERK13XQSettingsKey @ 10 NONAME
+	_ZN17XQSettingsManager14writeItemValueERK13XQSettingsKeyRK8QVariant @ 11 NONAME
+	_ZN17XQSettingsManager15startMonitoringERK13XQSettingsKeyNS_4TypeE @ 12 NONAME
+	_ZN17XQSettingsManager16staticMetaObjectE @ 13 NONAME DATA 16
+	_ZN17XQSettingsManager19getStaticMetaObjectEv @ 14 NONAME
+	_ZN17XQSettingsManagerC1EP7QObject @ 15 NONAME
+	_ZN17XQSettingsManagerC2EP7QObject @ 16 NONAME
+	_ZN17XQSettingsManagerD0Ev @ 17 NONAME
+	_ZN17XQSettingsManagerD1Ev @ 18 NONAME
+	_ZN17XQSettingsManagerD2Ev @ 19 NONAME
+	_ZN24XQCentralRepositoryUtils15failTransactionEl @ 20 NONAME
+	_ZN24XQCentralRepositoryUtils15resetRepositoryEl @ 21 NONAME
+	_ZN24XQCentralRepositoryUtils16startTransactionElNS_15TransactionModeE @ 22 NONAME
+	_ZN24XQCentralRepositoryUtils17cancelTransactionEl @ 23 NONAME
+	_ZN24XQCentralRepositoryUtils17commitTransactionEl @ 24 NONAME
+	_ZN24XQCentralRepositoryUtils8findKeysERK33XQCentralRepositorySearchCriteria @ 25 NONAME
+	_ZN24XQCentralRepositoryUtils8resetKeyERK30XQCentralRepositorySettingsKey @ 26 NONAME
+	_ZN24XQCentralRepositoryUtils9createKeyERK30XQCentralRepositorySettingsKeyRK8QVariant @ 27 NONAME
+	_ZN24XQCentralRepositoryUtils9deleteKeyERK30XQCentralRepositorySettingsKey @ 28 NONAME
+	_ZN24XQCentralRepositoryUtilsC1ER17XQSettingsManagerP7QObject @ 29 NONAME
+	_ZN24XQCentralRepositoryUtilsC2ER17XQSettingsManagerP7QObject @ 30 NONAME
+	_ZN24XQCentralRepositoryUtilsD0Ev @ 31 NONAME
+	_ZN24XQCentralRepositoryUtilsD1Ev @ 32 NONAME
+	_ZN24XQCentralRepositoryUtilsD2Ev @ 33 NONAME
+	_ZN26XQPublishAndSubscribeUtils14definePropertyERK32XQPublishAndSubscribeSettingsKeyN17XQSettingsManager4TypeE @ 34 NONAME
+	_ZN26XQPublishAndSubscribeUtils14definePropertyERK32XQPublishAndSubscribeSettingsKeyN17XQSettingsManager4TypeERK35XQPublishAndSubscribeSecurityPolicyS7_ @ 35 NONAME
+	_ZN26XQPublishAndSubscribeUtils14deletePropertyERK32XQPublishAndSubscribeSettingsKey @ 36 NONAME
+	_ZN26XQPublishAndSubscribeUtilsC1ER17XQSettingsManagerP7QObject @ 37 NONAME
+	_ZN26XQPublishAndSubscribeUtilsC2ER17XQSettingsManagerP7QObject @ 38 NONAME
+	_ZN26XQPublishAndSubscribeUtilsD0Ev @ 39 NONAME
+	_ZN26XQPublishAndSubscribeUtilsD1Ev @ 40 NONAME
+	_ZN26XQPublishAndSubscribeUtilsD2Ev @ 41 NONAME
+	_ZN30XQCentralRepositorySettingsKeyC1Elm @ 42 NONAME
+	_ZN30XQCentralRepositorySettingsKeyC2Elm @ 43 NONAME
+	_ZN30XQCentralRepositorySettingsKeyD1Ev @ 44 NONAME
+	_ZN30XQCentralRepositorySettingsKeyD2Ev @ 45 NONAME
+	_ZN32XQPublishAndSubscribeSettingsKeyC1Elm @ 46 NONAME
+	_ZN32XQPublishAndSubscribeSettingsKeyC2Elm @ 47 NONAME
+	_ZN32XQPublishAndSubscribeSettingsKeyD1Ev @ 48 NONAME
+	_ZN32XQPublishAndSubscribeSettingsKeyD2Ev @ 49 NONAME
+	_ZN33XQCentralRepositorySearchCriteria16setValueCriteriaERK8QVariantb @ 50 NONAME
+	_ZN33XQCentralRepositorySearchCriteriaC1Elmm @ 51 NONAME
+	_ZN33XQCentralRepositorySearchCriteriaC2Elmm @ 52 NONAME
+	_ZN33XQCentralRepositorySearchCriteriaD1Ev @ 53 NONAME
+	_ZN33XQCentralRepositorySearchCriteriaD2Ev @ 54 NONAME
+	_ZN35XQPublishAndSubscribeSecurityPolicyC1E5QListINS_10CapabilityEE @ 55 NONAME
+	_ZN35XQPublishAndSubscribeSecurityPolicyC1ENS_13SecPolicyTypeE @ 56 NONAME
+	_ZN35XQPublishAndSubscribeSecurityPolicyC1ENS_8SecureIdE5QListINS_10CapabilityEE @ 57 NONAME
+	_ZN35XQPublishAndSubscribeSecurityPolicyC1ENS_8VendorIdE5QListINS_10CapabilityEE @ 58 NONAME
+	_ZN35XQPublishAndSubscribeSecurityPolicyC2E5QListINS_10CapabilityEE @ 59 NONAME
+	_ZN35XQPublishAndSubscribeSecurityPolicyC2ENS_13SecPolicyTypeE @ 60 NONAME
+	_ZN35XQPublishAndSubscribeSecurityPolicyC2ENS_8SecureIdE5QListINS_10CapabilityEE @ 61 NONAME
+	_ZN35XQPublishAndSubscribeSecurityPolicyC2ENS_8VendorIdE5QListINS_10CapabilityEE @ 62 NONAME
+	_ZN35XQPublishAndSubscribeSecurityPolicyD1Ev @ 63 NONAME
+	_ZN35XQPublishAndSubscribeSecurityPolicyD2Ev @ 64 NONAME
+	_ZNK13XQSettingsKey3keyEv @ 65 NONAME
+	_ZNK13XQSettingsKey3uidEv @ 66 NONAME
+	_ZNK13XQSettingsKey6targetEv @ 67 NONAME
+	_ZNK17XQSettingsManager10metaObjectEv @ 68 NONAME
+	_ZNK17XQSettingsManager5errorEv @ 69 NONAME
+	_ZNK24XQCentralRepositoryUtils16transactionStateEl @ 70 NONAME
+	_ZNK33XQCentralRepositorySearchCriteria10partialKeyEv @ 71 NONAME
+	_ZNK33XQCentralRepositorySearchCriteria13repositoryUidEv @ 72 NONAME
+	_ZNK33XQCentralRepositorySearchCriteria16negativeCriteriaEv @ 73 NONAME
+	_ZNK33XQCentralRepositorySearchCriteria5valueEv @ 74 NONAME
+	_ZNK33XQCentralRepositorySearchCriteria7bitMaskEv @ 75 NONAME
+	_ZNK35XQPublishAndSubscribeSecurityPolicy12capabilitiesEv @ 76 NONAME
+	_ZNK35XQPublishAndSubscribeSecurityPolicy13secPolicyTypeEv @ 77 NONAME
+	_ZNK35XQPublishAndSubscribeSecurityPolicy8secureIdEv @ 78 NONAME
+	_ZNK35XQPublishAndSubscribeSecurityPolicy8vendorIdEv @ 79 NONAME
+	_ZTI17XQSettingsManager @ 80 NONAME
+	_ZTI24XQCentralRepositoryUtils @ 81 NONAME
+	_ZTI26XQPublishAndSubscribeUtils @ 82 NONAME
+	_ZTV17XQSettingsManager @ 83 NONAME
+	_ZTV24XQCentralRepositoryUtils @ 84 NONAME
+	_ZTV26XQPublishAndSubscribeUtils @ 85 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/eabi/xqsysinfou.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,31 @@
+EXPORTS
+	_ZN9XQSysInfo11isSupportedEi @ 1 NONAME
+	_ZN9XQSysInfo11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
+	_ZN9XQSysInfo11qt_metacastEPKc @ 3 NONAME
+	_ZN9XQSysInfo16staticMetaObjectE @ 4 NONAME DATA 16
+	_ZN9XQSysInfo19batteryLevelChangedEj @ 5 NONAME
+	_ZN9XQSysInfo19getStaticMetaObjectEv @ 6 NONAME
+	_ZN9XQSysInfo20networkSignalChangedEm @ 7 NONAME
+	_ZN9XQSysInfoC1EP7QObject @ 8 NONAME
+	_ZN9XQSysInfoC2EP7QObject @ 9 NONAME
+	_ZN9XQSysInfoD0Ev @ 10 NONAME
+	_ZN9XQSysInfoD1Ev @ 11 NONAME
+	_ZN9XQSysInfoD2Ev @ 12 NONAME
+	_ZNK9XQSysInfo10metaObjectEv @ 13 NONAME
+	_ZNK9XQSysInfo12batteryLevelEv @ 14 NONAME
+	_ZNK9XQSysInfo12manufacturerEv @ 15 NONAME
+	_ZNK9XQSysInfo14browserVersionEv @ 16 NONAME
+	_ZNK9XQSysInfo14signalStrengthEv @ 17 NONAME
+	_ZNK9XQSysInfo15currentLanguageEv @ 18 NONAME
+	_ZNK9XQSysInfo15softwareVersionEv @ 19 NONAME
+	_ZNK9XQSysInfo19isDiskSpaceCriticalENS_5DriveE @ 20 NONAME
+	_ZNK9XQSysInfo4imeiEv @ 21 NONAME
+	_ZNK9XQSysInfo4imsiEv @ 22 NONAME
+	_ZNK9XQSysInfo5errorEv @ 23 NONAME
+	_ZNK9XQSysInfo5modelEv @ 24 NONAME
+	_ZNK9XQSysInfo6memoryEv @ 25 NONAME
+	_ZNK9XQSysInfo9diskSpaceENS_5DriveE @ 26 NONAME
+	_ZNK9XQSysInfo9isNetworkEv @ 27 NONAME
+	_ZTI9XQSysInfo @ 28 NONAME
+	_ZTV9XQSysInfo @ 29 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/eabi/xqsystemtoneserviceu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	_ZN19XQSystemToneService11toneStartedEv @ 1 NONAME
+	_ZN19XQSystemToneService12alarmStartedEj @ 2 NONAME
+	_ZN19XQSystemToneService13alarmFinishedEj @ 3 NONAME
+	_ZN19XQSystemToneService8playToneENS_8ToneTypeE @ 4 NONAME
+	_ZN19XQSystemToneService9playAlarmENS_9AlarmTypeERj @ 5 NONAME
+	_ZN19XQSystemToneService9stopAlarmEj @ 6 NONAME
+	_ZN19XQSystemToneServiceC1EP7QObject @ 7 NONAME
+	_ZN19XQSystemToneServiceC2EP7QObject @ 8 NONAME
+	_ZN19XQSystemToneServiceD0Ev @ 9 NONAME
+	_ZN19XQSystemToneServiceD1Ev @ 10 NONAME
+	_ZN19XQSystemToneServiceD2Ev @ 11 NONAME
+	_ZN19XQSystemToneService9playAlarmENS_8ToneTypeERj @ 12 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/eabi/xqutilsu.def	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,40 @@
+EXPORTS
+	_ZN13XQConversions16qStringToS60DescERK7QString @ 1 NONAME
+	_ZN13XQConversions16s60DescToQStringERK7TDesC16 @ 2 NONAME
+	_ZN13XQConversions17qStringToS60Desc8ERK7QString @ 3 NONAME
+	_ZN13XQConversions17s60Desc8ToQStringERK6TDesC8 @ 4 NONAME
+	_ZN13XQConversions20qByteArrayToS60Desc8ERK10QByteArray @ 5 NONAME
+	_ZN13XQConversions20s60Desc8ToQByteArrayERK6TDesC8 @ 6 NONAME
+	_ZN7XQUtils10imagesPathEv @ 7 NONAME
+	_ZN7XQUtils10launchFileERK7QString @ 8 NONAME
+	_ZN7XQUtils10othersPathEv @ 9 NONAME
+	_ZN7XQUtils10soundsPathEv @ 10 NONAME
+	_ZN7XQUtils10videosPathEv @ 11 NONAME
+	_ZN7XQUtils11qt_metacallEN11QMetaObject4CallEiPPv @ 12 NONAME
+	_ZN7XQUtils11qt_metacastEPKc @ 13 NONAME
+	_ZN7XQUtils11romRootPathEv @ 14 NONAME
+	_ZN7XQUtils12installsPathEv @ 15 NONAME
+	_ZN7XQUtils12picturesPathEv @ 16 NONAME
+	_ZN7XQUtils15gmsPicturesPathEv @ 17 NONAME
+	_ZN7XQUtils16simpleSoundsPathEv @ 18 NONAME
+	_ZN7XQUtils16staticMetaObjectE @ 19 NONAME DATA 16
+	_ZN7XQUtils17digitalSoundsPathEv @ 20 NONAME
+	_ZN7XQUtils17presenceLogosPathEv @ 21 NONAME
+	_ZN7XQUtils18memoryCardRootPathEv @ 22 NONAME
+	_ZN7XQUtils19getStaticMetaObjectEv @ 23 NONAME
+	_ZN7XQUtils19imagesThumbnailPathEv @ 24 NONAME
+	_ZN7XQUtils19phoneMemoryRootPathEv @ 25 NONAME
+	_ZN7XQUtils19resetInactivityTimeEv @ 26 NONAME
+	_ZN7XQUtils22memoryCardContactsPathEv @ 27 NONAME
+	_ZN7XQUtils23mmsBackgroundImagesPathEv @ 28 NONAME
+	_ZN7XQUtils9gamesPathEv @ 29 NONAME
+	_ZN7XQUtilsC1EP7QObject @ 30 NONAME
+	_ZN7XQUtilsC2EP7QObject @ 31 NONAME
+	_ZN7XQUtilsD0Ev @ 32 NONAME
+	_ZN7XQUtilsD1Ev @ 33 NONAME
+	_ZN7XQUtilsD2Ev @ 34 NONAME
+	_ZNK7XQUtils10metaObjectEv @ 35 NONAME
+	_ZNK7XQUtils5errorEv @ 36 NONAME
+	_ZTI7XQUtils @ 37 NONAME
+	_ZTV7XQUtils @ 38 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/capturerequest_s60.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#include "capturerequest_s60.h"
+#include <w32std.h>
+#include "txlogger.h"
+
+#ifdef _XQKEYCAPTURE_UNITTEST_
+    #include "tsrc\mytestwindowgroup.h"
+#endif
+
+CaptureRequest::CaptureRequest(TUint aKey, Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier, CaptureRequestType aRequestType, 
+        XQKeyCapture::LongFlags aLongKeyFlags, 
+#ifndef _XQKEYCAPTURE_UNITTEST_
+    RWindowGroup* aGroup
+#else
+    MyTestWindowGroup* aGroup
+#endif
+	):
+    mKey(aKey), 
+    mModifiersMask(aModifiersMask), 
+    mModifier(aModifier), 
+    mRequestType(aRequestType),
+    longKeyFlags(aLongKeyFlags),
+    mRequestHandle(-1), 
+    mAdditionalRequestHandle(-1),
+    mGroup(aGroup)  
+{
+}
+
+CaptureRequest::~CaptureRequest()
+{
+}
+
+int CaptureRequest::request()
+{
+    TX_ENTRY
+    int res(KErrNone);
+    if (!mGroup) {
+        res = KErrNotReady;
+        TX_LOG_ARGS( QString("!mGroup"));
+    } else {
+        switch (mRequestType) {
+        case CaptureRequestTypeNormal:
+            mRequestHandle = mGroup->CaptureKey(mKey, translatedModifierMask(),
+                translatedModifier());
+            TX_LOG_ARGS( QString("CaptureKey done"))
+            break;
+        case CaptureRequestTypeLong:
+            mRequestHandle = mGroup->CaptureLongKey(mKey, mKey,
+                translatedModifierMask(), translatedModifier(), 0, longKeyFlags);
+            TX_LOG_ARGS( QString("CaptureLongKey done"))
+            break;
+        case CaptureRequestTypeUpAndDown:
+            mRequestHandle = mGroup->CaptureKeyUpAndDowns(mKey,
+                translatedModifierMask(), translatedModifier());
+            TX_LOG_ARGS( QString("CaptureKeyUpAndDowns done"))
+            break;
+        default:
+            res = KErrNotSupported;
+            TX_LOG_ARGS( QString("request not done"))
+            break;
+        }
+        
+        if (mRequestHandle < 0){
+            res = mRequestHandle;
+        } else { // following probably is not needed, it could be used to capture Modifires keys as normal keys
+            //In Qt you might request capture CTRL key, in symbian you have to capture Left and Right CTRL keys
+            bool additionalAction = false;
+            TUint additionalKey = 0;
+            switch(mKey){
+            case EKeyLeftShift:
+                additionalAction = true;
+                additionalKey = (mRequestType == CaptureRequestTypeUpAndDown) ? EStdKeyRightShift : EKeyRightShift;
+                break;
+            case EKeyLeftCtrl:
+                additionalAction = true;
+                additionalKey = (mRequestType == CaptureRequestTypeUpAndDown) ? EStdKeyRightCtrl : EKeyRightCtrl;
+                break;
+            case EKeyLeftFunc:
+                additionalAction = true;
+                additionalKey = (mRequestType == CaptureRequestTypeUpAndDown) ? EStdKeyRightFunc : EKeyRightFunc;
+                break;
+            }
+
+            if (additionalAction && additionalKey != 0) {
+                TX_LOG_ARGS( QString("additionalAction needed"));
+                switch (mRequestType) {
+                case CaptureRequestTypeNormal:
+                    mAdditionalRequestHandle = mGroup->CaptureKey(additionalKey,
+                        translatedModifierMask(), translatedModifier());
+                    break;
+                case CaptureRequestTypeLong:
+                    mAdditionalRequestHandle = mGroup->CaptureLongKey(additionalKey,
+                        additionalKey, translatedModifierMask(), translatedModifier(), 0, longKeyFlags);
+                    break;
+                case CaptureRequestTypeUpAndDown:
+                    mAdditionalRequestHandle = mGroup->CaptureKeyUpAndDowns(additionalKey,
+                        translatedModifierMask(), translatedModifier());
+                    break;
+                default:
+                    res = KErrNotSupported;
+                    break;
+                }
+                if (mAdditionalRequestHandle < 0)
+                    res = mAdditionalRequestHandle;
+            }
+        }
+    }
+    TX_EXIT
+    return res;
+}
+
+int CaptureRequest::cancel()
+{
+    TX_ENTRY
+    int res(KErrNone);
+    if (mRequestHandle < 0 || !mGroup) {
+    res = KErrNotReady;
+    } else {
+    switch (mRequestType) {
+        case CaptureRequestTypeNormal:
+        mGroup->CancelCaptureKey(mRequestHandle);
+        break;
+        case CaptureRequestTypeLong:
+        mGroup->CancelCaptureLongKey(mRequestHandle);
+        break;
+        case CaptureRequestTypeUpAndDown:
+        mGroup->CancelCaptureKeyUpAndDowns(mRequestHandle);
+        break;
+        default:
+        res = KErrNotSupported;
+        break;
+    }
+    if (mAdditionalRequestHandle > -1) {
+        switch (mRequestType) {
+        case CaptureRequestTypeNormal:
+            mGroup->CancelCaptureKey(mAdditionalRequestHandle);
+            break;
+        case CaptureRequestTypeLong:
+            mGroup->CancelCaptureLongKey(mAdditionalRequestHandle);
+            break;
+        case CaptureRequestTypeUpAndDown:
+            mGroup->CancelCaptureKeyUpAndDowns(mAdditionalRequestHandle);
+            break;
+        default:
+            res = KErrNotSupported;
+            break;
+        }
+    }
+    }TX_EXIT
+    return res;
+}
+
+bool CaptureRequest::operator==(const CaptureRequest& other) const
+{
+    bool res = mKey == other.mKey && mModifiersMask == other.mModifiersMask && mModifier
+        == other.mModifier && mRequestType == other.mRequestType;
+    return res;
+}
+
+bool CaptureRequest::matches(TUint aKey, Qt::KeyboardModifiers aModifiersMask,
+    Qt::KeyboardModifiers aModifier, CaptureRequestType aRequestType,
+    XQKeyCapture::LongFlags captureLongFlag) const
+{
+    bool res = mKey == aKey && mModifiersMask == aModifiersMask && mModifier == aModifier
+        && mRequestType == aRequestType && 
+            longKeyFlags == captureLongFlag;
+    return res;
+}
+
+TUint CaptureRequest::translatedModifierMask()
+{
+    TUint res = translatedModifier(mModifiersMask);
+    return res;
+}
+
+TUint CaptureRequest::translatedModifier()
+{
+    TUint res = translatedModifier(mModifier);
+    return res;
+}
+
+TUint CaptureRequest::translatedModifier(Qt::KeyboardModifiers aModifier)
+{
+    TUint res = 0;
+    if (aModifier & Qt::ShiftModifier) {
+        res |= EModifierShift;
+    }
+
+    if (aModifier & Qt::ControlModifier) {
+        res |= EModifierCtrl;
+    }
+
+    if (aModifier & Qt::AltModifier) {
+        res |= EModifierAlt;
+    }
+
+    if (aModifier & Qt::KeypadModifier) {
+        res |= EModifierKeypad;
+    }
+    return res;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/capturerequest_s60.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#ifndef CAPTUREREQUEST_S60_H
+#define CAPTUREREQUEST_S60_H
+
+#include <qnamespace.h>
+#include <QMap>
+
+#include "xqkeycapture.h"
+
+class RWindowGroup;
+class QKeyMapper;
+
+#ifdef _XQKEYCAPTURE_UNITTEST_
+    class MyTestWindowGroup;
+#endif
+
+class CaptureRequest {
+
+public:
+    enum CaptureRequestType {
+    CaptureRequestTypeNormal,
+    CaptureRequestTypeLong,
+    CaptureRequestTypeUpAndDown
+    };
+
+    CaptureRequest(TUint aKey, Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier, CaptureRequestType aRequestType, XQKeyCapture::LongFlags aLongKeyFlags,
+#ifndef _XQKEYCAPTURE_UNITTEST_
+    RWindowGroup* aGroup
+#else
+    MyTestWindowGroup* aGroup
+#endif
+    );
+
+    ~CaptureRequest();
+
+    int request();
+
+    int cancel();
+
+    bool operator==(const CaptureRequest& other) const;
+
+    bool matches(TUint aKey, Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
+        CaptureRequestType aRequestType, 
+        XQKeyCapture::LongFlags captureLongFlag = XQKeyCapture::LongWaitNotApplicable) const;
+
+private:
+    TUint translatedModifierMask();
+    TUint translatedModifier();
+    TUint translatedModifier(Qt::KeyboardModifiers aModifier);
+    
+private:
+    const TUint mKey;
+    const Qt::KeyboardModifiers mModifiersMask;
+    const Qt::KeyboardModifiers mModifier;
+    const CaptureRequestType mRequestType;
+    const XQKeyCapture::LongFlags longKeyFlags;
+    
+    long int mRequestHandle;
+    long int mAdditionalRequestHandle;
+    
+#ifndef _XQKEYCAPTURE_UNITTEST_
+    RWindowGroup* mGroup; //not owned
+#else
+    MyTestWindowGroup* mGroup;
+#endif
+    QKeyMapper* mMapper;
+//    QMap<Qt::Key, TUint> *mQtToS60KeyMap;//not owned
+//    QMap<Qt::Key, TUint> *mQtToS60StdScanCodeMap;    //not owned
+};
+
+#endif /* CAPTUREREQUEST_S60_H */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/keycapture.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,49 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+DIR_PRFX=.
+
+HEADERS += \
+  $${DIR_PRFX}/xqkeycapture.h \
+  $${DIR_PRFX}/keycapture_p.h \
+  $${DIR_PRFX}/txlogger.h
+
+SOURCES += \
+  $${DIR_PRFX}/xqkeycapture.cpp
+  
+symbian { 
+    HEADERS += $${DIR_PRFX}/keycapture_s60_p.h \
+                $${DIR_PRFX}/capturerequest_s60.h \
+                $${DIR_PRFX}/keymapper.h \
+                $${DIR_PRFX}/responsehandler.h \
+                $${DIR_PRFX}/responsehandlerex.h \
+                $${DIR_PRFX}/targetwrapper.h
+    SOURCES += $${DIR_PRFX}/keycapture_s60_p.cpp \
+                $${DIR_PRFX}/capturerequest_s60.cpp \
+                $${DIR_PRFX}/keymapper.cpp \
+                $${DIR_PRFX}/responsehandler.cpp \
+                $${DIR_PRFX}/responsehandlerex.cpp \
+                $${DIR_PRFX}/targetwrapper.cpp
+} else { 
+    HEADERS += $${DIR_PRFX}/keycapture_stub_p.h
+    SOURCES += $${DIR_PRFX}/keycapture_stub_p.cpp
+}
+  
+LIBS += -lws32 -lcone
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/keycapture.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,52 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = lib
+TARGET = xqkeycapture
+
+CONFIG += qt
+QT        += core gui
+
+DEFINES += XQKEYCAPTURE_LIBRARY
+
+# for debug purposes
+#DEFINES += ENABLETRACE
+#DEFINES += TRACE_FILE
+ 
+INCLUDEPATH += \ 
+           /sf/mw/qt/include/Qt \
+           . 
+
+#INCLUDEPATH += /sf/mw/qt/src/gui/kernel/
+
+
+LIBS += -lremconcoreapi \
+        -lremconinterfacebase \
+        -lremconextensionapi
+symbian { 
+    INCLUDEPATH += . /epoc32/include
+    defFilePath=..
+    TARGET.UID3 = 0x2002C342
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.EPOCHEAPSIZE = 0x020000 0x2000000
+    TARGET.CAPABILITY = ALL -TCB
+}
+
+include(keycapture.pri)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/keycapture_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#ifdef Q_OS_SYMBIAN
+#include "keycapture_s60_p.h"
+#else
+#include "keycapture_stub_p.h"
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/keycapture_s60_p.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#include "keycapture_s60_p.h"
+#include "capturerequest_s60.h"
+
+#include "keymapper.h"
+
+#include <w32std.h>
+#include <coemain.h> 
+#include <eikenv.h> 
+
+#include "targetwrapper.h"
+#include "txlogger.h"
+
+#ifdef _XQKEYCAPTURE_UNITTEST_
+    #include "tsrc\mytestwindowgroup.h"
+#endif
+
+int KeyCapturePrivate::mRemoteEventType_KeyPress = 0;
+int KeyCapturePrivate::mRemoteEventType_KeyRelease = 0;
+
+KeyCapturePrivate::KeyCapturePrivate() :
+    mLastError(KErrNone), mLastErrorString(QString("OK")),
+#ifndef _XQKEYCAPTURE_UNITTEST_
+        mWindowGroup( CEikonEnv::Static()->RootWin()), 
+#else
+        mWindowGroup( *MyTestWindowGroup::Instance()),
+#endif
+        mRequestsList(new QList<CaptureRequest*> ()),
+        mMapper(new QKeyMapper()),
+        tgWrapper(new TargetWrapper())
+{
+
+}
+
+KeyCapturePrivate::~KeyCapturePrivate()
+{
+    if (mRequestsList){
+        qDeleteAll(mRequestsList->begin(), mRequestsList->end());
+        mRequestsList->clear();
+    }
+    delete mRequestsList;
+    delete mMapper;
+    delete tgWrapper;
+}
+
+bool KeyCapturePrivate::doCapture(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier,
+        CaptureRequest::CaptureRequestType aType,
+        XQKeyCapture::LongFlags aLongType)
+{
+    int err = mLastError;
+    CaptureRequest *req = new CaptureRequest(aKey, aModifiersMask, aModifier,
+            aType, aLongType, &mWindowGroup);
+    mLastError = req->request();
+    mRequestsList->append(req);
+    if (err != mLastError)
+        regenerateError();
+
+    return errorId() == KErrNone;
+}
+
+bool KeyCapturePrivate::doCancelCapture(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier, 
+        CaptureRequest::CaptureRequestType aType,
+        XQKeyCapture::LongFlags aLongType)
+{
+    int err = mLastError;
+
+    for (int i(0), size(mRequestsList->count()); i < size; i++) {
+        CaptureRequest *request = mRequestsList->at(i);
+        if (request && request->matches(aKey, aModifiersMask, aModifier, aType,
+                aLongType)) {
+            mLastError = request->cancel();
+            mRequestsList->removeAt(i);
+            delete request;
+            break;
+        }
+    }
+
+    if (err != mLastError)
+        regenerateError();
+
+    return errorId() == KErrNone;
+}
+
+QString KeyCapturePrivate::errorString() const
+{
+    return mLastErrorString;
+}
+
+int KeyCapturePrivate::errorId() const
+{
+    return mLastError;
+}
+
+void KeyCapturePrivate::regenerateError()
+{
+    if (mLastError != KErrNone) {
+        mLastErrorString = QString("ERROR: %1").arg(mLastError);
+    } else {
+        mLastErrorString = QString("OK");
+    }
+}
+
+bool KeyCapturePrivate::initRemote(XQKeyCapture::CapturingFlags flags)
+{
+    int err;
+    QT_TRYCATCH_ERROR(err, tgWrapper->init(flags));
+    mLastError = err;
+    if (err != mLastError)
+        regenerateError();
+
+    return errorId() == KErrNone;
+}
+
+bool KeyCapturePrivate::closeRemote(XQKeyCapture::CapturingFlags flags)
+{
+    int err;
+    QT_TRYCATCH_ERROR(err, tgWrapper->close(flags));
+    mLastError = err;
+    if (err != mLastError)
+        regenerateError();
+
+    return errorId() == KErrNone;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/keycapture_s60_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#ifndef KEYCAPTUREPRIVATE_S60_H
+#define KEYCAPTUREPRIVATE_S60_H
+
+#include <qnamespace.h>
+#include <QString>
+#include <QList>
+#include "capturerequest_s60.h"
+
+class RWindowGroup;
+class RWsSession;
+class TargetWrapper;
+
+class QKeyMapper;
+#ifdef _XQKEYCAPTURE_UNITTEST_
+class MyTestWindowGroup;
+#endif
+
+class KeyCapturePrivate
+    {
+
+public:
+    KeyCapturePrivate();
+    ~KeyCapturePrivate();
+
+    bool initRemote(XQKeyCapture::CapturingFlags flags);
+    
+    bool closeRemote(XQKeyCapture::CapturingFlags flags);
+
+    QString errorString() const;
+
+    int errorId() const;
+
+private:
+    static int mRemoteEventType_KeyPress;
+    static int mRemoteEventType_KeyRelease;
+    
+private:
+    bool doCapture(TUint aKey, Qt::KeyboardModifiers aModifiersMask,
+            Qt::KeyboardModifiers aModifier,
+            CaptureRequest::CaptureRequestType type,
+            XQKeyCapture::LongFlags aLongType =
+                    XQKeyCapture::LongWaitNotApplicable);
+
+    bool doCancelCapture(TUint aKey, Qt::KeyboardModifiers aModifiersMask,
+            Qt::KeyboardModifiers aModifier,
+            CaptureRequest::CaptureRequestType type,
+            XQKeyCapture::LongFlags aLongType =
+                    XQKeyCapture::LongWaitNotApplicable);
+
+    void regenerateError();
+
+private:
+    int mLastError;
+    QString mLastErrorString;
+#ifndef _XQKEYCAPTURE_UNITTEST_
+    RWindowGroup& mWindowGroup; //not owned
+#else
+    MyTestWindowGroup& mWindowGroup; //not owned
+#endif
+    QList<CaptureRequest*> *mRequestsList;
+    QKeyMapper* mMapper;
+    
+    TargetWrapper *tgWrapper;
+    
+    friend class XQKeyCapture;
+    friend class XqKeyCapture;
+    };
+
+#endif /* KEYCAPTUREPRIVATE_S60_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/keycapture_stub_p.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#include "keycapture_stub_p.h"
+
+int KeyCapturePrivate::mRemoteEventType_KeyPress = 0;
+int KeyCapturePrivate::mRemoteEventType_KeyRelease = 0;
+
+KeyCapturePrivate::KeyCapturePrivate()
+{
+
+}
+
+KeyCapturePrivate::~KeyCapturePrivate()
+{
+}
+
+bool KeyCapturePrivate::initRemote(XQKeyCapture::CapturingFlags flags, XQKeyCapture::HandlingEvents events)
+{
+    Q_UNUSED(flags);
+    Q_UNUSED(events);
+    
+    return false;
+}
+
+bool KeyCapturePrivate::closeRemote(XQKeyCapture::CapturingFlags flags, XQKeyCapture::HandlingEvents events)
+{
+    Q_UNUSED(flags);
+    Q_UNUSED(events);
+    
+    return false;
+}
+
+bool KeyCapturePrivate::doCapture(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier,
+        CaptureRequest::CaptureRequestType aType,
+        XQKeyCapture::LongFlags aLongType)
+{
+    Q_UNUSED(aKey);
+    Q_UNUSED(aModifiersMask);
+    Q_UNUSED(aModifier);
+    Q_UNUSED(aType);
+    Q_UNUSED(aLongType);
+    return false;
+}
+
+bool KeyCapturePrivate::doCancelCapture(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier, 
+        CaptureRequest::CaptureRequestType aType,
+        XQKeyCapture::LongFlags aLongType)
+{
+    Q_UNUSED(aKey);
+    Q_UNUSED(aModifiersMask);
+    Q_UNUSED(aModifier);
+    Q_UNUSED(aType);
+    Q_UNUSED(aLongType);
+    return false;
+}
+
+QString KeyCapturePrivate::errorString() const
+{
+    return QString();
+}
+
+int KeyCapturePrivate::errorId() const
+{
+    return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/keycapture_stub_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#ifndef KEYCAPTUREPRIVATE_STUB_H
+#define KEYCAPTUREPRIVATE_STUB_H
+
+#include <qnamespace.h>
+#include <QString>
+
+class KeyCapturePrivate {
+
+public:
+    KeyCapturePrivate();
+    ~KeyCapturePrivate();
+
+    bool initRemote(XQKeyCapture::CapturingFlags, XQKeyCapture::HandlingEvents);
+        
+    bool closeRemote(XQKeyCapture::CapturingFlags, XQKeyCapture::HandlingEvents);
+    
+    QString errorString() const;
+
+    int errorId() const;
+    
+private:
+    bool doCapture(TUint aKey, Qt::KeyboardModifiers aModifiersMask,
+            Qt::KeyboardModifiers aModifier,
+            CaptureRequest::CaptureRequestType type,
+            XQKeyCapture::LongFlags aLongType =
+                    XQKeyCapture::LongWaitNotApplicable);
+
+    bool doCancelCapture(TUint aKey, Qt::KeyboardModifiers aModifiersMask,
+            Qt::KeyboardModifiers aModifier,
+            CaptureRequest::CaptureRequestType type,
+            XQKeyCapture::LongFlags aLongType =
+                    XQKeyCapture::LongWaitNotApplicable);
+
+private:
+    static int mRemoteEventType_KeyPress;
+    static int mRemoteEventType_KeyRelease;
+    
+    friend class XQKeyCapture;
+};
+
+#endif /* KEYCAPTUREPRIVATE_STUB_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/keymapper.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+//
+// TODO: this file is only tempral while we wait for Qt patch approval and include
+// 
+ 
+#include "keymapper.h"
+#include <e32keys.h>
+using namespace Qt;
+
+static const KeyMapping keyMapping[] = {
+    {EKeyBackspace, EStdKeyBackspace, Key_Backspace},
+    {EKeyTab, EStdKeyTab, Key_Tab},
+    {EKeyEnter, EStdKeyEnter, Key_Enter},
+    {EKeyEscape, EStdKeyEscape, Key_Escape},
+    {EKeySpace, EStdKeySpace, Key_Space},
+    {EKeyDelete, EStdKeyDelete, Key_Delete},
+    {EKeyPrintScreen, EStdKeyPrintScreen, Key_SysReq},
+    {EKeyPause, EStdKeyPause, Key_Pause},
+    {EKeyHome, EStdKeyHome, Key_Home},
+    {EKeyEnd, EStdKeyEnd, Key_End},
+    {EKeyPageUp, EStdKeyPageUp, Key_PageUp},
+    {EKeyPageDown, EStdKeyPageDown, Key_PageDown},
+    {EKeyInsert, EStdKeyInsert, Key_Insert},
+    {EKeyLeftArrow, EStdKeyLeftArrow, Key_Left},
+    {EKeyRightArrow, EStdKeyRightArrow, Key_Right},
+    {EKeyUpArrow, EStdKeyUpArrow, Key_Up},
+    {EKeyDownArrow, EStdKeyDownArrow, Key_Down},
+    {EKeyLeftShift, EStdKeyLeftShift, Key_Shift},
+    {EKeyRightShift, EStdKeyRightShift, Key_Shift},
+    {EKeyLeftAlt, EStdKeyLeftAlt, Key_Alt},
+    {EKeyRightAlt, EStdKeyRightAlt, Key_AltGr},
+    {EKeyLeftCtrl, EStdKeyLeftCtrl, Key_Control},
+    {EKeyRightCtrl, EStdKeyRightCtrl, Key_Control},
+    {EKeyLeftFunc, EStdKeyLeftFunc, Key_Super_L},
+    {EKeyRightFunc, EStdKeyRightFunc, Key_Super_R},
+    {EKeyCapsLock, EStdKeyCapsLock, Key_CapsLock},
+    {EKeyNumLock, EStdKeyNumLock, Key_NumLock},
+    {EKeyScrollLock, EStdKeyScrollLock, Key_ScrollLock},
+    {EKeyF1, EStdKeyF1, Key_F1},
+    {EKeyF2, EStdKeyF2, Key_F2},
+    {EKeyF3, EStdKeyF3, Key_F3},
+    {EKeyF4, EStdKeyF4, Key_F4},
+    {EKeyF5, EStdKeyF5, Key_F5},
+    {EKeyF6, EStdKeyF6, Key_F6},
+    {EKeyF7, EStdKeyF7, Key_F7},
+    {EKeyF8, EStdKeyF8, Key_F8},
+    {EKeyF9, EStdKeyF9, Key_F9},
+    {EKeyF10, EStdKeyF10, Key_F10},
+    {EKeyF11, EStdKeyF11, Key_F11},
+    {EKeyF12, EStdKeyF12, Key_F12},
+    {EKeyF13, EStdKeyF13, Key_F13},
+    {EKeyF14, EStdKeyF14, Key_F14},
+    {EKeyF15, EStdKeyF15, Key_F15},
+    {EKeyF16, EStdKeyF16, Key_F16},
+    {EKeyF17, EStdKeyF17, Key_F17},
+    {EKeyF18, EStdKeyF18, Key_F18},
+    {EKeyF19, EStdKeyF19, Key_F19},
+    {EKeyF20, EStdKeyF20, Key_F20},
+    {EKeyF21, EStdKeyF21, Key_F21},
+    {EKeyF22, EStdKeyF22, Key_F22},
+    {EKeyF23, EStdKeyF23, Key_F23},
+    {EKeyF24, EStdKeyF24, Key_F24},
+    {EKeyOff, EStdKeyOff, Key_PowerOff},
+//    {EKeyMenu, EStdKeyMenu, Key_Menu}, // Menu is EKeyApplication0
+    {EKeyHelp, EStdKeyHelp, Key_Help},
+    {EKeyDial, EStdKeyDial, Key_Call},
+    {EKeyIncVolume, EStdKeyIncVolume, Key_VolumeUp},
+    {EKeyDecVolume, EStdKeyDecVolume, Key_VolumeDown},
+    {EKeyDevice0, EStdKeyDevice0, Key_Context1}, // Found by manual testing.
+    {EKeyDevice1, EStdKeyDevice1, Key_Context2}, // Found by manual testing.
+    {EKeyDevice3, EStdKeyDevice3, Key_Select},
+    {EKeyDevice7, EStdKeyDevice7, Key_Camera},  
+    {EKeyApplication0, EStdKeyApplication0, Key_Menu}, // Found by manual testing.
+    {EKeyApplication1, EStdKeyApplication1, Key_Launch1}, // Found by manual testing.
+    {EKeyApplication2, EStdKeyApplication2, Key_MediaPlay}, // Found by manual testing.
+    {EKeyApplication3, EStdKeyApplication3, Key_MediaStop}, // Found by manual testing.
+    {EKeyApplication4, EStdKeyApplication4, Key_MediaNext}, // Found by manual testing.
+    {EKeyApplication5, EStdKeyApplication5, Key_MediaPrevious}, // Found by manual testing.
+    {EKeyApplication6, EStdKeyApplication6, Key_Launch6},
+    {EKeyApplication7, EStdKeyApplication7, Key_Launch7},
+    {EKeyApplication8, EStdKeyApplication8, Key_Launch8},
+    {EKeyApplication9, EStdKeyApplication9, Key_Launch9},
+    {EKeyApplicationA, EStdKeyApplicationA, Key_LaunchA},
+    {EKeyApplicationB, EStdKeyApplicationB, Key_LaunchB},
+    {EKeyApplicationC, EStdKeyApplicationC, Key_LaunchC},
+    {EKeyApplicationD, EStdKeyApplicationD, Key_LaunchD},
+    {EKeyApplicationE, EStdKeyApplicationE, Key_LaunchE},
+    {EKeyApplicationF, EStdKeyApplicationF, Key_LaunchF},
+    {EKeyApplication19, EStdKeyApplication19, Key_CameraFocus}, 
+    {EKeyYes, EStdKeyYes, Key_Yes},
+    {EKeyNo, EStdKeyNo, Key_No},
+    {TKeyCode(0), TStdScanCode(0), Qt::Key(0)}
+};
+
+QKeyMapper::QKeyMapper()
+{
+   // fillKeyMap();
+}
+
+QKeyMapper::~QKeyMapper()
+{
+}
+
+int QKeyMapper::mapS60KeyToQt(TUint s60key)
+{
+    int res = Qt::Key_unknown;
+    for (int i = 0; keyMapping[i].s60KeyCode != 0; i++) {
+        if (keyMapping[i].s60KeyCode == s60key) {
+            res = keyMapping[i].qtKey;
+            break;
+        }
+    }
+    return res;
+}
+
+int QKeyMapper::mapS60ScanCodesToQt(TUint s60scanCode)
+{
+    int res = Qt::Key_unknown;
+    for (int i = 0; keyMapping[i].s60KeyCode != 0; i++) {
+        if (keyMapping[i].s60ScanCode == s60scanCode) {
+            res = keyMapping[i].qtKey;
+            break;
+        }
+    }
+    return res;
+}
+
+int QKeyMapper::mapQtToS60Key(int qtKey)
+{
+    int res = KErrUnknown;
+    for (int i = 0; keyMapping[i].s60KeyCode != 0; i++) {
+        if (keyMapping[i].qtKey == qtKey) {
+            res = keyMapping[i].s60KeyCode;
+            break;
+        }
+    }
+    return res;
+}
+
+int QKeyMapper::mapQtToS60ScanCodes(int qtKey)
+{
+    int res = KErrUnknown;
+    for (int i = 0; keyMapping[i].s60KeyCode != 0; i++) {
+        if (keyMapping[i].qtKey == qtKey) {
+            res = keyMapping[i].s60ScanCode;
+            break;
+        }
+    }
+    return res;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/keymapper.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+//
+// TODO: this file is only tempral while we wait for Qt patch approval and include
+// 
+
+#ifndef KEYMAPPER_H
+#define KEYMAPPER_H
+
+#include <QObject>
+#include <qkeysequence.h>
+#include <qlist.h>
+#include <qlocale.h>
+#include <qevent.h>
+#include <qhash.h>
+
+#include <e32keys.h>
+
+class QKeyEvent;
+
+
+struct KeyMapping{
+    TKeyCode s60KeyCode;
+    TStdScanCode s60ScanCode;
+    Qt::Key qtKey;
+};
+
+class QKeyMapper
+{
+public:
+    QKeyMapper();
+    ~QKeyMapper();
+
+#if defined(Q_OS_SYMBIAN)
+public:
+    int mapS60KeyToQt(TUint s60key);
+    int mapS60ScanCodesToQt(TUint s60key);
+    int mapQtToS60Key(int qtKey);
+    int mapQtToS60ScanCodes(int qtKey);
+#endif
+};
+
+#endif // KEYMAPPER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/responsehandler.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#include "responsehandler.h"
+
+#include <remconcoreapi.h>
+#include <remconinterfaceselector.h>
+#include <remconcoreapitarget.h>
+#include <remconcoreapitargetobserver.h>    
+
+
+CResponseHandler::CResponseHandler(
+    CRemConCoreApiTarget& aRemConCoreApiTarget )
+    : CActive( CActive::EPriorityStandard ),
+      iRemConCoreApiTarget( aRemConCoreApiTarget )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+CResponseHandler* CResponseHandler::NewL(
+    CRemConCoreApiTarget& aRemConCoreApiTarget )
+    {
+    CResponseHandler* self =
+        new (ELeave) CResponseHandler( aRemConCoreApiTarget );
+
+    return self;
+    }
+
+CResponseHandler::~CResponseHandler()
+    {
+    Cancel();
+    iResponseArray.Close();
+    }
+
+void CResponseHandler::CompleteAnyKey(TRemConCoreApiOperationId aOperationId)
+    {
+    if ( !IsActive() )
+        {
+/*
+        switch ( aOperationId )
+            {
+            case ERemConCoreApiVolumeUp:
+                {
+                iRemConCoreApiTarget.VolumeUpResponse( iStatus, KErrNone );
+                SetActive();
+                break;
+                }
+            case ERemConCoreApiVolumeDown:
+                {
+                iRemConCoreApiTarget.VolumeDownResponse( iStatus, KErrNone );
+                SetActive();
+                break;
+                }
+            
+            //TODO MORE!
+                
+            default:
+                {
+*/
+                TInt error = KErrNone;
+                iRemConCoreApiTarget.SendResponse(iStatus, aOperationId, error );
+                SetActive();
+/*
+                break;
+                }
+            }
+*/
+        }
+    // already active. Append to array and complete later.
+    else
+        {
+        iResponseArray.Append( aOperationId );
+        }
+    }
+
+void CResponseHandler::DoCancel()
+    {
+    if ( iResponseArray.Count() )
+        iRemConCoreApiTarget.Cancel();
+    }
+
+void CResponseHandler::RunL()
+    {
+    // if any existing -> Send response
+    if ( iResponseArray.Count() )
+        {
+        CompleteAnyKey( iResponseArray[0] );
+        // Remove already completed key
+        iResponseArray.Remove( 0 );
+        iResponseArray.Compress();
+        }
+    
+    if ( iResponseArray.Count() )
+        SetActive();
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/responsehandler.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#ifndef RESPONSEHANDLER_H_
+#define RESPONSEHANDLER_H_
+
+#include <remconcoreapitarget.h>
+
+#include <remconcoreapi.h>
+#include <remconinterfaceselector.h>
+#include <remconcoreapitarget.h>
+#include <remconcoreapitargetobserver.h>    
+
+NONSHARABLE_CLASS(CResponseHandler) : public CActive
+{
+public:
+
+    /**
+     * Two-phased constructor.
+     *
+     * @since 3.0
+     * @param aRemConCoreApiTarget RemCon core target object.
+     * @return Pointer to newly created object.
+     */
+    static CResponseHandler* NewL( CRemConCoreApiTarget& aRemConCoreApiTarget );
+
+    /**
+     * Destructor.
+     */
+    virtual ~CResponseHandler();
+
+    /**
+     * Send the any key response back to Remcon server
+     *
+     * @since 3.0
+     * @param aOperationId RemCon operation Id.
+     */
+    void CompleteAnyKey( TRemConCoreApiOperationId aOperationId );
+
+private:
+
+    /**
+     * C++ default constructor.
+     */
+    CResponseHandler( CRemConCoreApiTarget& aRemConCoreApiTarget );
+
+// from base class CActive
+
+    /**
+     * From CActive
+     * Handles an active object's request completion event.
+     */
+    void RunL();
+
+    /**
+     * From CActive
+     * Implements cancellation of an outstanding request.
+     */
+    void DoCancel();
+
+private:    // Data
+
+    // Response array.
+    RArray<TRemConCoreApiOperationId> iResponseArray;   // Own
+    CRemConCoreApiTarget& iRemConCoreApiTarget;         // Not own
+};
+
+#endif /* RESPONSEHANDLER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/responsehandlerex.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#include "ResponseHandlerEx.h"
+
+#include <remconcoreapi.h>
+#include <remconinterfaceselector.h>
+#include <remconcoreapitarget.h>
+#include <remconcoreapitargetobserver.h>
+
+#include <remconcallhandlingtarget.h>
+
+CResponseHandlerEx::CResponseHandlerEx(
+        CRemConCallHandlingTarget& aRemConCallHandlingTarget) :
+    CActive(CActive::EPriorityStandard), iRemConCallHandlingTarget(
+            aRemConCallHandlingTarget)
+{
+    CActiveScheduler::Add(this);
+}
+
+CResponseHandlerEx* CResponseHandlerEx::NewL(
+        CRemConCallHandlingTarget& aRemConCallHandlingTarget)
+{
+    CResponseHandlerEx* self = new (ELeave) CResponseHandlerEx(
+            aRemConCallHandlingTarget);
+
+    return self;
+}
+
+CResponseHandlerEx::~CResponseHandlerEx()
+{
+    Cancel();
+    iResponseArray.Close();
+}
+
+void CResponseHandlerEx::CompleteAnyKey(int id)
+{
+    if (!IsActive())
+        {
+        TInt error = KErrNone;
+        iRemConCallHandlingTarget.SendResponse(iStatus, id, error);
+        SetActive();
+        }
+    else
+        {
+        // already active. Append to array and complete later.
+        iResponseArray.Append(id);
+        }
+}
+
+void CResponseHandlerEx::DoCancel()
+{
+    if ( iResponseArray.Count() )
+        iRemConCallHandlingTarget.Cancel();
+}
+
+void CResponseHandlerEx::RunL()
+{
+    // if any existing -> Send response
+    if (iResponseArray.Count())
+        {
+        CompleteAnyKey(iResponseArray[0]);
+        // Remove already completed key
+        iResponseArray.Remove(0);
+        iResponseArray.Compress();
+        }
+    
+    if ( iResponseArray.Count() )
+        SetActive();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/responsehandlerex.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#ifndef RESPONSEHANDLEREX_H_
+#define RESPONSEHANDLEREX_H_
+
+#include <remconcoreapitarget.h>
+
+#include <remconcoreapi.h>
+#include <remconinterfaceselector.h>
+#include <remconcallhandlingtarget.h>
+#include <remconcallhandlingtargetobserver.h>    
+
+NONSHARABLE_CLASS(CResponseHandlerEx) : public CActive
+{
+public:
+
+    /**
+     * Two-phased constructor.
+     *
+     * @since 3.0
+     * @param aRemConCoreApiTarget RemCon core target object.
+     * @return Pointer to newly created object.
+     */
+    static CResponseHandlerEx* NewL( CRemConCallHandlingTarget& aRemConCallHandlingTarget );
+
+    /**
+     * Destructor.
+     */
+    virtual ~CResponseHandlerEx();
+
+    /**
+     * Send the any key response back to Remcon server
+     *
+     * @since 3.0
+     * @param aOperationId RemCon operation Id.
+     */
+    void CompleteAnyKey(int id );
+
+private:
+
+    /**
+     * C++ default constructor.
+     */
+    CResponseHandlerEx( CRemConCallHandlingTarget& aRemConCallHandlingTarget );
+
+// from base class CActive
+
+    /**
+     * From CActive
+     * Handles an active object's request completion event.
+     */
+    void RunL();
+
+    /**
+     * From CActive
+     * Implements cancellation of an outstanding request.
+     */
+    void DoCancel();
+
+private:    // Data
+
+    // Response array.
+    RArray<int> iResponseArray;   // Own
+    CRemConCallHandlingTarget& iRemConCallHandlingTarget;         // Not own
+};
+
+#endif /* RESPONSEHANDLEREX_H__H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/targetwrapper.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,298 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#include "targetwrapper.h"
+
+#include <QMenuBar>
+#include <QApplication>
+#include <QVBoxLayout>
+#include <QPlainTextEdit>
+#include <QTimer>
+
+#include <QDebug>
+#include <QtGlobal>
+
+#include "responsehandler.h"
+#include "responsehandlerex.h"
+
+#include "txlogger.h"
+
+TargetWrapper::TargetWrapper()
+:
+selector(0),
+target(0),
+targetEx(0),
+handler(0),
+handlerEx(0)
+{
+    initMapping();
+}
+
+TargetWrapper::~TargetWrapper()
+{
+    delete selector;
+}
+
+void TargetWrapper::close(XQKeyCapture::CapturingFlags flags)
+{
+    captureFlags &= ~flags;
+    reset();
+}
+
+void TargetWrapper::init(XQKeyCapture::CapturingFlags flags)
+{
+    captureFlags |= flags;
+    reset();
+}
+
+void TargetWrapper::reset()
+{
+    try {
+        delete selector;
+    
+        QT_TRAP_THROWING(selector = CRemConInterfaceSelector::NewL());
+        
+        if (captureFlags & XQKeyCapture::CaptureBasic) {
+            QT_TRAP_THROWING(target = CRemConCoreApiTarget::NewL(*selector, *this));
+            QT_TRAP_THROWING(handler = CResponseHandler::NewL(*target));
+        }
+         
+        if (captureFlags & XQKeyCapture::CaptureCallHandlingExt) {
+            QT_TRAP_THROWING(targetEx = CRemConCallHandlingTarget::NewL(*selector, *this));
+            QT_TRAP_THROWING(handlerEx = CResponseHandlerEx::NewL(*targetEx));
+        }
+        
+        QT_TRAP_THROWING(selector->OpenTargetL());
+    
+    } catch (const std::exception &e) {
+        delete selector;
+        selector = 0;
+        target = 0;
+        targetEx = 0;
+        handler = 0;
+        handlerEx = 0;
+        qDebug() << "TargetWrapper::init - exception: " << e.what();
+        throw;
+    }    
+}
+
+Qt::Key TargetWrapper::mapKey(TRemConCoreApiOperationId aOperationId)
+{
+    Qt::Key key = keyMapping.value(aOperationId);
+    
+    if (key != Qt::Key())
+        return key;
+    else {
+        return Qt::Key_unknown;
+    }
+    
+}
+
+void TargetWrapper::MrccatoCommand(TRemConCoreApiOperationId aOperationId, TRemConCoreApiButtonAction aButtonAct)
+{
+    Qt::Key key = mapKey(aOperationId); 
+
+    switch (aButtonAct) {
+        case ERemConCoreApiButtonPress:
+            TX_LOG_ARGS("ERemConCoreApiButtonPress");
+            sendKey(QEvent::KeyPress, key, Qt::NoModifier, aOperationId);
+            break;
+        case ERemConCoreApiButtonRelease:
+            TX_LOG_ARGS("ERemConCoreApiButtonRelease");
+            sendKey(QEvent::KeyRelease, key, Qt::NoModifier, aOperationId);
+            break;
+        case ERemConCoreApiButtonClick:
+            TX_LOG_ARGS("ERemConCoreApiButtonClick");
+            sendKey(QEvent::KeyPress, key, Qt::NoModifier, aOperationId);
+            sendKey(QEvent::KeyRelease, key, Qt::NoModifier, aOperationId);
+            break;
+        default:
+            return;
+    }
+
+    handler->CompleteAnyKey(aOperationId);
+}
+
+void TargetWrapper::AnswerCall()
+{
+    sendKey(QEvent::KeyPress, Qt::Key_Call, Qt::NoModifier);
+    sendKey(QEvent::KeyRelease, Qt::Key_Call, Qt::NoModifier);
+    handlerEx->CompleteAnyKey(0);
+}
+
+void TargetWrapper::EndCall()
+{
+    sendKey(QEvent::KeyPress, Qt::Key_Hangup, Qt::NoModifier);
+    sendKey(QEvent::KeyRelease, Qt::Key_Hangup, Qt::NoModifier);
+    handlerEx->CompleteAnyKey(0);
+}
+
+void TargetWrapper::AnswerEndCall()
+{
+    sendKey(QEvent::KeyPress, Qt::Key_Hangup, Qt::NoModifier);  //TODO: Qt::Key_ToggleCallHangup
+    sendKey(QEvent::KeyRelease, Qt::Key_Hangup, Qt::NoModifier); 
+    handlerEx->CompleteAnyKey(0);
+}
+
+void TargetWrapper::VoiceDial( const TBool aActivate )
+{
+    Q_UNUSED(aActivate)
+}
+
+void TargetWrapper::LastNumberRedial()
+{
+}
+
+void TargetWrapper::DialCall( const TDesC8& aTelNumber )
+{
+    Q_UNUSED(aTelNumber)
+}
+
+void TargetWrapper::MultipartyCalling( const TDesC8& aData )
+{
+    Q_UNUSED(aData)
+}
+
+void TargetWrapper::GenerateDTMF( const TChar aChar )
+{
+    Q_UNUSED(aChar)
+}
+
+void TargetWrapper::SpeedDial( const TInt aIndex )    
+{
+    Q_UNUSED(aIndex)
+}
+
+void TargetWrapper::sendKey(QEvent::Type eventType, Qt::Key key, Qt::KeyboardModifiers modFlags, 
+                    TRemConCoreApiOperationId aOperationId)
+{
+    QWidget *widget = getTargetWidget();
+    if (widget) {
+        QKeyEvent *event = NULL;
+        if (captureFlags & XQKeyCapture::CaptureEnableRemoteExtEvents){
+            if (eventType == QEvent::KeyPress){
+                event = QKeyEvent::createExtendedKeyEvent(XQKeyCapture::remoteEventType_KeyPress(), 
+                        key, modFlags, 0, aOperationId, 0);
+            } else if (eventType == QEvent::KeyRelease){
+                event = QKeyEvent::createExtendedKeyEvent(XQKeyCapture::remoteEventType_KeyRelease(), 
+                        key, modFlags, 0, aOperationId, 0);
+            }
+        } else {
+            event = new QKeyEvent(eventType, key, modFlags);
+        }
+        
+        if (event){
+            QApplication::sendEvent(widget, event);
+            qDebug("sending key event!");
+            delete event;
+        }
+    }
+}
+
+QWidget *TargetWrapper::getTargetWidget()
+{
+    QWidget *widget;
+    widget = QWidget::keyboardGrabber();
+    
+    if (!widget) {
+        widget = QApplication::focusWidget();
+    }
+    
+    if (!widget) {
+        if (QApplication::activePopupWidget()) {
+            widget = QApplication::activePopupWidget()->focusWidget();
+            if (!widget) {
+                widget = QApplication::activePopupWidget();
+            }
+        }
+    }
+
+    return widget;
+}
+
+
+
+void TargetWrapper::initMapping()
+{
+    keyMapping.insert(ERemConCoreApiSelect, Qt::Key_Select);
+    keyMapping.insert(ERemConCoreApiUp, Qt::Key_Up);
+    keyMapping.insert(ERemConCoreApiDown, Qt::Key_Down);
+    keyMapping.insert(ERemConCoreApiLeft, Qt::Key_Left); // Qt::Key_Direction_L
+    keyMapping.insert(ERemConCoreApiRight, Qt::Key_Right); // Qt::Key_Direction_R
+    keyMapping.insert(ERemConCoreApiRightUp, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiRightDown, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiLeftUp, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiLeftDown, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiRootMenu, Qt::Key_TopMenu); // Qt::Key_Menu
+    keyMapping.insert(ERemConCoreApiSetupMenu, Qt::Key_unknown); 
+    keyMapping.insert(ERemConCoreApiContentsMenu, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiFavoriteMenu, Qt::Key_Favorites); 
+    keyMapping.insert(ERemConCoreApiExit, Qt::Key_unknown); // Qt::Key_Escape, Qt::Key_Cancel, Qt::Key_No
+    keyMapping.insert(ERemConCoreApi0, Qt::Key_0);
+    keyMapping.insert(ERemConCoreApi1, Qt::Key_1);
+    keyMapping.insert(ERemConCoreApi2, Qt::Key_2);
+    keyMapping.insert(ERemConCoreApi3, Qt::Key_3);
+    keyMapping.insert(ERemConCoreApi4, Qt::Key_4);
+    keyMapping.insert(ERemConCoreApi5, Qt::Key_5);
+    keyMapping.insert(ERemConCoreApi6, Qt::Key_6);
+    keyMapping.insert(ERemConCoreApi7, Qt::Key_7);
+    keyMapping.insert(ERemConCoreApi8, Qt::Key_8);
+    keyMapping.insert(ERemConCoreApi9, Qt::Key_9);
+    keyMapping.insert(ERemConCoreApiDot, Qt::Key_Period);
+    keyMapping.insert(ERemConCoreApiEnter, Qt::Key_Enter);
+    keyMapping.insert(ERemConCoreApiClear, Qt::Key_Clear);
+    keyMapping.insert(ERemConCoreApiChannelUp, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiChannelDown, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiPreviousChannel, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiSoundSelect, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiInputSelect, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiDisplayInformation, Qt::Key_unknown);   // Qt::Key_Time ???
+    keyMapping.insert(ERemConCoreApiHelp, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiPageUp, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiPageDown, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiPower, Qt::Key_unknown); // Qt::Key_PowerOff, Qt::Key_WakeUp, Qt::Key_PowerDown, Qt::Key_Suspend
+    keyMapping.insert(ERemConCoreApiVolumeUp, Qt::Key_VolumeUp);
+    keyMapping.insert(ERemConCoreApiVolumeDown, Qt::Key_VolumeDown);
+    keyMapping.insert(ERemConCoreApiMute, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiPlay, Qt::Key_MediaPlay);
+    keyMapping.insert(ERemConCoreApiStop, Qt::Key_MediaStop);
+    keyMapping.insert(ERemConCoreApiPause, Qt::Key_unknown); // NEW: Qt::Key_MediaPause
+    keyMapping.insert(ERemConCoreApiRecord, Qt::Key_MediaRecord);
+    keyMapping.insert(ERemConCoreApiRewind, Qt::Key_AudioRewind);
+    keyMapping.insert(ERemConCoreApiFastForward, Qt::Key_AudioForward);
+    keyMapping.insert(ERemConCoreApiEject, Qt::Key_Eject);
+    keyMapping.insert(ERemConCoreApiForward, Qt::Key_MediaNext);
+    keyMapping.insert(ERemConCoreApiBackward, Qt::Key_MediaPrevious);
+    keyMapping.insert(ERemConCoreApiAngle, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiSubpicture, Qt::Key_unknown);  // Qt::Key_SplitScreen ???
+    keyMapping.insert(ERemConCoreApiPausePlayFunction, Qt::Key_MediaPlay); // NEW: Media_PausePlay
+    keyMapping.insert(ERemConCoreApiRestoreVolumeFunction, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiTuneFunction, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiSelectDiskFunction, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiSelectAvInputFunction, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiSelectAudioInputFunction, Qt::Key_unknown);
+    keyMapping.insert(ERemConCoreApiF1, Qt::Key_F1);
+    keyMapping.insert(ERemConCoreApiF2, Qt::Key_F2);
+    keyMapping.insert(ERemConCoreApiF3, Qt::Key_F3);
+    keyMapping.insert(ERemConCoreApiF4, Qt::Key_F4);
+    keyMapping.insert(ERemConCoreApiF5, Qt::Key_F5);
+    keyMapping.insert(ENop, Qt::Key_unknown);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/targetwrapper.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#ifndef TARGETWRAPPER_H_
+#define TARGETWRAPPER_H_
+
+#include <remconcoreapi.h>
+#include <remconinterfaceselector.h>
+#include <remconcoreapitarget.h>
+#include <remconcoreapitargetobserver.h>    
+#include <remconcoreapitargetobserver.h>    
+#include <remconcallhandlingtargetobserver.h>
+#include <remconcallhandlingtarget.h>
+
+#include <QMainWindow>
+#include <QMap>
+#include <QEvent>
+
+#include <e32base.h>
+
+#include <XqKeyCapture>
+
+class QPlainTextEdit;
+class QAction;
+class QWidget;
+class QMenu;
+
+#ifdef XQKEYCAPTURE_LIBRARY
+#define XQKEYCAPTURE_EXPORT Q_DECL_EXPORT
+#else
+#define XQKEYCAPTURE_EXPORT Q_DECL_IMPORT
+#endif
+
+
+class CResponseHandler;
+class CResponseHandlerEx;
+
+class TargetWrapper : public MRemConCoreApiTargetObserver, public MRemConCallHandlingTargetObserver
+{
+public:
+    TargetWrapper();
+    
+    ~TargetWrapper();
+    
+    void init(XQKeyCapture::CapturingFlags flags);
+    void close(XQKeyCapture::CapturingFlags flags);
+
+public:
+    // -- MRemConCoreApiTargetObserver overloaded methods --    
+    void MrccatoCommand(TRemConCoreApiOperationId aOperationId, TRemConCoreApiButtonAction aButtonAct);
+    
+    // -- MRemConCallHandlingTargetObserver overloaded methods --    
+    
+     void AnswerCall();
+
+     void EndCall();
+    
+     void AnswerEndCall();
+    
+     void VoiceDial( const TBool aActivate );
+    
+     void LastNumberRedial();
+    
+     void DialCall( const TDesC8& aTelNumber );
+    
+     void MultipartyCalling( const TDesC8& aData );
+    
+     void GenerateDTMF( const TChar aChar );
+    
+     void SpeedDial( const TInt aIndex );    
+     
+protected:    
+     
+    void reset();
+    void initMapping();
+
+    QWidget *getTargetWidget();
+    
+    void sendKey(QEvent::Type eventType, Qt::Key key, Qt::KeyboardModifiers modFlags, 
+            TRemConCoreApiOperationId aOperationId = ENop);
+
+    Qt::Key mapKey(TRemConCoreApiOperationId aOperationId);
+
+private:
+    CRemConInterfaceSelector *selector;
+    
+    CRemConCoreApiTarget *target;
+    CRemConCallHandlingTarget *targetEx;
+
+    CResponseHandler *handler;
+    CResponseHandlerEx *handlerEx;
+    
+    QFlags<XQKeyCapture::CapturingFlags> captureFlags;
+    
+    QMap<TRemConCoreApiOperationId, Qt::Key> keyMapping;
+};
+
+#endif /* TARGETWRAPPER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/tsrc/mytestwindowgroup.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+ 
+
+
+#include "mytestwindowgroup.h"
+
+//MyTestWindowGroup* MyTestWindowGroup::instance = 0;
+
+
+MyTestWindowGroup* MyTestWindowGroup::Instance(){
+    //if(instance == NULL)
+    //    instance = new MyTestWindowGroup();
+    static MyTestWindowGroup singleton;
+    return &singleton;
+
+    //return instance;
+    }
+
+    MyTestWindowGroup::~MyTestWindowGroup() { 
+        //if(instance) 
+        //    delete instance;
+    }
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/tsrc/mytestwindowgroup.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+ 
+#ifndef MYTESTWINDOWGROUP_H
+#define MYTESTWINDOWGROUP_H
+
+#include <qnamespace.h>
+#include <QString>
+#include <QList>
+#include <qobject>
+#include <W32STD.H>
+
+    enum WindowGroupActionType {
+        WGATCaptureKey,
+        WGATCaptureLongKey,
+        WGATCaptureKeyUpAndDowns,
+        WGATCancelCaptureKey,
+        WGATCancelCaptureKeyUpAndDowns,
+        WGATCancelCaptureLongKey
+        };
+
+class MyTestWindowGroup : public QObject {
+    Q_OBJECT
+
+public:
+    static MyTestWindowGroup* Instance();
+    
+
+    void setRequestNumber( long int req ) {
+        requestNumber = req;
+        };
+    
+    TInt32 CaptureKey(TUint aKeycode, TUint aModifierMask, TUint aModifier){
+        QList<unsigned int> arglist;
+        arglist << aKeycode << aModifierMask << aModifier;
+        emit windowGroupAction( WGATCaptureKey, arglist );
+        return requestNumber;
+    };
+    
+    TInt32 CaptureLongKey(TUint aInputKeyCode,TUint aOutputKeyCode,TUint aModifierMask,TUint aModifier ,TInt aPriority,TUint aFlags){
+        QList<unsigned int> arglist;
+        arglist << aInputKeyCode << aOutputKeyCode << aModifierMask << aModifier << aPriority << aFlags;
+        emit windowGroupAction( WGATCaptureLongKey, arglist );
+        return requestNumber;
+    };
+    
+    TInt32 CaptureKeyUpAndDowns(TUint aScanCode, TUint aModifierMask, TUint aModifier){
+        QList<unsigned int> arglist;
+        arglist << aScanCode << aModifierMask << aModifier;
+        emit windowGroupAction( WGATCaptureKeyUpAndDowns, arglist );
+        return requestNumber;
+    };
+    
+    void CancelCaptureKey(TInt32 aCaptureKey){
+        QList<long int> arglist;
+        arglist << aCaptureKey ;
+        emit windowGroupActionCancel( WGATCancelCaptureKey, arglist );
+    };
+    
+    void CancelCaptureKeyUpAndDowns(TInt32 aCaptureKey){
+        QList<long int> arglist;
+        arglist << aCaptureKey ;
+        emit windowGroupActionCancel( WGATCancelCaptureKeyUpAndDowns, arglist );
+    };
+    
+    void CancelCaptureLongKey(TInt32 aCaptureKey){
+        QList<long int> arglist;
+        arglist << aCaptureKey ;
+        emit windowGroupActionCancel( WGATCancelCaptureLongKey, arglist );
+    };
+    
+signals:
+    void windowGroupAction( WindowGroupActionType, QList<unsigned int> );
+    void windowGroupActionCancel( WindowGroupActionType, QList<long int> );
+    
+protected:
+    MyTestWindowGroup() : requestNumber(0) {};
+    ~MyTestWindowGroup();
+    
+private:
+    //static MyTestWindowGroup* instance;
+    long int requestNumber;
+};
+
+
+
+#endif /* MYTESTWINDOWGROUP_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/tsrc/test_xqkeycapture.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,1718 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <QtTest/QtTest>
+#include <QEventLoop>
+#include <QDebug>
+#include <QtCore>
+#include "mytestwindowgroup.h"
+#include <W32STD.H>
+#include <xqkeycapture.h>
+
+#include <QFile>
+
+class TestXQKeyCapture : public QObject
+{
+    Q_OBJECT
+
+public:
+    TestXQKeyCapture(): QObject(), keyCapture(0) {};
+
+
+private slots:
+    void initTestCase();
+    void cleanupTestCase();
+    void init();
+    void cleanup();
+    
+    void testCreateAndDestroy();
+
+    void testCaptureKey_data();
+    void testCaptureKey();
+
+    void testCaptureKeyList_data();
+    void testCaptureKeyList();
+
+	void testCaptureKey_S60_data();
+	void testCaptureKey_S60();
+
+    void testCaptureKeyList_S60_data();
+	void testCaptureKeyList_S60();
+
+    void testCaptureKeyUpAndDowns_data();
+    void testCaptureKeyUpAndDowns();
+
+    void testCaptureKeyUpAndDownsList_data();
+    void testCaptureKeyUpAndDownsList();
+
+    void testCaptureKeyUpAndDowns_S60_data();
+    void testCaptureKeyUpAndDowns_S60();
+
+    void testCaptureKeyUpAndDownsList_S60_data();
+    void testCaptureKeyUpAndDownsList_S60();
+
+    void testCaptureLongKey_data();
+    void testCaptureLongKey();
+
+    void testCaptureLongKeyList_data();
+    void testCaptureLongKeyList();
+
+    void testCaptureLongKey_S60_data();
+    void testCaptureLongKey_S60();
+
+    void testCaptureLongKeyList_S60_data();
+    void testCaptureLongKeyList_S60();
+
+    void testCancelCaptureKey_data();
+    void testCancelCaptureKey();
+
+    void testCancelCaptureKeyList_data();
+    void testCancelCaptureKeyList();
+
+    void testCancelCaptureKey_S60_data();
+    void testCancelCaptureKey_S60();
+
+    void testCancelCaptureKeyList_S60_data();
+    void testCancelCaptureKeyList_S60();
+
+    void testCancelCaptureKeyUpAndDowns_data();
+    void testCancelCaptureKeyUpAndDowns();
+
+    void testCancelCaptureKeyUpAndDownsList_data();
+    void testCancelCaptureKeyUpAndDownsList();
+
+    void testCancelCaptureKeyUpAndDowns_S60_data();
+    void testCancelCaptureKeyUpAndDowns_S60();
+
+    void testCancelCaptureKeyUpAndDownsList_S60_data();
+    void testCancelCaptureKeyUpAndDownsList_S60();
+
+    void testCancelCaptureLongKey_data();
+    void testCancelCaptureLongKey();
+
+    void testCancelCaptureLongKeyList_data();
+    void testCancelCaptureLongKeyList();
+
+    void testCancelCaptureLongKey_S60_data();
+    void testCancelCaptureLongKey_S60();
+
+    void testCancelCaptureLongKeyList_S60_data();
+    void testCancelCaptureLongKeyList_S60();
+
+    void testErrorString();
+    void testErrorId();
+	
+	void testKeyMapperFile();
+
+private:
+	QString clearString(const QString& line);
+	QString clearString(const QString& line, const QString& prefix, const QString& comment);
+    
+private:
+    XQKeyCapture* keyCapture;
+
+    Qt::Key aKey;
+    Qt::KeyboardModifiers aModifiersMap;
+    Qt::KeyboardModifiers aModifier;
+    
+    int numOfArgs;
+    WindowGroupActionType actionType;
+    QList<unsigned int> results;
+    QList<unsigned int> additionalResults;
+    
+    QList<long int> cancelResults;
+    QList<long int> cancelAdditionalResults;
+    
+    long int additionalRequestHandle;
+    
+    bool willBeAdditionalRequest;
+    bool additionalResult;
+    bool ignoreWindowGroupAction;
+    
+    
+public slots:
+    void windowGroupAction( WindowGroupActionType, QList<unsigned int> );
+    void windowGroupActionCancel( WindowGroupActionType, QList<long int> );
+    
+};
+
+// ======== MEMBER FUNCTIONS ========
+void TestXQKeyCapture::initTestCase()
+{
+    bool ret = connect( MyTestWindowGroup::Instance(), SIGNAL( windowGroupAction( WindowGroupActionType, QList<unsigned int> )),
+            this, SLOT( windowGroupAction( WindowGroupActionType, QList<unsigned int> ) ) );
+    QVERIFY( ret );
+    ret = connect( MyTestWindowGroup::Instance(), SIGNAL( windowGroupActionCancel( WindowGroupActionType, QList<long int> )),
+            this, SLOT( windowGroupActionCancel( WindowGroupActionType, QList<long int> ) ) );
+    QVERIFY( ret );
+    
+}
+
+void TestXQKeyCapture::cleanupTestCase()
+{
+    //delete MyTestWindowGroup::Instance();
+}
+
+void TestXQKeyCapture::init()
+{
+    keyCapture = new XQKeyCapture();
+}
+
+void TestXQKeyCapture::cleanup()
+{
+    delete keyCapture;
+}
+
+void TestXQKeyCapture::testCreateAndDestroy()
+{
+    //empty, all done in init and cleanup
+}
+
+////////////////////////////////////////////////////////////////
+// CAPTURE
+//Capture Key
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testCaptureKey_data()
+{
+    QTest::addColumn<unsigned int>("qtKey");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+
+    QTest::addColumn<unsigned int>("symbianKey");
+    QTest::addColumn<unsigned int>("symbianMask");
+    QTest::addColumn<unsigned int>("symbianModifier");
+        
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<unsigned int>("additionalSymbianKey");
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( Qt::Key_Escape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<unsigned int> ( EKeyEscape )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<long int> ( 12 )
+                            << false
+                            << static_cast<unsigned int> ( 0 );
+
+    QTest::newRow("esc_key_not_supported") << static_cast<unsigned int> ( Qt::Key_Escape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<unsigned int> ( EKeyEscape )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<long int> ( KErrNotSupported )
+                            << false
+                            << static_cast<unsigned int> ( 0 );
+    
+    QTest::newRow("esc_key_modifiers") << static_cast<unsigned int> ( Qt::Key_Escape ) 
+                            << static_cast<unsigned int> ( Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt:: KeypadModifier )
+                            << static_cast<unsigned int> ( Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt:: KeypadModifier ) 
+                            << static_cast<unsigned int> ( EKeyEscape )
+                            << static_cast<unsigned int> ( EModifierShift | EModifierCtrl | EModifierAlt | EModifierKeypad )
+                            << static_cast<unsigned int> ( EModifierShift | EModifierCtrl | EModifierAlt | EModifierKeypad )
+                            << static_cast<long int> ( 13 )
+                            << false
+                            << static_cast<unsigned int> ( 0 );
+    
+    QTest::newRow("shift_key") << static_cast<unsigned int> ( Qt::Key_Shift ) 
+                            << static_cast<unsigned int> ( Qt::ShiftModifier )
+                            << static_cast<unsigned int> ( Qt::ShiftModifier ) 
+                            << static_cast<unsigned int> ( EKeyLeftShift )
+                            << static_cast<unsigned int> ( EModifierShift )
+                            << static_cast<unsigned int> ( EModifierShift )
+                            << static_cast<long int> ( 12 )
+                            << true
+                            << static_cast<unsigned int> ( EKeyRightShift );
+
+    QTest::newRow("control_key") << static_cast<unsigned int> ( Qt::Key_Control ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<unsigned int> ( EKeyLeftCtrl )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<long int> ( 12 )
+                            << true
+                            << static_cast<unsigned int> ( EKeyRightCtrl );
+                            
+    QTest::newRow("meta_key") << static_cast<unsigned int> ( Qt::Key_Super_R ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<unsigned int> ( EKeyRightFunc )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<long int> ( 12 )
+                            << true
+                            << static_cast<unsigned int> ( EKeyRightFunc );
+
+
+}
+
+void TestXQKeyCapture::testCaptureKey()
+{
+    numOfArgs = 3;
+    actionType = WGATCaptureKey;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianMask << symbianModifier;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+
+    keyCapture->captureKey( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+
+//    keyCapture->captureKey( QList<Qt::Key>() << static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+void TestXQKeyCapture::testCaptureKeyList_data() 
+{
+    testCaptureKey_data();
+}
+
+void TestXQKeyCapture::testCaptureKeyList()
+{
+    numOfArgs = 3;
+    actionType = WGATCaptureKey;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianMask << symbianModifier;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+
+    keyCapture->captureKey( QList<Qt::Key>() << static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+////////////////////////////////////////////////////////////////
+//Capture Key Up And Downs
+////////////////////////////////////////////////////////////////
+
+void TestXQKeyCapture::testCaptureKey_S60_data()
+{
+    QTest::addColumn<unsigned int>("s60Key");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+
+    QTest::addColumn<unsigned int>("symbianKey");
+    QTest::addColumn<unsigned int>("symbianMask");
+    QTest::addColumn<unsigned int>("symbianModifier");
+        
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<unsigned int>("additionalSymbianKey");
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( EKeyEscape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<unsigned int> ( EKeyEscape )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<long int> ( 12 )
+                            << false
+                            << static_cast<unsigned int> ( 0 );
+
+    QTest::newRow("esc_key_not_supported") << static_cast<unsigned int> ( EKeyEscape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<unsigned int> ( EKeyEscape )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<long int> ( KErrNotSupported )
+                            << false
+                            << static_cast<unsigned int> ( 0 );
+    
+    QTest::newRow("esc_key_modifiers") << static_cast<unsigned int> ( EKeyEscape ) 
+                            << static_cast<unsigned int> ( Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt:: KeypadModifier )
+                            << static_cast<unsigned int> ( Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt:: KeypadModifier ) 
+                            << static_cast<unsigned int> ( EKeyEscape )
+                            << static_cast<unsigned int> ( EModifierShift | EModifierCtrl | EModifierAlt | EModifierKeypad )
+                            << static_cast<unsigned int> ( EModifierShift | EModifierCtrl | EModifierAlt | EModifierKeypad )
+                            << static_cast<long int> ( 13 )
+                            << false
+                            << static_cast<unsigned int> ( 0 );
+    
+    QTest::newRow("shift_key") << static_cast<unsigned int> ( EKeyLeftShift ) 
+                            << static_cast<unsigned int> ( Qt::ShiftModifier )
+                            << static_cast<unsigned int> ( Qt::ShiftModifier ) 
+                            << static_cast<unsigned int> ( EKeyLeftShift )
+                            << static_cast<unsigned int> ( EModifierShift )
+                            << static_cast<unsigned int> ( EModifierShift )
+                            << static_cast<long int> ( 12 )
+                            << true
+                            << static_cast<unsigned int> ( EKeyRightShift );
+
+    QTest::newRow("control_key") << static_cast<unsigned int> ( EKeyRightCtrl ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<unsigned int> ( EKeyRightCtrl )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<long int> ( 12 )
+                            << true
+                            << static_cast<unsigned int> ( EKeyRightFunc );
+                            
+    QTest::newRow("meta_key") << static_cast<unsigned int> ( EKeyLeftCtrl ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<unsigned int> ( EKeyLeftCtrl )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<long int> ( 12 )
+                            << true
+                            << static_cast<unsigned int> ( EKeyLeftFunc );
+
+
+}
+
+void TestXQKeyCapture::testCaptureKey_S60()
+{
+    numOfArgs = 3;
+    actionType = WGATCaptureKey;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, s60Key);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianMask << symbianModifier;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    keyCapture->captureKey( static_cast<TUint> (s60Key), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+void TestXQKeyCapture::testCaptureKeyList_S60_data()
+{
+    testCaptureKey_S60_data();
+}
+
+void TestXQKeyCapture::testCaptureKeyList_S60()
+{
+    numOfArgs = 3;
+    actionType = WGATCaptureKey;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, s60Key);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianMask << symbianModifier;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    keyCapture->captureKey(QList<TUint>() << static_cast<TUint> (s60Key), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+////////////////////////////////////////////////////////////////
+//Capture Key Up And Downs
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testCaptureKeyUpAndDowns_data()
+{
+    QTest::addColumn<unsigned int>("qtKey");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+
+    QTest::addColumn<unsigned int>("symbianKey");
+    QTest::addColumn<unsigned int>("symbianMask");
+    QTest::addColumn<unsigned int>("symbianModifier");
+        
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<unsigned int>("additionalSymbianKey");
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( Qt::Key_Escape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<unsigned int> ( EStdKeyEscape )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<long int> ( 12 )
+                            << false
+                            << static_cast<unsigned int> ( 0 );
+}
+
+void TestXQKeyCapture::testCaptureKeyUpAndDowns()
+{
+    numOfArgs = 3;
+    actionType = WGATCaptureKeyUpAndDowns;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianMask << symbianModifier;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    keyCapture->captureKeyUpAndDowns( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+void TestXQKeyCapture::testCaptureKeyUpAndDownsList_data()
+{
+    testCaptureKeyUpAndDowns_data();
+}
+
+void TestXQKeyCapture::testCaptureKeyUpAndDownsList()
+{
+    numOfArgs = 3;
+    actionType = WGATCaptureKeyUpAndDowns;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianMask << symbianModifier;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    keyCapture->captureKeyUpAndDowns( QList<Qt::Key>() << static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+////////////////////////////////////////////////////////////////
+//Capture Key Up And Downs
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testCaptureKeyUpAndDowns_S60_data()
+{
+    QTest::addColumn<unsigned int>("qtKey");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+
+    QTest::addColumn<unsigned int>("symbianKey");
+    QTest::addColumn<unsigned int>("symbianMask");
+    QTest::addColumn<unsigned int>("symbianModifier");
+        
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<unsigned int>("additionalSymbianKey");
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( EStdKeyEscape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<unsigned int> ( EStdKeyEscape )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<long int> ( 12 )
+                            << false
+                            << static_cast<unsigned int> ( 0 );
+}
+
+void TestXQKeyCapture::testCaptureKeyUpAndDowns_S60()
+{
+    numOfArgs = 3;
+    actionType = WGATCaptureKeyUpAndDowns;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianMask << symbianModifier;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    keyCapture->captureKeyUpAndDowns( static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+void TestXQKeyCapture::testCaptureKeyUpAndDownsList_S60_data()
+{
+    testCaptureKeyUpAndDowns_S60_data();
+}
+
+void TestXQKeyCapture::testCaptureKeyUpAndDownsList_S60()
+{
+    numOfArgs = 3;
+    actionType = WGATCaptureKeyUpAndDowns;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianMask << symbianModifier;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    keyCapture->captureKeyUpAndDowns( QList<TUint>() << static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+////////////////////////////////////////////////////////////////
+//Capture Long Key
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testCaptureLongKey_data()
+{
+    QTest::addColumn<unsigned int>("qtKey");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+    QTest::addColumn<int>("longFlags");
+    
+    QTest::addColumn<unsigned int>("symbianKey");
+    QTest::addColumn<unsigned int>("symbianMask");
+    QTest::addColumn<unsigned int>("symbianModifier");
+    QTest::addColumn<int>("symbianPriority");
+    QTest::addColumn<int>("symbianLongFlags");
+        
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<unsigned int>("additionalSymbianKey");
+    
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( Qt::Key_Escape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<int> ( XQKeyCapture::LongNormal ) 
+                            << static_cast<unsigned int> ( EKeyEscape )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<int> ( 0 ) //priority
+                            << static_cast<int> ( XQKeyCapture::LongNormal ) 
+                            << static_cast<long int> ( 12 )
+                            << false
+                            << static_cast<unsigned int> ( 0 );
+
+}
+
+void TestXQKeyCapture::testCaptureLongKey()
+{
+    numOfArgs = 6;
+    actionType = WGATCaptureLongKey;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+    QFETCH(int, longFlags);
+    
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+    QFETCH(int, symbianPriority);
+    QFETCH(int, symbianLongFlags);
+    
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianKey << symbianMask << symbianModifier << symbianPriority << symbianLongFlags;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier << symbianPriority << symbianLongFlags;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    keyCapture->captureLongKey( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+}
+
+void TestXQKeyCapture::testCaptureLongKeyList_data()
+{
+    testCaptureLongKey_data();
+}
+
+void TestXQKeyCapture::testCaptureLongKeyList()
+{
+    numOfArgs = 6;
+    actionType = WGATCaptureLongKey;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+    QFETCH(int, longFlags);
+    
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+    QFETCH(int, symbianPriority);
+    QFETCH(int, symbianLongFlags);
+    
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianKey << symbianMask << symbianModifier << symbianPriority << symbianLongFlags;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier << symbianPriority << symbianLongFlags;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    keyCapture->captureLongKey( QList<Qt::Key>() << static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+}
+
+////////////////////////////////////////////////////////////////
+//Capture Long Key
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testCaptureLongKey_S60_data()
+{
+    QTest::addColumn<unsigned int>("qtKey");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+    QTest::addColumn<int>("longFlags");
+    
+    QTest::addColumn<unsigned int>("symbianKey");
+    QTest::addColumn<unsigned int>("symbianMask");
+    QTest::addColumn<unsigned int>("symbianModifier");
+    QTest::addColumn<int>("symbianPriority");
+    QTest::addColumn<int>("symbianLongFlags");
+        
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<unsigned int>("additionalSymbianKey");
+    
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( EKeyEscape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<int> ( XQKeyCapture::LongNormal ) 
+                            << static_cast<unsigned int> ( EKeyEscape )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<unsigned int> ( 0 )
+                            << static_cast<int> ( 0 ) //priority
+                            << static_cast<int> ( XQKeyCapture::LongNormal ) 
+                            << static_cast<long int> ( 12 )
+                            << false
+                            << static_cast<unsigned int> ( 0 );
+
+}
+
+void TestXQKeyCapture::testCaptureLongKey_S60()
+{
+    numOfArgs = 6;
+    actionType = WGATCaptureLongKey;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+    QFETCH(int, longFlags);
+    
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+    QFETCH(int, symbianPriority);
+    QFETCH(int, symbianLongFlags);
+    
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianKey << symbianMask << symbianModifier << symbianPriority << symbianLongFlags;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier << symbianPriority << symbianLongFlags;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    keyCapture->captureLongKey( static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+}
+
+void TestXQKeyCapture::testCaptureLongKeyList_S60_data()
+{
+    testCaptureLongKey_S60_data();
+}
+
+void TestXQKeyCapture::testCaptureLongKeyList_S60()
+{
+    numOfArgs = 6;
+    actionType = WGATCaptureLongKey;
+    additionalResult = false;
+    ignoreWindowGroupAction = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+    QFETCH(int, longFlags);
+    
+    QFETCH(unsigned int, symbianKey);
+    QFETCH(unsigned int, symbianMask);
+    QFETCH(unsigned int, symbianModifier);
+    QFETCH(int, symbianPriority);
+    QFETCH(int, symbianLongFlags);
+    
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(unsigned int, additionalSymbianKey);
+    
+    willBeAdditionalRequest = additional;
+    
+    results.clear();
+    results << symbianKey << symbianKey << symbianMask << symbianModifier << symbianPriority << symbianLongFlags;
+    
+    additionalResults.clear();
+    additionalResults << additionalSymbianKey << symbianMask << symbianModifier << symbianPriority << symbianLongFlags;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    keyCapture->captureLongKey( QList<TUint>() << static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+}
+
+////////////////////////////////////////////////////////////////
+// CANCEL
+//Cancel Capture Key
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testCancelCaptureKey_data()
+{
+    QTest::addColumn<unsigned int>("qtKey");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<long int>("additionalReqNum");
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( Qt::Key_Escape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<long int> ( 12 )
+                            << false
+                            << static_cast<long int> ( 0 );
+
+    QTest::newRow("esc_key_not_supported") << static_cast<unsigned int> ( Qt::Key_Escape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<long int> ( KErrNotSupported )
+                            << false
+                            << static_cast<long int> ( 0 );
+    
+    QTest::newRow("esc_key_modifiers") << static_cast<unsigned int> ( Qt::Key_Escape ) 
+                            << static_cast<unsigned int> ( Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt:: KeypadModifier )
+                            << static_cast<unsigned int> ( Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt:: KeypadModifier ) 
+                            << static_cast<long int> ( 13 )
+                            << false
+                            << static_cast<long int> ( 0 );
+    
+    QTest::newRow("shift_key") << static_cast<unsigned int> ( Qt::Key_Shift ) 
+                            << static_cast<unsigned int> ( Qt::ShiftModifier )
+                            << static_cast<unsigned int> ( Qt::ControlModifier ) 
+                            << static_cast<long int> ( 15 )
+                            << true
+                            << static_cast<long int> ( 16 );
+
+    QTest::newRow("control_key") << static_cast<unsigned int> ( Qt::Key_Control ) 
+                            << static_cast<unsigned int> ( Qt::ControlModifier )
+                            << static_cast<unsigned int> ( Qt::ShiftModifier ) 
+                            << static_cast<long int> ( 17 )
+                            << true
+                            << static_cast<long int> ( 18 );
+                            
+    QTest::newRow("meta_key") << static_cast<unsigned int> ( Qt::Key_Meta ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<long int> ( 19 )
+                            << true
+                            << static_cast<long int> ( 20 );
+
+
+}
+
+void TestXQKeyCapture::testCancelCaptureKey()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureKey;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureKey( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureKey( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+void TestXQKeyCapture::testCancelCaptureKeyList_data()
+{
+    testCancelCaptureKey_data();
+}
+
+void TestXQKeyCapture::testCancelCaptureKeyList()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureKey;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureKey( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureKey( QList<Qt::Key>() << static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+////////////////////////////////////////////////////////////////
+// CANCEL
+//Cancel Capture Key
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testCancelCaptureKey_S60_data()
+{
+    QTest::addColumn<unsigned int>("qtKey");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<long int>("additionalReqNum");
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( EKeyEscape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<long int> ( 12 )
+                            << false
+                            << static_cast<long int> ( 0 );
+
+    QTest::newRow("esc_key_not_supported") << static_cast<unsigned int> ( EKeyEscape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<long int> ( KErrNotSupported )
+                            << false
+                            << static_cast<long int> ( 0 );
+    
+    QTest::newRow("esc_key_modifiers") << static_cast<unsigned int> ( EKeyEscape ) 
+                            << static_cast<unsigned int> ( Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt:: KeypadModifier )
+                            << static_cast<unsigned int> ( Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt:: KeypadModifier ) 
+                            << static_cast<long int> ( 13 )
+                            << false
+                            << static_cast<long int> ( 0 );
+    
+    QTest::newRow("shift_key") << static_cast<unsigned int> ( EKeyLeftShift ) 
+                            << static_cast<unsigned int> ( Qt::ShiftModifier )
+                            << static_cast<unsigned int> ( Qt::ControlModifier ) 
+                            << static_cast<long int> ( 15 )
+                            << true
+                            << static_cast<long int> ( 16 );
+
+    QTest::newRow("control_key") << static_cast<unsigned int> ( EKeyLeftCtrl ) 
+                            << static_cast<unsigned int> ( Qt::ControlModifier )
+                            << static_cast<unsigned int> ( Qt::ShiftModifier ) 
+                            << static_cast<long int> ( 17 )
+                            << true
+                            << static_cast<long int> ( 18 );
+                            
+    QTest::newRow("meta_key") << static_cast<unsigned int> ( EKeyRightCtrl ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<long int> ( 19 )
+                            << true
+                            << static_cast<long int> ( 20 );
+
+
+}
+
+void TestXQKeyCapture::testCancelCaptureKey_S60()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureKey;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureKey( static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureKey( static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+void TestXQKeyCapture::testCancelCaptureKeyList_S60_data()
+{
+    testCancelCaptureKey_S60_data();
+}
+
+void TestXQKeyCapture::testCancelCaptureKeyList_S60()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureKey;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureKey( static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureKey( QList<TUint>() << static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+////////////////////////////////////////////////////////////////
+//Cancel Capture Key Up And Downs
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testCancelCaptureKeyUpAndDowns_data()
+{
+    QTest::addColumn<unsigned int>("qtKey");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<long int>("additionalReqNum");
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( Qt::Key_Escape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<long int> ( 34 )
+                            << false
+                            << static_cast<long int> ( 35 );
+
+}
+
+void TestXQKeyCapture::testCancelCaptureKeyUpAndDowns()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureKeyUpAndDowns;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureKeyUpAndDowns( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureKeyUpAndDowns( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+void TestXQKeyCapture::testCancelCaptureKeyUpAndDownsList_data()
+{
+    testCancelCaptureKeyUpAndDowns_data();
+}
+
+void TestXQKeyCapture::testCancelCaptureKeyUpAndDownsList()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureKeyUpAndDowns;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureKeyUpAndDowns( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureKeyUpAndDowns(QList<Qt::Key>() << static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+////////////////////////////////////////////////////////////////
+//Cancel Capture Key Up And Downs
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testCancelCaptureKeyUpAndDowns_S60_data()
+{
+    QTest::addColumn<unsigned int>("qtKey");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<long int>("additionalReqNum");
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( EKeyEscape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier ) 
+                            << static_cast<long int> ( 34 )
+                            << false
+                            << static_cast<long int> ( 35 );
+
+}
+
+void TestXQKeyCapture::testCancelCaptureKeyUpAndDowns_S60()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureKeyUpAndDowns;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureKeyUpAndDowns( static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureKeyUpAndDowns( static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+void TestXQKeyCapture::testCancelCaptureKeyUpAndDownsList_S60_data()
+{
+    testCancelCaptureKeyUpAndDowns_S60_data();
+}
+
+void TestXQKeyCapture::testCancelCaptureKeyUpAndDownsList_S60()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureKeyUpAndDowns;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureKeyUpAndDowns( static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureKeyUpAndDowns(QList<TUint>() << static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ) );
+}
+
+////////////////////////////////////////////////////////////////
+//Cancel Capture Long Key
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testCancelCaptureLongKey_data()
+{
+    QTest::addColumn<unsigned int>("qtKey");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+    QTest::addColumn<int>("longFlags");
+    
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<long int>("additionalReqNum");
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( Qt::Key_Escape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<int> ( XQKeyCapture::LongNormal ) 
+                            << static_cast<long int> ( 22 )
+                            << false
+                            << static_cast<long int> ( 23 );
+
+
+
+
+
+}
+
+void TestXQKeyCapture::testCancelCaptureLongKey()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureLongKey;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+    QFETCH(int, longFlags);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureLongKey( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureLongKey( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+}
+
+void TestXQKeyCapture::testCancelCaptureLongKeyList_data()
+{
+    testCancelCaptureLongKey_data();
+}
+
+void TestXQKeyCapture::testCancelCaptureLongKeyList()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureLongKey;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+    QFETCH(int, longFlags);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureLongKey( static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureLongKey( QList<Qt::Key>() << static_cast<Qt::Key> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+}
+
+////////////////////////////////////////////////////////////////
+//Cancel Capture Long Key
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testCancelCaptureLongKey_S60_data()
+{
+    QTest::addColumn<unsigned int>("qtKey");
+    QTest::addColumn<unsigned int>("qtMask");
+    QTest::addColumn<unsigned int>("qtModifier");
+    QTest::addColumn<int>("longFlags");
+    
+    QTest::addColumn<long int>("reqNum");
+    
+    QTest::addColumn<bool>("additional");
+    QTest::addColumn<long int>("additionalReqNum");
+    
+    QTest::newRow("esc_key") << static_cast<unsigned int> ( EKeyEscape ) 
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<unsigned int> ( Qt::NoModifier )
+                            << static_cast<int> ( XQKeyCapture::LongNormal ) 
+                            << static_cast<long int> ( 22 )
+                            << false
+                            << static_cast<long int> ( 23 );
+
+
+
+
+
+}
+
+void TestXQKeyCapture::testCancelCaptureLongKey_S60()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureLongKey;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+    QFETCH(int, longFlags);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureLongKey( static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureLongKey( static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+}
+
+void TestXQKeyCapture::testCancelCaptureLongKeyList_S60_data()
+{
+    testCancelCaptureLongKey_S60_data();
+}
+
+void TestXQKeyCapture::testCancelCaptureLongKeyList_S60()
+{
+    numOfArgs = 1;
+    actionType = WGATCancelCaptureLongKey;
+    additionalResult = false;
+    
+    QFETCH(unsigned int, qtKey);
+    QFETCH(unsigned int, qtMask);
+    QFETCH(unsigned int, qtModifier);
+    QFETCH(int, longFlags);
+
+    QFETCH(long int, reqNum);
+    
+    QFETCH(bool, additional);
+    QFETCH(long int, additionalReqNum);
+    
+    willBeAdditionalRequest = additional;
+    additionalRequestHandle = additionalReqNum;
+    
+    cancelResults.clear();
+    cancelResults << reqNum;
+    
+    cancelAdditionalResults.clear();
+    cancelAdditionalResults << additionalReqNum;
+    
+    MyTestWindowGroup::Instance()->setRequestNumber(reqNum);
+    ignoreWindowGroupAction = true;
+    keyCapture->captureLongKey( static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+    ignoreWindowGroupAction = false;
+    willBeAdditionalRequest = additional;
+    keyCapture->cancelCaptureLongKey(QList<TUint>() << static_cast<TUint> (qtKey), Qt::KeyboardModifier( qtMask ), Qt::KeyboardModifier( qtModifier ), static_cast<XQKeyCapture::LongFlags> (longFlags) );
+}
+
+
+
+////////////////////////////////////////////////////////////////
+// ERRORS
+//errorString
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testErrorString()
+{
+    keyCapture->errorString();
+}
+
+////////////////////////////////////////////////////////////////
+// ERRORS
+//errorId
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testErrorId()
+{
+    keyCapture->errorId();
+}
+
+QString TestXQKeyCapture::clearString(const QString& line) {
+    QString s(line);
+    s.replace(" ", "");
+    s.replace("\t", "");
+    return s.trimmed();
+}
+
+QString TestXQKeyCapture::clearString(const QString& line, const QString& prefix, const QString& comment) {
+    QString s(line);
+    s.replace(prefix, comment);
+    s.replace(" ", "");
+    s.replace("\t", "");
+    return s.trimmed();
+}
+
+////////////////////////////////////////////////////////////////
+// TEST KEY MAPPER FILE
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::testKeyMapperFile()
+{
+    // test only for emulator build
+    #ifdef __WINSCW__   
+    
+    QString firstline("static const KeyMapping keyMapping[] = {");
+    QString lastline("};");
+    QString comment("//");
+    
+    QStringList qt;
+    QStringList kc;
+
+    QFile qtFile("c:\\qkeymapper_s60.cpp");
+    QVERIFY2(qtFile.open(QIODevice::ReadOnly | QIODevice::Text), "Failed to open: qtFile");
+    
+    QFile kcFile("c:\\keymapper.cpp");
+    QVERIFY2(kcFile.open(QIODevice::ReadOnly | QIODevice::Text), "Failed to open: kcFile");
+    
+    QTextStream inQtFile(&qtFile);
+    bool test(false);
+    while (!inQtFile.atEnd()) {
+        QString line = inQtFile.readLine();
+        // trim everything that is on right side of comment and add to list if needed
+        if (test) qt.append(clearString(line.split(comment).at(0)));
+        if (line.contains(firstline)) {
+            test = true;
+        }
+        if (line.contains(lastline)) {
+            test = false;
+        }
+    }
+    test = false;
+    QTextStream inKcFile(&kcFile);
+    while (!inKcFile.atEnd()) {
+        QString line = inKcFile.readLine();
+        // trim everything that is on right side of comment and add to list if needed
+        if (test) kc.append(clearString(line.split(comment).at(0)));
+        if (line.contains(firstline)) {
+            test = true;
+        }
+        if (line.contains(lastline)) {
+            test = false;
+        }
+    }
+    
+    QVERIFY2(qt.count() == kc.count(), "Amount of lines inside key definition is different");
+    
+    for(int i = 0; i < kc.size(); i++) {
+        QString keys = kc.at(i);
+        QVERIFY2(qt.contains(keys), "qtFile does not contain key(s) from capture keys");
+    }
+    
+    for(int i = 0; i < qt.size(); i++) {
+        QString keys = qt.at(i);
+        QVERIFY2(kc.contains(keys), "kcFile does not conatin qt keys");
+    }    
+#else
+    // Skip test on hw
+    QSKIP( "This test is valid only on emulator", SkipSingle);
+#endif // __WINSCW__
+}
+
+
+////////////////////////////////////////////////////////////////
+// REQUEST SLOT
+//windowGroupAction
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::windowGroupAction( WindowGroupActionType wgat, QList<unsigned int> paramList )
+{
+    if( !ignoreWindowGroupAction )
+    {
+        QVERIFY( wgat == actionType );
+        QVERIFY( paramList.count() == numOfArgs );
+        
+        for( int i = 0; i < numOfArgs; i++)
+            {
+            if( additionalResult )
+                QVERIFY( paramList[i] == additionalResults[i] );
+            else 
+                QVERIFY( paramList[i] == results[i] );
+            }
+    }
+    if( willBeAdditionalRequest ){
+        additionalResult = true;
+        MyTestWindowGroup::Instance()->setRequestNumber(additionalRequestHandle);
+        }
+}
+
+////////////////////////////////////////////////////////////////
+//windowGroupActionCancel
+////////////////////////////////////////////////////////////////
+void TestXQKeyCapture::windowGroupActionCancel( WindowGroupActionType wgat, QList<long int> paramList )
+{
+    QVERIFY( wgat == actionType );
+    QVERIFY( paramList.count() == numOfArgs );
+    
+    for( int i = 0; i < numOfArgs; i++)
+        {
+        if( additionalResult )
+            QVERIFY( paramList[i] == cancelAdditionalResults[i] );
+        else 
+            QVERIFY( paramList[i] == cancelResults[i] );
+        }
+
+    if( willBeAdditionalRequest ){
+        additionalResult = true;
+        }
+}
+
+////////////////////////////////////////////////////////////////
+// MAIN
+//main
+////////////////////////////////////////////////////////////////
+
+#ifdef _XQKEYCAPTURE_UNITTEST_LOG_TO_C_
+    main (int argc, char* argv[]) 
+    {
+        QApplication app(argc, argv);
+        TestXQKeyCapture tc;
+        int c = 3;
+        char* v[] = {argv[0], "-o", "c:/test.txt"};
+        return QTest::qExec(&tc, c, v);
+    }
+#else
+    QTEST_MAIN(TestXQKeyCapture)
+#endif
+
+#include "test_xqkeycapture.moc"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/tsrc/tsrc.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,76 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+#
+
+TEMPLATE = app
+TARGET = test_xqkeycapture
+
+
+INCLUDEPATH += . 
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+               /epoc32/include/mw/qt \
+               /epoc32/include/mw/qttest
+
+TARGET.CAPABILITY = ALL -TCB
+
+# Input
+# LIBS += 
+
+DEFINES += _XQKEYCAPTURE_UNITTEST_
+
+SOURCES += test_xqkeycapture.cpp \
+            mytestwindowgroup.cpp
+
+HEADERS += mytestwindowgroup.h
+
+HEADERS += \
+  ../xqkeycapture.h \
+  ../keycapture_p.h \
+  ../txlogger.h
+
+SOURCES += \
+  ../xqkeycapture.cpp
+  
+symbian { 
+
+    LIBS += -lremconinterfacebase -lremconcoreapi -lremconextensionapi
+	
+    HEADERS += ../keycapture_s60_p.h \
+            ../capturerequest_s60.h \
+			../keymapper.h \
+			../targetwrapper.h \
+			../responsehandler.h \
+			../responsehandlerex.h
+			
+    SOURCES +=../keycapture_s60_p.cpp \
+            ../capturerequest_s60.cpp \
+			../keymapper.cpp \
+			../targetwrapper.cpp \
+			../responsehandler.cpp \
+			../responsehandlerex.cpp
+	
+	sourcefiles.sources += /sf/mw/qt/src/gui/kernel/qkeymapper_s60.cpp
+	sourcefiles.sources += ../keymapper.cpp
+
+	sourcefiles.path = /
+    DEPLOYMENT += sourcefiles
+} else { 
+    HEADERS += ../keycapture_stub_p.h
+    SOURCES += ./keycapture_stub_p.cpp
+}
+
+CONFIG += qtestlib console
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/tsrc/xqkeycapture_test.pkg	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,28 @@
+; hbmusicapp_armv5_urel.pkg generated by qmake at Thu Mar 19 17:32:55 2009
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"test_keycapture"},(0xE6f6fbd9),1,0,0
+
+; Localised Vendor name
+%{"Nokia, Qt Software"}
+
+; Unique Vendor name
+:"Nokia, Qt Software"
+
+; Dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+
+
+"/epoc32/release/armv5/urel/test_xqkeycapture.exe"    - "C:\sys\bin\test_xqkeycapture.exe"
+"/epoc32/data/z/resource/apps/test_xqkeycapture.rsc"    - "C:\resource\apps\test_xqkeycapture.rsc"
+"/epoc32/data/z/private/10003a3f/import/apps/test_xqkeycapture_reg.rsc"    - "C:\private\10003a3f\import\apps\test_xqkeycapture_reg.rsc"
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/txlogger.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#ifndef __TXLOGGER_H
+#define __TXLOGGER_H
+
+//To enable tracking define ENABLETRACE
+//if TRACE_FILENAME is set then trace will go to file, otherwise to RDebug
+
+#include <QObject>
+#include <qglobal.h>
+
+#define XQCONNECT_ASSERT(a, b, c, d) if (!(QObject::connect((a),(b), (c), (d)))) { qFatal("Connection failed: connect(%s, %s, %s, %s)", #a, #b, #c, #d); }
+
+// stolen from qt-music :)
+#ifdef ENABLETRACE
+#include <QString>
+#include <QDebug>
+#include <QTime>
+#include <stdio.h>
+#include <stdlib.h>
+#include <e32debug.h>
+
+#ifdef TRACE_FILE
+#define _TRACE_FILENAME "c:/trace.txt"
+#define _TX_INIT void __tx_myMessageOutput(QtMsgType type, const char *msg) {\
+             static const QString timeFmt("hh:mm:ss.zzz");\
+             FILE *f = fopen(_TRACE_FILENAME, "a");\
+             fprintf(f, "%s ", QTime::currentTime().toString(timeFmt).toLatin1().data() );\
+             switch (type) {\
+             case QtDebugMsg: fprintf(f, "[DEB] %s\n", msg); break;\
+             case QtWarningMsg: fprintf(f, "[WRN] %s\n", msg); break;\
+             case QtCriticalMsg: fprintf(f, "[CRT] %s\n", msg); break;\
+             case QtFatalMsg: fprintf(f, "[FTL] %s\n", msg); fclose(f); abort();\
+             } fclose(f);\
+        }
+#else
+#define _TX_INIT void __tx_myMessageOutput(QtMsgType /*type*/, const char *msg) {\
+            RDebug::Printf("[TX] %s", msg);\
+            }
+#endif // TRACE_FILE
+#define _TX_INSTALL qInstallMsgHandler(__tx_myMessageOutput);
+#define TX_MAIN(a, b) _TX_INIT \
+            int __tx__main(int, char**); int main(int (a), char **(b)) { _TX_INSTALL return __tx__main(a, b); } int __tx__main(int (a), char **(b))
+
+#define TX_UNUSED(name);
+#define TX_STATIC_ENTRY qDebug() << __PRETTY_FUNCTION__ << "entry";
+#define TX_STATIC_ENTRY_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "entry," << args;
+#define TX_STATIC_EXIT qDebug() << __PRETTY_FUNCTION__ << "exit";
+#define TX_STATIC_EXIT_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "exit," << args; 
+#define TX_ENTRY qDebug() << __PRETTY_FUNCTION__ << "this" << (void *)this << "entry";
+#define TX_ENTRY_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "this" << (void *)this << "entry," << args;
+#define TX_EXIT qDebug() << __PRETTY_FUNCTION__ << "exit";
+#define TX_EXIT_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "exit," << args;
+#define TX_LOG qDebug() << __PRETTY_FUNCTION__ << "this" << (void *)this;
+#define TX_LOG_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << args;
+#else
+#define TX_MAIN(a,b) int main(int (a), char **(b))
+#define TX_UNUSED(name) Q_UNUSED(name);
+#define TX_STATIC_ENTRY ;
+#define TX_STATIC_ENTRY_ARGS(args) ;
+#define TX_STATIC_EXIT ;
+#define TX_STATIC_EXIT_ARGS(args) ;
+#define TX_ENTRY ;
+#define TX_ENTRY_ARGS(args) ;
+#define TX_EXIT ;
+#define TX_EXIT_ARGS(args) ;
+#define TX_LOG ;
+#define TX_LOG_ARGS(args) ;
+#endif // ENABLETRACE
+
+#endif /* __TXLOGGER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/xqkeycapture.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,963 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#include "xqkeycapture.h"
+
+#include "keycapture_p.h"
+#include "keymapper.h"
+#include <qnamespace.h>
+#include <qcoreevent.h>
+
+/*!
+ Constructor.
+*/
+XQKeyCapture::XQKeyCapture() :
+    d(new KeyCapturePrivate())
+{
+
+}
+
+/*!
+ Destructor.
+*/
+XQKeyCapture::~XQKeyCapture()
+{
+    delete d;
+}
+
+/*!
+ Initializes remote key handler(s) given by parameter.    
+ \param flags  Flag representing supported remote handler. Flags can be ORed for simulteanous initializations.  
+               CaptureEnableRemoteExtEvents flag adds posibility to receive native events from remote device. 
+               QKeyEvent::nativeVirtualKey() function returns native remote key code. 
+               Important: Extended remote events have different custome type. Static functions 
+               XQKeyCapture::remoteKeyPress() and XQKeyCapture::remoteKeyRelease() return custom
+               event types.  
+ */
+bool XQKeyCapture::captureRemoteKeys(CapturingFlags flags)
+{
+    return d->initRemote(flags);
+}
+ 
+/*!
+ Cancels remote key handler(s) given by parameter.   
+ \param flags  Flag representing supported remote interfaces. Flags can be ORed for simulteanous cancellations.  
+ */
+bool XQKeyCapture::cancelCaptureRemoteKeys(CapturingFlags flags)
+{
+    return d->closeRemote(flags);
+}
+
+/*!
+ Returns type of remote key press event. Event type is assigned dynamically.   
+ \retval returns type of remote key press event.  
+ */
+QEvent::Type XQKeyCapture::remoteEventType_KeyPress()
+{
+    if (KeyCapturePrivate::mRemoteEventType_KeyPress == 0)
+        KeyCapturePrivate::mRemoteEventType_KeyPress = QEvent::registerEventType();
+    
+    return (QEvent::Type)KeyCapturePrivate::mRemoteEventType_KeyPress;
+}
+
+/*!
+ Returns type of remote key release event. Event type is assigned dynamically.    
+ \retval returns type of remote key release event.  
+ */
+QEvent::Type XQKeyCapture::remoteEventType_KeyRelease()
+{
+    if (KeyCapturePrivate::mRemoteEventType_KeyRelease == 0)
+        KeyCapturePrivate::mRemoteEventType_KeyRelease = QEvent::registerEventType();
+    
+    return (QEvent::Type)KeyCapturePrivate::mRemoteEventType_KeyRelease;
+}
+
+/*!
+ Selects a given key for capturing key pressing. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::captureKey(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeNormal);
+}
+
+/*!
+ Selects a given key for capturing key pressing. Requires a S60 key code (TKeyCode).
+ \param aKey A S60 key code (TKeyCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::captureKey(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCapture(aKey, aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeNormal);
+}
+
+/*!
+ Selects a given key for capturing long pressing. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::captureLongKey(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
+    XQKeyCapture::LongFlags aLongType)
+{
+    return d->doCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeLong, aLongType);
+}
+
+/*!
+ Selects a given key for capturing long pressing. Requires a S60 key code (TKeyCode).
+ \param aKey A S60 key code (TKeyCode).
+ \param aModifiersMap
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::captureLongKey(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMap, Qt::KeyboardModifiers aModifier,
+    XQKeyCapture::LongFlags aLongType)
+{
+    return d->doCapture(aKey, aModifiersMap, aModifier,
+        CaptureRequest::CaptureRequestTypeLong, aLongType);
+}
+
+/*!
+ Selects a given key for capturing pressing up and down. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::captureKeyUpAndDowns(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCapture(d->mMapper->mapQtToS60ScanCodes(aKey), aModifiersMask,
+        aModifier, CaptureRequest::CaptureRequestTypeUpAndDown);
+}
+
+/*!
+ Selects a given key for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
+ \param aKey A S60 key scan code (TStdScanCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::captureKeyUpAndDowns(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCapture(aKey, aModifiersMask,
+        aModifier, CaptureRequest::CaptureRequestTypeUpAndDown);
+}
+
+/*!
+ Deselects a given key from key capturing. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::cancelCaptureKey(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCancelCapture(d->mMapper->mapQtToS60Key(aKey),
+        aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeNormal);
+}
+
+/*!
+ Deselects a given key from key capturing. Requires a S60 key code (TKeyCode).
+ \param aKey A S60 key code (TKeyCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::cancelCaptureKey(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCancelCapture(aKey, aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeNormal);
+}
+
+/*!
+ Deselects a given key from capturing long pressing. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::cancelCaptureLongKey(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
+    XQKeyCapture::LongFlags aLongType)
+{
+    return d->doCancelCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask,
+        aModifier, CaptureRequest::CaptureRequestTypeLong, aLongType);
+}
+
+/*!
+ Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode).
+ \param aKey A S60 key code (TKeyCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::cancelCaptureLongKey(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
+    XQKeyCapture::LongFlags aLongType)
+{
+    return d->doCancelCapture(aKey, aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeLong, aLongType);
+}
+
+/*!
+ Deselects a given key from capturing pressing up and down. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::cancelCaptureKeyUpAndDowns(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCancelCapture(d->mMapper->mapQtToS60ScanCodes(aKey),
+        aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeUpAndDown);
+}
+
+/*!
+ Deselects a given key from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
+ \param aKey A S60 key scan code (TStdScanCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::cancelCaptureKeyUpAndDowns(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCancelCapture(aKey, aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeUpAndDown);
+}
+
+/*!
+ Returns latest error string.
+ \retval Latest error string.
+ */
+QString XQKeyCapture::errorString() const
+{
+    return d->errorString();
+}
+
+/*!
+ Returns latest error id.
+ \retval Latest error id.
+ */
+int XQKeyCapture::errorId() const
+{
+    return d->errorId();
+}
+
+/*!
+ Selects a given keys for capturing key pressing. Requires a Qt key code.
+ \param list A Qt keys list.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::captureKey(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureKey(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Selects a given keys for capturing key pressing. Requires a S60 key code (TKeyCode).
+ \param list A S60 list of keys (TKeyCode codes).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::captureKey(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureKey(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Selects a given keys for capturing long pressing. Requires a Qt key code.
+ \param aKey A Qt  list of keys.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::captureLongKey(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier,
+        XQKeyCapture::LongFlags aLongType)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType);
+    }
+    return result;
+}
+
+/*!
+ Selects a given keys for capturing long pressing. Requires a S60 key code (TKeyCode).
+ \param list A S60 list of keys (TKeyCode codes).
+ \param aModifiersMap
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+ bool XQKeyCapture::captureLongKey(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier,
+        XQKeyCapture::LongFlags aLongType)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType);
+    }
+    return result;
+}
+
+/*!
+ Selects a given keys for capturing pressing up and down. Requires a Qt key code.
+ \param list A Qt list of keys.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::captureKeyUpAndDowns(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureKeyUpAndDowns(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Selects a given keys for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
+ \param list A list of S60 key scan codes (TStdScanCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::captureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureKeyUpAndDowns(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Deselects a given list of keys from key capturing. Requires a Qt key code.
+ \param list  A Qt list of keys.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::cancelCaptureKey(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureKey(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Deselects a given list of keys from key capturing. Requires a S60 key code (TKeyCode).
+ \param list  A S60 list of key codes (TKeyCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::cancelCaptureKey(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureKey(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Deselects a given list of keys from capturing long pressing. Requires a Qt key code.
+ \param list A list of Qt keys.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::cancelCaptureLongKey(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier,
+        XQKeyCapture::LongFlags aLongType)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
+    }
+    return result;
+}
+
+/*!
+ Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode).
+ \paramlist A list of S60 key codes (TKeyCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::cancelCaptureLongKey(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier,
+        XQKeyCapture::LongFlags aLongType)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
+    }
+    return result;
+}
+
+/*!
+ Deselects a list of given keys from capturing pressing up and down. Requires a Qt key codes.
+ \param list A list of Qt keys.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XQKeyCapture::cancelCaptureKeyUpAndDowns(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Deselects a given list of keys from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
+ \param aKey A S60 key scan code (TStdScanCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+ bool XQKeyCapture::cancelCaptureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Constructor.
+*/
+XqKeyCapture::XqKeyCapture() :
+    d(new KeyCapturePrivate())
+{
+
+}
+
+/*!
+ Destructor.
+*/
+XqKeyCapture::~XqKeyCapture()
+{
+    delete d;
+}
+
+/*!
+ Selects a given key for capturing key pressing. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+/*!
+ Selects a given key for capturing key pressing. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::captureKey(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeNormal);
+}
+
+/*!
+ Selects a given key for capturing key pressing. Requires a S60 key code (TKeyCode).
+ \param aKey A S60 key code (TKeyCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::captureKey(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCapture(aKey, aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeNormal);
+}
+
+/*!
+ Selects a given key for capturing long pressing. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::captureLongKey(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
+    XqKeyCapture::LongFlags aLongType)
+{
+    return d->doCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType);
+}
+
+/*!
+ Selects a given key for capturing long pressing. Requires a S60 key code (TKeyCode).
+ \param aKey A S60 key code (TKeyCode).
+ \param aModifiersMap
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::captureLongKey(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMap, Qt::KeyboardModifiers aModifier,
+    XqKeyCapture::LongFlags aLongType)
+{
+    return d->doCapture(aKey, aModifiersMap, aModifier,
+        CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType);
+}
+
+/*!
+ Selects a given key for capturing pressing up and down. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::captureKeyUpAndDowns(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCapture(d->mMapper->mapQtToS60ScanCodes(aKey), aModifiersMask,
+        aModifier, CaptureRequest::CaptureRequestTypeUpAndDown);
+}
+
+/*!
+ Selects a given key for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
+ \param aKey A S60 key scan code (TStdScanCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::captureKeyUpAndDowns(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCapture(aKey, aModifiersMask,
+        aModifier, CaptureRequest::CaptureRequestTypeUpAndDown);
+}
+
+/*!
+ Deselects a given key from key capturing. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::cancelCaptureKey(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCancelCapture(d->mMapper->mapQtToS60Key(aKey),
+        aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeNormal);
+}
+
+/*!
+ Deselects a given key from key capturing. Requires a S60 key code (TKeyCode).
+ \param aKey A S60 key code (TKeyCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::cancelCaptureKey(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCancelCapture(aKey, aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeNormal);
+}
+
+/*!
+ Deselects a given key from capturing long pressing. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::cancelCaptureLongKey(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
+    XqKeyCapture::LongFlags aLongType)
+{
+    return d->doCancelCapture(d->mMapper->mapQtToS60Key(aKey), aModifiersMask,
+        aModifier, CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType);
+}
+
+/*!
+ Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode).
+ \param aKey A S60 key code (TKeyCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::cancelCaptureLongKey(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
+    XqKeyCapture::LongFlags aLongType)
+{
+    return d->doCancelCapture(aKey, aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeLong, (XQKeyCapture::LongFlags)aLongType);
+}
+
+/*!
+ Deselects a given key from capturing pressing up and down. Requires a Qt key code.
+ \param aKey A Qt key.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::cancelCaptureKeyUpAndDowns(Qt::Key aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCancelCapture(d->mMapper->mapQtToS60ScanCodes(aKey),
+        aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeUpAndDown);
+}
+
+/*!
+ Deselects a given key from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
+ \param aKey A S60 key scan code (TStdScanCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::cancelCaptureKeyUpAndDowns(TUint aKey,
+    Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
+{
+    return d->doCancelCapture(aKey, aModifiersMask, aModifier,
+        CaptureRequest::CaptureRequestTypeUpAndDown);
+}
+
+/*!
+ Returns latest error string.
+ \retval Latest error string.
+ */
+QString XqKeyCapture::errorString() const
+{
+    return d->errorString();
+}
+
+/*!
+ Returns latest error id.
+ \retval Latest error id.
+ */
+int XqKeyCapture::errorId() const
+{
+    return d->errorId();
+}
+
+/*!
+ Selects a given keys for capturing key pressing. Requires a Qt key code.
+ \param list A Qt keys list.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::captureKey(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureKey(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Selects a given keys for capturing key pressing. Requires a S60 key code (TKeyCode).
+ \param list A S60 list of keys (TKeyCode codes).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::captureKey(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureKey(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Selects a given keys for capturing long pressing. Requires a Qt key code.
+ \param aKey A Qt  list of keys.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::captureLongKey(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier,
+        XqKeyCapture::LongFlags aLongType)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType);
+    }
+    return result;
+}
+
+/*!
+ Selects a given keys for capturing long pressing. Requires a S60 key code (TKeyCode).
+ \param list A S60 list of keys (TKeyCode codes).
+ \param aModifiersMap
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+ bool XqKeyCapture::captureLongKey(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier,
+        XqKeyCapture::LongFlags aLongType)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureLongKey(key, aModifiersMask, aModifier, aLongType);
+    }
+    return result;
+}
+
+/*!
+ Selects a given keys for capturing pressing up and down. Requires a Qt key code.
+ \param list A Qt list of keys.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::captureKeyUpAndDowns(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureKeyUpAndDowns(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Selects a given keys for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
+ \param list A list of S60 key scan codes (TStdScanCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::captureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & captureKeyUpAndDowns(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Deselects a given list of keys from key capturing. Requires a Qt key code.
+ \param list  A Qt list of keys.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::cancelCaptureKey(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureKey(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Deselects a given list of keys from key capturing. Requires a S60 key code (TKeyCode).
+ \param list  A S60 list of key codes (TKeyCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::cancelCaptureKey(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureKey(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Deselects a given list of keys from capturing long pressing. Requires a Qt key code.
+ \param list A list of Qt keys.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::cancelCaptureLongKey(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier,
+        XqKeyCapture::LongFlags aLongType)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
+    }
+    return result;
+}
+
+/*!
+ Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode).
+ \paramlist A list of S60 key codes (TKeyCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::cancelCaptureLongKey(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier,
+        XqKeyCapture::LongFlags aLongType)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
+    }
+    return result;
+}
+
+/*!
+ Deselects a list of given keys from capturing pressing up and down. Requires a Qt key codes.
+ \param list A list of Qt keys.
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+bool XqKeyCapture::cancelCaptureKeyUpAndDowns(XQKeyCaptureKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    Qt::Key key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
+
+/*!
+ Deselects a given list of keys from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
+ \param aKey A S60 key scan code (TStdScanCode).
+ \param aModifiersMask
+ \param aModifier 
+ \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
+ */
+ bool XqKeyCapture::cancelCaptureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
+        Qt::KeyboardModifiers aModifiersMask,
+        Qt::KeyboardModifiers aModifier)
+{
+    TUint key;
+    bool result = true;
+    foreach (key, list) {
+        bool result = result & cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
+    }
+    return result;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/keycapture/xqkeycapture.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,326 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, 
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
+
+#ifndef XQKEYCAPTURE_H
+#define XQKEYCAPTURE_H
+
+#include <qnamespace.h>
+#include <QString>
+#include <QObject>
+#include <QList>
+#include <QFlag>
+#include <QEvent>
+
+#include <w32std.h>
+
+#ifdef XQKEYCAPTURE_LIBRARY
+#define XQKEYCAPTURE_EXPORT Q_DECL_EXPORT
+#else
+#define XQKEYCAPTURE_EXPORT Q_DECL_IMPORT
+#endif
+
+class KeyCapturePrivate;
+
+typedef QList<Qt::Key> XQKeyCaptureKeyList; 
+typedef QList<TUint> XQKeyCaptureNativeKeyList; 
+
+class XQKEYCAPTURE_EXPORT XQKeyCapture {
+
+public:
+    enum LongFlags {
+    LongShortEventImmediately = ELongCaptureShortEventImmediately,
+    LongRepeatEvents = ELongCaptureRepeatEvents,
+    LongNormal = ELongCaptureNormal,
+    LongWaitShort = ELongCaptureWaitShort,
+    LongWaitNotApplicable = 0
+    };
+		
+    enum CapturingFlag {
+      CaptureNone = 0x0,
+      CaptureBasic = 0x1,
+      CaptureCallHandlingExt = 0x2,
+      CaptureEnableRemoteExtEvents = 0x4
+    };
+    
+    Q_DECLARE_FLAGS(CapturingFlags, CapturingFlag)
+    
+public:
+    XQKeyCapture();
+
+    ~XQKeyCapture();
+
+    bool captureKey(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool captureKey(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+    bool captureLongKey(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+        XQKeyCapture::LongFlags aLongType = XQKeyCapture::LongNormal);
+
+    bool captureLongKey(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+        XQKeyCapture::LongFlags aLongType = XQKeyCapture::LongNormal);
+
+    bool captureKeyUpAndDowns(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool captureKeyUpAndDowns(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+    bool captureKey(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool captureKey(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool captureLongKey(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+            XQKeyCapture::LongFlags aLongType = XQKeyCapture::LongNormal);
+    
+    bool captureLongKey(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+            XQKeyCapture::LongFlags aLongType = XQKeyCapture::LongNormal);
+    
+    bool captureKeyUpAndDowns(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool captureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+		
+    bool cancelCaptureKey(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+    bool cancelCaptureKey(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+    bool cancelCaptureLongKey(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+        XQKeyCapture::LongFlags aLongType = XQKeyCapture::LongNormal);
+
+    bool cancelCaptureLongKey(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+        XQKeyCapture::LongFlags aLongType = XQKeyCapture::LongNormal);
+
+    bool cancelCaptureKeyUpAndDowns(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+    bool cancelCaptureKeyUpAndDowns(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool cancelCaptureKey(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool cancelCaptureKey(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool cancelCaptureLongKey(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+            XQKeyCapture::LongFlags aLongType = XQKeyCapture::LongNormal);
+    
+    bool cancelCaptureLongKey(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+            XQKeyCapture::LongFlags aLongType = XQKeyCapture::LongNormal);
+    
+    bool cancelCaptureKeyUpAndDowns(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool cancelCaptureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+	bool captureRemoteKeys(CapturingFlags flags = CaptureNone);
+    
+    bool cancelCaptureRemoteKeys(CapturingFlags flags = CaptureNone);
+    
+    static QEvent::Type remoteEventType_KeyPress();
+    
+    static QEvent::Type remoteEventType_KeyRelease();
+			
+    QString errorString() const;
+
+    int errorId() const;
+
+private:
+    KeyCapturePrivate* d;
+
+};
+
+/*
+@deprecated
+*/
+
+class XQKEYCAPTURE_EXPORT XqKeyCapture {
+
+public:
+    enum LongFlags {
+    LongShortEventImmediately = ELongCaptureShortEventImmediately,
+    LongRepeatEvents = ELongCaptureRepeatEvents,
+    LongNormal = ELongCaptureNormal,
+    LongWaitShort = ELongCaptureWaitShort,
+    LongWaitNotApplicable = 0
+    };
+	
+public:
+    XqKeyCapture();
+
+    ~XqKeyCapture();
+	
+    bool captureKey(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool captureKey(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+    bool captureLongKey(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+        XqKeyCapture::LongFlags aLongType = XqKeyCapture::LongNormal);
+
+    bool captureLongKey(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+        XqKeyCapture::LongFlags aLongType = XqKeyCapture::LongNormal);
+
+    bool captureKeyUpAndDowns(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool captureKeyUpAndDowns(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+    bool captureKey(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool captureKey(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool captureLongKey(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+            XqKeyCapture::LongFlags aLongType = XqKeyCapture::LongNormal);
+    
+    bool captureLongKey(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+            XqKeyCapture::LongFlags aLongType = XqKeyCapture::LongNormal);
+    
+    bool captureKeyUpAndDowns(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool captureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+		
+    bool cancelCaptureKey(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+    bool cancelCaptureKey(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+    bool cancelCaptureLongKey(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+        XqKeyCapture::LongFlags aLongType = XqKeyCapture::LongNormal);
+
+    bool cancelCaptureLongKey(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+        XqKeyCapture::LongFlags aLongType = XqKeyCapture::LongNormal);
+
+    bool cancelCaptureKeyUpAndDowns(Qt::Key aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+    bool cancelCaptureKeyUpAndDowns(TUint aKey,
+        Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+        Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool cancelCaptureKey(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool cancelCaptureKey(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool cancelCaptureLongKey(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+            XqKeyCapture::LongFlags aLongType = XqKeyCapture::LongNormal);
+    
+    bool cancelCaptureLongKey(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier,
+            XqKeyCapture::LongFlags aLongType = XqKeyCapture::LongNormal);
+    
+    bool cancelCaptureKeyUpAndDowns(XQKeyCaptureKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+    
+    bool cancelCaptureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
+            Qt::KeyboardModifiers aModifiersMask = Qt::NoModifier,
+            Qt::KeyboardModifiers aModifier = Qt::NoModifier);
+
+    QString errorString() const;
+
+    int errorId() const;
+
+private:
+    KeyCapturePrivate* d;
+
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(XQKeyCapture::CapturingFlags)
+
+#endif /* XQKEYCAPTURE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/ccentralrepositoryhandler.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,249 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "ccentralrepositoryhandler.h"
+
+#include "xqsettingskey.h"
+
+CCentralRepositoryHandler* CCentralRepositoryHandler::NewL(TUid aUid)
+{
+    CCentralRepositoryHandler* self = new (ELeave) CCentralRepositoryHandler(aUid);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+}
+
+void CCentralRepositoryHandler::ConstructL()
+{
+    iRepository = CRepository::NewL(m_uid);
+}
+
+CCentralRepositoryHandler::CCentralRepositoryHandler(TUid aUid) :
+    m_uid(aUid)
+{
+}
+
+CCentralRepositoryHandler::~CCentralRepositoryHandler()
+{
+    foreach (CCenRepMonitor* monitor, m_monitors)
+        delete monitor;
+
+    delete iRepository;
+}
+
+void CCentralRepositoryHandler::setObserver(MSettingsHandlerObserver* observer)
+{
+    m_observer = observer;
+}
+
+TInt CCentralRepositoryHandler::deleteKey(unsigned long key)
+{
+    return iRepository->Delete(key);
+}
+
+TInt CCentralRepositoryHandler::resetKey(unsigned long key)
+{
+    return iRepository->Reset(key);
+}
+
+TInt CCentralRepositoryHandler::resetRepository()
+{
+    return iRepository->Reset();
+}
+
+TInt CCentralRepositoryHandler::getValue(unsigned long key, TInt& value)
+{
+    return iRepository->Get(key, value);
+}
+
+TInt CCentralRepositoryHandler::getValue(unsigned long key, TReal& value)
+{
+    return iRepository->Get(key, value);
+}
+
+void CCentralRepositoryHandler::getValueL(unsigned long key, RBuf8& value)
+{
+    TInt actualLength;
+    TInt err = iRepository->Get(key, value, actualLength);
+    if (err == KErrOverflow)
+    {
+        value.ReAllocL(actualLength);
+        err = iRepository->Get(key, value);
+    }
+    User::LeaveIfError(err);
+}
+
+void CCentralRepositoryHandler::getValueL(unsigned long key, RBuf16& value)
+{
+    TInt actualLength;
+    TInt err = iRepository->Get(key, value, actualLength);
+    if (err == KErrOverflow)
+    {
+        value.ReAllocL(actualLength);
+        err = iRepository->Get(key, value);
+    }
+    User::LeaveIfError(err);
+}
+
+TInt CCentralRepositoryHandler::setValue(unsigned long key, const TInt& value)
+{
+    return iRepository->Set(key, value);
+}
+
+TInt CCentralRepositoryHandler::setValue(unsigned long key, const TReal& value)
+{
+    return iRepository->Set(key, value);
+}
+
+TInt CCentralRepositoryHandler::setValue(unsigned long key, const TDesC8& value)
+{
+    return iRepository->Set(key, value);
+}
+
+TInt CCentralRepositoryHandler::setValue(unsigned long key, const TDesC16& value)
+{
+    return iRepository->Set(key, value);
+}
+
+TInt CCentralRepositoryHandler::createKey(unsigned long key, const TInt& value)
+{
+    return iRepository->Create(key, value);
+}
+
+TInt CCentralRepositoryHandler::createKey(unsigned long key, const TReal& value)
+{
+    return iRepository->Create(key, value);
+}
+
+TInt CCentralRepositoryHandler::createKey(unsigned long key, const TDesC8& value)
+{
+    return iRepository->Create(key, value);
+}
+
+TInt CCentralRepositoryHandler::createKey(unsigned long key, const TDesC16& value)
+{
+    return iRepository->Create(key, value);
+}
+
+bool CCentralRepositoryHandler::handleStartMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type, MSettingsHandlerObserver& observer, TInt& error)
+{
+    if (m_monitors.contains(key.key()))
+    {
+        error = KErrAlreadyExists;
+        return false;
+    }
+    CCenRepMonitor* newMonitor = new CCenRepMonitor(*iRepository, key, type, observer);
+    if (newMonitor)
+    {
+        m_monitors[key.key()] = newMonitor;
+        error = newMonitor->StartMonitoring();
+        return error == KErrNone;
+    }
+    error = KErrNoMemory;
+    return false;
+}
+
+bool CCentralRepositoryHandler::handleStopMonitoring(const XQSettingsKey& key, TInt& error)
+{
+    if (!m_monitors.contains(key.key()))
+    {
+        error = KErrNotFound;
+        return false;
+    }
+    const long int itemKey = key.key();
+    CCenRepMonitor* monitor = m_monitors[itemKey];
+    m_monitors.remove(itemKey);
+    delete monitor;
+    
+    return error == KErrNone;
+}
+
+TInt CCentralRepositoryHandler::findKeyL(unsigned long partialKey, TUint32 mask, RArray<TUint32>& aFoundKeys)
+{
+    return iRepository->FindL(partialKey, mask, aFoundKeys);
+}
+
+TInt CCentralRepositoryHandler::findKeyL(unsigned long partialKey, TUint32 mask, const TInt& value, bool negative, RArray<TUint32>& aFoundKeys)
+{
+    return negative ? iRepository->FindNeqL(partialKey, mask, value, aFoundKeys) : iRepository->FindEqL(partialKey, mask, value, aFoundKeys);
+}
+
+TInt CCentralRepositoryHandler::findKeyL(unsigned long partialKey, TUint32 mask, const TReal& value, bool negative, RArray<TUint32>& aFoundKeys)
+{
+    return negative ? iRepository->FindNeqL(partialKey, mask, value, aFoundKeys) : iRepository->FindEqL(partialKey, mask, value, aFoundKeys);
+}
+
+TInt CCentralRepositoryHandler::findKeyL(unsigned long partialKey, TUint32 mask, const TDesC8& value, bool negative, RArray<TUint32>& aFoundKeys)
+{
+    return negative ? iRepository->FindNeqL(partialKey, mask, value, aFoundKeys) : iRepository->FindEqL(partialKey, mask, value, aFoundKeys);
+}
+
+TInt CCentralRepositoryHandler::findKeyL(unsigned long partialKey, TUint32 mask, const TDesC16& value, bool negative, RArray<TUint32>& aFoundKeys)
+{
+    return negative ? iRepository->FindNeqL(partialKey, mask, value, aFoundKeys) : iRepository->FindEqL(partialKey, mask, value, aFoundKeys);
+}
+
+#ifndef XQSETTINGSMANAGER_NO_TRANSACTIONS
+TInt CCentralRepositoryHandler::startTransaction(CRepository::TTransactionMode transactionMode)
+{
+    return iRepository->StartTransaction(transactionMode);
+}
+#else
+TInt CCentralRepositoryHandler::startTransaction(CRepository::TTransactionMode /*transactionMode*/)
+{
+    return KErrNotSupported;
+}
+#endif
+
+TInt CCentralRepositoryHandler::commitTransaction()
+{
+    #ifndef XQSETTINGSMANAGER_NO_TRANSACTIONS
+        TUint32 keyInfo;
+        return iRepository->CommitTransaction(keyInfo);
+    #else
+        return KErrNotSupported;
+    #endif        
+}
+
+void CCentralRepositoryHandler::cancelTransaction()
+{
+    #ifndef XQSETTINGSMANAGER_NO_TRANSACTIONS
+        iRepository->CancelTransaction();
+    #endif        
+}
+
+void CCentralRepositoryHandler::failTransaction()
+{
+    #ifndef XQSETTINGSMANAGER_NO_TRANSACTIONS
+        iRepository->FailTransaction();
+    #endif        
+}
+
+TInt CCentralRepositoryHandler::transactionState() const
+{
+    #ifndef XQSETTINGSMANAGER_NO_TRANSACTIONS
+        return iRepository->TransactionState();
+    #else
+        return KErrNotSupported;
+    #endif        
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/ccentralrepositoryhandler.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef CENTRALREPOSITORYHANDLER_H
+#define CENTRALREPOSITORYHANDLER_H
+
+#include <exception>
+#include <e32base.h>
+#include <centralrepository.h>
+
+#include "settingshandlerbase.h"
+#include "cenrepmonitor.h"
+
+class XQSettingsKey;
+class CRepository;
+
+class CCentralRepositoryHandler : public CBase, public SettingsHandlerBase
+{
+public:
+    static CCentralRepositoryHandler* NewL(TUid aUid);
+    ~CCentralRepositoryHandler();
+
+    TInt createKey(unsigned long key, const TInt& value);
+    TInt createKey(unsigned long key, const TReal& value);
+    TInt createKey(unsigned long key, const TDesC8& value);
+    TInt createKey(unsigned long key, const TDesC16& value);
+
+    TInt deleteKey(unsigned long key);
+
+    TInt resetKey(unsigned long key);
+    TInt resetRepository();
+
+    TInt findKeyL(unsigned long partialKey, TUint32 mask, RArray<TUint32>& aFoundKeys);
+    TInt findKeyL(unsigned long partialKey, TUint32 mask, const TInt& value, bool negative, RArray<TUint32>& aFoundKeys);
+    TInt findKeyL(unsigned long partialKey, TUint32 mask, const TReal& value, bool negative, RArray<TUint32>& aFoundKeys);
+    TInt findKeyL(unsigned long partialKey, TUint32 mask, const TDesC8& value, bool negative, RArray<TUint32>& aFoundKeys);
+    TInt findKeyL(unsigned long partialKey, TUint32 mask, const TDesC16& value, bool negative, RArray<TUint32>& aFoundKeys);
+
+    TInt startTransaction(CRepository::TTransactionMode transactionMode);
+    TInt commitTransaction();
+    void cancelTransaction();
+    void failTransaction();
+    TInt transactionState() const;
+
+private:
+    CCentralRepositoryHandler(TUid aUid);
+    void ConstructL();
+
+protected:  //From SettingsHandlerBase
+    void setObserver(MSettingsHandlerObserver* observer);
+    bool handleStartMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type, MSettingsHandlerObserver& observer, TInt& error);
+    bool handleStopMonitoring(const XQSettingsKey& key, TInt& error);
+
+    TInt getValue(unsigned long key, TInt& value);
+    TInt getValue(unsigned long key, TReal& value);
+    void getValueL(unsigned long key, RBuf8& value);
+    void getValueL(unsigned long key, RBuf16& value);
+
+    TInt setValue(unsigned long key, const TInt& value);
+    TInt setValue(unsigned long key, const TReal& value);
+    TInt setValue(unsigned long key, const TDesC8& value);
+    TInt setValue(unsigned long key, const TDesC16& value);
+
+private:
+    TUid m_uid;
+    CRepository* iRepository;
+    MSettingsHandlerObserver* m_observer;
+    QHash<unsigned long int, CCenRepMonitor*> m_monitors;
+};
+
+#endif //CENTRALREPOSITORYHANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/cenrepmonitor.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "cenrepmonitor.h"
+#include <centralrepository.h>
+
+#include "xqsettingskey.h"
+#include "settingshandlerbase.h"
+
+CCenRepMonitor::CCenRepMonitor(CRepository& aRepository, const XQSettingsKey& aKey, XQSettingsManager::Type type, MSettingsHandlerObserver& aObserver)
+    : CActive(EPriorityStandard), iRepository(aRepository), iKey(aKey), m_type(type), iObserver(aObserver)
+    {
+    CActiveScheduler::Add(this);
+    }
+
+CCenRepMonitor::~CCenRepMonitor()
+    {
+    Cancel();
+    }
+
+TInt CCenRepMonitor::StartMonitoring()
+    {
+    TInt ret = iRepository.NotifyRequest(iKey.key(), iStatus);
+    SetActive();
+    return ret;
+    }
+
+void CCenRepMonitor::DoCancel()
+    {
+    iRepository.NotifyCancel(iKey.key());
+    }
+
+void CCenRepMonitor::RunL()
+    {
+    TUint32 meta;
+    //This trick is used to check whether the key no longer exists.
+    TInt ret = iRepository.GetMeta(iKey.key(), meta);
+    if (ret == KErrNone)
+        {
+        iRepository.NotifyRequest(iKey.key(), iStatus);
+        SetActive();
+        iObserver.valueChanged(iKey, m_type);
+        }
+    else if (ret == KErrNotFound)
+        {
+        iObserver.itemDeleted(iKey);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/cenrepmonitor.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef CENREPMONITOR_H
+#define CENREPMONITOR_H
+
+#include <exception>
+#include <e32base.h>
+
+#include "xqsettingskey.h"
+#include "xqsettingsmanager.h"
+
+class MSettingsHandlerObserver;
+
+class CRepository;
+
+class CCenRepMonitor : public CActive
+    { 
+    public:
+        CCenRepMonitor(CRepository& aRepository, const XQSettingsKey& aKey, XQSettingsManager::Type type, MSettingsHandlerObserver& aObserver);
+        ~CCenRepMonitor();
+        TInt StartMonitoring();
+        
+    private:
+        void RunL();
+        void DoCancel();
+              
+    private:
+        CRepository& iRepository;
+        XQSettingsKey iKey;
+        XQSettingsManager::Type m_type;
+        MSettingsHandlerObserver& iObserver;
+    };
+
+#endif //CENREPMONITOR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/cpublishandsubscribehandler.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,296 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "cpublishandsubscribehandler.h"
+#include <e32property.h>
+
+#include "xqsettingskey.h"
+
+CPublishAndSubscribeHandler* CPublishAndSubscribeHandler::NewL(TUid aUid)
+{
+    CPublishAndSubscribeHandler* self = new (ELeave) CPublishAndSubscribeHandler(aUid); 
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+}
+
+void CPublishAndSubscribeHandler::ConstructL()
+{
+}
+
+CPublishAndSubscribeHandler::CPublishAndSubscribeHandler(TUid aUid)
+    : m_uid(aUid)
+{
+}
+
+CPublishAndSubscribeHandler::~CPublishAndSubscribeHandler()
+{
+}
+
+void CPublishAndSubscribeHandler::setObserver(MSettingsHandlerObserver* observer)
+{
+    m_observer = observer;
+}
+
+TInt CPublishAndSubscribeHandler::getValue(unsigned long key, TInt& value)
+{
+    return RProperty::Get(m_uid, key, value);
+}
+
+TInt CPublishAndSubscribeHandler::getValue(unsigned long /*key*/, TReal& /*value*/)
+{
+    return KErrArgument;
+}
+
+void CPublishAndSubscribeHandler::getValueL(unsigned long key, RBuf8& value)
+{
+    TInt err = RProperty::Get(m_uid, key, value);
+    if (err == KErrOverflow)
+    {
+        value.ReAllocL(RProperty::KMaxPropertySize);
+        err = RProperty::Get(m_uid, key, value);
+        if (err == KErrOverflow)
+        {
+            value.ReAllocL(RProperty::KMaxLargePropertySize);
+            err = RProperty::Get(m_uid, key, value);
+        }
+    }
+    User::LeaveIfError(err);
+}
+
+void CPublishAndSubscribeHandler::getValueL(unsigned long key, RBuf16& value)
+{
+    TInt err = RProperty::Get(m_uid, key, value);
+    if (err == KErrOverflow)
+    {
+        value.ReAllocL(RProperty::KMaxPropertySize);
+        err = RProperty::Get(m_uid, key, value);
+        if (err == KErrOverflow)
+        {
+            value.ReAllocL(RProperty::KMaxLargePropertySize);
+            err = RProperty::Get(m_uid, key, value);
+        }
+    }
+    User::LeaveIfError(err);
+}
+
+TInt CPublishAndSubscribeHandler::setValue(unsigned long key, const TInt& value)
+{
+    return RProperty::Set(m_uid, key, value);
+}
+
+TInt CPublishAndSubscribeHandler::setValue(unsigned long /*key*/, const TReal& /*value*/)
+{
+    return KErrArgument;
+}
+
+TInt CPublishAndSubscribeHandler::setValue(unsigned long key, const TDesC8& value)
+{
+    return RProperty::Set(m_uid, key, value);
+}
+
+TInt CPublishAndSubscribeHandler::setValue(unsigned long key, const TDesC16& value)
+{
+    return RProperty::Set(m_uid, key, value);
+}
+
+TInt CPublishAndSubscribeHandler::defineProperty(unsigned long key, XQSettingsManager::Type type)
+{
+    switch (type)
+    {
+        case XQSettingsManager::TypeInt:
+        {
+            return RProperty::Define(m_uid, key, RProperty::EInt);
+        }
+        case XQSettingsManager::TypeString:
+        {
+            return RProperty::Define(m_uid, key, RProperty::EText);
+        }
+        case XQSettingsManager::TypeByteArray:
+        {
+            return RProperty::Define(m_uid, key, RProperty::EByteArray);
+        }
+        case XQSettingsManager::TypeDouble:
+        default:
+        {
+            return KErrArgument;
+        }
+    }
+}
+
+TInt CPublishAndSubscribeHandler::defineProperty(unsigned long key, XQSettingsManager::Type type,
+    const XQPublishAndSubscribeSecurityPolicy& readPolicy, const XQPublishAndSubscribeSecurityPolicy& writePolicy)
+{
+    switch (type)
+    {
+        case XQSettingsManager::TypeInt:
+        {
+            return RProperty::Define(m_uid, key, RProperty::EInt, symbianPolicy(readPolicy), symbianPolicy(writePolicy));
+        }
+        case XQSettingsManager::TypeString:
+        {
+            return RProperty::Define(m_uid, key, RProperty::EText, symbianPolicy(readPolicy), symbianPolicy(writePolicy));
+        }
+        case XQSettingsManager::TypeByteArray:
+        {
+            return RProperty::Define(m_uid, key, RProperty::EByteArray, symbianPolicy(readPolicy), symbianPolicy(writePolicy));
+        }
+        case XQSettingsManager::TypeDouble:
+        default:
+        {
+            return KErrArgument;
+        }
+    }
+}
+
+TSecurityPolicy CPublishAndSubscribeHandler::symbianPolicy(const XQPublishAndSubscribeSecurityPolicy& policy)
+{
+    //Use constructor for EAlwaysFail or EAlwaysPass
+    switch (policy.secPolicyType())
+    {
+        case XQPublishAndSubscribeSecurityPolicy::SecPolicyAlwaysFail:
+        {
+            return TSecurityPolicy(TSecurityPolicy::EAlwaysFail);
+        }
+        case XQPublishAndSubscribeSecurityPolicy::SecPolicyAlwaysPass:
+        {
+            return TSecurityPolicy(TSecurityPolicy::EAlwaysPass);
+        }
+        default:
+        {
+            break;
+        }
+    }
+    
+    TCapability capability1 = ECapability_None;
+    TCapability capability2 = ECapability_None;
+    TCapability capability3 = ECapability_None;
+    TCapability capability4 = ECapability_None;
+    TCapability capability5 = ECapability_None;
+    TCapability capability6 = ECapability_None;
+    TCapability capability7 = ECapability_None;
+    
+    const QList<XQPublishAndSubscribeSecurityPolicy::Capability>& capabilities = policy.capabilities();
+    
+    if (capabilities.count() > 0) capability1 = symbianCapability(capabilities[0]);
+    if (capabilities.count() > 1) capability2 = symbianCapability(capabilities[1]);
+    if (capabilities.count() > 2) capability3 = symbianCapability(capabilities[2]);
+    if (capabilities.count() > 3) capability4 = symbianCapability(capabilities[3]);
+    if (capabilities.count() > 4) capability5 = symbianCapability(capabilities[4]);
+    if (capabilities.count() > 5) capability6 = symbianCapability(capabilities[5]);
+    if (capabilities.count() > 6) capability7 = symbianCapability(capabilities[6]);
+    
+    long int secureId = policy.secureId().uid();
+    if (secureId != -1)
+    {
+        //Use constructor for TSecureId + max 3 capabilities
+        return TSecurityPolicy(TSecureId(secureId), capability1, capability2, capability3);
+    }
+    
+    long int vendorId = policy.vendorId().uid();
+    if (vendorId != -1)
+    {
+        //Use constructor for TVendorId + max 3 capabilities
+        return TSecurityPolicy(TVendorId(vendorId), capability1, capability2, capability3);
+    }
+    
+    if (capabilities.count() < 4)
+    {
+        //Use constructor for max 3 capabilities
+        return TSecurityPolicy(capability1, capability2, capability3);
+    }
+    else
+    {
+        //Use constructor for max 7 capabilities
+        return TSecurityPolicy(capability1, capability2, capability3, capability4, capability5, capability6, capability7);
+    }
+}
+
+TCapability CPublishAndSubscribeHandler::symbianCapability(const XQPublishAndSubscribeSecurityPolicy::Capability& capability)
+{
+    switch (capability)
+    {
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityTCB:                return ECapabilityTCB;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityCommDD:             return ECapabilityCommDD;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityPowerMgmt:          return ECapabilityPowerMgmt;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityMultimediaDD:       return ECapabilityMultimediaDD;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityReadDeviceData:     return ECapabilityReadDeviceData;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityWriteDeviceData:    return ECapabilityWriteDeviceData;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityDRM:                return ECapabilityDRM;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityTrustedUI:          return ECapabilityTrustedUI;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityProtServ:           return ECapabilityProtServ;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityDiskAdmin:          return ECapabilityDiskAdmin;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityNetworkControl:     return ECapabilityNetworkControl;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityAllFiles:           return ECapabilityAllFiles;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilitySwEvent:            return ECapabilitySwEvent;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityNetworkServices:    return ECapabilityNetworkServices;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityLocalServices:      return ECapabilityLocalServices;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityReadUserData:       return ECapabilityReadUserData;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityWriteUserData:      return ECapabilityWriteUserData;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityLocation:           return ECapabilityLocation;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilitySurroundingsDD:     return ECapabilitySurroundingsDD;
+        case XQPublishAndSubscribeSecurityPolicy::CapabilityUserEnvironment:    return ECapabilityUserEnvironment;
+        default:
+        {
+            break;
+        }
+    }
+    return TCapability();
+}
+
+TInt CPublishAndSubscribeHandler::deleteProperty(unsigned long key)
+{
+    return RProperty::Delete(m_uid, key);
+}
+
+bool CPublishAndSubscribeHandler::handleStartMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type, MSettingsHandlerObserver& observer, TInt& error)
+{
+    if (m_monitors.contains(key.key()))
+    {
+        error = KErrAlreadyExists;
+        return false;
+    }
+    CPubSubMonitor* newMonitor = new CPubSubMonitor(key, type, observer);
+    if (newMonitor)
+    {
+        m_monitors[key.key()] = newMonitor;
+        error = newMonitor->StartMonitoring();
+        return error == KErrNone;
+    }
+    error = KErrNoMemory;
+    return false;
+}
+
+bool CPublishAndSubscribeHandler::handleStopMonitoring(const XQSettingsKey& key, TInt& error)
+{
+    if (!m_monitors.contains(key.key()))
+    {
+        error = KErrNotFound;
+        return false;
+    }
+    const long int itemKey = key.key();
+    CPubSubMonitor* monitor = m_monitors[itemKey];
+    m_monitors.remove(itemKey);
+    delete monitor;
+    
+    return error == KErrNone;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/cpublishandsubscribehandler.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef PUBLISHANDSUBSCRIBEHANDLER_H
+#define PUBLISHANDSUBSCRIBEHANDLER_H
+
+#include <exception>
+#include <e32base.h>
+
+#include "settingshandlerbase.h"
+#include "pubsubmonitor.h"
+#include "xqpublishandsubscribesecuritypolicy.h"
+
+class XQSettingsKey;
+
+class CPublishAndSubscribeHandler : public CBase, public SettingsHandlerBase
+{
+public:
+    static CPublishAndSubscribeHandler* NewL(TUid aUid);
+    ~CPublishAndSubscribeHandler();
+
+    TInt defineProperty(unsigned long key, XQSettingsManager::Type type);
+    TInt defineProperty(unsigned long key, XQSettingsManager::Type type,
+        const XQPublishAndSubscribeSecurityPolicy& readPolicy, const XQPublishAndSubscribeSecurityPolicy& writePolicy);
+    TInt deleteProperty(unsigned long key);
+
+private:
+    CPublishAndSubscribeHandler(TUid aUid);
+    void ConstructL();
+
+protected:
+    void setObserver(MSettingsHandlerObserver* observer);
+    bool handleStartMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type, MSettingsHandlerObserver& observer, TInt& error);
+    bool handleStopMonitoring(const XQSettingsKey& key, TInt& error);
+
+    TInt getValue(unsigned long key, TInt& value);
+    TInt getValue(unsigned long key, TReal& value);
+    void getValueL(unsigned long key, RBuf8& value);
+    void getValueL(unsigned long key, RBuf16& value);
+
+    TInt setValue(unsigned long key, const TInt& value);
+    TInt setValue(unsigned long key, const TReal& value);
+    TInt setValue(unsigned long key, const TDesC8& value);
+    TInt setValue(unsigned long key, const TDesC16& value);
+
+private:
+    TSecurityPolicy symbianPolicy(const XQPublishAndSubscribeSecurityPolicy& policy);
+    TCapability symbianCapability(const XQPublishAndSubscribeSecurityPolicy::Capability& capability);
+private:
+    MSettingsHandlerObserver* m_observer;
+    TUid m_uid;
+    QHash<unsigned long int, CPubSubMonitor*> m_monitors;
+};
+
+#endif //PUBLISHANDSUBSCRIBEHANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/pubsubmonitor.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "pubsubmonitor.h"
+#include "settingshandlerbase.h"
+
+CPubSubMonitor::CPubSubMonitor(const XQSettingsKey& aKey, XQSettingsManager::Type type, MSettingsHandlerObserver& aObserver) 
+    : CActive(EPriorityStandard), iKey(aKey), m_type(type), iObserver(aObserver)
+    {
+    CActiveScheduler::Add(this);
+    }
+
+CPubSubMonitor::~CPubSubMonitor()
+    {
+    Cancel();
+    }
+
+TInt CPubSubMonitor::StartMonitoring()
+    {
+    TUid uid;
+    uid.iUid = iKey.uid();
+    TInt err = iProperty.Attach(uid, iKey.key());
+    if (err == KErrNone)
+        {
+        iProperty.Subscribe(iStatus);
+        SetActive();
+        }
+    return err;
+    }
+
+void CPubSubMonitor::DoCancel()
+    {
+    iProperty.Cancel();
+    }
+
+void CPubSubMonitor::RunL()
+    {
+    if (iStatus == KErrNone)
+        {
+        iProperty.Subscribe(iStatus);
+        SetActive();
+        iObserver.valueChanged(iKey, m_type);
+        }
+    else if (iStatus == KErrNotFound)
+        {
+        iObserver.itemDeleted(iKey);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/pubsubmonitor.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef PUBSUBMONITOR_H
+#define PUBSUBMONITOR_H
+
+#include <exception>
+#include <e32base.h>
+#include <e32property.h>
+
+#include "xqsettingskey.h"
+#include "xqsettingsmanager.h"
+
+class MSettingsHandlerObserver;
+
+class CPubSubMonitor : public CActive
+    { 
+    public:
+        CPubSubMonitor(const XQSettingsKey& aKey, XQSettingsManager::Type type, MSettingsHandlerObserver& aObserver);
+        ~CPubSubMonitor();
+        TInt StartMonitoring();
+        
+    private:
+        void RunL();
+        void DoCancel();
+              
+    private:
+        RProperty iProperty;
+        XQSettingsKey iKey;
+        XQSettingsManager::Type m_type;
+        MSettingsHandlerObserver& iObserver;
+    };
+
+#endif //PUBSUBMONITOR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/settingshandlerbase.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,164 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "settingshandlerbase.h"
+
+#include "xqsettingskey.h"
+
+QVariant SettingsHandlerBase::handleReadItemValue(const XQSettingsKey& key, XQSettingsManager::Type type, TInt& error)
+{
+    const TInt KRBufDefaultLength = 32;
+    switch(type)
+    {
+        case XQSettingsManager::TypeVariant:
+        {
+            //Try to read TInt
+            TInt intValue;
+            error = getValue(key.key(), intValue);
+            if (error == KErrNone)
+            {
+                return QVariant(intValue);
+            }
+
+            //Try to read TReal
+            TReal realValue;
+            error = getValue(key.key(), realValue);
+            if (error == KErrNone)
+            {
+                return QVariant(realValue);
+            }
+
+            //Try to read RBuf8
+            QVariant byteArrayVariant;
+            TRAP(error,
+                RBuf8 tdes8Value;
+                tdes8Value.CreateL(KRBufDefaultLength);
+                CleanupClosePushL(tdes8Value);
+                getValueL(key.key(), tdes8Value);
+                byteArrayVariant.setValue(QByteArray((const char*)tdes8Value.Ptr(), tdes8Value.Length()));
+                CleanupStack::PopAndDestroy(&tdes8Value);
+            )
+            if (error == KErrNone)
+            {
+                return byteArrayVariant;
+            }
+            break;
+        }
+        case XQSettingsManager::TypeInt:
+        {
+            //Try to read TInt
+            TInt intValue;
+            error = getValue(key.key(), intValue);
+            if (error == KErrNone)
+            {
+                return QVariant(intValue);
+            }
+            break;
+        }
+        case XQSettingsManager::TypeDouble:
+        {
+            //Try to read TReal
+            TReal realValue;
+            error = getValue(key.key(), realValue);
+            if (error == KErrNone)
+            {
+                return QVariant(realValue);
+            }
+            break;
+        }
+        case XQSettingsManager::TypeString:
+        {
+            //Try to read RBuf8
+            QVariant stringVariant;
+            TRAP(error,
+                RBuf16 tdes16Value;
+                tdes16Value.CreateL(KRBufDefaultLength);
+                CleanupClosePushL(tdes16Value);
+                getValueL(key.key(), tdes16Value);
+                stringVariant.setValue(QString::fromUtf16(tdes16Value.Ptr(), tdes16Value.Length()));
+                CleanupStack::PopAndDestroy(&tdes16Value);
+            )
+            if (error == KErrNone)
+            {
+                return stringVariant;
+            }
+            break;
+        }
+        case XQSettingsManager::TypeByteArray:
+        {
+            //Try to read RBuf8
+            QVariant byteArrayVariant;
+            TRAP(error,
+                RBuf8 tdes8Value;
+                tdes8Value.CreateL(KRBufDefaultLength);
+                CleanupClosePushL(tdes8Value);
+                getValueL(key.key(), tdes8Value);
+                byteArrayVariant.setValue(QByteArray((const char*)tdes8Value.Ptr(), tdes8Value.Length()));
+                CleanupStack::PopAndDestroy(&tdes8Value);
+            )
+            if (error == KErrNone)
+            {
+                return byteArrayVariant;
+            }
+            break;
+        }
+        default:
+        {
+            break;
+        }
+    };
+
+    return QVariant();
+}
+
+bool SettingsHandlerBase::handleWriteItemValue(const XQSettingsKey& key, const QVariant& value, TInt& error)
+{
+    switch (value.type())
+    {
+        case QVariant::Int:
+        {
+            error = setValue(key.key(), value.toInt());
+            break;
+        }
+        case QVariant::Double:
+        {
+            error = setValue(key.key(), value.toDouble());
+            break;
+        }
+        case QVariant::String:
+        {
+            error = setValue(key.key(), TPtrC16(reinterpret_cast<const TUint16*>(value.toString().utf16())));
+            break;
+        }
+        case QVariant::ByteArray:
+        {
+            QByteArray byteArray(value.toByteArray());
+            error = setValue(key.key(), TPtrC8((TUint8*)(byteArray.constData()), byteArray.size()));
+            break;
+        }
+        default:
+        {
+            error = KErrArgument;
+            break;
+        }
+    }
+    return error == KErrNone;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/settingshandlerbase.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef SETTINGSHANDLERBASE_H
+#define SETTINGSHANDLERBASE_H
+
+// INCLUDES
+#include <QVariant>
+#include "xqsettingsmanager.h"
+#include <exception>
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class XQSettingsKey;
+
+class MSettingsHandlerObserver
+{
+public:
+    virtual void valueChanged(const XQSettingsKey& key, XQSettingsManager::Type type) = 0;
+    virtual void itemDeleted(const XQSettingsKey& key) = 0;
+};
+
+class SettingsHandlerBase
+{
+public:
+    virtual ~SettingsHandlerBase() {};
+    virtual void setObserver(MSettingsHandlerObserver* observer) = 0;
+    QVariant handleReadItemValue(const XQSettingsKey& key, XQSettingsManager::Type type, TInt& error);
+    bool handleWriteItemValue(const XQSettingsKey& key, const QVariant& value, TInt& error);
+    virtual bool handleStartMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type, MSettingsHandlerObserver& observer, TInt& error) = 0;
+    virtual bool handleStopMonitoring(const XQSettingsKey& key, TInt& error) = 0;
+
+protected:
+    virtual TInt getValue(unsigned long key, TInt& value) = 0;
+    virtual TInt getValue(unsigned long key, TReal& value) = 0;
+    virtual void getValueL(unsigned long key, RBuf8& value) = 0;
+    virtual void getValueL(unsigned long key, RBuf16& value) = 0;
+
+    virtual TInt setValue(unsigned long key, const TInt& value) = 0;
+    virtual TInt setValue(unsigned long key, const TReal& value) = 0;
+    virtual TInt setValue(unsigned long key, const TDesC8& value) = 0;
+    virtual TInt setValue(unsigned long key, const TDesC16& value) = 0;
+};
+
+#endif //SETTINGSHANDLERBASE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/settingsmanager.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,52 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+HEADERS += xqsettingskey.h \
+    xqsettingsmanager.h \
+    xqsettingsmanager_p.h \
+    settingshandlerbase.h \
+    ccentralrepositoryhandler.h \
+    cpublishandsubscribehandler.h \
+    cenrepmonitor.h \
+    pubsubmonitor.h \
+    xqcentralrepositoryutils.h \
+    xqcentralrepositoryutils_p.h \
+    xqpublishandsubscribeutils.h \
+    xqpublishandsubscribeutils_p.h \
+    xqcentralrepositorysearchcriteria.h \
+    xqpublishandsubscribesecuritypolicy.h \
+
+SOURCES += xqsettingskey.cpp \
+    xqsettingsmanager.cpp \
+    xqsettingsmanager_p.cpp \
+    settingshandlerbase.cpp \
+    ccentralrepositoryhandler.cpp \
+    cpublishandsubscribehandler.cpp \
+    cenrepmonitor.cpp \
+    pubsubmonitor.cpp \
+    xqcentralrepositoryutils.cpp \
+    xqcentralrepositoryutils_p.cpp \
+    xqpublishandsubscribeutils.cpp \
+    xqpublishandsubscribeutils_p.cpp \
+    xqcentralrepositorysearchcriteria.cpp \
+    xqpublishandsubscribesecuritypolicy.cpp \
+
+symbian:LIBS += -lcentralrepository \
+    -lCommonEngine
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/settingsmanager.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TARGET = xqsettingsmanager
+TEMPLATE = lib
+QT = core
+
+DEFINES += XQSETTINGSMANAGER_LIBRARY
+DEFINES += XQSETTINGSMANAGER_NO_TRANSACTIONS
+include(settingsmanager.pri)
+
+symbian:defFilePath=..
+symbian:TARGET.UID3 = 0x2002BC7C
+symbian:TARGET.CAPABILITY = All -TCB
+symbian:TARGET.EPOCALLOWDLLDATA = 1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/settingsmanager_global.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef SETTINGSMANAGER_GLOBAL_H
+#define SETTINGSMANAGER_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(XQSETTINGSMANAGER_LIBRARY)
+#  define XQSETTINGSMANAGER_EXPORT Q_DECL_EXPORT
+#else
+#  if defined(XQSETTINGSMANAGER_NO_LIBRARY)
+#    define XQSETTINGSMANAGER_EXPORT
+#  else
+#    define XQSETTINGSMANAGER_EXPORT Q_DECL_IMPORT
+#  endif
+#endif
+
+#endif // SETTINGSMANAGER_GLOBAL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqcentralrepositorysearchcriteria.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqcentralrepositorysearchcriteria.h"
+
+/*!
+    \class XQCentralRepositorySearchCriteria
+
+    \brief The XQCentralRepositorySearchCriteria defines search criteria
+    used in XQCentralRepositoryUtils::findKeys().
+*/
+
+
+/*!
+    Constructs an XQCentralRepositorySearchCriteria object.
+    \param repositoryUid Central repository where the key is searched
+    \param partialKey Partial Central repository key
+    \param bitMask Bit mask for partialKey
+*/
+XQCentralRepositorySearchCriteria::XQCentralRepositorySearchCriteria(long int repositoryUid,
+    unsigned long int partialKey, unsigned long int bitMask)
+    : m_repositoryUid(repositoryUid), m_partialKey(partialKey), m_bitMask(bitMask),
+    m_negativeCriteria(false)
+{
+}
+
+/*!
+    Destructs an XQCentralRepositorySearchCriteria object.
+*/
+XQCentralRepositorySearchCriteria::~XQCentralRepositorySearchCriteria()
+{
+}
+
+/*!
+    Sets the value criteria. If this function is not called or value is NULL object
+    every key in the repository is returned in XQCentralRepositoryUtils::findKeys().
+    \param value Value to be searched. The type is determined with
+    QVariant.type() and it must be either QVariant::Int, QVariant::Double,
+    QVariant::String or QVariant::ByteArray.
+    \param negativeCriteria If true the keys of which values don't match will be returned in
+    XQCentralRepositoryUtils::findKeys()
+*/
+void XQCentralRepositorySearchCriteria::setValueCriteria(const QVariant& value, bool negativeCriteria)
+{
+    m_value = value;
+    m_negativeCriteria = negativeCriteria;
+}
+
+/*!
+    \return Repository UID
+*/
+long int XQCentralRepositorySearchCriteria::repositoryUid() const
+{
+    return m_repositoryUid;
+}
+
+/*!
+    \return Partial key
+*/
+unsigned long int XQCentralRepositorySearchCriteria::partialKey() const
+{
+    return m_partialKey;
+}
+
+/*!
+    \return Bit mask for the partial key
+*/
+unsigned long int XQCentralRepositorySearchCriteria::bitMask() const
+{
+    return m_bitMask;
+}
+
+/*!
+    \return Value criteria
+*/
+const QVariant& XQCentralRepositorySearchCriteria::value() const
+{
+    return m_value;
+}
+
+/*!
+    \return True if value criteria is negative
+*/
+bool XQCentralRepositorySearchCriteria::negativeCriteria() const
+{
+    return m_negativeCriteria;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqcentralrepositorysearchcriteria.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQCENTRALREPOSITORYSEARCHCRITERIA_H
+#define XQCENTRALREPOSITORYSEARCHCRITERIA_H
+
+#include <QVariant>
+#include "settingsmanager_global.h"
+
+class XQSETTINGSMANAGER_EXPORT XQCentralRepositorySearchCriteria
+{
+public:
+    XQCentralRepositorySearchCriteria(long int repositoryUid,
+        unsigned long int partialKey = 0, unsigned long int bitMask = 0);
+    ~XQCentralRepositorySearchCriteria();
+    void setValueCriteria(const QVariant& value, bool negativeCriteria = false);
+
+    long int repositoryUid() const;
+    unsigned long int partialKey() const;
+    unsigned long int bitMask() const;
+    const QVariant& value() const;
+    bool negativeCriteria() const;
+
+private:
+    long int m_repositoryUid;
+    unsigned long int m_partialKey;
+    unsigned long int m_bitMask;
+    QVariant m_value;
+    bool m_negativeCriteria;
+};
+
+#endif //XQCENTRALREPOSITORYSEARCHCRITERIA_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqcentralrepositoryutils.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,189 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqcentralrepositoryutils.h"
+#include "xqcentralrepositoryutils_p.h"
+
+/*!
+    \class XQCentralRepositoryUtils
+
+    \brief The XQCentralRepositoryUtils implements Central Repository related special
+    features in SettingsManager. This class is just a Qt-like wrapper to
+    Symbian OS' CRepository class.
+    
+    See Symbian documentation for more detailed information about e.g. the use of transactions.
+    
+    This class co-operates with XQSettingsManager so central repositories accessed via this class
+    share the same CRepository instances.
+*/
+
+
+/*!
+    \enum XQCentralRepositoryUtils::TransactionMode
+
+    This enum defines the possible transaction modes.
+*/
+/*! \var XQCentralRepositoryUtils::ConcurrentReadWriteTransaction XQCentralRepositoryUtils::ConcurrentReadWriteTransaction
+    See Symbian documentation for CRepository transactions.
+*/
+/*! \var XQCentralRepositoryUtils::ReadTransaction XQCentralRepositoryUtils::ReadTransaction
+    See Symbian documentation for CRepository transactions.
+*/
+/*! \var XQCentralRepositoryUtils::ReadWriteTransaction XQCentralRepositoryUtils::ReadWriteTransaction
+    See Symbian documentation for CRepository transactions.
+*/
+
+/*!
+    \enum XQCentralRepositoryUtils::TransactionState
+
+    This enum defines the possible transaction states.
+*/
+/*! \var XQCentralRepositoryUtils::NotInTransaction XQCentralRepositoryUtils::NotInTransaction
+    See Symbian documentation for CRepository transactions.
+*/
+/*! \var XQCentralRepositoryUtils::ActiveTransaction XQCentralRepositoryUtils::ActiveTransaction
+    See Symbian documentation for CRepository transactions.
+*/
+/*! \var XQCentralRepositoryUtils::FailedTransaction XQCentralRepositoryUtils::FailedTransaction
+    See Symbian documentation for CRepository transactions.
+*/
+/*! \var XQCentralRepositoryUtils::UnknownTransaction XQCentralRepositoryUtils::UnknownTransaction
+    Transaction state is not known.
+*/
+
+
+/*!
+    Constructs an XQCentralRepositoryUtils object.
+    \param settingsManager Reference to XQSettingsManager instance
+*/
+XQCentralRepositoryUtils::XQCentralRepositoryUtils(XQSettingsManager& settingsManager, QObject* parent)
+    : QObject(parent), d(new XQCentralRepositoryUtilsPrivate(settingsManager))
+{
+}
+
+/*!
+    Destructs an XQCentralRepositoryUtils.
+*/
+XQCentralRepositoryUtils::~XQCentralRepositoryUtils()
+{
+}
+
+/*!
+    Creates a key to central repository. (NOTE: This function is not enabled in public
+    releases by default.)
+    \param key XQCentralRepositorySettingsKey which defines the key details
+    \param value Initial value to be written into central repository. The type is determined with
+    QVariant.type() and it must be either QVariant::Int, QVariant::Double, QVariant::String or
+    QVariant::ByteArray.
+    \return True if the key was succesfully created, otherwise return false.
+*/
+bool XQCentralRepositoryUtils::createKey(const XQCentralRepositorySettingsKey& key, const QVariant& value)
+{
+    return d->createKey(key, value);
+}
+
+/*!
+    Deletes a key from central repository. (NOTE: This function is not enabled in public
+    releases by default.)
+    \param key XQCentralRepositorySettingsKey which defines the key details
+    \return True if the key was succesfully deleted, otherwise return false.
+*/
+bool XQCentralRepositoryUtils::deleteKey(const XQCentralRepositorySettingsKey& key)
+{
+    return d->deleteKey(key);
+}
+
+/*!
+    Resets a key in central repository to it's initial value defined in .ini file.
+    \param key XQCentralRepositorySettingsKey which defines the key details
+    \return True if the key was succesfully reset, otherwise return false.
+*/
+bool XQCentralRepositoryUtils::resetKey(const XQCentralRepositorySettingsKey& key)
+{
+    return d->resetKey(key);
+}
+
+/*!
+    Resets the whole central repository file to it's initial state defined in .ini file.
+    \param repositoryUid Repository UID
+    \return True if the repository was succesfully reset, otherwise return false.
+*/
+bool XQCentralRepositoryUtils::resetRepository(long int repositoryUid)
+{
+    return d->resetRepository(repositoryUid);
+}
+
+/*!
+    Finds keys in central repository.
+    \param criteria Search criteria
+    \return List of XQCentralRepositorySettingsKey objects that match with criteria
+*/
+QList<XQCentralRepositorySettingsKey> XQCentralRepositoryUtils::findKeys(const XQCentralRepositorySearchCriteria& criteria)
+{
+    return d->findKeys(criteria);
+}
+
+/*!
+    Starts transaction. See Symbian documentation for more info.
+    \param repositoryUid Repository UID
+    \param transactionMode Transaction mode.
+    \return True if the transaction was succesfully started, otherwise return false.
+*/
+bool XQCentralRepositoryUtils::startTransaction(long int repositoryUid, TransactionMode transactionMode)
+{
+    return d->startTransaction(repositoryUid, transactionMode);
+}
+
+/*!
+    Commits transaction. See Symbian documentation for more info.
+    \param repositoryUid Repository UID
+    \return True if the transaction was succesfully committed, otherwise return false.
+*/
+bool XQCentralRepositoryUtils::commitTransaction(long int repositoryUid)
+{
+    return d->commitTransaction(repositoryUid);
+}
+
+/*!
+    Cancels transaction. See Symbian documentation for more info.
+    \param repositoryUid Repository UID
+*/
+void XQCentralRepositoryUtils::cancelTransaction(long int repositoryUid)
+{
+    d->cancelTransaction(repositoryUid);
+}
+
+/*!
+    Fails transaction. See Symbian documentation for more info.
+    \param repositoryUid Repository UID
+*/
+void XQCentralRepositoryUtils::failTransaction(long int repositoryUid)
+{
+    d->failTransaction(repositoryUid);
+}
+
+/*!
+    \return Current transaction state.
+*/
+XQCentralRepositoryUtils::TransactionState XQCentralRepositoryUtils::transactionState(long int repositoryUid) const
+{
+    return d->transactionState(repositoryUid);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqcentralrepositoryutils.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQCENTRALREPOSITORYUTILS_H
+#define XQCENTRALREPOSITORYUTILS_H
+
+#include <QObject>
+#include "xqsettingskey.h"
+#include "settingsmanager_global.h"
+
+class XQSettingsManager;
+class XQCentralRepositoryUtilsPrivate;
+class XQCentralRepositorySearchCriteria;
+
+class XQSETTINGSMANAGER_EXPORT XQCentralRepositoryUtils : public QObject
+{
+public:
+
+    enum TransactionMode
+    {
+        ConcurrentReadWriteTransaction,
+        ReadTransaction,
+        ReadWriteTransaction
+    };
+
+    enum TransactionState
+    {
+        NotInTransaction,
+        ActiveTransaction,
+        FailedTransaction,
+        UnknownTransaction
+    };
+    
+    XQCentralRepositoryUtils(XQSettingsManager& settingsManager, QObject* parent = 0);
+    ~XQCentralRepositoryUtils();
+    bool createKey(const XQCentralRepositorySettingsKey& key, const QVariant& value);
+    bool deleteKey(const XQCentralRepositorySettingsKey& key);
+    bool resetKey(const XQCentralRepositorySettingsKey& key);
+    bool resetRepository(long int repositoryUid);
+    QList<XQCentralRepositorySettingsKey> findKeys(const XQCentralRepositorySearchCriteria& criteria);
+
+    bool startTransaction(long int repositoryUid, TransactionMode transactionMode);
+    bool commitTransaction(long int repositoryUid);
+    void cancelTransaction(long int repositoryUid);
+    void failTransaction(long int repositoryUid);
+    TransactionState transactionState(long int repositoryUid) const;
+
+private:
+    XQCentralRepositoryUtilsPrivate* d;
+};
+
+#endif //XQCENTRALREPOSITORYUTILS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqcentralrepositoryutils_p.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,307 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqcentralrepositoryutils_p.h"
+#include "xqsettingsmanager.h"
+#include "xqsettingsmanager_p.h"
+#include "ccentralrepositoryhandler.h"
+#include "xqcentralrepositorysearchcriteria.h"
+
+XQCentralRepositoryUtilsPrivate::XQCentralRepositoryUtilsPrivate(XQSettingsManager& settingsManager)
+    : m_settingsManagerPrivate(*settingsManager.d)
+{
+}
+
+XQCentralRepositoryUtilsPrivate::~XQCentralRepositoryUtilsPrivate()
+{
+}
+
+#ifdef XQSETTINGSMANAGER_NO_CENREPKEY_CREATION_DELETION
+bool XQCentralRepositoryUtilsPrivate::createKey(const XQCentralRepositorySettingsKey& /*key*/, const QVariant& /*value*/)
+{
+    m_settingsManagerPrivate.iError = KErrNotSupported;
+    return false;
+}
+#else    
+bool XQCentralRepositoryUtilsPrivate::createKey(const XQCentralRepositorySettingsKey& key, const QVariant& value)
+{
+    CCentralRepositoryHandler* handler = m_settingsManagerPrivate.cenRepHandlerInstance(key.uid());
+    
+    if (handler)
+    {
+        switch (value.type())
+        {
+            case QVariant::Int:
+            {
+                m_settingsManagerPrivate.iError = handler->createKey(key.key(), value.toInt());
+                break;
+            }
+            case QVariant::Double:
+            {
+                m_settingsManagerPrivate.iError = handler->createKey(key.key(), value.toDouble());
+                break;
+            }
+            case QVariant::String:
+            {
+                m_settingsManagerPrivate.iError = handler->createKey(key.key(), TPtrC16(reinterpret_cast<const TUint16*>(value.toString().utf16())));
+                break;
+            }
+            case QVariant::ByteArray:
+            {
+                m_settingsManagerPrivate.iError = handler->createKey(key.key(), TPtrC8((TUint8*)(value.toByteArray().constData())));
+                break;
+            }
+            default:
+            {
+                m_settingsManagerPrivate.iError = KErrArgument;
+                break;
+            }
+        }
+    }
+    else
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+    }
+    return m_settingsManagerPrivate.iError == KErrNone;
+}
+#endif
+
+#ifdef XQSETTINGSMANAGER_NO_CENREPKEY_CREATION_DELETION
+bool XQCentralRepositoryUtilsPrivate::deleteKey(const XQCentralRepositorySettingsKey& /*key*/)
+{
+    m_settingsManagerPrivate.iError = KErrNotSupported;
+    return false;
+}
+#else
+bool XQCentralRepositoryUtilsPrivate::deleteKey(const XQCentralRepositorySettingsKey& key)
+{
+    CCentralRepositoryHandler* handler = m_settingsManagerPrivate.cenRepHandlerInstance(key.uid());
+    
+    if (handler)
+    {
+        m_settingsManagerPrivate.iError = handler->deleteKey(key.key());
+    }
+    else
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+    }
+    return m_settingsManagerPrivate.iError == KErrNone;
+}
+#endif
+
+bool XQCentralRepositoryUtilsPrivate::resetKey(const XQCentralRepositorySettingsKey& key)
+{
+    CCentralRepositoryHandler* handler = m_settingsManagerPrivate.cenRepHandlerInstance(key.uid());
+    
+    if (handler)
+    {
+        m_settingsManagerPrivate.iError = handler->resetKey(key.key());
+    }
+    else
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+    }
+    return m_settingsManagerPrivate.iError == KErrNone;
+}
+
+bool XQCentralRepositoryUtilsPrivate::resetRepository(long int repositoryUid)
+{
+    CCentralRepositoryHandler* handler = m_settingsManagerPrivate.cenRepHandlerInstance(repositoryUid);
+    
+    if (handler)
+    {
+        m_settingsManagerPrivate.iError = handler->resetRepository();
+    }
+    else
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+    }
+    return m_settingsManagerPrivate.iError == KErrNone;
+}
+
+QList<XQCentralRepositorySettingsKey> XQCentralRepositoryUtilsPrivate::findKeys(const XQCentralRepositorySearchCriteria& criteria)
+{
+    long int repositoryUid = criteria.repositoryUid();
+    CCentralRepositoryHandler* handler = m_settingsManagerPrivate.cenRepHandlerInstance(repositoryUid);
+    if (!handler)
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+        return QList<XQCentralRepositorySettingsKey>();
+    }
+
+    QList<XQCentralRepositorySettingsKey> keys;
+
+    TRAP(m_settingsManagerPrivate.iError,
+        RArray<TUint32> foundKeys;
+        CleanupClosePushL(foundKeys);
+        if (criteria.value().isNull())
+        {
+            User::LeaveIfError(handler->findKeyL(criteria.partialKey(), criteria.bitMask(),
+                foundKeys));
+        }
+        else
+        {
+            switch (criteria.value().type())
+            {
+                case QVariant::Int:
+                {
+                    User::LeaveIfError(handler->findKeyL(criteria.partialKey(), criteria.bitMask(),
+                        criteria.value().toInt(), criteria.negativeCriteria(), foundKeys));
+                    break;
+                }
+                case QVariant::Double:
+                {
+                    User::LeaveIfError(handler->findKeyL(criteria.partialKey(), criteria.bitMask(),
+                        criteria.value().toDouble(), criteria.negativeCriteria(), foundKeys));
+                    break;
+                }
+                case QVariant::String:
+                {
+                    TPtrC16 stringValue(reinterpret_cast<const TUint16*>(criteria.value().toString().utf16()));
+                    User::LeaveIfError(handler->findKeyL(criteria.partialKey(), criteria.bitMask(),
+                        stringValue, criteria.negativeCriteria(), foundKeys));
+                    break;
+                }
+                case QVariant::ByteArray:
+                {
+                    TPtrC8 byteArrayValue((TUint8*)(criteria.value().toByteArray().constData()));
+                    User::LeaveIfError(handler->findKeyL(criteria.partialKey(), criteria.bitMask(),
+                        byteArrayValue, criteria.negativeCriteria(), foundKeys));
+                    break;
+                }
+                default:
+                {
+                    User::Leave(KErrArgument);
+                    break;
+                }
+            }
+        }
+        for (int i = 0; i < foundKeys.Count(); ++i)
+        {
+            XQCentralRepositorySettingsKey key(repositoryUid, foundKeys[i]);
+            keys.append(key);
+        }
+
+        CleanupStack::PopAndDestroy(&foundKeys);
+    )
+    return keys;
+}
+
+bool XQCentralRepositoryUtilsPrivate::startTransaction(long int repositoryUid, XQCentralRepositoryUtils::TransactionMode transactionMode)
+{
+    CCentralRepositoryHandler* handler = m_settingsManagerPrivate.cenRepHandlerInstance(repositoryUid);
+    
+    if (handler)
+    {
+        CRepository::TTransactionMode mode = CRepository::EConcurrentReadWriteTransaction;
+        switch (transactionMode)
+        {
+            case XQCentralRepositoryUtils::ConcurrentReadWriteTransaction:
+            {
+                mode = CRepository::EConcurrentReadWriteTransaction;
+                break;
+            }
+            case XQCentralRepositoryUtils::ReadTransaction:
+            {
+                mode = CRepository::EReadTransaction;
+                break;
+            }
+            case XQCentralRepositoryUtils::ReadWriteTransaction:
+            {
+                mode = CRepository::EReadWriteTransaction;
+                break;
+            }
+            default:
+            {
+                m_settingsManagerPrivate.iError = KErrArgument;
+                return false;
+            }
+        }
+        m_settingsManagerPrivate.iError = handler->startTransaction(mode);
+    }
+    else
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+    }
+    return m_settingsManagerPrivate.iError == KErrNone;
+}
+
+bool XQCentralRepositoryUtilsPrivate::commitTransaction(long int repositoryUid)
+{
+    CCentralRepositoryHandler* handler = m_settingsManagerPrivate.cenRepHandlerInstance(repositoryUid);
+    
+    if (handler)
+    {
+        m_settingsManagerPrivate.iError = handler->commitTransaction();
+    }
+    else
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+    }
+    return m_settingsManagerPrivate.iError == KErrNone;
+}
+
+void XQCentralRepositoryUtilsPrivate::cancelTransaction(long int repositoryUid)
+{
+    CCentralRepositoryHandler* handler = m_settingsManagerPrivate.cenRepHandlerInstance(repositoryUid);
+    if (!handler)
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+        return;
+    }
+    m_settingsManagerPrivate.iError = XQSettingsManager::NoError;
+    handler->cancelTransaction();
+}
+
+void XQCentralRepositoryUtilsPrivate::failTransaction(long int repositoryUid)
+{
+    CCentralRepositoryHandler* handler = m_settingsManagerPrivate.cenRepHandlerInstance(repositoryUid);
+    if (!handler)
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+        return;
+    }
+    m_settingsManagerPrivate.iError = XQSettingsManager::NoError;
+    handler->failTransaction();
+}
+
+XQCentralRepositoryUtils::TransactionState XQCentralRepositoryUtilsPrivate::transactionState(long int repositoryUid) const
+{
+    CCentralRepositoryHandler* handler = m_settingsManagerPrivate.cenRepHandlerInstance(repositoryUid);
+    if (!handler)
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+        return XQCentralRepositoryUtils::UnknownTransaction;
+    }
+
+    m_settingsManagerPrivate.iError = XQSettingsManager::NoError;
+    switch (handler->transactionState())
+    {
+        case 0: return XQCentralRepositoryUtils::NotInTransaction;
+        case 2: return XQCentralRepositoryUtils::ActiveTransaction;
+        case 6: return XQCentralRepositoryUtils::FailedTransaction;
+        default:
+        {
+            break;
+        }
+    }
+    return XQCentralRepositoryUtils::UnknownTransaction;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqcentralrepositoryutils_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQCENTRALREPOSITORYUTILS_P_H
+#define XQCENTRALREPOSITORYUTILS_P_H
+
+#include "xqsettingsmanager.h"
+#include "xqsettingskey.h"
+#include "xqcentralrepositoryutils.h"
+
+class XQSettingsManagerPrivate;
+class XQCentralRepositorySearchCriteria;
+
+class XQCentralRepositoryUtilsPrivate
+{
+public:
+    XQCentralRepositoryUtilsPrivate(XQSettingsManager& settingsManager);
+    ~XQCentralRepositoryUtilsPrivate();
+    bool createKey(const XQCentralRepositorySettingsKey& key, const QVariant& value);
+    bool deleteKey(const XQCentralRepositorySettingsKey& key);
+    bool resetKey(const XQCentralRepositorySettingsKey& key);
+    bool resetRepository(long int repositoryUid);
+    QList<XQCentralRepositorySettingsKey> findKeys(const XQCentralRepositorySearchCriteria& criteria);
+
+    bool startTransaction(long int repositoryUid, XQCentralRepositoryUtils::TransactionMode transactionMode);
+    bool commitTransaction(long int repositoryUid);
+    void cancelTransaction(long int repositoryUid);
+    void failTransaction(long int repositoryUid);
+    XQCentralRepositoryUtils::TransactionState transactionState(long int repositoryUid) const;
+
+private:
+    XQSettingsManagerPrivate& m_settingsManagerPrivate;
+};
+
+#endif //XQCENTRALREPOSITORYUTILS_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqpublishandsubscribesecuritypolicy.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,209 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqpublishandsubscribesecuritypolicy.h"
+
+/*!
+    \class XQPublishAndSubscribeSecurityPolicy
+
+    \brief The XQPublishAndSubscribeSecurityPolicy defines security policies
+    used in XQPublishAndSubscribeUtils class. This class is just a Qt-like wrapper
+    to Symbian OS' TSecurityPolicy class.
+*/
+
+/*!
+    \enum XQPublishAndSubscribeSecurityPolicy::SecPolicyType
+
+    This enum defines the possible policy types.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::SecPolicyAlwaysFail XQPublishAndSubscribeSecurityPolicy::SecPolicyAlwaysFail
+    The checks made against this policy always fail.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::SecPolicyAlwaysPass XQPublishAndSubscribeSecurityPolicy::SecPolicyAlwaysPass
+    The checks made against this policy always pass.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::SecPolicyUndefined XQPublishAndSubscribeSecurityPolicy::SecPolicyUndefined
+    Policy type is not defined.
+*/
+
+/*!
+    \enum XQPublishAndSubscribeSecurityPolicy::Capability
+
+    This enum defines the possible capabilities.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityTCB XQPublishAndSubscribeSecurityPolicy::CapabilityTCB
+    Grants TCB level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityCommDD XQPublishAndSubscribeSecurityPolicy::CapabilityCommDD
+    Grants CapabilityCommDD level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityPowerMgmt XQPublishAndSubscribeSecurityPolicy::CapabilityPowerMgmt
+    Grants CapabilityPowerMgmt level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityMultimediaDD XQPublishAndSubscribeSecurityPolicy::CapabilityMultimediaDD
+    Grants CapabilityMultimediaDD level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityReadDeviceData XQPublishAndSubscribeSecurityPolicy::CapabilityReadDeviceData
+    Grants CapabilityReadDeviceData level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityWriteDeviceData XQPublishAndSubscribeSecurityPolicy::CapabilityWriteDeviceData
+    Grants CapabilityWriteDeviceData level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityDRM XQPublishAndSubscribeSecurityPolicy::CapabilityDRM
+    Grants CapabilityDRM level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityTrustedUI XQPublishAndSubscribeSecurityPolicy::CapabilityTrustedUI
+    Grants CapabilityTrustedUI level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityProtServ XQPublishAndSubscribeSecurityPolicy::CapabilityProtServ
+    Grants CapabilityProtServ level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityDiskAdmin XQPublishAndSubscribeSecurityPolicy::CapabilityDiskAdmin
+    Grants CapabilityDiskAdmin level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityNetworkControl XQPublishAndSubscribeSecurityPolicy::CapabilityNetworkControl
+    Grants CapabilityNetworkControl level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityAllFiles XQPublishAndSubscribeSecurityPolicy::CapabilityAllFiles
+    Grants CapabilityAllFiles level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilitySwEvent XQPublishAndSubscribeSecurityPolicy::CapabilitySwEvent
+    Grants CapabilitySwEvent level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityNetworkServices XQPublishAndSubscribeSecurityPolicy::CapabilityNetworkServices
+    Grants CapabilityNetworkServices level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityLocalServices XQPublishAndSubscribeSecurityPolicy::CapabilityLocalServices
+    Grants CapabilityLocalServices level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityReadUserData XQPublishAndSubscribeSecurityPolicy::CapabilityReadUserData
+    Grants CapabilityReadUserData level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityWriteUserData XQPublishAndSubscribeSecurityPolicy::CapabilityWriteUserData
+    Grants CapabilityWriteUserData level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityLocation XQPublishAndSubscribeSecurityPolicy::CapabilityLocation
+    Grants CapabilityLocation level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilitySurroundingsDD XQPublishAndSubscribeSecurityPolicy::CapabilitySurroundingsDD
+    Grants CapabilitySurroundingsDD level access.
+*/
+/*! \var XQPublishAndSubscribeSecurityPolicy::CapabilityUserEnvironment XQPublishAndSubscribeSecurityPolicy::CapabilityUserEnvironment
+    Grants CapabilityUserEnvironment level access.
+*/
+
+/*!
+    \return Secure ID
+*/
+XQPublishAndSubscribeSecurityPolicy::SecureId::SecureId(long int uid) : m_uid(uid)
+{
+}
+
+/*!
+    \return Vendor ID
+*/
+XQPublishAndSubscribeSecurityPolicy::VendorId::VendorId(long int uid) : m_uid(uid)
+{
+}
+
+
+/*!
+    Constructs an XQPublishAndSubscribeSecurityPolicy object.
+    \param secPolicyType Policy type
+*/
+XQPublishAndSubscribeSecurityPolicy::XQPublishAndSubscribeSecurityPolicy(SecPolicyType secPolicyType)
+    : m_secPolicyType(secPolicyType), m_secureId(-1), m_vendorId(-1)
+{
+}
+
+/*!
+    Constructs an XQPublishAndSubscribeSecurityPolicy object.
+    \param capabilities List of needed capabilities. Max seven capabilities can be given. Extra capabilities
+    in the list will not be used.
+*/
+XQPublishAndSubscribeSecurityPolicy::XQPublishAndSubscribeSecurityPolicy(QList<Capability> capabilities)
+    : m_secPolicyType(XQPublishAndSubscribeSecurityPolicy::SecPolicyUndefined),
+    m_secureId(-1), m_vendorId(-1), m_capabilities(capabilities)
+{
+}
+
+/*!
+    Constructs an XQPublishAndSubscribeSecurityPolicy object.
+    \param secureId Secure ID
+    \param capabilities List of needed capabilities. Max three capabilities can be given. Extra capabilities
+    in the list will not be used.
+*/
+XQPublishAndSubscribeSecurityPolicy::XQPublishAndSubscribeSecurityPolicy(SecureId secureId, QList<Capability> capabilities)
+    : m_secPolicyType(XQPublishAndSubscribeSecurityPolicy::SecPolicyUndefined),
+    m_secureId(secureId), m_vendorId(-1), m_capabilities(capabilities)
+{
+}
+
+/*!
+    Constructs an XQPublishAndSubscribeSecurityPolicy object.
+    \param vendorId Vendor ID
+    \param capabilities List of needed capabilities. Max three capabilities can be given. Extra capabilities
+    in the list will not be used.
+*/
+XQPublishAndSubscribeSecurityPolicy::XQPublishAndSubscribeSecurityPolicy(VendorId vendorId, QList<Capability> capabilities)
+    : m_secPolicyType(XQPublishAndSubscribeSecurityPolicy::SecPolicyUndefined),
+    m_secureId(-1), m_vendorId(vendorId), m_capabilities(capabilities)
+{
+}
+
+/*!
+    Destructs an XQPublishAndSubscribeSecurityPolicy object.
+*/
+XQPublishAndSubscribeSecurityPolicy::~XQPublishAndSubscribeSecurityPolicy()
+{
+}
+
+/*!
+    \return Policy type.
+*/
+XQPublishAndSubscribeSecurityPolicy::SecPolicyType XQPublishAndSubscribeSecurityPolicy::secPolicyType() const
+{
+    return m_secPolicyType;
+}
+
+/*!
+    \return Secure ID or -1 if not defined.
+*/
+XQPublishAndSubscribeSecurityPolicy::SecureId XQPublishAndSubscribeSecurityPolicy::secureId() const
+{
+    return m_secureId;
+}
+
+/*!
+    \return Vendor ID or -1 if not defined.
+*/
+XQPublishAndSubscribeSecurityPolicy::VendorId XQPublishAndSubscribeSecurityPolicy::vendorId() const
+{
+    return m_vendorId;
+}
+
+/*!
+    \return List of capabilities
+*/
+QList<XQPublishAndSubscribeSecurityPolicy::Capability> XQPublishAndSubscribeSecurityPolicy::capabilities() const
+{
+    return m_capabilities;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqpublishandsubscribesecuritypolicy.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQPUBLISHANDSUBSCRIBESECURITYPOLICY_H
+#define XQPUBLISHANDSUBSCRIBESECURITYPOLICY_H
+
+#include "settingsmanager_global.h"
+
+#include <QList>
+
+class XQSETTINGSMANAGER_EXPORT XQPublishAndSubscribeSecurityPolicy
+{
+public:
+
+    class SecureId
+    {
+    public:
+        SecureId(long int uid);
+        inline long int uid() const {return m_uid;};
+
+    private:
+        long int m_uid;
+    };
+
+    class VendorId
+    {
+    public:
+        VendorId(long int uid);
+        inline long int uid() const {return m_uid;};
+
+    private:
+        long int m_uid;
+    };
+
+    enum SecPolicyType
+    {
+        SecPolicyAlwaysFail,
+        SecPolicyAlwaysPass,
+        SecPolicyUndefined
+    };
+    
+    enum Capability
+    {
+        CapabilityTCB,
+        CapabilityCommDD,
+        CapabilityPowerMgmt,
+        CapabilityMultimediaDD,
+        CapabilityReadDeviceData,
+        CapabilityWriteDeviceData,
+        CapabilityDRM,
+        CapabilityTrustedUI,
+        CapabilityProtServ,
+        CapabilityDiskAdmin,
+        CapabilityNetworkControl,
+        CapabilityAllFiles,
+        CapabilitySwEvent,
+        CapabilityNetworkServices,
+        CapabilityLocalServices,
+        CapabilityReadUserData,
+        CapabilityWriteUserData,
+        CapabilityLocation,
+        CapabilitySurroundingsDD,
+        CapabilityUserEnvironment
+    };
+
+    XQPublishAndSubscribeSecurityPolicy(SecPolicyType secPolicyType);
+    XQPublishAndSubscribeSecurityPolicy(QList<Capability> capabilities);
+    XQPublishAndSubscribeSecurityPolicy(SecureId secureId, QList<Capability> capabilities);
+    XQPublishAndSubscribeSecurityPolicy(VendorId vendorId, QList<Capability> capabilities);
+    ~XQPublishAndSubscribeSecurityPolicy();
+
+    SecPolicyType secPolicyType() const;
+    SecureId secureId() const;
+    VendorId vendorId() const;
+    QList<Capability> capabilities() const;
+
+private:
+    SecPolicyType m_secPolicyType;
+    SecureId m_secureId;
+    VendorId m_vendorId;
+    QList<Capability> m_capabilities;
+};
+
+#endif //XQPUBLISHANDSUBSCRIBESECURITYPOLICY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqpublishandsubscribeutils.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqpublishandsubscribeutils.h"
+#include "xqpublishandsubscribeutils_p.h"
+
+/*!
+    \class XQPublishAndSubscribeUtils
+
+    \brief The XQPublishAndSubscribeUtils implements Publish and Subscribe related special
+    features in SettingsManager. This class is just a Qt-like wrapper to
+    Symbian OS' RPropery class.
+*/
+
+
+/*!
+    Constructs an XQPublishAndSubscribeUtils object.
+    \param settingsManager Reference to XQSettingsManager instance
+*/
+XQPublishAndSubscribeUtils::XQPublishAndSubscribeUtils(XQSettingsManager& settingsManager, QObject* parent)
+    : QObject(parent), d(new XQPublishAndSubscribeUtilsPrivate(settingsManager))
+{
+}
+
+/*!
+    Destructs an XQPublishAndSubscribeUtils object.
+*/
+XQPublishAndSubscribeUtils::~XQPublishAndSubscribeUtils()
+{
+}
+
+/*!
+    Defines a propery
+    \param key XQPublishAndSubscribeSettingsKey which defines the propery details
+    \param type Propery type (NOTE: TypeDouble is not supported by Publish and Subscribe.)
+    \return True if the property was succesfully defined, otherwise return false.
+*/
+bool XQPublishAndSubscribeUtils::defineProperty(const XQPublishAndSubscribeSettingsKey& key, XQSettingsManager::Type type)
+{
+    return d->defineProperty(key, type);
+}
+
+/*!
+    Defines a propery with security policies
+    \param key XQPublishAndSubscribeSettingsKey which defines the propery details
+    \param type Propery type (NOTE: TypeDouble is not supported by Publish and Subscribe.)
+    \param readPolicy Policy definition for read operations
+    \param writePolicy Policy definition for write operations
+    \return True if the property was succesfully defined, otherwise return false.
+*/
+bool XQPublishAndSubscribeUtils::defineProperty(const XQPublishAndSubscribeSettingsKey& key, XQSettingsManager::Type type,
+    const XQPublishAndSubscribeSecurityPolicy& readPolicy, const XQPublishAndSubscribeSecurityPolicy& writePolicy)
+{
+    return d->defineProperty(key, type, readPolicy, writePolicy);
+}
+
+/*!
+    Deletes a propery
+    \param key XQPublishAndSubscribeSettingsKey which defines the propery details
+    \return True if the property was succesfully defined, otherwise return false.
+*/
+bool XQPublishAndSubscribeUtils::deleteProperty(const XQPublishAndSubscribeSettingsKey& key)
+{
+    return d->deleteProperty(key);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqpublishandsubscribeutils.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQCENTRALREPOSITORYUTILS_H
+#define XQCENTRALREPOSITORYUTILS_H
+
+#include <QObject>
+
+#include "xqsettingsmanager.h"
+#include "settingsmanager_global.h"
+
+class XQPublishAndSubscribeUtilsPrivate;
+class XQPublishAndSubscribeSettingsKey;
+class XQPublishAndSubscribeSecurityPolicy;
+
+class XQSETTINGSMANAGER_EXPORT XQPublishAndSubscribeUtils : public QObject
+{
+public:
+    XQPublishAndSubscribeUtils(XQSettingsManager& settingsManager, QObject* parent = 0);
+    ~XQPublishAndSubscribeUtils();
+    bool defineProperty(const XQPublishAndSubscribeSettingsKey& key, XQSettingsManager::Type type);
+    bool defineProperty(const XQPublishAndSubscribeSettingsKey& key, XQSettingsManager::Type type,
+        const XQPublishAndSubscribeSecurityPolicy& readPolicy, const XQPublishAndSubscribeSecurityPolicy& writePolicy);
+    bool deleteProperty(const XQPublishAndSubscribeSettingsKey& key);
+
+private:
+    XQPublishAndSubscribeUtilsPrivate* d;
+};
+
+#endif //XQCENTRALREPOSITORYUTILS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqpublishandsubscribeutils_p.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqpublishandsubscribeutils_p.h"
+#include "xqsettingsmanager.h"
+#include "xqsettingsmanager_p.h"
+#include "cpublishandsubscribehandler.h"
+#include "xqpublishandsubscribesecuritypolicy.h"
+
+XQPublishAndSubscribeUtilsPrivate::XQPublishAndSubscribeUtilsPrivate(XQSettingsManager& settingsManager)
+    : m_settingsManagerPrivate(*settingsManager.d)
+{
+}
+
+XQPublishAndSubscribeUtilsPrivate::~XQPublishAndSubscribeUtilsPrivate()
+{
+}
+
+bool XQPublishAndSubscribeUtilsPrivate::defineProperty(const XQPublishAndSubscribeSettingsKey& key, XQSettingsManager::Type type)
+{
+    CPublishAndSubscribeHandler* handler = m_settingsManagerPrivate.pubSubHandlerInstance(key.uid());
+    
+    if (handler)
+    {
+        m_settingsManagerPrivate.iError = handler->defineProperty(key.key(), type);
+    }
+    else
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+    }
+    return m_settingsManagerPrivate.iError == KErrNone;
+}
+
+
+bool XQPublishAndSubscribeUtilsPrivate::defineProperty(const XQPublishAndSubscribeSettingsKey& key, XQSettingsManager::Type type,
+    const XQPublishAndSubscribeSecurityPolicy& readPolicy, const XQPublishAndSubscribeSecurityPolicy& writePolicy)
+{
+    CPublishAndSubscribeHandler* handler = m_settingsManagerPrivate.pubSubHandlerInstance(key.uid());
+    
+    if (handler)
+    {
+        m_settingsManagerPrivate.iError = handler->defineProperty(key.key(), type, readPolicy, writePolicy);
+    }
+    else
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+    }
+    return m_settingsManagerPrivate.iError == KErrNone;    
+}
+
+bool XQPublishAndSubscribeUtilsPrivate::deleteProperty(const XQPublishAndSubscribeSettingsKey& key)
+{
+    CPublishAndSubscribeHandler* handler = m_settingsManagerPrivate.pubSubHandlerInstance(key.uid());
+    
+    if (handler)
+    {
+        m_settingsManagerPrivate.iError = handler->deleteProperty(key.key());
+    }
+    else
+    {
+        m_settingsManagerPrivate.iError = XQSettingsManager::UnknownError;
+    }
+    return m_settingsManagerPrivate.iError == KErrNone;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqpublishandsubscribeutils_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQCENTRALREPOSITORYUTILS_P_H
+#define XQCENTRALREPOSITORYUTILS_P_H
+
+#include "xqsettingsmanager.h"
+
+class XQSettingsManagerPrivate;
+class XQPublishAndSubscribeSecurityPolicy;
+
+class XQPublishAndSubscribeUtilsPrivate
+{
+public:
+    XQPublishAndSubscribeUtilsPrivate(XQSettingsManager& settingsManager);
+    ~XQPublishAndSubscribeUtilsPrivate();
+    bool defineProperty(const XQPublishAndSubscribeSettingsKey& key, XQSettingsManager::Type type);
+    bool defineProperty(const XQPublishAndSubscribeSettingsKey& key, XQSettingsManager::Type type,
+        const XQPublishAndSubscribeSecurityPolicy& readPolicy, const XQPublishAndSubscribeSecurityPolicy& writePolicy);
+    bool deleteProperty(const XQPublishAndSubscribeSettingsKey& key);
+
+private:
+    XQSettingsManagerPrivate& m_settingsManagerPrivate;
+};
+
+#endif //XQCENTRALREPOSITORYUTILS_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqsettingskey.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,149 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqsettingskey.h"
+
+/****************************************************
+ *
+ * XQSettingsKey
+ *
+ ****************************************************/
+
+/*!
+    \class XQSettingsKey
+
+    \brief The XQSettingsKey defines the target for XQSettingsManager operations.
+*/
+
+/*!
+    \enum XQSettingsKey::Target
+
+    This enum defines the possible item target for an XQSettingsKey object.
+*/
+/*! \var XQSettingsKey::TargetCentralRepository XQSettingsKey::TargetCentralRepository
+    The settings key targets to Symbian OS's Central Repository.
+*/
+/*! \var XQSettingsKey::TargetPublishAndSubscribe XQSettingsKey::TargetPublishAndSubscribe
+    The settings key targets to Symbian OS's Publish and Subscribe property.
+*/
+
+/*!
+    Constructs an XQSettingsKey object.
+    \param target This is either XQSettingsKey::TargetCentralRepository or 
+    XQSettingsKey::TargetPublishAndSubscribe.
+    \param uid In case of Central Repository a CenRep Uid. In case of
+    Publish and Subscribe an RProperty category Uid.
+    \param key Settings Key
+*/
+XQSettingsKey::XQSettingsKey(
+    XQSettingsKey::Target target, long int uid, unsigned long int key) :
+    m_target(target), m_uid(uid), m_key(key)
+{   
+}
+
+/*!
+    Destructs an XQSettingsKey object.
+*/
+XQSettingsKey::~XQSettingsKey()
+{
+}
+
+/*!
+    Gets a target of the item.
+
+    \return target Either XQSettingsKey::TargetCentralRepository or 
+    XQSettingsKey::TargetPublishAndSubscribe.
+*/
+XQSettingsKey::Target XQSettingsKey::target() const
+{
+    return m_target;
+}
+
+/*!
+    Gets a uid of the item
+
+    \return uid. In case of Central Repository a CenRep Uid. In case of
+    Publish and Subscribe an RProperty category Uid.
+*/
+long int XQSettingsKey::uid() const
+{    
+    return m_uid;
+}
+
+/*!
+    Gets a key of the item
+
+    \return Key
+*/
+unsigned long int XQSettingsKey::key() const
+{
+    return m_key;
+}
+
+/*!
+    \class XQCentralRepositorySettingsKey
+
+    \brief The XQCentralRepositorySettingsKey defines the Central Repository
+    target for XQSettingsManager operations.
+*/
+
+/*!
+    Constructs an XQCentralRepositorySettingsKey object.
+    \param repositoryUid CenRep Uid
+    \param key Settings Key
+*/
+XQCentralRepositorySettingsKey::XQCentralRepositorySettingsKey(long int repositoryUid, unsigned long int key) :
+    XQSettingsKey(XQSettingsKey::TargetCentralRepository, repositoryUid, key)
+{
+}
+
+/*!
+    Destructs an XQCentralRepositorySettingsKey object.
+*/
+XQCentralRepositorySettingsKey::~XQCentralRepositorySettingsKey()
+{
+}
+
+/*!
+    \class XQPublishAndSubscribeSettingsKey
+
+    \brief The XQPublishAndSubscribeSettingsKey defines the Publish and
+    Subscribe target for XQSettingsManager operations.
+*/
+
+/*!
+    Constructs an XQPublishAndSubscribeSettingsKey object.
+    \param categoryUid RProperty category Uid.
+    \param key Settings Key
+*/
+XQPublishAndSubscribeSettingsKey::XQPublishAndSubscribeSettingsKey(long int categoryUid, unsigned long int key) :
+    XQSettingsKey(XQSettingsKey::TargetPublishAndSubscribe, categoryUid, key)
+{
+}
+
+/*!
+    Destructs an XQPublishAndSubscribeSettingsKey object.
+*/
+XQPublishAndSubscribeSettingsKey::~XQPublishAndSubscribeSettingsKey()
+{
+}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqsettingskey.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQSETTINGSITEM_H
+#define XQSETTINGSITEM_H
+
+// INCLUDES
+#include "settingsmanager_global.h"
+
+// CLASS DECLARATION
+class XQSETTINGSMANAGER_EXPORT XQSettingsKey
+{
+public:
+    enum Target
+    {
+        TargetCentralRepository = 0,
+        TargetPublishAndSubscribe
+    };
+
+    XQSettingsKey(XQSettingsKey::Target target, long int uid, unsigned long int key);
+    ~XQSettingsKey();
+
+    XQSettingsKey::Target target() const;
+    long int uid() const;
+    unsigned long int key() const;
+
+protected:
+    XQSettingsKey::Target m_target;
+    long int m_uid;
+    unsigned long int m_key;
+};
+
+class XQSETTINGSMANAGER_EXPORT XQCentralRepositorySettingsKey : public XQSettingsKey
+{
+public:
+    XQCentralRepositorySettingsKey(long int repositoryUid, unsigned long int key);
+    ~XQCentralRepositorySettingsKey();
+};
+
+class XQSETTINGSMANAGER_EXPORT XQPublishAndSubscribeSettingsKey : public XQSettingsKey
+{
+public:
+    XQPublishAndSubscribeSettingsKey(long int categoryUid, unsigned long int key);
+    ~XQPublishAndSubscribeSettingsKey();
+};
+
+#endif //XQSETTINGSITEM_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqsettingsmanager.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,159 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqsettingsmanager.h"
+#include "xqsettingsmanager_p.h"
+#include <QVariant>
+
+/*!
+    \class XQSettingsManager
+
+    \brief The XQSettingsManager class provides methods to handle settings items.
+    The settings items can be targetted in Central Repository or Publish And Subscribe.
+*/
+
+/*!
+    Constructs an XQSettingsManager object with the given parent.
+*/
+XQSettingsManager::XQSettingsManager(QObject* parent) 
+    : QObject(parent), d(new XQSettingsManagerPrivate(this))
+{
+}
+
+/*!
+    Destroys the XQSettingsManager object.
+*/
+XQSettingsManager::~XQSettingsManager()
+{
+    delete d;
+}
+
+/*!
+    \enum XQSettingsManager::Type
+
+    This enum defines the possible item types for an XQSettingsKey object.
+*/
+/*! \var XQSettingsManager::TypeVariant XQSettingsManager::TypeVariant
+    The item type is detected automatically.
+*/
+/*! \var XQSettingsManager::TypeInt XQSettingsManager::TypeInt
+    The item is treated as integer.
+*/
+/*! \var XQSettingsManager::TypeDouble XQSettingsManager::TypeDouble
+    The item is treated as double. NOTE: This is not supported in Publish And Subscribe.
+*/
+/*! \var XQSettingsManager::TypeString XQSettingsManager::TypeString
+    The item is treated as string.
+*/
+/*! \var XQSettingsManager::TypeByteArray XQSettingsManager::TypeByteArray
+    The item is treated as bytearray.
+*/
+
+
+
+/*!
+    \enum XQSettingsManager::Error
+
+    This enum defines the possible errors for an XQSettingsManager object.
+*/
+/*! \var XQSettingsManager::Error XQSettingsManager::NoError
+    No error occured.
+*/
+/*! \var XQSettingsManager::Error XQSettingsManager::OutOfMemoryError
+    Not enough memory.
+*/
+/*! \var XQSettingsManager::Error XQSettingsManager::NotFoundError
+    Item not found error.
+*/
+/*! \var XQSettingsManager::Error XQSettingsManager::AlreadyExistsError
+    Item already exists error.
+*/
+/*! \var XQSettingsManager::Error XQSettingsManager::NotSupportedError
+    Operation with this kind of item type isn't supported error.
+*/
+/*! \var XQSettingsManager::Error XQSettingsManager::PermissionDeniedError
+    Permission denied.
+*/
+/*! \var XQSettingsManager::Error XQSettingsManager::UnknownError
+    Unknown error.
+*/
+
+
+/*!
+    Reads an item value.
+    \param key XQSettingsKey where the value is read from
+    \param type Value type. Default is TypeVariant which means that the type is
+    tried to detect automatically.
+    \return Settings value as QVariant or null object if an error has occurred.
+    \sa error(), writeItemValue()
+*/
+QVariant XQSettingsManager::readItemValue(const XQSettingsKey& key, XQSettingsManager::Type type)
+{
+    return d->readItemValue(key, type);
+}
+
+/*!
+    Writes an item value.
+    \param key XQSettingsKey where the value is written to
+    \param value Value to be written into the settings item. The type is determined with
+    QVariant.type() and it must be either QVariant::Int, QVariant::Double, QVariant::String or
+    QVariant::ByteArray.
+    \return True if the item was written succesfully, otherwise return false.
+    \sa error(), readItemValue()
+*/
+bool XQSettingsManager::writeItemValue(const XQSettingsKey& key, const QVariant& value)
+{
+    return d->writeItemValue(key, value);
+}
+
+/*!
+    Starts monitoring a settings item.
+    \param key XQSettingsKey of which changes are monitored.
+    \param type Value type. Default is TypeVariant which means that the type is
+    tried to detect automatically.
+    \return True if monitoring was started succesfully, otherwise return false.
+    \sa error(), stopMonitoring()
+*/
+bool XQSettingsManager::startMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type)
+{
+    return d->startMonitoring(key, type);
+}
+
+/*!
+    Stops monitoring a settings item.
+    \param key XQSettingsKey of which changes are not monitored any more.
+    \return True if monitoring was stopped succesfully, otherwise return false.
+    \sa error(), startMonitoring()
+*/
+bool XQSettingsManager::stopMonitoring(const XQSettingsKey& key)
+{
+    return d->stopMonitoring(key);
+}
+
+/*!
+    Returns the type of error that occurred if the latest function call failed. 
+    Otherwise it returns NoError
+    \return Error code
+*/
+XQSettingsManager::Error XQSettingsManager::error() const
+{
+    return d->error();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqsettingsmanager.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQSETTINGSMANAGER_H
+#define XQSETTINGSMANAGER_H
+
+// INCLUDES
+#include <QObject>
+#include <QVariant>
+#include "xqsettingskey.h"
+#include "settingsmanager_global.h"
+
+// FORWARD DECLARATIONS
+class XQSettingsManagerPrivate;
+
+// CLASS DECLARATION
+class XQSETTINGSMANAGER_EXPORT XQSettingsManager : public QObject
+{
+    Q_OBJECT
+    Q_ENUMS(Error)
+    Q_ENUMS(Type)
+
+public:
+
+    enum Type
+    {
+        TypeVariant = 0,
+        TypeInt,
+        TypeDouble,
+        TypeString,
+        TypeByteArray
+    };
+
+    enum Error 
+    {
+        NoError = 0,
+        OutOfMemoryError,
+        NotFoundError,
+        AlreadyExistsError,
+        PermissionDeniedError,
+        BadTypeError,
+        NotSupportedError,
+        UnknownError = -1
+    };
+
+    XQSettingsManager(QObject* parent = 0);
+    ~XQSettingsManager();
+
+    QVariant readItemValue(const XQSettingsKey& key, XQSettingsManager::Type type = XQSettingsManager::TypeVariant);
+    bool writeItemValue(const XQSettingsKey& key, const QVariant& value);
+    bool startMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type = XQSettingsManager::TypeVariant);
+    bool stopMonitoring(const XQSettingsKey& key);
+    
+    XQSettingsManager::Error error() const;
+
+Q_SIGNALS:
+    void valueChanged(const XQSettingsKey& key, const QVariant& value);
+    void itemDeleted(const XQSettingsKey& key);
+
+private:
+    friend class XQSettingsManagerPrivate;
+    friend class XQCentralRepositoryUtilsPrivate;
+    friend class XQPublishAndSubscribeUtilsPrivate;
+    XQSettingsManagerPrivate* d;
+};
+
+#endif // XQSETTINGSMANAGER_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqsettingsmanager_p.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,195 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqsettingsmanager_p.h"
+#include <QVariant>
+#include "settingshandlerbase.h"
+#include "ccentralrepositoryhandler.h"
+#include "cpublishandsubscribehandler.h"
+
+XQSettingsManagerPrivate::XQSettingsManagerPrivate(XQSettingsManager* settingsManager) 
+    : q(settingsManager)
+{   
+}
+
+XQSettingsManagerPrivate::~XQSettingsManagerPrivate()
+{
+    foreach (SettingsHandlerBase* handler, m_centralRepositoryHandlers)
+        delete handler;
+    foreach (SettingsHandlerBase* handler, m_publishAndSubscribeHandlers)
+        delete handler;
+}
+
+QVariant XQSettingsManagerPrivate::readItemValue(const XQSettingsKey& key, XQSettingsManager::Type type)
+{
+    SettingsHandlerBase* handler = handlerInstance(key);
+    if (handler)
+    {
+        return handler->handleReadItemValue(key, type, iError);
+    }
+    return QVariant();
+}
+
+bool XQSettingsManagerPrivate::writeItemValue(const XQSettingsKey& key, const QVariant& value)
+{
+    SettingsHandlerBase* handler = handlerInstance(key);
+    if (handler)
+    {
+        return handler->handleWriteItemValue(key, value, iError);
+    }
+    return false;
+}
+
+bool XQSettingsManagerPrivate::startMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type)
+{
+    SettingsHandlerBase* handler = handlerInstance(key);
+    if (handler)
+    {
+        return handler->handleStartMonitoring(key, type, *this, iError);
+    }
+    return false;
+}
+
+bool XQSettingsManagerPrivate::stopMonitoring(const XQSettingsKey& key)
+{
+    SettingsHandlerBase* handler = NULL;
+    const long int uid = key.uid();
+    switch (key.target())
+    {
+        case XQSettingsKey::TargetCentralRepository:
+            if (m_centralRepositoryHandlers.contains(uid))
+            {
+                handler = m_centralRepositoryHandlers.value(uid);
+            }
+            break;
+        case XQSettingsKey::TargetPublishAndSubscribe:
+            if (m_publishAndSubscribeHandlers.contains(uid))
+            {
+                handler = m_publishAndSubscribeHandlers.value(uid);
+            }
+            break;
+        default:
+            break;
+    }
+    if (handler)
+    {
+        return handler->handleStopMonitoring(key, iError);
+    }
+    iError = KErrNotFound;
+    return false;
+}
+
+XQSettingsManager::Error XQSettingsManagerPrivate::error() const
+{
+    switch (iError) 
+    {
+        case KErrNone:
+            return XQSettingsManager::NoError;
+        case KErrNoMemory:
+            return XQSettingsManager::OutOfMemoryError;
+        case KErrNotFound:
+            return XQSettingsManager::NotFoundError;
+        case KErrAlreadyExists:
+            return XQSettingsManager::AlreadyExistsError;
+        case KErrPermissionDenied:
+            return XQSettingsManager::PermissionDeniedError;
+        case KErrArgument:
+            return XQSettingsManager::BadTypeError;
+        case KErrNotSupported:
+            return XQSettingsManager::NotSupportedError;
+        default:
+            qDebug("XQSettingsManagerPrivate::error() iError = %d", iError);
+            return XQSettingsManager::UnknownError;
+    }    
+}
+
+CCentralRepositoryHandler* XQSettingsManagerPrivate::cenRepHandlerInstance(long int repositoryUid)
+{
+    CCentralRepositoryHandler* handler = NULL;
+    if (m_centralRepositoryHandlers.contains(repositoryUid))
+    {
+        handler = m_centralRepositoryHandlers.value(repositoryUid);
+    }
+    else
+    {
+        TUid uid;
+        uid.iUid = repositoryUid;
+        TRAP(iError, handler = CCentralRepositoryHandler::NewL(uid);)
+        if (handler)
+        {
+            static_cast<SettingsHandlerBase*>(handler)->setObserver(this);
+            m_centralRepositoryHandlers[repositoryUid] = handler;
+        }
+    }
+    return handler;
+}
+
+CPublishAndSubscribeHandler* XQSettingsManagerPrivate::pubSubHandlerInstance(long int categoryUid)
+{
+    CPublishAndSubscribeHandler* handler = NULL;
+    if (m_publishAndSubscribeHandlers.contains(categoryUid))
+    {
+        handler = m_publishAndSubscribeHandlers.value(categoryUid);
+    }
+    else
+    {
+        TUid uid;
+        uid.iUid = categoryUid;
+        TRAP(iError, handler = CPublishAndSubscribeHandler::NewL(uid);)
+        if (handler)
+        {
+            static_cast<SettingsHandlerBase*>(handler)->setObserver(this);
+            m_publishAndSubscribeHandlers[categoryUid] = handler;
+        }
+    }
+    return handler;
+}
+
+SettingsHandlerBase* XQSettingsManagerPrivate::handlerInstance(const XQSettingsKey& key)
+{
+    SettingsHandlerBase* handler = NULL;
+    const XQSettingsKey::Target target = key.target();
+    switch (target)
+    {
+        case XQSettingsKey::TargetCentralRepository:
+            handler = cenRepHandlerInstance(key.uid());
+            break;
+        case XQSettingsKey::TargetPublishAndSubscribe:
+            handler = pubSubHandlerInstance(key.uid());
+            break;
+        default:
+            break;
+    }
+    return handler;
+}
+
+void XQSettingsManagerPrivate::valueChanged(const XQSettingsKey& key, XQSettingsManager::Type type)
+{
+    emit q->valueChanged(key, readItemValue(key, type));
+}
+
+void XQSettingsManagerPrivate::itemDeleted(const XQSettingsKey& key)
+{
+    XQSettingsKey deletedKey(key);
+    stopMonitoring(deletedKey);
+    emit q->itemDeleted(deletedKey);
+}
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/settingsmanager/xqsettingsmanager_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQSETTINGSMANAGER_P_H
+#define XQSETTINGSMANAGER_P_H
+
+// INCLUDES
+#include "xqsettingsmanager.h"
+#include <QHash>
+
+#include "xqsettingskey.h"
+#include "settingshandlerbase.h"
+
+// FORWARD DECLARATIONS
+class QVariant;
+class CCentralRepositoryHandler;
+class CPublishAndSubscribeHandler;
+
+// CLASS DECLARATION
+class XQSettingsManagerPrivate
+    : public CBase, public MSettingsHandlerObserver
+{
+public:
+    XQSettingsManagerPrivate(XQSettingsManager* settingsmanager);
+    ~XQSettingsManagerPrivate();
+
+    QVariant readItemValue(const XQSettingsKey& key, XQSettingsManager::Type type);
+    bool writeItemValue(const XQSettingsKey& key, const QVariant& value);
+    bool startMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type);
+    bool stopMonitoring(const XQSettingsKey& key);
+
+    XQSettingsManager::Error error() const;
+
+    CCentralRepositoryHandler* cenRepHandlerInstance(long int repositoryUid);
+    CPublishAndSubscribeHandler* pubSubHandlerInstance(long int categoryUid);
+
+private:
+    SettingsHandlerBase* handlerInstance(const XQSettingsKey& key);
+
+protected:  //MSettingsHandlerObserver
+    void valueChanged(const XQSettingsKey& key, XQSettingsManager::Type type);
+    void itemDeleted(const XQSettingsKey& key);
+
+private:
+    friend class XQCentralRepositoryUtilsPrivate;
+    friend class XQPublishAndSubscribeUtilsPrivate;
+    XQSettingsManager* q;
+    mutable int iError;
+    QHash<long int, CCentralRepositoryHandler*> m_centralRepositoryHandlers;
+    QHash<long int, CPublishAndSubscribeHandler*> m_publishAndSubscribeHandlers;
+};
+
+#endif /*XQSETTINGSMANAGER_P_H*/
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/batterymonitor.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <batterymonitor.h>
+
+CBatteryMonitor::~CBatteryMonitor()
+{
+    Cancel();
+    delete iTelephony;
+}
+ 
+void CBatteryMonitor::ConstructL()
+{
+    iTelephony = CTelephony::NewL();
+    iTelephony->GetBatteryInfo( iStatus, iBatteryInfoV1Pckg );
+    SetActive();
+}
+ 
+CBatteryMonitor::CBatteryMonitor( MBatteryObserver& aObserver )
+    : CActive( EPriorityStandard ), iObserver( aObserver ), iBatteryInfoV1Pckg( iBatteryInfoV1 )
+{
+    CActiveScheduler::Add(this);
+}
+ 
+void CBatteryMonitor::RunL()
+{
+    iObserver.BatteryLevelL( iBatteryInfoV1.iChargeLevel, iBatteryInfoV1.iStatus );
+    iTelephony->NotifyChange( iStatus, CTelephony::EBatteryInfoChange, iBatteryInfoV1Pckg );   
+    SetActive();
+}
+ 
+void CBatteryMonitor::DoCancel()
+{
+    iTelephony->CancelAsync( CTelephony::EBatteryInfoChangeCancel );
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/batterymonitor.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef BATTERYMONITOR_H
+#define BATTERYMONITOR_H
+
+#include <exception>
+#include <etel3rdparty.h>
+ 
+class MBatteryObserver
+    {
+    public:
+         virtual void BatteryLevelL( TUint aChargeLevel, 
+             CTelephony::TBatteryStatus aBatteryStatus ) = 0;
+    };
+    
+class CBatteryMonitor : public CActive
+  { 
+public:
+    CBatteryMonitor( MBatteryObserver& aObserver );
+    void ConstructL();
+    ~CBatteryMonitor();
+    
+private:    
+    void RunL();
+    void DoCancel();
+    
+private:
+    MBatteryObserver& iObserver;
+    CTelephony* iTelephony;
+    CTelephony::TBatteryInfoV1 iBatteryInfoV1;
+    CTelephony::TBatteryInfoV1Pckg iBatteryInfoV1Pckg;
+   };
+
+#endif /* BATTERYMONITOR_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/cdeviceinfo.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "cdeviceinfo.h"
+
+#include <etel3rdparty.h>
+ 
+CDeviceInfo* CDeviceInfo::NewL()
+    {
+    CDeviceInfo* self = NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+CDeviceInfo* CDeviceInfo::NewLC()
+    {
+    CDeviceInfo* self = new ( ELeave ) CDeviceInfo();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+void CDeviceInfo::ConstructL()
+    {   
+    CActiveScheduler::Add( this );
+    iTelephony = CTelephony::NewL();  
+    iWait = new ( ELeave ) CActiveSchedulerWait();
+    }
+    
+CDeviceInfo::CDeviceInfo()
+:CActive( EPriorityNormal ), iBatteryInfoV1Pkg( iBatteryInfoV1 ),
+        iPhoneIdV1Pkg( iPhoneIdV1 ),
+        iSignalStrengthV1Pckg( iSignalStrengthV1 ),
+        iSubscriberIdV1Pckg( iSubscriberIdV1 )
+    {
+    }
+ 
+CDeviceInfo::~CDeviceInfo()
+    {
+    Cancel();
+    delete iTelephony;  
+    }
+
+TBuf<CTelephony::KPhoneSerialNumberSize> CDeviceInfo::imei()
+    {
+    Cancel();
+    iTelephony->GetPhoneId( iStatus, iPhoneIdV1Pkg );
+    SetActive();
+    
+    if ( !iWait->IsStarted() ) 
+        {
+        iWait->Start();
+        }
+    return iPhoneIdV1.iSerialNumber;
+    }
+
+TBuf<CTelephony::KPhoneModelIdSize> CDeviceInfo::model()
+    {
+    Cancel();
+    iTelephony->GetPhoneId( iStatus, iPhoneIdV1Pkg );
+    SetActive();
+    
+    if ( !iWait->IsStarted() ) 
+        {
+        iWait->Start();
+        }
+    return iPhoneIdV1.iModel;
+    }
+
+TBuf<CTelephony::KPhoneManufacturerIdSize> CDeviceInfo::manufacturer()
+    {
+    Cancel();
+    iTelephony->GetPhoneId( iStatus, iPhoneIdV1Pkg );
+    SetActive();
+    
+    if ( !iWait->IsStarted() ) 
+        {
+        iWait->Start();
+        }
+    return iPhoneIdV1.iManufacturer;
+    }
+
+TBuf<CTelephony::KIMSISize> CDeviceInfo::imsi()
+    {
+    Cancel();
+    iTelephony->GetSubscriberId( iStatus,iSubscriberIdV1Pckg );
+    SetActive();
+    
+    if (!iWait->IsStarted()) 
+        {
+        iWait->Start();
+        }
+    return iSubscriberIdV1.iSubscriberId;
+    }
+
+TUint CDeviceInfo::batteryLevel()
+    {
+    Cancel();
+    iTelephony->GetBatteryInfo( iStatus,iBatteryInfoV1Pkg );
+    SetActive();
+    
+    if ( !iWait->IsStarted() ) 
+        {
+        iWait->Start();
+        }
+    return iBatteryInfoV1.iChargeLevel;
+    }
+
+TInt32 CDeviceInfo::signalStrength()
+    {
+    Cancel();
+    iTelephony->GetSignalStrength( iStatus, iSignalStrengthV1Pckg );
+    SetActive();
+    if ( !iWait->IsStarted() )
+        {
+        iWait->Start();
+        }
+    return iSignalStrengthV1.iSignalStrength;
+    }
+ 
+void CDeviceInfo::DoCancel()
+    {
+    iTelephony->CancelAsync( CTelephony::EGetPhoneIdCancel );
+    }
+ 
+void CDeviceInfo::RunL()
+    {
+    iWait->AsyncStop();
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/cdeviceinfo.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef CIMEIREADER_H
+#define CIMEIREADER_H
+
+#include <exception>
+#include <e32base.h>
+#include <etel3rdparty.h>
+
+class CDeviceInfo : public CActive
+{
+public:
+    enum States
+    {
+        EModel, 
+        EManufacturer, 
+        ESerialnumber,
+    };
+    
+    static CDeviceInfo* NewL();
+    static CDeviceInfo* NewLC();
+    ~CDeviceInfo();
+
+    TBuf<CTelephony::KPhoneSerialNumberSize> imei();
+    TBuf<CTelephony::KPhoneModelIdSize> model();
+    TBuf<CTelephony::KPhoneManufacturerIdSize> manufacturer();
+    TBuf<CTelephony::KIMSISize> imsi();
+    TUint batteryLevel();
+    TInt32 signalStrength();
+    
+protected:  
+    void DoCancel();
+    void RunL();
+    
+private:
+    CDeviceInfo();
+    void ConstructL();
+
+private:
+    CTelephony*                 iTelephony;
+        
+    CTelephony::TBatteryInfoV1Pckg iBatteryInfoV1Pkg; 
+    CTelephony::TBatteryInfoV1 iBatteryInfoV1;
+    
+    CTelephony::TPhoneIdV1      iPhoneIdV1;    
+    CTelephony::TPhoneIdV1Pckg  iPhoneIdV1Pkg;
+        
+    CTelephony::TSignalStrengthV1Pckg iSignalStrengthV1Pckg; 
+    CTelephony::TSignalStrengthV1 iSignalStrengthV1;
+    
+    CTelephony::TSubscriberIdV1Pckg iSubscriberIdV1Pckg;
+    CTelephony::TSubscriberIdV1 iSubscriberIdV1; 
+    
+    CActiveSchedulerWait *iWait;
+    
+    bool phoneIdFetched;
+};
+
+#endif /* CIMEIREADER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/networksignalmonitor.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "networksignalmonitor.h"
+
+CNetworkSignalMonitor::~CNetworkSignalMonitor()
+{
+    Cancel();
+    delete iTelephony;
+}
+ 
+void CNetworkSignalMonitor::ConstructL()
+{
+    iTelephony = CTelephony::NewL();
+    iTelephony->NotifyChange( iStatus, CTelephony::ESignalStrengthChange, iSigStrengthV1Pckg );
+    SetActive();
+}
+ 
+CNetworkSignalMonitor::CNetworkSignalMonitor(MNetworkSignalObserver& aObserver)
+    : CActive( EPriorityStandard ), iObserver( aObserver ), iSigStrengthV1Pckg( iSigStrengthV1 )
+{
+    CActiveScheduler::Add(this);
+}
+ 
+void CNetworkSignalMonitor::RunL()
+{
+    iObserver.SignalStatusL( iSigStrengthV1.iSignalStrength, iSigStrengthV1.iBar );
+     iTelephony->NotifyChange( iStatus, CTelephony::ESignalStrengthChange, iSigStrengthV1Pckg ); 
+    SetActive();
+
+}
+ 
+void CNetworkSignalMonitor::DoCancel()
+{
+    iTelephony->CancelAsync( CTelephony::ESignalStrengthChangeCancel );
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/networksignalmonitor.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef NETWORKSIGNALMONITOR_H
+#define NETWORKSIGNALMONITOR_H
+
+#include <exception>
+#include <etel3rdparty.h> 
+ 
+class MNetworkSignalObserver
+    {
+    public:
+        virtual void SignalStatusL( TInt32 aStrength, TInt8 aBars ) = 0;
+    };
+      
+class CNetworkSignalMonitor : public CActive
+    { 
+public:
+    CNetworkSignalMonitor( MNetworkSignalObserver& aObserver );
+    void ConstructL();
+    ~CNetworkSignalMonitor();
+    
+private:
+    void RunL();
+    void DoCancel();
+    
+private:
+    MNetworkSignalObserver& iObserver;
+    CTelephony* iTelephony;
+    CTelephony::TSignalStrengthV1 iSigStrengthV1;
+    CTelephony::TSignalStrengthV1Pckg iSigStrengthV1Pckg;
+    };
+
+#endif /* NETWORKCSIGNALMONITOR_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/sysinfo.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+HEADERS += xqsysinfo.h \
+    xqsysinfo_p.h \
+    cdeviceinfo.h \
+    networksignalmonitor.h \
+    batterymonitor.h
+
+SOURCES += xqsysinfo.cpp \
+    xqsysinfo_p.cpp \
+    cdeviceinfo.cpp \
+    networksignalmonitor.cpp \
+    batterymonitor.cpp
+
+symbian:LIBS += -letel3rdparty \
+    -lsysutil \
+    -lefsrv \
+    -lfeatdiscovery
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/sysinfo.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TARGET = xqsysinfo
+TEMPLATE = lib
+QT = core
+
+DEFINES += XQSYSINFO_LIBRARY
+include(sysinfo.pri)
+
+symbian:defFilePath=..
+symbian:TARGET.UID3 = 0x2002BC7D
+#Added -AllFiles and -DRM capabilities
+symbian:TARGET.CAPABILITY = All -TCB
+symbian:TARGET.EPOCALLOWDLLDATA = 1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/sysinfo_global.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef SYSINFO_GLOBAL_H
+#define SYSINFO_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(XQSYSINFO_LIBRARY)
+#  define XQSYSINFO_EXPORT Q_DECL_EXPORT
+#else
+#  if defined(XQSYSINFO_NO_LIBRARY)
+#    define XQSYSINFO_EXPORT
+#  else
+#    define XQSYSINFO_EXPORT Q_DECL_IMPORT
+#  endif
+#endif
+
+#endif // SYSINFO_GLOBAL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/xqsysinfo.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,314 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqsysinfo.h"
+#include "xqsysinfo_p.h"
+
+/*!
+    \class XQSysInfo
+
+    \brief The XQSysInfo class is used to retrieve information about the phone (e.g. software version, free memory, IMEI, etc.)
+*/
+
+/*!
+    Constructs a XQSysInfo object with the given parent.
+*/
+XQSysInfo::XQSysInfo(QObject* parent):
+    QObject(parent), d(new XQSysInfoPrivate(this))
+{
+}
+
+/*!
+    Destroys the XQSysInfo object.
+*/
+XQSysInfo::~XQSysInfo()
+{
+    delete d;
+}
+
+/*!
+    \enum XQSysInfo::Error
+    This enum defines the possible errors for a XQSysInfo object.
+*/
+/*! \var XQSysInfo::Error XQSysInfo::NoError
+    No error occured.
+*/
+/*! \var XQSysInfo::Error XQSysInfo::OutOfMemoryError
+    Not enough memory.
+*/
+/*! \var XQSysInfo::Error XQSysInfo::IncorrectDriveError
+    Wrong drive letter.
+*/
+/*! \var XQSysInfo::Error XQSysInfo::DriveNotFoundError
+    Drive cannot be found.
+*/
+/*! \var XQSysInfo::Error XQSysInfo::UnknownError
+    Unknown error.
+*/
+
+/*!
+    \enum XQSysInfo::Drive
+
+    This enum defines the possible drive letters to be used.
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveA 
+    Drive A
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveB
+    Drive B
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveC
+    Drive C
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveD
+    Drive D
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveE
+    Drive E
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveF
+    Drive F
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveG
+    Drive G
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveH
+    Drive H
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveI
+    Drive I
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveJ
+    Drive J
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveK
+    Drive K
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveL
+    Drive L
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveM
+    Drive M
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveN 
+    Drive N
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveO
+    Drive O
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveP
+    Drive P
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveQ
+    Drive Q
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveR
+    Drive R
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveS
+    Drive S
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveT
+    Drive T
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveU
+    Drive U
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveV
+    Drive V
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveW    
+    Drive W
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveX
+    Drive X
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveY
+    Drive Y
+*/
+/*! \var XQSysInfo::Drive XQSysInfo::DriveZ
+    Drive Z
+*/
+
+/*! 
+    \enum XQSysInfo:Language
+    This enum defines the languages that are available
+    
+*/        
+
+/*!
+
+    \return Current language of the phone UI
+*/
+XQSysInfo::Language XQSysInfo::currentLanguage() const
+{
+    return d->currentLanguage();
+}
+
+/*!
+
+    \return International Mobile Equipment Identity (IMEI) unique identifier for the device. 
+*/
+QString XQSysInfo::imei() const
+{
+    return d->imei();
+}
+
+/*!
+
+    \return International Mobile Subscriber Identity (IMSI) from the device's SIM card, 
+*/
+QString XQSysInfo::imsi() const
+{
+    return d->imsi();
+}
+
+/*!
+
+    \return Firmware version of the device
+*/
+QString XQSysInfo::softwareVersion() const
+{
+    return d->softwareVersion();
+}
+
+/*!
+
+    \return Phone model
+*/
+QString XQSysInfo::model() const
+{
+    return d->model();
+}
+
+/*!
+    \return Manufacturer of the phone
+*/
+QString XQSysInfo::manufacturer() const
+{
+    return d->manufacturer();
+}
+
+/*!
+    \return Current battery level as a percentage, i.e. 0 to 100%
+*/
+uint XQSysInfo::batteryLevel() const
+{
+    return d->batteryLevel();
+}
+
+/*!
+    \return Network signal strength as a percentage, i.e. 0 to 100%
+*/
+int XQSysInfo::signalStrength() const
+{
+    return d->signalStrength();
+}
+
+/*!
+    NOTE: No implementation in the alpha release
+
+    \return Version string for the device's browser
+*/
+QString XQSysInfo::browserVersion() const
+{
+    return d->browserVersion();
+}
+
+/*!
+
+    \param drive Drive letter as enumeration
+    \return Available disk space in bytes on the given drive
+*/
+qlonglong XQSysInfo::diskSpace(XQSysInfo::Drive drive) const
+{
+    return d->diskSpace(drive);
+}
+
+/*!
+    Helper function to check if the disk space on the given drive is in critical condition, i.e. very low
+
+    \param drive Drive letter as enumeration
+    \return True, if memory is low on the given device, otherwise false
+*/
+bool XQSysInfo::isDiskSpaceCritical(XQSysInfo::Drive drive) const
+{
+    return d->isDiskSpaceCritical(drive);
+}
+
+/*!
+    Free RAM memory in bytes
+
+    \return Free RAM memory in bytes
+*/
+int XQSysInfo::memory() const
+{
+    return d->memory();
+}
+
+/*!
+    Checks if the specific feature is supported in the environment. See
+    <a href="http://library.forum.nokia.com/topic/S60_5th_Edition_Cpp_Developers_Library/GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6/html/featureinfo_8h.html">
+    featureinfo.h File Reference</a>
+    in the Symbian S60 SDK for a list of the feature ids. //insp: major, description of the error checking missing
+    
+    \param featureId Feature id
+     \return True, if the feature is supported, otherwise false
+*/
+bool XQSysInfo::isSupported(int featureId)
+{
+    return XQSysInfoPrivate::isSupported(featureId);
+}
+/*!
+    \return Error code indicating the current error level
+*/
+XQSysInfo::Error XQSysInfo::error() const
+{
+    return d->error();
+}
+
+/*!
+    Checks if the network is available
+
+    \return True, if the network is available, otherwise false
+*/
+bool XQSysInfo::isNetwork() const
+{
+    return d->isNetwork();
+}
+
+/*!
+    \fn void XQSysInfo::networkSignalChanged(ulong signalStrength)
+    
+    This signal is emitted when the signal strength changes.
+
+    \param signalStrength New signal strength value
+    \sa signalStrength()
+*/
+
+/*!
+    \fn void XQSysInfo::batteryLevelChanged(uint batteryLevel)
+
+    This signal is emitted when the battery level changes.
+
+    \param batteryLevel New battery level
+    \sa batteryLevel()
+*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/xqsysinfo.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,294 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQSYSINFO_H
+#define XQSYSINFO_H
+
+// INCLUDES
+#include <QObject>
+#include "sysinfo_global.h"
+
+// FORWARD DECLARATIONS
+class XQSysInfoPrivate;
+
+// CLASS DECLARATION
+class XQSYSINFO_EXPORT XQSysInfo : public QObject
+{
+    Q_OBJECT
+    
+public:
+
+    enum Error {
+        NoError = 0,
+        OutOfMemoryError,
+        IncorrectDriveError,
+        DriveNotFoundError,
+        UnknownError = -1
+    };
+    
+    enum Drive {
+        DriveA,   DriveB,   DriveC,   DriveD,   DriveE,
+        DriveF,   DriveG,   DriveH,   DriveI,   DriveJ,
+        DriveK,   DriveL,   DriveM,   DriveN,   DriveO, 
+        DriveP,   DriveQ,   DriveR,   DriveS,   DriveT,
+        DriveU,   DriveV,   DriveW,   DriveX,   DriveY,
+        DriveZ
+    };
+    
+    enum Language {
+        LangEnglish = 1,
+        LangFrench = 2,
+        LangGerman = 3,
+        LangSpanish = 4,
+        LangItalian = 5,
+        LangSwedish = 6,
+        LangDanish = 7,
+        LangNorwegian = 8,
+        LangFinnish = 9,
+        LangAmerican = 10,
+        LangSwissFrench = 11,
+        LangSwissGerman = 12,
+        LangPortuguese = 13,
+        LangTurkish = 14,
+        LangIcelandic = 15,
+        LangRussian = 16,
+        LangHungarian = 17,
+        LangDutch = 18,
+        LangBelgianFlemish = 19,
+        LangAustralian = 20,
+        LangBelgianFrench = 21,
+        LangAustrian = 22,
+        LangNewZealand = 23,
+        LangInternationalFrench = 24,
+        LangCzech = 25,
+        LangSlovak = 26,
+        LangPolish = 27,
+        LangSlovenian = 28,
+        LangTaiwanChinese = 29,
+        LangHongKongChinese = 30,
+        LangPrcChinese = 31,
+        LangJapanese = 32,
+        LangThai = 33,
+        LangAfrikaans = 34,
+        LangAlbanian = 35,
+        LangAmharic = 36,
+        LangArabic = 37,
+        LangArmenian = 38,
+        LangTagalog = 39,
+        LangBelarussian = 40,
+        LangBengali = 41,
+        LangBulgarian = 42,
+        LangBurmese = 43,
+        LangCatalan = 44,
+        LangCroatian = 45,
+        LangCanadianEnglish = 46,
+        LangInternationalEnglish = 47,
+        LangSouthAfricanEnglish = 48,
+        LangEstonian = 49,
+        LangFarsi = 50,
+        LangCanadianFrench = 51,
+        LangScotsGaelic = 52,
+        LangGeorgian = 53,
+        LangGreek = 54,
+        LangCyprusGreek = 55,
+        LangGujarati = 56,
+        LangHebrew = 57,
+        LangHindi = 58,
+        LangIndonesian = 59,
+        LangIrish = 60,
+        LangSwissItalian = 61,
+        LangKannada = 62,
+        LangKazakh = 63,
+        LangKhmer = 64,
+        LangKorean = 65,
+        LangLao = 66,
+        LangLatvian = 67,
+        LangLithuanian = 68,
+        LangMacedonian = 69,
+        LangMalay = 70,
+        LangMalayalam = 71,
+        LangMarathi = 72,
+        LangMoldavian = 73,
+        LangMongolian = 74,
+        LangNorwegianNynorsk = 75,
+        LangBrazilianPortuguese = 76,
+        LangPunjabi = 77,
+        LangRomanian = 78,
+        LangSerbian = 79,
+        LangSinhalese = 80,
+        LangSomali = 81,
+        LangInternationalSpanish = 82,
+        LangLatinAmericanSpanish = 83,
+        LangSwahili = 84,
+        LangFinlandSwedish = 85,
+        LangReserved1 = 86,
+        LangTamil = 87,
+        LangTelugu = 88,
+        LangTibetan = 89,
+        LangTigrinya = 90,
+        LangCyprusTurkish = 91,
+        LangTurkmen = 92,
+        LangUkrainian = 93,
+        LangUrdu = 94,
+        LangReserved2 = 95,
+        LangVietnamese = 96,
+        LangWelsh = 97,
+        LangZulu = 98,
+        LangOther = 99,
+        LangManufacturerEnglish = 100,
+        LangSouthSotho = 101,
+        LangBasque = 102,
+        LangGalician = 103,
+        LangJavanese = 104,
+        LangMaithili = 105,
+        LangAzerbaijani_Latin = 106,
+        LangAzerbaijani_Cyrillic = 107,
+        LangOriya = 108,
+        LangBhojpuri = 109,
+        LangSundanese = 110,
+        LangKurdish_Latin = 111,
+        LangKurdish_Arabic = 112,
+        LangPashto = 113,
+        LangHausa = 114,
+        LangOromo = 115,
+        LangUzbek_Latin = 116,
+        LangUzbek_Cyrillic = 117,
+        LangSindhi_Arabic = 118,
+        LangSindhi_Devanagari = 119,
+        LangYoruba = 120,
+        LangCebuano = 121,
+        LangIgbo = 122,
+        LangMalagasy = 123,
+        LangNepali = 124,
+        LangAssamese = 125,
+        LangShona = 126,
+        LangZhuang = 127,
+        LangMadurese = 128,
+        LangEnglish_Apac=129,
+        LangEnglish_Taiwan=157,
+        LangEnglish_HongKong=158,
+        LangEnglish_Prc=159,
+        LangEnglish_Japan=160,
+        LangEnglish_Thailand=161,
+        LangFulfulde = 162,
+        LangTamazight = 163,
+        LangBolivianQuechua = 164,
+        LangPeruQuechua = 165,
+        LangEcuadorQuechua = 166,
+        LangTajik_Cyrillic = 167,
+        LangTajik_PersoArabic = 168,
+        LangNyanja = 169,
+        LangHaitianCreole = 170,
+        LangLombard = 171,
+        LangKoongo = 172,
+        LangAkan = 173,
+        LangHmong = 174,
+        LangYi = 175,
+        LangTshiluba = 176,
+        LangIlocano = 177,
+        LangUyghur = 178,
+        LangNeapolitan = 179,
+        LangRwanda = 180,
+        LangXhosa = 181,
+        LangBalochi = 182,
+        LangMinangkabau = 184,
+        LangMakhuwa = 185,
+        LangSantali = 186,
+        LangGikuyu = 187,
+        LangMoore = 188,
+        LangGuarani = 189,
+        LangRundi = 190,
+        LangRomani_Latin = 191,
+        LangRomani_Cyrillic = 192,
+        LangTswana = 193,
+        LangKanuri = 194,
+        LangKashmiri_Devanagari = 195,
+        LangKashmiri_PersoArabic = 196,
+        LangUmbundu = 197,
+        LangKonkani = 198,
+        LangBalinese = 199,
+        LangNorthernSotho = 200,
+        LangWolof = 201,
+        LangBemba = 202,
+        LangTsonga = 203,
+        LangYiddish = 204,
+        LangKirghiz = 205,
+        LangGanda = 206,
+        LangSoga = 207,
+        LangMbundu = 208,
+        LangBambara = 209,
+        LangCentralAymara = 210,
+        LangZarma = 211,
+        LangLingala = 212,
+        LangBashkir = 213,
+        LangChuvash = 214,
+        LangSwati = 215,
+        LangTatar = 216,
+        LangSouthernNdebele = 217,
+        LangSardinian = 218,
+        LangScots = 219,
+        LangMeitei = 220,
+        LangWalloon = 221,
+        LangKabardian = 222,
+        LangMazanderani = 223,
+        LangGilaki = 224,
+        LangShan = 225,
+        LangLuyia = 226,
+        LanguageLuo = 227,
+        LangSukuma = 228,
+        LangAceh = 229,
+        LangMalay_Apac=326,        
+    };
+    
+    XQSysInfo(QObject* parent = 0);
+    ~XQSysInfo();
+    
+    XQSysInfo::Language currentLanguage() const;
+    QString imei() const;
+    QString model() const;
+    QString manufacturer() const;
+    QString softwareVersion() const;
+
+    uint batteryLevel() const;
+    QString imsi() const;
+    int signalStrength() const;
+    qlonglong diskSpace(XQSysInfo::Drive drive) const;
+    bool isDiskSpaceCritical(XQSysInfo::Drive drive) const;
+    bool isNetwork() const;
+    int memory() const;
+    QString browserVersion() const;
+    
+    static bool isSupported(int featureId);
+
+    XQSysInfo::Error error() const;
+
+Q_SIGNALS:
+    void networkSignalChanged(ulong signalStrength);
+    void batteryLevelChanged(uint batteryLevel);
+    
+private:
+    friend class XQSysInfoPrivate;
+    XQSysInfoPrivate* d;
+};
+
+#endif /*XQSYSINFO_H*/
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/xqsysinfo_p.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,184 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqsysinfo_p.h"
+#include "xqsysinfo.h"
+#include "cdeviceinfo.h"
+#include <e32const.h> 
+#include <sysutil.h>
+#include <etel3rdparty.h> 
+#include <f32file.h>
+#include <featdiscovery.h> 
+
+XQSysInfoPrivate::XQSysInfoPrivate(XQSysInfo *sysInfo) : q(sysInfo)
+{
+    TRAP(iError, iDeviceInfo = CDeviceInfo::NewL();)
+}
+
+XQSysInfoPrivate::~XQSysInfoPrivate()
+{
+    delete iDeviceInfo;
+}
+
+XQSysInfo::Language XQSysInfoPrivate::currentLanguage() const
+{
+    return static_cast<XQSysInfo::Language>(User::Language());
+}
+
+QString XQSysInfoPrivate::imei() const
+{
+    TBuf<CTelephony::KPhoneSerialNumberSize> imei(iDeviceInfo->imei());
+    return QString::fromUtf16(imei.Ptr(), imei.Length());
+}
+
+QString XQSysInfoPrivate::model() const
+{
+    TBuf<CTelephony::KPhoneModelIdSize> model(iDeviceInfo->model());
+    return QString::fromUtf16(model.Ptr(), model.Length());
+}
+
+QString XQSysInfoPrivate::manufacturer() const
+{
+    TBuf<CTelephony::KPhoneModelIdSize> manufacturer(
+            iDeviceInfo->manufacturer());
+    return QString::fromUtf16(manufacturer.Ptr(), manufacturer.Length()); 
+}
+
+QString XQSysInfoPrivate::imsi() const
+{   
+    TBuf<CTelephony::KIMSISize> imsi(iDeviceInfo->imsi());
+    return QString::fromUtf16(imsi.Ptr(), imsi.Length()); 
+}
+
+QString XQSysInfoPrivate::softwareVersion() const
+{
+    QString version;
+    TBuf<KSysUtilVersionTextLength> versionBuf;
+    if (SysUtil::GetSWVersion(versionBuf) == KErrNone) {
+        version = QString::fromUtf16(versionBuf.Ptr(), versionBuf.Length());
+    }
+    return version;
+}
+
+uint XQSysInfoPrivate::batteryLevel() const
+{
+    return iDeviceInfo->batteryLevel();
+}
+
+int XQSysInfoPrivate::signalStrength() const
+{
+    return iDeviceInfo->signalStrength();
+}
+
+int XQSysInfoPrivate::memory() const
+{
+    TMemoryInfoV1Buf info;
+    UserHal::MemoryInfo(info);
+    return info().iFreeRamInBytes;    
+}
+
+QString XQSysInfoPrivate::browserVersion() const
+{
+    return QString();
+}
+
+qlonglong XQSysInfoPrivate::diskSpace(XQSysInfo::Drive drive)
+{
+    RFs fsSession;
+    TInt64 driveFreeSize = 0;
+    TRAP(iError,
+        CleanupClosePushL(fsSession);
+        User::LeaveIfError(fsSession.Connect()); 
+        int driveIndex = static_cast<TDriveNumber>(drive);
+        
+        if (fsSession.IsValidDrive(driveIndex)) {
+            TDriveInfo driveInfo;
+            User::LeaveIfError(fsSession.Drive(driveInfo, driveIndex));
+            TVolumeInfo volumeInfo;
+            User::LeaveIfError(fsSession.Volume(volumeInfo, driveIndex));
+            driveFreeSize = volumeInfo.iFree;
+        }
+        CleanupStack::PopAndDestroy(&fsSession);
+    )
+    return driveFreeSize;
+}
+
+bool XQSysInfoPrivate::isDiskSpaceCritical(XQSysInfo::Drive drive) const
+{
+    bool isCritical = false;
+
+    TRAP(iError,
+        int driveIndex = static_cast<TDriveNumber>(drive);
+        
+        RFs fsSession;
+        CleanupClosePushL(fsSession);
+        if (fsSession.IsValidDrive(driveIndex)) {
+            User::LeaveIfError(fsSession.Connect());
+        
+            if (SysUtil::DiskSpaceBelowCriticalLevelL(
+                    &fsSession, 0, driveIndex)) {
+                isCritical = true;
+            } else {
+                isCritical = false;
+            }
+        } else {
+            User::Leave(KErrNotFound);
+        }
+        CleanupStack::PopAndDestroy(&fsSession);
+    )
+    return isCritical;
+}
+
+bool XQSysInfoPrivate::isSupported(int featureId)
+{
+    bool isFeatureSupported = false;
+    TRAPD(iError, isFeatureSupported = CFeatureDiscovery::IsFeatureSupportedL(featureId);) //insp: major, error checking is not reliable
+    return isFeatureSupported;
+}
+
+void XQSysInfoPrivate::SignalStatusL(TInt32 aStrength, TInt8 /*aBars*/)
+{
+    emit q->networkSignalChanged(aStrength);
+}
+
+void XQSysInfoPrivate::BatteryLevelL(TUint aChargeLevel, CTelephony::TBatteryStatus /*aBatteryStatus*/)
+{
+    emit q->batteryLevelChanged(aChargeLevel);
+}
+
+bool XQSysInfoPrivate::isNetwork() const
+{
+    return (signalStrength() != 0);
+}
+
+XQSysInfo::Error XQSysInfoPrivate::error() const
+{
+    switch (iError) {
+    case KErrNone:
+        return XQSysInfo::NoError;
+    case KErrNoMemory:
+        return XQSysInfo::OutOfMemoryError;
+    case KErrNotFound:
+        return XQSysInfo::DriveNotFoundError;
+    default:
+        return XQSysInfo::UnknownError;
+    }   
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/sysinfo/xqsysinfo_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQSYSINFOPRIVATE_H
+#define XQSYSINFOPRIVATE_H
+
+// INCLUDES
+#include "xqsysinfo.h"
+#include "xqsysinfo_p.h"
+
+#include "networksignalmonitor.h"
+#include "batterymonitor.h"
+
+#include <etel3rdparty.h>
+
+// FORWARD DECLARATIONS
+class CDeviceInfo;
+
+// CLASS DECLARATION
+class XQSysInfoPrivate: public QObject, public CBase, public MNetworkSignalObserver, 
+    public MBatteryObserver
+{
+    Q_OBJECT
+public:
+    XQSysInfoPrivate(XQSysInfo* sysInfo);
+    ~XQSysInfoPrivate();
+    
+    XQSysInfo::Language currentLanguage() const;
+    QString imei() const;
+    QString imsi() const;
+    QString softwareVersion() const;
+    QString model() const;
+    QString manufacturer() const;
+    uint batteryLevel() const;
+    int signalStrength() const;                  
+    QString browserVersion() const;
+    
+    int memory() const;
+    qlonglong diskSpace(XQSysInfo::Drive drive);
+    bool isDiskSpaceCritical(XQSysInfo::Drive drive) const;
+    bool isNetwork() const;
+    
+    static bool isSupported(int featureId);
+    
+    XQSysInfo::Error error() const;
+    
+private: // From MNetworkSignalObserver
+    void SignalStatusL(TInt32 aStrength, TInt8 aBars);
+
+private: // From MBatteryObserver
+    void BatteryLevelL(TUint aChargeLevel, CTelephony::TBatteryStatus aBatteryStatus);
+    
+private:
+    XQSysInfo* q;
+    CDeviceInfo* iDeviceInfo;
+    
+    mutable int iError;
+};
+
+#endif /*XQSYSINFOPRIVATE_H*/
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/systemtoneservice/systemtoneservice.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+
+HEADERS += \
+	xqsystemtoneservice_p.h \
+	xqsystemtoneservice.h
+
+SOURCES += \
+	xqsystemtoneservice.cpp \
+	xqsystemtoneservice_p.cpp
+
+symbian:LIBS += -lsystemtoneservice
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/systemtoneservice/systemtoneservice.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TEMPLATE = lib
+TARGET = xqsystemtoneservice
+
+symbian:defFilePath=..
+symbian:TARGET.UID3=0x2002EA83
+
+TARGET.CAPABILITY = CAP_GENERAL_DLL
+
+DEFINES += __STS_QT_LIB_BUILD__
+include(systemtoneservice.pri)
+
+symbian {
+MMP_RULES += EPOCALLOWDLLDATA 
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/systemtoneservice/xqsystemtoneservice.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*       QT wrapper API for  for System Tone Service 
+*
+*/
+
+#include "xqsystemtoneservice.h"
+#include "xqsystemtoneservice_p.h"
+
+STS_EXPORT XQSystemToneService::XQSystemToneService(QObject *parent) :
+    QObject(parent)
+{
+    d_p = new XQSystemToneServicePrivate(this);
+}
+
+STS_EXPORT XQSystemToneService::~XQSystemToneService()
+{
+    delete d_p;
+}
+
+STS_EXPORT void XQSystemToneService::playTone(ToneType toneType)
+{
+    d_p->playTone(toneType);
+    emit toneStarted();
+}
+
+STS_EXPORT void XQSystemToneService::playAlarm(AlarmType alarmType, unsigned int& context)
+{
+    context = d_p->playAlarm(alarmType);
+}
+
+STS_EXPORT void XQSystemToneService::stopAlarm(unsigned int context)
+{
+    d_p->stopAlarm(context);
+}
+
+STS_EXPORT void XQSystemToneService::playAlarm(ToneType toneType, unsigned int& context)
+{
+    context = d_p->playAlarm(toneType);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/systemtoneservice/xqsystemtoneservice.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,200 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*       QT wrapper API for  for System Tone Service 
+*
+*/
+
+#ifndef XQSYSTEMTONESERVICE_H
+#define XQSYSTEMTONESERVICE_H
+
+#include <QObject>
+
+#include <systemtoneservice.h>
+
+#ifdef __STS_QT_LIB_BUILD__ 
+#  define STS_EXPORT Q_DECL_EXPORT
+#else
+#  define STS_EXPORT Q_DECL_IMPORT
+#endif
+
+class XQSystemToneServicePrivate;
+
+/**
+ * The System Tone Service (STS) is a component of the Multimedia Services (mmserv) 
+ * collection of the Multimedia Middleware (mmmw) package. STS provides multimedia APIs 
+ * specific to playing system tones (calendar, message alerts, warnings, etc).
+ * 
+ * Here you can find Qt wrapper for this component.
+ * 
+ * Main concepts behind this API:
+ *   * tone - short sound used in the manner "fire and forget" therefore there are no signals when tone ends.
+ *   * alarm - these are kind of looped/longer sounds that may be interrupted by calling app; also there are notifications (signals) when alarm ends playing.
+ *    
+ */
+class XQSystemToneService : public QObject
+{
+  Q_OBJECT
+
+public:
+
+/**
+ * Supported tone types.
+*/
+  Q_DECL_IMPORT enum ToneType {
+	   // Capture Tones
+	   BurstModeTone = CSystemToneService::EBurstMode,
+	   CaptureTone = CSystemToneService::ECapture,
+	   CallRecordingTone = CSystemToneService::ECallRecording,
+	   RecordingStartTone = CSystemToneService::ERecordingStart,
+	   RecordingStopTone = CSystemToneService::ERecordingStop,
+	   SelfTimerTone = CSystemToneService::ESelfTimer,
+	   
+	   // General Tones
+	   ConfirmationBeepTone = CSystemToneService::EConfirmationBeep,
+	   DefaultBeepTone = CSystemToneService::EDefaultBeep,
+	   ErrorBeepTone = CSystemToneService::EErrorBeep,
+	   InformationBeepTone = CSystemToneService::EInformationBeep,
+	   WarningBeepTone = CSystemToneService::EWarningBeep,
+	   IntegratedHandsFreeActivatedTone = CSystemToneService::EIntegratedHandsFreeActivated,
+	   
+	   // Key Tones
+	   TouchScreenTone = CSystemToneService::ETouchScreen,
+	   
+	   // Location Tones
+	   LocationRequestTone = CSystemToneService::ELocationRequest,
+	   
+	   // Messaging Tones
+	   ChatAlertTone = CSystemToneService::EChatAlert,
+	   EmailAlertTone = CSystemToneService::EEmailAlert,
+	   MmsAlertTone = CSystemToneService::EMmsAlert,
+	   SmsAlertTone = CSystemToneService::ESmsAlert,
+	   DeliveryReportTone = CSystemToneService::EDeliveryReport,
+	   MessageSendFailureTone = CSystemToneService::EMessageSendFailure,
+	   
+	   // Power Tones
+	   BatteryLowTone = CSystemToneService::EBatteryLow,
+	   BatteryRechargedTone = CSystemToneService::EBatteryRecharged,
+	   PowerOnTone = CSystemToneService::EPowerOn,
+	   PowerOffTone = CSystemToneService::EPowerOff,
+	   WakeUpTone = CSystemToneService::EWakeUp,
+	   WrongChargerTone = CSystemToneService::EWrongCharger,
+	   
+	   // Telephony Tones
+	   AutomaticRedialCompleteTone = CSystemToneService::EAutomaticRedialComplete,
+	   
+	   // Voice Recognition Tones
+	   VoiceStartTone = CSystemToneService::EVoiceStart,
+	   VoiceErrorTone = CSystemToneService::EVoiceError,
+	   VoiceAbortTone = CSystemToneService::EVoiceAbort
+  };
+  
+Q_DECL_IMPORT enum AlarmType {
+       // Calendar Tones
+       CalendarAlarmTone = CSystemToneService::ECalendarAlarm,
+       ClockAlarmTone = CSystemToneService::EClockAlarm,
+       ToDoAlarmTone = CSystemToneService::EToDoAlarm,
+
+       // Telephony Alarms
+       IncomingCallTone = CSystemToneService::EIncomingCall,
+       IncomingCallLine2Tone = CSystemToneService::EIncomingCallLine2,
+       IncomingDataCallTone = CSystemToneService::EIncomingDataCall,
+  };
+
+  
+public:
+/**
+* XQSystemToneService object constructor. 
+*/
+  STS_EXPORT XQSystemToneService(QObject *parent = 0);
+
+/**
+* Simple destructor.
+*/
+  STS_EXPORT ~XQSystemToneService();
+
+/**
+* Play selected tone.
+*
+* @param  toneType  selected tone type.
+* @see  XQSystemToneService::error()
+*/
+  STS_EXPORT void playTone(ToneType toneType);
+
+/**
+* Play selected alarm. 
+*
+* @param  alarmType  selected tone type.
+* @param  contextId  unique playback id for current playback event. May be used for matching playback signals and/or to later stop playing.
+* @see  XQSystemToneService::stopAlarm(unsigned int contextId)
+* @see  XQSystemToneService::error()
+*/
+  STS_EXPORT void playAlarm(AlarmType alarmType, unsigned int& contextId);
+  
+  
+/**
+* Cancel tone being played currently.
+*
+* @param contextId id, must be same as given by playTone method.
+* @see  XQSystemToneService::playAlarm(ToneType toneType, unsigned int& contextId)
+*/
+  STS_EXPORT void stopAlarm(unsigned int contextId);
+
+/**
+* Play selected tone. 
+*
+* @param  toneType  selected tone type.
+* @param  contextId  unique playback id for current playback event. May be used for matching playback signals and/or to later stop playing.
+* @see  XQSystemToneService::stopAlarm(unsigned int contextId)
+* @see  XQSystemToneService::error()
+*/
+  STS_EXPORT void playAlarm(ToneType toneType, unsigned int& contextId);
+  
+signals:
+
+/**
+* Playback of given tone has been started.
+* 
+*/
+  STS_EXPORT void toneStarted();
+
+/**
+* Playback of given alarm has been started.
+*
+* @param contextId id, the same as given by playTone method.
+* 
+*/
+  STS_EXPORT void alarmStarted(unsigned int contextId);
+  
+/**
+* Playback of given alarm has been finished.
+*
+* @param contextId id, the same as given by playTone method.
+* 
+*/
+  STS_EXPORT void alarmFinished(unsigned int contextId);
+
+private:
+
+  XQSystemToneServicePrivate *d_p;
+
+  friend class XQSystemToneServicePrivate;
+  
+};
+
+#endif /*SYSTEMTONESERVICE_QT_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/systemtoneservice/xqsystemtoneservice_p.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*       QT wrapper API for  for System Tone Service 
+*
+*/
+
+#include <xqsystemtoneservice_p.h>
+
+XQSystemToneServicePrivate::XQSystemToneServicePrivate(XQSystemToneService *qptr)
+:
+q_ptr(qptr),
+sts(CSystemToneService::Create())
+{
+}
+
+XQSystemToneServicePrivate::~XQSystemToneServicePrivate()
+{
+    if (sts) {
+        CSystemToneService::Delete(sts);
+    }
+}
+
+void XQSystemToneServicePrivate::playTone(XQSystemToneService::ToneType toneType)
+{
+    if (sts) {
+        sts->PlayTone(mapToneType(toneType));
+        emit q_ptr->toneStarted();
+    }
+}
+
+unsigned int XQSystemToneServicePrivate::playAlarm(XQSystemToneService::AlarmType alarmType)
+{
+    unsigned int ctx = 0;
+    if (sts) {
+        sts->PlayAlarm(mapAlarmType(alarmType), ctx, *this);
+        emit q_ptr->alarmStarted(ctx);
+    }
+    return ctx;
+}
+
+void XQSystemToneServicePrivate::stopAlarm(unsigned int contextId)
+{
+    if (sts) {
+        sts->StopAlarm(contextId);
+    }
+}
+
+unsigned int XQSystemToneServicePrivate::playAlarm(XQSystemToneService::ToneType toneType)
+{
+    unsigned int ctx = 0;
+    if (sts) {
+        sts->PlayAlarm(mapToneType(toneType), ctx, *this);
+        emit q_ptr->alarmStarted(ctx);
+    }
+    return ctx;
+}
+
+CSystemToneService::TToneType XQSystemToneServicePrivate::mapToneType(XQSystemToneService::ToneType toneType)
+{
+    return static_cast<CSystemToneService::TToneType>(toneType);
+}
+
+CSystemToneService::TAlarmType XQSystemToneServicePrivate::mapAlarmType(XQSystemToneService::AlarmType alarmType)
+{
+    return static_cast<CSystemToneService::TAlarmType>(alarmType);
+}
+
+void XQSystemToneServicePrivate::PlayAlarmComplete(unsigned int contextId)
+{
+    emit q_ptr->alarmFinished(contextId);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/systemtoneservice/xqsystemtoneservice_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*       QT wrapper API for  for System Tone Service 
+*
+*/
+
+#ifndef XQSYSTEMTONESERVICE_P_H
+#define XQSYSTEMTONESERVICE_P_H
+
+#include <xqsystemtoneservice.h>
+
+class XQSystemToneServicePrivate : public MStsPlayAlarmObserver
+{
+
+public:
+  XQSystemToneServicePrivate(XQSystemToneService *qptr);
+
+  ~XQSystemToneServicePrivate();
+
+  void playTone(XQSystemToneService::ToneType toneType);
+
+  unsigned int playAlarm(XQSystemToneService::AlarmType alarmType);
+
+  void stopAlarm(unsigned int contextId);
+
+  void PlayAlarmComplete(unsigned int aAlarmContext);
+
+  unsigned int playAlarm(XQSystemToneService::ToneType toneType);
+  
+private:
+
+  CSystemToneService::TToneType mapToneType(XQSystemToneService::ToneType toneType);
+
+  CSystemToneService::TAlarmType mapAlarmType(XQSystemToneService::AlarmType toneType);
+
+private:
+  
+  XQSystemToneService *q_ptr;
+  
+  CSystemToneService *sts;
+  
+};
+
+#endif /*XQSYSTEMTONESERVICE_P_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/utils/utils.pri	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+HEADERS += xqutils.h \
+    xqutils_p.h \
+    xqconversions.h
+
+SOURCES += xqutils.cpp \
+    xqutils_p.cpp \
+    xqconversions.cpp
+
+symbian:LIBS += -lapmime \
+    -lCommonUI \
+    -lplatformenv \
+    -lcharconv
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/utils/utils.pro	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, version 2.1 of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, 
+# see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+#
+# Description:
+#
+
+TARGET = xqutils
+TEMPLATE = lib
+QT = core
+
+DEFINES += XQUTILS_LIBRARY
+include(utils.pri)
+
+symbian:defFilePath=..
+symbian:TARGET.UID3 = 0x2002BC7B
+#Added -AllFiles and -DRM capabilities
+symbian:TARGET.CAPABILITY = All -TCB
+symbian:TARGET.EPOCALLOWDLLDATA = 1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/utils/utils_global.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef UTILS_GLOBAL_H
+#define UTILS_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(XQUTILS_LIBRARY)
+#  define XQUTILS_EXPORT Q_DECL_EXPORT
+#else
+#  if defined(XQUTILS_NO_LIBRARY)
+#    define XQUTILS_EXPORT
+#  else
+#    define XQUTILS_EXPORT Q_DECL_IMPORT
+#  endif
+#endif
+
+#endif // UTILS_GLOBAL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/utils/xqconversions.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqconversions.h"
+#include "utf.h"
+
+/*!
+    \class XQConversions
+    \brief The XQConversions class offers functions for converting between Symbian S60 data types and Qt data types.
+*/
+
+/*!
+    Converts a Symbian S60 descriptor (string) to a QString
+
+    \param desc descriptor to be converted
+    \return QString containing the converted string
+*/
+QString XQConversions::s60DescToQString(const TDesC& desc)
+{
+    return QString::fromUtf16(desc.Ptr(), desc.Length());
+}
+
+/*!
+    Converts a QString to a Symbian S60 descriptor (string).
+
+    Note: Ownership of the returned descriptor (string) is transferred to caller.
+
+    \param string QString to be converted
+    \return Pointer to a Symbian S60 descriptor on success;
+            otherwise returns NULL pointer
+*/
+HBufC* XQConversions::qStringToS60Desc(const QString& string)
+{
+    TPtrC16 str(reinterpret_cast<const TUint16*>(string.utf16()));
+    return str.Alloc();
+}
+
+/*!
+    Converts a Symbian S60 8 bit descriptor (UTF8 string) to a QString
+
+    \param desc 8 bit descriptor to be converted
+    \return Converted QString on success; otherwise returns null QString
+*/
+QString XQConversions::s60Desc8ToQString(const TDesC8& desc)
+{
+    QString qtString;
+    HBufC* s60str;
+    TRAPD(error, s60str = CnvUtfConverter::ConvertToUnicodeFromUtf8L(desc));
+    if (error == KErrNone)
+    {
+        qtString = QString::fromUtf16(s60str->Ptr(), s60str->Length());
+        delete s60str;
+    }
+    return qtString;
+}
+
+/*!
+    Converts a QString to a Symbian S60 8 bit descriptor (UTF8 string).
+
+    Note: Ownership of the returned descriptor (string) is transferred to the caller
+
+    \param string QString to be converted
+    \return Pointer to a Symbian S60 descriptor containing the UTF8 string on success;
+            otherwise returns NULL pointer
+*/
+HBufC8* XQConversions::qStringToS60Desc8(const QString& string)
+{
+    TPtrC16 str(reinterpret_cast<const TUint16*>(string.utf16()));
+    HBufC8* s60str;
+    TRAPD(error, s60str = CnvUtfConverter::ConvertFromUnicodeToUtf8L(str));
+    if (error != KErrNone)
+    {
+        return NULL;
+    }
+    return s60str;
+}
+
+/*!
+    Converts a Symbian S60 8 bit descriptor to a QByteArray
+
+    \param desc 8 bit descriptor to be converted
+    \return QByteArray on success; otherwise returns null QByteArray
+*/
+QByteArray XQConversions::s60Desc8ToQByteArray(const TDesC8& desc)
+{
+    return QByteArray((const char*)desc.Ptr(), desc.Length());
+}
+
+/*!
+    Converts a QByteArray to a Symbian S60 8 bit descriptor.
+    Note: Ownership of the returned descriptor (string) is transferred to the caller
+
+    \param byteArray QByteArray to be converted
+    \return Pointer to an 8 bit Symbian S60 descriptor string on success;
+            otherwise returns NULL pointer
+*/
+HBufC8* XQConversions::qByteArrayToS60Desc8(const QByteArray& byteArray)
+{
+    TPtrC8 ptr8((TUint8*)(byteArray.constData()));
+    return ptr8.Alloc();
+}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/utils/xqconversions.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQCONVERSIONS
+#define XQCONVERSIONS
+
+// INCLUDES
+#include <e32cmn.h>
+#include <e32des8.h>
+#include <QObject>
+#include "utils_global.h"
+
+// CLASS DECLARATION
+class XQUTILS_EXPORT XQConversions
+{
+public:
+    static QString s60DescToQString(const TDesC& desc);
+    static HBufC* qStringToS60Desc(const QString& string);
+    static QString s60Desc8ToQString(const TDesC8& desc);
+    static HBufC8* qStringToS60Desc8(const QString& string);
+    static QByteArray s60Desc8ToQByteArray(const TDesC8& desc);
+    static HBufC8* qByteArrayToS60Desc8(const QByteArray& string);
+};
+
+#endif // XQCONVERSIONS
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/utils/xqutils.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,271 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqutils.h"
+#include "xqutils_p.h"
+
+/*!
+    \class XQUtils
+    \brief The XQUtils is a utility class. The class constains some
+    convenience functions e.g.  keeping the device backlight on, and launching files.
+*/
+
+/*!
+    Constructs a XQUtils object with the given parent.
+*/
+XQUtils::XQUtils(QObject* parent)
+ : QObject(parent), d(new XQUtilsPrivate(this))
+{
+}
+
+/*!
+    Destroys the XQUtils object.
+*/
+XQUtils::~XQUtils()
+{
+    delete d;
+}
+
+/*!
+    \enum XQUtils::Error
+
+    This enum defines the possible errors for an XQUtils object.
+*/
+/*! \var XQUtils::Error XQUtils::NoError
+    No error occured.
+*/
+/*! \var XQUtils::Error XQUtils::OutOfMemoryError
+    Not enough memory.
+*/
+/*! \var XQUtils::Error XQUtils::UserCancelledError
+    User cancelled an operation.
+*/
+/*! \var XQUtils::Error XQUtils::UnknownError
+    Unknown error.
+*/
+
+/*!
+    Tries to launch a file in the appropriate application based on the file type.
+
+    \param filename Path to the file
+    \return If false is returned, an error has occurred. Call error() to the
+    XQUtils::Error value that indicates which error occurred
+    \sa error()
+*/
+bool XQUtils::launchFile(const QString& filename)
+{
+    return d->launchFile(filename);
+}
+
+/*!
+    Resets the system inactivity timer. Calling this function regularly keeps
+    the device backlight on.
+*/
+void XQUtils::resetInactivityTime()
+{
+    d->resetInactivityTime();
+}
+
+/*!
+    Returns the root path in ROM.
+
+    \return The root path in ROM.
+*/
+QString XQUtils::romRootPath()
+{
+    return XQUtilsPrivate::romRootPath();
+}
+
+/*!
+    Returns the root path in Phone Memory.
+
+    \return The root path in Phone Memory.
+*/
+QString XQUtils::phoneMemoryRootPath()
+{
+    return XQUtilsPrivate::phoneMemoryRootPath();
+}
+
+/*!
+    Returns the root path in Memory Card.
+
+    \return The root path in Memory Card.
+*/
+QString XQUtils::memoryCardRootPath()
+{
+    return XQUtilsPrivate::memoryCardRootPath();
+}
+
+/*!
+    Returns the games path to be appended to a root path.
+
+    \return The games path.
+*/
+QString XQUtils::gamesPath()
+{
+    return XQUtilsPrivate::gamesPath();
+}
+
+/*!
+    Returns the installs path to be appended to a root path.
+
+    \return The installs path.
+*/
+QString XQUtils::installsPath()
+{
+    return XQUtilsPrivate::installsPath();
+}
+
+/*!
+    Returns the others path to be appended to a root path.
+
+    \return The installs path.
+*/
+QString XQUtils::othersPath()
+{
+    return XQUtilsPrivate::othersPath();
+}
+
+/*!
+    Returns the videos path to be appended to a root path.
+
+    \return The videos path.
+*/
+QString XQUtils::videosPath()
+{
+    return XQUtilsPrivate::videosPath();
+}
+
+/*!
+    Returns the images path to be appended to a root path.
+
+    \return The images path.
+*/
+QString XQUtils::imagesPath()
+{
+    return XQUtilsPrivate::imagesPath();
+}
+
+/*!
+    Returns the pictures path to be appended to a root path.
+
+    \return The pictures path.
+*/
+QString XQUtils::picturesPath()
+{
+    return XQUtilsPrivate::picturesPath();
+}
+
+/*!
+    Returns the GMS pictures path to be appended to a root path.
+
+    \return The GMS pictures path.
+*/
+QString XQUtils::gmsPicturesPath()
+{
+    return XQUtilsPrivate::gmsPicturesPath();
+}
+
+/*!
+    Returns the MMS background images path to be appended to a root path.
+
+    \return The MMS background images path.
+*/
+QString XQUtils::mmsBackgroundImagesPath()
+{
+    return XQUtilsPrivate::mmsBackgroundImagesPath();
+}
+
+/*!
+    Returns the presence logos path to be appended to a root path.
+
+    \return The presence logos path.
+*/
+QString XQUtils::presenceLogosPath()
+{
+    return XQUtilsPrivate::presenceLogosPath();
+}
+
+/*!
+    Returns the sounds path to be appended to a root path.
+
+    \return The sounds path.
+*/
+QString XQUtils::soundsPath()
+{
+    return XQUtilsPrivate::soundsPath();
+}
+
+/*!
+    Returns the digital sounds path to be appended to a root path.
+
+    \return The digital sounds path.
+*/
+QString XQUtils::digitalSoundsPath()
+{
+    return XQUtilsPrivate::digitalSoundsPath();
+}
+
+/*!
+    Returns the simple sounds path to be appended to a root path.
+
+    \return The simple sound path.
+*/
+QString XQUtils::simpleSoundsPath()
+{
+    return XQUtilsPrivate::simpleSoundsPath();
+}
+
+/*!
+    Returns a thumbnail images path. The thumbnail images
+    directory exists under the same directory where the corresponding
+    image is. Do not try to append this to a root directory.
+
+    \return The thumbnail images path.
+*/
+QString XQUtils::imagesThumbnailPath()
+{
+    return XQUtilsPrivate::imagesThumbnailPath();
+}
+
+/*!
+    Returns the full path of the contacts folder in 
+    the memory card. The path also contains the drive letter.
+    Do not try to append this to any root directory.
+
+    \return The full path of the contacts folder in the memory card.
+*/
+QString XQUtils::memoryCardContactsPath()
+{
+    return XQUtilsPrivate::memoryCardContactsPath();
+}
+
+/*!
+    Returns the type of error that occurred if the latest function call failed; otherwise returns NoError.
+
+    \return Error code
+*/
+XQUtils::Error XQUtils::error() const
+{
+    return d->error();
+}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/utils/xqutils.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQUTILS
+#define XQUTILS
+
+// INCLUDES
+#include <QObject>
+#include "utils_global.h"
+
+// FORWARD DECLARATIONS
+class XQUtilsPrivate;
+
+// CLASS DECLARATION
+class XQUTILS_EXPORT XQUtils : public QObject
+{
+     Q_OBJECT
+
+public:
+    enum Error
+    {
+        NoError = 0,
+        OutOfMemoryError,
+        UserCancelledError,
+        UnknownError = -1
+    };
+
+    XQUtils(QObject* parent = 0);
+    ~XQUtils();
+
+    bool launchFile(const QString& filename);
+
+    static QString romRootPath();
+    static QString phoneMemoryRootPath();
+    static QString memoryCardRootPath();
+    static QString gamesPath();
+    static QString installsPath();
+    static QString othersPath();
+    static QString videosPath();
+    static QString imagesPath();
+    static QString picturesPath();
+    static QString gmsPicturesPath();
+    static QString mmsBackgroundImagesPath();
+    static QString presenceLogosPath();
+    static QString soundsPath();
+    static QString digitalSoundsPath();
+    static QString simpleSoundsPath();
+    static QString imagesThumbnailPath();
+    static QString memoryCardContactsPath();
+
+    XQUtils::Error error() const;
+
+public Q_SLOTS:
+    void resetInactivityTime();
+
+private:
+    XQUtilsPrivate* d;
+};
+
+#endif // XQUTILS
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/utils/xqutils_p.cpp	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "xqutils.h"
+#include "xqutils_p.h"
+
+#include <DocumentHandler.h>
+#include <apmstd.h>
+#include <pathinfo.h>
+
+XQUtilsPrivate::XQUtilsPrivate(XQUtils* utils): q(utils)
+{
+}
+
+XQUtilsPrivate::~XQUtilsPrivate()
+{
+    delete iDocHandler;
+}
+
+bool XQUtilsPrivate::launchFile(const QString& filename)
+{
+    TRAP(iError,
+        if (!iDocHandler)
+        {
+            iDocHandler = CDocumentHandler::NewL();
+        }
+        TPtrC16 textPtr(reinterpret_cast<const TUint16*>(filename.utf16()));
+        TDataType dataType;
+        User::LeaveIfError(iDocHandler->OpenFileEmbeddedL(textPtr, dataType));
+    )
+    return (iError == KErrNone);
+}
+
+void XQUtilsPrivate::resetInactivityTime()
+{
+    User::ResetInactivityTime();
+}
+
+QString XQUtilsPrivate::romRootPath()
+{
+    TPtrC romRootPath = PathInfo::RomRootPath();
+    return QString::fromUtf16(romRootPath.Ptr(), romRootPath.Length());
+}
+
+QString XQUtilsPrivate::phoneMemoryRootPath()
+{
+    TPtrC phoneMemoryRootPath = PathInfo::PhoneMemoryRootPath();
+    return QString::fromUtf16(phoneMemoryRootPath.Ptr(), phoneMemoryRootPath.Length());
+}
+
+QString XQUtilsPrivate::memoryCardRootPath()
+{
+    TPtrC memoryCardRootPath = PathInfo::MemoryCardRootPath();
+    return QString::fromUtf16(memoryCardRootPath.Ptr(), memoryCardRootPath.Length());
+}
+
+QString XQUtilsPrivate::gamesPath()
+{
+    TPtrC gamesPath = PathInfo::GamesPath();
+    return QString::fromUtf16(gamesPath.Ptr(), gamesPath.Length());
+}
+
+QString XQUtilsPrivate::installsPath()
+{
+    TPtrC installsPath = PathInfo::InstallsPath();
+    return QString::fromUtf16(installsPath.Ptr(), installsPath.Length());
+}
+
+QString XQUtilsPrivate::othersPath()
+{
+    TPtrC othersPath = PathInfo::OthersPath();
+    return QString::fromUtf16(othersPath.Ptr(), othersPath.Length());
+}
+
+QString XQUtilsPrivate::videosPath()
+{
+    TPtrC videosPath = PathInfo::VideosPath();
+    return QString::fromUtf16(videosPath.Ptr(), videosPath.Length());
+}
+
+QString XQUtilsPrivate::imagesPath()
+{
+    TPtrC imagesPath = PathInfo::ImagesPath();
+    return QString::fromUtf16(imagesPath.Ptr(), imagesPath.Length());
+}
+
+QString XQUtilsPrivate::picturesPath()
+{
+    TPtrC picturesPath = PathInfo::PicturesPath();
+    return QString::fromUtf16(picturesPath.Ptr(), picturesPath.Length());
+}
+
+QString XQUtilsPrivate::gmsPicturesPath()
+{
+    TPtrC gmsPicturesPath = PathInfo::GmsPicturesPath();
+    return QString::fromUtf16(gmsPicturesPath.Ptr(), gmsPicturesPath.Length());
+}
+
+QString XQUtilsPrivate::mmsBackgroundImagesPath()
+{
+    TPtrC mmsBackgroundImagesPath = PathInfo::MmsBackgroundImagesPath();
+    return QString::fromUtf16(mmsBackgroundImagesPath.Ptr(), mmsBackgroundImagesPath.Length());
+}
+
+QString XQUtilsPrivate::presenceLogosPath()
+{
+    TPtrC presenceLogosPath = PathInfo::PresenceLogosPath();
+    return QString::fromUtf16(presenceLogosPath.Ptr(), presenceLogosPath.Length());
+}
+
+QString XQUtilsPrivate::soundsPath()
+{
+    TPtrC soundsPath = PathInfo::SoundsPath();
+    return QString::fromUtf16(soundsPath.Ptr(), soundsPath.Length());
+}
+
+QString XQUtilsPrivate::digitalSoundsPath()
+{
+    TPtrC digitalSoundsPath = PathInfo::DigitalSoundsPath();
+    return QString::fromUtf16(digitalSoundsPath.Ptr(), digitalSoundsPath.Length());
+}
+
+QString XQUtilsPrivate::simpleSoundsPath()
+{
+    TPtrC simpleSoundsPath = PathInfo::SimpleSoundsPath();
+    return QString::fromUtf16(simpleSoundsPath.Ptr(), simpleSoundsPath.Length());
+}
+
+QString XQUtilsPrivate::imagesThumbnailPath()
+{
+    TPtrC imagesThumbnailPath = PathInfo::ImagesThumbnailPath();
+    return QString::fromUtf16(imagesThumbnailPath.Ptr(), imagesThumbnailPath.Length());
+}
+
+QString XQUtilsPrivate::memoryCardContactsPath()
+{
+    TPtrC memoryCardContactsPath = PathInfo::MemoryCardContactsPath();
+    return QString::fromUtf16(memoryCardContactsPath.Ptr(), memoryCardContactsPath.Length());
+}
+
+XQUtils::Error XQUtilsPrivate::error() const
+{
+    switch (iError)
+    {
+        case KErrNone:
+            return XQUtils::NoError;
+        case KErrNoMemory:
+            return XQUtils::OutOfMemoryError;
+        case KUserCancel:
+            return XQUtils::UserCancelledError;
+        default:
+            return XQUtils::UnknownError;
+    }
+}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobileextensions/src/utils/xqutils_p.h	Tue Aug 31 16:02:37 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef XQUTILS_P_H
+#define XQUTILS_P_H
+
+// INCLUDES
+#include <exception>
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class XQUtils;
+class CDocumentHandler;
+
+// CLASS DECLARATION
+class XQUtilsPrivate: public CBase
+{
+public:
+    XQUtilsPrivate(XQUtils* utils);
+    ~XQUtilsPrivate();
+
+    bool launchFile(const QString& filename);
+    void resetInactivityTime();
+
+    static QString romRootPath();
+    static QString phoneMemoryRootPath();
+    static QString memoryCardRootPath();
+    static QString gamesPath();
+    static QString installsPath();
+    static QString othersPath();
+    static QString videosPath();
+    static QString imagesPath();
+    static QString picturesPath(); 
+    static QString gmsPicturesPath();
+    static QString mmsBackgroundImagesPath();
+    static QString presenceLogosPath();
+    static QString soundsPath();
+    static QString digitalSoundsPath();
+    static QString simpleSoundsPath();
+    static QString imagesThumbnailPath();
+    static QString memoryCardContactsPath();
+
+    XQUtils::Error error() const;
+
+private:
+    CDocumentHandler* iDocHandler;
+    XQUtils* q;
+    int iError;
+};
+
+#endif /*XQUTILS_P_H*/
+
+// End of file
--- a/qtmobility/INSTALL.txt	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Please refer to installation.html under doc/html.
--- a/qtmobility/LGPL_EXCEPTION.txt	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-Nokia Qt LGPL Exception version 1.1
-
-As an additional permission to the GNU Lesser General Public License version
-2.1, the object code form of a "work that uses the Library" may incorporate
-material from a header file that is part of the Library.  You may distribute
-such object code under terms of your choice, provided that:
-    (i)   the header files of the Library have not been modified; and 
-    (ii)  the incorporated material is limited to numerical parameters, data
-          structure layouts, accessors, macros, inline functions and
-          templates; and
-    (iii) you comply with the terms of Section 6 of the GNU Lesser General
-          Public License version 2.1.
-
-Moreover, you may apply this exception to a modified version of the Library,
-provided that such modification does not involve copying material from the
-Library into the modified Library's header files unless such material is
-limited to (i) numerical parameters; (ii) data structure layouts;
-(iii) accessors; and (iv) small macros, templates and inline functions of
-five lines or less in length.
-
-Furthermore, you are not required to apply this additional permission to a
-modified version of the Library.
--- a/qtmobility/LICENSE.LGPL	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,504 +0,0 @@
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
--- a/qtmobility/LICENSE.PREVIEW.COMMERCIAL	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,629 +0,0 @@
-TECHNOLOGY PREVIEW LICENSE AGREEMENT
-
-For individuals and/or legal entities resident in the Americas (North
-America, Central America and South America), the applicable licensing
-terms are specified under the heading "Technology Preview License 
-Agreement: The Americas".
-
-For individuals and/or legal entities not resident in The Americas, the
-applicable licensing terms are specified under the heading "Technology 
-Preview License Agreement: Rest of the World". 
-
-
-TECHNOLOGY PREVIEW LICENSE AGREEMENT: The Americas
-Agreement version 2.4
-
-This Technology Preview License Agreement ("Agreement") is a legal
-agreement between Nokia Inc. ("Nokia"), with its registered office at
-102 Corporate Park Drive, White Plains, N.Y., U.S.A. 10604 and you (either an
-individual or a legal entity) ("Licensee") for the Licensed Software (as
-defined below). 
-
-1. DEFINITIONS
-
-"Affiliate" of a Party shall mean an entity (i) which is directly or
-indirectly controlling such Party; (ii) which is under the same direct
-or indirect ownership or control as such Party; or (iii) which is
-directly or indirectly owned or controlled by such Party. For these
-purposes, an entity shall be treated as being controlled by another if
-that other entity has fifty percent (50 %) or more of the votes in such
-entity, is able to direct its affairs and/or to control the composition
-of its board of directors or equivalent body. 
-
-"Applications" shall mean Licensee's software products created using the
-Licensed Software which may include portions of the Licensed Software.
-
-"Term" shall mean the period of time six (6) months from the later of
-(a) the Effective Date; or (b) the date the Licensed Software was
-initially delivered to Licensee by Nokia. If no specific Effective Date
-is set forth in the Agreement, the Effective Date shall be deemed to be
-the date the Licensed Software was initially delivered to Licensee. 
-
-"Licensed Software" shall mean the computer software, "online" or
-electronic documentation, associated media and printed materials,
-including the source code, example programs and the documentation
-delivered by Nokia to Licensee in conjunction with this Agreement. 
-
-"Party" or "Parties" shall mean Licensee and/or Nokia.
-
-
-2. OWNERSHIP
-
-The Licensed Software is protected by copyright laws and international
-copyright treaties, as well as other intellectual property laws and
-treaties. The Licensed Software is licensed, not sold. 
-
-If Licensee provides any findings, proposals, suggestions or other
-feedback ("Feedback") to Nokia regarding the Licensed Software, Nokia
-shall own all right, title and interest including the intellectual
-property rights in and to such Feedback, excluding however any existing
-patent rights of Licensee. To the extent Licensee owns or controls any
-patents for such Feedback Licensee hereby grants to Nokia and its
-Affiliates, a worldwide, perpetual, non-transferable, sublicensable,
-royalty-free license to (i) use, copy and modify Feedback and to create
-derivative works thereof, (ii) to make (and have made), use, import,
-sell, offer for sale, lease, dispose, offer for disposal or otherwise
-exploit any products or services of Nokia containing Feedback,, and
-(iii) sublicense all the foregoing rights to third party licensees and
-customers of Nokia and/or its Affiliates. 
-
-
-3. VALIDITY OF THE AGREEMENT
-
-By installing, copying, or otherwise using the Licensed Software,
-Licensee agrees to be bound by the terms of this Agreement. If Licensee
-does not agree to the terms of this Agreement, Licensee may not install,
-copy, or otherwise use the Licensed Software. Upon Licensee's acceptance
-of the terms and conditions of this Agreement, Nokia grants Licensee the
-right to use the Licensed Software in the manner provided below. 
-
-
-4. LICENSES
-
-4.1. Using and Copying
-
-Nokia grants to Licensee a non-exclusive, non-transferable, time-limited
-license to use and copy the Licensed Software for sole purpose of
-designing, developing and testing Applications, and evaluating and the 
-Licensed Software during the Term. 
-
-Licensee may install copies of the Licensed Software on an unlimited
-number of computers provided that (a) if an individual, only such
-individual; or (b) if a legal entity only its employees; use the
-Licensed Software for the authorized purposes. 
-
-4.2	No Distribution or Modifications
-
-Licensee may not disclose, modify, sell, market, commercialise,
-distribute, loan, rent, lease, or license the Licensed Software or any
-copy of it or use the Licensed Software for any purpose that is not
-expressly granted in this Section 4. Licensee may not alter or remove
-any details of ownership, copyright, trademark or other property right
-connected with the Licensed Software. Licensee may not distribute any
-software statically or dynamically linked with the Licensed Software. 
-
-4.3 No Technical Support
-
-Nokia has no obligation to furnish Licensee with any technical support
-whatsoever. Any such support is subject to separate agreement between
-the Parties. 
-
-
-5. PRE-RELEASE CODE
-The Licensed Software contains pre-release code that is not at the level
-of performance and compatibility of a final, generally available,
-product offering. The Licensed Software may not operate correctly and
-may be substantially modified prior to the first commercial product
-release, if any. Nokia is not obligated to make this or any later
-version of the Licensed Software commercially available. The License
-Software is "Not for Commercial Use" and may only be used for the
-purposes described in Section 4. The Licensed Software may not be used
-in a live operating environment where it may be relied upon to perform
-in the same manner as a commercially released product or with data that
-has not been sufficiently backed up. 
-
-6. THIRD PARTY SOFTWARE
-
-The Licensed Software may provide links to third party libraries or code
-(collectively "Third Party Software") to implement various functions.
-Third Party Software does not comprise part of the Licensed Software. In
-some cases, access to Third Party Software may be included along with
-the Licensed Software delivery as a convenience for development and
-testing only. Such source code and libraries may be listed in the
-".../src/3rdparty" source tree delivered with the Licensed Software or
-documented in the Licensed Software where the Third Party Software is
-used, as may be amended from time to time, do not comprise the Licensed
-Software. Licensee acknowledges (1) that some part of Third Party
-Software may require additional licensing of copyright and patents from
-the owners of such, and (2) that distribution of any of the Licensed
-Software referencing any portion of a Third Party Software may require
-appropriate licensing from such third parties. 
-
-
-7. LIMITED WARRANTY AND WARRANTY DISCLAIMER
-
-The Licensed Software is licensed to Licensee "as is". To the maximum
-extent permitted by applicable law, Nokia on behalf of itself and its
-suppliers, disclaims all warranties and conditions, either express or
-implied, including, but not limited to, implied warranties of
-merchantability, fitness for a particular purpose, title and
-non-infringement with regard to the Licensed Software. 
-
-
-8. LIMITATION OF LIABILITY 
-
-If, Nokia's warranty disclaimer notwithstanding, Nokia is held liable to
-Licensee, whether in contract, tort or any other legal theory, based on
-the Licensed Software, Nokia's entire liability to Licensee and
-Licensee's exclusive remedy shall be, at Nokia's option, either (A)
-return of the price Licensee paid for the Licensed Software, or (B)
-repair or replacement of the Licensed Software, provided Licensee
-returns to Nokia all copies of the Licensed Software as originally
-delivered to Licensee. Nokia shall not under any circumstances be liable
-to Licensee based on failure of the Licensed Software if the failure
-resulted from accident, abuse or misapplication, nor shall Nokia under
-any circumstances be liable for special damages, punitive or exemplary
-damages, damages for loss of profits or interruption of business or for
-loss or corruption of data. Any award of damages from Nokia to Licensee
-shall not exceed the total amount Licensee has paid to Nokia in
-connection with this Agreement. 
-
-
-9.	CONFIDENTIALITY
-
-Each party acknowledges that during the Term of this Agreement it shall
-have access to information about the other party's business, business
-methods, business plans, customers, business relations, technology, and
-other information, including the terms of this Agreement, that is
-confidential and of great value to the other party, and the value of
-which would be significantly reduced if disclosed to third parties (the
-"Confidential Information"). Accordingly, when a party (the "Receiving
-Party") receives Confidential Information from another party (the
-"Disclosing Party"), the Receiving Party shall, and shall obligate its
-employees and agents and employees and agents of its Affiliates to: (i)
-maintain the Confidential Information in strict confidence; (ii) not
-disclose the Confidential Information to a third party without the
-Disclosing Party's prior written approval; and (iii) not, directly or
-indirectly, use the Confidential Information for any purpose other than
-for exercising its rights and fulfilling its responsibilities pursuant
-to this Agreement. Each party shall take reasonable measures to protect
-the Confidential Information of the other party, which measures shall
-not be less than the measures taken by such party to protect its own
-confidential and proprietary information. 
-
-"Confidential Information" shall not include information that (a) is or
-becomes generally known to the public through no act or omission of the
-Receiving Party; (b) was in the Receiving Party's lawful possession
-prior to the disclosure hereunder and was not subject to limitations on
-disclosure or use; (c) is developed by the Receiving Party without
-access to the Confidential Information of the Disclosing Party or by
-persons who have not had access to the Confidential Information of the
-Disclosing Party as proven by the written records of the Receiving
-Party; (d) is lawfully disclosed to the Receiving Party without
-restrictions, by a third party not under an obligation of
-confidentiality; or (e) the Receiving Party is legally compelled to
-disclose the information, in which case the Receiving Party shall assert
-the privileged and confidential nature of the information and cooperate
-fully with the Disclosing Party to protect against and prevent
-disclosure of any Confidential Information and to limit the scope of
-disclosure and the dissemination of disclosed Confidential Information
-by all legally available means. 
-
-The obligations of the Receiving Party under this Section shall continue
-during the Initial Term and for a period of five (5) years after
-expiration or termination of this Agreement. To the extent that the
-terms of the Non-Disclosure Agreement between Nokia and Licensee
-conflict with the terms of this Section 9, this Section 9 shall be
-controlling over the terms of the Non-Disclosure Agreement. 
-
-
-10. GENERAL PROVISIONS
-
-10.1	No Assignment
-
-Licensee shall not be entitled to assign or transfer all or any of its
-rights, benefits and obligations under this Agreement without the prior
-written consent of Nokia, which shall not be unreasonably withheld. 
-
-10.2 	Termination
-
-Nokia may terminate the Agreement at any time immediately upon written
-notice by Nokia to Licensee if Licensee breaches this Agreement. 
-
-Upon termination of this Agreement, Licensee shall return to Nokia all
-copies of Licensed Software that were supplied by Nokia. All other
-copies of Licensed Software in the possession or control of Licensee
-must be erased or destroyed. An officer of Licensee must promptly
-deliver to Nokia a written confirmation that this has occurred. 
-
-10.3	Surviving Sections 
-
-Any terms and conditions that by their nature or otherwise reasonably
-should survive a cancellation or termination of this Agreement shall
-also be deemed to survive. Such terms and conditions include, but are
-not limited to the following Sections: 2, 5, 6, 7, 8, 9, 10.2, 10.3, 10.4,
-10.5, 10.6, 10.7, and 10.8 of this Agreement. 
-
-10.4	Entire Agreement 
-
-This Agreement constitutes the complete agreement between the parties
-and supersedes all prior or contemporaneous discussions,
-representations, and proposals, written or oral, with respect to the
-subject matters discussed herein, with the exception of the
-non-disclosure agreement executed by the parties in connection with this
-Agreement ("Non-Disclosure Agreement"), if any, shall be subject to
-Section 9. No modification of this Agreement shall be effective unless
-contained in a writing executed by an authorized representative of each
-party. No term or condition contained in Licensee's purchase order shall
-apply unless expressly accepted by Nokia in writing. If any provision of
-the Agreement is found void or unenforceable, the remainder shall remain
-valid and enforceable according to its terms. If any remedy provided is
-determined to have failed for its essential purpose, all limitations of
-liability and exclusions of damages set forth in this Agreement shall
-remain in effect. 
-
-10.5	Export Control
-
-Licensee acknowledges that the Licensed Software may be subject to
-export control restrictions of various countries. Licensee shall fully
-comply with all applicable export license restrictions and requirements
-as well as with all laws and regulations relating to the importation of
-the Licensed Software and shall procure all necessary governmental
-authorizations, including without limitation, all necessary licenses,
-approvals, permissions or consents, where necessary for the
-re-exportation of the Licensed Software., 
-
-10.6	Governing Law and Legal Venue
-
-This Agreement shall be governed by and construed in accordance with the
-federal laws of the United States of America and the internal laws of
-the State of New York without given effect to any choice of law rule
-that would result in the application of the laws of any other
-jurisdiction. The United Nations Convention on Contracts for the
-International Sale of Goods (CISG) shall not apply. Each Party (a)
-hereby irrevocably submits itself to and consents to the jurisdiction of
-the United States District Court for the Southern District of New York
-(or if such court lacks jurisdiction, the state courts of the State of
-New York) for the purposes of any action, claim, suit or proceeding
-between the Parties in connection with any controversy, claim, or
-dispute arising out of or relating to this Agreement; and (b) hereby
-waives, and agrees not to assert by way of motion, as a defense or
-otherwise, in any such action, claim, suit or proceeding, any claim that
-is not personally subject to the jurisdiction of such court(s), that the
-action, claim, suit or proceeding is brought in an inconvenient forum or
-that the venue of the action, claim, suit or proceeding is improper.
-Notwithstanding the foregoing, nothing in this Section 9.6 is intended
-to, or shall be deemed to, constitute a submission or consent to, or
-selection of, jurisdiction, forum or venue for any action for patent
-infringement, whether or not such action relates to this Agreement. 
-
-10.7	No Implied License
-
-There are no implied licenses or other implied rights granted under this
-Agreement, and all rights, save for those expressly granted hereunder,
-shall remain with Nokia and its licensors. In addition, no licenses or
-immunities are granted to the combination of the Licensed Software with
-any other software or hardware not delivered by Nokia under this
-Agreement. 
-
-10.8	Government End Users 
- 
-A "U.S. Government End User" shall mean any agency or entity of the
-government of the United States. The following shall apply if Licensee
-is a U.S. Government End User. The Licensed Software is a "commercial
-item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995),
-consisting of "commercial computer software" and "commercial computer
-software documentation," as such terms are used in 48 C.F.R. 12.212
-(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
-through 227.7202-4 (June 1995), all U.S. Government End Users acquire
-the Licensed Software with only those rights set forth herein. The
-Licensed Software (including related documentation) is provided to U.S.
-Government End Users: (a) only as a commercial end item; and (b) only
-pursuant to this Agreement. 
-
-
-
-
-
-TECHNOLOGY PREVIEW LICENSE AGREEMENT: Rest of the World
-Agreement version 2.4
-
-This Technology Preview License Agreement ("Agreement") is a legal
-agreement between Nokia Corporation ("Nokia"), with its registered
-office at Keilalahdentie 4, 02150 Espoo, Finland and you (either an
-individual or a legal entity) ("Licensee") for the Licensed Software (as
-defined below). 
-
-1. DEFINITIONS
-
-"Affiliate" of a Party shall mean an entity (i) which is directly or
-indirectly controlling such Party; (ii) which is under the same direct
-or indirect ownership or control as such Party; or (iii) which is
-directly or indirectly owned or controlled by such Party. For these
-purposes, an entity shall be treated as being controlled by another if
-that other entity has fifty percent (50 %) or more of the votes in such
-entity, is able to direct its affairs and/or to control the composition
-of its board of directors or equivalent body. 
-
-"Applications" shall mean Licensee's software products created using the
-Licensed Software which may include portions of the Licensed Software.
-
-"Term" shall mean the period of time six (6) months from the later of
-(a) the Effective Date; or (b) the date the Licensed Software was
-initially delivered to Licensee by Nokia. If no specific Effective Date
-is set forth in the Agreement, the Effective Date shall be deemed to be
-the date the Licensed Software was initially delivered to Licensee. 
-
-"Licensed Software" shall mean the computer software, "online" or
-electronic documentation, associated media and printed materials,
-including the source code, example programs and the documentation
-delivered by Nokia to Licensee in conjunction with this Agreement. 
-
-"Party" or "Parties" shall mean Licensee and/or Nokia. 
-
-
-2. OWNERSHIP
-
-The Licensed Software is protected by copyright laws and international
-copyright treaties, as well as other intellectual property laws and
-treaties. The Licensed Software is licensed, not sold. 
-
-If Licensee provides any findings, proposals, suggestions or other
-feedback ("Feedback") to Nokia regarding the Licensed Software, Nokia
-shall own all right, title and interest including the intellectual
-property rights in and to such Feedback, excluding however any existing
-patent rights of Licensee. To the extent Licensee owns or controls any
-patents for such Feedback Licensee hereby grants to Nokia and its
-Affiliates, a worldwide, perpetual, non-transferable, sublicensable,
-royalty-free license to (i) use, copy and modify Feedback and to create
-derivative works thereof, (ii) to make (and have made), use, import,
-sell, offer for sale, lease, dispose, offer for disposal or otherwise
-exploit any products or services of Nokia containing Feedback,, and
-(iii) sublicense all the foregoing rights to third party licensees and
-customers of Nokia and/or its Affiliates. 
-
-3. VALIDITY OF THE AGREEMENT
-
-By installing, copying, or otherwise using the Licensed Software,
-Licensee agrees to be bound by the terms of this Agreement. If Licensee
-does not agree to the terms of this Agreement, Licensee may not install,
-copy, or otherwise use the Licensed Software. Upon Licensee's acceptance
-of the terms and conditions of this Agreement, Nokia grants Licensee the
-right to use the Licensed Software in the manner provided below. 
-
-
-4. LICENSES
-
-4.1. Using and Copying
-
-Nokia grants to Licensee a non-exclusive, non-transferable, time-limited
-license to use and copy the Licensed Software for sole purpose of
-designing, developing and testing Applications, and evaluating and the 
-Licensed Software during the Term. 
-
-Licensee may install copies of the Licensed Software on an unlimited
-number of computers provided that (a) if an individual, only such
-individual; or (b) if a legal entity only its employees; use the
-Licensed Software for the authorized purposes. 
-
-4.2	No Distribution or Modifications
-
-Licensee may not disclose, modify, sell, market, commercialise,
-distribute, loan, rent, lease, or license the Licensed Software or any
-copy of it or use the Licensed Software for any purpose that is not
-expressly granted in this Section 4. Licensee may not alter or remove
-any details of ownership, copyright, trademark or other property right
-connected with the Licensed Software. Licensee may not distribute any
-software statically or dynamically linked with the Licensed Software. 
-
-4.3 No Technical Support
-
-Nokia has no obligation to furnish Licensee with any technical support
-whatsoever. Any such support is subject to separate agreement between
-the Parties. 
-
-
-5. PRE-RELEASE CODE
-
-The Licensed Software contains pre-release code that is not at the level
-of performance and compatibility of a final, generally available,
-product offering. The Licensed Software may not operate correctly and
-may be substantially modified prior to the first commercial product
-release, if any. Nokia is not obligated to make this or any later
-version of the Licensed Software commercially available. The License
-Software is "Not for Commercial Use" and may only be used for the
-purposes described in Section 4. The Licensed Software may not be used
-in a live operating environment where it may be relied upon to perform
-in the same manner as a commercially released product or with data that
-has not been sufficiently backed up. 
-
-6. THIRD PARTY SOFTWARE
-
-The Licensed Software may provide links to third party libraries or code
-(collectively "Third Party Software") to implement various functions.
-Third Party Software does not comprise part of the Licensed Software. In
-some cases, access to Third Party Software may be included along with
-the Licensed Software delivery as a convenience for development and
-testing only. Such source code and libraries may be listed in the
-".../src/3rdparty" source tree delivered with the Licensed Software or
-documented in the Licensed Software where the Third Party Software is
-used, as may be amended from time to time, do not comprise the Licensed
-Software. Licensee acknowledges (1) that some part of Third Party
-Software may require additional licensing of copyright and patents from
-the owners of such, and (2) that distribution of any of the Licensed
-Software referencing any portion of a Third Party Software may require
-appropriate licensing from such third parties. 
-
-
-7. LIMITED WARRANTY AND WARRANTY DISCLAIMER
-
-The Licensed Software is licensed to Licensee "as is". To the maximum
-extent permitted by applicable law, Nokia on behalf of itself and its
-suppliers, disclaims all warranties and conditions, either express or
-implied, including, but not limited to, implied warranties of
-merchantability, fitness for a particular purpose, title and
-non-infringement with regard to the Licensed Software. 
-
-
-8. LIMITATION OF LIABILITY 
-
-If, Nokia's warranty disclaimer notwithstanding, Nokia is held liable to
-Licensee, whether in contract, tort or any other legal theory, based on
-the Licensed Software, Nokia's entire liability to Licensee and
-Licensee's exclusive remedy shall be, at Nokia's option, either (A)
-return of the price Licensee paid for the Licensed Software, or (B)
-repair or replacement of the Licensed Software, provided Licensee
-returns to Nokia all copies of the Licensed Software as originally
-delivered to Licensee. Nokia shall not under any circumstances be liable
-to Licensee based on failure of the Licensed Software if the failure
-resulted from accident, abuse or misapplication, nor shall Nokia under
-any circumstances be liable for special damages, punitive or exemplary
-damages, damages for loss of profits or interruption of business or for
-loss or corruption of data. Any award of damages from Nokia to Licensee
-shall not exceed the total amount Licensee has paid to Nokia in
-connection with this Agreement. 
-
-
-9.	CONFIDENTIALITY
-
-Each party acknowledges that during the Term of this Agreement it shall
-have access to information about the other party's business, business
-methods, business plans, customers, business relations, technology, and
-other information, including the terms of this Agreement, that is
-confidential and of great value to the other party, and the value of
-which would be significantly reduced if disclosed to third parties (the
-"Confidential Information"). Accordingly, when a party (the "Receiving
-Party") receives Confidential Information from another party (the
-"Disclosing Party"), the Receiving Party shall, and shall obligate its
-employees and agents and employees and agents of its Affiliates to: (i)
-maintain the Confidential Information in strict confidence; (ii) not
-disclose the Confidential Information to a third party without the
-Disclosing Party's prior written approval; and (iii) not, directly or
-indirectly, use the Confidential Information for any purpose other than
-for exercising its rights and fulfilling its responsibilities pursuant
-to this Agreement. Each party shall take reasonable measures to protect
-the Confidential Information of the other party, which measures shall
-not be less than the measures taken by such party to protect its own
-confidential and proprietary information. 
-
-"Confidential Information" shall not include information that (a) is or
-becomes generally known to the public through no act or omission of the
-Receiving Party; (b) was in the Receiving Party's lawful possession
-prior to the disclosure hereunder and was not subject to limitations on
-disclosure or use; (c) is developed by the Receiving Party without
-access to the Confidential Information of the Disclosing Party or by
-persons who have not had access to the Confidential Information of the
-Disclosing Party as proven by the written records of the Receiving
-Party; (d) is lawfully disclosed to the Receiving Party without
-restrictions, by a third party not under an obligation of
-confidentiality; or (e) the Receiving Party is legally compelled to
-disclose the information, in which case the Receiving Party shall assert
-the privileged and confidential nature of the information and cooperate
-fully with the Disclosing Party to protect against and prevent
-disclosure of any Confidential Information and to limit the scope of
-disclosure and the dissemination of disclosed Confidential Information
-by all legally available means. 
-
-The obligations of the Receiving Party under this Section shall continue
-during the Initial Term and for a period of five (5) years after
-expiration or termination of this Agreement. To the extent that the
-terms of the Non-Disclosure Agreement between Nokia and Licensee
-conflict with the terms of this Section 9, this Section 9 shall be
-controlling over the terms of the Non-Disclosure Agreement. 
-
-
-10. GENERAL PROVISIONS
-
-10.1	No Assignment
-
-Licensee shall not be entitled to assign or transfer all or any of its
-rights, benefits and obligations under this Agreement without the prior
-written consent of Nokia, which shall not be unreasonably withheld. 
-
-10.2 	Termination
-
-Nokia may terminate the Agreement at any time immediately upon written
-notice by Nokia to Licensee if Licensee breaches this Agreement. 
-
-Upon termination of this Agreement, Licensee shall return to Nokia all
-copies of Licensed Software that were supplied by Nokia. All other
-copies of Licensed Software in the possession or control of Licensee
-must be erased or destroyed. An officer of Licensee must promptly
-deliver to Nokia a written confirmation that this has occurred. 
-
-10.3	Surviving Sections 
-
-Any terms and conditions that by their nature or otherwise reasonably
-should survive a cancellation or termination of this Agreement shall
-also be deemed to survive. Such terms and conditions include, but are
-not limited to the following Sections: 2, 5, 6, 7, 8, 9, 10.2, 10.3, 10.4,
-10.5, 10.6, 10.7, and 10.8 of this Agreement. 
-
-10.4	Entire Agreement 
-
-This Agreement constitutes the complete agreement between the parties
-and supersedes all prior or contemporaneous discussions,
-representations, and proposals, written or oral, with respect to the
-subject matters discussed herein, with the exception of the
-non-disclosure agreement executed by the parties in connection with this
-Agreement ("Non-Disclosure Agreement"), if any, shall be subject to
-Section 9. No modification of this Agreement shall be effective unless
-contained in a writing executed by an authorized representative of each
-party. No term or condition contained in Licensee's purchase order shall
-apply unless expressly accepted by Nokia in writing. If any provision of
-the Agreement is found void or unenforceable, the remainder shall remain
-valid and enforceable according to its terms. If any remedy provided is
-determined to have failed for its essential purpose, all limitations of
-liability and exclusions of damages set forth in this Agreement shall
-remain in effect. 
-
-10.5	Export Control
-
-Licensee acknowledges that the Licensed Software may be subject to
-export control restrictions of various countries. Licensee shall fully
-comply with all applicable export license restrictions and requirements
-as well as with all laws and regulations relating to the importation of
-the Licensed Software and shall procure all necessary governmental
-authorizations, including without limitation, all necessary licenses,
-approvals, permissions or consents, where necessary for the
-re-exportation of the Licensed Software., 
-
-10.6	Governing Law and Legal Venue
-
-This Agreement shall be construed and interpreted in accordance with the
-laws of Finland, excluding its choice of law provisions. Any disputes
-arising out of or relating to this Agreement shall be resolved in
-arbitration under the Rules of Arbitration of the Chamber of Commerce of
-Helsinki, Finland. The arbitration tribunal shall consist of one (1), or
-if either Party so requires, of three (3), arbitrators. The award shall
-be final and binding and enforceable in any court of competent
-jurisdiction. The arbitration shall be held in Helsinki, Finland and the
-process shall be conducted in the English language. 
-
-10.7	No Implied License
-
-There are no implied licenses or other implied rights granted under this
-Agreement, and all rights, save for those expressly granted hereunder,
-shall remain with Nokia and its licensors. In addition, no licenses or
-immunities are granted to the combination of the Licensed Software with
-any other software or hardware not delivered by Nokia under this
-Agreement. 
-
-10.8	Government End Users 
- 
-A "U.S. Government End User" shall mean any agency or entity of the
-government of the United States. The following shall apply if Licensee
-is a U.S. Government End User. The Licensed Software is a "commercial
-item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995),
-consisting of "commercial computer software" and "commercial computer
-software documentation," as such terms are used in 48 C.F.R. 12.212
-(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
-through 227.7202-4 (June 1995), all U.S. Government End Users acquire
-the Licensed Software with only those rights set forth herein. The
-Licensed Software (including related documentation) is provided to U.S.
-Government End Users: (a) only as a commercial end item; and (b) only
-pursuant to this Agreement. 
-
-
-
-
--- a/qtmobility/bin/pathhelper	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-#!/usr/bin/perl
-#############################################################################
-##
-## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
-##
-## This file is part of the Qt Mobility Components.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## No Commercial Usage
-## This file contains pre-release code and may not be distributed.
-## You may use this file in accordance with the terms and conditions
-## contained in the Technology Preview License Agreement accompanying
-## this package.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL included in the
-## packaging of this file.  Please review the following information to
-## ensure the GNU Lesser General Public License version 2.1 requirements
-## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## In addition, as a special exception, Nokia gives you certain additional
-## rights.  These rights are described in the Nokia Qt LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## If you have questions regarding the use of this file, please contact
-## Nokia at qt-info@nokia.com.
-##
-##
-##
-##
-##
-##
-##
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-use strict;
-use warnings;
-use Cwd;
-use Cwd "abs_path";
-
-my $path = shift(@ARGV) or usage();
-my $resolvedpath = abs_path($path);
-print "$resolvedpath\n";
-
-exit 0;
-
-sub usage
-{
-    warn " Usage:  pathhelper <path>\n";
-    warn "         Converts <path> to an absolute path and returns it to the caller\n";
-    exit 2;
-}
--- a/qtmobility/bin/purge.sh	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-#!/bin/bash
-#############################################################################
-##
-## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
-##
-## This file is part of the Qt Mobility Components.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## No Commercial Usage
-## This file contains pre-release code and may not be distributed.
-## You may use this file in accordance with the terms and conditions
-## contained in the Technology Preview License Agreement accompanying
-## this package.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL included in the
-## packaging of this file.  Please review the following information to
-## ensure the GNU Lesser General Public License version 2.1 requirements
-## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## In addition, as a special exception, Nokia gives you certain additional
-## rights.  These rights are described in the Nokia Qt LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## If you have questions regarding the use of this file, please contact
-## Nokia at qt-info@nokia.com.
-##
-##
-##
-##
-##
-##
-##
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-make clean
-rm -f config.pri
-find . -name "Makefile*" |xargs rm
-rm -rf build include install bin/examples lib
--- a/qtmobility/bin/rununittests.bat	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-::
-:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-:: All rights reserved.
-:: Contact: Nokia Corporation (qt-info@nokia.com)
-::
-:: This file is part of the Qt Mobility Components.
-::
-:: $QT_BEGIN_LICENSE:LGPL$
-:: No Commercial Usage
-:: This file contains pre-release code and may not be distributed.
-:: You may use this file in accordance with the terms and conditions
-:: contained in the Technology Preview License Agreement accompanying
-:: this package.
-::
-:: GNU Lesser General Public License Usage
-:: Alternatively, this file may be used under the terms of the GNU Lesser
-:: General Public License version 2.1 as published by the Free Software
-:: Foundation and appearing in the file LICENSE.LGPL included in the
-:: packaging of this file.  Please review the following information to
-:: ensure the GNU Lesser General Public License version 2.1 requirements
-:: will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-::
-:: In addition, as a special exception, Nokia gives you certain additional
-:: rights.  These rights are described in the Nokia Qt LGPL Exception
-:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-::
-:: If you have questions regarding the use of this file, please contact
-:: Nokia at qt-info@nokia.com.
-::
-::
-::
-::
-::
-::
-::
-::
-:: $QT_END_LICENSE$
-::
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
-set SAVED_PWD="%CD%"
-set BATCH_PATH=%~dp0
-
-set PATH=%BATCH_PATH%..\lib;%PATH%
-
-cd %BATCH_PATH%..\build\tests\bin
-
-::BearerManagement
-tst_qnetworkconfiguration.exe
-tst_qnetworkconfigurationmanager.exe
-tst_qnetworksession.exe
-
-cd %SAVED_PWD%
-
--- a/qtmobility/bin/rununittests.sh	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-#!/bin/bash
-#############################################################################
-##
-## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
-##
-## This file is part of the Qt Mobility Components.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## No Commercial Usage
-## This file contains pre-release code and may not be distributed.
-## You may use this file in accordance with the terms and conditions
-## contained in the Technology Preview License Agreement accompanying
-## this package.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL included in the
-## packaging of this file.  Please review the following information to
-## ensure the GNU Lesser General Public License version 2.1 requirements
-## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## In addition, as a special exception, Nokia gives you certain additional
-## rights.  These rights are described in the Nokia Qt LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## If you have questions regarding the use of this file, please contact
-## Nokia at qt-info@nokia.com.
-##
-##
-##
-##
-##
-##
-##
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-#convenient script to execute all unit tests
-
-shell=`readlink -f "$0"`;
-shell_path=`dirname $shell`;
-
-SAVED_PWD=$PWD;
-if [ ! -d "$shell_path/../build/tests/bin" ]; then
-    echo -e 'Unit tests have not been built.'
-    echo -e 'Please run configure with the -tests switch.'
-    exit
-fi
-cd $shell_path/../build/tests/bin
-
-#LD_LIBRARY_PATH=$shell_path/../lib:$LD_LIBRARY_PATH
-
-#BearerManagement
-./tst_qnetworkconfiguration
-./tst_qnetworkconfigurationmanager
-./tst_qnetworksession
-
-cd $SAVED_PWD
-
Binary file qtmobility/bin/servicedbgen has changed
Binary file qtmobility/bin/servicedbgen.exe has changed
--- a/qtmobility/bin/syncheaders	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#!/usr/bin/perl
-#############################################################################
-##
-## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
-##
-## This file is part of the Qt Mobility Components.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## No Commercial Usage
-## This file contains pre-release code and may not be distributed.
-## You may use this file in accordance with the terms and conditions
-## contained in the Technology Preview License Agreement accompanying
-## this package.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL included in the
-## packaging of this file.  Please review the following information to
-## ensure the GNU Lesser General Public License version 2.1 requirements
-## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## In addition, as a special exception, Nokia gives you certain additional
-## rights.  These rights are described in the Nokia Qt LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## If you have questions regarding the use of this file, please contact
-## Nokia at qt-info@nokia.com.
-##
-##
-##
-##
-##
-##
-##
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-use strict;
-use warnings;
-
-use File::Basename;
-use File::stat;
-use File::Path;
-
-my $allow_non_exported = 1;
-if ( @ARGV && $ARGV[0] eq "-needs-export" ) {
-    shift(@ARGV);
-    $allow_non_exported = 0;
-}
-
-my $outdir = shift(@ARGV) or usage();
-mkpath($outdir);
-
-my $indir = shift(@ARGV) or usage();
-processFile($indir);
-
-exit 0;
-
-sub usage
-{
-    print "Usage:  syncheaders [-needs-export] outdir indir\n";
-    print "        Processes all public header files <indir>\n";
-    exit 2;
-}
-
-sub processFile
-{
-    my ( $read_dir ) = @_;
-    my @allFiles;
-    my $filename;
-
-    opendir( THISDIR, $read_dir) or die "Can't read $read_dir";
-    #process all header files
-    @allFiles = grep /\.h/,  readdir THISDIR;
-    #don't include private headers
-    @allFiles = grep !/_p\.h/, @allFiles;
-
-    for $filename (@allFiles) {
-        open INPUT, "$indir/$filename" or die "Can't read $filename";
-
-        my $src_s = stat("$indir/$filename");
-        my $now = $src_s->mtime;
-
-        while (<INPUT>) {
-            if ( /^\s*class\s+.*_EXPORT\s+([^\s:]+)/ ||
-                 ($allow_non_exported && /^\s*class\s+([^\s:<]+)/ && index($_, ";") == -1) ||
-                 /syncqtopia\s+header\s+([^\s:]+)/ )
-            {
-                # Skip preprocessor-related items
-                next if ( $1 =~ /#/ );
-
-                my $outfile = "$outdir/$1";
-
-                print "Create header $outfile\n";
-
-                #system("install", "-m", "0644", $filename, $outfile);
-                open OUT, ">$outfile" or die "Can't write $outfile";
-                print OUT "#include \"".basename($filename)."\"\n";
-                close OUT;
-            }
-        }
-        close INPUT;
-    }
-}
-
--- a/qtmobility/bin/syncheaders.bat	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-::
-:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-:: All rights reserved.
-:: Contact: Nokia Corporation (qt-info@nokia.com)
-::
-:: This file is part of the Qt Mobility Components.
-::
-:: $QT_BEGIN_LICENSE:LGPL$
-:: No Commercial Usage
-:: This file contains pre-release code and may not be distributed.
-:: You may use this file in accordance with the terms and conditions
-:: contained in the Technology Preview License Agreement accompanying
-:: this package.
-::
-:: GNU Lesser General Public License Usage
-:: Alternatively, this file may be used under the terms of the GNU Lesser
-:: General Public License version 2.1 as published by the Free Software
-:: Foundation and appearing in the file LICENSE.LGPL included in the
-:: packaging of this file.  Please review the following information to
-:: ensure the GNU Lesser General Public License version 2.1 requirements
-:: will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-::
-:: In addition, as a special exception, Nokia gives you certain additional
-:: rights.  These rights are described in the Nokia Qt LGPL Exception
-:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-::
-:: If you have questions regarding the use of this file, please contact
-:: Nokia at qt-info@nokia.com.
-::
-::
-::
-::
-::
-::
-::
-::
-:: $QT_END_LICENSE$
-::
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- a/qtmobility/common.pri	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-######################################################################
-#
-# Mobility API project - common QMake settings
-#
-######################################################################
-
-
-CONFIG(debug, debug|release) {
-    WAS_IN_DEBUG=debug
-} else {
-    WAS_IN_DEBUG=release
-}
-
-include(staticconfig.pri)
-
-symbian:contains(symbian_symbols_unfrozen,1) {
-    #see configure.bat for details
-    MMP_RULES+="EXPORTUNFROZEN"
-}
-
-mac {
-    contains(QT_CONFIG, qt_framework):contains(TEMPLATE, lib) {
-        #MacOSX always builds debug and release libs when using mac framework
-        CONFIG+=$$WAS_IN_DEBUG
-        CONFIG += debug_and_release build_all
-    } else {
-        !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) {
-            CONFIG -= debug_and_release debug release
-            contains(QT_CONFIG,debug): CONFIG+=debug
-            contains(QT_CONFIG,release): CONFIG+=release
-        }
-    }
-}
-
-#In Windows we want to build libraries in debug and release mode if the user
-#didn't select a version - if Qt is build in debug_and_release
-#this avoids problems for third party as qmake build debug by default
-#If mobility selected debug_and_release but Qt only supports
-#one version but not the other we slently disable the impossible combination
-win32:contains(CONFIG_WIN32,build_all) {
-    contains(QT_CONFIG,debug):contains(QT_CONFIG,release) {
-        contains(TEMPLATE,.*lib):!plugin {
-            CONFIG += $$WAS_IN_DEBUG
-            CONFIG += debug_and_release build_all
-        }
-    } else {
-        CONFIG -= debug_and_release debug release
-        contains(QT_CONFIG,debug): CONFIG+=debug
-        contains(QT_CONFIG,release): CONFIG+=release
-    }
-}
-
-# Helper function.  This should move to a .prf file
-defineReplace(mobilityDeployFilename) {
-   unset(MOBILITY_DEPLOY_NAME)
-   MOBILITY_DEPLOY_NAME = $$1
-   CONFIG(debug, debug|release): {
-      mac:RET = $$member(MOBILITY_DEPLOY_NAME, 0)_debug
-      else:win32:RET = $$member(MOBILITY_DEPLOY_NAME, 0)d
-   }
-   isEmpty(RET):RET = $$MOBILITY_DEPLOY_NAME
-   return($$RET)
-}
-
-# Make sure this goes everywhere we need it
-symbian: load(data_caging_paths)
-
-
-# Figure out the root of where stuff should go (this could be done via configure)
-OUTPUT_DIR = $$QT_MOBILITY_BUILD_TREE
-SOURCE_DIR = $$PWD
-
-CONFIG(debug, debug|release) {
-    SUBDIRPART=Debug
-} else {
-    SUBDIRPART=Release
-}
-
-contains(QT_CONFIG, reduce_exports):CONFIG+=hide_symbols
-
-#export more symbols if we build the unit tests
-contains(build_unit_tests, yes):DEFINES+=QTM_BUILD_UNITTESTS
-
-#test whether we have a unit test
-!testcase {
-    OBJECTS_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET
-    !plugin {
-        contains(TEMPLATE,.*lib) {
-            DESTDIR = $$OUTPUT_DIR/lib
-            symbian:defFilePath=../s60installs
-#            VERSION = 1.0.2
-        } else {
-            DESTDIR = $$OUTPUT_DIR/bin
-        }
-    } else {
-        testplugin {
-            DESTDIR = $$OUTPUT_DIR/build/tests/bin/plugins/$$PLUGIN_TYPE 
-        } else {
-            #check that plugin_type is set or warn otherwise
-            isEmpty(PLUGIN_TYPE):message(PLUGIN_TYPE not specified - install rule may not work)
-            target.path=$${QT_MOBILITY_PLUGINS}/$${PLUGIN_TYPE}
-            INSTALLS += target
-        }
-    }
-
-    MOC_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/moc
-    RCC_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/rcc
-    UI_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/ui
-    QMAKE_RPATHDIR += $$QT_MOBILITY_LIB
-} else {
-    # Unit test code (no plugins! test plugins are just normal plugins installed elsewhere)
-    QT *= testlib
-    CONFIG += console
-    CONFIG -= app_bundle
-    OBJECTS_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET
-    DESTDIR = $$OUTPUT_DIR/build/tests/bin
-    MOC_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET/moc
-    RCC_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET/rcc
-    UI_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET/ui
-    QMAKE_RPATHDIR += $$OUTPUT_DIR/lib
-}
-
-contains(TEMPLATE,.*lib):DEFINES += QT_SHARED
-
-maemo6 {
-    DEFINES+= Q_WS_MAEMO_6
-    contains(TEMPLATE,.*app.*): QMAKE_LIB_FLAGS+= -Wl,-rpath-link $$[QT_INSTALL_LIBS]
-    QMAKE_LIB_FLAGS+= -Wl,-rpath-link $$[QT_INSTALL_LIBS]
-    QMAKE_RPATHDIR += $$[QT_INSTALL_LIBS]
-}
-maemo5 {
-    DEFINES+= Q_WS_MAEMO_5
-}
-
-wince* {
-    ### Bearer Management
-    BEARERLIB.sources = $$OUTPUT_DIR/lib/$$mobilityDeployFilename(QtBearer).dll
-    BEARERLIB.path = .
-    DEPLOYMENT += BEARERLIB
-
-    ### Contacts
-    # Main library
-    CONTACTS_DEPLOYMENT.sources = $$OUTPUT_DIR/lib/$$mobilityDeployFilename(QtContacts).dll
-    CONTACTS_DEPLOYMENT.path = /Windows
-
-    # Plugins
-    CONTACTS_PLUGINS_DEPLOYMENT.sources = $$OUTPUT_DIR/plugins/contacts/*.dll
-    CONTACTS_PLUGINS_DEPLOYMENT.path = plugins/contacts
-    DEPLOYMENT += CONTACTS_DEPLOYMENT CONTACTS_PLUGINS_DEPLOYMENT
-
-    ### Service Framework    
-    SFW_DEPLOYMENT.sources = $$OUTPUT_DIR/lib/$$mobilityDeployFilename(QtServiceFramework).dll
-    SFW_DEPLOYMENT.path = .
-    DEPLOYMENT += SFW_DEPLOYMENT
-    
-    ### Location
-    LOCATION.sources = $$OUTPUT_DIR/lib/$$mobilityDeployFilename(QtLocation).dll
-    LOCATION.path = .
-    DEPLOYMENT += LOCATION
-}
-
-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
-mac:contains(QT_CONFIG,qt_framework) {
-    #add framework option
-    ##contains(TEMPLATE, app)|contains(CONFIG,plugin):LIBS+=-F$$OUTPUT_DIR/lib
-    LIBS+=-F$$OUTPUT_DIR/lib
-}
-LIBS += -L$$OUTPUT_DIR/lib
-
-
-DEPENDPATH += . $$SOURCE_DIR
-INCLUDEPATH += $$SOURCE_DIR/src/global
-
-!symbian:!wince*:DEFINES += QTM_PLUGIN_PATH=\\\"$$replace(QT_MOBILITY_PLUGINS, \\\\, /)\\\"
--- a/qtmobility/config.pri	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-build_unit_tests = no 
-build_examples = no 
-build_docs = no 
-build_tools = no
-qmf_enabled = no 
-isEmpty($$QT_MOBILITY_INCLUDE):QT_MOBILITY_INCLUDE=$$QT_MOBILITY_PREFIX/include 
-isEmpty($$QT_MOBILITY_LIB):QT_MOBILITY_LIB=$$QT_MOBILITY_PREFIX/lib 
-isEmpty($$QT_MOBILITY_BIN):QT_MOBILITY_BIN=$$QT_MOBILITY_PREFIX/bin 
-isEmpty($$QT_MOBILITY_PLUGINS):QT_MOBILITY_PLUGINS=$$QT_MOBILITY_PREFIX/plugins 
-mobility_modules =  bearer   
-maemo5|maemo6:mobility_modules -= systeminfo 
-contains(mobility_modules,versit): mobility_modules *= contacts  
-lbt_enabled = yes 
-snap_enabled = yes 
-occ_enabled = yes 
-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 = no
-surfaces_s60_enabled = yes
-messaging_freestyle_enabled = yes
--- a/qtmobility/configure	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,548 +0,0 @@
-#!/bin/sh
-#############################################################################
-##
-## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
-##
-## This file is part of the Qt Mobility Components.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## No Commercial Usage
-## This file contains pre-release code and may not be distributed.
-## You may use this file in accordance with the terms and conditions
-## contained in the Technology Preview License Agreement accompanying
-## this package.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL included in the
-## packaging of this file.  Please review the following information to
-## ensure the GNU Lesser General Public License version 2.1 requirements
-## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## In addition, as a special exception, Nokia gives you certain additional
-## rights.  These rights are described in the Nokia Qt LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## If you have questions regarding the use of this file, please contact
-## Nokia at qt-info@nokia.com.
-##
-##
-##
-##
-##
-##
-##
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# return status of 1 if absolute path as first argument
-# also prints the return status
-isAbsPath() {
-    slash=$(echo $1 | cut -c 1)
-    if [ "$slash" != "/" ]; then
-        echo 0
-        return 0
-    fi
-    echo 1
-    return 1
-}
-
-# Returns the absolute path for $1 for target $2
-# as an example $2 might have value "maemo5".
-# This is required because when building in scratchbox for
-# maemo we do not want to follow symbolic links that are 
-# introduced by scratchbox
-absPath() {
-    if [ "$2" = "maemo5" -o "$2" = "maemo6" ]; then
-        if [ `isAbsPath $1` = '1' ]; then
-            echo $1;
-        else
-            echo >&2 "Relative prefix/bin/lib/header/plugin paths are not supported for Maemo"
-            exit 1;
-        fi
-    else
-        PATH=`$relpath/bin/pathhelper $1`
-        echo $PATH
-    fi
-}
-
-
-# the current directory (shadow build dir)
-shadowpath=`/bin/pwd`
-# the name of this script
-relconf=`basename $0`
-# the directory of this script is the "source tree"
-relpath=`dirname $0`
-relpath=`(cd "$relpath"; /bin/pwd)`
-
-CONFIG_IN="$shadowpath/config.in"
-QT_MOBILITY_PREFIX=$shadowpath/install
-QT_MOBILITY_INCLUDE=
-QT_MOBILITY_LIB=
-QT_MOBILITY_BIN=
-QT_MOBILITY_PLUGINS=
-BUILD_UNITTESTS=
-BUILD_EXAMPLES=
-BUILD_DOCS=yes
-BUILD_TOOLS=yes
-RELEASEMODE=
-BUILD_SILENT=
-LINUX_TARGET=
-QMAKE_CACHE="$shadowpath/.qmake.cache"
-LIB_PATH="lib"
-BIN_PATH="bin"
-PLUGIN_PATH="plugins"
-MAC_SDK=
-MOBILITY_MODULES="bearer location contacts multimedia publishsubscribe versit messaging systeminfo serviceframework sensors"
-MOBILITY_MODULES_UNPARSED=
-QMKSPEC=
-OS="other"
-
-usage() 
-{
-    echo "Usage: configure [-prefix <dir>] [headerdir <dir>] [libdir <dir>]"
-    echo "                 [-bindir <dir>] [-tests] [-examples] [-no-docs]"
-    echo "                 [-no-tools] [-debug] [-release] [-silent]"
-    echo "                 [-modules <list>]"
-    echo
-    echo "Options:"
-    echo
-    echo "-prefix <dir> ..... This will install everything relative to <dir>"
-    echo "                    (default prefix: $shadowpath/install)"
-    echo "-headerdir <dir> .. Header files will be installed to <dir>"
-    echo "                    (default prefix: PREFIX/include)"
-    echo "-libdir <dir> ..... Libraries will be installed to <dir>"
-    echo "                    (default PREFIX/lib)"
-    echo "-bindir <dir> ..... Executables will be installed to <dir>"
-    echo "                    (default PREFIX/bin)"
-    echo "-plugindir <dir> .. Plug-ins will be installed to <dir>"
-    echo "                    (default PREFIX/plugins)"
-    echo "-debug ............ Build with debugging symbols"
-    echo "-release .......... Build without debugging symbols"
-    echo "-silent ........... Reduces build output"
-    echo "-tests ............ Build unit tests (not build by default)"
-    echo "                    Note, this adds test symbols to all libraries"
-    echo "                    and should not be used for release builds."
-    echo "-examples ......... Build example applications"
-    echo "-no-docs .......... Do not build documentation (build by default)"
-    echo "-no-tools ......... Do not build tools (build by default)"
-    echo "-modules <list> ... Restrict list of modules to build (default all supported)"
-    echo "                    Choose from: bearer contacts location publishsubscribe"
-    echo "                    messaging multimedia systeminfo serviceframework versit"
-    echo "                    sensors"
-    echo "                    Modules should be separated by a space and surrounded"
-    echo "                    by double quotation. If a"
-    echo "                    selected module depends on other modules dependencies"
-    echo "                    will automatically be enabled."
-    echo "-maemo6 ........... Build Qt Mobility for Maemo6 (Harmattan)."
-    echo "-maemo5 ........... Build Qt Mobility for Maemo5 (Freemantle)."
-    echo "-sdk <sdk>..........Build using Apple provided SDK <path/to/sdk>."
-    echo "                    example: -sdk /Developer/SDKs/MacOSX10.6.sdk"
-    echo
-    
-    rm -f "$CONFIG_IN"
-    exit 1
-}
-
-rm -rf "$QMAKE_CACHE"
-CONFIG_LOG="$shadowpath/config.log"
-rm -rf "$CONFIG_LOG"
-
-while [ "$#" -gt 0 ]; do
-    case "$1" in 
-        -h|-help|--help)
-            usage
-            ;;
-        -headerdir)
-            QT_MOBILITY_INCLUDE="$2"
-            shift
-            ;;
-        -libdir)
-            QT_MOBILITY_LIB="$2"
-            shift
-            ;;
-        --prefix|-prefix)
-            QT_MOBILITY_PREFIX="$2"
-            shift
-            ;;
-        -bindir)
-            QT_MOBILITY_BIN="$2"
-            shift
-            ;;
-        -plugindir)
-            QT_MOBILITY_PLUGINS="$2"
-            shift
-            ;;
-        -tests)
-            BUILD_UNITTESTS="yes"
-            ;;
-        -examples)
-            BUILD_EXAMPLES="yes"
-            ;;
-        -no-docs)
-            BUILD_DOCS=
-            ;;
-        -no-tools)
-            BUILD_TOOLS=
-            ;;
-        -debug)
-            RELEASEMODE=debug
-            ;;
-        -release)
-            RELEASEMODE=release
-            ;;
-        -silent)
-            BUILD_SILENT=yes
-            ;;
-        -maemo5)
-            LINUX_TARGET=maemo5
-            ;;
-        -maemo6)
-            LINUX_TARGET=maemo6
-            ;;
-        -sdk)
-            MAC_SDK="$2"
-            shift
-            ;;
-        -modules)
-            MOBILITY_MODULES_UNPARSED=$2
-            #reset default selection
-            MOBILITY_MODULES=
-            for m in $MOBILITY_MODULES_UNPARSED; do
-                case "$m" in
-                    bearer|contacts|location|messaging|multimedia|publishsubscribe|serviceframework|systeminfo|versit|sensors)
-                        MOBILITY_MODULES="$MOBILITY_MODULES $m";
-                        ;;
-                    *)
-                        echo "Unknown module: $m"
-                        echo
-                        usage
-                        ;;
-
-                esac
-            done
-            if [ -z "$MOBILITY_MODULES" ]; then
-                echo "List of selected modules is empty."
-                echo 
-                usage
-            fi
-            shift
-            ;;
-        *)
-            echo "Unknown option: $1"
-            usage
-            ;;
-    esac
-    shift
-done
-
-checkostype()
-{
-    match="darwin" 
-    if [ "$OSTYPE" = "${match}"* ]; then
-        OS="darwin"
-        QMKSPEC="-spec macx-g++"
-        echo "QMAKESPEC = "$QMKSPEC >> "$CONFIG_IN"
-    fi
-}
-
-findframeworks()
-{
-# figure out if Qt was built with frameworks
-# if so, install in the correct place.
-# and fix rpath
-    echo "contains(QT_CONFIG,qt_framework):message(1)" > 1.pro
-    SOMETHING=`qmake -spec macx-g++ 1.pro 2>&1`
-        if [ "$SOMETHING" = "Project MESSAGE: 1" ]; then
-            LIB_PATH="Library/Frameworks"
-            BIN_PATH="Applications"
-        fi
-    rm 1.pro
-}
-
-
-findUniversal()
-{
-    if [ -e "mac.inc" ]; then 
-        rm mac.inc
-    fi
-    echo "contains(QT_CONFIG,x86): system(echo CONFIG+=x86 >> mac.inc)" > 2.pro
-    echo "contains(QT_CONFIG,ppc): system(echo CONFIG+=ppc >> mac.inc)" >> 2.pro
-    echo "contains(QT_CONFIG,ppc64): system(echo CONFIG+=ppc64 >> mac.inc)" >> 2.pro
-    echo "contains(QT_CONFIG,x86_64): system(echo CONFIG+=x86_64 >> mac.inc)" >> 2.pro
-    SOMETIME=`qmake -spec macx-g++ 2.pro 2>&1`
-    rm 2.pro
-    if [ -e "mac.inc" ]; then 
-         echo "exists(mac.inc): include(mac.inc)" >> "$CONFIG_IN"
-    fi
-}
-
-checkostype
-
-if [ "$OS" = "darwin" ] ; then
-    findframeworks
-fi
-
-if [ -n "$BUILD_SILENT" ]; then
-    echo "CONFIG += silent"  > "$CONFIG_IN"
-fi
-
-if [ "$OS" = "darwin" ] ; then
-    findUniversal
-fi
-
-if [ -z "$RELEASEMODE" ]; then
-    RELEASEMODE="debug"
-fi
-echo "CONFIG += $RELEASEMODE" >> "$CONFIG_IN"
-
-#do we build for Maemo?
-if [ -n "$LINUX_TARGET" ]; then
-    if [ "$LINUX_TARGET" = "maemo5" ]; then
-        echo "CONFIG+=maemo5" >> "$CONFIG_IN"
-    elif [ "$LINUX_TARGET" = "maemo6" ]; then
-        echo "CONFIG+=maemo6" >> "$CONFIG_IN"
-    fi
-fi
-
-#process PREFIX
-QT_MOBILITY_PREFIX=`absPath $QT_MOBILITY_PREFIX $LINUX_TARGET`
-if [ "$?" -eq "1" ]; then
-    exit 1
-fi
-echo "QT_MOBILITY_PREFIX = $QT_MOBILITY_PREFIX" >> "$CONFIG_IN"
-
-#process include path
-if [ -z "$QT_MOBILITY_INCLUDE" ]; then
-    QT_MOBILITY_INCLUDE="$QT_MOBILITY_PREFIX/include"
-else
-    QT_MOBILITY_INCLUDE=`absPath $QT_MOBILITY_INCLUDE $LINUX_TARGET`
-    if [ "$?" -eq "1" ]; then
-        exit 1
-    fi
-fi
-echo "QT_MOBILITY_INCLUDE = $QT_MOBILITY_INCLUDE" >> "$CONFIG_IN"
-
-
-#process library path
-if [ -z "$QT_MOBILITY_LIB" ]; then
-    QT_MOBILITY_LIB="$QT_MOBILITY_PREFIX/$LIB_PATH"
-else
-    QT_MOBILITY_LIB=`absPath $QT_MOBILITY_LIB $LINUX_TARGET`
-    if [ "$?" -eq "1" ]; then
-        exit 1
-    fi
-fi
-echo "QT_MOBILITY_LIB = $QT_MOBILITY_LIB" >> "$CONFIG_IN"
-
-#process bin path
-if [ -z "$QT_MOBILITY_BIN" ]; then
-    QT_MOBILITY_BIN="$QT_MOBILITY_PREFIX/$BIN_PATH"
-else
-    QT_MOBILITY_BIN=`absPath $QT_MOBILITY_BIN $LINUX_TARGET`
-    if [ "$?" -eq "1" ]; then
-        exit 1
-    fi
-fi
-echo "QT_MOBILITY_BIN = $QT_MOBILITY_BIN" >> "$CONFIG_IN"
-
-#process plugin path
-if [ -z "$QT_MOBILITY_PLUGINS" ]; then
-    QT_MOBILITY_PLUGINS="$QT_MOBILITY_PREFIX/$PLUGIN_PATH"
-else
-    QT_MOBILITY_PLUGINS=`absPath $QT_MOBILITY_PLUGINS $LINUX_TARGET`
-    if [ "$?" -eq "1" ]; then
-        exit 1
-    fi
-fi
-echo "QT_MOBILITY_PLUGINS = $QT_MOBILITY_PLUGINS" >> "$CONFIG_IN"
-
-
-echo "QT_MOBILITY_SOURCE_TREE = $relpath" >> "$QMAKE_CACHE"
-echo "QT_MOBILITY_BUILD_TREE = $shadowpath" >> "$QMAKE_CACHE"
-
-if [ -n "$MAC_SDK" ]; then
-    QMAKE_MAC_SDK="$MAC_SDK"
-   echo "QMAKE_MAC_SDK = $QMAKE_MAC_SDK" >> "$CONFIG_IN"
-fi
-
-if [ -z "$BUILD_UNITTESTS" ]; then
-    echo "build_unit_tests = no" >> "$CONFIG_IN"
-else
-    echo "build_unit_tests = yes" >> "$CONFIG_IN"
-fi
-
-if [ -z "$BUILD_EXAMPLES" ]; then
-    echo "build_examples = no" >> "$CONFIG_IN"
-else
-    echo "build_examples = yes" >> "$CONFIG_IN"
-fi
-
-if [ -z "$BUILD_DOCS" ]; then
-    echo "build_docs = no" >> "$CONFIG_IN"
-else
-    echo "build_docs = yes" >> "$CONFIG_IN"
-fi
-
-if [ -z "$BUILD_TOOLS" ]; then
-    echo "build_tools = no" >> "$CONFIG_IN"
-else
-    echo "build_tools = yes" >> "$CONFIG_IN"
-fi
-
-echo "Configuring Qt Mobility"
-echo 
-
-WHICH="$relpath/config.tests/tools/which.test"
-
-printf "Checking available Qt"
-if ! "$WHICH" qmake 2>/dev/null 1>&2; then
-    printf " ... Not found\n\n" >&2
-    echo >&2 "Cannot find 'qmake' in your PATH.";
-    echo >&2 "Aborting." 
-else
-    printf " ... "
-    qmake -query QT_VERSION
-fi
-
-# find out which make we want to use
-MAKE=
-for m in make gmake; do
-    if "$WHICH" $m >/dev/null 2>&1; then
-        MAKE=`$WHICH $m`
-        break
-    fi
-done
-if [ -z "$MAKE" ]; then
-    echo >&2 "Cannot find 'make' or 'gmake' in your PATH";
-    echo >&2 "Aborting." 
-fi
-
-compileTest()
-{
-    printf "Checking $1"
-    CURRENT_PWD=`pwd`
-    
-    if [ "$shadowpath" = "$relpath" ]; then 
-        #doing source tree build
-        cd "$relpath/config.tests/$2"
-        rm -rf ./$2
-    else
-        #using shadow build
-        rm -rf config.tests/$2
-        mkdir -p config.tests/$2
-        cd config.tests/$2
-    fi
-
-    qmake $QMKSPEC "$relpath/config.tests/$2/$2.pro" 2>> "$CONFIG_LOG" >> "$CONFIG_LOG"
-    printf  " ."
-    "$MAKE" clean >> "$CONFIG_LOG"
-    printf "."
-    "$MAKE" >> "$CONFIG_LOG" 2>&1
-    printf ". "
-    if [ -e ./$2 ]; then
-        echo "OK"
-        echo "$2_enabled = yes" >> "$CONFIG_IN"
-    else
-        echo "Not Found"
-        echo "$2_enabled = no" >> "$CONFIG_IN"
-    fi
-    cd "$CURRENT_PWD"
-}
-
-#compile tests
-compileTest QMF qmf
-compileTest NetworkManager networkmanager
-compileTest "CoreWLAN (MacOS 10.6)" corewlan
-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
-
-# 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"
-echo "maemo5|maemo6:contains(maemo-icd_enabled, no): mobility_modules -= bearer" >> "$CONFIG_IN"
-
-# If libicd-network-wlan-dev.h is not present, use own copy.
-# At time of writing, libicd-network-wlan-dev is not released for maemo5.
-echo "maemo5:contains(maemo-icd-network-wlan_enabled, no): INCLUDEPATH += $relpath/src/3rdparty/icd-network-wlan" >> "$CONFIG_IN"
-
-# Ideally we'd skip generating headers for modules that are not enabled
-echo "Generating Mobility Headers..."
-#remove old headers
-rm -rf $shadowpath/include
-mkdir $shadowpath/include
-for module in $MOBILITY_MODULES; do
-    case "$module" in 
-        bearer)
-            $relpath/bin/syncheaders $shadowpath/include/QtBearer $relpath/src/bearer
-            ;;
-        publishsubscribe)
-            $relpath/bin/syncheaders $shadowpath/include/QtPublishSubscribe $relpath/src/publishsubscribe
-            ;;
-        location)
-            $relpath/bin/syncheaders $shadowpath/include/QtLocation $relpath/src/location
-            ;;
-        serviceframework)
-            $relpath/bin/syncheaders $shadowpath/include/QtServiceFramework $relpath/src/serviceframework
-            ;;
-        systeminfo)
-            $relpath/bin/syncheaders $shadowpath/include/QtSystemInfo $relpath/src/systeminfo
-            ;;
-        contacts)
-            $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/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/QtMessaging $relpath/src/messaging
-            ;;
-        versit)
-            #versit implies contacts
-            $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/QtSensors $relpath/src/sensors
-            ;;
-        *)
-            echo "Cannot generate headers for $module"
-            ;;
-    esac
-done
-
-mv "$CONFIG_IN" config.pri
-mkdir -p "$shadowpath/features"
-if [ "$shadowpath" != "$relpath" ]; then 
-    cp -f "$relpath/features/strict_flags.prf" "$shadowpath/features"
-fi
-
-echo "Running qmake..."
-if qmake -makefile $QMKSPEC -recursive "$relpath/qtmobility.pro"; then
-    echo ""
-    echo "configure has finished. You may run make or gmake to build the project now."
-else
-    echo ""
-    echo "configure failed."
-fi
-
--- a/qtmobility/configure.bat	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,677 +0,0 @@
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-::
-:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-:: All rights reserved.
-:: Contact: Nokia Corporation (qt-info@nokia.com)
-::
-:: This file is part of the Qt Mobility Components.
-::
-:: $QT_BEGIN_LICENSE:LGPL$
-:: No Commercial Usage
-:: This file contains pre-release code and may not be distributed.
-:: You may use this file in accordance with the terms and conditions
-:: contained in the Technology Preview License Agreement accompanying
-:: this package.
-::
-:: GNU Lesser General Public License Usage
-:: Alternatively, this file may be used under the terms of the GNU Lesser
-:: General Public License version 2.1 as published by the Free Software
-:: Foundation and appearing in the file LICENSE.LGPL included in the
-:: packaging of this file.  Please review the following information to
-:: ensure the GNU Lesser General Public License version 2.1 requirements
-:: will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-::
-:: In addition, as a special exception, Nokia gives you certain additional
-:: rights.  These rights are described in the Nokia Qt LGPL Exception
-:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-::
-:: If you have questions regarding the use of this file, please contact
-:: Nokia at qt-info@nokia.com.
-::
-::
-::
-::
-::
-::
-::
-::
-:: $QT_END_LICENSE$
-::
-:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
-@echo off
-
-set QT_MOBILITY_PREFIX= C:\QtMobility
-set BUILD_PATH=%CD%
-set SOURCE_PATH= %~dp0
-cd /D %SOURCE_PATH%
-set SOURCE_PATH=%CD%
-cd /D %BUILD_PATH%
-
-set PROJECT_CONFIG=%BUILD_PATH%\config.in
-set PROJECT_LOG=%BUILD_PATH%\config.log
-set RELEASEMODE=release
-set WIN32_RELEASEMODE=debug_and_release build_all
-set QT_MOBILITY_LIB=
-set BUILD_UNITTESTS=no
-set BUILD_EXAMPLES=no
-set BUILD_DOCS=yes
-set BUILD_TOOLS=yes
-set MOBILITY_MODULES=bearer location contacts multimedia publishsubscribe versit messaging systeminfo serviceframework sensors
-set MOBILITY_MODULES_UNPARSED=
-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%
-
-echo QT_MOBILITY_SOURCE_TREE = %SOURCE_PATH% > %QMAKE_CACHE%
-echo QT_MOBILITY_BUILD_TREE = %BUILD_PATH% >> %QMAKE_CACHE%
-set QMAKE_CACHE=
-
-:cmdline_parsing
-if "%1" == ""                   goto startProcessing
-if "%1" == "-debug"             goto debugTag
-if "%1" == "-release"           goto releaseTag
-if "%1" == "-silent"            goto silentTag
-if "%1" == "-prefix"            goto prefixTag
-if "%1" == "-libdir"            goto libTag
-if "%1" == "-bindir"            goto binTag
-if "%1" == "-headerdir"         goto headerTag
-if "%1" == "-plugindir"         goto pluginTag
-if "%1" == "-tests"             goto testTag
-if "%1" == "-examples"          goto exampleTag
-if "%1" == "-qt"                goto qtTag
-if "%1" == "-vc"                goto vcTag
-if "%1" == "-no-docs"           goto nodocsTag
-if "%1" == "-no-tools"          goto noToolsTag
-if "%1" == "-modules"           goto modulesTag
-if "%1" == "/?"                 goto usage
-if "%1" == "-h"                 goto usage
-if "%1" == "-help"              goto usage
-if "%1" == "--help"             goto usage
-if "%1" == "-symbian-unfrozen"  goto unfrozenTag
-
-
-echo Unknown option: "%1"
-goto usage
-
-:usage
-echo Usage: configure.bat [-prefix (dir)] [headerdir (dir)] [libdir (dir)]
-    echo                  [-bindir (dir)] [-tests] [-examples]
-    echo                  [-debug] [-release] [-silent]
-    echo.
-    echo Options:
-    echo.
-    echo -prefix (dir) ..... This will install everything relative to dir
-    echo                     (default prefix: C:\QtMobility)
-    echo -headerdir (dir) .. Header files will be installed to dir
-    echo                     (default prefix: PREFIX/include)
-    echo -libdir (dir) ..... Libraries will be installed to dir
-    echo                     (default PREFIX/lib)
-    echo -bindir (dir) ..... Executables will be installed to dir
-    echo                     (default PREFIX/bin)
-    echo -plugindir (dir) .. Plug-ins will be installed to dir
-    echo                     (default PREFIX/plugins)
-    echo -debug ............ Build with debugging symbols
-    echo -release .......... Build without debugging symbols
-    echo -silent ........... Reduces build output
-    echo -tests ............ Build unit tests (not build by default)
-    echo                     Note, this adds test symbols to all libraries
-    echo                     and should not be used for release builds.
-    echo -examples ......... Build example applications
-    echo -no-docs .......... Do not build documentation (build by default)
-    echo -modules ^<list^> ... Build only the specified modules (default all)
-    echo                     Choose from: bearer contacts location publishsubscribe
-    echo                     messaging multimedia systeminfo serviceframework versit
-    echo                     sensors
-    echo                     Modules should be separated by a space and surrounded
-    echo                     by double quotation. If a
-    echo                     selected module depends on other modules dependencies
-    echo                     will automatically be enabled.
-    echo -vc ............... Generate Visual Studio make files
-
-
-if exist "%PROJECT_CONFIG%" del %PROJECT_CONFIG%
-goto exitTag
-
-:qtTag
-shift
-set QT_PATH=%1\
-shift
-goto cmdline_parsing
-
-:debugTag
-if "%RELEASEMODE%" == "release" set RELEASEMODE=debug
-set WIN32_RELEASEMODE=
-shift
-goto cmdline_parsing
-
-:releaseTag
-if "%RELEASEMODE%" == "debug"   set RELEASEMODE=release
-set WIN32_RELEASEMODE=
-shift
-goto cmdline_parsing
-
-:silentTag
-echo CONFIG += silent > %PROJECT_CONFIG%
-shift
-goto cmdline_parsing
-
-:prefixTag
-shift
-set QT_MOBILITY_PREFIX=%1
-shift
-goto cmdline_parsing
-
-:libTag
-shift
-echo QT_MOBILITY_LIB = %1 >> %PROJECT_CONFIG%
-shift
-goto cmdline_parsing
-
-:binTag
-shift
-echo QT_MOBILITY_BIN = %1 >> %PROJECT_CONFIG%
-shift
-goto cmdline_parsing
-
-:headerTag
-shift
-echo QT_MOBILITY_INCLUDE = %1 >> %PROJECT_CONFIG%
-shift
-goto cmdline_parsing
-
-:pluginTag
-shift
-echo QT_MOBILITY_PLUGINS = %1 >> %PROJECT_CONFIG%
-shift
-echo
-goto cmdline_parsing
-
-:unfrozenTag
-REM Should never be used in release builds
-REM Some SDK's seem to exclude Q_AUTOTEST_EXPORT symbols if the
-REM libraries are frozen. This breaks unit tests relying on the auto test exports
-REM This flag unfreezes the SYMBIAN libraries for the purpose of unit test building.
-REM Ideally this should be connected to '-tests' option but that would prevent
-REM integration testing for frozen symbols as the CI system should test unit tests
-REM and frozen symbol compliance.
-echo symbian_symbols_unfrozen = 1 >> %PROJECT_CONFIG%
-shift
-goto cmdline_parsing
-
-:testTag
-set BUILD_UNITTESTS=yes
-shift
-goto cmdline_parsing
-
-:exampleTag
-set BUILD_EXAMPLES=yes
-shift
-goto cmdline_parsing
-
-:vcTag
-shift
-set VC_TEMPLATE_OPTION=-tp vc
-goto cmdline_parsing
-
-:nodocsTag
-set BUILD_DOCS=no
-shift
-goto cmdline_parsing
-
-:noToolsTag
-set BUILD_TOOLS=no
-shift
-goto cmdline_parsing
-
-:modulesTag
-shift
-:: %1 can have leading/trailing quotes, so we can't use if "%1" == ""
-if xx%1xx == xxxx (
-    echo. >&2
-    echo >&2The -modules option requires a list of modules.
-    echo. >&2
-    goto usage
-)
-
-:: Remove leading/trailing quotes, if we have them
-set MOBILITY_MODULES_UNPARSED=xxx%1xxx
-set MOBILITY_MODULES_UNPARSED=%MOBILITY_MODULES_UNPARSED:"xxx=%
-set MOBILITY_MODULES_UNPARSED=%MOBILITY_MODULES_UNPARSED:xxx"=%
-set MOBILITY_MODULES_UNPARSED=%MOBILITY_MODULES_UNPARSED:xxx=%
-
-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
-
-for /f "tokens=1,*" %%a in ("%MOBILITY_MODULES_UNPARSED%") do (
-    set FIRST=%%a
-    set REMAINING=%%b
-)
-
-: What we want is a switch as we need to check module name and only want to
-: 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
-)
-
-set MOBILITY_MODULES=%MOBILITY_MODULES% %FIRST%
-
-if "%REMAINING%" == "" (
-    shift
-) else (
-    set MOBILITY_MODULES_UNPARSED=%REMAINING%
-    goto modulesTag2
-)
-
-SET REMAINING=
-SET FIRST=
-goto cmdline_parsing
-
-:startProcessing
-
-echo CONFIG += %RELEASEMODE% >> %PROJECT_CONFIG%
-echo CONFIG_WIN32 += %WIN32_RELEASEMODE% %RELEASEMODE% >> %PROJECT_CONFIG%
-set RELEASEMODE=
-set WIN32_RELEASEMODE=
-
-set CURRENTDIR=%CD%
-echo %CURRENTDIR%
-if exist %QT_MOBILITY_PREFIX% goto prefixExists
-mkdir %QT_MOBILITY_PREFIX%
-if errorlevel 1 goto invalidPrefix
-cd /D %QT_MOBILITY_PREFIX%
-set QT_MOBILITY_PREFIX=%CD%
-cd /D %CURRENTDIR%
-rd /S /Q %QT_MOBILITY_PREFIX%
-goto endprefixProcessing
-
-:invalidPrefix
-echo "%QT_MOBILITY_PREFIX%" is not a valid directory path.
-goto :exitTag
-
-:prefixExists
-cd /D %QT_MOBILITY_PREFIX%
-set QT_MOBILITY_PREFIX=%CD%
-cd /D %CURRENTDIR%
-
-:endprefixProcessing
-echo QT_MOBILITY_PREFIX = %QT_MOBILITY_PREFIX% >> %PROJECT_CONFIG%
-
-echo build_unit_tests = %BUILD_UNITTESTS% >> %PROJECT_CONFIG%
-set BUILD_UNITTESTS=
-
-echo build_examples = %BUILD_EXAMPLES% >> %PROJECT_CONFIG%
-set BUILD_EXAMPLES=
-
-echo build_docs = %BUILD_DOCS% >> %PROJECT_CONFIG%
-set BUILD_DOCS=
-
-echo build_tools = %BUILD_TOOLS% >> %PROJECT_CONFIG%
-set BUILD_TOOLS=
-
-echo qmf_enabled = no >> %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
-echo maemo5^|maemo6:mobility_modules -= systeminfo >> %PROJECT_CONFIG%
-echo contains(mobility_modules,versit): mobility_modules *= contacts  >> %PROJECT_CONFIG%
-
-echo Checking available Qt
-call %QT_PATH%qmake -v >> %PROJECT_LOG% 2>&1
-if errorlevel 1 goto qmakeNotFound
-goto qmakeFound
-:qmakeNotFound
-echo ... Not found  >> %PROJECT_LOG% 2>&1
-if "%QT_PATH%" == "" (
-    echo >&2Cannot find 'qmake' in your PATH.
-    echo >&2Your PATH is: %PATH%
-) else (
-    echo >&2Cannot find 'qmake' in %QT_PATH%.
-)
-echo >&2Aborting.
-goto errorTag
-
-:qmakeFound
-call %QT_PATH%qmake -query QT_VERSION
-
-goto checkMake
-
-:makeTest
-setlocal
-    set CURRENT_PWD=%CD%
-
-    if %BUILD_PATH% == %SOURCE_PATH% (
-        cd %SOURCE_PATH%\config.tests\make
-        if exist make del make
-    ) else (
-        rmdir /S /Q config.tests\make
-        mkdir config.tests\make
-        cd config.tests\make
-    )
-
-    for /f "tokens=2,3" %%a in ('call %QT_PATH%qmake %SOURCE_PATH%\config.tests\make\make.pro 2^>^&1 1^>NUL') do (
-        if "%%a" == "MESSAGE:" (
-            set BUILDSYSTEM=%%b)
-    )
-
-    if "%BUILDSYSTEM%" == "symbian-abld" (
-        call make -h >> %PROJECT_LOG% 2>&1
-        if not errorlevel 1 (
-            echo ... Symbian abld make found.
-            set MAKE=make
-        )
-    ) else if "%BUILDSYSTEM%" == "symbian-sbsv2" (
-        call make -h >> %PROJECT_LOG% 2>&1
-        if not errorlevel 1 (
-            echo ... Symbian sbsv2 make found.
-            set MAKE=make
-        )
-    ) else if "%BUILDSYSTEM%" == "win32-nmake" (
-        call nmake /? >> %PROJECT_LOG% 2>&1
-        if not errorlevel 1 (
-            echo ... nmake found.
-            set MAKE=nmake
-        )
-    ) else if "%BUILDSYSTEM%" == "win32-mingw" (
-        call mingw32-make -v >> %PROJECT_LOG% 2>&1
-        if not errorlevel 1 (
-            echo ... mingw32-make found.
-            set MAKE=mingw32-make
-        )
-    ) else (
-        echo ... Unknown target environment %BUILDSYSTEM%.
-    )
-    call cd %CURRENT_PWD%
-call endlocal&set %1=%MAKE%&set %2=%BUILDSYSTEM%&goto :EOF
-
-:checkMake
-echo Checking make
-call :makeTest MOBILITY_MAKE MOBILITY_BUILDSYSTEM
-if not "%MOBILITY_MAKE%" == "" goto compileTests
-
-echo >&2Cannot find 'nmake', 'mingw32-make' or 'make' in your PATH
-echo >&2Aborting.
-goto errorTag
-
-:compileTest
-setlocal
-    @echo off
-    echo Checking %1
-    set CURRENT_PWD=%CD%
-
-    if %BUILD_PATH% == %SOURCE_PATH% (
-        cd %SOURCE_PATH%\config.tests\%2
-        if exist %2 del %2
-    ) else (
-        rmdir /S /Q config.tests\%2
-        mkdir config.tests\%2
-        cd config.tests\%2
-    )
-
-    call %QT_PATH%qmake %SOURCE_PATH%\config.tests\%2\%2.pro >> %PROJECT_LOG% 2>&1
-
-    set FAILED=0
-    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
-        REM have to check error level for windows / other builds to be sure.
-        if errorlevel 1 (
-           set FAILED=1
-        )
-    )
-
-    if %FAILED% == 0 (
-        echo ... OK
-        echo %2_enabled = yes >> %PROJECT_CONFIG%
-    ) else (
-        echo ... Not Found
-        echo %2_enabled = no >> %PROJECT_CONFIG%
-    )
-
-    cd %CURRENT_PWD%
-endlocal&goto :EOF
-
-:compileTests
-
-echo.
-echo Start of compile tests
-REM compile tests go here.
-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 windowsTests
-
-:symbianTests
-
-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
-
-echo End of compile tests
-echo.
-echo.
-
-REM we could skip generating headers if a module is not enabled
-if not exist "%BUILD_PATH%\features" mkdir %BUILD_PATH%\features
-copy %SOURCE_PATH%\features\strict_flags.prf %BUILD_PATH%\features
-echo Generating Mobility Headers...
-rd /s /q %BUILD_PATH%\include
-mkdir %BUILD_PATH%\include
-perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include %SOURCE_PATH%\src\global
-
-set MODULES_TEMP=%MOBILITY_MODULES%
-
-:generateHeaders
-
-for /f "tokens=1,*" %%a in ("%MODULES_TEMP%") do (
-    set FIRST=%%a
-    set REMAINING=%%b
-)
-
-if %FIRST% == 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\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\QtLocation %SOURCE_PATH%\src\location
-) else if %FIRST% == messaging (
-    perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMessaging %SOURCE_PATH%\src\messaging
-) else if %FIRST% == multimedia (
-    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\QtPublishSubscribe %SOURCE_PATH%\src\publishsubscribe
-) else if %FIRST% == 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\QtServiceFramework %SOURCE_PATH%\src\serviceframework
-) else if %FIRST% == versit (
-    REM versit implies contacts
-    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\QtSensors %SOURCE_PATH%\src\sensors
-)
-
-if "%REMAINING%" == "" (
-    shift
-) else (
-    set MODULES_TEMP=%REMAINING%
-    goto generateHeaders
-)
-
-SET REMAINING=
-SET FIRST=
-SET MODULES_TEMP=
-
-if exist config.pri del config.pri
-ren %PROJECT_CONFIG% config.pri
-
-echo.
-echo Running qmake...
-call %QT_PATH%qmake -recursive %VC_TEMPLATE_OPTION% %SOURCE_PATH%\qtmobility.pro
-if errorlevel 1 goto qmakeRecError
-echo.
-echo configure has finished. You may run %MOBILITY_MAKE% to build the project now.
-goto exitTag
-
-:qmakeRecError
-echo.
-echo configure failed.
-goto errorTag
-
-:errorTag
-set BUILD_PATH=
-set CURRENTDIR=
-set MOBILITY_MAKE=
-set MOBILITY_BUILDSYSTEM=
-set PROJECT_CONFIG=
-set PROJECT_LOG=
-set QT_MOBILITY_PREFIX=
-set QT_PATH=
-set SOURCE_PATH=
-set MOBILITY_MODULES=
-set MOBILITY_MODULES_UNPARSED=
-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
-set BUILD_PATH=
-set CURRENTDIR=
-set MOBILITY_MAKE=
-set MOBILITY_BUILDSYSTEM=
-set PROJECT_CONFIG=
-set PROJECT_LOG=
-set QT_MOBILITY_PREFIX=
-set QT_PATH=
-set SOURCE_PATH=
-set MOBILITY_MODULES=
-set MOBILITY_MODULES_UNPARSED=
-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
--- a/qtmobility/confml/qtmobility.confml	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<confml:configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:confml="http://www.s60.com/xml/confml/2" xsi:schemaLocation="http://www.s60.com/xml/confml/2 http://www.s60.com/xml/confml/1#//confml2">
-	<confml:feature name="QtMobility" ref="qtmobility">
-		<confml:desc>QtMobility settings</confml:desc>
-		<confml:setting name="QtMobility enabled" 
-						ref="Enabled"
-						type="boolean">
-			<confml:desc>To enable QtMobility usage</confml:desc>
-		</confml:setting>
-	</confml:feature>
-	<confml:data>
-		<confml:qtmobility>
-			<confml:Enabled>true</confml:Enabled>
-		</confml:qtmobility>
-	</confml:data>
-</confml:configuration>
\ No newline at end of file
--- a/qtmobility/data/qtmobility.pkg	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-
-; Language
-&EN
-
-; SIS header: name, uid, version
-#{"QtMobility"},(0x2002AC89),1,0,2,TYPE=SA,RU
-
-; Localised Vendor name
-%{"Nokia"}
- 
-; Unique Vendor name
-:"Nokia"
-
-; Manual PKG pre-rules from PRO files
-; Default HW/platform dependencies
-[0x101F7961],0,0,0,{"S60ProductID"}
-[0x102032BE],0,0,0,{"S60ProductID"}
-[0x102752AE],0,0,0,{"S60ProductID"}
-[0x1028315F],0,0,0,{"S60ProductID"}
- 
-; DEPLOYMENT
-"/epoc32/release/armv5/urel/QtBearer.dll" - "!:\sys\bin\QtBearer.dll"
Binary file qtmobility/data/qtmobility.sisx has changed
--- a/qtmobility/data/qtmobility_stub.pkg	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-
-; Language
-&EN
-
-; SIS header: name, uid, version
-#{"QtMobility"},(0x2002AC89),1,0,2,TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
- 
-; Unique Vendor name
-:"Nokia"
Binary file qtmobility/data/qtmobility_stub.sis has changed
--- a/qtmobility/data/qtmobilityexampleapps.pkg	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-; Language
-&EN
-
-; SIS header: name, uid, version
-#{"QtMobilityExamples"},(0xE001E61D),1,0,2,TYPE=SA
- 
-; Localised Vendor name
-%{"Nokia, Qt"}
- 
-; Unique Vendor name
-:"Nokia, Qt"
-
-"/epoc32/release/armv5/urel/bearercloud.exe"                        - "!:\sys\bin\bearercloud.exe"
-"/epoc32/data/z/resource/apps/bearercloud.rsc"                      - "!:\resource\apps\bearercloud.rsc"
-"/epoc32/data/z/private/10003a3f/import/apps/bearercloud_reg.rsc"   - "!:\private\10003a3f\import\apps\bearercloud_reg.rsc"
-
-"/epoc32/release/armv5/urel/bearermonitor.exe"                      - "!:\sys\bin\bearermonitor.exe"
-"/epoc32/data/z/resource/apps/bearermonitor.rsc"                    - "!:\resource\apps\bearermonitor.rsc"
-"/epoc32/data/z/private/10003a3f/import/apps/bearermonitor_reg.rsc" - "!:\private\10003a3f\import\apps\bearermonitor_reg.rsc"
-
-"/epoc32/release/armv5/urel/BearerEx.exe"                           - "!:\sys\bin\BearerEx.exe"
-"/epoc32/data/z/resource/apps/BearerEx.rsc"                         - "!:\resource\apps\BearerEx.rsc"
-"/epoc32/data/z/private/10003a3f/import/apps/BearerEx_reg.rsc"      - "!:\private\10003a3f\import\apps\BearerEx_reg.rsc"
--- a/qtmobility/examples/bearercloud/bearercloud.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "bearercloud.h"
-#include "cloud.h"
-
-#include <QGraphicsTextItem>
-#include <QTimer>
-#include <QDateTime>
-#include <QHostInfo>
-
-#include <QDebug>
-
-#include <math.h>
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-//! [0]
-BearerCloud::BearerCloud(QObject *parent)
-:   QGraphicsScene(parent), timerId(0)
-{
-    setSceneRect(-300, -300, 600, 600);
-
-    qsrand(QDateTime::currentDateTime().toTime_t());
-
-    offset[QNetworkConfiguration::Active] = 2 * M_PI * qrand() / RAND_MAX;
-    offset[QNetworkConfiguration::Discovered] = offset[QNetworkConfiguration::Active] + M_PI / 6;
-    offset[QNetworkConfiguration::Defined] = offset[QNetworkConfiguration::Discovered] - M_PI / 6;
-    offset[QNetworkConfiguration::Undefined] = offset[QNetworkConfiguration::Undefined] + M_PI / 6;
-
-    thisDevice = new QGraphicsTextItem(QHostInfo::localHostName());
-    thisDevice->setData(0, QLatin1String("This Device"));
-    thisDevice->setPos(thisDevice->boundingRect().width() / -2,
-                       thisDevice->boundingRect().height() / -2);
-    addItem(thisDevice);
-
-    qreal radius = Cloud::getRadiusForState(QNetworkConfiguration::Active);
-    QGraphicsEllipseItem *orbit = new QGraphicsEllipseItem(-radius, -radius, 2*radius, 2*radius);
-    orbit->setPen(QColor(Qt::green));
-    addItem(orbit);
-    radius = Cloud::getRadiusForState(QNetworkConfiguration::Discovered);
-    orbit = new QGraphicsEllipseItem(-radius, -radius, 2*radius, 2*radius);
-    orbit->setPen(QColor(Qt::blue));
-    addItem(orbit);
-    radius = Cloud::getRadiusForState(QNetworkConfiguration::Defined);
-    orbit = new QGraphicsEllipseItem(-radius, -radius, 2*radius, 2*radius);
-    orbit->setPen(QColor(Qt::darkGray));
-    addItem(orbit);
-    radius = Cloud::getRadiusForState(QNetworkConfiguration::Undefined);
-    orbit = new QGraphicsEllipseItem(-radius, -radius, 2*radius, 2*radius);
-    orbit->setPen(QColor(Qt::lightGray));
-    addItem(orbit);
-
-    connect(&manager, SIGNAL(configurationAdded(QNetworkConfiguration)),
-            this, SLOT(configurationAdded(QNetworkConfiguration)));
-    connect(&manager, SIGNAL(configurationRemoved(QNetworkConfiguration)),
-            this, SLOT(configurationRemoved(QNetworkConfiguration)));
-    connect(&manager, SIGNAL(configurationChanged(QNetworkConfiguration)),
-            this, SLOT(configurationChanged(QNetworkConfiguration)));
-
-    QTimer::singleShot(0, this, SLOT(updateConfigurations()));
-}
-//! [0]
-
-BearerCloud::~BearerCloud()
-{
-}
-
-void BearerCloud::cloudMoved()
-{
-    if (!timerId)
-        timerId = startTimer(1000 / 25);
-}
-
-void BearerCloud::timerEvent(QTimerEvent *)
-{
-    QList<Cloud *> clouds;
-    foreach (QGraphicsItem *item, items()) {
-        if (Cloud *cloud = qgraphicsitem_cast<Cloud *>(item))
-            clouds << cloud;
-    }
-
-    foreach (Cloud *cloud, clouds)
-        cloud->calculateForces();
-
-    bool cloudsMoved = false;
-    foreach (Cloud *cloud, clouds)
-        cloudsMoved |= cloud->advance();
-
-    if (!cloudsMoved) {
-        killTimer(timerId);
-        timerId = 0;
-    }
-}
-
-//! [2]
-void BearerCloud::configurationAdded(const QNetworkConfiguration &config)
-{
-    const QNetworkConfiguration::StateFlags state = config.state();
-
-    configStates.insert(state, config.identifier());
-
-    const qreal radius = Cloud::getRadiusForState(state);
-    const int count = configStates.count(state);
-    const qreal angle = 2 * M_PI / count;
-
-    Cloud *item = new Cloud(config);
-    configurations.insert(config.identifier(), item);
-
-    item->setPos(radius * cos((count-1) * angle + offset[state]),
-                 radius * sin((count-1) * angle + offset[state]));
-
-    addItem(item);
-
-    cloudMoved();
-}
-//! [2]
-
-//! [3]
-void BearerCloud::configurationRemoved(const QNetworkConfiguration &config)
-{
-    foreach (const QNetworkConfiguration::StateFlags &state, configStates.uniqueKeys())
-        configStates.remove(state, config.identifier());
-
-    Cloud *item = configurations.take(config.identifier());
-
-    item->setFinalScale(0.0);
-    item->setDeleteAfterAnimation(true);
-
-    cloudMoved();
-}
-//! [3]
-
-//! [4]
-void BearerCloud::configurationChanged(const QNetworkConfiguration &config)
-{
-    foreach (const QNetworkConfiguration::StateFlags &state, configStates.uniqueKeys())
-        configStates.remove(state, config.identifier());
-
-    configStates.insert(config.state(), config.identifier());
-
-    cloudMoved();
-}
-//! [4]
-
-//! [1]
-void BearerCloud::updateConfigurations()
-{
-    QList<QNetworkConfiguration> allConfigurations = manager.allConfigurations();
-
-    while (!allConfigurations.isEmpty())
-        configurationAdded(allConfigurations.takeFirst());
-
-    cloudMoved();
-}
-//! [1]
-
--- a/qtmobility/examples/bearercloud/bearercloud.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qnetworkconfigmanager.h>
-
-#include <QGraphicsScene>
-#include <QMap>
-#include <QHash>
-
-QTM_USE_NAMESPACE
-
-class Cloud;
-
-class BearerCloud : public QGraphicsScene
-{
-    Q_OBJECT
-
-public:
-    BearerCloud(QObject *parent = 0);
-    ~BearerCloud();
-
-    void cloudMoved();
-
-    void timerEvent(QTimerEvent *event);
-
-private Q_SLOTS:
-    void configurationAdded(const QNetworkConfiguration &config);
-    void configurationRemoved(const QNetworkConfiguration &config);
-    void configurationChanged(const QNetworkConfiguration &config);
-    void updateConfigurations();
-
-private:
-    QNetworkConfigurationManager manager;
-
-    QGraphicsTextItem *thisDevice;
-    QHash<QString, Cloud *> configurations;
-
-    QMap<QNetworkConfiguration::StateFlags, qreal> offset;
-    QMultiMap<QNetworkConfiguration::StateFlags, QString> configStates;
-
-    int timerId;
-};
-
--- a/qtmobility/examples/bearercloud/bearercloud.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-HEADERS = bearercloud.h \
-          cloud.h
-
-SOURCES = main.cpp \
-          bearercloud.cpp \
-          cloud.cpp
-
-RESOURCES = icons.qrc
-
-TARGET = bearercloud
-
-QT = core gui network svg
-
-INCLUDEPATH += ../../src/bearer
-
-include(../examples.pri)
-
-CONFIG += mobility
-MOBILITY = bearer
-
-CONFIG += console
-
-symbian:TARGET.CAPABILITY = NetworkServices ReadUserData
--- a/qtmobility/examples/bearercloud/cloud.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,365 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "cloud.h"
-#include "bearercloud.h"
-
-#include <qnetworksession.h>
-
-#include <QGraphicsTextItem>
-#include <QGraphicsSvgItem>
-#include <QGraphicsSceneMouseEvent>
-#include <QSvgRenderer>
-#include <QPainter>
-
-#include <QDebug>
-
-#include <math.h>
-
-static QMap<QString, QSvgRenderer *> svgCache;
-
-//! [0]
-Cloud::Cloud(const QNetworkConfiguration &config, QGraphicsItem *parent)
-:   QGraphicsItem(parent), configuration(config), deleteAfterAnimation(false)
-{
-    session = new QNetworkSession(configuration, this);
-    connect(session, SIGNAL(newConfigurationActivated()),
-            this, SLOT(newConfigurationActivated()));
-    connect(session, SIGNAL(stateChanged(QNetworkSession::State)),
-            this, SLOT(stateChanged(QNetworkSession::State)));
-
-    setFlag(ItemIsMovable);
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 0))
-    setFlag(ItemSendsGeometryChanges);
-#endif
-    setZValue(1);
-
-    icon = new QGraphicsSvgItem(this);
-    text = new QGraphicsTextItem(this);
-
-    currentScale = 0;
-    finalScale = 1;
-    setTransform(QTransform::fromScale(currentScale, currentScale), false);
-    setOpacity(0);
-
-    newConfigurationActivated();
-}
-//! [0]
-
-Cloud::~Cloud()
-{
-}
-
-void Cloud::setFinalScale(qreal factor)
-{
-    finalScale = factor;
-}
-
-void Cloud::setDeleteAfterAnimation(bool deleteAfter)
-{
-    deleteAfterAnimation = deleteAfter;
-}
-
-void Cloud::calculateForces()
-{
-    if (!scene() || scene()->mouseGrabberItem() == this) {
-        newPos = pos();
-        return;
-    }
-
-    // sum up all the forces push this item away
-    qreal xvel = 0;
-    qreal yvel = 0;
-    QLineF orbitForce;
-    foreach (QGraphicsItem *item, scene()->items()) {
-        // other clouds
-        Cloud *cloud = qgraphicsitem_cast<Cloud *>(item);
-        if (!cloud && item->data(0) != QLatin1String("This Device"))
-            continue;
-
-        qreal factor = 1.0;
-
-        QLineF line(cloud ? item->mapToScene(0, 0) : QPointF(0, 0), mapToScene(0, 0));
-        if (item->data(0) == QLatin1String("This Device"))
-            orbitForce = line;
-
-        if (cloud)
-            factor = cloud->currentScale;
-
-        qreal dx = line.dx();
-        qreal dy = line.dy();
-        double l = 2.0 * (dx * dx + dy * dy);
-        if (l > 0) {
-            xvel += factor * dx * 200.0 / l;
-            yvel += factor * dy * 200.0 / l;
-        }
-    }
-
-    // tendency to stay at a fixed orbit
-    qreal orbit = getRadiusForState(configuration.state());
-    qreal distance = orbitForce.length();
-
-    QLineF unit = orbitForce.unitVector();
-
-    orbitForce.setLength(xvel * unit.dx() + yvel * unit.dy());
-
-    qreal w = 2 - exp(-pow(distance-orbit, 2)/(2 * 50));
-
-    if (distance < orbit) {
-        xvel += orbitForce.dx() * w;
-        yvel += orbitForce.dy() * w;
-    } else {
-        xvel -= orbitForce.dx() * w;
-        yvel -= orbitForce.dy() * w;
-    }
-
-    if (qAbs(xvel) < 0.1 && qAbs(yvel) < 0.1)
-        xvel = yvel = 0;
-
-    QRectF sceneRect = scene()->sceneRect();
-    newPos = pos() + QPointF(xvel, yvel);
-    newPos.setX(qMin(qMax(newPos.x(), sceneRect.left() + 10), sceneRect.right() - 10));
-    newPos.setY(qMin(qMax(newPos.y(), sceneRect.top() + 10), sceneRect.bottom() - 10));
-}
-
-bool Cloud::advance()
-{
-    static const qreal scaleDelta = 0.01;
-
-    bool animated = false;
-
-    if (currentScale < finalScale) {
-        animated = true;
-        currentScale = qMin<qreal>(currentScale + scaleDelta, finalScale);
-        setTransform(QTransform::fromScale(currentScale, currentScale), false);
-    } else if (currentScale > finalScale) {
-        animated = true;
-        currentScale = qMax<qreal>(currentScale - scaleDelta, finalScale);
-        setTransform(QTransform::fromScale(currentScale, currentScale), false);
-    }
-
-    if (newPos != pos()) {
-        setPos(newPos);
-        animated = true;
-    }
-
-    if (opacity() != finalOpacity) {
-        animated = true;
-        if (qAbs(finalScale - currentScale) > 0.0) {
-            // use scale as reference
-            setOpacity(opacity() + scaleDelta * (finalOpacity - opacity()) /
-                       qAbs(finalScale - currentScale));
-        } else {
-            setOpacity(finalOpacity);
-        }
-    }
-
-    if (!animated && deleteAfterAnimation)
-        deleteLater();
-
-    return animated;
-}
-
-QRectF Cloud::boundingRect() const
-{
-    return childrenBoundingRect();
-}
-
-void Cloud::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
-{
-}
-
-//! [4]
-QVariant Cloud::itemChange(GraphicsItemChange change, const QVariant &value)
-{
-    switch (change) {
-    case ItemPositionHasChanged:
-        if (BearerCloud *bearercloud = qobject_cast<BearerCloud *>(scene()))
-            bearercloud->cloudMoved();
-    default:
-        ;
-    };
-
-    return QGraphicsItem::itemChange(change, value);
-}
-//! [4]
-
-//! [3]
-void Cloud::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
-{
-    if (event->button() == Qt::LeftButton) {
-        if (session->isOpen())
-            session->close();
-        else
-            session->open();
-
-        event->accept();
-    }
-}
-//! [3]
-
-//! [2]
-void Cloud::stateChanged(QNetworkSession::State state)
-{
-    if (configuration.name().isEmpty())
-        finalOpacity = qreal(0.1);
-    else if (session->state() == QNetworkSession::NotAvailable)
-        finalOpacity = 0.5;
-    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())
-        tooltip += tr("<b>HIDDEN NETWORK</b><br>");
-    else
-        tooltip += tr("<b>%1</b><br>").arg(configuration.name());
-
-    const QNetworkInterface interface = session->interface();
-    if (interface.isValid())
-        tooltip += tr("<br>Interface: %1").arg(interface.humanReadableName());
-    tooltip += tr("<br>Id: %1").arg(configuration.identifier());
-
-    const QString bearerName = configuration.bearerName();
-    if (!bearerName.isEmpty())
-        tooltip += tr("<br>Bearer: %1").arg(bearerName);
-
-    QString s = tr("<br>State: %1 (%2)");
-    switch (state) {
-    case QNetworkSession::Invalid:
-        s = s.arg(tr("Invalid"));
-        break;
-    case QNetworkSession::NotAvailable:
-        s = s.arg(tr("Not Available"));
-        break;
-    case QNetworkSession::Connecting:
-        s = s.arg(tr("Connecting"));
-        break;
-    case QNetworkSession::Connected:
-        s = s.arg(tr("Connected"));
-        break;
-    case QNetworkSession::Closing:
-        s = s.arg(tr("Closing"));
-        break;
-    case QNetworkSession::Disconnected:
-        s = s.arg(tr("Disconnected"));
-        break;
-    case QNetworkSession::Roaming:
-        s = s.arg(tr("Roaming"));
-        break;
-    default:
-        s = s.arg(tr("Unknown"));
-    }
-
-    if (session->isOpen())
-        s = s.arg(tr("Open"));
-    else
-        s = s.arg(tr("Closed"));
-
-    tooltip += s;
-
-    tooltip += tr("<br><br>Active time: %1 seconds").arg(session->activeTime());
-    tooltip += tr("<br>Received data: %1 bytes").arg(session->bytesReceived());
-    tooltip += tr("<br>Sent data: %1 bytes").arg(session->bytesWritten());
-
-    setToolTip(tooltip);
-#else
-    Q_UNUSED(state);
-#endif
-}
-//! [2]
-
-//! [1]
-void Cloud::newConfigurationActivated()
-{
-    const QString bearerName = configuration.bearerName();
-    if (!svgCache.contains(bearerName)) {
-        if (bearerName == QLatin1String("WLAN"))
-            svgCache.insert(bearerName, new QSvgRenderer(QLatin1String(":wlan.svg")));
-        else if (bearerName == QLatin1String("Ethernet"))
-            svgCache.insert(bearerName, new QSvgRenderer(QLatin1String(":lan.svg")));
-        else
-            svgCache.insert(bearerName, new QSvgRenderer(QLatin1String(":unknown.svg")));
-    }
-
-    icon->setSharedRenderer(svgCache[bearerName]);
-
-    if (configuration.name().isEmpty()) {
-        text->setPlainText(tr("HIDDEN NETWORK"));
-    } else {
-        if (configuration.type() == QNetworkConfiguration::ServiceNetwork)
-            text->setHtml("<b>" + configuration.name() + "</b>");
-        else
-            text->setPlainText(configuration.name());
-    }
-
-    const qreal height = icon->boundingRect().height() + text->boundingRect().height();
-
-    icon->setPos(icon->boundingRect().width() / -2, height / -2);
-
-    text->setPos(text->boundingRect().width() / -2,
-                 height / 2 - text->boundingRect().height());
-
-    stateChanged(session->state());
-}
-//! [1]
-
-qreal Cloud::getRadiusForState(QNetworkConfiguration::StateFlags state)
-{
-    switch (state) {
-    case QNetworkConfiguration::Active:
-        return 100;
-        break;
-    case QNetworkConfiguration::Discovered:
-        return 150;
-        break;
-    case QNetworkConfiguration::Defined:
-        return 200;
-        break;
-    case QNetworkConfiguration::Undefined:
-        return 250;
-        break;
-    default:
-        return 300;
-    }
-}
-
--- a/qtmobility/examples/bearercloud/cloud.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qnetworkconfiguration.h>
-#include <qnetworksession.h>
-
-#include <QGraphicsItem>
-QTM_USE_NAMESPACE
-
-QT_BEGIN_NAMESPACE
-class QGraphicsTextItem;
-class QGraphicsSvgItem;
-QT_END_NAMESPACE
-
-class Cloud : public QObject, public QGraphicsItem
-{
-    Q_OBJECT
-    Q_INTERFACES(QGraphicsItem)
-
-public:
-    explicit Cloud(const QNetworkConfiguration &config, QGraphicsItem *parent = 0);
-    ~Cloud();
-
-    enum { Type = UserType + 1 };
-    int type() const { return Type; }
-
-    void setFinalScale(qreal factor);
-    void setDeleteAfterAnimation(bool deleteAfter);
-
-    void calculateForces();
-
-    bool advance();
-    QRectF boundingRect() const;
-    void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
-
-    static qreal getRadiusForState(QNetworkConfiguration::StateFlags state);
-
-protected:
-    QVariant itemChange(GraphicsItemChange change, const QVariant &value);
-    void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
-
-private Q_SLOTS:
-    void stateChanged(QNetworkSession::State state);
-    void newConfigurationActivated();
-
-private:
-    QNetworkConfiguration configuration;
-    QNetworkSession *session;
-
-    QGraphicsTextItem *text;
-    QGraphicsSvgItem *icon;
-
-    qreal finalOpacity;
-    qreal finalScale;
-    qreal currentScale;
-
-    QPointF newPos;
-
-    bool deleteAfterAnimation;
-};
-
--- a/qtmobility/examples/bearercloud/icons.qrc	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
-    <file>wlan.svg</file>
-    <file>lan.svg</file>
-    <file>unknown.svg</file>
-</qresource>
-</RCC>
--- a/qtmobility/examples/bearercloud/lan.svg	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="25.000002"
-   height="9.6406126"
-   id="svg2"
-   sodipodi:version="0.32"
-   inkscape:version="0.46"
-   version="1.0"
-   sodipodi:docname="lan.svg"
-   inkscape:output_extension="org.inkscape.output.svg.inkscape">
-  <defs
-     id="defs4">
-    <inkscape:perspective
-       sodipodi:type="inkscape:persp3d"
-       inkscape:vp_x="0 : 526.18109 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_z="744.09448 : 526.18109 : 1"
-       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
-       id="perspective10" />
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     gridtolerance="10000"
-     guidetolerance="10"
-     objecttolerance="10"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="19.416667"
-     inkscape:cx="15.244635"
-     inkscape:cy="11.639485"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     inkscape:window-width="1459"
-     inkscape:window-height="964"
-     inkscape:window-x="453"
-     inkscape:window-y="166" />
-  <metadata
-     id="metadata7">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(-4.0978193e-8,-19.359387)">
-    <text
-       xml:space="preserve"
-       style="font-size:13.99289513px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
-       x="-1.1205248"
-       y="29"
-       id="text3239"><tspan
-         sodipodi:role="line"
-         id="tspan3241"
-         x="-1.1205248"
-         y="29">LAN</tspan></text>
-  </g>
-</svg>
--- a/qtmobility/examples/bearercloud/main.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "bearercloud.h"
-
-#include <QApplication>
-#include <QGraphicsView>
-
-class CloudView : public QGraphicsView
-{
-    Q_OBJECT
-
-public:
-    CloudView(QGraphicsScene *scene);
-    ~CloudView() { }
-
-protected:
-    void resizeEvent(QResizeEvent *) {
-        fitInView(sceneRect(), Qt::KeepAspectRatio);
-    }
-#ifdef Q_OS_WINCE
-    void hideEvent(QHideEvent *) {
-        qApp->quit();
-    }
-#endif
-};
-
-CloudView::CloudView(QGraphicsScene *scene)
-:   QGraphicsView(scene)
-{
-    setRenderHints(QPainter::TextAntialiasing | QPainter::Antialiasing |
-                   QPainter::SmoothPixmapTransform);
-#if defined (Q_OS_SYMBIAN) || defined (Q_OS_WINCE)
-    setWindowState(Qt::WindowMaximized);
-#endif
-}
-
-#include "main.moc"
-
-int main(int argc, char *argv[])
-{
-    QApplication app(argc, argv);
-
-    BearerCloud bearerCloud;
-
-    CloudView view(&bearerCloud);
-    view.show();
-
-    return app.exec();
-}
-
--- a/qtmobility/examples/bearercloud/unknown.svg	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="25"
-   height="9.0681238"
-   id="svg2"
-   sodipodi:version="0.32"
-   inkscape:version="0.46"
-   version="1.0"
-   sodipodi:docname="unknown.svg"
-   inkscape:output_extension="org.inkscape.output.svg.inkscape">
-  <defs
-     id="defs4">
-    <inkscape:perspective
-       sodipodi:type="inkscape:persp3d"
-       inkscape:vp_x="0 : 526.18109 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_z="744.09448 : 526.18109 : 1"
-       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
-       id="perspective10" />
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     gridtolerance="10000"
-     guidetolerance="10"
-     objecttolerance="10"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="19.416667"
-     inkscape:cx="15.244635"
-     inkscape:cy="11.639485"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     inkscape:window-width="1459"
-     inkscape:window-height="964"
-     inkscape:window-x="453"
-     inkscape:window-y="166" />
-  <metadata
-     id="metadata7">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(-6.891787e-8,-19.931876)">
-    <text
-       xml:space="preserve"
-       style="font-size:13.16195393px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
-       x="-1.0539845"
-       y="29"
-       id="text3239"><tspan
-         sodipodi:role="line"
-         id="tspan3241"
-         x="-1.0539845"
-         y="29">NET</tspan></text>
-  </g>
-</svg>
--- a/qtmobility/examples/bearercloud/wlan.svg	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="27"
-   height="29"
-   id="svg2"
-   sodipodi:version="0.32"
-   inkscape:version="0.46"
-   version="1.0"
-   sodipodi:docname="wlan.svg"
-   inkscape:output_extension="org.inkscape.output.svg.inkscape">
-  <defs
-     id="defs4">
-    <inkscape:perspective
-       sodipodi:type="inkscape:persp3d"
-       inkscape:vp_x="0 : 526.18109 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_z="744.09448 : 526.18109 : 1"
-       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
-       id="perspective10" />
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     gridtolerance="10000"
-     guidetolerance="10"
-     objecttolerance="10"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="19.416667"
-     inkscape:cx="23.665236"
-     inkscape:cy="11.639485"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     inkscape:window-width="1912"
-     inkscape:window-height="1130"
-     inkscape:window-x="0"
-     inkscape:window-y="0" />
-  <metadata
-     id="metadata7">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer"
-     id="layer1">
-    <g
-       id="g6334"
-       transform="translate(1.0000001,0)">
-      <path
-         id="path2393"
-         d="M 12.500248,9.499893 L 12.500248,28.500095"
-         style="fill:none;fill-rule:evenodd;stroke:#3bb3ff;stroke-width:0.99981093;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
-      <path
-         sodipodi:open="true"
-         sodipodi:end="4.1887902"
-         sodipodi:start="2.0943951"
-         transform="matrix(1.0216765,0,0,1.0324764,0.4493163,-22.692096)"
-         d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
-         sodipodi:ry="3.9141631"
-         sodipodi:rx="3.9141631"
-         sodipodi:cy="30.695278"
-         sodipodi:cx="10.815451"
-         id="path3171"
-         style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.97365081;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
-         sodipodi:type="arc" />
-      <path
-         sodipodi:open="true"
-         sodipodi:end="4.1887902"
-         sodipodi:start="2.0943951"
-         transform="matrix(1.6055152,0,0,1.6224868,-7.5798083,-40.80263)"
-         d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
-         sodipodi:ry="3.9141631"
-         sodipodi:rx="3.9141631"
-         sodipodi:cy="30.695278"
-         sodipodi:cx="10.815451"
-         id="path3175"
-         style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.61958688;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
-         sodipodi:type="arc" />
-      <path
-         sodipodi:open="true"
-         sodipodi:end="4.1887902"
-         sodipodi:start="2.0943951"
-         transform="matrix(2.4812855,0,0,2.5075146,-17.62358,-67.968804)"
-         d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
-         sodipodi:ry="3.9141631"
-         sodipodi:rx="3.9141631"
-         sodipodi:cy="30.695278"
-         sodipodi:cx="10.815451"
-         id="path3177"
-         style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.40090355;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
-         sodipodi:type="arc" />
-      <path
-         sodipodi:open="true"
-         sodipodi:end="4.1887902"
-         sodipodi:start="2.0943951"
-         transform="matrix(-1.0216765,0,0,1.0324764,24.550388,-22.692096)"
-         d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
-         sodipodi:ry="3.9141631"
-         sodipodi:rx="3.9141631"
-         sodipodi:cy="30.695278"
-         sodipodi:cx="10.815451"
-         id="path3179"
-         style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.97365081;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
-         sodipodi:type="arc" />
-      <path
-         sodipodi:open="true"
-         sodipodi:end="4.1887902"
-         sodipodi:start="2.0943951"
-         transform="matrix(-1.6055152,0,0,1.6224868,32.580246,-40.80263)"
-         d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
-         sodipodi:ry="3.9141631"
-         sodipodi:rx="3.9141631"
-         sodipodi:cy="30.695278"
-         sodipodi:cx="10.815451"
-         id="path3181"
-         style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.61958688;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
-         sodipodi:type="arc" />
-      <path
-         sodipodi:open="true"
-         sodipodi:end="4.1887902"
-         sodipodi:start="2.0943951"
-         transform="matrix(-2.4812855,0,0,2.5075146,42.623143,-67.968804)"
-         d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
-         sodipodi:ry="3.9141631"
-         sodipodi:rx="3.9141631"
-         sodipodi:cy="30.695278"
-         sodipodi:cx="10.815451"
-         id="path3183"
-         style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.40090355;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
-         sodipodi:type="arc" />
-    </g>
-  </g>
-</svg>
--- a/qtmobility/examples/bearermonitor/bearermonitor.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,420 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "bearermonitor.h"
-#include "sessionwidget.h"
-
-#include <QDebug>
-#include <QMessageBox>
-#ifdef Q_OS_WIN
-#include <winsock2.h>
-#undef interface
-
-#ifndef NS_NLA
-#define NS_NLA 15
-#endif
-#endif
-
-BearerMonitor::BearerMonitor(QWidget *parent)
-:   QWidget(parent)
-{
-    setupUi(this);
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
-    newSessionButton->hide();
-    deleteSessionButton->hide();
-#else
-    delete tabWidget->currentWidget();
-    sessionGroup->hide();
-#endif
-#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
-    setWindowState(Qt::WindowMaximized);
-#endif
-    updateConfigurations();
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
-    onlineStateChanged(!manager.allConfigurations(QNetworkConfiguration::Active).isEmpty());
-#endif
-    QNetworkConfiguration defaultConfiguration = manager.defaultConfiguration();
-    for (int i = 0; i < treeWidget->topLevelItemCount(); ++i) {
-        QTreeWidgetItem *item = treeWidget->topLevelItem(i);
-
-        if (item->data(0, Qt::UserRole).toString() == defaultConfiguration.identifier()) {
-            treeWidget->setCurrentItem(item);
-            showConfigurationFor(item);
-            break;
-        }
-    }
-    connect(&manager, SIGNAL(onlineStateChanged(bool)), this ,SLOT(onlineStateChanged(bool)));
-    connect(&manager, SIGNAL(configurationAdded(const QNetworkConfiguration&)),
-            this, SLOT(configurationAdded(const QNetworkConfiguration&)));
-    connect(&manager, SIGNAL(configurationRemoved(const QNetworkConfiguration&)),
-            this, SLOT(configurationRemoved(const QNetworkConfiguration&)));
-    connect(&manager, SIGNAL(configurationChanged(const QNetworkConfiguration&)),
-            this, SLOT(configurationChanged(const QNetworkConfiguration)));
-    connect(&manager, SIGNAL(updateCompleted()), this, SLOT(updateConfigurations()));
-
-#ifdef Q_OS_WIN
-    connect(registerButton, SIGNAL(clicked()), this, SLOT(registerNetwork()));
-    connect(unregisterButton, SIGNAL(clicked()), this, SLOT(unregisterNetwork()));
-#else
-    nlaGroup->hide();
-#endif
-
-    connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)),
-            this, SLOT(createSessionFor(QTreeWidgetItem*)));
-
-    connect(treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
-            this, SLOT(showConfigurationFor(QTreeWidgetItem*)));
-
-    connect(newSessionButton, SIGNAL(clicked()),
-            this, SLOT(createNewSession()));
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
-    connect(deleteSessionButton, SIGNAL(clicked()),
-            this, SLOT(deleteSession()));
-#endif
-    connect(scanButton, SIGNAL(clicked()),
-            this, SLOT(performScan()));
-
-    // Just in case update all configurations so that all
-    // configurations are up to date.
-    manager.updateConfigurations();
-}
-
-BearerMonitor::~BearerMonitor()
-{
-}
-
-static void updateItem(QTreeWidgetItem *item, const QNetworkConfiguration &config)
-{
-    item->setText(0, config.name());
-    item->setData(0, Qt::UserRole, config.identifier());
-
-    QFont font = item->font(1);
-    font.setBold((config.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active);
-    item->setFont(0, font);
-}
-
-void BearerMonitor::configurationAdded(const QNetworkConfiguration &config, QTreeWidgetItem *parent)
-{
-    QTreeWidgetItem *item = new QTreeWidgetItem;
-    updateItem(item, config);
-
-    if (parent)
-        parent->addChild(item);
-    else
-        treeWidget->addTopLevelItem(item);
-
-    if (config.type() == QNetworkConfiguration::ServiceNetwork) {
-        foreach (const QNetworkConfiguration &child, config.children())
-            configurationAdded(child, item);
-    }
-}
-
-void BearerMonitor::configurationRemoved(const QNetworkConfiguration &config)
-{
-    for (int i = 0; i < treeWidget->topLevelItemCount(); ++i) {
-        QTreeWidgetItem *item = treeWidget->topLevelItem(i);
-
-        if (item->data(0, Qt::UserRole).toString() == config.identifier()) {
-            delete item;
-            break;
-        }
-    }
-}
-
-void BearerMonitor::configurationChanged(const QNetworkConfiguration &config)
-{
-    for (int i = 0; i < treeWidget->topLevelItemCount(); ++i) {
-        QTreeWidgetItem *item = treeWidget->topLevelItem(i);
-
-        if (item->data(0, Qt::UserRole).toString() == config.identifier()) {
-            updateItem(item, config);
-
-            if (config.type() == QNetworkConfiguration::ServiceNetwork)
-                updateSnapConfiguration(item, config);
-
-            if (item == treeWidget->currentItem())
-                showConfigurationFor(item);
-
-            break;
-        }
-    }
-}
-
-void BearerMonitor::updateSnapConfiguration(QTreeWidgetItem *parent, const QNetworkConfiguration &snap)
-{
-    QMap<QString, QTreeWidgetItem *> itemMap;
-    for (int i = 0; i < parent->childCount(); ++i) {
-        QTreeWidgetItem *item = parent->child(i);
-        itemMap.insert(item->data(0, Qt::UserRole).toString(), item);
-    }
-
-    QList<QNetworkConfiguration> allConfigurations = snap.children();
-
-    while (!allConfigurations.isEmpty()) {
-        QNetworkConfiguration config = allConfigurations.takeFirst();
-
-        QTreeWidgetItem *item = itemMap.take(config.identifier());
-        if (item) {
-            updateItem(item, config);
-
-            if (config.type() == QNetworkConfiguration::ServiceNetwork)
-                updateSnapConfiguration(item, config);
-        } else {
-            configurationAdded(config, parent);
-        }
-    }
-
-    foreach (const QString &id, itemMap.keys())
-        delete itemMap.value(id);
-
-    itemMap.clear();
-}
-
-void BearerMonitor::updateConfigurations()
-{
-    progressBar->hide();
-    scanButton->show();
-
-    // Just in case update online state, on Symbian platform
-    // WLAN scan needs to be triggered initially to have their true state.
-    onlineStateChanged(manager.isOnline());
-
-    QList<QTreeWidgetItem *> items = treeWidget->findItems(QLatin1String("*"), Qt::MatchWildcard);
-    QMap<QString, QTreeWidgetItem *> itemMap;
-    while (!items.isEmpty()) {
-        QTreeWidgetItem *item = items.takeFirst();
-        itemMap.insert(item->data(0, Qt::UserRole).toString(), item);
-    }
-
-    QList<QNetworkConfiguration> allConfigurations = manager.allConfigurations();
-
-    while (!allConfigurations.isEmpty()) {
-        QNetworkConfiguration config = allConfigurations.takeFirst();
-
-        QTreeWidgetItem *item = itemMap.take(config.identifier());
-        if (item) {
-            updateItem(item, config);
-
-            if (config.type() == QNetworkConfiguration::ServiceNetwork)
-                updateSnapConfiguration(item, config);
-        } else {
-            configurationAdded(config);
-        }
-    }
-
-    foreach (const QString &id, itemMap.keys())
-        delete itemMap.value(id);
-}
-
-void BearerMonitor::onlineStateChanged(bool isOnline)
-{
-    if (isOnline)
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
-        QMessageBox::information(this, "Connection state changed", "Online", QMessageBox::Close);
-    else
-        QMessageBox::information(this, "Connection state changed", "Offline", QMessageBox::Close);
-#else
-        onlineState->setText(tr("Online"));
-    else
-        onlineState->setText(tr("Offline"));
-#endif
-}
-
-#ifdef Q_OS_WIN
-void BearerMonitor::registerNetwork()
-{
-    QTreeWidgetItem *item = treeWidget->currentItem();
-    if (!item) return;
-
-    QNetworkConfiguration configuration =
-        manager.configurationFromIdentifier(item->data(0, Qt::UserRole).toString());
-
-    const QString name = configuration.name();
-
-    qDebug() << "Registering" << name << "with system";
-
-    WSAQUERYSET networkInfo;
-    memset(&networkInfo, 0, sizeof(networkInfo));
-    networkInfo.dwSize = sizeof(networkInfo);
-    networkInfo.lpszServiceInstanceName = (LPWSTR)name.utf16();
-    networkInfo.dwNameSpace = NS_NLA;
-
-    if (WSASetService(&networkInfo, RNRSERVICE_REGISTER, 0) == SOCKET_ERROR)
-        qDebug() << "WSASetService(RNRSERVICE_REGISTER) returned" << WSAGetLastError();
-}
-
-void BearerMonitor::unregisterNetwork()
-{
-    QTreeWidgetItem *item = treeWidget->currentItem();
-    if (!item) return;
-
-    QNetworkConfiguration configuration =
-        manager.configurationFromIdentifier(item->data(0, Qt::UserRole).toString());
-
-    const QString name = configuration.name();
-
-    qDebug() << "Unregistering" << name << "with system";
-
-    WSAQUERYSET networkInfo;
-    memset(&networkInfo, 0, sizeof(networkInfo));
-    networkInfo.dwSize = sizeof(networkInfo);
-    networkInfo.lpszServiceInstanceName = (LPWSTR)name.utf16();
-    networkInfo.dwNameSpace = NS_NLA;
-
-    if (WSASetService(&networkInfo, RNRSERVICE_DELETE, 0) == SOCKET_ERROR)
-        qDebug() << "WSASetService(RNRSERVICE_DELETE) returned" << WSAGetLastError();
-}
-#endif
-
-void BearerMonitor::showConfigurationFor(QTreeWidgetItem *item)
-{
-    QString identifier;
-
-    if (item)
-        identifier = item->data(0, Qt::UserRole).toString();
-
-    QNetworkConfiguration conf = manager.configurationFromIdentifier(identifier);
-
-    switch (conf.state()) {
-    case QNetworkConfiguration::Active:
-        configurationState->setText(tr("Active"));
-        break;
-    case QNetworkConfiguration::Discovered:
-        configurationState->setText(tr("Discovered"));
-        break;
-    case QNetworkConfiguration::Defined:
-        configurationState->setText(tr("Defined"));
-        break;
-    case QNetworkConfiguration::Undefined:
-        configurationState->setText(tr("Undefined"));
-        break;
-    default:
-        configurationState->setText(QString());
-    }
-
-    switch (conf.type()) {
-    case QNetworkConfiguration::InternetAccessPoint:
-        configurationType->setText(tr("Internet Access Point"));
-        break;
-    case QNetworkConfiguration::ServiceNetwork:
-        configurationType->setText(tr("Service Network"));
-        break;
-    case QNetworkConfiguration::UserChoice:
-        configurationType->setText(tr("User Choice"));
-        break;
-    case QNetworkConfiguration::Invalid:
-        configurationType->setText(tr("Invalid"));
-        break;
-    default:
-        configurationType->setText(QString());
-    }
-
-    switch (conf.purpose()) {
-    case QNetworkConfiguration::UnknownPurpose:
-        configurationPurpose->setText(tr("Unknown"));
-        break;
-    case QNetworkConfiguration::PublicPurpose:
-        configurationPurpose->setText(tr("Public"));
-        break;
-    case QNetworkConfiguration::PrivatePurpose:
-        configurationPurpose->setText(tr("Private"));
-        break;
-    case QNetworkConfiguration::ServiceSpecificPurpose:
-        configurationPurpose->setText(tr("Service Specific"));
-        break;
-    default:
-        configurationPurpose->setText(QString());
-    }
-
-    configurationIdentifier->setText(conf.identifier());
-
-    configurationRoaming->setText(conf.isRoamingAvailable() ? tr("Available") : tr("Not available"));
-
-    configurationChildren->setText(QString::number(conf.children().count()));
-
-    configurationName->setText(conf.name());
-}
-
-void BearerMonitor::createSessionFor(QTreeWidgetItem *item)
-{
-    const QString identifier = item->data(0, Qt::UserRole).toString();
-
-    QNetworkConfiguration conf = manager.configurationFromIdentifier(identifier);
-
-    SessionWidget *session = new SessionWidget(conf);
-
-    tabWidget->addTab(session, conf.name());
-
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
-    sessionGroup->show();
-#endif
-
-    sessionWidgets.append(session);
-}
-
-void BearerMonitor::createNewSession()
-{
-    QTreeWidgetItem *item = treeWidget->currentItem();
-    if (!item) return;
-
-    createSessionFor(item);
-}
-
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
-void BearerMonitor::deleteSession()
-{
-    SessionWidget *session = qobject_cast<SessionWidget *>(tabWidget->currentWidget());
-    if (session) {
-        sessionWidgets.removeAll(session);
-
-        delete session;
-
-        if (tabWidget->count() == 0)
-            sessionGroup->hide();
-    }
-}
-#endif
-
-void BearerMonitor::performScan()
-{
-    scanButton->hide();
-    progressBar->show();
-    manager.updateConfigurations();
-}
--- a/qtmobility/examples/bearermonitor/bearermonitor.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef BEARERMONITOR_H
-#define BEARERMONITOR_H
-
-#include <qnetworkconfigmanager.h>
-#include <qnetworksession.h>
-#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE)	
-#include "ui_bearermonitor_240_320.h"
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
-#include "ui_bearermonitor_maemo.h"
-#else
-#include "ui_bearermonitor_640_480.h"
-#endif
-
-QTM_USE_NAMESPACE
-
-class SessionWidget;
-
-class BearerMonitor : public QWidget, public Ui_BearerMonitor
-{
-    Q_OBJECT
-
-public:
-    BearerMonitor(QWidget *parent = 0);
-    ~BearerMonitor();
-
-private slots:
-    void configurationAdded(const QNetworkConfiguration &config, QTreeWidgetItem *parent = 0);
-    void configurationRemoved(const QNetworkConfiguration &config);
-    void configurationChanged(const QNetworkConfiguration &config);
-    void updateSnapConfiguration(QTreeWidgetItem *parent, const QNetworkConfiguration &snap);
-    void updateConfigurations();
-
-    void onlineStateChanged(bool isOnline);
-
-#ifdef Q_OS_WIN
-    void registerNetwork();
-    void unregisterNetwork();
-#endif
-
-    void showConfigurationFor(QTreeWidgetItem *item);
-
-    void createSessionFor(QTreeWidgetItem *item);
-    void createNewSession();
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
-    void deleteSession();
-#endif
-    void performScan();
-
-private:
-    QNetworkConfigurationManager manager;
-    QList<SessionWidget *> sessionWidgets;
-};
-
-#endif //BEARERMONITOR_H
--- a/qtmobility/examples/bearermonitor/bearermonitor.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-TARGET = bearermonitor
-QT = core gui network
-
-INCLUDEPATH += ../../src/bearer
-include(../examples.pri)
-
-CONFIG += mobility
-MOBILITY = bearer
-
-HEADERS = sessionwidget.h \
-          bearermonitor.h
-
-SOURCES = main.cpp \
-          bearermonitor.cpp \
-          sessionwidget.cpp
-
-maemo5|maemo6 {
-  FORMS = bearermonitor_maemo.ui \
-          sessionwidget_maemo.ui
-} else {
-  FORMS = bearermonitor_240_320.ui \
-          bearermonitor_640_480.ui \
-          sessionwidget.ui
-}
-
-win32:!wince*:LIBS += -lWs2_32
-wince*:LIBS += -lWs2
-
-CONFIG += console
-
-symbian:TARGET.CAPABILITY = NetworkServices ReadUserData
--- a/qtmobility/examples/bearermonitor/bearermonitor_240_320.ui	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>BearerMonitor</class>
- <widget class="QWidget" name="BearerMonitor">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>240</width>
-    <height>320</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>BearerMonitor</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout_5">
-   <item>
-    <widget class="QScrollArea" name="scrollArea">
-     <property name="frameShape">
-      <enum>QFrame::NoFrame</enum>
-     </property>
-     <property name="frameShadow">
-      <enum>QFrame::Plain</enum>
-     </property>
-     <property name="widgetResizable">
-      <bool>true</bool>
-     </property>
-     <widget class="QWidget" name="scrollAreaWidgetContents">
-      <property name="geometry">
-       <rect>
-        <x>0</x>
-        <y>-274</y>
-        <width>206</width>
-        <height>576</height>
-       </rect>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
-       <item>
-        <widget class="QGroupBox" name="systemState">
-         <property name="title">
-          <string>System State</string>
-         </property>
-         <property name="flat">
-          <bool>true</bool>
-         </property>
-         <layout class="QVBoxLayout" name="verticalLayout_4">
-          <property name="leftMargin">
-           <number>0</number>
-          </property>
-          <property name="rightMargin">
-           <number>0</number>
-          </property>
-          <property name="bottomMargin">
-           <number>0</number>
-          </property>
-          <item>
-           <layout class="QHBoxLayout" name="onlineStateLayout">
-            <item>
-             <widget class="QLabel" name="onlineStateLabel">
-              <property name="text">
-               <string>Online State:</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QLabel" name="onlineState">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="text">
-               <string/>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </item>
-         </layout>
-        </widget>
-       </item>
-       <item>
-        <widget class="QGroupBox" name="groupBox">
-         <property name="title">
-          <string>Configurations</string>
-         </property>
-         <property name="flat">
-          <bool>true</bool>
-         </property>
-         <layout class="QHBoxLayout" name="horizontalLayout_9">
-          <property name="leftMargin">
-           <number>0</number>
-          </property>
-          <property name="rightMargin">
-           <number>0</number>
-          </property>
-          <property name="bottomMargin">
-           <number>0</number>
-          </property>
-          <item>
-           <layout class="QVBoxLayout" name="verticalLayout">
-            <item>
-             <layout class="QHBoxLayout" name="configurationNameLayout">
-              <item>
-               <widget class="QLabel" name="configurationNameLabel">
-                <property name="text">
-                 <string>Name:</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="configurationName">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="text">
-                 <string/>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </item>
-            <item>
-             <layout class="QHBoxLayout" name="configurationStateLayout">
-              <item>
-               <widget class="QLabel" name="configurationStateLabel">
-                <property name="text">
-                 <string>State:</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="configurationState">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="text">
-                 <string/>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </item>
-            <item>
-             <layout class="QHBoxLayout" name="configurationTypeLayout">
-              <item>
-               <widget class="QLabel" name="configurationTypeLabel">
-                <property name="text">
-                 <string>Type:</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="configurationType">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="text">
-                 <string>Invalid</string>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </item>
-            <item>
-             <layout class="QHBoxLayout" name="configurationPurposeLayout">
-              <item>
-               <widget class="QLabel" name="configurationPurposeLabel">
-                <property name="text">
-                 <string>Purpose:</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="configurationPurpose">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="text">
-                 <string>Unknown</string>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </item>
-            <item>
-             <layout class="QHBoxLayout" name="configurationIdentifierLayout">
-              <item>
-               <widget class="QLabel" name="configurationIdentifierLabel">
-                <property name="text">
-                 <string>Identifier:</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="configurationIdentifier">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="text">
-                 <string/>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </item>
-            <item>
-             <layout class="QHBoxLayout" name="configurationRoamingLayout">
-              <item>
-               <widget class="QLabel" name="configurationRoamingLabel">
-                <property name="text">
-                 <string>Roaming:</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="configurationRoaming">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="text">
-                 <string/>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </item>
-            <item>
-             <layout class="QHBoxLayout" name="configurationChildrenLayout">
-              <item>
-               <widget class="QLabel" name="configurationChildrenLabel">
-                <property name="text">
-                 <string>Children:</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="configurationChildren">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="text">
-                 <string/>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </item>
-            <item>
-             <widget class="QGroupBox" name="nlaGroup">
-              <property name="title">
-               <string>Network Location Awareness</string>
-              </property>
-              <layout class="QHBoxLayout" name="horizontalLayout">
-               <item>
-                <widget class="QPushButton" name="registerButton">
-                 <property name="text">
-                  <string>Register</string>
-                 </property>
-                </widget>
-               </item>
-               <item>
-                <widget class="QPushButton" name="unregisterButton">
-                 <property name="text">
-                  <string>Unregister</string>
-                 </property>
-                </widget>
-               </item>
-              </layout>
-             </widget>
-            </item>
-            <item>
-             <widget class="QPushButton" name="newSessionButton">
-              <property name="text">
-               <string>New Session</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QPushButton" name="deleteSessionButton">
-              <property name="text">
-               <string>Delete Session</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QPushButton" name="scanButton">
-              <property name="text">
-               <string>Scan</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QProgressBar" name="progressBar">
-              <property name="maximum">
-               <number>0</number>
-              </property>
-              <property name="value">
-               <number>-1</number>
-              </property>
-              <property name="textVisible">
-               <bool>false</bool>
-              </property>
-              <property name="invertedAppearance">
-               <bool>false</bool>
-              </property>
-              <property name="format">
-               <string>%p%</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <spacer name="verticalSpacer">
-              <property name="orientation">
-               <enum>Qt::Vertical</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>20</width>
-                <height>40</height>
-               </size>
-              </property>
-             </spacer>
-            </item>
-            <item>
-             <widget class="QTreeWidget" name="treeWidget">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <property name="verticalScrollBarPolicy">
-               <enum>Qt::ScrollBarAlwaysOff</enum>
-              </property>
-              <attribute name="headerVisible">
-               <bool>false</bool>
-              </attribute>
-              <column>
-               <property name="text">
-                <string>1</string>
-               </property>
-              </column>
-             </widget>
-            </item>
-           </layout>
-          </item>
-         </layout>
-        </widget>
-       </item>
-       <item>
-        <widget class="QGroupBox" name="sessionGroup">
-         <property name="title">
-          <string>Sessions</string>
-         </property>
-         <property name="flat">
-          <bool>true</bool>
-         </property>
-         <layout class="QVBoxLayout" name="verticalLayout_3">
-          <property name="leftMargin">
-           <number>0</number>
-          </property>
-          <property name="rightMargin">
-           <number>0</number>
-          </property>
-          <property name="bottomMargin">
-           <number>0</number>
-          </property>
-          <item>
-           <widget class="QTabWidget" name="tabWidget">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="currentIndex">
-             <number>0</number>
-            </property>
-            <widget class="QWidget" name="tab">
-             <attribute name="title">
-              <string>Session 1</string>
-             </attribute>
-            </widget>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
--- a/qtmobility/examples/bearermonitor/bearermonitor_640_480.ui	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,386 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>BearerMonitor</class>
- <widget class="QWidget" name="BearerMonitor">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>640</width>
-    <height>515</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>BearerMonitor</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="0" column="0">
-    <widget class="QGroupBox" name="systemState">
-     <property name="title">
-      <string>System State</string>
-     </property>
-     <property name="flat">
-      <bool>true</bool>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_4">
-      <property name="leftMargin">
-       <number>0</number>
-      </property>
-      <property name="rightMargin">
-       <number>0</number>
-      </property>
-      <property name="bottomMargin">
-       <number>0</number>
-      </property>
-      <item>
-       <layout class="QHBoxLayout" name="onlineStateLayout">
-        <item>
-         <widget class="QLabel" name="onlineStateLabel">
-          <property name="text">
-           <string>Online State:</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QLabel" name="onlineState">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="1" column="0">
-    <widget class="QGroupBox" name="groupBox">
-     <property name="title">
-      <string>Configurations</string>
-     </property>
-     <property name="flat">
-      <bool>true</bool>
-     </property>
-     <layout class="QHBoxLayout" name="horizontalLayout_9">
-      <property name="leftMargin">
-       <number>0</number>
-      </property>
-      <property name="rightMargin">
-       <number>0</number>
-      </property>
-      <property name="bottomMargin">
-       <number>0</number>
-      </property>
-      <item>
-       <widget class="QTreeWidget" name="treeWidget">
-        <attribute name="headerVisible">
-         <bool>false</bool>
-        </attribute>
-        <column>
-         <property name="text">
-          <string>1</string>
-         </property>
-        </column>
-       </widget>
-      </item>
-      <item>
-       <layout class="QVBoxLayout" name="verticalLayout">
-        <item>
-         <layout class="QHBoxLayout" name="configurationNameLayout">
-          <item>
-           <widget class="QLabel" name="configurationNameLabel">
-            <property name="text">
-             <string>Name:</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QLabel" name="configurationName">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text">
-             <string/>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-        <item>
-         <layout class="QHBoxLayout" name="configurationStateLayout">
-          <item>
-           <widget class="QLabel" name="configurationStateLabel">
-            <property name="text">
-             <string>State:</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QLabel" name="configurationState">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text">
-             <string/>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-        <item>
-         <layout class="QHBoxLayout" name="configurationTypeLayout">
-          <item>
-           <widget class="QLabel" name="configurationTypeLabel">
-            <property name="text">
-             <string>Type:</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QLabel" name="configurationType">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text">
-             <string>Invalid</string>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-        <item>
-         <layout class="QHBoxLayout" name="configurationPurposeLayout">
-          <item>
-           <widget class="QLabel" name="configurationPurposeLabel">
-            <property name="text">
-             <string>Purpose:</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QLabel" name="configurationPurpose">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text">
-             <string>Unknown</string>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-        <item>
-         <layout class="QHBoxLayout" name="configurationIdentifierLayout">
-          <item>
-           <widget class="QLabel" name="configurationIdentifierLabel">
-            <property name="text">
-             <string>Identifier:</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QLabel" name="configurationIdentifier">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text">
-             <string/>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-        <item>
-         <layout class="QHBoxLayout" name="configurationRoamingLayout">
-          <item>
-           <widget class="QLabel" name="configurationRoamingLabel">
-            <property name="text">
-             <string>Roaming:</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QLabel" name="configurationRoaming">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text">
-             <string/>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-        <item>
-         <layout class="QHBoxLayout" name="configurationChildrenLayout">
-          <item>
-           <widget class="QLabel" name="configurationChildrenLabel">
-            <property name="text">
-             <string>Children:</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QLabel" name="configurationChildren">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="text">
-             <string/>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-        <item>
-         <widget class="QGroupBox" name="nlaGroup">
-          <property name="title">
-           <string>Network Location Awareness</string>
-          </property>
-          <layout class="QHBoxLayout" name="horizontalLayout">
-           <item>
-            <widget class="QPushButton" name="registerButton">
-             <property name="text">
-              <string>Register</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="unregisterButton">
-             <property name="text">
-              <string>Unregister</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </widget>
-        </item>
-        <item>
-         <widget class="QPushButton" name="newSessionButton">
-          <property name="text">
-           <string>New Session</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QPushButton" name="deleteSessionButton">
-          <property name="text">
-           <string>Delete Session</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QPushButton" name="scanButton">
-          <property name="text">
-           <string>Scan</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QProgressBar" name="progressBar">
-          <property name="maximum">
-           <number>0</number>
-          </property>
-          <property name="value">
-           <number>-1</number>
-          </property>
-          <property name="textVisible">
-           <bool>false</bool>
-          </property>
-          <property name="invertedAppearance">
-           <bool>false</bool>
-          </property>
-          <property name="format">
-           <string>%p%</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <spacer name="verticalSpacer">
-          <property name="orientation">
-           <enum>Qt::Vertical</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>20</width>
-            <height>40</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-       </layout>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="2" column="0">
-    <widget class="QGroupBox" name="sessionGroup">
-     <property name="title">
-      <string>Sessions</string>
-     </property>
-     <property name="flat">
-      <bool>true</bool>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_3">
-      <property name="leftMargin">
-       <number>0</number>
-      </property>
-      <property name="rightMargin">
-       <number>0</number>
-      </property>
-      <property name="bottomMargin">
-       <number>0</number>
-      </property>
-      <item>
-       <widget class="QTabWidget" name="tabWidget">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="currentIndex">
-         <number>0</number>
-        </property>
-        <widget class="QWidget" name="tab">
-         <attribute name="title">
-          <string>Session 1</string>
-         </attribute>
-        </widget>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
--- a/qtmobility/examples/bearermonitor/bearermonitor_maemo.ui	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,310 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>BearerMonitor</class>
- <widget class="QWidget" name="BearerMonitor">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>612</width>
-    <height>495</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>BearerMonitor</string>
-  </property>
-  <layout class="QHBoxLayout" name="horizontalLayout_3">
-   <item>
-    <widget class="QTabWidget" name="tabWidget">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="currentIndex">
-      <number>0</number>
-     </property>
-     <property name="usesScrollButtons">
-      <bool>false</bool>
-     </property>
-     <widget class="QWidget" name="tab">
-      <attribute name="title">
-       <string>Configurations</string>
-      </attribute>
-      <layout class="QHBoxLayout" name="horizontalLayout_2">
-       <item>
-        <widget class="QTreeWidget" name="treeWidget">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <attribute name="headerVisible">
-          <bool>false</bool>
-         </attribute>
-         <column>
-          <property name="text">
-           <string>1</string>
-          </property>
-         </column>
-        </widget>
-       </item>
-       <item>
-        <layout class="QVBoxLayout" name="verticalLayout_2">
-         <item>
-          <layout class="QHBoxLayout" name="configurationNameLayout">
-           <item>
-            <widget class="QLabel" name="configurationNameLabel">
-             <property name="text">
-              <string>Name:</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="configurationName">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string/>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <layout class="QHBoxLayout" name="configurationStateLayout">
-           <item>
-            <widget class="QLabel" name="configurationStateLabel">
-             <property name="text">
-              <string>State:</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="configurationState">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string/>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <layout class="QHBoxLayout" name="configurationTypeLayout">
-           <item>
-            <widget class="QLabel" name="configurationTypeLabel">
-             <property name="text">
-              <string>Type:</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="configurationType">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string>Invalid</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <layout class="QHBoxLayout" name="configurationPurposeLayout">
-           <item>
-            <widget class="QLabel" name="configurationPurposeLabel">
-             <property name="text">
-              <string>Purpose:</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="configurationPurpose">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string>Unknown</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <layout class="QHBoxLayout" name="configurationIdentifierLayout">
-           <item>
-            <widget class="QLabel" name="configurationIdentifierLabel">
-             <property name="text">
-              <string>Identifier:</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="configurationIdentifier">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string/>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <layout class="QHBoxLayout" name="configurationRoamingLayout">
-           <item>
-            <widget class="QLabel" name="configurationRoamingLabel">
-             <property name="text">
-              <string>Roaming:</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="configurationRoaming">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string/>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <layout class="QHBoxLayout" name="configurationChildrenLayout">
-           <item>
-            <widget class="QLabel" name="configurationChildrenLabel">
-             <property name="text">
-              <string>Children:</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="configurationChildren">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string/>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <widget class="QGroupBox" name="nlaGroup">
-           <property name="title">
-            <string>Network Location Awareness</string>
-           </property>
-           <layout class="QHBoxLayout" name="horizontalLayout">
-            <item>
-             <widget class="QPushButton" name="registerButton">
-              <property name="text">
-               <string>Register</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QPushButton" name="unregisterButton">
-              <property name="text">
-               <string>Unregister</string>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </widget>
-         </item>
-         <item>
-          <widget class="QPushButton" name="newSessionButton">
-           <property name="text">
-            <string>New Session</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QPushButton" name="deleteSessionButton">
-           <property name="text">
-            <string>Delete Session</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QPushButton" name="scanButton">
-           <property name="text">
-            <string>Scan</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QProgressBar" name="progressBar">
-           <property name="maximum">
-            <number>0</number>
-           </property>
-           <property name="value">
-            <number>23280</number>
-           </property>
-           <property name="textVisible">
-            <bool>false</bool>
-           </property>
-           <property name="invertedAppearance">
-            <bool>false</bool>
-           </property>
-           <property name="format">
-            <string>%p%</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer name="verticalSpacer">
-           <property name="orientation">
-            <enum>Qt::Vertical</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>20</width>
-             <height>40</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-      </layout>
-     </widget>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
--- a/qtmobility/examples/bearermonitor/main.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QApplication>
-
-#include "bearermonitor.h"
-
-int main(int argc, char *argv[])
-{
-    QApplication app(argc, argv);
-
-    BearerMonitor monitor;
-    monitor.show();
-
-    return app.exec();
-}
-
--- a/qtmobility/examples/bearermonitor/sessionwidget.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "sessionwidget.h"
-#include "qnetworkconfigmanager.h"
-
-SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *parent)
-:   QWidget(parent)
-{
-    setupUi(this);
-
-    session = new QNetworkSession(config, this);
-
-    connect(session, SIGNAL(stateChanged(QNetworkSession::State)),
-            this, SLOT(updateSession()));
-    connect(session, SIGNAL(error(QNetworkSession::SessionError)),
-            this, SLOT(updateSessionError(QNetworkSession::SessionError)));
-
-    updateSession();
-
-    sessionId->setText(QString("0x%1").arg(qulonglong(session), 8, 16, QChar('0')));
-
-    configuration->setText(session->configuration().name());
-
-    connect(openSessionButton, SIGNAL(clicked()),
-            this, SLOT(openSession()));
-    connect(openSyncSessionButton, SIGNAL(clicked()),
-            this, SLOT(openSyncSession()));
-    connect(closeSessionButton, SIGNAL(clicked()),
-            this, SLOT(closeSession()));
-    connect(stopSessionButton, SIGNAL(clicked()),
-            this, SLOT(stopSession()));
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
-    connect(deleteSessionButton, SIGNAL(clicked()),
-            this, SLOT(deleteSession()));
-#endif
-}
-
-SessionWidget::~SessionWidget()
-{
-    delete session;
-}
-
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
-void SessionWidget::deleteSession()
-{
-    delete this;
-}
-#endif
-
-void SessionWidget::updateSession()
-{
-    updateSessionState(session->state());
-
-    if (session->configuration().type() == QNetworkConfiguration::InternetAccessPoint)
-        bearer->setText(session->configuration().bearerName());
-    else {
-        QNetworkConfigurationManager mgr;
-        QNetworkConfiguration c = mgr.configurationFromIdentifier(session->sessionProperty("ActiveConfiguration").toString());
-        bearer->setText(c.bearerName());
-    }
-
-    interfaceName->setText(session->interface().humanReadableName());
-    interfaceGuid->setText(session->interface().name());
-}
-
-void SessionWidget::openSession()
-{
-    clearError();
-    session->open();
-    updateSession();
-}
-
-void SessionWidget::openSyncSession()
-{
-    clearError();
-    session->open();
-    session->waitForOpened();
-    updateSession();
-}
-
-void SessionWidget::closeSession()
-{
-    clearError();
-    session->close();
-    updateSession();
-}
-
-void SessionWidget::stopSession()
-{
-    clearError();
-    session->stop();
-    updateSession();
-}
-
-void SessionWidget::updateSessionState(QNetworkSession::State state)
-{
-    QString s = tr("%1 (%2)");
-
-    switch (state) {
-    case QNetworkSession::Invalid:
-        s = s.arg(tr("Invalid"));
-        break;
-    case QNetworkSession::NotAvailable:
-        s = s.arg(tr("Not Available"));
-        break;
-    case QNetworkSession::Connecting:
-        s = s.arg(tr("Connecting"));
-        break;
-    case QNetworkSession::Connected:
-        s = s.arg(tr("Connected"));
-        break;
-    case QNetworkSession::Closing:
-        s = s.arg(tr("Closing"));
-        break;
-    case QNetworkSession::Disconnected:
-        s = s.arg(tr("Disconnected"));
-        break;
-    case QNetworkSession::Roaming:
-        s = s.arg(tr("Roaming"));
-        break;
-    default:
-        s = s.arg(tr("Unknown"));
-    }
-
-    if (session->isOpen())
-        s = s.arg(tr("Open"));
-    else
-        s = s.arg(tr("Closed"));
-
-    sessionState->setText(s);
-}
-
-void SessionWidget::updateSessionError(QNetworkSession::SessionError error)
-{
-    lastError->setText(QString::number(error));
-    errorString->setText(session->errorString());
-}
-
-void SessionWidget::clearError()
-{
-    lastError->clear();
-    errorString->clear();
-}
--- a/qtmobility/examples/bearermonitor/sessionwidget.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef SESSIONWIDGET_H
-#define SESSIONWIDGET_H
-
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
-#include "ui_sessionwidget_maemo.h"
-#else
-#include "ui_sessionwidget.h"
-#endif
-#include <qnetworksession.h>
-
-QTM_USE_NAMESPACE
-
-class SessionWidget : public QWidget, public Ui_SessionWidget
-{
-    Q_OBJECT
-
-public:
-    explicit SessionWidget(const QNetworkConfiguration &config, QWidget *parent = 0);
-    ~SessionWidget();
-
-private:
-    void updateSessionState(QNetworkSession::State state);
-    void clearError();
-
-private Q_SLOTS:
-    void openSession();
-    void openSyncSession();
-    void closeSession();
-    void stopSession();
-    void updateSession();
-    void updateSessionError(QNetworkSession::SessionError error);
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
-    void deleteSession();
-#endif
-
-
-private:
-    QNetworkSession *session;
-};
-
-#endif
-
--- a/qtmobility/examples/bearermonitor/sessionwidget.ui	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,259 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>SessionWidget</class>
- <widget class="QWidget" name="SessionWidget">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>340</width>
-    <height>286</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Session Details</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout_2">
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout">
-     <item>
-      <layout class="QHBoxLayout" name="sessionIdLayout">
-       <item>
-        <widget class="QLabel" name="sessionIdLabel">
-         <property name="text">
-          <string>Session ID:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="sessionId">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="sessionStateLayout">
-       <item>
-        <widget class="QLabel" name="sessionStateLabel">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Session State:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="sessionState">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Invalid</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="configurationLayout">
-       <item>
-        <widget class="QLabel" name="configurationLabel">
-         <property name="text">
-          <string>Configuration:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="configuration">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="bearerLayout">
-       <item>
-        <widget class="QLabel" name="bearerLabel">
-         <property name="text">
-          <string>Bearer:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="bearer">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="interfaceNameLayout">
-       <item>
-        <widget class="QLabel" name="interfaceNameLabel">
-         <property name="text">
-          <string>Interface Name:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="interfaceName">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="interfaceGuidLayout">
-       <item>
-        <widget class="QLabel" name="interfaceGuidLabel">
-         <property name="text">
-          <string>Interface GUID:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="interfaceGuid">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="lastErrorLayout">
-       <item>
-        <widget class="QLabel" name="lastErrorLabel">
-         <property name="text">
-          <string>Last Error:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="lastError">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="errorStringLayout">
-       <item>
-        <widget class="QLabel" name="errorStringLabel">
-         <property name="text">
-          <string>Error String:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="errorString">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="horizontalLayout">
-       <item>
-        <widget class="QPushButton" name="openSessionButton">
-         <property name="text">
-          <string>Open</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QPushButton" name="openSyncSessionButton">
-         <property name="text">
-          <string>Blocking Open</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="horizontalLayout_2">
-       <item>
-        <widget class="QPushButton" name="closeSessionButton">
-         <property name="text">
-          <string>Close</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QPushButton" name="stopSessionButton">
-         <property name="text">
-          <string>Stop</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
--- a/qtmobility/examples/bearermonitor/sessionwidget_maemo.ui	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,262 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>SessionWidget</class>
- <widget class="QWidget" name="SessionWidget">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>497</width>
-    <height>615</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Session Details</string>
-  </property>
-  <layout class="QHBoxLayout" name="horizontalLayout">
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout">
-     <item>
-      <layout class="QHBoxLayout" name="sessionIdLayout">
-       <item>
-        <widget class="QLabel" name="sessionIdLabel">
-         <property name="text">
-          <string>Session ID:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="sessionId">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="sessionStateLayout">
-       <item>
-        <widget class="QLabel" name="sessionStateLabel">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Session State:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="sessionState">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string>Invalid</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="configurationLayout">
-       <item>
-        <widget class="QLabel" name="configurationLabel">
-         <property name="text">
-          <string>Configuration:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="configuration">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="bearerLayout">
-       <item>
-        <widget class="QLabel" name="bearerLabel">
-         <property name="text">
-          <string>Bearer:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="bearer">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="interfaceNameLayout">
-       <item>
-        <widget class="QLabel" name="interfaceNameLabel">
-         <property name="text">
-          <string>Interface Name:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="interfaceName">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="interfaceGuidLayout">
-       <item>
-        <widget class="QLabel" name="interfaceGuidLabel">
-         <property name="text">
-          <string>Interface GUID:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="interfaceGuid">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="lastErrorLayout">
-       <item>
-        <widget class="QLabel" name="lastErrorLabel">
-         <property name="text">
-          <string>Last Error:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="lastError">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="errorStringLayout">
-       <item>
-        <widget class="QLabel" name="errorStringLabel">
-         <property name="text">
-          <string>Error String</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="errorString">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout_2">
-     <item>
-      <widget class="QPushButton" name="openSessionButton">
-       <property name="text">
-        <string>Open</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="closeSessionButton">
-       <property name="text">
-        <string>Close</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="openSyncSessionButton">
-       <property name="text">
-        <string>Blocking Open</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="stopSessionButton">
-       <property name="text">
-        <string>Stop</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="deleteSessionButton">
-       <property name="text">
-        <string>Delete</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
--- a/qtmobility/examples/examples.pri	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-include(../staticconfig.pri)
-        
-#!contains(build_examples, yes):error(Please use the -examples configure switch to enable building of examples)
-
-win32:contains(CONFIG_WIN32,build_all):Win32DebugAndRelease=yes
-mac | contains(Win32DebugAndRelease,yes) {
-    #due to different debug/release library names we have to comply with 
-    #whatever Qt does
-    !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) {
-        CONFIG -= debug_and_release debug release
-        contains(QT_CONFIG,debug): CONFIG+=debug
-        contains(QT_CONFIG,release): CONFIG+=release
-    }
-}
-
-CONFIG(debug, debug|release) {
-    SUBDIRPART=Debug
-} else {
-    SUBDIRPART=Release
-}
-
-OUTPUT_DIR = $$QT_MOBILITY_BUILD_TREE
-MOC_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/moc
-RCC_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/rcc
-UI_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/ui
-OBJECTS_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET
-mac:LIBS+= -F$$OUTPUT_DIR/lib
-LIBS+= -L$$OUTPUT_DIR/lib
-QMAKE_RPATHDIR+=$$OUTPUT_DIR/lib
-INCLUDEPATH+= $$QT_MOBILITY_SOURCE_TREE/src/global
-
-!plugin {
-    target.path=$$QT_MOBILITY_PREFIX/bin
-} else {
-    target.path = $${QT_MOBILITY_PLUGINS}/$${PLUGIN_TYPE}
-}
-INSTALLS += target
-
-maemo6 {
-    DEFINES+= Q_WS_MAEMO_6
-    DEFINES+= QTM_EXAMPLES_SMALL_SCREEN
-    DEFINES+= QTM_EXAMPLES_PREFER_LANDSCAPE
-}
-maemo5 {
-    DEFINES+= Q_WS_MAEMO_5
-    DEFINES+= QTM_EXAMPLES_SMALL_SCREEN
-    DEFINES+= QTM_EXAMPLES_PREFER_LANDSCAPE
-}
-symbian {
-    DEFINES+= QTM_EXAMPLES_SMALL_SCREEN
-}
--- a/qtmobility/examples/examples.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-include(../staticconfig.pri)
-
-TEMPLATE = subdirs
-
-#BearerManagement examples
-contains(mobility_modules,bearer) {
-    SUBDIRS += bearermonitor bearercloud
-}
-
-symbian {
-    SUBDIRS += s60installs
-}
-
--- a/qtmobility/examples/s60installs/qtmobilityexamples.iby	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License as published by
-* the Free Software Foundation, version 2.1 of the License.
-* 
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public License
-* along with this program.  If not, 
-* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
-*
-* Description: 
-*
-*/
-
-#ifndef __QT_MOBILITYEXAMPLES_IBY__
-#define __QT_MOBILITYEXAMPLES_IBY__
-
-#include <bldvariant.hrh>
-
-#define UPGRADABLE_APP_REG_RSC(NAME) data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\ ## NAME ## _reg.rsc        Private\10003a3f\import\apps\ ## NAME ## _reg.rsc
-
-S60_APP_EXE(bearercloud)
-S60_APP_RESOURCE(bearercloud)
-UPGRADABLE_APP_REG_RSC(bearercloud)
-
-S60_APP_EXE(bearermonitor)
-S60_APP_RESOURCE(bearermonitor)
-UPGRADABLE_APP_REG_RSC(bearermonitor)
-
-#endif //__QT_MOBILITYEXAMPLES_IBY__
--- a/qtmobility/examples/s60installs/s60installs.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-!symbian:error(This example is for Symbian packaging purposes only.)
-
-TEMPLATE = subdirs
-
-include(../../staticconfig.pri)
-load(data_caging_paths)
-
-#BearerManagement examples
-contains(mobility_modules, bearer) {
-    SUBDIRS += ../bearermonitor \
-                ../bearercloud
-    executables.sources += \
-        bearermonitor.exe \
-        bearercloud.exe
-
-    reg_resource.sources += \
-        $${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/bearercloud.rsc
-}
-
-executables.path = /sys/bin
-reg_resource.path = $$REG_RESOURCE_IMPORT_DIR
-resource.path = $$APP_RESOURCE_DIR
-
-DEPLOYMENT += executables \
-    pluginstubs \
-    reg_resource \
-    resource
-
-mifs.sources = \
-    $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/0xA000C611.mif
-mifs.path = $$APP_RESOURCE_DIR
-
-
-# ensure that dependency to QtMobility sis package is added
-CONFIG+=mobility
-
-#BLD_INF_RULES.prj_exports += "./qtmobilityexamples.iby $$CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(qtmobilityexamples.iby)"
--- a/qtmobility/features/deploy.pri	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-headers.files = $$PUBLIC_HEADERS
-headers.path = $$QT_MOBILITY_INCLUDE/$$TARGET
-
-contains(TEMPLATE,.*lib) {
-    target.path=$$QT_MOBILITY_LIB
-    TARGET = $$qtLibraryTarget($${TARGET}$${QT_LIBINFIX})
- 
-    symbian {
-        middleware {  path=$$MW_LAYER_PUBLIC_EXPORT_PATH("") }
-        app {  path=$$APP_LAYER_PUBLIC_EXPORT_PATH("") }
-
-        exportPath=$$EPOCROOT"."$$dirname(path)
-        nativePath=$$replace(exportPath, /,\)
-        exists($$nativePath) {
-        } else {
-            system($$QMAKE_MKDIR $$nativePath)
-        }
- 
-        for(header, headers.files) {
-            middleware {  BLD_INF_RULES.prj_exports += "$$header $$MW_LAYER_PUBLIC_EXPORT_PATH($$basename(header))"}
-            app {  BLD_INF_RULES.prj_exports += "$$header $$APP_LAYER_PUBLIC_EXPORT_PATH($$basename(header))"}
-        }
-
-    }
- 
-} else {
-    contains(TEMPLATE,.*app):target.path=$$QT_MOBILITY_BIN
-}
-
-INSTALLS+=target headers
-
-mac:contains(QT_CONFIG,qt_framework) {
-    CONFIG += lib_bundle absolute_library_soname
-    FRAMEWORK_HEADERS.version = Versions
-    FRAMEWORK_HEADERS.files = $${PUBLIC_HEADERS}
-    FRAMEWORK_HEADERS.path = Headers
-    QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
-}
-
-CONFIG+= create_prl
--- a/qtmobility/features/mobility.prf	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-
-!symbian {
-    INCLUDEPATH += $${MOBILITY_INCLUDE}
-} else {
-    load(data_caging_paths)
-    contains(MOBILITY, contacts|versit) {
-        INCLUDEPATH+=$$APP_LAYER_SYSTEMINCLUDE
-    }
-
-    contains(MOBILITY,bearer|location|publishsubscribe|systeminfo|multimedia|messaging|serviceframework|sensors) {
-        INCLUDEPATH+=$$MW_LAYER_SYSTEMINCLUDE
-    }
-}
-mac: LIBS += -F$${MOBILITY_LIB}
-LIBS+= -L$${MOBILITY_LIB}
-QMAKE_RPATHDIR+=$${MOBILITY_LIB}
-
-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.)
-        message(Please use source compatible replacement Bearer API in QtNetwork.)
-    }
-}
-
-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
-    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)
-}
-
-# Add dependency to QtMobility package to all projects besides QtMobility package itself.
-# Mobility libs have UID3 0x2002AC89
-# self-signed Mobility libs have UID3 0xE002AC89
-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, 2, {\"QtMobility\"}"
-    DEPLOYMENT += mobility_default_deployment
-}
-
--- a/qtmobility/features/mobility.prf.template	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-
-!symbian {
-    INCLUDEPATH += $${MOBILITY_INCLUDE}
-} else {
-    load(data_caging_paths)
-    contains(MOBILITY, contacts|versit) {
-        INCLUDEPATH+=$$APP_LAYER_SYSTEMINCLUDE
-    }
-
-    contains(MOBILITY,bearer|location|publishsubscribe|systeminfo|multimedia|messaging|serviceframework|sensors) {
-        INCLUDEPATH+=$$MW_LAYER_SYSTEMINCLUDE
-    }
-}
-mac: LIBS += -F$${MOBILITY_LIB}
-LIBS+= -L$${MOBILITY_LIB}
-QMAKE_RPATHDIR+=$${MOBILITY_LIB}
-
-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.)
-        message(Please use source compatible replacement Bearer API in QtNetwork.)
-    }
-}
-
-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
-    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)
-}
-
-# Add dependency to QtMobility package to all projects besides QtMobility package itself.
-# Mobility libs have UID3 0x2002AC89
-# self-signed Mobility libs have UID3 0xE002AC89
-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, 2, {\"QtMobility\"}"
-    DEPLOYMENT += mobility_default_deployment
-}
-
--- a/qtmobility/features/mobilityconfig.prf	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-MOBILITY_CONFIG=bearer 
-MOBILITY_VERSION = 1.0.2
-MOBILITY_MAJOR_VERSION = 1
-MOBILITY_MINOR_VERSION = 0
-MOBILITY_PATCH_VERSION = 2
--- a/qtmobility/features/qtservice.meta	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-platform    win32
-makefile    gnumake
-techstream  qt
--- a/qtmobility/features/qtservice.prf	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-###############################################################################
-# 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
-       }
-       
-    }
-}
--- a/qtmobility/features/strict_flags.prf	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-# This functionality is opt-in via the STRICT environment variable
-# export STRICT=1 on Unix
-# set STRICT=1 on Windows
-STRICT=$$(STRICT)
-equals(STRICT,1) {
-    win32 {
-        QMAKE_CXXFLAGS+=-WX
-    } else {
-        QMAKE_CXXFLAGS+=-Werror
-        QMAKE_CXXFLAGS+=-Wall
-        # There are legitimate cases that conflict with this warning (QSensorFilter::filter)
-        #QMAKE_CXXFLAGS+=-Woverloaded-virtual
-        # This breaks in QML headers
-        #QMAKE_CXXFLAGS+=-Wold-style-cast
-        # This breaks in QML headers
-        #QMAKE_CXXFLAGS+=-pedantic
-        QMAKE_CXXFLAGS+=-ansi
-        QMAKE_CXXFLAGS+=-Wno-long-long
-        # This breaks in Qt headers
-        #QMAKE_CXXFLAGS+=-Wshadow
-        # This breaks everywhere
-        #QMAKE_CXXFLAGS+=-Wunreachable-code
-        QMAKE_CXXFLAGS+=-Wundef
-        QMAKE_CXXFLAGS+=-Wformat-nonliteral
-        QMAKE_CXXFLAGS+=-Wformat-security
-        QMAKE_CXXFLAGS+=-Wcast-align
-        QMAKE_CXXFLAGS+=-Wchar-subscripts
-        # This breaks in Qt headers
-        #QMAKE_CXXFLAGS+=-Wfloat-equal
-        QMAKE_LFLAGS+=-Wl,-no-undefined
-    }
-
-    contains(TEMPLATE,lib) {
-        DEFINES += QT_NO_CAST_FROM_ASCII
-        CONFIG += no_keywords
-    }
-}
-
--- a/qtmobility/implml/qtmobility_copy.implml	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<container  xmlns="http://www.symbianfoundation.org/xml/implml/1"
-			condition="${qtmobility.Enabled}">
-	<tag name="target" value="uda" />
-	<content xmlns="http://www.s60.com/xml/content/2">	  
-	  <output dir="sis" flatten="true">
-	    <input file="sis/qtmobility.sisx" />
-	  </output>
-	</content>
-</container>
--- a/qtmobility/qtmobility.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,185 +0,0 @@
-# config.pri specifies the configure options and is pulled in via staticconfig.pri
-include(staticconfig.pri)
-!include($$QT_MOBILITY_BUILD_TREE/config.pri) {
-    error("Please run configure script");
-    #also fails if .qmake.cache was not generated which may
-    #happen if we are trying to shadow build w/o running configure
-}
-
-#don't build QtMobility if chosen config mismatches Qt's config
-win32:!contains(CONFIG_WIN32,build_all) {
-   contains(QT_CONFIG,debug):!contains(QT_CONFIG,release):contains(CONFIG_WIN32,release) {
-       # Qt only build in debug mode
-       error(QtMobility cannot be build in release mode if Qt is build in debug mode only)
-   }
-   !contains(QT_CONFIG,debug):contains(QT_CONFIG,release):contains(CONFIG_WIN32,debug) {
-       # Qt only build in release mode
-       error(QtMobility cannot be build in debug mode if Qt is build in release mode only)
-   }
-}
-
-lessThan(QT_MAJOR_VERSION, 4) {
-    error(Qt Mobility requires Qt 4.6 or higher. Qt $${QT_VERSION} was found.);
-}
-
-contains(QT_MAJOR_VERSION, 4):lessThan(QT_MINOR_VERSION, 6) {
-    error(Qt Mobility requires Qt 4.6 or higher. Qt $${QT_VERSION} was found.);
-}
-
-
-# MCL builds for Symbian do not run configure and require some manual setup steps.
-# This test permits SD builds to skip installation of mobility.prf from within qmake.
-# It is installed in a separate step. MCL builds for SD must set the
-# MOBILITY_SD_MCL_BUILD flag to yes.
-!contains(MOBILITY_SD_MCL_BUILD, yes) {
-    #generate prf file for Qt integration
-    PRF_OUTPUT=$${QT_MOBILITY_BUILD_TREE}/features/mobility.prf
-
-    system(echo MOBILITY_PREFIX=$${QT_MOBILITY_PREFIX} > $$PRF_OUTPUT)
-    system(echo MOBILITY_INCLUDE=$${QT_MOBILITY_INCLUDE} >> $$PRF_OUTPUT)
-    system(echo MOBILITY_LIB=$${QT_MOBILITY_LIB} >> $$PRF_OUTPUT)
-
-    unix:!symbian:system(cat $${QT_MOBILITY_SOURCE_TREE}/features/mobility.prf.template >> $$PRF_OUTPUT)
-    win32:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
-    symbian:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
-
-    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 {
-        FORMATDIR=$$[QT_INSTALL_DATA]\mkspecs\features
-        FORMATDIR=$$replace(FORMATDIR,/,\\ )
-        system(copy "$${QT_MOBILITY_BUILD_TREE}\features\mobility.prf $$FORMATDIR")
-        system(copy "$${QT_MOBILITY_BUILD_TREE}\features\mobilityconfig.prf $$FORMATDIR")
-    }
-
-    # install config file
-    config.path = $$[QT_INSTALL_DATA]/mkspecs/features
-    config.files = $$QT_MOBILITY_BUILD_TREE/features/mobilityconfig.prf
-
-    # install feature file
-    feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
-    feature.files = $$QT_MOBILITY_BUILD_TREE/features/mobility.prf
-    INSTALLS += feature config
-}
-
-TEMPLATE = subdirs
-CONFIG+=ordered
-
-SUBDIRS += src
-
-contains(build_unit_tests, yes):SUBDIRS+=tests
-contains(build_examples, yes):SUBDIRS+=examples
-
-#updating and deployment of translations requires Qt 4.6.3/qtPrepareTool
-!symbian:defined(qtPrepareTool):SUBDIRS += translations
-
-# install Qt style headers
-
-!symbian {
-    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 
-    #include <QtMyLibrary/class.h> style does not work either
-    qtmAppHeaders = include/QtContacts/* \
-                          include/QtVersit/*
-
-    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))"
-            }
-        }
-    }
-
-    contains(mobility_modules,serviceframework|location|bearer|publishsubscribe|systeminfo|multimedia|messaging) {
-        for(api, qtmMwHeaders) {
-            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))"
-            }
-        }
-    }
-}
-
--- a/qtmobility/src/3rdparty/icd-network-wlan/libicd-network-wlan-dev.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-#ifndef WLAN_DEV_H
-#define WLAN_DEV_H
-
-/**
- * Copyright (C) 2007,2008 Nokia Corporation. All rights reserved.
- *
- * @author jukka.rissanen@nokia.com
- *
- * @file libicd-network-wlan-dev.h
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <wlancond.h>
-#include <icd/network_api_defines.h>
-
-
-/* Difference between network attributes value and wlan capabilities:
- *
- *                                    WLAN
- *             Network             capability             Combined
- *   LSB      attribute         (from wlancond.h)
- *  ----      ---------            ----------             --------
- *    0                               mode                  mode
- *    1                               mode                  mode
- *    2                               mode                  mode
- *    3                          autoconnect attempt       method
- *    4                             encrypt method         method
- *    5                             encrypt method         method
- *    6                             encrypt method         method
- *    7                             encrypt method          WPA2
- *    8                               WPA2                algorithm
- *    9                               WPS                 algorithm
- *   10                              WPS PIN              algorithm
- *   11                             WPS push button       algorithm
- *   12                             WPS configured          WPS
- *   13                                                    WPS PIN
- *   14                                                  WPS push button
- *   15                                                  WPS configured 
- *   16                               rate
- *   17                               rate
- *   18                               rate
- *   19                               rate
- *   20                               rate
- *   21                               rate
- *   22                               rate
- *   23        iap name               rate                 iap name
- *   24         silent                rate                  silent
- *   25                               rate
- *   26      
- *   27
- *   28                           security algorithm
- *   29      always online        security algorithm      always online
- *   30                           security algorithm
- *   31                           security algorithm
- *   MSB
- *
- *
- * Same view from different angle.
- *
- *   MSB                            LSB   (of 32 bits)
- *    10987654321098765432109876543210
- *
- *                    WWWWaaaaWmmmmmmm    Combined format
- *                    PPPPllllPeeeeooo 
- *                    SSSSggggAttttddd 
- *                    cbp oooo2hhhheee
- *                    fti      oooo 
- *                    gnn      dddd
- *
- *    aaaa                   Wmmmm mmm    Capability format
- *    llll                   Peeee ooo 
- *    gggg                   Atttt ddd 
- *    oooo                   2hhhh eee
- *                            oooo 
- *                            dddd
- *
- *
- * Note that WPS bits in nwattrs are moved towards MSB because algorithm
- * was there first and we do not want to break binary compatibility.
- */
-
-/* capability bits inside network attributes var */
-#define NWATTR_WPS_MASK       0x0000F000
-#define NWATTR_ALGORITHM_MASK 0x00000F00
-#define NWATTR_WPA2_MASK      0x00000080
-#define NWATTR_METHOD_MASK    0x00000078
-#define NWATTR_MODE_MASK      0x00000007
-
-#define CAP_LOCALMASK         0x0FFFE008
-
-/* how much to shift between capability and network attributes var */
-#define CAP_SHIFT_WPS        3
-#define CAP_SHIFT_ALGORITHM 20
-#define CAP_SHIFT_WPA2       1
-#define CAP_SHIFT_METHOD     1
-#define CAP_SHIFT_MODE       0
-#define CAP_SHIFT_ALWAYS_ONLINE 26
-
-/* ------------------------------------------------------------------------- */
-/* From combined to capability */
-static inline dbus_uint32_t nwattr2cap(guint nwattrs, dbus_uint32_t *cap)
-{
-	guint oldval = *cap;
-
-	*cap &= CAP_LOCALMASK; /* clear old capabilities */
-	*cap |=
-		((nwattrs & ICD_NW_ATTR_ALWAYS_ONLINE) >> CAP_SHIFT_ALWAYS_ONLINE) |
-		((nwattrs & NWATTR_WPS_MASK) >> CAP_SHIFT_WPS) |
-		((nwattrs & NWATTR_ALGORITHM_MASK) << CAP_SHIFT_ALGORITHM) |
-		((nwattrs & NWATTR_WPA2_MASK) << CAP_SHIFT_WPA2) |
-		((nwattrs & NWATTR_METHOD_MASK) << CAP_SHIFT_METHOD) |
-		(nwattrs & NWATTR_MODE_MASK);
-
-	return oldval;
-}
-
-
-/* ------------------------------------------------------------------------- */
-/* From capability to combined */
-static inline guint cap2nwattr(dbus_uint32_t cap, guint *nwattrs)
-{
-	guint oldval = *nwattrs;
-
-	*nwattrs &= ~ICD_NW_ATTR_LOCALMASK; /* clear old capabilities */
-        *nwattrs |=
-#ifdef WLANCOND_WPS_MASK
-		((cap & WLANCOND_WPS_MASK) << CAP_SHIFT_WPS) |
-#endif
-		((cap & (WLANCOND_ENCRYPT_ALG_MASK |
-			 WLANCOND_ENCRYPT_GROUP_ALG_MASK)) >> CAP_SHIFT_ALGORITHM)|
-		((cap & WLANCOND_ENCRYPT_WPA2_MASK) >> CAP_SHIFT_WPA2) |
-		((cap & WLANCOND_ENCRYPT_METHOD_MASK) >> CAP_SHIFT_METHOD) |
-		(cap & WLANCOND_MODE_MASK);
-
-	return oldval;
-}
-
-
-#endif
--- a/qtmobility/src/bearer/bearer.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-# Qt bearer management library
-TEMPLATE = lib
-TARGET = QtBearer
-
-QT += network
-include (../../common.pri)
-
-DEFINES += QT_BUILD_BEARER_LIB QT_MAKEDLL
-
-#DEFINES += BEARER_MANAGEMENT_DEBUG
-
-PUBLIC_HEADERS += qnetworkconfiguration.h \
-           qnetworksession.h \
-           qnetworkconfigmanager.h
-
-HEADERS += $$PUBLIC_HEADERS
-SOURCES += qnetworksession.cpp \
-           qnetworkconfigmanager.cpp \
-           qnetworkconfiguration.cpp
-
-symbian: {
-    contains (occ_enabled, yes) {
-        message("Building with OCC enabled")
-        DEFINES += OCC_FUNCTIONALITY_AVAILABLE=1
-        LIBS += -lextendedconnpref
-    } else {
-        message("Building without OCC support")
-    }
-    contains(snap_enabled, yes) {
-        message("Building with SNAP support")
-        DEFINES += SNAP_FUNCTIONALITY_AVAILABLE=1
-        LIBS += -lcmmanager
-    } else {
-        message("Building without SNAP support")
-	LIBS += -lapengine
-    }
-    
-    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-
-    HEADERS += qnetworkconfigmanager_s60_p.h \
-               qnetworkconfiguration_s60_p.h \
-               qnetworksession_s60_p.h
-    SOURCES += qnetworkconfigmanager_s60_p.cpp \
-               qnetworkconfiguration_s60_p.cpp \
-               qnetworksession_s60_p.cpp
-               
-    LIBS += -lcommdb \
-            -lapsettingshandlerui \
-            -lconnmon \
-            -lcentralrepository \
-            -lesock \
-            -linsock \
-            -lecom \
-            -lefsrv \
-            -lnetmeta
-
-    TARGET.CAPABILITY = ALL -TCB
-    TARGET.UID3 = 0x2002AC81
-            
-    QtBearerManagement.sources = QtBearer.dll
-    QtBearerManagement.path = /sys/bin
-    DEPLOYMENT += QtBearerManagement
-} else {
-    maemo6|maemo5 {
-        CONFIG += link_pkgconfig
-        QT += dbus
-
-        exists(../debug) {
-                message("Enabling debug messages.")
-                DEFINES += BEARER_MANAGEMENT_DEBUG
-        }
-
-        HEADERS += qnetworksession_maemo_p.h \
-                   qnetworkconfigmanager_maemo_p.h \
-                   qnetworkconfiguration_maemo_p.h
-
-        SOURCES += qnetworkconfigmanager_maemo.cpp \
-                   qnetworksession_maemo.cpp
-
-        documentation.path = $$QT_MOBILITY_PREFIX/doc
-        documentation.files = doc/html
-
-        PKGCONFIG += glib-2.0 dbus-glib-1 gconf-2.0 osso-ic conninet
-
-        CONFIG += create_pc create_prl
-        QMAKE_PKGCONFIG_REQUIRES = glib-2.0 dbus-glib-1 gconf-2.0 osso-ic conninet
-        pkgconfig.path = $$QT_MOBILITY_LIB/pkgconfig
-        pkgconfig.files = QtBearer.pc
-
-        INSTALLS += pkgconfig documentation
-
-    } else {
-
-        DEFINES += BEARER_ENGINE
-
-        HEADERS += qnetworkconfigmanager_p.h \
-                   qnetworkconfiguration_p.h \
-                   qnetworksession_p.h \
-                   qnetworksessionengine_p.h \
-                   qgenericengine_p.h
-
-        SOURCES += qnetworkconfigmanager_p.cpp \
-                   qnetworksession_p.cpp \
-                   qnetworksessionengine.cpp \
-                   qgenericengine.cpp
-
-        unix:!mac:contains(networkmanager_enabled, yes) {
-            contains(QT_CONFIG,dbus) {
-                DEFINES += BACKEND_NM
-                QT += dbus
-
-                HEADERS += qnmdbushelper_p.h \
-                           qnetworkmanagerservice_p.h \
-                           qnmwifiengine_unix_p.h
-
-                SOURCES += qnmdbushelper.cpp \
-                           qnetworkmanagerservice_p.cpp \
-                           qnmwifiengine_unix.cpp
-            } else {
-                message("NetworkManager backend requires Qt DBus support")
-            }
-        }
-
-        win32: {
-            HEADERS += qnlaengine_win_p.h \
-                   qnetworksessionengine_win_p.h
-
-            !wince*:HEADERS += qnativewifiengine_win_p.h
-
-            SOURCES += qnlaengine_win.cpp
-
-            !wince*:SOURCES += qnativewifiengine_win.cpp
-
-            !wince*:LIBS += -lWs2_32
-            wince*:LIBS += -lWs2
-        }
-    }
-    macx: {
-        HEADERS += qcorewlanengine_mac_p.h
-        SOURCES+= qcorewlanengine_mac.mm
-        LIBS += -framework Foundation -framework SystemConfiguration
-
-            contains(corewlan_enabled, yes) {
-                     isEmpty(QMAKE_MAC_SDK) {
-                         SDK6="yes"
-                     } else {
-                         contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10.6.sdk") {
-                             SDK6="yes"
-                     }     
-                 }
-            
-                !isEmpty(SDK6) {
-                        LIBS += -framework CoreWLAN -framework Security
-                        DEFINES += MAC_SDK_10_6
-                }
-           }
-
-
-    }
-}
-
-CONFIG += middleware
-include(../../features/deploy.pri)
--- a/qtmobility/src/bearer/qcorewlanengine_mac.mm	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,832 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qcorewlanengine_mac_p.h"
-#include "qnetworkconfiguration_p.h"
-
-#include <QtCore/qthread.h>
-#include <QThread>
-#include <QtCore/qmutex.h>
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qstringlist.h>
-
-#include <QtCore/qdebug.h>
-
-#include <QDir>
-#if defined(MAC_SDK_10_6) //not much functionality without this
-#include <CoreWLAN/CoreWLAN.h>
-#include <CoreWLAN/CWInterface.h>
-#include <CoreWLAN/CWNetwork.h>
-#include <CoreWLAN/CWNetwork.h>
-#include <CoreWLAN/CW8021XProfile.h>
-
-#endif
-
-#include <Foundation/NSEnumerator.h>
-#include <Foundation/NSKeyValueObserving.h>
-#include <Foundation/NSAutoreleasePool.h>
-
-#include <SystemConfiguration/SCNetworkConfiguration.h>
-QMap <QString, QString> networkInterfaces;
-
-#ifdef MAC_SDK_10_6
-@interface QNSListener : NSObject
-{
-    NSNotificationCenter *center;
-    CWInterface * currentInterface;
-}
-- (void)notificationHandler;//:(NSNotification *)notification;
-- (void)remove;
-@end
-
-@implementation QNSListener
-- (id) init
-{
-    [super init];
-    center = [NSNotificationCenter defaultCenter];
-    currentInterface = [CWInterface interfaceWithName:nil];
-    [center addObserver:self selector:@selector(notificationHandler:) name:kCWLinkDidChangeNotification object:nil];
-    [center addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil];
-
-    return self;
-}
-
--(void)dealloc
-{
-   [center release];
-   [currentInterface release];
-   [super dealloc];
-}
-
--(void)remove
-{
-    [center removeObserver:self];
-}
-
-- (void)notificationHandler;//:(NSNotification *)notification
-{
-    QTM_NAMESPACE::QCoreWlanEngine::instance()->requestUpdate();
-}
-@end
-
-QNSListener *listener = 0;
-#endif
-
-QTM_BEGIN_NAMESPACE
-
-Q_GLOBAL_STATIC(QCoreWlanEngine, coreWlanEngine)
-
-inline QString cfstringRefToQstring(CFStringRef cfStringRef) {
-    QString retVal;
-    CFIndex maxLength = 2 * CFStringGetLength(cfStringRef) + 1/*zero term*/; // max UTF8
-    char *cstring = new char[maxLength];
-    if (CFStringGetCString(CFStringRef(cfStringRef), cstring, maxLength, kCFStringEncodingUTF8)) {
-        retVal = QString::fromUtf8(cstring);
-    }
-    delete[] cstring;
-    return retVal;
-}
-
-inline CFStringRef qstringToCFStringRef(const QString &string)
-{
-    return CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar *>(string.unicode()),
-                                        string.length());
-}
-
-inline NSString *qstringToNSString(const QString &qstr)
-{ return [reinterpret_cast<const NSString *>(qstringToCFStringRef(qstr)) autorelease]; }
-
-inline QString nsstringToQString(const NSString *nsstr)
-{ return cfstringRefToQstring(reinterpret_cast<const CFStringRef>(nsstr)); }
-
-inline QStringList nsarrayToQStringList(void *nsarray)
-{
-    QStringList result;
-    NSArray *array = static_cast<NSArray *>(nsarray);
-    for (NSUInteger i=0; i<[array count]; ++i)
-        result << nsstringToQString([array objectAtIndex:i]);
-    return result;
-}
-
-void networkChangeCallback(SCDynamicStoreRef/* store*/, CFArrayRef changedKeys, void *info)
-{
-    for ( long i = 0; i < CFArrayGetCount(changedKeys); i++) {
-
-        CFStringRef changed = (CFStringRef)CFArrayGetValueAtIndex(changedKeys, i);
-        if( cfstringRefToQstring(changed).contains("/Network/Global/IPv4")) {
-            QCoreWlanEngine* wlanEngine = static_cast<QCoreWlanEngine*>(info);
-            wlanEngine->requestUpdate();
-        }
-    }
-    return;
-}
-
-QScanThread::QScanThread(QObject *parent)
-    :QThread(parent)
-{
-}
-
-QScanThread::~QScanThread()
-{
-}
-
-void QScanThread::quit()
-{
-    wait();
-}
-
-void QScanThread::run()
-{
-#if defined(MAC_SDK_10_6)
-    getUserProfiles();
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    QStringList found;
-    mutex.lock();
-    CWInterface *currentInterface;
-    if(interfaceName.isEmpty()) {
-        currentInterface = [CWInterface interfaceWithName:nil];
-        interfaceName = nsstringToQString([currentInterface name]);
-    } else {
-        currentInterface = [CWInterface interfaceWithName:qstringToNSString(interfaceName)];
-    }
-    mutex.unlock();
-
-    if([currentInterface power]) {
-        NSError *err = nil;
-        NSDictionary *parametersDict =  [NSDictionary dictionaryWithObjectsAndKeys:
-                                         [NSNumber numberWithBool:YES], kCWScanKeyMerge,
-                                         [NSNumber numberWithInteger:100], kCWScanKeyRestTime, nil];
-
-        NSArray* apArray = [currentInterface scanForNetworksWithParameters:parametersDict error:&err];
-        CWNetwork *apNetwork;
-
-        if (!err) {
-            for(uint row=0; row < [apArray count]; row++ ) {
-                apNetwork = [apArray objectAtIndex:row];
-
-                const QString networkSsid = nsstringToQString([apNetwork ssid]);
-                found.append(networkSsid);
-
-                QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
-
-                bool known = isKnownSsid(networkSsid);
-                if( [currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
-                    if( networkSsid == nsstringToQString( [currentInterface ssid])) {
-                        state = QNetworkConfiguration::Active;
-                    }
-                }
-                if(state == QNetworkConfiguration::Undefined) {
-                    if(known) {
-                        state = QNetworkConfiguration::Discovered;
-                    } else {
-                        state = QNetworkConfiguration::Undefined;
-                    }
-                }
-
-                QNetworkConfiguration::Purpose purpose = QNetworkConfiguration::UnknownPurpose;
-                if([[apNetwork securityMode] intValue] == kCWSecurityModeOpen) {
-                    purpose = QNetworkConfiguration::PublicPurpose;
-                } else {
-                    purpose = QNetworkConfiguration::PrivatePurpose;
-                }
-
-                found.append(foundNetwork(networkSsid, networkSsid, state, interfaceName, purpose));
-
-            } //end row
-        }//end error
-    }// endwifi power
-
-// add known configurations that are not around.
-    QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
-    while (i.hasNext()) {
-        i.next();
-
-        QString networkName = i.key();
-        const QString id = networkName;
-
-        if(!found.contains(id)) {
-            QString networkSsid = getSsidFromNetworkName(networkName);
-            const QString ssidId = QString::number(qHash(QLatin1String("corewlan:") + networkSsid));
-            QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
-            QString interfaceName;
-            QMapIterator<QString, QString> ij(i.value());
-            while (ij.hasNext()) {
-                ij.next();
-                interfaceName = ij.value();
-            }
-
-            if( [currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
-                if( networkSsid == nsstringToQString([currentInterface ssid])) {
-                    state = QNetworkConfiguration::Active;
-                }
-            }
-            if(state == QNetworkConfiguration::Undefined) {
-                if( userProfiles.contains(networkName)
-                    && found.contains(ssidId)) {
-                    state = QNetworkConfiguration::Discovered;
-                }
-            }
-
-            if(state == QNetworkConfiguration::Undefined) {
-                state = QNetworkConfiguration::Defined;
-            }
-
-            found.append(foundNetwork(id, networkName, state, interfaceName, QNetworkConfiguration::UnknownPurpose));
-        }
-    }
-    emit networksChanged();
-    [pool release];
-#endif
-}
-
-QStringList QScanThread::foundNetwork(const QString &id, const QString &name, const QNetworkConfiguration::StateFlags state, const QString &interfaceName, const QNetworkConfiguration::Purpose purpose)
-{
-    QStringList found;
-    QMutexLocker locker(&mutex);
-    QNetworkConfigurationPrivate *ptr = new QNetworkConfigurationPrivate;
-
-    ptr->name = name;
-    ptr->isValid = true;
-    ptr->id = id;
-    ptr->state = state;
-    ptr->type = QNetworkConfiguration::InternetAccessPoint;
-    ptr->bearer = QLatin1String("WLAN");
-    ptr->purpose = purpose;
-    ptr->internet = true;
-    ptr->serviceInterface = QNetworkInterface::interfaceFromName(interfaceName);
-
-    fetchedConfigurations.append( ptr);
-    configurationInterface[name] =  interfaceName;
-
-    locker.unlock();
-    locker.relock();
-    found.append(id);
-    return found;
-}
-
-QList<QNetworkConfigurationPrivate *> QScanThread::getConfigurations()
-{
-    QMutexLocker locker(&mutex);
-
-    QList<QNetworkConfigurationPrivate *> foundConfigurations;
-
-    for (int i = 0; i < fetchedConfigurations.count(); ++i) {
-        QNetworkConfigurationPrivate *config = new QNetworkConfigurationPrivate;
-        config->name = fetchedConfigurations.at(i)->name;
-        config->isValid = fetchedConfigurations.at(i)->isValid;
-        config->id = fetchedConfigurations.at(i)->id;
-        config->state = fetchedConfigurations.at(i)->state;
-        config->bearer = fetchedConfigurations.at(i)->bearer;
-        config->type = fetchedConfigurations.at(i)->type;
-        config->roamingSupported = fetchedConfigurations.at(i)->roamingSupported;
-        config->purpose = fetchedConfigurations.at(i)->purpose;
-        config->internet = fetchedConfigurations.at(i)->internet;
-        foundConfigurations.append(config);
-    }
-
-    return foundConfigurations;
-}
-
-void QScanThread::getUserProfiles()
-{
-#if defined(MAC_SDK_10_6)
-    QMutexLocker locker(&mutex);
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    userProfiles.clear();
-
-    NSArray *wifiInterfaces = [CWInterface supportedInterfaces];
-    for(uint row=0; row < [wifiInterfaces count]; row++ ) {
-
-        CWInterface *wifiInterface = [CWInterface interfaceWithName: [wifiInterfaces objectAtIndex:row]];
-        if (![wifiInterface power])
-            continue;
-
-        NSString *nsInterfaceName = [wifiInterface name];
-// add user configured system networks
-        SCDynamicStoreRef dynRef = SCDynamicStoreCreate(kCFAllocatorSystemDefault, (CFStringRef)@"Qt corewlan", nil, nil);
-        NSDictionary * airportPlist = (NSDictionary *)SCDynamicStoreCopyValue(dynRef, (CFStringRef)[NSString stringWithFormat:@"Setup:/Network/Interface/%@/AirPort", nsInterfaceName]);
-        CFRelease(dynRef);
-
-        NSDictionary *prefNetDict = [airportPlist objectForKey:@"PreferredNetworks"];
-
-        NSArray *thisSsidarray = [prefNetDict valueForKey:@"SSID_STR"];
-        NSEnumerator *ssidEnumerator = [thisSsidarray objectEnumerator];
-        NSString *ssidkey;
-        while ((ssidkey = [ssidEnumerator nextObject])) {
-            QString thisSsid = nsstringToQString(ssidkey);
-            if(!userProfiles.contains(thisSsid)) {
-                QMap <QString,QString> map;
-                map.insert(thisSsid, nsstringToQString(nsInterfaceName));
-                userProfiles.insert(thisSsid, map);
-            }
-        }
-        CFRelease(airportPlist);
-
-        // 802.1X user profiles
-        QString userProfilePath = QDir::homePath() + "/Library/Preferences/com.apple.eap.profiles.plist";
-        NSDictionary* eapDict = [[[NSDictionary alloc] initWithContentsOfFile:qstringToNSString(userProfilePath)] autorelease];
-        NSString *profileStr= @"Profiles";
-        NSString *nameStr = @"UserDefinedName";
-        NSString *networkSsidStr = @"Wireless Network";
-
-        id profileKey;
-        NSEnumerator *dictEnumerator = [eapDict objectEnumerator];
-        while ((profileKey = [dictEnumerator nextObject])) {
-
-            if ([profileStr isEqualToString:profileKey]) {
-                NSDictionary *itemDict = [eapDict objectForKey:profileKey];
-                id itemKey;
-                NSEnumerator *dictEnumerator = [thisSsidarray objectEnumerator];
-                while ((itemKey = [dictEnumerator nextObject])) {
-
-                    NSInteger dictSize = [itemKey count];
-                    id objects[dictSize];
-                    id keys[dictSize];
-
-                    [itemKey getObjects:objects andKeys:keys];
-                    QString networkName;
-                    QString ssid;
-                    for(int i = 0; i < dictSize; i++) {
-                        if([nameStr isEqualToString:keys[i]]) {
-                            networkName = nsstringToQString(objects[i]);
-                        }
-                        if([networkSsidStr isEqualToString:keys[i]]) {
-                            ssid = nsstringToQString(objects[i]);
-                        }
-                        if(!userProfiles.contains(networkName)
-                            && !ssid.isEmpty()) {
-                            QMap<QString,QString> map;
-                            map.insert(ssid, nsstringToQString(nsInterfaceName));
-                            userProfiles.insert(networkName, map);
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    [pool release];
-#endif    
-}
-
-QString QScanThread::getSsidFromNetworkName(const QString &name)
-{
-    QMutexLocker locker(&mutex);
-    QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
-    while (i.hasNext()) {
-        i.next();
-        QMap<QString,QString> map = i.value();
-        QMapIterator<QString, QString> ij(i.value());
-         while (ij.hasNext()) {
-             ij.next();
-             const QString networkNameHash = QString::number(qHash(QLatin1String("corewlan:") +i.key()));
-             if(name == i.key() || name == networkNameHash) {
-                 return ij.key();
-             }
-        }
-    }
-    return QString();
-}
-
-QString QScanThread::getNetworkNameFromSsid(const QString &ssid)
-{
-    QMutexLocker locker(&mutex);
-    QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
-    while (i.hasNext()) {
-        i.next();
-        QMap<QString,QString> map = i.value();
-        QMapIterator<QString, QString> ij(i.value());
-         while (ij.hasNext()) {
-             ij.next();
-             if(ij.key() == ssid) {
-                 return i.key();
-             }
-         }
-    }
-    return QString();
-}
-
-bool QScanThread::isKnownSsid(const QString &ssid)
-{
-    QMutexLocker locker(&mutex);
-
-    QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
-    while (i.hasNext()) {
-        i.next();
-        QMap<QString,QString> map = i.value();
-        if(map.keys().contains(ssid)) {
-            return true;
-        }
-    }
-    return false;
-}
-
-
-QCoreWlanEngine::QCoreWlanEngine(QObject *parent)
-:   QNetworkSessionEngine(parent)
-{
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    getAllScInterfaces();
-    scanThread = new QScanThread(this);
-    connect(scanThread, SIGNAL(networksChanged()),
-            this, SIGNAL(configurationsChanged()));
-
-    QTimer::singleShot(0,this,SLOT(init()));
-    [pool release];
-}
-
-QCoreWlanEngine::~QCoreWlanEngine()
-{
-    QNetworkConfigurationPrivate* cpPriv = 0;
-    foundConfigurations.clear();
-    while(!foundConfigurations.isEmpty()) {
-        cpPriv = foundConfigurations.takeFirst();
-        delete cpPriv;
-    }
-}
-
-void QCoreWlanEngine::init()
-{
-#ifdef MAC_SDK_10_6
-    if([[CWInterface supportedInterfaces] count] > 0 && !listener) {
-        listener = [[QNSListener alloc] init];
-        hasWifi = true;
-    } else {
-        hasWifi = false;
-    }
-#endif
-    storeSession = NULL;
-    scanThread->start();
-
-    startNetworkChangeLoop();
-}
-
-
-QList<QNetworkConfigurationPrivate *> QCoreWlanEngine::getConfigurations(bool *ok)
-{
-    if (ok)
-        *ok = true;
-    foundConfigurations.clear();
-
-    QNetworkConfigurationPrivate* cpPriv = 0;
-    QMutexLocker locker(&mutex);
-     QList<QNetworkConfigurationPrivate *> fetchedConfigurations = scanThread->getConfigurations();
-locker.unlock();
-
-     for (int i = 0; i < fetchedConfigurations.count(); ++i) {
-
-         QNetworkConfigurationPrivate *config = new QNetworkConfigurationPrivate();
-         cpPriv = fetchedConfigurations.at(i);
-         config->name = cpPriv->name;
-         config->isValid = cpPriv->isValid;
-         config->id = cpPriv->id;
-         config->state = cpPriv->state;
-         config->type = cpPriv->type;
-         config->roamingSupported = cpPriv->roamingSupported;
-         config->purpose = cpPriv->purpose;
-         config->internet = cpPriv->internet;
-         config->serviceInterface = cpPriv->serviceInterface;
-         config->bearer = cpPriv->bearer;
-
-         foundConfigurations.append(config);
-         delete cpPriv;
-     }
-
-
-     return foundConfigurations;
-}
-
-QString QCoreWlanEngine::getInterfaceFromId(const QString &id)
-{
-    return scanThread->configurationInterface.value(id);
-}
-
-bool QCoreWlanEngine::hasIdentifier(const QString &id)
-{
-    return scanThread->configurationInterface.contains(id);
-}
-
-void QCoreWlanEngine::connectToId(const QString &id)
-{
-    QString interfaceString = getInterfaceFromId(id);
-
-    if(networkInterfaces.value(interfaceString) == "WLAN") {
-#if defined(MAC_SDK_10_6)
-        NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-        CWInterface *wifiInterface = [CWInterface interfaceWithName: qstringToNSString(interfaceString)];
-
-        if([wifiInterface power]) {
-            NSError *err = nil;
-            NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0];
-
-            QString wantedSsid = 0;
-            bool using8021X = false;
-
-            if(scanThread->getNetworkNameFromSsid(id) != id) {
-                NSArray *array = [CW8021XProfile allUser8021XProfiles];
-                for (NSUInteger i=0; i<[array count]; ++i) {
-
-                    if(id == nsstringToQString([[array objectAtIndex:i] userDefinedName])
-                        || id == nsstringToQString([[array objectAtIndex:i] ssid]) ) {
-                        QString thisName = scanThread->getSsidFromNetworkName(id);
-                        if(thisName.isEmpty()) {
-                            wantedSsid = id;
-                        } else {
-                            wantedSsid = thisName;
-                        }
-                        [params setValue: [array objectAtIndex:i] forKey:kCWAssocKey8021XProfile];
-                        using8021X = true;
-                        break;
-                    }
-                }
-            }
-
-            if(!using8021X) {
-                QString wantedNetwork;
-                QMapIterator<QString, QMap<QString,QString> > i(scanThread->userProfiles);
-                while (i.hasNext()) {
-                    i.next();
-                    wantedNetwork = i.key();
-                    if(id == wantedNetwork) {
-                        wantedSsid = scanThread->getSsidFromNetworkName(wantedNetwork);
-                        break;
-                    }
-                }
-            }
-
-            NSDictionary *parametersDict = [NSDictionary dictionaryWithObjectsAndKeys:
-                                       [NSNumber numberWithBool:YES], kCWScanKeyMerge,
-                                       [NSNumber numberWithInt:kCWScanTypeFast], kCWScanKeyScanType,
-                                       [NSNumber numberWithInteger:100], kCWScanKeyRestTime,
-                                       qstringToNSString(wantedSsid), kCWScanKeySSID,
-                                       nil];
-
-            NSArray *scanArray = [wifiInterface scanForNetworksWithParameters:parametersDict error:&err];
-            if(!err) {
-                for(uint row=0; row < [scanArray count]; row++ ) {
-                    CWNetwork *apNetwork = [scanArray objectAtIndex:row];
-                    if(wantedSsid == nsstringToQString([apNetwork ssid])) {
-
-                        if(!using8021X) {
-                            SecKeychainAttribute attributes[3];
-
-                            NSString *account = [apNetwork ssid];
-                            NSString *keyKind = @"AirPort network password";
-                            NSString *keyName = account;
-
-                            attributes[0].tag = kSecAccountItemAttr;
-                            attributes[0].data = (void *)[account UTF8String];
-                            attributes[0].length = [account length];
-
-                            attributes[1].tag = kSecDescriptionItemAttr;
-                            attributes[1].data = (void *)[keyKind UTF8String];
-                            attributes[1].length = [keyKind length];
-
-                            attributes[2].tag = kSecLabelItemAttr;
-                            attributes[2].data = (void *)[keyName UTF8String];
-                            attributes[2].length = [keyName length];
-
-                            SecKeychainAttributeList attributeList = {3,attributes};
-
-                            SecKeychainSearchRef searchRef;
-                            OSErr result = SecKeychainSearchCreateFromAttributes(NULL, kSecGenericPasswordItemClass, &attributeList, &searchRef);
-Q_UNUSED(result);
-                            NSString *password = @"";
-                            SecKeychainItemRef searchItem;
-                            OSStatus resultStatus;
-                            resultStatus = SecKeychainSearchCopyNext(searchRef, &searchItem);
-
-                            if (resultStatus == errSecSuccess) {
-                                UInt32 realPasswordLength;
-                                SecKeychainAttribute attributesW[8];
-                                attributesW[0].tag = kSecAccountItemAttr;
-                                SecKeychainAttributeList listW = {1,attributesW};
-                                char *realPassword;
-                                OSStatus status = SecKeychainItemCopyContent(searchItem, NULL, &listW, &realPasswordLength,(void **)&realPassword);
-
-                                if (status == noErr) {
-                                    if (realPassword != NULL) {
-
-                                        QByteArray pBuf;
-                                        pBuf.resize(realPasswordLength);
-                                        pBuf.prepend(realPassword);
-                                        pBuf.insert(realPasswordLength,'\0');
-
-                                        password = [NSString stringWithUTF8String:pBuf];
-                                    }
-                                }
-
-                                CFRelease(searchItem);
-                                SecKeychainItemFreeContent(&listW, realPassword);
-                            } else {
-                                qDebug() << "SecKeychainSearchCopyNext error" << cfstringRefToQstring(SecCopyErrorMessageString(resultStatus, NULL));
-                            }
-                            [params setValue: password forKey: kCWAssocKeyPassphrase];
-                        } // end using8021X
-
-                        bool result = [wifiInterface associateToNetwork: apNetwork parameters:[NSDictionary dictionaryWithDictionary:params] error:&err];
-
-                        if(!result) {
-                            emit connectionError(id, ConnectError);
-                        } else {
-                            [autoreleasepool release];
-                            return;
-                        }
-                    }
-                }
-            } else {
-                qDebug() <<"ERROR"<< nsstringToQString([err localizedDescription ]);
-            }
-
-            emit connectionError(id, InterfaceLookupError);
-            [autoreleasepool release];
-
-        } else {
-            qDebug() << "wifi power off";
-            // not wifi
-        }
-#endif
-    }
-    emit connectionError(id, OperationNotSupported);
-}
-
-void QCoreWlanEngine::disconnectFromId(const QString &id)
-{
-    QString interfaceString = getInterfaceFromId(id);
-    if(networkInterfaces.value(getInterfaceFromId(id)) == "WLAN") { //wifi only for now
-#if defined(MAC_SDK_10_6)
-        NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-        CWInterface *wifiInterface = [CWInterface interfaceWithName:  qstringToNSString(interfaceString)];
-        [wifiInterface disassociate];
-        if([[wifiInterface interfaceState]intValue] != kCWInterfaceStateInactive) {
-            emit connectionError(id, DisconnectionError);
-        }
-       [autoreleasepool release];
-       return;
-#endif
-    } else {
-
-    }
-    emit connectionError(id, OperationNotSupported);
-}
-
-void QCoreWlanEngine::requestUpdate()
-{
-    getAllScInterfaces();
-    scanThread->getUserProfiles();
-    scanThread->start();
-}
-
-QCoreWlanEngine *QCoreWlanEngine::instance()
-{
-    return coreWlanEngine();
-}
-
-bool QCoreWlanEngine::isWifiReady(const QString &wifiDeviceName)
-{
-#if defined(MAC_SDK_10_6)
-    if([[CWInterface supportedInterfaces] count] > 0 ) {
-        CWInterface *defaultInterface = [CWInterface interfaceWithName: qstringToNSString(wifiDeviceName)];
-        if([defaultInterface power])
-            return true;
-    }
-#else
-    Q_UNUSED(wifiDeviceName);
-#endif
-    return false;
-}
-
-bool QCoreWlanEngine::getAllScInterfaces()
-{
-    networkInterfaces.clear();
-    NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
-
-    CFArrayRef interfaces = SCNetworkInterfaceCopyAll();
-    if (interfaces != NULL) {
-        CFIndex interfaceCount;
-        CFIndex interfaceIndex;
-        interfaceCount = CFArrayGetCount(interfaces);
-        for (interfaceIndex = 0; interfaceIndex < interfaceCount; interfaceIndex++) {
-            NSAutoreleasePool *looppool = [[NSAutoreleasePool alloc] init];
-
-            CFStringRef bsdName;
-            CFTypeRef thisInterface = CFArrayGetValueAtIndex(interfaces, interfaceIndex);
-            bsdName = SCNetworkInterfaceGetBSDName((SCNetworkInterfaceRef)thisInterface);
-            QString interfaceName = cfstringRefToQstring(bsdName);
-            QString typeStr;
-            CFStringRef type = SCNetworkInterfaceGetInterfaceType((SCNetworkInterfaceRef)thisInterface);
-            if ( CFEqual(type, kSCNetworkInterfaceTypeIEEE80211)) {
-                typeStr = "WLAN";
-//            } else if (CFEqual(type, kSCNetworkInterfaceTypeBluetooth)) {
-//                typeStr = "Bluetooth";
-            } else if(CFEqual(type, kSCNetworkInterfaceTypeEthernet)) {
-                typeStr = "Ethernet";
-            } else if(CFEqual(type, kSCNetworkInterfaceTypeFireWire)) {
-                typeStr = "Ethernet"; //ok a bit fudged
-            }
-            if(!networkInterfaces.contains(interfaceName) && !typeStr.isEmpty()) {
-                networkInterfaces.insert(interfaceName,typeStr);
-            }
-            [looppool release];
-        }
-    }
-    CFRelease(interfaces);
-
-    [autoreleasepool drain];
-    return true;
-}
-
-void QCoreWlanEngine::startNetworkChangeLoop()
-{
-    storeSession = NULL;
-
-    SCDynamicStoreContext dynStoreContext = { 0, this/*(void *)storeSession*/, NULL, NULL, NULL };
-    storeSession = SCDynamicStoreCreate(NULL,
-                                 CFSTR("networkChangeCallback"),
-                                 networkChangeCallback,
-                                 &dynStoreContext);
-    if (!storeSession ) {
-        qDebug() << "could not open dynamic store: error:" << SCErrorString(SCError());
-        return;
-    }
-
-    CFMutableArrayRef notificationKeys;
-    notificationKeys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-    CFMutableArrayRef patternsArray;
-    patternsArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-
-    CFStringRef storeKey;
-    storeKey = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
-                                                     kSCDynamicStoreDomainState,
-                                                     kSCEntNetIPv4);
-    CFArrayAppendValue(notificationKeys, storeKey);
-    CFRelease(storeKey);
-
-    storeKey = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-                                                      kSCDynamicStoreDomainState,
-                                                      kSCCompAnyRegex,
-                                                      kSCEntNetIPv4);
-    CFArrayAppendValue(patternsArray, storeKey);
-    CFRelease(storeKey);
-
-    if (!SCDynamicStoreSetNotificationKeys(storeSession , notificationKeys, patternsArray)) {
-        qDebug() << "register notification error:"<< SCErrorString(SCError());
-        CFRelease(storeSession );
-        CFRelease(notificationKeys);
-        CFRelease(patternsArray);
-        return;
-    }
-    CFRelease(notificationKeys);
-    CFRelease(patternsArray);
-
-    runloopSource = SCDynamicStoreCreateRunLoopSource(NULL, storeSession , 0);
-    if (!runloopSource) {
-        qDebug() << "runloop source error:"<< SCErrorString(SCError());
-        CFRelease(storeSession );
-        return;
-    }
-
-    CFRunLoopAddSource(CFRunLoopGetCurrent(), runloopSource, kCFRunLoopDefaultMode);
-    return;
-}
-#include "moc_qcorewlanengine_mac_p.cpp"
-
-QTM_END_NAMESPACE
--- a/qtmobility/src/bearer/qcorewlanengine_mac_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QCOREWLANENGINE_P_H
-#define QCOREWLANENGINE_P_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qnetworksessionengine_p.h"
-#include "qnetworkconfiguration.h"
-
-#include <QMap>
-#include <QTimer>
-#include <SystemConfiguration/SystemConfiguration.h>
-#include <QThread>
-#include <QMutex>
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationPrivate;
-class QScanThread;
-
-class QCoreWlanEngine : public QNetworkSessionEngine
-{
-    Q_OBJECT
-    friend class QScanThread;
-
-public:
-    QCoreWlanEngine(QObject *parent = 0);
-    ~QCoreWlanEngine();
-
-    QList<QNetworkConfigurationPrivate *> getConfigurations(bool *ok = 0);
-    QString getInterfaceFromId(const QString &id);
-    bool hasIdentifier(const QString &id);
-
-    QString bearerName(const QString &id);
-
-    void connectToId(const QString &id);
-    void disconnectFromId(const QString &id);
-
-    void requestUpdate();
-
-    static QCoreWlanEngine *instance();
-    QString interfaceName;
-
-private:
-    bool isWifiReady(const QString &dev);
-    QTimer pollTimer;
-    QList<QNetworkConfigurationPrivate *> foundConfigurations;
-
-    SCDynamicStoreRef storeSession;
-    CFRunLoopSourceRef runloopSource;
-    bool hasWifi;
-    QScanThread *scanThread;
-    QMutex mutex;
-    static bool getAllScInterfaces();
-
-private Q_SLOTS:
-    void init();
-
-protected:
-    void startNetworkChangeLoop();
-};
-
-class QScanThread : public QThread
-{
-    Q_OBJECT
-
-public:
-    QScanThread(QObject *parent = 0);
-    ~QScanThread();
-
-    void quit();
-    QList<QNetworkConfigurationPrivate *> getConfigurations();
-    QString interfaceName;
-    QMap<QString, QString> configurationInterface;
-    void getUserProfiles();
-    QString getNetworkNameFromSsid(const QString &ssid);
-    QString getSsidFromNetworkName(const QString &name);
-    bool isKnownSsid(const QString &ssid);
-    QMap<QString, QMap<QString,QString> > userProfiles;
-
-signals:
-    void networksChanged();
-
-protected:
-    void run();
-
-private:
-    QList<QNetworkConfigurationPrivate *> fetchedConfigurations;
-    QMutex mutex;
-    QStringList foundNetwork(const QString &id, const QString &ssid,
-                             const QNetworkConfiguration::StateFlags state,
-                             const QString &interfaceName,
-                             const QNetworkConfiguration::Purpose purpose);
-
-};
-
-
-QTM_END_NAMESPACE
-
-#endif
-
--- a/qtmobility/src/bearer/qgenericengine.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,257 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qgenericengine_p.h"
-#include "qnetworkconfiguration_p.h"
-
-#include <QtCore/qthread.h>
-#include <QtCore/qmutex.h>
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qstringlist.h>
-
-#include <QtCore/qdebug.h>
-
-#ifdef Q_OS_WIN
-#include "qnetworksessionengine_win_p.h"
-#endif
-
-#ifdef Q_OS_LINUX
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <unistd.h>
-#endif
-
-QTM_BEGIN_NAMESPACE
-
-Q_GLOBAL_STATIC(QGenericEngine, genericEngine)
-
-static QString qGetInterfaceType(const QString &interface)
-{
-#ifdef Q_OS_WIN32
-    unsigned long oid;
-    DWORD bytesWritten;
-
-    NDIS_MEDIUM medium;
-    NDIS_PHYSICAL_MEDIUM physicalMedium;
-
-    HANDLE handle = CreateFile((TCHAR *)QString("\\\\.\\%1").arg(interface).utf16(), 0,
-                               FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
-    if (handle == INVALID_HANDLE_VALUE)
-        return QLatin1String("Unknown");
-
-    oid = OID_GEN_MEDIA_SUPPORTED;
-    bytesWritten = 0;
-    bool result = DeviceIoControl(handle, IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid),
-                                  &medium, sizeof(medium), &bytesWritten, 0);
-    if (!result) {
-        CloseHandle(handle);
-        return QLatin1String("Unknown");
-    }
-
-    oid = OID_GEN_PHYSICAL_MEDIUM;
-    bytesWritten = 0;
-    result = DeviceIoControl(handle, IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid),
-                             &physicalMedium, sizeof(physicalMedium), &bytesWritten, 0);
-    if (!result) {
-        CloseHandle(handle);
-
-        if (medium == NdisMedium802_3)
-            return QLatin1String("Ethernet");
-        else
-            return QLatin1String("Unknown");
-    }
-
-    CloseHandle(handle);
-
-    if (medium == NdisMedium802_3) {
-        switch (physicalMedium) {
-        case NdisPhysicalMediumWirelessLan:
-            return QLatin1String("WLAN");
-        case NdisPhysicalMediumBluetooth:
-            return QLatin1String("Bluetooth");
-        case NdisPhysicalMediumWiMax:
-            return QLatin1String("WiMAX");
-        default:
-#ifdef BEARER_MANAGEMENT_DEBUG
-            qDebug() << "Physical Medium" << physicalMedium;
-#endif
-            return QLatin1String("Ethernet");
-        }
-    }
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-    qDebug() << medium << physicalMedium;
-#endif
-#elif defined(Q_OS_LINUX)
-    int sock = socket(AF_INET, SOCK_DGRAM, 0);
-
-    ifreq request;
-    strncpy(request.ifr_name, interface.toLocal8Bit().data(), sizeof(request.ifr_name));
-    int result = ioctl(sock, SIOCGIFHWADDR, &request);
-    close(sock);
-
-    if (result >= 0 && request.ifr_hwaddr.sa_family == ARPHRD_ETHER)
-        return QLatin1String("Ethernet");
-#else
-    Q_UNUSED(interface);
-#endif
-
-    return QLatin1String("Unknown");
-}
-
-QGenericEngine::QGenericEngine(QObject *parent)
-:   QNetworkSessionEngine(parent)
-{
-    connect(&pollTimer, SIGNAL(timeout()), this, SIGNAL(configurationsChanged()));
-    pollTimer.setInterval(10000);
-}
-
-QGenericEngine::~QGenericEngine()
-{
-}
-
-QList<QNetworkConfigurationPrivate *> QGenericEngine::getConfigurations(bool *ok)
-{
-    if (ok)
-        *ok = true;
-
-    QList<QNetworkConfigurationPrivate *> foundConfigurations;
-
-    // Immediately after connecting with a wireless access point
-    // QNetworkInterface::allInterfaces() will sometimes return an empty list. Calling it again a
-    // second time results in a non-empty list. If we loose interfaces we will end up removing
-    // network configurations which will break current sessions.
-    QList<QNetworkInterface> interfaces = QNetworkInterface::allInterfaces();
-    if (interfaces.isEmpty())
-        interfaces = QNetworkInterface::allInterfaces();
-
-    // create configuration for each interface
-    while (!interfaces.isEmpty()) {
-        QNetworkInterface interface = interfaces.takeFirst();
-
-        if (!interface.isValid())
-            continue;
-
-        // ignore loopback interface
-        if (interface.flags() & QNetworkInterface::IsLoopBack)
-            continue;
-
-        // ignore WLAN interface handled in separate engine
-        if (qGetInterfaceType(interface.name()) == "WLAN")
-            continue;
-
-        QNetworkConfigurationPrivate *cpPriv = new QNetworkConfigurationPrivate;
-        const QString humanReadableName = interface.humanReadableName();
-        cpPriv->name = humanReadableName.isEmpty() ? interface.name() : humanReadableName;
-        cpPriv->isValid = true;
-
-        uint identifier;
-        if (interface.index())
-            identifier = qHash(QLatin1String("NLA:") + QString::number(interface.index()));
-        else
-            identifier = qHash(QLatin1String("NLA:") + interface.hardwareAddress());
-
-        cpPriv->id = QString::number(identifier);
-        cpPriv->state = QNetworkConfiguration::Discovered;
-        cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
-        if (interface.name().isEmpty())
-            cpPriv->bearer = QLatin1String("Unknown");
-        else
-            cpPriv->bearer = qGetInterfaceType(interface.name());
-
-        if((interface.flags() & QNetworkInterface::IsUp) && !interface.addressEntries().isEmpty())
-            cpPriv->state |= QNetworkConfiguration::Active;
-
-        configurationInterface[identifier] = interface.name();
-
-        foundConfigurations.append(cpPriv);
-    }
-
-    pollTimer.start();
-
-    return foundConfigurations;
-}
-
-QString QGenericEngine::getInterfaceFromId(const QString &id)
-{
-    return configurationInterface.value(id.toUInt());
-}
-
-bool QGenericEngine::hasIdentifier(const QString &id)
-{
-    return configurationInterface.contains(id.toUInt());
-}
-
-/*QString QGenericEngine::bearerName(const QString &id)
-{
-    QString interface = getInterfaceFromId(id);
-
-    if (interface.isEmpty())
-        return QLatin1String("Unknown");
-
-    return qGetInterfaceType(interface);
-}*/
-
-void QGenericEngine::connectToId(const QString &id)
-{
-    emit connectionError(id, OperationNotSupported);
-}
-
-void QGenericEngine::disconnectFromId(const QString &id)
-{
-    emit connectionError(id, OperationNotSupported);
-}
-
-void QGenericEngine::requestUpdate()
-{
-    emit configurationsChanged();
-}
-
-QGenericEngine *QGenericEngine::instance()
-{
-    return genericEngine();
-}
-
-#include "moc_qgenericengine_p.cpp"
-QTM_END_NAMESPACE
-
--- a/qtmobility/src/bearer/qgenericengine_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QGENERICENGINE_P_H
-#define QGENERICENGINE_P_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qnetworksessionengine_p.h"
-
-#include <QMap>
-#include <QTimer>
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationPrivate;
-
-class QGenericEngine : public QNetworkSessionEngine
-{
-    Q_OBJECT
-
-public:
-    QGenericEngine(QObject *parent = 0);
-    ~QGenericEngine();
-
-    QList<QNetworkConfigurationPrivate *> getConfigurations(bool *ok = 0);
-    QString getInterfaceFromId(const QString &id);
-    bool hasIdentifier(const QString &id);
-
-    //QString bearerName(const QString &id);
-
-    void connectToId(const QString &id);
-    void disconnectFromId(const QString &id);
-
-    void requestUpdate();
-
-    static QGenericEngine *instance();
-
-private:
-    QMap<uint, QString> configurationInterface;
-    QTimer pollTimer;
-};
-
-QTM_END_NAMESPACE
-
-#endif
-
--- a/qtmobility/src/bearer/qnativewifiengine_win.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,730 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnativewifiengine_win_p.h"
-#include "qnetworkconfiguration_p.h"
-
-#include <QtCore/qmutex.h>
-#include <QtCore/qlibrary.h>
-#include <QtCore/qstringlist.h>
-
-#include <QtCore/qdebug.h>
-
-#include <wtypes.h>
-#undef interface
-
-QTM_BEGIN_NAMESPACE
-
-Q_GLOBAL_STATIC(QNativeWifiEngine, nativeWifiEngine)
-
-#define WLAN_MAX_NAME_LENGTH 256
-#define WLAN_MAX_PHY_TYPE_NUMBER 8
-#define WLAN_NOTIFICATION_SOURCE_ALL 0x0000ffff
-#define WLAN_AVAILABLE_NETWORK_CONNECTED 1
-#define WLAN_AVAILABLE_NETWORK_HAS_PROFILE 2
-#define DOT11_SSID_MAX_LENGTH 32
-
-struct WLAN_NOTIFICATION_DATA {
-    DWORD NotificationSource;
-    DWORD NotificationCode;
-    GUID InterfaceGuid;
-    DWORD dwDataSize;
-    PVOID pData;
-};
-
-enum WLAN_INTERFACE_STATE {
-    wlan_interface_state_not_ready = 0,
-    wlan_interface_state_connected,
-    wlan_interface_state_ad_hoc_network_formed,
-    wlan_interface_state_disconnecting,
-    wlan_interface_state_disconnected,
-    wlan_interface_state_associating,
-    wlan_interface_state_discovering,
-    wlan_interface_state_authenticating
-};
-
-struct WLAN_INTERFACE_INFO {
-    GUID InterfaceGuid;
-    WCHAR strInterfaceDescription[WLAN_MAX_NAME_LENGTH];
-    WLAN_INTERFACE_STATE isState;
-};
-
-struct WLAN_INTERFACE_INFO_LIST {
-    DWORD dwNumberOfItems;
-    DWORD dwIndex;
-    WLAN_INTERFACE_INFO InterfaceInfo[1];
-};
-
-struct DOT11_SSID {
-    ULONG uSSIDLength;
-    UCHAR ucSSID[DOT11_SSID_MAX_LENGTH];
-};
-
-struct NDIS_OBJECT_HEADER {
-    UCHAR Type;
-    UCHAR Revision;
-    USHORT Size;
-};
-
-typedef UCHAR DOT11_MAC_ADDRESS[6];
-struct DOT11_BSSID_LIST {
-    NDIS_OBJECT_HEADER Header;
-    ULONG uNumberOfEntries;
-    ULONG uTotalNumOfEntries;
-    DOT11_MAC_ADDRESS BSSIDs[1];
-};
-
-enum DOT11_BSS_TYPE {
-    dot11_BSS_type_infrastructure = 1,
-    dot11_BSS_type_independent = 2,
-    dot11_BSS_type_any = 3
-};
-
-enum DOT11_PHY_TYPE {
-    dot11_phy_type_unknown = 0,
-    dot11_phy_type_any = dot11_phy_type_unknown,
-    dot11_phy_type_fhss = 1,
-    dot11_phy_type_dsss = 2,
-    dot11_phy_type_irbaseband = 3,
-    dot11_phy_type_ofdm = 4,
-    dot11_phy_type_hrdsss = 5,
-    dot11_phy_type_erp = 6,
-    dot11_phy_type_ht = 7,
-    dot11_phy_type_IHV_start = 0x80000000,
-    dot11_phy_type_IHV_end = 0xffffffff
-};
-
-enum DOT11_AUTH_ALGORITHM {
-    DOT11_AUTH_ALGO_80211_OPEN = 1,
-    DOT11_AUTH_ALGO_80211_SHARED_KEY = 2,
-    DOT11_AUTH_ALGO_WPA = 3,
-    DOT11_AUTH_ALGO_WPA_PSK = 4,
-    DOT11_AUTH_ALGO_WPA_NONE = 5,
-    DOT11_AUTH_ALGO_RSNA = 6,
-    DOT11_AUTH_ALGO_RSNA_PSK = 7,
-    DOT11_AUTH_ALGO_IHV_START = 0x80000000,
-    DOT11_AUTH_ALGO_IHV_END = 0xffffffff
-};
-
-enum DOT11_CIPHER_ALGORITHM {
-    DOT11_CIPHER_ALGO_NONE = 0x00,
-    DOT11_CIPHER_ALGO_WEP40 = 0x01,
-    DOT11_CIPHER_ALGO_TKIP = 0x02,
-    DOT11_CIPHER_ALGO_CCMP = 0x04,
-    DOT11_CIPHER_ALGO_WEP104 = 0x05,
-    DOT11_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
-    DOT11_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
-    DOT11_CIPHER_ALGO_WEP = 0x101,
-    DOT11_CIPHER_ALGO_IHV_START = 0x80000000,
-    DOT11_CIPHER_ALGO_IHV_END = 0xffffffff
-};
-
-struct WLAN_AVAILABLE_NETWORK {
-    WCHAR strProfileName[WLAN_MAX_NAME_LENGTH];
-    DOT11_SSID dot11Ssid;
-    DOT11_BSS_TYPE dot11BssType;
-    ULONG uNumberOfBssids;
-    BOOL bNetworkConnectable;
-    DWORD wlanNotConnectableReason;
-    ULONG uNumberOfPhyTypes;
-    DOT11_PHY_TYPE dot11PhyTypes[WLAN_MAX_PHY_TYPE_NUMBER];
-    BOOL bMorePhyTypes;
-    ULONG wlanSignalQuality;
-    BOOL bSecurityEnabled;
-    DOT11_AUTH_ALGORITHM dot11DefaultAuthAlgorithm;
-    DOT11_CIPHER_ALGORITHM dot11DefaultCipherAlgorithm;
-    DWORD dwFlags;
-    DWORD dwReserved;
-};
-
-struct WLAN_AVAILABLE_NETWORK_LIST {
-    DWORD dwNumberOfItems;
-    DWORD dwIndex;
-    WLAN_AVAILABLE_NETWORK Network[1];
-};
-
-enum WLAN_INTF_OPCODE {
-    wlan_intf_opcode_autoconf_start = 0x000000000,
-    wlan_intf_opcode_autoconf_enabled,
-    wlan_intf_opcode_background_scan_enabled,
-    wlan_intf_opcode_media_streaming_mode,
-    wlan_intf_opcode_radio_state,
-    wlan_intf_opcode_bss_type,
-    wlan_intf_opcode_interface_state,
-    wlan_intf_opcode_current_connection,
-    wlan_intf_opcode_channel_number,
-    wlan_intf_opcode_supported_infrastructure_auth_cipher_pairs,
-    wlan_intf_opcode_supported_adhoc_auth_cipher_pairs,
-    wlan_intf_opcode_supported_country_or_region_string_list,
-    wlan_intf_opcode_current_operation_mode,
-    wlan_intf_opcode_supported_safe_mode,
-    wlan_intf_opcode_certified_safe_mode,
-    wlan_intf_opcode_autoconf_end = 0x0fffffff,
-    wlan_intf_opcode_msm_start = 0x10000100,
-    wlan_intf_opcode_statistics,
-    wlan_intf_opcode_rssi,
-    wlan_intf_opcode_msm_end = 0x1fffffff,
-    wlan_intf_opcode_security_start = 0x20010000,
-    wlan_intf_opcode_security_end = 0x2fffffff,
-    wlan_intf_opcode_ihv_start = 0x30000000,
-    wlan_intf_opcode_ihv_end = 0x3fffffff
-};
-
-enum WLAN_OPCODE_VALUE_TYPE {
-    wlan_opcode_value_type_query_only = 0,
-    wlan_opcode_value_type_set_by_group_policy,
-    wlan_opcode_value_type_set_by_user,
-    wlan_opcode_value_type_invalid
-};
-
-enum WLAN_CONNECTION_MODE {
-    wlan_connection_mode_profile = 0,
-    wlan_connection_mode_temporary_profile,
-    wlan_connection_mode_discovery_secure,
-    wlan_connection_mode_discovery_unsecure,
-    wlan_connection_mode_auto,
-    wlan_connection_mode_invalid
-};
-
-struct WLAN_CONNECTION_PARAMETERS {
-    WLAN_CONNECTION_MODE wlanConnectionMode;
-    LPCWSTR strProfile;
-    DOT11_SSID *pDot11Ssid;
-    DOT11_BSSID_LIST *pDesiredBssidList;
-    DOT11_BSS_TYPE dot11BssType;
-    DWORD dwFlags;
-};
-
-struct WLAN_RAW_DATA {
-    DWORD dwDataSize;
-    BYTE DataBlob[1];
-};
-
-enum WLAN_NOTIFICATION_ACM {
-    wlan_notification_acm_start = 0,
-    wlan_notification_acm_autoconf_enabled,
-    wlan_notification_acm_autoconf_disabled,
-    wlan_notification_acm_background_scan_enabled,
-    wlan_notification_acm_background_scan_disabled,
-    wlan_notification_acm_bss_type_change,
-    wlan_notification_acm_power_setting_change,
-    wlan_notification_acm_scan_complete,
-    wlan_notification_acm_scan_fail,
-    wlan_notification_acm_connection_start,
-    wlan_notification_acm_connection_complete,
-    wlan_notification_acm_connection_attempt_fail,
-    wlan_notification_acm_filter_list_change,
-    wlan_notification_acm_interface_arrival,
-    wlan_notification_acm_interface_removal,
-    wlan_notification_acm_profile_change,
-    wlan_notification_acm_profile_name_change,
-    wlan_notification_acm_profiles_exhausted,
-    wlan_notification_acm_network_not_available,
-    wlan_notification_acm_network_available,
-    wlan_notification_acm_disconnecting,
-    wlan_notification_acm_disconnected,
-    wlan_notification_acm_adhoc_network_state_change,
-    wlan_notification_acm_end
-};
-
-struct WLAN_ASSOCIATION_ATTRIBUTES {
-    DOT11_SSID dot11Ssid;
-    DOT11_BSS_TYPE dot11BssType;
-    DOT11_MAC_ADDRESS dot11Bssid;
-    DOT11_PHY_TYPE dot11PhyType;
-    ULONG uDot11PhyIndex;
-    ULONG wlanSignalQuality;
-    ULONG ulRxRate;
-    ULONG ulTxRate;
-};
-
-struct WLAN_SECURITY_ATTRIBUTES {
-    BOOL bSecurityEnabled;
-    BOOL bOneXEnabled;
-    DOT11_AUTH_ALGORITHM dot11AuthAlgorithm;
-    DOT11_CIPHER_ALGORITHM dot11CipherAlgorithm;
-};
-
-struct WLAN_CONNECTION_ATTRIBUTES {
-    WLAN_INTERFACE_STATE isState;
-    WLAN_CONNECTION_MODE wlanConnectionMode;
-    WCHAR strProfileName[WLAN_MAX_NAME_LENGTH];
-    WLAN_ASSOCIATION_ATTRIBUTES wlanAssociationAttributes;
-    WLAN_SECURITY_ATTRIBUTES wlanSecurityAttributes;
-};
-
-typedef void (WINAPI *WLAN_NOTIFICATION_CALLBACK)(WLAN_NOTIFICATION_DATA *, PVOID);
-
-typedef DWORD (WINAPI *WlanOpenHandleProto)
-    (DWORD dwClientVersion, PVOID pReserved, PDWORD pdwNegotiatedVersion, PHANDLE phClientHandle);
-typedef DWORD (WINAPI *WlanRegisterNotificationProto)
-    (HANDLE hClientHandle, DWORD dwNotifSource, BOOL bIgnoreDuplicate,
-     WLAN_NOTIFICATION_CALLBACK funcCallback, PVOID pCallbackContext,
-     PVOID pReserved, PDWORD pdwPrevNotifSource);
-typedef DWORD (WINAPI *WlanEnumInterfacesProto)
-    (HANDLE hClientHandle, PVOID pReserved, WLAN_INTERFACE_INFO_LIST **ppInterfaceList);
-typedef DWORD (WINAPI *WlanGetAvailableNetworkListProto)
-    (HANDLE hClientHandle, const GUID* pInterfaceGuid, DWORD dwFlags, PVOID pReserved,
-     WLAN_AVAILABLE_NETWORK_LIST **ppAvailableNetworkList);
-typedef DWORD (WINAPI *WlanQueryInterfaceProto)
-    (HANDLE hClientHandle, const GUID *pInterfaceGuid, WLAN_INTF_OPCODE OpCode, PVOID pReserved,
-     PDWORD pdwDataSize, PVOID *ppData, WLAN_OPCODE_VALUE_TYPE *pWlanOpcodeValueType);
-typedef DWORD (WINAPI *WlanConnectProto)
-    (HANDLE hClientHandle, const GUID *pInterfaceGuid,
-     const WLAN_CONNECTION_PARAMETERS *pConnectionParameters, PVOID pReserved);
-typedef DWORD (WINAPI *WlanDisconnectProto)
-    (HANDLE hClientHandle, const GUID *pInterfaceGuid, PVOID pReserved);
-typedef DWORD (WINAPI *WlanScanProto)
-    (HANDLE hClientHandle, const GUID *pInterfaceGuid, const DOT11_SSID *pDot11Ssid,
-     const WLAN_RAW_DATA *pIeData, PVOID pReserved);
-typedef VOID (WINAPI *WlanFreeMemoryProto)(PVOID pMemory);
-typedef DWORD (WINAPI *WlanCloseHandleProto)(HANDLE hClientHandle, PVOID pReserved);
-
-static WlanOpenHandleProto local_WlanOpenHandle = 0;
-static WlanRegisterNotificationProto local_WlanRegisterNotification = 0;
-static WlanEnumInterfacesProto local_WlanEnumInterfaces = 0;
-static WlanGetAvailableNetworkListProto local_WlanGetAvailableNetworkList = 0;
-static WlanQueryInterfaceProto local_WlanQueryInterface = 0;
-static WlanConnectProto local_WlanConnect = 0;
-static WlanDisconnectProto local_WlanDisconnect = 0;
-static WlanScanProto local_WlanScan = 0;
-static WlanFreeMemoryProto local_WlanFreeMemory = 0;
-static WlanCloseHandleProto local_WlanCloseHandle = 0;
-
-Q_GLOBAL_STATIC_WITH_ARGS(QMutex, dynamicLoadMutex, (QMutex::Recursive));
-
-static void resolveLibrary()
-{
-    static volatile bool triedResolve = false;
-
-    if (!triedResolve) {
-#ifndef QT_NO_THREAD
-        QMutexLocker locker(dynamicLoadMutex());
-#endif
-
-        if (!triedResolve) {
-            local_WlanOpenHandle = (WlanOpenHandleProto)
-                QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanOpenHandle");
-            local_WlanRegisterNotification = (WlanRegisterNotificationProto)
-                QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanRegisterNotification");
-            local_WlanEnumInterfaces = (WlanEnumInterfacesProto)
-                QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanEnumInterfaces");
-            local_WlanGetAvailableNetworkList = (WlanGetAvailableNetworkListProto)
-                QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanGetAvailableNetworkList");
-            local_WlanQueryInterface = (WlanQueryInterfaceProto)
-                QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanQueryInterface");
-            local_WlanConnect = (WlanConnectProto)
-                QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanConnect");
-            local_WlanDisconnect = (WlanDisconnectProto)
-                QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanDisconnect");
-            local_WlanScan = (WlanScanProto)
-                QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanScan");
-            local_WlanFreeMemory = (WlanFreeMemoryProto)
-                QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanFreeMemory");
-            local_WlanCloseHandle = (WlanCloseHandleProto)
-                QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanCloseHandle");
-
-            triedResolve = true;
-        }
-    }
-}
-
-void qNotificationCallback(WLAN_NOTIFICATION_DATA *data, QNativeWifiEngine *d)
-{
-    Q_UNUSED(d);
-
-    switch (data->NotificationCode) {
-    case wlan_notification_acm_connection_complete:
-    case wlan_notification_acm_disconnected:
-        d->emitConfigurationsChanged();
-        break;
-    default:
-        qDebug() << "wlan unknown notification";
-    }
-}
-
-QNativeWifiEngine::QNativeWifiEngine(QObject *parent)
-:   QNetworkSessionEngine(parent), handle(0)
-{
-    DWORD clientVersion;
-
-    DWORD result = local_WlanOpenHandle(1, 0, &clientVersion, &handle);
-    if (result != ERROR_SUCCESS) {
-        if (result != ERROR_SERVICE_NOT_ACTIVE)
-            qWarning("%s: WlanOpenHandle failed with error %ld\n", __FUNCTION__, result);
-
-        return;
-    }
-
-    result = local_WlanRegisterNotification(handle, WLAN_NOTIFICATION_SOURCE_ALL, true,
-                                            WLAN_NOTIFICATION_CALLBACK(qNotificationCallback),
-                                            this, 0, 0);
-    if (result != ERROR_SUCCESS)
-        qWarning("%s: WlanRegisterNotification failed with error %ld\n", __FUNCTION__, result);
-
-    // On Windows XP SP2 and SP3 only connection and disconnection notifications are available.
-    // We need to poll for changes in available wireless networks.
-    connect(&pollTimer, SIGNAL(timeout()), this, SIGNAL(configurationsChanged()));
-    pollTimer.setInterval(10000);
-}
-
-QNativeWifiEngine::~QNativeWifiEngine()
-{
-    local_WlanCloseHandle(handle, 0);
-}
-
-QList<QNetworkConfigurationPrivate *> QNativeWifiEngine::getConfigurations(bool *ok)
-{
-    if (ok)
-        *ok = false;
-
-    QList<QNetworkConfigurationPrivate *> foundConfigurations;
-
-    // enumerate interfaces
-    WLAN_INTERFACE_INFO_LIST *interfaceList;
-    DWORD result = local_WlanEnumInterfaces(handle, 0, &interfaceList);
-    if (result != ERROR_SUCCESS) {
-        qWarning("%s: WlanEnumInterfaces failed with error %ld\n", __FUNCTION__, result);
-        return foundConfigurations;
-    }
-
-    for (unsigned int i = 0; i < interfaceList->dwNumberOfItems; ++i) {
-        const WLAN_INTERFACE_INFO &interface = interfaceList->InterfaceInfo[i];
-
-        WLAN_AVAILABLE_NETWORK_LIST *networkList;
-        result = local_WlanGetAvailableNetworkList(handle, &interface.InterfaceGuid,
-                                                   3, 0, &networkList);
-        if (result != ERROR_SUCCESS) {
-            qWarning("%s: WlanGetAvailableNetworkList failed with error %ld\n",
-                     __FUNCTION__, result);
-            continue;
-        }
-
-        QStringList seenNetworks;
-
-        for (unsigned int j = 0; j < networkList->dwNumberOfItems; ++j) {
-            WLAN_AVAILABLE_NETWORK &network = networkList->Network[j];
-
-            QString networkName;
-
-            if (network.strProfileName[0] != 0) {
-                networkName = QString::fromWCharArray(network.strProfileName);
-            } else {
-                networkName = QByteArray(reinterpret_cast<char *>(network.dot11Ssid.ucSSID),
-                                         network.dot11Ssid.uSSIDLength);
-            }
-
-            // don't add duplicate networks
-            if (seenNetworks.contains(networkName))
-                continue;
-            else
-                seenNetworks.append(networkName);
-
-            QNetworkConfigurationPrivate *cpPriv = new QNetworkConfigurationPrivate;
-
-            cpPriv->isValid = true;
-
-            cpPriv->name = networkName;
-            cpPriv->id = QString::number(qHash(QLatin1String("WLAN:") + cpPriv->name));
-
-            if (!(network.dwFlags & WLAN_AVAILABLE_NETWORK_HAS_PROFILE))
-                cpPriv->state = QNetworkConfiguration::Undefined;
-
-            if (network.strProfileName[0] != 0) {
-                if (network.bNetworkConnectable) {
-                    if (network.dwFlags & WLAN_AVAILABLE_NETWORK_CONNECTED)
-                        cpPriv->state = QNetworkConfiguration::Active;
-                    else
-                        cpPriv->state = QNetworkConfiguration::Discovered;
-                } else {
-                    cpPriv->state = QNetworkConfiguration::Defined;
-                }
-            }
-
-            cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
-            cpPriv->bearer = QLatin1String("WLAN");
-
-
-            foundConfigurations.append(cpPriv);
-        }
-
-        local_WlanFreeMemory(networkList);
-    }
-
-    local_WlanFreeMemory(interfaceList);
-
-    if (ok)
-        *ok = true;
-
-    pollTimer.start();
-
-    return foundConfigurations;
-}
-
-QString QNativeWifiEngine::getInterfaceFromId(const QString &id)
-{
-    // enumerate interfaces
-    WLAN_INTERFACE_INFO_LIST *interfaceList;
-    DWORD result = local_WlanEnumInterfaces(handle, 0, &interfaceList);
-    if (result != ERROR_SUCCESS) {
-        qWarning("%s: WlanEnumInterfaces failed with error %ld\n", __FUNCTION__, result);
-        return QString();
-    }
-
-    for (unsigned int i = 0; i < interfaceList->dwNumberOfItems; ++i) {
-        const WLAN_INTERFACE_INFO &interface = interfaceList->InterfaceInfo[i];
-
-        DWORD dataSize;
-        WLAN_CONNECTION_ATTRIBUTES *connectionAttributes;
-        result = local_WlanQueryInterface(handle, &interface.InterfaceGuid,
-                                          wlan_intf_opcode_current_connection, 0, &dataSize,
-                                          reinterpret_cast<PVOID *>(&connectionAttributes), 0);
-        if (result != ERROR_SUCCESS) {
-            if (result != ERROR_INVALID_STATE)
-                qWarning("%s: WlanQueryInterface failed with error %ld\n", __FUNCTION__, result);
-
-            continue;
-        }
-
-        if (qHash(QLatin1String("WLAN:") +
-                  QString::fromWCharArray(connectionAttributes->strProfileName)) == id.toUInt()) {
-            QString guid("{%1-%2-%3-%4%5-%6%7%8%9%10%11}");
-
-            guid = guid.arg(interface.InterfaceGuid.Data1, 8, 16, QChar('0'));
-            guid = guid.arg(interface.InterfaceGuid.Data2, 4, 16, QChar('0'));
-            guid = guid.arg(interface.InterfaceGuid.Data3, 4, 16, QChar('0'));
-            for (int i = 0; i < 8; ++i)
-                guid = guid.arg(interface.InterfaceGuid.Data4[i], 2, 16, QChar('0'));
-
-            local_WlanFreeMemory(connectionAttributes);
-
-            return guid.toUpper();
-        }
-
-        local_WlanFreeMemory(connectionAttributes);
-        local_WlanFreeMemory(interfaceList);
-    }
-
-    return QString();
-}
-
-bool QNativeWifiEngine::hasIdentifier(const QString &id)
-{
-    // enumerate interfaces
-    WLAN_INTERFACE_INFO_LIST *interfaceList;
-    DWORD result = local_WlanEnumInterfaces(handle, 0, &interfaceList);
-    if (result != ERROR_SUCCESS) {
-        qWarning("%s: WlanEnumInterfaces failed with error %ld\n", __FUNCTION__, result);
-        return false;
-    }
-
-    for (unsigned int i = 0; i < interfaceList->dwNumberOfItems; ++i) {
-        const WLAN_INTERFACE_INFO &interface = interfaceList->InterfaceInfo[i];
-
-        WLAN_AVAILABLE_NETWORK_LIST *networkList;
-        result = local_WlanGetAvailableNetworkList(handle, &interface.InterfaceGuid,
-                                                   3, 0, &networkList);
-        if (result != ERROR_SUCCESS) {
-            qWarning("%s: WlanGetAvailableNetworkList failed with error %ld\n",
-                     __FUNCTION__, result);
-            continue;
-        }
-
-        for (unsigned int j = 0; j < networkList->dwNumberOfItems; ++j) {
-            WLAN_AVAILABLE_NETWORK &network = networkList->Network[j];
-
-            QString networkName;
-
-            if (network.strProfileName[0] != 0) {
-                networkName = QString::fromWCharArray(network.strProfileName);
-            } else {
-                networkName = QByteArray(reinterpret_cast<char *>(network.dot11Ssid.ucSSID),
-                                         network.dot11Ssid.uSSIDLength);
-            }
-
-            if (qHash(QLatin1String("WLAN:") + networkName) == id.toUInt()) {
-                local_WlanFreeMemory(networkList);
-                local_WlanFreeMemory(interfaceList);
-                return true;
-            }
-        }
-
-        local_WlanFreeMemory(networkList);
-    }
-
-    local_WlanFreeMemory(interfaceList);
-
-    return false;
-}
-
-/*QString QNativeWifiEngine::bearerName(const QString &)
-{
-    return QLatin1String("WLAN");
-}*/
-
-void QNativeWifiEngine::connectToId(const QString &id)
-{
-    WLAN_INTERFACE_INFO_LIST *interfaceList;
-    DWORD result = local_WlanEnumInterfaces(handle, 0, &interfaceList);
-    if (result != ERROR_SUCCESS) {
-        qWarning("%s: WlanEnumInterfaces failed with error %ld\n", __FUNCTION__, result);
-        emit connectionError(id, InterfaceLookupError);
-        return;
-    }
-
-    QString profile;
-
-    for (unsigned int i = 0; i < interfaceList->dwNumberOfItems; ++i) {
-        const WLAN_INTERFACE_INFO &interface = interfaceList->InterfaceInfo[i];
-
-        WLAN_AVAILABLE_NETWORK_LIST *networkList;
-        result = local_WlanGetAvailableNetworkList(handle, &interface.InterfaceGuid,
-                                                   3, 0, &networkList);
-        if (result != ERROR_SUCCESS) {
-            qWarning("%s: WlanGetAvailableNetworkList failed with error %ld\n",
-                     __FUNCTION__, result);
-            continue;
-        }
-
-        for (unsigned int j = 0; j < networkList->dwNumberOfItems; ++j) {
-            WLAN_AVAILABLE_NETWORK &network = networkList->Network[j];
-
-            profile = QString::fromWCharArray(network.strProfileName);
-
-            if (qHash(QLatin1String("WLAN:") + profile) == id.toUInt())
-                break;
-            else
-                profile.clear();
-        }
-
-        local_WlanFreeMemory(networkList);
-
-        if (!profile.isEmpty()) {
-            WLAN_CONNECTION_PARAMETERS parameters;
-            parameters.wlanConnectionMode = wlan_connection_mode_profile;
-            parameters.strProfile = reinterpret_cast<LPCWSTR>(profile.utf16());
-            parameters.pDot11Ssid = 0;
-            parameters.pDesiredBssidList = 0;
-            parameters.dot11BssType = dot11_BSS_type_any;
-            parameters.dwFlags = 0;
-
-            DWORD result = local_WlanConnect(handle, &interface.InterfaceGuid, &parameters, 0);
-            if (result != ERROR_SUCCESS) {
-                qWarning("%s: WlanConnect failed with error %ld\n", __FUNCTION__, result);
-                emit connectionError(id, ConnectError);
-                break;
-            }
-
-            break;
-        }
-    }
-
-    local_WlanFreeMemory(interfaceList);
-
-    if (profile.isEmpty())
-        emit connectionError(id, InterfaceLookupError);
-}
-
-void QNativeWifiEngine::disconnectFromId(const QString &id)
-{
-    QString interface = getInterfaceFromId(id);
-
-    if (interface.isEmpty()) {
-        emit connectionError(id, InterfaceLookupError);
-        return;
-    }
-
-    QStringList split = interface.mid(1, interface.length() - 2).split('-');
-
-    GUID guid;
-    guid.Data1 = split.at(0).toUInt(0, 16);
-    guid.Data2 = split.at(1).toUShort(0, 16);
-    guid.Data3 = split.at(2).toUShort(0, 16);
-    guid.Data4[0] = split.at(3).left(2).toUShort(0, 16);
-    guid.Data4[1] = split.at(3).right(2).toUShort(0, 16);
-    for (int i = 0; i < 6; ++i)
-        guid.Data4[i + 2] = split.at(4).mid(i*2, 2).toUShort(0, 16);
-
-    DWORD result = local_WlanDisconnect(handle, &guid, 0);
-    if (result != ERROR_SUCCESS) {
-        qWarning("%s: WlanDisconnect failed with error %ld\n", __FUNCTION__, result);
-        emit connectionError(id, DisconnectionError);
-        return;
-    }
-}
-
-void QNativeWifiEngine::requestUpdate()
-{
-    // enumerate interfaces
-    WLAN_INTERFACE_INFO_LIST *interfaceList;
-    DWORD result = local_WlanEnumInterfaces(handle, 0, &interfaceList);
-    if (result != ERROR_SUCCESS) {
-        qWarning("%s: WlanEnumInterfaces failed with error %ld\n", __FUNCTION__, result);
-        return;
-    }
-
-    for (unsigned int i = 0; i < interfaceList->dwNumberOfItems; ++i) {
-        result = local_WlanScan(handle, &interfaceList->InterfaceInfo[i].InterfaceGuid, 0, 0, 0);
-        if (result != ERROR_SUCCESS)
-            qWarning("%s: WlanScan failed with error %ld\n", __FUNCTION__, result);
-    }
-}
-
-QNativeWifiEngine *QNativeWifiEngine::instance()
-{
-    resolveLibrary();
-
-    // native wifi dll not available
-    if (!local_WlanOpenHandle)
-        return 0;
-
-    QNativeWifiEngine *engine = nativeWifiEngine();
-
-    // could not initialise subsystem
-    if (engine && engine->handle == 0)
-        return 0;
-
-    return engine;
-}
-
-#include "moc_qnativewifiengine_win_p.cpp"
-
-QTM_END_NAMESPACE
--- a/qtmobility/src/bearer/qnativewifiengine_win_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNATIVEWIFIENGINE_P_H
-#define QNATIVEWIFIENGINE_P_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qnetworksessionengine_p.h"
-
-#include <QtCore/qtimer.h>
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationPrivate;
-
-class QNativeWifiEngine : public QNetworkSessionEngine
-{
-    Q_OBJECT
-
-public:
-    QNativeWifiEngine(QObject *parent = 0);
-    ~QNativeWifiEngine();
-
-    QList<QNetworkConfigurationPrivate *> getConfigurations(bool *ok = 0);
-    QString getInterfaceFromId(const QString &id);
-    bool hasIdentifier(const QString &id);
-
-    //QString bearerName(const QString &id);
-
-    void connectToId(const QString &id);
-    void disconnectFromId(const QString &id);
-
-    void requestUpdate();
-
-    inline void emitConfigurationsChanged() { emit configurationsChanged(); }
-
-    static QNativeWifiEngine *instance();
-
-private:
-    QTimer pollTimer;
-
-    Qt::HANDLE handle;
-};
-
-QTM_END_NAMESPACE
-
-#endif
--- a/qtmobility/src/bearer/qnetworkconfigmanager.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,340 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnetworkconfigmanager.h"
-
-#ifdef Q_OS_SYMBIAN
-#include "qnetworkconfigmanager_s60_p.h"
-#elif (defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5))
-#include "qnetworkconfigmanager_maemo_p.h"
-#else
-#include "qnetworkconfigmanager_p.h"
-#endif
-
-QTM_BEGIN_NAMESPACE
-
-Q_GLOBAL_STATIC(QNetworkConfigurationManagerPrivate, connManager);
-
-/*!
-    \class QNetworkConfigurationManager
-
-    \brief The QNetworkConfigurationManager class manages the network configurations provided
-    by the system.
-
-    \inmodule QtNetwork
-    \ingroup bearer
-
-    QNetworkConfigurationManager provides access to the network configurations known to the system and
-    enables applications to detect the system capabilities (with regards to network sessions) at runtime.
-
-    A QNetworkConfiguration abstracts a set of configuration options describing how a
-    network interface has to be configured to connect to a particular target network.
-    QNetworkConfigurationManager maintains and updates the global list of
-    QNetworkConfigurations. Applications can access and filter this list via
-    allConfigurations(). If a new configuration is added or an existing one is removed or changed
-    the configurationAdded(), configurationRemoved() and configurationChanged() signals are emitted
-    respectively.
-
-    The defaultConfiguration() can be used when intending to immediately create a new
-    network session without caring about the particular configuration. It returns
-    a \l QNetworkConfiguration::Discovered configuration. If there are not any
-    discovered ones an invalid configuration is returned.
-
-    Some configuration updates may require some time to perform updates. A WLAN scan is
-    such an example. Unless the platform performs internal updates it may be required to
-    manually trigger configuration updates via QNetworkConfigurationManager::updateConfigurations().
-    The completion of the update process is indicted by emitting the updateCompleted()
-    signal. The update process ensures that every existing QNetworkConfiguration instance
-    is updated. There is no need to ask for a renewed configuration list via allConfigurations().
-
-    \sa QNetworkConfiguration
-*/
-
-/*! 
-    \fn void QNetworkConfigurationManager::configurationAdded(const QNetworkConfiguration& config)
-
-    This signal is emitted whenever a new network configuration is added to the system. The new
-    configuration is specified by \a config.
-*/
-
-/*!
-    \fn void QNetworkConfigurationManager::configurationRemoved(const QNetworkConfiguration& configuration)
-
-    This signal is emitted when a configuration is about to be removed from the system. The removed
-    \a configuration is invalid but retains name and identifier.
-*/
-
-/*!
-    \fn void QNetworkConfigurationManager::updateCompleted()
-
-    This signal is emitted when the configuration update has been completed. Such an update can
-    be initiated via \l updateConfigurations().
-*/
-
-/*! \fn void QNetworkConfigurationManager::configurationChanged(const QNetworkConfiguration& config)
-
-    This signal is emitted when the \l {QNetworkConfiguration::state()}{state} of \a config changes.
-*/
-
-/*!
-    \fn void QNetworkConfigurationManager::onlineStateChanged(bool isOnline)
-
-    This signal is emitted when the device changes from online to offline mode or vice versa.
-    \a isOnline represents the new state of the device.
-
-    The state is considered to be online for as long as
-    \l{allConfigurations()}{allConfigurations}(QNetworkConfiguration::Active) returns a list with
-    at least one entry.
-*/
-
-/*!
-    \enum QNetworkConfigurationManager::Capability
-
-    Specifies the system capabilities of the bearer API. The possible values are:
-
-    \value CanStartAndStopInterfaces Network sessions and their underlying access points can be
-                                     started and stopped. If this flag is not set QNetworkSession
-                                     can only monitor but not influence the state of access points.
-                                     On some platforms this feature may require elevated user
-                                     permissions. This option is platform specific and may not
-                                     always be available.
-    \value DirectConnectionRouting   Network sessions and their sockets can be bound to a
-                                     particular network interface. Any packet that passes through
-                                     the socket goes to the specified network interface and thus
-                                     disregards standard routing table entries. This may be useful
-                                     when two interfaces can reach overlapping IP ranges or an
-                                     application has specific needs in regards to target networks.
-                                     This option is platform specific and may not always be
-                                     available.
-    \value SystemSessionSupport      If this flag is set the underlying platform ensures that a
-                                     network interface is not shut down until the last network
-                                     session has been \l{QNetworkSession::close()}{closed()}. This
-                                     works across multiple processes. If the platform session
-                                     support is missing this API can only ensure the above behavior
-                                     for network sessions within the same process.
-                                     In general mobile platforms (such as Symbian/S60) have such
-                                     support whereas most desktop platform lack this capability.
-    \value ApplicationLevelRoaming   The system gives applications control over the systems roaming
-                                     behavior. Applications can initiate roaming (in case the
-                                     current link is not suitable) and are consulted if the system
-                                     has identified a more suitable access point.
-    \value ForcedRoaming             The system disconnects an existing access point and reconnects
-                                     via a more suitable one. The application does not have any
-                                     control over this process and has to reconnect its active
-                                     sockets.
-    \value DataStatistics            If this flag is set QNetworkSession can provide statistics
-                                     about transmitted and received data.
-    \value NetworkSessionRequired    If this flag is set the platform requires that a network
-                                     session is created before network operations can be performed.
-*/
-
-/*!
-    Constructs a QNetworkConfigurationManager with the given \a parent.
-*/
-QNetworkConfigurationManager::QNetworkConfigurationManager( QObject* parent )
-    : QObject(parent)
-{
-    QNetworkConfigurationManagerPrivate* priv = connManager();
-    connect(priv, SIGNAL(configurationAdded(QNetworkConfiguration)),
-            this, SIGNAL(configurationAdded(QNetworkConfiguration)));
-    connect(priv, SIGNAL(configurationRemoved(QNetworkConfiguration)),
-            this, SIGNAL(configurationRemoved(QNetworkConfiguration)));
-    connect(priv, SIGNAL(configurationUpdateComplete()),
-            this, SIGNAL(updateCompleted()));
-    connect(priv, SIGNAL(onlineStateChanged(bool)), 
-            this, SIGNAL(onlineStateChanged(bool)));
-    connect(priv, SIGNAL(configurationChanged(QNetworkConfiguration)),
-            this, SIGNAL(configurationChanged(QNetworkConfiguration)));
-}
-
-/*!
-    Frees the resources associated with the QNetworkConfigurationManager object.
-*/
-QNetworkConfigurationManager::~QNetworkConfigurationManager()
-{
-}
-
-
-/*!
-    Returns the default configuration to be used. This function always returns a discovered
-    configuration; otherwise an invalid configuration.
-
-    In some cases it may be required to call updateConfigurations() and wait for the
-    updateCompleted() signal before calling this function.
-
-    \sa allConfigurations()
-*/
-QNetworkConfiguration QNetworkConfigurationManager::defaultConfiguration() const
-{
-    return connManager()->defaultConfiguration();
-}
-
-/*!
-    Returns the list of configurations which comply with the given \a filter.
-
-    By default this function returns all (defined and undefined) configurations.
-
-    A wireless network with a particular SSID may only be accessible in a
-    certain area despite the fact that the system has a valid configuration
-    for it. Therefore the filter flag may be used to limit the list to
-    discovered and possibly connected configurations only.
-
-    If \a filter is set to zero this function returns all possible configurations.
-
-    Note that this function returns the states for all configurations as they are known at
-    the time of this function call. If for instance a configuration of type WLAN is defined
-    the system may have to perform a WLAN scan in order to determine whether it is
-    actually available. To obtain the most accurate state updateConfigurations() should
-    be used to update each configuration's state. Note that such an update may require
-    some time. It's completion is signalled by updateCompleted(). In the absence of a
-    configuration update this function returns the best estimate at the time of the call.
-    Therefore, if WLAN configurations are of interest, it is recommended that
-    updateConfigurations() is called once after QNetworkConfigurationManager
-    instantiation (WLAN scans are too time consuming to perform in constructor).
-    After this the data is kept automatically up-to-date as the system reports
-    any changes.
-*/
-QList<QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(QNetworkConfiguration::StateFlags filter) const
-{
-    QList<QNetworkConfiguration> result;
-    QNetworkConfigurationManagerPrivate* conPriv = connManager();
-
-    //find all InternetAccessPoints
-    foreach (const QString &ii, conPriv->accessPointConfigurations.keys()) {
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> p = 
-            conPriv->accessPointConfigurations.value(ii);
-        if ( (p->state & filter) == filter ) {
-            QNetworkConfiguration pt;
-            pt.d = conPriv->accessPointConfigurations.value(ii);
-            result << pt;
-        }
-    }
-
-    //find all service networks
-    foreach (const QString &ii, conPriv->snapConfigurations.keys()) {
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> p = 
-            conPriv->snapConfigurations.value(ii);
-        if ( (p->state & filter) == filter ) {
-            QNetworkConfiguration pt;
-            pt.d = conPriv->snapConfigurations.value(ii);
-            result << pt;
-        }
-    }
-
-    return result;
-}
-
-/*!
-    Returns the QNetworkConfiguration for \a identifier; otherwise returns an
-    invalid QNetworkConfiguration.
-
-    \sa QNetworkConfiguration::identifier()
-*/
-QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier(const QString& identifier) const
-{
-    QNetworkConfigurationManagerPrivate* conPriv = connManager();
-    QNetworkConfiguration item;
-    if (conPriv->accessPointConfigurations.contains(identifier))
-        item.d = conPriv->accessPointConfigurations.value(identifier);
-    else if (conPriv->snapConfigurations.contains(identifier))
-        item.d = conPriv->snapConfigurations.value(identifier);
-    else if (conPriv->userChoiceConfigurations.contains(identifier))
-        item.d = conPriv->userChoiceConfigurations.value(identifier);
-    return item;
-
-}
-
-/*!
-    Returns true if the system is considered to be connected to another device via an active
-    network interface; otherwise returns false.
-
-    This is equivalent to the following code snippet:
-
-    \code
-        QNetworkConfigurationManager mgr;
-        QList<QNetworkConfiguration> activeConfigs = mgr.allConfigurations(QNetworkConfiguration::Active)
-        if (activeConfigs.count() > 0)
-            Q_ASSERT(mgr.isOnline())
-        else
-            Q_ASSERT(!mgr.isOnline())
-    \endcode
-
-    \sa onlineStateChanged()
-*/
-bool QNetworkConfigurationManager::isOnline() const
-{
-    QNetworkConfigurationManagerPrivate* conPriv = connManager();
-    Q_UNUSED(conPriv);
-    QList<QNetworkConfiguration> activeConfigs = allConfigurations(QNetworkConfiguration::Active);
-    return activeConfigs.count() > 0;
-}
-
-/*!
-    Returns the capabilities supported by the current platform.
-*/
-QNetworkConfigurationManager::Capabilities QNetworkConfigurationManager::capabilities() const
-{
-    return connManager()->capFlags;
-}
-
-/*!
-    Initiates an update of all configurations. This may be used to initiate WLAN scans or other
-    time consuming updates which may be required to obtain the correct state for configurations.
-
-    This call is asynchronous. On completion of this update the updateCompleted() signal is
-    emitted. If new configurations are discovered or old ones were removed or changed the update
-    process may trigger the emission of one or multiple configurationAdded(),
-    configurationRemoved() and configurationChanged() signals.
-
-    If a configuration state changes as a result of this update all existing QNetworkConfiguration
-    instances are updated automatically.
-
-    \sa allConfigurations()
-*/
-void QNetworkConfigurationManager::updateConfigurations()
-{
-    connManager()->performAsyncConfigurationUpdate();
-}
-
-#include "moc_qnetworkconfigmanager.cpp"
-
-QTM_END_NAMESPACE
-
--- a/qtmobility/src/bearer/qnetworkconfigmanager.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKCONFIGURATIONMANAGER_H
-#define QNETWORKCONFIGURATIONMANAGER_H
-
-#include "qmobilityglobal.h"
-
-#include <QtCore/qobject.h>
-#include "qnetworkconfiguration.h"
-
-QT_BEGIN_HEADER
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationManagerPrivate;
-class Q_BEARER_EXPORT QNetworkConfigurationManager : public QObject
-{
-    Q_OBJECT
-
-public:
-    
-    enum Capability {
-         CanStartAndStopInterfaces  = 0x00000001,
-         DirectConnectionRouting = 0x00000002,
-         SystemSessionSupport = 0x00000004,
-         ApplicationLevelRoaming = 0x00000008,
-         ForcedRoaming = 0x00000010,
-         DataStatistics = 0x00000020,
-         NetworkSessionRequired = 0x00000040
-    };
-
-    Q_DECLARE_FLAGS(Capabilities, Capability)
-
-    QNetworkConfigurationManager( QObject* parent = 0 );
-    virtual ~QNetworkConfigurationManager();
-
-    
-    QNetworkConfigurationManager::Capabilities capabilities() const;
-
-    QNetworkConfiguration defaultConfiguration() const; 
-    QList<QNetworkConfiguration> allConfigurations(QNetworkConfiguration::StateFlags flags = 0) const;
-    QNetworkConfiguration configurationFromIdentifier(const QString& identifier) const;
-    void updateConfigurations();
-
-    bool isOnline() const;
-
-Q_SIGNALS:
-    void configurationAdded(const QNetworkConfiguration& config);
-    void configurationRemoved(const QNetworkConfiguration& config);
-    void configurationChanged(const QNetworkConfiguration& config);
-    void onlineStateChanged(bool isOnline);
-    void updateCompleted();
-
-};
-
-Q_DECLARE_OPERATORS_FOR_FLAGS(QNetworkConfigurationManager::Capabilities)
-
-QTM_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif //QNETWORKCONFIGURATIONMANAGER_H
-
--- a/qtmobility/src/bearer/qnetworkconfigmanager_maemo.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,910 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <string.h>
-
-#include "qnetworkconfigmanager_maemo_p.h"
-
-#include <QDebug>
-#include <QHash>
-
-#include <wlancond.h>
-#include <libicd-network-wlan-dev.h>
-#include <maemo_icd.h>
-#include <iapconf.h>
-#include <iapmonitor.h>
-
-QTM_BEGIN_NAMESPACE
-
-/* The IapAddTimer is a helper class that makes sure we update
- * the configuration only after all db additions to certain
- * iap are finished (after a certain timeout)
- */
-class _IapAddTimer : public QObject
-{
-    Q_OBJECT
-
-public:
-    _IapAddTimer() {}
-    ~_IapAddTimer()
-    {
-	if (timer.isActive()) {
-	    QObject::disconnect(&timer, SIGNAL(timeout()), this, SLOT(timeout()));
-	    timer.stop();
-	}
-    }
-
-    void add(QString& iap_id, QNetworkConfigurationManagerPrivate *d);
-
-    QString iap_id;
-    QTimer timer;
-    QNetworkConfigurationManagerPrivate *d;
-
-public Q_SLOTS:
-    void timeout();
-};
-
-
-void _IapAddTimer::add(QString& id, QNetworkConfigurationManagerPrivate *d_ptr)
-{
-    iap_id = id;
-    d = d_ptr;
-
-    if (timer.isActive()) {
-	QObject::disconnect(&timer, SIGNAL(timeout()), this, SLOT(timeout()));
-	timer.stop();
-    }
-    timer.setSingleShot(true);
-    QObject::connect(&timer, SIGNAL(timeout()), this, SLOT(timeout()));
-    timer.start(1500);
-}
-
-
-void _IapAddTimer::timeout()
-{
-    d->addConfiguration(iap_id);
-}
-
-
-class IapAddTimer {
-    QHash<QString, _IapAddTimer* > timers;
-
-public:
-    IapAddTimer() {}
-    ~IapAddTimer() {}
-
-    void add(QString& iap_id, QNetworkConfigurationManagerPrivate *d);
-    void del(QString& iap_id);
-    void removeAll();
-};
-
-
-void IapAddTimer::removeAll()
-{
-    QHashIterator<QString, _IapAddTimer* > i(timers);
-    while (i.hasNext()) {
-	i.next();
-	_IapAddTimer *t = i.value();
-	delete t;
-    }
-    timers.clear();
-}
-
-
-void IapAddTimer::add(QString& iap_id, QNetworkConfigurationManagerPrivate *d)
-{
-    if (timers.contains(iap_id)) {
-	_IapAddTimer *iap = timers.value(iap_id);
-	iap->add(iap_id, d);
-    } else {
-	_IapAddTimer *iap = new _IapAddTimer;
-	iap->add(iap_id, d);
-	timers.insert(iap_id, iap);
-    }
-}
-
-void IapAddTimer::del(QString& iap_id)
-{
-    if (timers.contains(iap_id)) {
-	_IapAddTimer *iap = timers.take(iap_id);
-	delete iap;
-    }
-}
-
-
-class IapMonitor : public Maemo::IAPMonitor
-{
-public:
-    IapMonitor() : first_call(true) { }
-
-    void setup(QNetworkConfigurationManagerPrivate *d);
-    void cleanup();
-
-protected:
-    void iapAdded(const QString &iapId);
-    void iapRemoved(const QString &iapId);
-
-private:
-    bool first_call;
-
-    QNetworkConfigurationManagerPrivate *d;
-    IapAddTimer timers;
-};
-
-Q_GLOBAL_STATIC(IapMonitor, iapMonitor);
-
-
-void IapMonitor::setup(QNetworkConfigurationManagerPrivate *d_ptr)
-{
-    if (first_call) {
-	d = d_ptr;
-	first_call = false;
-    }
-}
-
-
-void IapMonitor::cleanup()
-{
-    if (!first_call) {
-	timers.removeAll();
-	first_call = true;
-    }
-}
-
-
-void IapMonitor::iapAdded(const QString &iap_id)
-{
-    /* We cannot know when the IAP is fully added to db, so a timer is
-     * installed instead. When the timer expires we hope that IAP is added ok.
-     */
-    QString id = iap_id;
-    timers.add(id, d);
-}
-
-
-void IapMonitor::iapRemoved(const QString &iap_id)
-{
-    QString id = iap_id;
-    d->deleteConfiguration(id);
-}
-
-void QNetworkConfigurationManagerPrivate::registerPlatformCapabilities()
-{
-    capFlags |= QNetworkConfigurationManager::CanStartAndStopInterfaces;
-    capFlags |= QNetworkConfigurationManager::DataStatistics;
-    capFlags |= QNetworkConfigurationManager::ForcedRoaming;
-    capFlags |= QNetworkConfigurationManager::NetworkSessionRequired;
-}
-
-void QNetworkConfigurationManagerPrivate::init()
-{
-    // Setup DBus Interface for ICD
-    m_dbusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE,
-                                         ICD_DBUS_API_PATH,
-                                         ICD_DBUS_API_INTERFACE,
-                                         QDBusConnection::systemBus(),
-                                         this);
-    connect(&m_scanTimer, SIGNAL(timeout()), this, SLOT(finishAsyncConfigurationUpdate()));
-    m_scanTimer.setSingleShot(true);
-
-    /* Turn on IAP state monitoring */
-    startListeningStateSignalsForAllConnections();
-
-    /* Turn on IAP add/remove monitoring */
-    iapMonitor()->setup(this);
-
-    /* We create a default configuration which is a pseudo config */
-    QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
-    cpPriv->name = "UserChoice";
-    cpPriv->state = QNetworkConfiguration::Discovered;
-    cpPriv->isValid = true;
-    cpPriv->id = OSSO_IAP_ANY;
-    cpPriv->type = QNetworkConfiguration::UserChoice;
-    cpPriv->purpose = QNetworkConfiguration::UnknownPurpose;
-    cpPriv->roamingSupported = false;
-    cpPriv->manager = this;
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr(cpPriv);
-    userChoiceConfigurations.insert(cpPriv->id, ptr);
-}
-
-static inline QString network_attrs_to_security(uint network_attrs)
-{
-    uint cap = 0;
-    nwattr2cap(network_attrs, &cap); /* from libicd-network-wlan-dev.h */
-    if (cap & WLANCOND_OPEN)
-	return "NONE";
-    else if (cap & WLANCOND_WEP)
-	return "WEP";
-    else if (cap & WLANCOND_WPA_PSK)
-	return "WPA_PSK";
-    else if (cap & WLANCOND_WPA_EAP)
-	return "WPA_EAP";
-    return "";
-}
-
-
-struct SSIDInfo {
-    QString iap_id;
-    QString wlan_security;
-};
-
-
-void QNetworkConfigurationManagerPrivate::configurationChanged(QNetworkConfigurationPrivate *ptr)
-{
-    QNetworkConfiguration item;
-    item.d = ptr;
-    emit configurationChanged(item);
-}
-
-void QNetworkConfigurationManagerPrivate::deleteConfiguration(QString& iap_id)
-{
-    /* Called when IAPs are deleted in db, in this case we do not scan
-     * or read all the IAPs from db because it might take too much power
-     * (multiple applications would need to scan and read all IAPs from db)
-     */
-    if (accessPointConfigurations.contains(iap_id)) {
-	QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.take(iap_id);
-	if (priv.data()) {
-	    priv->isValid = false;
-#ifdef BEARER_MANAGEMENT_DEBUG
-	    qDebug() << "IAP" << iap_id << "was removed from storage.";
-#endif
-
-	    QNetworkConfiguration item;
-	    item.d = priv;
-	    emit configurationRemoved(item);
-	} else
-	    qWarning("Configuration not found for IAP %s", iap_id.toAscii().data());
-    } else {
-#ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug("IAP: %s, already missing from the known list", iap_id.toAscii().data());
-#endif
-    }
-}
-
-
-uint32_t QNetworkConfigurationManagerPrivate::getNetworkAttrs(bool is_iap_id,
-                                                              const QString& iap_id,
-                                                              const QString& iap_type,
-                                                              QString security_method)
-{
-    guint network_attr = 0;
-    dbus_uint32_t cap = 0;
-
-    if (iap_type == "WLAN_INFRA")
-	cap |= WLANCOND_INFRA;
-    else if (iap_type == "WLAN_ADHOC")
-	cap |= WLANCOND_ADHOC;
-
-    if (security_method.isEmpty() && (cap & (WLANCOND_INFRA | WLANCOND_ADHOC))) {
-	Maemo::IAPConf saved_ap(iap_id);
-	security_method = saved_ap.value("wlan_security").toString();
-    }
-
-    if (!security_method.isEmpty()) {
-	if (security_method == "WEP")
-	    cap |= WLANCOND_WEP;
-	else if (security_method == "WPA_PSK")
-	    cap |= WLANCOND_WPA_PSK;
-	else if (security_method == "WPA_EAP")
-	    cap |= WLANCOND_WPA_EAP;
-	else if (security_method == "NONE")
-	    cap |= WLANCOND_OPEN;
-
-	if (cap & (WLANCOND_WPA_PSK | WLANCOND_WPA_EAP)) {
-	    Maemo::IAPConf saved_iap(iap_id);
-	    bool wpa2_only = saved_iap.value("EAP_wpa2_only_mode").toBool();
-	    if (wpa2_only) {
-		cap |= WLANCOND_WPA2;
-	    }
-	}
-    }
-
-    cap2nwattr(cap, &network_attr);
-    if (is_iap_id)
-	network_attr |= ICD_NW_ATTR_IAPNAME;
-
-    return (uint32_t)network_attr;
-}
-
-
-void QNetworkConfigurationManagerPrivate::addConfiguration(QString& iap_id)
-{
-    // Note: When new IAP is created, this function gets called multiple times
-    //       in a row.
-    //       For example: Empty type & name for WLAN was stored into newly
-    //                    created IAP data in gconf when this function gets
-    //                    called for the first time.
-    //                    WLAN type & name are updated into IAP data in gconf
-    //                    as soon as WLAN connection is up and running.
-    //                    => And this function gets called again.
-
-    if (!accessPointConfigurations.contains(iap_id)) {
-	Maemo::IAPConf saved_iap(iap_id);
-        QString iap_type = saved_iap.value("type").toString();
-        QString iap_name = saved_iap.value("name").toString();
-        QByteArray ssid = saved_iap.value("wlan_ssid").toByteArray();
-        if (!iap_type.isEmpty() && !iap_name.isEmpty()) {
-            // Check if new IAP is actually Undefined WLAN configuration
-            // Note: SSID is used as an iap id for Undefined WLAN configurations
-            //       => configuration must be searched using SSID
-            if (!ssid.isEmpty() && accessPointConfigurations.contains(ssid)) {
-                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr = accessPointConfigurations.take(ssid);
-                if (ptr.data()) {
-                    ptr->id = iap_id;
-                    ptr->iap_type = iap_type;
-                    ptr->network_attrs = getNetworkAttrs(true, iap_id, iap_type, QString());
-                    ptr->network_id = ssid;
-                    ptr->service_id = saved_iap.value("service_id").toString();
-                    ptr->service_type = saved_iap.value("service_type").toString();
-                    if (m_onlineIapId == iap_id) {
-                        ptr->state = QNetworkConfiguration::Active;
-                    } else {
-                        ptr->state = QNetworkConfiguration::Defined;
-                    }
-                    accessPointConfigurations.insert(iap_id, ptr);
-                    configurationChanged(ptr.data());
-                }
-            } else {
-                QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
-                cpPriv->name = saved_iap.value("name").toString();
-                if (cpPriv->name.isEmpty())
-                    cpPriv->name = iap_id;
-                cpPriv->isValid = true;
-                cpPriv->id = iap_id;
-                cpPriv->iap_type = iap_type;
-                cpPriv->network_attrs = getNetworkAttrs(true, iap_id, iap_type, QString());
-                cpPriv->service_id = saved_iap.value("service_id").toString();
-                cpPriv->service_type = saved_iap.value("service_type").toString();
-                if (iap_type.startsWith(QLatin1String("WLAN"))) {
-                    QByteArray ssid = saved_iap.value("wlan_ssid").toByteArray();
-                    if (ssid.isEmpty()) {
-                        qWarning() << "Cannot get ssid for" << iap_id;
-                    }
-                    cpPriv->network_id = ssid;
-                }
-                cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
-                if (m_onlineIapId == iap_id) {
-                    cpPriv->state = QNetworkConfiguration::Active;
-                } else {
-                    cpPriv->state = QNetworkConfiguration::Defined;
-                }
-                cpPriv->manager = this;
-
-                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr(cpPriv);
-                accessPointConfigurations.insert(iap_id, ptr);
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-                qDebug("IAP: %s, name: %s, added to known list", iap_id.toAscii().data(), cpPriv->name.toAscii().data());
-#endif
-                QNetworkConfiguration item;
-                item.d = ptr;
-                emit configurationAdded(item);
-            }
-        } else {
-            qWarning("IAP %s does not have \"type\" or \"name\" fields defined, skipping this IAP.", iap_id.toAscii().data());
-        }
-    } else {
-#ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug() << "IAP" << iap_id << "already in db.";
-#endif
-
-	/* Check if the data in db changed and update configuration accordingly
-	 */
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr = accessPointConfigurations.value(iap_id);
-	if (ptr.data()) {
-	    Maemo::IAPConf changed_iap(iap_id);
-	    QString iap_type = changed_iap.value("type").toString();
-	    bool update_needed = false; /* if IAP type or ssid changed, we need to change the state */
-
-	    ptr->network_attrs = getNetworkAttrs(true, iap_id, iap_type, QString());
-	    ptr->service_id = changed_iap.value("service_id").toString();
-	    ptr->service_type = changed_iap.value("service_type").toString();
-
-	    if (!iap_type.isEmpty()) {
-		ptr->name = changed_iap.value("name").toString();
-		if (ptr->name.isEmpty())
-		    ptr->name = iap_id;
-		ptr->isValid = true;
-		if (ptr->iap_type != iap_type) {
-		    ptr->iap_type = iap_type;
-		    update_needed = true;
-		}
-        if (iap_type.startsWith(QLatin1String("WLAN"))) {
-		    QByteArray ssid = changed_iap.value("wlan_ssid").toByteArray();
-		    if (ssid.isEmpty()) {
-			qWarning() << "Cannot get ssid for" << iap_id;
-		    }
-		    if (ptr->network_id != ssid) {
-                        ptr->network_id = ssid;
-                        update_needed = true;
-		    }
-		}
-	    }
-	    if (update_needed) {
-                ptr->type = QNetworkConfiguration::InternetAccessPoint;
-                if (m_onlineIapId == iap_id) {
-                    if (ptr->state < QNetworkConfiguration::Active) {
-                        ptr->state = QNetworkConfiguration::Active;
-                        configurationChanged(ptr.data());
-                    }
-                } else if (ptr->state < QNetworkConfiguration::Defined) {
-		    ptr->state = QNetworkConfiguration::Defined;
-                    configurationChanged(ptr.data());
-                }
-	    }
-	} else {
-	    qWarning("Cannot find IAP %s from current configuration although it should be there.", iap_id.toAscii().data());
-	}
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::updateConfigurations()
-{
-    doUpdateConfigurations();
-}
-
-void QNetworkConfigurationManagerPrivate::doUpdateConfigurations(QList<Maemo::IcdScanResult> scanned)
-{
-    /* Contains all known iap_ids from storage */
-    QList<QString> knownConfigs = accessPointConfigurations.keys();
-
-    /* Contains all known WLAN network ids (like ssid) from storage */
-    QMultiHash<QByteArray, SSIDInfo* > notDiscoveredWLANConfigs;
-
-    QList<QString> all_iaps;
-    Maemo::IAPConf::getAll(all_iaps);
-
-    foreach (const QString &iap_id, all_iaps) {
-	QByteArray ssid;
-
-	Maemo::IAPConf saved_ap(iap_id);
-	bool is_temporary = saved_ap.value("temporary").toBool();
-    if (is_temporary) {
-#ifdef BEARER_MANAGEMENT_DEBUG
-	    qDebug() << "IAP" << iap_id << "is temporary, skipping it.";
-#endif
-	    continue;
-	}
-
-	QString iap_type = saved_ap.value("type").toString();
-    if (iap_type.startsWith(QLatin1String("WLAN"))) {
-	    ssid = saved_ap.value("wlan_ssid").toByteArray();
-	    if (ssid.isEmpty()) {
-		qWarning() << "Cannot get ssid for" << iap_id;
-		continue;
-	    }
-
-	    QString security_method = saved_ap.value("wlan_security").toString();
-	    SSIDInfo *info = new SSIDInfo;
-	    info->iap_id = iap_id;
-	    info->wlan_security = security_method;
-            notDiscoveredWLANConfigs.insert(ssid, info);
-	} else if (iap_type.isEmpty()) {
-	    qWarning() << "IAP" << iap_id << "network type is not set! Skipping it";
-	    continue;
-	} else {
-#ifdef BEARER_MANAGEMENT_DEBUG
-	    qDebug() << "IAP" << iap_id << "network type is" << iap_type;
-#endif
-	    ssid.clear();
-	}
-
-	if (!accessPointConfigurations.contains(iap_id)) {
-	    QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
-	    cpPriv->name = saved_ap.value("name").toString();
-	    if (cpPriv->name.isEmpty()) {
-		if (!ssid.isEmpty() && ssid.size() > 0)
-		    cpPriv->name = ssid.data();
-		else
-		    cpPriv->name = iap_id;
-	    }
-            cpPriv->isValid = true;
-	    cpPriv->id = iap_id;
-	    cpPriv->network_id = ssid;
-	    cpPriv->network_attrs = getNetworkAttrs(true, iap_id, iap_type, QString());
-	    cpPriv->iap_type = iap_type;
-	    cpPriv->service_id = saved_ap.value("service_id").toString();
-	    cpPriv->service_type = saved_ap.value("service_type").toString();
-	    cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
-	    cpPriv->state = QNetworkConfiguration::Defined;
-	    cpPriv->manager = this;
-
-	    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr(cpPriv);
-	    accessPointConfigurations.insert(iap_id, ptr);
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-	    qDebug("IAP: %s, name: %s, ssid: %s, added to known list", iap_id.toAscii().data(), cpPriv->name.toAscii().data(), !ssid.isEmpty() ? ssid.data() : "-");
-#endif
-	} else {
-            knownConfigs.removeOne(iap_id);
-#ifdef BEARER_MANAGEMENT_DEBUG
-	    qDebug("IAP: %s, ssid: %s, already exists in the known list", iap_id.toAscii().data(), !ssid.isEmpty() ? ssid.data() : "-");
-#endif
-	}
-    }
-
-    /* This is skipped in the first update as scanned size is zero */
-    if (!scanned.isEmpty())
-      for (int i=0; i<scanned.size(); ++i) {
-	const Maemo::IcdScanResult ap = scanned.at(i); 
-
-	if (ap.scan.network_attrs & ICD_NW_ATTR_IAPNAME) {
-	    /* The network_id is IAP id, so the IAP is a known one */
-	    QString iapid = ap.scan.network_id.data();
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(iapid);
-	    if (priv.data()) {
-                bool stateChanged = false;
-                // Check if state is not already Discovered or Active
-                if (priv->state < QNetworkConfiguration::Discovered) {
-                    priv->state = QNetworkConfiguration::Discovered; /* Defined is set automagically */
-                    stateChanged = true;
-                }
-		priv->network_attrs = ap.scan.network_attrs;
-		priv->service_id = ap.scan.service_id;
-		priv->service_type = ap.scan.service_type;
-		priv->service_attrs = ap.scan.service_attrs;
-
-                if (stateChanged) {
-                    configurationChanged(priv.data());
-                }
-#ifdef BEARER_MANAGEMENT_DEBUG
-		qDebug("IAP: %s, ssid: %s, discovered", iapid.toAscii().data(), priv->network_id.data());
-#endif
-
-        if (!ap.scan.network_type.startsWith(QLatin1String("WLAN")))
-		    continue; // not a wlan AP
-
-                /* Remove scanned AP from discovered WLAN configurations so that we can
-		 * emit configurationRemoved signal later
-		 */
-                QList<SSIDInfo* > known_iaps = notDiscoveredWLANConfigs.values(priv->network_id);
-	    rescan_list:
-		if (!known_iaps.isEmpty()) {
-		    for (int k=0; k<known_iaps.size(); ++k) {
-			SSIDInfo *iap = known_iaps.at(k);
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-			//qDebug() << "iap" << iap->iap_id << "security" << iap->wlan_security << "scan" << network_attrs_to_security(ap.scan.network_attrs);
-#endif
-
-			if (iap->wlan_security == 
-			    network_attrs_to_security(ap.scan.network_attrs)) {
-			    /* Remove IAP from the list */
-                            notDiscoveredWLANConfigs.remove(priv->network_id, iap);
-#ifdef BEARER_MANAGEMENT_DEBUG
-			    qDebug() << "Removed IAP" << iap->iap_id << "from unknown config";
-#endif
-			    known_iaps.removeAt(k);
-			    delete iap;
-			    goto rescan_list;
-			}
-		    }
-		}
-	    } else {
-		qWarning() << "IAP" << iapid << "is missing in configuration.";
-	    }
-
-	} else {
-            /* Non saved access point data */
-	    QByteArray scanned_ssid = ap.scan.network_id;
-            if (!accessPointConfigurations.contains(scanned_ssid)) {
-                QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
-                QString hrs = scanned_ssid.data();
-
-                cpPriv->name = ap.network_name.isEmpty() ? hrs : ap.network_name;
-                cpPriv->isValid = true;
-                cpPriv->id = scanned_ssid.data();  // Note: id is now ssid, it should be set to IAP id if the IAP is saved
-                cpPriv->network_id = scanned_ssid;
-                cpPriv->iap_type = ap.scan.network_type;
-                cpPriv->network_attrs = ap.scan.network_attrs;
-                cpPriv->service_id = ap.scan.service_id;
-                cpPriv->service_type = ap.scan.service_type;
-                cpPriv->service_attrs = ap.scan.service_attrs;
-                cpPriv->manager = this;
-
-                cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
-                cpPriv->state = QNetworkConfiguration::Undefined;
-
-                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr(cpPriv);
-                accessPointConfigurations.insert(cpPriv->id, ptr);
-
-    #ifdef BEARER_MANAGEMENT_DEBUG
-                qDebug() << "IAP with network id" << cpPriv->id << "was found in the scan.";
-    #endif
-
-                QNetworkConfiguration item;
-                item.d = ptr;
-                emit configurationAdded(item);
-            } else {
-                knownConfigs.removeOne(scanned_ssid);
-            }
-        }
-    }
-
-    if (!firstUpdate) {
-        // Update Defined status to all defined WLAN IAPs which
-        // could not be found when access points were scanned
-        QHashIterator<QByteArray, SSIDInfo* > i(notDiscoveredWLANConfigs);
-	while (i.hasNext()) {
-	    i.next();
-	    SSIDInfo *iap = i.value();
-	    QString iap_id = iap->iap_id;
-	    //qDebug() << i.key() << ": " << iap_id;
-
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(iap_id);
-	    if (priv.data()) {
-                // WLAN AccessPoint configuration could not be Discovered
-                // => Make sure that configuration state is Defined
-                if (priv->state > QNetworkConfiguration::Defined) {
-                    priv->state = QNetworkConfiguration::Defined;
-                    configurationChanged(priv.data());
-                }
-	    }
-	}
-
-        /* Remove non existing iaps since last update */
-        foreach (const QString &oldIface, knownConfigs) {
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.take(oldIface);
-            if (priv.data()) {
-                priv->isValid = false;
-                QNetworkConfiguration item;
-                item.d = priv;
-                emit configurationRemoved(item);
-		//if we would have SNAP support we would have to remove the references
-		//from existing ServiceNetworks to the removed access point configuration
-            }
-        }
-    }
-
-    QMutableHashIterator<QByteArray, SSIDInfo* > i(notDiscoveredWLANConfigs);
-    while (i.hasNext()) {
-	i.next();
-	SSIDInfo *iap = i.value();
-	delete iap;
-	i.remove();
-    }
-
-    if (!firstUpdate)
-	emit configurationUpdateComplete();
-
-    if (firstUpdate)
-        firstUpdate = false;
-}
-
-QNetworkConfiguration QNetworkConfigurationManagerPrivate::defaultConfiguration()
-{
-    /* Here we just return [ANY] request to icd and let the icd decide which
-     * IAP to connect.
-     */
-    QNetworkConfiguration item;
-    if (userChoiceConfigurations.contains(OSSO_IAP_ANY))
-        item.d = userChoiceConfigurations.value(OSSO_IAP_ANY);
-    return item;
-}
-
-void QNetworkConfigurationManagerPrivate::startListeningStateSignalsForAllConnections()
-{
-    // Start listening ICD_DBUS_API_STATE_SIG signals
-    m_dbusInterface->connection().connect(ICD_DBUS_API_INTERFACE,
-                                          ICD_DBUS_API_PATH,
-                                          ICD_DBUS_API_INTERFACE,
-                                          ICD_DBUS_API_STATE_SIG,
-                                          this, SLOT(connectionStateSignalsSlot(QDBusMessage)));
-
-    // Calling ICD_DBUS_API_STATE_REQ makes sure that initial state will be updated immediately
-    m_gettingInitialConnectionState = true;
-    m_dbusInterface->call(ICD_DBUS_API_STATE_REQ);
-}
-
-void QNetworkConfigurationManagerPrivate::connectionStateSignalsSlot(QDBusMessage msg)
-{
-    QList<QVariant> arguments = msg.arguments();
-    if (arguments[1].toUInt() != 0 || arguments.count() < 8) {
-        return;
-    }
-
-    QString iapid = arguments[5].toByteArray().data();
-    uint icd_connection_state = arguments[7].toUInt();
-
-    switch (icd_connection_state) {
-    case ICD_STATE_CONNECTED:
-        {
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr = accessPointConfigurations.value(iapid);
-        if (ptr.data()) {
-            ptr->type = QNetworkConfiguration::InternetAccessPoint;
-            if (ptr->state != QNetworkConfiguration::Active) {
-                ptr->state = QNetworkConfiguration::Active;
-                if (!m_gettingInitialConnectionState) {
-                    configurationChanged(ptr.data());
-                    if (m_onlineIapId.isEmpty()) {
-                        emit onlineStateChanged(true);
-                    }
-                }
-                m_onlineIapId = iapid;
-            }
-        } else {
-            // This gets called when new WLAN IAP is created using Connection dialog
-            // At this point Undefined WLAN configuration has SSID as iap id
-            // => Because of that configuration can not be found from
-            //    accessPointConfigurations using correct iap id
-            emit onlineStateChanged(true);
-            m_onlineIapId = iapid;
-        }
-        break;
-        }
-    case ICD_STATE_DISCONNECTED:
-        {
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr = accessPointConfigurations.value(iapid);
-        if (ptr.data()) {
-            ptr->type = QNetworkConfiguration::InternetAccessPoint;
-            if (ptr->state == QNetworkConfiguration::Active) {
-                ptr->state = QNetworkConfiguration::Discovered;
-                if (!m_gettingInitialConnectionState) {
-                    configurationChanged(ptr.data());
-
-                    // Note: If ICD switches used IAP from one to another:
-                    //       1) new IAP is reported to be online first
-                    //       2) old IAP is reported to be offline then
-                    // => Device can be reported to be offline only
-                    //    if last known online IAP is reported to be disconnected
-                    if (iapid == m_onlineIapId) {
-                        // It's known that there is only one global ICD connection
-                        // => Because ICD state was reported to be DISCONNECTED, Device is offline
-                        m_onlineIapId.clear();
-                        emit onlineStateChanged(false);
-                    }
-                }
-            }
-        } else {
-            // Disconnected IAP was not found from accessPointConfigurations
-            // => Reason: Online IAP was removed which resulted ICD to disconnect
-            if (iapid == m_onlineIapId) {
-                // It's known that there is only one global ICD connection
-                // => Because ICD state was reported to be DISCONNECTED, Device is offline
-                m_onlineIapId.clear();
-                emit onlineStateChanged(false);
-            }
-        }
-        break;
-        }
-    default:
-        break;
-    }
-    
-    emit iapStateChanged(iapid, icd_connection_state);
-
-    m_gettingInitialConnectionState = false;
-}
-
-void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate()
-{
-    if (m_scanGoingOn) {
-        return;
-    }
-    m_scanGoingOn = true;
-
-    m_dbusInterface->connection().connect(ICD_DBUS_API_INTERFACE,
-                                          ICD_DBUS_API_PATH,
-                                          ICD_DBUS_API_INTERFACE,
-                                          ICD_DBUS_API_SCAN_SIG,
-                                          this, SLOT(asyncUpdateConfigurationsSlot(QDBusMessage)));
-
-    QDBusMessage msg = m_dbusInterface->call(ICD_DBUS_API_SCAN_REQ,
-                                             (uint)ICD_SCAN_REQUEST_ACTIVE);
-    m_typesToBeScanned = msg.arguments()[0].value<QStringList>();
-    m_scanTimer.start(ICD_SHORT_SCAN_TIMEOUT);
-}
-
-void QNetworkConfigurationManagerPrivate::cancelAsyncConfigurationUpdate()
-{
-    if (!m_scanGoingOn) {
-        return;
-    }
-    m_scanGoingOn = false;
-
-    if (m_scanTimer.isActive()) {
-        m_scanTimer.stop();
-    }
-
-    m_dbusInterface->connection().disconnect(ICD_DBUS_API_INTERFACE,
-                                             ICD_DBUS_API_PATH,
-                                             ICD_DBUS_API_INTERFACE,
-                                             ICD_DBUS_API_SCAN_SIG,
-                                             this, SLOT(asyncUpdateConfigurationsSlot(QDBusMessage)));
-
-    // Stop scanning rounds by calling ICD_DBUS_API_SCAN_CANCEL
-    // <=> If ICD_DBUS_API_SCAN_CANCEL is not called, new scanning round will
-    //     be started after the module scan timeout.
-    m_dbusInterface->call(ICD_DBUS_API_SCAN_CANCEL);
-}
-
-void QNetworkConfigurationManagerPrivate::finishAsyncConfigurationUpdate()
-{
-    cancelAsyncConfigurationUpdate();
-    doUpdateConfigurations(m_scanResult);
-    m_scanResult.clear();
-}
-
-void QNetworkConfigurationManagerPrivate::asyncUpdateConfigurationsSlot(QDBusMessage msg)
-{
-    QList<QVariant> arguments = msg.arguments();
-    uint icd_scan_status = arguments.takeFirst().toUInt();
-    if (icd_scan_status == ICD_SCAN_COMPLETE) {
-        m_typesToBeScanned.removeOne(arguments[6].toString());
-        if (!m_typesToBeScanned.count()) {
-            finishAsyncConfigurationUpdate();
-        }
-    } else {
-        Maemo::IcdScanResult scanResult;
-        scanResult.status = icd_scan_status;
-        scanResult.timestamp = arguments.takeFirst().toUInt();
-        scanResult.scan.service_type = arguments.takeFirst().toString();
-        scanResult.service_name = arguments.takeFirst().toString();
-        scanResult.scan.service_attrs = arguments.takeFirst().toUInt();
-        scanResult.scan.service_id = arguments.takeFirst().toString();
-        scanResult.service_priority = arguments.takeFirst().toInt();
-        scanResult.scan.network_type = arguments.takeFirst().toString();
-        scanResult.network_name = arguments.takeFirst().toString();
-        scanResult.scan.network_attrs = arguments.takeFirst().toUInt();
-        scanResult.scan.network_id = arguments.takeFirst().toByteArray();
-        scanResult.network_priority = arguments.takeFirst().toInt();
-        scanResult.signal_strength = arguments.takeFirst().toInt();
-        scanResult.station_id = arguments.takeFirst().toString();
-        scanResult.signal_dB = arguments.takeFirst().toInt();
-
-        m_scanResult.append(scanResult);
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::cleanup()
-{
-    if (m_scanGoingOn) {
-        m_scanTimer.stop();
-        m_dbusInterface->call(ICD_DBUS_API_SCAN_CANCEL);
-    }
-    iapMonitor()->cleanup();
-}
-
-#include "qnetworkconfigmanager_maemo.moc"
-#include "moc_qnetworkconfigmanager_maemo_p.cpp"
-
-QTM_END_NAMESPACE
--- a/qtmobility/src/bearer/qnetworkconfigmanager_maemo_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKCONFIGURATIONMANAGERPRIVATE_H
-#define QNETWORKCONFIGURATIONMANAGERPRIVATE_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists for the convenience
-// of the QLibrary class.  This header file may change from
-// version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QHash>
-#include <QStringList>
-#include <QDBusInterface>
-#include <maemo_icd.h>
-
-#include "qnetworkconfigmanager.h"
-#include "qnetworkconfiguration_maemo_p.h"
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationPrivate;
-
-class QNetworkConfigurationManagerPrivate : public QObject
-{
-    Q_OBJECT
-public:
-    QNetworkConfigurationManagerPrivate()
-    :   QObject(0), capFlags(0), firstUpdate(true), onlineConfigurations(0), m_scanGoingOn(false)
-    {
-        registerPlatformCapabilities();
-        updateConfigurations();
-        init();
-    }
-
-    virtual ~QNetworkConfigurationManagerPrivate() 
-    {
-        QList<QString> configIdents = snapConfigurations.keys();
-        foreach(const QString oldIface, configIdents) {
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = snapConfigurations.take(oldIface);
-            priv->isValid = false;
-            priv->id.clear();
-        }
-
-        configIdents = accessPointConfigurations.keys();
-        foreach(const QString oldIface, configIdents) {
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.take(oldIface);
-            priv->isValid = false;
-            priv->id.clear();
-        }
-
-        configIdents = userChoiceConfigurations.keys();
-        foreach(const QString oldIface, configIdents) {
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = userChoiceConfigurations.take(oldIface);
-            priv->isValid = false;
-            priv->id.clear();
-        }
-
-	cleanup();
-    }
-
-    QNetworkConfiguration defaultConfiguration();
-
-    void init();
-
-    QNetworkConfigurationManager::Capabilities capFlags;
-    void registerPlatformCapabilities();
-
-    void performAsyncConfigurationUpdate();
-    void doUpdateConfigurations(QList<Maemo::IcdScanResult> scanned = QList<Maemo::IcdScanResult>());
-    void startListeningStateSignalsForAllConnections();
-
-    //this table contains an up to date list of all configs at any time.
-    //it must be updated if configurations change, are added/removed or
-    //the members of ServiceNetworks change
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > accessPointConfigurations;
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > snapConfigurations;
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > userChoiceConfigurations;
-    bool firstUpdate;
-    int onlineConfigurations;
-    friend class IapMonitor;
-    void cleanup();
-    void deleteConfiguration(QString &iap_id);
-    void addConfiguration(QString &iap_id);
-    void configurationChanged(QNetworkConfigurationPrivate *ptr);
-    uint32_t getNetworkAttrs(bool is_iap_id, const QString& iap_id,
-                             const QString& iap_type, QString security_method);
-
-    QDBusInterface *m_dbusInterface;
-    QTimer m_scanTimer;
-    bool m_gettingInitialConnectionState;
-    bool m_scanGoingOn;
-    QStringList m_typesToBeScanned;
-    QList<Maemo::IcdScanResult> m_scanResult;
-    QString m_onlineIapId;
-
-    friend class QNetworkSessionPrivate;
-
-public slots:
-    void updateConfigurations();
-
-private slots:
-    void cancelAsyncConfigurationUpdate();
-    void finishAsyncConfigurationUpdate();
-    void asyncUpdateConfigurationsSlot(QDBusMessage msg);
-    void connectionStateSignalsSlot(QDBusMessage msg);
-
-Q_SIGNALS:
-    void configurationAdded(const QNetworkConfiguration& config);
-    void configurationRemoved(const QNetworkConfiguration& config);
-    void configurationUpdateComplete();
-    void configurationChanged(const QNetworkConfiguration& config);
-    void onlineStateChanged(bool isOnline);
-
-    void iapStateChanged(const QString& iapid, uint icd_connection_state);
-};
-
-QTM_END_NAMESPACE
-
-#endif //QNETWORKCONFIGURATIONMANAGERPRIVATE_H
--- a/qtmobility/src/bearer/qnetworkconfigmanager_p.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,453 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnetworkconfigmanager_p.h"
-#include "qgenericengine_p.h"
-
-#ifdef Q_OS_WIN
-#include "qnlaengine_win_p.h"
-#endif
-#ifdef Q_OS_WIN32
-#include "qnativewifiengine_win_p.h"
-#endif
-#if defined(BACKEND_NM)
-#include "qnmwifiengine_unix_p.h"
-#endif
-#ifdef Q_OS_DARWIN
-#include "qcorewlanengine_mac_p.h"
-#endif
-
-#include <QtCore/qdebug.h>
-#include <QtCore/qtimer.h>
-#include <QtCore/qstringlist.h>
-
-QTM_BEGIN_NAMESPACE
-
-void QNetworkConfigurationManagerPrivate::registerPlatformCapabilities()
-{
-    capFlags = QNetworkConfigurationManager::ForcedRoaming;
-}
-
-void QNetworkConfigurationManagerPrivate::configurationAdded(QNetworkConfigurationPrivate *cpPriv, QNetworkSessionEngine *engine)
-{
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr(new QNetworkConfigurationPrivate);
-
-    ptr.data()->isValid = cpPriv->isValid;
-    ptr.data()->name = cpPriv->name;
-    ptr.data()->id = cpPriv->id;
-    ptr.data()->state = cpPriv->state;
-    ptr.data()->type = cpPriv->type;
-    ptr.data()->roamingSupported = cpPriv->roamingSupported;
-    ptr.data()->purpose = cpPriv->purpose;
-    ptr.data()->internet = cpPriv->internet;
-    ptr.data()->bearer = cpPriv->bearer;
-
-    accessPointConfigurations.insert(cpPriv->id, ptr);
-    configurationEngine.insert(cpPriv->id, engine);
-
-    if (!firstUpdate) {
-        QNetworkConfiguration item;
-        item.d = ptr;
-        emit configurationAdded(item);
-    }
-
-    if (ptr.data()->state == QNetworkConfiguration::Active) {
-        ++onlineConfigurations;
-        if (!firstUpdate && onlineConfigurations == 1)
-            emit onlineStateChanged(true);
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::configurationRemoved(const QString &id)
-{
-    if (!accessPointConfigurations.contains(id))
-        return;
-
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr =
-        accessPointConfigurations.take(id);
-
-    configurationEngine.remove(id);
-
-    ptr.data()->isValid = false;
-
-    if (!firstUpdate) {
-        QNetworkConfiguration item;
-        item.d = ptr;
-        emit configurationRemoved(item);
-    }
-
-    if (ptr.data()->state == QNetworkConfiguration::Active) {
-        --onlineConfigurations;
-        if (!firstUpdate && onlineConfigurations == 0)
-            emit onlineStateChanged(false);
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::configurationChanged(QNetworkConfigurationPrivate *cpPriv)
-{
-    if (!accessPointConfigurations.contains(cpPriv->id))
-        return;
-
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr =
-        accessPointConfigurations.value(cpPriv->id);
-
-    if (ptr.data()->isValid != cpPriv->isValid ||
-        ptr.data()->name != cpPriv->name ||
-        ptr.data()->id != cpPriv->id ||
-        ptr.data()->state != cpPriv->state ||
-        ptr.data()->type != cpPriv->type ||
-        ptr.data()->roamingSupported != cpPriv->roamingSupported ||
-        ptr.data()->purpose != cpPriv->purpose ||
-        ptr.data()->bearer != cpPriv->bearer ||
-        ptr.data()->internet != cpPriv->internet) {
-
-        const QNetworkConfiguration::StateFlags oldState = ptr.data()->state;
-
-        ptr.data()->isValid = cpPriv->isValid;
-        ptr.data()->name = cpPriv->name;
-        ptr.data()->id = cpPriv->id;
-        ptr.data()->state = cpPriv->state;
-        ptr.data()->type = cpPriv->type;
-        ptr.data()->roamingSupported = cpPriv->roamingSupported;
-        ptr.data()->purpose = cpPriv->purpose;
-        ptr.data()->internet = cpPriv->internet;
-        ptr.data()->bearer = cpPriv->bearer;
-
-        if (!firstUpdate) {
-            QNetworkConfiguration item;
-            item.d = ptr;
-            emit configurationChanged(item);
-        }
-
-        if (ptr.data()->state == QNetworkConfiguration::Active && oldState != ptr.data()->state) {
-            // configuration went online
-            ++onlineConfigurations;
-            if (!firstUpdate && onlineConfigurations == 1)
-                emit onlineStateChanged(true);
-        } else if (ptr.data()->state != QNetworkConfiguration::Active && oldState == QNetworkConfiguration::Active) {
-            // configuration went offline
-            --onlineConfigurations;
-            if (!firstUpdate && onlineConfigurations == 0)
-                emit onlineStateChanged(false);
-        }
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::updateInternetServiceConfiguration()
-{
-    if (!snapConfigurations.contains(QLatin1String("Internet Service Network"))) {
-        QNetworkConfigurationPrivate *serviceNetwork = new QNetworkConfigurationPrivate;
-        serviceNetwork->name = tr("Internet");
-        serviceNetwork->isValid = true;
-        serviceNetwork->id = QLatin1String("Internet Service Network");
-        serviceNetwork->state = QNetworkConfiguration::Defined;
-        serviceNetwork->type = QNetworkConfiguration::ServiceNetwork;
-
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr(serviceNetwork);
-
-        snapConfigurations.insert(serviceNetwork->id, ptr);
-
-        if (!firstUpdate) {
-            QNetworkConfiguration item;
-            item.d = ptr;
-            emit configurationAdded(item);
-        }
-    }
-
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr =
-        snapConfigurations.value(QLatin1String("Internet Service Network"));
-
-    QList<QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > serviceNetworkMembers;
-
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> >::const_iterator i =
-        accessPointConfigurations.constBegin();
-
-    QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Defined;
-    while (i != accessPointConfigurations.constEnd()) {
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> child = i.value();
-
-        if (child.data()->internet && ((child.data()->state & QNetworkConfiguration::Defined)
-                    == QNetworkConfiguration::Defined)) {
-            serviceNetworkMembers.append(child);
-
-            state |= child.data()->state;
-        }
-
-        ++i;
-    }
-
-
-    if (ptr.data()->state != state || ptr.data()->serviceNetworkMembers != serviceNetworkMembers) {
-        ptr.data()->state = state;
-        ptr.data()->serviceNetworkMembers = serviceNetworkMembers;
-
-        QNetworkConfiguration item;
-        item.d = ptr;
-        emit configurationChanged(item);
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::updateConfigurations()
-{
-    if (firstUpdate) {
-        updateState = NotUpdating;
-        onlineConfigurations = 0;
-
-#if defined (Q_OS_DARWIN)
-        coreWifi = QCoreWlanEngine::instance();
-        if (coreWifi) {
-            connect(coreWifi, SIGNAL(configurationsChanged()),
-                    this, SLOT(updateConfigurations()));
-        }
-#else
-#if defined(BACKEND_NM)
-        nmWifi = QNmWifiEngine::instance();
-        if (nmWifi) {
-            connect(nmWifi, SIGNAL(configurationsChanged()),
-                    this, SLOT(updateConfigurations()));
-        } else {
-#endif
-            generic = QGenericEngine::instance();
-            if (generic) {
-                connect(generic, SIGNAL(configurationsChanged()),
-                        this, SLOT(updateConfigurations()));
-            }
-#if defined(BACKEND_NM)
-        }
-#endif
-#endif
-
-#ifdef Q_OS_WIN
-            nla = QNlaEngine::instance();
-            if (nla) {
-                connect(nla, SIGNAL(configurationsChanged()),
-                        this, SLOT(updateConfigurations()));
-            }
-#endif
-
-#ifdef Q_OS_WIN32
-            nativeWifi = QNativeWifiEngine::instance();
-            if (nativeWifi) {
-                connect(nativeWifi, SIGNAL(configurationsChanged()),
-                        this, SLOT(updateConfigurations()));
-
-                capFlags |= QNetworkConfigurationManager::CanStartAndStopInterfaces;
-            }
-#endif
-    }
-
-    QNetworkSessionEngine *engine = qobject_cast<QNetworkSessionEngine *>(sender());
-    if (updateState & Updating && engine) {
-#if defined (Q_OS_DARWIN)
-        if (engine == coreWifi)
-            updateState &= ~CoreWifiUpdating;
-#else
-#if defined(BACKEND_NM)
-        if (engine == nmWifi)
-            updateState &= ~NmUpdating;
-        else if (engine == generic)
-            updateState &= ~GenericUpdating;
-#else
-        if (engine == generic)
-            updateState &= ~GenericUpdating;
-#endif
-#endif
-
-#ifdef Q_OS_WIN
-        else if (engine == nla)
-            updateState &= ~NlaUpdating;
-#ifdef Q_OS_WIN32
-        else if (engine == nativeWifi)
-            updateState &= ~NativeWifiUpdating;
-#endif
-#endif
-    }
-    QList<QNetworkSessionEngine *> engines;
-    if (firstUpdate) {
-#if defined (Q_OS_DARWIN)
-        if (coreWifi)
-            engines << coreWifi;
-#else
-#if defined(BACKEND_NM)
-        if (nmWifi)
-            engines << nmWifi;
-        else if (generic)
-            engines << generic;
-#else
-        if (generic)
-            engines << generic;
-#endif
-#endif
-
-#ifdef Q_OS_WIN
-        if (nla)
-            engines << nla;
-#ifdef Q_OS_WIN32
-        if (nativeWifi)
-            engines << nativeWifi;
-#endif
-#endif
-    } else if (engine) {
-        engines << engine;
-    }
-
-    while (!engines.isEmpty()) {
-        engine = engines.takeFirst();
-
-        bool ok;
-        QList<QNetworkConfigurationPrivate *> foundConfigurations = engine->getConfigurations(&ok);
-
-        // Find removed configurations.
-        QList<QString> removedIdentifiers = configurationEngine.keys();
-        for (int i = 0; i < foundConfigurations.count(); ++i)
-            removedIdentifiers.removeOne(foundConfigurations.at(i)->id);
-
-        // Update or add configurations.
-        while (!foundConfigurations.isEmpty()) {
-            QNetworkConfigurationPrivate *cpPriv = foundConfigurations.takeFirst();
-
-            if (accessPointConfigurations.contains(cpPriv->id))
-                configurationChanged(cpPriv);
-            else
-                configurationAdded(cpPriv, engine);
-
-            delete cpPriv;
-        }
-
-        // Remove configurations.
-        while (!removedIdentifiers.isEmpty()) {
-            const QString id = removedIdentifiers.takeFirst();
-
-            if (configurationEngine.value(id) == engine)
-                configurationRemoved(id);
-        }
-    }
-
-    updateInternetServiceConfiguration();
-
-    if (updateState == Updating) {
-        updateState = NotUpdating;
-        emit configurationUpdateComplete();
-    }
-
-    if (firstUpdate)
-        firstUpdate = false;
-}
-
-/*!
-    Returns the first active configuration found, if one exists; otherwise returns the first
-    discovered configuration found, if one exists; otherwise returns an empty configuration.
-
-    \internal
-*/
-QNetworkConfiguration QNetworkConfigurationManagerPrivate::defaultConfiguration()
-{
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> firstActive;
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> firstDiscovered;
-
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> >::const_iterator i =
-        accessPointConfigurations.constBegin();
-    while (i != accessPointConfigurations.constEnd()) {
-        QNetworkConfigurationPrivate *priv = i.value().data();
-
-        if (!firstActive && priv->isValid &&
-            (priv->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active)
-            firstActive = i.value();
-        if (!firstDiscovered && priv->isValid &&
-            (priv->state & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered)
-            firstDiscovered = i.value();
-
-        ++i;
-    }
-
-    QNetworkConfiguration item;
-
-    if (firstActive)
-        item.d = firstActive;
-    else if (firstDiscovered)
-        item.d = firstDiscovered;
-
-    return item;
-}
-
-void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate()
-{
-    updateState = Updating;
-#if defined (Q_OS_DARWIN)
-    if (coreWifi) {
-        updateState |= CoreWifiUpdating;
-        coreWifi->requestUpdate();
-    }
-#else
-#if defined(BACKEND_NM)
-    if (nmWifi) {
-        updateState |= NmUpdating;
-        nmWifi->requestUpdate();
-    } else if (generic) {
-        updateState |= GenericUpdating;
-        generic->requestUpdate();
-    }
-#else
-    if (generic) {
-        updateState |= GenericUpdating;
-        generic->requestUpdate();
-    }
-#endif
-#endif
-#ifdef Q_OS_WIN
-    if (nla) {
-        updateState |= NlaUpdating;
-        nla->requestUpdate();
-    }
-#endif
-
-#ifdef Q_OS_WIN32
-    if (nativeWifi) {
-        updateState |= NativeWifiUpdating;
-        nativeWifi->requestUpdate();
-    }
-#endif
-}
-
-#include "moc_qnetworkconfigmanager_p.cpp"
-
-QTM_END_NAMESPACE
-
--- a/qtmobility/src/bearer/qnetworkconfigmanager_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKCONFIGURATIONMANAGERPRIVATE_H
-#define QNETWORKCONFIGURATIONMANAGERPRIVATE_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qnetworkconfigmanager.h"
-#include "qnetworkconfiguration_p.h"
-
-#include <QHash>
-#include <QStringList>
-
-QTM_BEGIN_NAMESPACE
-
-#ifdef BEARER_ENGINE
-class QNetworkSessionEngine;
-class QGenericEngine;
-class QNlaEngine;
-class QNativeWifiEngine;
-class QNmWifiEngine;
-class QCoreWlanEngine;
-#endif
-
-
-class QNetworkConfigurationManagerPrivate : public QObject
-{
-    Q_OBJECT
-public:
-    QNetworkConfigurationManagerPrivate()
-    :   QObject(0), capFlags(0), firstUpdate(true)
-    {
-        registerPlatformCapabilities();
-        updateConfigurations();
-    }
-
-    virtual ~QNetworkConfigurationManagerPrivate() 
-    {
-        QList<QString> configIdents = snapConfigurations.keys();
-        foreach(const QString oldIface, configIdents) {
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = snapConfigurations.take(oldIface);
-            priv->isValid = false;
-            priv->id.clear();
-        }
-
-        configIdents = accessPointConfigurations.keys();
-        foreach(const QString oldIface, configIdents) {
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.take(oldIface);
-            priv->isValid = false;
-            priv->id.clear();
-        }
-    }
-
-    QNetworkConfiguration defaultConfiguration();
-
-    QNetworkConfigurationManager::Capabilities capFlags;
-    void registerPlatformCapabilities();
-
-    void performAsyncConfigurationUpdate();
-
-    //this table contains an up to date list of all configs at any time.
-    //it must be updated if configurations change, are added/removed or
-    //the members of ServiceNetworks change
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > accessPointConfigurations;
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > snapConfigurations;
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > userChoiceConfigurations;
-#ifdef BEARER_ENGINE
-    QHash<QString, QNetworkSessionEngine *> configurationEngine;
-#endif
-    bool firstUpdate;
-
-public slots:
-    void updateConfigurations();
-
-Q_SIGNALS:
-    void configurationAdded(const QNetworkConfiguration& config);
-    void configurationRemoved(const QNetworkConfiguration& config);
-    void configurationUpdateComplete();
-    void configurationChanged(const QNetworkConfiguration& config);
-    void onlineStateChanged(bool isOnline);
-
-private:
-#ifdef BEARER_ENGINE
-    void updateInternetServiceConfiguration();
-
-    void abort();
-#endif
-
-#ifdef BEARER_ENGINE
-    QGenericEngine *generic;
-#ifdef Q_OS_WIN
-    QNlaEngine *nla;
-#ifndef Q_OS_WINCE
-    QNativeWifiEngine *nativeWifi;
-#endif
-#endif
-#ifdef BACKEND_NM
-    QNmWifiEngine *nmWifi;
-#endif
-#ifdef Q_OS_DARWIN
-    QCoreWlanEngine *coreWifi;
-#endif
-
-    uint onlineConfigurations;
-
-    enum EngineUpdate {
-        NotUpdating = 0x00,
-        Updating = 0x01,
-        GenericUpdating = 0x02,
-        NlaUpdating = 0x04,
-        NativeWifiUpdating = 0x08,
-        NmUpdating = 0x20,
-        CoreWifiUpdating = 0x40,
-    };
-    Q_DECLARE_FLAGS(EngineUpdateState, EngineUpdate)
-
-    EngineUpdateState updateState;
-#endif
-
-private Q_SLOTS:
-#ifdef BEARER_ENGINE
-    void configurationAdded(QNetworkConfigurationPrivate *cpPriv, QNetworkSessionEngine *engine);
-    void configurationRemoved(const QString &id);
-    void configurationChanged(QNetworkConfigurationPrivate *cpPriv);
-#endif
-};
-
-QTM_END_NAMESPACE
-
-#endif //QNETWORKCONFIGURATIONMANAGERPRIVATE_H
--- a/qtmobility/src/bearer/qnetworkconfigmanager_s60_p.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1275 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnetworkconfigmanager_s60_p.h"
-
-#include <commdb.h>
-#include <cdbcols.h>
-#include <d32dbms.h>
-#include <nifvar.h>
-#include <QTimer>
-#include <QTime>  // For randgen seeding
-#include <QtCore> // For randgen seeding
-
-
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-#include <QDebug>
-#endif
-
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    #include <cmdestination.h>
-    #include <cmconnectionmethod.h>
-    #include <cmconnectionmethoddef.h>
-    #include <cmpluginwlandef.h>
-    #include <cmpluginpacketdatadef.h>
-    #include <cmplugindialcommondefs.h>
-#else
-    #include <apaccesspointitem.h>
-    #include <apdatahandler.h>
-    #include <aputils.h> 
-#endif
-
-QTM_BEGIN_NAMESPACE
-
-static const int KUserChoiceIAPId = 0;
-
-QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate()
-    : QObject(0), CActive(CActive::EPriorityHigh), capFlags(0),
-    iFirstUpdate(true), iInitOk(true), iUpdatePending(false),
-    iTimeToWait(0)
-{
-    CActiveScheduler::Add(this);
-
-    // Seed the randomgenerator
-    qsrand(QTime(0,0,0).secsTo(QTime::currentTime()) + QCoreApplication::applicationPid());
-
-    registerPlatformCapabilities();
-    TRAPD(error, ipCommsDB = CCommsDatabase::NewL(EDatabaseTypeIAP));
-    if (error != KErrNone) {
-        iInitOk = false;
-        return;
-    }
-
-    TRAP_IGNORE(iConnectionMonitor.ConnectL());
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE    
-    TRAP_IGNORE(iConnectionMonitor.SetUintAttribute(EBearerIdAll, 0, KBearerGroupThreshold, 1));
-#endif    
-    TRAP_IGNORE(iConnectionMonitor.NotifyEventL(*this));
-
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE    
-    TRAP(error, iCmManager.OpenL());
-    if (error != KErrNone) {
-        iInitOk = false;
-        return;
-    }
-#endif
-    
-    QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
-    cpPriv->name = "UserChoice";
-    cpPriv->bearer = QNetworkConfigurationPrivate::BearerUnknown;
-    cpPriv->state = QNetworkConfiguration::Discovered;
-    cpPriv->isValid = true;
-    cpPriv->id = QString::number(qHash(KUserChoiceIAPId));
-    cpPriv->numericId = KUserChoiceIAPId;
-    cpPriv->connectionId = 0;
-    cpPriv->type = QNetworkConfiguration::UserChoice;
-    cpPriv->purpose = QNetworkConfiguration::UnknownPurpose;
-    cpPriv->roamingSupported = false;
-    cpPriv->manager = this;
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr(cpPriv);
-    userChoiceConfigurations.insert(cpPriv->id, ptr);
-    updateConfigurations();
-    updateStatesToSnaps();
-    updateAvailableAccessPoints(); // On first time updates synchronously (without WLAN scans)
-    // Start monitoring IAP and/or SNAP changes in Symbian CommsDB
-    startCommsDatabaseNotifications();
-    iFirstUpdate = false;
-}
-
-QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate() 
-{
-    Cancel();
-
-    foreach (const QString &oldIface, snapConfigurations.keys()) {
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = snapConfigurations.take(oldIface);
-        priv->isValid = false;
-        priv->id.clear();
-    }
-
-    foreach (const QString &oldIface, accessPointConfigurations.keys()) {
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.take(oldIface);
-        priv->isValid = false;
-        priv->id.clear();
-    }
-
-    foreach (const QString &oldIface, userChoiceConfigurations.keys()) {
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = userChoiceConfigurations.take(oldIface);
-        priv->isValid = false;
-        priv->id.clear();
-        priv->manager = 0;
-    }
-
-    iConnectionMonitor.CancelNotifications();
-    iConnectionMonitor.Close();
-    
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE    
-    iCmManager.Close();
-#endif
-    
-    delete ipAccessPointsAvailabilityScanner;
-
-    // CCommsDatabase destructor uses cleanup stack. Since QNetworkConfigurationManager
-    // is a global static, but the time we are here, E32Main() has been exited already and
-    // the thread's default cleanup stack has been deleted. Without this line, a
-    // 'E32USER-CBase 69' -panic will occur.
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-    delete ipCommsDB;
-    delete cleanup;
-}
-
-void QNetworkConfigurationManagerPrivate::delayedConfigurationUpdate()
-{
-    if (iUpdatePending) {
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-        qDebug("QNCM delayed configuration update (ECommit or ERecover occurred).");
-#endif
-        TRAPD(error, updateConfigurationsL());
-        if (error == KErrNone) {
-            updateStatesToSnaps();
-        }
-        iUpdatePending = false;
-        // Start monitoring again.
-        if (!IsActive()) {
-            SetActive();
-            // Start waiting for new notification
-            ipCommsDB->RequestNotification(iStatus);
-        }
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::registerPlatformCapabilities()
-{
-    capFlags |= QNetworkConfigurationManager::CanStartAndStopInterfaces;
-    capFlags |= QNetworkConfigurationManager::DirectConnectionRouting;
-    capFlags |= QNetworkConfigurationManager::SystemSessionSupport;
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    capFlags |= QNetworkConfigurationManager::ApplicationLevelRoaming;
-    capFlags |= QNetworkConfigurationManager::ForcedRoaming;
-#endif
-    capFlags |= QNetworkConfigurationManager::DataStatistics;
-    capFlags |= QNetworkConfigurationManager::NetworkSessionRequired;
-}
-
-void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate()
-{
-    if (!iInitOk || iUpdateGoingOn) {
-        return;
-    }
-    iUpdateGoingOn = true;
-
-    stopCommsDatabaseNotifications();
-    updateConfigurations(); // Synchronous call
-    updateAvailableAccessPoints(); // Asynchronous call
-}
-
-void QNetworkConfigurationManagerPrivate::updateConfigurations()
-{
-    if (!iInitOk) {
-        return;
-    }
-    TRAP_IGNORE(updateConfigurationsL());
-}
-
-void QNetworkConfigurationManagerPrivate::updateConfigurationsL()
-{
-    QList<QString> knownConfigs = accessPointConfigurations.keys();
-    QList<QString> knownSnapConfigs = snapConfigurations.keys();
-
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    // S60 version is >= Series60 3rd Edition Feature Pack 2
-    TInt error = KErrNone;
-    
-    // Loop through all IAPs
-    RArray<TUint32> connectionMethods; // IAPs
-    CleanupClosePushL(connectionMethods);
-    iCmManager.ConnectionMethodL(connectionMethods);
-    for(int i = 0; i < connectionMethods.Count(); i++) {
-        RCmConnectionMethod connectionMethod = iCmManager.ConnectionMethodL(connectionMethods[i]);
-        CleanupClosePushL(connectionMethod);
-        TUint32 iapId = connectionMethod.GetIntAttributeL(CMManager::ECmIapId);
-        QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(iapId));
-        if (accessPointConfigurations.contains(ident)) {
-            knownConfigs.removeOne(ident);
-        } else {
-            QNetworkConfigurationPrivate* cpPriv = NULL;
-            TRAP(error, cpPriv = configFromConnectionMethodL(connectionMethod));
-            if (error == KErrNone) {
-                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr(cpPriv);
-                accessPointConfigurations.insert(cpPriv->id, ptr);
-                if (!iFirstUpdate) {
-                    QNetworkConfiguration item;
-                    item.d = ptr;
-                    // Emit configuration added. Connected slots may throw execptions
-                    // 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));
-                }
-            }
-        }
-        CleanupStack::PopAndDestroy(&connectionMethod);
-    }
-    CleanupStack::PopAndDestroy(&connectionMethods);
-    
-    // Loop through all SNAPs
-    RArray<TUint32> destinations;
-    CleanupClosePushL(destinations);
-    iCmManager.AllDestinationsL(destinations);
-    for(int i = 0; i < destinations.Count(); i++) {
-        RCmDestination destination;
-
-        // 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();
-            cpPriv->connectionId = 0;
-            cpPriv->state = QNetworkConfiguration::Defined;
-            cpPriv->type = QNetworkConfiguration::ServiceNetwork;
-            cpPriv->purpose = QNetworkConfiguration::UnknownPurpose;
-            cpPriv->roamingSupported = false;
-            cpPriv->manager = this;
-
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr(cpPriv);
-            snapConfigurations.insert(ident, ptr);
-            if (!iFirstUpdate) {
-                QNetworkConfiguration item;
-                item.d = ptr;
-                QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
-                updateStatesToSnaps();
-                QT_TRYCATCH_LEAVING(emit configurationAdded(item));
-            }
-        }
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> privSNAP = snapConfigurations.value(ident);
-            
-        for (int j=0; j < destination.ConnectionMethodCount(); j++) {
-            RCmConnectionMethod connectionMethod = destination.ConnectionMethodL(j);
-            CleanupClosePushL(connectionMethod);
-            
-            TUint32 iapId = connectionMethod.GetIntAttributeL(CMManager::ECmIapId);
-            QString iface = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(iapId));
-            // Check that IAP can be found from accessPointConfigurations list
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(iface);
-            if (priv.data() == 0) {
-                QNetworkConfigurationPrivate* cpPriv = NULL; 
-                TRAP(error, cpPriv = configFromConnectionMethodL(connectionMethod));
-                if (error == KErrNone) {
-                    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> 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));
-                    }
-                }
-            } else {
-                knownConfigs.removeOne(iface);
-                // Check that IAP can be found from related SNAP's configuration list
-                bool iapFound = false;
-                for (int i=0; i<privSNAP->serviceNetworkMembers.count(); i++) {
-                    if (privSNAP->serviceNetworkMembers[i]->numericId == iapId) {
-                        iapFound = true;
-                        break;
-                    }
-                }
-                if (!iapFound) {
-                    priv.data()->serviceNetworkPtr = privSNAP; 
-                    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));
-
-    // Loop through all IAPs
-    TUint32 apId = 0;
-    TInt retVal = pDbTView->GotoFirstRecord();
-    while (retVal == KErrNone) {
-        pDbTView->ReadUintL(TPtrC(COMMDB_ID), apId);
-        QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
-        if (accessPointConfigurations.contains(ident)) {
-            knownConfigs.removeOne(ident);
-        } else {
-            QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
-            if (readNetworkConfigurationValuesFromCommsDb(apId, cpPriv)) {
-                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr(cpPriv);
-                accessPointConfigurations.insert(ident, ptr);
-                if (!iFirstUpdate) {
-                    QNetworkConfiguration item;
-                    item.d = ptr;
-                    QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
-                    updateStatesToSnaps();
-                    QT_TRYCATCH_LEAVING(emit configurationAdded(item));
-                }
-            } else {
-                delete cpPriv;
-            }
-        }
-        retVal = pDbTView->GotoNextRecord();
-    }
-    CleanupStack::PopAndDestroy(pDbTView);
-#endif
-
-    QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
-
-    foreach (const QString &oldIface, knownConfigs) {
-        //remove non existing IAP
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.take(oldIface);
-        priv->isValid = false;
-        if (!iFirstUpdate) {
-            QNetworkConfiguration item;
-            item.d = priv;
-            QT_TRYCATCH_LEAVING(emit configurationRemoved(item));
-        }
-        // Remove non existing IAP from SNAPs
-        foreach (const QString &iface, snapConfigurations.keys()) {
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv2 = snapConfigurations.value(iface);
-            // => Check if one of the IAPs of the SNAP is active
-            for (int i=0; i<priv2->serviceNetworkMembers.count(); i++) {
-                if (priv2->serviceNetworkMembers[i]->numericId == priv->numericId) {
-                    priv2->serviceNetworkMembers.removeAt(i);
-                    break;
-                }
-            }
-        }    
-    }
-    foreach (const QString &oldIface, knownSnapConfigs) {
-        //remove non existing SNAPs
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = snapConfigurations.take(oldIface);
-        priv->isValid = false;
-        if (!iFirstUpdate) {
-            QNetworkConfiguration item;
-            item.d = priv;
-            QT_TRYCATCH_LEAVING(emit configurationRemoved(item));
-        }
-    }
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    updateStatesToSnaps();
-#endif
-}
-
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-QNetworkConfigurationPrivate* QNetworkConfigurationManagerPrivate::configFromConnectionMethodL(
-        RCmConnectionMethod& connectionMethod)
-{
-    QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
-    TUint32 iapId = connectionMethod.GetIntAttributeL(CMManager::ECmIapId);
-    QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(iapId));
-    
-    HBufC *pName = connectionMethod.GetStringAttributeL(CMManager::ECmName);
-    CleanupStack::PushL(pName);
-    QT_TRYCATCH_LEAVING(cpPriv->name = QString::fromUtf16(pName->Ptr(),pName->Length()));
-    CleanupStack::PopAndDestroy(pName);
-    pName = NULL;
-    
-    TUint32 bearerId = connectionMethod.GetIntAttributeL(CMManager::ECmCommsDBBearerType);
-    switch (bearerId) {
-    case KCommDbBearerCSD:
-        cpPriv->bearer = QNetworkConfigurationPrivate::Bearer2G;
-        break;
-    case KCommDbBearerWcdma:
-        cpPriv->bearer = QNetworkConfigurationPrivate::BearerWCDMA;
-        break;
-    case KCommDbBearerLAN:
-        cpPriv->bearer = QNetworkConfigurationPrivate::BearerEthernet;
-        break;
-    case KCommDbBearerVirtual:
-        cpPriv->bearer = QNetworkConfigurationPrivate::BearerUnknown;
-        break;
-    case KCommDbBearerPAN:
-        cpPriv->bearer = QNetworkConfigurationPrivate::BearerUnknown;
-        break;
-    case KCommDbBearerWLAN:
-        cpPriv->bearer = QNetworkConfigurationPrivate::BearerWLAN;
-        break;
-    default:
-        cpPriv->bearer = QNetworkConfigurationPrivate::BearerUnknown;
-        break;
-    }
-    
-    TInt error = KErrNone;
-    TUint32 bearerType = connectionMethod.GetIntAttributeL(CMManager::ECmBearerType);
-    switch (bearerType) {
-    case KUidPacketDataBearerType:
-        // "Packet data" Bearer => Mapping is done using "Access point name"
-        TRAP(error, pName = connectionMethod.GetStringAttributeL(CMManager::EPacketDataAPName));
-        break;
-    case KUidWlanBearerType:
-        // "Wireless LAN" Bearer => Mapping is done using "WLAN network name" = SSID
-        TRAP(error, pName = connectionMethod.GetStringAttributeL(CMManager::EWlanSSID));
-        break;
-    }
-    if (!pName) {
-        // "Data call" Bearer or "High Speed (GSM)" Bearer => Mapping is done using "Dial-up number"
-        TRAP(error, pName = connectionMethod.GetStringAttributeL(CMManager::EDialDefaultTelNum));
-    }
-
-    if (error == KErrNone && pName) {
-        CleanupStack::PushL(pName);
-        QT_TRYCATCH_LEAVING(cpPriv->mappingName = QString::fromUtf16(pName->Ptr(),pName->Length()));
-        CleanupStack::PopAndDestroy(pName);
-        pName = NULL;
-    }
- 
-    cpPriv->state = QNetworkConfiguration::Defined;
-    TBool isConnected = connectionMethod.GetBoolAttributeL(CMManager::ECmConnected);
-    if (isConnected) {
-        cpPriv->state = QNetworkConfiguration::Active;
-    }
-    
-    cpPriv->isValid = true;
-    cpPriv->id = ident;
-    cpPriv->numericId = iapId;
-    cpPriv->connectionId = 0;
-    cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
-    cpPriv->purpose = QNetworkConfiguration::UnknownPurpose;
-    cpPriv->roamingSupported = false;
-    cpPriv->manager = this;
-    return cpPriv;
-}
-#else
-bool QNetworkConfigurationManagerPrivate::readNetworkConfigurationValuesFromCommsDb(
-        TUint32 aApId, QNetworkConfigurationPrivate* apNetworkConfiguration)
-{
-    TRAPD(error, readNetworkConfigurationValuesFromCommsDbL(aApId,apNetworkConfiguration));
-    if (error != KErrNone) {
-        return false;        
-    }
-    return true;
-}
-
-void QNetworkConfigurationManagerPrivate::readNetworkConfigurationValuesFromCommsDbL(
-        TUint32 aApId, QNetworkConfigurationPrivate* apNetworkConfiguration)
-{
-    CApDataHandler* pDataHandler = CApDataHandler::NewLC(*ipCommsDB); 
-    CApAccessPointItem* pAPItem = CApAccessPointItem::NewLC(); 
-    TBuf<KCommsDbSvrMaxColumnNameLength> name;
-    
-    CApUtils* pApUtils = CApUtils::NewLC(*ipCommsDB);
-    TUint32 apId = pApUtils->WapIdFromIapIdL(aApId);
-    
-    pDataHandler->AccessPointDataL(apId,*pAPItem);
-    pAPItem->ReadTextL(EApIapName, name);
-    if (name.Compare(_L("Easy WLAN")) == 0) {
-        // "Easy WLAN" won't be accepted to the Configurations list
-        User::Leave(KErrNotFound);
-    }
-    
-    QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(aApId));
-    
-    QT_TRYCATCH_LEAVING(apNetworkConfiguration->name = QString::fromUtf16(name.Ptr(),name.Length()));
-    apNetworkConfiguration->isValid = true;
-    apNetworkConfiguration->id = ident;
-    apNetworkConfiguration->numericId = aApId;
-    apNetworkConfiguration->connectionId = 0;
-    apNetworkConfiguration->state = (QNetworkConfiguration::Defined);
-    apNetworkConfiguration->type = QNetworkConfiguration::InternetAccessPoint;
-    apNetworkConfiguration->purpose = QNetworkConfiguration::UnknownPurpose;
-    apNetworkConfiguration->roamingSupported = false;
-    switch (pAPItem->BearerTypeL()) {
-    case EApBearerTypeCSD:      
-        apNetworkConfiguration->bearer = QNetworkConfigurationPrivate::Bearer2G;
-        break;
-    case EApBearerTypeGPRS:
-        apNetworkConfiguration->bearer = QNetworkConfigurationPrivate::Bearer2G;
-        break;
-    case EApBearerTypeHSCSD:
-        apNetworkConfiguration->bearer = QNetworkConfigurationPrivate::BearerHSPA;
-        break;
-    case EApBearerTypeCDMA:
-        apNetworkConfiguration->bearer = QNetworkConfigurationPrivate::BearerCDMA2000;
-        break;
-    case EApBearerTypeWLAN:
-        apNetworkConfiguration->bearer = QNetworkConfigurationPrivate::BearerWLAN;
-        break;
-    case EApBearerTypeLAN:
-        apNetworkConfiguration->bearer = QNetworkConfigurationPrivate::BearerEthernet;
-        break;
-    case EApBearerTypeLANModem:
-        apNetworkConfiguration->bearer = QNetworkConfigurationPrivate::BearerEthernet;
-        break;
-    default:
-        apNetworkConfiguration->bearer = QNetworkConfigurationPrivate::BearerUnknown;
-        break;
-    }
-    apNetworkConfiguration->manager = this;
-    
-    CleanupStack::PopAndDestroy(pApUtils);
-    CleanupStack::PopAndDestroy(pAPItem);
-    CleanupStack::PopAndDestroy(pDataHandler);
-}
-#endif
-
-QNetworkConfiguration QNetworkConfigurationManagerPrivate::defaultConfiguration()
-{
-    QNetworkConfiguration config;
-
-    if (iInitOk) {
-        stopCommsDatabaseNotifications();
-        TRAP_IGNORE(config = defaultConfigurationL());
-        startCommsDatabaseNotifications();
-    }
-    return config;
-}
-
-QNetworkConfiguration QNetworkConfigurationManagerPrivate::defaultConfigurationL()
-{
-    QNetworkConfiguration item;
-
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    // Check Default Connection (SNAP or IAP)
-    TCmDefConnValue defaultConnectionValue;
-    iCmManager.ReadDefConnL(defaultConnectionValue);
-    if (defaultConnectionValue.iType == ECmDefConnDestination) {
-        QString iface = QT_BEARERMGMT_CONFIGURATION_SNAP_PREFIX+QString::number(qHash(defaultConnectionValue.iId));
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = snapConfigurations.value(iface);
-        if (priv.data() != 0) {
-            item.d = priv;
-        }
-    } else if (defaultConnectionValue.iType == ECmDefConnConnectionMethod) {
-        QString iface = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(defaultConnectionValue.iId));
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(iface);
-        if (priv.data() != 0) {
-            item.d = priv;
-        }
-    } 
-#endif
-    
-    if (!item.isValid()) {
-        QString iface = QString::number(qHash(KUserChoiceIAPId));
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = userChoiceConfigurations.value(iface);
-        if (priv.data() != 0) {
-            item.d = priv;
-        }
-    }
-    
-    return item;
-}
-
-void QNetworkConfigurationManagerPrivate::updateActiveAccessPoints()
-{
-    bool online = false;
-    QList<QString> inactiveConfigs = accessPointConfigurations.keys();
-
-    TRequestStatus status;
-    TUint connectionCount;
-    iConnectionMonitor.GetConnectionCount(connectionCount, status);
-    User::WaitForRequest(status);
-    
-    // Go through all connections and set state of related IAPs to Active.
-    // Status needs to be checked carefully, because ConnMon lists also e.g.
-    // WLAN connections that are being currently tried --> we don't want to
-    // state these as active.
-    TUint connectionId;
-    TUint subConnectionCount;
-    TUint apId;
-    TInt connectionStatus;
-    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);
-            QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(ident);
-#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);
-
-                if (connectionStatus == KLinkLayerOpen) {
-                    online = true;
-                    inactiveConfigs.removeOne(ident);
-                    priv.data()->connectionId = connectionId;
-                    // Configuration is Active
-                    changeConfigurationStateTo(priv, QNetworkConfiguration::Active);
-                }
-            }
-        }
-    }
-
-    // Make sure that state of rest of the IAPs won't be Active
-    foreach (const QString &iface, inactiveConfigs) {
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(iface);
-        if (priv.data()) {
-            // Configuration is either Defined or Discovered
-            changeConfigurationStateAtMaxTo(priv, QNetworkConfiguration::Discovered);
-        }
-    }
-
-    if (iOnline != online) {
-        iOnline = online;
-        emit this->onlineStateChanged(online);
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::updateAvailableAccessPoints()
-{
-    if (!ipAccessPointsAvailabilityScanner) {
-        ipAccessPointsAvailabilityScanner = new AccessPointsAvailabilityScanner(*this, iConnectionMonitor);
-    }
-    if (ipAccessPointsAvailabilityScanner) {
-        // Scanning may take a while because WLAN scanning will be done (if device supports WLAN).
-        ipAccessPointsAvailabilityScanner->StartScanning();
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::accessPointScanningReady(TBool scanSuccessful, TConnMonIapInfo iapInfo)
-{
-    iUpdateGoingOn = false;
-    if (scanSuccessful) {
-        QList<QString> unavailableConfigs = accessPointConfigurations.keys();
-        
-        // Set state of returned IAPs to Discovered
-        // if state is not already Active
-        for(TUint i=0; i<iapInfo.iCount; i++) {
-            QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(iapInfo.iIap[i].iIapId));
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(ident);
-            if (priv.data()) {
-                unavailableConfigs.removeOne(ident);
-                if (priv.data()->state < QNetworkConfiguration::Active) {
-                    // Configuration is either Discovered or Active
-                    changeConfigurationStateAtMinTo(priv, QNetworkConfiguration::Discovered);
-                }
-            }
-        }
-        
-        // Make sure that state of rest of the IAPs won't be Active
-        foreach (const QString &iface, unavailableConfigs) {
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(iface);
-            if (priv.data()) {
-                // Configuration is Defined
-                changeConfigurationStateAtMaxTo(priv, QNetworkConfiguration::Discovered);
-            }
-        }
-    }
-
-    updateStatesToSnaps();
-    
-    if (!iFirstUpdate) {
-        startCommsDatabaseNotifications();
-        emit this->configurationUpdateComplete();
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::updateStatesToSnaps()
-{
-    // Go through SNAPs and set correct state to SNAPs
-    foreach (const QString &iface, snapConfigurations.keys()) {
-        bool discovered = false;
-        bool active = false;
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = snapConfigurations.value(iface);
-        // => Check if one of the IAPs of the SNAP is discovered or active
-        //    => If one of IAPs is active, also SNAP is active
-        //    => If one of IAPs is discovered but none of the IAPs is active, SNAP is discovered
-        for (int i=0; i<priv->serviceNetworkMembers.count(); i++) {
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv2 = priv->serviceNetworkMembers[i];
-            if ((priv->serviceNetworkMembers[i]->state & QNetworkConfiguration::Active) 
-                    == QNetworkConfiguration::Active) {
-                active = true;
-                break;
-            } else if ((priv->serviceNetworkMembers[i]->state & QNetworkConfiguration::Discovered) 
-                        == QNetworkConfiguration::Discovered) {
-                discovered = true;
-            }
-        }
-        if (active) {
-            changeConfigurationStateTo(priv, QNetworkConfiguration::Active);
-        } else if (discovered) {
-            changeConfigurationStateTo(priv, QNetworkConfiguration::Discovered);
-        } else {
-            changeConfigurationStateTo(priv, QNetworkConfiguration::Defined);
-        }
-    }    
-}
-
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-void QNetworkConfigurationManagerPrivate::updateMobileBearerToConfigs(TConnMonBearerInfo bearerInfo)
-{
-    foreach (const QString &ii, accessPointConfigurations.keys()) {
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> p = 
-            accessPointConfigurations.value(ii);
-        if (p->bearer >= QNetworkConfigurationPrivate::Bearer2G &&
-            p->bearer <= QNetworkConfigurationPrivate::BearerHSPA) {
-            switch (bearerInfo) {
-            case EBearerInfoCSD:      p->bearer = QNetworkConfigurationPrivate::Bearer2G; break;  
-            case EBearerInfoWCDMA:    p->bearer = QNetworkConfigurationPrivate::BearerWCDMA; break;
-            case EBearerInfoCDMA2000: p->bearer = QNetworkConfigurationPrivate::BearerCDMA2000; break;
-            case EBearerInfoGPRS:     p->bearer = QNetworkConfigurationPrivate::Bearer2G; break;
-            case EBearerInfoHSCSD:    p->bearer = QNetworkConfigurationPrivate::Bearer2G; break;
-            case EBearerInfoEdgeGPRS: p->bearer = QNetworkConfigurationPrivate::Bearer2G; break;
-            case EBearerInfoWcdmaCSD: p->bearer = QNetworkConfigurationPrivate::BearerWCDMA; break;
-            case EBearerInfoHSDPA:    p->bearer = QNetworkConfigurationPrivate::BearerHSPA; break;
-            case EBearerInfoHSUPA:    p->bearer = QNetworkConfigurationPrivate::BearerHSPA; break;
-            case EBearerInfoHSxPA:    p->bearer = QNetworkConfigurationPrivate::BearerHSPA; break;
-            }
-        }
-    }
-}
-#endif
-
-bool QNetworkConfigurationManagerPrivate::changeConfigurationStateTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData,
-                                                                     QNetworkConfiguration::StateFlags newState)
-{
-    if (newState != sharedData.data()->state) {
-        sharedData.data()->state = newState;
-        QNetworkConfiguration item;
-        item.d = sharedData;
-        if (!iFirstUpdate) {
-            emit configurationChanged(item);
-        }
-        return true;
-    }
-    return false;
-}
-
-/* changeConfigurationStateAtMinTo function does not overwrite possible better
- * state (e.g. Discovered state does not overwrite Active state) but
- * makes sure that state is at minimum given state.
-*/
-bool QNetworkConfigurationManagerPrivate::changeConfigurationStateAtMinTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData,
-                                                                          QNetworkConfiguration::StateFlags newState)
-{
-    if ((newState | sharedData.data()->state) != sharedData.data()->state) {
-        sharedData.data()->state = (sharedData.data()->state | newState);
-        QNetworkConfiguration item;
-        item.d = sharedData;
-        if (!iFirstUpdate) {
-            emit configurationChanged(item);
-        }
-        return true;
-    }
-    return false;
-}
-
-/* changeConfigurationStateAtMaxTo function overwrites possible better
- * state (e.g. Discovered state overwrites Active state) and
- * makes sure that state is at maximum given state (e.g. Discovered state
- * does not overwrite Defined state).
-*/
-bool QNetworkConfigurationManagerPrivate::changeConfigurationStateAtMaxTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData,
-                                                                          QNetworkConfiguration::StateFlags newState)
-{
-    if ((newState & sharedData.data()->state) != sharedData.data()->state) {
-        sharedData.data()->state = (newState & sharedData.data()->state);
-        QNetworkConfiguration item;
-        item.d = sharedData;
-        if (!iFirstUpdate) {
-            emit configurationChanged(item);
-        }
-        return true;
-    }
-    return false;
-}
-
-void QNetworkConfigurationManagerPrivate::startCommsDatabaseNotifications()
-{
-    if (!iWaitingCommsDatabaseNotifications) {
-        iWaitingCommsDatabaseNotifications = ETrue;
-        if (!IsActive()) {
-            SetActive();
-            // Start waiting for new notification
-            ipCommsDB->RequestNotification(iStatus);
-        }
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::stopCommsDatabaseNotifications()
-{
-    if (iWaitingCommsDatabaseNotifications) {
-        iWaitingCommsDatabaseNotifications = EFalse;
-        if (!IsActive()) {
-            SetActive();
-            // Make sure that notifier recorded events will not be returned
-            // as soon as the client issues the next RequestNotification() request.
-            ipCommsDB->RequestNotification(iStatus);
-            ipCommsDB->CancelRequestNotification();
-        } else {
-            ipCommsDB->CancelRequestNotification();
-        }
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::RunL()
-{
-    if (iStatus != KErrCancel) {
-        // By default, start relistening notifications. Stop only if interesting event occured.
-        iWaitingCommsDatabaseNotifications = true;
-        RDbNotifier::TEvent event = STATIC_CAST(RDbNotifier::TEvent, iStatus.Int());
-        switch (event) {
-        case RDbNotifier::ECommit:   /** A transaction has been committed.  */ 
-        case RDbNotifier::ERecover:  /** The database has been recovered    */
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-            qDebug("QNCM CommsDB event (of type RDbNotifier::TEvent) received: %d", iStatus.Int());
-#endif
-            // Mark that there is update pending. No need to ask more events,
-            // as we know we will be updating anyway when the timer expires.
-            if (!iUpdatePending) {
-                iUpdatePending = true;
-                iWaitingCommsDatabaseNotifications = false;
-                // Update after random time, so that many processes won't
-                // start updating simultaneously
-                updateConfigurationsAfterRandomTime();
-            }
-            break;           
-        default:
-            // Do nothing
-            break;
-        }
-    }
-    if (iWaitingCommsDatabaseNotifications) {
-        if (!IsActive()) {
-            SetActive();
-            // Start waiting for new notification
-            ipCommsDB->RequestNotification(iStatus);
-        }
-    }
-}
-
-void QNetworkConfigurationManagerPrivate::DoCancel()
-{
-    ipCommsDB->CancelRequestNotification();
-}
-
-void QNetworkConfigurationManagerPrivate::EventL(const CConnMonEventBase& aEvent)
-{
-    switch (aEvent.EventType()) {
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE     
-    case EConnMonBearerInfoChange:
-        {
-        CConnMonBearerInfoChange* realEvent;
-        realEvent = (CConnMonBearerInfoChange*) &aEvent;
-        TUint connectionId = realEvent->ConnectionId();
-        if (connectionId == EBearerIdAll) {
-            //Network level event
-            TConnMonBearerInfo bearerInfo = (TConnMonBearerInfo)realEvent->BearerInfo();
-            updateMobileBearerToConfigs(bearerInfo);
-        }
-        break;
-        }
-#endif        
-    case EConnMonConnectionStatusChange:
-        {
-        CConnMonConnectionStatusChange* realEvent;
-        realEvent = (CConnMonConnectionStatusChange*) &aEvent;
-        TInt connectionStatus = realEvent->ConnectionStatus();
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-        qDebug() << "QNCM Connection status : " << QString::number(connectionStatus) << " , connection monitor Id : " << realEvent->ConnectionId();
-#endif
-        if (connectionStatus == KConfigDaemonStartingRegistration) {
-            TUint connectionId = realEvent->ConnectionId();
-            TUint subConnectionCount = 0;
-            TUint apId;            
-            TRequestStatus status;
-            iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
-            User::WaitForRequest(status);
-
-            QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(ident);
-#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;
-                QT_TRYCATCH_LEAVING(emit this->configurationStateChanged(priv.data()->numericId, connectionId, QNetworkSession::Connecting));
-            }
-        } else if (connectionStatus == KLinkLayerOpen) {
-            // Connection has been successfully opened
-            TUint connectionId = realEvent->ConnectionId();
-            TUint subConnectionCount = 0;
-            TUint apId;            
-            TRequestStatus status;
-            iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
-            User::WaitForRequest(status);
-            QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(ident);
-#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
-            if (!priv.data()) {
-                // Check for EasyWLAN
-                priv = configurationFromEasyWlan(apId, connectionId);
-            }
-#endif
-            if (priv.data()) {
-                priv.data()->connectionId = connectionId;
-                // Configuration is Active
-                QT_TRYCATCH_LEAVING(
-                    if (changeConfigurationStateTo(priv, QNetworkConfiguration::Active)) {
-                        updateStatesToSnaps();
-                    }
-                    emit this->configurationStateChanged(priv.data()->numericId, connectionId, QNetworkSession::Connected);
-                    if (!iOnline) {
-                        iOnline = true;
-                        emit this->onlineStateChanged(iOnline);
-                    }
-                );
-            }
-        } else if (connectionStatus == KConfigDaemonStartingDeregistration) {
-            TUint connectionId = realEvent->ConnectionId();
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = dataByConnectionId(connectionId);
-            if (priv.data()) {
-                QT_TRYCATCH_LEAVING(emit this->configurationStateChanged(priv.data()->numericId, connectionId, QNetworkSession::Closing));
-            }
-        } else if (connectionStatus == KLinkLayerClosed ||
-                   connectionStatus == KConnectionClosed) {
-            // Connection has been closed. Which of the above events is reported, depends on the Symbian
-            // platform.
-            TUint connectionId = realEvent->ConnectionId();
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = dataByConnectionId(connectionId);
-            if (priv.data()) {
-                // Configuration is either Defined or Discovered
-                QT_TRYCATCH_LEAVING(
-                    if (changeConfigurationStateAtMaxTo(priv, QNetworkConfiguration::Discovered)) {
-                        updateStatesToSnaps();
-                    }
-                    emit this->configurationStateChanged(priv.data()->numericId, connectionId, QNetworkSession::Disconnected);
-                );
-            }
-            
-            bool online = false;
-            foreach (const QString &iface, accessPointConfigurations.keys()) {
-                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(iface);
-                if (priv.data()->state == QNetworkConfiguration::Active) {
-                    online = true;
-                    break;
-                }
-            }
-            if (iOnline != online) {
-                iOnline = online;
-                QT_TRYCATCH_LEAVING(emit this->onlineStateChanged(iOnline));
-            }
-        }
-        }
-        break;    
-
-    case EConnMonIapAvailabilityChange:
-        {
-        CConnMonIapAvailabilityChange* realEvent;
-        realEvent = (CConnMonIapAvailabilityChange*) &aEvent;
-        TConnMonIapInfo iaps = realEvent->IapAvailability();
-        QList<QString> unDiscoveredConfigs = accessPointConfigurations.keys();
-        for ( TUint i = 0; i < iaps.Count(); i++ ) {
-            QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(iaps.iIap[i].iIapId));
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(ident);
-            if (priv.data()) {
-                // Configuration is either Discovered or Active 
-                QT_TRYCATCH_LEAVING(changeConfigurationStateAtMinTo(priv, QNetworkConfiguration::Discovered));
-                unDiscoveredConfigs.removeOne(ident);
-            }
-        }
-        foreach (const QString &iface, unDiscoveredConfigs) {
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(iface);
-            if (priv.data()) {
-                // Configuration is Defined
-                QT_TRYCATCH_LEAVING(changeConfigurationStateAtMaxTo(priv, QNetworkConfiguration::Defined));
-            }
-        }
-        // Something has in IAPs, update states to SNAPs
-        updateStatesToSnaps();
-        }
-        break;
-
-    case EConnMonCreateConnection:
-        {
-        // This event is caught to keep connection monitor IDs up-to-date.
-        CConnMonCreateConnection* realEvent;
-        realEvent = (CConnMonCreateConnection*) &aEvent;
-        TUint subConnectionCount = 0;
-        TUint apId;
-        TUint connectionId = realEvent->ConnectionId();
-        TRequestStatus status;
-        iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
-        User::WaitForRequest(status);
-        QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(ident);
-#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);
-        }
-#endif
-        if (priv.data()) {
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-            qDebug() << "QNCM updating connection monitor ID : from, to, whose: " << priv.data()->connectionId << connectionId << priv->name;
-#endif
-            priv.data()->connectionId = connectionId;
-        }
-        }
-        break;
-    default:
-        // For unrecognized events
-        break;
-    }
-}
-
-#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.
-QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> QNetworkConfigurationManagerPrivate::configurationFromEasyWlan(TUint32 apId, TUint connectionId)
-{
-    if (apId == iCmManager.EasyWlanIdL()) {
-        TRequestStatus status;
-        TBuf<50> easyWlanNetworkName;
-        iConnectionMonitor.GetStringAttribute( connectionId, 0, KNetworkName,
-                                               easyWlanNetworkName, status );
-        User::WaitForRequest(status);
-        if (status.Int() == KErrNone) {
-            QString realSSID = QString::fromUtf16(easyWlanNetworkName.Ptr(), easyWlanNetworkName.Length());
-
-            // Browser through all items and check their name for match
-            QNetworkConfiguration item;
-            QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> >::const_iterator i =
-                    accessPointConfigurations.constBegin();
-            while (i != accessPointConfigurations.constEnd()) {
-                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = i.value();
-                if (priv.data()->name == realSSID) {
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-                    qDebug() << "QNCM EasyWlan uses real SSID: " << realSSID;
-#endif
-                    return priv;
-                }
-                ++i;
-            }
-        }
-    }
-    return QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>();
-}
-
-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<QNetworkConfigurationPrivate> 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,
-// because on some Symbian platforms (especially Symbian^3) all state changes are not
-// reported by the RConnectionMonitor, in particular in relation to stop() call,
-// whereas they _are_ reported on RConnection progress notifier used by sessions --> centralize
-// this data here so that other sessions may benefit from it too (not all sessions necessarily have
-// RConnection progress notifiers available but they relay on having e.g. disconnected information from
-// manager). Currently only 'Disconnected' state is of interest because it has proven to be troublesome.
-void QNetworkConfigurationManagerPrivate::configurationStateChangeReport(TUint32 accessPointId, QNetworkSession::State newState)
-{
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-    qDebug() << "QNCM A session reported state change for IAP ID: " << accessPointId << " whose new state is: " << newState;
-#endif
-    switch (newState) {
-    case QNetworkSession::Disconnected:
-        {
-            QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(accessPointId));
-            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = accessPointConfigurations.value(ident);
-            if (priv.data()) {
-                // Configuration is either Defined or Discovered
-                if (changeConfigurationStateAtMaxTo(priv, QNetworkConfiguration::Discovered)) {
-                    updateStatesToSnaps();
-                }
-                emit this->configurationStateChanged(
-                        priv.data()->numericId, priv.data()->connectionId, QNetworkSession::Disconnected);
-            }
-        }
-        break;
-    default:
-        break;
-    }
-}
-
-// Waits for 2..6 seconds.
-void QNetworkConfigurationManagerPrivate::updateConfigurationsAfterRandomTime()
-{
-    iTimeToWait = (qAbs(qrand()) % 68) * 100;
-    if (iTimeToWait < 1000) {
-        iTimeToWait = 1000;
-    }
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-    qDebug("QNCM waiting random time: %d ms", iTimeToWait);
-#endif
-    QTimer::singleShot(iTimeToWait, this, SLOT(delayedConfigurationUpdate()));
-}
-
-QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> QNetworkConfigurationManagerPrivate::dataByConnectionId(TUint aConnectionId)
-{
-    QNetworkConfiguration item;
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> >::const_iterator i =
-            accessPointConfigurations.constBegin();
-    while (i != accessPointConfigurations.constEnd()) {
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = i.value();
-        if (priv.data()->connectionId == aConnectionId) {
-            return priv;
-        }
-        ++i;
-    }
-    return QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>();
-}
-
-AccessPointsAvailabilityScanner::AccessPointsAvailabilityScanner(QNetworkConfigurationManagerPrivate& owner,
-                                                               RConnectionMonitor& connectionMonitor)
-    : CActive(CActive::EPriorityHigh), iOwner(owner), iConnectionMonitor(connectionMonitor)
-{
-    CActiveScheduler::Add(this);  
-}
-
-AccessPointsAvailabilityScanner::~AccessPointsAvailabilityScanner()
-{
-    Cancel();
-}
-
-void AccessPointsAvailabilityScanner::DoCancel()
-{
-    iConnectionMonitor.CancelAsyncRequest(EConnMonGetPckgAttribute);
-}
-
-void AccessPointsAvailabilityScanner::StartScanning()
-{
-    if (iOwner.iFirstUpdate) {
-        // On first update (the mgr is being instantiated) update only those bearers who
-        // don't need time-consuming scans (WLAN).
-        // Note: EBearerIdWCDMA covers also GPRS bearer
-        iConnectionMonitor.GetPckgAttribute(EBearerIdWCDMA, 0, KIapAvailability, iIapBuf, iStatus);
-        User::WaitForRequest(iStatus);
-        if (iStatus.Int() == KErrNone) {
-            iOwner.accessPointScanningReady(true,iIapBuf());
-        }
-    } else {
-        iConnectionMonitor.GetPckgAttribute(EBearerIdAll, 0, KIapAvailability, iIapBuf, iStatus);
-        if (!IsActive()) {
-            SetActive();
-        }
-    }
-}
-
-void AccessPointsAvailabilityScanner::RunL()
-{
-    if (iStatus.Int() != KErrNone) {
-        iIapBuf().iCount = 0;
-        QT_TRYCATCH_LEAVING(iOwner.accessPointScanningReady(false,iIapBuf()));
-    } else {
-        QT_TRYCATCH_LEAVING(iOwner.accessPointScanningReady(true,iIapBuf()));
-    }
-}
-#include "moc_qnetworkconfigmanager_s60_p.cpp"
-QTM_END_NAMESPACE
--- a/qtmobility/src/bearer/qnetworkconfigmanager_s60_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKCONFIGURATIONMANAGERPRIVATE_H
-#define QNETWORKCONFIGURATIONMANAGERPRIVATE_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <qnetworkconfigmanager.h>
-#include <qnetworkconfiguration_s60_p.h>
-#include <qnetworksession.h>
-
-#include <QHash>
-#include <rconnmon.h>
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    #include <cmmanager.h>
-#endif
-
-// Uncomment and compile QtBearer to gain detailed state tracing
-// #define QT_BEARERMGMT_SYMBIAN_DEBUG
-
-#define QT_BEARERMGMT_CONFIGURATION_SNAP_PREFIX "S_"
-#define QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX  "I_"
-
-class CCommsDatabase;
-class QEventLoop;
-
-QT_BEGIN_NAMESPACE
-class QTimer;
-QT_END_NAMESPACE
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkSessionPrivate;
-class AccessPointsAvailabilityScanner;
-
-class QNetworkConfigurationManagerPrivate : public QObject, public CActive, public MConnectionMonitorObserver
-{
-    Q_OBJECT
-
-public:
-    QNetworkConfigurationManagerPrivate();
-    virtual ~QNetworkConfigurationManagerPrivate(); 
-
-    QNetworkConfiguration defaultConfiguration();
-    void performAsyncConfigurationUpdate();
-
-Q_SIGNALS:
-    void configurationAdded(const QNetworkConfiguration& config);
-    void configurationRemoved(const QNetworkConfiguration& config);
-    void configurationUpdateComplete();
-    void configurationChanged(const QNetworkConfiguration& config);
-    void onlineStateChanged(bool isOnline);
-    
-    void configurationStateChanged(TUint32 accessPointId, TUint32 connMonId,
-                                   QNetworkSession::State newState);
-    
-public Q_SLOTS:
-    void updateConfigurations();
-    void delayedConfigurationUpdate();
-
-private:
-    void registerPlatformCapabilities();
-    void updateStatesToSnaps();
-    bool changeConfigurationStateTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData,
-                                    QNetworkConfiguration::StateFlags newState);
-    bool changeConfigurationStateAtMinTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData,
-                                         QNetworkConfiguration::StateFlags newState);
-    bool changeConfigurationStateAtMaxTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData,
-                                          QNetworkConfiguration::StateFlags newState);
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    void updateMobileBearerToConfigs(TConnMonBearerInfo bearerInfo);
-    QNetworkConfigurationPrivate* configFromConnectionMethodL(RCmConnectionMethod& connectionMethod);
-#else
-    bool readNetworkConfigurationValuesFromCommsDb(
-            TUint32 aApId, QNetworkConfigurationPrivate* apNetworkConfiguration);
-    void readNetworkConfigurationValuesFromCommsDbL(
-            TUint32 aApId, QNetworkConfigurationPrivate* apNetworkConfiguration);
-#endif    
-    
-    void updateConfigurationsL();
-    void updateActiveAccessPoints();
-    void updateAvailableAccessPoints();
-    void accessPointScanningReady(TBool scanSuccessful, TConnMonIapInfo iapInfo);
-    void startCommsDatabaseNotifications();
-    void stopCommsDatabaseNotifications();
-    void updateConfigurationsAfterRandomTime();
-
-    QNetworkConfiguration defaultConfigurationL();
-    TBool GetS60PlatformVersion(TUint& aMajor, TUint& aMinor) const;
-    void startMonitoringIAPData(TUint32 aIapId);
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> dataByConnectionId(TUint aConnectionId);
-
-protected:
-    // From CActive
-    void RunL();
-    void DoCancel();
-    
-private:
-    // MConnectionMonitorObserver
-    void EventL(const CConnMonEventBase& aEvent);
-    // For QNetworkSessionPrivate to indicate about state changes
-    void configurationStateChangeReport(TUint32 accessPointId,
-                                   QNetworkSession::State newState);
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> configurationFromEasyWlan(TUint32 apId, TUint connectionId);
-    bool easyWlanTrueIapId(TUint32& trueIapId);
-#endif
-
-public: // Data
-    //this table contains an up to date list of all configs at any time.
-    //it must be updated if configurations change, are added/removed or
-    //the members of ServiceNetworks change
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > accessPointConfigurations;
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > snapConfigurations;
-    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > userChoiceConfigurations;
-    QNetworkConfigurationManager::Capabilities capFlags;
-    
-private: // Data
-    bool               iFirstUpdate; 
-    CCommsDatabase*    ipCommsDB;
-    RConnectionMonitor iConnectionMonitor;
-
-    TBool              iWaitingCommsDatabaseNotifications;
-    TBool              iOnline;
-    TBool              iInitOk;
-    TBool              iUpdateGoingOn;
-    TBool              iUpdatePending;
-    TUint              iTimeToWait;
-
-    AccessPointsAvailabilityScanner* ipAccessPointsAvailabilityScanner;
-    
-    friend class QNetworkSessionPrivate;
-    friend class AccessPointsAvailabilityScanner;
-
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    RCmManager iCmManager;
-#endif
-};
-
-class AccessPointsAvailabilityScanner : public CActive
-{
-public:
-    AccessPointsAvailabilityScanner(QNetworkConfigurationManagerPrivate& owner,
-                                   RConnectionMonitor& connectionMonitor); 
-    ~AccessPointsAvailabilityScanner();
-
-    void StartScanning();
-    
-protected: // From CActive
-    void RunL();
-    void DoCancel();
-
-private: // Data
-    QNetworkConfigurationManagerPrivate& iOwner;
-    RConnectionMonitor& iConnectionMonitor;
-    TConnMonIapInfoBuf iIapBuf;
-};
-
-QTM_END_NAMESPACE
-
-#endif //QNETWORKCONFIGURATIONMANAGERPRIVATE_H
--- a/qtmobility/src/bearer/qnetworkconfiguration.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,401 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnetworkconfiguration.h"
-
-#ifdef Q_OS_SYMBIAN
-#include "qnetworkconfiguration_s60_p.h"
-#elif defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-#include "qnetworkconfiguration_maemo_p.h"
-#else
-#include "qnetworkconfiguration_p.h"
-#endif
-
-QTM_BEGIN_NAMESPACE
-
-/*!
-    \class QNetworkConfiguration
-
-    \brief The QNetworkConfiguration class provides an abstraction of one or more access point configurations.
-
-    \inmodule QtNetwork
-    \ingroup bearer
-
-    QNetworkConfiguration encapsulates a single access point or service network.
-    In most cases a single access point configuration can be mapped to one network
-    interface. However a single network interface may not always map to only one
-    access point configuration. Multiple configurations for the same
-    network device may enable multiple access points. An example
-    device that could exhibit such a configuration might be a
-    Smartphone which allows the user to manage multiple WLAN
-    configurations while the device itself has only one WLAN network device.
-
-    The QNetworkConfiguration also supports the concept of service networks.
-    This concept allows the grouping of multiple access point configurations
-    into one entity. Such a group is called service network and can be
-    beneficial in cases whereby a network session to a
-    particular destination network is required (e.g. a company network).
-    When using a service network the user doesn't usually care which one of the
-    connectivity options is chosen (e.g. corporate WLAN or VPN via GPRS)
-    as long as he can reach the company's target server. Depending
-    on the current position and time some of the access points that make
-    up the service network may not even be available. Furthermore
-    automated access point roaming can be enabled which enables the device
-    to change the network interface configuration dynamically while maintaining
-    the applications connection to the target network. It allows adaption
-    to the changing environment and may enable optimization with regards to
-    cost, speed or other network parameters.
-
-    Special configurations of type UserChoice provide a placeholder configuration which is
-    resolved to an actual network configuration by the platform when a
-    \l {QNetworkSession}{session} is \l {QNetworkSession::open()}{opened}. Not all platforms
-    support the concept of a user choice configuration.
-
-    \section1 Configuration states
-
-    The list of available configurations can be obtained via
-    QNetworkConfigurationManager::allConfigurations(). A configuration can have
-    multiple states. The \l Defined configuration state indicates that the configuration
-    is stored on the device. However the configuration is not yet ready to be activated
-    as e.g. a WLAN may not be available at the current time.
-
-    The \l Discovered state implies that the configuration is \l Defined and
-    the outside conditions are such that the configuration can be used immediately
-    to open a new network session. An example of such an outside condition may be
-    that the Ethernet cable is actually connected to the device or that the WLAN
-    with the specified SSID is in range.
-
-    The \l Active state implies that the configuration is \l Discovered. A configuration
-    in this state is currently being used by an application. The underlying network
-    interface has a valid IP configuration and can transfer IP packets between the
-    device and the target network.
-
-    The \l Undefined state indicates that the system has knowledge of possible target
-    networks but cannot actually use that knowledge to connect to it. An example
-    for such a state could be an encrypted WLAN that has been discovered
-    but the user hasn't actually saved a configuration including the required password
-    which would allow the device to connect to it.
-
-    Depending on the type of configuration some states are transient in nature. A GPRS/UMTS
-    connection may almost always be \l Discovered if the GSM/UMTS network is available.
-    However if the GSM/UMTS network looses the connection the associated configuration may change its state
-    from \l Discovered to \l Defined as well. A similar use case might be triggered by
-    WLAN availability. QNetworkConfigurationManager::updateConfigurations() can be used to
-    manually trigger updates of states. Note that some platforms do not require such updates
-    as they implicitly change the state once it has been discovered. If the state of a
-    configuration changes all related QNetworkConfiguration instances change their state automatically.
-
-    \sa QNetworkSession, QNetworkConfigurationManager
-*/
-
-/*!
-    \enum QNetworkConfiguration::Type
-
-    This enum describes the type of configuration.
-
-    \value InternetAccessPoint  The configuration specifies the details for a single access point.
-                                Note that configurations of type InternetAccessPoint may be part
-                                of other QNetworkConfigurations of type ServiceNetwork.
-    \value ServiceNetwork       The configuration is based on a group of QNetworkConfigurations of
-                                type InternetAccessPoint. All group members can reach the same
-                                target network. This type of configuration is a mandatory
-                                requirement for roaming enabled network sessions. On some
-                                platforms this form of configuration may also be called Service
-                                Network Access Point (SNAP).
-    \value UserChoice           The configuration is a placeholder which will be resolved to an
-                                actual configuration by the platform when a session is opened. Depending
-                                on the platform the selection may generate a popup dialog asking the user
-                                for his preferred choice.
-    \value Invalid              The configuration is invalid.
-*/
-
-/*!
-    \enum QNetworkConfiguration::StateFlag
-
-    Specifies the configuration states.
-
-    \value Undefined    This state is used for transient configurations such as newly discovered
-                        WLANs for which the user has not actually created a configuration yet.
-    \value Defined      Defined configurations are known to the system but are not immediately
-                        usable (e.g. a configured WLAN is not within range or the Ethernet cable
-                        is currently not plugged into the machine).
-    \value Discovered   A discovered configuration can be immediately used to create a new
-                        QNetworkSession. An example of a discovered configuration could be a WLAN
-                        which is within in range. If the device moves out of range the discovered
-                        flag is dropped. A second example is a GPRS configuration which generally
-                        remains discovered for as long as the phone has network coverage. A
-                        configuration that has this state is also in state
-                        QNetworkConfiguration::Defined. If the configuration is a service network
-                        this flag is set if at least one of the underlying access points
-                        configurations has the Discovered state.
-    \value Active       The configuration is currently used by an open network session
-                        (see \l QNetworkSession::isOpen()). However this does not mean that the
-                        current process is the entity that created the open session. It merely
-                        indicates that if a new QNetworkSession were to be constructed based on
-                        this configuration \l QNetworkSession::state() would return
-                        \l QNetworkSession::Connected. This state implies the
-                        QNetworkConfiguration::Discovered state.
-*/
-
-/*!
-    \enum QNetworkConfiguration::Purpose
-
-    Specifies the purpose of the configuration.
-
-    \value UnknownPurpose           The configuration doesn't specify any purpose. This is the default value.
-    \value PublicPurpose            The configuration can be used for general purpose internet access.
-    \value PrivatePurpose           The configuration is suitable to access a private network such as an office Intranet.
-    \value ServiceSpecificPurpose   The configuration can be used for operator specific services (e.g.
-                                    receiving MMS messages or content streaming).
-*/
-
-/*!
-    Constructs an invalid configuration object.
-
-    \sa isValid()
-*/
-QNetworkConfiguration::QNetworkConfiguration()
-    : d(0)
-{
-}
-
-/*!
-    Creates a copy of the QNetworkConfiguration object contained in \a other.
-*/
-QNetworkConfiguration::QNetworkConfiguration(const QNetworkConfiguration& other)
-    : d(other.d)
-{
-}
-
-/*!
-    Copies the content of the QNetworkConfiguration object contained in \a other into this one.
-*/
-QNetworkConfiguration& QNetworkConfiguration::operator=(const QNetworkConfiguration& other)
-{
-    d = other.d;
-    return *this;
-}
-
-/*!
-    Frees the resources associated with the QNetworkConfiguration object.
-*/
-QNetworkConfiguration::~QNetworkConfiguration()
-{
-}
-
-/*!
-    Returns true, if this configuration is the same as the \a other
-    configuration given; otherwise returns false.
-*/
-bool QNetworkConfiguration::operator==(const QNetworkConfiguration& other) const
-{
-    if (!d)
-        return !other.d;
-
-    if (!other.d)
-        return false;
-
-    return (d == other.d);
-}
-
-/*!
-    \fn bool QNetworkConfiguration::operator!=(const QNetworkConfiguration& other) const
-
-    Returns true if this configuration is not the same as the \a other
-    configuration given; otherwise returns false.
-*/
-
-/*!
-    Returns the user visible name of this configuration.
-
-    The name may either be the name of the underlying access point or the
-    name for service network that this configuration represents.
-*/
-QString QNetworkConfiguration::name() const
-{
-    return d ? d->name : QString();
-}
-
-/*!
-    Returns the unique and platform specific identifier for this network configuration;
-    otherwise an empty string.
-*/
-QString QNetworkConfiguration::identifier() const
-{
-    return d ? d->id : QString();
-}
-
-/*!
-    Returns the type of the configuration.
-
-    A configuration can represent a single access point configuration or
-    a set of access point configurations. Such a set is called service network.
-    A configuration that is based on a service network can potentially support
-    roaming of network sessions.
-*/
-QNetworkConfiguration::Type QNetworkConfiguration::type() const
-{
-    return d ? d->type : QNetworkConfiguration::Invalid;
-}
-
-/*!
-    Returns true if this QNetworkConfiguration object is valid.
-    A configuration may become invalid if the user deletes the configuration or
-    the configuration was default-constructed.
-
-    The addition and removal of configurations can be monitored via the
-    QNetworkConfigurationManager.
-
-    \sa QNetworkConfigurationManager
-*/
-bool QNetworkConfiguration::isValid() const
-{
-    return d ? d->isValid : false;
-}
-
-/*!
-    Returns the current state of the configuration.
-*/
-QNetworkConfiguration::StateFlags QNetworkConfiguration::state() const
-{
-    return d ? d->state : QNetworkConfiguration::Undefined;
-}
-
-/*!
-    Returns the purpose of this configuration.
-
-    The purpose field may be used to programmatically determine the
-    purpose of a configuration. Such information is usually part of the
-    access point or service network meta data.
-*/
-QNetworkConfiguration::Purpose QNetworkConfiguration::purpose() const
-{
-    return d ? d->purpose : QNetworkConfiguration::UnknownPurpose;
-}
-
-/*!
-    Returns true if this configuration supports roaming; otherwise false.
-*/
-bool QNetworkConfiguration::isRoamingAvailable() const
-{
-    return d ? d->roamingSupported : false;
-}
-
-/*!
-    Returns all sub configurations of this network configuration.
-    Only network configurations of type \l ServiceNetwork can have children. Otherwise
-    this function returns an empty list.
-*/
-QList<QNetworkConfiguration> QNetworkConfiguration::children() const
-{
-    QList<QNetworkConfiguration> results;
-    if (type() != QNetworkConfiguration::ServiceNetwork || !isValid() )
-        return results;
-
-    QMutableListIterator<QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > iter(d->serviceNetworkMembers);
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> p(0);
-    while(iter.hasNext()) {
-        p = iter.next();
-        //if we have an invalid member get rid of it -> was deleted earlier on
-        if (!p->isValid)
-            iter.remove();
-
-        QNetworkConfiguration item;
-        item.d = p;
-        results << item;
-    }
-
-    return results;
-}
-
-/*!
-    Returns the type of bearer. The string is not translated and
-    therefore can not be shown to the user. The subsequent table presents the currently known
-    bearer types:
-
-    \table
-        \header 
-            \o Value
-            \o Description
-        \row
-            \o Unknown
-            \o The session is based on an unknown or unspecified bearer type.
-        \row
-            \o Ethernet
-            \o The session is based on Ethernet.
-        \row
-            \o WLAN
-            \o The session is based on Wireless LAN.
-        \row
-            \o 2G
-            \o The session uses CSD, GPRS, HSCSD, EDGE or cdmaOne.
-        \row 
-            \o CDMA2000
-            \o The session uses CDMA.
-        \row
-            \o WCDMA
-            \o The session uses W-CDMA/UMTS.
-        \row
-            \o HSPA
-            \o The session uses High Speed Packet Access.
-        \row
-            \o Bluetooth
-            \o The session uses Bluetooth.
-        \row
-            \o WiMAX
-            \o The session uses WiMAX.
-    \endtable
-
-    This function returns an empty string if this is an invalid configuration,
-    a network configuration of type \l QNetworkConfiguration::ServiceNetwork or
-    \l QNetworkConfiguration::UserChoice.
-*/
-QString QNetworkConfiguration::bearerName() const
-{
-    if (!isValid())
-        return QString();
-
-    return d->bearerName();
-}
-
-
-QTM_END_NAMESPACE
-
--- a/qtmobility/src/bearer/qnetworkconfiguration.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKCONFIGURATION_H
-#define QNETWORKCONFIGURATION_H
-
-#include "qmobilityglobal.h"
-
-#include <QtCore/qshareddata.h>
-#include <QtCore/qstring.h>
-#include <QtCore/qlist.h>
-
-QT_BEGIN_HEADER
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationPrivate;
-class Q_BEARER_EXPORT QNetworkConfiguration
-{
-public:
-    QNetworkConfiguration();
-    QNetworkConfiguration(const QNetworkConfiguration& other);
-    QNetworkConfiguration &operator=(const QNetworkConfiguration& other);
-    ~QNetworkConfiguration();
-
-    bool operator==(const QNetworkConfiguration& cp) const;
-    inline bool operator!=(const QNetworkConfiguration& cp) const
-    { return !operator==(cp); }
-
-    enum Type {
-        InternetAccessPoint = 0,
-        ServiceNetwork,
-        UserChoice,
-        Invalid
-    };
-
-    enum Purpose {
-        UnknownPurpose = 0,
-        PublicPurpose,
-        PrivatePurpose,
-        ServiceSpecificPurpose
-    };
-
-    enum StateFlag {
-        Undefined        = 0x0000001,
-        Defined          = 0x0000002,
-        Discovered       = 0x0000006,
-        Active           = 0x000000e
-    };
-
-    Q_DECLARE_FLAGS(StateFlags, StateFlag)
-
-    StateFlags state() const;
-    Type type() const;
-    Purpose purpose() const;
-    QString bearerName() const;
-    QString identifier() const;
-    bool isRoamingAvailable() const;
-    QList<QNetworkConfiguration> children() const;
-
-    QString name() const;
-    bool isValid() const;
-
-private:
-    friend class QNetworkConfigurationPrivate;
-    friend class QNetworkConfigurationManager;
-    friend class QNetworkConfigurationManagerPrivate;
-    friend class QNetworkSessionPrivate;
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> d;
-};
-
-QTM_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif //QNETWORKCONFIGURATION_H
--- a/qtmobility/src/bearer/qnetworkconfiguration_maemo_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKCONFIGURATIONPRIVATE_H
-#define QNETWORKCONFIGURATIONPRIVATE_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qshareddata.h>
-#include <QNetworkInterface>
-
-#include "qnetworkconfiguration.h"
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationManagerPrivate;
-
-class QNetworkConfigurationPrivate : public QSharedData
-{
-public:
-    QNetworkConfigurationPrivate ()
-	    : isValid(false), type(QNetworkConfiguration::Invalid), 
-	    roamingSupported(false), purpose(QNetworkConfiguration::UnknownPurpose),
-	    network_attrs(0), service_attrs(0), manager(0)
-    {
-    }
-
-    ~QNetworkConfigurationPrivate()
-    {
-        //release pointers to member configurations
-        serviceNetworkMembers.clear(); 
-    }
-
-    QString name;
-    bool isValid;
-    QString id;
-    QNetworkConfiguration::StateFlags state;
-    QNetworkConfiguration::Type type;
-    bool roamingSupported;
-    QNetworkConfiguration::Purpose purpose;
-
-    QList<QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > serviceNetworkMembers;
-    QNetworkInterface serviceInterface;
-
-    /* In Maemo the id field (defined above) is the IAP id (which typically is UUID) */
-    QByteArray network_id; /* typically WLAN ssid or similar */
-    QString iap_type; /* is this one WLAN or GPRS */
-    QString bearerName() const
-    {
-        if (iap_type == "WLAN_INFRA" ||
-                iap_type == "WLAN_ADHOC")
-            return QString("WLAN");
-        else if (iap_type == "GPRS")
-            return QString("HSPA");
-
-        //return whatever it is 
-        //this may have to be split up later on
-        return iap_type;
-    }
-
-    uint32_t network_attrs; /* network attributes for this IAP, this is the value returned by icd and passed to it when connecting */
-
-    QString service_type;
-    QString service_id;
-    uint32_t service_attrs;
-
-    QNetworkConfigurationManagerPrivate *manager;
-
-private:
-
-    // disallow detaching
-    QNetworkConfigurationPrivate &operator=(const QNetworkConfigurationPrivate &other);
-    QNetworkConfigurationPrivate(const QNetworkConfigurationPrivate &other);
-};
-
-QTM_END_NAMESPACE
-
-#endif //QNETWORKCONFIGURATIONPRIVATE_H
--- a/qtmobility/src/bearer/qnetworkconfiguration_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKCONFIGURATIONPRIVATE_H
-#define QNETWORKCONFIGURATIONPRIVATE_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qnetworkconfiguration.h"
-#include <QtCore/qshareddata.h>
-#include <QNetworkInterface>
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationPrivate : public QSharedData
-{
-public:
-    QNetworkConfigurationPrivate ()
-        : isValid(false), type(QNetworkConfiguration::Invalid), 
-          roamingSupported(false), purpose(QNetworkConfiguration::UnknownPurpose)
-    {
-#ifdef BEARER_ENGINE
-        internet = false;
-#endif
-    }
-
-    ~QNetworkConfigurationPrivate()
-    {
-        //release pointers to member configurations
-        serviceNetworkMembers.clear(); 
-    }
-
-    QString name;
-    QString bearer;
-    inline QString bearerName() const
-    {
-        return bearer;
-    }
-
-    bool isValid;
-    QString id;
-    QNetworkConfiguration::StateFlags state;
-    QNetworkConfiguration::Type type;
-    bool roamingSupported;
-    QNetworkConfiguration::Purpose purpose;
-
-#ifdef BEARER_ENGINE
-    bool internet;
-#endif
-
-    QList<QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > serviceNetworkMembers;
-    QNetworkInterface serviceInterface;
-
-private:
-
-    // disallow detaching
-    QNetworkConfigurationPrivate &operator=(const QNetworkConfigurationPrivate &other);
-    QNetworkConfigurationPrivate(const QNetworkConfigurationPrivate &other);
-};
-
-QTM_END_NAMESPACE
-
-#endif //QNETWORKCONFIGURATIONPRIVATE_H
--- a/qtmobility/src/bearer/qnetworkconfiguration_s60_p.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnetworkconfiguration_s60_p.h"
-
-QTM_BEGIN_NAMESPACE
-
-QNetworkConfigurationPrivate::QNetworkConfigurationPrivate()
-    : isValid(false), type(QNetworkConfiguration::Invalid),
-      roamingSupported(false), purpose(QNetworkConfiguration::UnknownPurpose), 
-      bearer(QNetworkConfigurationPrivate::BearerUnknown), numericId(0),
-      connectionId(0), manager(0)
-{
-}
-
-QNetworkConfigurationPrivate::~QNetworkConfigurationPrivate()
-{
-    //release pointers to member configurations
-    serviceNetworkMembers.clear(); 
-}
-
-QString QNetworkConfigurationPrivate::bearerName() const
-{
-    switch (bearer) {
-        case QNetworkConfigurationPrivate::BearerEthernet:  return QLatin1String("Ethernet");
-        case QNetworkConfigurationPrivate::BearerWLAN:      return QLatin1String("WLAN");
-        case QNetworkConfigurationPrivate::Bearer2G:        return QLatin1String("2G");
-        case QNetworkConfigurationPrivate::BearerCDMA2000:  return QLatin1String("CDMA2000");
-        case QNetworkConfigurationPrivate::BearerWCDMA:     return QLatin1String("WCDMA");
-        case QNetworkConfigurationPrivate::BearerHSPA:      return QLatin1String("HSPA");
-        case QNetworkConfigurationPrivate::BearerBluetooth: return QLatin1String("Bluetooth");
-        case QNetworkConfigurationPrivate::BearerWiMAX:     return QLatin1String("WiMAX");
-        default: return QString();
-    }
-}
-
-
-QTM_END_NAMESPACE
--- a/qtmobility/src/bearer/qnetworkconfiguration_s60_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKCONFIGURATIONPRIVATE_H
-#define QNETWORKCONFIGURATIONPRIVATE_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <qnetworkconfiguration.h>
-#include <QtCore/qshareddata.h>
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationPrivate : public QSharedData
-{
-public:
-    enum Bearer {
-        BearerEthernet,
-        BearerWLAN,
-        Bearer2G,
-        BearerCDMA2000,
-        BearerWCDMA,
-        BearerHSPA,
-        BearerBluetooth,
-        BearerWiMAX,
-        BearerUnknown = -1
-    };    
-
-    QNetworkConfigurationPrivate();
-    ~QNetworkConfigurationPrivate();
-
-    QString name;
-    bool isValid;
-    QString id;
-    QNetworkConfiguration::StateFlags state;
-    QNetworkConfiguration::Type type;
-    bool roamingSupported;
-    QNetworkConfiguration::Purpose purpose;
-
-    QList<QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > serviceNetworkMembers;
-
-    QNetworkConfigurationPrivate::Bearer bearer;
-    QString bearerName() const;
-    // So called IAP id from the platform. Remains constant as long as the
-    // platform is aware of the configuration ie. it is stored in the databases
-    // --> does not depend on whether connections are currently open or not.
-    // In practice is the same for the lifetime of the QNetworkConfiguration.
-    TUint32 numericId;
-    // So called connection id, or connection monitor ID. A dynamic ID assigned
-    // by RConnectionMonitor whenever a new connection is opened. ConnectionID and
-    // numericId/IAP id have 1-to-1 mapping during the lifetime of the connection at
-    // connection monitor. Notably however it changes whenever a new connection to
-    // a given IAP is created. In a sense it is constant during the time the
-    // configuration remains between states Discovered..Active..Discovered, do not
-    // however relay on this.
-    TUint connectionId;
-    
-    TAny* manager;
- 
-    QString mappingName;
- 
-    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> serviceNetworkPtr; 
-
-private:
-    // disallow detaching
-    QNetworkConfigurationPrivate &operator=(const QNetworkConfigurationPrivate &other);
-    QNetworkConfigurationPrivate(const QNetworkConfigurationPrivate &other);
-};
-
-QTM_END_NAMESPACE
-
-#endif //QNETWORKCONFIGURATIONPRIVATE_H
-
--- a/qtmobility/src/bearer/qnetworkmanagerservice_p.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,993 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QObject>
-#include <QList>
-#include <QtDBus/QtDBus>
-#include <QtDBus/QDBusConnection>
-#include <QtDBus/QDBusError>
-#include <QtDBus/QDBusInterface>
-#include <QtDBus/QDBusMessage>
-#include <QtDBus/QDBusReply>
-#include <QtDBus/QDBusPendingCallWatcher>
-#include <QtDBus/QDBusObjectPath>
-#include <QtDBus/QDBusPendingCall>
-
-#include "qnetworkmanagerservice_p.h"
-#include "qnmdbushelper_p.h"
-
-QTM_BEGIN_NAMESPACE
-
-static QDBusConnection dbusConnection = QDBusConnection::systemBus();
-
-class QNetworkManagerInterfacePrivate
-{
-public:
-    QDBusInterface *connectionInterface;
-    bool valid;
-};
-
-QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent)
-        : QObject(parent)
-{
-    d = new QNetworkManagerInterfacePrivate();
-    d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
-                                                QLatin1String(NM_DBUS_PATH),
-                                                QLatin1String(NM_DBUS_INTERFACE),
-                                                dbusConnection);
-    if (!d->connectionInterface->isValid()) {
-        qWarning() << "Could not find NetworkManager";
-        d->valid = false;
-        return;
-    }
-    d->valid = true;
-    nmDBusHelper = new QNmDBusHelper(this);
-    connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap<QString,QVariant>)),
-                    this,SIGNAL(propertiesChanged( const QString &, QMap<QString,QVariant>)));
-    connect(nmDBusHelper,SIGNAL(pathForStateChanged(const QString &, quint32)),
-            this, SIGNAL(stateChanged(const QString&, quint32)));
-
-}
-
-QNetworkManagerInterface::~QNetworkManagerInterface()
-{
-    delete d->connectionInterface;
-    delete d;
-}
-
-bool QNetworkManagerInterface::isValid()
-{
-    return d->valid;
-}
-
-bool QNetworkManagerInterface::setConnections()
-{
-    if(!isValid() )
-        return false;
-    bool allOk = false;
-    if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
-                                  QLatin1String(NM_DBUS_PATH),
-                                  QLatin1String(NM_DBUS_INTERFACE),
-                                  QLatin1String("PropertiesChanged"),
-                                nmDBusHelper,SLOT(slotPropertiesChanged( QMap<QString,QVariant>)))) {
-        allOk = true;
-    }
-    if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
-                                  QLatin1String(NM_DBUS_PATH),
-                                  QLatin1String(NM_DBUS_INTERFACE),
-                                  QLatin1String("DeviceAdded"),
-                                this,SIGNAL(deviceAdded(QDBusObjectPath)))) {
-        allOk = true;
-    }
-    if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
-                                  QLatin1String(NM_DBUS_PATH),
-                                  QLatin1String(NM_DBUS_INTERFACE),
-                                  QLatin1String("DeviceRemoved"),
-                                  this,SIGNAL(deviceRemoved(QDBusObjectPath)))) {
-        allOk = true;
-    }
-
-    return allOk;
-}
-
-QDBusInterface *QNetworkManagerInterface::connectionInterface()  const
-{
-    return d->connectionInterface;
-}
-
-QList <QDBusObjectPath> QNetworkManagerInterface::getDevices() const
-{
-    QDBusReply<QList<QDBusObjectPath> > reply =  d->connectionInterface->call(QLatin1String("GetDevices"));
-    return reply.value();
-}
-
-void QNetworkManagerInterface::activateConnection( const QString &serviceName,
-                                                  QDBusObjectPath connectionPath,
-                                                  QDBusObjectPath devicePath,
-                                                  QDBusObjectPath specificObject)
-{
-    QDBusPendingCall pendingCall = d->connectionInterface->asyncCall(QLatin1String("ActivateConnection"),
-                                                                    QVariant(serviceName),
-                                                                    QVariant::fromValue(connectionPath),
-                                                                    QVariant::fromValue(devicePath),
-                                                                    QVariant::fromValue(specificObject));
-
-   QDBusPendingCallWatcher *callWatcher = new QDBusPendingCallWatcher(pendingCall, this);
-   connect(callWatcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
-                    this, SIGNAL(activationFinished(QDBusPendingCallWatcher*)));
-}
-
-void QNetworkManagerInterface::deactivateConnection(QDBusObjectPath connectionPath)  const
-{
-    d->connectionInterface->call(QLatin1String("DeactivateConnection"), QVariant::fromValue(connectionPath));
-}
-
-bool QNetworkManagerInterface::wirelessEnabled()  const
-{
-    return d->connectionInterface->property("WirelessEnabled").toBool();
-}
-
-bool QNetworkManagerInterface::wirelessHardwareEnabled()  const
-{
-    return d->connectionInterface->property("WirelessHardwareEnabled").toBool();
-}
-
-QList <QDBusObjectPath> QNetworkManagerInterface::activeConnections() const
-{
-    QVariant prop = d->connectionInterface->property("ActiveConnections");
-    return prop.value<QList<QDBusObjectPath> >();
-}
-
-quint32 QNetworkManagerInterface::state()
-{
-    return d->connectionInterface->property("State").toUInt();
-}
-
-class QNetworkManagerInterfaceAccessPointPrivate
-{
-public:
-    QDBusInterface *connectionInterface;
-    QString path;
-    bool valid;
-};
-
-QNetworkManagerInterfaceAccessPoint::QNetworkManagerInterfaceAccessPoint(const QString &dbusPathName, QObject *parent)
-        : QObject(parent)
-{
-    d = new QNetworkManagerInterfaceAccessPointPrivate();
-    d->path = dbusPathName;
-    d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
-                                                d->path,
-                                                QLatin1String(NM_DBUS_INTERFACE_ACCESS_POINT),
-                                                dbusConnection);
-    if (!d->connectionInterface->isValid()) {
-        d->valid = false;
-        qWarning() << "Could not find InterfaceAccessPoint";
-        return;
-    }
-    d->valid = true;
-
-}
-
-QNetworkManagerInterfaceAccessPoint::~QNetworkManagerInterfaceAccessPoint()
-{
-    delete d->connectionInterface;
-    delete d;
-}
-
-bool QNetworkManagerInterfaceAccessPoint::isValid()
-{
-    return d->valid;
-}
-
-bool QNetworkManagerInterfaceAccessPoint::setConnections()
-{
-    if(!isValid() )
-        return false;
-
-    bool allOk = false;
-    nmDBusHelper = new QNmDBusHelper(this);
-    connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap<QString,QVariant>)),
-            this,SIGNAL(propertiesChanged( const QString &, QMap<QString,QVariant>)));
-
-    if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
-                              d->path,
-                              QLatin1String(NM_DBUS_INTERFACE_ACCESS_POINT),
-                              QLatin1String("PropertiesChanged"),
-                              nmDBusHelper,SLOT(slotPropertiesChanged( QMap<QString,QVariant>))) ) {
-        allOk = true;
-
-    }
-    return allOk;
-}
-
-QDBusInterface *QNetworkManagerInterfaceAccessPoint::connectionInterface() const
-{
-    return d->connectionInterface;
-}
-
-quint32 QNetworkManagerInterfaceAccessPoint::flags() const
-{
-    return d->connectionInterface->property("Flags").toUInt();
-}
-
-quint32 QNetworkManagerInterfaceAccessPoint::wpaFlags() const
-{
-    return d->connectionInterface->property("WpaFlags").toUInt();
-}
-
-quint32 QNetworkManagerInterfaceAccessPoint::rsnFlags() const
-{
-    return d->connectionInterface->property("RsnFlags").toUInt();
-}
-
-QString QNetworkManagerInterfaceAccessPoint::ssid() const
-{
-    return d->connectionInterface->property("Ssid").toString();
-}
-
-quint32 QNetworkManagerInterfaceAccessPoint::frequency() const
-{
-    return d->connectionInterface->property("Frequency").toUInt();
-}
-
-QString QNetworkManagerInterfaceAccessPoint::hwAddress() const
-{
-    return d->connectionInterface->property("HwAddress").toString();
-}
-
-quint32 QNetworkManagerInterfaceAccessPoint::mode() const
-{
-    return d->connectionInterface->property("Mode").toUInt();
-}
-
-quint32 QNetworkManagerInterfaceAccessPoint::maxBitrate() const
-{
-    return d->connectionInterface->property("MaxBitrate").toUInt();
-}
-
-quint32 QNetworkManagerInterfaceAccessPoint::strength() const
-{
-    return d->connectionInterface->property("Strength").toUInt();
-}
-
-class QNetworkManagerInterfaceDevicePrivate
-{
-public:
-    QDBusInterface *connectionInterface;
-    QString path;
-    bool valid;
-};
-
-QNetworkManagerInterfaceDevice::QNetworkManagerInterfaceDevice(const QString &deviceObjectPath, QObject *parent)
-        : QObject(parent)
-{
-    d = new QNetworkManagerInterfaceDevicePrivate();
-    d->path = deviceObjectPath;
-    d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
-                                                d->path,
-                                                QLatin1String(NM_DBUS_INTERFACE_DEVICE),
-                                                dbusConnection);
-    if (!d->connectionInterface->isValid()) {
-        d->valid = false;
-        qWarning() << "Could not find NetworkManager";
-        return;
-    }
-    d->valid = true;
-}
-
-QNetworkManagerInterfaceDevice::~QNetworkManagerInterfaceDevice()
-{
-    delete d->connectionInterface;
-    delete d;
-}
-
-bool QNetworkManagerInterfaceDevice::isValid()
-{
-    return d->valid;
-}
-
-bool QNetworkManagerInterfaceDevice::setConnections()
-{
-    if(!isValid() )
-        return false;
-
-    bool allOk = false;
-    nmDBusHelper = new QNmDBusHelper(this);
-    connect(nmDBusHelper,SIGNAL(pathForStateChanged(const QString &, quint32)),
-            this, SIGNAL(stateChanged(const QString&, quint32)));
-    if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
-                              d->path,
-                              QLatin1String(NM_DBUS_INTERFACE_DEVICE),
-                              QLatin1String("StateChanged"),
-                              nmDBusHelper,SLOT(deviceStateChanged(quint32)))) {
-        allOk = true;
-    }
-    return allOk;
-}
-
-QDBusInterface *QNetworkManagerInterfaceDevice::connectionInterface() const
-{
-    return d->connectionInterface;
-}
-
-QString QNetworkManagerInterfaceDevice::udi() const
-{
-    return d->connectionInterface->property("Udi").toString();
-}
-
-QNetworkInterface QNetworkManagerInterfaceDevice::networkInterface() const
-{
-    return QNetworkInterface::interfaceFromName(d->connectionInterface->property("Interface").toString());
-}
-
-quint32 QNetworkManagerInterfaceDevice::ip4Address() const
-{
-    return d->connectionInterface->property("Ip4Address").toUInt();
-}
-
-quint32 QNetworkManagerInterfaceDevice::state() const
-{
-    return d->connectionInterface->property("State").toUInt();
-}
-
-quint32 QNetworkManagerInterfaceDevice::deviceType() const
-{
-    return d->connectionInterface->property("DeviceType").toUInt();
-}
-
-QDBusObjectPath QNetworkManagerInterfaceDevice::ip4config() const
-{
-    QVariant prop = d->connectionInterface->property("Ip4Config");
-    return prop.value<QDBusObjectPath>();
-}
-
-class QNetworkManagerInterfaceDeviceWiredPrivate
-{
-public:
-    QDBusInterface *connectionInterface;
-    QString path;
-    bool valid;
-};
-
-QNetworkManagerInterfaceDeviceWired::QNetworkManagerInterfaceDeviceWired(const QString &ifaceDevicePath, QObject *parent)
-{
-    d = new QNetworkManagerInterfaceDeviceWiredPrivate();
-    d->path = ifaceDevicePath;
-    d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
-                                                d->path,
-                                                QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRED),
-                                                dbusConnection, parent);
-    if (!d->connectionInterface->isValid()) {
-        d->valid = false;
-        qWarning() << "Could not find InterfaceDeviceWired";
-        return;
-    }
-    d->valid = true;
-}
-
-QNetworkManagerInterfaceDeviceWired::~QNetworkManagerInterfaceDeviceWired()
-{
-    delete d->connectionInterface;
-    delete d;
-}
-
-bool QNetworkManagerInterfaceDeviceWired::isValid()
-{
-
-    return d->valid;
-}
-
-bool QNetworkManagerInterfaceDeviceWired::setConnections()
-{
-    if(!isValid() )
-        return false;
-
-    bool allOk = false;
-
-    nmDBusHelper = new QNmDBusHelper(this);
-    connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap<QString,QVariant>)),
-            this,SIGNAL(propertiesChanged( const QString &, QMap<QString,QVariant>)));
-    if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
-                              d->path,
-                              QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRED),
-                              QLatin1String("PropertiesChanged"),
-                              nmDBusHelper,SLOT(slotPropertiesChanged( QMap<QString,QVariant>))) )  {
-        allOk = true;
-    }
-    return allOk;
-}
-
-QDBusInterface *QNetworkManagerInterfaceDeviceWired::connectionInterface() const
-{
-    return d->connectionInterface;
-}
-
-QString QNetworkManagerInterfaceDeviceWired::hwAddress() const
-{
-    return d->connectionInterface->property("HwAddress").toString();
-}
-
-quint32 QNetworkManagerInterfaceDeviceWired::speed() const
-{
-    return d->connectionInterface->property("Speed").toUInt();
-}
-
-bool QNetworkManagerInterfaceDeviceWired::carrier() const
-{
-    return d->connectionInterface->property("Carrier").toBool();
-}
-
-class QNetworkManagerInterfaceDeviceWirelessPrivate
-{
-public:
-    QDBusInterface *connectionInterface;
-    QString path;
-    bool valid;
-};
-
-QNetworkManagerInterfaceDeviceWireless::QNetworkManagerInterfaceDeviceWireless(const QString &ifaceDevicePath, QObject *parent)
-{
-    d = new QNetworkManagerInterfaceDeviceWirelessPrivate();
-    d->path = ifaceDevicePath;
-    d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
-                                                d->path,
-                                                QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS),
-                                                dbusConnection, parent);
-    if (!d->connectionInterface->isValid()) {
-        d->valid = false;
-        qWarning() << "Could not find InterfaceDeviceWireless";
-        return;
-    }
-    d->valid = true;
-}
-
-QNetworkManagerInterfaceDeviceWireless::~QNetworkManagerInterfaceDeviceWireless()
-{
-    delete d->connectionInterface;
-    delete d;
-}
-
-bool QNetworkManagerInterfaceDeviceWireless::isValid()
-{
-    return d->valid;
-}
-
-bool QNetworkManagerInterfaceDeviceWireless::setConnections()
-{
-    if(!isValid() )
-        return false;
-
-    bool allOk = false;
-    nmDBusHelper = new QNmDBusHelper(this);
-    connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap<QString,QVariant>)),
-            this,SIGNAL(propertiesChanged( const QString &, QMap<QString,QVariant>)));
-
-    connect(nmDBusHelper, SIGNAL(pathForAccessPointAdded(const QString &,QDBusObjectPath)),
-            this,SIGNAL(accessPointAdded(const QString &,QDBusObjectPath)));
-
-    connect(nmDBusHelper, SIGNAL(pathForAccessPointRemoved(const QString &,QDBusObjectPath)),
-            this,SIGNAL(accessPointRemoved(const QString &,QDBusObjectPath)));
-
-    if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
-                              d->path,
-                              QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS),
-                              QLatin1String("AccessPointAdded"),
-                              nmDBusHelper, SLOT(slotAccessPointAdded( QDBusObjectPath )))) {
-        allOk = true;
-    }
-
-
-    if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
-                              d->path,
-                              QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS),
-                              QLatin1String("AccessPointRemoved"),
-                              nmDBusHelper, SLOT(slotAccessPointRemoved( QDBusObjectPath )))) {
-        allOk = true;
-    }
-
-
-    if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
-                              d->path,
-                              QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS),
-                              QLatin1String("PropertiesChanged"),
-                              nmDBusHelper,SLOT(slotPropertiesChanged( QMap<QString,QVariant>)))) {
-        allOk = true;
-    }
-
-    return allOk;
-}
-
-QDBusInterface *QNetworkManagerInterfaceDeviceWireless::connectionInterface() const
-{
-    return d->connectionInterface;
-}
-
-QList <QDBusObjectPath> QNetworkManagerInterfaceDeviceWireless::getAccessPoints()
-{
-    QDBusReply<QList<QDBusObjectPath> > reply = d->connectionInterface->call(QLatin1String("GetAccessPoints"));
-    return reply.value();
-}
-
-QString QNetworkManagerInterfaceDeviceWireless::hwAddress() const
-{
-    return d->connectionInterface->property("HwAddress").toString();
-}
-
-quint32 QNetworkManagerInterfaceDeviceWireless::mode() const
-{
-    return d->connectionInterface->property("Mode").toUInt();
-}
-
-quint32 QNetworkManagerInterfaceDeviceWireless::bitrate() const
-{
-    return d->connectionInterface->property("Bitrate").toUInt();
-}
-
-QDBusObjectPath QNetworkManagerInterfaceDeviceWireless::activeAccessPoint() const
-{
-    return d->connectionInterface->property("ActiveAccessPoint").value<QDBusObjectPath>();
-}
-
-quint32 QNetworkManagerInterfaceDeviceWireless::wirelessCapabilities() const
-{
-    return d->connectionInterface->property("WirelelessCapabilities").toUInt();
-}
-
-class QNetworkManagerSettingsPrivate
-{
-public:
-    QDBusInterface *connectionInterface;
-    QString path;
-    bool valid;
-};
-
-QNetworkManagerSettings::QNetworkManagerSettings(const QString &settingsService, QObject *parent)
-        : QObject(parent)
-{
-    d = new QNetworkManagerSettingsPrivate();
-    d->path = settingsService;
-    d->connectionInterface = new QDBusInterface(settingsService,
-                                                QLatin1String(NM_DBUS_PATH_SETTINGS),
-                                                QLatin1String(NM_DBUS_IFACE_SETTINGS),
-                                                dbusConnection);
-    if (!d->connectionInterface->isValid()) {
-        d->valid = false;
-        qWarning() << "Could not find NetworkManagerSettings";
-        return;
-    }
-    d->valid = true;
-}
-
-QNetworkManagerSettings::~QNetworkManagerSettings()
-{
-    delete d->connectionInterface;
-    delete d;
-}
-
-bool QNetworkManagerSettings::isValid()
-{
-    return d->valid;
-}
-
-bool QNetworkManagerSettings::setConnections()
-{
-    bool allOk = false;
-
-    if (!dbusConnection.connect(d->path, QLatin1String(NM_DBUS_PATH_SETTINGS),
-                           QLatin1String(NM_DBUS_IFACE_SETTINGS), QLatin1String("NewConnection"),
-                           this, SIGNAL(newConnection(QDBusObjectPath)))) {
-        allOk = true;
-    }
-
-    return allOk;
-}
-
-QList <QDBusObjectPath> QNetworkManagerSettings::listConnections()
-{
-    QDBusReply<QList<QDBusObjectPath> > reply = d->connectionInterface->call(QLatin1String("ListConnections"));
-    return  reply.value();
-}
-
-QDBusInterface *QNetworkManagerSettings::connectionInterface() const
-{
-    return d->connectionInterface;
-}
-
-
-class QNetworkManagerSettingsConnectionPrivate
-{
-public:
-    QDBusInterface *connectionInterface;
-    QString path;
-    QString service;
-    QNmSettingsMap settingsMap;
-    bool valid;
-};
-
-QNetworkManagerSettingsConnection::QNetworkManagerSettingsConnection(const QString &settingsService, const QString &connectionObjectPath, QObject *parent)
-{
-    qDBusRegisterMetaType<QNmSettingsMap>();
-    d = new QNetworkManagerSettingsConnectionPrivate();
-    d->path = connectionObjectPath;
-    d->service = settingsService;
-    d->connectionInterface = new QDBusInterface(settingsService,
-                                                d->path,
-                                                QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION),
-                                                dbusConnection, parent);
-    if (!d->connectionInterface->isValid()) {
-        qWarning() << "Could not find NetworkManagerSettingsConnection";
-        d->valid = false;
-        return;
-    }
-    d->valid = true;
-    QDBusReply< QNmSettingsMap > rep = d->connectionInterface->call(QLatin1String("GetSettings"));
-    d->settingsMap = rep.value();
-}
-
-QNetworkManagerSettingsConnection::~QNetworkManagerSettingsConnection()
-{
-    delete d->connectionInterface;
-    delete d;
-}
-
-bool QNetworkManagerSettingsConnection::isValid()
-{
-    return d->valid;
-}
-
-bool QNetworkManagerSettingsConnection::setConnections()
-{
-    if(!isValid() )
-        return false;
-
-    bool allOk = false;
-    if(!dbusConnection.connect(d->service, d->path,
-                           QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("NewConnection"),
-                           this, SIGNAL(updated(QNmSettingsMap)))) {
-        allOk = true;
-    }
-
-    nmDBusHelper = new QNmDBusHelper(this);
-    connect(nmDBusHelper, SIGNAL(pathForSettingsRemoved(const QString &)),
-            this,SIGNAL(removed( const QString &)));
-
-    if (!dbusConnection.connect(d->service, d->path,
-                           QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Removed"),
-                           nmDBusHelper, SIGNAL(slotSettingsRemoved()))) {
-        allOk = true;
-    }
-
-    return allOk;
-}
-
-QDBusInterface *QNetworkManagerSettingsConnection::connectionInterface() const
-{
-    return d->connectionInterface;
-}
-
-QNmSettingsMap QNetworkManagerSettingsConnection::getSettings()
-{
-    QDBusReply< QNmSettingsMap > rep = d->connectionInterface->call(QLatin1String("GetSettings"));
-    d->settingsMap = rep.value();
-    return d->settingsMap;
-}
-
-NMDeviceType QNetworkManagerSettingsConnection::getType()
-{
-    QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection"));
-    while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) {
-        QMap<QString,QVariant> innerMap = i.value();
-        QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("type"));
-        while (ii != innerMap.end() && ii.key() == QLatin1String("type")) {
-            QString devType = ii.value().toString();
-            if (devType == QLatin1String("802-3-ethernet")) {
-                return 	DEVICE_TYPE_802_3_ETHERNET;
-            }
-            if (devType == QLatin1String("802-11-wireless")) {
-                return 	DEVICE_TYPE_802_11_WIRELESS;
-            }
-            ii++;
-        }
-        i++;
-    }
-    return 	DEVICE_TYPE_UNKNOWN;
-}
-
-bool QNetworkManagerSettingsConnection::isAutoConnect()
-{
-    QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection"));
-    while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) {
-        QMap<QString,QVariant> innerMap = i.value();
-        QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("autoconnect"));
-        while (ii != innerMap.end() && ii.key() == QLatin1String("autoconnect")) {
-            return ii.value().toBool();
-            ii++;
-        }
-        i++;
-    }
-    return true; //default networkmanager is autoconnect
-}
-
-quint64 QNetworkManagerSettingsConnection::getTimestamp()
-{
-    QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection"));
-    while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) {
-        QMap<QString,QVariant> innerMap = i.value();
-        QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("timestamp"));
-        while (ii != innerMap.end() && ii.key() == QLatin1String("timestamp")) {
-            return ii.value().toUInt();
-            ii++;
-        }
-        i++;
-    }
-    return 	0;
-}
-
-QString QNetworkManagerSettingsConnection::getId()
-{
-    QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection"));
-    while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) {
-        QMap<QString,QVariant> innerMap = i.value();
-        QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("id"));
-        while (ii != innerMap.end() && ii.key() == QLatin1String("id")) {
-            return ii.value().toString();
-            ii++;
-        }
-        i++;
-    }
-    return 	QString();
-}
-
-QString QNetworkManagerSettingsConnection::getUuid()
-{
-    QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection"));
-    while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) {
-        QMap<QString,QVariant> innerMap = i.value();
-        QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("uuid"));
-        while (ii != innerMap.end() && ii.key() == QLatin1String("uuid")) {
-            return ii.value().toString();
-            ii++;
-        }
-        i++;
-    }
-    // is no uuid, return the connection path
-    return 	d->connectionInterface->path();
-}
-
-QString QNetworkManagerSettingsConnection::getSsid()
-{
-    QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-11-wireless"));
-    while (i != d->settingsMap.end() && i.key() == QLatin1String("802-11-wireless")) {
-        QMap<QString,QVariant> innerMap = i.value();
-        QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("ssid"));
-        while (ii != innerMap.end() && ii.key() == QLatin1String("ssid")) {
-            return ii.value().toString();
-            ii++;
-        }
-        i++;
-    }
-    return 	QString();
-}
-
-QString QNetworkManagerSettingsConnection::getMacAddress()
-{
-    if(getType() == DEVICE_TYPE_802_3_ETHERNET) {
-        QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-3-ethernet"));
-        while (i != d->settingsMap.end() && i.key() == QLatin1String("802-3-ethernet")) {
-            QMap<QString,QVariant> innerMap = i.value();
-            QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("mac-address"));
-            while (ii != innerMap.end() && ii.key() == QLatin1String("mac-address")) {
-                return ii.value().toString();
-                ii++;
-            }
-            i++;
-        }
-    }
-
-    else if(getType() == DEVICE_TYPE_802_11_WIRELESS) {
-        QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-11-wireless"));
-        while (i != d->settingsMap.end() && i.key() == QLatin1String("802-11-wireless")) {
-            QMap<QString,QVariant> innerMap = i.value();
-            QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("mac-address"));
-            while (ii != innerMap.end() && ii.key() == QLatin1String("mac-address")) {
-                return ii.value().toString();
-                ii++;
-            }
-            i++;
-        }
-    }
-    return 	QString();
-}
-
-QStringList  QNetworkManagerSettingsConnection::getSeenBssids()
-{
- if(getType() == DEVICE_TYPE_802_11_WIRELESS) {
-        QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-11-wireless"));
-        while (i != d->settingsMap.end() && i.key() == QLatin1String("802-11-wireless")) {
-            QMap<QString,QVariant> innerMap = i.value();
-            QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("seen-bssids"));
-            while (ii != innerMap.end() && ii.key() == QLatin1String("seen-bssids")) {
-                return ii.value().toStringList();
-                ii++;
-            }
-            i++;
-        }
-    }
- return QStringList();
-}
-
-class QNetworkManagerConnectionActivePrivate
-{
-public:
-    QDBusInterface *connectionInterface;
-    QString path;
-    bool valid;
-};
-
-QNetworkManagerConnectionActive::QNetworkManagerConnectionActive( const QString &activeConnectionObjectPath, QObject *parent)
-{
-    d = new QNetworkManagerConnectionActivePrivate();
-    d->path = activeConnectionObjectPath;
-    d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
-                                                d->path,
-                                                QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION),
-                                                dbusConnection, parent);
-    if (!d->connectionInterface->isValid()) {
-        d->valid = false;
-        qWarning() << "Could not find NetworkManagerSettingsConnection";
-        return;
-    }
-    d->valid = true;
-}
-
-QNetworkManagerConnectionActive::~QNetworkManagerConnectionActive()
-{
-    delete d->connectionInterface;
-    delete d;
-}
-
-bool QNetworkManagerConnectionActive::isValid()
-{
-    return d->valid;
-}
-
-bool QNetworkManagerConnectionActive::setConnections()
-{
-    if(!isValid() )
-        return false;
-
-    bool allOk = false;
-    nmDBusHelper = new QNmDBusHelper(this);
-    connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap<QString,QVariant>)),
-            this,SIGNAL(propertiesChanged( const QString &, QMap<QString,QVariant>)));
-    if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
-                              d->path,
-                              QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION),
-                              QLatin1String("PropertiesChanged"),
-                              nmDBusHelper,SLOT(slotPropertiesChanged( QMap<QString,QVariant>))) )  {
-        allOk = true;
-    }
-
-    return allOk;
-}
-
-QDBusInterface *QNetworkManagerConnectionActive::connectionInterface() const
-{
-    return d->connectionInterface;
-}
-
-QString QNetworkManagerConnectionActive::serviceName() const
-{
-    return d->connectionInterface->property("ServiceName").toString();
-}
-
-QDBusObjectPath QNetworkManagerConnectionActive::connection() const
-{
-    QVariant prop = d->connectionInterface->property("Connection");
-    return prop.value<QDBusObjectPath>();
-}
-
-QDBusObjectPath QNetworkManagerConnectionActive::specificObject() const
-{
-    QVariant prop = d->connectionInterface->property("SpecificObject");
-    return prop.value<QDBusObjectPath>();
-}
-
-QList<QDBusObjectPath> QNetworkManagerConnectionActive::devices() const
-{
-    QVariant prop = d->connectionInterface->property("Devices");
-    return prop.value<QList<QDBusObjectPath> >();
-}
-
-quint32 QNetworkManagerConnectionActive::state() const
-{
-    return d->connectionInterface->property("State").toUInt();
-}
-
-bool QNetworkManagerConnectionActive::defaultRoute() const
-{
-    return d->connectionInterface->property("Default").toBool();
-}
-
-class QNetworkManagerIp4ConfigPrivate
-{
-public:
-    QDBusInterface *connectionInterface;
-    QString path;
-    bool valid;
-};
-
-QNetworkManagerIp4Config::QNetworkManagerIp4Config( const QString &deviceObjectPath, QObject *parent)
-{
-    d = new QNetworkManagerIp4ConfigPrivate();
-    d->path = deviceObjectPath;
-    d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
-                                                d->path,
-                                                QLatin1String(NM_DBUS_INTERFACE_IP4_CONFIG),
-                                                dbusConnection, parent);
-    if (!d->connectionInterface->isValid()) {
-        d->valid = false;
-        qWarning() << "Could not find NetworkManagerIp4Config";
-        return;
-    }
-    d->valid = true;
-}
-
-QNetworkManagerIp4Config::~QNetworkManagerIp4Config()
-{
-    delete d->connectionInterface;
-    delete d;
-}
-
-bool QNetworkManagerIp4Config::isValid()
-{
-    return d->valid;
-}
-
-QStringList QNetworkManagerIp4Config::domains() const
-{
-    return d->connectionInterface->property("Domains").toStringList();
-}
-
-#include "moc_qnetworkmanagerservice_p.cpp"
-
-QTM_END_NAMESPACE
--- a/qtmobility/src/bearer/qnetworkmanagerservice_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,440 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKMANAGERSERVICE_H
-#define QNETWORKMANAGERSERVICE_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-
-#include <qmobilityglobal.h>
-
-#include <QtDBus/QtDBus>
-#include <QtDBus/QDBusConnection>
-#include <QtDBus/QDBusError>
-#include <QtDBus/QDBusInterface>
-#include <QtDBus/QDBusMessage>
-#include <QtDBus/QDBusReply>
-#include <QNetworkInterface>
-
-
-#include <QtDBus/QDBusPendingCallWatcher>
-#include <QtDBus/QDBusObjectPath>
-#include <QtDBus/QDBusContext>
-#include <QMap>
-#include "qnmdbushelper_p.h"
-
-#ifndef NETWORK_MANAGER_H
-typedef enum NMDeviceType
-{
-    DEVICE_TYPE_UNKNOWN = 0,
-    DEVICE_TYPE_802_3_ETHERNET,
-    DEVICE_TYPE_802_11_WIRELESS,
-    DEVICE_TYPE_GSM,
-    DEVICE_TYPE_CDMA
-} NMDeviceType;
-
-typedef enum
-{
-    NM_DEVICE_STATE_UNKNOWN = 0,
-    NM_DEVICE_STATE_UNMANAGED,
-    NM_DEVICE_STATE_UNAVAILABLE,
-    NM_DEVICE_STATE_DISCONNECTED,
-    NM_DEVICE_STATE_PREPARE,
-    NM_DEVICE_STATE_CONFIG,
-    NM_DEVICE_STATE_NEED_AUTH,
-    NM_DEVICE_STATE_IP_CONFIG,
-    NM_DEVICE_STATE_ACTIVATED,
-    NM_DEVICE_STATE_FAILED
-} NMDeviceState;
-
-#define	NM_DBUS_SERVICE			"org.freedesktop.NetworkManager"
-
-#define	NM_DBUS_PATH				        "/org/freedesktop/NetworkManager"
-#define	NM_DBUS_INTERFACE			        "org.freedesktop.NetworkManager"
-#define	NM_DBUS_INTERFACE_DEVICE	        NM_DBUS_INTERFACE ".Device"
-#define NM_DBUS_INTERFACE_DEVICE_WIRED      NM_DBUS_INTERFACE_DEVICE ".Wired"
-#define NM_DBUS_INTERFACE_DEVICE_WIRELESS   NM_DBUS_INTERFACE_DEVICE ".Wireless"
-#define NM_DBUS_PATH_ACCESS_POINT           NM_DBUS_PATH "/AccessPoint"
-#define NM_DBUS_INTERFACE_ACCESS_POINT      NM_DBUS_INTERFACE ".AccessPoint"
-
-#define NM_DBUS_PATH_SETTINGS             "/org/freedesktop/NetworkManagerSettings"
-
-#define NM_DBUS_IFACE_SETTINGS_CONNECTION "org.freedesktop.NetworkManagerSettings.Connection"
-#define NM_DBUS_IFACE_SETTINGS            "org.freedesktop.NetworkManagerSettings"
-#define NM_DBUS_INTERFACE_ACTIVE_CONNECTION NM_DBUS_INTERFACE ".Connection.Active"
-#define NM_DBUS_INTERFACE_IP4_CONFIG        NM_DBUS_INTERFACE ".IP4Config"
-
-#define NM_DBUS_SERVICE_USER_SETTINGS     "org.freedesktop.NetworkManagerUserSettings"
-#define NM_DBUS_SERVICE_SYSTEM_SETTINGS   "org.freedesktop.NetworkManagerSystemSettings"
-
-#define NM_802_11_AP_FLAGS_NONE				0x00000000
-#define NM_802_11_AP_FLAGS_PRIVACY			0x00000001
-#endif
-
-QTM_BEGIN_NAMESPACE
-typedef QMap< QString, QMap<QString,QVariant> > QNmSettingsMap;
-typedef QList<quint32> ServerThing;
-QTM_END_NAMESPACE
-
-
-Q_DECLARE_METATYPE(QTM_PREPEND_NAMESPACE(QNmSettingsMap))
-Q_DECLARE_METATYPE(QTM_PREPEND_NAMESPACE(ServerThing))
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkManagerInterfacePrivate;
-class QNetworkManagerInterface : public QObject
-{
-    Q_OBJECT
-    
-public:
-    
-    QNetworkManagerInterface(QObject *parent = 0);
-    ~QNetworkManagerInterface();
-    
-    QList <QDBusObjectPath> getDevices() const;
-    void activateConnection(const QString &serviceName, QDBusObjectPath connection, QDBusObjectPath device, QDBusObjectPath specificObject);
-    void deactivateConnection(QDBusObjectPath connectionPath) const;
-    
-    QDBusObjectPath path() const;
-    QDBusInterface *connectionInterface() const;
-    
-    bool wirelessEnabled() const;
-    bool wirelessHardwareEnabled() const;
-    QList <QDBusObjectPath> activeConnections() const;
-    quint32 state();
-    bool setConnections();
-    bool isValid();
-    
-Q_SIGNALS:
-    void deviceAdded(QDBusObjectPath);
-    void deviceRemoved(QDBusObjectPath);
-    void propertiesChanged( const QString &, QMap<QString,QVariant>);
-    void stateChanged(const QString&, quint32);
-    void activationFinished(QDBusPendingCallWatcher*);
-
-private Q_SLOTS:
-private:
-    QNetworkManagerInterfacePrivate *d;
-    QNmDBusHelper *nmDBusHelper;
-};
-
-class QNetworkManagerInterfaceAccessPointPrivate;
-class QNetworkManagerInterfaceAccessPoint : public QObject
-{
-    Q_OBJECT
-    
-public:
-    
-    enum DeviceState {
-        Unknown = 0,
-        Unmanaged,
-        Unavailable,
-        Disconnected,
-        Prepare,
-        Config,
-        NeedAuthentication,
-        IpConfig,
-        Activated,
-        Failed
-    };
-    
-    enum ApFlag {
-        ApNone = 0x0,
-        Privacy = 0x1
-    };
-    
-    Q_DECLARE_FLAGS(ApFlags, ApFlag);
-    
-    enum ApSecurityFlag {
-        ApSecurityNone = 0x0,
-        PairWep40 = 0x1,
-        PairWep104 = 0x2,
-        PairTkip = 0x4,
-        PairCcmp = 0x8,
-        GroupWep40 = 0x10,
-        GroupWep104 = 0x20,
-        GroupTkip = 0x40,
-        GroupCcmp = 0x80,
-        KeyPsk = 0x100,
-        Key8021x = 0x200
-    };
-    
-    Q_DECLARE_FLAGS(ApSecurityFlags, ApSecurityFlag);
-    
-    explicit QNetworkManagerInterfaceAccessPoint(const QString &dbusPathName, QObject *parent = 0);
-    ~QNetworkManagerInterfaceAccessPoint();
-
-    QDBusInterface *connectionInterface() const;
-
-    quint32 flags() const;
-    quint32 wpaFlags() const;
-    quint32 rsnFlags() const;
-    QString ssid() const;
-    quint32 frequency() const;
-    QString hwAddress() const;
-    quint32 mode() const;
-    quint32 maxBitrate() const;
-    quint32 strength() const;
-    bool setConnections();
-    bool isValid();
-    
-Q_SIGNALS:
-    void propertiesChanged(QMap <QString,QVariant>);
-    void propertiesChanged( const QString &, QMap<QString,QVariant>);
-private:
-    QNetworkManagerInterfaceAccessPointPrivate *d;
-    QNmDBusHelper *nmDBusHelper;
-
-};
-
-class QNetworkManagerInterfaceDevicePrivate;
-class QNetworkManagerInterfaceDevice : public QObject
-{
-    Q_OBJECT
-    
-public:
-    
-    explicit QNetworkManagerInterfaceDevice(const QString &deviceObjectPath, QObject *parent = 0);
-    ~QNetworkManagerInterfaceDevice();
-    
-    QString udi() const;
-    QNetworkInterface networkInterface() const;
-    QDBusInterface *connectionInterface() const;
-    quint32 ip4Address() const;
-    quint32 state() const;
-    quint32 deviceType() const;
-    
-    QDBusObjectPath ip4config() const;
-    bool setConnections();
-    bool isValid();
-    
-Q_SIGNALS:
-    void stateChanged(const QString &, quint32);
-
-private:
-    QNetworkManagerInterfaceDevicePrivate *d;
-    QNmDBusHelper *nmDBusHelper;
-};
-
-class QNetworkManagerInterfaceDeviceWiredPrivate;
-class QNetworkManagerInterfaceDeviceWired : public QObject
-{
-    Q_OBJECT
-    
-public:
-    
-    explicit QNetworkManagerInterfaceDeviceWired(const QString &ifaceDevicePath,
-                                                 QObject *parent = 0);
-    ~QNetworkManagerInterfaceDeviceWired();
-    
-    QDBusInterface  *connectionInterface() const;
-    QString hwAddress() const;
-    quint32 speed() const;
-    bool carrier() const;
-    bool setConnections();
-    bool isValid();
-    
-Q_SIGNALS:
-    void propertiesChanged( const QString &, QMap<QString,QVariant>);
-private:
-    QNetworkManagerInterfaceDeviceWiredPrivate *d;
-    QNmDBusHelper *nmDBusHelper;
-};
-
-class QNetworkManagerInterfaceDeviceWirelessPrivate;
-class QNetworkManagerInterfaceDeviceWireless : public QObject
-{
-    Q_OBJECT
-    
-public:
-    
-    enum DeviceCapability {
-        None = 0x0,
-        Wep40 = 0x1,
-        Wep104 = 0x2,
-        Tkip = 0x4,
-        Ccmp = 0x8,
-        Wpa = 0x10,
-        Rsn = 0x20
-       };
-    
-    explicit QNetworkManagerInterfaceDeviceWireless(const QString &ifaceDevicePath,
-                                                    QObject *parent = 0);
-    ~QNetworkManagerInterfaceDeviceWireless();
-    
-    QDBusObjectPath path() const;
-    QList <QDBusObjectPath> getAccessPoints();
-    QDBusInterface *connectionInterface() const;
-
-    QString hwAddress() const;
-    quint32 mode() const;
-    quint32 bitrate() const;
-    QDBusObjectPath activeAccessPoint() const;
-    quint32 wirelessCapabilities() const;
-    bool setConnections();
-    bool isValid();
-    
-Q_SIGNALS:
-    void propertiesChanged( const QString &, QMap<QString,QVariant>);
-    void accessPointAdded(const QString &,QDBusObjectPath);
-    void accessPointRemoved(const QString &,QDBusObjectPath);
-private:
-    QNetworkManagerInterfaceDeviceWirelessPrivate *d;
-    QNmDBusHelper *nmDBusHelper;
-};
-
-class QNetworkManagerSettingsPrivate;
-class QNetworkManagerSettings : public QObject
-{
-    Q_OBJECT
-    
-public:
-    
-    explicit QNetworkManagerSettings(const QString &settingsService, QObject *parent = 0);
-    ~QNetworkManagerSettings();
-    
-    QDBusInterface  *connectionInterface() const;
-    QList <QDBusObjectPath> listConnections();
-    bool setConnections();
-    bool isValid();
-
-Q_SIGNALS:
-    void newConnection(QDBusObjectPath);
-private:
-    QNetworkManagerSettingsPrivate *d;
-};
-
-class QNetworkManagerSettingsConnectionPrivate;
-class QNetworkManagerSettingsConnection : public QObject
-{
-    Q_OBJECT
-    
-public:
-    
-    QNetworkManagerSettingsConnection(const QString &settingsService, const QString &connectionObjectPath, QObject *parent = 0);
-    ~QNetworkManagerSettingsConnection();
-    
-    QDBusInterface  *connectionInterface() const;
-    QNmSettingsMap getSettings();
-    bool setConnections();
-    NMDeviceType getType();
-    bool isAutoConnect();
-    quint64 getTimestamp();
-    QString getId();
-    QString getUuid();
-    QString getSsid();
-    QString getMacAddress();
-    QStringList getSeenBssids();
-    bool isValid();
-
-Q_SIGNALS:
-    
-    void updated(QMap< QString, QMap<QString,QVariant> > s);
-    void removed(const QString &);
-
-private:
-    QNmDBusHelper *nmDBusHelper;
-    QNetworkManagerSettingsConnectionPrivate *d;
-};
-
-class QNetworkManagerConnectionActivePrivate;
-class QNetworkManagerConnectionActive : public QObject
-{
-    Q_OBJECT
-    
-public:
-    
-    enum ActiveConnectionState {
-        Unknown = 0,
-        Activating = 1,
-        Activated = 2
-       };
-    
-    explicit QNetworkManagerConnectionActive(const QString &dbusPathName, QObject *parent = 0);
-    ~ QNetworkManagerConnectionActive();
-    
-    QDBusInterface  *connectionInterface() const;
-    QString serviceName() const;
-    QDBusObjectPath connection() const;
-    QDBusObjectPath specificObject() const;
-    QList<QDBusObjectPath> devices() const;
-    quint32 state() const;
-    bool defaultRoute() const;
-    bool setConnections();
-    bool isValid();
-
-    
-Q_SIGNALS:
-    void propertiesChanged(QList<QDBusObjectPath>);
-    void propertiesChanged( const QString &, QMap<QString,QVariant>);
-private:
-    QNetworkManagerConnectionActivePrivate *d;
-    QNmDBusHelper *nmDBusHelper;
-};
-
-class QNetworkManagerIp4ConfigPrivate;
-class QNetworkManagerIp4Config : public QObject
-{
-    Q_OBJECT
-    
-public:
-    explicit QNetworkManagerIp4Config(const QString &dbusPathName, QObject *parent = 0);
-	~QNetworkManagerIp4Config();
-
-    QStringList domains() const;
-    bool isValid();
-
- private:
-	QNetworkManagerIp4ConfigPrivate *d;    
-};
-QTM_END_NAMESPACE
-
-
-#endif //QNETWORKMANAGERSERVICE_H
--- a/qtmobility/src/bearer/qnetworksession.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,715 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QEventLoop>
-#include <QTimer>
-
-#include "qnetworksession.h"
-
-#ifdef Q_OS_SYMBIAN
-#include "qnetworksession_s60_p.h"
-#elif defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-#include "qnetworksession_maemo_p.h"
-#else
-#include "qnetworksession_p.h"
-#endif
-
-QTM_BEGIN_NAMESPACE
-
-/*!
-    \class QNetworkSession
-
-    \brief The QNetworkSession class provides control over the system's access points
-    and enables session management for cases when multiple clients access the same access point.
-
-    \inmodule QtNetwork
-    \ingroup bearer
-
-    A QNetworkSession enables control over the system's network interfaces. The session's configuration
-    parameter are determined via the QNetworkConfiguration object to which it is bound. Depending on the 
-    type of the session (single access point or service network) a session may be linked to one or more
-    network interfaces. By means of \l{open()}{opening} and \l{close()}{closing} of network sessions 
-    a developer can start and stop the systems network interfaces. If the configuration represents 
-    multiple access points (see \l QNetworkConfiguration::ServiceNetwork) more advanced features such as roaming may be supported.
-
-    QNetworkSession supports session management within the same process and depending on the platform's 
-    capabilities may support out-of-process sessions. If the same 
-    network configuration is used by multiple open sessions the underlying network interface is only terminated once
-    the last session has been closed.
-
-    \section1 Roaming
-
-    Applications may connect to the preferredConfigurationChanged() signal in order to 
-    receive notifications when a more suitable access point becomes available. 
-    In response to this signal the application must either initiate the roaming via migrate()
-    or ignore() the new access point. Once the session has roamed the 
-    newConfigurationActivated() signal is emitted. The application may now test the 
-    carrier and must either accept() or reject() it. The session will return to the previous
-    access point if the roaming was rejected. The subsequent state diagram depicts the required
-    state transitions.
-    
-    \image roaming-states.png
-
-    Some platforms may distinguish forced roaming and application level roaming (ALR). 
-    ALR implies that the application controls (via migrate(), ignore(), accept() and reject()) 
-    whether a network session can roam from one access point to the next. Such control is useful
-    if the application maintains stateful socket connections and wants to control the transition from
-    one interface to the next. Forced roaming implies that the system automatically roams to the next network without 
-    consulting the application. This has the advantage that the application can make use of roaming features
-    without actually being aware of it. It is expected that the application detects that the underlying 
-    socket is broken and automatically reconnects via the new network link.
-
-    If the platform supports both modes of roaming, an application indicates its preference
-    by connecting to the preferredConfigurationChanged() signal. Connecting to this signal means that
-    the application wants to take control over the roaming behavior and therefore implies application
-    level roaming. If the client does not connect to the preferredConfigurationChanged(), forced roaming
-    is used. If forced roaming is not supported the network session will not roam by default.
-
-    Some applications may want to suppress any form of roaming altogether. Possible use cases may be 
-    high priority downloads or remote services which cannot handle a roaming enabled client. Clients
-    can suppress roaming by connecting to the preferredConfigurationChanged() signal and answer each
-    signal emission with ignore().
-
-    \sa QNetworkConfiguration, QNetworkConfigurationManager
-*/
-
-/*!
-    \enum QNetworkSession::State
-
-    This enum describes the connectivity state of the session. If the session is based on a
-    single access point configuration the state of the session is the same as the state of the
-    associated network interface.
-
-    \value Invalid          The session is invalid due to an invalid configuration. This may 
-                            happen due to a removed access point or a configuration that was 
-                            invalid to begin with.
-    \value NotAvailable     The session is based on a defined but not yet discovered QNetworkConfiguration
-                            (see \l QNetworkConfiguration::StateFlag).
-    \value Connecting       The network session is being established.
-    \value Connected        The network session is connected. If the current process wishes to use this session
-                            it has to register its interest by calling open(). A network session 
-                            is considered to be ready for socket operations if it isOpen() and connected.
-    \value Closing          The network session is in the process of being shut down.
-    \value Disconnected     The network session is not connected. The associated QNetworkConfiguration
-                            has the state QNetworkConfiguration::Discovered.
-    \value Roaming          The network session is roaming from one access point to another 
-                            access point.
-*/
-
-/*!
-    \enum QNetworkSession::SessionError
-
-    This enum describes the session errors that can occur.
-
-    \value UnknownSessionError          An unidentified error occurred.
-    \value SessionAbortedError          The session was aborted by the user or system.
-    \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.
-*/
-
-/*!
-    \fn void QNetworkSession::stateChanged(QNetworkSession::State state)
-
-    This signal is emitted whenever the state of the network session changes.
-    The \a state parameter is the new state.
-
-    \sa state()
-*/
-
-/*!
-    \fn void QNetworkSession::error(QNetworkSession::SessionError error)
-
-    This signal is emitted after an error occurred. The \a error parameter
-    describes the error that occurred.
-
-    \sa error(), errorString()
-*/
-
-/*!
-    \fn void QNetworkSession::preferredConfigurationChanged(const QNetworkConfiguration& config, bool isSeamless)
-
-    This signal is emitted when the preferred configuration/access point for the
-    session changes. Only sessions which are based on service network configurations
-    may emit this signal. \a config can be used to determine access point specific
-    details such as proxy settings and \a isSeamless indicates whether roaming will
-    break the sessions IP address.
-
-    As a consequence to this signal the application must either start the roaming process
-    by calling migrate() or choose to ignore() the new access point.
-
-    If the roaming process is non-seamless the IP address will change which means that
-    a socket becomes invalid. However seamless mobility can ensure that the local IP address
-    does not change. This is achieved by using a virtual IP address which is bound to the actual
-    link address. During the roaming process the virtual address is attached to the new link 
-    address.
-
-    Some platforms may support the concept of Forced Roaming and Application Level Roaming (ALR). 
-    Forced roaming implies that the platform may simply roam to a new configuration without 
-    consulting applications. It is up to the application to detect the link layer loss and reestablish
-    its sockets. In contrast ALR provides the opportunity to prevent the system from roaming. 
-    If this session is based on a configuration that supports roaming the application can choose
-    whether it wants to be consulted (ALR use case) by connecting to this signal. For as long as this signal 
-    connection remains the session remains registered as a roaming stakeholder; otherwise roaming will 
-    be enforced by the platform.
-
-    \sa migrate(), ignore(), QNetworkConfiguration::isRoamingAvailable()
-*/
-
-/*!
-    \fn void QNetworkSession::newConfigurationActivated()
-
-    This signal is emitted once the session has roamed to the new access point.
-    The application may reopen its socket and test the suitability of the new network link.
-    Subsequently it must either accept() or reject() the new access point. 
-
-    \sa accept(), reject()
-*/
-
-/*!
-    \fn void QNetworkSession::opened()
-
-    This signal is emitted when the network session has been opened. 
-    
-    The underlying network interface will not be shut down as long as the session remains open.
-    Note that this feature is dependent on \l{QNetworkConfigurationManager::SystemSessionSupport}{system wide session support}.
-*/
-
-/*!
-    \fn void QNetworkSession::closed()
-
-    This signal is emitted when the network session has been closed.
-*/
-
-/*!
-    Constructs a session based on \a connectionConfig with the given \a parent.
-
-    \sa QNetworkConfiguration
-*/
-QNetworkSession::QNetworkSession(const QNetworkConfiguration& connectionConfig, QObject* parent)
-    : QObject(parent)
-{
-    d = new QNetworkSessionPrivate;
-    d->q = this;
-    d->publicConfig = connectionConfig;
-    d->syncStateWithInterface();
-    QObject::connect(d, SIGNAL(quitPendingWaitsForOpened()), 
-                this, SIGNAL(opened()));
-}
-
-/*!
-    Frees the resources associated with the QNetworkSession object.
-*/
-QNetworkSession::~QNetworkSession()
-{
-    delete d;
-}
-
-/*!
-    Creates an open session which increases the session counter on the underlying network interface.
-    The system will not terminate a network interface until the session reference counter reaches zero.
-    Therefore an open session allows an application to register its use of the interface.
-
-    As a result of calling open() the interface will be started if it is not connected/up yet. 
-    Some platforms may not provide support for out-of-process sessions. On such platforms the session
-    counter ignores any sessions held by another process. The platform capabilities can be 
-    detected via QNetworkConfigurationManager::capabilities().
-
-    Note that this call is asynchronous. Depending on the outcome of this call the results can be enquired 
-    by connecting to the stateChanged(), opened() or error() signals.
-
-    It is not a requirement to open a session in order to monitor the underlying network interface.
-
-    \sa close(), stop(), isOpen()
-*/
-void QNetworkSession::open()
-{
-    d->open();
-}
-
-/*!
-    Waits until the session has been opened, up to \a msecs milliseconds. If the session has been opened, this
-    function returns true; otherwise it returns false. In the case where it returns false, you can call error()
-    to determine the cause of the error.
-
-    The following example waits up to one second for the session to be opened:
-
-    \code
-        session->open();
-        if (session->waitForOpened(1000))
-            qDebug("Open!");
-    \endcode
-
-    If \a msecs is -1, this function will not time out.
-
-    \sa open(), error()
-*/
-bool QNetworkSession::waitForOpened(int msecs)
-{
-    if (d->isOpen)
-        return true;
-
-    if (d->state != Connecting)
-        return false;
-
-    QEventLoop* loop = new QEventLoop(this);
-    QObject::connect(d, SIGNAL(quitPendingWaitsForOpened()),
-                     loop, SLOT(quit()));
-    QObject::connect(this, SIGNAL(error(QNetworkSession::SessionError)),
-                     loop, SLOT(quit()));
-
-    //final call
-    if (msecs>=0)
-        QTimer::singleShot(msecs, loop, SLOT(quit()));
-
-    loop->exec();
-    loop->disconnect();
-    loop->deleteLater();
-
-    return d->isOpen;
-}
-
-/*!
-    Decreases the session counter on the associated network configuration. If the session counter reaches zero
-    the active network interface is shut down. This also means that state() will only change from \l Connected to
-    \l Disconnected if the current session was the last open session.
-
-    If the platform does not support out-of-process sessions calling this function does not stop the
-    interface. In this case \l{stop()} has to be used to force a shut down. 
-    The platform capabilities can be detected via QNetworkConfigurationManager::capabilities().
-
-    Note that this call is asynchronous. Depending on the outcome of this call the results can be enquired 
-    by connecting to the stateChanged(), opened() or error() signals.
-
-    \sa open(), stop(), isOpen()
-*/
-void QNetworkSession::close()
-{
-    d->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. 
-    
-    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()
-*/
-void QNetworkSession::stop()
-{
-    d->stop();
-}
-
-/*!
-    Returns the QNetworkConfiguration that this network session object is based on.
-
-    \sa QNetworkConfiguration
-*/
-QNetworkConfiguration QNetworkSession::configuration() const
-{
-    return d->publicConfig;
-}
-
-/*
-    Returns the type of bearer currently used by this session. The string is not translated and
-    therefore can not be shown to the user. The subsequent table presents the currently known
-    bearer types:
-
-    \table
-        \header 
-            \o Value
-            \o Description
-        \row
-            \o Unknown
-            \o The session is based on an unknown or unspecified bearer type.
-        \row
-            \o Ethernet
-            \o The session is based on Ethernet.
-        \row
-            \o WLAN
-            \o The session is based on Wireless LAN.
-        \row
-            \o 2G
-            \o The session uses CSD, GPRS, HSCSD, EDGE or cdmaOne.
-        \row 
-            \o CDMA2000
-            \o The session uses CDMA.
-        \row
-            \o WCDMA
-            \o The session uses W-CDMA/UMTS.
-        \row
-            \o HSPA
-            \o The session uses High Speed Packet Access.
-        \row
-            \o Bluetooth
-            \o The session uses Bluetooth.
-        \row
-            \o WiMAX
-            \o The session uses WiMAX.
-    \endtable
-
-    If the session is based on a network configuration of type 
-    \l QNetworkConfiguration::ServiceNetwork the type of the preferred or currently 
-    active configuration is returned. Therefore the bearer type may change 
-    over time.
-
-    This function returns an empty string if this session is based on an invalid configuration, or
-    a network configuration of type \l QNetworkConfiguration::ServiceNetwork with no
-    \l {QNetworkConfiguration::children()}{children}.
-*/
-/*QString QNetworkSession::bearerName() const
-{
-    return d->bearerName();
-}*/
-
-/*!
-    Returns the network interface that is used by this session.
-
-    This function only returns a valid QNetworkInterface when this session is \l Connected.
-
-    The returned interface may change as a result of a roaming process.
-    
-    Note: this function does not work in Symbian emulator due to the way the 
-    connectivity is emulated on Windows.
-
-    \sa state()
-*/
-QNetworkInterface QNetworkSession::interface() const
-{
-    return d->currentInterface();
-}
-
-/*!
-    Returns true if this session is open. If the number of all open sessions is greater than
-    zero the underlying network interface will remain connected/up.
-
-    The session can be controlled via open() and close().
-*/
-bool QNetworkSession::isOpen() const
-{
-    return d->isOpen;
-}
-
-/*!
-    Returns the state of the session. 
-    
-    If the session is based on a single access point configuration the state of the 
-    session is the same as the state of the associated network interface. Therefore
-    a network session object can be used to monitor network interfaces. 
-
-    A \l QNetworkConfiguration::ServiceNetwork based session summarizes the state of all its children
-    and therefore returns the \l Connected state if at least one of the service network's 
-    \l {QNetworkConfiguration::children()}{children()} configurations is active. 
-
-    Note that it is not required to hold an open session in order to obtain the network interface state.
-    A connected but closed session may be used to monitor network interfaces whereas an open and connected
-    session object may prevent the network interface from being shut down.
-
-    \sa error(), stateChanged()
-*/
-QNetworkSession::State QNetworkSession::state() const
-{
-    return d->state;
-}
-
-/*!
-    Returns the type of error that last occurred.
-
-    \sa state(), errorString()
-*/
-QNetworkSession::SessionError QNetworkSession::error() const
-{
-    return d->error();
-}
-
-/*!
-    Returns a human-readable description of the last device error that 
-    occurred.
-
-    \sa error()
-*/
-QString QNetworkSession::errorString() const
-{
-    return d->errorString();
-}
-
-/*!
-    Returns the value for property \a key.
-
-    A network session can have properties attached which may describe the session in more details.
-    This function can be used to gain access to those properties.
-
-    The following property keys are guaranteed to be specified on all platforms:
-
-    \table
-        \header
-            \o Key \o Description
-        \row
-            \o ActiveConfiguration
-            \o If the session \l isOpen() this property returns the identifier of the
-            QNetworkConfiguration that is used by this session; otherwise an empty string.
-
-            The main purpose of this key is to determine which Internet access point is used
-            if the session is based on a \l{QNetworkConfiguration::ServiceNetwork}{ServiceNetwork}. 
-            The following code snippet highlights the difference:
-            \code
-                    QNetworkConfigurationManager mgr;
-                    QNetworkConfiguration ap = mgr.defaultConfiguration();
-                    QNetworkSession* session = new QNetworkSession(ap);
-                    ... //code activates session
-
-                    QString ident = session->sessionProperty("ActiveConfiguration").toString();
-                    if ( ap.type() == QNetworkConfiguration::ServiceNetwork ) {
-                        Q_ASSERT( ap.identifier() != ident );
-                        Q_ASSERT( ap.children().contains( mgr.configurationFromIdentifier(ident) ) );
-                    } else if ( ap.type() == QNetworkConfiguration::InternetAccessPoint ) {
-                        Q_ASSERT( ap.identifier() == ident );
-                    }
-                \endcode
-        \row
-            \o UserChoiceConfiguration
-            \o If the session \l isOpen() and is bound to a QNetworkConfiguration of type
-            UserChoice, this property returns the identifier of the QNetworkConfiguration that the
-            configuration resolved to when \l open() was called; otherwise an empty string.
-
-            The purpose of this key is to determine the real QNetworkConfiguration that the
-            session is using. This key is different to \i ActiveConfiguration in that
-            this key may return an identifier for either a
-            \l {QNetworkConfiguration::ServiceNetwork}{service network} or a
-            \l {QNetworkConfiguration::InternetAccessPoint}{Internet access points} configurations
-            whereas \i ActiveConfiguration always returns identifiers to 
-            \l {QNetworkConfiguration::InternetAccessPoint}{Internet access points} configurations.
-        \row
-            \o ConnectInBackground
-            \o Setting this property to \i true before calling \l open() implies that the connection attempt
-            is made but if no connection can be established, the user is not connsulted and asked to select
-            a suitable connection. This property is not set by default and support for it depends on the platform.
-    \endtable
-*/
-QVariant QNetworkSession::sessionProperty(const QString& key) const
-{
-    if (!d->publicConfig.isValid())
-        return QVariant();
-
-    if (key == "ActiveConfiguration") {
-        if (!d->isOpen)
-            return QString();
-        else
-            return d->activeConfig.identifier();
-    }
-
-    if (key == "UserChoiceConfiguration") {
-        if (!d->isOpen || d->publicConfig.type() != QNetworkConfiguration::UserChoice)
-            return QString();
-
-        if (d->serviceConfig.isValid())
-            return d->serviceConfig.identifier();
-        else
-            return d->activeConfig.identifier();
-    }
-
-    return d->sessionProperty(key);
-}
-
-/*!
-    Sets the property \a value on the session. The property is identified using
-    \a key. Removing an already set  property can be achieved by passing an 
-    invalid QVariant.
-
-    Note that the \i UserChoiceConfiguration and \i ActiveConfiguration
-    properties are read only and cannot be changed using this method.
-*/
-void QNetworkSession::setSessionProperty(const QString& key, const QVariant& value)
-{
-    if (key == "ActiveConfiguration" 
-            || key == "UserChoiceConfiguration") 
-        return;
-
-    d->setSessionProperty(key, value);
-}
-
-/*!
-    Instructs the session to roam to the new access point. The old access point remains active 
-    until the application calls accept().
-
-   The newConfigurationActivated() signal is emitted once roaming has been completed.
-
-    \sa accept()
-*/
-void QNetworkSession::migrate()
-{
-    d->migrate();
-}
-
-/*!
-    This function indicates that the application does not wish to roam the session.
-
-    \sa migrate()
-*/
-void QNetworkSession::ignore()
-{
-    // Needed on at least Symbian platform: the roaming must be explicitly 
-    // ignore()'d or migrate()'d
-    d->ignore();
-}
-
-/*!
-    Instructs the session to permanently accept the new access point. Once this function 
-    has been called the session may not return to the old access point.
-
-    The old access point may be closed in the process if there are no other network sessions for it.
-    Therefore any open socket that still uses the old access point 
-    may become unusable and should be closed before completing the migration.
-*/
-void QNetworkSession::accept()
-{
-    d->accept();
-}
-
-/*!
-    The new access point is not suitable for the application. By calling this function the 
-    session returns to the previous access point/configuration. This action may invalidate
-    any socket that has been created via the not desired access point.
-
-    \sa accept()
-*/
-void QNetworkSession::reject()
-{
-    d->reject();
-}
-
-
-/*!
-    Returns the amount of data sent in bytes; otherwise 0.
-
-    This field value includes the usage across all open network 
-    sessions which use the same network interface.
-
-    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.
-
-    \note On some platforms this function may run the main event loop.
-*/
-quint64 QNetworkSession::bytesWritten() const
-{
-    return d->bytesWritten();
-}
-
-/*!
-    Returns the amount of data received in bytes; otherwise 0.
-
-    This field value includes the usage across all open network 
-    sessions which use the same network interface.
-
-    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.
-
-    \note On some platforms this function may run the main event loop.
-*/
-quint64 QNetworkSession::bytesReceived() const
-{
-    return d->bytesReceived();
-}
-
-/*!
-    Returns the number of seconds that the session has been active.
-*/
-quint64 QNetworkSession::activeTime() const
-{
-    return d->activeTime();
-}
-
-/*!
-    \internal
-
-    This function is required to detect whether the client wants to control 
-    the roaming process. If he connects to preferredConfigurationChanged() signal
-    he intends to influence it. Otherwise QNetworkSession always roams
-    without registering this session as a stakeholder in the roaming process.
-
-    For more details check the Forced vs ALR roaming section in the QNetworkSession 
-    class description.
-*/
-void QNetworkSession::connectNotify(const char *signal)
-{
-    QObject::connectNotify(signal);
-    //check for preferredConfigurationChanged() signal connect notification
-    //This is not required on all platforms
-#ifdef Q_OS_SYMBIAN
-    if (qstrcmp(signal, SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool))) == 0) {
-        d->setALREnabled(true);
-    }
-#endif    
-}
-
-/*!
-    \internal
-
-    This function is called when the client disconnects from the preferredConfigurationChanged()
-    signal.
-
-    \sa connectNotify()
-*/
-void QNetworkSession::disconnectNotify(const char *signal)
-{
-    QObject::disconnectNotify(signal);
-    //check for preferredConfigurationChanged() signal disconnect notification
-    //This is not required on all platforms
-#ifdef Q_OS_SYMBIAN
-    if (qstrcmp(signal, SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool))) == 0) {
-        d->setALREnabled(false);
-    }    
-#endif    
-}
-
-#include "moc_qnetworksession.cpp"
-
-QTM_END_NAMESPACE
--- a/qtmobility/src/bearer/qnetworksession.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKSESSION_H
-#define QNETWORKSESSION_H
-
-#include "qmobilityglobal.h"
-
-#include <QtCore/qobject.h>
-#include <QtCore/qshareddata.h>
-#include <QtCore/qstring.h>
-#include <QtNetwork/qnetworkinterface.h>
-#include <QtCore/qvariant.h>
-#include "qnetworkconfiguration.h"
-
-
-QT_BEGIN_HEADER
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkSessionPrivate;
-class Q_BEARER_EXPORT QNetworkSession : public QObject
-{
-    Q_OBJECT
-public:
-    enum State {
-        Invalid = 0,
-        NotAvailable,
-        Connecting,
-        Connected,
-        Closing,
-        Disconnected,
-        Roaming
-    };
-
-    enum SessionError {
-        UnknownSessionError = 0,
-        SessionAbortedError,
-        RoamingError,
-        OperationNotSupportedError,
-        InvalidConfigurationError
-    };
-
-    explicit QNetworkSession(const QNetworkConfiguration& connConfig, QObject* parent =0);
-    virtual ~QNetworkSession();
-
-    bool isOpen() const;
-    QNetworkConfiguration configuration() const;
-    QNetworkInterface interface() const;
-
-    State state() const;
-    SessionError error() const;
-    QString errorString() const;
-    QVariant sessionProperty(const QString& key) const;
-    void setSessionProperty(const QString& key, const QVariant& value);
-
-    quint64 bytesWritten() const;
-    quint64 bytesReceived() const;
-    quint64 activeTime() const;
-    
-    bool waitForOpened(int msecs = 30000);
-
-public Q_SLOTS:
-    void open();
-    void close();
-    void stop();
-
-    //roaming related slots
-    void migrate();
-    void ignore();
-    void accept();
-    void reject();
-
-
-Q_SIGNALS:
-    void stateChanged(QNetworkSession::State);
-    void opened();
-    void closed();
-    void error(QNetworkSession::SessionError);
-    void preferredConfigurationChanged(const QNetworkConfiguration& config, bool isSeamless);
-    void newConfigurationActivated();
-
-protected:
-    virtual void connectNotify(const char *signal);
-    virtual void disconnectNotify(const char *signal);
-
-private:
-    QNetworkSessionPrivate* d;
-    friend class QNetworkSessionPrivate;
-    };
-
-QTM_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif //QNETWORKSESSION_H
--- a/qtmobility/src/bearer/qnetworksession_maemo.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1035 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QHash>
-
-#include "qnetworksession_maemo_p.h"
-
-#include <maemo_icd.h>
-#include <iapconf.h>
-#include <proxyconf.h>
-
-#include <ifaddrs.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-
-QDBusArgument &operator<<(QDBusArgument &argument,
-                          const QtMobility::ICd2DetailsDBusStruct &icd2)
-{
-    argument.beginStructure();
-    argument << icd2.serviceType;
-    argument << icd2.serviceAttributes;
-    argument << icd2.setviceId;
-    argument << icd2.networkType;
-    argument << icd2.networkAttributes;
-    argument << icd2.networkId;
-    argument.endStructure();
-    return argument;
-}
-
-const QDBusArgument &operator>>(const QDBusArgument &argument,
-                                QtMobility::ICd2DetailsDBusStruct &icd2)
-{
-    argument.beginStructure();
-    argument >> icd2.serviceType;
-    argument >> icd2.serviceAttributes;
-    argument >> icd2.setviceId;
-    argument >> icd2.networkType;
-    argument >> icd2.networkAttributes;
-    argument >> icd2.networkId;
-    argument.endStructure();
-    return argument;
-}
-
-const QDBusArgument &operator>>(const QDBusArgument &argument,
-                                QtMobility::ICd2DetailsList &detailsList)
-{
-     argument.beginArray();
-     detailsList.clear();
-
-     while (!argument.atEnd()) {
-         QtMobility::ICd2DetailsDBusStruct element;
-         argument >> element;
-         detailsList.append(element);
-     }
-
-     argument.endArray();
-     return argument;
-}
-
-QDBusArgument &operator<<(QDBusArgument &argument,
-                          const QtMobility::ICd2DetailsList &detailsList)
-{
-     argument.beginArray(qMetaTypeId<QtMobility::ICd2DetailsDBusStruct>());
-     for (int i = 0; i < detailsList.count(); ++i)
-         argument << detailsList[i];
-     argument.endArray();
-     return argument;
-}
-
-QTM_BEGIN_NAMESPACE
-
-static QHash<QString, QVariant> properties;
-
-static QString get_network_interface();
-
-void QNetworkSessionPrivate::iapStateChanged(const QString& iapid, uint icd_connection_state)
-{
-    if ((publicConfig.type() == QNetworkConfiguration::UserChoice) && opened) {
-        updateIdentifier(iapid);
-    }
-
-    if (((publicConfig.type() == QNetworkConfiguration::UserChoice) && (activeConfig.d->id == iapid)) ||
-        (publicConfig.d->id == iapid)) {
-        switch (icd_connection_state) {
-        case ICD_STATE_CONNECTING:
-            updateState(QNetworkSession::Connecting);
-            break;
-        case ICD_STATE_CONNECTED:
-            updateState(QNetworkSession::Connected);
-            break;
-        case ICD_STATE_DISCONNECTING:
-            updateState(QNetworkSession::Closing);
-            break;
-        case ICD_STATE_DISCONNECTED:
-            updateState(QNetworkSession::Disconnected);
-            break;
-        default:
-            break;
-        }
-    }
-}
-
-void QNetworkSessionPrivate::cleanupSession(void)
-{
-    QObject::disconnect(q, SIGNAL(stateChanged(QNetworkSession::State)), this, SLOT(updateProxies(QNetworkSession::State)));
-}
-
-
-void QNetworkSessionPrivate::updateState(QNetworkSession::State newState)
-{
-    if (newState != state) {
-        if (newState == QNetworkSession::Disconnected) {
-            if (isOpen) {
-                // The Session was aborted by the user or system
-                lastError = QNetworkSession::SessionAbortedError;
-                emit q->error(lastError);
-                emit q->closed();
-            }
-            if (m_stopTimer.isActive()) {
-                // Session was closed by calling stop()
-                m_stopTimer.stop();
-            }
-            isOpen = false;
-            opened = false;
-	    currentNetworkInterface.clear();
-            if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
-                copyConfig(publicConfig, activeConfig);
-                activeConfig.d->state = QNetworkConfiguration::Defined;
-            } else {
-                if (!activeConfig.isValid()) {
-                    // Active configuration (IAP) was removed from system
-                    // => Connection was disconnected and configuration became
-                    //    invalid
-                    // => Also Session state must be changed to invalid
-                    newState = QNetworkSession::Invalid;
-                }
-            }
-        } else if (newState == QNetworkSession::Connected) {
-            if (opened) {
-                isOpen = true;
-            }
-	    if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
-		activeConfig.d->state = QNetworkConfiguration::Active;
-		activeConfig.d->type = QNetworkConfiguration::InternetAccessPoint;
-	    }
-	    publicConfig.d->state = QNetworkConfiguration::Active;
-	}
-
-        if (newState != state) {
-            state = newState;
-            emit q->stateChanged(newState);
-        }
-    }
-}
-
-
-void QNetworkSessionPrivate::updateIdentifier(const QString &newId)
-{
-    if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
-	activeConfig.d->network_attrs |= ICD_NW_ATTR_IAPNAME;
-	activeConfig.d->id = newId;
-    } else {
-	publicConfig.d->network_attrs |= ICD_NW_ATTR_IAPNAME;
-	if (publicConfig.d->id != newId) {
-	    qWarning() << "Your config id changed from" << publicConfig.d->id << "to" << newId;
-	    publicConfig.d->id = newId;
-	}
-    }
-}
-
-
-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
-     * necessary.
-     */
-    Maemo::Icd icd;
-    QList<Maemo::IcdStatisticsResult> stats_results;
-    Statistics stats = { 0, 0, 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()) {
-                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;
-            }
-        }
-    }
-
-    return stats;
-}
-
-
-quint64 QNetworkSessionPrivate::bytesWritten() const
-{
-    return getStatistics().txData;
-}
-
-quint64 QNetworkSessionPrivate::bytesReceived() const
-{
-    return getStatistics().rxData;
-}
-
-quint64 QNetworkSessionPrivate::activeTime() const
-{
-    return getStatistics().activeTime;
-}
-
-
-QNetworkConfiguration& QNetworkSessionPrivate::copyConfig(QNetworkConfiguration &fromConfig, QNetworkConfiguration &toConfig, bool deepCopy)
-{
-    if (deepCopy) {
-        QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
-        QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr(cpPriv);
-        toConfig.d = ptr;
-    }
-
-    toConfig.d->name = fromConfig.d->name;
-    toConfig.d->isValid = fromConfig.d->isValid;
-    // Note that we do not copy id field here as the publicConfig does
-    // not contain a valid IAP id.
-    toConfig.d->state = fromConfig.d->state;
-    toConfig.d->type = fromConfig.d->type;
-    toConfig.d->roamingSupported = fromConfig.d->roamingSupported;
-    toConfig.d->purpose = fromConfig.d->purpose;
-    toConfig.d->network_id = fromConfig.d->network_id;
-    toConfig.d->iap_type = fromConfig.d->iap_type;
-    toConfig.d->network_attrs = fromConfig.d->network_attrs;
-    toConfig.d->service_type = fromConfig.d->service_type;
-    toConfig.d->service_id = fromConfig.d->service_id;
-    toConfig.d->service_attrs = fromConfig.d->service_attrs;
-    toConfig.d->manager = fromConfig.d->manager;
-
-    return toConfig;
-}
-
-
-/* This is called by QNetworkSession constructor and it updates the current
- * state of the configuration.
- */
-void QNetworkSessionPrivate::syncStateWithInterface()
-{
-    /* Initially we are not active although the configuration might be in
-     * connected state.
-     */
-    isOpen = false;
-    opened = false;
-
-    QObject::connect(&manager, SIGNAL(updateCompleted()), this, SLOT(networkConfigurationsChanged()));
-
-    if (publicConfig.d.data()) {
-	QNetworkConfigurationManagerPrivate* mgr = (QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager;
-	if (mgr) {
-            connect(mgr, SIGNAL(iapStateChanged(const QString&, uint)),
-                    this, SLOT(iapStateChanged(const QString&, uint)));
-	} else {
-            qWarning()<<"Manager object not set when trying to connect iapStateChanged signal. Your configuration object is not correctly setup, did you remember to call manager.updateConfigurations() before creating session object?";
-	    state = QNetworkSession::Invalid;
-	    lastError = QNetworkSession::UnknownSessionError;
-	    return;
-	}
-    }
-
-    QObject::connect(q, SIGNAL(stateChanged(QNetworkSession::State)), this, SLOT(updateProxies(QNetworkSession::State)));
-
-    state = QNetworkSession::Invalid;
-    lastError = QNetworkSession::UnknownSessionError;
-
-    switch (publicConfig.type()) {
-    case QNetworkConfiguration::InternetAccessPoint:
-        activeConfig = publicConfig;
-        break;
-    case QNetworkConfiguration::ServiceNetwork:
-        serviceConfig = publicConfig;
-	break;
-    case QNetworkConfiguration::UserChoice:
-	// active config will contain correct data after open() has succeeded
-        copyConfig(publicConfig, activeConfig);
-
-	/* We create new configuration that holds the actual configuration
-	 * returned by icd. This way publicConfig still contains the
-	 * original user specified configuration.
-	 *
-	 * Note that the new activeConfig configuration is not inserted
-	 * to configurationManager as manager class will get the newly
-	 * connected configuration from gconf when the IAP is saved.
-	 * This configuration manager update is done by IapMonitor class.
-	 * If the ANY connection fails in open(), then the configuration
-	 * data is not saved to gconf and will not be added to
-	 * configuration manager IAP list.
-	 */
-#ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug()<<"New configuration created for" << publicConfig.identifier();
-#endif
-	break;
-    default:
-	/* Invalid configuration, no point continuing */
-	return;
-    }
-
-    if (!activeConfig.isValid())
-	return;
-
-    /* Get the initial state from icd */
-    Maemo::Icd icd;
-    QList<Maemo::IcdStateResult> state_results;
-
-    /* Update the active config from first connection, this is ok as icd
-     * supports only one connection anyway.
-     */
-    if (icd.state(state_results) && !state_results.isEmpty()) {
-	/* If we did not get full state back, then we are not
-	 * connected and can skip the next part.
-	 */
-	if (!(state_results.first().params.network_attrs == 0 &&
-		state_results.first().params.network_id.isEmpty())) {
-
-	    /* If we try to connect to specific IAP and we get results back
-	     * that tell the icd is actually connected to another IAP,
-	     * then do not update current state etc.
-	     */
-	    if (publicConfig.type() == QNetworkConfiguration::UserChoice ||
-		    publicConfig.d->id == state_results.first().params.network_id) {
-		switch (state_results.first().state) {
-		case ICD_STATE_DISCONNECTED:
-                    state = QNetworkSession::Disconnected;
-		    if (activeConfig.d.data())
-			activeConfig.d->isValid = true;
-		    break;
-		case ICD_STATE_CONNECTING:
-                    state = QNetworkSession::Connecting;
-		    if (activeConfig.d.data())
-			activeConfig.d->isValid = true;
-		    break;
-		case ICD_STATE_CONNECTED:
-		    {
-                        if (!state_results.first().error.isEmpty())
-			    break;
-
-                        const QString id = state_results.first().params.network_id;
-
-                        QNetworkConfigurationManagerPrivate *mgr = (QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager;
-			if (mgr->accessPointConfigurations.contains(id)) {
-                            //we don't want the copied data if the config is already known by the manager
-                            //just reuse it so that existing references to the old data get the same update
-                            QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = mgr->accessPointConfigurations.value(id);
-                            activeConfig.d = priv;
-                        }
-
-			state = QNetworkSession::Connected;
-                        activeConfig.d->network_id = state_results.first().params.network_id;
-                        activeConfig.d->id = activeConfig.d->network_id;
-                        activeConfig.d->network_attrs = state_results.first().params.network_attrs;
-                        activeConfig.d->iap_type = state_results.first().params.network_type;
-                        activeConfig.d->service_type = state_results.first().params.service_type;
-                        activeConfig.d->service_id = state_results.first().params.service_id;
-                        activeConfig.d->service_attrs = state_results.first().params.service_attrs;
-                        activeConfig.d->type = QNetworkConfiguration::InternetAccessPoint;
-                        activeConfig.d->state = QNetworkConfiguration::Active;
-                        activeConfig.d->isValid = true;
-                        currentNetworkInterface = get_network_interface();
-
-			Maemo::IAPConf iap_name(activeConfig.d->id);
-			QString name_value = iap_name.value("name").toString();
-			if (!name_value.isEmpty())
-			    activeConfig.d->name = name_value;
-			else
-			    activeConfig.d->name = activeConfig.d->id;
-
-			// Add the new active configuration to manager or update the old config
-			mgr = (QNetworkConfigurationManagerPrivate*)activeConfig.d.data()->manager;
-			if (!(mgr->accessPointConfigurations.contains(activeConfig.d->id))) {
-			    QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr = activeConfig.d;
-			    mgr->accessPointConfigurations.insert(activeConfig.d->id, ptr);
-
-			    QNetworkConfiguration item;
-			    item.d = ptr;
-			    emit mgr->configurationAdded(item);
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-			    //qDebug()<<"New configuration"<<activeConfig.d->id<<"added to manager in sync";
-#endif
-
-                        }
-		    }
-		    break;
-
-		case ICD_STATE_DISCONNECTING:
-                    state = QNetworkSession::Closing;
-		    if (activeConfig.d.data())
-			activeConfig.d->isValid = true;
-		    break;
-		default:
-                    break;
-		}
-	    }
-	} else {
-#ifdef BEARER_MANAGEMENT_DEBUG
-	    qDebug() << "status_req tells icd is not connected";
-#endif
-	}
-    } else {
-#ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug() << "status_req did not return any results from icd";
-#endif
-    }
-
-    networkConfigurationsChanged();
-}
-
-
-void QNetworkSessionPrivate::networkConfigurationsChanged()
-{
-    if (serviceConfig.isValid())
-        updateStateFromServiceNetwork();
-    else
-        updateStateFromActiveConfig();
-}
-
-
-void QNetworkSessionPrivate::updateStateFromServiceNetwork()
-{
-    QNetworkSession::State oldState = state;
-
-    foreach (const QNetworkConfiguration &config, serviceConfig.children()) {
-        if ((config.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active)
-            continue;
-
-        if (activeConfig != config) {
-            activeConfig = config;
-            emit q->newConfigurationActivated();
-        }
-
-        state = QNetworkSession::Connected;
-        if (state != oldState)
-            emit q->stateChanged(state);
-
-        return;
-    }
-
-    if (serviceConfig.children().isEmpty())
-        state = QNetworkSession::NotAvailable;
-    else
-        state = QNetworkSession::Disconnected;
-
-    if (state != oldState)
-        emit q->stateChanged(state);
-}
-
-
-void QNetworkSessionPrivate::clearConfiguration(QNetworkConfiguration &config)
-{
-    config.d->network_id.clear();
-    config.d->iap_type.clear();
-    config.d->network_attrs = 0;
-    config.d->service_type.clear();
-    config.d->service_id.clear();
-    config.d->service_attrs = 0;
-}
-
-
-void QNetworkSessionPrivate::updateStateFromActiveConfig()
-{
-    QNetworkSession::State oldState = state;
-
-    bool newActive = false;
-
-    if (!activeConfig.d.data())
-	return;
-
-    if (!activeConfig.isValid()) {
-        state = QNetworkSession::Invalid;
-	clearConfiguration(activeConfig);
-    } else if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
-        state = QNetworkSession::Connected;
-        newActive = opened;
-    } else if ((activeConfig.state() & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
-        state = QNetworkSession::Disconnected;
-    } else if ((activeConfig.state() & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined) {
-        state = QNetworkSession::NotAvailable;
-    } else if ((activeConfig.state() & QNetworkConfiguration::Undefined) == QNetworkConfiguration::Undefined) {
-        state = QNetworkSession::NotAvailable;
-    }
-
-    bool oldActive = isOpen;
-    isOpen = newActive;
-
-    if (!oldActive && isOpen)
-        emit quitPendingWaitsForOpened();
-
-    if (oldActive && !isOpen)
-        emit q->closed();
-
-    if (oldState != state) {
-        emit q->stateChanged(state);
-
-        if (state == QNetworkSession::Disconnected && oldActive) {
-#ifdef BEARER_MANAGEMENT_DEBUG
-	    //qDebug()<<"session aborted error emitted for"<<activeConfig.identifier();
-#endif
-	    lastError = QNetworkSession::SessionAbortedError;
-	    emit q->error(lastError);
-	}
-    }
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-    //qDebug()<<"oldState ="<<oldState<<" state ="<<state<<" oldActive ="<<oldActive<<" newActive ="<<newActive<<" opened ="<<opened;
-#endif
-}
-
-static QString get_network_interface()
-{
-    Maemo::Icd icd;
-    QList<Maemo::IcdAddressInfoResult> addr_results;
-    uint ret;
-    QString iface;
-
-    ret = icd.addrinfo(addr_results);
-    if (ret == 0) {
-	/* No results */
-#ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug() << "Cannot get addrinfo from icd, are you connected or is icd running?";
-#endif
-	return iface;
-    }
-
-    const char *address = addr_results.first().ip_info.first().address.toAscii().constData();
-    struct in_addr addr;
-    if (inet_aton(address, &addr) == 0) {
-#ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug() << "address" << address << "invalid";
-#endif
-	return iface;
-    }
-
-    struct ifaddrs *ifaddr, *ifa;
-    int family;
-
-    if (getifaddrs(&ifaddr) == -1) {
-#ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug() << "getifaddrs() failed";
-#endif
-	return iface;
-    }
-
-    for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
-        if (ifa->ifa_addr) {
-            family = ifa->ifa_addr->sa_family;
-            if (family != AF_INET) {
-                continue; /* Currently only IPv4 is supported by icd dbus interface */
-            }
-            if (((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr == addr.s_addr) {
-                iface = QString(ifa->ifa_name);
-                break;
-            }
-        }
-    }
-
-    freeifaddrs(ifaddr);
-    return iface;
-}
-
-
-void QNetworkSessionPrivate::open()
-{
-    if (m_stopTimer.isActive()) {
-        m_stopTimer.stop();
-    }
-    if (!publicConfig.isValid()) {
-        lastError = QNetworkSession::InvalidConfigurationError;
-        emit q->error(lastError);
-        return;
-    }
-    if (serviceConfig.isValid()) {
-        lastError = QNetworkSession::OperationNotSupportedError;
-        emit q->error(lastError);
-    } else if (!isOpen) {
-	if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
-	    /* Caller is trying to connect to default IAP.
-	     * At this time we will not know the IAP details so we just
-	     * connect and update the active config when the IAP is
-	     * connected.
-	     */
-	    opened = true;
-            state = QNetworkSession::Connecting;
-            emit q->stateChanged(state);
-	    QTimer::singleShot(0, this, SLOT(do_open()));
-	    return;
-	}
-
-	/* User is connecting to one specific IAP. If that IAP is not
-	 * in discovered state we cannot continue.
-	 */
-        if ((activeConfig.state() & QNetworkConfiguration::Discovered) !=
-            QNetworkConfiguration::Discovered) {
-            lastError =QNetworkSession::InvalidConfigurationError;
-            emit q->error(lastError);
-            return;
-        }
-        opened = true;
-
-        if ((activeConfig.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active) {
-            state = QNetworkSession::Connecting;
-            emit q->stateChanged(state);
-            QTimer::singleShot(0, this, SLOT(do_open()));
-            return;
-        }
-        isOpen = (activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active;
-        if (isOpen)
-            emit quitPendingWaitsForOpened();
-    } else {
-        /* We seem to be active so inform caller */
-        emit quitPendingWaitsForOpened();
-    }
-}
-
-void QNetworkSessionPrivate::do_open()
-{
-    icd_connection_flags flags = connectFlags;
-    QString iap = publicConfig.identifier();
-
-    if (state == QNetworkSession::Connected) {
-#ifdef BEARER_MANAGEMENT_DEBUG
-        qDebug() << "Already connected to" << activeConfig.identifier();
-#endif
-        emit q->stateChanged(QNetworkSession::Connected);
-        emit quitPendingWaitsForOpened();
-	return;
-    }
-
-    if (publicConfig.type() == QNetworkConfiguration::UserChoice)
-        config = activeConfig;
-    else
-        config = publicConfig;
-
-    if (iap == OSSO_IAP_ANY) {
-#ifdef BEARER_MANAGEMENT_DEBUG
-        qDebug() << "connecting to default IAP" << iap;
-#endif
-        m_connectRequestTimer.start(ICD_LONG_CONNECT_TIMEOUT);
-        m_dbusInterface->asyncCall(ICD_DBUS_API_CONNECT_REQ, (uint)flags); // Return value ignored
-        m_asynchCallActive = true;
-    } else {
-        ICd2DetailsDBusStruct icd2;
-        icd2.serviceType = config.d->service_type;
-        icd2.serviceAttributes = config.d->service_attrs;
-        icd2.setviceId = config.d->service_id;
-        icd2.networkType = config.d->iap_type;
-        icd2.networkAttributes = config.d->network_attrs;
-        if (config.d->network_attrs & ICD_NW_ATTR_IAPNAME) {
-            icd2.networkId  = QByteArray(iap.toLatin1());
-        } else {
-            icd2.networkId  = config.d->network_id;
-        }
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-    qDebug("connecting to %s/%s/0x%x/%s/0x%x/%s",
-        icd2.networkId.data(),
-        icd2.networkType.toAscii().constData(),
-        icd2.networkAttributes,
-        icd2.serviceType.toAscii().constData(),
-        icd2.serviceAttributes,
-        icd2.setviceId.toAscii().constData());
-#endif
-
-        ICd2DetailsList paramArray;
-        paramArray.append(icd2);
-        m_connectRequestTimer.start(ICD_LONG_CONNECT_TIMEOUT);
-        m_dbusInterface->asyncCall(ICD_DBUS_API_CONNECT_REQ, (uint)flags, QVariant::fromValue(paramArray)); // Return value ignored
-        m_asynchCallActive = true;
-    }
-}
-
- void QNetworkSessionPrivate::stateChange(const QDBusMessage& rep)
-{
-     if (m_asynchCallActive == true) {
-        if (m_connectRequestTimer.isActive())
-            m_connectRequestTimer.stop();
-        m_asynchCallActive = false;
-
-        QString result = rep.arguments().at(5).toString(); // network id or empty string
-        QString connected_iap = result;
-        if (connected_iap.isEmpty()) {
-#ifdef BEARER_MANAGEMENT_DEBUG
-            qDebug() << "connect to"<< publicConfig.identifier() << "failed, result is empty";
-#endif
-            updateState(QNetworkSession::Disconnected);
-            emit q->error(QNetworkSession::InvalidConfigurationError);
-            if (publicConfig.type() == QNetworkConfiguration::UserChoice)
-                    copyConfig(publicConfig, activeConfig);
-            return;
-        }
-
-         /* If the user tried to connect to some specific connection (foo)
-         * and we were already connected to some other connection (bar),
-         * then we cannot activate this session although icd has a valid
-         * connection to somewhere.
-         */
-        if ((publicConfig.type() != QNetworkConfiguration::UserChoice) &&
-            (connected_iap != config.identifier())) {
-            updateState(QNetworkSession::Disconnected);
-            emit q->error(QNetworkSession::InvalidConfigurationError);
-            return;
-        }
-
-        /* Did we connect to non saved IAP? */
-        if (!(config.d->network_attrs & ICD_NW_ATTR_IAPNAME)) {
-            /* Because the connection succeeded, the IAP is now known.
-             */
-            config.d->network_attrs |= ICD_NW_ATTR_IAPNAME;
-            config.d->id = connected_iap;
-        }
-
-        /* User might have changed the IAP name when a new IAP was saved */
-        Maemo::IAPConf iap_name(config.d->id);
-        QString name = iap_name.value("name").toString();
-        if (!name.isEmpty())
-            config.d->name = name;
-
-        config.d->iap_type = rep.arguments().at(3).toString(); // connect_result.connect.network_type;
-        config.d->isValid = true;
-        config.d->state = QNetworkConfiguration::Active;
-        config.d->type = QNetworkConfiguration::InternetAccessPoint;
-
-        startTime = QDateTime::currentDateTime();
-        updateState(QNetworkSession::Connected);
-        //currentNetworkInterface = get_network_interface();
-#ifdef BEARER_MANAGEMENT_DEBUG
-        //qDebug() << "connected to" << result << config.d->name << "at" << currentNetworkInterface;
-#endif
-
-        /* We first check if the configuration already exists in the manager
-         * and if it is not found there, we then insert it. Note that this
-         * is only done for user choice config only because it can be missing
-         * from config manager list.
-         */
-        if (publicConfig.d->type == QNetworkConfiguration::UserChoice) {
-#ifdef BEARER_MANAGEMENT_DEBUG
-#if 0
-            QList<QNetworkConfiguration> configs;
-            QNetworkConfigurationManagerPrivate *conPriv = (QNetworkConfigurationManagerPrivate*)config.d.data()->manager;
-            QList<QString> cpsIdents = conPriv->accessPointConfigurations.keys();
-            foreach( QString ii, cpsIdents) {
-                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> p =
-                        conPriv->accessPointConfigurations.value(ii);
-                QNetworkConfiguration pt;
-                pt.d = conPriv->accessPointConfigurations.value(ii);
-                configs << pt;
-            }
-
-            int all = configs.count();
-            qDebug() << "All configurations:" << all;
-            foreach(QNetworkConfiguration p, configs) {
-                qDebug() << p.name() <<":  isvalid->" <<p.isValid() << " type->"<< p.type() <<
-                        " roaming->" << p.isRoamingAvailable() << "identifier->" << p.identifier() <<
-                        " purpose->" << p.purpose() << " state->" << p.state();
-            }
-#endif
-#endif
-            QNetworkConfigurationManagerPrivate *mgr = (QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager;
-            if (!mgr->accessPointConfigurations.contains(result)) {
-                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr = config.d;
-                mgr->accessPointConfigurations.insert(result, ptr);
-
-                QNetworkConfiguration item;
-                item.d = ptr;
-                emit mgr->configurationAdded(item);
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-            qDebug()<<"New configuration"<<result<<"added to manager in open";
-#endif
-
-            } else {
-                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = mgr->accessPointConfigurations.value(result);
-                QNetworkConfiguration reference;
-                reference.d = priv;
-                copyConfig(config, reference, false);
-                reference.d.data()->id = result; // Note: Id was not copied in copyConfig() function
-                config = reference;
-                activeConfig = reference;
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-                qDebug()<<"Existing configuration"<<result<<"updated in manager in open";
-#endif
-            }
-        }
-
-        emit quitPendingWaitsForOpened();
-    }
-}
-
-void QNetworkSessionPrivate::connectTimeout()
-{
-    updateState(QNetworkSession::Disconnected);
-    if (publicConfig.type() == QNetworkConfiguration::UserChoice)
-            copyConfig(publicConfig, activeConfig);
-        emit q->error(QNetworkSession::UnknownSessionError);
-}
-
-void QNetworkSessionPrivate::close()
-{
-    if (m_connectRequestTimer.isActive())
-        m_connectRequestTimer.stop();
-
-    if (serviceConfig.isValid()) {
-        lastError = QNetworkSession::OperationNotSupportedError;
-        emit q->error(lastError);
-    } else if (isOpen) {
-        opened = false;
-        isOpen = false;
-        emit q->closed();
-    }
-}
-
-
-void QNetworkSessionPrivate::stop()
-{
-    if (m_connectRequestTimer.isActive())
-        m_connectRequestTimer.stop();
-
-    if (serviceConfig.isValid()) {
-        lastError = QNetworkSession::OperationNotSupportedError;
-        emit q->error(lastError);
-    } else {
-        if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
-            if (!m_stopTimer.isActive()) {
-                Maemo::Icd icd;
-#ifdef BEARER_MANAGEMENT_DEBUG
-                qDebug() << "stopping session" << publicConfig.identifier();
-#endif
-                state = QNetworkSession::Closing;
-                emit q->stateChanged(state);
-
-                opened = false;
-                isOpen = false;
-
-                icd.disconnect(ICD_CONNECTION_FLAG_APPLICATION_EVENT);
-                startTime = QDateTime();
-
-                /* Note: Session state will change to disconnected
-                 *       as soon as QNetworkConfigurationManager sends
-                 *       corresponding iapStateChanged signal.
-                 */
-
-                // Make sure that this Session will send closed signal
-                // even though ICD connection will not ever get closed
-                m_stopTimer.start(ICD_SHORT_CONNECT_TIMEOUT); // 10 seconds wait
-            }
-        } else {
-	    opened = false;
-	    isOpen = false;
-	    emit q->closed();
-	}
-    }
-}
-
-void QNetworkSessionPrivate::finishStopBySendingClosedSignal()
-{
-    if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
-        state = QNetworkSession::Connected;
-        emit q->stateChanged(state);
-    }
-    emit q->closed();
-}
-
-void QNetworkSessionPrivate::migrate()
-{
-    qWarning("This platform does not support roaming (%s).", __FUNCTION__);
-}
-
-
-void QNetworkSessionPrivate::accept()
-{
-    qWarning("This platform does not support roaming (%s).", __FUNCTION__);
-}
-
-
-void QNetworkSessionPrivate::ignore()
-{
-    qWarning("This platform does not support roaming (%s).", __FUNCTION__);
-}
-
-
-void QNetworkSessionPrivate::reject()
-{
-    qWarning("This platform does not support roaming (%s).", __FUNCTION__);
-}
-
-
-QNetworkInterface QNetworkSessionPrivate::currentInterface() const
-{
-    if (!publicConfig.isValid() || state != QNetworkSession::Connected)
-        return QNetworkInterface();
-
-    if (currentNetworkInterface.isEmpty())
-        return QNetworkInterface();
-
-    return QNetworkInterface::interfaceFromName(currentNetworkInterface);
-}
-
-
-void QNetworkSessionPrivate::setSessionProperty(const QString& key, const QVariant& value)
-{
-    if (value.isValid()) {
-	properties.insert(key, value);
-
-	if (key == "ConnectInBackground") {
-	    bool v = value.toBool();
-	    if (v)
-		connectFlags = ICD_CONNECTION_FLAG_APPLICATION_EVENT;
-	    else
-		connectFlags = ICD_CONNECTION_FLAG_USER_EVENT;
-	}
-    } else {
-	properties.remove(key);
-
-	/* Set default value when property is removed */
-	if (key == "ConnectInBackground")
-	    connectFlags = ICD_CONNECTION_FLAG_USER_EVENT;
-    }
-}
-
-
-QVariant QNetworkSessionPrivate::sessionProperty(const QString& key) const
-{
-    return properties.value(key);
-}
-
-
-QString QNetworkSessionPrivate::errorString() const
-{
-    QString errorStr;
-    switch(q->error()) {
-    case QNetworkSession::RoamingError:
-        errorStr = QObject::tr("Roaming error");
-        break;
-    case QNetworkSession::SessionAbortedError:
-        errorStr = QObject::tr("Session aborted by user or system");
-        break;
-    default:
-    case QNetworkSession::UnknownSessionError:
-        errorStr = QObject::tr("Unidentified Error");
-        break;
-    }
-    return errorStr;
-}
-
-
-QNetworkSession::SessionError QNetworkSessionPrivate::error() const
-{
-    return QNetworkSession::UnknownSessionError;
-}
-
-
-void QNetworkSessionPrivate::updateProxies(QNetworkSession::State newState)
-{
-    if ((newState == QNetworkSession::Connected) &&
-	(newState != currentState))
-	updateProxyInformation();
-    else if ((newState == QNetworkSession::Disconnected) &&
-	    (currentState == QNetworkSession::Closing))
-	clearProxyInformation();
-
-    currentState = newState;
-}
-
-
-void QNetworkSessionPrivate::updateProxyInformation()
-{
-    Maemo::ProxyConf::update();
-}
-
-
-void QNetworkSessionPrivate::clearProxyInformation()
-{
-    Maemo::ProxyConf::clear();
-}
-
-
-#include "moc_qnetworksession_maemo_p.cpp"
-
-QTM_END_NAMESPACE
--- a/qtmobility/src/bearer/qnetworksession_maemo_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,228 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKSESSIONPRIVATE_H
-#define QNETWORKSESSIONPRIVATE_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists for the convenience
-// of the QLibrary class.  This header file may change from
-// version to version without notice, or even be removed.
-//
-// We mean it.
-//
-#include "qnetworkconfigmanager_maemo_p.h"
-#include "qnetworksession.h"
-
-#include <qnetworksession.h>
-#include <QNetworkInterface>
-#include <QDateTime>
-#include <QTimer>
-
-#include <icd/dbus_api.h>
-
-QTM_BEGIN_NAMESPACE
-
-struct ICd2DetailsDBusStruct
-{
-    QString serviceType;
-    uint serviceAttributes;
-    QString setviceId;
-    QString networkType;
-    uint networkAttributes;
-    QByteArray networkId;
-};
-
-typedef QList<ICd2DetailsDBusStruct> ICd2DetailsList;
-
-class QNetworkSessionPrivate : public QObject
-{
-    Q_OBJECT
-public:
-    QNetworkSessionPrivate() : 
-        isOpen(false),
-        connectFlags(ICD_CONNECTION_FLAG_USER_EVENT),
-        currentState(QNetworkSession::Invalid),
-        m_asynchCallActive(false)
-    {
-        m_stopTimer.setSingleShot(true);
-        connect(&m_stopTimer, SIGNAL(timeout()), this, SLOT(finishStopBySendingClosedSignal()));
-
-        QDBusConnection systemBus = QDBusConnection::systemBus();
-
-        m_dbusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE,
-                                         ICD_DBUS_API_PATH,
-                                         ICD_DBUS_API_INTERFACE,
-                                         systemBus,
-                                         this);
-
-        systemBus.connect(ICD_DBUS_API_INTERFACE,
-                        ICD_DBUS_API_PATH,
-                        ICD_DBUS_API_INTERFACE,
-                        ICD_DBUS_API_CONNECT_SIG,
-                        this,
-                        SLOT(stateChange(const QDBusMessage&)));
-
-        qDBusRegisterMetaType<ICd2DetailsDBusStruct>();
-        qDBusRegisterMetaType<ICd2DetailsList>();
-
-        m_connectRequestTimer.setSingleShot(true);
-        connect(&m_connectRequestTimer, SIGNAL(timeout()), this, SLOT(connectTimeout()));
-    }
-
-    ~QNetworkSessionPrivate()
-    {
-	cleanupSession();
-    }
-
-    //called by QNetworkSession constructor and ensures
-    //that the state is immediately updated (w/o actually opening
-    //a session). Also this function should take care of 
-    //notification hooks to discover future state changes.
-    void syncStateWithInterface();
-
-    QNetworkInterface currentInterface() const;
-    QVariant sessionProperty(const QString& key) const;
-    void setSessionProperty(const QString& key, const QVariant& value);
-
-    void open();
-    void close();
-    void stop();
-    void migrate();
-    void accept();
-    void ignore();
-    void reject();
-
-    QString errorString() const; //must return translated string
-    QNetworkSession::SessionError error() const;
-
-    quint64 bytesWritten() const;
-    quint64 bytesReceived() const;
-    quint64 activeTime() const;
-
-private:
-    void updateStateFromServiceNetwork();
-    void updateStateFromActiveConfig();
-
-Q_SIGNALS:
-    //releases any pending waitForOpened() calls
-    void quitPendingWaitsForOpened();
-
-private Q_SLOTS:
-    void do_open();
-    void networkConfigurationsChanged();
-    void iapStateChanged(const QString& iapid, uint icd_connection_state);
-    void updateProxies(QNetworkSession::State newState);
-    void finishStopBySendingClosedSignal();
-    void stateChange(const QDBusMessage& rep);
-    void connectTimeout();
-
-private:
-    QNetworkConfigurationManager manager;
-
-    struct Statistics {
-        quint64 txData;
-        quint64 rxData;
-        quint64 activeTime;
-    };
-
-    // The config set on QNetworkSession.
-    QNetworkConfiguration publicConfig;
-    QNetworkConfiguration config;
-
-    // If publicConfig is a ServiceNetwork this is a copy of publicConfig.
-    // If publicConfig is an UserChoice that is resolved to a ServiceNetwork this is the actual
-    // ServiceNetwork configuration.
-    QNetworkConfiguration serviceConfig;
-
-    // This is the actual active configuration currently in use by the session.
-    // Either a copy of publicConfig or one of serviceConfig.children().
-    QNetworkConfiguration activeConfig;
-
-    QNetworkConfiguration& copyConfig(QNetworkConfiguration &fromConfig, QNetworkConfiguration &toConfig, bool deepCopy = true);
-    void clearConfiguration(QNetworkConfiguration &config);
-
-    QNetworkSession::State state;
-    bool isOpen;
-    bool opened;
-    icd_connection_flags connectFlags;
-
-    QNetworkSession::SessionError lastError;
-
-    QNetworkSession* q;
-    friend class QNetworkSession;
-
-    QDateTime startTime;
-    QString currentNetworkInterface;
-    friend class IcdListener;
-    void updateState(QNetworkSession::State);
-    void updateIdentifier(const QString &newId);
-    Statistics getStatistics() const;
-    void cleanupSession(void);
-
-    void updateProxyInformation();
-    void clearProxyInformation();
-    QNetworkSession::State currentState;
-
-    QDBusInterface *m_dbusInterface;
-
-    QTimer m_stopTimer;
-
-    bool m_asynchCallActive;
-    QTimer m_connectRequestTimer;
-};
-
-QTM_END_NAMESPACE
-
-// Marshall the ICd2DetailsDBusStruct data into a D-Bus argument
-QDBusArgument &operator<<(QDBusArgument &argument, const QtMobility::ICd2DetailsDBusStruct &icd2);
-
-// Retrieve the ICd2DetailsDBusStruct data from the D-Bus argument
-const QDBusArgument &operator>>(const QDBusArgument &argument, QtMobility::ICd2DetailsDBusStruct &icd2);
-
-Q_DECLARE_METATYPE(QtMobility::ICd2DetailsDBusStruct);
-Q_DECLARE_METATYPE(QtMobility::ICd2DetailsList);
-
-#endif //QNETWORKSESSIONPRIVATE_H
-
--- a/qtmobility/src/bearer/qnetworksession_p.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,535 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnetworksession_p.h"
-#include "qnetworksession.h"
-#include "qnetworksessionengine_p.h"
-#include "qgenericengine_p.h"
-
-#ifdef Q_OS_WIN
-#include "qnlaengine_win_p.h"
-#endif
-#ifdef Q_OS_WIN32
-#include "qnativewifiengine_win_p.h"
-#endif
-#ifdef Q_OS_DARWIN
-#include "qcorewlanengine_mac_p.h"
-#endif
-#include <QtCore/qstringlist.h>
-#include <QtCore/qdebug.h>
-#include <QtCore/qmutex.h>
-
-#include <QtNetwork/qnetworkinterface.h>
-
-#if defined(BACKEND_NM)
-#include "qnmwifiengine_unix_p.h"
-#endif
-
-QTM_BEGIN_NAMESPACE
-
-#if defined(BACKEND_NM)
-static bool NetworkManagerAvailable()
-{
-    QDBusConnection dbusConnection = QDBusConnection::systemBus();
-    if (dbusConnection.isConnected()) {
-        QDBusConnectionInterface *dbiface = dbusConnection.interface();
-        QDBusReply<bool> reply = dbiface->isServiceRegistered("org.freedesktop.NetworkManager");
-        if (reply.isValid())
-            return reply.value();
-    }
-    return false;
-}
-#endif
-
-static QNetworkSessionEngine *getEngineFromId(const QString &id)
-{
-#ifdef Q_OS_WIN
-    QNlaEngine *nla = QNlaEngine::instance();
-    if (nla && nla->hasIdentifier(id))
-        return nla;
-#endif
-
-#ifdef Q_OS_WIN32
-    QNativeWifiEngine *nativeWifi = QNativeWifiEngine::instance();
-    if (nativeWifi && nativeWifi->hasIdentifier(id))
-        return nativeWifi;
-#endif
-
-#if defined(BACKEND_NM)
-    if(NetworkManagerAvailable()) {
-        QNmWifiEngine *nmwiifi = QNmWifiEngine::instance();
-        if (nmwiifi && nmwiifi->hasIdentifier(id))
-            return nmwiifi;
-    }
-#endif
-#ifdef Q_OS_DARWIN
-    QCoreWlanEngine *coreWifi = QCoreWlanEngine::instance();
-    if (coreWifi && coreWifi->hasIdentifier(id))
-        return coreWifi;
-
-#endif
-    QGenericEngine *generic = QGenericEngine::instance();
-    if (generic && generic->hasIdentifier(id))
-        return generic;
-
-    return 0;
-}
-
-class QNetworkSessionManagerPrivate : public QObject
-{
-    Q_OBJECT
-
-public:
-    QNetworkSessionManagerPrivate(QObject *parent = 0);
-    ~QNetworkSessionManagerPrivate();
-
-    void forceSessionClose(const QNetworkConfiguration &config);
-
-Q_SIGNALS:
-    void forcedSessionClose(const QNetworkConfiguration &config);
-};
-
-#include "qnetworksession_p.moc"
-
-Q_GLOBAL_STATIC(QNetworkSessionManagerPrivate, sessionManager);
-
-QNetworkSessionManagerPrivate::QNetworkSessionManagerPrivate(QObject *parent)
-:   QObject(parent)
-{
-}
-
-QNetworkSessionManagerPrivate::~QNetworkSessionManagerPrivate()
-{
-}
-
-void QNetworkSessionManagerPrivate::forceSessionClose(const QNetworkConfiguration &config)
-{
-    emit forcedSessionClose(config);
-}
-
-void QNetworkSessionPrivate::syncStateWithInterface()
-{
-    connect(&manager, SIGNAL(updateCompleted()), this, SLOT(networkConfigurationsChanged()));
-    connect(&manager, SIGNAL(configurationChanged(QNetworkConfiguration)),
-            this, SLOT(configurationChanged(QNetworkConfiguration)));
-    connect(sessionManager(), SIGNAL(forcedSessionClose(QNetworkConfiguration)),
-            this, SLOT(forcedSessionClose(QNetworkConfiguration)));
-
-    opened = false;
-    state = QNetworkSession::Invalid;
-    lastError = QNetworkSession::UnknownSessionError;
-
-    qRegisterMetaType<QNetworkSessionEngine::ConnectionError>
-        ("QNetworkSessionEngine::ConnectionError");
-
-    switch (publicConfig.type()) {
-    case QNetworkConfiguration::InternetAccessPoint:
-        activeConfig = publicConfig;
-        engine = getEngineFromId(activeConfig.identifier());
-        if (engine) {
-            connect(engine, SIGNAL(connectionError(QString,QNetworkSessionEngine::ConnectionError)),
-                    this, SLOT(connectionError(QString,QNetworkSessionEngine::ConnectionError)),
-                    Qt::QueuedConnection);
-        }
-        break;
-    case QNetworkConfiguration::ServiceNetwork:
-        serviceConfig = publicConfig;
-        // Defer setting engine and signals until open().
-        // fall through
-    case QNetworkConfiguration::UserChoice:
-        // Defer setting serviceConfig and activeConfig until open().
-        // fall through
-    default:
-        engine = 0;
-    }
-
-    networkConfigurationsChanged();
-}
-
-void QNetworkSessionPrivate::open()
-{
-    if (serviceConfig.isValid()) {
-        lastError = QNetworkSession::OperationNotSupportedError;
-        emit q->error(lastError);
-    } else if (!isOpen) {
-        if ((activeConfig.state() & QNetworkConfiguration::Discovered) !=
-            QNetworkConfiguration::Discovered) {
-            lastError =QNetworkSession::InvalidConfigurationError;
-            emit q->error(lastError);
-            return;
-        }
-        opened = true;
-
-        if ((activeConfig.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active &&
-            (activeConfig.state() & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
-            state = QNetworkSession::Connecting;
-            emit q->stateChanged(state);
-
-            engine->connectToId(activeConfig.identifier());
-        }
-
-        isOpen = (activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active;
-        if (isOpen)
-            emit quitPendingWaitsForOpened();
-    }
-}
-
-void QNetworkSessionPrivate::close()
-{
-    if (serviceConfig.isValid()) {
-        lastError = QNetworkSession::OperationNotSupportedError;
-        emit q->error(lastError);
-    } else if (isOpen) {
-        opened = false;
-        isOpen = false;
-        emit q->closed();
-    }
-}
-
-void QNetworkSessionPrivate::stop()
-{
-    if (serviceConfig.isValid()) {
-        lastError = QNetworkSession::OperationNotSupportedError;
-        emit q->error(lastError);
-    } else {
-        if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
-            state = QNetworkSession::Closing;
-            emit q->stateChanged(state);
-
-            engine->disconnectFromId(activeConfig.identifier());
-
-            sessionManager()->forceSessionClose(activeConfig);
-        }
-
-        opened = false;
-        isOpen = false;
-        emit q->closed();
-    }
-}
-
-void QNetworkSessionPrivate::migrate()
-{
-    qWarning("This platform does not support roaming (%s).", __FUNCTION__);
-}
-
-void QNetworkSessionPrivate::accept()
-{
-    qWarning("This platform does not support roaming (%s).", __FUNCTION__);
-}
-
-void QNetworkSessionPrivate::ignore()
-{
-    qWarning("This platform does not support roaming (%s).", __FUNCTION__);
-}
-
-void QNetworkSessionPrivate::reject()
-{
-    qWarning("This platform does not support roaming (%s).", __FUNCTION__);
-}
-
-QNetworkInterface QNetworkSessionPrivate::currentInterface() const
-{
-    if (!publicConfig.isValid() || !engine || state != QNetworkSession::Connected)
-        return QNetworkInterface();
-
-    QString interface = engine->getInterfaceFromId(activeConfig.identifier());
-
-    if (interface.isEmpty())
-        return QNetworkInterface();
-    return QNetworkInterface::interfaceFromName(interface);
-}
-
-QVariant QNetworkSessionPrivate::sessionProperty(const QString& /*key*/) const
-{
-    return QVariant();
-}
-
-void QNetworkSessionPrivate::setSessionProperty(const QString& /*key*/, const QVariant& /*value*/)
-{
-}
-
-/*QString QNetworkSessionPrivate::bearerName() const
-{
-    if (!publicConfig.isValid() || !engine)
-        return QString();
-
-    return engine->bearerName(activeConfig.identifier());
-}*/
-
-QString QNetworkSessionPrivate::errorString() const
-{
-    switch (lastError) {
-    case QNetworkSession::UnknownSessionError:
-        return tr("Unknown session error.");
-    case QNetworkSession::SessionAbortedError:
-        return tr("The session was aborted by the user or system.");
-    case QNetworkSession::OperationNotSupportedError:
-        return tr("The requested operation is not supported by the system.");
-    case QNetworkSession::InvalidConfigurationError:
-        return tr("The specified configuration cannot be used.");
-    case QNetworkSession::RoamingError:
-        return tr("Roaming was aborted or is not possible.");
-
-    }
-
-    return QString();
-}
-
-QNetworkSession::SessionError QNetworkSessionPrivate::error() const
-{
-    return lastError;
-}
-
-quint64 QNetworkSessionPrivate::bytesWritten() const
-{
-#if defined(BACKEND_NM)
-    if( NetworkManagerAvailable() && state == QNetworkSession::Connected ) {
-        if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
-            foreach (const QNetworkConfiguration &config, publicConfig.children()) {
-                if ((config.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
-                    return static_cast<QNmWifiEngine*>(getEngineFromId(config.d->id))->sentDataForId(config.d->id);
-                }
-            }
-        } else {
-            return static_cast<QNmWifiEngine*>(getEngineFromId(activeConfig.d->id))->sentDataForId(activeConfig.d->id);
-        }
-    }
-#endif
-    return tx_data;
-}
-
-quint64 QNetworkSessionPrivate::bytesReceived() const
-{
-#if defined(BACKEND_NM)
-    if( NetworkManagerAvailable() && state == QNetworkSession::Connected ) {
-        if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
-            foreach (const QNetworkConfiguration &config, publicConfig.children()) {
-                if ((config.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
-                    return static_cast<QNmWifiEngine*>(getEngineFromId(activeConfig.d->id))->receivedDataForId(config.d->id);
-                }
-            }
-        } else {
-            return static_cast<QNmWifiEngine*>(getEngineFromId(activeConfig.d->id))->receivedDataForId(activeConfig.d->id);
-        }
-    }
-#endif
-    return rx_data;
-}
-
-quint64 QNetworkSessionPrivate::activeTime() const
-{
-#if defined(BACKEND_NM)
-    if (startTime.isNull()) {
-        return 0;
-    }
-    if(state == QNetworkSession::Connected )
-        return startTime.secsTo(QDateTime::currentDateTime());
-#endif
-    return m_activeTime;
-}
-
-void QNetworkSessionPrivate::updateStateFromServiceNetwork()
-{
-    QNetworkSession::State oldState = state;
-
-    foreach (const QNetworkConfiguration &config, serviceConfig.children()) {
-        if ((config.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active)
-            continue;
-
-        if (activeConfig != config) {
-            if (engine) {
-                disconnect(engine, SIGNAL(connectionError(QString,QNetworkSessionEngine::ConnectionError)),
-                           this, SLOT(connectionError(QString,QNetworkSessionEngine::ConnectionError)));
-            }
-
-            activeConfig = config;
-            engine = getEngineFromId(activeConfig.identifier());
-            if (engine) {
-                connect(engine, SIGNAL(connectionError(QString,QNetworkSessionEngine::ConnectionError)),
-                        this, SLOT(connectionError(QString,QNetworkSessionEngine::ConnectionError)),
-                        Qt::QueuedConnection);
-            }
-            emit q->newConfigurationActivated();
-        }
-
-        state = QNetworkSession::Connected;
-        if (state != oldState)
-            emit q->stateChanged(state);
-
-        return;
-    }
-
-    if (serviceConfig.children().isEmpty())
-        state = QNetworkSession::NotAvailable;
-    else
-        state = QNetworkSession::Disconnected;
-
-    if (state != oldState)
-        emit q->stateChanged(state);
-}
-
-void QNetworkSessionPrivate::updateStateFromActiveConfig()
-{
-    QNetworkSession::State oldState = state;
-
-    bool newActive = false;
-
-    if (!activeConfig.isValid()) {
-        state = QNetworkSession::Invalid;
-    } else if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
-        state = QNetworkSession::Connected;
-        newActive = opened;
-    } else if ((activeConfig.state() & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
-        state = QNetworkSession::Disconnected;
-    } else if ((activeConfig.state() & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined) {
-        state = QNetworkSession::NotAvailable;
-    } else if ((activeConfig.state() & QNetworkConfiguration::Undefined) == QNetworkConfiguration::Undefined) {
-        state = QNetworkSession::NotAvailable;
-    }
-
-    bool oldActive = isOpen;
-    isOpen = newActive;
-
-    if (!oldActive && isOpen)
-        emit quitPendingWaitsForOpened();
-    if (oldActive && !isOpen)
-        emit q->closed();
-
-    if (oldState != state)
-        emit q->stateChanged(state);
-}
-
-void QNetworkSessionPrivate::networkConfigurationsChanged()
-{
-    if (serviceConfig.isValid())
-        updateStateFromServiceNetwork();
-    else
-        updateStateFromActiveConfig();
-#if defined(BACKEND_NM)
-        setActiveTimeStamp();
-#endif
-}
-
-void QNetworkSessionPrivate::configurationChanged(const QNetworkConfiguration &config)
-{
-    if (serviceConfig.isValid() && (config == serviceConfig || config == activeConfig))
-        updateStateFromServiceNetwork();
-    else if (config == activeConfig)
-        updateStateFromActiveConfig();
-}
-
-void QNetworkSessionPrivate::forcedSessionClose(const QNetworkConfiguration &config)
-{
-    if (activeConfig == config) {
-        opened = false;
-        isOpen = false;
-
-        emit q->closed();
-
-        lastError = QNetworkSession::SessionAbortedError;
-        emit q->error(lastError);
-    }
-}
-
-void QNetworkSessionPrivate::connectionError(const QString &id, QNetworkSessionEngine::ConnectionError error)
-{
-    if (activeConfig.identifier() == id) {
-        networkConfigurationsChanged();
-        switch (error) {
-        case QNetworkSessionEngine::OperationNotSupported:
-            lastError = QNetworkSession::OperationNotSupportedError;
-            opened = false;
-            break;
-        case QNetworkSessionEngine::InterfaceLookupError:
-        case QNetworkSessionEngine::ConnectError:
-        case QNetworkSessionEngine::DisconnectionError:
-        default:
-            lastError = QNetworkSession::UnknownSessionError;
-        }
-        emit q->error(lastError);
-    }
-}
-
-#if defined(BACKEND_NM)
-void QNetworkSessionPrivate::setActiveTimeStamp()
-{
-    if(NetworkManagerAvailable()) {
-        startTime = QDateTime();
-        return;
-    }
-    QString interface = currentInterface().hardwareAddress().toLower();
-    const QString devicePath = QLatin1String("/org/freedesktop/Hal/devices/net_") +
-                               interface.replace(QLatin1Char(':'), QLatin1Char('_'));
-
-    QString path;
-    QString serviceName;
-    QScopedPointer<QNetworkManagerInterface> ifaceD(new QNetworkManagerInterface());
-
-    foreach (const QDBusObjectPath &conpath, ifaceD->activeConnections()) {
-        QScopedPointer<QNetworkManagerConnectionActive> conDetails(new QNetworkManagerConnectionActive(conpath.path()));
-        const QDBusObjectPath connection = conDetails->connection();
-        serviceName = conDetails->serviceName();
-        foreach (const QDBusObjectPath &device, conDetails->devices()) {
-            if(device.path() == devicePath) {
-                path = connection.path();
-            }
-            break;
-        }
-    }
-
-    if(serviceName.isEmpty())
-        return;
-
-    QScopedPointer<QNetworkManagerSettings> settingsiface(new QNetworkManagerSettings(serviceName));
-    foreach (const QDBusObjectPath &path, settingsiface->listConnections()) {
-        QScopedPointer<QNetworkManagerSettingsConnection> sysIface;
-        sysIface.reset(new QNetworkManagerSettingsConnection(serviceName, path.path()));
-        startTime = QDateTime::fromTime_t(sysIface->getTimestamp());
-        //                    isOpen = (publicConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active;
-    }
-    if(startTime.isNull())
-        startTime = QDateTime::currentDateTime();
-}
-#endif
-
-#include "moc_qnetworksession_p.cpp"
-QTM_END_NAMESPACE
-
--- a/qtmobility/src/bearer/qnetworksession_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKSESSIONPRIVATE_H
-#define QNETWORKSESSIONPRIVATE_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qnetworkconfigmanager_p.h"
-#include "qnetworksession.h"
-#ifdef BEARER_ENGINE
-#include "qnetworksessionengine_p.h"
-#endif
-
-#include "qnetworksession.h"
-#include <QNetworkInterface>
-#include <QDateTime>
-
-QTM_BEGIN_NAMESPACE
-#ifdef BEARER_ENGINE
-class QNetworkSessionEngine;
-#endif
-
-class QNetworkSessionPrivate : public QObject
-{
-    Q_OBJECT
-public:
-    QNetworkSessionPrivate() : 
-        tx_data(0), rx_data(0), m_activeTime(0), isOpen(false)
-    {
-    }
-
-    ~QNetworkSessionPrivate()
-    {
-    }
-
-    //called by QNetworkSession constructor and ensures
-    //that the state is immediately updated (w/o actually opening
-    //a session). Also this function should take care of 
-    //notification hooks to discover future state changes.
-    void syncStateWithInterface();
-
-    QNetworkInterface currentInterface() const;
-    QVariant sessionProperty(const QString& key) const;
-    void setSessionProperty(const QString& key, const QVariant& value);
-    QString bearerName() const;
-
-    void open();
-    void close();
-    void stop();
-    void migrate();
-    void accept();
-    void ignore();
-    void reject();
-
-    QString errorString() const; //must return translated string
-    QNetworkSession::SessionError error() const;
-
-    quint64 bytesWritten() const;
-    quint64 bytesReceived() const;
-    quint64 activeTime() const;
-
-private:
-    void updateStateFromServiceNetwork();
-    void updateStateFromActiveConfig();
-
-Q_SIGNALS:
-    //releases any pending waitForOpened() calls
-    void quitPendingWaitsForOpened();
-
-private Q_SLOTS:
-#ifdef BEARER_ENGINE
-    void networkConfigurationsChanged();
-    void configurationChanged(const QNetworkConfiguration &config);
-    void forcedSessionClose(const QNetworkConfiguration &config);
-    void connectionError(const QString &id, QNetworkSessionEngine::ConnectionError error);
-#endif
-
-private:
-    QNetworkConfigurationManager manager;
-
-    quint64 tx_data;
-    quint64 rx_data;
-    quint64 m_activeTime;
-
-    // The config set on QNetworkSession.
-    QNetworkConfiguration publicConfig;
-
-    // If publicConfig is a ServiceNetwork this is a copy of publicConfig.
-    // If publicConfig is an UserChoice that is resolved to a ServiceNetwork this is the actual
-    // ServiceNetwork configuration.
-    QNetworkConfiguration serviceConfig;
-
-    // This is the actual active configuration currently in use by the session.
-    // Either a copy of publicConfig or one of serviceConfig.children().
-    QNetworkConfiguration activeConfig;
-
-    QNetworkSession::State state;
-    bool isOpen;
-
-#ifdef BEARER_ENGINE
-    bool opened;
-
-    QNetworkSessionEngine *engine;
-#endif
-    QNetworkSession::SessionError lastError;
-
-    QNetworkSession* q;
-    friend class QNetworkSession;
-
-#if defined(BEARER_ENGINE) && defined(BACKEND_NM)
-    QDateTime startTime;
-    void setActiveTimeStamp();
-#endif
-};
-
-QTM_END_NAMESPACE
-
-#endif //QNETWORKSESSIONPRIVATE_H
-
--- a/qtmobility/src/bearer/qnetworksession_s60_p.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1428 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qmobilityglobal.h>
-#include "qnetworksession_s60_p.h"
-#include "qnetworkconfiguration_s60_p.h"
-#include "qnetworkconfigmanager_s60_p.h"
-#include <es_enum.h>
-#include <es_sock.h>
-#include <in_sock.h>
-#include <stdapis/sys/socket.h>
-#include <stdapis/net/if.h>
-
-QTM_BEGIN_NAMESPACE
-
-QNetworkSessionPrivate::QNetworkSessionPrivate()
-    : CActive(CActive::EPriorityUserInput), state(QNetworkSession::Invalid),
-      isOpen(false), iDynamicUnSetdefaultif(0), ipConnectionNotifier(0),
-      iHandleStateNotificationsFromManager(false), iFirstSync(true), iStoppedByUser(false),
-      iClosedByUser(false), iError(QNetworkSession::UnknownSessionError), iALREnabled(0),
-      iConnectInBackground(false), isOpening(false)
-{
-    CActiveScheduler::Add(this);
-
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    iMobility = NULL;
-#endif
-    // Try to load "Open C" dll dynamically and
-    // try to attach to unsetdefaultif function dynamically.
-    // This is to avoid build breaks with old OpenC versions.
-    if (iOpenCLibrary.Load(_L("libc")) == KErrNone) {
-        iDynamicUnSetdefaultif = (TOpenCUnSetdefaultifFunction)iOpenCLibrary.Lookup(597);
-    }
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-    qDebug() << "QNS this : " << QString::number((uint)this) << " - ";
-    if (iDynamicUnSetdefaultif)
-        qDebug() << "dynamic unsetdefaultif() is present in PIPS library. ";
-    else
-        qDebug() << "dynamic unsetdefaultif() not present in PIPS library. ";
-#endif
-
-    TRAP_IGNORE(iConnectionMonitor.ConnectL());
-}
-
-QNetworkSessionPrivate::~QNetworkSessionPrivate()
-{
-    isOpen = false;
-    isOpening = false;
-
-    // Cancel Connection Progress Notifications first.
-    // Note: ConnectionNotifier must be destroyed before Canceling RConnection::Start()
-    //       => deleting ipConnectionNotifier results RConnection::CancelProgressNotification()
-    delete ipConnectionNotifier;
-    ipConnectionNotifier = NULL;
-
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    if (iMobility) {
-        delete iMobility;
-        iMobility = NULL;
-    }
-#endif
-
-    // Cancel possible RConnection::Start()
-    Cancel();
-    iSocketServ.Close();
-    
-    // Close global 'Open C' RConnection
-    // Clears also possible unsetdefaultif() flags.
-    setdefaultif(0);
-    
-    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)
-{
-    if (iHandleStateNotificationsFromManager) {
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-        qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-                 << "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
-        this->newState(newState, accessPointId);
-    }
-}
-
-void QNetworkSessionPrivate::configurationRemoved(const QNetworkConfiguration& config)
-{
-    if (!publicConfig.d.data()) {
-        return;
-    }
-    if (config.d.data()->numericId == publicConfig.d.data()->numericId) {
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-        qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-                 << "configurationRemoved IAP: " << QString::number(publicConfig.d.data()->numericId) << " : going to State: Invalid";
-#endif
-        this->newState(QNetworkSession::Invalid, publicConfig.d.data()->numericId);
-    }
-}
-
-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 || !publicConfig.d.data()) {
-        return;
-    }
-    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
-        // this session is based on is removed, session knows to enter Invalid -state.
-        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 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);
-    }
-}
-
-QNetworkInterface QNetworkSessionPrivate::interface(TUint iapId) const
-{
-    QString interfaceName;
-
-    TSoInetInterfaceInfo ifinfo;
-    TPckg<TSoInetInterfaceInfo> ifinfopkg(ifinfo);
-    TSoInetIfQuery ifquery;
-    TPckg<TSoInetIfQuery> ifquerypkg(ifquery);
- 
-    // Open dummy socket for interface queries
-    RSocket socket;
-    TInt retVal = socket.Open(iSocketServ, _L("udp"));
-    if (retVal != KErrNone) {
-        return QNetworkInterface();
-    }
- 
-    // Start enumerating interfaces
-    socket.SetOpt(KSoInetEnumInterfaces, KSolInetIfCtrl);
-    while(socket.GetOpt(KSoInetNextInterface, KSolInetIfCtrl, ifinfopkg) == KErrNone) {
-        ifquery.iName = ifinfo.iName;
-        TInt err = socket.GetOpt(KSoInetIfQueryByName, KSolInetIfQuery, ifquerypkg);
-        if(err == KErrNone && ifquery.iZone[1] == iapId) { // IAP ID is index 1 of iZone
-            if(ifinfo.iAddress.Address() > 0) {
-                interfaceName = QString::fromUtf16(ifinfo.iName.Ptr(),ifinfo.iName.Length());
-                break;
-            }
-        }
-    }
- 
-    socket.Close();
- 
-    if (interfaceName.isEmpty()) {
-        return QNetworkInterface();
-    }
- 
-    return QNetworkInterface::interfaceFromName(interfaceName);
-}
-
-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();
-    }
-    
-    return activeInterface;
-}
-
-QVariant QNetworkSessionPrivate::sessionProperty(const QString& key) const
-{
-    if (key == "ConnectInBackground") {
-        return QVariant(iConnectInBackground);
-    }
-    return QVariant();
-}
-
-void QNetworkSessionPrivate::setSessionProperty(const QString& key, const QVariant& value)
-{
-    // Valid value means adding property, invalid means removing it.
-    if (key == "ConnectInBackground") {
-        if (value.isValid()) {
-            iConnectInBackground = value.toBool();
-        } else {
-            iConnectInBackground = EFalse;
-        }
-    }
-}
-
-QString QNetworkSessionPrivate::errorString() const
-{
-    switch (iError) {
-    case QNetworkSession::UnknownSessionError:
-        return tr("Unknown session error.");
-    case QNetworkSession::SessionAbortedError:
-        return tr("The session was aborted by the user or system.");
-    case QNetworkSession::OperationNotSupportedError:
-        return tr("The requested operation is not supported by the system.");
-    case QNetworkSession::InvalidConfigurationError:
-        return tr("The specified configuration cannot be used.");
-    case QNetworkSession::RoamingError:
-        return tr("Roaming was aborted or is not possible.");
-    }
- 
-    return QString();
-}
-
-QNetworkSession::SessionError QNetworkSessionPrivate::error() const
-{
-    return iError;
-}
-
-void QNetworkSessionPrivate::open()
-{
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-        qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-                << "open() called, session state is: " << state << " and isOpen is: "
-                << isOpen;
-#endif
-    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;
-
-    // Configuration may have been invalidated after session creation by platform
-    // (e.g. configuration has been deleted).
-    if (!publicConfig.isValid()) {
-        newState(QNetworkSession::Invalid);
-        iError = QNetworkSession::InvalidConfigurationError;
-        emit q->error(iError);
-        return;
-    }
-    // If opening a undefined configuration, session emits error and enters
-    // NotAvailable -state. Note that we will try ones in 'defined' state to avoid excessive
-    // need for WLAN scans (via updateConfigurations()), because user may have walked
-    // into a WLAN range, but periodic background scan has not occurred yet -->
-    // we don't want to force application to make frequent updateConfigurations() calls
-    // to be able to try if e.g. home WLAN is available.
-    if (publicConfig.state() == QNetworkConfiguration::Undefined) {
-        newState(QNetworkSession::NotAvailable);
-        iError = QNetworkSession::InvalidConfigurationError;
-        emit q->error(iError);
-        return;
-    }
-    // Clear possible previous states
-    iStoppedByUser = false;
-    iClosedByUser = false;
-
-    TInt error = iSocketServ.Connect();
-    if (error != KErrNone) {
-        // Could not open RSocketServ
-        newState(QNetworkSession::Invalid);
-        iError = QNetworkSession::UnknownSessionError;
-        emit q->error(iError);
-        syncStateWithInterface();    
-        return;
-    }
-    
-    error = iConnection.Open(iSocketServ);
-    if (error != KErrNone) {
-        // Could not open RConnection
-        iSocketServ.Close();
-        newState(QNetworkSession::Invalid);
-        iError = QNetworkSession::UnknownSessionError;
-        emit q->error(iError);
-        syncStateWithInterface();    
-        return;
-    }
-    
-    // Use RConnection::ProgressNotification for IAP/SNAP monitoring
-    // (<=> ConnectionProgressNotifier uses RConnection::ProgressNotification)
-    if (!ipConnectionNotifier) {
-        ipConnectionNotifier = new ConnectionProgressNotifier(*this,iConnection);
-    }
-    if (ipConnectionNotifier) {
-        ipConnectionNotifier->StartNotifications();
-    }
-    
-    if (publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
-#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;
-            TExtendedConnPref prefs;
-            prefs.SetIapId(publicConfig.d.data()->numericId);
-            if (iConnectInBackground) {
-                prefs.SetNoteBehaviour( TExtendedConnPref::ENoteBehaviourConnSilent );
-            }
-            pref.AppendL(&prefs);
-#else
-            TCommDbConnPref pref;
-            pref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
-            pref.SetIapId(publicConfig.d.data()->numericId);
-#endif
-            iConnection.Start(pref, iStatus);
-            if (!IsActive()) {
-                SetActive();
-            }
-            // 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) {
-#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.
-        iKnownConfigsBeforeConnectionStart = ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->accessPointConfigurations.keys();
-        TConnPrefList snapPref;
-        TExtendedConnPref prefs;
-        prefs.SetSnapId(publicConfig.d.data()->numericId);
-        if (iConnectInBackground) {
-            prefs.SetNoteBehaviour( TExtendedConnPref::ENoteBehaviourConnSilent );
-        }
-        snapPref.AppendL(&prefs);
-#else
-        TConnSnapPref snapPref(publicConfig.d.data()->numericId);
-#endif
-        iConnection.Start(snapPref, iStatus);
-        if (!IsActive()) {
-            SetActive();
-        }
-        // 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);
-        if (!IsActive()) {
-            SetActive();
-        }
-        newState(QNetworkSession::Connecting);
-    }
- 
-    if (error != KErrNone) {
-        isOpen = false;
-        isOpening = false;
-        iError = QNetworkSession::UnknownSessionError;
-        emit q->error(iError);
-        if (ipConnectionNotifier) {
-            ipConnectionNotifier->StopNotifications();
-        }
-        syncStateWithInterface();    
-    }
-}
-
-TUint QNetworkSessionPrivate::iapClientCount(TUint aIAPId) const
-{
-    TRequestStatus status;
-    TUint connectionCount;
-    iConnectionMonitor.GetConnectionCount(connectionCount, status);
-    User::WaitForRequest(status);
-    if (status.Int() == KErrNone) {
-        for (TUint i = 1; i <= connectionCount; i++) {
-            TUint connectionId;
-            TUint subConnectionCount;
-            iConnectionMonitor.GetConnectionInfo(i, connectionId, subConnectionCount);
-            TUint apId;
-            iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
-            User::WaitForRequest(status);
-            if (apId == aIAPId) {
-                TConnMonClientEnumBuf buf;
-                iConnectionMonitor.GetPckgAttribute(connectionId, 0, KClientInfo, buf, status);
-                User::WaitForRequest(status);
-                if (status.Int() == KErrNone) {
-                    return buf().iCount;
-                }
-            }
-        }
-    }
-    return 0;
-}
-
-void QNetworkSessionPrivate::close(bool allowSignals)
-{
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-    qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-            << "close() called, session state is: " << state << " and isOpen is : "
-            << isOpen;
-#endif
-
-    if (!isOpen && state != QNetworkSession::Connecting) {
-        return;
-    }
-    // Mark this session as closed-by-user so that we are able to report
-    // distinguish between stop() and close() state transitions
-    // when reporting.
-    iClosedByUser = true;
-    isOpen = false;
-    isOpening = false;
-
-    serviceConfig = QNetworkConfiguration();
-    
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    if (iMobility) {
-        delete iMobility;
-        iMobility = NULL;
-    }
-#endif
-
-    if (ipConnectionNotifier && !iHandleStateNotificationsFromManager) {
-        ipConnectionNotifier->StopNotifications();
-        // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
-        iHandleStateNotificationsFromManager = true;
-    }
-    
-    Cancel(); // closes iConnection
-    iSocketServ.Close();
-    
-    // Close global 'Open C' RConnection. If OpenC supports,
-    // close the defaultif for good to avoid difficult timing
-    // and bouncing issues of network going immediately back up
-    //  because of e.g. select() thread etc.
-    if (iDynamicUnSetdefaultif) {
-        iDynamicUnSetdefaultif();
-    } else {
-        setdefaultif(0);
-    }
-
-    // If UserChoice, go down immediately. If some other configuration,
-    // go down immediately if there is no reports expected from the platform;
-    // in practice Connection Monitor is aware of connections only after
-    // KFinishedSelection event, and hence reports only after that event, but
-    // that does not seem to be trusted on all Symbian versions --> safest
-    // 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, since either UserChoice or Connecting";
-#endif
-        newState(QNetworkSession::Closing);
-        newState(QNetworkSession::Disconnected);
-    }
-    if (allowSignals) {
-        emit q->closed();
-    }
-}
-
-void QNetworkSessionPrivate::stop()
-{
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-    qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-            << "stop() called, session state is: " << state << " and isOpen is : "
-            << isOpen;
-#endif
-    if (!isOpen &&
-        publicConfig.isValid() &&
-        publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-    qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-            << "since session is not open, using RConnectionMonitor to stop() the interface";
-#endif
-        iStoppedByUser = true;
-        // If the publicConfig is type of IAP, enumerate through connections at
-        // connection monitor. If publicConfig is active in that list, stop it.
-        // Otherwise there is nothing to stop. Note: because this QNetworkSession is not open,
-        // activeConfig is not usable.
-        TUint count;
-        TRequestStatus status;
-        iConnectionMonitor.GetConnectionCount(count, status);
-        User::WaitForRequest(status);
-        if (status.Int() != KErrNone) {
-            return;
-        }
-        TUint numSubConnections; // Not used but needed by GetConnectionInfo i/f
-        TUint connectionId;
-        for (TUint i = 1; i <= count; ++i) {
-            // Get (connection monitor's assigned) connection ID
-            TInt ret = iConnectionMonitor.GetConnectionInfo(i, connectionId, numSubConnections);            
-            if (ret == KErrNone) {
-                // See if connection Id matches with our Id. If so, stop() it.
-                if (publicConfig.d.data()->connectionId == connectionId) {
-                    ret = iConnectionMonitor.SetBoolAttribute(connectionId,
-                                                              0, // subConnectionId don't care
-                                                              KConnectionStop,
-                                                              ETrue);
-                }
-            }
-            // Enter disconnected state right away since the session is not even open.
-            // Symbian^3 connection monitor does not emit KLinkLayerClosed when
-            // connection is stopped via connection monitor.
-            newState(QNetworkSession::Disconnected);
-        }
-    } else if (isOpen) {
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-    qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-            << "since session is open, using RConnection to stop() the interface";
-#endif
-        // Since we are open, use RConnection to stop the interface
-        isOpen = false;
-        isOpening = false;
-        iStoppedByUser = true;
-        newState(QNetworkSession::Closing);
-        if (ipConnectionNotifier) {
-            ipConnectionNotifier->StopNotifications();
-            // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
-            iHandleStateNotificationsFromManager = true;
-        }
-        iConnection.Stop(RConnection::EStopAuthoritative);
-        isOpen = true;
-        isOpening = false;
-        close(false);
-        emit q->closed();
-    }
-}
-
-void QNetworkSessionPrivate::migrate()
-{
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    if (iMobility) {
-        // Close global 'Open C' RConnection. If openC supports, use the 'heavy'
-        // version to block all subsequent requests.
-        if (iDynamicUnSetdefaultif) {
-            iDynamicUnSetdefaultif();
-        } else {
-            setdefaultif(0);
-        }
-        // Start migrating to new IAP
-        iMobility->MigrateToPreferredCarrier();
-    }
-#endif
-}
-
-void QNetworkSessionPrivate::ignore()
-{
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    if (iMobility) {
-        iMobility->IgnorePreferredCarrier();
-
-        if (!iALRUpgradingConnection) {
-            newState(QNetworkSession::Disconnected);
-        } else {
-            newState(QNetworkSession::Connected,iOldRoamingIap);
-        }
-    }
-#endif
-}
-
-void QNetworkSessionPrivate::accept()
-{
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    if (iMobility) {
-        iMobility->NewCarrierAccepted();
-
-        QNetworkConfiguration newActiveConfig = activeConfiguration(iNewRoamingIap);
-
-        // Use name of the new IAP to open global 'Open C' RConnection
-        QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
-        ifreq ifr;
-        memset(&ifr, 0, sizeof(struct ifreq));
-        strcpy(ifr.ifr_name, nameAsByteArray.constData());
-        setdefaultif(&ifr);
-
-        newState(QNetworkSession::Connected, iNewRoamingIap);
-    }
-#endif
-}
-
-void QNetworkSessionPrivate::reject()
-{
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    if (iMobility) {
-        iMobility->NewCarrierRejected();
-
-        if (!iALRUpgradingConnection) {
-            newState(QNetworkSession::Disconnected);
-        } else {
-            QNetworkConfiguration newActiveConfig = activeConfiguration(iOldRoamingIap);
-
-            // Use name of the old IAP to open global 'Open C' RConnection
-            QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
-            ifreq ifr;
-            memset(&ifr, 0, sizeof(struct ifreq));
-            strcpy(ifr.ifr_name, nameAsByteArray.constData());
-            setdefaultif(&ifr);
-
-            newState(QNetworkSession::Connected, iOldRoamingIap);
-        }
-    }
-#endif
-}
-
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-void QNetworkSessionPrivate::PreferredCarrierAvailable(TAccessPointInfo aOldAPInfo,
-                                                       TAccessPointInfo aNewAPInfo,
-                                                       TBool aIsUpgrade,
-                                                       TBool aIsSeamless)
-{
-    iOldRoamingIap = aOldAPInfo.AccessPoint();
-    iNewRoamingIap = aNewAPInfo.AccessPoint();
-    newState(QNetworkSession::Roaming);
-    if (iALREnabled > 0) {
-        iALRUpgradingConnection = aIsUpgrade;
-        QList<QNetworkConfiguration> configs = publicConfig.children();
-        for (int i=0; i < configs.count(); i++) {
-            if (configs[i].d.data()->numericId == aNewAPInfo.AccessPoint()) {
-                // Any slot connected to the signal might throw an std::exception,
-                // which must not propagate into Symbian code (this function is a callback
-                // from platform). We could convert exception to a symbian Leave, but since the
-                // prototype of this function bans this (no trailing 'L'), we just catch
-                // and drop.
-                QT_TRY {
-                    emit q->preferredConfigurationChanged(configs[i],aIsSeamless);
-                }
-                QT_CATCH (std::exception&) {}
-            }
-        }
-    } else {
-        migrate();
-    }
-}
-
-void QNetworkSessionPrivate::NewCarrierActive(TAccessPointInfo /*aNewAPInfo*/, TBool /*aIsSeamless*/)
-{
-    if (iALREnabled > 0) {
-        QT_TRY {
-            emit q->newConfigurationActivated();
-        }
-        QT_CATCH (std::exception&) {}
-    } else {
-        accept();
-    }
-}
-
-void QNetworkSessionPrivate::Error(TInt /*aError*/)
-{
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-    qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-            << "roaming Error() occured, isOpen is: " << isOpen;
-#endif
-    if (isOpen) {
-        isOpen = false;
-        isOpening = false;
-        activeConfig = QNetworkConfiguration();
-        serviceConfig = QNetworkConfiguration();
-        iError = QNetworkSession::RoamingError;
-        emit q->error(iError);
-        Cancel();
-        if (ipConnectionNotifier) {
-            ipConnectionNotifier->StopNotifications();
-        }
-        QT_TRY {
-            syncStateWithInterface();
-            // In some cases IAP is still in Connected state when
-            // syncStateWithInterface(); is called
-            // => Following call makes sure that Session state
-            //    changes immediately to Disconnected.
-            newState(QNetworkSession::Disconnected);
-            emit q->closed();
-        }
-        QT_CATCH (std::exception&) {}
-    } else if (iStoppedByUser) {
-        // If the user of this session has called the stop() and
-        // configuration is based on internet SNAP, this needs to be
-        // done here because platform might roam.
-        QT_TRY {
-            newState(QNetworkSession::Disconnected);
-        }
-        QT_CATCH (std::exception&) {}
-    }
-}
-#endif
-
-void QNetworkSessionPrivate::setALREnabled(bool enabled)
-{
-    if (enabled) {
-        iALREnabled++;
-    } else {
-        iALREnabled--;
-    }
-}
-
-QNetworkConfiguration QNetworkSessionPrivate::bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const
-{
-    QNetworkConfiguration config;
-    QList<QNetworkConfiguration> subConfigurations = snapConfig.children();
-    for (int i = 0; i < subConfigurations.count(); i++ ) {
-        if (subConfigurations[i].state() == QNetworkConfiguration::Active) {
-            config = subConfigurations[i];
-            break;
-        } else if (!config.isValid() && subConfigurations[i].state() == QNetworkConfiguration::Discovered) {
-            config = subConfigurations[i];
-        }
-    }
-    if (!config.isValid() && subConfigurations.count() > 0) {
-        config = subConfigurations[0];
-    }
-    return config;
-}
-
-quint64 QNetworkSessionPrivate::bytesWritten() const
-{
-    return transferredData(KUplinkData);
-}
-
-quint64 QNetworkSessionPrivate::bytesReceived() const
-{
-    return transferredData(KDownlinkData);
-}
-
-quint64 QNetworkSessionPrivate::transferredData(TUint dataType) const
-{
-    if (!publicConfig.isValid()) {
-        return 0;
-    }
-    
-    QNetworkConfiguration config;
-    if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
-        if (serviceConfig.isValid()) {
-            config = serviceConfig;
-        } else {
-            if (activeConfig.isValid()) {
-                config = activeConfig;
-            }
-        }
-    } else {
-        config = publicConfig;
-    }
-
-    if (!config.isValid()) {
-        return 0;
-    }
-    
-    TUint count;
-    TRequestStatus status;
-    iConnectionMonitor.GetConnectionCount(count, status);
-    User::WaitForRequest(status);
-    if (status.Int() != KErrNone) {
-        return 0;
-    }
-    
-    TUint transferredData = 0;
-    TUint numSubConnections;
-    TUint connectionId;
-    bool configFound;
-    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) {
-                configFound = false;
-                if (config.type() == QNetworkConfiguration::ServiceNetwork) {
-                    QList<QNetworkConfiguration> configs = config.children();
-                    for (int i=0; i < configs.count(); i++) {
-                        if (configs[i].d.data()->numericId == apId) {
-                            configFound = true;
-                            break;
-                        }
-                    }
-                } else if (config.d.data()->numericId == apId) {
-                    configFound = true;
-                }
-                if (configFound) {
-                    TUint tData;
-                    iConnectionMonitor.GetUintAttribute(connectionId, 0, dataType, tData, status );
-                    User::WaitForRequest(status);
-                    if (status.Int() == KErrNone) {
-                    transferredData += tData;
-                    }
-                }
-            }
-        }
-    }
-    
-    return transferredData;
-}
-
-quint64 QNetworkSessionPrivate::activeTime() const
-{
-    if (!isOpen || startTime.isNull()) {
-        return 0;
-    }
-    return startTime.secsTo(QDateTime::currentDateTime());
-}
-
-QNetworkConfiguration QNetworkSessionPrivate::activeConfiguration(TUint32 iapId) const
-{
-    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
-    if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
-        // Try to search IAP from the used SNAP using IAP Id
-        QList<QNetworkConfiguration> children = publicConfig.children();
-        for (int i=0; i < children.count(); i++) {
-            if (children[i].d.data()->numericId == iapId) {
-                return children[i];
-            }
-        }
-
-        // Given IAP Id was not found from the used SNAP
-        // => Try to search matching IAP using mappingName
-        //    mappingName contains:
-        //      1. "Access point name" for "Packet data" Bearer
-        //      2. "WLAN network name" (= SSID) for "Wireless LAN" Bearer
-        //      3. "Dial-up number" for "Data call Bearer" or "High Speed (GSM)" Bearer
-        //    <=> Note: It's possible that in this case reported IAP is
-        //              clone of the one of the IAPs of the used SNAP
-        //              => If mappingName matches, clone has been found
-        QNetworkConfiguration pt;
-        pt.d = ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->accessPointConfigurations.value(QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(iapId)));
-        if (pt.d) {
-            for (int i=0; i < children.count(); i++) {
-                if (children[i].d.data()->mappingName == pt.d.data()->mappingName) {
-                    return children[i];
-                }
-            }
-        } else {
-#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.
-            // 1. Update knowledge from the databases.
-            ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->updateConfigurations();
-            // 2. Check if new configuration was created during connection creation
-            QList<QString> knownConfigs = ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->accessPointConfigurations.keys();
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-            qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-                    << "opened configuration was not known beforehand, looking for new.";
-#endif
-            if (knownConfigs.count() > iKnownConfigsBeforeConnectionStart.count()) {
-                // Configuration count increased => new configuration was created
-                // => Search new, created configuration
-                QString newIapId;
-                for (int i=0; i < iKnownConfigsBeforeConnectionStart.count(); i++) {
-                    if (knownConfigs[i] != iKnownConfigsBeforeConnectionStart[i]) {
-                        newIapId = knownConfigs[i];
-                        break;
-                    }
-                }
-                if (newIapId.isEmpty()) {
-                    newIapId = knownConfigs[knownConfigs.count()-1];
-                }
-                pt.d = ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->accessPointConfigurations.value(newIapId);
-                if (pt.d) {
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-                    qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-                            << "new configuration was found, name, IAP id: " << pt.name() << pt.identifier();
-#endif
-                    return pt;
-                }
-            }
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-            qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-                    << "configuration was not found, returning invalid.";
-#endif
-#endif
-            // Given IAP Id was not found from known IAPs array
-            return QNetworkConfiguration();
-        }
-        // Matching IAP was not found from used SNAP
-        // => IAP from another SNAP is returned
-        //    (Note: Returned IAP matches to given IAP Id)
-        return pt;
-    }
-#endif
-    if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
-        if (publicConfig.d.data()->manager) {
-            QNetworkConfiguration pt;
-            // Try to found User Selected IAP from known IAPs (accessPointConfigurations)
-            pt.d = ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->accessPointConfigurations.value(QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(iapId)));
-            if (pt.d) {
-                return pt;
-            } else {
-                // Check if new (WLAN) IAP was created in IAP/SNAP dialog
-                // 1. Sync internal configurations array to commsdb first
-                ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->updateConfigurations();
-                // 2. Check if new configuration was created during connection creation
-                QList<QString> knownConfigs = ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->accessPointConfigurations.keys();
-                if (knownConfigs.count() > iKnownConfigsBeforeConnectionStart.count()) {
-                    // Configuration count increased => new configuration was created
-                    // => Search new, created configuration
-                    QString newIapId;
-                    for (int i=0; i < iKnownConfigsBeforeConnectionStart.count(); i++) {
-                        if (knownConfigs[i] != iKnownConfigsBeforeConnectionStart[i]) {
-                            newIapId = knownConfigs[i];
-                            break;
-                        }
-                    }
-                    if (newIapId.isEmpty()) {
-                        newIapId = knownConfigs[knownConfigs.count()-1];
-                    }
-                    pt.d = ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->accessPointConfigurations.value(newIapId);
-                    if (pt.d) {
-                        return pt;
-                    }
-                }
-            }
-        }
-        return QNetworkConfiguration();
-    }
-
-    return publicConfig;
-}
-
-void QNetworkSessionPrivate::RunL()
-{
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-    qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-            << "RConnection::RunL with status code: " << iStatus.Int();
-#endif
-    TInt statusCode = iStatus.Int();
-
-    switch (statusCode) {
-        case KErrNone: // Connection created successfully
-            {
-            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
-                ifreq ifr;
-                memset(&ifr, 0, sizeof(struct ifreq));
-                QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
-                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));
-                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;
-            }
- 
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-            if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
-                // Activate ALR monitoring
-                iMobility = CActiveCommsMobilityApiExt::NewL(iConnection, *this);
-            }
-#endif
-            isOpen = true;
-            isOpening = false;
-            activeConfig = newActiveConfig;
-            activeInterface = interface(activeConfig.d.data()->numericId);
-            if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
-                QNetworkConfiguration pt;
-                pt.d = activeConfig.d.data()->serviceNetworkPtr;
-                serviceConfig = pt;
-            }
-            
-            startTime = QDateTime::currentDateTime();
-
-            QT_TRYCATCH_LEAVING({
-                    newState(QNetworkSession::Connected);
-                    emit quitPendingWaitsForOpened();
-                });
-            }
-            break;
-        case KErrNotFound: // Connection failed
-            isOpen = false;
-            isOpening = false;
-            activeConfig = QNetworkConfiguration();
-            serviceConfig = QNetworkConfiguration();
-            iError = QNetworkSession::InvalidConfigurationError;
-            QT_TRYCATCH_LEAVING(emit q->error(iError));
-            Cancel();
-            if (ipConnectionNotifier) {
-                ipConnectionNotifier->StopNotifications();
-            }
-            QT_TRYCATCH_LEAVING(syncStateWithInterface());
-            break;
-        case KErrCancel: // Connection attempt cancelled
-        case KErrAlreadyExists: // Connection already exists
-        default:
-            isOpen = false;
-            isOpening = false;
-            activeConfig = QNetworkConfiguration();
-            serviceConfig = QNetworkConfiguration();
-            if (statusCode == KErrCancel) {
-                iError = QNetworkSession::SessionAbortedError;
-            } else if (publicConfig.state() == QNetworkConfiguration::Undefined ||
-                publicConfig.state() == QNetworkConfiguration::Defined) {
-                iError = QNetworkSession::InvalidConfigurationError;
-            } else {
-                iError = QNetworkSession::UnknownSessionError;
-            }
-            QT_TRYCATCH_LEAVING(emit q->error(iError));
-            Cancel();
-            if (ipConnectionNotifier) {
-                ipConnectionNotifier->StopNotifications();
-            }
-            QT_TRYCATCH_LEAVING(syncStateWithInterface());
-            break;
-    }
-}
-
-void QNetworkSessionPrivate::DoCancel()
-{
-    iConnection.Close();
-}
-
-// Enters newState if feasible according to current state.
-// AccessPointId may be given as parameter. If it is zero, state-change is assumed to
-// concern this session's configuration. If non-zero, the configuration is looked up
-// and checked if it matches the configuration this session is based on.
-bool QNetworkSessionPrivate::newState(QNetworkSession::State newState, TUint accessPointId)
-{
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-    qDebug() << "QNS this : " << QString::number((uint)this) << " - "
-             << "NEW STATE, IAP ID : " << QString::number(accessPointId) << " , newState : " << QString::number(newState);
-#endif
-    // Make sure that activeConfig is always updated when SNAP is signaled to be
-    // connected.
-    if (isOpen && publicConfig.type() == QNetworkConfiguration::ServiceNetwork &&
-        newState == QNetworkSession::Connected) {
-        activeConfig = activeConfiguration(accessPointId);
-        activeInterface = interface(activeConfig.d.data()->numericId);
-    }
-
-    // Make sure that same state is not signaled twice in a row.
-    if (state == newState) {
-        return true;
-    }
-
-    // Make sure that Connecting state does not overwrite Roaming state
-    if (state == QNetworkSession::Roaming && newState == QNetworkSession::Connecting) {
-        return false;
-    }
-    
-    // Make sure that Connected state is not reported when Connection is
-    // already Closing.
-    // Note: Stopping connection results sometimes KLinkLayerOpen
-    //       to be reported first (just before KLinkLayerClosed).
-    if (state == QNetworkSession::Closing && newState == QNetworkSession::Connected) {
-        return false;
-    }
-
-    // Make sure that some lagging 'closing' state-changes do not overwrite
-    // if we are already disconnected or closed.
-    if (state == QNetworkSession::Disconnected && newState == QNetworkSession::Closing) {
-        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.
-    // Note that session may be in 'closing' state and not in 'connected' state, because
-    // depending on platform the platform may report KConfigDaemonStartingDeregistration
-    // event before KLinkLayerClosed
-    if ((isOpen && state == QNetworkSession::Connected && newState == QNetworkSession::Disconnected) ||
-        (isOpen && !iClosedByUser && newState == QNetworkSession::Disconnected)) {
-        // Active & Connected state should change directly to Disconnected state
-        // only when something forces connection to close (eg. when another
-        // application or session stops connection or when network drops
-        // unexpectedly).
-        isOpen = false;
-        isOpening = false;
-        activeConfig = QNetworkConfiguration();
-        serviceConfig = QNetworkConfiguration();
-        iError = QNetworkSession::SessionAbortedError;
-        emit q->error(iError);
-        Cancel();
-        if (ipConnectionNotifier) {
-            ipConnectionNotifier->StopNotifications();
-        }
-        // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
-        iHandleStateNotificationsFromManager = true;
-        emitSessionClosed = true; // Emit SessionClosed after state change has been reported
-    }
-
-    bool retVal = false;
-    if (accessPointId == 0) {
-        state = newState;
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-        qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed A to: " << state;
-#endif
-        emit q->stateChanged(state);
-        retVal = true;
-    } else {
-        if (publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
-            if (publicConfig.d.data()->numericId == accessPointId) {
-                state = newState;
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-                qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed B to: " << state;
-#endif
-                emit q->stateChanged(state);
-                retVal = true;
-            }
-        } else if (publicConfig.type() == QNetworkConfiguration::UserChoice && isOpen) {
-            if (activeConfig.d.data()->numericId == accessPointId) {
-                state = newState;
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-                qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed C to: " << state;
-#endif
-                emit q->stateChanged(state);
-                retVal = true;
-            }
-        } else if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
-            QList<QNetworkConfiguration> subConfigurations = publicConfig.children();
-            for (int i = 0; i < subConfigurations.count(); i++) {
-                if (subConfigurations[i].d.data()->numericId == accessPointId) {
-                    if (newState != QNetworkSession::Disconnected) {
-                        state = newState;
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-                        qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed D  to: " << state;
-#endif
-                        emit q->stateChanged(state);
-                        retVal = true;
-                    } else {
-                        QNetworkConfiguration config = bestConfigFromSNAP(publicConfig);
-                        if ((config.state() == QNetworkConfiguration::Defined) ||
-                            (config.state() == QNetworkConfiguration::Discovered)) {
-                            activeConfig = QNetworkConfiguration();
-                            state = newState;
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-                            qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed E  to: " << state;
-#endif
-                            emit q->stateChanged(state);
-                            retVal = true;
-                        } else if (config.state() == QNetworkConfiguration::Active) {
-                            // Connection to used IAP was closed, but there is another
-                            // IAP that's active in used SNAP
-                            // => Change state back to Connected
-                            state =  QNetworkSession::Connected;
-                            emit q->stateChanged(state);
-                            retVal = true;
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-                            qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed F  to: " << state;
-#endif
-                        }
-                    }
-                }
-            }
-#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) {
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-                qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed G  to: " << state;
-#endif
-                if (newState == QNetworkSession::Disconnected) {
-                    activeConfig = QNetworkConfiguration();
-                }
-                state = newState;
-                emit q->stateChanged(state);
-                retVal = true;
-            }
-#endif
-        }
-    }
-    if (emitSessionClosed) {
-        emit q->closed();
-    }
-    if (state == QNetworkSession::Disconnected) {
-        // Just in case clear activeConfiguration.
-        activeConfig = QNetworkConfiguration();
-    }
-    return retVal;
-}
-
-void QNetworkSessionPrivate::handleSymbianConnectionStatusChange(TInt aConnectionStatus,
-                                                                 TInt aError,
-                                                                 TUint accessPointId)
-{
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-    qDebug() << "QNS this : " << QString::number((uint)this) << " - " << QString::number(accessPointId) << " , status : " << QString::number(aConnectionStatus);
-#endif
-    switch (aConnectionStatus)
-        {
-        // Connection unitialised
-        case KConnectionUninitialised:
-            break;
-
-        // Starting connetion selection
-        case KStartingSelection:
-            break;
-
-        // Selection finished
-        case KFinishedSelection:
-            if (aError == KErrNone)
-                {
-                break;
-                }
-            else
-                {
-                // The user pressed e.g. "Cancel" and did not select an IAP
-                newState(QNetworkSession::Disconnected,accessPointId);
-                }
-            break;
-
-        // Connection failure
-        case KConnectionFailure:
-            newState(QNetworkSession::NotAvailable);
-            break;
-
-        // Prepearing connection (e.g. dialing)
-        case KPsdStartingConfiguration:
-        case KPsdFinishedConfiguration:
-        case KCsdFinishedDialling:
-        case KCsdScanningScript:
-        case KCsdGettingLoginInfo:
-        case KCsdGotLoginInfo:
-            break;
-
-        case KConfigDaemonStartingRegistration:
-        // Creating connection (e.g. GPRS activation)
-        case KCsdStartingConnect:
-        case KCsdFinishedConnect:
-            newState(QNetworkSession::Connecting,accessPointId);
-            break;
-
-        // Starting log in
-        case KCsdStartingLogIn:
-            break;
-
-        // Finished login
-        case KCsdFinishedLogIn:
-            break;
-
-        // Connection open
-        case KConnectionOpen:
-            break;
-
-        case KLinkLayerOpen:
-            newState(QNetworkSession::Connected,accessPointId);
-            break;
-
-        // Connection blocked or suspended
-        case KDataTransferTemporarilyBlocked:
-            break;
-
-        case KConfigDaemonStartingDeregistration:
-        // Hangup or GRPS deactivation
-        case KConnectionStartingClose:
-            newState(QNetworkSession::Closing,accessPointId);
-            break;
-
-        // Connection closed
-        case KConnectionClosed:
-        case KLinkLayerClosed:
-            newState(QNetworkSession::Disconnected,accessPointId);
-            // Report manager about this to make sure this event
-            // is received by all interseted parties (mediated by
-            // manager because it does always receive all events from
-            // connection monitor).
-#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
-            qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "reporting disconnection to manager.";
-#endif
-            if (publicConfig.d.data()) {
-                ((QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager)->configurationStateChangeReport(publicConfig.d.data()->numericId, QNetworkSession::Disconnected);
-            }
-            break;
-        // Unhandled state
-        default:
-            break;
-        }
-}
-
-ConnectionProgressNotifier::ConnectionProgressNotifier(QNetworkSessionPrivate& owner, RConnection& connection)
-    : CActive(CActive::EPriorityUserInput), iOwner(owner), iConnection(connection)
-{
-    CActiveScheduler::Add(this);
-}
-
-ConnectionProgressNotifier::~ConnectionProgressNotifier()
-{
-    Cancel();
-}
-
-void ConnectionProgressNotifier::StartNotifications()
-{
-    if (!IsActive()) {
-        SetActive();
-    }
-    iConnection.ProgressNotification(iProgress, iStatus);
-}
-
-void ConnectionProgressNotifier::StopNotifications()
-{
-    Cancel();
-}
-
-void ConnectionProgressNotifier::DoCancel()
-{
-    iConnection.CancelProgressNotification();
-}
-
-void ConnectionProgressNotifier::RunL()
-{
-    if (iStatus == KErrNone) {
-        QT_TRYCATCH_LEAVING(iOwner.handleSymbianConnectionStatusChange(iProgress().iStage, iProgress().iError));
-    
-        SetActive();
-        iConnection.ProgressNotification(iProgress, iStatus);
-    }
-}
-
-#include "moc_qnetworksession_s60_p.cpp"
-
-QTM_END_NAMESPACE
--- a/qtmobility/src/bearer/qnetworksession_s60_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKSESSIONPRIVATE_H
-#define QNETWORKSESSIONPRIVATE_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qnetworksession.h"
-
-#include <QDateTime>
-
-#include <e32base.h>
-#include <commdbconnpref.h>
-#include <es_sock.h>
-#include <rconnmon.h>
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    #include <comms-infras/cs_mobility_apiext.h>
-#endif
-#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
-    #include <extendedconnpref.h>
-#endif
-
-QTM_BEGIN_NAMESPACE
-
-class ConnectionProgressNotifier;
-typedef void (*TOpenCUnSetdefaultifFunction)();
-
-class QNetworkSessionPrivate : public QObject, public CActive
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
-                               , public MMobilityProtocolResp
-#endif
-{
-    Q_OBJECT
-public:
-    QNetworkSessionPrivate(); 
-    ~QNetworkSessionPrivate();
-    
-    //called by QNetworkSession constructor and ensures
-    //that the state is immediately updated (w/o actually opening
-    //a session). Also this function should take care of 
-    //notification hooks to discover future state changes.
-    void syncStateWithInterface();
-
-    QNetworkInterface currentInterface() const;
-    QVariant sessionProperty(const QString& key) const;
-    void setSessionProperty(const QString& key, const QVariant& value);
-    
-    void setALREnabled(bool enabled);
-
-    void open();
-    void close(bool allowSignals = true);
-    void stop();
-    void migrate();
-    void accept();
-    void ignore();
-    void reject();
-
-    QString errorString() const; //must return translated string
-    QNetworkSession::SessionError error() const;
-    quint64 bytesWritten() const;
-    quint64 bytesReceived() const;
-    quint64 activeTime() const;
-    
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE    
-public: // From MMobilityProtocolResp
-    void PreferredCarrierAvailable(TAccessPointInfo aOldAPInfo,
-                                   TAccessPointInfo aNewAPInfo,
-                                   TBool aIsUpgrade,
-                                   TBool aIsSeamless);
-
-    void NewCarrierActive(TAccessPointInfo aNewAPInfo, TBool aIsSeamless);
-
-    void Error(TInt aError);
-#endif    
-
-Q_SIGNALS:
-    //releases any pending waitForOpened() calls
-    void quitPendingWaitsForOpened();
-    
-protected: // From CActive
-    void RunL();
-    void DoCancel();
-    
-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;
-    quint64 transferredData(TUint dataType) const;
-    bool newState(QNetworkSession::State newState, TUint accessPointId = 0);
-    void handleSymbianConnectionStatusChange(TInt aConnectionStatus, TInt aError, TUint accessPointId = 0);
-    QNetworkConfiguration bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const;
-    QNetworkConfiguration activeConfiguration(TUint32 iapId = 0) const;
-    QNetworkInterface interface(TUint iapId) const;
-
-private: // data
-    // The config set on QNetworkSession
-    mutable QNetworkConfiguration publicConfig;
-
-    // If publicConfig is a ServiceNetwork this is a copy of publicConfig.
-    // If publicConfig is an UserChoice that is resolved to a ServiceNetwork this is the actual
-    // ServiceNetwork configuration.
-    mutable QNetworkConfiguration serviceConfig;
-
-    // This is the actual active configuration currently in use by the session.
-    // Either a copy of publicConfig or one of serviceConfig.children().
-    mutable QNetworkConfiguration activeConfig;
-    
-    mutable QNetworkInterface activeInterface;
-
-    QNetworkSession::State state;
-    bool isOpen;
-
-    QNetworkSession* q;
-    QDateTime startTime;
-
-    RLibrary iOpenCLibrary;
-    TOpenCUnSetdefaultifFunction iDynamicUnSetdefaultif;
-
-    mutable RSocketServ iSocketServ;
-    mutable RConnection iConnection;
-    mutable RConnectionMonitor iConnectionMonitor;
-    ConnectionProgressNotifier* ipConnectionNotifier;
-    
-    bool iHandleStateNotificationsFromManager;
-    bool iFirstSync;
-    bool iStoppedByUser;
-    bool iClosedByUser;
-    
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE    
-    CActiveCommsMobilityApiExt* iMobility;
-#endif    
-    
-    QNetworkSession::SessionError iError;
-    TInt iALREnabled;
-    TBool iALRUpgradingConnection;
-    TBool iConnectInBackground;
-    
-    QList<QString> iKnownConfigsBeforeConnectionStart;
-    
-    TUint32 iOldRoamingIap;
-    TUint32 iNewRoamingIap;
-
-    bool isOpening;
-
-    friend class QNetworkSession;
-    friend class ConnectionProgressNotifier;
-};
-
-class ConnectionProgressNotifier : public CActive
-{
-public:
-    ConnectionProgressNotifier(QNetworkSessionPrivate& owner, RConnection& connection); 
-    ~ConnectionProgressNotifier();
-    
-    void StartNotifications();
-    void StopNotifications();
-    
-protected: // From CActive
-    void RunL();
-    void DoCancel();
-
-private: // Data
-    QNetworkSessionPrivate& iOwner;
-    RConnection& iConnection;
-    TNifProgressBuf iProgress;
-    
-};
-
-QTM_END_NAMESPACE
-
-#endif //QNETWORKSESSIONPRIVATE_H
-
--- a/qtmobility/src/bearer/qnetworksessionengine.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnetworksessionengine_p.h"
-
-QTM_BEGIN_NAMESPACE
-
-QNetworkSessionEngine::QNetworkSessionEngine(QObject *parent)
-:   QObject(parent)
-{
-}
-
-QNetworkSessionEngine::~QNetworkSessionEngine()
-{
-}
-
-#include "moc_qnetworksessionengine_p.cpp"
-QTM_END_NAMESPACE
-
--- a/qtmobility/src/bearer/qnetworksessionengine_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKSESSIONENGINE_P_H
-#define QNETWORKSESSIONENGINE_P_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <qmobilityglobal.h>
-#include <QtCore/qobject.h>
-#include <QtCore/qglobal.h>
-#include <QtCore/qlist.h>
-#include <QtCore/qstring.h>
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationPrivate;
-class QNetworkSessionEngine : public QObject
-{
-    Q_OBJECT
-
-public:
-    enum ConnectionError {
-        InterfaceLookupError = 0,
-        ConnectError,
-        OperationNotSupported,
-        DisconnectionError,
-    };
-
-    QNetworkSessionEngine(QObject *parent = 0);
-    virtual ~QNetworkSessionEngine();
-
-    virtual QList<QNetworkConfigurationPrivate *> getConfigurations(bool *ok = 0) = 0;
-    virtual QString getInterfaceFromId(const QString &id) = 0;
-    virtual bool hasIdentifier(const QString &id) = 0;
-
-    //virtual QString bearerName(const QString &id) = 0;
-
-    virtual void connectToId(const QString &id) = 0;
-    virtual void disconnectFromId(const QString &id) = 0;
-
-    virtual void requestUpdate() = 0;
-
-Q_SIGNALS:
-    void configurationsChanged();
-    void connectionError(const QString &id, QNetworkSessionEngine::ConnectionError error);
-};
-
-QTM_END_NAMESPACE
-
-#endif
--- a/qtmobility/src/bearer/qnetworksessionengine_win_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNETWORKSESSIONENGINE_WIN_P_H
-#define QNETWORKSESSIONENGINE_WIN_P_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <winsock2.h>
-#include <mswsock.h>
-#undef interface
-#include <winioctl.h>
-
-#ifndef NS_NLA
-
-#define NS_NLA 15
-
-enum NLA_BLOB_DATA_TYPE {
-    NLA_RAW_DATA = 0,
-    NLA_INTERFACE = 1,
-    NLA_802_1X_LOCATION = 2,
-    NLA_CONNECTIVITY = 3,
-    NLA_ICS = 4
-};
-
-enum NLA_CONNECTIVITY_TYPE {
-    NLA_NETWORK_AD_HOC = 0,
-    NLA_NETWORK_MANAGED = 1,
-    NLA_NETWORK_UNMANAGED = 2,
-    NLA_NETWORK_UNKNOWN = 3
-};
-
-enum NLA_INTERNET {
-    NLA_INTERNET_UNKNOWN = 0,
-    NLA_INTERNET_NO = 1,
-    NLA_INTERNET_YES = 2
-};
-
-struct NLA_BLOB {
-    struct {
-        NLA_BLOB_DATA_TYPE type;
-        DWORD dwSize;
-        DWORD nextOffset;
-    } header;
-
-    union {
-        // NLA_RAW_DATA
-        CHAR rawData[1];
-
-        // NLA_INTERFACE
-        struct {
-            DWORD dwType;
-            DWORD dwSpeed;
-            CHAR adapterName[1];
-        } interfaceData;
-
-        // NLA_802_1X_LOCATION
-        struct {
-            CHAR information[1];
-        } locationData;
-
-        // NLA_CONNECTIVITY
-        struct {
-            NLA_CONNECTIVITY_TYPE type;
-            NLA_INTERNET internet;
-        } connectivity;
-
-        // NLA_ICS
-        struct {
-            struct {
-                DWORD speed;
-                DWORD type;
-                DWORD state;
-                WCHAR machineName[256];
-                WCHAR sharedAdapterName[256];
-            } remote;
-        } ICS;
-    } data;
-};
-#endif
-
-enum NDIS_MEDIUM {
-    NdisMedium802_3 = 0,
-};
-
-enum NDIS_PHYSICAL_MEDIUM {
-    NdisPhysicalMediumWirelessLan = 1,
-    NdisPhysicalMediumBluetooth = 10,
-    NdisPhysicalMediumWiMax = 12,
-};
-
-#define OID_GEN_MEDIA_SUPPORTED 0x00010103
-#define OID_GEN_PHYSICAL_MEDIUM 0x00010202
-
-#define IOCTL_NDIS_QUERY_GLOBAL_STATS \
-    CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, 0, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-#endif // QNETWORKSESSIONENGINE_WIN_P_H
--- a/qtmobility/src/bearer/qnlaengine_win.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,600 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnlaengine_win_p.h"
-#include "qnetworkconfiguration_p.h"
-
-#include <QtCore/qthread.h>
-#include <QtCore/qmutex.h>
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qstringlist.h>
-
-#include <QtCore/qdebug.h>
-
-#include "qnetworksessionengine_win_p.h"
-
-QTM_BEGIN_NAMESPACE
-
-Q_GLOBAL_STATIC(QNlaEngine, nlaEngine)
-
-QWindowsSockInit::QWindowsSockInit()
-:   version(0)
-{
-    //### should we try for 2.2 on all platforms ??
-    WSAData wsadata;
-
-    // IPv6 requires Winsock v2.0 or better.
-    if (WSAStartup(MAKEWORD(2,0), &wsadata) != 0) {
-        qWarning("QBearerManagementAPI: WinSock v2.0 initialization failed.");
-    } else {
-        version = 0x20;
-    }
-}
-
-QWindowsSockInit::~QWindowsSockInit()
-{
-    WSACleanup();
-}
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-static void printBlob(NLA_BLOB *blob)
-{
-    qDebug() << "==== BEGIN NLA_BLOB ====";
-
-    qDebug() << "type:" << blob->header.type;
-    qDebug() << "size:" << blob->header.dwSize;
-    qDebug() << "next offset:" << blob->header.nextOffset;
-
-    switch (blob->header.type) {
-    case NLA_RAW_DATA:
-        qDebug() << "Raw Data";
-        qDebug() << '\t' << blob->data.rawData;
-        break;
-    case NLA_INTERFACE:
-        qDebug() << "Interface";
-        qDebug() << "\ttype:" << blob->data.interfaceData.dwType;
-        qDebug() << "\tspeed:" << blob->data.interfaceData.dwSpeed;
-        qDebug() << "\tadapter:" << blob->data.interfaceData.adapterName;
-        break;
-    case NLA_802_1X_LOCATION:
-        qDebug() << "802.1x Location";
-        qDebug() << '\t' << blob->data.locationData.information;
-        break;
-    case NLA_CONNECTIVITY:
-        qDebug() << "Connectivity";
-        qDebug() << "\ttype:" << blob->data.connectivity.type;
-        qDebug() << "\tinternet:" << blob->data.connectivity.internet;
-        break;
-    case NLA_ICS:
-        qDebug() << "ICS";
-        qDebug() << "\tspeed:" << blob->data.ICS.remote.speed;
-        qDebug() << "\ttype:" << blob->data.ICS.remote.type;
-        qDebug() << "\tstate:" << blob->data.ICS.remote.state;
-        qDebug() << "\tmachine name:" << blob->data.ICS.remote.machineName;
-        qDebug() << "\tshared adapter name:" << blob->data.ICS.remote.sharedAdapterName;
-        break;
-    default:
-        qDebug() << "UNKNOWN BLOB TYPE";
-    }
-
-    qDebug() << "===== END NLA_BLOB =====";
-}
-#endif
-
-static QString qGetInterfaceType(const QString &interface)
-{
-#ifdef Q_OS_WINCE
-    Q_UNUSED(interface)
-#else
-    unsigned long oid;
-    DWORD bytesWritten;
-
-    NDIS_MEDIUM medium;
-    NDIS_PHYSICAL_MEDIUM physicalMedium;
-
-    HANDLE handle = CreateFile((TCHAR *)QString("\\\\.\\%1").arg(interface).utf16(), 0,
-                               FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
-    if (handle == INVALID_HANDLE_VALUE)
-        return QLatin1String("Unknown");
-
-    oid = OID_GEN_MEDIA_SUPPORTED;
-    bytesWritten = 0;
-    bool result = DeviceIoControl(handle, IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid),
-                                  &medium, sizeof(medium), &bytesWritten, 0);
-    if (!result) {
-        CloseHandle(handle);
-        return QLatin1String("Unknown");
-    }
-
-    oid = OID_GEN_PHYSICAL_MEDIUM;
-    bytesWritten = 0;
-    result = DeviceIoControl(handle, IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid),
-                             &physicalMedium, sizeof(physicalMedium), &bytesWritten, 0);
-    if (!result) {
-        CloseHandle(handle);
-
-        if (medium == NdisMedium802_3)
-            return QLatin1String("Ethernet");
-        else
-            return QLatin1String("Unknown");
-    }
-
-    CloseHandle(handle);
-
-    if (medium == NdisMedium802_3) {
-        switch (physicalMedium) {
-        case NdisPhysicalMediumWirelessLan:
-            return QLatin1String("WLAN");
-        case NdisPhysicalMediumBluetooth:
-            return QLatin1String("Bluetooth");
-        case NdisPhysicalMediumWiMax:
-            return QLatin1String("WiMAX");
-        default:
-#ifdef BEARER_MANAGEMENT_DEBUG
-            qDebug() << "Physical Medium" << physicalMedium;
-#endif
-            return QLatin1String("Ethernet");
-        }
-    }
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-    qDebug() << medium << physicalMedium;
-#endif
-
-#endif
-
-    return QLatin1String("Unknown");
-}
-
-class QNlaThread : public QThread
-{
-    Q_OBJECT
-
-public:
-    QNlaThread(QNlaEngine *parent = 0);
-    ~QNlaThread();
-
-    QList<QNetworkConfigurationPrivate *> getConfigurations();
-
-    void forceUpdate();
-
-protected:
-    virtual void run();
-
-private:
-    void updateConfigurations(QList<QNetworkConfigurationPrivate *> &configs);
-    DWORD parseBlob(NLA_BLOB *blob, QNetworkConfigurationPrivate *cpPriv) const;
-    QNetworkConfigurationPrivate *parseQuerySet(const WSAQUERYSET *querySet) const;
-    void fetchConfigurations();
-
-signals:
-    void networksChanged();
-
-private:
-    QMutex mutex;
-    HANDLE handle;
-    bool done;
-    QList<QNetworkConfigurationPrivate *> fetchedConfigurations;
-};
-
-QNlaThread::QNlaThread(QNlaEngine *parent)
-:   QThread(parent), handle(0), done(false)
-{
-}
-
-QNlaThread::~QNlaThread()
-{
-    mutex.lock();
-
-    done = true;
-
-    if (handle) {
-        /* cancel completion event */
-        if (WSALookupServiceEnd(handle) == SOCKET_ERROR)
-            qWarning("WSALookupServiceEnd error %d", WSAGetLastError());
-    }
-    mutex.unlock();
-
-    wait();
-}
-
-QList<QNetworkConfigurationPrivate *> QNlaThread::getConfigurations()
-{
-    QMutexLocker locker(&mutex);
-
-    QList<QNetworkConfigurationPrivate *> foundConfigurations;
-
-    for (int i = 0; i < fetchedConfigurations.count(); ++i) {
-        QNetworkConfigurationPrivate *config = new QNetworkConfigurationPrivate;
-        config->name = fetchedConfigurations.at(i)->name;
-        config->isValid = fetchedConfigurations.at(i)->isValid;
-        config->id = fetchedConfigurations.at(i)->id;
-        config->state = fetchedConfigurations.at(i)->state;
-        config->type = fetchedConfigurations.at(i)->type;
-        config->roamingSupported = fetchedConfigurations.at(i)->roamingSupported;
-        config->purpose = fetchedConfigurations.at(i)->purpose;
-        config->internet = fetchedConfigurations.at(i)->internet;
-        if (QNlaEngine *engine = qobject_cast<QNlaEngine *>(parent())) {
-            config->bearer = engine->bearerName(config->id);
-        }
-
-        foundConfigurations.append(config);
-    }
-
-    return foundConfigurations;
-}
-
-void QNlaThread::forceUpdate()
-{
-    mutex.lock();
-
-    if (handle) {
-        /* cancel completion event */
-        if (WSALookupServiceEnd(handle) == SOCKET_ERROR)
-            qWarning("WSALookupServiceEnd error %d", WSAGetLastError());
-        handle = 0;
-    }
-    mutex.unlock();
-}
-
-void QNlaThread::run()
-{
-    WSAEVENT changeEvent = WSACreateEvent();
-    if (changeEvent == WSA_INVALID_EVENT) {
-        qWarning("WSACreateEvent error %d", WSAGetLastError());
-        return;
-    }
-
-    while (true) {
-        fetchConfigurations();
-
-        WSAQUERYSET qsRestrictions;
-
-        memset(&qsRestrictions, 0, sizeof(qsRestrictions));
-        qsRestrictions.dwSize = sizeof(qsRestrictions);
-        qsRestrictions.dwNameSpace = NS_NLA;
-
-        mutex.lock();
-        if (done) {
-            mutex.unlock();
-            break;
-        }
-        int result = WSALookupServiceBegin(&qsRestrictions, LUP_RETURN_ALL, &handle);
-        mutex.unlock();
-
-        if (result == SOCKET_ERROR) {
-            qWarning("%s: WSALookupServiceBegin error %d", __FUNCTION__, WSAGetLastError());
-            break;
-        }
-
-        WSACOMPLETION completion;
-        WSAOVERLAPPED overlapped;
-
-        memset(&overlapped, 0, sizeof(overlapped));
-        overlapped.hEvent = changeEvent;
-
-        memset(&completion, 0, sizeof(completion));
-        completion.Type = NSP_NOTIFY_EVENT;
-        completion.Parameters.Event.lpOverlapped = &overlapped;
-
-        DWORD bytesReturned = 0;
-        result = WSANSPIoctl(handle, SIO_NSP_NOTIFY_CHANGE, 0, 0, 0, 0,
-                             &bytesReturned, &completion);
-        if (result == SOCKET_ERROR) {
-            int error = WSAGetLastError();
-            if (error != WSA_IO_PENDING) {
-                qWarning("WSANSPIoctl error %d", error);
-                break;
-            }
-        }
-
-#ifndef Q_OS_WINCE
-        // Not interested in unrelated IO completion events
-        // although we also don't want to block them
-        while (WaitForSingleObjectEx(changeEvent, WSA_INFINITE, true) != WAIT_IO_COMPLETION) {}
-#else
-        WaitForSingleObject(changeEvent, WSA_INFINITE);
-#endif
-
-        mutex.lock();
-        if (handle) {
-            result = WSALookupServiceEnd(handle);
-            if (result == SOCKET_ERROR) {
-                qWarning("WSALookupServiceEnd error %d", WSAGetLastError());
-                mutex.unlock();
-                break;
-            }
-            handle = 0;
-        }
-        mutex.unlock();
-    }
-
-    WSACloseEvent(changeEvent);
-}
-
-void QNlaThread::updateConfigurations(QList<QNetworkConfigurationPrivate *> &configs)
-{
-    mutex.lock();
-
-    while (!fetchedConfigurations.isEmpty())
-        delete fetchedConfigurations.takeFirst();
-
-    fetchedConfigurations = configs;
-
-    mutex.unlock();
-
-    emit networksChanged();
-}
-
-DWORD QNlaThread::parseBlob(NLA_BLOB *blob, QNetworkConfigurationPrivate *cpPriv) const
-{
-#ifdef BEARER_MANAGEMENT_DEBUG
-    printBlob(blob);
-#endif
-
-    switch (blob->header.type) {
-    case NLA_RAW_DATA:
-#ifdef BEARER_MANAGEMENT_DEBUG
-        qWarning("%s: unhandled header type NLA_RAW_DATA", __FUNCTION__);
-#endif
-        break;
-    case NLA_INTERFACE:
-        cpPriv->state = QNetworkConfiguration::Active;
-        if (QNlaEngine *engine = qobject_cast<QNlaEngine *>(parent())) {
-            engine->configurationInterface[cpPriv->id.toUInt()] =
-                QString(blob->data.interfaceData.adapterName);
-        }
-        break;
-    case NLA_802_1X_LOCATION:
-#ifdef BEARER_MANAGEMENT_DEBUG
-        qWarning("%s: unhandled header type NLA_802_1X_LOCATION", __FUNCTION__);
-#endif
-        break;
-    case NLA_CONNECTIVITY:
-        if (blob->data.connectivity.internet == NLA_INTERNET_YES)
-            cpPriv->internet = true;
-        else
-            cpPriv->internet = false;
-#ifdef BEARER_MANAGEMENT_DEBUG
-        qWarning("%s: unhandled header type NLA_CONNECTIVITY", __FUNCTION__);
-#endif
-        break;
-    case NLA_ICS:
-#ifdef BEARER_MANAGEMENT_DEBUG
-        qWarning("%s: unhandled header type NLA_ICS", __FUNCTION__);
-#endif
-        break;
-    default:
-#ifdef BEARER_MANAGEMENT_DEBUG
-        qWarning("%s: unhandled header type %d", __FUNCTION__, blob->header.type);
-#endif
-        ;
-    }
-
-    return blob->header.nextOffset;
-}
-
-QNetworkConfigurationPrivate *QNlaThread::parseQuerySet(const WSAQUERYSET *querySet) const
-{
-    QNetworkConfigurationPrivate *cpPriv = new QNetworkConfigurationPrivate;
-
-    cpPriv->name = QString::fromWCharArray(querySet->lpszServiceInstanceName);
-    cpPriv->isValid = true;
-    cpPriv->id = QString::number(qHash(QLatin1String("NLA:") + cpPriv->name));
-    cpPriv->state = QNetworkConfiguration::Defined;
-    cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-    qDebug() << "size:" << querySet->dwSize;
-    qDebug() << "service instance name:" << QString::fromUtf16(querySet->lpszServiceInstanceName);
-    qDebug() << "service class id:" << querySet->lpServiceClassId;
-    qDebug() << "version:" << querySet->lpVersion;
-    qDebug() << "comment:" << QString::fromUtf16(querySet->lpszComment);
-    qDebug() << "namespace:" << querySet->dwNameSpace;
-    qDebug() << "namespace provider id:" << querySet->lpNSProviderId;
-    qDebug() << "context:" << QString::fromUtf16(querySet->lpszContext);
-    qDebug() << "number of protocols:" << querySet->dwNumberOfProtocols;
-    qDebug() << "protocols:" << querySet->lpafpProtocols;
-    qDebug() << "query string:" << QString::fromUtf16(querySet->lpszQueryString);
-    qDebug() << "number of cs addresses:" << querySet->dwNumberOfCsAddrs;
-    qDebug() << "cs addresses:" << querySet->lpcsaBuffer;
-    qDebug() << "output flags:" << querySet->dwOutputFlags;
-#endif
-
-    if (querySet->lpBlob) {
-#ifdef BEARER_MANAGEMENT_DEBUG
-        qDebug() << "blob size:" << querySet->lpBlob->cbSize;
-        qDebug() << "blob data:" << querySet->lpBlob->pBlobData;
-#endif
-
-        DWORD offset = 0;
-        do {
-            NLA_BLOB *blob = reinterpret_cast<NLA_BLOB *>(querySet->lpBlob->pBlobData + offset);
-            DWORD nextOffset = parseBlob(blob, cpPriv);
-            if (nextOffset == offset)
-                break;
-            else
-                offset = nextOffset;
-        } while (offset != 0 && offset < querySet->lpBlob->cbSize);
-    }
-
-    return cpPriv;
-}
-
-void QNlaThread::fetchConfigurations()
-{
-    QList<QNetworkConfigurationPrivate *> foundConfigurations;
-
-    WSAQUERYSET qsRestrictions;
-    HANDLE hLookup = 0;
-
-    memset(&qsRestrictions, 0, sizeof(qsRestrictions));
-    qsRestrictions.dwSize = sizeof(qsRestrictions);
-    qsRestrictions.dwNameSpace = NS_NLA;
-
-    int result = WSALookupServiceBegin(&qsRestrictions, LUP_RETURN_ALL | LUP_DEEP, &hLookup);
-    if (result == SOCKET_ERROR) {
-        qWarning("%s: WSALookupServiceBegin error %d", __FUNCTION__, WSAGetLastError());
-        mutex.lock();
-        fetchedConfigurations.clear();
-        mutex.unlock();
-    }
-
-    char buffer[0x10000];
-    while (result == 0) {
-        DWORD bufferLength = sizeof(buffer);
-        result = WSALookupServiceNext(hLookup, LUP_RETURN_ALL,
-                                      &bufferLength, reinterpret_cast<WSAQUERYSET *>(buffer));
-
-        if (result == SOCKET_ERROR) {
-            int error = WSAGetLastError();
-
-            if (error == WSA_E_NO_MORE)
-                break;
-
-            if (error == WSAEFAULT) {
-                qDebug() << "buffer not big enough" << bufferLength;
-                break;
-            }
-
-            qWarning("WSALookupServiceNext error %d", WSAGetLastError());
-            break;
-        }
-
-        QNetworkConfigurationPrivate *cpPriv =
-            parseQuerySet(reinterpret_cast<WSAQUERYSET *>(buffer));
-
-        foundConfigurations.append(cpPriv);
-    }
-
-    if (hLookup) {
-        result = WSALookupServiceEnd(hLookup);
-        if (result == SOCKET_ERROR) {
-            qWarning("WSALookupServiceEnd error %d", WSAGetLastError());
-        }
-    }
-
-    updateConfigurations(foundConfigurations);
-}
-
-QNlaEngine::QNlaEngine(QObject *parent)
-:   QNetworkSessionEngine(parent), nlaThread(0)
-{
-    nlaThread = new QNlaThread(this);
-    connect(nlaThread, SIGNAL(networksChanged()),
-            this, SIGNAL(configurationsChanged()));
-    nlaThread->start();
-
-    qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
-}
-
-QNlaEngine::~QNlaEngine()
-{
-    delete nlaThread;
-}
-
-QList<QNetworkConfigurationPrivate *> QNlaEngine::getConfigurations(bool *ok)
-{
-    if (ok)
-        *ok = true;
-
-    return nlaThread->getConfigurations();
-}
-
-QString QNlaEngine::getInterfaceFromId(const QString &id)
-{
-    return configurationInterface.value(id.toUInt());
-}
-
-bool QNlaEngine::hasIdentifier(const QString &id)
-{
-    if (configurationInterface.contains(id.toUInt()))
-        return true;
-
-    bool result = false;
-    QList<QNetworkConfigurationPrivate *> l = nlaThread->getConfigurations();
-    while (!l.isEmpty()) {
-        QNetworkConfigurationPrivate* cpPriv = l.takeFirst();
-        if (!result && cpPriv->id == id) {
-            result = true;
-        }
-        delete cpPriv;
-    }
-   
-    return result; 
-}
-
-QString QNlaEngine::bearerName(const QString &id)
-{
-    QString interface = getInterfaceFromId(id);
-
-    if (interface.isEmpty())
-        return QString();
-
-    return qGetInterfaceType(interface);
-}
-
-void QNlaEngine::connectToId(const QString &id)
-{
-    emit connectionError(id, OperationNotSupported);
-}
-
-void QNlaEngine::disconnectFromId(const QString &id)
-{
-    emit connectionError(id, OperationNotSupported);
-}
-
-void QNlaEngine::requestUpdate()
-{
-    nlaThread->forceUpdate();
-}
-
-QNlaEngine *QNlaEngine::instance()
-{
-    return nlaEngine();
-}
-
-#include "qnlaengine_win.moc"
-#include "moc_qnlaengine_win_p.cpp"
-QTM_END_NAMESPACE
-
-
-
--- a/qtmobility/src/bearer/qnlaengine_win_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNLAENGINE_P_H
-#define QNLAENGINE_P_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qnetworksessionengine_p.h"
-
-#include <QMap>
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationPrivate;
-class QNlaThread;
-
-class QWindowsSockInit
-{
-public:
-    QWindowsSockInit();
-    ~QWindowsSockInit();
-    int version;
-};
-
-class QNlaEngine : public QNetworkSessionEngine
-{
-    Q_OBJECT
-
-    friend class QNlaThread;
-
-public:
-    QNlaEngine(QObject *parent = 0);
-    ~QNlaEngine();
-
-    QList<QNetworkConfigurationPrivate *> getConfigurations(bool *ok = 0);
-    QString getInterfaceFromId(const QString &id);
-    bool hasIdentifier(const QString &id);
-
-    QString bearerName(const QString &id);
-
-    void connectToId(const QString &id);
-    void disconnectFromId(const QString &id);
-
-    void requestUpdate();
-
-    static QNlaEngine *instance();
-
-private:
-    QWindowsSockInit winSock;
-    QNlaThread *nlaThread;
-    QMap<uint, QString> configurationInterface;
-};
-
-QTM_END_NAMESPACE
-
-#endif
--- a/qtmobility/src/bearer/qnmdbushelper.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-// this class is for helping qdbus get stuff
-
-#include "qnmdbushelper_p.h"
-
-#if !defined(QT_NO_DBUS) && !defined(Q_OS_MAC)
-#include "qnetworkmanagerservice_p.h"
-
-#include <QDBusError>
-#include <QDBusInterface>
-#include <QDBusMessage>
-#include <QDBusReply>
-#endif
-
-#include <QDebug>
-
-QTM_BEGIN_NAMESPACE
-
-
-QNmDBusHelper::QNmDBusHelper(QObject * parent)
-        : QObject(parent)
-{
-}
-
-QNmDBusHelper::~QNmDBusHelper()
-{
-}
-
-void QNmDBusHelper::deviceStateChanged(quint32 state)
- {
-    QDBusMessage msg = this->message();
-    if(state == NM_DEVICE_STATE_ACTIVATED
-       || state == NM_DEVICE_STATE_DISCONNECTED
-       || state == NM_DEVICE_STATE_UNAVAILABLE
-       || state == NM_DEVICE_STATE_FAILED) {
-        emit pathForStateChanged(msg.path(), state);
-    }
- }
-
-void QNmDBusHelper::slotAccessPointAdded(QDBusObjectPath path)
-{
-    if(path.path().length() > 2) {
-        QDBusMessage msg = this->message();
-        emit pathForAccessPointAdded(msg.path(), path);
-    }
-}
-
-void QNmDBusHelper::slotAccessPointRemoved(QDBusObjectPath path)
-{
-    if(path.path().length() > 2) {
-        QDBusMessage msg = this->message();
-        emit pathForAccessPointRemoved(msg.path(), path);
-    }
-}
-
-void QNmDBusHelper::slotPropertiesChanged(QMap<QString,QVariant> map)
-{
-    QDBusMessage msg = this->message();
-    QMapIterator<QString, QVariant> i(map);
-    while (i.hasNext()) {
-        i.next();
-        if( i.key() == "State") { //state only applies to device interfaces
-            quint32 state = i.value().toUInt();
-            if( state == NM_DEVICE_STATE_ACTIVATED
-                || state == NM_DEVICE_STATE_DISCONNECTED
-                || state == NM_DEVICE_STATE_UNAVAILABLE
-                || state == NM_DEVICE_STATE_FAILED) {
-                emit  pathForPropertiesChanged( msg.path(), map);
-            }
-        } else if( i.key() == "ActiveAccessPoint") {
-            //            qWarning()  << __PRETTY_FUNCTION__ << i.key() << ": " << i.value().value<QDBusObjectPath>().path();
-            //      } else if( i.key() == "Strength")
-            //            qWarning()  << __PRETTY_FUNCTION__ << i.key() << ": " << i.value().toUInt();
-            //   else
-            //            qWarning()  << __PRETTY_FUNCTION__ << i.key() << ": " << i.value();
-        }
-    }
-}
-
-void QNmDBusHelper::slotSettingsRemoved()
-{
-    QDBusMessage msg = this->message();
-    emit pathForSettingsRemoved(msg.path());
-}
-
-#include "moc_qnmdbushelper_p.cpp"
-QTM_END_NAMESPACE
--- a/qtmobility/src/bearer/qnmdbushelper_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNMDBUSHELPERPRIVATE_H
-#define QNMDBUSHELPERPRIVATE_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <qmobilityglobal.h>
-#if !defined(QT_NO_DBUS) && !defined(Q_OS_MAC)
-#include <QDBusObjectPath>
-#include <QDBusContext>
-#include <QMap>
-#endif
-
-QTM_BEGIN_NAMESPACE
-
-#if !defined(QT_NO_DBUS) && !defined(Q_OS_MAC)
-
-class QNmDBusHelper: public QObject, protected QDBusContext
- {
-     Q_OBJECT
- public:
-    QNmDBusHelper(QObject *parent = 0);
-    ~QNmDBusHelper();
-
- public slots:
-    void deviceStateChanged(quint32);
-    void slotAccessPointAdded( QDBusObjectPath );
-    void slotAccessPointRemoved( QDBusObjectPath );
-    void slotPropertiesChanged( QMap<QString,QVariant>);
-    void slotSettingsRemoved();
-
-Q_SIGNALS:
-    void pathForStateChanged(const QString &, quint32);
-    void pathForAccessPointAdded(const QString &,  QDBusObjectPath );
-    void pathForAccessPointRemoved(const QString &,  QDBusObjectPath );
-    void pathForPropertiesChanged(const QString &, QMap<QString,QVariant>);
-    void pathForSettingsRemoved(const QString &);
-};
-#endif
-
-QTM_END_NAMESPACE
-
-#endif// QNMDBUSHELPERPRIVATE_H
--- a/qtmobility/src/bearer/qnmwifiengine_unix.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,839 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnmwifiengine_unix_p.h"
-#include "qnetworkconfiguration_p.h"
-#include <qnetworkconfiguration.h>
-
-#include <QtCore/qstringlist.h>
-#include <QScopedPointer>
-
-#include <QtNetwork/qnetworkinterface.h>
-#include <qnetworkmanagerservice_p.h>
-
-#include <QNetworkInterface>
-
-QTM_BEGIN_NAMESPACE
-Q_GLOBAL_STATIC(QNmWifiEngine, nmWifiEngine)
-typedef  QList<QList<uint> > QNmSettingsAddressMap;
-QTM_END_NAMESPACE
-
-Q_DECLARE_METATYPE(QTM_PREPEND_NAMESPACE(QNmSettingsAddressMap))
-
-QTM_BEGIN_NAMESPACE
-
-QNmWifiEngine::QNmWifiEngine(QObject *parent)
-:   QNetworkSessionEngine(parent)
-{
-    iface = new QNetworkManagerInterface(this);
-    if(!iface->isValid()) {
-        return;
-    }
-    iface->setConnections();
-    connect(iface,SIGNAL(deviceAdded(QDBusObjectPath)),
-            this,SLOT(addDevice(QDBusObjectPath)));
-//     connect(iface,SIGNAL(deviceRemoved(QDBusObjectPath)),
-//             this,SLOT(removeDevice(QDBusObjectPath)));
-    connect(iface, SIGNAL(activationFinished(QDBusPendingCallWatcher*)),
-            this, SLOT(slotActivationFinished(QDBusPendingCallWatcher*)));
-
-    foreach (const QDBusObjectPath &path, iface->getDevices())
-        addDevice(path);
-
-    QStringList connectionServices;
-    connectionServices << NM_DBUS_SERVICE_SYSTEM_SETTINGS;
-    connectionServices << NM_DBUS_SERVICE_USER_SETTINGS;
-    QNetworkManagerSettings *settingsiface;
-    foreach (const QString &service, connectionServices) {
-        settingsiface = new QNetworkManagerSettings(service, this);
-        settingsiface->setConnections();
-        connect(settingsiface,SIGNAL(newConnection(QDBusObjectPath)),
-                this,(SLOT(newConnection(QDBusObjectPath))));
-    }
-
-    updated = false;
-}
-
-QNmWifiEngine::~QNmWifiEngine()
-{
-}
-
-QString QNmWifiEngine::getNameForConfiguration(QNetworkManagerInterfaceDevice *devIface)
-{
-    QString newname;
-    if (devIface->state() == NM_DEVICE_STATE_ACTIVATED) {
-        QString path = devIface->ip4config().path();
-        QNetworkManagerIp4Config * ipIface;
-        ipIface = new QNetworkManagerIp4Config(path);
-        newname = ipIface->domains().join(" ");
-        delete ipIface;
-    }
-    //fallback to interface name
-    if(newname.isEmpty())
-        newname = devIface->networkInterface().name();
-    return newname;
-}
-
-
-QList<QNetworkConfigurationPrivate *> QNmWifiEngine::getConfigurations(bool *ok)
-{
-    if (ok)
-        *ok = false;
-
-    if(!updated) {
-        foundConfigurations.clear();
-        if(knownSsids.isEmpty())
-            updateKnownSsids(); 
-
-        scanForAccessPoints();
-        updateActiveConnectionsPaths();
-        knownConnections();
-
-        accessPointConnections();
-
-        updated = true;
-    }
-    return foundConfigurations;
-}
-
-void QNmWifiEngine::knownConnections()
-{
-    QStringList connectionServices;
-    connectionServices << NM_DBUS_SERVICE_SYSTEM_SETTINGS;
-    connectionServices << NM_DBUS_SERVICE_USER_SETTINGS;
-
-    QString connPath;
-
-    QScopedPointer<QNetworkManagerSettings> settingsiface;
-    foreach (const QString &service, connectionServices) {
-        QString ident;
-        settingsiface.reset(new QNetworkManagerSettings(service));
-
-        QNetworkManagerSettingsConnection *sysIface;
-        foreach (const QDBusObjectPath &path, settingsiface->listConnections()) {
-            ident = path.path();
-            bool addIt = false;
-            QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
-            sysIface = new QNetworkManagerSettingsConnection(service, path.path(), this);
-            sysIface->setConnections();
-            connect(sysIface, SIGNAL(removed(QString)),
-                    this,SLOT(settingsConnectionRemoved(QString)));
-
-            cpPriv->name = sysIface->getId();
-            cpPriv->isValid = true;
-            cpPriv->id = sysIface->getUuid();
-            cpPriv->internet = true;
-            cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
-            cpPriv->state = getStateForId(cpPriv->id);
-
-            cpPriv->purpose = QNetworkConfiguration::PrivatePurpose;
-
-
-            if(sysIface->getType() == DEVICE_TYPE_802_3_ETHERNET) {
-                QString mac = sysIface->getMacAddress();
-                if(!mac.length() > 2) {
-                    QString devPath;
-                    devPath = deviceConnectionPath(mac);
-
-                    QNetworkManagerInterfaceDevice devIface(devPath);
-                    cpPriv->serviceInterface = devIface.networkInterface();
-                    QScopedPointer<QNetworkManagerInterfaceDeviceWired> devWiredIface;
-                    devWiredIface.reset(new QNetworkManagerInterfaceDeviceWired(devIface.connectionInterface()->path()));
-                    cpPriv->internet = devWiredIface->carrier();
-
-                    // use this mac addy
-                } else {
-                    cpPriv->serviceInterface = getBestInterface( DEVICE_TYPE_802_3_ETHERNET, cpPriv->id);
-                }
-
-                cpPriv->internet = true;
-
-                addIt = true;
-            } else if(sysIface->getType() == DEVICE_TYPE_802_11_WIRELESS) {
-                QString mac = sysIface->getMacAddress();;
-                if(!mac.length() > 2) {
-                    QString devPath;
-                    devPath = deviceConnectionPath(mac);
-
-                    QNetworkManagerInterfaceDevice devIface(devPath);
-                    cpPriv->serviceInterface = devIface.networkInterface();
-                    // use this mac addy
-                } else {
-                    cpPriv->serviceInterface = getBestInterface( DEVICE_TYPE_802_11_WIRELESS, cpPriv->id);
-                }
-                addIt = true;
-                // get the wifi interface state first.. do we need this?
-                //   QString activeAPPath = devWirelessIface->activeAccessPoint().path();
-            }
-            if(addIt) {
-                foundConfigurations.append(cpPriv);
-                configurationInterface[cpPriv->id] = cpPriv->serviceInterface.name();
-                cpPriv->bearer = bearerName(cpPriv->id);
-            }
-        } 
-    }
-}
-
-void QNmWifiEngine::accessPointConnections()
-{
-    QScopedPointer<QNetworkManagerInterfaceDevice> devIface;
-    foreach (const QDBusObjectPath &path, iface->getDevices()) {
-        devIface.reset(new QNetworkManagerInterfaceDevice(path.path()));
-        if(devIface->deviceType() == DEVICE_TYPE_802_11_WIRELESS) {
-            const QList<QString> apList = availableAccessPoints.uniqueKeys();
-
-            QList<QString>::const_iterator i;
-            for (i = apList.constBegin(); i != apList.constEnd(); ++i) {
-                QNetworkConfigurationPrivate* cpPriv;
-                cpPriv = addAccessPoint( devIface->connectionInterface()->path(), availableAccessPoints[*i]);
-                if(cpPriv->isValid) {
-                    foundConfigurations.append(cpPriv);
-                    configurationInterface[cpPriv->id] = cpPriv->serviceInterface.name();
-                    cpPriv->bearer = bearerName(cpPriv->id);
-                }
-            }
-        }
-    }
-}
-
-QString QNmWifiEngine::getInterfaceFromId(const QString &id)
-{
-    return configurationInterface.value(id);
-}
-
-bool QNmWifiEngine::hasIdentifier(const QString &id)
-{
-    if (configurationInterface.contains(id))
-        return true;
-
-    return false;
-}
-
-QString QNmWifiEngine::bearerName(const QString &id)
-{
-    QString interface = getInterfaceFromId(id);
-    QScopedPointer<QNetworkManagerInterfaceDevice> devIface;
-    foreach (const QDBusObjectPath &path, iface->getDevices()) {
-        devIface.reset(new QNetworkManagerInterfaceDevice(path.path()));
-
-        if(interface == devIface->networkInterface().name()) {
-
-            switch(devIface->deviceType()) {
-                case DEVICE_TYPE_802_3_ETHERNET:
-                    return QLatin1String("Ethernet");
-                    break;
-                case DEVICE_TYPE_802_11_WIRELESS:
-                    return QLatin1String("WLAN");
-                    break;
-                case DEVICE_TYPE_GSM:
-                    return QLatin1String("2G");
-                    break;
-                case DEVICE_TYPE_CDMA:
-                    return QLatin1String("CDMA2000");
-                    break;
-                default:
-                    break;
-            }
-        }
-    }
-    return QLatin1String("Unknown");
-}
-
-void QNmWifiEngine::connectToId(const QString &id)
-{
-    activatingConnectionPath = id;
-    QStringList connectionSettings = getConnectionPathForId(id);
-    if(connectionSettings.isEmpty()) {
-        emit connectionError(id, OperationNotSupported);
-        return;
-    }
-
-    QDBusObjectPath connectionPath(connectionSettings.at(1));
-    QString interface = getInterfaceFromId(id);
-
-    interface = QNetworkInterface::interfaceFromName(interface).hardwareAddress().toLower();
-    QString devPath;
-    devPath = deviceConnectionPath(interface);
-    QDBusObjectPath devicePath(devPath);
-
-    iface->activateConnection(
-            connectionSettings.at(0),
-            connectionPath,
-            devicePath,
-            connectionPath);
-}
-
-void QNmWifiEngine::disconnectFromId(const QString &id)
-{
-    QString activeConnectionPath = getActiveConnectionPath(id);
-
-    if (!activeConnectionPath.isEmpty()) {
-        QScopedPointer<QNetworkManagerConnectionActive> activeCon;
-        activeCon.reset(new QNetworkManagerConnectionActive(activeConnectionPath));
-        QScopedPointer<QNetworkManagerSettingsConnection> settingsCon;
-        settingsCon.reset(new QNetworkManagerSettingsConnection(activeCon->serviceName(), activeCon->connection().path()));
-
-        if(settingsCon->getType() ==  DEVICE_TYPE_802_3_ETHERNET) { //use depreciated value for now
-            emit connectionError(id, OperationNotSupported);
-        } else {
-            QDBusObjectPath dbpath(activeConnectionPath);
-            iface->deactivateConnection(dbpath);
-            activatingConnectionPath = "";
-        }
-    }
-}
-
-void QNmWifiEngine::requestUpdate()
-{
-    updated = false;
-    knownSsids.clear();
-    availableAccessPoints.clear();
-    emitConfigurationsChanged();
-}
-
-QNmWifiEngine *QNmWifiEngine::instance()
-{
-    QDBusConnection dbusConnection = QDBusConnection::systemBus();
-    if (dbusConnection.isConnected()) {
-        QDBusConnectionInterface *dbiface = dbusConnection.interface();
-        QDBusReply<bool> reply = dbiface->isServiceRegistered("org.freedesktop.NetworkManager");
-        if (reply.isValid() && reply.value())
-            return nmWifiEngine();
-    }
-
-    return 0;
-}
-
-void  QNmWifiEngine::updateKnownSsids()
-{
-    QStringList connectionServices;
-    connectionServices << NM_DBUS_SERVICE_SYSTEM_SETTINGS;
-    connectionServices << NM_DBUS_SERVICE_USER_SETTINGS;
-
-    QScopedPointer<QNetworkManagerSettings> settingsiface;
-    foreach (const QString &service, connectionServices) {
-        settingsiface.reset(new QNetworkManagerSettings(service));
-        foreach (const QDBusObjectPath &path, settingsiface->listConnections()) {
-            QNetworkManagerSettingsConnection sysIface(service, path.path());
-            knownSsids << sysIface.getSsid();
-        }
-    }
-}
-
-void QNmWifiEngine::updateActiveConnectionsPaths()
-{ //need to know which connection paths are currently active/connected
-    QScopedPointer<QNetworkManagerInterface> dbIface;
-    activeConnectionPaths.clear();
-    dbIface.reset(new QNetworkManagerInterface);
-    foreach (const QDBusObjectPath &conpath, dbIface->activeConnections())
-        activeConnectionPaths << conpath.path();
-}
-
-QNetworkConfigurationPrivate * QNmWifiEngine::addAccessPoint( const QString &iPath, QDBusObjectPath path)
-{
-
-    QScopedPointer<QNetworkManagerInterfaceDevice> devIface(new QNetworkManagerInterfaceDevice(iPath));
-    QScopedPointer<QNetworkManagerInterfaceDeviceWireless> devWirelessIface(new QNetworkManagerInterfaceDeviceWireless(iPath));
-
-    QString activeAPPath = devWirelessIface->activeAccessPoint().path();
-
-    QScopedPointer<QNetworkManagerInterfaceAccessPoint> accessPointIface(new QNetworkManagerInterfaceAccessPoint(path.path()));
-
-    QString ident = accessPointIface->connectionInterface()->path();
-    quint32 nmState = devIface->state();
-
-    QString ssid = accessPointIface->ssid();
-    QString hwAddy = accessPointIface->hwAddress();
-    QString sInterface = devIface->networkInterface().name();
-
-    QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
-    bool addIt = true;
-
-    if(addIt) {
-
-        cpPriv->name = ssid;
-        cpPriv->isValid = true;
-        cpPriv->id = ident;
-        cpPriv->internet = true;
-        cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
-        cpPriv->serviceInterface = devIface->networkInterface();
-
-        cpPriv->state = getAPState(nmState, knownSsids.contains(cpPriv->name));
-
-        if(activeAPPath == accessPointIface->connectionInterface()->path()) {
-            cpPriv->state = ( cpPriv->state | QNetworkConfiguration::Active);
-        }
-        if(accessPointIface->flags() == NM_802_11_AP_FLAGS_PRIVACY)
-            cpPriv->purpose = QNetworkConfiguration::PrivatePurpose;
-        else
-            cpPriv->purpose = QNetworkConfiguration::PublicPurpose;
-        return cpPriv;
-    } else {
-        cpPriv->isValid = false;
-    }
-    return cpPriv;
-}
-
-
- QNetworkConfiguration::StateFlags QNmWifiEngine::getAPState(qint32 nmState, bool isKnown)
-{
-    QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
-    // this is the state of the wifi device interface
-    if(isKnown)
-        state = ( QNetworkConfiguration::Defined);
-
-    switch(nmState) { //device interface state, not AP state
-    case  NM_DEVICE_STATE_UNKNOWN:
-    case  NM_DEVICE_STATE_UNMANAGED:
-    case NM_DEVICE_STATE_UNAVAILABLE:
-        state = (QNetworkConfiguration::Undefined);
-        break;
-    case NM_DEVICE_STATE_DISCONNECTED:
-        {
-            if(isKnown)
-                state = ( state  | QNetworkConfiguration::Discovered);
-        }
-        break;
-    case NM_DEVICE_STATE_PREPARE:
-    case NM_DEVICE_STATE_CONFIG:
-    case NM_DEVICE_STATE_NEED_AUTH:
-    case NM_DEVICE_STATE_IP_CONFIG:
-        if(isKnown)
-            state = ( state | QNetworkConfiguration::Discovered);
-        break;
-    case NM_DEVICE_STATE_ACTIVATED:
-        {
-            if(isKnown)
-                state = ( state | QNetworkConfiguration::Discovered);
-        }
-        break;
-    };
-    return state;
-}
-
-QString QNmWifiEngine::getActiveConnectionPath(const QString &id)
-{
-    QStringList connectionSettings = getConnectionPathForId(id);
-    QNetworkManagerInterface ifaceD;
-    QScopedPointer<QNetworkManagerConnectionActive> conDetailsD;
-    foreach (const QDBusObjectPath &path, ifaceD.activeConnections()) {
-        conDetailsD.reset(new QNetworkManagerConnectionActive( path.path()));
-        if(conDetailsD->connection().path() == connectionSettings.at(1)
-            && conDetailsD->serviceName() == connectionSettings.at(0))
-            return path.path();
-    }
-    return QString();
-}
-
- QNetworkConfiguration::StateFlags QNmWifiEngine::getStateFlag(quint32 nmstate)
- {
-     QNetworkConfiguration::StateFlags flag;
-     switch (nmstate) {
-     case  NM_DEVICE_STATE_UNKNOWN:
-     case NM_DEVICE_STATE_FAILED:
-     case NM_DEVICE_STATE_UNMANAGED:
-         flag = (QNetworkConfiguration::Undefined);
-         break;
-     case NM_DEVICE_STATE_PREPARE:
-     case NM_DEVICE_STATE_CONFIG:
-     case NM_DEVICE_STATE_NEED_AUTH:
-     case NM_DEVICE_STATE_IP_CONFIG:
-     case  NM_DEVICE_STATE_UNAVAILABLE:
-         flag = (QNetworkConfiguration::Defined);
-         break;
-     case NM_DEVICE_STATE_DISCONNECTED:
-         flag = ( flag | QNetworkConfiguration::Discovered );
-        break;
-     case NM_DEVICE_STATE_ACTIVATED:
-         {
-             flag = ( flag | QNetworkConfiguration::Discovered
-                      | QNetworkConfiguration::Active );
-         }
-         break;
-     default:
-         flag = ( QNetworkConfiguration::Defined);
-         break;
-     };
-     return flag;
- }
-
-void QNmWifiEngine::updateDeviceInterfaceState(const QString &/*path*/, quint32 nmState)
-{
-    if(nmState == NM_DEVICE_STATE_ACTIVATED
-       || nmState == NM_DEVICE_STATE_DISCONNECTED
-       || nmState == NM_DEVICE_STATE_UNAVAILABLE
-       || nmState == NM_DEVICE_STATE_FAILED) {
-
-        QNetworkConfiguration::StateFlags state = (QNetworkConfiguration::Defined);
-        switch (nmState) {
-                case  NM_DEVICE_STATE_UNKNOWN:
-                case NM_DEVICE_STATE_FAILED:
-            state = (QNetworkConfiguration::Undefined);
-            emit connectionError(activatingConnectionPath, ConnectError);
-            requestUpdate();
-            break;
-                case  NM_DEVICE_STATE_UNAVAILABLE:
-            state = (QNetworkConfiguration::Defined);
-            requestUpdate();
-            break;
-                case NM_DEVICE_STATE_DISCONNECTED:
-            state = ( state | QNetworkConfiguration::Discovered );
-            requestUpdate();
-            break;
-                case NM_DEVICE_STATE_ACTIVATED:
-            {
-                state = ( state | QNetworkConfiguration::Discovered
-                          | QNetworkConfiguration::Active );
-                requestUpdate();
-            }
-            break;
-                default:
-            state = ( QNetworkConfiguration::Defined);
-            break;
-        };
-    }
-}
-
-void QNmWifiEngine::addDevice(QDBusObjectPath path)
-{
-    QNetworkManagerInterfaceDevice *devIface = new QNetworkManagerInterfaceDevice(path.path(), this);
-    devIface->setConnections();
-    connect(devIface,SIGNAL(stateChanged(const QString &, quint32)),
-            this, SLOT(updateDeviceInterfaceState(const QString&, quint32)));
-
-    if(!devicePaths.contains(path.path()))
-        devicePaths << path.path();
-
-    switch(devIface->deviceType()) {
-    case DEVICE_TYPE_802_3_ETHERNET:
-        {
-            QNetworkManagerInterfaceDeviceWired * devWiredIface;
-            devWiredIface = new QNetworkManagerInterfaceDeviceWired(devIface->connectionInterface()->path(), this);
-            devWiredIface->setConnections();
-            connect(devWiredIface, SIGNAL(propertiesChanged(const QString &,QMap<QString,QVariant>)),
-                    this,SLOT(cmpPropertiesChanged( const QString &, QMap<QString,QVariant>)));
-            requestUpdate();
-        }
-        break;
-    case DEVICE_TYPE_802_11_WIRELESS:
-        {
-            QNetworkManagerInterfaceDeviceWireless *devWirelessIface;
-            devWirelessIface = new QNetworkManagerInterfaceDeviceWireless(devIface->connectionInterface()->path(), this);
-            devWirelessIface->setConnections();
-
-            connect(devWirelessIface, SIGNAL(propertiesChanged(const QString &,QMap<QString,QVariant>)),
-                    this,SLOT(cmpPropertiesChanged( const QString &, QMap<QString,QVariant>)));
-
-            connect(devWirelessIface, SIGNAL(accessPointAdded(const QString &,QDBusObjectPath)),
-                    this,SLOT(accessPointAdded(const QString &,QDBusObjectPath)));
-
-            connect(devWirelessIface, SIGNAL(accessPointRemoved(const QString &,QDBusObjectPath)),
-                    this,SLOT(accessPointRemoved(const QString &,QDBusObjectPath)));
-            requestUpdate();
-
-        }
-        break;
-            default:
-        break;
-    };
-}
-
-void QNmWifiEngine::cmpPropertiesChanged(const QString &path, QMap<QString,QVariant> map)
-{
-   QMapIterator<QString, QVariant> i(map);
-   while (i.hasNext()) {
-       i.next();
-       if( i.key() == "State") { //only applies to device interfaces
-           updateDeviceInterfaceState(path, i.value().toUInt());
-       }
-       if( i.key() == "ActiveAccessPoint") {
-       }
-       if( i.key() == "Carrier") { //someone got plugged in
-       }
-   }
-}
-
-void QNmWifiEngine::accessPointRemoved( const QString &aPath, QDBusObjectPath /*oPath*/)
-{
-    if(aPath.contains("devices")) {
-        requestUpdate();
-    }
-}
-
-void QNmWifiEngine::accessPointAdded( const QString &/*aPath*/, QDBusObjectPath /*oPath*/)
-{
-   requestUpdate();
-}
-
-QNetworkConfiguration::StateFlags QNmWifiEngine::getStateForId(const QString &id)
-{
-    bool isAvailable = false;
-    QStringList conPath = getConnectionPathForId(id);
-    QString aconpath = getActiveConnectionPath(id);
-
-    if(!aconpath.isEmpty()) {
-        //active connection
-        QNetworkManagerConnectionActive aConn(aconpath);
-
-        QScopedPointer<QNetworkManagerInterfaceDevice> ifaceDevice;
-        QScopedPointer<QNetworkManagerInterfaceDeviceWired> devWiredIface;
-        foreach (const QDBusObjectPath &dev, aConn.devices()) {
-            ifaceDevice.reset(new QNetworkManagerInterfaceDevice(dev.path()));
-
-            if(ifaceDevice->deviceType() == DEVICE_TYPE_802_3_ETHERNET) {
-
-                if(isAddressOfConnection(id, ifaceDevice->ip4Address())) {
-                    // this is it!
-                    return getStateFlag(ifaceDevice->state());
-                } else {
-                    continue;
-                }
-
-                if(ifaceDevice->state() == NM_DEVICE_STATE_UNAVAILABLE ||
-                   ifaceDevice->state() == NM_DEVICE_STATE_DISCONNECTED) {
-                    isAvailable = true;
-
-                    devWiredIface.reset(new QNetworkManagerInterfaceDeviceWired(ifaceDevice->connectionInterface()->path()));
-                    if(!devWiredIface->carrier())
-                        return QNetworkConfiguration::Defined;
-                } 
-            } else if(ifaceDevice->deviceType() == DEVICE_TYPE_802_11_WIRELESS) {
-
-            }
-
-            return getStateFlag(ifaceDevice->state());
-        }
-    } else {
-        // not active
-        QScopedPointer<QNetworkManagerSettingsConnection> sysIface;
-        sysIface.reset(new QNetworkManagerSettingsConnection(conPath.at(0),conPath.at(1)));
-        if(sysIface->isValid()) {
-            if(sysIface->getType() == DEVICE_TYPE_802_11_WIRELESS) {
-                QString ssid = sysIface->getSsid();
-                bool ok = false;
-
-                if(knownSsids.contains(ssid, Qt::CaseSensitive)) {
-                    foreach (const QString &onessid, knownSsids) {
-                        if(onessid == ssid && availableAccessPoints.contains(ssid)) {
-                            ok = true;
-                            break;
-                        }
-                    }
-                }   
-                if(ok)
-                    return getStateFlag(NM_DEVICE_STATE_DISCONNECTED);
-                else
-                    return getStateFlag(NM_DEVICE_STATE_UNAVAILABLE);
-            }
-        }
-    }
-
-    return QNetworkConfiguration::Defined; //not active, but we know this connection
-}
-
-bool QNmWifiEngine::isAddressOfConnection(const QString &id, quint32 ipaddress)
-{
-    QStringList conPath = getConnectionPathForId(id);
-    QString aConPath = getActiveConnectionPath(id);
-    if(aConPath.isEmpty()) {
-        // not active
-        return false;
-    }
-
-    QScopedPointer<QNetworkManagerConnectionActive> aConn;
-    aConn.reset(new QNetworkManagerConnectionActive(aConPath));
-    QScopedPointer<QNetworkManagerInterfaceDevice> ifaceDevice;
-    foreach (const QDBusObjectPath &device, aConn->devices()) {
-        ifaceDevice.reset(new QNetworkManagerInterfaceDevice(device.path()));
-        if(ifaceDevice->ip4Address() == ipaddress) {
-            return true;
-        }
-    }
-    return false;
-}
-
-QNetworkInterface QNmWifiEngine::getBestInterface( quint32 type, const QString &id)
-{
-    // check active connections first.
-    QStringList conIdPath = getConnectionPathForId(id);
-
-    QNetworkInterface interface;
-    QScopedPointer<QNetworkManagerConnectionActive> aConn;
-
-    foreach (const QString &conpath, activeConnectionPaths) {
-        aConn.reset(new QNetworkManagerConnectionActive(conpath));
-        if(aConn->connection().path() == conIdPath.at(1)
-            && aConn->serviceName() == conIdPath.at(0)) {
-
-            QList <QDBusObjectPath> devs = aConn->devices();
-            QNetworkManagerInterfaceDevice ifaceDevice(devs[0].path()); //just take the first one
-            return ifaceDevice.networkInterface();
-        }
-    }
-
-    //try guessing
-    QScopedPointer<QNetworkManagerInterfaceDevice> devIface;
-    foreach (const QDBusObjectPath &path, iface->getDevices()) {
-        devIface.reset(new QNetworkManagerInterfaceDevice(path.path()));
-        if(devIface->deviceType() == type ) {
-            if(devIface->state() ==  NM_DEVICE_STATE_DISCONNECTED) {
-                return devIface->networkInterface();
-            }
-        }
-    }
-    return QNetworkInterface();
-}
-
-quint64 QNmWifiEngine::receivedDataForId(const QString &id) const
-{
-    if(configurationInterface.count() > 1)
-        return 0;
-    quint64 result = 0;
-
-    QString devFile;
-    devFile =  configurationInterface.value(id);
-    QFile rx("/sys/class/net/"+devFile+"/statistics/rx_bytes");
-    if(rx.exists() && rx.open(QIODevice::ReadOnly | QIODevice::Text)) {
-        QTextStream in(&rx);
-        in >> result;
-        rx.close();
-    }
-    return result;
-}
-
-quint64 QNmWifiEngine::sentDataForId(const QString &id) const
-{
-    if(configurationInterface.count() > 1)
-        return 0;
-    quint64 result = 0;
-    QString devFile;
-    devFile =  configurationInterface.value(id);
-
-    QFile tx("/sys/class/net/"+devFile+"/statistics/tx_bytes");
-    if(tx.exists() && tx.open(QIODevice::ReadOnly | QIODevice::Text)) {
-        QTextStream in(&tx);
-        in >> result;
-        tx.close();
-    }
-    return result;
-}
-
-void QNmWifiEngine::newConnection(QDBusObjectPath /*path*/)
-{
-    requestUpdate();
-}
-
-void QNmWifiEngine::settingsConnectionRemoved(const QString &/*path*/)
-{
-    requestUpdate();
-}
-
-void QNmWifiEngine::slotActivationFinished(QDBusPendingCallWatcher *openCall)
-{
-    QDBusPendingReply<QDBusObjectPath> reply = *openCall;
-    if (reply.isError()) {
-        qWarning() <<"Error" <<  reply.error().name() << reply.error().message()
-                <<activatingConnectionPath;
-        emit connectionError(activatingConnectionPath, ConnectError);
-    }
-}
-
-void QNmWifiEngine::scanForAccessPoints()
-{
-    availableAccessPoints.clear();
-
-    QScopedPointer<QNetworkManagerInterfaceDevice> devIface;
-    QScopedPointer<QNetworkManagerInterfaceDeviceWireless> devWirelessIface;
-    QScopedPointer<QNetworkManagerInterfaceAccessPoint> accessPointIface;
-    foreach (const QDBusObjectPath &path, iface->getDevices()) {
-        devIface.reset(new QNetworkManagerInterfaceDevice(path.path()));
-
-        if(devIface->deviceType() == DEVICE_TYPE_802_11_WIRELESS) {
-
-            devWirelessIface.reset(new QNetworkManagerInterfaceDeviceWireless(devIface->connectionInterface()->path()));
-            ////////////// AccessPoints
-
-            foreach (const QDBusObjectPath &path, devWirelessIface->getAccessPoints()) {
-                accessPointIface.reset(new QNetworkManagerInterfaceAccessPoint(path.path()));
-                const QString ssid = accessPointIface->ssid();
-                availableAccessPoints.insert(ssid, path);
-            }
-        }
-    }
-}
-
-QString QNmWifiEngine::deviceConnectionPath(const QString &mac)
-{
-    QString newMac = mac.toLower();
-    newMac.replace(QLatin1Char(':'), QLatin1Char('_'));
-    //device object path might not contain just mac address
-    //might contain extra numbers on the end. thanks HAL
-    foreach (const QString &device, devicePaths) {
-        if(device.contains(newMac)) {
-            newMac = device;
-            break;
-        }
-    }
-    return newMac;
-}
-
-QStringList QNmWifiEngine::getConnectionPathForId(const QString &uuid)
-{
-    QStringList connectionServices;
-    connectionServices << NM_DBUS_SERVICE_SYSTEM_SETTINGS;
-    connectionServices << NM_DBUS_SERVICE_USER_SETTINGS;
-    QScopedPointer<QNetworkManagerSettings> settingsiface;
-    foreach (const QString &service, connectionServices) {
-        settingsiface.reset(new QNetworkManagerSettings(service));
-        QScopedPointer<QNetworkManagerSettingsConnection> sysIface;
-        foreach (const QDBusObjectPath &path, settingsiface->listConnections()) {
-            sysIface.reset(new QNetworkManagerSettingsConnection(service, path.path()));
-            if(sysIface->getUuid() == uuid)
-                return QStringList() << service << sysIface->connectionInterface()->path();
-        }
-    }
-    return QStringList();
-}
-
-#include "moc_qnmwifiengine_unix_p.cpp"
-
-QTM_END_NAMESPACE
-
--- a/qtmobility/src/bearer/qnmwifiengine_unix_p.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNMWIFIENGINE_P_H
-#define QNMWIFIENGINE_P_H
-
-//
-//  W A R N I N G
-//  -------------
-//
-// This file is not part of the Qt API.  It exists purely as an
-// implementation detail.  This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-//#include <QtCore/qtimer.h>
-
-#include <QHash>
-#include <QDBusPendingCallWatcher>
-#include <QExplicitlySharedDataPointer>
-#include <qnetworkmanagerservice_p.h>
-
-#include "qnetworksessionengine_p.h"
-#include <qnetworksession.h>
-#include <qnetworkconfiguration.h>
-#include <qnetworkconfigmanager_p.h>
-
-
-QTM_BEGIN_NAMESPACE
-
-class QNetworkConfigurationPrivate;
-
-class QNmWifiEngine : public QNetworkSessionEngine
-{
-    Q_OBJECT
-
-public:
-    QNmWifiEngine(QObject *parent = 0);
-    ~QNmWifiEngine();
-
-    QList<QNetworkConfigurationPrivate *> getConfigurations(bool *ok = 0);
-    QString getInterfaceFromId(const QString &id);
-    bool hasIdentifier(const QString &id);
-
-    QString bearerName(const QString &id);
-
-    void connectToId(const QString &id);
-    void disconnectFromId(const QString &id);
-
-    void requestUpdate();
-
-    static QNmWifiEngine *instance();
-
-    QStringList knownSsids;
-    inline void emitConfigurationsChanged() { emit configurationsChanged(); }
-    QNetworkConfigurationPrivate * addAccessPoint(const QString &, QDBusObjectPath );
-
-    QStringList getConnectionPathForId(const QString &uuid);
-    //QString getConnectionPathForId(const QString &name = QString());
-    quint64 sentDataForId(const QString &id) const;
-    quint64 receivedDataForId(const QString &id) const;
-
-private:
-    bool updated;
-    QString activatingConnectionPath;
-    QStringList activeConnectionPaths;
-
-
-    QMap<QString,QDBusObjectPath> availableAccessPoints;
-    void scanForAccessPoints();
-
-    QStringList devicePaths;
-
-    void updateActiveConnectionsPaths();
-    void updateKnownSsids();
-    void accessPointConnections();
-    void knownConnections();
-    QString deviceConnectionPath(const QString &mac);
-
-    QList<QNetworkConfigurationPrivate *> foundConfigurations;
-	//    QHash<QString, QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > allConfigurations;
-
-    QNetworkManagerInterface *iface;
-
-    QNetworkConfiguration::StateFlags getAPState(qint32 vState, bool isKnown);
-    QNetworkConfiguration::StateFlags getStateFlag(quint32 nmstate);
-
-    QString getActiveConnectionPath(const QString &identifier);
-    QString getNameForConfiguration(QNetworkManagerInterfaceDevice *devIface);
-
-    QNetworkConfiguration::StateFlags getStateForId(const QString &id);
-
-    QNetworkInterface getBestInterface(quint32 type, const QString &conPath);
-
-    QMap<QString, QString> configurationInterface;
-
-    bool isAddressOfConnection(const QString &conPath, quint32 ipaddress);
-
-private slots:
-    void updateDeviceInterfaceState(const QString &, quint32);
-    void addDevice(QDBusObjectPath path);
-
-Q_SIGNALS:
-    void configurationChanged(const QNetworkConfiguration& config);
-
-private slots:
-    void accessPointAdded( const QString &aPath, QDBusObjectPath oPath);
-    void accessPointRemoved( const QString &aPath, QDBusObjectPath oPath);
-    void cmpPropertiesChanged(const QString &, QMap<QString,QVariant> map);
-    void newConnection(QDBusObjectPath);
-    void settingsConnectionRemoved(const QString &);
-    void slotActivationFinished(QDBusPendingCallWatcher*);
-};
-
-QTM_END_NAMESPACE
-
-#endif
-
-
--- a/qtmobility/src/global/global.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#for now we do not actually have anything to build
-#just ensure installation of public headers
-TEMPLATE = subdirs
-
-include(../../common.pri)
-PUBLIC_HEADERS += qmobilityglobal.h
-
-headers.files = $$PUBLIC_HEADERS
-headers.path = $$QT_MOBILITY_INCLUDE
-INSTALLS+= headers
-
-symbian {
-    path=$$MW_LAYER_PUBLIC_EXPORT_PATH("")
-
-    exportPath=$$EPOCROOT"."$$dirname(path)
-    nativePath=$$replace(exportPath, /,\)
-    exists($$nativePath) {
-    } else {
-        system($$QMAKE_MKDIR $$nativePath)
-    }
-
-    for(header, headers.files) {
-        BLD_INF_RULES.prj_exports += "$$header $$MW_LAYER_PUBLIC_EXPORT_PATH($$basename(header))"
-    }
-}
--- a/qtmobility/src/global/qmobilityglobal.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QMOBILITYGLOBAL_H
-#define QMOBILITYGLOBAL_H
-
-
-#define QTM_VERSION_STR   "1.0.2"
-/*
-   QTM_VERSION is (major << 16) + (minor << 8) + patch.
-*/
-#define QTM_VERSION 0x010002
-/*
-   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))
-
-#define QTM_PACKAGEDATE_STR "YYYY-MM-DD"
-
-#define QTM_PACKAGE_TAG ""
-
-#if defined(QTM_BUILD_UNITTESTS)
-# include <qconfig.h>
-# if !defined(QT_BUILD_INTERNAL)
-#   define QT_BUILD_INTERNAL
-# endif
-#endif
-#include <QtCore/qglobal.h>
-
-#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
-#    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
-#        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
-#    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
-#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
-
-#ifdef QTM_NAMESPACE
-# define QTM_PREPEND_NAMESPACE(name) ::QTM_NAMESPACE::name
-# define QTM_BEGIN_NAMESPACE namespace QTM_NAMESPACE {
-# define QTM_END_NAMESPACE }
-# define QTM_USE_NAMESPACE using namespace QTM_NAMESPACE;
-#else
-# define QTM_PREPEND_NAMESPACE(name) ::name
-# define QTM_BEGIN_NAMESPACE
-# define QTM_END_NAMESPACE
-# define QTM_USE_NAMESPACE
-#endif
-
-//in case Qt is in namespace
-QT_USE_NAMESPACE
-
-#endif // QMOBILITYGLOBAL_H
--- a/qtmobility/src/global/qmobilitypluginsearch.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <QApplication>
-#include <QStringList>
-
-#if defined(Q_OS_SYMBIAN)
-# include <f32file.h>
-#endif
-
-QTM_BEGIN_NAMESPACE
-
-class DirChecker
-{
-public:
-    DirChecker();
-    ~DirChecker();
-    bool checkDir(const QDir& dir);
-
-private:
-#if defined(Q_OS_SYMBIAN)
-    RFs rfs;
-#endif
-};
-
-#if defined(Q_OS_SYMBIAN)
-DirChecker::DirChecker()
-{
-    qt_symbian_throwIfError(rfs.Connect());
-}
-
-bool DirChecker::checkDir(const QDir& dir)
-{
-    bool pathFound = false;
-    // In Symbian, going cdUp() in a c:/private/<uid3>/ will result in *platsec* error at fileserver (requires AllFiles capability)
-    // Also, trying to cd() to a nonexistent directory causes *platsec* error. This does not cause functional harm, but should
-    // nevertheless be changed to use native Symbian methods to avoid unnecessary platsec warnings (as per qpluginloader.cpp).
-    // Use native Symbian code to check for directory existence, because checking
-    // for files from under non-existent protected dir like E:/private/<uid> using
-    // QDir::exists causes platform security violations on most apps.
-    QString nativePath = QDir::toNativeSeparators(dir.absolutePath());
-    TPtrC ptr = TPtrC16(static_cast<const TUint16*>(nativePath.utf16()), nativePath.length());
-    TUint attributes;
-    TInt err = rfs.Att(ptr, attributes);
-    if (err == KErrNone) {
-        // yes, the directory exists.
-        pathFound = true;
-    }
-    return pathFound;
-}
-
-DirChecker::~DirChecker()
-{
-    rfs.Close();
-}
-#else
-DirChecker::DirChecker()
-{
-}
-
-DirChecker::~DirChecker()
-{
-}
-
-bool DirChecker::checkDir(const QDir &dir)
-{
-    return dir.exists();
-}
-#endif
-
-inline QStringList mobilityPlugins(const QString plugintype)
-{
-#if !defined QT_NO_DEBUG
-    const bool showDebug = qgetenv("QT_DEBUG_PLUGINS").toInt() > 0;
-#endif
-
-    QStringList paths = QApplication::libraryPaths();
-#ifdef QTM_PLUGIN_PATH
-    paths << QLatin1String(QTM_PLUGIN_PATH);
-#endif
-#if !defined QT_NO_DEBUG
-    if (showDebug)
-        qDebug() << "Plugin paths:" << paths;
-#endif
-
-    DirChecker dirChecker;
-
-    //temp variable to avoid multiple identic path
-    QSet<QString> processed;
-
-    /* Discover a bunch o plugins */
-    QStringList plugins;
-
-    /* Enumerate our plugin paths */
-    for (int i=0; i < paths.count(); i++) {
-        if (processed.contains(paths.at(i)))
-            continue;
-        processed.insert(paths.at(i));
-        QDir pluginsDir(paths.at(i));
-        if (!dirChecker.checkDir(pluginsDir))
-            continue;
-
-#if defined(Q_OS_WIN)
-        if (pluginsDir.dirName().toLower() == QLatin1String("debug") || pluginsDir.dirName().toLower() == QLatin1String("release"))
-            pluginsDir.cdUp();
-#elif defined(Q_OS_MAC)
-        if (pluginsDir.dirName() == QLatin1String("MacOS")) {
-            pluginsDir.cdUp();
-            pluginsDir.cdUp();
-            pluginsDir.cdUp();
-        }
-#endif
-
-        QString subdir(QLatin1String("plugins/"));
-        subdir += plugintype;
-        if (pluginsDir.path().endsWith(QLatin1String("/plugins"))
-            || pluginsDir.path().endsWith(QLatin1String("/plugins/")))
-            subdir = plugintype;
-
-        if (dirChecker.checkDir(QDir(pluginsDir.path() + QLatin1Char('/') + subdir))) {
-            pluginsDir.cd(subdir);
-            QStringList files = pluginsDir.entryList(QDir::Files);
-
-#if !defined QT_NO_DEBUG
-            if (showDebug)
-                qDebug() << "Looking for " << plugintype << " plugins in" << pluginsDir.path() << files;
-#endif
-
-            for (int j=0; j < files.count(); j++) {
-                plugins <<  pluginsDir.absoluteFilePath(files.at(j));
-            }
-        }
-    }
-    return  plugins;
-}
-
-QTM_END_NAMESPACE
--- a/qtmobility/src/s60installs/bwins/QtBeareru.def	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-EXPORTS
-	?getStaticMetaObject@QNetworkConfigurationManager@QtMobility@@SAABUQMetaObject@@XZ @ 1 NONAME ; struct QMetaObject const & QtMobility::QNetworkConfigurationManager::getStaticMetaObject(void)
-	?open@QNetworkSession@QtMobility@@QAEXXZ @ 2 NONAME ; void QtMobility::QNetworkSession::open(void)
-	?qt_metacall@QNetworkSession@QtMobility@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 3 NONAME ; int QtMobility::QNetworkSession::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?getStaticMetaObject@QNetworkSession@QtMobility@@SAABUQMetaObject@@XZ @ 4 NONAME ; struct QMetaObject const & QtMobility::QNetworkSession::getStaticMetaObject(void)
-	?trUtf8@QNetworkConfigurationManager@QtMobility@@SA?AVQString@@PBD0@Z @ 5 NONAME ; class QString QtMobility::QNetworkConfigurationManager::trUtf8(char const *, char const *)
-	?bytesReceived@QNetworkSession@QtMobility@@QBE_KXZ @ 6 NONAME ; unsigned long long QtMobility::QNetworkSession::bytesReceived(void) const
-	?stateChanged@QNetworkSession@QtMobility@@IAEXW4State@12@@Z @ 7 NONAME ; void QtMobility::QNetworkSession::stateChanged(enum QtMobility::QNetworkSession::State)
-	?trUtf8@QNetworkSession@QtMobility@@SA?AVQString@@PBD0@Z @ 8 NONAME ; class QString QtMobility::QNetworkSession::trUtf8(char const *, char const *)
-	?sessionProperty@QNetworkSession@QtMobility@@QBE?AVQVariant@@ABVQString@@@Z @ 9 NONAME ; class QVariant QtMobility::QNetworkSession::sessionProperty(class QString const &) const
-	?configuration@QNetworkSession@QtMobility@@QBE?AVQNetworkConfiguration@2@XZ @ 10 NONAME ; class QtMobility::QNetworkConfiguration QtMobility::QNetworkSession::configuration(void) const
-	?waitForOpened@QNetworkSession@QtMobility@@QAE_NH@Z @ 11 NONAME ; bool QtMobility::QNetworkSession::waitForOpened(int)
-	?type@QNetworkConfiguration@QtMobility@@QBE?AW4Type@12@XZ @ 12 NONAME ; enum QtMobility::QNetworkConfiguration::Type QtMobility::QNetworkConfiguration::type(void) const
-	?error@QNetworkSession@QtMobility@@IAEXW4SessionError@12@@Z @ 13 NONAME ; void QtMobility::QNetworkSession::error(enum QtMobility::QNetworkSession::SessionError)
-	?identifier@QNetworkConfiguration@QtMobility@@QBE?AVQString@@XZ @ 14 NONAME ; class QString QtMobility::QNetworkConfiguration::identifier(void) const
-	?connectNotify@QNetworkSession@QtMobility@@MAEXPBD@Z @ 15 NONAME ; void QtMobility::QNetworkSession::connectNotify(char const *)
-	?configurationAdded@QNetworkConfigurationManager@QtMobility@@IAEXABVQNetworkConfiguration@2@@Z @ 16 NONAME ; void QtMobility::QNetworkConfigurationManager::configurationAdded(class QtMobility::QNetworkConfiguration const &)
-	?interface@QNetworkSession@QtMobility@@QBE?AVQNetworkInterface@@XZ @ 17 NONAME ; class QNetworkInterface QtMobility::QNetworkSession::interface(void) const
-	?closed@QNetworkSession@QtMobility@@IAEXXZ @ 18 NONAME ; void QtMobility::QNetworkSession::closed(void)
-	?updateCompleted@QNetworkConfigurationManager@QtMobility@@IAEXXZ @ 19 NONAME ; void QtMobility::QNetworkConfigurationManager::updateCompleted(void)
-	?preferredConfigurationChanged@QNetworkSession@QtMobility@@IAEXABVQNetworkConfiguration@2@_N@Z @ 20 NONAME ; void QtMobility::QNetworkSession::preferredConfigurationChanged(class QtMobility::QNetworkConfiguration const &, bool)
-	?name@QNetworkConfiguration@QtMobility@@QBE?AVQString@@XZ @ 21 NONAME ; class QString QtMobility::QNetworkConfiguration::name(void) const
-	??8QNetworkConfiguration@QtMobility@@QBE_NABV01@@Z @ 22 NONAME ; bool QtMobility::QNetworkConfiguration::operator==(class QtMobility::QNetworkConfiguration const &) const
-	?trUtf8@QNetworkConfigurationManager@QtMobility@@SA?AVQString@@PBD0H@Z @ 23 NONAME ; class QString QtMobility::QNetworkConfigurationManager::trUtf8(char const *, char const *, int)
-	?ignore@QNetworkSession@QtMobility@@QAEXXZ @ 24 NONAME ; void QtMobility::QNetworkSession::ignore(void)
-	??0QNetworkSession@QtMobility@@QAE@ABVQNetworkConfiguration@1@PAVQObject@@@Z @ 25 NONAME ; QtMobility::QNetworkSession::QNetworkSession(class QtMobility::QNetworkConfiguration const &, class QObject *)
-	?bytesWritten@QNetworkSession@QtMobility@@QBE_KXZ @ 26 NONAME ; unsigned long long QtMobility::QNetworkSession::bytesWritten(void) const
-	?isOpen@QNetworkSession@QtMobility@@QBE_NXZ @ 27 NONAME ; bool QtMobility::QNetworkSession::isOpen(void) const
-	?tr@QNetworkSession@QtMobility@@SA?AVQString@@PBD0H@Z @ 28 NONAME ; class QString QtMobility::QNetworkSession::tr(char const *, char const *, int)
-	??0QNetworkConfiguration@QtMobility@@QAE@XZ @ 29 NONAME ; QtMobility::QNetworkConfiguration::QNetworkConfiguration(void)
-	?state@QNetworkConfiguration@QtMobility@@QBE?AV?$QFlags@W4StateFlag@QNetworkConfiguration@QtMobility@@@@XZ @ 30 NONAME ; class QFlags<enum QtMobility::QNetworkConfiguration::StateFlag> QtMobility::QNetworkConfiguration::state(void) const
-	?children@QNetworkConfiguration@QtMobility@@QBE?AV?$QList@VQNetworkConfiguration@QtMobility@@@@XZ @ 31 NONAME ; class QList<class QtMobility::QNetworkConfiguration> QtMobility::QNetworkConfiguration::children(void) const
-	?isValid@QNetworkConfiguration@QtMobility@@QBE_NXZ @ 32 NONAME ; bool QtMobility::QNetworkConfiguration::isValid(void) const
-	?activeTime@QNetworkSession@QtMobility@@QBE_KXZ @ 33 NONAME ; unsigned long long QtMobility::QNetworkSession::activeTime(void) const
-	??_EQNetworkSession@QtMobility@@UAE@I@Z @ 34 NONAME ; QtMobility::QNetworkSession::~QNetworkSession(unsigned int)
-	?disconnectNotify@QNetworkSession@QtMobility@@MAEXPBD@Z @ 35 NONAME ; void QtMobility::QNetworkSession::disconnectNotify(char const *)
-	?purpose@QNetworkConfiguration@QtMobility@@QBE?AW4Purpose@12@XZ @ 36 NONAME ; enum QtMobility::QNetworkConfiguration::Purpose QtMobility::QNetworkConfiguration::purpose(void) const
-	?migrate@QNetworkSession@QtMobility@@QAEXXZ @ 37 NONAME ; void QtMobility::QNetworkSession::migrate(void)
-	?isRoamingAvailable@QNetworkConfiguration@QtMobility@@QBE_NXZ @ 38 NONAME ; bool QtMobility::QNetworkConfiguration::isRoamingAvailable(void) const
-	?trUtf8@QNetworkSession@QtMobility@@SA?AVQString@@PBD0H@Z @ 39 NONAME ; class QString QtMobility::QNetworkSession::trUtf8(char const *, char const *, int)
-	?bearerName@QNetworkConfiguration@QtMobility@@QBE?AVQString@@XZ @ 40 NONAME ; class QString QtMobility::QNetworkConfiguration::bearerName(void) const
-	??0QNetworkConfigurationManager@QtMobility@@QAE@PAVQObject@@@Z @ 41 NONAME ; QtMobility::QNetworkConfigurationManager::QNetworkConfigurationManager(class QObject *)
-	?tr@QNetworkSession@QtMobility@@SA?AVQString@@PBD0@Z @ 42 NONAME ; class QString QtMobility::QNetworkSession::tr(char const *, char const *)
-	?onlineStateChanged@QNetworkConfigurationManager@QtMobility@@IAEX_N@Z @ 43 NONAME ; void QtMobility::QNetworkConfigurationManager::onlineStateChanged(bool)
-	?opened@QNetworkSession@QtMobility@@IAEXXZ @ 44 NONAME ; void QtMobility::QNetworkSession::opened(void)
-	?configurationFromIdentifier@QNetworkConfigurationManager@QtMobility@@QBE?AVQNetworkConfiguration@2@ABVQString@@@Z @ 45 NONAME ; class QtMobility::QNetworkConfiguration QtMobility::QNetworkConfigurationManager::configurationFromIdentifier(class QString const &) const
-	??4QNetworkConfiguration@QtMobility@@QAEAAV01@ABV01@@Z @ 46 NONAME ; class QtMobility::QNetworkConfiguration & QtMobility::QNetworkConfiguration::operator=(class QtMobility::QNetworkConfiguration const &)
-	?setSessionProperty@QNetworkSession@QtMobility@@QAEXABVQString@@ABVQVariant@@@Z @ 47 NONAME ; void QtMobility::QNetworkSession::setSessionProperty(class QString const &, class QVariant const &)
-	?staticMetaObject@QNetworkConfigurationManager@QtMobility@@2UQMetaObject@@B @ 48 NONAME ; struct QMetaObject const QtMobility::QNetworkConfigurationManager::staticMetaObject
-	?configurationChanged@QNetworkConfigurationManager@QtMobility@@IAEXABVQNetworkConfiguration@2@@Z @ 49 NONAME ; void QtMobility::QNetworkConfigurationManager::configurationChanged(class QtMobility::QNetworkConfiguration const &)
-	??9QNetworkConfiguration@QtMobility@@QBE_NABV01@@Z @ 50 NONAME ; bool QtMobility::QNetworkConfiguration::operator!=(class QtMobility::QNetworkConfiguration const &) const
-	??1QNetworkConfiguration@QtMobility@@QAE@XZ @ 51 NONAME ; QtMobility::QNetworkConfiguration::~QNetworkConfiguration(void)
-	?tr@QNetworkConfigurationManager@QtMobility@@SA?AVQString@@PBD0H@Z @ 52 NONAME ; class QString QtMobility::QNetworkConfigurationManager::tr(char const *, char const *, int)
-	?reject@QNetworkSession@QtMobility@@QAEXXZ @ 53 NONAME ; void QtMobility::QNetworkSession::reject(void)
-	?capabilities@QNetworkConfigurationManager@QtMobility@@QBE?AV?$QFlags@W4Capability@QNetworkConfigurationManager@QtMobility@@@@XZ @ 54 NONAME ; class QFlags<enum QtMobility::QNetworkConfigurationManager::Capability> QtMobility::QNetworkConfigurationManager::capabilities(void) const
-	?newConfigurationActivated@QNetworkSession@QtMobility@@IAEXXZ @ 55 NONAME ; void QtMobility::QNetworkSession::newConfigurationActivated(void)
-	??_EQNetworkConfigurationManager@QtMobility@@UAE@I@Z @ 56 NONAME ; QtMobility::QNetworkConfigurationManager::~QNetworkConfigurationManager(unsigned int)
-	?tr@QNetworkConfigurationManager@QtMobility@@SA?AVQString@@PBD0@Z @ 57 NONAME ; class QString QtMobility::QNetworkConfigurationManager::tr(char const *, char const *)
-	?qt_metacall@QNetworkConfigurationManager@QtMobility@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 58 NONAME ; int QtMobility::QNetworkConfigurationManager::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?updateConfigurations@QNetworkConfigurationManager@QtMobility@@QAEXXZ @ 59 NONAME ; void QtMobility::QNetworkConfigurationManager::updateConfigurations(void)
-	?qt_metacast@QNetworkConfigurationManager@QtMobility@@UAEPAXPBD@Z @ 60 NONAME ; void * QtMobility::QNetworkConfigurationManager::qt_metacast(char const *)
-	?close@QNetworkSession@QtMobility@@QAEXXZ @ 61 NONAME ; void QtMobility::QNetworkSession::close(void)
-	?errorString@QNetworkSession@QtMobility@@QBE?AVQString@@XZ @ 62 NONAME ; class QString QtMobility::QNetworkSession::errorString(void) const
-	?metaObject@QNetworkSession@QtMobility@@UBEPBUQMetaObject@@XZ @ 63 NONAME ; struct QMetaObject const * QtMobility::QNetworkSession::metaObject(void) const
-	?configurationRemoved@QNetworkConfigurationManager@QtMobility@@IAEXABVQNetworkConfiguration@2@@Z @ 64 NONAME ; void QtMobility::QNetworkConfigurationManager::configurationRemoved(class QtMobility::QNetworkConfiguration const &)
-	??1QNetworkConfigurationManager@QtMobility@@UAE@XZ @ 65 NONAME ; QtMobility::QNetworkConfigurationManager::~QNetworkConfigurationManager(void)
-	?metaObject@QNetworkConfigurationManager@QtMobility@@UBEPBUQMetaObject@@XZ @ 66 NONAME ; struct QMetaObject const * QtMobility::QNetworkConfigurationManager::metaObject(void) const
-	?staticMetaObject@QNetworkSession@QtMobility@@2UQMetaObject@@B @ 67 NONAME ; struct QMetaObject const QtMobility::QNetworkSession::staticMetaObject
-	?isOnline@QNetworkConfigurationManager@QtMobility@@QBE_NXZ @ 68 NONAME ; bool QtMobility::QNetworkConfigurationManager::isOnline(void) const
-	?defaultConfiguration@QNetworkConfigurationManager@QtMobility@@QBE?AVQNetworkConfiguration@2@XZ @ 69 NONAME ; class QtMobility::QNetworkConfiguration QtMobility::QNetworkConfigurationManager::defaultConfiguration(void) const
-	?stop@QNetworkSession@QtMobility@@QAEXXZ @ 70 NONAME ; void QtMobility::QNetworkSession::stop(void)
-	?allConfigurations@QNetworkConfigurationManager@QtMobility@@QBE?AV?$QList@VQNetworkConfiguration@QtMobility@@@@V?$QFlags@W4StateFlag@QNetworkConfiguration@QtMobility@@@@@Z @ 71 NONAME ; class QList<class QtMobility::QNetworkConfiguration> QtMobility::QNetworkConfigurationManager::allConfigurations(class QFlags<enum QtMobility::QNetworkConfiguration::StateFlag>) const
-	?error@QNetworkSession@QtMobility@@QBE?AW4SessionError@12@XZ @ 72 NONAME ; enum QtMobility::QNetworkSession::SessionError QtMobility::QNetworkSession::error(void) const
-	??0QNetworkConfiguration@QtMobility@@QAE@ABV01@@Z @ 73 NONAME ; QtMobility::QNetworkConfiguration::QNetworkConfiguration(class QtMobility::QNetworkConfiguration const &)
-	?qt_metacast@QNetworkSession@QtMobility@@UAEPAXPBD@Z @ 74 NONAME ; void * QtMobility::QNetworkSession::qt_metacast(char const *)
-	??1QNetworkSession@QtMobility@@UAE@XZ @ 75 NONAME ; QtMobility::QNetworkSession::~QNetworkSession(void)
-	?state@QNetworkSession@QtMobility@@QBE?AW4State@12@XZ @ 76 NONAME ; enum QtMobility::QNetworkSession::State QtMobility::QNetworkSession::state(void) const
-	?accept@QNetworkSession@QtMobility@@QAEXXZ @ 77 NONAME ; void QtMobility::QNetworkSession::accept(void)
-
--- a/qtmobility/src/s60installs/eabi/QtBeareru.def	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-EXPORTS
-	_ZN10QtMobility15QNetworkSession11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
-	_ZN10QtMobility15QNetworkSession11qt_metacastEPKc @ 2 NONAME
-	_ZN10QtMobility15QNetworkSession12stateChangedENS0_5StateE @ 3 NONAME
-	_ZN10QtMobility15QNetworkSession13connectNotifyEPKc @ 4 NONAME
-	_ZN10QtMobility15QNetworkSession13waitForOpenedEi @ 5 NONAME
-	_ZN10QtMobility15QNetworkSession16disconnectNotifyEPKc @ 6 NONAME
-	_ZN10QtMobility15QNetworkSession16staticMetaObjectE @ 7 NONAME DATA 16
-	_ZN10QtMobility15QNetworkSession18setSessionPropertyERK7QStringRK8QVariant @ 8 NONAME
-	_ZN10QtMobility15QNetworkSession19getStaticMetaObjectEv @ 9 NONAME
-	_ZN10QtMobility15QNetworkSession25newConfigurationActivatedEv @ 10 NONAME
-	_ZN10QtMobility15QNetworkSession29preferredConfigurationChangedERKNS_21QNetworkConfigurationEb @ 11 NONAME
-	_ZN10QtMobility15QNetworkSession4openEv @ 12 NONAME
-	_ZN10QtMobility15QNetworkSession4stopEv @ 13 NONAME
-	_ZN10QtMobility15QNetworkSession5closeEv @ 14 NONAME
-	_ZN10QtMobility15QNetworkSession5errorENS0_12SessionErrorE @ 15 NONAME
-	_ZN10QtMobility15QNetworkSession6acceptEv @ 16 NONAME
-	_ZN10QtMobility15QNetworkSession6closedEv @ 17 NONAME
-	_ZN10QtMobility15QNetworkSession6ignoreEv @ 18 NONAME
-	_ZN10QtMobility15QNetworkSession6openedEv @ 19 NONAME
-	_ZN10QtMobility15QNetworkSession6rejectEv @ 20 NONAME
-	_ZN10QtMobility15QNetworkSession7migrateEv @ 21 NONAME
-	_ZN10QtMobility15QNetworkSessionC1ERKNS_21QNetworkConfigurationEP7QObject @ 22 NONAME
-	_ZN10QtMobility15QNetworkSessionC2ERKNS_21QNetworkConfigurationEP7QObject @ 23 NONAME
-	_ZN10QtMobility15QNetworkSessionD0Ev @ 24 NONAME
-	_ZN10QtMobility15QNetworkSessionD1Ev @ 25 NONAME
-	_ZN10QtMobility15QNetworkSessionD2Ev @ 26 NONAME
-	_ZN10QtMobility21QNetworkConfigurationC1ERKS0_ @ 27 NONAME
-	_ZN10QtMobility21QNetworkConfigurationC1Ev @ 28 NONAME
-	_ZN10QtMobility21QNetworkConfigurationC2ERKS0_ @ 29 NONAME
-	_ZN10QtMobility21QNetworkConfigurationC2Ev @ 30 NONAME
-	_ZN10QtMobility21QNetworkConfigurationD1Ev @ 31 NONAME
-	_ZN10QtMobility21QNetworkConfigurationD2Ev @ 32 NONAME
-	_ZN10QtMobility21QNetworkConfigurationaSERKS0_ @ 33 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManager11qt_metacallEN11QMetaObject4CallEiPPv @ 34 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManager11qt_metacastEPKc @ 35 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManager15updateCompletedEv @ 36 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManager16staticMetaObjectE @ 37 NONAME DATA 16
-	_ZN10QtMobility28QNetworkConfigurationManager18configurationAddedERKNS_21QNetworkConfigurationE @ 38 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManager18onlineStateChangedEb @ 39 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManager19getStaticMetaObjectEv @ 40 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManager20configurationChangedERKNS_21QNetworkConfigurationE @ 41 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManager20configurationRemovedERKNS_21QNetworkConfigurationE @ 42 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManager20updateConfigurationsEv @ 43 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManagerC1EP7QObject @ 44 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManagerC2EP7QObject @ 45 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManagerD0Ev @ 46 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManagerD1Ev @ 47 NONAME
-	_ZN10QtMobility28QNetworkConfigurationManagerD2Ev @ 48 NONAME
-	_ZNK10QtMobility15QNetworkSession10activeTimeEv @ 49 NONAME
-	_ZNK10QtMobility15QNetworkSession10metaObjectEv @ 50 NONAME
-	_ZNK10QtMobility15QNetworkSession11errorStringEv @ 51 NONAME
-	_ZNK10QtMobility15QNetworkSession12bytesWrittenEv @ 52 NONAME
-	_ZNK10QtMobility15QNetworkSession13bytesReceivedEv @ 53 NONAME
-	_ZNK10QtMobility15QNetworkSession13configurationEv @ 54 NONAME
-	_ZNK10QtMobility15QNetworkSession15sessionPropertyERK7QString @ 55 NONAME
-	_ZNK10QtMobility15QNetworkSession5errorEv @ 56 NONAME
-	_ZNK10QtMobility15QNetworkSession5stateEv @ 57 NONAME
-	_ZNK10QtMobility15QNetworkSession6isOpenEv @ 58 NONAME
-	_ZNK10QtMobility15QNetworkSession9interfaceEv @ 59 NONAME
-	_ZNK10QtMobility21QNetworkConfiguration10bearerNameEv @ 60 NONAME
-	_ZNK10QtMobility21QNetworkConfiguration10identifierEv @ 61 NONAME
-	_ZNK10QtMobility21QNetworkConfiguration18isRoamingAvailableEv @ 62 NONAME
-	_ZNK10QtMobility21QNetworkConfiguration4nameEv @ 63 NONAME
-	_ZNK10QtMobility21QNetworkConfiguration4typeEv @ 64 NONAME
-	_ZNK10QtMobility21QNetworkConfiguration5stateEv @ 65 NONAME
-	_ZNK10QtMobility21QNetworkConfiguration7isValidEv @ 66 NONAME
-	_ZNK10QtMobility21QNetworkConfiguration7purposeEv @ 67 NONAME
-	_ZNK10QtMobility21QNetworkConfiguration8childrenEv @ 68 NONAME
-	_ZNK10QtMobility21QNetworkConfigurationeqERKS0_ @ 69 NONAME
-	_ZNK10QtMobility28QNetworkConfigurationManager10metaObjectEv @ 70 NONAME
-	_ZNK10QtMobility28QNetworkConfigurationManager12capabilitiesEv @ 71 NONAME
-	_ZNK10QtMobility28QNetworkConfigurationManager17allConfigurationsE6QFlagsINS_21QNetworkConfiguration9StateFlagEE @ 72 NONAME
-	_ZNK10QtMobility28QNetworkConfigurationManager20defaultConfigurationEv @ 73 NONAME
-	_ZNK10QtMobility28QNetworkConfigurationManager27configurationFromIdentifierERK7QString @ 74 NONAME
-	_ZNK10QtMobility28QNetworkConfigurationManager8isOnlineEv @ 75 NONAME
-	_ZTIN10QtMobility15QNetworkSessionE @ 76 NONAME
-	_ZTIN10QtMobility28QNetworkConfigurationManagerE @ 77 NONAME
-	_ZTVN10QtMobility15QNetworkSessionE @ 78 NONAME
-	_ZTVN10QtMobility28QNetworkConfigurationManagerE @ 79 NONAME
-
--- a/qtmobility/src/s60installs/qtmobility.iby	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License as published by
-* the Free Software Foundation, version 2.1 of the License.
-* 
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public License
-* along with this program.  If not, 
-* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
-*
-* Description: 
-*
-*/
-
-#ifndef __QT_MOBILITY_IBY__
-#define __QT_MOBILITY_IBY__
-
-#include <bldvariant.hrh>
-
-#ifdef FF_QT_BEARER_MANAGEMENT
-file=ABI_DIR\BUILD_DIR\qtbearer.dll                            SHARED_LIB_DIR\qtbearer.dll PAGED
-data=ZSYSTEM\install\qtmobility_stub.sis                       \system\install\qtmobility_stub.sis
-#endif // FF_QT_BEARER_MANAGEMENT
-
-#endif // __QT_MOBILITY_IBY__
--- a/qtmobility/src/s60installs/s60installs.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-TEMPLATE = subdirs
-
-isEmpty(QT_LIBINFIX):symbian {
-    include(../../staticconfig.pri)
-    load(data_caging_paths)
-    include($$QT_MOBILITY_BUILD_TREE/config.pri)
-
-    SUBDIRS =
-    TARGET = "QtMobility"
-    TARGET.UID3 = 0x2002AC89
-
-    VERSION = 1.0.2
-
-    vendorinfo = \
-        "; Localised Vendor name" \
-        "%{\"Nokia\"}" \
-        " " \
-        "; Unique Vendor name" \
-        ":\"Nokia\"" \
-        " "
-    qtmobilitydeployment.pkg_prerules += vendorinfo
-
-    epoc31 = $$(EPOCROOT31)
-    epoc32 = $$(EPOCROOT32)
-    epoc50 = $$(EPOCROOT50)
-
-    # default to EPOCROOT if EPOCROOTxy not defined
-    isEmpty(epoc31) {
-        EPOCROOT31 = $${EPOCROOT}
-    } else {
-        EPOCROOT31 = $$(EPOCROOT31)
-    }
-    isEmpty(epoc32) {
-        EPOCROOT32 = $${EPOCROOT}
-    }else {
-        EPOCROOT32 = $$(EPOCROOT32)
-    }
-    isEmpty(epoc50) {
-        EPOCROOT50 = $${EPOCROOT}
-    } else {
-        EPOCROOT50 = $$(EPOCROOT50)
-    }
-    
-    contains(mobility_modules, bearer) {
-        bearer = \
-            "IF package(0x1028315F)" \
-            "   \"$${EPOCROOT50}epoc32/release/$(PLATFORM)/$(TARGET)/QtBearer.dll\" - \"!:\\sys\\bin\\QtBearer.dll\"" \
-            "ELSEIF package(0x102752AE)" \
-            "   \"$${EPOCROOT50}epoc32/release/$(PLATFORM)/$(TARGET)/QtBearer.dll\" - \"!:\\sys\\bin\\QtBearer.dll\"" \
-            "ELSEIF package(0x102032BE)" \
-            "   \"$${EPOCROOT31}epoc32/release/$(PLATFORM)/$(TARGET)/QtBearer.dll\" - \"!:\\sys\\bin\\QtBearer.dll\"" \
-            "ELSE" \
-            "   \"$${EPOCROOT50}epoc32/release/$(PLATFORM)/$(TARGET)/QtBearer.dll\" - \"!:\\sys\\bin\\QtBearer.dll\"" \
-            "ENDIF"
-
-        qtmobilitydeployment.pkg_postrules += bearer
-    }
-    
-    !isEmpty(pluginstubs):qtmobilitydeployment.pkg_postrules += pluginstubs
-
-    qtmobilitydeployment.path = /sys/bin
-
-    DEPLOYMENT += qtmobilitydeployment
-    
-    #BLD_INF_RULES.prj_exports += "./qtmobility.iby           $$CORE_MW_LAYER_IBY_EXPORT_PATH(qtmobility.iby)"
-
-} else {
-    message(Deployment of infixed library names not supported)
-}
--- a/qtmobility/src/src.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-include(../staticconfig.pri)
-
-TEMPLATE = subdirs
-SUBDIRS += global
-
-contains(mobility_modules,bearer): SUBDIRS += bearer
-
-symbian {
-    SUBDIRS += s60installs
-}
-
--- a/qtmobility/staticconfig.pri	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-#
-# Fix up QT_MOBILITY_SOURCE_TREE if it isn't defined
-#
-# 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 for symbian
-# but they are on other platforms.
-
-
-isEmpty(QT_MOBILITY_SOURCE_TREE):QT_MOBILITY_SOURCE_TREE = $$PWD 
-isEmpty(QT_MOBILITY_BUILD_TREE):QT_MOBILITY_BUILD_TREE = $$PWD 
-
-#now include the dynamic config
-include($$QT_MOBILITY_BUILD_TREE/config.pri)
--- a/qtmobility/tests/auto/auto.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-TEMPLATE = subdirs
-
-include(../../staticconfig.pri)
-
-contains(mobility_modules,bearer) {
-    SUBDIRS += qnetworkconfigmanager \          #Bearer management
-           qnetworkconfiguration \
-           qnetworksession
-}
-
--- a/qtmobility/tests/auto/qbearertestcommon.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QBEARERTESTCOMMON_H
-#define QBEARERTESTCOMMON_H
-
-// Wait for __expr to happen, while still allowing events to be processed.
-#define QTRY_NOOP(__expr) \
-    do { \
-        const int __step = 50; \
-        const int __timeout = 15000; \
-        if (!(__expr)) { \
-            QTest::qWait(0); \
-        } \
-        for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \
-            QTest::qWait(__step); \
-        } \
-    } while(0)
-
-// Will try to wait for the condition while allowing event processing
-#define QTRY_VERIFY(__expr) \
-    do { \
-        const int __step = 50; \
-        const int __timeout = 90000; \
-        if (!(__expr)) { \
-            QTest::qWait(0); \
-        } \
-        for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \
-            QTest::qWait(__step); \
-        } \
-        QVERIFY(__expr); \
-    } while(0)
-
-// Will try to wait for the condition while allowing event processing
-#define QTRY_COMPARE(__expr, __expected) \
-    do { \
-        const int __step = 50; \
-        const int __timeout = 90000; \
-        if ((__expr) != (__expected)) { \
-            QTest::qWait(0); \
-        } \
-        for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \
-            QTest::qWait(__step); \
-        } \
-        QCOMPARE(__expr, __expected); \
-    } while(0)
-
-#endif
-
--- a/qtmobility/tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-SOURCES  += tst_qnetworkconfigmanager.cpp
-HEADERS  += ../qbearertestcommon.h
-TARGET = tst_qnetworkconfigurationmanager
-CONFIG += testcase
-
-QT = core network
-
-INCLUDEPATH += ../../../src/bearer
-
-include(../../../common.pri)
-CONFIG += mobility
-MOBILITY = bearer
-
-symbian {
-    TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData
-}
-
-maemo6|maemo5 {
-    CONFIG += link_pkgconfig
-
-    PKGCONFIG += conninet
-}
--- a/qtmobility/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include "../qbearertestcommon.h"
-#include "../../../src/bearer/qnetworkconfiguration.h"
-#include "../../../src/bearer/qnetworkconfigmanager.h"
-
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-#include <stdio.h>
-#include <iapconf.h>
-#endif
-
-QTM_USE_NAMESPACE
-class tst_QNetworkConfigurationManager : public QObject
-{
-    Q_OBJECT
-
-public slots:
-    void initTestCase();
-    void cleanupTestCase();
-    void init();
-    void cleanup();
-
-private slots:
-    void allConfigurations();
-    void defaultConfiguration();
-    void configurationFromIdentifier();
-
-private:
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-    Maemo::IAPConf *iapconf;
-    Maemo::IAPConf *iapconf2;
-    Maemo::IAPConf *gprsiap;
-#define MAX_IAPS 50
-    Maemo::IAPConf *iaps[MAX_IAPS];
-    QProcess *icd_stub;
-#endif
-};
-
-void tst_QNetworkConfigurationManager::initTestCase()
-{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-    iapconf = new Maemo::IAPConf("007");
-    iapconf->setValue("ipv4_type", "AUTO");
-    iapconf->setValue("wlan_wepkey1", "connt");
-    iapconf->setValue("wlan_wepdefkey", 1);
-    iapconf->setValue("wlan_ssid", QByteArray("JamesBond"));
-    iapconf->setValue("name", "James Bond");
-    iapconf->setValue("type", "WLAN_INFRA");
-
-    gprsiap = new Maemo::IAPConf("This-is-GPRS-IAP");
-    gprsiap->setValue("ask_password", false);
-    gprsiap->setValue("gprs_accesspointname", "internet");
-    gprsiap->setValue("gprs_password", "");
-    gprsiap->setValue("gprs_username", "");
-    gprsiap->setValue("ipv4_autodns", true);
-    gprsiap->setValue("ipv4_type", "AUTO");
-    gprsiap->setValue("sim_imsi", "244070123456789");
-    gprsiap->setValue("name", "MI6");
-    gprsiap->setValue("type", "GPRS");
-
-    iapconf2 = new Maemo::IAPConf("osso.net");
-    iapconf2->setValue("ipv4_type", "AUTO");
-    iapconf2->setValue("wlan_wepkey1", "osso.net");
-    iapconf2->setValue("wlan_wepdefkey", 1);
-    iapconf2->setValue("wlan_ssid", QByteArray("osso.net"));
-    iapconf2->setValue("name", "osso.net");
-    iapconf2->setValue("type", "WLAN_INFRA");
-    iapconf2->setValue("wlan_security", "WEP");
-
-    /* Create large number of IAPs in the gconf and see what happens */
-    fflush(stdout);
-    printf("Creating %d IAPS: ", MAX_IAPS);
-    for (int i=0; i<MAX_IAPS; i++) {
-	QString num = QString().sprintf("%d", i);
-	QString iap = "iap-" + num;
-	iaps[i] = new Maemo::IAPConf(iap);
-	iaps[i]->setValue("name", QString("test-iap-")+num);
-	iaps[i]->setValue("type", "WLAN_INFRA");
-	iaps[i]->setValue("wlan_ssid", QString(QString("test-ssid-")+num).toAscii());
-	iaps[i]->setValue("wlan_security", "WPA_PSK");
-	iaps[i]->setValue("EAP_wpa_preshared_passphrase", QString("test-passphrase-")+num);
-	printf(".");
-	fflush(stdout);
-    }
-    printf("\n");
-    fflush(stdout);
-
-    icd_stub = new QProcess(this);
-    icd_stub->start("/usr/bin/icd2_stub.py");
-    QTest::qWait(1000);
-
-    // Add a known network to scan list that icd2 stub returns
-    QProcess dbus_send;
-    // 007 network
-    dbus_send.start("dbus-send --type=method_call --system "
-		    "--dest=com.nokia.icd2 /com/nokia/icd2 "
-		    "com.nokia.icd2.testing.add_available_network "
-		    "string:'' uint32:0 string:'' "
-		    "string:WLAN_INFRA uint32:5000011 array:byte:48,48,55");
-    dbus_send.waitForFinished();
-
-    // osso.net network
-    dbus_send.start("dbus-send --type=method_call --system "
-		    "--dest=com.nokia.icd2 /com/nokia/icd2 "
-		    "com.nokia.icd2.testing.add_available_network "
-		    "string:'' uint32:0 string:'' "
-		    "string:WLAN_INFRA uint32:83886097 array:byte:111,115,115,111,46,110,101,116");
-    dbus_send.waitForFinished();
-#endif
-}
-
-
-void tst_QNetworkConfigurationManager::cleanupTestCase()
-{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-    iapconf->clear();
-    delete iapconf;
-    iapconf2->clear();
-    delete iapconf2;
-    gprsiap->clear();
-    delete gprsiap;
-
-    printf("Deleting %d IAPS : ", MAX_IAPS);
-    for (int i=0; i<MAX_IAPS; i++) {
-	iaps[i]->clear();
-	delete iaps[i];
-	printf(".");
-	fflush(stdout);
-    }
-    printf("\n");
-    qDebug() << "Deleted" << MAX_IAPS << "IAPs";
-
-    icd_stub->terminate();
-    icd_stub->waitForFinished();
-#endif
-}
-
-void tst_QNetworkConfigurationManager::init()
-{
-}
-
-void tst_QNetworkConfigurationManager::cleanup()
-{
-}
-
-void printConfigurationDetails(const QNetworkConfiguration& p)
-{
-    qDebug() << p.name() <<":  isvalid->" <<p.isValid() << " type->"<< p.type() << 
-                " roaming->" << p.isRoamingAvailable() << "identifier->" << p.identifier() <<
-                " purpose->" << p.purpose() << " state->" << p.state();
-}
-
-void tst_QNetworkConfigurationManager::allConfigurations()
-{
-    QNetworkConfigurationManager manager;
-    QList<QNetworkConfiguration> preScanConfigs = manager.allConfigurations();
-
-    foreach(QNetworkConfiguration c, preScanConfigs)
-    {
-        QVERIFY2(c.type()!=QNetworkConfiguration::UserChoice, "allConfiguration must not return UserChoice configs");
-    }
-
-    QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
-    manager.updateConfigurations(); //initiate scans
-    QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
-
-    QList<QNetworkConfiguration> configs = manager.allConfigurations();
-
-    int all = configs.count();
-    qDebug() << "All configurations:" << all;
-    QVERIFY(all);
-    foreach(QNetworkConfiguration p, configs) {
-        QVERIFY(p.isValid());
-        printConfigurationDetails(p);
-        QVERIFY(p.type() != QNetworkConfiguration::Invalid);
-        QVERIFY(p.type() != QNetworkConfiguration::UserChoice);
-    }
-
-    configs = manager.allConfigurations(QNetworkConfiguration::Undefined);
-    int undefined = configs.count();
-    QVERIFY(undefined <= all);
-    qDebug() << "Undefined configurations:" << undefined;
-    foreach( const QNetworkConfiguration p, configs) {
-        printConfigurationDetails(p);
-        QVERIFY(p.state() & QNetworkConfiguration::Undefined);
-        QVERIFY(!(p.state() & QNetworkConfiguration::Defined));
-    }
-
-    //get defined configs only (same as all)
-    configs = manager.allConfigurations(QNetworkConfiguration::Defined);
-    int defined = configs.count();
-    qDebug() << "Defined configurations:" << defined;
-    QVERIFY(defined <= all);
-    foreach( const QNetworkConfiguration p, configs) {
-        printConfigurationDetails(p);
-        QVERIFY(p.state() & QNetworkConfiguration::Defined);
-        QVERIFY(!(p.state() & QNetworkConfiguration::Undefined));
-    }
-
-    //get discovered configurations only
-    configs = manager.allConfigurations(QNetworkConfiguration::Discovered);
-    int discovered = configs.count();
-    //QVERIFY(discovered);
-    qDebug() << "Discovered configurations:" << discovered;
-    foreach(const QNetworkConfiguration p, configs) {
-        printConfigurationDetails(p);
-        QVERIFY(p.isValid());
-        QVERIFY(!(p.state() & QNetworkConfiguration::Undefined));
-        QVERIFY(p.state() & QNetworkConfiguration::Defined);
-        QVERIFY(p.state() & QNetworkConfiguration::Discovered);
-    }
-
-    //getactive configurations only
-    configs = manager.allConfigurations(QNetworkConfiguration::Active);
-    int active = configs.count();
-    if (active)
-        QVERIFY(manager.isOnline());
-    else
-        QVERIFY(!manager.isOnline());
-
-    //QVERIFY(active);
-    qDebug() << "Active configurations:" << active;
-    foreach(const QNetworkConfiguration p, configs) {
-        printConfigurationDetails(p);
-        QVERIFY(p.isValid());
-        QVERIFY(!(p.state() & QNetworkConfiguration::Undefined));
-        QVERIFY(p.state() & QNetworkConfiguration::Active);
-        QVERIFY(p.state() & QNetworkConfiguration::Discovered);
-        QVERIFY(p.state() & QNetworkConfiguration::Defined);
-    }
-
-    QVERIFY(all >= discovered);
-    QVERIFY(discovered >= active);
-}
-
-
-void tst_QNetworkConfigurationManager::defaultConfiguration()
-{
-    QNetworkConfigurationManager manager;
-    QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
-    manager.updateConfigurations(); //initiate scans
-    QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
-
-    QList<QNetworkConfiguration> configs = manager.allConfigurations();
-    QNetworkConfiguration defaultConfig = manager.defaultConfiguration();
-
-    bool confirm = configs.contains(defaultConfig);
-
-    if (defaultConfig.type() != QNetworkConfiguration::UserChoice) {
-        QVERIFY(confirm || !defaultConfig.isValid());
-        QVERIFY(!(confirm && !defaultConfig.isValid()));
-    } else {
-        QVERIFY(!confirm);  // user choice config is not part of allConfigurations()
-        QVERIFY(defaultConfig.isValid());
-        QCOMPARE(defaultConfig.name(), QString("UserChoice"));
-        QCOMPARE(defaultConfig.children().count(), 0);
-        QVERIFY(!defaultConfig.isRoamingAvailable());
-        QCOMPARE(defaultConfig.state(), QNetworkConfiguration::Discovered);
-        QNetworkConfiguration copy = manager.configurationFromIdentifier(defaultConfig.identifier());
-        QVERIFY(copy == defaultConfig);
-    }
-}
-
-void tst_QNetworkConfigurationManager::configurationFromIdentifier()
-{
-    QNetworkConfigurationManager manager;
-    QSet<QString> allIdentifier;
-
-    //force an update to get maximum number of configs
-    QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
-    manager.updateConfigurations(); //initiate scans
-    QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
-    
-    QList<QNetworkConfiguration> configs = manager.allConfigurations();
-
-    foreach(QNetworkConfiguration c, configs) {
-        QVERIFY(!allIdentifier.contains(c.identifier()));
-        allIdentifier.insert(c.identifier());
-
-        QNetworkConfiguration direct = manager.configurationFromIdentifier(c.identifier());
-        QVERIFY(direct.isValid());
-        QVERIFY(direct == c);
-    }
-
-    //assume that there is no item with identifier 'FooBar'
-    QVERIFY(!allIdentifier.contains("FooBar"));
-    QNetworkConfiguration invalid = manager.configurationFromIdentifier("FooBar");
-    QVERIFY(!invalid.isValid());
-}
-
-
-QTEST_MAIN(tst_QNetworkConfigurationManager)
-#include "tst_qnetworkconfigmanager.moc"
--- a/qtmobility/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-SOURCES  += tst_qnetworkconfiguration.cpp
-HEADERS  += ../qbearertestcommon.h
-TARGET = tst_qnetworkconfiguration
-CONFIG += testcase
-
-QT = core network
-
-INCLUDEPATH += ../../../src/bearer
-
-include(../../../common.pri)
-CONFIG += mobility
-MOBILITY = bearer
-
-symbian {
-    TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData 
-}
-
-maemo6|maemo5 {
-    CONFIG += link_pkgconfig
-
-    PKGCONFIG += conninet
-}
--- a/qtmobility/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,310 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include "../qbearertestcommon.h"
-#include "../../../src/bearer/qnetworkconfiguration.h"
-#include "../../../src/bearer/qnetworkconfigmanager.h"
-
-/*
-  Although this unit test doesn't use QNetworkAccessManager
-  this include is used to ensure that bearer continues to compile against
-  Qt 4.7+ which has a QNetworkConfiguration enabled QNetworkAccessManager
-*/
-#include <QNetworkAccessManager>
-
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-#include <stdio.h>
-#include <iapconf.h>
-#endif
-
-QTM_USE_NAMESPACE
-class tst_QNetworkConfiguration : public QObject
-{
-    Q_OBJECT
-
-public slots:
-    void initTestCase();
-    void cleanupTestCase();
-
-private slots:
-    void invalidPoint();
-    void comparison();
-    void children();
-    void isRoamingAvailable();
-
-private:
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-    Maemo::IAPConf *iapconf;
-    Maemo::IAPConf *iapconf2;
-    Maemo::IAPConf *gprsiap;
-#define MAX_IAPS 50
-    Maemo::IAPConf *iaps[MAX_IAPS];
-    QProcess *icd_stub;
-#endif
-};
-
-void tst_QNetworkConfiguration::initTestCase()
-{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-    iapconf = new Maemo::IAPConf("007");
-    iapconf->setValue("ipv4_type", "AUTO");
-    iapconf->setValue("wlan_wepkey1", "connt");
-    iapconf->setValue("wlan_wepdefkey", 1);
-    iapconf->setValue("wlan_ssid", QByteArray("JamesBond"));
-    iapconf->setValue("name", "James Bond");
-    iapconf->setValue("type", "WLAN_INFRA");
-
-    iapconf2 = new Maemo::IAPConf("osso.net");
-    iapconf2->setValue("ipv4_type", "AUTO");
-    iapconf2->setValue("wlan_wepkey1", "osso.net");
-    iapconf2->setValue("wlan_wepdefkey", 1);
-    iapconf2->setValue("wlan_ssid", QByteArray("osso.net"));
-    iapconf2->setValue("name", "osso.net");
-    iapconf2->setValue("type", "WLAN_INFRA");
-    iapconf2->setValue("wlan_security", "WEP");
-
-    gprsiap = new Maemo::IAPConf("This-is-GPRS-IAP");
-    gprsiap->setValue("ask_password", false);
-    gprsiap->setValue("gprs_accesspointname", "internet");
-    gprsiap->setValue("gprs_password", "");
-    gprsiap->setValue("gprs_username", "");
-    gprsiap->setValue("ipv4_autodns", true);
-    gprsiap->setValue("ipv4_type", "AUTO");
-    gprsiap->setValue("sim_imsi", "244070123456789");
-    gprsiap->setValue("name", "MI6");
-    gprsiap->setValue("type", "GPRS");
-
-    /* Create large number of IAPs in the gconf and see what happens */
-    fflush(stdout);
-    printf("Creating %d IAPS: ", MAX_IAPS);
-    for (int i=0; i<MAX_IAPS; i++) {
-	QString num = QString().sprintf("%d", i);
-	QString iap = "iap-" + num;
-	iaps[i] = new Maemo::IAPConf(iap);
-	iaps[i]->setValue("name", QString("test-iap-")+num);
-	iaps[i]->setValue("type", "WLAN_INFRA");
-	iaps[i]->setValue("wlan_ssid", QString(QString("test-ssid-")+num).toAscii());
-	iaps[i]->setValue("wlan_security", "WPA_PSK");
-	iaps[i]->setValue("EAP_wpa_preshared_passphrase", QString("test-passphrase-")+num);
-	printf(".");
-	fflush(stdout);
-    }
-    printf("\n");
-    fflush(stdout);
-
-    icd_stub = new QProcess(this);
-    icd_stub->start("/usr/bin/icd2_stub.py");
-    QTest::qWait(1000);
-
-    // Add a known network to scan list that icd2 stub returns
-    QProcess dbus_send;
-    // 007 network
-    dbus_send.start("dbus-send --type=method_call --system "
-		    "--dest=com.nokia.icd2 /com/nokia/icd2 "
-		    "com.nokia.icd2.testing.add_available_network "
-		    "string:'' uint32:0 string:'' "
-		    "string:WLAN_INFRA uint32:5000011 array:byte:48,48,55");
-    dbus_send.waitForFinished();
-
-    // osso.net network
-    dbus_send.start("dbus-send --type=method_call --system "
-		    "--dest=com.nokia.icd2 /com/nokia/icd2 "
-		    "com.nokia.icd2.testing.add_available_network "
-		    "string:'' uint32:0 string:'' "
-		    "string:WLAN_INFRA uint32:83886097 array:byte:111,115,115,111,46,110,101,116");
-    dbus_send.waitForFinished();
-#endif
-}
-
-void tst_QNetworkConfiguration::cleanupTestCase()
-{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-    iapconf->clear();
-    delete iapconf;
-    iapconf2->clear();
-    delete iapconf2;
-    gprsiap->clear();
-    delete gprsiap;
-
-    printf("Deleting %d IAPS : ", MAX_IAPS);
-    for (int i=0; i<MAX_IAPS; i++) {
-	iaps[i]->clear();
-	delete iaps[i];
-	printf(".");
-	fflush(stdout);
-    }
-    printf("\n");
-    qDebug() << "Deleted" << MAX_IAPS << "IAPs";
-
-    // Terminate icd2 stub
-    icd_stub->terminate();
-    icd_stub->waitForFinished();
-#endif
-}
-
-void tst_QNetworkConfiguration::invalidPoint()
-{
-    QNetworkConfiguration pt;
-
-    QVERIFY(pt.name().isEmpty());
-    QVERIFY(!pt.isValid());
-    QVERIFY(pt.type() == QNetworkConfiguration::Invalid);
-    QVERIFY(!(pt.state() & QNetworkConfiguration::Defined));
-    QVERIFY(!(pt.state() & QNetworkConfiguration::Discovered));
-    QVERIFY(!(pt.state() & QNetworkConfiguration::Active));
-    QVERIFY(!pt.isRoamingAvailable());
-
-    QNetworkConfiguration pt2(pt);
-    QVERIFY(pt2.name().isEmpty());
-    QVERIFY(!pt2.isValid());
-    QVERIFY(pt2.type() == QNetworkConfiguration::Invalid);
-    QVERIFY(!(pt2.state() & QNetworkConfiguration::Defined));
-    QVERIFY(!(pt2.state() & QNetworkConfiguration::Discovered));
-    QVERIFY(!(pt2.state() & QNetworkConfiguration::Active));
-    QVERIFY(!pt2.isRoamingAvailable());
-
-}
-
-void tst_QNetworkConfiguration::comparison()
-{
-    //test copy constructor and assignment operator
-    //compare invalid connection points 
-    QNetworkConfiguration pt1;
-    QVERIFY(!pt1.isValid());
-    QVERIFY(pt1.type() == QNetworkConfiguration::Invalid);
-
-    QNetworkConfiguration pt2(pt1);
-    QVERIFY(pt1==pt2);
-    QVERIFY(!(pt1!=pt2));
-    QVERIFY(pt1.name() == pt2.name());
-    QVERIFY(pt1.isValid() == pt2.isValid());
-    QVERIFY(pt1.type() == pt2.type());
-    QVERIFY(pt1.state() == pt2.state());
-    QVERIFY(pt1.purpose() == pt2.purpose());
-
-    
-    QNetworkConfiguration pt3;
-    pt3 = pt1;
-    QVERIFY(pt1==pt3);
-    QVERIFY(!(pt1!=pt3));
-    QVERIFY(pt1.name() == pt3.name());
-    QVERIFY(pt1.isValid() == pt3.isValid());
-    QVERIFY(pt1.type() == pt3.type());
-    QVERIFY(pt1.state() == pt3.state());
-    QVERIFY(pt1.purpose() == pt3.purpose());
-
-    //test case must run on machine that has valid connection points
-    QNetworkConfigurationManager manager;
-    QList<QNetworkConfiguration> preScanConfigs = manager.allConfigurations();
-
-    QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
-    manager.updateConfigurations(); //initiate scans
-    QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
-
-    QList<QNetworkConfiguration> configs = manager.allConfigurations(QNetworkConfiguration::Discovered);
-    QVERIFY(configs.count());
-    QNetworkConfiguration defaultConfig = manager.defaultConfiguration();
-    QVERIFY(defaultConfig.isValid());
-    QVERIFY(defaultConfig.type() != QNetworkConfiguration::Invalid);
-    QVERIFY(!defaultConfig.name().isEmpty());
-
-    pt3 = defaultConfig;
-    QVERIFY(defaultConfig==pt3);
-    QVERIFY(!(defaultConfig!=pt3));
-    QVERIFY(defaultConfig.name() == pt3.name());
-    QVERIFY(defaultConfig.isValid() == pt3.isValid());
-    QVERIFY(defaultConfig.type() == pt3.type());
-    QVERIFY(defaultConfig.state() == pt3.state());
-    QVERIFY(defaultConfig.purpose() == pt3.purpose());
-}
-
-void tst_QNetworkConfiguration::children()
-{
-    QNetworkConfigurationManager manager;
-    QList<QNetworkConfiguration> configs = manager.allConfigurations();
-
-    foreach(QNetworkConfiguration c, configs)
-    {
-        if ( c.type() == QNetworkConfiguration::ServiceNetwork ) {
-            qDebug() << "found service network" << c.name() << c.children().count();
-            QVERIFY(c.isValid());
-            QList<QNetworkConfiguration> members = c.children();
-            foreach(QNetworkConfiguration child, members) {
-                QVERIFY(child.isValid());
-                QVERIFY(configs.contains(child));
-                qDebug() << "\t" << child.name();
-            }
-        }
-    }
-}
-
-void tst_QNetworkConfiguration::isRoamingAvailable()
-{
-    QNetworkConfigurationManager manager;
-    QList<QNetworkConfiguration> configs = manager.allConfigurations();
-    
-    //force update to get maximum list
-    QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
-    manager.updateConfigurations(); //initiate scans
-    QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
-    
-    foreach(QNetworkConfiguration c, configs)
-    {
-        QVERIFY(QNetworkConfiguration::UserChoice != c.type());
-        QVERIFY(QNetworkConfiguration::Invalid != c.type());
-        if ( c.type() == QNetworkConfiguration::ServiceNetwork ) {
-            //cannot test flag as some SNAPs may not support roaming anyway
-            //QVERIFY(c.roamingavailable())
-            if ( c.children().count() <= 1 )
-                QVERIFY(!c.isRoamingAvailable());
-            foreach(QNetworkConfiguration child, c.children()) {
-                QVERIFY(QNetworkConfiguration::InternetAccessPoint == child.type());
-                QCOMPARE(child.children().count(), 0);
-            }
-        } else {
-            QVERIFY(!c.isRoamingAvailable());
-        }
-    }
-}
-
-QTEST_MAIN(tst_QNetworkConfiguration)
-#include "tst_qnetworkconfiguration.moc"
--- a/qtmobility/tests/auto/qnetworksession/lackey/lackey.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-SOURCES += main.cpp
-TARGET = qnetworksessionlackey
-INCLUDEPATH += ../../../../src/bearer
-DEPENDPATH += ../../../../src/bearer
-
-QT = core network
-
-CONFIG+= testcase
-
-include(../../../../common.pri)
-
-symbian {
-     # Needed for interprocess communication and opening QNetworkSession
-     TARGET.CAPABILITY = NetworkControl NetworkServices
-}
-
-CONFIG += mobility
-MOBILITY = bearer
--- a/qtmobility/tests/auto/qnetworksession/lackey/main.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QCoreApplication>
-#include <QStringList>
-#include <QLocalSocket>
-#include "../../../../src/bearer/qnetworkconfigmanager.h"
-#include "../../../../src/bearer/qnetworkconfiguration.h"
-#include "../../../../src/bearer/qnetworksession.h"
-
-#include <QEventLoop>
-#include <QTimer>
-#include <QDebug>
-
-QTM_USE_NAMESPACE
-
-
-#define NO_DISCOVERED_CONFIGURATIONS_ERROR 1
-#define SESSION_OPEN_ERROR 2
-
-
-int main(int argc, char** argv)
-{
-    QCoreApplication app(argc, argv);
-
-    // Update configurations so that everything is up to date for this process too.
-    // Event loop is used to wait for awhile.
-    QNetworkConfigurationManager manager;
-    manager.updateConfigurations();
-    QEventLoop iIgnoreEventLoop;
-    QTimer::singleShot(3000, &iIgnoreEventLoop, SLOT(quit()));
-    iIgnoreEventLoop.exec();
-
-    QList<QNetworkConfiguration> discovered =
-        manager.allConfigurations(QNetworkConfiguration::Discovered);
-
-        foreach(QNetworkConfiguration config, discovered) {
-            qDebug() << "Lackey: Name of the config enumerated: " << config.name();
-            qDebug() << "Lackey: State of the config enumerated: " << config.state();
-        }
-
-    if (discovered.isEmpty()) {
-        qDebug("Lackey: no discovered configurations, returning empty error.");
-        return NO_DISCOVERED_CONFIGURATIONS_ERROR;
-    }
-
-    // Cannot read/write to processes on WinCE or Symbian.
-    // Easiest alternative is to use sockets for IPC.
-    QLocalSocket oopSocket;
-
-    oopSocket.connectToServer("tst_qnetworksession");
-    oopSocket.waitForConnected(-1);
-
-    qDebug() << "Lackey started";
-
-    QNetworkSession *session = 0;
-    do {
-        if (session) {
-            delete session;
-            session = 0;
-        }
-
-        qDebug() << "Discovered configurations:" << discovered.count();
-
-        if (discovered.isEmpty()) {
-            qDebug() << "No more discovered configurations";
-            break;
-        }
-
-        qDebug() << "Taking first configuration";
-
-        QNetworkConfiguration config = discovered.takeFirst();
-
-        if ((config.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
-            qDebug() << config.name() << " is active, therefore skipping it (looking for configs in 'discovered' state).";
-            continue;
-        }
-
-        qDebug() << "Creating session for" << config.name() << config.identifier();
-
-        session = new QNetworkSession(config);
-
-        QString output = QString("Starting session for %1\n").arg(config.identifier());
-        oopSocket.write(output.toAscii());
-        oopSocket.waitForBytesWritten();
-        session->open();
-        session->waitForOpened();
-    } while (!(session && session->isOpen()));
-
-    qDebug() << "lackey: loop done";
-
-    if (!session) {
-        qDebug() << "Could not start session";
-
-        oopSocket.disconnectFromServer();
-        oopSocket.waitForDisconnected(-1);
-
-        return SESSION_OPEN_ERROR;
-    }
-
-    QString output = QString("Started session for %1\n").arg(session->configuration().identifier());
-    oopSocket.write(output.toAscii());
-    oopSocket.waitForBytesWritten();
-
-    oopSocket.waitForReadyRead();
-    oopSocket.readLine();
-
-    session->stop();
-
-    delete session;
-
-    oopSocket.disconnectFromServer();
-    oopSocket.waitForDisconnected(-1);
-
-    return 0;
-}
--- a/qtmobility/tests/auto/qnetworksession/qnetworksession.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = lackey tst_qnetworksession
--- a/qtmobility/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1608 +0,0 @@
-/****************************************************************************
-** 
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QLocalServer>
-#include <QLocalSocket>
-#include <QTimer>
-#include "../../qbearertestcommon.h"
-#include "../../../../src/bearer/qnetworkconfigmanager.h"
-#include "../../../../src/bearer/qnetworksession.h"
-
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-#include <stdio.h>
-#include <iapconf.h>
-#endif
-
-QTM_USE_NAMESPACE
-
-// Can be used to configure tests that require manual attention (such as roaming)
-//#define QNETWORKSESSION_MANUAL_TESTS 1
-
-Q_DECLARE_METATYPE(QNetworkConfiguration)
-Q_DECLARE_METATYPE(QNetworkConfiguration::Type);
-Q_DECLARE_METATYPE(QNetworkSession::State);
-Q_DECLARE_METATYPE(QNetworkSession::SessionError);
-
-class tst_QNetworkSession : public QObject
-{
-    Q_OBJECT
-
-public slots:
-    void initTestCase();
-    void cleanupTestCase();
-
-private slots:
-
-    void robustnessBombing();
-
-    void sessionClosing_data();
-    void sessionClosing();
-
-    void outOfProcessSession();
-    void invalidSession();
-
-    void repeatedOpenClose_data();
-    void repeatedOpenClose();
-
-    void sessionStop_data();
-    void sessionStop();
-
-    void roamingErrorCodes();
-
-    void sessionProperties_data();
-    void sessionProperties();
-
-    void userChoiceSession_data();
-    void userChoiceSession();
-
-    void sessionOpenCloseStop_data();
-    void sessionOpenCloseStop();
-
-private:
-    QNetworkConfigurationManager manager;
-    QMap<QString, bool> testsToRun;
-
-    uint inProcessSessionManagementCount;
-
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-    Maemo::IAPConf *iapconf;
-    Maemo::IAPConf *iapconf2;
-    Maemo::IAPConf *gprsiap;
-#define MAX_IAPS 10
-    Maemo::IAPConf *iaps[MAX_IAPS];
-    QProcess *icd_stub;
-#endif
-};
-
-// Helper functions
-bool openSession(QNetworkSession *session);
-bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration = true);
-void updateConfigurations();
-void printConfigurations();
-QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfiguration::Type configType);
-
-void tst_QNetworkSession::initTestCase()
-{
-    qRegisterMetaType<QNetworkSession::State>("QNetworkSession::State");
-    qRegisterMetaType<QNetworkSession::SessionError>("QNetworkSession::SessionError");
-    qRegisterMetaType<QNetworkConfiguration>("QNetworkConfiguration");
-    qRegisterMetaType<QNetworkConfiguration::Type>("QNetworkConfiguration::Type");
-	
-    // If you wish to skip tests, set value as false. This is often very convinient because tests are so lengthy.
-    // Better way still would be to make this readable from a file.
-    testsToRun["robustnessBombing"] = true;
-    testsToRun["sessionClosing"] = true;
-    testsToRun["outOfProcessSession"] = true;
-    testsToRun["invalidSession"] = true;
-    testsToRun["repeatedOpenClose"] = true;
-    testsToRun["roamingErrorCodes"] = true;
-    testsToRun["sessionStop"] = true;
-    testsToRun["sessionProperties"] = true;
-    testsToRun["userChoiceSession"] = true;
-    testsToRun["sessionOpenCloseStop"] = true;
-	
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-    iapconf = new Maemo::IAPConf("007");
-    iapconf->setValue("ipv4_type", "AUTO");
-    iapconf->setValue("wlan_wepkey1", "connt");
-    iapconf->setValue("wlan_wepdefkey", 1);
-    iapconf->setValue("wlan_ssid", QByteArray("JamesBond"));
-    iapconf->setValue("name", "James Bond");
-    iapconf->setValue("type", "WLAN_INFRA");
-
-    gprsiap = new Maemo::IAPConf("This-is-GPRS-IAP");
-    gprsiap->setValue("ask_password", false);
-    gprsiap->setValue("gprs_accesspointname", "internet");
-    gprsiap->setValue("gprs_password", "");
-    gprsiap->setValue("gprs_username", "");
-    gprsiap->setValue("ipv4_autodns", true);
-    gprsiap->setValue("ipv4_type", "AUTO");
-    gprsiap->setValue("sim_imsi", "244070123456789");
-    gprsiap->setValue("name", "MI6");
-    gprsiap->setValue("type", "GPRS");
-
-    iapconf2 = new Maemo::IAPConf("osso.net");
-    iapconf2->setValue("ipv4_type", "AUTO");
-    iapconf2->setValue("wlan_wepkey1", "osso.net");
-    iapconf2->setValue("wlan_wepdefkey", 1);
-    iapconf2->setValue("wlan_ssid", QByteArray("osso.net"));
-    iapconf2->setValue("name", "osso.net");
-    iapconf2->setValue("type", "WLAN_INFRA");
-    iapconf2->setValue("wlan_security", "WEP");
-
-    /* Create large number of IAPs in the gconf and see what happens */
-    fflush(stdout);
-    printf("Creating %d IAPS: ", MAX_IAPS);
-    for (int i=0; i<MAX_IAPS; i++) {
-	QString num = QString().sprintf("%d", i);
-	QString iap = "iap-" + num;
-	iaps[i] = new Maemo::IAPConf(iap);
-	iaps[i]->setValue("name", QString("test-iap-")+num);
-	iaps[i]->setValue("type", "WLAN_INFRA");
-	iaps[i]->setValue("wlan_ssid", QString(QString("test-ssid-")+num).toAscii());
-	iaps[i]->setValue("wlan_security", "WPA_PSK");
-	iaps[i]->setValue("EAP_wpa_preshared_passphrase", QString("test-passphrase-")+num);
-	printf(".");
-	fflush(stdout);
-    }
-    printf("\n");
-    fflush(stdout);
-
-    icd_stub = new QProcess(this);
-    icd_stub->start("/usr/bin/icd2_stub.py");
-    QTest::qWait(1000);
-
-    // Add a known network to scan list that icd2 stub returns
-    QProcess dbus_send;
-    // 007 network
-    dbus_send.start("dbus-send --type=method_call --system "
-		    "--dest=com.nokia.icd2 /com/nokia/icd2 "
-		    "com.nokia.icd2.testing.add_available_network "
-		    "string:'' uint32:0 string:'' "
-		    "string:WLAN_INFRA uint32:5000011 array:byte:48,48,55");
-    dbus_send.waitForFinished();
-
-    // osso.net network
-    dbus_send.start("dbus-send --type=method_call --system "
-		    "--dest=com.nokia.icd2 /com/nokia/icd2 "
-		    "com.nokia.icd2.testing.add_available_network "
-		    "string:'' uint32:0 string:'' "
-		    "string:WLAN_INFRA uint32:83886097 array:byte:111,115,115,111,46,110,101,116");
-    dbus_send.waitForFinished();
-#endif
-
-    inProcessSessionManagementCount = 0;
-
-    QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
-    manager.updateConfigurations();
-    QTRY_VERIFY(spy.count() == 1);
-}
-
-void tst_QNetworkSession::cleanupTestCase()
-{
-    if (!(manager.capabilities() & QNetworkConfigurationManager::SystemSessionSupport) &&
-        (manager.capabilities() & QNetworkConfigurationManager::CanStartAndStopInterfaces) &&
-        inProcessSessionManagementCount == 0) {
-        QFAIL("No usable configurations found to complete all possible "
-              "tests in inProcessSessionManagement()");
-    }
-
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
-    iapconf->clear();
-    delete iapconf;
-    iapconf2->clear();
-    delete iapconf2;
-    gprsiap->clear();
-    delete gprsiap;
-
-    printf("Deleting %d IAPS : ", MAX_IAPS);
-    for (int i=0; i<MAX_IAPS; i++) {
-	iaps[i]->clear();
-	delete iaps[i];
-	printf(".");
-	fflush(stdout);
-    }
-    printf("\n");
-    qDebug() << "Deleted" << MAX_IAPS << "IAPs";
-
-    icd_stub->terminate();
-    icd_stub->waitForFinished();
-#endif
-}
-
-// Robustness test for calling interfaces in nonsense order / with nonsense parameters
-void tst_QNetworkSession::robustnessBombing() 
-{
-    if (!testsToRun["robustnessBombing"]) {
-	QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);    
-    }
-    
-    QNetworkConfigurationManager mgr;
-    QNetworkSession testSession(mgr.defaultConfiguration());
-    // Should not reset even session is not opened
-    testSession.migrate();
-    testSession.accept();
-    testSession.ignore();
-    testSession.reject();
-}
-
-void tst_QNetworkSession::sessionClosing_data() {
-    QTest::addColumn<QString>("bearerType");
-    QTest::addColumn<QNetworkConfiguration::Type>("configurationType");
-
-    QTest::newRow("WLAN_IAP") << "WLAN" << QNetworkConfiguration::InternetAccessPoint;
-    QTest::newRow("Cellular_IAP") << "cellular" << QNetworkConfiguration::InternetAccessPoint;
-    QTest::newRow("SNAP") << "bearer_type_not_relevant_with_SNAPs" << QNetworkConfiguration::ServiceNetwork;
-}
-
-// Testcase for closing the session at unexpected times
-void tst_QNetworkSession::sessionClosing()
-{
-    if (!testsToRun["sessionClosing"]) {
-        QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);
-    }
-    QFETCH(QString, bearerType);
-    QFETCH(QNetworkConfiguration::Type, configurationType);
-
-    // Update configurations so that WLANs are discovered too.
-    updateConfigurations();
-
-    // First check that opening once succeeds and determine if test is doable
-    QNetworkConfiguration config = suitableConfiguration(bearerType, configurationType);
-    if (!config.isValid()) {
-        QSKIP("No suitable configurations, skipping this round of repeated open-close test.", SkipSingle);
-    }
-    qDebug() << "Using following configuration to bomb with close(): " << config.name();
-    QNetworkSession session(config);
-    if (!openSession(&session) ||
-        !closeSession(&session)) {
-        QSKIP("Unable to open/close session, skipping this round of close() bombing.", SkipSingle);
-    }
-
-    qDebug() << "Closing without issuing open()";
-    session.close();
-
-    for (int i = 0; i < 25; i++) {
-        qDebug() << "Opening and then waiting: " << i * 100 << " ms before closing.";
-        session.open();
-        QTest::qWait(i*100);
-        session.close();
-        // Sooner or later session must end in Disconnected state,
-        // no matter what the phase was.
-        QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
-        QTest::qWait(200); // Give platform a breathe, otherwise we'll be catching other errors
-    }
-}
-
-void tst_QNetworkSession::invalidSession()
-{ 
-    if (!testsToRun["invalidSession"]) {
-	QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);    
-    }
-    // 1. Verify that session created with invalid configuration remains in invalid state
-    QNetworkSession session(QNetworkConfiguration(), 0);
-    QVERIFY(!session.isOpen());
-    QVERIFY(session.state() == QNetworkSession::Invalid);
-    
-    // 2. Verify that opening session with invalid configuration both 1) emits invalidconfigurationerror and 2) sets session's state as invalid.
-    QSignalSpy errorSpy(&session, SIGNAL(error(QNetworkSession::SessionError)));
-    session.open();
-    session.waitForOpened(1000); // Should bail out right away
-    QVERIFY(errorSpy.count() == 1); 
-    QNetworkSession::SessionError error =
-           qvariant_cast<QNetworkSession::SessionError> (errorSpy.first().at(0));
-    QVERIFY(error == QNetworkSession::InvalidConfigurationError);
-    QVERIFY(session.state() == QNetworkSession::Invalid);
-    	
-#ifdef QNETWORKSESSION_MANUAL_TESTS
-
-    QNetworkConfiguration invalidatedConfig = suitableConfiguration("WLAN",QNetworkConfiguration::InternetAccessPoint);
-    if (invalidatedConfig.isValid()) {
-        // 3. Verify that invalidating a session after its successfully configured works
-        QNetworkSession invalidatedSession(invalidatedConfig);
-        qDebug() << "Delete the WLAN IAP from phone now (waiting 60 seconds): " << invalidatedConfig.name();
-        QTest::qWait(60000);
-        QVERIFY(!invalidatedConfig.isValid());
-        QVERIFY(invalidatedSession.state() == QNetworkSession::Invalid);
-        qDebug() << "Add the WLAN IAP back (waiting 60 seconds): " << invalidatedConfig.name();
-        QTest::qWait(60000);
-    }
-    
-    QNetworkConfiguration definedConfig = suitableConfiguration("WLAN",QNetworkConfiguration::InternetAccessPoint);
-    if (definedConfig.isValid()) {
-        // 4. Verify that opening a session with defined configuration emits error and enters notavailable-state
-        // TODO these timer waits should be changed to waiting appropriate signals, now these wait excessively
-        qDebug() << "Shutdown WLAN IAP (waiting 60 seconds): " << definedConfig.name();
-        QTest::qWait(60000);
-        // Shutting down WLAN should bring back to defined -state.
-        QVERIFY((definedConfig.state() & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined);
-        QNetworkSession definedSession(definedConfig);
-        QSignalSpy errorSpy(&definedSession, SIGNAL(error(QNetworkSession::SessionError)));
-        QNetworkSession::SessionError sessionError;
-        updateConfigurations();
-
-        definedSession.open();
-#ifdef Q_OS_SYMBIAN
-        // On symbian, the connection opening is tried even with defined state.
-        qDebug("Waiting for 10 seconds to all signals to propagate.");
-        QTest::qWait(10000);
-#endif
-        updateConfigurations();
-
-        QVERIFY(definedConfig.isValid()); // Session remains valid
-        QVERIFY(definedSession.state() == QNetworkSession::NotAvailable); // State is not available because WLAN is not in coverage
-        QVERIFY(!errorSpy.isEmpty()); // Session tells with error about invalidated configuration
-        sessionError = qvariant_cast<QNetworkSession::SessionError> (errorSpy.first().at(0));
-        QVERIFY(sessionError == QNetworkSession::InvalidConfigurationError);
-        qDebug() << "Turn the WLAN IAP back on (waiting 60 seconds): " << definedConfig.name();
-        QTest::qWait(60000);
-        updateConfigurations();        
-        QVERIFY(definedConfig.state() == QNetworkConfiguration::Discovered);
-    }
-
-#endif
-}
-
-void tst_QNetworkSession::sessionProperties_data()
-{
-    QTest::addColumn<QNetworkConfiguration>("configuration");
-
-    QTest::newRow("invalid configuration") << QNetworkConfiguration();
-
-    foreach (const QNetworkConfiguration &config, manager.allConfigurations()) {
-        const QString name = config.name().isEmpty() ? QString("<Hidden>") : config.name();
-        QTest::newRow(name.toLocal8Bit().constData()) << config;
-    }
-}
-
-void tst_QNetworkSession::sessionProperties()
-{
-    if (!testsToRun["sessionProperties"]) {
-	QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);    
-    }
-    QFETCH(QNetworkConfiguration, configuration);
-    QNetworkSession session(configuration);
-    QVERIFY(session.configuration() == configuration);
-    QStringList validBearerNames = QStringList() << QLatin1String("Unknown")
-                                                 << QLatin1String("Ethernet")
-                                                 << QLatin1String("WLAN")
-                                                 << QLatin1String("2G")
-                                                 << QLatin1String("CDMA2000")
-                                                 << QLatin1String("WCDMA")
-                                                 << QLatin1String("HSPA")
-                                                 << QLatin1String("Bluetooth")
-                                                 << QLatin1String("WiMAX");
-
-    if (!configuration.isValid()) {
-        QVERIFY(configuration.bearerName().isEmpty());
-    } else {
-        switch (configuration.type())
-        {
-            case QNetworkConfiguration::ServiceNetwork:
-            case QNetworkConfiguration::UserChoice:
-            default:
-                QVERIFY(configuration.bearerName().isEmpty());
-                break;
-            case QNetworkConfiguration::InternetAccessPoint:
-                QVERIFY(validBearerNames.contains(configuration.bearerName()));
-                break;
-        }
-    }
-
-    // QNetworkSession::interface() should return an invalid interface unless
-    // session is in the connected state.
-#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
-    // On Symbian emulator, the support for data bearers is limited
-    QCOMPARE(session.state() == QNetworkSession::Connected, session.interface().isValid());
-#endif
-
-    if (!configuration.isValid()) {
-        QVERIFY(configuration.state() == QNetworkConfiguration::Undefined &&
-                session.state() == QNetworkSession::Invalid);
-    } else {
-        switch (configuration.state()) {
-        case QNetworkConfiguration::Undefined:
-            QVERIFY(session.state() == QNetworkSession::NotAvailable);
-            break;
-        case QNetworkConfiguration::Defined:
-            QVERIFY(session.state() == QNetworkSession::NotAvailable);
-            break;
-        case QNetworkConfiguration::Discovered:
-            QVERIFY(session.state() == QNetworkSession::Connecting ||
-                    session.state() == QNetworkSession::Disconnected);
-            break;
-        case QNetworkConfiguration::Active:
-            QVERIFY(session.state() == QNetworkSession::Connected ||
-                    session.state() == QNetworkSession::Closing ||
-                    session.state() == QNetworkSession::Roaming);
-            break;
-        default:
-            QFAIL("Invalid configuration state");
-        };
-    }
-}
-
-void tst_QNetworkSession::repeatedOpenClose_data() {
-    QTest::addColumn<QString>("bearerType");
-    QTest::addColumn<QNetworkConfiguration::Type>("configurationType");
-    QTest::addColumn<int>("repeatTimes");
-
-    QTest::newRow("WLAN_IAP") << "WLAN" << QNetworkConfiguration::InternetAccessPoint << 3;
-    // QTest::newRow("Cellular_IAP") << "cellular" << QNetworkConfiguration::InternetAccessPoint << 3;
-    // QTest::newRow("SNAP") << "bearer_type_not_relevant_with_SNAPs" << QNetworkConfiguration::ServiceNetwork << 3;
-}
-
-// Tests repeated-open close.
-void tst_QNetworkSession::repeatedOpenClose() 
-{	
-    if (!testsToRun["repeatedOpenClose"]) {
-	QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);    
-    }
-	
-    QFETCH(QString, bearerType);
-    QFETCH(QNetworkConfiguration::Type, configurationType);
-    QFETCH(int, repeatTimes);
-
-    // First check that opening once succeeds and determine if repeatable testing is doable
-    QNetworkConfiguration config = suitableConfiguration(bearerType, configurationType);
-    if (!config.isValid()) {
-        QSKIP("No suitable configurations, skipping this round of repeated open-close test.", SkipSingle);
-    }
-    qDebug() << "Using following configuratio to repeatedly open and close: " << config.name();
-    QNetworkSession permanentSession(config);
-    if (!openSession(&permanentSession) || 
-        !closeSession(&permanentSession)) {
-        QSKIP("Unable to open/close session, skipping this round of repeated open-close test.", SkipSingle); 
-    }
-    for (int i = 0; i < repeatTimes; i++) { 
-       qDebug() << "Opening, loop number " << i;
-       QVERIFY(openSession(&permanentSession));
-       qDebug() << "Closing, loop number, then waiting 5 seconds: " << i;
-       QVERIFY(closeSession(&permanentSession));
-       QTest::qWait(5000);
-    }
-}
-
-void tst_QNetworkSession::roamingErrorCodes() 
-{
-    if (!testsToRun["roamingErrorCodes"]) {
-	QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);    
-    }    
-#ifndef Q_OS_SYMBIAN
-    QSKIP("Roaming supported on Symbian.", SkipAll);
-#else 
-    QNetworkConfiguration wlanIapConfig = suitableConfiguration("WLAN", QNetworkConfiguration::InternetAccessPoint);
-    if (!wlanIapConfig.isValid()) {
-        QSKIP("No WLAN IAP accessible, skipping test.", SkipAll);
-    }
-    // Check that opening and closing two sessions on same config work gracefully:
-    QNetworkSession iapSession(wlanIapConfig);
-    QVERIFY(openSession(&iapSession));
-    QNetworkSession adminIapSession(wlanIapConfig);
-    QVERIFY(openSession(&adminIapSession));
-    QVERIFY(closeSession(&iapSession, false)); // false == not a last session based on the configuration
-    QVERIFY(closeSession(&adminIapSession));
-    
-    // Open configurations again, force close bearer and check that errors are emitted correctly
-    // on the other session
-    QVERIFY(openSession(&iapSession));
-    QVERIFY(openSession(&adminIapSession));
-    QSignalSpy errorSpy(&iapSession, SIGNAL(error(QNetworkSession::SessionError)));   
-    adminIapSession.stop(); // requires NetworkControl capabilities
-    QTRY_VERIFY(!errorSpy.isEmpty()); // wait for error signals
-    QNetworkSession::SessionError error = qvariant_cast<QNetworkSession::SessionError>(errorSpy.first().at(0));
-    QTest::qWait(2000); // Wait for a moment to all platform signals to propagate
-    QVERIFY(error == QNetworkSession::SessionAbortedError);
-    QVERIFY(iapSession.state() == QNetworkSession::Disconnected);
-    QVERIFY(adminIapSession.state() == QNetworkSession::Disconnected);
-#endif // Q_OS_SYMBIAN
-}
-
-
-void tst_QNetworkSession::sessionStop_data() {
-    QTest::addColumn<QString>("bearerType");
-    QTest::addColumn<QNetworkConfiguration::Type>("configurationType");
-
-    QTest::newRow("SNAP") << "bearer_type_not_relevant_with_SNAPs" << QNetworkConfiguration::ServiceNetwork;
-    QTest::newRow("WLAN_IAP") << "WLAN" << QNetworkConfiguration::InternetAccessPoint;
-    QTest::newRow("Cellular_IAP") << "cellular" << QNetworkConfiguration::InternetAccessPoint;
-}
-
-void tst_QNetworkSession::sessionStop() 
-{
-    if (!testsToRun["sessionStop"]) {
-	QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);    
-    }
-#ifndef Q_OS_SYMBIAN
-    QSKIP("Testcase contains mainly Symbian specific checks, because it is only platform to really support interface (IAP-level) Stop.", SkipAll);
-#endif 
-    QFETCH(QString, bearerType);
-    QFETCH(QNetworkConfiguration::Type, configurationType);
-    
-    int configWaitdelayInMs = 2000;
-	
-    updateConfigurations();
-    printConfigurations();
-    
-    QNetworkConfiguration config = suitableConfiguration(bearerType, configurationType);
-    if (!config.isValid()) {
-        QSKIP("No suitable configurations, skipping this round of session stop test.", SkipSingle);
-    }
-    qDebug() << "Using following configuration to open and stop a session: " << config.name();
-
-    QNetworkSession openedSession(config);
-    QNetworkSession closedSession(config);
-    QNetworkSession innocentSession(config);
-    QNetworkConfigurationManager mgr;
-    
-    QSignalSpy closedSessionOpenedSpy(&closedSession, SIGNAL(opened()));
-    QSignalSpy closedSessionClosedSpy(&closedSession, SIGNAL(closed()));
-    QSignalSpy closedSessionStateChangedSpy(&closedSession, SIGNAL(stateChanged(QNetworkSession::State)));
-    QSignalSpy closedErrorSpy(&closedSession, SIGNAL(error(QNetworkSession::SessionError)));
-    
-    QSignalSpy openedSessionClosedSpy(&openedSession, SIGNAL(closed()));
-    QSignalSpy openedSessionStateChangedSpy(&openedSession, SIGNAL(stateChanged(QNetworkSession::State)));
-    
-    QSignalSpy innocentSessionClosedSpy(&innocentSession, SIGNAL(closed()));
-    QSignalSpy innocentSessionStateChangedSpy(&innocentSession, SIGNAL(stateChanged(QNetworkSession::State)));
-    QSignalSpy innocentErrorSpy(&innocentSession, SIGNAL(error(QNetworkSession::SessionError)));
-    QNetworkSession::SessionError sessionError;
-    
-    // 1. Verify that stopping an opened session works (the simplest usecase).
-    qDebug("----------1. Verify that stopping an opened session works (the simplest usecase)");
-    QSignalSpy configChangeSpy(&mgr, SIGNAL(configurationChanged(QNetworkConfiguration)));
-    QVERIFY(openSession(&openedSession));
-    qDebug("Waiting for %d ms to get all configurationChange signals from platform.", configWaitdelayInMs);
-    // Clear signals caused by opening
-    closedSessionOpenedSpy.clear();
-    closedSessionClosedSpy.clear();
-    closedSessionStateChangedSpy.clear();
-    closedErrorSpy.clear();
-    openedSessionStateChangedSpy.clear();
-    openedSessionClosedSpy.clear();
-    
-    openedSession.stop();
-
-    qDebug("Waiting for %d ms to get all configurationChange signals from platform.", configWaitdelayInMs);
-    QTest::qWait(configWaitdelayInMs); // Wait to get all relevant configurationChange() signals
-    
-    // First to closing, then to disconnected
-    QVERIFY(openedSessionStateChangedSpy.count() == 2);
-    QVERIFY(!openedSessionClosedSpy.isEmpty());
-    QVERIFY(openedSession.state() == QNetworkSession::Disconnected);
-    QVERIFY(config.state() != QNetworkConfiguration::Active);
-    
-    // 2. Verify that stopping a session based on non-connected configuration does nothing
-    qDebug("----------2. Verify that stopping a session based on non-connected configuration does nothing");
-    QNetworkSession::State closedSessionOriginalState = closedSession.state();
-    // Clear all possible signals
-    configChangeSpy.clear();
-    closedSessionOpenedSpy.clear();
-    closedSessionClosedSpy.clear();
-    closedSessionStateChangedSpy.clear();
-    closedErrorSpy.clear();
-    
-    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
-    
-    QVERIFY(closedSessionOpenedSpy.isEmpty());
-    QVERIFY(closedSessionClosedSpy.isEmpty());
-    QVERIFY(closedSessionStateChangedSpy.isEmpty());
-    QVERIFY(closedErrorSpy.isEmpty());
-    QVERIFY(closedSession.state() == closedSessionOriginalState); // State remains
-    
-    // 3. Check that stopping a opened session affects also other opened session based on the same configuration.
-    if (config.type() == QNetworkConfiguration::InternetAccessPoint) {
-        qDebug("----------3. Check that stopping a opened session affects also other opened session based on the same configuration.");
-	
-        QVERIFY(openSession(&openedSession));
-        QVERIFY(openSession(&innocentSession));
-	    
-        configChangeSpy.clear();
-        innocentSessionClosedSpy.clear();
-        innocentSessionStateChangedSpy.clear();
-        innocentErrorSpy.clear();
-        
-        openedSession.stop();    
-        qDebug("Waiting for %d ms to get all configurationChange signals from platform.", configWaitdelayInMs);
-        QTest::qWait(configWaitdelayInMs); // Wait to get all relevant configurationChange() signals
-	QTest::qWait(configWaitdelayInMs); // Wait to get all relevant configurationChange() signals
-	    
-        QVERIFY(!innocentSessionClosedSpy.isEmpty());
-        QVERIFY(!innocentSessionStateChangedSpy.isEmpty());
-        QVERIFY(!innocentErrorSpy.isEmpty());
-        QVERIFY(innocentSession.state() == QNetworkSession::Disconnected);
-        QVERIFY(openedSession.state() == QNetworkSession::Disconnected);
-        sessionError = qvariant_cast<QNetworkSession::SessionError>(innocentErrorSpy.first().at(0));
-        QVERIFY(sessionError == QNetworkSession::SessionAbortedError);
-
-        innocentSessionClosedSpy.clear();
-        innocentSessionStateChangedSpy.clear();
-        innocentErrorSpy.clear();
-    } else {
-        qDebug("----------3. Skip for SNAP configuration.");
-    }
-    // 4. Check that stopping a non-opened session stops the other session based on the 
-    // same configuration if configuration is IAP. Stopping closed SNAP session has no impact on other opened SNAP session.
-    if (config.type() == QNetworkConfiguration::ServiceNetwork) {
-        qDebug("----------4. Skip for SNAP configuration.");
-    } else if (config.type() == QNetworkConfiguration::InternetAccessPoint) {
-        qDebug("----------4.   Check that stopping a non-opened session stops the other session based on the same configuration");
-	qDebug("----------4.1 Opening innocent session");
-        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()");
-        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
-    
-	    QTest::qWait(configWaitdelayInMs);
-	    QTest::qWait(configWaitdelayInMs);
-	    
-        QVERIFY(!innocentSessionClosedSpy.isEmpty());
-        QVERIFY(!innocentSessionStateChangedSpy.isEmpty());
-        QVERIFY(!innocentErrorSpy.isEmpty());
-        QVERIFY(innocentSession.state() == QNetworkSession::Disconnected);
-        QVERIFY(closedSession.state() == QNetworkSession::Disconnected);
-        sessionError = qvariant_cast<QNetworkSession::SessionError>(innocentErrorSpy.first().at(0));
-        QVERIFY(sessionError == QNetworkSession::SessionAbortedError);
-        QVERIFY(config.state() == QNetworkConfiguration::Discovered);
-    }
-    
-    // 5. Sanity check that stopping invalid session does not crash
-    qDebug("----------5. Sanity check that stopping invalid session does not crash");
-    QNetworkSession invalidSession(QNetworkConfiguration(), 0);
-    QVERIFY(invalidSession.state() == QNetworkSession::Invalid);
-    invalidSession.stop();
-    QVERIFY(invalidSession.state() == QNetworkSession::Invalid);
-}
-
-void tst_QNetworkSession::userChoiceSession_data()
-{
-    QTest::addColumn<QNetworkConfiguration>("configuration");
-
-    QNetworkConfiguration config = manager.defaultConfiguration();
-    if (config.type() == QNetworkConfiguration::UserChoice)
-        QTest::newRow("UserChoice") << config;
-    else
-        QSKIP("Default configuration is not a UserChoice configuration.", SkipAll);
-}
-
-void tst_QNetworkSession::userChoiceSession()
-{
-    if (!testsToRun["userChoiceSession"]) {
-	QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);    
-    }
-    QFETCH(QNetworkConfiguration, configuration);
-
-    QVERIFY(configuration.type() == QNetworkConfiguration::UserChoice);
-
-    QNetworkSession session(configuration);
-
-    // Check that configuration was really set
-    QVERIFY(session.configuration() == configuration);
-
-    QVERIFY(!session.isOpen());
-
-    // Check that session is not active
-    QVERIFY(session.sessionProperty("ActiveConfiguration").toString().isEmpty());
-
-    // 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)));
-    QSignalSpy errorSpy(&session, SIGNAL(error(QNetworkSession::SessionError)));
-
-    // Test opening the session.
-    {
-        bool expectStateChange = session.state() != QNetworkSession::Connected;
-
-        session.open();
-
-#if defined(Q_OS_SYMBIAN)
-        // Opening & closing multiple connections in a row sometimes
-        // results hanging of connection opening on Symbian devices
-        // => If first open fails, wait a moment and try again.
-        if (!session.waitForOpened()) {
-            qDebug("**** Session open Timeout - Wait 5 seconds and try once again ****");        
-            session.close();
-            QTest::qWait(5000); // Wait a while before trying to open session again
-            session.open();
-            session.waitForOpened();
-        }
-#else        
-        session.waitForOpened();
-#endif        
-
-        if (session.isOpen())
-            QVERIFY(!sessionOpenedSpy.isEmpty() || !errorSpy.isEmpty());
-        if (!errorSpy.isEmpty()) {
-            QNetworkSession::SessionError error =
-                qvariant_cast<QNetworkSession::SessionError>(errorSpy.first().at(0));
-            if (error == QNetworkSession::OperationNotSupportedError) {
-                // The session needed to bring up the interface,
-                // but the operation is not supported.
-                QSKIP("Configuration does not support open().", SkipSingle);
-            } else if (error == QNetworkSession::InvalidConfigurationError) {
-                // The session needed to bring up the interface, but it is not possible for the
-                // specified configuration.
-                if ((session.configuration().state() & QNetworkConfiguration::Discovered) ==
-                    QNetworkConfiguration::Discovered) {
-                    QFAIL("Failed to open session for Discovered configuration.");
-                } else {
-                    QSKIP("Cannot test session for non-Discovered configuration.", SkipSingle);
-                }
-            } else if (error == QNetworkSession::UnknownSessionError) {
-                    QSKIP("Unknown session error.", SkipSingle);
-            } else {
-                QFAIL("Error opening session.");
-            }
-        } else if (!sessionOpenedSpy.isEmpty()) {
-            QCOMPARE(sessionOpenedSpy.count(), 1);
-            QVERIFY(sessionClosedSpy.isEmpty());
-            QVERIFY(errorSpy.isEmpty());
-
-            if (expectStateChange)
-                QTRY_VERIFY(!stateChangedSpy.isEmpty());
-
-            QVERIFY(session.state() == QNetworkSession::Connected);
-#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
-            // On Symbian emulator, the support for data bearers is limited
-            QVERIFY(session.interface().isValid());
-#endif
-
-            const QString userChoiceIdentifier =
-                session.sessionProperty("UserChoiceConfiguration").toString();
-
-            QVERIFY(!userChoiceIdentifier.isEmpty());
-            QVERIFY(userChoiceIdentifier != configuration.identifier());
-
-            QNetworkConfiguration userChoiceConfiguration =
-                manager.configurationFromIdentifier(userChoiceIdentifier);
-
-            QVERIFY(userChoiceConfiguration.isValid());
-            QVERIFY(userChoiceConfiguration.type() != QNetworkConfiguration::UserChoice);
-
-            const QString testIdentifier("abc");
-            //resetting UserChoiceConfiguration is ignored (read only property)
-            session.setSessionProperty("UserChoiceConfiguration", testIdentifier);
-            QVERIFY(session.sessionProperty("UserChoiceConfiguration").toString() != testIdentifier);
-
-            const QString activeIdentifier =
-                session.sessionProperty("ActiveConfiguration").toString();
-
-            QVERIFY(!activeIdentifier.isEmpty());
-            QVERIFY(activeIdentifier != configuration.identifier());
-
-            QNetworkConfiguration activeConfiguration =
-                manager.configurationFromIdentifier(activeIdentifier);
-
-            QVERIFY(activeConfiguration.isValid());
-            QVERIFY(activeConfiguration.type() == QNetworkConfiguration::InternetAccessPoint);
-            
-            //resetting ActiveConfiguration is ignored (read only property)
-            session.setSessionProperty("ActiveConfiguration", testIdentifier);
-            QVERIFY(session.sessionProperty("ActiveConfiguration").toString() != testIdentifier);
-
-            if (userChoiceConfiguration.type() == QNetworkConfiguration::InternetAccessPoint) {
-                QVERIFY(userChoiceConfiguration == activeConfiguration);
-            } else {
-                QVERIFY(userChoiceConfiguration.type() == QNetworkConfiguration::ServiceNetwork);
-                QVERIFY(userChoiceConfiguration.children().contains(activeConfiguration));
-            }
-        } else {
-            QFAIL("Timeout waiting for session to open.");
-        }
-    }
-}
-
-void tst_QNetworkSession::sessionOpenCloseStop_data()
-{
-    QTest::addColumn<QNetworkConfiguration>("configuration");
-    QTest::addColumn<bool>("forceSessionStop");
-
-    foreach (const QNetworkConfiguration &config, manager.allConfigurations()) {
-        const QString name = config.name().isEmpty() ? QString("<Hidden>") : config.name();
-        QTest::newRow((name + QLatin1String(" close")).toLocal8Bit().constData())
-            << config << false;
-        QTest::newRow((name + QLatin1String(" stop")).toLocal8Bit().constData())
-            << config << true;
-    }
-}
-
-void tst_QNetworkSession::sessionOpenCloseStop()
-{
-    if (!testsToRun["sessionOpenCloseStop"]) {
-	QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);    
-    }
-    QFETCH(QNetworkConfiguration, configuration);
-    QFETCH(bool, forceSessionStop);
-
-    QNetworkSession session(configuration);
-
-    // Test initial state of the session.
-    {
-        QVERIFY(session.configuration() == configuration);
-        QVERIFY(!session.isOpen());
-        // session may be invalid if configuration is removed between when
-        // sessionOpenCloseStop_data() is called and here.
-        QVERIFY((configuration.isValid() && (session.state() != QNetworkSession::Invalid)) ||
-                (!configuration.isValid() && (session.state() == QNetworkSession::Invalid)));
-        QVERIFY(session.error() == QNetworkSession::UnknownSessionError);
-    }
-
-    // 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)));
-    QSignalSpy errorSpy(&session, SIGNAL(error(QNetworkSession::SessionError)));
-
-    // Test opening the session.
-    {
-        QNetworkSession::State previousState = session.state();
-        bool expectStateChange = previousState != QNetworkSession::Connected;
-
-        session.open();
-
-#if defined(Q_OS_SYMBIAN)
-        // Opening & closing multiple connections in a row sometimes
-        // results hanging of connection opening on Symbian devices
-        // => If first open fails, wait a moment and try again.
-        if (!session.waitForOpened()) {
-            qDebug("**** Session open Timeout - Wait 5 seconds and try once again ****");        
-            session.close();
-            QTest::qWait(5000); // Wait a while before trying to open session again
-            session.open();
-            session.waitForOpened();
-        }
-#else        
-        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<QNetworkSession::SessionError>(errorSpy.first().at(0));
-
-            QVERIFY(session.state() == previousState);
-
-            if (error == QNetworkSession::OperationNotSupportedError) {
-                // The session needed to bring up the interface,
-                // but the operation is not supported.
-                QSKIP("Configuration does not support open().", SkipSingle);
-            } else if (error == QNetworkSession::InvalidConfigurationError) {
-                // The session needed to bring up the interface, but it is not possible for the
-                // specified configuration.
-                if ((session.configuration().state() & QNetworkConfiguration::Discovered) ==
-                    QNetworkConfiguration::Discovered) {
-                    QFAIL("Failed to open session for Discovered configuration.");
-                } else {
-                    QSKIP("Cannot test session for non-Discovered configuration.", SkipSingle);
-                }
-            } else if (error == QNetworkSession::UnknownSessionError) {
-                    QSKIP("Unknown Session error.", SkipSingle);
-            } else {
-                QFAIL("Error opening session.");
-            }
-        } else if (!sessionOpenedSpy.isEmpty()) {
-            QCOMPARE(sessionOpenedSpy.count(), 1);
-            QVERIFY(sessionClosedSpy.isEmpty());
-            QVERIFY(errorSpy.isEmpty());
-
-            if (expectStateChange) {
-                QTRY_VERIFY(stateChangedSpy.count() >= 2);
-
-                QNetworkSession::State state =
-                    qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(0).at(0));
-                QVERIFY(state == QNetworkSession::Connecting);
-
-                state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(1).at(0));
-                QVERIFY(state == QNetworkSession::Connected);
-            }
-
-            QVERIFY(session.state() == QNetworkSession::Connected);
-#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
-            // On Symbian emulator, the support for data bearers is limited
-            QVERIFY(session.interface().isValid());
-#endif
-        } else {
-            QFAIL("Timeout waiting for session to open.");
-        }
-    }
-
-    sessionOpenedSpy.clear();
-    sessionClosedSpy.clear();
-    stateChangedSpy.clear();
-    errorSpy.clear();
-
-    QNetworkSession session2(configuration);
-
-    QSignalSpy sessionOpenedSpy2(&session2, SIGNAL(opened()));
-    QSignalSpy sessionClosedSpy2(&session2, SIGNAL(closed()));
-    QSignalSpy stateChangedSpy2(&session2, SIGNAL(stateChanged(QNetworkSession::State)));
-    QSignalSpy errorSpy2(&session2, SIGNAL(error(QNetworkSession::SessionError)));
-
-    // Test opening a second session.
-    {
-        QVERIFY(session2.configuration() == configuration);
-        QVERIFY(!session2.isOpen());
-        QVERIFY(session2.state() == QNetworkSession::Connected);
-        QVERIFY(session.error() == QNetworkSession::UnknownSessionError);
-
-        session2.open();
-	    
-        QTRY_VERIFY(!sessionOpenedSpy2.isEmpty() || !errorSpy2.isEmpty());
-
-        if (errorSpy2.isEmpty()) {
-            QVERIFY(session2.isOpen());
-            QVERIFY(session2.state() == QNetworkSession::Connected);
-        }
-        QVERIFY(session.isOpen());
-        QVERIFY(session.state() == QNetworkSession::Connected);
-#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
-        // On Symbian emulator, the support for data bearers is limited
-        QVERIFY(session.interface().isValid());
-#endif
-        if (errorSpy2.isEmpty()) {
-            QCOMPARE(session.interface().hardwareAddress(), session2.interface().hardwareAddress());
-            QCOMPARE(session.interface().index(), session2.interface().index());
-        }
-    }
-
-    sessionOpenedSpy2.clear();
-
-    if (forceSessionStop && session2.isOpen()) {
-        // Test forcing the second session to stop the interface.
-        QNetworkSession::State previousState = session.state();
-#ifdef Q_CC_NOKIAX86
-        // For S60 emulator builds: RConnection::Stop does not work on all Emulators
-        bool expectStateChange = false;
-#else
-        bool expectStateChange = previousState != QNetworkSession::Disconnected;
-#endif
-        session2.stop();
-
-        // QNetworkSession::stop() must result either closed() signal
-        // or error() signal
-        QTRY_VERIFY(!sessionClosedSpy2.isEmpty() || !errorSpy2.isEmpty());
-        QVERIFY(!session2.isOpen());
-
-        if (!errorSpy2.isEmpty()) {
-            // QNetworkSession::stop() resulted error() signal for session2
-            // => also session should emit error() signal
-            QTRY_VERIFY(!errorSpy.isEmpty());
-
-            // check for SessionAbortedError
-            QNetworkSession::SessionError error =
-                qvariant_cast<QNetworkSession::SessionError>(errorSpy.first().at(0));
-            QNetworkSession::SessionError error2 =
-                qvariant_cast<QNetworkSession::SessionError>(errorSpy2.first().at(0));
-
-            QVERIFY(error == QNetworkSession::SessionAbortedError);
-            QVERIFY(error2 == QNetworkSession::SessionAbortedError);
-
-            QCOMPARE(errorSpy.count(), 1);
-            QCOMPARE(errorSpy2.count(), 1);
-
-            errorSpy.clear();
-            errorSpy2.clear();
-        }
-
-        QVERIFY(errorSpy.isEmpty());
-        QVERIFY(errorSpy2.isEmpty());
-        
-        // Wait for Disconnected state 
-        QTRY_NOOP(session2.state() == QNetworkSession::Disconnected);
-	
-        if (expectStateChange)
-            QTRY_VERIFY(stateChangedSpy2.count() >= 1 || !errorSpy2.isEmpty());
-
-        if (!errorSpy2.isEmpty()) {
-            QVERIFY(session2.state() == previousState);
-            QVERIFY(session.state() == previousState);
-
-            QNetworkSession::SessionError error =
-                qvariant_cast<QNetworkSession::SessionError>(errorSpy2.first().at(0));
-            if (error == QNetworkSession::OperationNotSupportedError) {
-                // The session needed to bring down the interface,
-                // but the operation is not supported.
-                QSKIP("Configuration does not support stop().", SkipSingle);
-            } else if (error == QNetworkSession::InvalidConfigurationError) {
-                // The session needed to bring down the interface, but it is not possible for the
-                // specified configuration.
-                if ((session.configuration().state() & QNetworkConfiguration::Discovered) ==
-                    QNetworkConfiguration::Discovered) {
-                    QFAIL("Failed to stop session for Discovered configuration.");
-                } else {
-                    QSKIP("Cannot test session for non-Discovered configuration.", SkipSingle);
-                }
-            } else {
-                QFAIL("Error stopping session.");
-            }
-        } else if (!sessionClosedSpy2.isEmpty()) {
-            if (expectStateChange) {
-                if (configuration.type() == QNetworkConfiguration::ServiceNetwork) {
-                    bool roamedSuccessfully = false;
-
-                    QNetworkSession::State state;
-                    if (stateChangedSpy2.count() == 4) {
-                        state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(0).at(0));
-                        QVERIFY(state == QNetworkSession::Connecting);
-
-                        state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(1).at(0));
-                        QVERIFY(state == QNetworkSession::Connected);
-
-                        state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(2).at(0));
-                        QVERIFY(state == QNetworkSession::Closing);
-
-                        state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(3).at(0));
-                        QVERIFY(state == QNetworkSession::Disconnected);
-                    } else if (stateChangedSpy2.count() == 2) {
-                        state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(0).at(0));
-                        QVERIFY(state == QNetworkSession::Closing);
-
-                        state = qvariant_cast<QNetworkSession::State>(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 ||
-                                session.state() == QNetworkSession::Disconnected);
-                    
-                    QTRY_VERIFY(stateChangedSpy.count() > 0);
-                    state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 1).at(0));                    
-                    
-                    for (int i = 0; i < stateChangedSpy.count(); i++) {
-                        QNetworkSession::State state_temp =
-                                qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(i).at(0));
-                        // Extra debug because a fragile point in testcase because statuses vary.
-                        qDebug() << "------- Statechange spy at: " << i << " is " << state_temp;
-                    }
-
-                    if (state == QNetworkSession::Roaming) {
-                        QTRY_VERIFY(session.state() == QNetworkSession::Connected);
-                        QTRY_VERIFY(session2.state() == QNetworkSession::Connected);
-                        roamedSuccessfully = true;
-                    } else if (state == QNetworkSession::Closing) {
-                        QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected);
-                        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);
-                  	} else if (state == QNetworkSession::Connected) {
-                        QTRY_VERIFY(errorSpy.isEmpty());
-
-                        if (stateChangedSpy.count() > 1) {
-                            state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 2).at(0));                        
-                            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);
-                        QNetworkSession session3(config);
-                        QSignalSpy errorSpy3(&session3, SIGNAL(error(QNetworkSession::SessionError)));
-                        QSignalSpy sessionOpenedSpy3(&session3, SIGNAL(opened()));
-                        session3.open();
-                        session3.waitForOpened();
-                        QTest::qWait(1000); // Wait awhile to get all signals from platform
-                        if (session.isOpen())
-                            QVERIFY(!sessionOpenedSpy3.isEmpty() || !errorSpy3.isEmpty());
-                        session.stop();
-                        QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
-                    }
-#ifndef Q_CC_NOKIAX86
-                    if (!roamedSuccessfully)
-                        QVERIFY(!errorSpy.isEmpty());
-#endif
-                } else {
-                    QTest::qWait(2000); // Wait awhile to get all signals from platform
-        
-                    if (stateChangedSpy2.count() == 2)  {
-                        QNetworkSession::State state =
-                            qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(0).at(0));
-                        QVERIFY(state == QNetworkSession::Closing);
-                        state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(1).at(0));
-                        QVERIFY(state == QNetworkSession::Disconnected);
-                    } else {
-                        QVERIFY(stateChangedSpy2.count() >= 1);
-
-                        for (int i = 0; i < stateChangedSpy2.count(); i++) {
-                            QNetworkSession::State state_temp =
-                                    qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(i).at(0));
-                            // Extra debug because a fragile point in testcase.
-                            qDebug() << "+++++ Statechange spy at: " << i << " is " << state_temp;
-                        }
-
-                        QNetworkSession::State state =
-                                qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(stateChangedSpy2.count() - 1).at(0));
-                         // Symbian version dependant.
-                        QVERIFY(state == QNetworkSession::Disconnected);	
-                    }
-                }
-
-                QTRY_VERIFY(!sessionClosedSpy.isEmpty());
-                QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
-            }
-
-            QVERIFY(errorSpy2.isEmpty());
-
-            ++inProcessSessionManagementCount;
-        } else {
-            QFAIL("Timeout waiting for session to stop.");
-        }
-
-#ifndef Q_CC_NOKIAX86
-        QVERIFY(!sessionClosedSpy.isEmpty());
-#endif
-        QVERIFY(!sessionClosedSpy2.isEmpty());
-
-#ifndef Q_CC_NOKIAX86
-        QVERIFY(!session.isOpen());
-#endif
-        QVERIFY(!session2.isOpen());
-    } else if (session2.isOpen()) {
-        // Test closing the second session.
-        {
-            int stateChangedCountBeforeClose = stateChangedSpy2.count();
-            session2.close();
-
-            QTRY_VERIFY(!sessionClosedSpy2.isEmpty());
-#ifndef Q_CC_NOKIAX86        
-            QVERIFY(stateChangedSpy2.count() == stateChangedCountBeforeClose);
-#endif        
-
-            QVERIFY(sessionClosedSpy.isEmpty());
-
-            QVERIFY(session.isOpen());
-            QVERIFY(!session2.isOpen());
-            QVERIFY(session.state() == QNetworkSession::Connected);
-            QVERIFY(session2.state() == QNetworkSession::Connected);
-#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
-            // On Symbian emulator, the support for data bearers is limited
-            QVERIFY(session.interface().isValid());
-#endif
-            QCOMPARE(session.interface().hardwareAddress(), session2.interface().hardwareAddress());
-            QCOMPARE(session.interface().index(), session2.interface().index());
-        }
-
-        sessionClosedSpy2.clear();
-
-        // Test closing the first session.
-        {
-#ifdef Q_CC_NOKIAX86
-            // For S60 emulator builds: RConnection::Close does not actually
-            //                          close network connection on all Emulators
-            bool expectStateChange = false;
-#else
-            bool expectStateChange = session.state() != QNetworkSession::Disconnected &&
-                                     manager.capabilities() & QNetworkConfigurationManager::SystemSessionSupport;
-#endif
-
-            session.close();
-
-            QTRY_VERIFY(!sessionClosedSpy.isEmpty() || !errorSpy.isEmpty());
-
-            QVERIFY(!session.isOpen());
-
-            if (expectStateChange)
-                QTRY_VERIFY(!stateChangedSpy.isEmpty() || !errorSpy.isEmpty());
-
-            if (!errorSpy.isEmpty()) {
-                QNetworkSession::SessionError error =
-                    qvariant_cast<QNetworkSession::SessionError>(errorSpy.first().at(0));
-                if (error == QNetworkSession::OperationNotSupportedError) {
-                    // The session needed to bring down the interface,
-                    // but the operation is not supported.
-                    QSKIP("Configuration does not support close().", SkipSingle);
-                } else if (error == QNetworkSession::InvalidConfigurationError) {
-                    // The session needed to bring down the interface, but it is not possible for the
-                    // specified configuration.
-                    if ((session.configuration().state() & QNetworkConfiguration::Discovered) ==
-                        QNetworkConfiguration::Discovered) {
-                        QFAIL("Failed to close session for Discovered configuration.");
-                    } else {
-                        QSKIP("Cannot test session for non-Discovered configuration.", SkipSingle);
-                    }
-                } else {
-                    QFAIL("Error closing session.");
-                }
-            } else if (!sessionClosedSpy.isEmpty()) {
-                QVERIFY(sessionOpenedSpy.isEmpty());
-                QCOMPARE(sessionClosedSpy.count(), 1);
-                if (expectStateChange)
-                    QVERIFY(!stateChangedSpy.isEmpty());
-                QVERIFY(errorSpy.isEmpty());
-
-                if (expectStateChange)
-                    QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
-
-                ++inProcessSessionManagementCount;
-            } else {
-                QFAIL("Timeout waiting for session to close.");
-            }
-        }
-    }
-}
-
-QDebug operator<<(QDebug debug, const QList<QNetworkConfiguration> &list)
-{
-    debug.nospace() << "( ";
-    foreach (const QNetworkConfiguration &config, list)
-        debug.nospace() << config.identifier() << ", ";
-    debug.nospace() << ")\n";
-    return debug;
-}
-
-// Note: outOfProcessSession requires that at least one configuration is
-// at Discovered -state.
-void tst_QNetworkSession::outOfProcessSession()
-{
-    if (!testsToRun["outOfProcessSession"]) {
-	QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);    
-    }
-#if defined(Q_OS_SYMBIAN) && defined(__WINS__)
-    QSKIP("Symbian emulator does not support two [QR]PRocesses linking a dll (QtBearer.dll) with global writeable static data.", SkipAll);
-#endif
-	updateConfigurations();	   
-	QTest::qWait(2000);
-	
-    QNetworkConfigurationManager manager;
-    // Create a QNetworkConfigurationManager to detect configuration changes made in Lackey. This
-    // is actually the essence of this testcase - to check that platform mediates/reflects changes
-    // regardless of process boundaries. The interprocess communication is more like a way to get
-    // this test-case act correctly and timely.
-    QList<QNetworkConfiguration> before = manager.allConfigurations(QNetworkConfiguration::Active);
-    QSignalSpy spy(&manager, SIGNAL(configurationChanged(QNetworkConfiguration)));
-
-    // Cannot read/write to processes on WinCE or Symbian.
-    // Easiest alternative is to use sockets for IPC.
-    QLocalServer oopServer;
-    // First remove possible earlier listening address which would cause listen to fail 
-    // (e.g. previously abruptly ended unit test might cause this)
-    QLocalServer::removeServer("tst_qnetworksession");
-    oopServer.listen("tst_qnetworksession");
-
-    QProcess lackey;
-    lackey.start("qnetworksessionlackey");
-    QVERIFY(lackey.waitForStarted());
-
-
-    QVERIFY(oopServer.waitForNewConnection(-1));
-    QLocalSocket *oopSocket = oopServer.nextPendingConnection();
-
-    do {
-        QByteArray output;
-
-        if(oopSocket->waitForReadyRead()) {
-            output = oopSocket->readLine().trimmed();
-        }
-
-        if (output.startsWith("Started session ")) {
-            QString identifier = QString::fromLocal8Bit(output.mid(20).constData());
-            QNetworkConfiguration changed;
-
-            do {
-                QTRY_VERIFY(!spy.isEmpty());
-                changed = qvariant_cast<QNetworkConfiguration>(spy.takeFirst().at(0));
-            } while (changed.identifier() != identifier);
-
-            QVERIFY((changed.state() & QNetworkConfiguration::Active) ==
-                    QNetworkConfiguration::Active);
-
-            QVERIFY(!before.contains(changed));
-
-            QList<QNetworkConfiguration> after =
-                manager.allConfigurations(QNetworkConfiguration::Active);
-
-            QVERIFY(after.contains(changed));
-
-            spy.clear();
-
-            oopSocket->write("stop\n");
-            oopSocket->waitForBytesWritten();
-
-            do {
-                QTRY_VERIFY(!spy.isEmpty());
-
-                changed = qvariant_cast<QNetworkConfiguration>(spy.takeFirst().at(0));
-            } while (changed.identifier() != identifier);
-
-            QVERIFY((changed.state() & QNetworkConfiguration::Active) !=
-                    QNetworkConfiguration::Active);
-
-            QList<QNetworkConfiguration> afterStop =
-                    manager.allConfigurations(QNetworkConfiguration::Active);
-
-            QVERIFY(!afterStop.contains(changed));
-
-            oopSocket->disconnectFromServer();
-            oopSocket->waitForDisconnected(-1);
-
-            lackey.waitForFinished();
-        }
-    // This is effected by QTBUG-4903, process will always report as running
-    //} while (lackey.state() == QProcess::Running);
-
-    // Workaround: the socket in the lackey will disconnect on exit
-    } while (oopSocket->state() == QLocalSocket::ConnectedState);
-
-    switch (lackey.exitCode()) {
-    case 0:
-        qDebug("Lackey returned exit success (0)");
-        break;
-    case 1:
-        QSKIP("No discovered configurations found.", SkipAll);
-    case 2:
-        QSKIP("Lackey could not start session.", SkipAll);
-    default:
-        QSKIP("Lackey failed", SkipAll);
-    }
-}
-
-// A convinience / helper function for testcases. Return the first matching configuration.
-// Ignores configurations in other than 'discovered' -state. Returns invalid (QNetworkConfiguration())
-// if none found.
-QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfiguration::Type configType) {
-    
-    // Refresh configurations and derive configurations matching given parameters.
-    QNetworkConfigurationManager mgr;
-    QSignalSpy updateSpy(&mgr, SIGNAL(updateCompleted()));
-    
-    mgr.updateConfigurations();
-    QTRY_NOOP(updateSpy.count() == 1);
-    if (updateSpy.count() != 1) {
-        qDebug("tst_QNetworkSession::suitableConfiguration() failure: unable to update configurations");
-        return QNetworkConfiguration();
-    }
-    QList<QNetworkConfiguration> discoveredConfigs = mgr.allConfigurations(QNetworkConfiguration::Discovered);
-    foreach(QNetworkConfiguration config, discoveredConfigs) {
-        if ((config.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {        
-            discoveredConfigs.removeOne(config);
-        } else if (config.type() != configType) {
-            // qDebug() << "Dumping config because type (IAP/SNAP) mismatches: " << config.name();
-            discoveredConfigs.removeOne(config);
-        } else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) &&
-                    bearerType == "cellular") { // 'cellular' bearertype is for convinience
-            if (config.bearerName() != "2G" &&
-                config.bearerName() != "CDMA2000" &&
-                config.bearerName() != "WCDMA" &&
-                config.bearerName() != "HSPA") {
-                // qDebug() << "Dumping config because bearer mismatches (cellular): " << config.name();
-                discoveredConfigs.removeOne(config);
-            }
-        } else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) && 
-                    bearerType != config.bearerName()) {
-            // qDebug() << "Dumping config because bearer mismatches (WLAN): " << config.name();
-            discoveredConfigs.removeOne(config);
-        }
-    }
-    if (discoveredConfigs.isEmpty()) {
-        qDebug("tst_QNetworkSession::suitableConfiguration() failure: no suitable configurations present.");
-        return QNetworkConfiguration();
-    } else {
-        return discoveredConfigs.first();
-    }
-}
-
-// A convinience-function: updates configurations and waits that they are updated.
-void updateConfigurations() 
-{
-    QNetworkConfigurationManager mgr;
-    QSignalSpy updateSpy(&mgr, SIGNAL(updateCompleted()));
-    mgr.updateConfigurations();
-    QTRY_NOOP(updateSpy.count() == 1);
-}
-
-// A convinience-function: updates and prints all available confiurations and their states
-void printConfigurations()
-{
-    QNetworkConfigurationManager manager;
-    QList<QNetworkConfiguration> allConfigs =
-    manager.allConfigurations();
-    qDebug("tst_QNetworkSession::printConfigurations QNetworkConfigurationManager gives following configurations: ");
-    foreach(QNetworkConfiguration config, allConfigs) {
-        qDebug() << "Name of the configuration: " << config.name();
-        qDebug() << "State of the configuration: " << config.state();
-    }
-}
-
-// A convinience function for test-cases: opens the given configuration and return
-// true if it was done gracefully.
-bool openSession(QNetworkSession *session) {
-    bool result = true;
-    QNetworkConfigurationManager mgr;
-    QSignalSpy openedSpy(session, SIGNAL(opened()));
-    QSignalSpy stateChangeSpy(session, SIGNAL(stateChanged(QNetworkSession::State)));
-    QSignalSpy errorSpy(session, SIGNAL(error(QNetworkSession::SessionError)));
-    QSignalSpy configChangeSpy(&mgr, SIGNAL(configurationChanged(QNetworkConfiguration)));
-    // Store some initial statuses, because expected signals differ if the config is already
-    // active by some other session
-    QNetworkConfiguration::StateFlags configInitState = session->configuration().state();
-    QNetworkSession::State sessionInitState = session->state();
-    qDebug() << "tst_QNetworkSession::openSession() name of the configuration to be opened:  " << session->configuration().name();
-    qDebug() << "tst_QNetworkSession::openSession() state of the configuration to be opened:  " << session->configuration().state();
-    qDebug() << "tst_QNetworkSession::openSession() state of the session to be opened:  " << session->state();
-
-    if (session->isOpen() ||
-        !session->sessionProperty("ActiveConfiguration").toString().isEmpty()) {
-        qDebug("tst_QNetworkSession::openSession() failure: session was already open / active.");
-        result = false;
-    } else {
-        session->open();
-        session->waitForOpened(120000); // Bringing interfaces up and down may take time at platform
-    }
-    QTest::qWait(5000); // Wait a moment to ensure all signals are propagated
-    // Check that connection opening went by the book. Add checks here if more strictness needed.
-    if (!session->isOpen()) {
-        qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::open() failed.");
-        result =  false;
-    }
-    if (openedSpy.count() != 1) {
-        qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::opened() - signal not received.");
-        result =  false;
-    }
-    if (!errorSpy.isEmpty()) {
-        qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::error() - signal was detected.");
-        result = false;
-    }
-    if (sessionInitState != QNetworkSession::Connected && 
-        stateChangeSpy.isEmpty()) {
-        qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::stateChanged() - signals not detected.");
-        result =  false;
-    }
-    if (configInitState != QNetworkConfiguration::Active && 
-        configChangeSpy.isEmpty()) {
-        qDebug("tst_QNetworkSession::openSession() failure: QNetworkConfigurationManager::configurationChanged() - signals not detected.");
-        result =  false;
-    }
-    if (session->configuration().state() != QNetworkConfiguration::Active) {
-        qDebug("tst_QNetworkSession::openSession() failure: session's configuration is not in 'Active' -state.");
-	qDebug() << "tst_QNetworkSession::openSession() state is:  " << session->configuration().state();
-        result =  false;
-    }
-    if (result == false) {
-	    qDebug() << "tst_QNetworkSession::openSession() opening session failed.";
-    } else {
-	    qDebug() << "tst_QNetworkSession::openSession() opening session succeeded.";
-    }
-    qDebug() << "tst_QNetworkSession::openSession() name of the configuration is:  " << session->configuration().name();
-    qDebug() << "tst_QNetworkSession::openSession() configuration state is:  " << session->configuration().state();
-    qDebug() << "tst_QNetworkSession::openSession() session state is:  " << session->state();
-	    
-    return result;
-}
-
-// Helper function for closing opened session. Performs checks that 
-// session is closed gradefully (e.g. signals). Function does not delete
-// the session. The lastSessionOnConfiguration (true by default) is used to
-// tell if there are more sessions open, basing on same configration. This 
-// impacts the checks made.
-bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration) {
-    if (!session) {
-        qDebug("tst_QNetworkSession::closeSession() failure: NULL session given");
-        return false;
-    }
-    
-    qDebug() << "tst_QNetworkSession::closeSession() name of the configuration to be closed:  " << session->configuration().name();
-    qDebug() << "tst_QNetworkSession::closeSession() state of the configuration to be closed:  " << session->configuration().state();
-    qDebug() << "tst_QNetworkSession::closeSession() state of the session to be closed:  " << session->state();
-    
-    if (session->state() != QNetworkSession::Connected || 
-        !session->isOpen()) {
-        qDebug("tst_QNetworkSession::closeSession() failure: session is not opened.");
-        return false;
-    }    
-    QNetworkConfigurationManager mgr;
-    QSignalSpy sessionClosedSpy(session, SIGNAL(closed()));
-    QSignalSpy sessionStateChangedSpy(session, SIGNAL(stateChanged(QNetworkSession::State)));
-    QSignalSpy sessionErrorSpy(session, SIGNAL(error(QNetworkSession::SessionError)));
-    QSignalSpy configChangeSpy(&mgr, SIGNAL(configurationChanged(QNetworkConfiguration)));
-    
-    bool result = true;
-    session->close();
-    QTest::qWait(5000); // Wait a moment so that all signals are propagated
-    
-    if (!sessionErrorSpy.isEmpty()) {
-        qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::error() received.");
-        result = false;
-    }
-    if (sessionClosedSpy.count() != 1) {
-        qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::closed() signal not received.");
-        result = false;
-    }
-    if (lastSessionOnConfiguration && 
-        sessionStateChangedSpy.isEmpty()) {
-        qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::stateChanged() signals not received.");
-        result = false;
-    }
-    if (lastSessionOnConfiguration &&
-        session->state() != QNetworkSession::Disconnected) {
-        qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession is not in Disconnected -state");
-        result = false;
-    }
-    QTRY_NOOP(!configChangeSpy.isEmpty());
-    if (lastSessionOnConfiguration &&
-        configChangeSpy.isEmpty()) {
-        qDebug("tst_QNetworkSession::closeSession() failure: QNetworkConfigurationManager::configurationChanged() - signal not detected.");
-        result = false;
-    }
-    if (lastSessionOnConfiguration &&
-        session->configuration().state() == QNetworkConfiguration::Active) {
-         qDebug("tst_QNetworkSession::closeSession() failure: session's configuration is still in active state.");
-         result = false;
-    }
-    if (result == false) {
-	    qDebug() << "tst_QNetworkSession::closeSession() closing session failed.";
-    } else {
-	    qDebug() << "tst_QNetworkSession::closeSession() closing session succeeded.";
-    } 
-    qDebug() << "tst_QNetworkSession::closeSession() name of the configuration is:  " << session->configuration().name();
-    qDebug() << "tst_QNetworkSession::closeSession() configuration state is:  " << session->configuration().state();
-    qDebug() << "tst_QNetworkSession::closeSession() session state is:  " << session->state();
-    return result;
-}
-
-QTEST_MAIN(tst_QNetworkSession)
-
-#include "tst_qnetworksession.moc"
--- a/qtmobility/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-SOURCES  += tst_qnetworksession.cpp
-HEADERS  += ../../qbearertestcommon.h
-TARGET = tst_qnetworksession
-CONFIG += testcase
-
-QT = core network
-
-INCLUDEPATH += ../../../../src/bearer
-
-include(../../../../common.pri)
-CONFIG += mobility
-MOBILITY = bearer
-
-wince* {
-    LACKEY.sources = $$OUTPUT_DIR/build/tests/bin/qnetworksessionlackey.exe
-    LACKEY.path = .
-    DEPLOYMENT += LACKEY
-}
-
-symbian {
-    TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData PowerMgmt
-}
-
-maemo6|maemo5 {
-    CONFIG += link_pkgconfig
-
-    PKGCONFIG += conninet
-}
--- a/qtmobility/tests/bearerex/bearerex.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,585 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "bearerex.h"
-#include "datatransferer.h"
-
-#include <QtNetwork>
-
-Q_DECLARE_METATYPE(QNetworkConfiguration)
-
-BearerEx::BearerEx(QWidget* parent)
-     : QMainWindow(parent)
-{
-    setupUi(this);
-    
-    createMenus();
-    
-    connect(&m_NetworkConfigurationManager, SIGNAL(updateCompleted()), this, SLOT(configurationsUpdateCompleted()));
-    connect(&m_NetworkConfigurationManager, SIGNAL(configurationAdded(const QNetworkConfiguration&)),
-            this, SLOT(configurationAdded(const QNetworkConfiguration&)));
-    connect(&m_NetworkConfigurationManager, SIGNAL(configurationRemoved(const QNetworkConfiguration&)),
-            this, SLOT(configurationRemoved(const QNetworkConfiguration&)));
-    connect(&m_NetworkConfigurationManager, SIGNAL(onlineStateChanged(bool)),
-            this, SLOT(onlineStateChanged(bool)));
-    connect(&m_NetworkConfigurationManager, SIGNAL(configurationChanged(const QNetworkConfiguration&)),
-            this, SLOT(configurationChanged(const QNetworkConfiguration&)));
-    showConfigurations();
-}
-
-void BearerEx::createMenus()
-{
-    QAction* act1 = new QAction(tr("Show Details"), this);
-    menuBar()->addAction(act1);
-    connect(act1, SIGNAL(triggered()), this, SLOT(on_showDetailsButton_clicked()));
-
-    QAction* exitAct = new QAction(tr("Exit"), this);
-    menuBar()->addAction(exitAct);
-    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
-}
-
-void BearerEx::showConfigurations()
-{
-    listWidget->clear();
-    QListWidgetItem* listItem;
-    
-    QNetworkConfiguration defaultConfig = m_NetworkConfigurationManager.defaultConfiguration();
-    if (defaultConfig.type() == QNetworkConfiguration::UserChoice) {
-        listItem = new QListWidgetItem();
-        QFont font = listItem->font();
-        font.setBold(true);
-        font.setUnderline(true);
-        listItem->setFont(font);        
-        listItem->setText("       UserChoice");
-        listItem->setData(Qt::UserRole, qVariantFromValue(defaultConfig));
-        listWidget->addItem(listItem);
-    }
-    
-    QList<QNetworkConfiguration> configurations = m_NetworkConfigurationManager.allConfigurations();
-    for (int i=0; i<configurations.count(); i++)
-    {
-        listItem = new QListWidgetItem();
-        QString text;
-        if (configurations[i].type() == QNetworkConfiguration::InternetAccessPoint) {
-            text.append("(IAP,");
-        } else if (configurations[i].type() == QNetworkConfiguration::ServiceNetwork) {
-            text.append("(SNAP,");
-        }
-        
-        if ((configurations[i].state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
-            text.append("Act) ");
-        } else if ((configurations[i].state() & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
-            text.append("Disc) ");
-        } else {
-            text.append("Def) ");
-        }
-        text.append(configurations[i].name());
-        
-        if (defaultConfig.isValid() && defaultConfig == configurations[i]) {
-            QFont font = listItem->font();
-            font.setBold(true);
-            font.setUnderline(true);
-            listItem->setFont(font);        
-        }
-        listItem->setText(text);
-        listItem->setData(Qt::UserRole, qVariantFromValue(configurations[i]));
-        listWidget->addItem(listItem);
-    }
-}
-
-void BearerEx::on_updateConfigurationsButton_clicked()
-{
-    m_NetworkConfigurationManager.updateConfigurations();
-}
-
-void BearerEx::on_updateListButton_clicked()
-{
-    showConfigurations();
-}
-
-void BearerEx::on_showDetailsButton_clicked()
-{
-    QListWidgetItem* item = listWidget->currentItem();
-    if (!item) {
-        return;
-    }
-
-	QNetworkConfiguration networkConfiguration = qVariantValue<QNetworkConfiguration>(item->data(Qt::UserRole));
-	DetailedInfoDialog infoDialog(&networkConfiguration,this);
-	infoDialog.exec();
-}
-
-void BearerEx::on_createSessionButton_clicked()
-{
-    QListWidgetItem* item = listWidget->currentItem();
-    if (!item) {
-        return;
-    }    
-    QNetworkConfiguration networkConfiguration = qVariantValue<QNetworkConfiguration>(item->data(Qt::UserRole));
-    int newTabIndex = mainTabWidget->count();
-    SessionTab* newTab = new SessionTab(&networkConfiguration,&m_NetworkConfigurationManager,eventListWidget,newTabIndex-1);
-    QString label = QString("S")+QString::number(newTabIndex-1);
-    mainTabWidget->insertTab(newTabIndex,newTab,label);
-    mainTabWidget->setCurrentIndex(newTabIndex);
-}
-
-void BearerEx::on_clearEventListButton_clicked()
-{
-    eventListWidget->clear();
-}
-
-void BearerEx::configurationAdded(const QNetworkConfiguration& config)
-{
-    QListWidgetItem* listItem = new QListWidgetItem();
-    listItem->setText(QString("Added: ")+config.name());
-    eventListWidget->addItem(listItem);
-}
-
-void BearerEx::configurationRemoved(const QNetworkConfiguration& config)
-{
-    QListWidgetItem* listItem = new QListWidgetItem();
-    listItem->setText(QString("Removed: ")+config.name());
-    eventListWidget->addItem(listItem);
-}
-
-void BearerEx::onlineStateChanged(bool isOnline)
-{
-    QListWidgetItem* listItem = new QListWidgetItem();
-    QFont font = listItem->font();
-    font.setBold(true);
-    listItem->setFont(font);        
-    if (isOnline) {
-        listItem->setText(QString("> Online"));
-    } else {
-        listItem->setText(QString("< Offline"));
-    }
-    eventListWidget->addItem(listItem);
-}
-
-void BearerEx::configurationChanged(const QNetworkConfiguration & config)
-{
-    QListWidgetItem* listItem = new QListWidgetItem();
-    QString state;
-    switch (config.state())
-    {
-        case QNetworkConfiguration::Undefined:
-            state = "Undef : ";
-            break;
-        case QNetworkConfiguration::Defined:
-            state = "Def : ";
-            break;
-        case QNetworkConfiguration::Discovered:
-            state = "Disc : ";
-            break;
-        case QNetworkConfiguration::Active:
-            state = "Act : ";
-            break;
-    }
-    listItem->setText(state+config.name());
-    eventListWidget->addItem(listItem);
-}
-
-void BearerEx::configurationsUpdateCompleted()
-{
-    QMessageBox msgBox;
-    msgBox.setStandardButtons(QMessageBox::Close);
-    msgBox.setText("Configurations update completed.");
-    msgBox.exec();
-}
-
-DetailedInfoDialog::DetailedInfoDialog(QNetworkConfiguration* apNetworkConfiguration, QWidget * parent)
-    : QDialog(parent)
-{
-    setupUi(this);
-
-    tableWidget->setColumnCount(2);
-    int rowCount = 2;
-    
-    if (apNetworkConfiguration->type() == QNetworkConfiguration::ServiceNetwork) {
-        rowCount = rowCount + apNetworkConfiguration->children().count();
-    }
-
-	tableWidget->setRowCount(rowCount);
-	tableWidget->setColumnWidth(1,250);
-	tableWidget->setItem(0, 0, new QTableWidgetItem(tr("Name")));
-	tableWidget->setItem(0, 1, new QTableWidgetItem(apNetworkConfiguration->name()));
-	tableWidget->setItem(1, 0, new QTableWidgetItem(tr("Id")));
-	tableWidget->setItem(1, 1, new QTableWidgetItem(apNetworkConfiguration->identifier()));
-    if (apNetworkConfiguration->type() == QNetworkConfiguration::ServiceNetwork) {
-        for (int i=0; i<apNetworkConfiguration->children().count(); i++) {
-            tableWidget->setItem(i+2, 0, new QTableWidgetItem(QString("IAP")+QString::number(i+1)));
-            tableWidget->setItem(i+2, 1, new QTableWidgetItem(apNetworkConfiguration->children()[i].name()));
-        }
-    }
-    
-    tableWidget->setFocusPolicy(Qt::NoFocus);
-
-#ifdef Q_OS_SYMBIAN
-    this->showMaximized();
-#endif
-}
-
-SessionTab::SessionTab(QNetworkConfiguration* apNetworkConfiguration,
-                       QNetworkConfigurationManager* configManager,
-                       QListWidget* eventListWidget,
-                       int index,
-                       BearerEx * parent)
-    : QWidget(parent), m_dataTransferer(0), m_eventListWidget(eventListWidget),
-     m_index(index), m_alrEnabled (false)
-{
-    setupUi(this);
-
-    m_ConfigManager = configManager;
-    m_NetworkSession = new QNetworkSession(*apNetworkConfiguration);
-
-    // Update initial Session state to UI
-    newState(m_NetworkSession->state());
-
-    connect(m_NetworkSession, SIGNAL(newConfigurationActivated()), this, SLOT(newConfigurationActivated()));
-    connect(m_NetworkSession, SIGNAL(stateChanged(QNetworkSession::State)),
-            this, SLOT(stateChanged(QNetworkSession::State)));
-    connect(m_NetworkSession, SIGNAL(opened()), this, SLOT(opened()));
-    connect(m_NetworkSession, SIGNAL(closed()), this, SLOT(closed()));
-    connect(m_NetworkSession, SIGNAL(error(QNetworkSession::SessionError)), this, SLOT(error(QNetworkSession::SessionError)));
-    
-    if (apNetworkConfiguration->type() == QNetworkConfiguration::InternetAccessPoint) {
-        snapLabel->hide();
-        snapLineEdit->hide();
-        alrButton->hide();
-        iapLineEdit->setText(apNetworkConfiguration->name()+" ("+apNetworkConfiguration->identifier()+")");
-    } else if (apNetworkConfiguration->type() == QNetworkConfiguration::ServiceNetwork) {
-        snapLineEdit->setText(apNetworkConfiguration->name()+" ("+apNetworkConfiguration->identifier()+")");
-    }
-    bearerLineEdit->setText(apNetworkConfiguration->bearerName());
-    sentRecDataLineEdit->setText(QString::number(m_NetworkSession->bytesWritten())+
-                                 QString(" / ")+
-                                 QString::number(m_NetworkSession->bytesReceived()));
-    snapLineEdit->setFocusPolicy(Qt::NoFocus);
-    iapLineEdit->setFocusPolicy(Qt::NoFocus);
-    bearerLineEdit->setFocusPolicy(Qt::NoFocus);
-    sentRecDataLineEdit->setFocusPolicy(Qt::NoFocus);
-    stateLineEdit->setFocusPolicy(Qt::NoFocus);
-}
-
-SessionTab::~SessionTab()
-{
-    delete m_NetworkSession; m_NetworkSession = 0;
-    delete m_dataTransferer; m_dataTransferer = 0;
-}
-
-void SessionTab::on_createQNetworkAccessManagerButton_clicked()
-{
-    if (m_dataTransferer) {
-        disconnect(m_dataTransferer, 0, 0, 0);
-        delete m_dataTransferer;
-        m_dataTransferer = 0;
-    }
-    // Create new object according to current selection
-    QString type(comboBox->currentText());
-    if (type == "QNAM") {
-        m_dataTransferer = new DataTransfererQNam(this);
-    } else if (type == "QTcpSocket") {
-        m_dataTransferer = new DataTransfererQTcp(this);
-    } else if (type == "QHttp") {
-        m_dataTransferer = new DataTransfererQHttp(this);
-    } else {
-        qDebug("BearerEx Warning, unknown data transfer object requested, not creating anything.");
-        return;
-    }
-    createQNetworkAccessManagerButton->setText("Recreate");
-    connect(m_dataTransferer, SIGNAL(finished(quint32, qint64, QString)), this, SLOT(finished(quint32, qint64, QString)));
-}
-
-void SessionTab::on_sendRequestButton_clicked()
-{
-    if (m_dataTransferer) {
-        if (!m_dataTransferer->transferData()) {
-            QMessageBox msgBox;
-            msgBox.setStandardButtons(QMessageBox::Close);
-            msgBox.setText("Data transfer not started. \nVery likely data transfer ongoing.");
-            msgBox.exec();
-        }
-    } else {
-        QMessageBox msgBox;
-        msgBox.setStandardButtons(QMessageBox::Close);
-        msgBox.setText("Data object not created.\nCreate data object first.");
-        msgBox.exec();
-    }
-}
-
-void SessionTab::on_openSessionButton_clicked()
-{
-    m_NetworkSession->open();
-    if (m_NetworkSession->isOpen()) {
-        newState(m_NetworkSession->state()); 
-    }
-}
-
-void SessionTab::on_closeSessionButton_clicked()
-{
-    m_NetworkSession->close();
-    if (!m_NetworkSession->isOpen()) {
-        newState(m_NetworkSession->state()); 
-    }
-}
-
-void SessionTab::on_stopConnectionButton_clicked()
-{
-    m_NetworkSession->stop();
-}
-
-void SessionTab::on_alrButton_clicked()
-{
-    if (!m_alrEnabled) {
-        connect(m_NetworkSession, SIGNAL(preferredConfigurationChanged(const QNetworkConfiguration&, bool)),
-                this, SLOT(preferredConfigurationChanged(const QNetworkConfiguration&, bool)));
-        alrButton->setText("Disable ALR");
-        m_alrEnabled = true;
-    } else {
-        disconnect(m_NetworkSession, SIGNAL(preferredConfigurationChanged(const QNetworkConfiguration&, bool)), 0, 0);
-        alrButton->setText("Enable ALR");
-        m_alrEnabled = false;
-    }
-}
-
-void SessionTab::on_deleteSessionButton_clicked()
-{
-    setWindowTitle("Bearer Example");
-    delete this;
-}
-
-void SessionTab::newConfigurationActivated()
-{
-    QMessageBox msgBox;
-    msgBox.setText("New configuration activated.");
-    msgBox.setInformativeText("Do you want to accept new configuration?");
-    msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
-    msgBox.setDefaultButton(QMessageBox::Yes);
-    if (msgBox.exec() == QMessageBox::Yes) {
-        m_NetworkSession->accept();
-        iapLineEdit->setText(m_config.name()+" ("+m_config.identifier()+")");
-    } else {
-        m_NetworkSession->reject();
-    }
-}
-
-void SessionTab::preferredConfigurationChanged(const QNetworkConfiguration& config, bool /*isSeamless*/)
-{
-    m_config =  config;
-    QMessageBox msgBox;
-    msgBox.setText("Roaming to new configuration.");
-    msgBox.setInformativeText("Do you want to migrate to "+config.name()+"?");
-    msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
-    msgBox.setDefaultButton(QMessageBox::Yes);
-    if (msgBox.exec() == QMessageBox::Yes) {
-        m_NetworkSession->migrate();
-    } else {
-        m_NetworkSession->ignore();
-    }
-}
-
-void SessionTab::opened()
-{
-    QListWidgetItem* listItem = new QListWidgetItem();
-    QFont font = listItem->font();
-    font.setBold(true);
-    listItem->setFont(font);        
-    listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+QString("Opened"));
-    m_eventListWidget->addItem(listItem);
-    
-    QVariant identifier = m_NetworkSession->sessionProperty("ActiveConfiguration");
-    if (!identifier.isNull()) {
-        QString configId = identifier.toString();
-        QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
-        if (config.isValid()) {
-            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");
-        if (!identifier.isNull()) {
-            QString configId = identifier.toString();
-            QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
-            if (config.isValid() && (config.type() == QNetworkConfiguration::ServiceNetwork)) {
-                snapLineEdit->setText(config.name());
-            }
-        }
-    }
-}
-
-void SessionTab::closed()
-{
-    QListWidgetItem* listItem = new QListWidgetItem();
-    QFont font = listItem->font();
-    font.setBold(true);
-    listItem->setFont(font);        
-    listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+QString("Closed"));
-    m_eventListWidget->addItem(listItem);
-}
-
-QString SessionTab::stateString(QNetworkSession::State state)
-{
-    QString stateString;
-    switch (state)
-    {
-        case QNetworkSession::Invalid:
-            stateString = "Invalid";
-            break;
-        case QNetworkSession::NotAvailable:
-            stateString = "NotAvailable";
-            break;
-        case QNetworkSession::Connecting:
-            stateString = "Connecting";
-            break;
-        case QNetworkSession::Connected:
-            stateString = "Connected";
-            break;
-        case QNetworkSession::Closing:
-            stateString = "Closing";
-            break;
-        case QNetworkSession::Disconnected:
-            stateString = "Disconnected";
-            break;
-        case QNetworkSession::Roaming:
-            stateString = "Roaming";
-            break;
-    }
-    return stateString;
-}
-
-void SessionTab::on_dataObjectChanged(const QString &newObjectType)
-{
-    qDebug() << "BearerEx SessionTab dataObjectChanged to: " << newObjectType;
-    if (m_dataTransferer) {
-        disconnect(m_dataTransferer, 0, 0, 0);
-        delete m_dataTransferer; m_dataTransferer = 0;
-        qDebug() << "BearerEx SessionTab, previous data object deleted.";
-    }
-    createQNetworkAccessManagerButton->setText("Create");
-}
-
-
-void SessionTab::stateChanged(QNetworkSession::State state)    
-{
-    newState(state);
-    
-    QListWidgetItem* listItem = new QListWidgetItem();
-    listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+stateString(state));
-    m_eventListWidget->addItem(listItem);
-}
-
-void SessionTab::newState(QNetworkSession::State state)
-{
-    QVariant identifier = m_NetworkSession->sessionProperty("ActiveConfiguration");
-    if (state == QNetworkSession::Connected && !identifier.isNull()) {
-        QString configId = identifier.toString();
-        QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
-        if (config.isValid()) {
-            iapLineEdit->setText(config.name()+" ("+config.identifier()+")");
-            bearerLineEdit->setText(config.bearerName());
-        }
-    } else {
-        bearerLineEdit->setText(m_NetworkSession->configuration().bearerName());
-    }
-
-    QString active;
-    if (m_NetworkSession->isOpen()) {
-        active = " (open)";
-    }
-    stateLineEdit->setText(stateString(state)+active);
-}
-
-void SessionTab::error(QNetworkSession::SessionError error)
-{
-    QListWidgetItem* listItem = new QListWidgetItem();
-    QMessageBox msgBox;
-    msgBox.setStandardButtons(QMessageBox::Close);
-    
-    QString errorString;
-    switch (error)
-    {
-        case QNetworkSession::UnknownSessionError:
-            errorString = "UnknownSessionError";
-            break;
-        case QNetworkSession::SessionAbortedError:
-            errorString = "SessionAbortedError";
-            break;
-        case QNetworkSession::RoamingError:
-            errorString = "RoamingError";
-            break;
-        case QNetworkSession::OperationNotSupportedError:
-            errorString = "OperationNotSupportedError";
-            break;
-        case QNetworkSession::InvalidConfigurationError:
-            errorString = "InvalidConfigurationError";
-            break;
-    }
-    listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+errorString);
-    m_eventListWidget->addItem(listItem);
-    
-    msgBox.setText(errorString);
-    msgBox.exec();
-}
-
-void SessionTab::finished(quint32 errorCode, qint64 dataReceived, QString errorType)
-{
-    QMessageBox msgBox;
-    msgBox.setStandardButtons(QMessageBox::Close);
-    msgBox.setText(QString("Data transfer completed. \nError code: ") + QString::number((int)errorCode) +
-                   "\nError type: " + errorType +
-                   "\nBytes received: " +
-                   QString::number(dataReceived));
-    msgBox.exec();
-    // Check if the networksession still exists - it may have gone after returning from
-    // the modal dialog (in the case that app has been closed, and deleting QHttp will
-    // trigger the done() invokation).
-    if (m_NetworkSession) {
-        sentRecDataLineEdit->setText(QString::number(m_NetworkSession->bytesWritten())+
-                                     QString(" / ")+
-                                     QString::number(m_NetworkSession->bytesReceived()));
-    } else {
-        sentRecDataLineEdit->setText("Data amounts not available.");
-    }
-}
-
-// End of file
-
--- a/qtmobility/tests/bearerex/bearerex.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef ACCESSPOINTMANAGEREX_H
-#define ACCESSPOINTMANAGEREX_H
-
-#include <QtGui>
-
-#include "ui_detailedinfodialog.h"
-
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
-#include "ui_bearerex_maemo.h"
-#include "ui_sessiondialog_maemo.h"
-#else
-#include "ui_bearerex.h"
-#include "ui_sessiondialog.h"
-#endif
-#include "qnetworkconfigmanager.h"
-#include "qnetworksession.h"
-#include "datatransferer.h"
-#include "xqlistwidget.h"
-
-QT_BEGIN_NAMESPACE
-class QNetworkAccessManager;
-class QNetworkReply;
-QT_END_NAMESPACE
-
-class SessionTab;
-class DataTransferer;
-
-QTM_USE_NAMESPACE
-
-class BearerEx : public QMainWindow, public Ui::BearerExMainWindow
-{
-     Q_OBJECT
-
-public:
-    BearerEx(QWidget* parent = 0);
-    void createMenus();
-    void showConfigurations();
-
-private Q_SLOTS:
-    void on_updateConfigurationsButton_clicked();
-    void on_updateListButton_clicked();
-    void on_showDetailsButton_clicked();
-    void on_createSessionButton_clicked();
-    void on_clearEventListButton_clicked();
-
-    void configurationsUpdateCompleted();
-    void configurationAdded(const QNetworkConfiguration& config);
-    void configurationRemoved(const QNetworkConfiguration& config);
-    void onlineStateChanged(bool isOnline);
-    void configurationChanged(const QNetworkConfiguration & config);     
-
-private:
-    QNetworkConfigurationManager m_NetworkConfigurationManager;
-    QAction* m_openAction;
-};
-
-class DetailedInfoDialog : public QDialog, public Ui::DetailedInfoDialog
-{
-    Q_OBJECT
-
-public:
-    DetailedInfoDialog(QNetworkConfiguration* apNetworkConfiguration = 0, QWidget* parent = 0);
-};
-
-
-class SessionTab : public QWidget, public Ui::SessionTab
-{
-    Q_OBJECT
-
-public:
-    SessionTab(QNetworkConfiguration* apNetworkConfiguration = 0, QNetworkConfigurationManager* configManager = 0,
-               QListWidget* eventListWidget = 0,  int index = 0, BearerEx* parent = 0);
-    ~SessionTab();
-    
-    QString stateString(QNetworkSession::State state);    
-
-private Q_SLOTS:
-    void on_createQNetworkAccessManagerButton_clicked();
-    void on_sendRequestButton_clicked();
-    void on_openSessionButton_clicked();
-    void on_closeSessionButton_clicked();
-    void on_stopConnectionButton_clicked();
-    void on_deleteSessionButton_clicked();
-    void on_dataObjectChanged(const QString& newObjectType);
-    void on_alrButton_clicked();
-    void finished(quint32 errorCode, qint64 dataReceived, QString errorType);
-    
-    void newConfigurationActivated();
-    void preferredConfigurationChanged(const QNetworkConfiguration& config, bool isSeamless);
-    void stateChanged(QNetworkSession::State state);
-    void newState(QNetworkSession::State state);
-    void opened();
-    void closed();
-    void error(QNetworkSession::SessionError error);
-
-private: //data
-    // QNetworkAccessManager* m_networkAccessManager;
-    DataTransferer* m_dataTransferer;
-    QNetworkSession* m_NetworkSession;
-    QNetworkConfigurationManager* m_ConfigManager;
-    QListWidget* m_eventListWidget;
-    QNetworkConfiguration m_config;
-    int m_index;
-    bool m_dataTransferOngoing;
-    bool m_alrEnabled;
-};
-
-#endif // ACCESSPOINTMANAGEREX_H
-
-// End of file
-
--- a/qtmobility/tests/bearerex/bearerex.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-TEMPLATE = app
-TARGET = BearerEx
-
-QT += core \
-      gui \
-      network
-
-FORMS += detailedinfodialog.ui
-maemo5|maemo6 {
-    FORMS += sessiondialog_maemo.ui \
-        bearerex_maemo.ui
-} else {
-    FORMS += sessiondialog.ui \
-        bearerex.ui
-}
-
-include(../../common.pri)
-#not really a test case but deployment happens same way
-CONFIG += testcase
-
-DEPENDPATH += .
-INCLUDEPATH += . \
-               ../../src/bearer
-
-# Example headers and sources
-HEADERS += bearerex.h \
-           xqlistwidget.h \
-    datatransferer.h
-    
-SOURCES += bearerex.cpp \
-           main.cpp \
-           xqlistwidget.cpp \
-    datatransferer.cpp
-
-CONFIG += mobility
-MOBILITY = bearer
-symbian:TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData WriteDeviceData ReadDeviceData
--- a/qtmobility/tests/bearerex/bearerex.ui	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-<ui version="4.0" >
- <class>BearerExMainWindow</class>
- <widget class="QMainWindow" name="BearerExMainWindow" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>360</width>
-    <height>640</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Bearer Example</string>
-  </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QVBoxLayout" name="verticalLayout" >
-    <item>
-     <widget class="QTabWidget" name="mainTabWidget" >
-      <widget class="QWidget" name="tab" >
-       <attribute name="title" >
-        <string>Main</string>
-       </attribute>
-       <layout class="QVBoxLayout" name="verticalLayout_2" >
-        <item>
-         <widget class="QLabel" name="label" >
-          <property name="text" >
-           <string>Network Configurations</string>
-          </property>
-          <property name="alignment" >
-           <set>Qt::AlignCenter</set>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QListWidget" name="listWidget" />
-        </item>
-        <item>
-         <layout class="QGridLayout" name="gridLayout" >
-          <item row="0" column="0" >
-           <widget class="QPushButton" name="updateConfigurationsButton" >
-            <property name="text" >
-             <string>Update Configs</string>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="1" >
-           <widget class="QPushButton" name="updateListButton" >
-            <property name="text" >
-             <string>Update List</string>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="0" >
-           <widget class="QPushButton" name="createSessionButton" >
-            <property name="text" >
-             <string>Create Session</string>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="1" >
-           <widget class="QPushButton" name="showDetailsButton" >
-            <property name="text" >
-             <string>Show Details</string>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="tab_2" >
-       <attribute name="title" >
-        <string>Events</string>
-       </attribute>
-       <layout class="QVBoxLayout" name="verticalLayout_3" >
-        <item>
-         <widget class="QListWidget" name="eventListWidget" />
-        </item>
-        <item>
-         <widget class="QPushButton" name="clearEventListButton" >
-          <property name="text" >
-           <string>Clear</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </widget>
-    </item>
-   </layout>
-  </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
--- a/qtmobility/tests/bearerex/bearerex_maemo.ui	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>BearerExMainWindow</class>
- <widget class="QMainWindow" name="BearerExMainWindow">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>360</width>
-    <height>640</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Bearer Example</string>
-  </property>
-  <widget class="QWidget" name="centralwidget">
-   <layout class="QVBoxLayout" name="verticalLayout">
-    <item>
-     <widget class="QTabWidget" name="mainTabWidget">
-      <widget class="QWidget" name="tab">
-       <attribute name="title">
-        <string>Main</string>
-       </attribute>
-       <layout class="QHBoxLayout" name="horizontalLayout">
-        <item>
-         <layout class="QVBoxLayout" name="verticalLayout_2">
-          <item>
-           <widget class="QLabel" name="label">
-            <property name="text">
-             <string>Network Configurations</string>
-            </property>
-            <property name="alignment">
-             <set>Qt::AlignCenter</set>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="QListWidget" name="listWidget"/>
-          </item>
-         </layout>
-        </item>
-        <item>
-         <layout class="QGridLayout" name="gridLayout">
-          <item row="0" column="0">
-           <widget class="QPushButton" name="updateConfigurationsButton">
-            <property name="text">
-             <string>Update Configs</string>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="0">
-           <widget class="QPushButton" name="updateListButton">
-            <property name="text">
-             <string>Update List</string>
-            </property>
-           </widget>
-          </item>
-          <item row="2" column="0">
-           <widget class="QPushButton" name="createSessionButton">
-            <property name="text">
-             <string>Create Session</string>
-            </property>
-           </widget>
-          </item>
-          <item row="3" column="0">
-           <widget class="QPushButton" name="showDetailsButton">
-            <property name="text">
-             <string>Show Details</string>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="tab_2">
-       <attribute name="title">
-        <string>Events</string>
-       </attribute>
-       <layout class="QVBoxLayout" name="verticalLayout_3">
-        <item>
-         <widget class="QListWidget" name="eventListWidget"/>
-        </item>
-        <item>
-         <widget class="QPushButton" name="clearEventListButton">
-          <property name="text">
-           <string>Clear</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </widget>
-    </item>
-   </layout>
-  </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
--- a/qtmobility/tests/bearerex/datatransferer.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,179 +0,0 @@
-#include <QDebug>
-#include <QUrl>
-#include <QByteArray>
-#include <QDataStream>
-#include "datatransferer.h"
-
-DataTransferer::DataTransferer(QObject *parent) :
-    QObject(parent), m_dataTransferOngoing(false)
-{
-}
-
-bool DataTransferer::dataTransferOngoing()
-{
-    return m_dataTransferOngoing;
-}
-
-
-
-// -------- Based on QTcp
-
-DataTransfererQTcp::DataTransfererQTcp(QObject* parent) :
-      DataTransferer(parent)
-{
-    qDebug("BearerEx DataTransferer QTcp created.");
-
-    connect(&m_qsocket, SIGNAL(readyRead()), this, SLOT(readyRead()));
-    connect(&m_qsocket, SIGNAL(connected()), this, SLOT(connected()));
-    connect(&m_qsocket, SIGNAL(error(QAbstractSocket::SocketError)),
-            this, SLOT(error(QAbstractSocket::SocketError)));
-}
-
-DataTransfererQTcp::~DataTransfererQTcp()
-{
-    qDebug("BearerEx DataTransferer QTcp destroyed.");
-    m_qsocket.abort();
-}
-
-bool DataTransfererQTcp::transferData()
-{
-    if (m_dataTransferOngoing) {
-        return false;
-    }
-    qDebug("BearerEx datatransfer for QTcp requested.");
-    // Connect to host
-    QUrl url("http://www.google.com.au");
-    m_qsocket.connectToHost(url.host(), url.port(80));
-
-    // m_qsocket.connectToHost("http://www.google.com", 80);
-    // Wait for connected() signal.
-    m_dataTransferOngoing = true;
-    return true;
-}
-
-void DataTransfererQTcp::connected()
-{
-    qDebug("BearerEx DataTransfererQtcp connected, requesting data.");
-    // Establish HTTP request
-    //QByteArray request("GET / HTTP/1.1 \nHost: www.google.com\n\n");
-    QByteArray request("GET / HTTP/1.1\n\n");
-
-    // QByteArray request("GET /index.html HTTP/1.1 \n Host: www.google.com \n\n");
-    qint64 dataWritten = m_qsocket.write(request);
-    m_qsocket.flush();
-
-    qDebug() << "BearerEx DataTransferQTcp wrote " << dataWritten << " bytes";
-    // Start waiting for readyRead() of error()
-}
-
-void DataTransfererQTcp::readyRead()
-{
-    qDebug() << "BearerEx DataTransfererQTcp readyRead() with ";
-    qint64 bytesAvailable = m_qsocket.bytesAvailable();
-    qDebug() << bytesAvailable << " bytes available.";
-
-    // QDataStream in(&m_qsocket);
-    QByteArray array = m_qsocket.readAll();
-    QString data = QString::fromAscii(array);
-
-    // in >> data;
-
-    qDebug() << "BearerEx DataTransferQTcp data received: " << data;
-    m_dataTransferOngoing = false;
-    // m_qsocket.error() returns uninitialized value in case no error has occured,
-    // so emit '0'
-    emit finished(0, bytesAvailable, "QAbstractSocket::SocketError");
-}
-
-void DataTransfererQTcp::error(QAbstractSocket::SocketError socketError)
-{
-    qDebug("BearerEx DataTransfererQTcp error(), aborting socket.");
-    m_qsocket.abort();
-    m_dataTransferOngoing = false;
-    emit finished(socketError, 0, "QAbstractSocket::SocketError");
-}
-
-// -------- Based on QHttp
-
-DataTransfererQHttp::DataTransfererQHttp(QObject* parent) :
-      DataTransferer(parent)
-{
-    connect(&m_qhttp, SIGNAL(done(bool)), this, SLOT(done(bool)));
-    qDebug("BearerEx DataTransferer QHttp created.");
-}
-
-DataTransfererQHttp::~DataTransfererQHttp()
-{
-    qDebug("BearerEx DataTransferer QHttp destroyed.");
-}
-
-bool DataTransfererQHttp::transferData()
-{
-    qDebug("BearerEx datatransfer for QHttp requested.");
-    if (m_dataTransferOngoing) {
-        return false;
-    }
-    QString urlstring("http://www.google.com");
-    QUrl url(urlstring);
-    m_qhttp.setHost(url.host(), QHttp::ConnectionModeHttp, url.port() == -1 ? 0 : url.port());
-    m_qhttp.get(urlstring);
-    m_dataTransferOngoing = true;
-    return true;
-}
-
-void DataTransfererQHttp::done(bool /*error*/ )
-{
-    qDebug("BearerEx DatatransfererQHttp reply was finished (error code is type QHttp::Error).");
-    qint64 dataReceived = 0;
-    quint32 errorCode = m_qhttp.error();
-    if (m_qhttp.error() == QHttp::NoError) {
-        QString result(m_qhttp.readAll());
-        dataReceived = result.length();
-    }
-    m_dataTransferOngoing = false;
-    emit finished(errorCode, dataReceived, "QHttp::Error");
-}
-
-// -------- Based on QNetworkAccessManager
-
-DataTransfererQNam::DataTransfererQNam(QObject* parent) :
-      DataTransferer(parent)
-{
-    connect(&m_qnam, SIGNAL(finished(QNetworkReply*)),
-            this, SLOT(replyFinished(QNetworkReply*)));
-    qDebug("BearerEx DataTransferer QNam created.");
-}
-
-DataTransfererQNam::~DataTransfererQNam()
-{
-    qDebug("BearerEx DataTransferer QNam destroyed.");
-}
-
-bool DataTransfererQNam::transferData()
-{
-    qDebug("BearerEx datatransfer for QNam requested.");
-    if (m_dataTransferOngoing) {
-        return false;
-    }
-    m_qnam.get(QNetworkRequest(QUrl("http://www.google.com")));
-    m_dataTransferOngoing = true;
-    return true;
-}
-
-void DataTransfererQNam::replyFinished(QNetworkReply *reply)
-{
-    qDebug("BearerEx DatatransfererQNam reply was finished (error code is type QNetworkReply::NetworkError).");
-    qint64 dataReceived = 0;
-    quint32 errorCode = (quint32)reply->error();
-
-    if (reply->error() == QNetworkReply::NoError) {
-        QString result(reply->readAll());
-        dataReceived = result.length();
-    }
-    m_dataTransferOngoing = false;
-    emit finished(errorCode, dataReceived, "QNetworkReply::NetworkError");
-    reply->deleteLater();
-}
-
-
-
--- a/qtmobility/tests/bearerex/datatransferer.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-#ifndef DATATRANSFERER_H
-#define DATATRANSFERER_H
-
-#include <QObject>
-#include <QString>
-#include <QNetworkReply>
-#include <QNetworkAccessManager>
-#include <QTcpSocket>
-#include <QHttp>
-#include <QDebug>
-
-// Interface-class for data transferring object
-
-class DataTransferer : public QObject
-{
-    Q_OBJECT
-public:
-    explicit DataTransferer(QObject *parent = 0);
-    virtual ~DataTransferer() {
-        if (m_dataTransferOngoing) {
-            qDebug("BearerEx Warning: dataobjects transfer was ongoing when destroyed.");
-        }
-    }
-    virtual bool transferData() = 0;
-    bool dataTransferOngoing();
-
-signals:
-    void finished(quint32 errorCode, qint64 dataReceived, QString errorType);
-
-public slots:
-
-protected:
-    bool m_dataTransferOngoing;
-};
-
-
-// Specializations/concrete classes
-
-class DataTransfererQTcp : public DataTransferer
-{
-    Q_OBJECT
-public:
-    DataTransfererQTcp(QObject* parent = 0);
-    ~DataTransfererQTcp();
-
-    virtual bool transferData();
-
-public slots:
-    void readyRead();
-    void error(QAbstractSocket::SocketError socketError);
-    void connected();
-
-private:
-    QTcpSocket m_qsocket;
-};
-
-class DataTransfererQNam : public DataTransferer
-{
-    Q_OBJECT
-public:
-    DataTransfererQNam(QObject* parent = 0);
-    ~DataTransfererQNam();
-
-    virtual bool transferData();
-
-public slots:
-    void replyFinished(QNetworkReply* reply);
-
-private:
-    QNetworkAccessManager m_qnam;
-};
-
-class DataTransfererQHttp : public DataTransferer
-{
-    Q_OBJECT
-public:
-    DataTransfererQHttp(QObject* parent = 0);
-    ~DataTransfererQHttp();
-
-    virtual bool transferData();
-
-public slots:
-    void done(bool error);
-
-private:
-    QHttp m_qhttp;
-};
-
-#endif // DATATRANSFERER_H
--- a/qtmobility/tests/bearerex/detailedinfodialog.ui	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-<ui version="4.0" >
- <class>DetailedInfoDialog</class>
- <widget class="QDialog" name="DetailedInfoDialog" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>308</width>
-    <height>396</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Bearer Example</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout" >
-   <item>
-    <widget class="QLabel" name="label" >
-     <property name="text" >
-      <string>Detailed information</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QTableWidget" name="tableWidget" />
-   </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>DetailedInfoDialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>205</x>
-     <y>371</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>223</x>
-     <y>8</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
--- a/qtmobility/tests/bearerex/main.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <QApplication>
-
-#include "bearerex.h"
-
-int main(int argc, char* argv[])
-{
-    QApplication app(argc, argv);
-    BearerEx bearerEx;
-#ifdef Q_OS_SYMBIAN
-    bearerEx.showMaximized();
-#else
-    bearerEx.show();
-#endif
-    return app.exec();
-}
-
-// End of file
-
--- a/qtmobility/tests/bearerex/sessiondialog.ui	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>SessionTab</class>
- <widget class="QWidget" name="SessionTab">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>192</width>
-    <height>262</height>
-   </rect>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <layout class="QFormLayout" name="formLayout">
-     <item row="0" column="0">
-      <widget class="QLabel" name="snapLabel">
-       <property name="text">
-        <string>SNAP</string>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="1">
-      <widget class="QLineEdit" name="snapLineEdit">
-       <property name="readOnly">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="0">
-      <widget class="QLabel" name="iapLabel">
-       <property name="text">
-        <string>IAP</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="1">
-      <widget class="QLineEdit" name="iapLineEdit">
-       <property name="enabled">
-        <bool>true</bool>
-       </property>
-       <property name="readOnly">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="0">
-      <widget class="QLabel" name="bearerLabel">
-       <property name="text">
-        <string>Bearer</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1">
-      <widget class="QLineEdit" name="bearerLineEdit">
-       <property name="readOnly">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="0">
-      <widget class="QLabel" name="sentRecDataLabel">
-       <property name="text">
-        <string>Sent/Rec.</string>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="1">
-      <widget class="QLineEdit" name="sentRecDataLineEdit">
-       <property name="readOnly">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="0">
-      <widget class="QLabel" name="stateLabel">
-       <property name="text">
-        <string>State</string>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="1">
-      <widget class="QLineEdit" name="stateLineEdit">
-       <property name="readOnly">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QGridLayout" name="gridLayout">
-     <item row="0" column="0">
-      <widget class="QPushButton" name="openSessionButton">
-       <property name="text">
-        <string>Open Session</string>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="1">
-      <widget class="QPushButton" name="closeSessionButton">
-       <property name="text">
-        <string>Close Session</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="0">
-      <widget class="QPushButton" name="stopConnectionButton">
-       <property name="text">
-        <string>Stop Conn.</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="1">
-      <widget class="QPushButton" name="alrButton">
-       <property name="text">
-        <string>Enable ALR</string>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="0">
-      <widget class="QPushButton" name="sendRequestButton">
-       <property name="text">
-        <string>Send Test Req.</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1">
-      <widget class="QPushButton" name="createQNetworkAccessManagerButton">
-       <property name="text">
-        <string>Create</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="0">
-      <widget class="QComboBox" name="comboBox">
-       <item>
-        <property name="text">
-         <string>QNAM</string>
-        </property>
-       </item>
-       <item>
-        <property name="text">
-         <string>QTcpSocket</string>
-        </property>
-       </item>
-       <item>
-        <property name="text">
-         <string>QHttp</string>
-        </property>
-       </item>
-      </widget>
-     </item>
-     <item row="3" column="1">
-      <widget class="QPushButton" name="deleteSessionButton">
-       <property name="text">
-        <string>Delete Session</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>comboBox</sender>
-   <signal>currentIndexChanged(QString)</signal>
-   <receiver>SessionTab</receiver>
-   <slot>on_dataObjectChanged(QString)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>40</x>
-     <y>211</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>10</x>
-     <y>258</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
- <slots>
-  <slot>on_dataObjectChanged(QString)</slot>
- </slots>
-</ui>
--- a/qtmobility/tests/bearerex/sessiondialog_maemo.ui	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>SessionTab</class>
- <widget class="QWidget" name="SessionTab">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>423</width>
-    <height>214</height>
-   </rect>
-  </property>
-  <layout class="QHBoxLayout" name="horizontalLayout">
-   <item>
-    <layout class="QFormLayout" name="formLayout">
-     <property name="fieldGrowthPolicy">
-      <enum>QFormLayout::ExpandingFieldsGrow</enum>
-     </property>
-     <item row="0" column="0">
-      <widget class="QLabel" name="snapLabel">
-       <property name="text">
-        <string>SNAP</string>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="1">
-      <widget class="QLineEdit" name="snapLineEdit">
-       <property name="readOnly">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="0">
-      <widget class="QLabel" name="iapLabel">
-       <property name="text">
-        <string>IAP</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="1">
-      <widget class="QLineEdit" name="iapLineEdit">
-       <property name="enabled">
-        <bool>true</bool>
-       </property>
-       <property name="readOnly">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="0">
-      <widget class="QLabel" name="bearerLabel">
-       <property name="text">
-        <string>Bearer</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1">
-      <widget class="QLineEdit" name="bearerLineEdit">
-       <property name="readOnly">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="0">
-      <widget class="QLabel" name="sentRecDataLabel">
-       <property name="text">
-        <string>Sent/Rec.</string>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="1">
-      <widget class="QLineEdit" name="sentRecDataLineEdit">
-       <property name="readOnly">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="0">
-      <widget class="QLabel" name="stateLabel">
-       <property name="text">
-        <string>State</string>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="1">
-      <widget class="QLineEdit" name="stateLineEdit">
-       <property name="readOnly">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QGridLayout" name="gridLayout">
-     <item row="0" column="0">
-      <widget class="QPushButton" name="openSessionButton">
-       <property name="text">
-        <string>Open Session</string>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="1">
-      <widget class="QPushButton" name="closeSessionButton">
-       <property name="text">
-        <string>Close Session</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="0">
-      <widget class="QPushButton" name="stopConnectionButton">
-       <property name="text">
-        <string>Stop Conn.</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="1">
-      <widget class="QPushButton" name="sendRequestButton">
-       <property name="text">
-        <string>Send Test Req.</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="0">
-      <widget class="QPushButton" name="createQHttpButton">
-       <property name="text">
-        <string>Create QHttp</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1">
-      <widget class="QPushButton" name="deleteSessionButton">
-       <property name="text">
-        <string>Delete Session</string>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="0">
-      <widget class="QPushButton" name="alrButton">
-       <property name="text">
-        <string>Enable ALR</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
--- a/qtmobility/tests/bearerex/xqlistwidget.cpp	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "xqlistwidget.h"
-
-XQListWidget::XQListWidget(QWidget* parent) : QListWidget(parent)
-{    
-}
-
-void XQListWidget::keyPressEvent(QKeyEvent* event)
-{
-    switch (event->key())
-    {
-        case Qt::Key_Left:
-        {
-            focusPreviousChild();
-            break;
-        }
-        case Qt::Key_Right:
-        {
-            focusNextChild();
-            break;
-        }
-        default: 
-        {
-            QListWidget::keyPressEvent(event);
-        }
-    }
-}
--- a/qtmobility/tests/bearerex/xqlistwidget.h	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef XQLISTWIDGET_H
-#define XQLISTWIDGET_H
-
-#include <QListWidget>
-#include <QKeyEvent>
-
-class XQListWidget: public QListWidget
-{
-public:
-    XQListWidget(QWidget* parent = 0);  
-    
-protected:
-    void keyPressEvent(QKeyEvent* event);
-};
-
-#endif // XQLISTWIDGET_H
-
-
--- a/qtmobility/tests/s60installs/qtmobilitytests.iby	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License as published by
-* the Free Software Foundation, version 2.1 of the License.
-* 
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public License
-* along with this program.  If not, 
-* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
-*
-* Description: 
-*
-*/
-
-#ifndef __QT_MOBILITYTESTS_IBY__
-#define __QT_MOBILITYTESTS_IBY__
-
-#include <bldvariant.hrh>
-
-#define UPGRADABLE_APP_REG_RSC(NAME) data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\ ## NAME ## _reg.rsc        Private\10003a3f\import\apps\ ## NAME ## _reg.rsc
-
-S60_APP_EXE(bearerex)
-S60_APP_RESOURCE(bearerex)
-UPGRADABLE_APP_REG_RSC(bearerex)
-
-#endif //__QT_MOBILITYTESTS_IBY__
--- a/qtmobility/tests/s60installs/s60installs.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-!symbian:error(This test is for Symbian packaging purposes only.)
-
-TEMPLATE = subdirs
-
-include(../../staticconfig.pri)
-
-#BLD_INF_RULES.prj_exports += "./qtmobilitytests.iby $$CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(qtmobilitytests.iby)"
--- a/qtmobility/tests/tests.pro	Thu Aug 19 10:43:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-include(../staticconfig.pri)
-
-TEMPLATE = subdirs
-SUBDIRS += auto
-
-contains(mobility_modules,bearer) {
-    symbian:SUBDIRS += bearerex
-}
-
-symbian {
-    SUBDIRS += s60installs
-}