Revision: 201025
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 15:29:22 +0300
changeset 46 2fbd1d709fe7
parent 45 d9ec2b8c6bad
child 47 b3d8f88532b7
child 50 d4198dcb9983
Revision: 201025 Kit: 2010127
hotspotfw/group/bld.inf
hotspotfw/hsbrowser/data/hsbrowser.rss
hotspotfw/hsbrowser/data/hsbrowser_reg.rss
hotspotfw/hsbrowser/group/bld.inf
hotspotfw/hsbrowser/group/hsbrowser.mmp
hotspotfw/hsbrowser/inc/am_debug.h
hotspotfw/hsbrowser/inc/am_debug.inl
hotspotfw/hsbrowser/inc/hsbrowserapp.h
hotspotfw/hsbrowser/inc/hsbrowserappui.h
hotspotfw/hsbrowser/inc/hsbrowsercommon.h
hotspotfw/hsbrowser/inc/hsbrowsercontainer.h
hotspotfw/hsbrowser/inc/hsbrowsercontainer.inl
hotspotfw/hsbrowser/inc/hsbrowserdocument.h
hotspotfw/hsbrowser/inc/hsbrowserdocument.inl
hotspotfw/hsbrowser/inc/hsbrowserhssrvnotifs.h
hotspotfw/hsbrowser/inc/hsbrowserictsobserver.h
hotspotfw/hsbrowser/inc/hsbrowserloadeventobserver.h
hotspotfw/hsbrowser/inc/hsbrowsermodel.h
hotspotfw/hsbrowser/inc/hsbrowsermodel.inl
hotspotfw/hsbrowser/inc/hsbrowserspecialloadobserver.h
hotspotfw/hsbrowser/loc/hsbrowser.loc
hotspotfw/hsbrowser/src/hsbrowserapp.cpp
hotspotfw/hsbrowser/src/hsbrowserappui.cpp
hotspotfw/hsbrowser/src/hsbrowsercontainer.cpp
hotspotfw/hsbrowser/src/hsbrowserdocument.cpp
hotspotfw/hsbrowser/src/hsbrowserhssrvnotifs.cpp
hotspotfw/hsbrowser/src/hsbrowserictsobserver.cpp
hotspotfw/hsbrowser/src/hsbrowserloadeventobserver.cpp
hotspotfw/hsbrowser/src/hsbrowsermodel.cpp
hotspotfw/hsbrowser/src/hsbrowserspecialloadobserver.cpp
hotspotfw/hsclient/src/hssiaphandler.cpp
hotspotfw/hsserver/group/hotspotserver.mmp
hotspotfw/hsserver/inc/hotspotclientserver.h
hotspotfw/hsserver/inc/hotspotserver.h
hotspotfw/hsserver/inc/hotspotsession.h
hotspotfw/hsserver/inc/hssiapsettingshandler.h
hotspotfw/hsserver/src/hotspotserver.cpp
hotspotfw/hsserver/src/hotspotsession.cpp
hotspotfw/hsserver/src/hssiapsettingshandler.cpp
hotspotfw/rom/hotspot.iby
hotspotfw/rom/hotspotResources.iby
layers.sysdef.xml
wirelessacc.pro
wlanutilities/cpwlansettingsplugin/src/cpwlansettingsgroupitemdata.cpp
wlanutilities/eapwizard/bwins/eapwizardu.def
wlanutilities/eapwizard/eabi/eapwizardu.def
wlanutilities/eapwizard/eapwizard.pro
wlanutilities/eapwizard/inc/eapwizard.h
wlanutilities/eapwizard/inc/eapwizard_p.h
wlanutilities/eapwizard/inc/eapwizardpage.h
wlanutilities/eapwizard/inc/eapwizardpagecertca.h
wlanutilities/eapwizard/inc/eapwizardpagecertuser.h
wlanutilities/eapwizard/inc/eapwizardpageidentity.h
wlanutilities/eapwizard/inc/eapwizardpageinnertype.h
wlanutilities/eapwizard/inc/eapwizardpagenewpacstore.h
wlanutilities/eapwizard/inc/eapwizardpageoutertype.h
wlanutilities/eapwizard/inc/eapwizardpagepacstorepasswordconfirm.h
wlanutilities/eapwizard/inc/eapwizardpageusernamepassword.h
wlanutilities/eapwizard/inc/eapwizarduistrings.h
wlanutilities/eapwizard/resources/eapwizard_resource.qrc
wlanutilities/eapwizard/resources/occ_eap_wizard_01_02_04.docml
wlanutilities/eapwizard/resources/occ_eap_wizard_03.docml
wlanutilities/eapwizard/resources/occ_eap_wizard_05_07.docml
wlanutilities/eapwizard/resources/occ_eap_wizard_06.docml
wlanutilities/eapwizard/resources/occ_eap_wizard_08.docml
wlanutilities/eapwizard/rom/eapwizard.iby
wlanutilities/eapwizard/rom/eapwizard_resources.iby
wlanutilities/eapwizard/src/eapwizard.cpp
wlanutilities/eapwizard/src/eapwizard_p.cpp
wlanutilities/eapwizard/src/eapwizardpage.cpp
wlanutilities/eapwizard/src/eapwizardpagecertca.cpp
wlanutilities/eapwizard/src/eapwizardpagecertuser.cpp
wlanutilities/eapwizard/src/eapwizardpageidentity.cpp
wlanutilities/eapwizard/src/eapwizardpageinnertype.cpp
wlanutilities/eapwizard/src/eapwizardpagenewpacstore.cpp
wlanutilities/eapwizard/src/eapwizardpageoutertype.cpp
wlanutilities/eapwizard/src/eapwizardpagepacstorepasswordconfirm.cpp
wlanutilities/eapwizard/src/eapwizardpageusernamepassword.cpp
wlanutilities/eapwizard/traces/OstTraceDefinitions.h
wlanutilities/eapwizard/traces/trace.properties
wlanutilities/testwizard/inc/FirstView.h
wlanutilities/testwizard/inc/MyAppEngine.h
wlanutilities/testwizard/inc/MyAppMainWindow.h
wlanutilities/testwizard/inc/MyApplication.h
wlanutilities/testwizard/resources/mainview.docml
wlanutilities/testwizard/resources/resource.qrc
wlanutilities/testwizard/rom/testwizard.iby
wlanutilities/testwizard/src/FirstView.cpp
wlanutilities/testwizard/src/MyAppEngine.cpp
wlanutilities/testwizard/src/MyAppMainWindow.cpp
wlanutilities/testwizard/src/MyApplication.cpp
wlanutilities/testwizard/src/main.cpp
wlanutilities/testwizard/testwizard.pro
wlanutilities/wlanindicatorplugin/inc/wlanindicatorplugin.h
wlanutilities/wlanindicatorplugin/src/wlanindicatorplugin.cpp
wlanutilities/wlanlogin/ictsqtwrapper/bwins/ictsqtwrapperu.def
wlanutilities/wlanlogin/ictsqtwrapper/eabi/ictsqtwrapperu.def
wlanutilities/wlanlogin/ictsqtwrapper/ictsqtwrapper.pro
wlanutilities/wlanlogin/ictsqtwrapper/inc/ictsqtwrapper.h
wlanutilities/wlanlogin/ictsqtwrapper/inc/ictsqtwrapper_symbian.h
wlanutilities/wlanlogin/ictsqtwrapper/rom/ictsqtwrapper.iby
wlanutilities/wlanlogin/ictsqtwrapper/src/ictsqtwrapper.cpp
wlanutilities/wlanlogin/ictsqtwrapper/src/ictsqtwrapper_symbian.cpp
wlanutilities/wlanlogin/ictsqtwrapper/traces/OstTraceDefinitions.h
wlanutilities/wlanlogin/ictswlanlogininterface/bwins/ictswlanlogininterfaceu.def
wlanutilities/wlanlogin/ictswlanlogininterface/eabi/ictswlanlogininterfaceu.def
wlanutilities/wlanlogin/ictswlanlogininterface/ictswlanlogininterface.pro
wlanutilities/wlanlogin/ictswlanlogininterface/inc/ictswlanlogininterface.h
wlanutilities/wlanlogin/ictswlanlogininterface/rom/ictswlanlogininterface.iby
wlanutilities/wlanlogin/ictswlanlogininterface/src/ictswlanlogininterface.cpp
wlanutilities/wlanlogin/ictswlanlogininterface/traces/OstTraceDefinitions.h
wlanutilities/wlanlogin/wlanlogin.pro
wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginapplication.h
wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginengine.h
wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginmainwindow.h
wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginnetworkaccessmanager.h
wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginservice.h
wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginview.h
wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginwebpage.h
wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginwebview.h
wlanutilities/wlanlogin/wlanloginapp/res/service_conf.xml
wlanutilities/wlanlogin/wlanloginapp/rom/wlanlogin.iby
wlanutilities/wlanlogin/wlanloginapp/rom/wlanlogin_resources.iby
wlanutilities/wlanlogin/wlanloginapp/src/main.cpp
wlanutilities/wlanlogin/wlanloginapp/src/wlanloginapplication.cpp
wlanutilities/wlanlogin/wlanloginapp/src/wlanloginengine.cpp
wlanutilities/wlanlogin/wlanloginapp/src/wlanloginmainwindow.cpp
wlanutilities/wlanlogin/wlanloginapp/src/wlanloginnetworkaccessmanager.cpp
wlanutilities/wlanlogin/wlanloginapp/src/wlanloginservice.cpp
wlanutilities/wlanlogin/wlanloginapp/src/wlanloginview.cpp
wlanutilities/wlanlogin/wlanloginapp/src/wlanloginwebpage.cpp
wlanutilities/wlanlogin/wlanloginapp/src/wlanloginwebview.cpp
wlanutilities/wlanlogin/wlanloginapp/traces/OstTraceDefinitions.h
wlanutilities/wlanlogin/wlanloginapp/wlanloginapp.pro
wlanutilities/wlanqtutilities/base/inc/wlanqtutils.h
wlanutilities/wlanqtutilities/base/inc/wlanqtutils_p.h
wlanutilities/wlanqtutilities/base/inc/wlanqtutilsap.h
wlanutilities/wlanqtutilities/base/inc/wlanqtutilsiap.h
wlanutilities/wlanqtutilities/base/inc/wlanqtutilsiapsettings.h
wlanutilities/wlanqtutilities/base/src/wlanqtutils.cpp
wlanutilities/wlanqtutilities/base/src/wlanqtutils_p.cpp
wlanutilities/wlanqtutilities/base/src/wlanqtutilsap.cpp
wlanutilities/wlanqtutilities/base/src/wlanqtutilsiapsettings.cpp
wlanutilities/wlanqtutilities/bwins/wlanqtutilitiesu.def
wlanutilities/wlanqtutilities/eabi/wlanqtutilitiesu.def
wlanutilities/wlanqtutilities/rom/wlanqtutilities.iby
wlanutilities/wlanqtutilities/stubs/stub_connmon.cpp
wlanutilities/wlanqtutilities/stubs/stub_esock.cpp
wlanutilities/wlanqtutilities/stubs/stub_wlanmgmtclient.cpp
wlanutilities/wlanqtutilities/stubs/stub_wlanscaninfo.cpp
wlanutilities/wlanqtutilities/stubs/stubs.pri
wlanutilities/wlanqtutilities/stubs/wlanmgmtclient.h
wlanutilities/wlanqtutilities/stubs/wlanscaninfo.h
wlanutilities/wlanqtutilities/traces/trace.properties
wlanutilities/wlanqtutilities/tsrc/context/wlanqtutilstestcontext.cpp
wlanutilities/wlanqtutilities/tsrc/context/wlanqtutilstestcontext.h
wlanutilities/wlanqtutilities/tsrc/stubs/stub_connmon.cpp
wlanutilities/wlanqtutilities/tsrc/stubs/stub_esock.cpp
wlanutilities/wlanqtutilities/tsrc/stubs/stub_wlanmgmtclient.cpp
wlanutilities/wlanqtutilities/tsrc/stubs/stub_wlanscaninfo.cpp
wlanutilities/wlanqtutilities/tsrc/stubs/wlanmgmtclient.h
wlanutilities/wlanqtutilities/tsrc/stubs/wlanqtutilsconnmonstub.cpp
wlanutilities/wlanqtutilities/tsrc/stubs/wlanqtutilsconnteststub.cpp
wlanutilities/wlanqtutilities/tsrc/stubs/wlanqtutilsesockstub.cpp
wlanutilities/wlanqtutilities/tsrc/stubs/wlanscaninfo.h
wlanutilities/wlanqtutilities/tsrc/testwlanqtutils.cpp
wlanutilities/wlanqtutilities/tsrc/testwlanqtutils.h
wlanutilities/wlanqtutilities/tsrc/testwlanqtutils.pro
wlanutilities/wlanqtutilities/wlanqtutilities.pro
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapper.h
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapperdisconnect_s60_p.h
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapperdisconnect_symbian.h
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapperinfo_s60_p.h
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapperinfo_symbian.h
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapperscan_s60_p.h
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconntestwrapper.h
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconntestwrapper_s60_p.h
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsesockwrapper_s60_p.h
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsesockwrapper_symbian.h
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsscan.h
wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsscan_symbian.h
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapper.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapperdisconnect_s60.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapperdisconnect_symbian.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapperinfo_s60.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapperinfo_symbian.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapperscan_s60.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconntestwrapper.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconntestwrapper_s60.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsesockwrapper.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsesockwrapper_s60.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsesockwrapper_symbian.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsscan.cpp
wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsscan_symbian.cpp
wlanutilities/wlansniffer/wlansnifferapplication/inc/wlansnifferengine.h
wlanutilities/wlansniffer/wlansnifferapplication/inc/wlansnifferlistview.h
wlanutilities/wlansniffer/wlansnifferapplication/inc/wlansniffermainwindow.h
wlanutilities/wlansniffer/wlansnifferapplication/res/listview.css
wlanutilities/wlansniffer/wlansnifferapplication/res/wlansniffer.qrc
wlanutilities/wlansniffer/wlansnifferapplication/res/wlansnifferlistview.docml
wlanutilities/wlansniffer/wlansnifferapplication/src/wlansniffer.cpp
wlanutilities/wlansniffer/wlansnifferapplication/src/wlansnifferengine.cpp
wlanutilities/wlansniffer/wlansnifferapplication/src/wlansnifferlistview.cpp
wlanutilities/wlansniffer/wlansnifferapplication/src/wlansnifferlistwidget.cpp
wlanutilities/wlansniffer/wlansnifferapplication/src/wlansniffermainwindow.cpp
wlanutilities/wlansniffer/wlansnifferapplication/tsrc/t_wlansniffer.cpp
wlanutilities/wlansniffer/wlansnifferapplication/wlansnifferapplication.pro
wlanutilities/wlansniffer/wlansnifferkeepalive/group/wsfkeepalive.mmp
wlanutilities/wlansniffer/wlansnifferkeepalive/inc/wsfkeepalive.h
wlanutilities/wlansniffer/wlansnifferkeepalive/inc/wsfkeepalivecmm.h
wlanutilities/wlansniffer/wlansnifferkeepalive/src/wsfkeepalive.cpp
wlanutilities/wlansniffer/wlansnifferkeepalive/src/wsfkeepalivecmm.cpp
wlanutilities/wlanutilities.pro
wlanutilities/wlanwizard/inc/wlanwizard.h
wlanutilities/wlanwizard/inc/wlanwizard_p.h
wlanutilities/wlanwizard/inc/wlanwizardhelper.h
wlanutilities/wlanwizard/inc/wlanwizardpage.h
wlanutilities/wlanwizard/inc/wlanwizardpagegenericerror.h
wlanutilities/wlanwizard/inc/wlanwizardpageinternal.h
wlanutilities/wlanwizard/inc/wlanwizardpagenetworkmode.h
wlanutilities/wlanwizard/inc/wlanwizardpageprocessingsettings.h
wlanutilities/wlanwizard/inc/wlanwizardpagescanning.h
wlanutilities/wlanwizard/inc/wlanwizardpagesecuritymode.h
wlanutilities/wlanwizard/inc/wlanwizardpagessid.h
wlanutilities/wlanwizard/inc/wlanwizardpagesummary.h
wlanutilities/wlanwizard/inc/wlanwizardplugin.h
wlanutilities/wlanwizard/inc/wlanwizardscanlist.h
wlanutilities/wlanwizard/resources/occ_add_wlan_01_04.docml
wlanutilities/wlanwizard/resources/occ_add_wlan_02_03.docml
wlanutilities/wlanwizard/resources/occ_add_wlan_05.docml
wlanutilities/wlanwizard/resources/occ_add_wlan_06.docml
wlanutilities/wlanwizard/resources/occ_add_wlan_error.docml
wlanutilities/wlanwizard/resources/occ_wlan_wizard_main.docml
wlanutilities/wlanwizard/src/wlanwizard_p.cpp
wlanutilities/wlanwizard/src/wlanwizardpagegenericerror.cpp
wlanutilities/wlanwizard/src/wlanwizardpageinternal.cpp
wlanutilities/wlanwizard/src/wlanwizardpagekeyquery.cpp
wlanutilities/wlanwizard/src/wlanwizardpagenetworkmode.cpp
wlanutilities/wlanwizard/src/wlanwizardpageprocessingsettings.cpp
wlanutilities/wlanwizard/src/wlanwizardpagescanning.cpp
wlanutilities/wlanwizard/src/wlanwizardpagesecuritymode.cpp
wlanutilities/wlanwizard/src/wlanwizardpagessid.cpp
wlanutilities/wlanwizard/src/wlanwizardpagesummary.cpp
wlanutilities/wlanwizard/src/wlanwizardscanlist.cpp
wlanutilities/wlanwizard/t_wlanwizard/make_ctc.bat
wlanutilities/wlanwizard/t_wlanwizard/make_ctc_post.bat
wlanutilities/wlanwizard/t_wlanwizard/make_ctc_with_clean.bat
wlanutilities/wlanwizard/t_wlanwizard/run_wst.bat
wlanutilities/wlanwizard/t_wlanwizard/stubs/context_wlanqtutils.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/context_wlanqtutils.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtcertificateinfo.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtcertificateinfo_stub.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfig.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfig_stub.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfiginterface.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfiginterface_context.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfiginterface_context.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfiginterface_stub.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtpacstoreconfig.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtpacstoreconfig_stub.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtvalidator.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtvalidator_stub.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtvalidator_stub.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/stub_wlanqtutils.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/stub_wlanqtutilsap.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/stubs.pri
wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanmgmtclient.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanmgmtclient_context.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanmgmtclient_context.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanmgmtclient_stub.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutils.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutils_context.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutils_context.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutils_stub.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutilsap.h
wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutilsap_stub.cpp
wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutilscommon.h
wlanutilities/wlanwizard/t_wlanwizard/t_wlanwizard.pro
wlanutilities/wlanwizard/t_wlanwizard/ut/main.cpp
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizard.cpp
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizard.h
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardconnect.cpp
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardconnect.h
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardconnect_conf.h
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardcontext.cpp
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardcontext.h
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardeap.cpp
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardeap.h
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardeap_conf.h
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardmanual.cpp
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardmanual.h
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardmanual_conf.h
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardui.cpp
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardui.h
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardui_conf.h
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardwps.cpp
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardwps.h
wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardwps_conf.h
wlanutilities/wlanwizard/t_wlanwizard/ut/ut.pri
wlanutilities/wlanwizard/t_wlanwizard/wst_script/wst_make.bat
wlanutilities/wlanwizard/traces/trace.properties
wlanutilities/wlanwizard/wlanwizard.pro
wlanutilities/wlanwizard/wlanwizard_rnd.pro
wlanutilities/wlanwizard/wlanwizard_rnd_all.pro
wlanutilities/wlanwizard/wlanwizard_rnd_eap.pro
wlanutilities/wlanwizard/wlanwizard_rnd_wps.pro
wlanutilities/wpswizard/bwins/wpswizardu.def
wlanutilities/wpswizard/eabi/wpswizardu.def
wlanutilities/wpswizard/inc/cwpsactiverunner.h
wlanutilities/wpswizard/inc/mwpsactiverunnercallback.h
wlanutilities/wpswizard/inc/wpswizard.h
wlanutilities/wpswizard/inc/wpswizard_p.h
wlanutilities/wpswizard/inc/wpswizardpage.h
wlanutilities/wpswizard/inc/wpswizardstepfive.h
wlanutilities/wpswizard/inc/wpswizardstepfour.h
wlanutilities/wpswizard/inc/wpswizardstepfour_p.h
wlanutilities/wpswizard/inc/wpswizardstepthreebutton.h
wlanutilities/wpswizard/inc/wpswizardstepthreenumber.h
wlanutilities/wpswizard/inc/wpswizardsteptwo.h
wlanutilities/wpswizard/resources/occ_wps_01_05.docml
wlanutilities/wpswizard/resources/occ_wps_02_03.docml
wlanutilities/wpswizard/resources/occ_wps_P4.docml
wlanutilities/wpswizard/resources/wpswizard_resource.qrc
wlanutilities/wpswizard/rom/wpswizard.iby
wlanutilities/wpswizard/rom/wpswizard_resources.iby
wlanutilities/wpswizard/src/cwpsactiverunner.cpp
wlanutilities/wpswizard/src/wpswizard.cpp
wlanutilities/wpswizard/src/wpswizard_p.cpp
wlanutilities/wpswizard/src/wpswizardpage.cpp
wlanutilities/wpswizard/src/wpswizardstepfive.cpp
wlanutilities/wpswizard/src/wpswizardstepfour.cpp
wlanutilities/wpswizard/src/wpswizardstepfour_p.cpp
wlanutilities/wpswizard/src/wpswizardstepthreebutton.cpp
wlanutilities/wpswizard/src/wpswizardstepthreenumber.cpp
wlanutilities/wpswizard/src/wpswizardsteptwo.cpp
wlanutilities/wpswizard/stubs/stub_wlanmgmtclient.cpp
wlanutilities/wpswizard/stubs/stubs.pri
wlanutilities/wpswizard/stubs/wlanmgmtclient.h
wlanutilities/wpswizard/traces/OstTraceDefinitions.h
wlanutilities/wpswizard/wpswizard.pro
--- a/hotspotfw/group/bld.inf	Wed Jun 23 19:25:42 2010 +0300
+++ b/hotspotfw/group/bld.inf	Tue Jul 06 15:29:22 2010 +0300
@@ -23,13 +23,9 @@
 
 PRJ_EXPORTS
 ../rom/hotspot.iby                      CORE_MW_LAYER_IBY_EXPORT_PATH(hotspot.iby)
-../rom/hotspotResources.iby             LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(hotspotResources.iby)
 ../rom/hotspotfwstub.sis               /epoc32/data/z/system/install/hotspotfwstub.sis
 ../rom/ictsstub.sis                    /epoc32/data/z/system/install/ictsstub.sis
 
-// Localisation files of whole Hotspot localised here
-../hsbrowser/loc/hsbrowser.loc          MW_LAYER_LOC_EXPORT_PATH(hsbrowser.loc)
-
 ../internetconnectivitytestservice/conf/icts.confml		MW_LAYER_CONFML(icts.confml)
 ../internetconnectivitytestservice/conf/icts_10282EC7.crml	MW_LAYER_CRML(icts_10282ec7.crml)
 ../internetconnectivitytestservice/group/backup_registration.xml	/epoc32/data/z/private/10282ec5/backup_registration.xml
@@ -56,11 +52,5 @@
 ../hsclient/group/NetCfgExtnHotSpot.mmp
 ../hsclient/group/hssmgmtimpl.mmp
 ../hspluginforagent/group/wlanagthotspotimpl.mmp
-../hsbrowser/group/hsbrowser.mmp
 ../hsserver/group/hssscanlist.mmp
 PRJ_EXTENSIONS
-
-START EXTENSION s60/mifconv
-OPTION TARGETFILE hsbrowsericon_aif.mif
-OPTION SOURCES -c8,1 qgn_menu_wlan_logon
-END
--- a/hotspotfw/hsbrowser/data/hsbrowser.rss	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
-* Copyright (c) 2007 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:   This file contains all the resources for HsBrowser.
-*
-*/
-
-
-
-//  RESOURCE IDENTIFIER
-NAME    HSBR // 4 letter ID
-
-//  INCLUDES
-
-#include <eikon.rh>
-#include <avkon.rh>
-#include <avkon.rsg>
-#include <avkon.loc>
-#include <appinfo.rh>
-#include <avkon.mbg>
-#include <data_caging_paths_strings.hrh>
-#include <hsbrowser.loc>
-
-//  RESOURCE DEFINITIONS 
-
-// -----------------------------------------------------------------------------
-//
-//    Define the resource file signature
-//    This resource should be empty.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE { }
-
-// -----------------------------------------------------------------------------
-//
-// Default Document Name
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF { buf=""; }
-
-// -----------------------------------------------------------------------------
-//
-// Define default CBA key and status pane.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
-    {
-    cba = R_AVKON_SOFTKEYS_CANCEL;
-    status_pane = r_hsbrowser_app_model;
-    }
-
-// ---------------------------------------------------------
-//   
-//  r_hsbrowser_app_model
-//  Define status pane of HsBrowser.
-//
-// ---------------------------------------------------------
-//
-RESOURCE STATUS_PANE_APP_MODEL r_hsbrowser_app_model
-     {
-     layout = R_AVKON_STATUS_PANE_LAYOUT_SMALL_WITH_SIGNAL_PANE;
-     panes =
-        {
-        SPANE_PANE
-            {
-            id = EEikStatusPaneUidNavi;
-            type = EAknCtNaviPane;
-            resource = r_hsbrowser_navi_decorator;
-            }
-        };
-     }
-
-// ---------------------------------------------------------
-//   
-//  r_hsbrowser_navi_decorator
-//  Define static title of HsBrowser.
-//
-// ---------------------------------------------------------
-//
-RESOURCE NAVI_DECORATOR r_hsbrowser_navi_decorator
-    {
-    type = ENaviDecoratorLabel;
-    control = NAVI_LABEL
-        {
-        txt = qtn_netw_conset_wba_static_title;
-        };
-    }
-
-// ----------------------------------------------------------------------------
-//
-// r_hsbrowser_localisable_app_info
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE LOCALISABLE_APP_INFO r_hsbrowser_localisable_app_info
-    {
-    short_caption = qtn_netw_conset_wba_static_title;
-    caption_and_icon = 
-        CAPTION_AND_ICON_INFO
-            {
-            caption = qtn_netw_conset_wba_static_title;
-            icon_file = "Z:"APP_BITMAP_DIR"\\hsbrowsericon_aif.mif";
-            };
-    }
-
-// ----------------------------------------------------------------------------
-//
-// r_hsbrowser_softkeys_continue_cancel
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE CBA r_hsbrowser_softkeys_continue_cancel
-    {
-    buttons =
-        {
-        CBA_BUTTON{ id = EAknSoftkeyNext; txt = text_softkey_continue; },
-        CBA_BUTTON{ id = EAknSoftkeyCancel; txt = text_softkey_cancel; },
-        CBA_BUTTON{ id = EAknSoftkeyNext; txt = text_softkey_continue; }
-        };
-    }
-
-RESOURCE CBA r_hsbrowser_softkeys_cancel
-    {
-    buttons =
-        {
-        CBA_BUTTON{ txt = text_softkey_empty; },
-        CBA_BUTTON{ id = EAknSoftkeyClose; txt = text_softkey_cancel; },
-        CBA_BUTTON{ txt = text_softkey_empty; }
-        };
-    }
-    
-// ----------------------------------------------------------------------------
-//
-// r_hsbrowser_softkeys_continue_exit
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE CBA r_hsbrowser_softkeys_continue_exit
-    {
-    buttons =
-        {
-        CBA_BUTTON{ id = EAknSoftkeyNext; txt = text_softkey_continue; },
-        CBA_BUTTON{ id = EAknSoftkeyExit; txt = text_softkey_exit; },
-        CBA_BUTTON{ id = EAknSoftkeyNext; txt = text_softkey_continue; }
-        };
-    }  
-
-// ----------------------------------------------------------------------------
-//
-// r_qtn_netw_conset_wba_info_complete
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_wba_info_complete
-    {
-    buf = qtn_netw_conset_wba_info_complete;
-    }
-
-// ----------------------------------------------------------------------------
-//
-// r_qtn_netw_conset_wba_info_closed
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_netw_conset_wba_info_closed
-    {
-    buf = qtn_netw_conset_wba_info_closed;
-    }
-
-RESOURCE TBUF r_qtn_netw_conset_wba_static_title
-    {
-    buf = qtn_netw_conset_wba_static_title;
-    }
-// End of File
--- a/hotspotfw/hsbrowser/data/hsbrowser_reg.rss	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2007 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:   RSS for registration file for HsBrowser.
-*
-*/
-
-
-
-#include <appinfo.rh>
-#include <hsbrowser.rsg>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x2000AFCC 
-
-RESOURCE APP_REGISTRATION_INFO
-    {
-    app_file = "HsBrowser";
-    localisable_resource_file = "\\resource\\apps\\hsbrowser";
-    localisable_resource_id = R_HSBROWSER_LOCALISABLE_APP_INFO;
-    hidden = KAppIsHidden;
-    embeddability = KAppNotEmbeddable;
-    newfile = KAppDoesNotSupportNewFile;
-    }
-
-// End of File
--- a/hotspotfw/hsbrowser/group/bld.inf	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2007 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:    This file provides the information required
-*                for building the whole of a Hotspot Browser Application.
-*
-*/
-
-
-
-
-PRJ_PLATFORMS
-
-
-PRJ_EXPORTS
-
-
-PRJ_MMPFILES
-hsbrowser.mmp
--- a/hotspotfw/hsbrowser/group/hsbrowser.mmp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2007 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:     This is the project specification file for
-*                HotSpot Browser Application.
-*
-*/
-
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-
-TARGET HsBrowser.exe
-TARGETTYPE exe
-UID 0x100039CE 0x2000AFCC
-VENDORID VID_DEFAULT
-CAPABILITY	CAP_APPLICATION NetworkControl
-
-EPOCSTACKSIZE   0x10000
-EPOCHEAPSIZE 0x2000 0x500000 
-
-SOURCEPATH ../src
-SOURCE  hsbrowserapp.cpp
-SOURCE  hsbrowserappui.cpp
-SOURCE  hsbrowserdocument.cpp
-SOURCE  hsbrowsermodel.cpp
-SOURCE  hsbrowsercontainer.cpp
-SOURCE  hsbrowserloadeventobserver.cpp
-SOURCE  hsbrowserspecialloadobserver.cpp
-SOURCE  hsbrowserictsobserver.cpp
-SOURCE  hsbrowserhssrvnotifs.cpp
-
-// UI resource file
-START RESOURCE ../data/hsbrowser.rss
-HEADER
-TARGETPATH APP_RESOURCE_DIR
-LANGUAGE_IDS
-END
-
-// registration file
-START RESOURCE ../data/hsbrowser_reg.rss
-DEPENDS hsbrowser.rsg
-TARGETPATH 	  /private/10003a3f/apps
-END
-
-USERINCLUDE .
-USERINCLUDE ../inc
-USERINCLUDE ../../inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib apparc.lib cone.lib eikcore.lib
-LIBRARY avkon.lib apmime.lib apgrfx.lib efsrv.lib eikcoctl.lib commonui.lib ecom.lib
-LIBRARY eikdlg.lib gdi.lib bitgdi.lib esock.lib insock.lib
-LIBRARY hotspotclient.lib
-LIBRARY ictsclientinterface.lib
-LIBRARY ws32.lib
-LIBRARY commonengine.lib
-LIBRARY browserengine.lib
-LIBRARY aknnotify.lib eiksrv.lib
-LIBRARY akncapserverclient.lib
-LIBRARY bafl.lib
-LIBRARY hlplch.lib      // for "Help" options menu
--- a/hotspotfw/hsbrowser/inc/am_debug.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Debug utilities
-*
-*/
-
-
-
-#ifndef AM_DEBUG_H
-#define AM_DEBUG_H
-
-#include <e32svr.h>
-
-#ifdef _DEBUG
-
-/**
-* Class for producing debug traces
-* @lib
-* @since Series 60 3.0
-*/
-class Debug
-    {
-    public:
-        static inline void PrintBuffer( TUint aLength, const TUint8* aData );
-        static inline void PrintString( const TDesC& aString, TUint aLength, const TUint8* aData );
-        static inline void PrintTimestamp( const TDesC& aString );
-    };
-
-#define DEBUG(a)		            RDebug::Print(_L(a))
-#define DEBUG1(a,b)		            RDebug::Print(_L(a),b)
-#define DEBUG2(a,b,c)	            RDebug::Print(_L(a),b,c)
-#define DEBUG3(a,b,c,d)	            RDebug::Print(_L(a),b,c,d)
-#define DEBUG4(a,b,c,d,e)	        RDebug::Print(_L(a),b,c,d,e)
-#define DEBUG5(a,b,c,d,e,f)	        RDebug::Print(_L(a),b,c,d,e,f)
-#define DEBUG6(a,b,c,d,e,f,g)	    RDebug::Print(_L(a),b,c,d,e,f,g)
-#define DEBUG7(a,b,c,d,e,f,g,h) 	RDebug::Print(_L(a),b,c,d,e,f,g,h)
-#define DEBUG8(a,b,c,d,e,f,g,h,i)	RDebug::Print(_L(a),b,c,d,e,f,g,h,i)
-#define DEBUG_MAC(a)	            RDebug::Print(_L("%02X%02X%02X%02X%02X%02X"),a[0],a[1],a[2],a[3],a[4],a[5])
-#define DEBUG_RATES(a)	            RDebug::Print(_L("%d %d %d %d %d %d %d %d"),a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7])
-#define DEBUG_BUFFER(a,b)           Debug::PrintBuffer(a,b);
-#define DEBUG1S(a,b,c)		        Debug::PrintString(_L(a),b,c);
-#define DEBUGT(a)                   Debug::PrintTimestamp(_L(a));
-
-#include "am_debug.inl"
-
-#else // _DEBUG
-
-#define DEBUG(a)                    /* _DEBUG is not defined. */
-#define DEBUG1(a,b)                 /* _DEBUG is not defined. */
-#define DEBUG2(a,b,c)               /* _DEBUG is not defined. */
-#define DEBUG3(a,b,c,d)             /* _DEBUG is not defined. */
-#define DEBUG4(a,b,c,d,e)           /* _DEBUG is not defined. */
-#define DEBUG5(a,b,c,d,e,f)	        /* _DEBUG is not defined. */
-#define DEBUG6(a,b,c,d,e,f,g)       /* _DEBUG is not defined. */
-#define DEBUG7(a,b,c,d,e,f,g,h)     /* _DEBUG is not defined. */
-#define DEBUG8(a,b,c,d,e,f,g,h,i)	/* _DEBUG is not defined. */
-#define DEBUG_MAC(a)                /* _DEBUG is not defined. */
-#define DEBUG_RATES(a)              /* _DEBUG is not defined. */
-#define DEBUG_BUFFER(a,b)           /* _DEBUG is not defined. */
-#define DEBUG1S(a,b,c)		        /* _DEBUG is not defined. */
-#define DEBUGT(a)                   /* _DEBUG is not defined. */
-
-#endif // _DEBUG
-
-#endif // AM_DEBUG_H
--- a/hotspotfw/hsbrowser/inc/am_debug.inl	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Debug utilities
-*
-*/
-
-
-
-const TUint KPrintLineLength = 200;
-const TUint KPrintHexPerLine = 8;
-
-// -----------------------------------------------------------------------------
-// Debug::PrintBuffer
-// -----------------------------------------------------------------------------
-//
-inline void Debug::PrintBuffer( TUint aLength, const TUint8* aData )
-    {
-    TBuf<KPrintLineLength> line;
-    TUint idx( 0 );
-    for ( ; idx < aLength; ++idx )
-        {
-        if ( idx && !( idx % KPrintHexPerLine ) )
-            {
-            RDebug::Print( line );
-            line.Zero();
-            }
-        line.AppendFormat( _L( "%02X " ), aData[idx] );
-        }
-    RDebug::Print( line );
-    }
-
-// -----------------------------------------------------------------------------
-// Debug::PrintString
-// -----------------------------------------------------------------------------
-//
-inline void Debug::PrintString( const TDesC& aString, TUint aLength, const TUint8* aData )
-    {
-    TBuf<KPrintLineLength> line;
-
-    line.Append( aString );
-    
-    TPtrC8 buf8( aData, aLength );
-    
-    TBuf<KPrintLineLength> buf16;
-    buf16.Copy( buf8 );
-
-    line.Append( buf16 );
-    
-    RDebug::Print( line );
-    }
-
-// -----------------------------------------------------------------------------
-// Debug::PrintTimestamp
-// -----------------------------------------------------------------------------
-//
-inline void Debug::PrintTimestamp( const TDesC& aString )
-    {
-    TBuf<KPrintLineLength> line;
-    TTime time;
-    time.HomeTime();
-    
-    time.FormatL( line, _L( "%H:%T:%S:%C" ) );
-    line.Append( _L( " " ) );
-    line.Append( aString );
-    
-    RDebug::Print( line );
-    }
--- a/hotspotfw/hsbrowser/inc/hsbrowserapp.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Declares main application class.
-*
-*/
-
-
-
-#ifndef HSBROWSERAPP_H
-#define HSBROWSERAPP_H
-
-// INCLUDES
-#include <aknapp.h>
-
-// CLASS DECLARATION
-/**
-* CHsBrowserApp application class.
-* Provides the factory to create a concrete document object.
-* 
-*/
-class CHsBrowserApp : public CAknApplication
-    {
-    
-    public: // Functions from base classes
-        /**
-        * From CApaApplication, overridden to enable INI file support.
-        * @return CDictionaryStore*, A pointer to the dictionary store
-        */
-        CDictionaryStore* OpenIniFileLC(RFs& aFs) const;
-    private:
-
-        /**
-        * From CApaApplication, creates CHsBrowserDocument document object.
-        * @return CApaDocument*, A pointer to the created document object.
-        */
-        CApaDocument* CreateDocumentL();
-        
-        /**
-        * From CApaApplication, returns application's UID.
-        * @return TUid, The value of KUidHsBrowserApp.
-        */
-        TUid AppDllUid() const;
-    };
-
-#endif
-
-// End of File
-
--- a/hotspotfw/hsbrowser/inc/hsbrowserappui.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
-* Copyright (c) 2007 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:   The UI class for HotSpot Browser Application.
-*
-*/
-
-
-
-#ifndef HSBROWSERAPPUI_H
-#define HSBROWSERAPPUI_H
-
-// INCLUDES
-#include <eikapp.h>
-#include <eikdoc.h>
-#include <e32std.h>
-#include <coeccntx.h>
-#include <aknappui.h>
-#include <in_sock.h>
-
-// FORWARD DECLARATIONS
-class CHsBrowserContainer;
-
-// CONSTANTS
-const TInt KBufSize = 512;
-
-// CLASS DECLARATION
-/**
-* CHsBrowserAppUi class.
-* Application UI class which provides support for the following features:
-* - EIKON control architecture
-* 
-*/
-class CHsBrowserAppUi : public CAknAppUi
-    {
-    public:
-    
-        /**
-        * EPOC default constructor.
-        */      
-        void ConstructL();
-
-        /**
-        * Destructor.
-        */      
-        ~CHsBrowserAppUi();
-        
-    public: // From CEikAppUi
-        
-        /**
-        * Parses command line arguments.
-        *
-        * @param aCommandLine Reference to command line.
-        */
-        TBool ProcessCommandParametersL( CApaCommandLine& aCommandLine );
-
-        /**
-        * Takes care of command handling.
-        *
-        * @param aCommand Command to be handled
-        */
-        void HandleCommandL(TInt aCommand);
-
-        /**
-        * Handles key events.
-        *
-        * @param aKeyEvent Event to handled.
-        * @param aType Type of the key event. 
-        * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
-        */
-        virtual TKeyResponse HandleKeyEventL(
-            const TKeyEvent& aKeyEvent,TEventCode aType);
-
-        /**
-        * Handles changes in keyboard focus when an application switches to, 
-        * or from, the foreground.
-        *
-        * @param aForeground ETrue if the application is in the foreground,
-        * otherwise EFalse.
-        */
-        void HandleForegroundEventL( TBool aForeground );
-
-    private: //data
-
-        /**
-        * Pointer to container of Hotspot Browser .
-        */
-        CHsBrowserContainer* iAppContainer;        
-    };
-
-#endif
-
-// End of File
-
-
--- a/hotspotfw/hsbrowser/inc/hsbrowsercommon.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Common data for HotSpot Browser Application.
-*
-*/
-
-
-
-#ifndef HSBROWSERCOMMON_H
-#define HSBROWSERCOMMON_H
-
-// CONSTANTS
-
-/**
-* Z drive.
-*/
-_LIT( KDriveZ, "z:" );
-
-/**
-* C drive.
-*/
-_LIT( KDriveC, "c:" );
-
-/*
-* Series60v3.2 product file.
-*/
-_LIT( KS60ProductIdFile, "Series60v3.2.sis" );
-
-/*
-* ROM install directory.
-*/
-_LIT( KROMInstallDir, "z:\\system\\install\\" );
-
-/**
-* Resource file for Hotspot Browser.
-*/
-_LIT( KResourceFile, "hsbrowser.rsc" );
-
-/**
-* UID3 of the application.
-*/
-const TUid KUidHsBrowserApp = { 0x2000AFCC };
-
-#endif
-
-// End of File
--- a/hotspotfw/hsbrowser/inc/hsbrowsercontainer.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Declares container control for HotSpot Browser Application.
-*
-*/
-
-
-
-#ifndef HSBROWSERCONTAINER_H
-#define HSBROWSERCONTAINER_H
-
-// INCLUDES
-#include <coecntrl.h>
-#include <coecobs.h>
-#include <ictscommon.h>
-#include <ictsclientinterface.h>
-#include <eikmenup.h>
-#include <brctlinterface.h>
-#include <wlanmgmtcommon.h>
-#include <wlanmgmtclient.h>
-
-// FORWARD DECLARATIONS
-class CBrCtlInterface;
-class CHsBrowserSpecialLoadObserver;
-class CHsBrowserLoadEventObserver;
-class CHsBrowserIctsObserver;
-class CHsBrowserHsSrvNotifs;
-class CHsBrowserModel;
-class TCoeEvent;
-class CAknNavigationControlContainer;
-class CAknNavigationDecorator;
-class CAknIndicatorContainer;
-class CAknNaviLabel;       
-
-// CONSTANTS
-const TInt KComponentsNumber = 1;
-const TInt KBrCtlComponentIndex = 0;
-
-// CLASS DECLARATION
-/**
-*  CHsBrowserContainer class.
-*  This is the container control class.
-*/
-class CHsBrowserContainer : public CCoeControl
-    {
-    public: // Constructors and destructor
-        
-        /**
-        * C++ default constructor.
-        *
-        * @param aModel Pointer to model of HsBrowser.
-        */
-        CHsBrowserContainer( CHsBrowserModel* aModel );
-        
-        /**
-        * EPOC default constructor.
-        *
-        * @param aRect Frame rectangle for container.
-        */
-        void ConstructL( const TRect& aRect );
-
-        /**
-        * Destructor.
-        */
-        ~CHsBrowserContainer();
-
-    public:
-            enum TNaviPaneEvent
-            {
-            ELoadingLoginPage,
-            ELoadingUrl,
-            EPageTitleAvailable,
-            ELoadingFinished
-            };
-
-
-    public: // new
-
-        /**
-        * Initializes the indicators in the navi pane.
-        */   
-        void InitNaviPaneL();
-
-        /**
-        * Updates the indicators in the navi pane.
-        */      
-        void UpdateNaviPane( TNaviPaneEvent aUpdateEvent );
-
-        /**
-        * Pass a command to the Browser Control
-        *
-        * @param aCommand The command that the Browser Control should process.
-        */
-        void HandleCommandL( TInt aCommand );        
-
-        /**
-        * Handles key events
-        *
-        * @param aKeyEvent The key event that occurred.
-        * @param aType The window server event type that is being handled
-        * @return TKeyResponse Value indicates whether or not the key event was consumed by the control.
-        *                      The default implementation simply returns EKeyWasNotConsumed.
-        */
-        TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
-        
-        /**
-        * Handle events when when an application switches to, 
-        * or from, the foreground.
-        *
-        * @param aForeground ETrue if the application is in the foreground,
-        * otherwise EFalse.
-        */
-        void ProcessForegroundEvent( TBool aForeground );
-        
-        /**
-        * Send application to foreground.
-        */
-        void SendToForeground();
-        
-        /**
-        * Restore original ordinary position and priority.
-        */
-        void RestorePositionAndPriority();
-
-        /**
-        * Send application to background.
-        */        
-        void SendToBackground();
-        
-        /**
-        * Update softkeys according to model state. 
-        */
-        void UpdateSoftkeys();
-        
-        /**
-        * Show login complete information note.
-        */
-        void ShowLoginCompleteNote();
-        
-        /**
-        * Show connection closed information note.
-        */
-        void ShowConnClosedNote();
-        
-        /**
-        * Initialize model, attach to connection, and load specified URL.
-        *
-        * @param aUrl URL of authentication web page.
-        * @param aIapId ID of IAP.
-        * @param aNetId Network ID.
-        * @return KErrNone, if successful, otherwice one of system wide errorcodes.
-        */
-        TInt LoadRedirect( const TPtrC& aUrl, TInt aIapId, TInt aNetId );
-        
-        /**
-        * Called when wlan connection is lost.
-        * Shows information note and exits.
-        */
-        void ProcessWlanConnModeNotConnected();
-                
-        /**
-        * Returns boolean value for application foreground status.
-        *
-        * @return ETrue / EFalse
-        */
-        TBool IsForeground();
-        
-    public: // access
-
-        /**
-        * Accessor method for iBrCtlInterface
-        *
-        * @return CBrCtlInterface* A pointer to the browser control interface.
-        */
-		inline CBrCtlInterface* BrCtlInterface();
-
-        /**
-        * Accessor method for iHsBrowserSpecialLoadObserver.
-        *
-        * @return CHsBrowserSpecialLoadObserver* A pointer to the special load observer.
-        */
-		inline CHsBrowserSpecialLoadObserver* HsBrowserSpecialLoadObserver();
-        
-        /**
-        * Accessor method for iHsBrowserIctsObserver.
-        *
-        * @return CHsBrowserIctsObserver* A pointer to the Internet connectivity test observer.
-        */
-		inline CHsBrowserIctsObserver* HsBrowserIctsObserver();
-        
-        /**
-        * Accessor method for iModel.
-        *
-        * @return CHsBrowserModel* A pointer to the model of HsBrowser.
-        */
-        inline CHsBrowserModel* Model();        
-        
-        /**
-        * Accessor method for iNaviLabel.
-        *
-        * @return CAknNaviLabel* A pointer to the label control in the navigation pane.
-        */
-        inline CAknNaviLabel* NaviLabel();
-        
-        /**
-        * Get boolean value if input box is active or not.
-        *
-        * @return ETrue / EFalse
-        */
-        inline TBool ActiveInputBox();
-        
-        /**
-        * Set input box active flag
-        */
-        inline void SetActiveInputBox( TBool aActiveInputBox );
-        
-    private: // From CoeControl
-
-        /**
-        * From CoeControl,SizeChanged.
-        */
-        void SizeChanged();
-
-        /**
-        * From CoeControl,CountComponentControls.
-        */
-        TInt CountComponentControls() const;
-
-        /**
-        * From CCoeControl,ComponentControl.
-        */
-        CCoeControl* ComponentControl( TInt aIndex ) const;
-
-        /**
-        * From CCoeControl,Handle key events.
-        */
-        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
-                                     TEventCode aType);
-    
-        /**
-        * From CCoeControl,Handle resource change events.
-        */
-        void HandleResourceChange( TInt aType );
-    
-    private: //data 
-    
-        /**
-        * Pointer to the browser control interface.
-        * Owned.
-        */
-        CBrCtlInterface* iBrCtlInterface;
-
-        /**
-        * Command Base
-        */
-        TInt iCommandBase;
-
-        /**
-        * Special Load Observer
-        */
-        CHsBrowserSpecialLoadObserver* iHsBrowserSpecialLoadObserver;
-        
-        /**
-        * Load Event Observer
-        */
-        CHsBrowserLoadEventObserver* iHsBrowserLoadEventObserver;
-
-        /**
-        * Internet connectivity test observer
-        */
-        CHsBrowserIctsObserver* iHsBrowserIctsObserver;
-        
-        /**
-        * Notifications from hotspot server.
-        */
-        CHsBrowserHsSrvNotifs* iHsBrowserHsSrvNotifs;
-        
-        /**
-        * Model of HsBrowser
-        */
-        CHsBrowserModel* iModel;
-        
-        /**
-        * Pointer to default control in the status pane's navigation pane.
-        * Not owned.
-        */
-        CAknNavigationControlContainer* iNaviPane;
-        
-        /**
-        * Pointer to the editor indicator control in the navigation pane.
-        * Owned.
-        */
-        CAknNavigationDecorator* iEditorIndicatorContainer;
-                
-        /**
-        * Pointer to the editor indicator control in the navigation pane
-        * Not owned.
-        */
-        CAknIndicatorContainer* iIndiContainer;
-        
-       /**
-        * Resource.
-        */
-        TInt iResource; 
-        
-        /**
-        * Flag for softkey press.
-        */
-        TBool iActiveInputBox;
-        
-        /**
-        * handle to WlanMgmtClient
-        */
-     	CWlanMgmtClient *iMgtClient;
-    };
-
-#include "hsbrowsercontainer.inl"
-
-#endif
-
-// End of File
-
--- a/hotspotfw/hsbrowser/inc/hsbrowsercontainer.inl	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Inline method definitions for CHsBrowserContainer.   
-*
-*/
-
-
-
-#ifndef HSBROWSERCONTAINER_INL
-#define HSBROWSERCONTAINER_INL
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------------------------
-// CHsBrowserContainer::BrCtlInterface
-// ---------------------------------------------------------------------------
-//
-CBrCtlInterface* CHsBrowserContainer::BrCtlInterface()
-    {
-    return iBrCtlInterface;
-    }
-
-// ---------------------------------------------------------------------------
-// CHsBrowserContainer::HsBrowserSpecialLoadObserver
-// ---------------------------------------------------------------------------
-//
-CHsBrowserSpecialLoadObserver* CHsBrowserContainer::
-    HsBrowserSpecialLoadObserver()
-    {
-    return iHsBrowserSpecialLoadObserver;
-    }
-        
-// ---------------------------------------------------------------------------
-// CHsBrowserContainer::HsBrowserIctsObserver
-// ---------------------------------------------------------------------------
-//
-CHsBrowserIctsObserver* CHsBrowserContainer::HsBrowserIctsObserver()
-    {
-    return iHsBrowserIctsObserver;
-    }
-        
-// ---------------------------------------------------------------------------
-// CHsBrowserContainer::Model
-// ---------------------------------------------------------------------------
-//
-CHsBrowserModel* CHsBrowserContainer::Model()
-    {
-    return iModel;
-    }
-    
-// ---------------------------------------------------------------------------
-// CHsBrowserContainer::NaviLabel
-// ---------------------------------------------------------------------------
-//
-CAknNaviLabel* CHsBrowserContainer::NaviLabel()
-    {
-    return NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// CHsBrowserContainer::ActiveInputBox
-// ---------------------------------------------------------------------------
-//
-TBool CHsBrowserContainer::ActiveInputBox()
-    {
-	return iActiveInputBox;
-    }
-
-// ---------------------------------------------------------------------------
-// CHsBrowserContainer::SetActiveInputBox
-// ---------------------------------------------------------------------------
-//
-void CHsBrowserContainer::SetActiveInputBox( TBool aActiveInputBox )
-    {
-	iActiveInputBox = aActiveInputBox;
-    }
-
-#endif
--- a/hotspotfw/hsbrowser/inc/hsbrowserdocument.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Declares document for application.
-*
-*/
-
-
-
-#ifndef HSBROWSERDOCUMENT_H
-#define HSBROWSERDOCUMENT_H
-
-// INCLUDES
-#include <AknDoc.h>
-   
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class  CEikAppUi;
-class CHsBrowserModel;
-
-// CLASS DECLARATION
-
-/**
-*  CHsBrowserDocument application class.
-*/
-class CHsBrowserDocument : public CAknDocument
-    {
-    public: // Constructors and destructor
-        /**
-        * Two-phased constructor.
-        */
-        static CHsBrowserDocument* NewL( CEikApplication& aApp );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CHsBrowserDocument();
-
-    public: // access
-    
-        /**
-        * Accessor method for iModel.
-        *
-        * @return CHsBrowserModel* A pointer to model of HsBrowser.
-        */
-        inline CHsBrowserModel* Model();
-    
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CHsBrowserDocument( CEikApplication& aApp );
-        
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-        
-    private: // new
-         
-        /**
-        * Initialize model.
-        */ 
-        //inline void ResetModel();
-         
-    private:
-
-        /**
-        * From CEikDocument, create CBrCtlSampleAppAppUi "App UI" object.
-        */
-        CEikAppUi* CreateAppUiL();
-    
-    private: // data
-    
-        /**
-        * Pointer to model of HsBrowser.
-        * Owned.
-        */
-        CHsBrowserModel* iModel;
-    };
-
-#include "hsbrowserdocument.inl"
-
-#endif
-
-// End of File
-
--- a/hotspotfw/hsbrowser/inc/hsbrowserdocument.inl	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Inline method definitions for CHsBrowserModel.
-*
-*/
-
-
-
-#ifndef HSBROWSERDOCUMENT_INL
-#define HSBROWSERDOCUMENT_INL
-
-#include "hsbrowsermodel.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CHsBrowserDocument::Model
-// ---------------------------------------------------------
-//
-CHsBrowserModel* CHsBrowserDocument::Model()
-    {
-    return iModel;	
-    }
-
-#endif
--- a/hotspotfw/hsbrowser/inc/hsbrowserhssrvnotifs.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Implements notifications interface from Hotspot server in order
-*                to receive wlan connection closed notification.
-*
-*/
-
-
-
-#ifndef HSBROWSERHSSRVNOTIFS_H
-#define HSBROWSERHSSRVNOTIFS_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <ictscommon.h>
-#include "hsssrvnotifications.h"
-#include <wlanmgmtcommon.h>
-#include <wlanmgmtinterface.h>
-
-// FORWARD DECLARATION
-class CHsBrowserContainer;
-
-// CLASS DECLARATION
-/**
-* CHsBrowserHsSrvNotifs class.
-* Class implements notifications interface for Hotspot server in order
-* to receive wlan connection closed notification.
-*/
-class CHsBrowserHsSrvNotifs : public CBase, public MWlanMgmtNotifications
-	{
-	
-	    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        *
-        * @param aContainer Pointer to container of browser application
-        */
-        static CHsBrowserHsSrvNotifs* NewL( CHsBrowserContainer* aContainer );
-
-        /**
-        * Destructor.
-        */
-        ~CHsBrowserHsSrvNotifs();
-
-    public: // from MWlanMgmtNotifications
-    
-      	/**
-        * Connection state has changed .
-        */
-    	virtual void ConnectionStateChanged( TWlanConnectionMode aNewState );
-
-                        
-    private:
-    
-        /**
-        * C++ default constructor.
-        *
-        * @param aContainer Pointer to container of browser application.
-        */
-        CHsBrowserHsSrvNotifs( CHsBrowserContainer* aContainer );
-        
-	    /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-        
-    private:
-    
- 	    /**
-        * Container of hotspot browser application.
-        */
-        CHsBrowserContainer* iContainer;
-	};
-
-#endif // HSBROWSERHSSRVNOTIFS_H
-            
-// End of File
-
--- a/hotspotfw/hsbrowser/inc/hsbrowserictsobserver.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Implements callback interface for Internet Connectivity Test Service
-*                notifications.
-*
-*/
-
-
-
-#ifndef HSBROWSERICTSOBSERVER_H
-#define HSBROWSERICTSOBSERVER_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <ictscommon.h>
-
-// FORWARD DECLARATION
-class CHsBrowserContainer;
-
-// CLASS DECLARATION
-/**
-* This class implements callback interface for Internet Connectivity Test Service
-* notifications.
-*/
-class CHsBrowserIctsObserver : public CBase, public MIctsObserver
-    {
-    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        *
-        * @param aContainer Pointer to container of browser application
-        */
-        static CHsBrowserIctsObserver* NewL( CHsBrowserContainer* aContainer );
-
-        /**
-        * Destructor.
-        */
-        ~CHsBrowserIctsObserver();
-
-    public: // from MIctsObserver
-    
-        /**
-        * From MIctsObserver, ConnectivityObserver 
-        */
-        void ConnectivityObserver( TIctsTestResult aResult, const TDesC& aString );
-        
-    private: // new
-    
-        /**
-        * Process connection ok event.
-        */
-        void ProcessConnectionOk();
-                
-    private:
-    
-        /**
-        * C++ default constructor.
-        *
-        * @param aContainer Pointer to container of browser application.
-        */
-        CHsBrowserIctsObserver( CHsBrowserContainer* aContainer );
-        
-	    /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-
-    private:
-    
-        /**
-        * Container of hotspot browser application.
-        * Not owned.
-        */
-        CHsBrowserContainer* iContainer;
-    };
-
-#endif // HSBROWSERICTSOBSERVER_H
-            
-// End of File
-
--- a/hotspotfw/hsbrowser/inc/hsbrowserloadeventobserver.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Handle load progress events
-*
-*/
-
-
-
-#ifndef HSBROWSERLOADEVENTOBSERVER_H
-#define HSBROWSERLOADEVENTOBSERVER_H
-
-// INCLUDES
-#include <brctlinterface.h>
-
-// FORWARD DECLARATIONS
-class CHsBrowserContainer;
-
-// CONSTANTS
-_LIT8( KHttp, "http" );
-const TInt KTotalPollingTime = 300000000;
-const TInt KExecutionTimeInterval = 10000000;
-const TInt KBufSize = 4;
-
-// CLASS DECLARATION
-/**
-* This class is used to receive load progress events.
-*/
-class CHsBrowserLoadEventObserver : public CBase, public MBrCtlLoadEventObserver
-    {
-    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CHsBrowserLoadEventObserver* NewL( CHsBrowserContainer* aContainer );
-
-        /**
-        * Destructor.
-        */
-        ~CHsBrowserLoadEventObserver();
-    
-    public: // from MBrCtlLoadEventObserver
-    
-        /**
-        * From MBrCtlLoadEventObserver, load events notification.
-        */
-        void HandleBrowserLoadEventL( TBrCtlDefs::TBrCtlLoadEvent aLoadEvent,
-                                      TUint aSize,
-                                      TUint16 aTransactionId) ;
-    private:
-
-		/**
-		* Constructor.
-		*/
-        CHsBrowserLoadEventObserver( CHsBrowserContainer* aContainer );
-
-	    /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-        
-    private: // new
-
-        /**
-        * Update label in the navigation pane.
-        *
-        * @param aName Label for navi pane.
-        */
-        void UpdateNaviLabel( const TDesC& aName );
-        
-        /**
-        * Update name in fast swapper.
-        *
-        * @param aName Name in fast swapper.
-        */
-        void UpdateFastSwapNameL( const TDesC& aName );
-
-        /**
-        * Get page title, udpate navi label and name in fast swapper.
-        */
-        void UpdateNameL();        
-                
-        /**
-        * Start polling internet connection.
-        */
-        void TestInternetConnectivityL();
-        
-        /**
-        * Update boolean flag for internet connectivity test.
-        */
-        void UpdateDoIctFlagL();
-
-    private:   // data
-    
-        /**
-        * Pointer to the container class associated with this observer.
-        */
-        CHsBrowserContainer* iContainer; // not owner
-        
-        /**
-        * Pointer to internet connectivity test object.
-        */
-        CIctsClientInterface* iIcts; // owner
-        
-        /**
-        * Boolean flag for Internet Connectivity Test.
-        */
-        TBool iDoIct;
-
-        /**
-        * Used to differentiate the navibar content: no title shown yet when
-        * we are just loading the logon page
-        */        
-        TBool iIsFirstLoad;
-    };
-
-#endif // HSBROWSERLOADEVENTOBSERVER_H
-            
-// End of File
--- a/hotspotfw/hsbrowser/inc/hsbrowsermodel.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Declaration of HsBrowserModel class.
-*
-*/
-
-
-
-#ifndef HSBROWSERMODEL_H
-#define HSBROWSERMODEL_H
-
-// INCLUDES
-#include <e32base.h>
-#include <es_sock.h>
-#include "hssinterface.h"
-
-// FORWARD DECLARATIONS
-class RConnection;
-class RSocketServ;
-class RHssInterface;
-
-// CLASS DECLARATION
-/**
- * Manages the HsBrowser data.
- */
-class CHsBrowserModel : public CBase
-    {
-
-    public:
-    
-        /**
-        * Static constructor.
-        */
-        static CHsBrowserModel* NewL();
-        
-        /**
-        * Destructor.
-        */
-        ~CHsBrowserModel();
-    
-    public: // new methods
-            
-        /**
-        * Set model state.
-        *
-        * @param aState State of the model.
-        * @param aSendToHss Flag for sending status to hotspot server.
-        */
-        void SetState( TUint aState, TBool aSendToHss );
-        
-        /**
-        * Attach to connection using known iIapId and iNetId.
-        */
-        TInt Attach();
-        
-    public: // access
-    
-        inline TInt IapId() const;        
-        inline TInt NetId() const;
-        inline HBufC* Url();
-        inline RConnection& Connection();
-        inline RSocketServ& SocketServ();
-        inline RHssInterface& HsServer();
-        inline TBool Foreground();
-        inline TUint State();
-        inline TBool LoginCompleteNoteShown(); 
-        inline TInt Position();
-        inline TInt Priority();
-        inline HBufC* StaticTitle();
-        inline HBufC* PageTitle();
-        
-        inline void SetNetId( TInt aNetId );
-        inline void SetIapId( TInt aIapId ); 
-        inline void SetUrl( const TPtrC& aUrl );
-        inline void SetState( TUint aState );
-        inline void SetForeground( TBool aForeground );
-        inline void SetLoginCompleteNoteShown( TBool aLoginCompleteNoteShown ); 
-        inline void SetStaticTitle( const TDesC& aStaticTitle );
-        inline void SetPageTitle( const TDesC& aPageTitle );
-        
-    private:
-    
-        /**
-        * C++ default constructor.
-        */
-        CHsBrowserModel();
-        
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-
-    private: // data
-		
-        /**
-        * IAP ID.
-        */
-        TInt iIapId;
-
-        /**
-        * Network ID.
-        */
-        TInt iNetId;
-        
-        /**
-        * URL of web page for user authentication.
-        * Owned.
-        */
-        HBufC* iUrl;
-        
-        /**
-        * The management interface for a network connection.
-        */
-        RConnection iConnection;
-        
-        /**
-        * Provides the Connect() function to create an IPC communication
-        * channel to the socket server.
-        */
-        RSocketServ iSocketServ;
-        
-        /**
-        * Handle to a session with a hotspot server.
-        */
-        RHssInterface iHsServer;
-        
-        /**
-        * Application state. Possible values are EHsBrowserUiUndefined, EHsBrowserUiRunning,
-        * EHsBrowserUiAuthenticatedOk, EHsBrowserUiAuthenticatedNok, EHsBrowserUiClosed, defined
-        * in hotspotclientserver.h
-        */       
-        TUint iState;
-        
-        /**
-        * Boolean flag for foreground state.
-        */
-        TBool iForeground;
-        
-        /**
-        * Boolean flag for showing login complete note.
-        */
-        TBool iLoginCompleteNoteShown;
-        
-        /**
-        * The window's original ordinal position.
-        */
-        TInt iPosition;
-        
-        /**
-        * The window's original ordinal priority. 
-        */
-        TInt iPriority;
-
-        /**
-        * Default page title, "WLAN login" 
-        * Owned.
-        */       
-        HBufC* iStaticTitle;
-
-        /**
-        * Web page title, used instead of default if available. 
-        * Owned.
-        */               
-        HBufC* iPageTitle;
-        
-    };
-
-#include "hsbrowsermodel.inl"
-
-#endif // HSBROWSERMODEL_H
-
-// end of file
-
--- a/hotspotfw/hsbrowser/inc/hsbrowsermodel.inl	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Inline method definitions for CHsBrowserModel.   
-*
-*/
-
-
-
-#ifndef HSBROWSERMODEL_INL
-#define HSBROWSERMODEL_INL
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CHsBrowserModel::IapId
-// ---------------------------------------------------------
-//
-TInt CHsBrowserModel::IapId() const
-    {
-    return iIapId;	
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserModel::SetIapId
-// ---------------------------------------------------------
-//
-void CHsBrowserModel::SetIapId( TInt aIapId )
-    {
-    iIapId = aIapId;	
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserModel::IapId
-// ---------------------------------------------------------
-//
-TInt CHsBrowserModel::NetId() const
-    {
-    return iNetId;	
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserModel::Url
-// ---------------------------------------------------------
-//
-HBufC* CHsBrowserModel::Url()
-	{
-	return iUrl;
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserModel::SetNetId
-// ---------------------------------------------------------
-//
-void CHsBrowserModel::SetNetId( TInt aNetId )
-    {
-    iNetId = aNetId;	
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserModel::Connection
-// ---------------------------------------------------------
-//
-RConnection& CHsBrowserModel::Connection()
-    {
-    return iConnection;	
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserModel::SocketServ
-// ---------------------------------------------------------
-//
-RSocketServ& CHsBrowserModel::SocketServ()
-    {
-    return iSocketServ;	
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserModel::HsServer
-// ---------------------------------------------------------
-//
-RHssInterface& CHsBrowserModel::HsServer()
-	{
-	return iHsServer;
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserModel::SetUrl
-// ---------------------------------------------------------
-//
-void CHsBrowserModel::SetUrl( const TPtrC& aUrl )
-	{
-	if ( iUrl )
-		{
-		delete iUrl;
-		iUrl = NULL;
-		}
-	iUrl = aUrl.Alloc();
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserModel::Foreground
-// ---------------------------------------------------------
-//
-TBool CHsBrowserModel::Foreground()
-	{
-	return iForeground;
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserModel::State
-// ---------------------------------------------------------
-//
-TUint CHsBrowserModel::State()
-	{
-	return iState;
-	}
-	
-// ---------------------------------------------------------
-// CHsBrowserModel::ShowLoginCompleteNote
-// ---------------------------------------------------------
-//
-/*TBool CHsBrowserModel::ShowLoginCompleteNote()
-	{
-	return iShowLoginCompleteNote;
-	}
-*/
-
-// ---------------------------------------------------------
-// CHsBrowserModel::LoginCompleteNoteShown
-// ---------------------------------------------------------
-//
-TBool CHsBrowserModel::LoginCompleteNoteShown()
-	{
-	return iLoginCompleteNoteShown;
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserModel::Position
-// ---------------------------------------------------------
-//
-TInt CHsBrowserModel::Position()
-	{
-	return iPosition;
-	}
-	
-// ---------------------------------------------------------
-// CHsBrowserModel::Priority
-// ---------------------------------------------------------
-//
-TInt CHsBrowserModel::Priority()
-	{
-	return iPriority;
-	}
-
-HBufC* CHsBrowserModel::StaticTitle()
-	{
-	return iStaticTitle;
-	}
-
-HBufC* CHsBrowserModel::PageTitle()
-	{
-	return iPageTitle;
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserModel::ShowConnClosedNote
-// ---------------------------------------------------------
-//
-/*
-TBool CHsBrowserModel::ShowConnClosedNote()
-	{
-	return iShowConnClosedNote;
-	}
-*/
-
-// ---------------------------------------------------------
-// CHsBrowserModel::SetState
-// ---------------------------------------------------------
-//
-void CHsBrowserModel::SetState( TUint aState )
-	{
-	iState = aState;
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserModel::SetForeground
-// ---------------------------------------------------------
-//
-void CHsBrowserModel::SetForeground( TBool aForeground )
-	{
-	iForeground = aForeground;
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserModel::SetShowLoginCompleteNote
-// ---------------------------------------------------------
-//
-/*void CHsBrowserModel::SetShowLoginCompleteNote( TBool aShowLoginCompleteNote )
-	{
-	iShowLoginCompleteNote = aShowLoginCompleteNote;
-	}
-*/
-
-// ---------------------------------------------------------
-// CHsBrowserModel::SetLoginCompleteNoteShown
-// ---------------------------------------------------------
-//
-void CHsBrowserModel::SetLoginCompleteNoteShown(
-    TBool aLoginCompleteNoteShown )
-	{
-	iLoginCompleteNoteShown = aLoginCompleteNoteShown;
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserModel::SetShowConnClosedNote
-// ---------------------------------------------------------
-//
-/*
-void CHsBrowserModel::SetShowConnClosedNote( TBool aShowConnClosedNote )
-	{
-	iShowConnClosedNote = aShowConnClosedNote;
-	}        
-*/
-
-// ---------------------------------------------------------
-// CHsBrowserModel::SetStaticTitle
-// ---------------------------------------------------------
-//
-void CHsBrowserModel::SetStaticTitle( const TDesC& aStaticTitle )
-	{
-	if ( iStaticTitle )
-		{
-		delete iStaticTitle;
-		iStaticTitle = NULL;
-		}
-	iStaticTitle = aStaticTitle.Alloc();
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserModel::SetPageTitle
-// ---------------------------------------------------------
-//        
-void CHsBrowserModel::SetPageTitle( const TDesC& aPageTitle )
-	{
-	if ( iPageTitle )
-		{
-		delete iPageTitle;
-		iPageTitle = NULL;
-		}
-	iPageTitle = aPageTitle.Alloc();
-	}
-
-
-#endif // HSBROWSERMODEL_INL
--- a/hotspotfw/hsbrowser/inc/hsbrowserspecialloadobserver.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Handle special load requests like Non-HTTP(S) load requests,
-*                and Non-HTML content. Control over network connections
-*
-*/
-
-
-
-#ifndef HSBROWSERSPECIALLOADOBSERVER_H
-#define HSBROWSERSPECIALLOADOBSERVER_H
-
-//  INCLUDES
-#include <BrCtlSpecialLoadObserver.h>
-#include <brctlinterface.h>
-
-// CLASS DECLARATION
-
-/**
-* CHsBrowserSpecialLoadObserver class.
-* This class inherits from the MBrCtlSpecialLoadObserver interface which
-* is used if the host application requires: Handling of non-HTTP(S) load requests;
-* Handling of non-markup content; Control over network connections
-*/
-class CHsBrowserSpecialLoadObserver : public CBase, public MBrCtlSpecialLoadObserver
-    {
-    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CHsBrowserSpecialLoadObserver* NewL();
-
-        /**
-        * Destructor.
-        */
-        ~CHsBrowserSpecialLoadObserver();
-
-    public: // from MBrCtlSpecialLoadObserver
-    
-        /**
-        * Request to create a network connection.
-        * @since 2.8
-        * @param aConnectionPtr A pointer to the new connection. If NULL, the proxy filter will automatically create a network connection
-        * @param aSockSvrHandle A handle to the socket server.
-        * @param aNewConn A flag if a new connection was created. If the connection is not new, proxy filter optimization will not read the proxy again from CommsBd
-        * @param aBearerType The bearer type of the new connection
-        * @return void
-        */
-        void NetworkConnectionNeededL( TInt* aConnectionPtr,
-                                       TInt* aSockSvrHandle,
-                                       TBool* /*aNewConn*/,
-                                       TApBearerType* /*aBearerType*/ );
-        /**
-        * Request the host applicaion to handle non-http request.
-        * @since 2.8
-        * @param aTypeArray Array of download parameter types. These types indicates the type of data contained within the DesArray
-        * @param aDesArray Array of values associated with the types in the type array.
-        * @return ETrue, If the request is handled by the host application. EFalse if not
-        */
-        TBool HandleRequestL( RArray<TUint>* /*aTypeArray*/,
-                              CDesCArrayFlat* /*aDesArray*/ );
-
-        /**
-        * Request the host applicaion to handle downloads
-        * @since 2.8
-        * @param aTypeArray Array of download parameter types
-        * @param aDesArray Array of values associated with the types in the type array
-        * @return ETrue, If the request is handled by the host application. EFalse if not
-        */
-        TBool HandleDownloadL( RArray<TUint>* /*aTypeArray*/,
-                               CDesCArrayFlat* /*aDesArray*/ );
-        
-    public: // access methods
-    
-        /**
-        * Accessor method for iConnectionPtr.
-        */
-        void SetConnectionPtr( TInt aConnectionPtr );
-        
-        /**
-        * Accessor method for iSockSvrHandle.
-        */
-        void SetSockSvrHandle( TInt aSockSvrHandle );
-
-    private:
-    
-	    /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-
-    private:
-        
-        /**
-        * Connection handle.
-        */
-        TInt iConnectionPtr;
-    
-        /**
-        * Socket server handle.
-        */
-        TInt iSockSvrHandle;
-    };
-
-#endif // HSBROWSERSPECIALLOADOBSERVER_H
-            
-// End of File
-
--- a/hotspotfw/hsbrowser/loc/hsbrowser.loc	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Localization file.
-*
-*/
-
-
-
-// LOCALISATION STRINGS
-
-//d:A static title is displayed during the rendering of the page, and replaced
-//d:by the web page title when it is available. If the web page does not have
-//d:a title, the static title remains in the status pane.
-//l:status_small_pane_t1/opt3
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_wba_static_title "WLAN login" 
-
-//d:As soon as authentication can be detected as complete,
-//d:this information note is displayed,
-//d:and the logon application is sent to background.
-//l:popup_note_window
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_wba_info_complete "Login complete. Application will be sent to background."
-
-//d:If the WLAN connection is closed when logon application is in foreground,
-//d:this information note is displayed and application is closed.
-//l:popup_note_window
-//w:
-//r:3.2
-//
-#define qtn_netw_conset_wba_info_closed "WLAN connection closed. Login application will now exit."
-
-//d:Softkey used in authentication process.
-//l:control_pane_t1/opt7
-//w:
-//r:3.2
-//
-#define text_softkey_continue "Continue"
-
-// End of File
--- a/hotspotfw/hsbrowser/src/hsbrowserapp.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Implements the main application class.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <eikstart.h>
-
-#include "hsbrowserapp.h"
-#include "hsbrowserdocument.h"
-#include "hsbrowsercommon.h"
-#include "am_debug.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CHsBrowserApp::AppDllUid()
-// Returns application UID
-// ---------------------------------------------------------
-//
-TUid CHsBrowserApp::AppDllUid() const
-    {
-    return KUidHsBrowserApp;
-    }
-
-// ---------------------------------------------------------
-// CDictionaryStore* CHsBrowserApp::OpenIniFileLC(RFs& aFs) const
-// overrides CAknApplication::OpenIniFileLC to enable INI file support
-// ---------------------------------------------------------
-//
-CDictionaryStore* CHsBrowserApp::OpenIniFileLC( RFs& aFs ) const
-    {
-    return CEikApplication::OpenIniFileLC( aFs );
-    }
-   
-// ---------------------------------------------------------
-// CHsBrowserApp::CreateDocumentL()
-// Creates CHsBrowserAppDocument object
-// ---------------------------------------------------------
-//
-CApaDocument* CHsBrowserApp::CreateDocumentL()
-    {
-    return CHsBrowserDocument::NewL( *this );
-    }
-
-// ================= OTHER EXPORTED FUNCTIONS ==============
-//
-// ---------------------------------------------------------
-// NewApplication() 
-// Constructs CHsBrowserApp
-// Returns: created application object
-// ---------------------------------------------------------
-//
-LOCAL_C CApaApplication* NewApplication( )
-	{
-    return new CHsBrowserApp;
-    }
-    
-// ---------------------------------------------------------
-//    E32Main
-//    Main function for Symbian OS v9 EXE application
-//    Returns: TInt
-// ---------------------------------------------------------
-GLDEF_C TInt E32Main()
-    {
-	DEBUG( "***** Starting Hotspot Browser Logon Application..." );
-    return EikStart::RunApplication( NewApplication );
-    }
-
-// End of File  
--- a/hotspotfw/hsbrowser/src/hsbrowserappui.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +0,0 @@
-/*
-* Copyright (c) 2007 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:   The UI class for HotSpot Browser Application.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <avkon.hrh>
-#include <es_enum.h>
-#include <hsbrowser.rsg>
-#include <akntitle.h>
-#include <AknUtils.h>
-#include <hlplch.h>
-
-#include "hsbrowserappui.h"
-#include "hsbrowsercontainer.h" 
-#include "hsbrowserdocument.h"
-#include "hsbrowsercommon.h"
-#include "am_debug.h"
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ----------------------------------------------------------
-// CHsBrowserAppUi::ConstructL()
-// ----------------------------------------------------------
-//
-void CHsBrowserAppUi::ConstructL()
-    {
-    DEBUG( "CHsBrowserAppUi::ConstructL()" );
-    BaseConstructL( CAknAppUi::EAknEnableSkin );
-    CHsBrowserModel* model;
-    model = static_cast<CHsBrowserDocument*>(iDocument)->Model();
-    iAppContainer = new (ELeave) CHsBrowserContainer( model );
-    iAppContainer->SetMopParent( this );
-    iAppContainer->ConstructL( ClientRect() );
-    AddToStackL( iAppContainer );
-    }
-
-// ----------------------------------------------------
-// CHsBrowserAppUi::~CHsBrowserAppUi()
-// Destructor
-// Frees reserved resources
-// ----------------------------------------------------
-//
-CHsBrowserAppUi::~CHsBrowserAppUi()
-    {
-    DEBUG( "CHsBrowserAppUi::~CHsBrowserAppUi()" );
-    if ( iAppContainer )
-        {
-        RemoveFromStack( iAppContainer );
-        delete iAppContainer;
-        }        
-   }
-
-// ----------------------------------------------------
-// CHsBrowserAppUi::ProcessCommandParametersL
-// ----------------------------------------------------
-//
-TBool CHsBrowserAppUi::ProcessCommandParametersL(
-    CApaCommandLine& aCommandLine )
-    {
-    DEBUG( "CHsBrowserAppUi::ProcessCommandParametersL()" );
-    
-    TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
-	TApaTask task = taskList.FindApp( KUidHsBrowserApp );
-    task.BringToForeground();
-    
-    TBuf<KBufSize> args;
-    args.Copy( aCommandLine.DocumentName() );
-
-    if ( args.Length() == 0 )
-    {
-        // No arguments, meaning started from application menu.
-        // Continue normally, for testing purposes
-        return EFalse;	
-    }    
-    
-    TLex wordLex( args );
-    TPtrC word;
-    // get IAP ID
-    word.Set( wordLex.NextToken() );
-    TInt iapId;
-    TLex x1( word );
-    TInt err = x1.Val( iapId );
-    if ( err != KErrNone )
-        {
-        DEBUG1( "CHsBrowserAppUi::ProcessCommandParametersL() x1.Val(), err=%d",
-            err );
-        }
-    // get net ID
-    word.Set( wordLex.NextToken() );
-    TInt netId;
-    TLex x2( word );
-    err = x2.Val( netId );
-    if ( err != KErrNone )
-        {
-        DEBUG1( "CHsBrowserAppUi::ProcessCommandParametersL() x2.Val(), err=%d",
-            err );
-        }
-    // get URL
-    TPtrC url( wordLex.NextToken() );
-    
-    err = iAppContainer->LoadRedirect( url, iapId, netId );
-    if ( err != KErrNone )
-        {
-        DEBUG1( "CHsBrowserAppUi::ProcessCommandParametersL() LoadRedirect(), err=%d",
-            err );
-        }
-	return EFalse;
-}
-
-// ----------------------------------------------------
-// CHsBrowserAppUi::HandleCommandL(TInt aCommand)
-// ----------------------------------------------------
-//
-void CHsBrowserAppUi::HandleCommandL( TInt aCommand )
-    {
-    DEBUG1( "CHsBrowserAppUi::HandleCommandL() aCommmand=%d", aCommand );
-    
-    switch ( aCommand )
-        {
-        case EAknSoftkeyCancel:
-            {          
-            iAppContainer->HandleCommandL( aCommand );
-            Exit();                	
-            break;
-            }
-        case EAknSoftkeyClose:
-            {
-            // Now for sure we know that we are in input box. 
-            // Next close aCommand should be treated as EAknSoftkeyCancel
-            iAppContainer->SetActiveInputBox( ETrue );
-            // change softkey to Cancel...
-        	CEikButtonGroupContainer* cba = CEikonEnv::Static()->
-                AppUiFactory()->Cba();
-            if ( cba )
-            	{
-                cba->SetCommandSetL( R_AVKON_SOFTKEYS_CANCEL );
-                cba->DrawNow();
-            	}
-        	break;
-            }
-        case EAknSoftkeyExit:
-        case EAknSoftkeyBack:
-        case EEikCmdExit:
-            {
-            iAppContainer->HandleCommandL( aCommand );
-            Exit();
-            break;
-            }
-        case EAknCmdHelp:
-            {
-            HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
-                AppHelpContextL());
-            break;
-            }
-
-        default:
-            iAppContainer->HandleCommandL( aCommand );
-            break;      
-        }
-    }
-    
-// ----------------------------------------------------
-// CHsBrowserAppUi::HandleKeyEventL()
-// ----------------------------------------------------
-//
-TKeyResponse CHsBrowserAppUi::HandleKeyEventL(
-    const TKeyEvent& aKeyEvent,TEventCode aType)
-    {
-    //DEBUG( "CHsBrowserAppUi::HandleKeyEventL()" )
-    return iAppContainer->HandleKeyEventL(aKeyEvent, aType);
-    }
- 
-// ---------------------------------------------------------
-// CHsBrowserAppUi::HandleForegroundEventL()
-// ---------------------------------------------------------
-//
-void CHsBrowserAppUi::HandleForegroundEventL( TBool aForeground )
-    {
-    DEBUG( "CHsBrowserAppUi::HandleForegroundEventL()" );
- 
-    CAknAppUi::HandleForegroundEventL( aForeground );
-    if ( iAppContainer )
-   	    {
-        iAppContainer->ProcessForegroundEvent( aForeground );
-        }
-    }
-    
-    
-// End of File  
--- a/hotspotfw/hsbrowser/src/hsbrowsercontainer.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,687 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Implementation of the container control for HotSpot Browser Application.
-*
-*/
-
-// INCLUDE FILES
-#include <eiklabel.h>
-#include <avkon.hrh>
-#include <hsbrowser.rsg>
-#include <brctlinterface.h>
-#include <charconv.h>
-#include <gdi.h>
-#include <bitdev.h>
-#include <eikenv.h> 
-#include <AknDef.h>
-#include <AknUtils.h>
-#include <apgtask.h>
-#include <es_enum.h>
-#include <coecobs.h>
-#include <coecntrl.h>
-#include <apgwgnam.h>
-#include <aknnavi.h> 
-#include <AknIndicatorContainer.h>
-#include <aknnavilabel.h> 
-#include <aknnavide.h>
-#include <aknappui.h>
-#include <aknnotewrappers.h> 
-#include <StringLoader.h>
-#include <bautils.h>
-#include <data_caging_path_literals.hrh>
-#include <AknGlobalNote.h>
-#include <hlplch.h>
-
-#include "hotspotclientserver.h"
-#include "hsbrowsercontainer.h"
-#include "hsbrowserloadeventobserver.h"
-#include "hsbrowserloadeventobserver.h"
-#include "hsbrowserspecialloadobserver.h"
-#include "hsbrowserictsobserver.h"
-#include "hsbrowserhssrvnotifs.h"
-#include "hsbrowsermodel.h"
-#include "hsbrowsercommon.h"
-#include "am_debug.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CHsBrowserContainer::CHsBrowserContainer()
-// Constructor.
-// ---------------------------------------------------------
-//
-CHsBrowserContainer::CHsBrowserContainer( CHsBrowserModel* aModel ) :
-    iModel( aModel ),
-    iNaviPane( NULL ),
-    iEditorIndicatorContainer( NULL),
-    iIndiContainer( NULL ),
-    iResource( 0 ),
-    iActiveInputBox( EFalse )
-	{
-	DEBUG( "CHsBrowserContainer::CHsBrowserContainer()" );
-	}
-
-
-// ---------------------------------------------------------
-// CHsBrowserContainer::ConstructL(const TRect& aRect)
-// EPOC two phased constructor
-// ---------------------------------------------------------
-//
-void CHsBrowserContainer::ConstructL( const TRect& aRect )
-    {
-    DEBUG( "CHsBrowserContainer::ConstructL()" );
-    CreateWindowL();
-        
-    // create observers
-    iHsBrowserSpecialLoadObserver = CHsBrowserSpecialLoadObserver::NewL();
-    iHsBrowserLoadEventObserver = CHsBrowserLoadEventObserver::NewL( this );
-    iHsBrowserIctsObserver = CHsBrowserIctsObserver::NewL( this );
-    iHsBrowserHsSrvNotifs = CHsBrowserHsSrvNotifs::NewL( this );
-    
-    iCommandBase = TBrCtlDefs::ECommandIdBase;
-    TUint brCtlCapabilities = TBrCtlDefs::ECapabilityLoadHttpFw |
-                              TBrCtlDefs::ECapabilityDisplayScrollBar |
-                              TBrCtlDefs::ECapabilityCursorNavigation;
-    iBrCtlInterface = CreateBrowserControlL(
-        this, 
-        aRect, 
-        brCtlCapabilities,
-        iCommandBase, 
-        NULL,  // softkey observer
-        NULL,  // link resolver
-        iHsBrowserSpecialLoadObserver,
-        NULL,  // layout observer
-        NULL,  // dialog provider
-        NULL,  // window observer
-        NULL );// download observer 
-      
-    // disable ESettingsSecurityWarnings setting,
-    // or implement MBrCtlDialogsProvider interface
-    // reason: default implementation of MBrCtlDialogsProvider::DialogConfirmL
-    // returns EFalse and page is not loaded.
-    iBrCtlInterface->SetBrowserSettingL(
-        TBrCtlDefs::ESettingsSecurityWarnings, EFalse );
-   
-    // auto load on
-    iBrCtlInterface->SetBrowserSettingL ( 
-            TBrCtlDefs::ESettingsAutoLoadImages, 
-            ETrue);
-
-    iBrCtlInterface->SetBrowserSettingL ( 
-            TBrCtlDefs::ESettingsCookiesEnabled, 
-            ETrue);
-    
-    iBrCtlInterface->SetBrowserSettingL ( 
-            TBrCtlDefs::ESettingsCSSFetchEnabled, 
-            ETrue);
-     
-     iBrCtlInterface->SetBrowserSettingL ( 
-            TBrCtlDefs::ESettingsECMAScriptEnabled, 
-            ETrue);
-
-    // this observer can be added and removed dynamically
-    iBrCtlInterface->AddLoadEventObserverL( iHsBrowserLoadEventObserver );     
-    
-    // init navi pane indicators
-    InitNaviPaneL();
-            
-    // load resource file
-    TFileName fileName;           
-    fileName.Append( KDriveZ );
-    fileName.Append( KDC_APP_RESOURCE_DIR );   
-    fileName.Append( KResourceFile );
-    BaflUtils::NearestLanguageFile( CCoeEnv::Static()->FsSession(),
-                                    fileName );
-    iResource = CCoeEnv::Static()->AddResourceFileL( fileName );
-    
-    HBufC* title = StringLoader::LoadL( R_QTN_NETW_CONSET_WBA_STATIC_TITLE );
-
-    iModel->SetStaticTitle( *title );
-    delete title;
-    
-    // activate WLAN MGMT API notifications,
-    // we need to know when network is lost
-    iMgtClient = CWlanMgmtClient::NewL();
-    iMgtClient->ActivateNotificationsL( *iHsBrowserHsSrvNotifs );
-    
-    SetRect( aRect ); // set the size
-    ActivateL(); // activate the window
-    SetFocus( ETrue );
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserContainer::~CHsBrowserContainer()
-// Destructor.
-// ---------------------------------------------------------
-//
-CHsBrowserContainer::~CHsBrowserContainer()
-    {
-    DEBUG( "CHsBrowserContainer::~CHsBrowserContainer()" );
-    if ( iMgtClient )
-        {
-        iMgtClient->CancelNotifications();
-        delete iMgtClient;
-        }
-    
-    iBrCtlInterface->RemoveLoadEventObserver( iHsBrowserLoadEventObserver );
-    delete iBrCtlInterface;
-    
-    // delete observers
-    delete iHsBrowserSpecialLoadObserver;
-    delete iHsBrowserLoadEventObserver;
-    delete iHsBrowserIctsObserver;
-    
-    // cancels also notifications
-    delete iHsBrowserHsSrvNotifs;
-    
-    if ( iResource )
-        {
-        CCoeEnv::Static()->DeleteResourceFile( iResource );        
-        }
-    
-    delete iEditorIndicatorContainer;      
-    DEBUG( "CHsBrowserContainer::~CHsBrowserContainer() DONE" );
-    }
-
-
-// ---------------------------------------------------------
-// CHsBrowserContainer::InitNaviPaneL()
-// Initializes the indicators in the navi pane.
-// ---------------------------------------------------------
-//
-void CHsBrowserContainer::InitNaviPaneL()
-	{
-    DEBUG( "CHsBrowserContainer::InitNaviPaneL()" );
-    if ( !iEditorIndicatorContainer )
-        {
-        CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();        
-        if ( statusPane )
-            {
-            iNaviPane = (CAknNavigationControlContainer*)
-                statusPane->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) );
-            if ( iNaviPane )
-            	{
-            	iEditorIndicatorContainer =
-            	    iNaviPane->CreateEditorIndicatorContainerL();
-            	}
-            }
-        }
-
-   	if ( !iIndiContainer && iEditorIndicatorContainer )
-        {
-        iIndiContainer = (CAknIndicatorContainer*) iEditorIndicatorContainer->DecoratedControl();
-    	}
-    
-    if ( iNaviPane && iEditorIndicatorContainer )
-    	{
-    	iNaviPane->PushL( *iEditorIndicatorContainer );
-    	}
-        	
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserContainer::SizeChanged()
-// Called by framework when the view size is changed
-// ---------------------------------------------------------
-//
-void CHsBrowserContainer::SizeChanged()
-    {
-    DEBUG( "CHsBrowserContainer::SizeChanged()" );
-    iBrCtlInterface->SetRect(Rect());
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserContainer::CountComponentControls() const
-// ---------------------------------------------------------
-//
-TInt CHsBrowserContainer::CountComponentControls() const
-    {
-    return KComponentsNumber;
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserContainer::ComponentControl(TInt aIndex) const
-// ---------------------------------------------------------
-//
-CCoeControl* CHsBrowserContainer::ComponentControl(TInt aIndex) const
-    {
-    switch ( aIndex )
-        {
-        case KBrCtlComponentIndex:
-            return iBrCtlInterface;
-        default:
-            return NULL;
-        }
-    }
-
-
-// ------------------------------------------------------------------
-// CHsBrowserContainer::UpdateNaviPane( TNaviPaneEvent aUpdateEvent )
-// ------------------------------------------------------------------
-//
-void CHsBrowserContainer::UpdateNaviPane( TNaviPaneEvent aUpdateEvent )
-	{
-	DEBUG( "CHsBrowserContainer::UpdateNaviPane()" );
-	
-    iIndiContainer->SetIndicatorState(
-        TUid::Uid( EAknNaviPaneEditorIndicatorMessageInfo ),
-        EAknIndicatorStateOn );
-                
-	switch( aUpdateEvent )
-        {
-        case ELoadingLoginPage:
-            {
-            TRAP_IGNORE( iIndiContainer->SetIndicatorValueL(
-                TUid::Uid( EAknNaviPaneEditorIndicatorMessageInfo ),
-                *iModel->StaticTitle() ) );
-            iIndiContainer->SetIndicatorState(
-                TUid::Uid( EAknNaviPaneEditorIndicatorWaitBar ),  
-                EAknIndicatorStateAnimate );
-            break;
-            }
-        case ELoadingUrl:
-            {
-            iIndiContainer->SetIndicatorState(
-                TUid::Uid( EAknNaviPaneEditorIndicatorWaitBar ),  
-                EAknIndicatorStateAnimate );
-            break;
-            }
-        case EPageTitleAvailable:
-            {
-            TRAP_IGNORE( iIndiContainer->SetIndicatorValueL(
-                TUid::Uid( EAknNaviPaneEditorIndicatorMessageInfo ),
-                *iModel->PageTitle() ) );
-            break;
-            }
-        case ELoadingFinished:
-            {
-            iIndiContainer->SetIndicatorState(
-                TUid::Uid( EAknNaviPaneEditorIndicatorWaitBar ),  
-                EAknIndicatorStateOff );
-            break;
-            }
-        }
-        
-        iIndiContainer->DrawNow();
-	}
-
-// ----------------------------------------------------
-// CHsBrowserContainer::HandleCommandL(TInt aCommand)
-// ----------------------------------------------------
-//
-void CHsBrowserContainer::HandleCommandL(TInt aCommand)
-    {
-    DEBUG1( "CHsBrowserContainer::HandleCommandL() aCommand=%d", aCommand );
-    switch ( aCommand )
-        {
-        case EAknSoftkeyNext:
-            ShowLoginCompleteNote();
-            SendToBackground();
-            break;
-        case EAknSoftkeyCancel:
-        case EAknSoftkeyBack:
-        case EAknSoftkeyExit:
-        case EEikCmdExit:
-            {
-            iBrCtlInterface->HandleCommandL( 
-                    TBrCtlDefs::ECommandCancelFetch + 
-                    TBrCtlDefs::ECommandIdBase );
-            iModel->SetState( EHsBrowserUiClosed, ETrue );
-            break;
-            }
-        case EAknCmdHelp:
-            {
-            HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
-                    iEikonEnv->EikAppUi()->AppHelpContextL());
-            break;
-            }
-        default:
-            if ( aCommand >= iCommandBase &&
-                    aCommand < iCommandBase + TBrCtlDefs::ECommandIdRange )
-                {
-                iBrCtlInterface->HandleCommandL( aCommand );
-                }              
-            break;      
-        }    
-    }
-
-// ----------------------------------------------------
-// CHsBrowserContainer::HandleKeyEventL(
-//     const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
-// ----------------------------------------------------
-//
-TKeyResponse CHsBrowserContainer::HandleKeyEventL(
-    const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
-    {
-    return EKeyWasNotConsumed;
-    }
-
-// ----------------------------------------------------
-// CHsBrowserContainer::SendToForeground()
-// ----------------------------------------------------
-//
-void CHsBrowserContainer::SendToForeground()
-	{
-	DEBUG( "CHsBrowserContainer::SendToForeground()" );
-	    
-    // because "Connecting via..." note hides hsbrowser,
-    // send hsbrowser to foreground
-    CCoeEnv::Static()->RootWin().SetOrdinalPosition( 0,
-    		ECoeWinPriorityNormal );
-    CCoeEnv::Static()->WsSession().Flush();  
-	}
-
-// ----------------------------------------------------
-// CHsBrowserContainer::RestorePositionAndPriority()
-// ----------------------------------------------------
-//
-void CHsBrowserContainer::RestorePositionAndPriority()
-	{
-	DEBUG( "CHsBrowserContainer::RestorePositionAndPriority()" );
-
-    RWindowGroup& wg = CEikonEnv::Static()->RootWin();
-	
-    // because "Connecting via..." note hides hsbrowser,
-    // it was assigned ECoeWinPriorityAlwaysAtFront priority,
-    // restore original now
-    if ( wg.OrdinalPriority() == ECoeWinPriorityAlwaysAtFront )
-    	{	
-    	CCoeEnv::Static()->RootWin().SetOrdinalPosition(
-    	        iModel->Position(), iModel->Priority() ); 	    	
-	    }
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserContainer::SendToBackground
-// ---------------------------------------------------------
-//
-void CHsBrowserContainer::SendToBackground()
-	{
-	DEBUG( "CHsBrowserContainer::SendToBackground()" );
-
-    RWindowGroup& wg = CEikonEnv::Static()->RootWin();
-    
-    // Construct en empty TApaTask object
-    // giving it a reference to the Window Server session    
-    TApaTask task( CEikonEnv::Static()->WsSession() );
-                
-    // Initialise the object with the window group id of
-    // our application (so that it represent our app)
-    task.SetWgId( wg.Identifier() );
-
-    // Request window server to bring our application
-    // to foreground
-    DEBUG("CHsBrowserContainer::SendToBackground() sending to background" );
-    task.SendToBackground();	  
-	}
-
-// ----------------------------------------------------
-// CHsBrowserContainer::ProcessForegroundEvent()
-// ----------------------------------------------------
-//
-void CHsBrowserContainer::ProcessForegroundEvent( TBool aForeground )
-	{
-	DEBUG1( "CHsBrowserContainer::ProcessForegroundEvent() aForeground = %d", aForeground );
-	iModel->SetForeground( aForeground );
-	UpdateSoftkeys();
-	}
-
-// ----------------------------------------------------
-// CHsBrowserContainer::OfferKeyEventL(const 
-//               TKeyEvent& aKeyEvent,TEventCode aType)
-// ----------------------------------------------------
-//
-TKeyResponse 
-CHsBrowserContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
-    {
-    DEBUG( "CHsBrowserContainer::OfferKeyEventL()" );
-  
-    TUint state = iModel->State();
-    TBrCtlDefs::TBrCtlElementType elem = iBrCtlInterface->FocusedElementType();
-    DEBUG1( "CHsBrowserContainer::OfferKeyEventL() type: %d", elem);
-
-    if ( elem == TBrCtlDefs::EElementActivatedInputBox || elem == TBrCtlDefs::EElementInputBox )
-    {
-        if ( !iActiveInputBox && state != EHsBrowserUiAuthenticatedOk )
-        {
-            // change softkey
-            CEikButtonGroupContainer* cba = CEikonEnv::Static()->
-            AppUiFactory()->Cba();
-            if ( cba )
-            {
-                cba->SetCommandSetL( R_HSBROWSER_SOFTKEYS_CANCEL );
-                cba->DrawNow();
-            }
-        }
-        iActiveInputBox = EFalse;
-    }
-    else 
-    {
-        CEikButtonGroupContainer* cba = CEikonEnv::Static()->
-        AppUiFactory()->Cba();
-        if ( cba && state != EHsBrowserUiAuthenticatedOk )
-        {
-            cba->SetCommandSetL( R_AVKON_SOFTKEYS_CANCEL );
-            cba->DrawNow();
-        }
-    }
-    DEBUG( "CHsBrowserContainer::OfferKeyEventL() done to iBrCtl" );
-    return iBrCtlInterface->OfferKeyEventL(aKeyEvent, aType);
-    }
-
-// ----------------------------------------------------
-// CHsBrowserContainer::HandleResourceChange()
-// ----------------------------------------------------
-//
-void CHsBrowserContainer::HandleResourceChange( TInt aType )
-    {
-    DEBUG( "CHsBrowserContainer::HandleResourceChange" );
-    CCoeControl::HandleResourceChange( aType );
- 
-    // Adjust Browser size to screen when screen layout is changed
-    // Vertical vs. horizontal
-    if ( aType == KEikDynamicLayoutVariantSwitch )
-        {
-        DEBUG( "CHsBrowserContainer::HandleResourceChange = KEikDynamicLayoutVariantSwitch" );
-        TRect mainPaneRect;
-        AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, 
-                                           mainPaneRect );
-        SetRect( mainPaneRect );
-        DrawDeferred();
-        }
-    }
-
-
-// ----------------------------------------------------
-// CHsBrowserContainer::UpdateSoftkeys()
-// ----------------------------------------------------
-//
-void CHsBrowserContainer::UpdateSoftkeys()
-	{
-	DEBUG( "CHsBrowserContainer::UpdateSoftkeys()" );
-	
-	TBool foreground = iModel->Foreground();
-	TUint state = iModel->State();
-
-	if ( !foreground && state == EHsBrowserUiAuthenticatedOk )
-	    {
-	    // R_HSBROWSER_SOFTKEYS_CONTINUE_EXIT
-	    CEikButtonGroupContainer* cba = CEikonEnv::Static()->AppUiFactory()->Cba();
-	    if ( cba )
-	        {
-	        TRAP_IGNORE( cba->SetCommandSetL( R_HSBROWSER_SOFTKEYS_CONTINUE_EXIT ) );
-	        cba->DrawNow();
-	        }
-	    }        
-	}
-
-// ----------------------------------------------------
-// CHsBrowserContainer::LoadRedirect
-// ----------------------------------------------------
-//
-TInt CHsBrowserContainer::LoadRedirect( const TPtrC& aUrl,
-    TInt aIapId, TInt aNetId )
-    {
-    DEBUG( "CHsBrowserContainer::LoadRedirect()" );
-    
-    TInt err = KErrNone;
-    
-    UpdateNaviPane( ELoadingLoginPage );
-    
-    // init model
-    iModel->SetIapId( aIapId );
-    iModel->SetNetId( aNetId );
-    iModel->SetUrl( aUrl ); 	
-    // attach
-    err = iModel->Attach();
-    if ( err != KErrNone )
-        {
-        DEBUG1( "CHsBrowserContainer::LoadRedirect() Attach() err=%d", err );	
-        }        
-    else    
-        {
-        TInt connPtr = REINTERPRET_CAST( TInt, &iModel->Connection() );
-        if ( iHsBrowserSpecialLoadObserver )
-            {
-            iHsBrowserSpecialLoadObserver->SetConnectionPtr( connPtr );
-            iHsBrowserSpecialLoadObserver->SetSockSvrHandle(
-                    iModel->SocketServ().Handle() );            	
-            }
-        }
-
-    if ( err == KErrNone )
-    	{
-    	TRAP( err, iBrCtlInterface->LoadUrlL( aUrl ) );
-    	DEBUG1( "CHsBrowserContainer::LoadRedirect() iBrCtlInterface->\
-            LoadUrlL() err=%d", err );
-    	}
-    return err;
-    }
-    
-// ---------------------------------------------------------
-// CHsBrowserContainer::ProcessWlanConnModeNotConnected
-// ---------------------------------------------------------
-//
-void CHsBrowserContainer::ProcessWlanConnModeNotConnected()
-	{
-	DEBUG( "CHsBrowserContainer::ProcessWlanConnModeNotConnected()" );
-	
-	// Workaround for "WLAN login application closed" error:
-	TRAP_IGNORE( iBrCtlInterface->HandleCommandL( 
-            TBrCtlDefs::ECommandCancelFetch + 
-            TBrCtlDefs::ECommandIdBase ));
-
-	ShowConnClosedNote();
-	iAvkonAppUi->Exit();
-	}
-    
-// ---------------------------------------------------------
-// CHsBrowserContainer::ShowLoginCompleteNote
-// ---------------------------------------------------------
-//
-void CHsBrowserContainer::ShowLoginCompleteNote()
-    {
-    TBool noteShown = iModel->LoginCompleteNoteShown();
-    DEBUG1( "CHsBrowserContainer::ShowLoginCompleteNote() noteShown=%d", noteShown );
-
-    TInt pos = CCoeEnv::Static()->RootWin().OrdinalPosition();
-    DEBUG1( "CHsBrowserContainer::ShowLoginCompleteNote() pos=%d", pos );
-
-    if ( !noteShown && pos == 0 )		
-        {
-        DEBUG( "CHsBrowserContainer::ShowLoginCompleteNote() showing note" );
-
-        HBufC* message = NULL;
-        TRAPD( err, message = StringLoader::LoadLC( R_QTN_NETW_CONSET_WBA_INFO_COMPLETE ); CleanupStack::Pop( message ) ); 
-        if (err == KErrNone)
-            {
-            // Global note needed here, because CAknInformationNote was sometimes causing chrashes
-            CAknGlobalNote* note = NULL;
-            TRAP( err, note = CAknGlobalNote::NewLC(); CleanupStack::Pop( note ) );
-            if (err == KErrNone)
-                {            
-                TRAP( err, note->ShowNoteL( EAknGlobalInformationNote, *message ) );
-                if (err == KErrNone)
-                    {
-                    DEBUG( "CHsBrowserContainer::ShowLoginCompleteNote(): Showing note DONE" );
-                    }
-                delete note;
-                }
-            delete message;
-            }
-        iModel->SetLoginCompleteNoteShown( ETrue );
-        }
-    }
-
-// ----------------------------------------------------
-// CHsBrowserContainer::ShowConnClosedNote
-// ----------------------------------------------------
-//
-void CHsBrowserContainer::ShowConnClosedNote()
-	{
-	DEBUG( "CHsBrowserContainer::ShowConnClosedNote()" );
-    if ( IsForeground() )
-        {
-        DEBUG( "CHsBrowserContainer::ShowConnClosedNote() Foreground" );
-	    HBufC* message = NULL;
-        TRAPD( err, message = StringLoader::LoadLC( R_QTN_NETW_CONSET_WBA_INFO_CLOSED ); CleanupStack::Pop( message ) );
- 	    if (err == KErrNone)
- 	        {
- 	        // use global note here, otherwise overlap problem
- 	        // appears with "Wlan network lost" note, which is
- 	        // also a global note.
- 	        CAknGlobalNote* note = NULL;
- 	        TRAP( err, note = CAknGlobalNote::NewLC(); CleanupStack::Pop( note ) );
- 	        if (err == KErrNone)
- 	            { 	        
- 	            TRAP( err, note->ShowNoteL( EAknGlobalInformationNote, *message ) );
- 	            if (err == KErrNone)
- 	                {
- 	                DEBUG( "CHsBrowserContainer::ShowConnClosedNote(): Showing note DONE" );
- 	                }
- 	            delete note;
- 	            }
- 	        delete message;
- 	        }
-		}
-	}
-
-// ----------------------------------------------------
-// CHsBrowserContainer::IsForeground()
-// ----------------------------------------------------
-//
-TBool CHsBrowserContainer::IsForeground()
-	{
-	DEBUG( "CHsBrowserContainer::IsForeground()" );
-	TInt32 foregroundUid(0);
-    RWsSession ws;
-    TInt ret = ws.Connect();
-    if ( KErrNone == ret )
-    	{
-    	TApaTaskList taskList = TApaTaskList( ws );
-    	TApaTask foregroundTask = taskList.FindByPos( 0 );
-    
-    	CApaWindowGroupName* wgName = NULL;
-    	TRAPD( err, wgName = CApaWindowGroupName::NewLC( ws, foregroundTask.WgId() ); CleanupStack::Pop( wgName ) );
-    	if (err == KErrNone)
-    	    {
-            foregroundUid = wgName->AppUid().iUid;
-            delete wgName;
-    	    }
-        ws.Close();
-    	}
-    return foregroundUid == KUidHsBrowserApp.iUid;
-	}
-
-// End of File
--- a/hotspotfw/hsbrowser/src/hsbrowserdocument.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Implements the document for application.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "hsbrowserdocument.h"
-#include "hsbrowserappui.h"
-#include "hsbrowsermodel.h"
-#include "am_debug.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------
-// CHsBrowserDocument::CHsBrowserDocument
-// ----------------------------------------------------
-//
-CHsBrowserDocument::CHsBrowserDocument( CEikApplication& aApp )
-: CAknDocument(aApp), iModel( NULL )  
-    {
-    }
-
-// ----------------------------------------------------
-// CHsBrowserDocument::~CHsBrowserDocument
-// ----------------------------------------------------
-//
-CHsBrowserDocument::~CHsBrowserDocument()
-    {
-    DEBUG( "CHsBrowserDocument::~CHsBrowserDocument()" );
-    if ( iModel )
-    	{
-    	delete iModel;
-    	}
-    }
-
-// ----------------------------------------------------
-// CHsBrowserDocument::ConstructL
-// ----------------------------------------------------
-//
-void CHsBrowserDocument::ConstructL()
-    {
-    DEBUG( "CHsBrowserDocument::ConstructL()" );
-    iModel = CHsBrowserModel::NewL();
-    }
-
-// ----------------------------------------------------
-// CHsBrowserDocument::NewL
-// ----------------------------------------------------
-//
-CHsBrowserDocument* CHsBrowserDocument::NewL(
-        CEikApplication& aApp)     
-    {
-    CHsBrowserDocument* self = new (ELeave) CHsBrowserDocument( aApp );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-    
-// ----------------------------------------------------
-// CHsBrowserDocument::CreateAppUiL()
-// constructs CBrCtlSampleAppUi
-// ----------------------------------------------------
-//
-CEikAppUi* CHsBrowserDocument::CreateAppUiL()
-    {
-    return new (ELeave) CHsBrowserAppUi;
-    }
-
-// End of File  
--- a/hotspotfw/hsbrowser/src/hsbrowserhssrvnotifs.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Implements notifications interface from Hotspot server in order
-*                to receive wlan connection closed notification.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <apgtask.h>
-#include <eikenv.h>
-
-#include "hsbrowserhssrvnotifs.h"
-#include "hsbrowsercontainer.h"
-#include "am_debug.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CHsBrowserHsSrvNotifs::NewL
-// ---------------------------------------------------------
-//
-CHsBrowserHsSrvNotifs* CHsBrowserHsSrvNotifs::NewL(
-    CHsBrowserContainer* aContainer )
-    {
-    DEBUG( "CHsBrowserHsSrvNotifs::CHsBrowserHsSrvNotifs::NewL()()" );
-    CHsBrowserHsSrvNotifs* self = new(ELeave) CHsBrowserHsSrvNotifs( aContainer );
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserHsSrvNotifs::CHsBrowserHsSrvNotifs
-// ---------------------------------------------------------
-//
-CHsBrowserHsSrvNotifs::~CHsBrowserHsSrvNotifs()
-    {
-    DEBUG( "CHsBrowserHsSrvNotifs::~CHsBrowserHsSrvNotifs()" );
-    }
-    
-// -----------------------------------------------------------------------------
-// CHsBrowserHsSrvNotifs::ConnectionStateChanged
-// -----------------------------------------------------------------------------
-//  
-
-void CHsBrowserHsSrvNotifs::ConnectionStateChanged( TWlanConnectionMode aNewState )
-	{
-	    DEBUG1( "CHsBrowserHsSrvNotifs::ConnectionStateChanged() aNewState=%d", aNewState );
-	    if ( aNewState == EWlanConnectionModeNotConnected )
-	    	{
-	    	iContainer->ProcessWlanConnModeNotConnected();
-	    	}
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserHsSrvNotifs::CHsBrowserHsSrvNotifs
-// ---------------------------------------------------------
-//
-CHsBrowserHsSrvNotifs::CHsBrowserHsSrvNotifs(
-    CHsBrowserContainer* aContainer ) : iContainer( aContainer )
-  	{
-  	DEBUG( "CHsBrowserHsSrvNotifs::CHsBrowserHsSrvNotifs()" );
-  	}      
-
-// ---------------------------------------------------------
-// CHsBrowserHsSrvNotifs::ConstructL
-// ---------------------------------------------------------
-//
-void CHsBrowserHsSrvNotifs::ConstructL()
-    {
-    DEBUG( "CHsBrowserHsSrvNotifs::ConstructL()" );
-    }
-	
-// End of File  
--- a/hotspotfw/hsbrowser/src/hsbrowserictsobserver.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Implements callback interface for Internet Connectivity Test Service
-*                notifications.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <apgtask.h>
-#include <eikenv.h>
-
-#include "hsbrowserictsobserver.h"
-#include "hsbrowsercontainer.h"
-#include "hotspotclientserver.h"
-#include "hsbrowsermodel.h"
-#include "am_debug.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CHsBrowserIctsObserver::NewL
-// ---------------------------------------------------------
-//
-CHsBrowserIctsObserver* CHsBrowserIctsObserver::NewL(
-    CHsBrowserContainer* aContainer )
-    {
-    DEBUG( "CHsBrowserIctsObserver::CHsBrowserIctsObserver::NewL()()" );
-    CHsBrowserIctsObserver* self = new(ELeave) CHsBrowserIctsObserver( aContainer );
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserIctsObserver::~CHsBrowserIctsObserver
-// ---------------------------------------------------------
-//
-CHsBrowserIctsObserver::~CHsBrowserIctsObserver()
-    {
-    DEBUG( "CHsBrowserIctsObserver::~CHsBrowserIctsObserver()" );
-    }
-    
-// -----------------------------------------------------------------------------
-// CHsBrowserIctsObserver::ConnectivityObserver
-// -----------------------------------------------------------------------------
-//  
-void CHsBrowserIctsObserver::ConnectivityObserver( TIctsTestResult aResult,
-    const TDesC& /* aString */ )
-    {
-    DEBUG1("CHsBrowserIctsObserver::ConnectivityObserver() result: %d", aResult);
-    switch ( aResult )
-        {
-        case EConnectionOk :
-            ProcessConnectionOk();
-            break;
-        case EHttpAuthenticationNeeded :
-        case EConnectionNotOk :
-        case ETimeout :
-        default:
-            break;
-        }
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserIctsObserver::ProcessConnectionOk
-// ---------------------------------------------------------
-//
-void CHsBrowserIctsObserver::ProcessConnectionOk()
-	{
-    DEBUG( "CHsBrowserIctsObserver::ProcessConnectionOk()" );
-    if ( iContainer )
-        {
-        CHsBrowserModel* model = iContainer->Model();
-        if ( model )
-            {
-            model->SetState( EHsBrowserUiAuthenticatedOk, ETrue );
-            }
-        iContainer->ShowLoginCompleteNote();
-        iContainer->SendToBackground();
-        iContainer->UpdateSoftkeys();
-        }
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserIctsObserver::CHsBrowserIctsObserver
-// ---------------------------------------------------------
-//
-CHsBrowserIctsObserver::CHsBrowserIctsObserver(
-    CHsBrowserContainer* aContainer ) : iContainer( aContainer )
-  	{
-  	DEBUG( "CHsBrowserIctsObserver::CHsBrowserIctsObserver()" );
-  	}      
-
-// ---------------------------------------------------------
-// CHsBrowserIctsObserver::ConstructL
-// ---------------------------------------------------------
-//
-void CHsBrowserIctsObserver::ConstructL()
-    {
-    DEBUG( "CHsBrowserIctsObserver::ConstructL()" );
-    }
-	
-// End of File  
--- a/hotspotfw/hsbrowser/src/hsbrowserloadeventobserver.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,324 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Handle load progress events
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <e32cmn.h>
-#include <eikenv.h>
-#include <aknappui.h>
-#include <akntitle.h>
-#include <aknnavilabel.h>
-#include <apgcli.h>
-#include <ictsclientinterface.h>
-#include "hotspotclientserver.h"
-
-#include "hsbrowsercontainer.h"
-#include "hsbrowserloadeventobserver.h"
-#include "hsbrowserictsobserver.h"
-#include "hsbrowsermodel.h"
-#include "hsbrowsercommon.h"
-#include "am_debug.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CHsBrowserLoadEventObserver::NewL
-// ---------------------------------------------------------
-//
-CHsBrowserLoadEventObserver* 
-CHsBrowserLoadEventObserver::NewL( CHsBrowserContainer* aContainer )
-    {
-    DEBUG( "CHsBrowserLoadEventObserver::NewL()" );
-    CHsBrowserLoadEventObserver* self = new(ELeave)
-	    CHsBrowserLoadEventObserver( aContainer );
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserLoadEventObserver::~CHsBrowserLoadEventObserver
-// ---------------------------------------------------------
-//
-CHsBrowserLoadEventObserver::~CHsBrowserLoadEventObserver()
-    {
-    DEBUG( "CHsBrowserLoadEventObserver::~CHsBrowserLoadEventObserver()" );
-    if ( iIcts )
-        {
-        delete iIcts;	
-        }
-    
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserLoadEventObserver::HandleBrowserLoadEventL
-// ---------------------------------------------------------
-//
-void CHsBrowserLoadEventObserver::HandleBrowserLoadEventL(
-    TBrCtlDefs::TBrCtlLoadEvent aLoadEvent,
-    TUint /* aSize */, 
-    TUint16 /* aTransactionId */ ) 
-    {
-    DEBUG1( "CHsBrowserLoadEventObserver::HandleBrowserLoadEventL() event=%d", aLoadEvent );
-
-    switch( aLoadEvent )
-        {
-        case TBrCtlDefs::EEventUrlLoadingStart:
-        	{
-        	if ( !iIsFirstLoad )
-        		{
-        		iContainer->UpdateNaviPane( CHsBrowserContainer::ELoadingUrl );
-        		}
-        	else
-        		{
-        		iIsFirstLoad = EFalse;
-        		}
-            // no break, fall through
-        	}
-		case TBrCtlDefs::EEventNewContentDisplayed:
-        case TBrCtlDefs::EEventNewContentStart:
-            {
-            DEBUG( "CHsBrowserLoadEventObserver::HandleBrowserLoadEventL() EEventNewContentStart" );            
-            if ( iDoIct )
-            	{
-            	DEBUG( "CHsBrowserLoadEventObserver::HandleBrowserLoadEventL() Start testing internet connectivity.");
-            	iDoIct = EFalse;
-				TRAPD( err, TestInternetConnectivityL() );
-				if ( err != KErrNone )
-					{
-					DEBUG1( "CHsBrowserLoadEventObserver::HandleBrowserLoadEventL() err=%d.", err );
-					}
-           	    }
-            break;
-            }
-        case TBrCtlDefs::EEventLoadFinished://EEventUrlLoadingFinished:
-            {
-            DEBUG( "CHsBrowserLoadEventObserver::HandleBrowserLoadEventL() EEventUrlLoadingFinished" );
-            // We've finished loading one element of page
-            iContainer->UpdateNaviPane( CHsBrowserContainer::ELoadingFinished );
-            break;
-            }
-        case TBrCtlDefs::EEventTitleAvailable:
-            {
-            DEBUG( "CHsBrowserLoadEventObserver::HandleBrowserLoadEventL() EEventTitleAvailable" );
-            UpdateNameL();
-            break;
-            }
-        default:
-        	{
-            break;
-        	}
-        }   // end of switch
-        
-    UpdateDoIctFlagL();
-    
-    if ( iContainer )
-    	{
-        iContainer->DrawNow();
-        iContainer->MakeVisible( ETrue );    	
-    	}   
-    }
-    
-// ---------------------------------------------------------
-// CHsBrowserLoadEventObserver::CHsBrowserLoadEventObserver
-// ---------------------------------------------------------
-//
-CHsBrowserLoadEventObserver::CHsBrowserLoadEventObserver(
-    CHsBrowserContainer* aContainer ) : 
-    iContainer( aContainer ),
-    iIcts( NULL ),
-    iDoIct( EFalse ),
-    iIsFirstLoad( ETrue )
-    {
-    DEBUG( "CHsBrowserLoadEventObserver::CHsBrowserLoadEventObserver()" );
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserLoadEventObserver::ConstructL
-// ---------------------------------------------------------
-//
-void 
-CHsBrowserLoadEventObserver::ConstructL()
-    {
-    DEBUG( "CHsBrowserLoadEventObserver::ConstructL()" );
-    }
-
-// ----------------------------------------------------
-// CHsBrowserLoadEventObserver::UpdateNaviLabel()
-// ----------------------------------------------------
-//
-void CHsBrowserLoadEventObserver::UpdateNaviLabel( const TDesC& aName )
-    {
-    DEBUG( "CHsBrowserLoadEventObserver::UpdateNaviLabel()" );
-    if ( iContainer )
-        {
-        TRAPD( err, iContainer->NaviLabel()->SetTextL( aName ) );
-        if ( err == KErrNone )
-        	{
-        	iContainer->NaviLabel()->DrawDeferred( );
-        	}
-        else
-          	{
-            DEBUG1( "CHsBrowserLoadEventObserver::UpdateNaviLabel() err=%d", err );
-            }
-        }
-    }
-
-// ----------------------------------------------------
-// CHsBrowserLoadEventObserver::UpdateFastSwapNameL()
-// ----------------------------------------------------
-//
-void CHsBrowserLoadEventObserver::UpdateFastSwapNameL( const TDesC& aName )
-	{
-    DEBUG( "CHsBrowserLoadEventObserver::UpdateFastSwapNameL()" );
-
-    RApaLsSession appArcSession;
-    TInt err = KErrNone;
-    TApaAppInfo info;
-    
-    err = appArcSession.Connect(); // connect to AppArc server
-    if( KErrNone == err )
-    	{
-    	CleanupClosePushL( appArcSession );
-    	appArcSession.GetAppInfo( info, KUidHsBrowserApp );
-
-    	if ( aName.Length() > KApaMaxAppCaption )
-    		{
-    		TPtrC shortName = aName.Left( KApaMaxAppCaption );
-    		err = appArcSession.SetAppShortCaption( shortName, ELangNone, KUidHsBrowserApp );
-    		}
-    	else
-    		{
-    		err = appArcSession.SetAppShortCaption( aName, ELangNone, KUidHsBrowserApp );
-    		}
-    	if ( err != KErrNone )
-    		{
-    		DEBUG1( "CHsBrowserLoadEventObserver::UpdateFastSwapNameL() err=%d", err );
-    		}
-    	CleanupStack::PopAndDestroy( &appArcSession );	
-    	}
-	}
-
-// ----------------------------------------------------
-// CHsBrowserLoadEventObserver::UpdateNameL()
-// ----------------------------------------------------
-//
-void CHsBrowserLoadEventObserver::UpdateNameL()
-    {
-    DEBUG( "CHsBrowserLoadEventObserver::UpdateNameL()" );
-    CBrCtlInterface* brCtlInterface = NULL;
-    if ( iContainer )
-    	{
-    	brCtlInterface = iContainer->BrCtlInterface();
-    	}
-    if ( !brCtlInterface )
-    	{
-    	return;
-    	}    
-    HBufC* title = brCtlInterface->PageInfoLC( TBrCtlDefs::EPageInfoTitle );
-    if ( title )
-    	{
-    	UpdateFastSwapNameL( *title );
-   	    CHsBrowserModel* model = iContainer->Model();
-        if ( model )
-        	{
-        	model->SetPageTitle( *title );
-            iContainer->UpdateNaviPane( CHsBrowserContainer::EPageTitleAvailable );
-            }
-        }
-    CleanupStack::PopAndDestroy( title );
-    }
-
-// -----------------------------------------------------------------------------
-// CHsBrowserLoadEventObserver::TestInternetConnectivityL
-// -----------------------------------------------------------------------------
-//
-void CHsBrowserLoadEventObserver::TestInternetConnectivityL()
-    {
-	DEBUG( "CHsBrowserLoadEventObserver::TestInternetConnectivity() 7" );
-	
-	if ( !iContainer )
-		{
-	    DEBUG( "CHsBrowserLoadEventObserver::TestInternetConnectivity() iContainer=NULL" );
-	    return;	
-		}
-    CHsBrowserModel* model = iContainer->Model();
-    if ( !model )
-   	    {
-   	    DEBUG( "CHsBrowserLoadEventObserver::TestInternetConnectivity() model=NULL" );
-   	    return;
-   	    }
-    CHsBrowserIctsObserver* observer = iContainer->HsBrowserIctsObserver();
-    if ( !observer )
-        {
-        DEBUG( "CHsBrowserLoadEventObserver::TestInternetConnectivity() observer=NULL" );
-        return;
-        }
-    DEBUG1( "CHsBrowserLoadEventObserver::TestInternetConnectivity() iap=%d", model->IapId() );
-    DEBUG1( "CHsBrowserLoadEventObserver::TestInternetConnectivity() netid=%d", model->NetId() );
-    if ( !iIcts )
-        {
-        iIcts = CIctsClientInterface::NewL( model->IapId(), model->NetId(), *observer );
-        }
-    else
-        {
-        // stop previously started polling
-        iIcts->StopPolling();
-        }
-    // Start polling
-    DEBUG( "CHsBrowserLoadEventObserver::TestInternetConnectivity() starting ICT" );
-    iIcts->StartPolling( KTotalPollingTime, KExecutionTimeInterval );
-    }
-
-// -----------------------------------------------------------------------------
-// CHsBrowserLoadEventObserver::UpdateDoIctFlagL
-// -----------------------------------------------------------------------------
-//
-void CHsBrowserLoadEventObserver::UpdateDoIctFlagL()
-	{
-	DEBUG( "CHsBrowserLoadEventObserver::UpdateDoIctFlagL()" );
-    CBrCtlInterface* brCtlInterface = NULL;
-    CHsBrowserModel* model = NULL;
-    if ( iContainer )
-    	{
-    	brCtlInterface = iContainer->BrCtlInterface();
-    	model = iContainer->Model();
-    	}
-    if ( brCtlInterface && model )
-    	{
-        // get url
-        HBufC* url = brCtlInterface->PageInfoLC( TBrCtlDefs::EPageInfoUrl );
-        if ( url )
-        	{
-            DEBUG1( "url=%S", url );        
-            if ( url->Compare( *model->Url() ) == 0 )
-               { // match
-               iDoIct = ETrue;
-               DEBUG( "CHsBrowserLoadEventObserver::HandleBrowserLoadEventL() iDoIct = ETrue." );
-               }
-    	    }	
-        else
-        	{
-        	DEBUG( "CHsBrowserLoadEventObserver::UpdateDoIctFlagL() url=NULL" );
-        	}
-        CleanupStack::PopAndDestroy( url );
-    	}
-	}
-
-// End of File  
--- a/hotspotfw/hsbrowser/src/hsbrowsermodel.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Implements the model for application.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <es_enum.h>
-#include <coemain.h>
-
-#include "hotspotclientserver.h"
-#include "hsbrowsermodel.h"
-#include "am_debug.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------
-// CHsBrowserModel::NewL
-// ----------------------------------------------------
-//
-CHsBrowserModel* CHsBrowserModel::NewL()
-	{
-	DEBUG( "CHsBrowserModel::NewL()" );
-    CHsBrowserModel* self = new(ELeave) CHsBrowserModel();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-	}
-
-// ----------------------------------------------------
-// CHsBrowserModel::~CHsBrowserModel
-// ----------------------------------------------------
-//
-CHsBrowserModel::~CHsBrowserModel()
-	{
-	DEBUG( "CHsBrowserModel::~CHsBrowserModel()" );
-	if ( iUrl )
-		{
-		delete iUrl;
-		}
-    if ( iState != EHsBrowserUiClosed )
-        {
-        iHsServer.SetUiState( iIapId, EHsBrowserUiClosed );
-        }
-
-	iHsServer.Close();
-    // Removed iConnection and iSocketServ Close() calls.
-    // It seems like Browser Control is freeing them as it's using them also.
-
-	if ( iStaticTitle )
-		{
-		delete iStaticTitle;
-		}
-    if ( iPageTitle )
-    	{
-    	delete iPageTitle;
-    	}
-    DEBUG( "CHsBrowserModel::~CHsBrowserModel() DONE" );
-	}
-
-// ----------------------------------------------------
-// CHsBrowserModel::SetState
-// ----------------------------------------------------
-//
-void CHsBrowserModel::SetState( TUint state, TBool sendToHss )
-	{
-	DEBUG( "CHsBrowserModel::SetState()" );
-    iState = state;
-    if ( sendToHss )
-    	{
-    	iHsServer.SetUiState( iIapId, iState );
-    	}
-	}
-
-// ----------------------------------------------------
-// CHsBrowserModel::Attach
-// ----------------------------------------------------
-//
-TInt CHsBrowserModel::Attach()
-	{
-	DEBUG( "CHsBrowserModel::Attach() 1" );
-    TInt err = KErrNone;
-    TConnectionInfoBuf currentConnInfo;
-	// Open channel to Socket Server
-    err = iSocketServ.Connect();
-    if ( err != KErrNone)
-    	{
-    	return err;
-    	}
-    // Open connection
-    err = iConnection.Open( iSocketServ );
-    if ( err != KErrNone)
-    	{
-    	return err;
-    	} 
-    currentConnInfo().iIapId = iIapId;
-    currentConnInfo().iNetId = iNetId;
-    
-	err = iConnection.Attach( currentConnInfo,
-							  RConnection::EAttachTypeMonitor );
-	
-	if (err != KErrNone)
-	    {
-	    iConnection.Close(); // Just to be sure...
-	    }
-	
-	return err;
-	}
-
-// ----------------------------------------------------
-// CHsBrowserModel::CHsBrowserModel
-// ----------------------------------------------------
-//
-CHsBrowserModel::CHsBrowserModel() :
-    iIapId( 1 ), 
-    iNetId( 0 ),
-    iUrl( NULL ),
-    iState( 0 ),
-    iForeground( ETrue ),
-    iLoginCompleteNoteShown( EFalse ),
-    iStaticTitle( NULL ),
-    iPageTitle( NULL)
-    {
-    DEBUG( "CHsBrowserModel::CHsBrowserModel()" );
-    }
-
-// ----------------------------------------------------
-// CHsBrowserModel::ConstructL
-// ----------------------------------------------------
-//
-void CHsBrowserModel::ConstructL()
-    {
-    DEBUG( "CHsBrowserModel::ConstructL()" );
-    User::LeaveIfError( iHsServer.Connect() );
-    iPosition = CCoeEnv::Static()->RootWin().OrdinalPosition();
-    iPriority = CCoeEnv::Static()->RootWin().OrdinalPriority();
-    }
-
-// end of file
--- a/hotspotfw/hsbrowser/src/hsbrowserspecialloadobserver.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2007 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:   Handle special load requests like Non-HTTP(S) load requests,
-*                and Non-HTML content. Control over network connections
-*
-*/
-
-
-
-// INCLUDE FILES
-
-#include "hsbrowserspecialloadobserver.h"
-#include "am_debug.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CHsBrowserSpecialLoadObserver::NetworkConnectionNeededL
-// ---------------------------------------------------------
-//
-void CHsBrowserSpecialLoadObserver::NetworkConnectionNeededL(
-    TInt* aConnectionPtr,
-    TInt* aSockSvrHandle,
-    TBool* /*aNewConn*/,
-    TApBearerType* /*aBearerType*/) 
-    {
-    DEBUG( "CHsBrowserSpecialLoadObserver::NetworkConnectionNeededL()" );
-    *aConnectionPtr = iConnectionPtr;
-    *aSockSvrHandle = iSockSvrHandle;
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserSpecialLoadObserver::HandleRequestL
-// ---------------------------------------------------------
-//
-TBool CHsBrowserSpecialLoadObserver::HandleRequestL(
-    RArray<TUint>* /*aTypeArray*/,
-    CDesCArrayFlat* /*aDesArray*/) 
-    {
-    DEBUG( "CHsBrowserSpecialLoadObserver::HandleRequestL()" );
-    return EFalse;
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserSpecialLoadObserver::HandleDownloadL
-// ---------------------------------------------------------
-//
-TBool CHsBrowserSpecialLoadObserver::HandleDownloadL(
-    RArray<TUint>* /*aTypeArray*/,
-    CDesCArrayFlat* /*aDesArray*/)
-    {
-    DEBUG( "CHsBrowserSpecialLoadObserver::HandleDownloadL()" );
-    return EFalse;
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserSpecialLoadObserver::ConstructL
-// ---------------------------------------------------------
-//
-void CHsBrowserSpecialLoadObserver::ConstructL()
-    {
-    DEBUG( "CHsBrowserSpecialLoadObserver::ConstructL()" );
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserSpecialLoadObserver::~CHsBrowserSpecialLoadObserver
-// ---------------------------------------------------------
-//
-CHsBrowserSpecialLoadObserver::~CHsBrowserSpecialLoadObserver()
-    {
-    DEBUG( "CHsBrowserSpecialLoadObserver::~CHsBrowserSpecialLoadObserver()" );
-    }
-
-
-// ---------------------------------------------------------
-// CHsBrowserSpecialLoadObserver::NewL
-// ---------------------------------------------------------
-//
-CHsBrowserSpecialLoadObserver* CHsBrowserSpecialLoadObserver::NewL()
-    {
-    DEBUG( "CHsBrowserSpecialLoadObserver::CHsBrowserSpecialLoadObserver::NewL()()" );
-    CHsBrowserSpecialLoadObserver* self = new(ELeave)CHsBrowserSpecialLoadObserver;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------
-// CHsBrowserSpecialLoadObserver::SetConnectionPtr
-// ---------------------------------------------------------
-//
-void CHsBrowserSpecialLoadObserver::SetConnectionPtr( TInt aConnectionPtr )
-	{
-	iConnectionPtr = aConnectionPtr;
-	}
-
-// ---------------------------------------------------------
-// CHsBrowserSpecialLoadObserver::SetSockSvrHandle
-// ---------------------------------------------------------
-//        
-void CHsBrowserSpecialLoadObserver::SetSockSvrHandle( TInt aSockSvrHandle )
-	{
-	iSockSvrHandle = aSockSvrHandle;
-	}
-	
-// End of File  
--- a/hotspotfw/hsclient/src/hssiaphandler.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/hotspotfw/hsclient/src/hssiaphandler.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -24,11 +24,11 @@
 #include "am_debug.h"
 #include <es_enum.h>
 
-#include <cmconnectionmethodext.h>
+#include <cmconnectionmethod.h>
 #include <cmconnectionmethoddef.h>
-#include <cmmanagerext.h>
+#include <cmmanager.h>
 #include <cmmanagerdef.h>
-#include <cmdestinationext.h>
+#include <cmdestination.h>
 
 // CONSTANTS
 const TInt  KRetryCount   = 20;
@@ -96,22 +96,13 @@
     DEBUG("CHssIapHandler::ChangeSettingsL");
     TInt ret( KErrNone );
     
-    RCmManagerExt cmManager;
+    RCmManager cmManager;
     cmManager.OpenL();
     CleanupClosePushL( cmManager );
     
-    TUint easyWlanId = cmManager.EasyWlanIdL();
-    
-    // Easy WLAN can't be modified
-    if ( easyWlanId == aIapID )
-    	{
-        CleanupStack::PopAndDestroy( &cmManager ); 
-    	return KErrPermissionDenied;
-    	}
-    
     // Read WLAN table service id
     TUint32 serviceId(0);
-    RCmConnectionMethodExt plugin = cmManager.ConnectionMethodL( aIapID );
+    RCmConnectionMethod plugin = cmManager.ConnectionMethodL( aIapID );
     CleanupClosePushL( plugin );
     serviceId = plugin.GetIntAttributeL( EWlanServiceId );
     DEBUG1("CHssIapHandler::ChangeSettingsL WLAN serviceId: %d", serviceId);
@@ -348,11 +339,11 @@
     {
     DEBUG( "CHssIapHandler::GetNetworkIdL()" );
     
-    RCmManagerExt cmManager;
+    RCmManager cmManager;
     cmManager.OpenL();
     CleanupClosePushL( cmManager );
 
-    RCmConnectionMethodExt plugin = cmManager.ConnectionMethodL( aIapId );
+    RCmConnectionMethod plugin = cmManager.ConnectionMethodL( aIapId );
     CleanupClosePushL( plugin );
     
     aNetId = plugin.GetIntAttributeL( ECmNetworkId );
@@ -380,7 +371,7 @@
     RArray<TUint32> destArray = RArray<TUint32>( 10 );  // KCmArrayGranularity instead of 10
     CleanupClosePushL( destArray );
 
-    RCmManagerExt cmManager;
+    RCmManager cmManager;
     cmManager.OpenL();
     CleanupClosePushL( cmManager );    
 
@@ -388,7 +379,7 @@
 
     for (TInt i = 0; i < destArray.Count(); i++)
         {
-        RCmDestinationExt dest = cmManager.DestinationL( destArray[i] );
+        RCmDestination dest = cmManager.DestinationL( destArray[i] );
         CleanupClosePushL( dest );
 
         for (TInt j = 0; j < dest.ConnectionMethodCount(); j++)
--- a/hotspotfw/hsserver/group/hotspotserver.mmp	Wed Jun 23 19:25:42 2010 +0300
+++ b/hotspotfw/hsserver/group/hotspotserver.mmp	Tue Jul 06 15:29:22 2010 +0300
@@ -15,7 +15,6 @@
 *
 */
 
-
 #include <platform_paths.hrh>
 
 TARGET          HotSpotServer.exe
@@ -36,21 +35,18 @@
 
 USERINCLUDE		../inc
 USERINCLUDE		../../hsclient/inc
-USERINCLUDE		../../internetconnectivitytestservice/inc
+
 
 MW_LAYER_SYSTEMINCLUDE
 SYSTEMINCLUDE   /epoc32/include/ecom
 
 LIBRARY       euser.lib efsrv.lib esock.lib insock.lib
-LIBRARY       APPARC.lib apgrfx.lib
-LIBRARY       http.lib
 LIBRARY       inetprotutil.lib
 LIBRARY       ecom.lib
 LIBRARY       bafl.lib 
 LIBRARY       commdb.lib
 LIBRARY       commsdat.lib
 LIBRARY       wlandbif.lib
-LIBRARY       ictsclientinterface.lib
 LIBRARY       hal.lib
 LIBRARY       estor.lib 
 LIBRARY       centralrepository.lib
--- a/hotspotfw/hsserver/inc/hotspotclientserver.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/hotspotfw/hsserver/inc/hotspotclientserver.h	Tue Jul 06 15:29:22 2010 +0300
@@ -30,7 +30,6 @@
 
 _LIT( KHotSpotPlugin, "NetCfgExtnHotSpot" );
 _LIT( KDhcpPlugin, "NetCfgExtnDhcp" );
-const TUint KEasyWlanServiceId = 1;
 const TUid KHotspotServerUid3={0x10282ECB};
 
 const TUint KHssShutdown  = 777;
--- a/hotspotfw/hsserver/inc/hotspotserver.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/hotspotfw/hsserver/inc/hotspotserver.h	Tue Jul 06 15:29:22 2010 +0300
@@ -288,13 +288,6 @@
         * @param aIapId, IAP id
         */        
         void RemoveClientIap( TUint aIapId );
-
-        /**
-        * Returns Easy WLAN IAP id.
-        * @since Series 60 5.2
-        * @return Easy WLAN id
-        */        
-        TInt GetEasyWlanId();
         
     private:
         
@@ -393,11 +386,7 @@
         * Array for storing client IAPs and their UIDs.
         */
         RArray<SClientIaps> iClientIaps;
-        
-        /**
-        * Easy WLAN IAP Id
-        */
-        TInt iEasyWlanId;
+
 	};
 
 #endif
--- a/hotspotfw/hsserver/inc/hotspotsession.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/hotspotfw/hsserver/inc/hotspotsession.h	Tue Jul 06 15:29:22 2010 +0300
@@ -27,8 +27,6 @@
 #include <wlanmgmtinterface.h>
 #include <wlanmgmtcommon.h>
 #include <commdb.h>
-#include <ictscommon.h>
-#include <ictsclientinterface.h>
 #include "hssnotif.h"
 #include "hssiapsettingshandler.h"
 #include "hssclientinterface.h"
@@ -51,8 +49,7 @@
 * @lib HotSpotServer.exe
 * @since Series 60 3.0
 */
-NONSHARABLE_CLASS( CHotSpotSession ) : public CSession2, 
-                                       public MIctsObserver,
+NONSHARABLE_CLASS( CHotSpotSession ) : public CSession2,
                                        public MHssLoginTimerObserver,
                                        public MHssLogoutTimerObserver,
                                        public MWlanMgmtNotifications
@@ -96,16 +93,6 @@
         void DispatchMessageL( const RMessage2& aMessage );
         
         /**
-        * From MICTSObserver. Called when internet connectivity tests are
-        * being done.
-        * @param aResult Result of tests
-        * @param aString String containing possible HTML response
-        * @return None
-        */
-        void ConnectivityObserver( TIctsTestResult aResult, 
-                                   const TDesC& aString );
-               
-        /**
         * From MHssLoginTimerObserver. Called when time used for Login(..)
         * has run out for client.
         * @return None
@@ -150,30 +137,20 @@
         */
 
         void ConstructL();	
-         /**
-        * Initialize Scan to WlanEngine
-        * @return None
-        */
-
-         /**
-        * Launch Intenet Connectivity Test Service
-        * @return None
-        */
-        void TestInternetConnectivityL();
-        
+       
         /**
         * Starts client register procedures
         * @param aMessage, RMessage from client side
         * @return None
         */
-        void ProcessRegisterL( const RMessage2& aMessage );
+        void ProcessRegister( const RMessage2& aMessage );
         
         /**
         * Starts client unregister procedures
         * @param aMessage, RMessage from client side
         * @return None
         */
-        void ProcessUnRegisterL( const RMessage2& aMessage );
+        void ProcessUnRegister( const RMessage2& aMessage );
         
         /**
         * Starts login procedures
@@ -181,7 +158,7 @@
         * @param aNetId, Network id
         * @return KErrNone, if successful, otherwice one of system wide errorcodes.
         */
-        TInt ProcessStartLoginL( const TUint aIapId, const TUint aNetId );
+        TInt ProcessStartLogin( const TUint aIapId, const TUint aNetId );
         
           /**
         * Starts Join procedures
@@ -226,18 +203,6 @@
         void ProcessServerShutdown( const RMessage2& aMessage );
         
         /**
-        * Updates UI state of HotSpot browser logon application.
-        * @param aMessage, Message for completing request
-        */
-        void ProcessUiState( const RMessage2& aMessage );
-        
-        /**
-        * Start HotSpot browser logon application.
-        * @param aString, redirect URL
-        */        
-        void AuthenticateL( const TDesC& aString );
-        
-        /**
         * Removes brackets from the UID
         * @param aUid, UID of the client
         */
@@ -317,12 +282,6 @@
         * Own
         */
         CHssIapSettingsHandler* iIapSettingsHandler;
-        
-        /**
-        * Internet Connectivity testing instance
-        * Own
-        */
-        CIctsClientInterface* iIcts;
 
         /**
         * Timer used for client Login procedure
--- a/hotspotfw/hsserver/inc/hssiapsettingshandler.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/hotspotfw/hsserver/inc/hssiapsettingshandler.h	Tue Jul 06 15:29:22 2010 +0300
@@ -135,11 +135,6 @@
                                const TDesC& aUid );
         
         /**
-        * Create new IAP to Internet SNAP.
-        */
-        void CreateIapL();
-        
-        /**
         * Deletes the IAP
         * @param aIapID, IAP id
         */
--- a/hotspotfw/hsserver/src/hotspotserver.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/hotspotfw/hsserver/src/hotspotserver.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -25,12 +25,12 @@
 #include <e32std.h>
 #include <commsdattypesv1_1.h>
 
-#include <cmconnectionmethodext.h>
+#include <cmconnectionmethod.h>
 #include <cmconnectionmethoddef.h>
 #include <cmpluginwlandef.h>
-#include <cmmanagerext.h>
+#include <cmmanager.h>
 #include <cmmanagerdef.h>
-#include <cmdestinationext.h>
+#include <cmdestination.h>
 
 #include "hotspotserver.h"
 #include "am_debug.h"
@@ -158,8 +158,7 @@
     iLoginValue = ETrue;
     iAssociationValue = EFalse;
     iClientIapsChecked = KErrNone;
-    iEasyWlanId = KEasyWlanServiceId; // Set to default value just in case
-
+    
     TRAP( iClientIapsChecked, FindClientIapsL() );
  
     // Activate notifications for IAP check purposes. Done with every server startup.
@@ -204,7 +203,7 @@
 void CHotSpotServer::FindClientIapsL()
     {
     DEBUG("CHotSpotServer::FindClientIapsL()");
-    RCmManagerExt cmManager;
+    RCmManager cmManager;
     cmManager.OpenL();
     CleanupClosePushL(cmManager);
            
@@ -218,7 +217,7 @@
     
     for( TInt i = 0; i < cmArray.Count(); i++ )
         {
-        RCmConnectionMethodExt cm = cmManager.ConnectionMethodL( cmArray[i] );
+        RCmConnectionMethod cm = cmManager.ConnectionMethodL( cmArray[i] );
         CleanupClosePushL( cm );
         HBufC* daemonName = cm.GetStringAttributeL( 
                                                 ECmConfigDaemonManagerName );
@@ -243,11 +242,8 @@
         CleanupStack::PopAndDestroy( &cm );
         }
     CleanupStack::PopAndDestroy( &cmArray );
-    
-    // Read Easy WLAN IAP ID
-    iEasyWlanId = cmManager.EasyWlanIdL();
     CleanupStack::PopAndDestroy( &cmManager );
-    DEBUG1("CHotSpotServer::FindClientIapsL() iEasyWlanId: % d", iEasyWlanId);
+    DEBUG("CHotSpotServer::FindClientIapsL() Done");
     }
 
 // -----------------------------------------------------------------------------
@@ -280,11 +276,11 @@
         if ( error == KErrNotFound )
             {
             // Remove from database
-            RCmManagerExt cmManager;
+            RCmManager cmManager;
             cmManager.OpenL();
             CleanupClosePushL(cmManager);
             
-            RCmConnectionMethodExt cm;
+            RCmConnectionMethod cm;
             cm = cmManager.ConnectionMethodL( iClientIaps[i].iIapId );
             CleanupClosePushL( cm );
             cmManager.RemoveAllReferencesL( cm );
@@ -665,16 +661,6 @@
         }
     }
 
-// -----------------------------------------------------------------------------
-// GetEasyWlanId
-// -----------------------------------------------------------------------------
-//
-TInt CHotSpotServer::GetEasyWlanId()
-    {
-    DEBUG("CHotspotServer::GetEasyWlanId()");
-    return iEasyWlanId;
-    }
-
 // ========================== OTHER EXPORTED FUNCTIONS =========================
 
 // -----------------------------------------------------------------------------
--- a/hotspotfw/hsserver/src/hotspotsession.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/hotspotfw/hsserver/src/hotspotsession.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -25,14 +25,11 @@
 #include "hsslogouttimer.h"
 #include "hssclientinterface.h"
 #include "am_debug.h"
-#include <internetconnectivitycrkeys.h>
 #include <WlanCdbCols.h>
 #include <starterclient.h>
-#include <cmmanagerext.h>
 #include <e32std.h>
 #include <ecom.h>
 #include <f32file.h>
-#include <apgcli.h>
 
 // Forward declarations
 class CWlanMgmtClient;
@@ -118,11 +115,7 @@
         iLogoutTimer->Cancel();
         delete iLogoutTimer;
         }
-    
-    if ( iIcts != NULL )
-        {
-        delete iIcts;
-        }
+
     DEBUG( "CHotSpotSession::~CHotSpotSession() Done" );
     }
     
@@ -179,10 +172,10 @@
             HandleCancelNotifications( aMessage );
             break;
         case EHssRegister :
-            ProcessRegisterL( aMessage );
+            ProcessRegister( aMessage );
             break;
         case EHssUnRegister :
-            ProcessUnRegisterL( aMessage );
+            ProcessUnRegister( aMessage );
             break;
         case EHssJoin :
             iAllowNotifications = EFalse;
@@ -294,7 +287,7 @@
                 }
             else
                 {
-                err = ProcessStartLoginL( iIapId, iNetId );
+                err = ProcessStartLogin( iIapId, iNetId );
                 // If client not found, an error was returned. 
                 // Otherwise message completed elsewhere. 
                 if ( KErrNone != err )
@@ -462,21 +455,11 @@
             aMessage.Complete( KErrNone );
             break;
         case EHssUiState:
-            ProcessUiState( aMessage );
+            aMessage.Complete( KErrNotSupported );
             break;
         case EHssStartBrowser:
             {
-            TInt len = aMessage.GetDesLength( 0 );
-            iIapId = ( TInt )aMessage.Int1();
-            iNetId = ( TInt )aMessage.Int2();
-            err = iServer.SaveMessage( iIapId, aMessage, EHssStartBrowser );
-            HBufC* buf = HBufC::NewLC( len ); 
-            TPtr ptr( buf->Des() );
-            User::LeaveIfError( aMessage.Read( 0, ptr ) );     
-            
-            AuthenticateL( ptr );
-            
-            CleanupStack::PopAndDestroy(buf);
+            aMessage.Complete( KErrNotSupported );
             break;
             }
         case EHssSetTimerValues:
@@ -597,70 +580,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// TestInternetConnectivityL
-// -----------------------------------------------------------------------------
-//
-void CHotSpotSession::TestInternetConnectivityL()
-    {
-    DEBUG("CHotSpotSession::TestInternetConnectivityL");
-    if ( iIcts != NULL )
-        {
-        delete iIcts;
-        iIcts = NULL;
-        }
-   
-    iIcts = CIctsClientInterface::NewL( iIapId, iNetId, *this );
-    iIcts->StartL();
-    }
-
-// -----------------------------------------------------------------------------
-// ConnectivityObserver
-// -----------------------------------------------------------------------------
-//    
-void CHotSpotSession::ConnectivityObserver( TIctsTestResult aResult, 
-                                            const TDesC& aString )
-    {
-    DEBUG1("CHotSpotSession::ConnectivityObserver result: %d", aResult);
-    TInt indx( KErrNone );
-    switch ( aResult )
-        {
-        case EConnectionOk :
-            indx = iServer.FindMessage( iIapId, EHssStartLogin );
-            if ( KErrNotFound != indx )
-                {
-                iServer.CompleteMessage( indx, KErrNone );    
-                }
-            TRAPD( trap, iIapSettingsHandler->CreateIapL() );
-            if ( trap != KErrNone )
-                {
-                DEBUG1("CHotSpotSession::ConnectivityObserver trap: %d", trap);
-                }
-            break;
-        case EHttpAuthenticationNeeded :
-            // Start browser for authentication
-            TRAP_IGNORE( AuthenticateL( aString ) );
-            break;
-        case EConnectionNotOk :
-            indx = iServer.FindMessage( iIapId, EHssStartLogin );
-            if ( KErrNotFound != indx )
-                {
-                iServer.CompleteMessage( indx, KErrNone );    
-                }
-            break;
-        case ETimeout :
-            indx = iServer.FindMessage( iIapId, EHssStartLogin );
-            if ( KErrNotFound != indx )
-                {
-                iServer.CompleteMessage( indx, KErrNone );    
-                }
-            
-            break;
-        default:
-            break;
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // LoginTimeout
 // -----------------------------------------------------------------------------
 //   
@@ -713,12 +632,12 @@
     }
 
 // ---------------------------------------------------------
-// ProcessRegisterL
+// ProcessRegister
 // ---------------------------------------------------------
 //
-void CHotSpotSession::ProcessRegisterL( const RMessage2& aMessage )
+void CHotSpotSession::ProcessRegister( const RMessage2& aMessage )
     {
-    DEBUG("CHotSpotSession::ProcessRegisterL");
+    DEBUG("CHotSpotSession::ProcessRegister");
     
     iAllowNotifications = EFalse;
     TBufC< KIapNameLength > iapName;
@@ -758,33 +677,25 @@
     }
 
 // ---------------------------------------------------------
-// ProcessUnRegisterL
+// ProcessUnRegister
 // ---------------------------------------------------------
 //
-void CHotSpotSession::ProcessUnRegisterL( const RMessage2& aMessage )
+void CHotSpotSession::ProcessUnRegister( const RMessage2& aMessage )
     {
-    DEBUG("CHotSpotSession::ProcessUnRegisterL");
+    DEBUG("CHotSpotSession::ProcessUnRegister");
     iAllowNotifications = EFalse;
     TInt ret( KErrNone );
 
     // Read message
     TInt iapId = ( TInt )aMessage.Int0();
     iServer.RemoveClientIap( iapId );
-    // Check that this is not Easy WLAN
-    TInt easyWlan = iServer.GetEasyWlanId();
-    if ( easyWlan != iapId  )
+   
+    TRAPD( err, iIapSettingsHandler->DeleteIapL( iapId ) );
+    // return KErrGeneral if IAP removal is not successful
+    if ( err != KErrNone )
         {
-        TRAPD( err, iIapSettingsHandler->DeleteIapL( iapId ) );
-        // return KErrGeneral if IAP removal is not successful
-        if ( err != KErrNone )
-            {
-            ret = KErrGeneral;
-            }
+        ret = KErrGeneral;
         }
-    else
-        {
-        ret = KErrPermissionDenied;
-        }    
     aMessage.Complete( ret ); 
     DEBUG("CHotSpotSession::ProcessUnRegisterL DONE");
     }
@@ -793,24 +704,13 @@
 // ProcessStartLogin
 // -----------------------------------------------------------------------------
 //   
-TInt CHotSpotSession::ProcessStartLoginL( const TUint aIapId, const TUint aNetId )
+TInt CHotSpotSession::ProcessStartLogin( const TUint aIapId, const TUint aNetId )
     {
     DEBUG("CHotSpotSession::ProcessStartLogin");
     TInt ret( KErrNotFound );
     TBuf8<KExtensionAPILength> extAPI;
     iIapId = aIapId;
     
-    // Check if Easy WLAN.
-    TInt easyWlan = iServer.GetEasyWlanId();
-    if ( easyWlan == aIapId )
-        {
-         DEBUG("CHotSpotSession::ProcessStartLogin Easy WLAN detected");
-        // Just test internet connectivity and complete message later
-        TestInternetConnectivityL();
-        ret = KErrNone;
-        return ret;
-        }
-    
     TBuf<KUidLength> clientUid;
     TInt err = iServer.GetClientUid( aIapId, clientUid );
     
@@ -839,7 +739,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// ProcessStart
+// ProcessStartL
 // -----------------------------------------------------------------------------
 //   
 TInt CHotSpotSession::ProcessStartL( const TUint aIapId )
@@ -1035,106 +935,6 @@
     }
     
 // -----------------------------------------------------------------------------
-// ProcessUiState
-// -----------------------------------------------------------------------------
-//    
-void CHotSpotSession::ProcessUiState( const RMessage2& aMessage )
-    {
-    DEBUG( "CHotSpotSession::ProcessUiState()" );
-    TBool completeMsg = EFalse;
-    TInt indx( KErrNone );
-    TInt indxBrowser( KErrNone );
-    TInt ret( KErrNone );
-    iIapId = ( TInt )aMessage.Int0();
-
-    indx = iServer.FindMessage( iIapId, EHssStartLogin );
-    indxBrowser = iServer.FindMessage( iIapId, EHssStartBrowser );
-    THsBrowserUiStates uiState = ( THsBrowserUiStates ) aMessage.Int1(); // UI state
-    switch ( uiState )
-        {
-        case EHsBrowserUiRunning:
-            {
-            DEBUG( "CHotSpotSession::ProcessUiState() EHsBrowserUiRunning" );
-            break;
-            }
-        case EHsBrowserUiAuthenticatedOk:
-            {
-            DEBUG( "CHotSpotSession::ProcessUiState() EHsBrowserUiAuthenticatedOk" );
-
-            completeMsg = ETrue;
-            break;
-               }
-        case EHsBrowserUiAuthenticatedNok:
-            {
-            DEBUG( "CHotSpotSession::ProcessUiState() EHsBrowserUiAuthenticatedNok" );
-            completeMsg = ETrue;
-            break;
-            }
-        case EHsBrowserUiClosed:
-            {
-            DEBUG( "CHotSpotSession::ProcessUiState() EHsBrowserUiClosed" );
-            completeMsg = ETrue;
-            break;
-            }
-        default:
-            {
-            DEBUG( "CHotSpotSession::ProcessUiState() default" );
-            completeMsg = ETrue;
-            }
-        }
-		
-    if ( completeMsg )
-        {
-        // complete messages EHssStartLogin/EHssStartBrowser
-        if ( indx >= 0 )
-            {
-            DEBUG( "CHotSpotSession::ProcessUiState() completing EHssStartLogin" );
-            iServer.CompleteMessage( indx , KErrNone );
-            aMessage.Complete( KErrNone );
-            }
-        else if ( indxBrowser >= 0 )
-            {
-            DEBUG( "CHotSpotSession::ProcessUiState() completing EHssStartBrowser" );
-            iServer.CompleteMessage( indxBrowser, ret );
-            aMessage.Complete( KErrNone );
-            }
-        else
-            {
-            DEBUG( "CHotSpotSession::ProcessUiState() completing EHssUiState" );
-            aMessage.Complete( KErrNotFound );
-            }
-        }
-    }    
-    
-// -----------------------------------------------------------------------------
-// Authenticate()
-// -----------------------------------------------------------------------------
-//    
-void CHotSpotSession::AuthenticateL( const TDesC& aString )
-    {
-    DEBUG("CHotSpotSession::AuthenticateL()");
-
-    const TInt KBrowserUid = 0x2000AFCC; // hotspot browser application
-    HBufC* param = HBufC::NewLC( KMaxFileName );
-    _LIT(tmpString, "%d, %d, %S");
-    param->Des().Format( tmpString, iIapId, iNetId, &aString );
-    TUid uid( TUid::Uid( KBrowserUid ) );
-    RApaLsSession appArcSession;
-    User::LeaveIfError( appArcSession.Connect() ); // connect to AppArc server
-    CleanupClosePushL( appArcSession );
-    TThreadId id;
-    TInt err = appArcSession.StartDocument( *param, TUid::Uid( KBrowserUid ), id );
-    if ( err != KErrNone )
-        {
-        DEBUG1( "CHotSpotSession::AuthenticateL() StartDocument: %d", err );
-        }
-    CleanupStack::PopAndDestroy( &appArcSession );
-    CleanupStack::PopAndDestroy( param );
-
-    DEBUG("CHotSpotSession::AuthenticateLC() done");
-    }
-
-// -----------------------------------------------------------------------------
 // ModifyClientUid
 // -----------------------------------------------------------------------------
 //
--- a/hotspotfw/hsserver/src/hssiapsettingshandler.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/hotspotfw/hsserver/src/hssiapsettingshandler.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -23,10 +23,10 @@
 #include "am_debug.h"
 #include <es_enum.h>
 
-#include <cmconnectionmethodext.h>
+#include <cmconnectionmethod.h>
 #include <cmconnectionmethoddef.h>
-#include <cmdestinationext.h>
-#include <cmmanagerext.h>
+#include <cmdestination.h>
+#include <cmmanager.h>
 
 using namespace CMManager;
 
@@ -82,7 +82,7 @@
     {
     DEBUG("CHssIapSettingsHandler::CreateClientIapL");
 
-    RCmManagerExt cmManager;
+    RCmManager cmManager;
     cmManager.OpenL();
     CleanupClosePushL( cmManager );
     
@@ -91,7 +91,7 @@
     CleanupClosePushL( destinations );
     
     cmManager.AllDestinationsL( destinations );
-    RCmDestinationExt destination;
+    RCmDestination destination;
     // Loop through each destination
     for( TInt i = 0; i < destinations.Count(); i++ )
         {
@@ -101,7 +101,7 @@
         // Internet destination will have ESnapPurposeInternet set in its metadata.
         if (destination.MetadataL(CMManager::ESnapMetadataPurpose) == CMManager::ESnapPurposeInternet)
             {
-            RCmConnectionMethodExt plugin = cmManager.CreateConnectionMethodL( KUidWlanBearerType );
+            RCmConnectionMethod plugin = cmManager.CreateConnectionMethodL( KUidWlanBearerType );
             CleanupClosePushL( plugin );
                 
             plugin.SetStringAttributeL( ECmName, aIapName );
@@ -125,102 +125,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CreateIapL
-// -----------------------------------------------------------------------------
-//    
-void CHssIapSettingsHandler::CreateIapL()
-    {
-    DEBUG("CHssIapSettingsHandler::CreateIapL");
-
-    RCmManagerExt cmManager;
-    cmManager.OpenL();
-    CleanupClosePushL( cmManager );
-    
-    // Read all destination(SNAP) settings into an array
-    RArray<TUint32> destinations;
-    CleanupClosePushL( destinations );
-    
-    cmManager.AllDestinationsL( destinations );
-    RCmDestinationExt destination;
-    // Loop through each destination
-    for( TInt i = 0; i < destinations.Count(); i++ )
-        {
-        destination = cmManager.DestinationL( destinations[i] );
-        CleanupClosePushL( destination ); 
-        // Internet destination will always exist in the system.
-        // Internet destination will have ESnapPurposeInternet 
-        // set in its metadata.
-        if (destination.MetadataL( CMManager::ESnapMetadataPurpose ) == 
-                                        CMManager::ESnapPurposeInternet )
-            {
-            CWlanMgmtClient* wlanMgmtClient = CWlanMgmtClient::NewL();
-            CleanupStack::PushL( wlanMgmtClient );
-            
-            TWlanConnectionMode connMode;
-            User::LeaveIfError( 
-                    wlanMgmtClient->GetConnectionMode( connMode ) );
-            
-            TWlanConnectionSecurityMode secMode;
-            User::LeaveIfError( 
-                    wlanMgmtClient->GetConnectionSecurityMode( secMode ) );
-                          
-            HBufC* ssid( NULL );
-            TWlanSsid ssidConn;
-            
-            User::LeaveIfError( 
-                    wlanMgmtClient->GetConnectionSsid( ssidConn ) );
-            ssid = HBufC::NewLC( ssidConn.Length() );
-            ssid->Des().Copy( ssidConn ); 
-            
-            TUint32 serviceId(0);
-            TUint32 easyWlanIapId(0);
-            easyWlanIapId = cmManager.EasyWlanIdL();
-                       
-            RCmConnectionMethodExt easyWlanPlugin;
-            easyWlanPlugin = cmManager.ConnectionMethodL( easyWlanIapId );
-            CleanupClosePushL( easyWlanPlugin );
-            TBool scanSsid = easyWlanPlugin.GetBoolAttributeL( EWlanScanSSID );
-            TUint32 easyWlanServiceId = 
-                    easyWlanPlugin.GetIntAttributeL( EWlanServiceId );
-            CleanupStack::PopAndDestroy(); // easyWlanPlugin;
-            
-            RCmConnectionMethodExt plugin =
-                cmManager.CreateConnectionMethodL( KUidWlanBearerType );
-            CleanupClosePushL( plugin );        
-            plugin.SetStringAttributeL( ECmName, *ssid );
-            plugin.SetStringAttributeL( EWlanSSID, *ssid );
-            plugin.SetIntAttributeL( CMManager::EWlanSecurityMode,
-                    ConvertConnectionSecurityModeToSecModeL( secMode ));
-            plugin.SetIntAttributeL( EWlanConnectionMode, 
-                    ConvertConnectionModeToNetModeL( connMode ) );
-            plugin.SetBoolAttributeL( EWlanScanSSID, scanSsid );
-            destination.AddConnectionMethodL( plugin );
-            destination.UpdateL();
-            serviceId = plugin.GetIntAttributeL( EWlanServiceId );                
-           
-            CleanupStack::PopAndDestroy( &plugin ); 
-            if ( secMode == EWlanConnectionSecurityWep )
-                {
-                SaveWEPKeyL( easyWlanServiceId, serviceId );
-                }
-                    
-            if ( secMode == EWlanConnectionSecurityWpaPsk )
-                {
-                SaveWPAKeyL( easyWlanServiceId, serviceId );
-                }
-            
-            CleanupStack::PopAndDestroy( ssid ); 
-            CleanupStack::PopAndDestroy( wlanMgmtClient );
-            }
-        CleanupStack::PopAndDestroy( &destination ); 
-        }
-    CleanupStack::PopAndDestroy( &destinations ); 
-    CleanupStack::PopAndDestroy( &cmManager );
-
-    DEBUG("CHssIapSettingsHandler::CreateIapL Done");
-    }
-
-// -----------------------------------------------------------------------------
 // DeleteIapL
 // -----------------------------------------------------------------------------
 //
@@ -228,11 +132,11 @@
     {
     DEBUG1("CHssIapSettingsHandler:::DeleteIapL aIapId=%d ", aIapId);
 
-    RCmManagerExt cmManager;
+    RCmManager cmManager;
     cmManager.OpenL();
     CleanupClosePushL( cmManager );
 
-    RCmConnectionMethodExt plugin = cmManager.ConnectionMethodL( aIapId );
+    RCmConnectionMethod plugin = cmManager.ConnectionMethodL( aIapId );
     CleanupClosePushL( plugin );
 
     cmManager.RemoveAllReferencesL( plugin );
@@ -310,16 +214,12 @@
     wlanRecordNew->ModifyL( *dbSession );        
     CleanupStack::PopAndDestroy( wlanRecordNew );
     
-    dbSession->CommitTransactionL();
-    
-    dbSession->Close();
-    CleanupStack::PopAndDestroy( dbSession );
-    
     CleanupStack::Pop( 1 ); // transaction rollback popped
         
     dbSession->CommitTransactionL();
-   
-    
+
+    dbSession->Close();
+    CleanupStack::PopAndDestroy( dbSession );
     DEBUG("CHssIapSettingsHandler::SaveWEPKey Done");
     }
 
--- a/hotspotfw/rom/hotspot.iby	Wed Jun 23 19:25:42 2010 +0300
+++ b/hotspotfw/rom/hotspot.iby	Tue Jul 06 15:29:22 2010 +0300
@@ -36,12 +36,6 @@
 ECOM_PLUGIN( HssMgmtImpl.dll, 10282ecc.rsc )
 ECOM_PLUGIN( wlanagthotspotimpl.dll, 1028309b.rss )
 
-S60_APP_EXE( HsBrowser )
-S60_APP_AIF_RSC( HsBrowser )
-
-// appshell icon
-S60_APP_AIF_ICONS( hsbrowsericon )
-
 data=ZPRIVATE\10282EC5\backup_registration.xml	private\10282EC5\backup_registration.xml
 data=DATAZ_\system\install\hotspotfwstub.sis  system\install\hotspotfwstub.sis
 data=DATAZ_\system\install\ictsstub.sis  system\install\ictsstub.sis
--- a/hotspotfw/rom/hotspotResources.iby	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2006-2007 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:  Image description file for project HotSpot FW
-*
-*/
-
-
-
-
-#ifndef HOTSPOTRESOURCES_IBY
-#define HOTSPOTRESOURCES_IBY
-
-#ifdef __PROTOCOL_WLAN
-
-S60_APP_RESOURCE(HsBrowser)
-
-#endif // __PROTOCOL_WLAN
-#endif // HOTSPOTSRESOURCES_IBY
\ No newline at end of file
--- a/layers.sysdef.xml	Wed Jun 23 19:25:42 2010 +0300
+++ b/layers.sysdef.xml	Tue Jul 06 15:29:22 2010 +0300
@@ -7,7 +7,6 @@
   <systemModel>
     <layer name="mw_layer">
       <module name="wirelessacc">
-        <unit unitID="netdo.wirelessacc" mrp="" bldFile="&layer_real_source_path;/group" name="wirelessacc"/>
         <unit unitID="netdo.wirelessaccqt" mrp="" bldFile="&layer_real_source_path;" name="wirelessaccqt" proFile="wirelessacc.pro" qmakeArgs="-r"/>
       </module>
     </layer>
--- a/wirelessacc.pro	Wed Jun 23 19:25:42 2010 +0300
+++ b/wirelessacc.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-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"
@@ -12,14 +12,15 @@
 # Contributors:
 #
 # Description:
+# Qt project file for wirelessacc package.
 #
 
 TEMPLATE = subdirs
 
-SUBDIRS  += wlanutilities
-
 CONFIG += ordered
 
-symbian*: {
-    SYMBIAN_PLATFORMS = WINSCW ARMV5
-} 
+SUBDIRS += wlanutilities
+
+symbian {
+    BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include \"./group/bld.inf\""
+}
--- a/wlanutilities/cpwlansettingsplugin/src/cpwlansettingsgroupitemdata.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/cpwlansettingsplugin/src/cpwlansettingsgroupitemdata.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -119,6 +119,8 @@
     mJoinWlanItem = new CpSettingFormItemData(
             HbDataFormModelItem::ComboBoxItem, hbTrId(
                     "txt_occ_setlabel_join_wlan_networks"), this);
+    // name the object for test automation purposes
+    mJoinWlanItem->setObjectName("switchToWlan");
     
     QStringList joinWlanItems;
     
@@ -142,6 +144,8 @@
     mScanNetworkItem = new CpSettingFormItemData(
             HbDataFormModelItem::ComboBoxItem, hbTrId(
                     "txt_occ_setlabel_scan_for_networks"), this);
+    // name the object for test automation purposes
+    mScanNetworkItem->setObjectName("scanNetworkItem");
     
     QStringList scanNetworkItems;
     
@@ -171,6 +175,8 @@
     mPowerSavingItem = new CpSettingFormItemData(
             HbDataFormModelItem::ComboBoxItem, hbTrId(
                     "txt_occ_setlabel_power_saving"), this);
+    // name the object for test automation purposes
+    mPowerSavingItem->setObjectName("powerSaving");
     
     QStringList powerSavingItems;
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/bwins/eapwizardu.def	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,17 @@
+EXPORTS
+	?tr@EapWizard@@SA?AVQString@@PBD0H@Z @ 1 NONAME ; class QString EapWizard::tr(char const *, char const *, int)
+	?staticMetaObject@EapWizard@@2UQMetaObject@@B @ 2 NONAME ; struct QMetaObject const EapWizard::staticMetaObject
+	?qt_metacast@EapWizard@@UAEPAXPBD@Z @ 3 NONAME ; void * EapWizard::qt_metacast(char const *)
+	?tr@EapWizard@@SA?AVQString@@PBD0@Z @ 4 NONAME ; class QString EapWizard::tr(char const *, char const *)
+	?getStaticMetaObject@EapWizard@@SAABUQMetaObject@@XZ @ 5 NONAME ; struct QMetaObject const & EapWizard::getStaticMetaObject(void)
+	??0EapWizard@@QAE@PAVWlanWizardHelper@@@Z @ 6 NONAME ; EapWizard::EapWizard(class WlanWizardHelper *)
+	?trUtf8@EapWizard@@SA?AVQString@@PBD0@Z @ 7 NONAME ; class QString EapWizard::trUtf8(char const *, char const *)
+	??1EapWizard@@UAE@XZ @ 8 NONAME ; EapWizard::~EapWizard(void)
+	?metaObject@EapWizard@@UBEPBUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const * EapWizard::metaObject(void) const
+	?summary@EapWizard@@UAE_NW4Summary@WlanWizardPlugin@@AAVQString@@1@Z @ 10 NONAME ; bool EapWizard::summary(enum WlanWizardPlugin::Summary, class QString &, class QString &)
+	?qt_metacall@EapWizard@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 11 NONAME ; int EapWizard::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?trUtf8@EapWizard@@SA?AVQString@@PBD0H@Z @ 12 NONAME ; class QString EapWizard::trUtf8(char const *, char const *, int)
+	?errorString@EapWizard@@UAE?AVQString@@H@Z @ 13 NONAME ; class QString EapWizard::errorString(int)
+	?storeSettings@EapWizard@@UAE_NXZ @ 14 NONAME ; bool EapWizard::storeSettings(void)
+	??_EEapWizard@@UAE@I@Z @ 15 NONAME ; EapWizard::~EapWizard(unsigned int)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/eabi/eapwizardu.def	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN9EapWizard11errorStringEi @ 1 NONAME
+	_ZN9EapWizard11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
+	_ZN9EapWizard11qt_metacastEPKc @ 3 NONAME
+	_ZN9EapWizard13storeSettingsEv @ 4 NONAME
+	_ZN9EapWizard16staticMetaObjectE @ 5 NONAME DATA 16
+	_ZN9EapWizard19getStaticMetaObjectEv @ 6 NONAME
+	_ZN9EapWizard7summaryEN16WlanWizardPlugin7SummaryER7QStringS3_ @ 7 NONAME
+	_ZN9EapWizardC1EP16WlanWizardHelper @ 8 NONAME
+	_ZN9EapWizardC2EP16WlanWizardHelper @ 9 NONAME
+	_ZN9EapWizardD0Ev @ 10 NONAME
+	_ZN9EapWizardD1Ev @ 11 NONAME
+	_ZN9EapWizardD2Ev @ 12 NONAME
+	_ZNK9EapWizard10metaObjectEv @ 13 NONAME
+	_ZTI9EapWizard @ 14 NONAME
+	_ZTV9EapWizard @ 15 NONAME
+	_ZThn8_N9EapWizard11errorStringEi @ 16 NONAME
+	_ZThn8_N9EapWizard13storeSettingsEv @ 17 NONAME
+	_ZThn8_N9EapWizard7summaryEN16WlanWizardPlugin7SummaryER7QStringS3_ @ 18 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/eapwizard.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,86 @@
+#
+# 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: 
+#	EAP Settings Wizard plugin for WLAN Wizard
+#
+
+TEMPLATE = lib
+TARGET = eapwizard
+
+DEFINES += BUILD_EAP_WIZARD_DLL
+
+VERSION = 0.0.1
+
+CONFIG += hb
+
+MOC_DIR = build
+RCC_DIR = build
+
+RESOURCES += resources/eapwizard_resource.qrc
+
+TRANSLATIONS = eapwizard.ts
+
+HEADERS   += \
+	inc/eapwizard.h \
+	inc/eapwizard_p.h \
+	inc/eapwizardpage.h \
+	inc/eapwizardpagecertca.h \
+	inc/eapwizardpagecertuser.h \             
+	inc/eapwizardpageidentity.h \
+	inc/eapwizardpageinnertype.h \
+	inc/eapwizardpagenewpacstore.h \
+	inc/eapwizardpageoutertype.h \
+	inc/eapwizardpagepacstorepasswordconfirm.h \
+	inc/eapwizardpageusernamepassword.h
+	
+SOURCES   += \
+	src/eapwizard.cpp \
+	src/eapwizard_p.cpp \ 
+	src/eapwizardpage.cpp \
+	src/eapwizardpagecertca.cpp \
+	src/eapwizardpagecertuser.cpp \
+	src/eapwizardpageidentity.cpp \
+	src/eapwizardpageinnertype.cpp \	
+	src/eapwizardpagenewpacstore.cpp \
+	src/eapwizardpageoutertype.cpp \
+	src/eapwizardpagepacstorepasswordconfirm.cpp \
+	src/eapwizardpageusernamepassword.cpp
+    
+LIBS  += -leapqtconfiginterface -leapqtplugininfo
+    
+INCLUDEPATH += \
+	inc \
+	../inc    
+    
+symbian {
+	TARGET.UID3 = 0x2002C2FE
+	TARGET.CAPABILITY = CAP_GENERAL_DLL
+	TARGET.EPOCALLOWDLLDATA = 1
+       
+	# Location of directories for def files
+    defFilePath = .
+  	
+    # OST trace system requires traces directory to be in USERINCLUDES
+  	MMP_RULES += "USERINCLUDE traces"
+  	
+  	BLD_INF_RULES.prj_exports += \ 
+  		"rom/eapwizard.iby CORE_MW_LAYER_IBY_EXPORT_PATH(eapwizard.iby)"
+  	  	  		
+    BLD_INF_RULES.prj_exports += \
+        "rom/eapwizard_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(eapwizard_resources.iby)"
+  	
+  	# interface of eapwizard
+  	BLD_INF_RULES.prj_exports += "inc/eapwizard.h |../inc/eapwizard.h"   	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizard.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,85 @@
+/*
+ * 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: 
+ *   EAP Wizard API
+ *   
+ */
+
+#ifndef EAPWIZARD_H
+#define EAPWIZARD_H
+
+// System includes
+#include <QObject>
+
+// User includes
+#include "wlanwizardplugin.h"
+
+// Forward declarations
+class WlanWizardHelper;
+class EapWizardPrivate;
+class TestWlanWizardContext;
+
+// External data types
+
+// Constants
+#ifdef BUILD_EAP_WIZARD_DLL
+#define EAP_WIZARD_EXPORT Q_DECL_EXPORT
+#else
+#define EAP_WIZARD_EXPORT Q_DECL_IMPORT
+#endif
+
+/*!
+ * @addtogroup group_eap_wizard
+ * @{
+ */
+
+// Class declaration
+
+class EAP_WIZARD_EXPORT EapWizard : public QObject, public WlanWizardPlugin
+{
+    Q_OBJECT
+    
+public:
+    explicit EapWizard(WlanWizardHelper *wizardHelper); 
+    ~EapWizard();
+    
+public: // From WlanWizardPlugin
+    virtual bool summary(WlanWizardPlugin::Summary sum, QString &item, QString &value);
+    virtual bool storeSettings();
+    virtual QString errorString(int errorCode);
+    
+signals:
+        
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(EapWizard)
+
+private slots:
+    
+private: // data
+    QScopedPointer<EapWizardPrivate> d_ptr;
+    
+    // Friend classes
+    friend class EapWizardPrivate;
+    friend class TestWlanWizardContext;
+};
+
+/*! @} */
+
+#endif /* EAPWIZARD_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizard_p.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,183 @@
+/*
+ * 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: 
+ *   EAP Wizard: Private implementation.
+ *
+ */
+
+#ifndef EAPWIZARD_P_H
+#define EAPWIZARD_P_H
+
+// System includes
+#include <QObject>
+#include <QHash>
+
+// User includes
+#include "wlanwizardplugin.h"
+
+// Forward declarations
+class HbTranslator;
+class HbStackedWidget;
+class HbWidget;
+class HbLabel;
+class HbView;
+class HbAction;
+class HbDocumentLoader;
+class WlanWizardHelper;
+class EapWizardPage;
+class EapQtConfigInterface;
+class EapQtPluginHandle;
+class EapQtConfig;
+class EapWizard;
+class TestWlanWizardContext;
+// External data types
+
+// Constants
+
+/*!
+   @addtogroup group_eap_wizard
+   @{
+ */
+
+// Class declaration
+
+class EapWizardPrivate : public QObject
+{
+    Q_OBJECT
+public:
+    /*!
+       Enumerator for internal EAP configuration cache. This cache is used to
+       store user input and selections. see configurations() and 
+       setConfigurations() for howto access the configurations.
+       
+       Below is descripted which configuration can be used with a specific EAP
+       type.
+       EAP-TTLS & EAP-PEAP & EAP-TLS
+       - CertificateCa
+       - TunnelUsernameAutomatic
+       - TunnelUsername
+       - TunnelRealmAutomatic
+       - TunnelRealm
+       
+       EAP-TTLS & EAP-PEAP & EAP-FAST
+       - InnerType
+       
+       EAP-TLS
+       - CertificateUser
+       
+       EAP-FAST
+       - PacStorePassword
+       - PacStoreState
+       
+       LEAP, PAP, EAP-GTC, EAP/Plain-MSChapv2
+       - Username
+       - Password
+       
+       PAP, EAP-GTC, EAP/Plain-MSChapv2
+       - OuterType
+       
+       Remember to update trace.properties upon changes.
+     */
+    enum ConfigurationId
+    {
+        //! EapQtPluginHandle::Plugin (int), EAP outer type
+        OuterType = 0,
+        //! EapQtPluginHandle::Plugin (int), EAP inner type
+        InnerType = 1,
+        //! CertificateInformation, NULL: automatic, CA Certificate
+        CertificateCa = 2,
+        //! CertificateInformation, User Certificate
+        CertificateUser = 3,
+        //! bool, automatic username for EAP identify (outer type)
+        TunnelUsernameAutomatic = 4,
+        //! QString, username for EAP identify (outer type)
+        TunnelUsername = 5,
+        //! bool, automatic realm for EAP identify (outer type)
+        TunnelRealmAutomatic = 6,
+        //! QString, realm for EAP identify (outer type)
+        TunnelRealm = 7,
+        //! QString, username for inner methods or for LEAP
+        Username = 8,
+        //! QString, password for inner methods or for LEAP
+        Password = 9,
+        //! QString, PAC store password
+        PacStorePassword = 10,
+        //! EapQtPacStoreConfig::PacStoreState (int), PAC store state
+        PacStoreState = 11,
+    };
+
+public:
+    explicit EapWizardPrivate(WlanWizardHelper *wizardHelper);
+    ~EapWizardPrivate();
+   
+public: // From WlanWizardPlugin
+    bool summary(WlanWizardPlugin::Summary sum, QString &item, QString &value);
+    bool storeSettings();
+    QString errorString(int errorCode);
+    
+public:
+    QVariant configurations(ConfigurationId confId) const;
+    void setConfigurations(ConfigurationId confId, const QVariant &value);
+    EapQtConfigInterface* eapConfigurationInterface() const;
+    QString eapTypeToString(int id) const;
+    WlanWizardHelper *wizardHelper() const;
+
+signals:
+        
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(EapWizardPrivate)
+    void createPages();
+    bool hasInnerMethod() const;
+    void handleTlsMethodsSettings(
+        EapQtConfig &eapConf, 
+        EapQtPluginHandle &outerType);
+    
+    bool handleEapFastSettings(EapQtConfig &eapConf);
+    
+    void handleEapAkaSimSettings(EapQtConfig &eapConf);
+    
+    void handleLeapSettings(EapQtConfig &eapConf);
+    
+    bool storeOuterTypeSettings(EapQtPluginHandle &outerType);
+    
+    bool storeInnerTypeSettings(EapQtPluginHandle &outerType);
+    
+private slots:
+    
+private: // data
+    // NOT owned pointers
+    //! Wizard framework services (WLAN Wizard Plugin API)
+    WlanWizardHelper *mWizardHelper;
+    
+    // Owned pointers
+    //! Translator
+    QScopedPointer<HbTranslator> mTranslator;
+    //! EAP configuration and services (EAP Qt Configuration Interface API)
+    QScopedPointer<EapQtConfigInterface> mEapConfIf;
+    //! Internal container for EAP specific settings
+    QHash<ConfigurationId, QVariant> mConfigurations;
+    
+    // Friend classes
+    friend class TestWlanWizardContext;
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizardpage.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,113 @@
+/*
+ * 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: 
+ *   EAP Wizard: API for EAP specific wizard pages.
+ *
+ */
+
+#ifndef EAPWIZARD_PAGE_H
+#define EAPWIZARD_PAGE_H
+
+// System includes
+#include <QObject>
+
+// User includes
+#include "wlanwizardpage.h"
+
+// Forward declarations
+class EapWizardPrivate;
+class HbDocumentLoader;
+
+// External data types
+
+// Constants
+
+/*!
+   @addtogroup group_eap_wizard
+   @{
+   
+   Interface for EAP specific wizard pages.
+ */
+
+// Class declaration
+
+class EapWizardPage : public QObject, public WlanWizardPage
+{
+    Q_OBJECT
+    
+public:
+    /*!
+       Page IDs for EAP Wizard.
+     */
+    enum EapPageIds {
+        //! Outer Type selection
+        PageOuterType = WlanWizardPage::PageEapStart,
+        /*! Certificate Authority certificate selection for EAP-TTLS, EAP-TLS
+            and PEAP.
+         */
+        PageCertificateCa,
+        //! User Authority certificate selection for EAP-TLS
+        PageCertificateUser,
+        //! EAP Identity for TLS methods, EAP-TTLS, EAP-TLS, PEAP
+        PageIdentity,
+        //! EAP Inner type selection for PEAP
+        PageInnerTypePeap,
+        //! EAP Inner type selection for EAP-TTLS
+        PageInnerTypeEapTtls,
+        //! New PAC Store password for EAP-FAST
+        PageNewPacStorePassword,
+        //! PAC store confirmation for EAP-FAST
+        PagePromptPacStorePassword,
+        //! Username and password page
+        PageUsernamePassword,
+    };
+public:
+    explicit EapWizardPage(EapWizardPrivate* parent);
+    virtual ~EapWizardPage();
+    
+public: // From WlanWizardPage
+    virtual HbWidget* initializePage() = 0;
+    virtual int nextId(bool &removeFromStack) const;
+    virtual int nextId() const = 0;
+
+signals:
+        
+public slots:
+
+protected:
+    void loadDocmlSection(
+        HbDocumentLoader *loader,
+        Qt::Orientation orientation,
+        const QString &filename,
+        const QString &portraitSection,
+        const QString &landscapeSection) const;
+    
+protected slots:
+
+protected: // data
+    //! Pointer to Eap Wizard private implementation
+    EapWizardPrivate* mWizard;
+
+private:
+    Q_DISABLE_COPY(EapWizardPage)
+
+private slots:
+    
+private: // data
+    
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizardpagecertca.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,96 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: Certificate Authority Selection.
+ *
+ */
+
+#ifndef EAPWIZARDPAGECERTCA_H
+#define EAPWIZARDPAGECERTCA_H
+
+// System includes
+#include <QObject>
+
+// User includes
+#include "eapwizardpage.h"
+
+// Forward declarations
+class HbRadioButtonList;
+class HbDocumentLoader;
+class HbLabel;
+class EapWizardPrivate;
+class EapQtCertificateInfo;
+
+// External data types
+
+// Constants
+
+/*!
+   @addtogroup group_eap_wizard
+   @{
+ */
+
+// Class declaration
+
+class EapWizardPageCertCa : public EapWizardPage
+{
+    Q_OBJECT
+public:
+    explicit EapWizardPageCertCa(EapWizardPrivate* parent);
+    ~EapWizardPageCertCa();
+
+public: // From WlanWizardPage
+    HbWidget* initializePage();
+    int nextId() const;
+   
+signals:
+        
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    static const int IndexForAutomatic = 0;
+    static const int AmountOfNonCertItems = 1;
+
+private:
+    Q_DISABLE_COPY(EapWizardPageCertCa)
+
+private slots:
+    void loadDocmlSection(Qt::Orientation orientation);
+    
+private: // data
+    // OWNED
+    
+    //! docml document loader 
+    QScopedPointer<HbDocumentLoader> mDocumentLoader;
+    //! System's CA certificates
+    QList<EapQtCertificateInfo> mCerts;
+    
+    // NOT OWNED
+    
+    //! Visualization of the page
+    HbWidget *mWidget;
+    //! Title text for "Select authority certificate"
+    HbLabel *mTitle;
+    //! visualization of CA certificate list 
+    HbRadioButtonList *mCertList;
+
+};
+
+/*! @} */
+
+#endif /* EAPWIZARDPAGECERTCA_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizardpagecertuser.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,95 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: User Certificate Selection.
+ *
+ */
+
+#ifndef EAPWIZARDPAGECERTUSER_H
+#define EAPWIZARDPAGECERTUSER_H
+
+// System includes
+#include <QObject>
+
+// User includes
+#include "eapwizardpage.h"
+
+// Forward declarations
+class HbDocumentLoader;
+class HbRadioButtonList;
+class HbLabel;
+class EapQtCertificateInfo;
+class EapWizardPrivate;
+
+// External data types
+
+// Constants
+
+/*!
+   @addtogroup group_eap_wizard
+   @{
+ */
+
+// Class declaration
+
+class EapWizardPageCertUser : public EapWizardPage
+{
+    Q_OBJECT
+public:
+    explicit EapWizardPageCertUser(EapWizardPrivate* parent);
+    ~EapWizardPageCertUser();
+
+public: // From WlanWizardPage
+    HbWidget* initializePage();
+    int nextId() const;
+    bool showPage();
+    
+signals:
+        
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(EapWizardPageCertUser)
+    void createPages();
+    bool hasInnerMethod() const;
+
+private slots:
+    void loadDocmlSection(Qt::Orientation orientation);
+    void itemSelected(int index);
+    
+private: // data
+    // NOT OWNED
+    //! Visualization of the page
+    HbWidget *mWidget;
+    //! Certificate list
+    HbRadioButtonList *mCertList;
+    //! Error text used when there are not any certificates
+    HbLabel *mErrorLabel;
+    
+    // OWNED
+    //! docml document loader 
+    QScopedPointer<HbDocumentLoader> mDocumentLoader;
+    //! Is page valid? it is when a certificate has been selected
+    bool mValid;
+    //! List of system's user certificates
+    QList<EapQtCertificateInfo> mCerts;
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizardpageidentity.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,107 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: EAP Identity.
+ *
+ */
+
+#ifndef EAPWIZARDPAGEIDENTITY_H
+#define EAPWIZARDPAGEIDENTITY_H
+
+// System includes
+#include <QObject>
+
+// User includes
+#include "eapwizardpage.h"
+
+// Forward declarations
+class HbLineEdit;
+class HbCheckBox;
+class HbLabel;
+class HbDocumentLoader;
+class EapQtValidator;
+class EapWizardPrivate;
+
+// External data types
+
+// Constants
+
+/*!
+   @addtogroup group_eap_wizard
+   @{
+ */
+
+// Class declaration
+
+class EapWizardPageIdentity : public EapWizardPage
+{
+    Q_OBJECT
+public:
+    explicit EapWizardPageIdentity(EapWizardPrivate* parent);
+    ~EapWizardPageIdentity();
+
+public: // From WlanWizardPage
+    HbWidget* initializePage();
+    int nextId() const;
+    bool showPage();
+
+signals:
+        
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(EapWizardPageIdentity)
+    bool validateGroup(
+        HbLineEdit *edit, 
+        HbCheckBox *checkBox, 
+        EapQtValidator* validator) const;
+
+private slots:
+    void loadDocmlSection(Qt::Orientation orientation);
+    void textChanged(const QString &text);
+    void stateChanged(int state);
+
+private: // data
+    // OWNED
+    //! docml document loader 
+    QScopedPointer<HbDocumentLoader> mDocumentLoader;
+    //! Content validator and configurator for line edit of realm
+    QScopedPointer<EapQtValidator> mValidatorRealm;
+    //! Content validator and configurator for line edit of username
+    QScopedPointer<EapQtValidator> mValidatorUsername;
+    
+    // NOT OWNED
+    //! Visualization of the page
+    HbWidget *mWidget;
+    //! Line editor for username
+    HbLineEdit *mEditUsername;
+    //! Line editor for realm
+    HbLineEdit *mEditRealm;
+    //! Checkbox for username
+    HbCheckBox *mCheckUsername;
+    //! Checkbox for realm
+    HbCheckBox *mCheckRealm;
+    //! Title text for realm 
+    HbLabel *mLabelRealm;
+    //! Title text for username 
+    HbLabel *mLabelUsername;
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizardpageinnertype.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,100 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: Inner Type selection
+ *
+ */
+
+#ifndef EAPWIZARDPAGEINNERTYPE_H
+#define EAPWIZARDPAGEINNERTYPE_H
+
+// System includes
+#include <QObject>
+#include <eapqtpluginhandle.h>
+
+// User includes
+#include "eapwizardpage.h"
+
+// Forward declarations
+class HbRadioButtonList;
+class HbWidget;
+class HbDocumentLoader;
+class HbLabel;
+class EapWizardPrivate;
+
+// External data types
+
+// Constants
+
+/*!
+   @addtogroup group_eap_wizard
+   @{
+ */
+
+// Class declaration
+
+class EapWizardPageInnerType : public EapWizardPage
+{
+    Q_OBJECT
+public:
+    EapWizardPageInnerType(EapWizardPrivate* parent, int outerType);
+    ~EapWizardPageInnerType();
+
+public: // From WlanWizardPage
+    HbWidget* initializePage();
+    int nextId() const;
+    bool showPage();
+    
+signals:
+        
+public slots:
+    void itemSelected(int index);    
+    void loadDocmlSection(Qt::Orientation orientation);
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(EapWizardPageInnerType)
+
+    void appendToList(
+        QStringList &items, 
+        EapQtPluginHandle::Plugin innerType);
+    
+private slots:
+    
+private: // data
+    // NOT OWNED
+    //! Visualization of the page
+    HbWidget *mWidget;
+    //! List of innertypes
+    HbRadioButtonList *mRadio;
+    //! Title for inner types
+    HbLabel *mTitle;
+    
+    // OWNED
+    //! Document loader for docml
+    QScopedPointer<HbDocumentLoader> mDocumentLoader;
+    //! Page ID for this page
+    int mOuterType;
+    //! Is content of the page valid?
+    bool mValid;
+    //! Mapped from index (0..n) in radiobuttonlist to eap types
+    QList<int> mEapTypes;
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizardpagenewpacstore.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,94 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: New PAC store password
+ *
+ */
+
+#ifndef EAPWIZARDPAGENEWPACSTORE_H
+#define EAPWIZARDPAGENEWPACSTORE_H
+
+// System includes
+#include <QObject>
+
+// User includes
+#include "eapwizardpage.h"
+
+// Forward declarations
+class HbDocumentLoader;
+class HbLineEdit;
+class HbLabel;
+class EapQtValidator;
+
+// External data types
+
+// Constants
+
+/*!
+   @addtogroup group_eap_wizard
+   @{
+ */
+
+// Class declaration
+
+class EapWizardPageNewPacStore : public EapWizardPage
+{
+    Q_OBJECT
+public:
+    explicit EapWizardPageNewPacStore(EapWizardPrivate* parent);
+    ~EapWizardPageNewPacStore();
+
+public: // From WlanWizardPage
+    HbWidget* initializePage();
+    int nextId() const;
+    bool showPage();
+    
+signals:
+        
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(EapWizardPageNewPacStore)
+
+private slots:
+    void textChanged(const QString &text);
+    void loadDocmlSection(Qt::Orientation orientation);
+    
+private: // data
+    // OWNED 
+    //! Document loader for docml
+    QScopedPointer<HbDocumentLoader> mDocumentLoader;
+    //! Validator for PAC store password
+    QScopedPointer<EapQtValidator> mValidator;
+    
+    // NOT OWNED
+    //! Visualization of the page
+    HbWidget *mWidget;
+    //! Line editor for new password
+    HbLineEdit *mEditPasswordNew;
+    //! Line editor for new password confirmation
+    HbLineEdit *mEditPasswordConfirm;
+    //! Title for new password
+    HbLabel *mTitlePasswordNew;
+    //! Title for new password confirmation
+    HbLabel *mTitlePasswordConfirm;
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizardpageoutertype.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,98 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: Outer type selection
+ *
+ */
+
+#ifndef EAPWIZARDPAGEOUTERTYPE_H
+#define EAPWIZARDPAGEOUTERTYPE_H
+
+// System includes
+#include <QObject>
+
+// User includes
+#include "eapwizardpage.h"
+
+// Forward declarations
+class HbRadioButtonList;
+class HbWidget;
+class HbDocumentLoader;
+class HbLabel;
+class EapWizardPrivate;
+
+// External data types
+
+// Constants
+
+/*!
+   @addtogroup group_eap_wizard
+   @{
+ */
+
+// Class declaration
+
+class EapWizardPageOuterType : public EapWizardPage
+{
+    Q_OBJECT
+public:
+     explicit EapWizardPageOuterType(EapWizardPrivate* parent);
+    ~EapWizardPageOuterType();
+
+public: // From WizardPage
+    HbWidget* initializePage();
+    int nextId() const;
+    bool showPage();
+    
+signals:
+        
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(EapWizardPageOuterType)
+    void appendToList(
+        QStringList &items, 
+        int pluginHandle );
+    
+    int nextIdForEapFast() const;
+    
+private slots:
+    void itemSelected(int index);    
+    void loadDocmlSection(Qt::Orientation orientation);
+
+private: // data
+    // NOT OWNED
+    //! Visualization of the page
+    HbWidget *mWidget;
+    //! List of outer types
+    HbRadioButtonList *mRadio;
+    //! Title for radio button list
+    HbLabel *mTitle;
+    
+    // OWNED 
+    //! Document loader for docml
+    QScopedPointer<HbDocumentLoader> mDocumentLoader;
+    //! Is page content valid?
+    bool mValid;
+    //! Mapped from index (0..n) in radiobuttonlist to eap types
+    QList<int> mEapTypes;
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizardpagepacstorepasswordconfirm.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,94 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: PAC store password confirmation
+ *
+ */
+
+#ifndef EAPWIZARDPAGENPACSTOREPASSWORDCONFIRM_H
+#define EAPWIZARDPAGENPACSTOREPASSWORDCONFIRM_H
+
+// System includes
+#include <QObject>
+
+// User includes
+#include "eapwizardpage.h"
+
+// Forward declarations
+class HbDocumentLoader;
+class HbLineEdit;
+class HbLabel;
+class EapQtValidator;
+class EapWizardPrivate;
+
+// External data types
+
+// Constants
+
+
+/*!
+ * @addtogroup group_eap_wizard
+ * @{
+ */
+
+// Class declaration
+
+class EapWizardPagePacStorePasswordConfirm: public EapWizardPage
+{
+    Q_OBJECT
+public:
+    explicit EapWizardPagePacStorePasswordConfirm(EapWizardPrivate* parent);
+    ~EapWizardPagePacStorePasswordConfirm();
+    
+public: // From WlanWizardPage    
+    HbWidget* initializePage();
+    int nextId() const;
+    bool showPage();
+    
+signals:
+        
+public slots:
+
+protected:
+    bool eventFilter(QObject *obj, QEvent *event);
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(EapWizardPagePacStorePasswordConfirm)
+    void createPages();
+    bool hasInnerMethod() const;
+
+private slots:
+    void loadDocmlSection(Qt::Orientation orientation);
+    
+private: // data
+    // OWNED 
+    //! Document loader for docml
+    QScopedPointer<HbDocumentLoader> mDocumentLoader;
+    //! Validator for PAC store password 
+    QScopedPointer<EapQtValidator> mValidator;
+    
+    // NOT OWNED
+    //! Visualization of the page
+    HbWidget *mWidget;
+    //! line editor for PAC store password confirmation 
+    HbLineEdit *mEditPasswordConfirm;
+    //! Label for embadded error string
+    HbLabel *mLabelError;
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizardpageusernamepassword.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,99 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: Common Username & password query.
+ *
+ */
+
+#ifndef EAPWIZARDPAGEUSERNAMEPASSWORD_H
+#define EAPWIZARDPAGEUSERNAMEPASSWORD_H
+
+// System includes
+#include <QObject>
+
+// User includes
+#include "eapwizardpage.h"
+
+// Forward declarations
+class HbDocumentLoader;
+class HbLineEdit;
+class HbLabel;
+class EapWizardPrivate;
+class EapQtValidator;
+
+// External data types
+
+// Constants
+
+/*!
+   @addtogroup group_eap_wizard
+   @{
+ */
+
+// Class declaration
+
+class EapWizardPageUsernamePassword : public EapWizardPage
+{
+    Q_OBJECT
+public:
+    explicit EapWizardPageUsernamePassword(EapWizardPrivate* parent);
+    ~EapWizardPageUsernamePassword();
+
+public: // From WlanWizardPage
+    HbWidget* initializePage();
+    int nextId() const;
+    bool showPage();
+
+signals:
+        
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(EapWizardPageUsernamePassword)
+    void createPages();
+    bool hasInnerMethod() const;
+
+private slots:
+    void textChanged(const QString &text);
+    void loadDocmlSection(Qt::Orientation orientation);
+    
+private: // data
+    // OWNED 
+    //! Document loader for docml
+    QScopedPointer<HbDocumentLoader> mDocumentLoader;
+    //! Validator for username 
+    QScopedPointer<EapQtValidator> mValidatorUsername;
+    //! Validator for password
+    QScopedPointer<EapQtValidator> mValidatorPassword;
+    
+    // NOT OWNED
+    //! Visualization of the page
+    HbWidget *mWidget;
+    //! Line editor for username
+    HbLineEdit *mEditUsername;
+    //! Line editor for password
+    HbLineEdit *mEditPassword;
+    //! Title/label for username
+    HbLabel *mTitleUsername;
+    //! Title/label for password
+    HbLabel *mTitlePassword;
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/inc/eapwizarduistrings.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,67 @@
+/*
+ * 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: 
+ *   EAP String definitions for UI
+ *
+ */
+
+#ifndef EAPWIZARDUISTRINGS_H
+#define EAPWIZARDUISTRINGS_H
+
+// System includes
+#include <QString>
+
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+/*!
+   @addtogroup group_eap_wizard
+   @{
+ */
+
+//! Namespace for EAP UI String in the context of EapWizard
+namespace EapWizardUiStrings
+{
+    //! String for EAP-AKA
+    static const QString EapAka       = "EAP-AKA";
+    //! String for EAP-FAST
+    static const QString EapFast      = "EAP-FAST";
+    //! String for EAP-GTC
+    static const QString EapGtc       = "EAP-GTC";
+    //! String for EAP-MSCHAPv2
+    static const QString EapMschapv2  = "EAP-MSCHAPv2";
+    //! String for EAP-SIM
+    static const QString EapSim       = "EAP-SIM";
+    //! String for EAP-TLS
+    static const QString EapTls       = "EAP-TLS";
+    //! String for EAP-TTLS
+    static const QString EapTtls      = "EAP-TTLS";
+    //! String for LEAP
+    static const QString Leap         = "LEAP";
+    //! String for Plain-MSCHAPv2
+    static const QString Mschapv2     = "MSCHAPv2";
+    //! String for PAP
+    static const QString Pap          = "PAP";
+    //! String for PEAP
+    static const QString Peap         = "PEAP";
+}
+
+/*! @} */
+
+#endif /* EAPWIZARDUISTRINGS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/resources/eapwizard_resource.qrc	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,9 @@
+<RCC>
+    <qresource prefix="/docml" >
+        <file>occ_eap_wizard_01_02_04.docml</file>
+        <file>occ_eap_wizard_03.docml</file>
+        <file>occ_eap_wizard_05_07.docml</file>
+        <file>occ_eap_wizard_06.docml</file>
+        <file>occ_eap_wizard_08.docml</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/resources/occ_eap_wizard_01_02_04.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <widget name="occ_eap_wizard_01" type="HbWidget">
+        <widget name="list" type="HbRadioButtonList"/>
+        <widget name="title" type="HbLabel">
+            <enums name="textWrapping" value="TextWordWrap"/>
+            <enums name="alignment" value="AlignLeft|AlignTop|AlignLeading"/>
+            <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+        </widget>
+        <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+        <layout type="anchor"/>
+    </widget>
+    <section name="portrait_section">
+        <widget name="occ_eap_wizard_01" type="HbWidget">
+            <widget name="title" type="HbLabel">
+                <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="title" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="title" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="title" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="list" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="list" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="title" srcEdge="BOTTOM"/>
+                <anchoritem dst="list" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="list" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+            </layout>
+        </widget>
+    </section>
+    <section name="landscape_section">
+        <widget name="occ_eap_wizard_01" type="HbWidget">
+            <widget name="title" type="HbLabel">
+                <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                <sizehint type="FIXED" width="expr((var(hb-param-screen-width) - var(hb-param-margin-gene-middle-horizontal))  / 2  - var(hb-param-margin-gene-screen) - var(hb-param-margin-gene-popup))"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="title" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="title" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="list" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="title" srcEdge="RIGHT"/>
+                <anchoritem dst="list" dstEdge="TOP" spacing="0un" src="title" srcEdge="TOP"/>
+                <anchoritem dst="list" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="list" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+            </layout>
+        </widget>
+    </section>
+    <metadata activeUIState="landscape" display="NHD-3.2-inch_landscape" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <uistate name="landscape" sections="#common landscape_section"/>
+        <uistate name="portrait" sections="#common portrait_section"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/resources/occ_eap_wizard_03.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <widget name="occ_eap_wizard_03" type="HbWidget">
+        <widget name="setlabel_53" type="HbLabel">
+            <enums name="textWrapping" value="TextWordWrap"/>
+            <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-primary)"/>
+        </widget>
+        <widget name="setlabel_53_val" type="HbCheckBox">
+            <enums name="checkState" value="Checked"/>
+            <string locid="txt_occ_setlabel_user_name_val_generate_automatic" name="text" value="Generate automatically"/>
+            <fontspec name="fontSpec" role="Secondary" textheight="0"/>
+        </widget>
+        <widget name="lineEditUsername" type="HbLineEdit"/>
+        <widget name="setlabel_54" type="HbLabel">
+            <enums name="textWrapping" value="TextWordWrap"/>
+            <string locid="txt_occ_setlabel_eap_realm" name="plainText" value="Realm"/>
+            <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-primary)"/>
+        </widget>
+        <widget name="setlabel_54_val" type="HbCheckBox">
+            <enums name="checkState" value="Checked"/>
+            <string locid="txt_occ_setlabel_eap_realm_val_generate_automatically" name="text" value="Generate automatically"/>
+            <fontspec name="fontSpec" role="Secondary" textheight="0"/>
+        </widget>
+        <widget name="lineEditRealm" type="HbLineEdit"/>
+        <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+        <layout type="anchor"/>
+    </widget>
+    <section name="portrait_section">
+        <widget name="occ_eap_wizard_03" type="HbWidget">
+            <widget name="setlabel_53" type="HbLabel">
+                <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="setlabel_53" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_53" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="setlabel_53" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="setlabel_53_val" dstEdge="LEFT" spacing="0un" src="setlabel_53" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_53_val" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="setlabel_53" srcEdge="BOTTOM"/>
+                <anchoritem dst="setlabel_53_val" dstEdge="RIGHT" spacing="0un" src="setlabel_53" srcEdge="RIGHT"/>
+                <anchoritem dst="lineEditUsername" dstEdge="LEFT" spacing="0un" src="setlabel_53" srcEdge="LEFT"/>
+                <anchoritem dst="lineEditUsername" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="setlabel_53_val" srcEdge="BOTTOM"/>
+                <anchoritem dst="lineEditUsername" dstEdge="RIGHT" spacing="0un" src="setlabel_53" srcEdge="RIGHT"/>
+                <anchoritem dst="setlabel_54" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_54" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-popup) + var(hb-param-margin-gene-bottom))" src="lineEditUsername" srcEdge="BOTTOM"/>
+                <anchoritem dst="setlabel_54" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="setlabel_54_val" dstEdge="LEFT" spacing="0un" src="setlabel_53" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_54_val" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="setlabel_54" srcEdge="BOTTOM"/>
+                <anchoritem dst="setlabel_54_val" dstEdge="RIGHT" spacing="0un" src="setlabel_53" srcEdge="RIGHT"/>
+                <anchoritem dst="lineEditRealm" dstEdge="LEFT" spacing="0un" src="setlabel_53" srcEdge="LEFT"/>
+                <anchoritem dst="lineEditRealm" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="setlabel_54_val" srcEdge="BOTTOM"/>
+                <anchoritem dst="lineEditRealm" dstEdge="RIGHT" spacing="0un" src="setlabel_53" srcEdge="RIGHT"/>
+            </layout>
+        </widget>
+    </section>
+    <section name="landscape_section">
+        <widget name="setlabel_53" type="HbLabel">
+            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+            <sizehint type="PREFERRED" width="expr((var(hb-param-screen-width) - var(hb-param-margin-gene-middle-horizontal))  / 2  - var(hb-param-margin-gene-screen) - var(hb-param-margin-gene-popup))"/>
+        </widget>
+        <widget name="occ_eap_wizard_03" type="HbWidget">
+            <layout type="anchor">
+                <anchoritem dst="setlabel_53" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_53" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="setlabel_53" dstEdge="BOTTOM" spacing="0un" src="lineEditUsername" srcEdge="BOTTOM"/>
+                <anchoritem dst="setlabel_53_val" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="setlabel_53" srcEdge="RIGHT"/>
+                <anchoritem dst="setlabel_53_val" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="setlabel_53_val" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="lineEditUsername" dstEdge="LEFT" spacing="0un" src="setlabel_53_val" srcEdge="LEFT"/>
+                <anchoritem dst="lineEditUsername" dstEdge="TOP" spacing="0un" src="setlabel_53_val" srcEdge="BOTTOM"/>
+                <anchoritem dst="lineEditUsername" dstEdge="RIGHT" spacing="0un" src="setlabel_53_val" srcEdge="RIGHT"/>
+                <anchoritem dst="setlabel_54" dstEdge="LEFT" spacing="0un" src="setlabel_53" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_54" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="lineEditUsername" srcEdge="BOTTOM"/>
+                <anchoritem dst="setlabel_54" dstEdge="RIGHT" spacing="0un" src="setlabel_53" srcEdge="RIGHT"/>
+                <anchoritem dst="setlabel_54" dstEdge="BOTTOM" spacing="0un" src="lineEditRealm" srcEdge="BOTTOM"/>
+                <anchoritem dst="setlabel_54_val" dstEdge="LEFT" spacing="0un" src="setlabel_53_val" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_54_val" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="lineEditUsername" srcEdge="BOTTOM"/>
+                <anchoritem dst="setlabel_54_val" dstEdge="RIGHT" spacing="0un" src="setlabel_53_val" srcEdge="RIGHT"/>
+                <anchoritem dst="lineEditRealm" dstEdge="LEFT" spacing="0un" src="setlabel_53_val" srcEdge="LEFT"/>
+                <anchoritem dst="lineEditRealm" dstEdge="TOP" spacing="0un" src="setlabel_54_val" srcEdge="BOTTOM"/>
+                <anchoritem dst="lineEditRealm" dstEdge="RIGHT" spacing="0un" src="setlabel_53_val" srcEdge="RIGHT"/>
+            </layout>
+        </widget>
+    </section>
+    <metadata activeUIState="landscape" display="NHD-3.2-inch_landscape" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <uistate name="portrait" sections="#common portrait_section"/>
+        <uistate name="landscape" sections="#common landscape_section"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/resources/occ_eap_wizard_05_07.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <widget name="view" type="HbWidget">
+        <widget name="setlabel_55" type="HbLabel">
+            <enums name="textWrapping" value="TextWordWrap"/>
+            <fontspec name="fontSpec" role="Secondary" textheight="0"/>
+        </widget>
+        <widget name="lineEditUsername" type="HbLineEdit"/>
+        <widget name="setlabel_56" type="HbLabel">
+            <enums name="textWrapping" value="TextWordWrap"/>
+            <fontspec name="fontSpec" role="Secondary" textheight="0"/>
+        </widget>
+        <widget name="lineEditPassword" type="HbLineEdit"/>
+        <layout type="anchor"/>
+    </widget>
+    <section name="portrait_section">
+        <widget name="view" type="HbWidget">
+            <widget name="setlabel_55" type="HbLabel">
+                <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="setlabel_55" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_55" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="setlabel_55" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="lineEditUsername" dstEdge="LEFT" spacing="0un" src="setlabel_55" srcEdge="LEFT"/>
+                <anchoritem dst="lineEditUsername" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="setlabel_55" srcEdge="BOTTOM"/>
+                <anchoritem dst="lineEditUsername" dstEdge="RIGHT" spacing="0un" src="setlabel_55" srcEdge="RIGHT"/>
+                <anchoritem dst="setlabel_56" dstEdge="LEFT" spacing="0un" src="setlabel_55" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_56" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="lineEditUsername" srcEdge="BOTTOM"/>
+                <anchoritem dst="setlabel_56" dstEdge="RIGHT" spacing="0un" src="setlabel_55" srcEdge="RIGHT"/>
+                <anchoritem dst="lineEditPassword" dstEdge="LEFT" spacing="0un" src="setlabel_55" srcEdge="LEFT"/>
+                <anchoritem dst="lineEditPassword" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="setlabel_56" srcEdge="BOTTOM"/>
+                <anchoritem dst="lineEditPassword" dstEdge="RIGHT" spacing="0un" src="setlabel_55" srcEdge="RIGHT"/>
+            </layout>
+        </widget>
+    </section>
+    <section name="landscape_section">
+        <widget name="view" type="HbWidget">
+            <widget name="setlabel_55" type="HbLabel">
+                <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                <sizehint type="PREFERRED" width="expr((var(hb-param-screen-width) - var(hb-param-margin-gene-middle-horizontal))  / 2  - var(hb-param-margin-gene-screen) - var(hb-param-margin-gene-popup))"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="setlabel_55" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_55" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="setlabel_55" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-bottom)" src="lineEditUsername" srcEdge="BOTTOM"/>
+                <anchoritem dst="lineEditUsername" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="setlabel_55" srcEdge="RIGHT"/>
+                <anchoritem dst="lineEditUsername" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="lineEditUsername" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="setlabel_56" dstEdge="LEFT" spacing="0un" src="setlabel_55" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_56" dstEdge="TOP" spacing="0un" src="setlabel_55" srcEdge="BOTTOM"/>
+                <anchoritem dst="setlabel_56" dstEdge="RIGHT" spacing="0un" src="setlabel_55" srcEdge="RIGHT"/>
+                <anchoritem dst="setlabel_56" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-bottom)" src="lineEditPassword" srcEdge="BOTTOM"/>
+                <anchoritem dst="lineEditPassword" dstEdge="LEFT" spacing="0un" src="lineEditUsername" srcEdge="LEFT"/>
+                <anchoritem dst="lineEditPassword" dstEdge="RIGHT" spacing="0un" src="lineEditUsername" srcEdge="RIGHT"/>
+                <anchoritem dst="lineEditPassword" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-bottom)+var(hb-param-margin-gene-popup))" src="lineEditUsername" srcEdge="BOTTOM"/>
+            </layout>
+        </widget>
+    </section>
+    <metadata activeUIState="landscape" display="NHD-3.2-inch_landscape" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <uistate name="portrait" sections="#common portrait_section"/>
+        <uistate name="landscape" sections="#common landscape_section"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/resources/occ_eap_wizard_06.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <widget name="occ_eap_wizard_06" type="HbWidget">
+        <widget name="title" type="HbLabel">
+            <enums name="textWrapping" value="TextWordWrap"/>
+            <string locid="txt_occ_title_select_user_certificate" name="plainText" value="Select user certificate"/>
+            <fontspec name="fontSpec" role="Secondary" textheight="0"/>
+        </widget>
+        <widget name="list" type="HbRadioButtonList"/>
+        <widget name="errorLabel" type="HbLabel">
+            <enums name="textWrapping" value="TextWordWrap"/>
+            <enums name="alignment" value="AlignLeft|AlignTop|AlignLeading"/>
+            <string locid="txt_occ_dialog_no_certificates_installed_wizard_c" name="plainText" value="No certificates installed. Wizard cannot continue."/>
+            <fontspec name="fontSpec" role="Secondary" textheight="0"/>
+        </widget>
+        <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+        <layout type="anchor"/>
+    </widget>
+    <section name="portrait_section">
+        <widget name="occ_eap_wizard_06" type="HbWidget">
+            <widget name="title" type="HbLabel">
+                <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="title" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="title" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="title" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="list" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="list" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="title" srcEdge="BOTTOM"/>
+                <anchoritem dst="list" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="list" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="errorLabel" dstEdge="LEFT" spacing="0un" src="title" srcEdge="LEFT"/>
+                <anchoritem dst="errorLabel" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="title" srcEdge="BOTTOM"/>
+                <anchoritem dst="errorLabel" dstEdge="RIGHT" spacing="0un" src="title" srcEdge="RIGHT"/>
+            </layout>
+        </widget>
+        <widget name="list" type="HbRadioButtonList">
+            <size height="230un" name="transformOriginPoint" width="0un"/>
+        </widget>
+    </section>
+    <section name="landscape_section">
+        <widget name="occ_eap_wizard_06" type="HbWidget">
+            <widget name="title" type="HbLabel">
+                <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                <sizehint type="FIXED" width="expr((var(hb-param-screen-width) - var(hb-param-margin-gene-middle-horizontal))  / 2  - var(hb-param-margin-gene-screen) - var(hb-param-margin-gene-popup))"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="title" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="title" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="list" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="title" srcEdge="RIGHT"/>
+                <anchoritem dst="list" dstEdge="TOP" spacing="0un" src="title" srcEdge="TOP"/>
+                <anchoritem dst="list" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="list" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="errorLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="title" srcEdge="RIGHT"/>
+                <anchoritem dst="errorLabel" dstEdge="TOP" spacing="0un" src="title" srcEdge="TOP"/>
+                <anchoritem dst="errorLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+            </layout>
+        </widget>
+    </section>
+    <metadata activeUIState="portrait" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <uistate name="portrait" sections="#common portrait_section"/>
+        <uistate name="landscape" sections="#common landscape_section"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/resources/occ_eap_wizard_08.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <widget name="view" type="HbWidget">
+        <widget name="setlabel_59" type="HbLabel">
+            <enums name="textWrapping" value="TextWordWrap"/>
+            <string locid="txt_occ_setlabel_eap_pac_store_password" name="plainText" value="PAC store password"/>
+            <fontspec name="fontSpec" role="Secondary" textheight="0"/>
+        </widget>
+        <widget name="lineEditPasswordConfirm" type="HbLineEdit"/>
+        <widget name="labelError" type="HbLabel">
+            <enums name="textWrapping" value="TextWordWrap"/>
+            <fontspec name="fontSpec" role="Secondary" textheight="0"/>
+        </widget>
+        <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+        <layout type="anchor"/>
+    </widget>
+    <section name="portrait_section">
+        <widget name="view" type="HbWidget">
+            <widget name="setlabel_59" type="HbLabel">
+                <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="setlabel_59" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_59" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="setlabel_59" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="lineEditPasswordConfirm" dstEdge="LEFT" spacing="0un" src="setlabel_59" srcEdge="LEFT"/>
+                <anchoritem dst="lineEditPasswordConfirm" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="setlabel_59" srcEdge="BOTTOM"/>
+                <anchoritem dst="lineEditPasswordConfirm" dstEdge="RIGHT" spacing="0un" src="setlabel_59" srcEdge="RIGHT"/>
+                <anchoritem dst="labelError" dstEdge="LEFT" spacing="0un" src="setlabel_59" srcEdge="LEFT"/>
+                <anchoritem dst="labelError" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="lineEditPasswordConfirm" srcEdge="BOTTOM"/>
+                <anchoritem dst="labelError" dstEdge="RIGHT" spacing="0un" src="setlabel_59" srcEdge="RIGHT"/>
+            </layout>
+        </widget>
+    </section>
+    <section name="landscape_section">
+        <widget name="view" type="HbWidget">
+            <widget name="setlabel_59" type="HbLabel">
+                <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                <sizehint type="PREFERRED" width="expr((var(hb-param-screen-width) - var(hb-param-margin-gene-middle-horizontal))  / 2  - var(hb-param-margin-gene-screen) - var(hb-param-margin-gene-popup))"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="setlabel_59" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="setlabel_59" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="setlabel_59" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-bottom)" src="lineEditPasswordConfirm" srcEdge="BOTTOM"/>
+                <anchoritem dst="lineEditPasswordConfirm" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="setlabel_59" srcEdge="RIGHT"/>
+                <anchoritem dst="lineEditPasswordConfirm" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="lineEditPasswordConfirm" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="labelError" dstEdge="LEFT" spacing="0un" src="setlabel_59" srcEdge="LEFT"/>
+                <anchoritem dst="labelError" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="lineEditPasswordConfirm" srcEdge="BOTTOM"/>
+                <anchoritem dst="labelError" dstEdge="RIGHT" spacing="0un" src="lineEditPasswordConfirm" srcEdge="RIGHT"/>
+            </layout>
+        </widget>
+    </section>
+    <metadata activeUIState="landscape" display="NHD-3.2-inch_landscape" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <uistate name="portrait" sections="#common portrait_section"/>
+        <uistate name="landscape" sections="#common landscape_section"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/rom/eapwizard.iby	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* 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:
+*   EAP Wizard IBY
+*/
+
+#ifndef EAPWIZARD_IBY
+#define EAPWIZARD_IBY
+
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
+file=ABI_DIR/BUILD_DIR/eapwizard.dll SHARED_LIB_DIR/eapwizard.dll
+
+#endif // __PROTOCOL_WLAN
+
+#endif // EAPWIZARD_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/rom/eapwizard_resources.iby	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* 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:
+* EAP Wizard resource iby.
+*/
+
+#ifndef EAPWIZARD_RESOURCES_IBY
+#define EAPWIZARD_RESOURCES_IBY
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh> 
+
+#ifdef __PROTOCOL_WLAN
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/eapwizard.qm QT_TRANSLATIONS_DIR/eapwizard.qm 
+
+#endif // __PROTOCOL_WLAN
+
+#endif // EAPWIZARD_RESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/src/eapwizard.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,116 @@
+/*
+ * 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: 
+ *   EAP Wizard: API implementation.
+ */
+
+// System includes
+
+// User includes
+#include "eapwizard.h"
+#include "eapwizard_p.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "eapwizardTraces.h"
+#endif
+
+/*!
+   \class EapWizard
+   \brief EAP plugin for WLAN wizard.
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+   Constructor of EAP Wizard.
+   
+   @param [in] wizardHelper pointer to the helpper instance.
+ */
+EapWizard::EapWizard(WlanWizardHelper *wizardHelper) : d_ptr(NULL)
+{
+    OstTraceFunctionEntry0(EAPWIZARD_EAPWIZARD_ENTRY);
+    
+    d_ptr.reset( new EapWizardPrivate(wizardHelper));
+    
+    OstTraceFunctionExit0(EAPWIZARD_EAPWIZARD_EXIT);
+}
+
+/*!
+   Destructor.
+ */
+EapWizard::~EapWizard()
+{
+    OstTraceFunctionEntry0(EAPWIZARD_DEAPWIZARD_ENTRY);
+    OstTraceFunctionExit0(EAPWIZARD_DEAPWIZARD_EXIT);
+}
+
+/*!
+   See WlanWizardPlugin::summary().
+   
+   This method is used to query eap plugin specific summary items. 
+  
+   Both item and value are localized strings.
+   
+   @param [in]     sum   Summary id to be queried
+   @param [in,out] item  The item string is returned here 
+   @param [in,out] value The value of item is returned here.
+   
+   @return true if summary item is found, false otherwise.
+ */
+bool EapWizard::summary(WlanWizardPlugin::Summary sum, QString &item, QString &value)
+{
+    OstTraceFunctionEntry0(EAPWIZARD_SUMMARY_ENTRY);
+    bool ret = d_ptr->summary(sum, item, value); 
+    OstTraceFunctionExit0(EAPWIZARD_SUMMARY_EXIT);
+    return ret;
+}
+
+/*!
+   See WlanWizardPlugin::storeSettings().
+   
+   Stores EAP specific settings.
+ */
+bool EapWizard::storeSettings()
+{
+    OstTraceFunctionEntry0(EAPWIZARD_STORESETTINGS_ENTRY);
+    
+    bool ret = d_ptr->storeSettings();
+    
+    OstTraceFunctionExit0(EAPWIZARD_STORESETTINGS_EXIT);
+    
+    return ret;
+}
+
+
+/*!
+   See WlanWizardPlugin::errorString().
+   
+   Gets EAP Wizard specific error code. In case mapping cannot be done an empty
+   string is returned.
+ */
+QString EapWizard::errorString(int errorCode)
+{
+    OstTraceFunctionEntry0(EAPWIZARD_ERRORSTRING_ENTRY);
+    
+    QString string = d_ptr->errorString(errorCode);
+    
+    OstTraceFunctionExit0(EAPWIZARD_ERRORSTRING_EXIT);
+    return string;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/src/eapwizard_p.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,663 @@
+/*
+ * 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: 
+ *   EAP Wizard: Private implementation.
+ */
+
+// System includes
+#include <QDebug>
+#include <QDataStream>
+#include <HbTranslator>
+#include <HbParameterLengthLimiter>
+#include <eapqtconfiginterface.h>
+#include <eapqtplugininfo.h>
+#include <eapqtpluginhandle.h>
+#include <eapqtconfig.h>
+#include <eapqtpacstoreconfig.h>
+#include <eapqtcertificateinfo.h>
+#include <wlanerrorcodes.h>
+
+// User includes
+#include "wlanwizardhelper.h"
+#include "wlanwizardplugin.h"
+#include "eapwizard.h"
+#include "eapwizard_p.h"
+#include "eapwizarduistrings.h"
+#include "eapwizardpageoutertype.h"
+#include "eapwizardpagecertca.h"
+#include "eapwizardpagecertuser.h"
+#include "eapwizardpageidentity.h"
+#include "eapwizardpageinnertype.h"
+#include "eapwizardpageusernamepassword.h"
+#include "eapwizardpagenewpacstore.h"
+#include "eapwizardpagepacstorepasswordconfirm.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "eapwizard_pTraces.h"
+#endif
+
+/*!
+   \class EapWizardPrivate
+   \brief Implements the EAP wizard plugin for WLAN wizard.
+ */
+
+// External function prototypes
+
+// Local constants
+
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+   Constructor of EAP Wizard.
+   
+   @param [in] wizardHelper pointer to the helper instance.
+ */
+EapWizardPrivate::EapWizardPrivate(
+    WlanWizardHelper *wizardHelper) :
+    mWizardHelper(wizardHelper), 
+    mTranslator(new HbTranslator("eapwizard")), 
+    mEapConfIf(new EapQtConfigInterface(
+        EapQtConfigInterface::EapBearerTypeWlan, 
+        EapQtConfigInterface::IapIdUndefined))
+{
+    Q_ASSERT(wizardHelper);
+    createPages();
+}
+
+/*!
+   Destructor.
+ */
+EapWizardPrivate::~EapWizardPrivate()
+{
+}
+
+/*!
+   See EapWizard::summary().
+ */
+bool EapWizardPrivate::summary(
+    WlanWizardPlugin::Summary sum, 
+    QString &item, 
+    QString &value)
+{
+    bool ret = false;
+    int outerType = configurations(EapWizardPrivate::OuterType).toInt();
+
+    switch (sum) {
+    case WlanWizardPlugin::SummaryEapInnerType:
+        if (hasInnerMethod()) {
+            item = hbTrId("txt_occ_dblist_inner_eap");
+            value = eapTypeToString(configurations(EapWizardPrivate::InnerType).toInt());
+            ret = true;
+        }
+        break;
+
+    case WlanWizardPlugin::SummaryEapFastProvisioningMode:
+        if (outerType == EapQtPluginHandle::PluginEapFast) {
+            item = hbTrId("txt_occ_dblist_provisioning_mode_for_eapfast");
+            value = hbTrId("txt_occ_dblist_provisioning_mode_for_val_unauthent");
+            ret = true;
+        }
+        break;
+
+    default:
+        Q_ASSERT(sum == WlanWizardPlugin::SummaryEapOuterType);
+        item = hbTrId("txt_occ_dblist_outer_eap");
+        value = eapTypeToString(outerType);
+        ret = true;
+        break;
+
+    }
+    return ret;
+}
+
+/*!
+   See EapWizard::storeSettings().
+   
+   @return true - ok, false - failed
+ */
+bool EapWizardPrivate::storeSettings()
+{
+    bool ret = false;
+    EapQtPluginHandle outerType(static_cast<EapQtPluginHandle::Plugin>(
+        configurations(OuterType).toInt()));
+    
+    int iapId = mWizardHelper->configuration(WlanWizardHelper::ConfIapId).toInt();
+    
+    if (mEapConfIf->setConfigurationReference(iapId) 
+        && storeOuterTypeSettings(outerType)
+        && storeInnerTypeSettings(outerType)) {
+        ret = true;
+    }
+
+    return ret;
+}
+
+/*!
+   See WlanWizardPlugin::errorString().
+   
+   Returns EAP spesific error string.
+ */
+QString EapWizardPrivate::errorString(int errorCode)
+{
+    char* textId = NULL;
+    int eapType = EapQtPluginHandle::PluginUndefined;
+    
+    switch (errorCode){
+    case KErrWlanUserRejected:
+        textId = "txt_occ_dialog_1_auth_failed_user_cert_rej";
+        eapType = configurations(OuterType).toInt();
+        break;
+        
+    case KErrWlanUserCertificateExpired:
+        textId = "txt_occ_dialog_1_auth_failed_user_cert_exp";
+        eapType = configurations(OuterType).toInt();
+        break;
+        
+    case KErrWlanServerCertificateExpired:
+        textId = "txt_occ_dialog_1_authentication_failed_server_ce";
+        eapType = configurations(OuterType).toInt();
+        break;
+        
+    case KErrWlanCerficateVerifyFailed:
+        textId = "txt_occ_dialog_1_authentication_failed_could_not";
+        eapType = configurations(OuterType).toInt();
+        break;
+        
+    case KErrWlanNoCipherSuite:
+        textId = "txt_occ_dialog_1_authentication_failed_cipher_su";
+        eapType = configurations(OuterType).toInt();
+        break;
+        
+    case KErrWlanSimNotInstalled:
+        textId = "txt_occ_dialog_1_authentication_failed_check_sim";
+        eapType = configurations(OuterType).toInt();
+        break;
+        
+    case KErrWlanEapFastPacStoreCorrupted:
+        textId = "txt_occ_dialog_1_authentication_failed_reset_pac";
+        eapType = EapQtPluginHandle::PluginEapFast;
+        break;
+        
+    case KErrWlanEapSimFailed:
+    case KErrWlanEapTlsFailed:
+    case KErrWlanEapPeapFailed:
+    case KErrWlanEapAkaFailed:
+    case KErrWlanEapTtlsFailed:
+    case KErrWlanLeapFailed:
+    case KErrWlanNoUserCertificate:
+    case KErrWlanEapFastTunnelCompromiseError:
+    case KErrWlanEapFastUnexpextedTlvExhanged:
+    case KErrWlanEapFastNoPacNorCertsToAuthenticateWithProvDisabled:
+    case KErrWlanEapFastNoMatchingPacForAid:
+    case KErrWlanEapFastAuthFailed:
+        textId = "txt_occ_dialog_1_authentication_failed";
+        eapType = configurations(OuterType).toInt();
+        break;
+        
+    case KErrWlanEapMsChapv2:
+    case KErrWlanEapGtcFailed:
+        textId = "txt_occ_dialog_1_authentication_failed";
+        eapType = configurations(InnerType).toInt();
+        break;
+       
+    case KErrWlanNotSubscribed:
+    case KErrWlanAccessBarred:
+    case KErrWlanPasswordExpired:
+    case KErrWlanNoDialinPermissions:
+    case KErrWlanAccountDisabled:
+    case KErrWlanRestrictedLogonHours:
+        textId = "txt_occ_dialog_1_authentication_failed";
+        if (hasInnerMethod()){
+            eapType = configurations(InnerType).toInt();
+        } else {
+            eapType = configurations(OuterType).toInt();
+        }
+        break;
+        
+    default:
+        // Return empty string
+        break;
+    }
+    
+    QString string;
+    if (textId) {
+        string = HbParameterLengthLimiter(hbTrId(textId)).arg(eapTypeToString(eapType));
+    }
+    
+    return string;
+}
+
+/*!
+   Reader method for eap configurations.
+   
+   See ConfigurationId for further details about the data types in QVariant.
+   
+   @param [in] confId Defines what configuration is read.
+   
+   @return configuration value.
+ */
+QVariant EapWizardPrivate::configurations(ConfigurationId confId) const
+{
+    Q_ASSERT(mConfigurations.contains(confId));
+    
+#ifdef OST_TRACE_COMPILER_IN_USE
+    QString tmp;
+    QDebug tmpStream(&tmp );
+    tmpStream << mConfigurations[confId];
+    TPtrC16 string(tmp.utf16(), tmp.length() );
+    
+    OstTraceExt2( 
+        TRACE_NORMAL, 
+        EAPWIZARDPRIVATE_CONFIGURATIONS, 
+        "EapWizardPrivate::configurations;confId=%{ConfigurationId};string=%S", 
+        (TUint)confId, string );
+#endif
+        
+    return mConfigurations[confId];
+}
+
+/*!
+   Sets EAP configuration value for given configuration identifier.
+   See ConfigurationId for further details about the data types in QVariant.
+   
+   @param [in] confId Configuration Identifier do to be set
+   @param [in] value  Value for configuration.
+ */
+void EapWizardPrivate::setConfigurations(
+    ConfigurationId confId, const QVariant &value)
+{
+#ifdef OST_TRACE_COMPILER_IN_USE
+    QString tmp;
+    QDebug tmpStream(&tmp );
+    tmpStream << value;
+    TPtrC16 string( tmp.utf16(), tmp.length() );
+    
+    OstTraceExt2( 
+        TRACE_NORMAL, 
+        EAPWIZARDPRIVATE_SETCONFIGURATIONS, 
+        "EapWizardPrivate::setConfigurations;confId=%{ConfigurationId};string=%S", 
+        (TUint)confId, string );
+#endif
+
+    mConfigurations[confId] = value;
+}
+
+/*!
+   @return pointer to EapQtConfigInterface.
+ */
+EapQtConfigInterface* EapWizardPrivate::eapConfigurationInterface() const
+{
+    Q_ASSERT(mEapConfIf.data());
+    return mEapConfIf.data();
+}
+
+/*!
+   Maps given EAP Qt Plugin handle into string.
+   
+   @param [in] id EapQtPluginHandle::Handle, id to be mapped to string.
+   
+   @return EAP String.
+ */
+QString EapWizardPrivate::eapTypeToString(int id) const
+{
+    QString locId;
+    switch (id) {
+    case EapQtPluginHandle::PluginEapAka:
+        locId = EapWizardUiStrings::EapAka;
+        break;
+        
+    case EapQtPluginHandle::PluginEapFast:
+        locId = EapWizardUiStrings::EapFast;
+        break;
+        
+    case EapQtPluginHandle::PluginLeap:
+        locId = EapWizardUiStrings::Leap;
+        break;
+        
+    case EapQtPluginHandle::PluginPeap:
+        locId = EapWizardUiStrings::Peap;
+        break;
+        
+    case EapQtPluginHandle::PluginEapSim:
+        locId = EapWizardUiStrings::EapSim;
+        break;
+        
+    case EapQtPluginHandle::PluginEapTls:
+        locId = EapWizardUiStrings::EapTls;
+        break;
+        
+    case EapQtPluginHandle::PluginEapTtls:
+        locId = EapWizardUiStrings::EapTtls;
+        break;
+        
+    case EapQtPluginHandle::PluginEapMschapv2:
+        locId = EapWizardUiStrings::EapMschapv2;
+        break;
+        
+    case EapQtPluginHandle::PluginEapGtc:
+        locId = EapWizardUiStrings::EapGtc;
+        break;
+        
+    case EapQtPluginHandle::PluginPap:
+        locId = EapWizardUiStrings::Pap;
+        break;
+        
+    default:
+        // Invalid enum
+        Q_ASSERT(EapQtPluginHandle::PluginPlainMschapv2 == id);
+        locId = EapWizardUiStrings::Mschapv2;
+        break;
+    }
+    
+    return locId;
+}
+
+/*!
+   Accessor to WLAN Wizard Helper objects.
+   
+   @return a pointer to helper object.
+ */
+WlanWizardHelper *EapWizardPrivate::wizardHelper() const
+{
+    Q_ASSERT(mWizardHelper);
+    return mWizardHelper;
+}
+
+/*!
+   Creates EAP Wizard pages and add those to the wizard framework.
+ */
+void EapWizardPrivate::createPages()
+{
+    mWizardHelper->addPage(
+        EapWizardPage::PageOuterType,
+        new EapWizardPageOuterType(this));
+    
+    mWizardHelper->addPage(
+        EapWizardPage::PageCertificateCa,
+        new EapWizardPageCertCa(this));
+    
+    mWizardHelper->addPage(
+        EapWizardPage::PageCertificateUser,
+        new EapWizardPageCertUser(this));
+    
+    mWizardHelper->addPage(
+        EapWizardPage::PageIdentity,
+        new EapWizardPageIdentity(this));
+    
+    mWizardHelper->addPage(
+        EapWizardPage::PageInnerTypeEapTtls, 
+        new EapWizardPageInnerType(
+            this, 
+            EapQtPluginHandle::PluginEapTtls));
+    
+    mWizardHelper->addPage(
+        EapWizardPage::PageInnerTypePeap, 
+        new EapWizardPageInnerType(
+            this,
+            EapQtPluginHandle::PluginPeap));
+    
+    mWizardHelper->addPage(
+        EapWizardPage::PageUsernamePassword, 
+        new EapWizardPageUsernamePassword(this));
+    
+    mWizardHelper->addPage(
+        EapWizardPage::PageNewPacStorePassword, 
+        new EapWizardPageNewPacStore(this));
+    
+    mWizardHelper->addPage(
+        EapWizardPage::PagePromptPacStorePassword,
+        new EapWizardPagePacStorePasswordConfirm(this));
+}
+
+/*!
+   Check whether selected outer type has inner method.
+   
+   @return true if inner method exists, false otherwise.
+ */
+bool EapWizardPrivate::hasInnerMethod() const
+{
+    int outerType = configurations(EapWizardPrivate::OuterType).toInt();
+    bool ret = false;
+    
+    switch (outerType){
+    case EapQtPluginHandle::PluginEapTtls:
+    case EapQtPluginHandle::PluginPeap:
+    case EapQtPluginHandle::PluginEapFast:
+        ret = true;
+        break;
+    }
+    
+    return ret;
+}
+
+
+/*
+   Handles TLS methods (PEAP, EAP-TLS and EAP-TTLS) settings.
+   
+   Stores configurations to eapConf
+   
+   @param [in,out] eapConf configuration is written to this object.
+   @param [in] outerType Outer EAP method
+ */
+void EapWizardPrivate::handleTlsMethodsSettings(
+    EapQtConfig &eapConf,
+    EapQtPluginHandle &outerType)
+{
+    // Common stuff for all tls methods
+    eapConf.setValue(EapQtConfig::UseIdentityPrivacy, false);
+    eapConf.setValue(EapQtConfig::VerifyServerRealm, false);
+    eapConf.setValue(EapQtConfig::ClientAuthenticationRequired, false);
+    eapConf.setValue(EapQtConfig::UsernameAutomatic, configurations(TunnelUsernameAutomatic));
+    eapConf.setValue(EapQtConfig::Username, configurations(TunnelUsername));
+    eapConf.setValue(EapQtConfig::RealmAutomatic, configurations(TunnelRealmAutomatic));
+    eapConf.setValue(EapQtConfig::Realm, configurations(TunnelRealm));
+    
+    QVariant certVariant = configurations(CertificateCa);
+    
+    if (certVariant.canConvert<EapQtCertificateInfo> ()) {
+        QList<QVariant> caCerts;
+        caCerts.append(certVariant);
+        eapConf.setValue(EapQtConfig::AuthorityCertificate, caCerts);
+        eapConf.setValue(EapQtConfig::AuthorityCertificateAutomatic, false);
+    } else {
+        eapConf.setValue(EapQtConfig::AuthorityCertificateAutomatic, true);
+    }
+    
+    // type specific configurations
+    if (outerType == EapQtPluginHandle::PluginEapTls) {
+        QList<QVariant> userCerts;
+        userCerts.append(configurations(CertificateUser));
+        eapConf.setValue(EapQtConfig::ClientAuthenticationRequired, true);
+        eapConf.setValue(EapQtConfig::UserCertificate, userCerts);
+        
+    } else if (outerType == EapQtPluginHandle::PluginPeap) {
+        
+        switch (configurations(InnerType).toInt()) {
+        case EapQtPluginHandle::PluginEapMschapv2:
+            // EAP-MSCHAPv2: enable v0 only
+            eapConf.setValue(EapQtConfig::PeapVersion0Allowed, true);
+            eapConf.setValue(EapQtConfig::PeapVersion1Allowed, false);
+            break;
+            
+        case EapQtPluginHandle::PluginEapGtc:
+            // EAP-GTC: enable v1 only
+            eapConf.setValue(EapQtConfig::PeapVersion0Allowed, false);
+            eapConf.setValue(EapQtConfig::PeapVersion1Allowed, true);
+            break;
+        }
+        eapConf.setValue(EapQtConfig::PeapVersion2Allowed, false);
+    }
+}
+
+/*!
+   Handles configurations for EAP-FAST.
+   
+   @param [in,out] eapConf EAP Configuration
+   
+   @param false in case of failure.
+ */
+bool EapWizardPrivate::handleEapFastSettings(EapQtConfig &eapConf)
+{
+    bool ret = true;
+    EapQtPacStoreConfig pacStoreConf;
+    
+    eapConf.setValue(EapQtConfig::ProvisioningModeAuthenticated, false);
+    eapConf.setValue(EapQtConfig::ProvisioningModeUnauthenticated, true);
+    eapConf.setValue(EapQtConfig::VerifyServerRealm, false);
+    eapConf.setValue(EapQtConfig::UseIdentityPrivacy, false);
+
+    switch (configurations(PacStoreState).toInt()) {
+    case EapQtPacStoreConfig::PacStoreStateStoreNotExists:
+    case EapQtPacStoreConfig::PacStoreStatePasswordRequired:            
+        pacStoreConf.setValue(
+            EapQtPacStoreConfig::PacStorePassword, 
+            configurations(PacStorePassword));
+        
+        pacStoreConf.setValue(
+            EapQtPacStoreConfig::PacStoreSavePassword, 
+            true);
+        
+        if (!mEapConfIf->savePacStoreConfiguration(pacStoreConf)) {
+            // no cleaning required
+            ret = false;
+        }
+        break;
+        
+    default:
+        // Do nothing
+        break;
+    }
+    
+    return ret;
+}
+
+/*!
+   Handles configurations for EAP-AKA and EAP-SIM.
+   
+   @param [in,out] eapConf EAP Configuration
+ */
+void EapWizardPrivate::handleEapAkaSimSettings(EapQtConfig &eapConf)
+{
+    eapConf.setValue(EapQtConfig::UsernameAutomatic, true);
+    eapConf.setValue(EapQtConfig::RealmAutomatic, true);    
+}
+
+/*!
+   Handles configurations for LEAP.
+   
+   @param [in,out] eapConf EAP Configuration
+ */
+void EapWizardPrivate::handleLeapSettings(EapQtConfig &eapConf)
+{
+    eapConf.setValue(EapQtConfig::UsernameAutomatic, false);
+    eapConf.setValue(EapQtConfig::Username, configurations(Username));
+    eapConf.setValue(EapQtConfig::PasswordPrompt, false);
+    eapConf.setValue(EapQtConfig::Password, configurations(Password));    
+}
+
+/*!
+   Store outer type settings.
+   
+   @param outerType reference to outertype
+    
+   @return false in case of failure.
+ */
+bool EapWizardPrivate::storeOuterTypeSettings(EapQtPluginHandle &outerType)
+{
+    EapQtConfig eapConf;
+    
+    // 1. Store outer type settings
+    switch (outerType.pluginId()) {
+    case EapQtPluginHandle::PluginEapTtls: 
+    case EapQtPluginHandle::PluginPeap:
+    case EapQtPluginHandle::PluginEapTls:
+        handleTlsMethodsSettings(eapConf, outerType);
+        break;
+        
+    case EapQtPluginHandle::PluginEapFast:
+        if (!handleEapFastSettings(eapConf)) {
+            return false;
+        }
+        break;
+    
+    case EapQtPluginHandle::PluginEapAka: 
+    case EapQtPluginHandle::PluginEapSim:
+        handleEapAkaSimSettings(eapConf);
+        break;
+    
+    default:
+        Q_ASSERT(outerType == EapQtPluginHandle::PluginLeap);
+        handleLeapSettings(eapConf);
+        break;
+    }
+    
+    if (hasInnerMethod()) {
+        EapQtPluginHandle inner = static_cast<EapQtPluginHandle::Plugin>(
+            configurations(InnerType).toInt());
+        
+        QList<QVariant> innerType;
+        innerType.append(qVariantFromValue(inner));
+        eapConf.setValue(EapQtConfig::InnerType, innerType);
+    }
+    
+    // store outer type configurations
+    if (!mEapConfIf->saveConfiguration(outerType, eapConf)){
+        mEapConfIf->deleteConfiguration();
+        return false;
+    }
+    
+    QList<EapQtPluginHandle> selectedOuterTypes;
+    selectedOuterTypes.append(outerType);
+    if (!mEapConfIf->setSelectedOuterTypes(selectedOuterTypes)){
+        mEapConfIf->deleteConfiguration();
+        return false;
+    }
+    
+    return true;
+}
+
+
+/*!
+   Store inner type settings if exists.
+   
+   @param outerType reference to outertype
+    
+   @return false in case of failure.
+ */
+bool EapWizardPrivate::storeInnerTypeSettings(EapQtPluginHandle &outerType)
+{
+    bool ret = true;
+    
+    if (hasInnerMethod()) {
+        EapQtPluginHandle inner = static_cast<EapQtPluginHandle::Plugin>(
+            configurations(InnerType).toInt());
+    
+        // All inner methods supported by wizard use password / username. 
+        EapQtConfig eapConfInner;
+        eapConfInner.setValue(EapQtConfig::OuterType, qVariantFromValue(outerType));
+        eapConfInner.setValue(EapQtConfig::UsernameAutomatic, false);
+        eapConfInner.setValue(EapQtConfig::Username, configurations(Username));
+        eapConfInner.setValue(EapQtConfig::PasswordPrompt, false);
+        eapConfInner.setValue(EapQtConfig::Password, configurations(Password));
+            
+        if (!mEapConfIf->saveConfiguration(inner, eapConfInner)){
+            mEapConfIf->deleteConfiguration();
+            ret = false;
+        }
+    }
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/src/eapwizardpage.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,107 @@
+/*
+ * 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: 
+ *   EAP Wizard: API for wizard pages.
+ *
+ */
+
+// System includes
+#include <HbWidget>
+#include <HbDocumentLoader>
+#include <HbMainWindow>
+
+// User includes
+#include "eapwizardpage.h"
+#include "eapwizard_p.h"
+
+/*!
+   \class EapWizardPage
+   \brief Defines the interface for EAP specific wizard pages.
+ */
+
+/*!
+   \fn HbWidget* EapWizardPage::initializePage()
+   See WlanWizardPage.
+ */
+
+/*!
+   \fn int EapWizardPage::nextId() const
+   See WlanWizardPage.
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+   Constructor.
+   
+   @param [in] parent Pointer to EAP Wizard private implementation.
+ */
+EapWizardPage::EapWizardPage(EapWizardPrivate* parent) :
+    QObject(parent), 
+    mWizard(parent)
+{
+}
+
+/*!
+   Destructor.
+ */
+EapWizardPage::~EapWizardPage()
+{
+    mWizard = NULL;
+}
+
+/*!
+   See WlanWizardPage. 
+ */
+int EapWizardPage::nextId(bool &removeFromStack) const
+{
+    removeFromStack = false;
+    return nextId();
+}
+
+/*!
+   Loads requested section from given docml file.
+   
+   @param [in] loader Document loader for docml
+   @param [in] orientation Orientation to be loaded
+   @param [in] filename the name of docml filename
+   @param [in] portraitSection the name of section to be loaded in portrait mode
+   @param [in] landscapeSection the name of section to be loaded in landscape mode
+ */
+void EapWizardPage::loadDocmlSection(
+    HbDocumentLoader *loader,
+    Qt::Orientation orientation,
+    const QString &filename,
+    const QString &portraitSection,
+    const QString &landscapeSection) const
+{
+    bool ok;
+    
+    // Then load the orientation specific section
+    if (orientation == Qt::Horizontal) {
+        loader->load(filename, landscapeSection, &ok);
+        Q_ASSERT(ok);
+    } else {
+        Q_ASSERT(orientation == Qt::Vertical);
+        loader->load(filename, portraitSection, &ok);
+        Q_ASSERT(ok);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/src/eapwizardpagecertca.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,181 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: Certificate Authority Selection.
+ *
+ */
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbMainWindow>
+#include <HbWidget>
+#include <HbRadioButtonList>
+#include <HbLabel>
+#include <eapqtpluginhandle.h>
+#include <eapqtplugininfo.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtcertificateinfo.h>
+
+// User includes
+#include "wlanwizardhelper.h"
+#include "eapwizard_p.h"
+#include "eapwizardpagecertca.h"
+
+/*!
+   \class EapWizardPageCertCa
+   \brief Implements EAP wizard page: Certificate Authority selection
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+   Constructor.
+   
+   @param [in] parent Pointer to EAP Wizard private implementation.
+ */
+EapWizardPageCertCa::EapWizardPageCertCa(EapWizardPrivate* parent) :
+    EapWizardPage(parent), 
+    mDocumentLoader(NULL), 
+    mWidget(NULL), 
+    mTitle(NULL), 
+    mCertList(NULL)
+{
+}
+
+/*!
+   Destructor.
+ */
+EapWizardPageCertCa::~EapWizardPageCertCa()
+{
+}
+
+/*!
+   See WlanWizardPage. 
+ */
+HbWidget* EapWizardPageCertCa::initializePage()
+{
+    if (!mWidget) {
+        mDocumentLoader.reset( new HbDocumentLoader(
+            mWizard->wizardHelper()->mainWindow()) );
+        
+        bool ok;
+        mDocumentLoader->load(":/docml/occ_eap_wizard_01_02_04.docml", &ok);
+        Q_ASSERT(ok);
+        
+        loadDocmlSection(mWizard->wizardHelper()->mainWindow()->orientation());
+        
+        mWidget = qobject_cast<HbWidget*> (
+            mDocumentLoader->findWidget("occ_eap_wizard_01"));
+        Q_ASSERT(mWidget);
+
+        mCertList = qobject_cast<HbRadioButtonList*> (
+            mDocumentLoader->findWidget("list"));
+        Q_ASSERT(mCertList);
+        
+        mTitle = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("title"));
+        Q_ASSERT(mTitle);
+        
+        mTitle->setPlainText(
+            hbTrId("txt_occ_title_select_authority_certificate"));
+        
+        ok = connect(
+            mWizard->wizardHelper()->mainWindow(),
+            SIGNAL(orientationChanged(Qt::Orientation)), 
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(ok);
+    }
+    
+    EapQtConfigInterface* confIf = mWizard->eapConfigurationInterface();
+    // ignore return value
+    confIf->updateCertificates();
+    mCerts = confIf->certificateAuthorityCertificates();
+
+    QStringList list;
+    list << hbTrId("txt_occ_setlabel_val_select_automatically");
+
+     for (int i = 0; i < mCerts.count(); ++i) {
+         // TODO: workaround for BBHA-863EJN
+         // graphics memory runs out for long lists and items
+         QString tmp(mCerts.at(i).value(
+             EapQtCertificateInfo::CertificateLabel).toString());
+         tmp.truncate(10);
+         list << tmp;
+    }
+    
+    // If certificate list has been changed update the content otherwise do not
+    // change it
+    if (list != mCertList->items()) {
+        mCertList->setItems(list);
+        // Automatic is selected by default
+        mCertList->setSelected(IndexForAutomatic);
+    }
+    return mWidget;
+}
+
+/*!
+   Loads the required orientation of docml.
+   
+   @param [in] orientation Orientation to be loaded. 
+ */
+void EapWizardPageCertCa::loadDocmlSection(Qt::Orientation orientation)
+{
+    EapWizardPage::loadDocmlSection(
+        mDocumentLoader.data(),
+        orientation,
+        ":/docml/occ_eap_wizard_01_02_04.docml",
+        "portrait_section",
+        "landscape_section");
+}
+
+/*!
+   See WlanWizardPage.
+   
+   @return next wizard page:
+   - EapWizardPage::PageCertificateUser: For EAP-TLS 
+   - EapWizardPage::PageIdentity: For EAP-TTLS and PEAP
+ */
+int EapWizardPageCertCa::nextId() const
+{
+    int id = WlanWizardPage::PageNone;
+    bool ok;
+    int type = mWizard->configurations(EapWizardPrivate::OuterType).toInt(&ok);
+    Q_ASSERT(ok);
+
+    if (type == EapQtPluginHandle::PluginEapTls) {
+        id = EapWizardPage::PageCertificateUser;
+    } else {
+        Q_ASSERT(type == EapQtPluginHandle::PluginEapTtls || 
+            type == EapQtPluginHandle::PluginPeap);
+        id = EapWizardPage::PageIdentity;
+    }
+
+    int selected = mCertList->selected();
+    if (selected == IndexForAutomatic) {
+        mWizard->setConfigurations(EapWizardPrivate::CertificateCa, QVariant());
+    } else {
+        mWizard->setConfigurations(
+            EapWizardPrivate::CertificateCa, qVariantFromValue(mCerts.at(
+                selected - AmountOfNonCertItems)));
+    }
+
+    return id;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/src/eapwizardpagecertuser.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,190 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: User Certificate Selection.
+ *
+ */
+
+// System includes
+#include <QGraphicsItem>
+#include <HbDocumentLoader>
+#include <HbMainWindow>
+#include <HbWidget>
+#include <HbRadioButtonList>
+#include <HbLabel>
+#include <eapqtconfiginterface.h>
+#include <eapqtcertificateinfo.h>
+
+// User includes
+#include "wlanwizardhelper.h"
+#include "eapwizardpagecertuser.h"
+#include "eapwizard_p.h"
+
+/*!
+   \class EapWizardPageCertUser
+   \brief Implements EAP wizard page: User Certificate selection
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+   Constructor.
+   
+   @param [in] parent Pointer to EAP Wizard private implementation.
+ */
+
+EapWizardPageCertUser::EapWizardPageCertUser(EapWizardPrivate* parent) :
+    EapWizardPage(parent), 
+    mWidget(NULL), 
+    mCertList(NULL),
+    mErrorLabel(NULL),
+    mDocumentLoader(NULL),
+    mValid(false)
+{
+}
+
+/*!
+   Destructor.
+ */
+EapWizardPageCertUser::~EapWizardPageCertUser()
+{
+}
+
+/*!
+   See WlanWizardPage. 
+ */
+HbWidget* EapWizardPageCertUser::initializePage()
+{
+    if (!mWidget) {
+        bool ok;
+        mDocumentLoader.reset(new HbDocumentLoader(mWizard->wizardHelper()->mainWindow()));
+        mDocumentLoader->load(":/docml/occ_eap_wizard_06.docml", &ok);
+        Q_ASSERT(ok);
+        loadDocmlSection(mWizard->wizardHelper()->mainWindow()->orientation());
+        
+        mWidget = qobject_cast<HbWidget*> (mDocumentLoader->findWidget("occ_eap_wizard_06"));
+        Q_ASSERT(mWidget);
+
+        mCertList = qobject_cast<HbRadioButtonList*> (mDocumentLoader->findWidget("list"));
+        Q_ASSERT(mCertList);
+
+        mErrorLabel = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("errorLabel"));
+        Q_ASSERT(mErrorLabel);
+
+        mErrorLabel->setPlainText(hbTrId("txt_occ_dialog_no_certificates_installed_wizard_c"));
+
+        ok = connect(
+            mWizard->wizardHelper()->mainWindow(),
+            SIGNAL(orientationChanged(Qt::Orientation)), 
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(ok);
+        
+        ok = connect(
+            mCertList, SIGNAL(itemSelected(int)), 
+            this, SLOT(itemSelected(int)));
+        Q_ASSERT(ok);
+    }
+
+    EapQtConfigInterface* confIf = mWizard->eapConfigurationInterface();
+    // ignore return value
+    confIf->updateCertificates();
+    mCerts = confIf->userCertificates();
+
+    QStringList list;
+    for (int i = 0; i < mCerts.count(); ++i) {
+        list << mCerts.at(i).value(EapQtCertificateInfo::CertificateLabel).toString();
+    }
+
+    if (list.isEmpty()) {
+        mErrorLabel->setVisible(true);
+        mCertList->setVisible(false);
+        mValid = false;
+    } else if (list != mCertList->items()){
+        // in case the user cert list has been changed, update UI
+        mCertList->setItems(list);
+        mErrorLabel->setVisible(false);
+        mCertList->setVisible(true);
+        
+        if (list.count() == 1) {
+            mValid = true;
+            mCertList->setSelected(0);
+        } else {
+            mValid = false;
+        }
+    }
+    return mWidget;
+}
+
+/*!
+   Loads the required orientation of docml.
+   
+   @param [in] orientation Orientation to be loaded. 
+ */
+void EapWizardPageCertUser::loadDocmlSection(Qt::Orientation orientation)
+{
+    EapWizardPage::loadDocmlSection(
+        mDocumentLoader.data(),
+        orientation,
+        ":/docml/occ_eap_wizard_06.docml", 
+        "portrait_section",
+        "landscape_section");
+}
+
+/*!
+   See WlanWizardPage. 
+   
+   @return next wizard page: EapWizardPage::PageIdentity
+ */
+int EapWizardPageCertUser::nextId() const
+{
+    mWizard->setConfigurations(
+        EapWizardPrivate::CertificateUser, 
+        qVariantFromValue(
+            mCerts.at(mCertList->selected())));
+
+    return EapWizardPage::PageIdentity;
+}
+
+/*!
+   See WlanWizardPage.
+   
+   Validates the content of the page.
+   
+   @return true if content is valid.
+ */
+bool EapWizardPageCertUser::showPage()
+{
+    return mValid;
+}
+
+/*!
+   Handler for itemsSelected() signal from HbRadioButtonList.
+   
+   @param [in] index NOT USED
+ */
+void EapWizardPageCertUser::itemSelected(int index)
+{
+    Q_UNUSED(index);
+    mValid = true;
+    mWizard->wizardHelper()->enableNextButton(mValid);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/src/eapwizardpageidentity.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,293 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: EAP Identity.
+ *
+ */
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbMainWindow>
+#include <HbWidget>
+#include <HbCheckBox>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <HbEditorInterface>
+#include <HbParameterLengthLimiter>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtpluginhandle.h>
+#include <eapqtplugininfo.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtvalidator.h>
+
+// User includes
+#include "wlanwizardhelper.h"
+#include "eapwizardpageidentity.h"
+#include "eapwizard_p.h"
+
+/*!
+   \class EapWizardPageIdentity
+   \brief Implements EAP wizard page: Identify for outer EAP type
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+   Constructor.
+   
+   @param [in] parent Pointer to EAP Wizard private implementation.
+ */
+EapWizardPageIdentity::EapWizardPageIdentity(EapWizardPrivate* parent) :
+    EapWizardPage(parent), 
+    mDocumentLoader(NULL), 
+    mValidatorRealm(NULL),
+    mValidatorUsername(NULL),
+    mWidget(NULL), 
+    mEditUsername(NULL), 
+    mEditRealm(NULL), 
+    mCheckUsername(NULL), 
+    mCheckRealm(NULL), 
+    mLabelRealm(NULL),
+    mLabelUsername(NULL)
+{
+}
+
+/*!
+   Destructor.
+ */
+EapWizardPageIdentity::~EapWizardPageIdentity()
+{
+}
+
+/*!
+   See WlanWizardPage. 
+ */
+HbWidget* EapWizardPageIdentity::initializePage()
+{
+    if (!mWidget) {
+        bool ok = true;
+        mDocumentLoader.reset(
+            new HbDocumentLoader(mWizard->wizardHelper()->mainWindow()));
+        mDocumentLoader->load(":/docml/occ_eap_wizard_03.docml", &ok);
+        Q_ASSERT(ok);
+
+        loadDocmlSection(mWizard->wizardHelper()->mainWindow()->orientation());
+        
+        mWidget = qobject_cast<HbWidget*> (mDocumentLoader->findWidget("occ_eap_wizard_03"));
+        Q_ASSERT(mWidget);
+
+        mEditUsername = qobject_cast<HbLineEdit*> (mDocumentLoader->findWidget("lineEditUsername"));
+        Q_ASSERT(mEditUsername);
+
+        mEditRealm = qobject_cast<HbLineEdit*> (mDocumentLoader->findWidget("lineEditRealm"));
+        Q_ASSERT(mEditRealm);
+
+        mCheckUsername = qobject_cast<HbCheckBox*> (mDocumentLoader->findWidget("setlabel_53_val"));
+        Q_ASSERT(mCheckUsername);
+
+        mCheckRealm = qobject_cast<HbCheckBox*> (mDocumentLoader->findWidget("setlabel_54_val"));
+        Q_ASSERT(mCheckRealm);
+        
+        mLabelUsername = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("setlabel_53"));
+        Q_ASSERT(mLabelUsername);
+        
+        mLabelRealm = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("setlabel_54"));
+        Q_ASSERT(mLabelRealm);
+        
+        ok = connect(
+            mWizard->wizardHelper()->mainWindow(),
+            SIGNAL(orientationChanged(Qt::Orientation)), 
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(ok);
+        
+        ok = connect(
+            mEditUsername, SIGNAL(textChanged(const QString &)), 
+            this, SLOT(textChanged(const QString &)));
+        Q_ASSERT(ok);
+        
+        ok = connect(
+            mEditRealm, SIGNAL(textChanged(const QString &)),
+            this, SLOT(textChanged(const QString &)));
+        Q_ASSERT(ok);
+        
+        ok = connect(
+            mCheckUsername, SIGNAL(stateChanged(int)), 
+            this, SLOT(stateChanged(int)));
+        Q_ASSERT(ok);
+        
+        ok = connect(
+            mCheckRealm, SIGNAL(stateChanged(int)), 
+            this, SLOT(stateChanged(int)));
+        Q_ASSERT(ok);
+        // by default both checkboxes are checked
+    }
+    EapQtPluginHandle plugin((EapQtPluginHandle::Plugin)     
+        mWizard->configurations(EapWizardPrivate::OuterType).toInt() );
+
+    mLabelUsername->setPlainText(
+        HbParameterLengthLimiter(
+            hbTrId("txt_occ_setlabel_user_name_for_1")).arg(
+                mWizard->eapTypeToString(plugin.pluginId())));
+    
+    // Configure editors properties
+    mValidatorUsername.reset( 
+        mWizard->eapConfigurationInterface()->validatorEap(
+            plugin.type(), 
+            EapQtConfig::Username) );
+    Q_ASSERT(mValidatorUsername.data());
+    mValidatorUsername->updateEditor(mEditUsername);
+
+    mValidatorRealm.reset( 
+        mWizard->eapConfigurationInterface()->validatorEap(
+            plugin.type(), 
+            EapQtConfig::Realm) );
+    Q_ASSERT(mValidatorRealm.data());
+    mValidatorRealm->updateEditor(mEditRealm);
+
+    return mWidget;
+}
+
+/*!
+   Loads the required orientation of docml.
+   
+   @param [in] orientation Orientation to be loaded. 
+ */
+void EapWizardPageIdentity::loadDocmlSection(Qt::Orientation orientation)
+{
+    EapWizardPage::loadDocmlSection(
+        mDocumentLoader.data(),
+        orientation,
+        ":/docml/occ_eap_wizard_03.docml",
+        "portrait_section",
+        "landscape_section");
+}
+
+/*!
+   See WlanWizardPage.
+   
+   @return next wizard page:
+   - WlanWizardPage::PageProcessSettings: For EAP-TLS 
+   - EapWizardPage::PageInnerTypeEapTtls: For EAP-TTLS
+   - EapWizardPage::PageInnerTypePeap: For PEAP
+ */
+int EapWizardPageIdentity::nextId() const
+{
+    int id = WlanWizardPage::PageNone;
+    bool ok;
+    int type = mWizard->configurations(EapWizardPrivate::OuterType).toInt(&ok);
+    Q_ASSERT(ok);
+
+    switch (type) {
+    case EapQtPluginHandle::PluginEapTls:
+        id = WlanWizardPage::PageProcessSettings;
+        break;
+        
+    case EapQtPluginHandle::PluginEapTtls:
+        id = EapWizardPage::PageInnerTypeEapTtls;
+        break;
+        
+    case EapQtPluginHandle::PluginPeap:
+        id = EapWizardPage::PageInnerTypePeap;
+        break;
+    }
+
+    mWizard->setConfigurations(EapWizardPrivate::TunnelUsernameAutomatic,
+        mCheckUsername->isChecked());
+    
+    mWizard->setConfigurations(
+        EapWizardPrivate::TunnelUsername, mEditUsername->text());
+    
+    mWizard->setConfigurations(
+        EapWizardPrivate::TunnelRealmAutomatic, mCheckRealm->isChecked());
+    
+    mWizard->setConfigurations(EapWizardPrivate::TunnelRealm, mEditRealm->text());
+
+    return id;
+}
+
+/*!
+   See WlanWizardPage.
+   
+   Validates the content of the page.
+   
+   @return true if content is valid.
+ */
+bool EapWizardPageIdentity::showPage()
+{
+    bool valid = false;
+
+    if (validateGroup(mEditUsername, mCheckUsername, mValidatorUsername.data()) && 
+        validateGroup(mEditRealm, mCheckRealm, mValidatorRealm.data())) {
+        valid = true;
+    }
+
+    return valid;
+}
+
+/*!
+   Slot for textChanged() signal from HbLineEdit.
+   
+   @param [in] text NOT USED.
+ */
+void EapWizardPageIdentity::textChanged(const QString & text)
+{
+    Q_UNUSED(text);
+    mWizard->wizardHelper()->enableNextButton(showPage());
+}
+
+/*!
+   Slot for stateChanged() signal from HbCheckBox.
+   
+   @param [in] state NOT USED.
+ */
+void EapWizardPageIdentity::stateChanged(int state )
+{
+    Q_UNUSED(state);
+    mEditUsername->setEnabled(!mCheckUsername->isChecked());
+    mEditRealm->setEnabled(!mCheckRealm->isChecked());
+    mWizard->wizardHelper()->enableNextButton(showPage());
+}
+
+/*!
+   Validates the settings group, that is line edit and checkbox using
+   given validator.
+   
+   @param [in] edit pointer to line edit to which content must be validated
+   @param [in] checkBox pointer to checkbox
+   @param [in] validator pointer to validator which is used to validate the content
+                    of the line editor.
+                    
+   @return true if validation is ok, false otherwise. 
+ */
+bool EapWizardPageIdentity::validateGroup(
+    HbLineEdit *edit, 
+    HbCheckBox *checkBox,
+    EapQtValidator *validator) const
+{
+    bool status = false;
+    if (checkBox->isChecked() || 
+        checkBox->isChecked() == false && 
+        EapQtValidator::StatusOk == validator->validate(edit->text())) {
+        status = true;
+    }
+    return status;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/src/eapwizardpageinnertype.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,202 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: Inner Type selection
+ *
+ */
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbMainWindow>
+#include <HbWidget>
+#include <HbRadioButtonList>
+#include <HbLabel>
+#include <HbParameterLengthLimiter>
+#include <eapqtpluginhandle.h>
+#include <eapqtplugininfo.h>
+#include <eapqtconfiginterface.h>
+
+// User includes
+#include "wlanwizardhelper.h"
+#include "eapwizardpageinnertype.h"
+#include "eapwizard_p.h"
+
+
+/*!
+   \class EapWizardPageInnerType
+   \brief Implements EAP wizard page: Inner EAP type selection.
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+   Constructor.
+   
+   @param [in] parent Pointer to EAP Wizard private implementation.
+   @param [in] outerType Identifies the outer type: Peap or EapTtls
+ */
+EapWizardPageInnerType::EapWizardPageInnerType(
+    EapWizardPrivate* parent, int outerType) :
+    EapWizardPage(parent), 
+    mWidget(NULL), 
+    mRadio(NULL), 
+    mTitle(NULL),
+    mDocumentLoader(NULL),    
+    mOuterType(outerType),
+    mValid(false)
+{
+}
+
+/*!
+   Destructor.
+ */
+EapWizardPageInnerType::~EapWizardPageInnerType()
+{
+}
+
+/*!
+   See WlanWizardPage. 
+ */
+HbWidget* EapWizardPageInnerType::initializePage()
+{
+    if (!mWidget) {
+        bool ok;
+        mDocumentLoader.reset(
+            new HbDocumentLoader(mWizard->wizardHelper()->mainWindow()));
+        mDocumentLoader->load(":/docml/occ_eap_wizard_01_02_04.docml", &ok);
+        Q_ASSERT(ok);
+
+        loadDocmlSection(mWizard->wizardHelper()->mainWindow()->orientation());
+        
+        mWidget = qobject_cast<HbWidget*> (mDocumentLoader->findWidget("occ_eap_wizard_01"));
+        Q_ASSERT(mWidget);
+
+        mTitle = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("title"));
+        Q_ASSERT(mTitle);
+
+        mRadio = qobject_cast<HbRadioButtonList*> (mDocumentLoader->findWidget("list"));
+        Q_ASSERT(mRadio);
+        
+        ok = connect(
+            mWizard->wizardHelper()->mainWindow(),
+            SIGNAL(orientationChanged(Qt::Orientation)), 
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(ok);
+        
+        QStringList list;
+        switch (mOuterType){
+        case EapQtPluginHandle::PluginPeap:
+            appendToList(list, EapQtPluginHandle::PluginEapMschapv2);    
+            break;
+            
+        default:
+            Q_ASSERT(mOuterType == EapQtPluginHandle::PluginEapTtls);
+            appendToList(list, EapQtPluginHandle::PluginPlainMschapv2);
+            appendToList(list, EapQtPluginHandle::PluginPap);
+            break;
+        }
+        appendToList(list, EapQtPluginHandle::PluginEapGtc);
+        mRadio->setItems(list);
+ 
+        ok = connect(mRadio, SIGNAL(itemSelected(int)), this, SLOT(itemSelected(int)));
+        Q_ASSERT(ok);
+    }
+
+    mTitle->setPlainText(
+        HbParameterLengthLimiter(
+            hbTrId("txt_occ_title_select_innear_eap_type_for_1")).arg(
+                mWizard->eapTypeToString(
+                    mWizard->configurations(
+                        EapWizardPrivate::OuterType).toInt())));
+
+    return mWidget;
+}
+
+/*!
+   Loads the required orientation of docml.
+   
+   @param [in] orientation Orientation to be loaded. 
+ */
+void EapWizardPageInnerType::loadDocmlSection(Qt::Orientation orientation)
+{
+    EapWizardPage::loadDocmlSection(
+        mDocumentLoader.data(),
+        orientation,
+        ":/docml/occ_eap_wizard_01_02_04.docml", 
+        "portrait_section",
+        "landscape_section");
+}
+
+/*!
+   See WlanWizardPage.
+   
+   @return next wizard page: EapWizardPage::PageUsernamePassword
+ */
+int EapWizardPageInnerType::nextId() const
+{
+    mWizard->setConfigurations(
+        EapWizardPrivate::InnerType, 
+        mEapTypes.at(mRadio->selected()));
+    
+    return EapWizardPage::PageUsernamePassword;
+}
+
+/*!
+   See WlanWizardPage.
+   
+   Validates the content of the page.
+   
+   @return true if content is valid.
+ */
+bool EapWizardPageInnerType::showPage()
+{
+    return mValid;
+}
+
+/*!
+   Handler for itemsSelected() signal from HbRadioButtonList.
+   
+   @param [in] index NOT USED
+ */
+void EapWizardPageInnerType::itemSelected(int index )
+{
+    Q_UNUSED(index);
+    mValid = true;
+    mWizard->wizardHelper()->enableNextButton(mValid);
+}
+
+/*!
+   Appends given method to radiobutton list if plugin (method) is supported
+   
+   @param [in,out] items the content of radiobutton list
+   @param [in] pluginHandle EAP Type plugin handle to be added.
+ */
+void EapWizardPageInnerType::appendToList(
+    QStringList &items, 
+    EapQtPluginHandle::Plugin innerType)
+{
+    if (mWizard->eapConfigurationInterface()->isSupportedInnerType(
+        static_cast<EapQtPluginHandle::Plugin>(mOuterType), innerType)) {
+        items << mWizard->eapTypeToString(innerType);
+        mEapTypes.append(innerType);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/src/eapwizardpagenewpacstore.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,187 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: New PAC store password
+ *
+ */
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbMainWindow>
+#include <HbWidget>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtconfig.h>
+#include <eapqtvalidator.h>
+
+// User includes
+#include "wlanwizardhelper.h"
+#include "eapwizardpagenewpacstore.h"
+#include "eapwizard_p.h"
+
+/*!
+   \class EapWizardPageNewPacStore
+   \brief Implements EAP wizard page: New PAC store password
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+   Constructor.
+   
+   @param [in] parent Pointer to EAP Wizard private implementation.
+ */
+EapWizardPageNewPacStore::EapWizardPageNewPacStore(
+    EapWizardPrivate* parent) :
+    EapWizardPage(parent), 
+    mDocumentLoader(NULL), 
+    mValidator(NULL),
+    mWidget(NULL), 
+    mEditPasswordNew(NULL),
+    mEditPasswordConfirm(NULL), 
+    mTitlePasswordNew(NULL), 
+    mTitlePasswordConfirm(NULL)
+{
+}
+
+/*!
+   Destructor.
+ */
+EapWizardPageNewPacStore::~EapWizardPageNewPacStore()
+{
+}
+
+/*!
+   See WlanWizardPage. 
+ */
+HbWidget* EapWizardPageNewPacStore::initializePage()
+{
+    if (!mWidget) {
+        bool ok;
+        mDocumentLoader.reset( 
+            new HbDocumentLoader(mWizard->wizardHelper()->mainWindow()));
+        mDocumentLoader->load(":/docml/occ_eap_wizard_05_07.docml", &ok);
+        Q_ASSERT(ok);
+        
+        loadDocmlSection(mWizard->wizardHelper()->mainWindow()->orientation());
+        
+        mWidget = qobject_cast<HbWidget*> (mDocumentLoader->findWidget("view"));
+        Q_ASSERT(mWidget);
+
+        mTitlePasswordNew = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("setlabel_55"));
+        Q_ASSERT(mTitlePasswordNew);
+
+        mTitlePasswordConfirm = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("setlabel_56"));
+        Q_ASSERT(mTitlePasswordConfirm);
+
+        mEditPasswordNew = qobject_cast<HbLineEdit*> (mDocumentLoader->findWidget("lineEditUsername"));
+        Q_ASSERT(mEditPasswordNew);
+
+        mEditPasswordConfirm = qobject_cast<HbLineEdit*> (mDocumentLoader->findWidget("lineEditPassword"));
+        Q_ASSERT(mEditPasswordConfirm);
+        
+        mValidator.reset( 
+            mWizard->eapConfigurationInterface()->validatorPacStore(
+                EapQtPacStoreConfig::PacStorePassword));
+        Q_ASSERT(mValidator.data());
+        
+        mTitlePasswordNew->setPlainText(hbTrId("txt_occ_setlabel_new_pac_store_password"));
+        mTitlePasswordConfirm->setPlainText(hbTrId("txt_occ_setlabel_confirm_password"));
+
+        // Configure editors properties
+        mValidator->updateEditor(mEditPasswordNew);
+        mValidator->updateEditor(mEditPasswordConfirm);
+
+        ok = connect(
+            mWizard->wizardHelper()->mainWindow(),
+            SIGNAL(orientationChanged(Qt::Orientation)), 
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(ok);
+        
+        ok = connect(
+            mEditPasswordNew, SIGNAL(textChanged(const QString &)), 
+            this, SLOT(textChanged(const QString &)));
+        Q_ASSERT(ok);
+        
+        ok = connect(
+            mEditPasswordConfirm, SIGNAL(textChanged(const QString &)), 
+            this, SLOT(textChanged(const QString &)));
+        Q_ASSERT(ok);
+    }
+    return mWidget;
+}
+
+/*!
+   Loads the required orientation of docml.
+   
+   @param [in] orientation Orientation to be loaded. 
+ */
+void EapWizardPageNewPacStore::loadDocmlSection(Qt::Orientation orientation)
+{
+    EapWizardPage::loadDocmlSection(
+        mDocumentLoader.data(),
+        orientation,
+        ":/docml/occ_eap_wizard_05_07.docml",
+        "portrait_section",
+        "landscape_section");
+}
+
+/*!
+   See WlanWizardPage.
+   
+   Validates the content of the page.
+   
+   @return true if content is valid.
+ */
+bool EapWizardPageNewPacStore::showPage()
+{
+    bool valid = false;
+    if (mValidator->validate(mEditPasswordNew->text()) == EapQtValidator::StatusOk &&
+        mEditPasswordNew->text() == mEditPasswordConfirm->text()) {
+        valid = true;
+    }
+    return valid;
+}
+
+/*!
+   See WlanWizardPage.
+   
+   @return next wizard page: EapWizardPage::PageUsernamePassword
+ */
+int EapWizardPageNewPacStore::nextId() const
+{
+    mWizard->setConfigurations(EapWizardPrivate::PacStorePassword, mEditPasswordNew->text());
+    return EapWizardPage::PageUsernamePassword;
+}
+
+/*!
+   Slot for textChanged() signal from HbLineEdit.
+   
+   @param [in] text NOT USED.
+ */
+void EapWizardPageNewPacStore::textChanged(const QString &text)
+{
+    Q_UNUSED(text);
+    mWizard->wizardHelper()->enableNextButton(showPage());
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/src/eapwizardpageoutertype.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,260 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: Outer type selection
+ *
+ */
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbMainWindow>
+#include <HbWidget>
+#include <HbRadioButtonList>
+#include <HbLabel>
+#include <eapqtpluginhandle.h>
+#include <eapqtplugininfo.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtconfig.h>
+#include <eapqtpacstoreconfig.h>
+
+// User includes
+#include "wlanwizardhelper.h"
+#include "eapwizard_p.h"
+#include "eapwizardpageoutertype.h"
+
+/*!
+   \class EapWizardPageOuterType
+   \brief Implements EAP wizard page: Outer EAP type selection
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+   Constructor.
+   
+   @param [in] parent Pointer to EAP Wizard private implementation.
+ */
+EapWizardPageOuterType::EapWizardPageOuterType(EapWizardPrivate* parent) :
+    EapWizardPage(parent),
+    mWidget(NULL),
+    mRadio(NULL),
+    mTitle(NULL),
+    mDocumentLoader(NULL),    
+    mValid(false)
+{
+}
+
+/*!
+   Destructor.
+ */
+EapWizardPageOuterType::~EapWizardPageOuterType()
+{
+}
+
+/*!
+   See WlanWizardPage. 
+ */
+HbWidget* EapWizardPageOuterType::initializePage()
+{
+    if (!mWidget) {
+        bool ok;
+        mDocumentLoader.reset(
+            new HbDocumentLoader(mWizard->wizardHelper()->mainWindow()));
+        mDocumentLoader->load(":/docml/occ_eap_wizard_01_02_04.docml", &ok);
+        Q_ASSERT(ok);
+        
+        loadDocmlSection(mWizard->wizardHelper()->mainWindow()->orientation());
+        
+        mWidget = qobject_cast<HbWidget*> (mDocumentLoader->findWidget("occ_eap_wizard_01"));
+        Q_ASSERT(mWidget);
+
+        mRadio = qobject_cast<HbRadioButtonList*> (mDocumentLoader->findWidget("list"));
+        Q_ASSERT(mRadio);
+
+        mTitle = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("title"));
+        Q_ASSERT(mTitle);
+        
+        mTitle->setPlainText(hbTrId("txt_occ_title_select_eap_type"));
+
+        QStringList items;
+        appendToList(items, EapQtPluginHandle::PluginPeap);
+        appendToList(items, EapQtPluginHandle::PluginEapTtls);
+        appendToList(items, EapQtPluginHandle::PluginEapTls);
+        appendToList(items, EapQtPluginHandle::PluginEapFast);
+        appendToList(items, EapQtPluginHandle::PluginLeap);
+        appendToList(items, EapQtPluginHandle::PluginEapAka);
+        appendToList(items, EapQtPluginHandle::PluginEapSim);
+        mRadio->setItems(items);
+
+        ok = connect(
+            mRadio, SIGNAL(itemSelected(int)), 
+            this, SLOT(itemSelected(int)));
+        Q_ASSERT(ok);
+        
+        ok = connect(
+            mWizard->wizardHelper()->mainWindow(), 
+            SIGNAL(orientationChanged(Qt::Orientation)), 
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(ok);
+    }
+    return mWidget;
+}
+
+/*!
+   Loads the required orientation of docml.
+   
+   @param [in] orientation Orientation to be loaded. 
+ */
+void EapWizardPageOuterType::loadDocmlSection(Qt::Orientation orientation)
+{
+    EapWizardPage::loadDocmlSection(
+        mDocumentLoader.data(),
+        orientation,
+        ":/docml/occ_eap_wizard_01_02_04.docml",
+        "portrait_section",
+        "landscape_section");
+}
+
+/*!
+   See WlanWizardPage.
+   
+   @return next wizard page:
+   - WlanWizardPage::PageProcessSettings: For EAP-AKA and EAP-SIM
+   - EapWizardPage::PageCertificateCa: For PEAP, EAP-TLS and EAP-TTLS 
+   - EapWizardPage::PageUsernamePassword: For LEAP and EAP-FAST (pac confirmed)
+   - EapWizardPage::PageNewPacStorePassword: For EAP-FAST (no pac store)
+   - EapWizardPage::PagePromptPacStorePassword: For EAP-FAST (confirm pac store)
+ */
+int EapWizardPageOuterType::nextId() const
+{
+    int id = WlanWizardPage::PageNone;
+    EapQtPluginHandle::Plugin handle = 
+        static_cast<EapQtPluginHandle::Plugin>(mEapTypes.at(mRadio->selected()));
+    switch (handle) {
+    case EapQtPluginHandle::PluginPeap:
+    case EapQtPluginHandle::PluginEapTtls:
+    case EapQtPluginHandle::PluginEapTls:
+        id = EapWizardPage::PageCertificateCa;
+        break;
+
+    case EapQtPluginHandle::PluginEapFast:
+        id = nextIdForEapFast();
+        break;
+        
+    case EapQtPluginHandle::PluginLeap:
+        id = EapWizardPage::PageUsernamePassword;
+        break;
+
+    default:
+        Q_ASSERT(EapQtPluginHandle::PluginEapAka == handle ||
+            EapQtPluginHandle::PluginEapSim == handle);   
+        id = WlanWizardPage::PageProcessSettings;
+        break;
+    }
+    
+    mWizard->setConfigurations(EapWizardPrivate::OuterType, handle);
+
+    return id;
+}
+
+/*!
+   See WlanWizardPage.
+   
+   Validates the content of the page.
+   
+   @return true if content is valid.
+ */
+bool EapWizardPageOuterType::showPage()
+{
+    return mValid;
+}
+
+/*!
+   Slot for itemSelected() signal from HbRadioButtonList.
+   
+   @param [in] index NOT USED.
+ */
+void EapWizardPageOuterType::itemSelected(int index)
+{
+    Q_UNUSED(index);
+    mValid = true;
+    mWizard->wizardHelper()->enableNextButton(mValid);
+}
+
+/*!
+   Appends given method to radiobutton list if plugin (method) is supported
+   
+   @param [in,out] items the content of radiobutton list
+   @param [in] pluginHandle EAP Type plugin handle to be added.
+ */
+void EapWizardPageOuterType::appendToList(
+    QStringList &items, int pluginHandle)
+{
+    if (mWizard->eapConfigurationInterface()->isSupportedOuterType(
+        (EapQtPluginHandle::Plugin)pluginHandle)) {
+        items << mWizard->eapTypeToString(pluginHandle);
+        mEapTypes.append(pluginHandle);
+    }
+}
+
+/*
+   Getter for next page id when outer eap type is EAP-FAST.
+   
+   @return Page ID.
+ */
+int EapWizardPageOuterType::nextIdForEapFast() const
+{
+    int pageId;
+    
+    mWizard->setConfigurations(EapWizardPrivate::InnerType,
+        EapQtPluginHandle::PluginEapMschapv2);
+    
+    EapQtPacStoreConfig pacStoreConf;
+    int pacStoreState = EapQtPacStoreConfig::PacStoreStateStoreNotExists;
+    
+    if (mWizard->eapConfigurationInterface()->readPacStoreConfiguration(pacStoreConf)) {
+        pacStoreState = pacStoreConf.value(EapQtPacStoreConfig::PacStoreState).toInt();   
+    } else {
+        pacStoreConf.clear();
+        pacStoreConf.setValue(EapQtPacStoreConfig::PacStoreReset, true);
+        mWizard->eapConfigurationInterface()->savePacStoreConfiguration(pacStoreConf);
+    }
+    
+    mWizard->setConfigurations(EapWizardPrivate::PacStoreState, pacStoreState);
+    
+    switch (pacStoreState) {
+    case EapQtPacStoreConfig::PacStoreStateStoreNotExists:
+        pageId = EapWizardPage::PageNewPacStorePassword;
+        break;
+    
+    case EapQtPacStoreConfig::PacStoreStatePasswordRequired:
+        pageId = EapWizardPage::PagePromptPacStorePassword;
+        break;
+    
+    default:
+        Q_ASSERT(pacStoreState == EapQtPacStoreConfig::PacStoreStatePasswordStored);
+        pageId = EapWizardPage::PageUsernamePassword;
+        break;
+    }
+    
+    return pageId;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/src/eapwizardpagepacstorepasswordconfirm.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,187 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: New PAC store password
+ *
+ */
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbMainWindow>
+#include <HbWidget>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtconfig.h>
+#include <eapqtvalidator.h>
+
+// User includes
+#include "wlanwizardhelper.h"
+#include "eapwizardpagepacstorepasswordconfirm.h"
+#include "eapwizard_p.h"
+
+/*!
+   \class EapWizardPagePacStorePasswordConfirm
+   \brief Implements EAP wizard page: Confirm PAC store password
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+   Constructor.
+   
+   @param [in] parent Pointer to EAP Wizard private implementation.
+ */
+EapWizardPagePacStorePasswordConfirm::EapWizardPagePacStorePasswordConfirm(
+    EapWizardPrivate* parent) :
+    EapWizardPage(parent),
+    mDocumentLoader(NULL),
+    mValidator(NULL),
+    mWidget(NULL),
+    mEditPasswordConfirm(NULL),
+    mLabelError(NULL)
+{
+}
+
+/*!
+   Destructor.
+ */
+EapWizardPagePacStorePasswordConfirm::~EapWizardPagePacStorePasswordConfirm()
+{
+}
+
+/*!
+   See WlanWizardPage. 
+ */
+HbWidget* EapWizardPagePacStorePasswordConfirm::initializePage()
+{
+    if (!mWidget) {
+        bool ok;
+        mDocumentLoader.reset(
+            new HbDocumentLoader(mWizard->wizardHelper()->mainWindow()));
+        mDocumentLoader->load(":/docml/occ_eap_wizard_08.docml", &ok);
+        Q_ASSERT(ok);
+        
+        loadDocmlSection(mWizard->wizardHelper()->mainWindow()->orientation());
+
+        mWidget = qobject_cast<HbWidget*> (mDocumentLoader->findWidget("view"));
+        Q_ASSERT(mWidget);
+
+        mEditPasswordConfirm = qobject_cast<HbLineEdit*> (mDocumentLoader->findWidget(
+            "lineEditPasswordConfirm"));
+        Q_ASSERT(mEditPasswordConfirm);
+
+        mLabelError = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("labelError"));
+        Q_ASSERT(mLabelError);
+        
+        mValidator.reset(
+            mWizard->eapConfigurationInterface()->validatorPacStore(
+                EapQtPacStoreConfig::PacStorePasswordConfirmation));
+        Q_ASSERT(mValidator.data());
+        
+        mLabelError->setPlainText("");
+        // Configurate editor properties and configurations
+        mValidator->updateEditor(mEditPasswordConfirm);
+        
+        mEditPasswordConfirm->installEventFilter(this);
+        
+        ok = connect(
+            mWizard->wizardHelper()->mainWindow(),
+            SIGNAL(orientationChanged(Qt::Orientation)), 
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(ok);
+    }
+
+    return mWidget;
+}
+
+
+/*!
+   Loads the required orientation of docml.
+   
+   @param [in] orientation Orientation to be loaded. 
+ */
+void EapWizardPagePacStorePasswordConfirm::loadDocmlSection(Qt::Orientation orientation)
+{
+    EapWizardPage::loadDocmlSection(
+        mDocumentLoader.data(),
+        orientation,
+        ":/docml/occ_eap_wizard_08.docml", 
+        "portrait_section",
+        "landscape_section");
+}
+
+/*!
+   See WlanWizardPage.
+   
+   @return next wizard page: 
+   - EapWizardPage::PageUsernamePassword: When password is ok
+   - WlanWizardPage::PageNone: When password is not ok
+ */
+int EapWizardPagePacStorePasswordConfirm::nextId() const
+{
+    int id;
+    if (mValidator->validate(mEditPasswordConfirm->text()) == 
+        EapQtValidator::StatusOk) {
+        
+        mWizard->setConfigurations(
+            EapWizardPrivate::PacStorePassword,
+            mEditPasswordConfirm->text());
+        
+        id = EapWizardPage::PageUsernamePassword;
+    } else {
+        id = WlanWizardPage::PageNone;
+        mLabelError->setPlainText(hbTrId("txt_occ_info_incorrect_password"));
+    }
+
+    return id;
+}
+
+/*!
+   See WlanWizardPage::showPage().
+   
+   Sets the focus to line editor, opens virtual keyboard.
+   
+   @return true, content is valid always.
+ */
+bool EapWizardPagePacStorePasswordConfirm::showPage()
+{
+    mEditPasswordConfirm->setFocus();
+    return true;
+}
+
+/*!
+   Event filter for HbLineEdit. When editor gets focus a possible error text
+   is cleared.
+   
+   @param [in] obj Pointer to object to where the event is sent
+   @param [in] event Event
+ */
+bool EapWizardPagePacStorePasswordConfirm::eventFilter(
+    QObject *obj, QEvent *event)
+{
+    if (obj == mEditPasswordConfirm && event->type() == QEvent::FocusIn) {
+        mLabelError->setPlainText("");
+    }
+    return false;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/src/eapwizardpageusernamepassword.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,210 @@
+/*
+ * 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: 
+ *   EAP Wizard Page: Common Username & password query.
+ *
+ */
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbMainWindow>
+#include <HbWidget>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <HbEditorInterface>
+#include <HbParameterLengthLimiter>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtpluginhandle.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtvalidator.h>
+
+// User includes
+#include "wlanwizardhelper.h"
+#include "eapwizardpageusernamepassword.h"
+#include "eapwizard_p.h"
+
+/*!
+   \class EapWizardPageUsernamePassword
+   \brief Implements EAP wizard page: Generic Username & Password page
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+   Constructor.
+   
+   @param [in] parent Pointer to EAP Wizard private implementation.
+ */
+EapWizardPageUsernamePassword::EapWizardPageUsernamePassword(
+    EapWizardPrivate* parent) :
+    EapWizardPage(parent), 
+    mDocumentLoader(NULL), 
+    mValidatorUsername(NULL), 
+    mValidatorPassword(NULL),
+    mWidget(NULL), 
+    mEditUsername(NULL),
+    mEditPassword(NULL), 
+    mTitleUsername(NULL), 
+    mTitlePassword(NULL)
+{
+}
+
+/*!
+   Destructor.
+ */
+EapWizardPageUsernamePassword::~EapWizardPageUsernamePassword()
+{
+}
+
+/*!
+   See WlanWizardPage. 
+ */
+HbWidget* EapWizardPageUsernamePassword::initializePage()
+{
+    if (!mWidget) {
+        bool ok = true;
+        mDocumentLoader.reset(
+            new HbDocumentLoader(mWizard->wizardHelper()->mainWindow()));
+        mDocumentLoader->load(":/docml/occ_eap_wizard_05_07.docml", &ok);
+        Q_ASSERT(ok);
+        loadDocmlSection(mWizard->wizardHelper()->mainWindow()->orientation());
+
+        mWidget = qobject_cast<HbWidget*> (mDocumentLoader->findWidget("view"));
+        Q_ASSERT(mWidget);
+
+        mTitleUsername = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("setlabel_55"));
+        Q_ASSERT(mTitleUsername);
+
+        mTitlePassword = qobject_cast<HbLabel*> (mDocumentLoader->findWidget("setlabel_56"));
+        Q_ASSERT(mTitlePassword);
+
+        mEditUsername = qobject_cast<HbLineEdit*> (mDocumentLoader->findWidget("lineEditUsername"));
+        Q_ASSERT(mEditUsername);
+
+        mEditPassword = qobject_cast<HbLineEdit*> (mDocumentLoader->findWidget("lineEditPassword"));
+        Q_ASSERT(mEditPassword);
+        
+        mTitlePassword->setPlainText(hbTrId("txt_occ_setlabel_eap_password"));
+        
+        ok = connect(
+            mWizard->wizardHelper()->mainWindow(),
+            SIGNAL(orientationChanged(Qt::Orientation)), 
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(ok);
+        
+        ok = connect(
+            mEditUsername, SIGNAL(textChanged(const QString &)), 
+            this, SLOT(textChanged(const QString &)));
+        Q_ASSERT(ok);
+        
+        ok = connect(
+            mEditPassword, SIGNAL(textChanged(const QString &)), 
+            this, SLOT(textChanged(const QString &)));
+        Q_ASSERT(ok);
+    }
+
+    int eapType = mWizard->configurations(EapWizardPrivate::OuterType).toInt();
+
+    if (eapType != EapQtPluginHandle::PluginLeap) {
+        eapType = mWizard->configurations(EapWizardPrivate::InnerType).toInt();
+    }
+    
+    EapQtPluginHandle plugin(static_cast<EapQtPluginHandle::Plugin>(eapType));
+
+    mValidatorUsername.reset(
+        mWizard->eapConfigurationInterface()->validatorEap(
+            plugin.type(), 
+            EapQtConfig::Username));
+    Q_ASSERT(mValidatorUsername.data());
+    mValidatorUsername->updateEditor(mEditUsername);
+
+    mValidatorPassword.reset(
+        mWizard->eapConfigurationInterface()->validatorEap(
+            plugin.type(), 
+            EapQtConfig::Password));
+    Q_ASSERT(mValidatorPassword.data());
+    mValidatorPassword->updateEditor(mEditPassword);
+    
+    mTitleUsername->setPlainText(
+        HbParameterLengthLimiter(
+            hbTrId("txt_occ_setlabel_user_name_for_1")).arg(
+                mWizard->eapTypeToString(eapType)));
+
+    return mWidget;
+}
+
+/*!
+   Loads the required orientation of docml.
+   
+   @param [in] orientation Orientation to be loaded. 
+ */
+void EapWizardPageUsernamePassword::loadDocmlSection(Qt::Orientation orientation)
+{
+    EapWizardPage::loadDocmlSection(
+        mDocumentLoader.data(),
+        orientation,
+        ":/docml/occ_eap_wizard_05_07.docml",
+        "portrait_section",
+        "landscape_section");
+}
+
+/*!
+   See WlanWizardPage.
+   
+   Validates the content of the page.
+   
+   @return true if content is valid.
+ */
+bool EapWizardPageUsernamePassword::showPage()
+{
+    bool valid = false;
+    if (mValidatorUsername->validate(mEditUsername->text()) == 
+        EapQtValidator::StatusOk && 
+        mValidatorPassword->validate(mEditPassword->text()) == 
+        EapQtValidator::StatusOk) {
+        valid = true;
+    }
+    return valid;
+}
+
+/*!
+   See WlanWizardPage.
+   
+   @return next wizard page: EapWizardPage::PageProcessSettings
+ */
+int EapWizardPageUsernamePassword::nextId() const
+{
+    mWizard->setConfigurations(EapWizardPrivate::Username, mEditUsername->text());
+    mWizard->setConfigurations(EapWizardPrivate::Password, mEditPassword->text());
+    return EapWizardPage::PageProcessSettings;
+}
+
+/*!
+   Slot for textChanged() signal from HbLineEdit.
+   
+   @param [in] text NOT USED.
+ */
+void EapWizardPageUsernamePassword::textChanged(const QString & text )
+{
+    Q_UNUSED(text);
+    mWizard->wizardHelper()->enableNextButton(showPage());
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/traces/OstTraceDefinitions.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,21 @@
+/*
+ * 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:
+ *   Trace definition file for wlanwizard
+ */
+
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/eapwizard/traces/trace.properties	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<trace_properties>
+	<enum name="ConfigurationId">
+		<value id="0">OuterType</value>
+		<value id="1">InnerType</value>
+		<value id="2">CertificateCa</value>
+		<value id="3">CertificateUser</value>
+		<value id="4">TunnelUsernameAutomatic</value>
+		<value id="5">TunnelUsername</value>
+		<value id="6">TunnelRealmAutomatic</value>
+		<value id="7">TunnelRealm</value>
+		<value id="8">Username</value>
+		<value id="9">Password</value>
+		<value id="10">PacStorePassword</value>
+		<value id="11">PacStoreState</value>
+	</enum>
+</trace_properties>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/inc/FirstView.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,69 @@
+/*
+ * 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: 
+ *   Test Application for wizards
+ *
+ */
+
+#ifndef FIRSTVIEW_H_
+#define FIRSTVIEW_H_
+
+#include <HbView.h>
+
+class HbComboBox;
+class HbLineEdit;
+class HbCheckBox;
+class WlanWizard;
+class HbLabel;
+
+/*!
+ * @addtogroup group_test_eap_wizard
+ * @{
+ */
+
+class FirstView : public HbView
+{
+Q_OBJECT
+
+public:
+    FirstView();
+    virtual ~FirstView();
+    
+    
+private slots:
+    void start(bool);
+    void finished(int iapId, bool connected);
+    void cancelled();
+
+private:
+    void deleteWizard();
+    
+private:
+    WlanWizard *mWizard;
+    
+    HbCheckBox *mUseConf;
+    HbLineEdit *mSsid;
+    HbComboBox *mNetworkMode;
+    HbComboBox *mSecurityMode;
+    HbCheckBox *mHidden;
+    HbCheckBox *mUseWpaPsk;
+    HbCheckBox *mUseWps;
+    HbLabel *mStatus;
+    
+};
+
+/*! @} */
+
+#endif /* FIRSTVIEW_H_ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/inc/MyAppEngine.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,45 @@
+/*
+ * 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: 
+ *   Test Application for wizards
+ *
+ */
+
+#ifndef MYAPPENGINE_H_
+#define MYAPPENGINE_H_
+
+#include <QObject>
+
+/*!
+ * @addtogroup group_test_eap_wizard
+ * @{
+ */
+
+class MyAppEngine : public QObject
+    {
+    Q_OBJECT
+
+public:
+    MyAppEngine(QObject *parent = 0);
+    virtual ~MyAppEngine();
+    
+signals:
+    void toFirstView();
+    void toSecondView();
+    
+    };
+
+/*! @} */
+
+#endif /* MYAPPENGINE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/inc/MyAppMainWindow.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,54 @@
+/*
+ * 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: 
+ *   Test Application for wizards
+ *
+ */
+
+#ifndef MYAPPMAINWINDOW_H_
+#define MYAPPMAINWINDOW_H_
+
+#include <qobject>
+#include <hbmainwindow.h>
+
+// Forward declarations
+class FirstView;
+
+class HbDocumentLoader;
+
+/*!
+ * @addtogroup group_test_eap_wizard
+ * @{
+ */
+class MyAppMainWindow : public HbMainWindow
+    {
+
+public:
+    MyAppMainWindow();
+    virtual ~MyAppMainWindow();
+
+public slots:
+    void toFirstView();
+
+private:
+    void addFirstView();
+    
+private:
+    FirstView *mFirstView;
+   
+    };
+
+/*! @} */
+
+#endif /* MYAPPMAINWINDOW_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/inc/MyApplication.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,47 @@
+/*
+ * 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: 
+ *   Test Application for wizards
+ *
+ */
+
+#ifndef MYAPPLICATION_H_
+#define MYAPPLICATION_H_
+
+#include <QSharedPointer>
+#include <HbApplication.h>
+
+// forward declarations
+class MyAppEngine;
+class MyAppMainWindow;
+
+/*!
+ * @addtogroup group_test_eap_wizard
+ * @{
+ */
+
+class MyApplication : public HbApplication
+    {
+public:
+    MyApplication(int argc, char* argv[]);
+    virtual ~MyApplication();
+    
+private:
+    QSharedPointer<MyAppEngine> engine;         // owned
+    QSharedPointer<MyAppMainWindow> mainWindow; // owned
+    };
+
+/*! @} */
+
+#endif /* MYAPPLICATION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/resources/mainview.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.9">
+    <widget name="view" type="HbView">
+        <widget name="content" role="HbView:widget" type="HbWidget">
+            <widget name="container" type="HbWidget">
+                <widget name="startWizard" type="HbPushButton">
+                    <real name="z" value="1"/>
+                    <string name="text" value="Start wizard"/>
+                </widget>
+                <widget name="useConf" type="HbCheckBox">
+                    <real name="z" value="2"/>
+                    <string name="text" value="Use configurations"/>
+                </widget>
+                <widget name="networkMode" type="HbComboBox">
+                    <container name="items" type="stringlist">
+                        <string value="Ad-hoc"/>
+                        <string value="Public"/>
+                        <string value="Invalid"/>
+                    </container>
+                    <contentsmargins bottom="0un" left="5un" right="0un" top="0un"/>
+                </widget>
+                <widget name="securityMode" type="HbComboBox">
+                    <container name="items" type="stringlist">
+                        <string value="Open"/>
+                        <string value="WEP"/>
+                        <string value="802.1x"/>
+                        <string value="WPA"/>
+                        <string value="WPA2"/>
+                        <string value="WAPI"/>
+                        <string value="Invalid"/>
+                    </container>
+                    <contentsmargins bottom="0un" left="5un" right="0un" top="0un"/>
+                </widget>
+                <widget name="useWps" type="HbCheckBox">
+                    <contentsmargins bottom="0un" left="5un" right="0un" top="0un"/>
+                    <string name="text" value="Wireless Protected Setup"/>
+                </widget>
+                <widget name="label_1" type="HbLabel">
+                    <string name="plainText" value="Wizard status:"/>
+                </widget>
+                <widget name="labelWizardStatus" type="HbLabel">
+                    <contentsmargins bottom="0un" left="5un" right="0un" top="0un"/>
+                    <string name="plainText" value="NA"/>
+                </widget>
+                <widget name="useWpaPsk" type="HbCheckBox">
+                    <contentsmargins bottom="0un" left="5un" right="0un" top="0un"/>
+                    <string name="text" value="WPA PSK"/>
+                </widget>
+                <widget name="label" type="HbLabel">
+                    <contentsmargins bottom="0un" left="5un" right="0un" top="0un"/>
+                    <string name="plainText" value="SSID"/>
+                </widget>
+                <widget name="ssid" type="HbLineEdit">
+                    <contentsmargins bottom="0un" left="5un" right="0un" top="0un"/>
+                    <string name="text" value=""/>
+                </widget>
+                <widget name="isHidden" type="HbCheckBox">
+                    <string name="text" value="Hidden"/>
+                    <contentsmargins bottom="0un" left="5un" right="0un" top="0un"/>
+                </widget>
+                <real name="z" value="0"/>
+                <sizehint height="86.41791un" type="PREFERRED" width="53.73134un"/>
+                <layout orientation="Vertical" type="linear">
+                    <linearitem itemname="startWizard"/>
+                    <linearitem itemname="useConf"/>
+                    <linearitem itemname="label"/>
+                    <linearitem itemname="ssid"/>
+                    <linearitem itemname="networkMode"/>
+                    <linearitem itemname="securityMode"/>
+                    <linearitem itemname="isHidden"/>
+                    <linearitem itemname="useWpaPsk"/>
+                    <linearitem itemname="useWps"/>
+                    <stretchitem stretchfactor="1"/>
+                    <linearitem itemname="label_1"/>
+                    <linearitem itemname="labelWizardStatus"/>
+                </layout>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="container" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="container" dstEdge="TOP" spacing="-0.29851un" src="" srcEdge="TOP"/>
+            </layout>
+        </widget>
+        <string name="title" value="View"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/resources/resource.qrc	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/docml" >
+        <file>mainview.docml</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/rom/testwizard.iby	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* 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:
+*     Test wizard application for WLAN wizard 
+*/
+
+#ifndef TESTWIZARD_IBY
+#define TESTWIZARD_IBY
+
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
+file=ABI_DIR\BUILD_DIR\testwizard.exe SHARED_LIB_DIR\testwizard.exe
+data=/epoc32/data/z/private/10003a3f/import/Apps/testwizard_reg.rsc	/private/10003a3f/import/apps/testwizard_reg.rsc
+data=/epoc32/data/z/resource/apps/testwizard.rsc /resource/apps/testwizard.rsc
+
+#endif // __PROTOCOL_WLAN
+
+#endif // TESTWIZARD_IBY
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/src/FirstView.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,130 @@
+/*
+ * 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: 
+ *   Test application for wizards.
+ *
+ */
+
+#include <qgraphicswidget>
+#include <hbpushbutton.h>
+#include <hbdocumentloader.h>
+#include <hbcombobox.h>
+#include <hbcheckbox.h>
+#include <hblineedit.h>
+#include <hblabel.h>
+
+#include <qdebug.h>
+
+#include "firstview.h"
+#include "wlanwizard.h"
+
+FirstView::FirstView() :
+    mWizard(NULL)
+{
+    qDebug("FirstView::FirstView()");
+    bool ok = false;
+    HbDocumentLoader loader;
+    loader.load(":/docml/mainview.docml", &ok);
+    Q_ASSERT_X(ok, "EAP Wizard EXE", "Invalid docml file");
+
+    QGraphicsWidget *widget = loader.findWidget("view");
+    Q_ASSERT_X(widget != 0, "TestEapWizard", "View not found");
+
+    HbPushButton *action = qobject_cast<HbPushButton *> (loader.findObject("startWizard"));
+    Q_ASSERT_X(action != 0, "TestEapWizard", "startWizard not found");
+    connect(action, SIGNAL(clicked(bool)), this, SLOT(start(bool)));
+
+    mUseConf = qobject_cast<HbCheckBox *> (loader.findWidget("useConf"));
+    Q_ASSERT_X(mUseConf != 0, "TestEapWizard", "useConf not found");
+
+    mSsid = qobject_cast<HbLineEdit *> (loader.findWidget("ssid"));
+    Q_ASSERT_X(mSsid != 0, "TestEapWizard", "ssid not found");
+
+    mNetworkMode = qobject_cast<HbComboBox *> (loader.findWidget("networkMode"));
+    Q_ASSERT_X(mNetworkMode != 0, "TestEapWizard", "networkMode not found");
+
+    mSecurityMode = qobject_cast<HbComboBox *> (loader.findWidget("securityMode"));
+    Q_ASSERT_X(mSecurityMode != 0, "TestEapWizard", "securityMode not found");
+
+    mHidden = qobject_cast<HbCheckBox *> (loader.findWidget("isHidden"));
+    Q_ASSERT_X(mHidden != 0, "TestEapWizard", "isHidden not found");
+    
+    mUseWpaPsk = qobject_cast<HbCheckBox *> (loader.findWidget("useWpaPsk"));
+    Q_ASSERT_X(mUseWpaPsk != 0, "TestEapWizard", "useWpaPsk not found");
+        
+    mUseWps = qobject_cast<HbCheckBox *> (loader.findWidget("useWps"));
+    Q_ASSERT_X(mUseConf != 0, "TestEapWizard", "useWps not found");
+    
+    mStatus = qobject_cast<HbLabel *> (loader.findWidget("labelWizardStatus"));
+    Q_ASSERT_X(mStatus != 0, "TestEapWizard", "labelWizardStatus not found");
+
+    setWidget(widget);
+    qDebug("FirstView::FirstView() - done %d", action);
+}
+
+FirstView::~FirstView()
+{
+    delete mWizard;
+}
+
+void FirstView::start(bool)
+{
+    qDebug("FirstView::Start");
+    if (!mWizard) {
+        mWizard = new WlanWizard(mainWindow());
+
+        connect(mWizard, SIGNAL(finished(int, bool)), this, SLOT(finished(int, bool)));
+        connect(mWizard, SIGNAL(cancelled()), this, SLOT(cancelled()));
+    }
+
+    if (mUseConf->isChecked()) {
+        mWizard->setParameters(
+            mSsid->text(), 
+            mNetworkMode->currentIndex(), 
+            1 << mSecurityMode->currentIndex(),
+            mUseWpaPsk->isChecked(),
+            mHidden->isChecked(),
+            mUseWps->isChecked());
+    }
+
+    mWizard->show();
+}
+
+void FirstView::deleteWizard()
+{
+    qDebug("FirstView::deleteWizard");
+
+    Q_ASSERT(mWizard);
+    mWizard->deleteLater();
+    mWizard = NULL;
+
+}
+
+void FirstView::finished(int iapId, bool connected)
+{
+    qDebug("FirstView::complete(), iap id: %d, connected: %d", iapId, connected);
+    QString text;
+    text.setNum(iapId);
+    text.prepend("Finished, IAP ID: ");
+    mStatus->setPlainText(text);
+    deleteWizard();
+}
+
+void FirstView::cancelled()
+{
+    qDebug("FirstView::cancelled()");
+    mStatus->setPlainText("Cancelled");
+    deleteWizard();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/src/MyAppEngine.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,30 @@
+/*
+ * 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: 
+ *   Test application for wizards.
+ *
+ */
+
+#include "MyAppEngine.h"
+
+MyAppEngine::MyAppEngine(QObject *parent)
+    : QObject(parent)
+{
+
+}
+
+MyAppEngine::~MyAppEngine()
+{
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/src/MyAppMainWindow.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,52 @@
+/*
+ * 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: 
+ *   Test application for wizards.
+ *
+ */
+
+#include "myappmainwindow.h"
+#include "myappengine.h"
+#include "firstview.h"
+
+// ViewManager Constructor
+MyAppMainWindow::MyAppMainWindow()
+{
+    
+    // Add the views to the main window
+    addFirstView();
+    // show the main window (which will display the last view that was added)
+    toFirstView();
+    show();
+}
+
+// Destructor
+MyAppMainWindow::~MyAppMainWindow()
+{
+}
+
+// Methods to add views to the main window
+void MyAppMainWindow::addFirstView()
+{
+    mFirstView = new FirstView();
+    addView(mFirstView);
+}
+
+
+// Slots to handle view change
+void MyAppMainWindow::toFirstView()
+{
+    setCurrentView(mFirstView);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/src/MyApplication.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,32 @@
+/*
+ * 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: 
+ *   Test application for wizards.
+ *
+ */
+
+#include "myapplication.h"
+#include "myappmainwindow.h"
+#include "myappengine.h"
+
+MyApplication::MyApplication(int argc, char* argv[]) :
+    HbApplication(argc, argv), 
+    engine(new MyAppEngine), 
+    mainWindow(new MyAppMainWindow())
+{
+}
+
+MyApplication::~MyApplication()
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/src/main.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,25 @@
+/*
+ * 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: 
+ *   Test application for wizards.
+ *
+ */
+
+#include "myapplication.h"
+
+int main(int argc, char *argv[])
+{
+    MyApplication app(argc, argv);
+    return app.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/testwizard/testwizard.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,56 @@
+#
+# 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: 
+#    Test application for wizards
+#
+
+
+TEMPLATE = app
+TARGET = testwizard
+CONFIG += hb
+
+MOC_DIR = build
+RCC_DIR = build
+
+DEPENDPATH += .
+INCLUDEPATH += . \
+	../inc
+
+HEADERS = inc/MyApplication.h \
+    inc/MyAppMainWindow.h \
+    inc/FirstView.h \
+    inc/MyAppEngine.h
+    
+SOURCES += src/MyAppEngine.cpp \
+    src/MyApplication.cpp \
+    src/MyAppMainWindow.cpp \
+    src/FirstView.cpp \
+    src/main.cpp
+    
+RESOURCES = resources/resource.qrc
+
+symbian {
+    # TODO: gain UID
+    TARGET.UID3 = 0xE5C15256
+    TARGET.CAPABILITY = ALL -TCB
+}
+
+LIBS += -lwlanwizard
+
+myDependencies.sources = wlanwizard.dll eapwizard.dll wpswizard.dll wlanqtutilities.dll  
+DEPLOYMENT += myDependencies
+
+BLD_INF_RULES.prj_exports += \ 
+    "rom/testwizard.iby CORE_MW_LAYER_IBY_EXPORT_PATH(testwizard.iby)"
+
--- a/wlanutilities/wlanindicatorplugin/inc/wlanindicatorplugin.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanindicatorplugin/inc/wlanindicatorplugin.h	Tue Jul 06 15:29:22 2010 +0300
@@ -51,9 +51,6 @@
     bool handleClientRequest (RequestType type, const QVariant &parameter);
     bool handleInteraction (InteractionType type); 
     QVariant indicatorData(int role) const;
-
-private slots:
-    void processError(QProcess::ProcessError err); // handler for error codes
     
 private:
     
--- a/wlanutilities/wlanindicatorplugin/src/wlanindicatorplugin.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanindicatorplugin/src/wlanindicatorplugin.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -15,7 +15,7 @@
  * 
  */
 
-#include <QTranslator>
+#include <HbTranslator>
 #include <QLocale>
 #include <QtCore/qplugin.h>
 #include <QtCore/QString>
@@ -96,11 +96,7 @@
     Q_UNUSED(indicatorType)
     
     // Install localization
-    QTranslator *translator = new QTranslator(this);
-    QString lang = QLocale::system().name(); 
-    QString path = "Z:/resource/qt/translations/"; 
-    translator->load("wlanindicatorplugin_" + lang, path);
-    qApp->installTranslator(translator);
+    HbTranslator *translator(new HbTranslator("wlanindicatorplugin"));
     
     OstTraceFunctionExit1(WLANINDICATORPLUGIN_CREATEINDICATOR_EXIT, this);
     return this;
@@ -125,14 +121,11 @@
     OstTraceFunctionEntry1(WLANINDICATORPLUGIN_HANDLEINTERACTION_ENTRY, this);
 
     bool handled = false;
+    QVariantMap data;
     switch (type) {
     case InteractionActivated: 
-        //connect error() to slot processError() to get error, 
-        QObject::connect( &process, SIGNAL(error(QProcess::ProcessError)),                       
-                          this, SLOT(processError(QProcess::ProcessError)));
-
-        // Show WLAN list view
-        process.start("WlanSniffer");
+        // Emit a signal that will inform the client to start the wlan list view 
+        emit userActivated(data);
         handled = true;
         break;
     default:
@@ -228,25 +221,3 @@
     return qvariant;
 }
 
-/*!
-    The processError is a handler for error codes.
-*/
-void WlanIndicatorPlugin::processError(QProcess::ProcessError err)
-    {
-    OstTraceFunctionEntry1(WLANINDICATORPLUGIN_PROCESSERROR_ENTRY, this);
-  
-    switch (err) {   
-        case QProcess::FailedToStart: 
-        case QProcess::Crashed: 
-        case QProcess::Timedout: 
-        case QProcess::ReadError: 
-        case QProcess::WriteError: 
-        case QProcess::UnknownError:
-            OstTrace1( WLANINDICATORPLUGIN_ERR,PROCESSERROR_KNOWN,"Process Error %u", err);
-            break;  
-        default:
-        OstTrace1( WLANINDICATORPLUGIN_ERR,PROCESSERROR_UNKNOWN,"Unknown Process Error %u", err);
-            break;
-        }
-    OstTraceFunctionExit1(WLANINDICATORPLUGIN_PROCESSERROR_EXIT, this);
-    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictsqtwrapper/bwins/ictsqtwrapperu.def	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	?trUtf8@IctsWrapper@@SA?AVQString@@PBD0H@Z @ 1 NONAME ; class QString IctsWrapper::trUtf8(char const *, char const *, int)
+	?isPolling@IctsWrapper@@QBE_NXZ @ 2 NONAME ; bool IctsWrapper::isPolling(void) const
+	??_EIctsWrapper@@UAE@I@Z @ 3 NONAME ; IctsWrapper::~IctsWrapper(unsigned int)
+	?emitConnectivityTestResult@IctsWrapper@@QAEXW4ConnectivityTestResult@1@VQUrl@@@Z @ 4 NONAME ; void IctsWrapper::emitConnectivityTestResult(enum IctsWrapper::ConnectivityTestResult, class QUrl)
+	?stopPolling@IctsWrapper@@QAEXXZ @ 5 NONAME ; void IctsWrapper::stopPolling(void)
+	?connectivityTestResult@IctsWrapper@@IAEXW4ConnectivityTestResult@1@VQUrl@@@Z @ 6 NONAME ; void IctsWrapper::connectivityTestResult(enum IctsWrapper::ConnectivityTestResult, class QUrl)
+	?tr@IctsWrapper@@SA?AVQString@@PBD0@Z @ 7 NONAME ; class QString IctsWrapper::tr(char const *, char const *)
+	?trUtf8@IctsWrapper@@SA?AVQString@@PBD0@Z @ 8 NONAME ; class QString IctsWrapper::trUtf8(char const *, char const *)
+	??0IctsWrapper@@QAE@HHPAVQObject@@@Z @ 9 NONAME ; IctsWrapper::IctsWrapper(int, int, class QObject *)
+	?getStaticMetaObject@IctsWrapper@@SAABUQMetaObject@@XZ @ 10 NONAME ; struct QMetaObject const & IctsWrapper::getStaticMetaObject(void)
+	?startPolling@IctsWrapper@@QAEXHH@Z @ 11 NONAME ; void IctsWrapper::startPolling(int, int)
+	??1IctsWrapper@@UAE@XZ @ 12 NONAME ; IctsWrapper::~IctsWrapper(void)
+	?metaObject@IctsWrapper@@UBEPBUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const * IctsWrapper::metaObject(void) const
+	?qt_metacall@IctsWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 14 NONAME ; int IctsWrapper::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?qt_metacast@IctsWrapper@@UAEPAXPBD@Z @ 15 NONAME ; void * IctsWrapper::qt_metacast(char const *)
+	?staticMetaObject@IctsWrapper@@2UQMetaObject@@B @ 16 NONAME ; struct QMetaObject const IctsWrapper::staticMetaObject
+	?tr@IctsWrapper@@SA?AVQString@@PBD0H@Z @ 17 NONAME ; class QString IctsWrapper::tr(char const *, char const *, int)
+	?startConnectivityTest@IctsWrapper@@QAEXXZ @ 18 NONAME ; void IctsWrapper::startConnectivityTest(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictsqtwrapper/eabi/ictsqtwrapperu.def	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,20 @@
+EXPORTS
+	_ZN11IctsWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+	_ZN11IctsWrapper11qt_metacastEPKc @ 2 NONAME
+	_ZN11IctsWrapper11stopPollingEv @ 3 NONAME
+	_ZN11IctsWrapper12startPollingEii @ 4 NONAME
+	_ZN11IctsWrapper16staticMetaObjectE @ 5 NONAME DATA 16
+	_ZN11IctsWrapper19getStaticMetaObjectEv @ 6 NONAME
+	_ZN11IctsWrapper21startConnectivityTestEv @ 7 NONAME
+	_ZN11IctsWrapper22connectivityTestResultENS_22ConnectivityTestResultE4QUrl @ 8 NONAME
+	_ZN11IctsWrapper26emitConnectivityTestResultENS_22ConnectivityTestResultE4QUrl @ 9 NONAME
+	_ZN11IctsWrapperC1EiiP7QObject @ 10 NONAME
+	_ZN11IctsWrapperC2EiiP7QObject @ 11 NONAME
+	_ZN11IctsWrapperD0Ev @ 12 NONAME
+	_ZN11IctsWrapperD1Ev @ 13 NONAME
+	_ZN11IctsWrapperD2Ev @ 14 NONAME
+	_ZNK11IctsWrapper10metaObjectEv @ 15 NONAME
+	_ZNK11IctsWrapper9isPollingEv @ 16 NONAME
+	_ZTI11IctsWrapper @ 17 NONAME
+	_ZTV11IctsWrapper @ 18 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictsqtwrapper/ictsqtwrapper.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,48 @@
+#
+# 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: Project file for ictsqtwrapper.dll
+#
+
+TEMPLATE = lib
+TARGET = ictsqtwrapper
+TARGET.CAPABILITY = CAP_GENERAL_DLL
+
+#BUILD_DLL macro is used to define export macro
+DEFINES += BUILD_ICTSQTWRAPPER_DLL
+DEPENDPATH += .
+
+#Store generated .moc files to their own directory
+MOC_DIR = build
+
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+               inc \
+               traces
+
+HEADERS += inc/ictsqtwrapper.h  \
+           traces/OstTraceDefinitions.h
+
+SOURCES += src/ictsqtwrapper.cpp
+
+defFilePath = .
+
+symbian: {
+    LIBS += -lictsclientinterface 
+    HEADERS += inc/ictsqtwrapper_symbian.h
+    SOURCES += src/ictsqtwrapper_symbian.cpp
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.UID3 = 0x2002E6F7
+    MMP_RULES += "USERINCLUDE traces"
+    BLD_INF_RULES.prj_exports += "rom/ictsqtwrapper.iby CORE_MW_LAYER_IBY_EXPORT_PATH(ictsqtwrapper.iby)"
+    BLD_INF_RULES.prj_exports += "inc/ictsqtwrapper.h |../../inc/ictsqtwrapper.h"
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictsqtwrapper/inc/ictsqtwrapper.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,83 @@
+/*
+* 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: Header file for IctsWrapper class
+*
+*/
+
+#ifndef ICTSQTWRAPPER_H
+#define ICTSQTWRAPPER_H
+
+// System includes
+#include <QObject>
+#include <QUrl>
+
+// User includes
+
+// Forward declarations
+class IctsWrapperPrivate;
+
+// External data types
+// Constants
+
+// Library's export macro definitions
+#ifdef BUILD_ICTSQTWRAPPER_DLL
+#define ICTSQTWRAPPERDLL_EXPORT Q_DECL_EXPORT
+#else
+#define ICTSQTWRAPPERDLL_EXPORT Q_DECL_IMPORT
+#endif
+
+// Class declaration
+class ICTSQTWRAPPERDLL_EXPORT IctsWrapper: public QObject
+{
+    Q_OBJECT
+   
+public:
+    
+    /*!
+        Internet connectivity test result type
+    */ 
+    enum ConnectivityTestResult {
+        ConnectionOk,               //!< Test passed
+        HttpAuthenticationNeeded,   //!< HTTP authentication needed i.e. hotspot AP
+        ConnectionNotOk,            //!< Connection failure
+        Timeout,                    //!< Timeout for HTTP request
+        UnspecifiedError            //!< Unspecified error
+    };
+    
+    IctsWrapper(int iap, int netId, QObject *parent = 0);
+    
+    ~IctsWrapper();
+    
+    void startConnectivityTest();
+    
+    void startPolling(int pollingTime, int pollingInterval);
+    
+    void stopPolling();
+    
+    void emitConnectivityTestResult(IctsWrapper::ConnectivityTestResult result, QUrl redirectUrl);
+    
+    bool isPolling() const;
+      
+signals:
+
+    void connectivityTestResult(IctsWrapper::ConnectivityTestResult, QUrl result);
+ 
+private:
+    
+    bool mIsPolling; //!< variable to store whether ICTS polling is ongoing
+    
+    QScopedPointer<IctsWrapperPrivate> d_ptr; //!< Pointer to Symbian private implementation
+};
+
+#endif // ICTSQTWRAPPER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictsqtwrapper/inc/ictsqtwrapper_symbian.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* 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: Private symbian implementation of ICTS client interface wrapper 
+*
+*/
+
+#ifndef ICTSQTWRAPPERSYMBIAN_H
+#define ICTSQTWRAPPERSYMBIAN_H
+
+// System includes
+#include <ictsclientinterface.h>
+
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Class declaration
+class IctsWrapperPrivate: public MIctsObserver
+{
+
+public:
+    
+    IctsWrapperPrivate(int aIapId, int aNetId, IctsWrapper *aWrapper);
+    
+    ~IctsWrapperPrivate();
+    
+    void ConnectivityObserver( TIctsTestResult aResult, const TDesC& aString );
+    
+    void startConnectivityTest();
+
+    void startPolling(int pollingTime, int pollingInterval);
+    
+    void stopPolling();
+    
+private:
+    
+    IctsWrapper *q_ptr; //!< Pointer to public implementation
+    
+    CIctsClientInterface* iIct; //!< Pointer to ICTS client interface
+};
+
+#endif // ICTSQTWRAPPERSYMBIAN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictsqtwrapper/rom/ictsqtwrapper.iby	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* 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:
+*
+*/
+
+#ifndef ICTSQTWRAPPER_IBY
+#define ICTSQTWRAPPER_IBY
+
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+file=ABI_DIR/BUILD_DIR/ictsqtwrapper.dll SHARED_LIB_DIR/ictsqtwrapper.dll
+#endif // __PROTOCOL_WLAN
+
+#endif //ICTSQTWRAPPER_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictsqtwrapper/src/ictsqtwrapper.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,147 @@
+/*
+* 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:
+* Implementation of IctsWrapper class
+*
+*/
+
+// System includes
+
+// User includes
+
+#include "ictsqtwrapper.h"
+#include "ictsqtwrapper_symbian.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ictsqtwrapperTraces.h"
+#endif
+
+/*!
+    \class IctsWrapper
+    \brief This is a wrapper implementation for symbian side ICTS client interface
+*/
+
+// External function prototypes
+
+// Local constants
+
+
+// ======== LOCAL FUNCTIONS ========
+
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor
+        
+ */
+IctsWrapper::IctsWrapper(int iap, int netId, QObject *parent) : 
+    QObject(parent), 
+    mIsPolling(false),
+    d_ptr(new IctsWrapperPrivate(iap, netId, this))
+{
+    OstTraceFunctionEntry0( ICTSWRAPPER_ICTSWRAPPER_ENTRY );
+    
+    OstTraceFunctionExit0( ICTSWRAPPER_ICTSWRAPPER_EXIT );
+}
+
+/*!
+    Destructor
+        
+ */
+IctsWrapper::~IctsWrapper()
+{
+    OstTraceFunctionEntry0( ICTSWRAPPER_DESTRUCTOR_ENTRY );
+    
+    OstTraceFunctionExit0( ICTSWRAPPER_DESTRUCTOR_EXIT );
+}
+
+/*!
+    This function emits connectivityTestResult signal
+    @param [in] result result of internet connectivity test
+    @param [in] redirectUrl Possible redirection URL that was received
+ */
+void IctsWrapper::emitConnectivityTestResult(IctsWrapper::ConnectivityTestResult result, QUrl redirectUrl)
+{
+    OstTraceFunctionEntry0( ICTSWRAPPER_EMITCONNECTIVITYTESTRESULT_ENTRY );
+
+    OstTrace1( TRACE_NORMAL, ICTSWRAPPER_EMITCONNECTIVITYTESTRESULT_RESULT_TRACE, "IctsWrapper::emitConnectivityTestResult;result=%d", result );
+          
+#ifdef OST_TRACE_COMPILER_IN_USE
+    QString url = redirectUrl.toString();
+    TPtrC tmp(url.utf16(),url.length() );
+    
+    OstTraceExt1( TRACE_NORMAL, ICTSWRAPPER_EMITCONNECTIVITYTESTRESULT_URL_TRACE, 
+        "IctsWrapper::emitConnectivityTestResult;redirectUrl=%S", tmp );
+#endif
+    
+    emit connectivityTestResult(result, redirectUrl);
+    mIsPolling = false;
+
+    OstTraceFunctionExit0( ICTSWRAPPER_EMITCONNECTIVITYTESTRESULT_EXIT );
+}
+
+/*!
+    This function starts connectivity test
+ */
+
+void IctsWrapper::startConnectivityTest()
+{
+    OstTraceFunctionEntry0( ICTSWRAPPER_STARTCONNECTIVITYTEST_ENTRY );
+    
+    d_ptr->startConnectivityTest();
+
+    OstTraceFunctionExit0( ICTSWRAPPER_STARTCONNECTIVITYTEST_EXIT );
+}
+
+/*!
+    This function starts connectivity test in polling mode
+    
+    @param [in] pollingTime Total polling time
+    @param [in] pollingInterval Interval between polls
+ */
+void IctsWrapper::startPolling(int pollingTime, int pollingInterval)
+{
+    OstTraceFunctionEntry0( ICTSWRAPPER_STARTPOLLING_ENTRY );
+    
+    d_ptr->startPolling(pollingTime, pollingInterval);
+    mIsPolling = true;
+
+    OstTraceFunctionExit0( ICTSWRAPPER_STARTPOLLING_EXIT );
+}
+
+/*!
+    This function stops polling mode
+ */
+void IctsWrapper::stopPolling()
+{
+    OstTraceFunctionEntry0( ICTSWRAPPER_STOPPOLLING_ENTRY );
+
+    d_ptr->stopPolling();
+    
+    OstTraceFunctionExit0( ICTSWRAPPER_STOPPOLLING_EXIT );
+}
+
+/*!
+    This function returns whether we are polling or not
+ */
+bool IctsWrapper::isPolling() const
+{
+    OstTraceFunctionEntry0( ICTSWRAPPER_ISPOLLING_ENTRY );
+    
+    OstTraceFunctionExit0( ICTSWRAPPER_ISPOLLING_EXIT );
+    
+    return mIsPolling;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictsqtwrapper/src/ictsqtwrapper_symbian.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,162 @@
+/*
+* 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: Private Symbian implementation of ICTS client wrapper
+*
+*/
+
+// System includes
+#include <QString>
+#include <QUrl>
+
+
+// User includes
+#include "ictsqtwrapper.h"
+#include "ictsqtwrapper_symbian.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ictsqtwrapper_symbianTraces.h"
+#endif
+
+/*!
+    \class IctsWrapper
+    \brief This is a wrapper implementation for symbian side ICTS client interface
+*/
+
+// External function prototypes
+
+// Local constants
+
+
+// ======== LOCAL FUNCTIONS ========
+
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor
+        
+ */
+IctsWrapperPrivate::IctsWrapperPrivate(int aIapId, int aNetId, IctsWrapper *aWrapper) : 
+    q_ptr(aWrapper),
+    iIct(NULL)
+{
+    OstTraceFunctionEntry0(ICTSWRAPPERPRIVATE_ICTSWRAPPERPRIVATE_ENTRY);
+    
+    TRAPD(error,iIct = CIctsClientInterface::NewL(aIapId, aNetId, *this)); 
+    qt_symbian_throwIfError(error);
+    
+    OstTraceFunctionExit0(ICTSWRAPPERPRIVATE_ICTSWRAPPERPRIVATE_EXIT);
+}
+
+/*!
+    Destructor
+        
+ */
+IctsWrapperPrivate::~IctsWrapperPrivate()
+{
+    OstTraceFunctionEntry0(ICTSWRAPPERPRIVATE_DESTRUCTOR_ENTRY);
+   
+    delete iIct;
+    
+    OstTraceFunctionExit0(ICTSWRAPPERPRIVATE_DESTRUCTOR_EXIT);
+}
+
+/*!
+    This function is called when connectivity test is ready. This is from MICTSObserver.
+    
+    @param [in] aResult result of internet connectivity test
+    @param [in] aString Possible redirection URL that was received. 
+                        Valid only when result is EHttpAuthenticationNeeded
+ */
+
+void IctsWrapperPrivate::ConnectivityObserver(TIctsTestResult aResult, const TDesC& aString)
+{
+    OstTraceFunctionEntry0(ICTSWRAPPERPRIVATE_CONNECTIVITYOBSERVER_ENTRY);
+    
+    QUrl redirectUrl;
+    
+    switch (aResult) 
+        {
+        case EConnectionOk:
+            q_ptr->emitConnectivityTestResult(IctsWrapper::ConnectionOk, QUrl(""));
+            break;
+            
+        case EHttpAuthenticationNeeded :
+            //Convert descriptor to QString 
+            redirectUrl = QString::fromUtf16(aString.Ptr(), aString.Length());
+            q_ptr->emitConnectivityTestResult(IctsWrapper::HttpAuthenticationNeeded, redirectUrl);
+            break;
+            
+        case EConnectionNotOk :
+            q_ptr->emitConnectivityTestResult(IctsWrapper::ConnectionNotOk, QUrl(""));
+            break;
+            
+        case ETimeout :
+            q_ptr->emitConnectivityTestResult(IctsWrapper::Timeout, QUrl(""));
+            break;
+            
+        default:
+            q_ptr->emitConnectivityTestResult(IctsWrapper::UnspecifiedError, QUrl(""));
+            break;
+        }
+    
+    OstTraceFunctionExit0(ICTSWRAPPERPRIVATE_CONNECTIVITYOBSERVER_EXIT);
+}
+
+/*!
+    This non leaving function starts internet connectivity test
+    
+ */
+void IctsWrapperPrivate::startConnectivityTest()
+{
+    OstTraceFunctionEntry0(ICTSWRAPPERPRIVATE_STARTCONNECTIVITYTEST_ENTRY);
+    
+    TRAPD(err, iIct->StartL());
+    
+    // Check if startConnectivityTestL() leaved.
+    if (KErrNone != err)
+        {
+        q_ptr->emitConnectivityTestResult(IctsWrapper::UnspecifiedError, QUrl(""));
+        }
+    
+    OstTraceFunctionExit0(ICTSWRAPPERPRIVATE_STARTCONNECTIVITYTEST_EXIT);
+}
+
+/*!
+    This function starts connectivity test in polling mode
+    
+    @param [in] pollingTime Polling time in microseconds
+    @param [in] pollingInterval Polling interval in microseconds   
+ */
+void IctsWrapperPrivate::startPolling(int pollingTime, int pollingInterval)
+{
+    OstTraceFunctionEntry0(ICTSWRAPPERPRIVATE_STARTPOLLING_ENTRY);
+    
+    iIct->StartPolling(pollingTime, pollingInterval);
+
+    OstTraceFunctionExit0( ICTSWRAPPERPRIVATE_STARTPOLLING_EXIT );
+}
+
+/*!
+    This function stops connectivity test polling mode 
+ */
+void IctsWrapperPrivate::stopPolling()
+{
+    OstTraceFunctionEntry0(ICTSWRAPPERPRIVATE_STOPPOLLING_ENTRY);
+    
+    iIct->StopPolling();
+
+    OstTraceFunctionExit0(ICTSWRAPPERPRIVATE_STOPPOLLING_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictsqtwrapper/traces/OstTraceDefinitions.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,21 @@
+/*
+* 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: Header file for OST traces
+*
+*/
+
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictswlanlogininterface/bwins/ictswlanlogininterfaceu.def	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,22 @@
+EXPORTS
+	?stop@IctsWlanLoginInterface@@QAEXXZ @ 1 NONAME ; void IctsWlanLoginInterface::stop(void)
+	?ictsResult@IctsWlanLoginInterface@@IAEXH@Z @ 2 NONAME ; void IctsWlanLoginInterface::ictsResult(int)
+	?qt_metacall@IctsWlanLoginInterface@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 3 NONAME ; int IctsWlanLoginInterface::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?hotspotCase@IctsWlanLoginInterface@@IAEXXZ @ 4 NONAME ; void IctsWlanLoginInterface::hotspotCase(void)
+	??1IctsWlanLoginInterface@@UAE@XZ @ 5 NONAME ; IctsWlanLoginInterface::~IctsWlanLoginInterface(void)
+	?handleConnectivityTestResult@IctsWlanLoginInterface@@QAEXW4ConnectivityTestResult@IctsWrapper@@VQUrl@@@Z @ 6 NONAME ; void IctsWlanLoginInterface::handleConnectivityTestResult(enum IctsWrapper::ConnectivityTestResult, class QUrl)
+	?trUtf8@IctsWlanLoginInterface@@SA?AVQString@@PBD0H@Z @ 7 NONAME ; class QString IctsWlanLoginInterface::trUtf8(char const *, char const *, int)
+	??_EIctsWlanLoginInterface@@UAE@I@Z @ 8 NONAME ; IctsWlanLoginInterface::~IctsWlanLoginInterface(unsigned int)
+	?handleOk@IctsWlanLoginInterface@@AAEXABVQVariant@@@Z @ 9 NONAME ; void IctsWlanLoginInterface::handleOk(class QVariant const &)
+	?staticMetaObject@IctsWlanLoginInterface@@2UQMetaObject@@B @ 10 NONAME ; struct QMetaObject const IctsWlanLoginInterface::staticMetaObject
+	??0IctsWlanLoginInterface@@QAE@PAVQObject@@@Z @ 11 NONAME ; IctsWlanLoginInterface::IctsWlanLoginInterface(class QObject *)
+	?handleError@IctsWlanLoginInterface@@AAEXH@Z @ 12 NONAME ; void IctsWlanLoginInterface::handleError(int)
+	?tr@IctsWlanLoginInterface@@SA?AVQString@@PBD0@Z @ 13 NONAME ; class QString IctsWlanLoginInterface::tr(char const *, char const *)
+	?getStaticMetaObject@IctsWlanLoginInterface@@SAABUQMetaObject@@XZ @ 14 NONAME ; struct QMetaObject const & IctsWlanLoginInterface::getStaticMetaObject(void)
+	?start@IctsWlanLoginInterface@@QAEXHH@Z @ 15 NONAME ; void IctsWlanLoginInterface::start(int, int)
+	?metaObject@IctsWlanLoginInterface@@UBEPBUQMetaObject@@XZ @ 16 NONAME ; struct QMetaObject const * IctsWlanLoginInterface::metaObject(void) const
+	?tr@IctsWlanLoginInterface@@SA?AVQString@@PBD0H@Z @ 17 NONAME ; class QString IctsWlanLoginInterface::tr(char const *, char const *, int)
+	?qt_metacast@IctsWlanLoginInterface@@UAEPAXPBD@Z @ 18 NONAME ; void * IctsWlanLoginInterface::qt_metacast(char const *)
+	?wlanLoginAppStart@IctsWlanLoginInterface@@AAEXHHVQUrl@@@Z @ 19 NONAME ; void IctsWlanLoginInterface::wlanLoginAppStart(int, int, class QUrl)
+	?trUtf8@IctsWlanLoginInterface@@SA?AVQString@@PBD0@Z @ 20 NONAME ; class QString IctsWlanLoginInterface::trUtf8(char const *, char const *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictswlanlogininterface/eabi/ictswlanlogininterfaceu.def	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,22 @@
+EXPORTS
+	_ZN22IctsWlanLoginInterface10ictsResultEi @ 1 NONAME
+	_ZN22IctsWlanLoginInterface11handleErrorEi @ 2 NONAME
+	_ZN22IctsWlanLoginInterface11hotspotCaseEv @ 3 NONAME
+	_ZN22IctsWlanLoginInterface11qt_metacallEN11QMetaObject4CallEiPPv @ 4 NONAME
+	_ZN22IctsWlanLoginInterface11qt_metacastEPKc @ 5 NONAME
+	_ZN22IctsWlanLoginInterface16staticMetaObjectE @ 6 NONAME DATA 16
+	_ZN22IctsWlanLoginInterface17wlanLoginAppStartEii4QUrl @ 7 NONAME
+	_ZN22IctsWlanLoginInterface19getStaticMetaObjectEv @ 8 NONAME
+	_ZN22IctsWlanLoginInterface28handleConnectivityTestResultEN11IctsWrapper22ConnectivityTestResultE4QUrl @ 9 NONAME
+	_ZN22IctsWlanLoginInterface4stopEv @ 10 NONAME
+	_ZN22IctsWlanLoginInterface5startEii @ 11 NONAME
+	_ZN22IctsWlanLoginInterface8handleOkERK8QVariant @ 12 NONAME
+	_ZN22IctsWlanLoginInterfaceC1EP7QObject @ 13 NONAME
+	_ZN22IctsWlanLoginInterfaceC2EP7QObject @ 14 NONAME
+	_ZN22IctsWlanLoginInterfaceD0Ev @ 15 NONAME
+	_ZN22IctsWlanLoginInterfaceD1Ev @ 16 NONAME
+	_ZN22IctsWlanLoginInterfaceD2Ev @ 17 NONAME
+	_ZNK22IctsWlanLoginInterface10metaObjectEv @ 18 NONAME
+	_ZTI22IctsWlanLoginInterface @ 19 NONAME
+	_ZTV22IctsWlanLoginInterface @ 20 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictswlanlogininterface/ictswlanlogininterface.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,54 @@
+#
+# 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:
+# Project file of the ictswlanlogininterface.
+#
+
+TEMPLATE = lib
+TARGET = ictswlanlogininterface
+
+# BUILD_DLL macro is used to define import/export macro
+DEFINES += BUILD_ICTSWLANLOGININTERFACE_DLL
+DEPENDPATH += .
+CONFIG += hb
+LIBS += -lxqservice -lictsqtwrapper -lxqserviceutil
+
+#Store generated files to their own directory
+MOC_DIR = build
+
+INCLUDEPATH += \
+    inc \
+    traces\
+    ../inc \
+    ../../inc \
+    ../wlanloginapp/inc
+
+HEADERS += \
+    inc/ictswlanlogininterface.h \
+    traces/OstTraceDefinitions.h
+
+SOURCES += \
+    src/ictswlanlogininterface.cpp
+
+defFilePath = .
+
+symbian: { 
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.UID3 = 0x2002EA66
+    MMP_RULES += "USERINCLUDE traces"
+    BLD_INF_RULES.prj_exports += "rom/ictswlanlogininterface.iby CORE_MW_LAYER_IBY_EXPORT_PATH(ictswlanlogininterface.iby)"
+    BLD_INF_RULES.prj_exports += "inc/ictswlanlogininterface.h |../../inc/ictswlanlogininterface.h"
+    LIBS += -lictsclientinterface -lflogger
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictswlanlogininterface/inc/ictswlanlogininterface.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* 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:  
+* Entry library for launching Wlan Login application.
+*/
+
+#ifndef ICTSWLANLOGININTERFACE_H
+#define ICTSWLANLOGININTERFACE_H
+
+// System includes
+#include <QObject>
+#include <QUrl>
+#include <xqappmgr.h>
+
+
+// User includes
+#include "ictsqtwrapper.h"
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Library's export macro definitions
+#ifdef BUILD_ICTSWLANLOGININTERFACE_DLL
+#define ICTSWLANLOGININTERFACEDLL_EXPORT Q_DECL_EXPORT
+#else
+#define ICTSWLANLOGININTERFACEDLL_EXPORT Q_DECL_IMPORT
+#endif
+
+// Class declaration
+class ICTSWLANLOGININTERFACEDLL_EXPORT IctsWlanLoginInterface: public QObject
+{
+    Q_OBJECT
+
+public:
+    
+    // Data types
+    
+    /*!
+        Internet connectivity test result type
+    */  
+    enum ictsResultType {
+        IctsPassed = 0,     //!< Internet connectivity test passed
+        IctsHotspotPassed,  //!< Internet connectivity test passed against hotspot access point
+        IctsCanceled,       //!< Internet connectivity test was cancelled due to user action
+        IctsFailed          //!< internet connectivity test failed
+    };
+    
+    IctsWlanLoginInterface(QObject *parent);
+
+    ~IctsWlanLoginInterface();
+
+public:
+     
+    void start(int iapId, int netId);
+
+    void stop();
+
+public slots:
+
+    void handleConnectivityTestResult(IctsWrapper::ConnectivityTestResult result, QUrl redirectUrl);
+
+signals:
+
+    /*!
+        Signal that informs about ICTS result.
+        
+        @param [in] ictsResult ICTS result (IctsWlanLoginInterface::ictsResultType).
+    */
+    void ictsResult(int ictsResult);
+    
+    void hotspotCase();
+    
+private slots:
+
+    void handleOk(const QVariant &result);
+
+    void handleError(int errorCode);
+     
+private: // functions
+
+    void wlanLoginAppStart(int iapId, int netId, QUrl url);
+    
+private: // data
+    
+    IctsWrapper* mIctsWrapper;       //!< Icts wrapper instance
+    XQApplicationManager* mAiwMgr;   //!< Application interworking manager    
+    XQAiwRequest* mAsyncRequest;     //!< Pointer to async AIW Request
+    int mIapId;                      //!< IAP identifier
+    int mNetId;                      //!< Network identifier
+        
+    // Friend classes
+};
+
+#endif // ICTSWLANLOGININTERFACE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictswlanlogininterface/rom/ictswlanlogininterface.iby	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* 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:
+* ictswlanlogininterface.dll IBY file for ROM image.
+*
+*/
+
+#ifndef ICTSWLANLOGININTERFACE_IBY
+#define ICTSWLANLOGININTERFACE_IBY
+
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+file=ABI_DIR/BUILD_DIR/ictswlanlogininterface.dll SHARED_LIB_DIR/ictswlanlogininterface.dll
+#endif // __PROTOCOL_WLAN
+
+#endif //ICTSWLANLOGININTERFACE_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictswlanlogininterface/src/ictswlanlogininterface.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,328 @@
+/*
+* 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:
+* Entry library for launching Wlan Login application.
+*/
+
+// System includes
+
+#include <xqservicerequest.h>
+#include <xqappmgr.h>
+
+// User includes
+
+#include "ictswlanlogininterface.h"
+#include "wlanloginservice.h"
+#include "ictsqtwrapper.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ictswlanlogininterfaceTraces.h"
+#endif
+
+/*!
+    \class IctsWlanLoginInterface
+    \brief This class provides a Qt API for running Internet connectivity test
+           against WLAN accesspoint. If authentication is needed this component
+           launches WLAN Login application through Qt Highway to render 
+           authentication Web page.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+*/
+IctsWlanLoginInterface::IctsWlanLoginInterface(QObject *parent) :
+    QObject(parent),
+    mIctsWrapper(NULL),
+    mAiwMgr(NULL),
+    mAsyncRequest(NULL),
+    mIapId(0),
+    mNetId(0)
+{   
+   OstTraceFunctionEntry0(ICTSWLANLOGININTERFACE_CONSTRUCTOR_ENTRY);
+   
+   mAiwMgr = new XQApplicationManager();
+   
+   OstTraceFunctionExit0(ICTSWLANLOGININTERFACE_CONSTRUCTOR_EXIT);
+}
+
+/*!
+    Destructor.
+*/
+IctsWlanLoginInterface::~IctsWlanLoginInterface()
+{ 
+    OstTraceFunctionEntry0(ICTSWLANLOGININTERFACE_DESTRUCTOR_ENTRY);
+    
+    if (mAsyncRequest){
+        delete mAsyncRequest;
+    }
+    
+    OstTraceFunctionExit0(ICTSWLANLOGININTERFACE_DESTRUCTOR_EXIT);
+}
+
+/*!
+    Function for launching Wlan login application.
+    
+    @param [in] iapId Internet accesspoint id to be tested
+    @param [in] netId network identifier of the connection to be used
+*/
+void IctsWlanLoginInterface::start(int iapId, int netId)
+{    
+    OstTraceFunctionEntry0(ICTSWLANLOGININTERFACE_START_ENTRY);
+    
+    // Create ICTS instance as we know needed parameters now
+    mIctsWrapper = new IctsWrapper(iapId, netId, this);
+    
+    // Store identifiers for later use
+    mIapId = iapId;
+    mNetId = netId;
+        
+    bool connectStatus = connect( 
+        mIctsWrapper,
+        SIGNAL(connectivityTestResult(IctsWrapper::ConnectivityTestResult, QUrl)), 
+        this, 
+        SLOT(handleConnectivityTestResult(IctsWrapper::ConnectivityTestResult, QUrl)));    
+    Q_ASSERT(connectStatus);
+    
+    mIctsWrapper->startConnectivityTest();
+    
+    OstTraceFunctionExit0(ICTSWLANLOGININTERFACE_START_EXIT);
+}
+
+/*!
+    Function for launching Wlan login application.
+    
+    @param [in] iapId Internet accesspoint id to be used
+    @param [in] netId network id of the connection to be used
+    @param [in] url Redirection URL to be loaded
+    
+*/
+void IctsWlanLoginInterface::wlanLoginAppStart(int iapId, int netId, QUrl url)
+{    
+    OstTraceFunctionEntry0(ICTSWLANLOGININTERFACE_WLANLOGINAPPSTART_ENTRY);
+    
+    // Execution of asynchronous and embedded Wlan Login start
+    mAsyncRequest = mAiwMgr->create(
+        "wlanlogin",
+        "com.nokia.symbian.IWlanLogin",
+        "start(int,int,QUrl)",
+        false);
+   
+    // The Wlan Login service must always exist
+    Q_ASSERT(mAsyncRequest);
+
+    // Connect result handling signal
+    bool connectStatus = connect(
+        mAsyncRequest, 
+        SIGNAL(requestOk(const QVariant&)),
+        this,
+        SLOT(handleOk(const QVariant&)));
+    Q_ASSERT(connectStatus == true);
+    
+    // Connect error handling signal or apply lastError function instead.
+    connectStatus = connect(
+        mAsyncRequest,
+        SIGNAL(requestError(int,const QString&)),
+        this,
+        SLOT(handleError(int)));        // Error string is ignored.
+    Q_ASSERT(connectStatus == true);
+
+    // Set function parameters
+    QList<QVariant> args;
+    args << iapId;
+    args << netId;
+    args << url;
+     
+    mAsyncRequest->setArguments(args);
+   
+    // The service is set asynchronous
+    mAsyncRequest->setSynchronous(false);
+   
+    // Send the request
+    bool status = mAsyncRequest->send(); 
+    Q_ASSERT(status);
+    
+    OstTraceFunctionExit0(ICTSWLANLOGININTERFACE_WLANLOGINAPPSTART_EXIT);
+}
+
+/*!
+    Function for handling request's response from QtHighway framework
+    when transaction is OK. This is used only with asynchronous requests.
+    
+    @param [in] result Status received from WLAN Login application
+*/
+void IctsWlanLoginInterface::handleOk(const QVariant& result)
+{
+    OstTraceFunctionEntry0(ICTSWLANLOGININTERFACE_HANDLEOK_ENTRY);
+    
+    ictsResultType ictsRes = IctsFailed;
+    
+    // Handling of result received from service.
+    int i = result.toInt();
+    WlanLoginService::WlanLoginStatus status = 
+        static_cast<WlanLoginService::WlanLoginStatus>(i);
+    
+    switch (status) {
+        case WlanLoginService::WlanLoginStatusConnectionDropped:
+        case WlanLoginService::WlanLoginStatusCancel:
+            OstTrace0(
+                TRACE_NORMAL, 
+                ICTSWLANLOGININTERFACE_HANDLEOK_CANCEL_TRACE,
+                "WlanLoginStatusCancel or WlanLoginStatusConnectionDropped received ");
+            // User has canceled Wlan Login and it has to be stopped
+            stop();
+            ictsRes = IctsCanceled;
+            break;
+            
+        case WlanLoginService::WlanLoginStatusNext:
+            OstTrace0(
+                TRACE_NORMAL, 
+                ICTSWLANLOGININTERFACE_HANDLEOK_NEXT_TRACE,
+                "WlanLoginStatusNext received");
+            ictsRes = IctsHotspotPassed;
+            break;
+            
+        case WlanLoginService::WlanLoginStatusFailed:
+            OstTrace0( TRACE_NORMAL, 
+                ICTSWLANLOGININTERFACE_HANDLEOK_FAILED_TRACE,
+                "WlanLoginStatusFailed received ");
+            stop();
+            ictsRes = IctsFailed;
+            break;
+                  
+        default:
+            OstTrace0(
+			    TRACE_NORMAL,
+                ICTSWLANLOGININTERFACE_HANDLEOK_UNEXPECTED_STATUS_TRACE,
+                "Unexpected WlanLoginStatus received");
+            break;
+            
+    }
+    emit ictsResult(ictsRes);
+    
+    delete mAsyncRequest;
+    mAsyncRequest = NULL;
+    
+    OstTraceFunctionExit0(ICTSWLANLOGININTERFACE_HANDLEOK_EXIT);
+}
+
+/*!
+    Function for handling request's response from QtHighway framework
+    when errors occured. This is used only with asynchronous requests.
+    
+    @param [in] errorCode Error code that was received
+*/
+void IctsWlanLoginInterface::handleError(int errorCode)
+{    
+    OstTraceFunctionEntry0(ICTSWLANLOGININTERFACE_HANDLEERROR_ENTRY);
+    
+    OstTrace1(
+        TRACE_NORMAL,
+        ICTSWLANLOGININTERFACE_ERRORCODE_TRACE,
+        "errorCode=%d",
+        errorCode);
+    
+    delete mAsyncRequest;
+    mAsyncRequest = NULL;
+    
+    OstTraceFunctionExit0(ICTSWLANLOGININTERFACE_HANDLEERROR_EXIT);
+}
+
+/*!
+    Function for stopping launched Wlan login application.
+*/
+void IctsWlanLoginInterface::stop()
+{ 
+    OstTraceFunctionEntry0(ICTSWLANLOGININTERFACE_STOP_ENTRY);
+    
+    // Execution of synchronous and embedded Wlan Login stop
+    QScopedPointer<XQAiwRequest> syncRequest(mAiwMgr->create(
+         "wlanlogin",
+         "com.nokia.symbian.IWlanLogin",
+         "stop()",
+         false));
+   
+    // The Wlan Login service must always exist
+    Q_ASSERT(syncRequest);
+   
+    // The service is set synchronous
+    syncRequest->setSynchronous(true);
+   
+    // Send the request
+    bool status = syncRequest->send(); 
+    Q_ASSERT(status);
+    
+    OstTraceFunctionExit0(ICTSWLANLOGININTERFACE_STOP_EXIT);
+}
+
+/*!
+    Function for handling connectivityTestResult signal
+    
+    @param [in] result Internet connectivity test result
+    @param [in] redirectUrl Possible redirection URL. Valid only when HttpAuthenticationNeeded result received.
+*/
+void IctsWlanLoginInterface::handleConnectivityTestResult(IctsWrapper::ConnectivityTestResult result, QUrl redirectUrl)
+{
+    OstTraceFunctionEntry0(ICTSWLANLOGININTERFACE_HANDLECONNECTIVITYTESTRESULT_ENTRY);
+   
+    OstTrace1(TRACE_NORMAL,
+        ICTSWLANLOGININTERFACE_HANDLECONNECTIVITYRESULT_RESULT_TRACE,
+        "ConnectivityTestResult=%d",
+        result);
+        
+    switch (result) 
+        {
+        case IctsWrapper::ConnectionOk:
+            
+            OstTrace1(
+                TRACE_BORDER,
+                ICTSWLANLOGININTERFACE_HANDLECONNECTIVITYTESTRESULT_EMIT_ICTSRESULT_PASSED,
+                "IctsWlanLoginInterface::handleConnectivityTestResult emit ictsResult;result=%d",
+                IctsPassed);
+            
+            emit ictsResult(IctsPassed);
+            break;
+            
+        case IctsWrapper::HttpAuthenticationNeeded:
+            // Inform client that Hotspot authentication is needed. 
+            OstTrace0(
+                TRACE_BORDER,
+                ICTSWLANLOGININTERFACE_HANDLECONNECTIVITYTESTRESULT_EMIT_HOTSPOTCASE,
+                "IctsWlanLoginInterface::handleConnectivityTestResult emit hotspotCase");
+            
+            emit hotspotCase();
+            wlanLoginAppStart(mIapId, mNetId, redirectUrl);
+            break;
+            
+        default:
+            OstTrace1(
+                TRACE_BORDER,
+                ICTSWLANLOGININTERFACE_HANDLECONNECTIVITYTESTRESULT_EMIT_ICTS_RESULT_FAILED,
+                "IctsWlanLoginInterface::handleConnectivityTestResult emit ictsResult;result=%d",
+                IctsFailed);
+            emit ictsResult(IctsFailed);
+            break;
+            
+        }
+    
+    OstTraceFunctionExit0(ICTSWLANLOGININTERFACE_HANDLECONNECTIVITYTESTRESULT_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/ictswlanlogininterface/traces/OstTraceDefinitions.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,4 @@
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanlogin.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,24 @@
+#
+# 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: Project file for WLAN Login related components
+#
+
+TEMPLATE = subdirs
+
+SUBDIRS  += ictsqtwrapper \
+            wlanloginapp \
+            ictswlanlogininterface
+            
+CONFIG += ordered
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginapplication.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* 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: Header file for WlanLoginApplication class
+* 
+*/
+
+#ifndef WLANLOGINAPPLICATION_H
+#define WLANLOGINAPPLICATION_H
+
+// System includes
+#include <HbApplication>
+
+//User includes
+
+// forward declarations
+class WlanLoginService;
+class WlanLoginEngine;
+class WlanLoginMainWindow;
+class HbTranslator;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class WlanLoginApplication : public HbApplication
+    {
+public:
+    WlanLoginApplication(int argc, char* argv[]);
+    ~WlanLoginApplication();
+    
+    WlanLoginService* service() const;
+    WlanLoginEngine* engine() const;
+    QSharedPointer <WlanLoginMainWindow> mainWindow();
+    
+    
+private: // data
+    
+    // Not owned data
+
+    // Owned data
+    WlanLoginService* mService; //!< Pointer to Qt Highway service provider
+    QSharedPointer <HbTranslator> mTranslator; //!< Pointer to HB translator
+    WlanLoginEngine* mEngine; //!< Pointer to WLAN login engine
+    QSharedPointer <WlanLoginMainWindow> mMainWindow; //!< Pointer to WLAN login application main window      
+    };
+
+#endif // WLANLOGINAPPLICATION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginengine.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,125 @@
+/*
+ * 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:
+ * Engine of Wlan Login application.
+ */
+
+#ifndef WLANLOGINENGINE_H
+#define WLANLOGINENGINE_H
+
+// System includes
+#include <QObject>
+#include <HbAction>
+
+// User includes
+#include "qnetworkconfigmanager.h"
+#include "qnetworkconfiguration.h"
+#include "qnetworksession.h"
+#include "wlanloginservice.h"
+#include "ictsqtwrapper.h"
+#include "wlanloginnetworkaccessmanager.h"
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+/*!
+    Total polling time for ICTS in microseconds
+*/ 
+const int totalPollingTime = 20000000;
+
+/*!
+    Polling interval time for ICTS in microseconds
+*/ 
+const int pollingInterval = 4000000;
+
+/*!
+    Message box time out value in milliseconds
+*/ 
+const int messageBoxTimeout = 3000;
+
+
+QTM_USE_NAMESPACE
+
+// Class declaration
+class WlanLoginEngine : public QObject
+    {
+    Q_OBJECT
+
+public:
+    
+    /*!
+        Enumeration type for storing current engine state
+    */ 
+    enum EngineState { 
+        WaitingForStart = 0, //!< Engine waiting start from Qt Highway
+        UpdatingNetworkConfigurations, //!< Engine is updating netowk configuration states
+        OpeningNetworkSession, //!< Engine is opening network session
+        NetworkSessionOpened, //!< Network session is opened by engine
+        RunningIcts, //!< Internet connectivity test ongoing
+        IctsRan //!< Internet connectivity test has been ran
+    };
+    
+    explicit WlanLoginEngine(QObject *parent = 0);
+    ~WlanLoginEngine();
+
+    void openSession();
+    void stopIcts();
+    void showConnectionDroppedMessageBox();
+    void emitCompleteServiceRequest(WlanLoginService::WlanLoginStatus status);    
+    WlanLoginNetworkAccessManager* networkAccessManager() const;
+    EngineState engineState();
+    void setEngineState(EngineState newState);
+    
+signals:
+    void completeServiceRequest(int status);
+    void connectionReady(QUrl url);
+    void ictsOk();    
+    
+private slots:
+    void handleStartLogin(int iapId, int netId, QUrl redirectionUrl);
+    void handleStopLogin();
+    void handleUpdateCompleted();
+    void handleSessionOpened();   
+
+    void handleSessionStateChanged(QNetworkSession::State newState);
+    void handleSessionError(QNetworkSession::SessionError error);
+    void connectionDroppedMessageBoxClosed(HbAction* action);
+
+    void handleStartIcts();
+    void handleConnectivityTestResult(IctsWrapper::ConnectivityTestResult result, QUrl redirectUrl);
+    void handleCancelTriggered();
+    void handleNextTriggered();
+    void handleContinueTriggered();
+    
+private: // Data
+    
+    // Not owned data
+
+    // Owned data
+    EngineState mEngineState; //!< current state of the Engine
+    bool mServiceRequestCompleted; //!<  Variable for storing service request state
+    QNetworkConfigurationManager* mNetConfigurationManager; //!< pointer to network configuration manager 
+    WlanLoginNetworkAccessManager* mNetworkAccessManager; //!< pointer to network access manager
+    QNetworkSession* mNetworkSession; //!< pointer to network session
+    IctsWrapper* mIctsWrapper; //!< pointer to ICTS client wrapper
+    bool mIctsFirstRun; //!< Flag to check if we are running ICTS first time
+    int mIap; //!< IAP that was provided in startup
+    int mNetId; //!< network ID that was provided in startup
+    QUrl mRedirectionUrl; //!< redirection URL that was provided in startup
+    };
+
+#endif // WLANLOGINENGINE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginmainwindow.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,61 @@
+/*
+ * 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:
+ * 
+ */
+
+#ifndef WLANLOGINMAINWINDOW_H
+#define WLANLOGINMAINWINDOW_H
+
+// System includes
+#include <HbMainWindow>
+
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Forward declarations
+class WlanLoginView;
+class WlanLoginApplication;
+
+// Class declaration
+class WlanLoginMainWindow : public HbMainWindow
+    {
+    Q_OBJECT
+
+public:
+    explicit WlanLoginMainWindow(WlanLoginApplication* appRef);    
+    ~WlanLoginMainWindow();
+
+    WlanLoginView* loginView() const;
+
+private:
+    void addLoginView();
+    
+    
+private: //Data
+
+    // Not owned data
+
+    // Owned data
+    WlanLoginApplication* mAppRef; //!< pointer to application instance
+    WlanLoginView* mLoginView; //!< pointer to login view
+
+    };
+
+#endif // WLANLOGINMAINWINDOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginnetworkaccessmanager.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* 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:
+* Engine of Wlan Login application.
+*/
+
+#ifndef WLANLOGINNETWORKACCESSMANAGER_H
+#define WLANLOGINNETWORKACCESSMANAGER_H
+
+// System includes
+#include <QNetworkAccessManager>
+
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Class declaration
+class WlanLoginNetworkAccessManager : public QNetworkAccessManager
+{
+    Q_OBJECT
+
+public:
+    explicit WlanLoginNetworkAccessManager(QObject *parent = 0);
+    ~WlanLoginNetworkAccessManager();
+    
+private slots:
+    void handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
+    void handleNetworkRequestFinished(QNetworkReply* reply);
+};
+
+#endif // WLANLOGINNETWORKACCESSMANAGER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginservice.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* 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:  
+* Wlan login QtHighway Service.
+*/
+
+#ifndef WLANLOGINSERVICE_H
+#define WLANLOGINSERVICE_H
+
+// System includes
+#include <xqserviceprovider.h>
+#include <QUrl>
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Class declaration
+class WlanLoginService: public XQServiceProvider
+{
+    Q_OBJECT
+
+public:
+    // Data types
+    
+    /*!
+        Enumeration for WLAN Login application service request return values
+    */ 
+    enum WlanLoginStatus {
+        WlanLoginStatusNone = 0, //!< No status   
+        WlanLoginStatusCancel, //!< User cancel
+        WlanLoginStatusNext, //!< Proceed to next phase
+        WlanLoginStatusConnectionDropped, //!< WLAN connection dropped during login
+        WlanLoginStatusFailed //!< Login process failed
+    };
+    
+    explicit WlanLoginService(QObject *parent = 0);
+    ~WlanLoginService();
+    
+signals:
+
+     void startLogin(int iapId, int netId, QUrl url);
+     void stopLogin();
+     
+public slots:
+
+    void start(int iapId, int netId, QUrl url);
+    void stop();
+    void completeServiceRequest(int status);
+    
+private:
+
+    QVariant mReturnValue; //!< Return value deliverd to back to entry
+    int mAsyncRequestIndex; //!< Service request ID    
+};
+
+#endif //WLANLOGINSERVICE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginview.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* 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:
+* 
+*/
+
+#ifndef WLANLOGINVIEW_H
+#define WLANLOGINVIEW_H
+
+// System includes
+#include <QUrl>
+#include <HbView>
+#include <HbScrollArea>
+#include <QGraphicsLinearLayout>
+
+// User includes
+#include "wlanloginapplication.h"
+#include "wlanloginwebpage.h"
+#include "ictsqtwrapper.h"
+
+// Forward declarations
+class HbProgressBar;
+class WlanLoginWebView;
+class QNetworkAccessManager;
+class HbWidget;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class WlanLoginView : public HbView
+    {
+    Q_OBJECT
+    
+public:
+    WlanLoginView(WlanLoginApplication* appref);
+    virtual ~WlanLoginView();
+    
+    /*!
+        Enumeration type for current toolbar action in use
+    */ 
+    enum ActionType {
+        Cancel,     //!< "Cancel" button
+        Next,       //!< "Next" button
+        Continue    //!< "Continue" button
+    };
+    void setActiveToolBarAction(ActionType newAction);
+    
+private slots:
+
+    void handleConnectionReady(QUrl url);    
+    void handleOrientationChanged(Qt::Orientation orientation);
+    void adjustViewSize();
+    
+    void handleUrlChanged(const QUrl& newUrl);    
+    void handleLoadStarted();
+    void handleLoadProgress(int progressValue);
+    void handleLoadFinished(bool status );
+
+    void handleFormSubmitted();
+    void handleCancelAction();
+    void handleNextAction();
+    void handleContinueAction();
+    
+    void handleIctsOk();
+    
+signals:
+    void cancelTriggered();
+    void nextTriggered();
+    void continueTriggered();
+    void startIcts();
+    
+private: // Data
+    
+    // Not owned data
+    WlanLoginApplication* mAppRef;  //!< pointer to application instance 
+
+    // Owned data
+
+    QGraphicsLinearLayout* mMainLayout; //!< pointer to main layout
+    QGraphicsLinearLayout* mContentLayout; //!< pointer to scroall area content layout
+    
+    HbProgressBar* mProgressBar;    //!< pointer to HB progressbar  
+    HbScrollArea* mScrollArea;      //!< pointer to HB scroll area
+    HbWidget* mScrollAreaContent;
+    WlanLoginWebView* mWebView;     //!< pointer to web view
+    HbToolBar* mToolBar;            //!< pointer to HB toolbar
+    HbAction* mCancelAction;        //!< pointer to "cancel" action 
+    HbAction* mNextAction;          //!< pointer to "next" action
+    HbAction* mContinueAction;      //!< pointer to "continue" action
+
+    };
+
+#endif // WLANLOGINWEBVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginwebpage.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,48 @@
+/*
+ * 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: Wlan Login web page class definition
+ * 
+ */
+
+#ifndef WLANLOGINWEBPAGE_H
+#define WLANLOGINWEBPAGE_H
+
+// System includes
+#include <QWebPage>
+
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Class declaration
+class WlanLoginWebPage : public QWebPage
+    {
+    Q_OBJECT
+    
+public:
+    explicit WlanLoginWebPage(QObject* parent=0);
+    ~WlanLoginWebPage();
+      
+protected:
+    bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type);
+        
+signals:
+    void formSubmitted();
+    };
+
+#endif // WLANLOGINWEBPAGE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginwebview.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* 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: Wlan Login web view class definition
+* 
+*/
+
+#ifndef WLANLOGINWEBVIEW_H
+#define WLANLOGINWEBVIEW_H
+
+// System includes
+#include <QGraphicsWebView>
+
+// User includes
+
+// Forward declarations
+class WlanLoginWebPage;
+
+// External data types
+
+// Constants
+
+// Class declaration
+class WlanLoginWebView: public QGraphicsWebView 
+{
+    Q_OBJECT
+
+public:
+    explicit WlanLoginWebView(QGraphicsWidget* parent = 0);
+    ~WlanLoginWebView();
+
+protected:
+    bool eventFilter(QObject *, QEvent *event);
+    
+private: // Data
+    
+    // Not owned data
+
+    // Owned data
+    WlanLoginWebPage* mWebPage; //!< Pointer to subclassed QWebPage
+    bool mMousePressed; //!< Variable to hold whether mouse(finger) is pressed down
+};
+
+#endif //WLANLOGINWEBVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/res/service_conf.xml	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service>
+  <name>wlanlogin</name>
+  <filepath>No path</filepath>
+  <description>WLAN Login</description>
+  <interface>
+    <name>com.nokia.symbian.IWlanLogin</name>
+    <version>1.0</version>
+    <description>WLAN login start</description>
+  </interface>
+</service>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/rom/wlanlogin.iby	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* 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:
+* WLAN Login application IBY file.
+*/
+
+#ifndef WLANLOGIN_IBY
+#define WLANLOGIN_IBY
+
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
+#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(wlanlogin)
+S60_APP_RESOURCE(wlanlogin)
+UPGRADABLE_APP_REG_RSC(wlanlogin)
+
+#endif //__PROTOCOL_WLAN
+
+#endif // WLANLOGIN_IBY
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/rom/wlanlogin_resources.iby	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* 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:
+* WLAN login application resource IBY file.
+*/
+
+#ifndef WLANLOGIN_RESOURCES_IBY
+#define WLANLOGIN_RESOURCES_IBY
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh> 
+
+#ifdef __PROTOCOL_WLAN
+data=DATAZ_/QT_TRANSLATIONS_DIR/wlanlogin.qm QT_TRANSLATIONS_DIR/wlanlogin.qm 
+#endif //__PROTOCOL_WLAN
+
+#endif // WLANLOGIN_RESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/src/main.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,31 @@
+/*
+ * 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 "wlanloginapplication.h"
+#include <qsysteminfo.h>
+
+int main(int argc, char *argv[])
+{
+    // Check WLAN dynamic configuration & exit if WLAN is not enabled
+    QtMobility::QSystemInfo sysinfo;
+    if (!sysinfo.hasFeatureSupported(QtMobility::QSystemInfo::WlanFeature)) {
+        return -1;
+    }
+    
+    WlanLoginApplication app(argc, argv);
+    return app.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/src/wlanloginapplication.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,191 @@
+/*
+* 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:
+* Wlan Login application class implementation.
+* 
+*/
+
+
+// System includes
+#include <QObject>
+#include <QStringList>
+#include <QString>
+#include <QUrl>
+#include <HbTranslator>
+
+//User includes
+#include "wlanloginapplication.h"
+#include "wlanloginservice.h"
+#include "wlanloginmainwindow.h"
+#include "wlanloginengine.h"
+#include "wlanloginview.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanloginapplicationTraces.h"
+#endif
+
+/*!
+    \class WlanLoginApplication
+    \brief WLAN Login application class implementation.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+    
+    @param [in] argc Parameter count.
+    @param [in] argv Parameters. 
+ */
+WlanLoginApplication::WlanLoginApplication(int argc, char* argv[]) :
+    HbApplication( argc, argv ),
+    mService(new WlanLoginService(this)),
+    mTranslator(new HbTranslator()),
+    mEngine(new WlanLoginEngine(this)),
+    mMainWindow(new WlanLoginMainWindow(this))
+{
+    OstTraceFunctionEntry0(WLANLOGINAPPLICATION_WLANLOGINAPPLICATION_ENTRY);
+    
+    bool connectStatus = connect(
+        mService,
+        SIGNAL(startLogin(int,int,QUrl)),
+        mEngine, 
+        SLOT(handleStartLogin(int,int,QUrl)));    
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mService,
+        SIGNAL(stopLogin()),
+        mEngine, 
+        SLOT(handleStopLogin()));    
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mEngine,
+        SIGNAL(completeServiceRequest(int)),
+        mService,
+        SLOT(completeServiceRequest(int)));    
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mEngine,
+        SIGNAL(connectionReady(QUrl)),
+        mMainWindow->loginView(), 
+        SLOT(handleConnectionReady(QUrl)));    
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mMainWindow->loginView(),
+        SIGNAL(startIcts()),
+        mEngine, 
+        SLOT(handleStartIcts()));    
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mEngine,
+        SIGNAL(ictsOk()),
+        mMainWindow->loginView(),
+        SLOT(handleIctsOk()));
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mMainWindow->loginView(),
+        SIGNAL(cancelTriggered()),
+        mEngine, 
+        SLOT(handleCancelTriggered()));
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mMainWindow->loginView(),
+        SIGNAL(nextTriggered()),
+        mEngine, 
+        SLOT(handleNextTriggered()));    
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mMainWindow->loginView(),
+        SIGNAL(continueTriggered()),
+        mEngine, 
+        SLOT(handleContinueTriggered()));    
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mMainWindow.data(),
+        SIGNAL(orientationChanged(Qt::Orientation)),
+        mMainWindow->loginView(),
+        SLOT(handleOrientationChanged(Qt::Orientation)));
+    Q_ASSERT(connectStatus == true);
+    
+    OstTraceFunctionExit0(WLANLOGINAPPLICATION_WLANLOGINAPPLICATION_EXIT);
+}
+
+
+/*!
+    Destructor.
+ */
+WlanLoginApplication::~WlanLoginApplication()
+{
+    OstTraceFunctionEntry0(WLANLOGINAPPLICATION_DESTRUCTOR_ENTRY);
+
+    OstTraceFunctionExit0(WLANLOGINAPPLICATION_DESTRUCTOR_EXIT);
+}
+
+
+/*!
+    Function that returns pointer to Qt Highway service instance.
+    
+    @return Pointer to XQServiceProvider
+ */
+WlanLoginService* WlanLoginApplication::service() const
+{
+    OstTraceFunctionEntry0(WLANLOGINAPPLICATION_SERVICE_ENTRY);
+    OstTraceFunctionExit0(WLANLOGINAPPLICATION_SERVICE_EXIT);
+    
+    return mService;
+}
+
+
+/*!
+    Function that returns pointer to WLAN login engine
+    
+    @return Pointer to engine
+ */
+WlanLoginEngine* WlanLoginApplication::engine() const
+{
+    OstTraceFunctionEntry0(WLANLOGINAPPLICATION_ENGINE_ENTRY);
+    OstTraceFunctionExit0(WLANLOGINAPPLICATION_ENGINE_EXIT);
+    
+    return mEngine;
+}
+
+
+/*!
+    Function that returns pointer to WLAN login application main window
+    
+    @return Pointer to application main window
+ */
+QSharedPointer<WlanLoginMainWindow> WlanLoginApplication::mainWindow()
+{
+    OstTraceFunctionEntry0(WLANLOGINAPPLICATION_MAINWINDOW_ENTRY);
+    OstTraceFunctionExit0(WLANLOGINAPPLICATION_MAINWINDOW_EXIT);
+    
+    return mMainWindow;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/src/wlanloginengine.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,542 @@
+/*
+* 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:
+* Wlan Login engine class implementation
+* 
+*/
+
+// System includes
+#include <QObject>
+#include <QString>
+#include <QUrl>
+#include <HbMessagebox>
+#include <HbAction>
+#include <qnetworkconfigmanager.h>
+#include <qnetworkconfiguration.h>
+#include <qnetworksession.h>
+
+//User includes
+#include "wlanloginengine.h"
+#include "wlanloginapplication.h"
+#include "wlanloginmainwindow.h"
+#include "ictsqtwrapper.h"
+#include "wlanloginnetworkaccessmanager.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanloginengineTraces.h"
+#endif
+
+/*!
+    \class WlanLoginEngine
+    \brief WLAN Login engine class implementation.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+ */
+WlanLoginEngine::WlanLoginEngine(QObject *parent): 
+    QObject(parent),
+    mEngineState(WaitingForStart),
+    mServiceRequestCompleted(false),
+    mNetConfigurationManager(new QNetworkConfigurationManager(this)),
+    mNetworkAccessManager(new WlanLoginNetworkAccessManager(this)),
+    mNetworkSession(NULL),
+    mIctsWrapper(NULL),
+    mIctsFirstRun(true),
+    mIap(0),
+    mNetId(0),
+    mRedirectionUrl(QUrl(""))            
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_WLANLOGINENGINE_ENTRY);
+    
+    bool connectStatus = connect(
+        mNetConfigurationManager,
+        SIGNAL(updateCompleted()),
+        this, 
+        SLOT(handleUpdateCompleted()));  
+    Q_ASSERT(connectStatus == true);
+            
+    OstTraceFunctionExit0(WLANLOGINENGINE_WLANLOGINENGINE_EXIT);
+}
+
+
+/*!
+    Destructor.
+ */
+WlanLoginEngine::~WlanLoginEngine()
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_DESTRUCTOR_ENTRY);
+   
+    mNetworkSession->close();
+    
+    OstTraceFunctionExit0(WLANLOGINENGINE_DESTRUCTOR_EXIT);
+}
+
+
+/*!
+    Function that returns pointer to network access manager.
+    
+    @return Pointer to WlanLoginNetworkAccessManager
+ */
+WlanLoginNetworkAccessManager* WlanLoginEngine::networkAccessManager() const
+{
+    return mNetworkAccessManager;
+}
+
+
+/*!
+    Function that returns current state of the engine.
+    
+    @return engine state
+ */
+WlanLoginEngine::EngineState WlanLoginEngine::engineState()
+{
+    return mEngineState;    
+}
+
+
+/*!
+    Function that sets the current state of the engine.
+    
+    @param [in] newState New state of the engine to be set
+ */
+void WlanLoginEngine::setEngineState(WlanLoginEngine::EngineState newState)
+{
+    mEngineState = newState;
+}
+
+
+/*!
+    This slot handles startLogin signal from Qt Highway service provider
+    
+    @param [in] iapId Internet access point ID for a connection that we should attach to'
+    @param [in] netId Network Id for the connection to be used
+    @param [in] redirectionUrl The URL that we were redirected to by the first internet connectivity test
+    
+ */
+void WlanLoginEngine::handleStartLogin(int iapId, int netId, QUrl redirectionUrl)
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLESTARTLOGIN_ENTRY);
+   
+    mIap = iapId; 
+    OstTrace1(
+        TRACE_NORMAL,
+        WLANLOGINENGINE_HANDLESTARTLOGIN_IAP_TRACE,
+        "WlanLoginEngine::handleStartLogin;mIap=%d",
+        mIap);
+  
+    mNetId = netId;
+    OstTrace1(
+        TRACE_NORMAL,
+        WLANLOGINENGINE_HANDLESTARTLOGIN_NETID_TRACE,
+        "WlanLoginEngine::handleStartLogin;mNetId=%d",
+        mNetId);
+       
+    mRedirectionUrl = redirectionUrl;
+    
+#ifdef OST_TRACE_COMPILER_IN_USE
+    QString url = mRedirectionUrl.toString();
+    TPtrC tmp(url.utf16(),url.length() );
+    
+    OstTraceExt1(
+        TRACE_NORMAL,
+        WLANLOGINENGINE_HANDLESTARTLOGIN_URL_TRACE, 
+        "WlanLoginEngine::handleStartLogin;mRedirectionUrl=%S",
+        tmp);
+#endif
+        
+    //Create ICTS instance as we know needed parameters now
+    mIctsWrapper = new IctsWrapper(mIap, mNetId, this);
+    
+    bool connectStatus = connect(
+        mIctsWrapper,
+        SIGNAL(connectivityTestResult(IctsWrapper::ConnectivityTestResult, QUrl)), 
+        this,
+        SLOT(handleConnectivityTestResult(IctsWrapper::ConnectivityTestResult, QUrl)));  
+    Q_ASSERT(connectStatus == true);
+    
+    //Update network configurations as only states of the cellular IAP's are reliable 
+    //after creating network configuration manager
+    
+    setEngineState(UpdatingNetworkConfigurations);
+    mNetConfigurationManager->updateConfigurations();
+    
+    OstTraceFunctionExit0(WLANLOGINENGINE_HANDLESTARTLOGIN_EXIT);
+}
+
+/*!
+    This slot handles stopLogin signal from Qt Highway service provider
+        
+ */
+void WlanLoginEngine::handleStopLogin()
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLESTOPLOGIN_ENTRY);
+
+    // Exit application
+    qApp->quit();
+
+    OstTraceFunctionExit0(WLANLOGINENGINE_HANDLESTOPLOGIN_EXIT);
+}
+
+
+/*!
+    This slot handles updateCompleted signal from QNetworkConfigManager
+        
+ */
+void WlanLoginEngine::handleUpdateCompleted()
+{
+   OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLEUPDATECOMPLETED_ENTRY);
+   
+   //States of the available configurations are now updated and
+   //we can open the network session to provided IAP
+   
+   openSession();
+
+   OstTraceFunctionExit0(WLANLOGINENGINE_HANDLEUPDATECOMPLETED_EXIT);
+}
+
+/*!
+    This function handles opening of the network session to the specified IAP.
+    If IAP is not already in connected state, function completes service request
+    with connection dropped status and show a message box to user.
+        
+ */
+void WlanLoginEngine::openSession()
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_OPENSESSION_ENTRY);
+
+    setEngineState(WlanLoginEngine::OpeningNetworkSession);
+    
+    //Get configuration that matches the provided IAP
+    QNetworkConfiguration netConfiguration = mNetConfigurationManager->configurationFromIdentifier(QString::number(mIap));    
+    
+    OstTrace1(
+        TRACE_NORMAL,
+        WLANLOGINENGINE_OPENSESSION_CONFIGURATION_IDENTIFIER_TRACE,
+        "WlanLoginEngine::openSession;netConfiguration identifier=%d",
+        netConfiguration.identifier().toInt());
+    
+    OstTrace1(TRACE_NORMAL,
+        WLANLOGINENGINE_OPENSESSION_CONFIGURATION_STATE_TRACE,
+        "WlanLoginEngine::openSession;netConfiguration state=%d",
+        netConfiguration.state());
+    
+#ifdef OST_TRACE_COMPILER_IN_USE
+    QString string = netConfiguration.name();
+    TPtrC tmp(string.utf16(),string.length() );
+    
+    OstTraceExt1(
+        TRACE_NORMAL,
+        WLANLOGINENGINE_OPENSESSION_CONFIGURATION_NAME_TRACE, 
+        "WlanLoginEngine::openSession;netConfiguration name=%S",
+        tmp );
+       
+    string = netConfiguration.bearerName();
+    tmp.Set(string.utf16(),string.length());
+    
+    OstTraceExt1(
+        TRACE_NORMAL,
+        WLANLOGINENGINE_OPENSESSION_CONFIGURATION_BEARER_NAME_TRACE, 
+        "WlanLoginEngine::openSession;netConfiguration bearerName=%S",
+        tmp );
+#endif
+    
+    //Check that configuration state is active before opening session
+    //Otherwise show disconnected message box
+    
+    if (netConfiguration.state() == QNetworkConfiguration::Active)
+        {
+        //Create network session to IAP that was provided in startup
+        mNetworkSession = new QNetworkSession(netConfiguration, this);
+        
+        bool connectStatus = connect(
+            mNetworkSession,
+            SIGNAL(opened()),
+            this, 
+            SLOT(handleSessionOpened()));
+        Q_ASSERT(connectStatus == true);
+        
+        connectStatus = connect(
+            mNetworkSession,
+            SIGNAL(stateChanged(QNetworkSession::State)), 
+            this,
+            SLOT(handleSessionStateChanged(QNetworkSession::State)));       
+        Q_ASSERT(connectStatus == true);
+        
+        connectStatus = connect(
+            mNetworkSession,
+            SIGNAL(error(QNetworkSession::SessionError)), 
+            this,
+            SLOT(handleSessionError(QNetworkSession::SessionError)));   
+        Q_ASSERT(connectStatus == true);
+        
+        mNetworkSession->open();
+        } else {
+            showConnectionDroppedMessageBox();
+        }
+    
+    OstTraceFunctionExit0(WLANLOGINENGINE_OPENSESSION_EXIT);
+}
+
+
+/*!
+    This function handles sessionOpened signal from QNetworkSession. It informs view that
+    connection is ready to be used.
+        
+ */
+void WlanLoginEngine::handleSessionOpened()
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLESESSIONOPENED_ENTRY);
+
+    setEngineState(NetworkSessionOpened);
+    //Send indication to view that connection is ready
+    emit connectionReady(mRedirectionUrl);
+
+    OstTraceFunctionExit0(WLANLOGINENGINE_HANDLESESSIONOPENED_EXIT);
+}
+
+
+/*!
+    This function handles sessionStateChanged signal from QNetworkSession.
+    @param [in] newState New state of the session  
+ */
+void WlanLoginEngine::handleSessionStateChanged(QNetworkSession::State newState)
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLESESSIONSTATECHANGED_ENTRY);
+
+    OstTrace1(
+        TRACE_NORMAL,
+        WLANLOGINENGINE_HANDLESESSIONSTATECHANGED_STATE_TRACE,
+        "WlanLoginEngine::handleSessionStateChanged;newState=%d",
+        newState );
+    
+    OstTraceFunctionExit0(WLANLOGINENGINE_HANDLESESSIONSTATECHANGED_EXIT);
+}
+
+
+/*!
+    This function handles sessionError signal from QNetworkSession
+    @param [in] error session error     
+ */
+void WlanLoginEngine::handleSessionError(QNetworkSession::SessionError error)
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLESESSIONERROR_ENTRY);
+        
+    OstTrace1(
+        TRACE_NORMAL,
+        WLANLOGINENGINE_SESSION_ERROR_TRACE,
+        "WlanLoginEngine::handleSessionError;error=%d",
+        error);
+    
+    switch (engineState()) {    
+    case OpeningNetworkSession:
+        showConnectionDroppedMessageBox();
+        break;
+        
+    case NetworkSessionOpened:
+    case IctsRan:
+        if (error == QNetworkSession::SessionAbortedError ) {
+            showConnectionDroppedMessageBox();
+        }
+        break;
+        
+    case RunningIcts:
+        if (error == QNetworkSession::SessionAbortedError ) {
+            stopIcts();
+            showConnectionDroppedMessageBox();
+        }
+        break;
+        
+    default:
+        break;
+    }
+        
+    OstTraceFunctionExit0(WLANLOGINENGINE_HANDLESESSIONERROR_EXIT);
+}
+
+/*!
+    This function handles startIcts signal and starts connectivity test in polling mode
+        
+ */
+void WlanLoginEngine::handleStartIcts()
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLESTARTICTS_ENTRY);
+    
+    if (!mIctsWrapper->isPolling()) {
+        setEngineState(RunningIcts);
+        mIctsWrapper->startPolling(totalPollingTime, pollingInterval);
+    }
+
+    OstTraceFunctionExit0(WLANLOGINENGINE_HANDLESTARTICTS_EXIT);
+}
+
+/*!
+    This function stops internet connectivity test
+        
+ */
+void WlanLoginEngine::stopIcts()
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_STOPICTS_ENTRY);
+
+    if (mIctsWrapper->isPolling()) {
+        mIctsWrapper->stopPolling();
+    }
+
+    OstTraceFunctionExit0(WLANLOGINENGINE_STOPICTS_EXIT);
+}
+
+/*!
+    This slot handles connectivityTestResult signal from ICTS wrapper
+    @param [in] result Result of the internet connectivity test
+    @param [in] redirectionUrl The URL that we are being redirected, valid only if result is HttpAuthenticationNeeded
+ */
+
+void WlanLoginEngine::handleConnectivityTestResult(IctsWrapper::ConnectivityTestResult result, QUrl redirectUrl)
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLECONNECTIVITYTESTRESULT_ENTRY);
+
+    Q_UNUSED(redirectUrl);
+    
+    setEngineState(IctsRan);
+    mIctsFirstRun = false;
+    
+    if (result == IctsWrapper::ConnectionOk){
+        emit ictsOk();
+    }
+    
+    OstTraceFunctionExit0(WLANLOGINENGINE_HANDLECONNECTIVITYTESTRESULT_EXIT);
+}
+
+/*!
+    This slot handles cancelTriggered signal from the view
+        
+ */
+void WlanLoginEngine::handleCancelTriggered()
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLECANCELTRIGGERED_ENTRY);
+    
+    //Stop ICTS if it is running:
+    if (engineState() == RunningIcts) {
+        stopIcts();
+        if (mIctsFirstRun) {
+            emitCompleteServiceRequest(WlanLoginService::WlanLoginStatusCancel);
+        } else {
+            //Previous ICTS must have failed as cancel action can't be selected from UI if
+            //it has passed
+            emitCompleteServiceRequest(WlanLoginService::WlanLoginStatusFailed);
+        }         
+    } else if (engineState() == IctsRan) {
+        //ICTS must have failed as cancel action can't be selected from UI if
+        //it has passed
+        emitCompleteServiceRequest(WlanLoginService::WlanLoginStatusFailed);
+    } else {
+        //ICTS not run yet
+        emitCompleteServiceRequest(WlanLoginService::WlanLoginStatusCancel); 
+    }
+
+    OstTraceFunctionExit0(WLANLOGINENGINE_HANDLECANCELTRIGGERED_EXIT);
+}
+
+/*!
+    This slot handles nextTriggered signal from the view
+        
+ */
+void WlanLoginEngine::handleNextTriggered()
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLENEXTTRIGGERED_ENTRY);
+        
+    emitCompleteServiceRequest(WlanLoginService::WlanLoginStatusNext);
+    
+    //put application to background:
+    WlanLoginApplication* app = static_cast<WlanLoginApplication *>(this->parent());    
+    app->mainWindow()->lower();
+    
+    OstTraceFunctionExit0(WLANLOGINENGINE_HANDLENEXTTRIGGERED_EXIT);
+}
+
+/*!
+    This slot handles continueTriggered signal from the view
+        
+ */
+void WlanLoginEngine::handleContinueTriggered()
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLECONTINUETRIGGERED_ENTRY);
+    
+    //put application to background:
+    WlanLoginApplication* app = static_cast<WlanLoginApplication *>(this->parent());
+    app->mainWindow()->lower();
+    
+    OstTraceFunctionExit0(WLANLOGINENGINE_HANDLECONTINUETRIGGERED_EXIT);
+}
+
+/*!
+    This function shows connection dropped message box to the user
+        
+ */
+void WlanLoginEngine::showConnectionDroppedMessageBox()
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_SHOWCONNECTIONDROPPEDMESSAGEBOX_ENTRY);
+    
+    HbMessageBox *messageBox = new HbMessageBox(hbTrId("txt_occ_info_wlan_connection_closed_login_applica"));
+    messageBox->setAttribute(Qt::WA_DeleteOnClose);
+    messageBox->setTimeout(messageBoxTimeout);
+    messageBox->open(this,SLOT(connectionDroppedMessageBoxClosed(HbAction*)));
+    
+    OstTraceFunctionExit0(WLANLOGINENGINE_SHOWCONNECTIONDROPPEDMESSAGEBOX_EXIT);
+}
+
+void WlanLoginEngine::connectionDroppedMessageBoxClosed(HbAction* action)
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLEMESSAGEBOXCLOSED_ENTRY);
+    
+    Q_UNUSED(action);
+        
+    if (mServiceRequestCompleted == false ) {
+        emitCompleteServiceRequest(WlanLoginService::WlanLoginStatusConnectionDropped);
+                
+    } else {
+        //If Qt Highway service request is already completed when connection drops, we have to make exit by our own
+        qApp->exit();
+    }               
+      
+    OstTraceFunctionEntry0(WLANLOGINENGINE_HANDLEMESSAGEBOXCLOSED_EXIT);    
+}
+
+/*!
+    This function completes Qt Highway service request
+    @param [in] status completeing status of the service request   
+ */
+void WlanLoginEngine::emitCompleteServiceRequest(WlanLoginService::WlanLoginStatus status )
+{
+    OstTraceFunctionEntry0(WLANLOGINENGINE_EMITCOMPLETESERVICEREQUEST_ENTRY);
+        
+    mServiceRequestCompleted = true;
+    OstTrace1(
+        TRACE_BORDER,
+        WLANLOGINENGINE_EMITCOMPLETESERVICEREQUEST_EMIT_TRACE,
+        "WlanLoginEngine::emitCompleteServiceRequest with status:;status=%d",
+        status);
+    emit completeServiceRequest(status);
+
+    OstTraceFunctionExit0(WLANLOGINENGINE_EMITCOMPLETESERVICEREQUEST_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/src/wlanloginmainwindow.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,89 @@
+/*
+* 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:
+* Wlan Login main window class implementation
+* 
+*/
+
+// System includes
+
+//User includes
+
+#include "wlanloginmainwindow.h"
+#include "wlanloginengine.h"
+#include "wlanloginview.h"
+#include "wlanloginapplication.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanloginmainwindowTraces.h"
+#endif
+
+/*!
+    \class WlanLoginMainWindow
+    \brief WLAN Login main window class implementation.
+*/
+
+/*!
+    Constructor.
+ */
+WlanLoginMainWindow::WlanLoginMainWindow(WlanLoginApplication* appRef) :
+    mAppRef(appRef),
+    mLoginView(NULL)
+{
+    OstTraceFunctionEntry0(WLANLOGINMAINWINDOW_WLANLOGINMAINWINDOW_ENTRY);
+    
+    addLoginView();
+    setCurrentView(mLoginView);
+    show();
+    
+    OstTraceFunctionExit0(WLANLOGINMAINWINDOW_WLANLOGINMAINWINDOW_EXIT);
+}
+
+
+/*!
+    Destructor.
+ */
+WlanLoginMainWindow::~WlanLoginMainWindow()
+{
+    OstTraceFunctionEntry0(WLANLOGINMAINWINDOW_DESTRUCTOR_ENTRY);
+
+    OstTraceFunctionExit0(WLANLOGINMAINWINDOW_DESTRUCTOR_EXIT);
+}
+
+
+/*!
+    This function creates login view
+ */
+void WlanLoginMainWindow::addLoginView()
+{
+    OstTraceFunctionEntry0(WLANLOGINMAINWINDOW_ADDLOGINVIEW_ENTRY);
+
+    mLoginView = new WlanLoginView(mAppRef);
+    addView(mLoginView);
+
+    OstTraceFunctionExit0(WLANLOGINMAINWINDOW_ADDLOGINVIEW_EXIT);
+}
+
+
+/*!
+    This function returns pointer to login view
+ */
+WlanLoginView* WlanLoginMainWindow::loginView() const
+{
+    OstTraceFunctionEntry0(WLANLOGINMAINWINDOW_LOGINVIEW_ENTRY); 
+    OstTraceFunctionExit0(WLANLOGINMAINWINDOW_LOGINVIEW_EXIT);
+    
+    return mLoginView;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/src/wlanloginnetworkaccessmanager.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,139 @@
+/*
+* 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:
+* Wlan Login network access manager class implementation
+* 
+*/
+
+
+// System includes
+#include <QObject>
+#include <QSslConfiguration>
+#include <QSslSocket>
+#include <QNetworkReply>
+
+//User includes
+#include "wlanloginnetworkaccessmanager.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanloginnetworkaccessmanagerTraces.h"
+#endif
+
+/*!
+    \class WlanLoginNetworkAccessManager
+    \brief WLAN Login network access manager class implementation.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+WlanLoginNetworkAccessManager::WlanLoginNetworkAccessManager(QObject *parent): 
+    QNetworkAccessManager(parent)
+{
+    OstTraceFunctionEntry0(WLANLOGINNETWORKACCESSMANAGER_WLANLOGINNETWORKACCESSMANAGER_ENTRY);
+
+    QSslConfiguration sslConfig = QSslConfiguration::defaultConfiguration();
+    sslConfig.setPeerVerifyMode(QSslSocket::VerifyNone);    
+    QSslConfiguration::setDefaultConfiguration(sslConfig);
+      
+    bool connectStatus = connect(
+        this,
+        SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),
+        SLOT(handleSslErrors(QNetworkReply*, const QList<QSslError>&))
+        );
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        this,
+        SIGNAL(finished(QNetworkReply*)), 
+        this,
+        SLOT(handleNetworkRequestFinished(QNetworkReply*))
+        );
+    Q_ASSERT(connectStatus == true);
+    
+    OstTraceFunctionExit0(WLANLOGINNETWORKACCESSMANAGER_WLANLOGINNETWORKACCESSMANAGER_EXIT);
+
+}
+
+WlanLoginNetworkAccessManager::~WlanLoginNetworkAccessManager()
+{
+    OstTraceFunctionEntry0( WLANLOGINNETWORKACCESSMANAGER_DESTRUCTOR_ENTRY );
+    
+    OstTraceFunctionExit0( WLANLOGINNETWORKACCESSMANAGER_DESTRUCTOR_EXIT );
+}
+
+/*!
+    This function handles sslError signal from QNetworkAccessManager
+        
+ */
+void WlanLoginNetworkAccessManager::handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
+{
+    OstTraceFunctionEntry0(WLANLOGINNETWORKACCESSMANAGER_HANDLESSLERRORS_ENTRY);
+    
+#ifdef OST_TRACE_COMPILER_IN_USE    
+    for (int i=0; i<errors.count(); i++) {
+                  
+        OstTrace1(
+            TRACE_NORMAL,
+            WLANLOGINNETWORKACCESSMANAGER_HANDLESSLERRORS_ERROR_CODE_TRACE,
+            "WlanLoginView::handleSslErrors;SSL error code=%d",
+            errors[i].error()
+            );
+        
+        QString string = errors[i].errorString();
+        TPtrC tmp(string.utf16(),string.length() );
+        
+        OstTraceExt1(TRACE_NORMAL,
+            WLANLOGINNETWORKACCESSMANAGER_HANDLESSLERRORS_ERROR_STRING_TRACE, 
+            "WlanLoginNetworkAccessManager::handleSslErrors;SSL error string=%S",
+            tmp
+            );  
+       }
+#endif //OST_TRACE_COMPILER_IN_USE
+    
+    reply->ignoreSslErrors();
+
+    OstTraceFunctionExit0( WLANLOGINNETWORKACCESSMANAGER_HANDLESSLERRORS_EXIT );
+}
+
+/*!
+    This function handles finished signal from QNetworkAccessManager
+        
+ */
+void WlanLoginNetworkAccessManager::handleNetworkRequestFinished(QNetworkReply* reply)
+{
+    OstTraceFunctionEntry0(WLANLOGINNETWORKACCESSMANAGER_HANDLENETWORKREQUESTFINISHED_ENTRY);
+    
+    OstTrace1(
+        TRACE_NORMAL, WLANLOGINNETWORKACCESSMANAGER_HANDLENETWORKREQUESTFINISHED_ERROR_CODE_TRACE, 
+        "WlanLoginNetworkAccessManager::handleNetworkRequestFinished;QNetworkReply error code=%d",
+        reply->error()
+        );
+    
+#ifdef OST_TRACE_COMPILER_IN_USE 
+    QString string = reply->errorString();
+    TPtrC tmp(string.utf16(),string.length() );
+            
+    OstTraceExt1( TRACE_NORMAL, WLANLOGINNETWORKACCESSMANAGER_HANDLENETWORKREQUESTFINISHED_ERROR_STRING_TRACE, 
+            "WlanLoginNetworkAccessManager::handleNetworkRequestFinished;QNetworkReply error string=%S", tmp );
+#endif //OST_TRACE_COMPILER_IN_USE
+    
+    OstTraceFunctionExit0( WLANLOGINNETWORKACCESSMANAGER_HANDLENETWORKREQUESTFINISHED_EXIT );   
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/src/wlanloginservice.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* 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:
+* Wlan Login QtHighway Service.
+*/
+
+// System includes
+#include <QUrl>
+
+// User includes
+#include "wlanloginservice.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanloginserviceTraces.h"
+#endif
+
+/*!
+    \class WlanLoginService
+    \brief Wlan Login QtHighway service implementation.
+
+    This class implements a QtHighway service that is used to launch
+    Wlan login application. 
+*/
+
+/*!
+    Constructor.
+    
+    @param[in] parent Object parent.
+ */
+WlanLoginService::WlanLoginService(QObject* parent)
+    : XQServiceProvider(QLatin1String("wlanlogin.com.nokia.symbian.IWlanLogin"), parent),
+      mReturnValue(WlanLoginStatusNone)
+{
+    OstTraceFunctionEntry0(WLANLOGINSERVICE_WLANLOGINSERVICE_ENTRY);
+    
+    publishAll();
+    
+    OstTraceFunctionExit0(WLANLOGINSERVICE_WLANLOGINSERVICE_EXIT);
+}
+
+/*!
+    Destructor.
+ */
+WlanLoginService::~WlanLoginService()
+{
+    OstTraceFunctionEntry0(WLANLOGINSERVICE_DESTRUCTOR_ENTRY);
+    
+    OstTraceFunctionExit0(WLANLOGINSERVICE_DESTRUCTOR_EXIT);
+}
+
+/*!
+    Completes the current service.
+    
+    @param [in] status completeing status of the service request  
+ */
+void WlanLoginService::completeServiceRequest(int status)
+{    
+     OstTraceFunctionEntry0(WLANLOGINSERVICE_COMPLETESERVICEREQUEST_ENTRY);
+     
+    mReturnValue.setValue(status);
+    bool ret = completeRequest(mAsyncRequestIndex, mReturnValue);
+    Q_ASSERT(ret);
+    
+    OstTraceFunctionExit0(WLANLOGINSERVICE_COMPLETESERVICEREQUEST_EXIT);
+}
+
+/*!
+    Launches Wlan Login application giving needed information.
+    
+    @param [in] iapId of the connection that we need to attach to
+    @param [in] netId of the connection that we need to attach to
+    @param [in] url redirection URL of the login page to be loaded
+      
+ */
+void WlanLoginService::start(int iapId, int netId, QUrl url)
+{
+    OstTraceFunctionEntry0( WLANLOGINSERVICE_START_ENTRY );
+    
+    mAsyncRequestIndex = setCurrentRequestAsync();
+    emit startLogin(iapId, netId, url);  
+
+    OstTraceFunctionExit0(WLANLOGINSERVICE_START_EXIT);
+}
+
+/*!
+    Stop launched Wlan Login application.
+ */
+void WlanLoginService::stop()
+{
+    OstTraceFunctionEntry0(WLANLOGINSERVICE_STOP_ENTRY);
+    
+    mAsyncRequestIndex = setCurrentRequestAsync();
+    emit stopLogin();
+    
+    OstTraceFunctionExit0(WLANLOGINSERVICE_STOP_EXIT);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/src/wlanloginview.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,482 @@
+/*
+* 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:
+* Main view for the WLAN Login application
+* 
+*/
+
+
+#include <QGraphicsLinearLayout>
+#include <QWebFrame>
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbToolbar>
+#include <HbAction>
+#include <HbProgressBar>
+#include <HbScrollBar>
+#include <HbScrollArea>
+#include <HbWidget>
+
+// User includes
+#include "wlanloginview.h"
+#include "wlanloginwebview.h"
+#include "wlanloginwebpage.h"
+#include "wlanloginmainwindow.h"
+#include "wlanloginengine.h"
+#include "ictsqtwrapper.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanloginviewTraces.h"
+#endif
+
+/*!
+    \class WlanLoginView
+    \brief Main view for the WLAN Login application
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor       
+ */
+WlanLoginView::WlanLoginView(WlanLoginApplication* appRef):
+    mAppRef(appRef),
+    mMainLayout(NULL),
+    mContentLayout(NULL),
+    mProgressBar(NULL),
+    mScrollArea(NULL),
+    mScrollAreaContent(NULL),
+    mWebView(NULL),
+    mToolBar(NULL),
+    mCancelAction(NULL),
+    mNextAction(NULL),
+    mContinueAction(NULL)
+{   
+    OstTraceFunctionEntry0(WLANLOGINVIEW_WLANLOGINVIEW_ENTRY);
+    
+    setTitleBarVisible(false);
+    setStatusBarVisible(false);
+    
+    mMainLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    mMainLayout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    mMainLayout->setContentsMargins(0,0,0,0);
+    setLayout(mMainLayout);
+      
+    mScrollArea = new HbScrollArea();
+    mScrollArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    mScrollArea->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
+    mScrollArea->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);  
+    mScrollArea->setScrollDirections(Qt::Vertical | Qt::Horizontal);
+    mScrollArea->setClampingStyle( HbScrollArea::StrictClamping );
+    mScrollArea->setScrollingStyle( HbScrollArea::PanWithFollowOn );
+    mMainLayout->addItem(mScrollArea);
+   
+    mScrollAreaContent = new HbWidget();
+    mScrollAreaContent->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);    
+    mContentLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    mContentLayout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    mContentLayout->setContentsMargins(0,0,0,0);
+    mScrollAreaContent->setLayout(mContentLayout);
+    mScrollArea->setContentWidget(mScrollAreaContent);
+    
+    // Set white background to content widget
+    QPixmap pixmap(10,10);
+    pixmap.fill(Qt::white);
+    QGraphicsPixmapItem *pixmapItem = new QGraphicsPixmapItem(pixmap);
+    mScrollAreaContent->setBackgroundItem(pixmapItem);
+    
+    //Note: Progress bar is added to layout when loadStarted signal is handled and
+    //removed when loadFinished signal is handled
+    mProgressBar = new HbProgressBar();  
+    mProgressBar->setRange( 0,100);
+    mProgressBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    mProgressBar->setVisible(false);
+    
+    mWebView = new WlanLoginWebView();
+    mContentLayout->addItem(mWebView);
+    mWebView->page()->setNetworkAccessManager(appRef->engine()->networkAccessManager());
+    
+    //Create tool bar
+    mToolBar = new HbToolBar();   
+    mCancelAction = mToolBar->addAction(HbIcon("qtg_mono_exit"),"");
+    mNextAction = mToolBar->addAction(HbIcon("qtg_mono_arrow_right"),"");
+    mContinueAction = mToolBar->addAction(HbIcon("qtg_mono_tick"),"");
+    
+    setToolBar(mToolBar);
+    setActiveToolBarAction(Cancel);
+
+    mToolBar->show();
+    mWebView->show();
+    mScrollArea->show();
+    
+    bool connectStatus = connect(
+        mWebView,
+        SIGNAL(loadStarted()),
+        this,
+        SLOT(handleLoadStarted())); 
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mWebView,
+        SIGNAL(loadProgress(int)),
+        this,
+        SLOT(handleLoadProgress(int))); 
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mWebView,
+        SIGNAL(loadFinished(bool)),
+        this,
+        SLOT(handleLoadFinished(bool)));
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+    mWebView,
+    SIGNAL(urlChanged(const QUrl&)),
+    this,
+    SLOT(handleUrlChanged(const QUrl&)));
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mWebView->page(),
+        SIGNAL(formSubmitted()),
+        this,
+        SLOT(handleFormSubmitted()));
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mCancelAction,
+        SIGNAL(triggered()),
+        this,
+        SLOT(handleCancelAction()));
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mNextAction,
+        SIGNAL(triggered()),
+        this,
+        SLOT(handleNextAction()));
+    Q_ASSERT(connectStatus == true);
+    
+    connectStatus = connect(
+        mContinueAction,
+        SIGNAL(triggered()),
+        this,
+        SLOT(handleContinueAction()));
+    Q_ASSERT(connectStatus == true);
+    
+    show();
+    
+    OstTraceFunctionExit0(WLANLOGINVIEW_WLANLOGINVIEW_EXIT);
+}
+
+
+/*!
+    Destructor       
+ */
+WlanLoginView::~WlanLoginView()
+{
+    OstTraceFunctionEntry0(WLANLOGINVIEW_DESTRUCTOR_ENTRY);
+    
+    //delete progress bar here as it is not on the layout all the time and
+    //thus may not have a parent at all.
+    if (mProgressBar) {
+        delete mProgressBar;
+    }
+    
+    OstTraceFunctionExit0(WLANLOGINVIEW_DESTRUCTOR_EXIT);
+}
+
+
+/*!
+    This function handles connectionReady signal from engine and starts loading of
+    provided web page
+    
+    @param [in] url URL to be loaded
+ */
+void WlanLoginView::handleConnectionReady(QUrl url)
+{
+    OstTraceFunctionEntry0(WLANLOGINVIEW_HANDLECONNECTIONREADY_ENTRY);
+    
+    mWebView->load(url);
+    
+    OstTraceFunctionExit0(WLANLOGINVIEW_HANDLECONNECTIONREADY_EXIT);
+}
+
+
+/*!
+    This function handles orientationChanged signal
+    
+    @param [in] orientation New Orientation of the screen
+ */
+void WlanLoginView::handleOrientationChanged(Qt::Orientation orientation)
+{
+    Q_UNUSED(orientation);
+    OstTraceFunctionEntry0( WLANLOGINVIEW_ORIENTATIONCHANGED_ENTRY );
+    
+    adjustViewSize();
+    
+    OstTraceFunctionEntry0( WLANLOGINVIEW_ORIENTATIONCHANGED_EXIT );
+}
+
+void WlanLoginView::adjustViewSize()
+{
+    OstTraceFunctionEntry0( WLANLOGINVIEW_ADJUSTVIEWSIZE_ENTRY );
+    
+    //Store current screen size
+    QSizeF screenSize = mAppRef->mainWindow()->layoutRect().size();
+    
+    //Store current content size
+    QSize contentSize = mWebView->page()->mainFrame()->contentsSize();
+    
+    //Set viewPortSize to biggest values of content size or current screen size 
+    QSize newViewPortSize;
+    if (screenSize.toSize().width() > contentSize.width()) {
+        newViewPortSize.setWidth(screenSize.toSize().width());
+    } else {    
+        newViewPortSize.setWidth(contentSize.width());
+    }
+    
+    if (screenSize.toSize().height() > contentSize.height()) {
+        newViewPortSize.setHeight(screenSize.toSize().height());
+    } else {    
+        newViewPortSize.setHeight(contentSize.height());
+    }
+    mWebView->page()->setViewportSize(newViewPortSize);
+    
+    
+    //Set Web View size to same size as viewport
+    mWebView->setMinimumWidth((qreal)newViewPortSize.width());
+    mWebView->setMaximumWidth((qreal)newViewPortSize.width());
+    mWebView->setPreferredWidth((qreal)newViewPortSize.width());
+    
+    mWebView->setMinimumHeight((qreal)newViewPortSize.height());
+    mWebView->setMaximumHeight((qreal)newViewPortSize.height());
+    mWebView->setPreferredHeight((qreal)newViewPortSize.height());
+    
+    
+    //Set preferred content size to current screen size
+    mWebView->page()->setPreferredContentsSize(mAppRef->mainWindow()->layoutRect().size().toSize());
+      
+    OstTraceFunctionEntry0( WLANLOGINVIEW_ADJUSTVIEWSIZE_EXIT );
+}
+
+
+/*!
+    This function handles urlChanged signal from QGraphicsWebView
+    
+    @param [in] newUrl New URL
+ */
+void WlanLoginView::handleUrlChanged(const QUrl& newUrl )
+{
+    OstTraceFunctionEntry0(WLANLOGINVIEW_HANDLEURLCHANGED_ENTRY);
+ 
+#ifdef OST_TRACE_COMPILER_IN_USE
+    QString url = newUrl.toString();
+    TPtrC tmp(url.utf16(),url.length() );
+    
+    OstTraceExt1(
+        TRACE_NORMAL,
+        WLANLOGINVIEW_HANDLEURLCHANGED_URL_TRACE, 
+        "WlanLoginEngine::handleUrlChanged;newUrl=%S",
+        tmp);
+#endif
+
+    OstTraceFunctionExit0(WLANLOGINVIEW_HANDLEURLCHANGED_EXIT);
+}
+
+
+/*!
+    This function handles loadStarted signal from QGraphicsWebView
+ */
+void WlanLoginView::handleLoadStarted()
+{
+   OstTraceFunctionEntry0(WLANLOGINVIEW_HANDLELOADSTARTED_ENTRY);
+   
+   mContentLayout->insertItem(0, mProgressBar);
+    mProgressBar->setVisible(true);
+    
+    OstTraceFunctionExit0(WLANLOGINVIEW_HANDLELOADSTARTED_EXIT);
+}
+
+
+/*!
+    This function handles loadProgress signal from QGraphicsWebView
+
+    @param [in] progressValue Indicates page loading progress: 0..100
+ */
+void WlanLoginView::handleLoadProgress(int progressValue)
+{
+    OstTraceFunctionEntry0(WLANLOGINVIEW_HANDLELOADPROGRESS_ENTRY);
+    
+    mProgressBar->setProgressValue(progressValue);
+    
+    OstTraceFunctionExit0(WLANLOGINVIEW_HANDLELOADPROGRESS_EXIT);
+}
+
+
+/*!
+    This function handles loadfinished signal from QGraphicsWebView
+
+    @param [in] status Success status
+ */
+void WlanLoginView::handleLoadFinished(bool status)
+{
+   OstTraceFunctionEntry0(WLANLOGINVIEW_HANDLELOADFINISHED_ENTRY);
+   
+    if(status)
+    {   
+        adjustViewSize();
+    }
+   
+    mProgressBar->setVisible(false);
+    mContentLayout->removeItem(mProgressBar);
+  
+    OstTraceFunctionExit0(WLANLOGINVIEW_HANDLELOADFINISHED_EXIT);
+}
+
+
+/*!
+    This function handles formSumitted signal from WlanLoginWebPage
+
+ */
+void WlanLoginView::handleFormSubmitted()
+{
+    OstTraceFunctionEntry0(WLANLOGINVIEW_HANDLEFORMSUBMITTED_ENTRY);
+               
+    //TODO: Check why QWebPage sends this signal to times in a row when user pushes submit button in a web page
+    
+    //User has submitted credentials, let's start internet connectivity test
+    emit startIcts();       
+    
+    OstTraceFunctionExit0(WLANLOGINVIEW_HANDLEFORMSUBMITTED_EXIT);
+}
+
+
+/*!
+    This function handles triggered signal from "cancel" button
+
+ */
+void WlanLoginView::handleCancelAction()
+{
+    OstTraceFunctionEntry0(WLANLOGINVIEW_HANDLECANCELACTION_ENTRY);
+
+    emit cancelTriggered();
+               
+    OstTraceFunctionExit0(WLANLOGINVIEW_HANDLECANCELACTION_EXIT);
+}
+
+
+/*!
+    This function handles triggered signal from "next" button
+
+ */
+void WlanLoginView::handleNextAction()
+{
+    OstTraceFunctionEntry0(WLANLOGINVIEW_HANDLENEXTACTION_ENTRY);
+
+    emit nextTriggered();
+    
+    //Change toolabr action to "Continue" as we are going to background 
+    setActiveToolBarAction(Continue);
+        
+    OstTraceFunctionExit0(WLANLOGINVIEW_HANDLENEXTACTION_EXIT);
+}
+
+
+/*!
+    This function handles triggered signal from "continue" button
+
+ */
+void WlanLoginView::handleContinueAction()
+{
+    OstTraceFunctionEntry0(WLANLOGINVIEW_HANDLECONTINUEACTION_ENTRY);
+
+    emit continueTriggered();
+    
+    OstTraceFunctionExit0(WLANLOGINVIEW_HANDLECONTINUEACTION_EXIT);
+}
+
+
+/*!
+    This function handles ictsOk signal from engine
+
+ */
+void WlanLoginView::handleIctsOk()
+{
+    OstTraceFunctionEntry0(WLANLOGINVIEW_HANDLEICTSRESULT_ENTRY);
+            
+    setActiveToolBarAction(Next);
+    
+    OstTraceFunctionExit0(WLANLOGINVIEW_HANDLEICTSRESULT_EXIT);
+}
+
+/*!
+    This function sets active action to the toolbar and hides other actions
+
+     @param [in] newAction Action to be set to toolbar
+ */
+void WlanLoginView::setActiveToolBarAction(ActionType newAction)
+{
+    OstTraceFunctionEntry0( WLANLOGINVIEW_SETACTIVETOOLBARACTION_ENTRY );
+    
+    switch (newAction) {
+    case Cancel:
+        mNextAction->setEnabled(false);
+        mNextAction->setVisible(false);
+        
+        mContinueAction->setEnabled(false);
+        mContinueAction->setVisible(false);
+        
+        mCancelAction->setVisible(true);
+        mCancelAction->setEnabled(true);
+        break;
+            
+    case Next:
+        mCancelAction->setEnabled(false);
+        mCancelAction->setVisible(false);
+        
+        mContinueAction->setEnabled(false);
+        mContinueAction->setVisible(false);
+        
+        mNextAction->setVisible(true);
+        mNextAction->setEnabled(true);
+        break;
+            
+    case Continue:
+        mCancelAction->setEnabled(false);
+        mCancelAction->setVisible(false);
+        
+        mNextAction->setEnabled(false);
+        mNextAction->setVisible(false);
+        
+        mContinueAction->setVisible(true);
+        mContinueAction->setEnabled(true);
+        break;
+            
+    default:
+        break;
+            
+    }
+    
+    OstTraceFunctionExit0( WLANLOGINVIEW_SETACTIVETOOLBARACTION_EXIT );
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/src/wlanloginwebpage.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,97 @@
+/*
+ * 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:
+ * 
+ */
+
+// System includes
+#include <QWebPage>
+#include <QWebFrame>
+#include <QNetworkRequest>
+
+// User includes
+#include "wlanloginwebpage.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanloginwebpageTraces.h"
+#endif
+
+/*!
+    \class WlanLoginWebPage
+    \brief WLAN Login web page class implementation.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+    Constructor.
+ */
+WlanLoginWebPage::WlanLoginWebPage(QObject *parent): QWebPage(parent)
+{
+    OstTraceFunctionEntry0( WLANLOGINWEBPAGE_WLANLOGINWEBPAGE_ENTRY );
+
+    //Hide scrollbars
+    mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff );
+    mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff );
+
+    setContentEditable(false);
+    
+    OstTraceFunctionExit0( WLANLOGINWEBPAGE_WLANLOGINWEBPAGE_EXIT );
+}
+
+
+WlanLoginWebPage::~WlanLoginWebPage()
+{
+    OstTraceFunctionEntry0( WLANLOGINWEBPAGE_DESTRUCTOR_ENTRY );
+
+    OstTraceFunctionExit0( WLANLOGINWEBPAGE_DESTRUCTOR_EXIT );
+}
+
+
+/*!
+    This function checks navigation events. This was rewritten as we needed
+    indication to login view when user has submitted the password and user name. That 
+    corresponds to value QWebPage::NavigationTypeFormSubmitted. This triggers starting of
+    internet connectivity test.
+    
+    @param [in] frame
+    @param [in] request
+    @param [in] type
+ */
+bool WlanLoginWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
+{
+    OstTraceFunctionEntry0( WLANLOGINWEBPAGE_ACCEPTNAVIGATIONREQUEST_ENTRY );
+    
+    if (type== QWebPage::NavigationTypeFormSubmitted) {
+    
+    OstTrace0(
+        TRACE_BORDER,
+        WLANLOGINWEBPAGE_ACCEPTNAVIGATIONREQUEST_EMITTING_TRACE,
+        "WlanLoginWebPage::acceptNavigationRequest emitting formSubmitted() signal");
+    
+        emit formSubmitted();
+    }
+   
+    OstTraceFunctionExit0( WLANLOGINWEBPAGE_ACCEPTNAVIGATIONREQUEST_EXIT );
+    
+    return QWebPage::acceptNavigationRequest(frame,request,type);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/src/wlanloginwebview.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* 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 includes
+#include <QGraphicsWebView>
+
+// User includes
+#include "wlanloginwebview.h"
+#include "wlanloginwebpage.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanloginwebviewTraces.h"
+#endif
+
+/*!
+    \class WlanLoginWebView
+    \brief WLAN Login web view class implementation.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor       
+ */
+WlanLoginWebView::WlanLoginWebView(QGraphicsWidget* parent): 
+    QGraphicsWebView(parent),
+    mWebPage(NULL),
+    mMousePressed(false)
+{
+    OstTraceFunctionEntry0( WLANLOGINWEBVIEW_WLANLOGINWEBVIEW_ENTRY );
+
+    installEventFilter(this); //Event filter for preventing text selection when scrolling
+    
+    mWebPage = new WlanLoginWebPage(this);
+    setPage(mWebPage);
+    setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+           
+    OstTraceFunctionExit0( WLANLOGINWEBVIEW_WLANLOGINWEBVIEW_EXIT );
+}
+
+
+/*!
+    Destructor
+        
+ */
+WlanLoginWebView::~WlanLoginWebView()
+{
+    OstTraceFunctionEntry0( WLANLOGINWEBVIEW_DESTRUCTOR_ENTRY );
+    OstTraceFunctionExit0( WLANLOGINWEBVIEW_DESTRUCTOR_EXIT );
+}
+
+/*!
+    This eventfilter filters QEvent::GraphicsSceneMouseMove events from Web View while
+    mouse (finger) is pressed down. If filtering is not done it causes text selection on
+    the web page when page is scrolled with finger.
+    
+    @param [in] event Pointer to received event
+        
+ */
+bool WlanLoginWebView::eventFilter(QObject *, QEvent *event)
+{ 
+     switch (event->type()) {
+         case QEvent::GraphicsSceneMousePress:
+                 mMousePressed = true;            
+             break;
+         case QEvent::GraphicsSceneMouseRelease:
+                 mMousePressed = false;
+             break;
+         case QEvent::GraphicsSceneMouseMove:
+             if (mMousePressed)
+                 return true;
+             break;
+     default:
+         break;
+     }      
+     return false;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/traces/OstTraceDefinitions.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,21 @@
+/*
+* 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: Header file for OST traces
+* 
+*/
+
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanlogin/wlanloginapp/wlanloginapp.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,77 @@
+#
+# 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:
+# Project file for WLAN Login application.
+#
+
+TEMPLATE = app
+TARGET = wlanlogin
+DEPENDPATH += .
+INCLUDEPATH += \
+    . \
+    /epoc32/include/mw \
+    ../inc \
+    ../../inc
+                 
+LIBS += -lxqservice -lxqserviceutil -lictsqtwrapper -lqtsysteminfo 
+
+CONFIG += hb service mobility
+MOBILITY += bearer
+
+QT += \
+    core \
+    network \
+    webkit
+      
+#Store generated .moc files to their own directory
+MOC_DIR = build
+      
+# Input
+SOURCES += \
+    src/main.cpp \
+    src/wlanloginapplication.cpp \
+    src/wlanloginengine.cpp \
+    src/wlanloginmainwindow.cpp \
+    src/wlanloginnetworkaccessmanager.cpp \
+    src/wlanloginservice.cpp \
+    src/wlanloginview.cpp \
+    src/wlanloginwebpage.cpp \
+    src/wlanloginwebview.cpp
+               
+HEADERS += \
+    inc/wlanloginapplication.h \
+    inc/wlanloginengine.h \
+    inc/wlanloginmainwindow.h \
+    inc/wlanloginnetworkaccessmanager.h \
+    inc/wlanloginservice.h \
+    inc/wlanloginview.h \
+    inc/wlanloginwebpage.h \
+    inc/wlanloginwebview.h \
+    traces/OstTraceDefinitions.h
+          
+TRANSLATIONS = wlanlogin.ts
+
+SERVICE.FILE = res/service_conf.xml
+
+# Temporary solution to fix tracecompiler
+# When tracecompiler is fixed, this can be removed
+MMP_RULES += "USERINCLUDE traces"
+
+symbian*: {
+	LIBS += -lictsclientinterface
+	TARGET.UID3 = 0x2002E6D0
+    TARGET.CAPABILITY = CAP_APPLICATION NetworkControl
+    BLD_INF_RULES.prj_exports += "rom/wlanlogin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(wlanlogin.iby)"
+    BLD_INF_RULES.prj_exports += "rom/wlanlogin_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(wlanlogin_resources.iby)"
+}
--- a/wlanutilities/wlanqtutilities/base/inc/wlanqtutils.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/base/inc/wlanqtutils.h	Tue Jul 06 15:29:22 2010 +0300
@@ -59,7 +59,7 @@
     /*!
         WLAN connection status.
         Remember to update traces/trace.properties when modifying this enum.
-    */        
+    */
     enum ConnStatus {
         ConnStatusNone = 0,         //!< Reserved.
         ConnStatusConnecting,       //!< Connecting.
@@ -67,6 +67,27 @@
         ConnStatusDisconnected      //!< Disconnected.
     };
     
+    /*!
+        WLAN scan status
+        Remember to update traces/trace.properties when modifying this enum.
+    */
+    enum ScanStatus {
+        ScanStatusOk = 0,           //!< Scan succeeded.
+        ScanStatusCancelled,        //!< Scan was cancelled.
+        ScanStatusError             //!< Scan failed.
+    };
+    
+    /*! 
+        Internet Connectivity Test status.
+        Remember to update traces/trace.properties when modifying this enum.
+    */        
+    enum IctStatus {
+        IctPassed = 0,              //!< Normal ICT passed.
+        IctHotspotPassed,           //!< Hotspot ICT passed.
+        IctCancelled,               //!< ICT was cancelled.
+        IctFailed                   //!< ICT failed.
+    };    
+    
     WlanQtUtils();
     
     ~WlanQtUtils();
@@ -105,21 +126,28 @@
 signals:
 
     /*!
-        Signal indicating that WLAN scan results are available. 
+        Signal indicating that WLAN scan is complete when scanning
+        is requested with scanWlans() method.
+        
+        @param [in] status Scan status code (ScanStatus).
     */
-    void wlanScanReady();
+    void wlanScanReady(int status);
     
     /*!
-        Signal indicating that WLAN scan results are available when scanning
+        Signal indicating that WLAN scan is complete when scanning
         is requested with scanWlanAps() method.
+        
+        @param [in] status Scan status code (ScanStatus).
     */
-    void wlanScanApReady();
+    void wlanScanApReady(int status);
     
     /*!
-        Signal indicating that WLAN scan results are available when scanning
+        Signal indicating that WLAN scan is complete when scanning
         is requested with scanWlanDirect() method.
+        
+        @param [in] status Scan status code (ScanStatus).
     */
-    void wlanScanDirectReady();
+    void wlanScanDirectReady(int status);
     
     /*!
         Signal indicating that new WLAN network has been opened. 
@@ -143,9 +171,12 @@
         Signal indicating result of finished ICT run.
 
         @param [in] iapId ID of IAP ICT was run for.
-        @param [in] result True: ICT passed, False: ICT failed.
+        @param [in] result IctPassed: Normal ICT passed,
+                           IctHotspotPassed: Hotspot ICT passed,
+                           IctCancelled: ICT was cancelled,
+                           IctFailed: ICT failed
     */
-    void ictResult(int iapId, bool result);
+    void ictResult(int iapId, int result);
     
 public slots:
 
--- a/wlanutilities/wlanqtutilities/base/inc/wlanqtutils_p.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/base/inc/wlanqtutils_p.h	Tue Jul 06 15:29:22 2010 +0300
@@ -27,6 +27,7 @@
 // User includes
 
 #include "wlanqtutils.h"
+#include "ictswlanlogininterface.h"
 
 // Forward declarations
 
@@ -37,7 +38,7 @@
 class WlanQtUtilsIapSettings;
 class WlanQtUtilsConMonWrapper;
 class WlanQtUtilsEsockWrapper;
-class ConnTestWrapper;
+class WlanQtUtilsScan;
 
 // External data types
 
@@ -113,9 +114,9 @@
     void updateAvailableWlanAps(
         QList< QSharedPointer<WlanQtUtilsAp> > &availableWlans);
     
-    void updateConnectionStatus(bool isOpened);
+    void reportScanResult(int status);
     
-    void updateConnectivityTestResult(bool result);
+    void updateConnectionStatus(bool isOpened);
     
     void addActiveConnection(uint connectionId);
     
@@ -125,8 +126,20 @@
         uint connectionId,
         WlanQtUtils::ConnStatus connectionStatus);
 
+    void updateIctResult(int ictsResult);
+    
+    void updateIctHotspotCase();
+
 private: // data
 
+    //! Current scan mode
+    enum ScanMode {
+        ScanModeNone = 0,               //!< No scan active
+        ScanModeAvailableWlans,         //!< Available AP's & IAPS
+        ScanModeAvailableWlanAps,       //!< Available AP's
+        ScanModeDirect                  //!< Direct SSID scan
+    };
+    
     // Not owned data
 
     //! Pointer to public implementation.
@@ -139,13 +152,19 @@
     
     //! Wrapper object for Connection Monitor and other parts of connmon library.
     WlanQtUtilsConMonWrapper *mConMonWrapper;
+
+    //! Wrapper object for WLAN scanning.
+    WlanQtUtilsScan *mScanWrapper;
     
     //! Wrapper object for esock library.
     WlanQtUtilsEsockWrapper *mEsockWrapper;
 
-    //! Wrapper object for Internet Connectivity Test library.
-    ConnTestWrapper *mConnTestWrapper;
+    //! Instance of Icts Wlan Login Interface.
+    QSharedPointer<IctsWlanLoginInterface> mIctService;
 
+    //! Current WLAN scan mode.
+    ScanMode mScanMode;
+    
     //! List of available WLAN APs according to the latest scan.
     QList< QSharedPointer<WlanQtUtilsAp> > mWlanScanList;
 
--- a/wlanutilities/wlanqtutilities/base/inc/wlanqtutilsap.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/base/inc/wlanqtutilsap.h	Tue Jul 06 15:29:22 2010 +0300
@@ -56,50 +56,46 @@
         Remember to update traces/trace.properties file when modifying
         this enum (tracing is also the cause for fixing the enum values).
 
-        Scan Results:
+        ConfID's available for scan results:
         - ConfIdSsid
+        - ConfIdBssid
         - ConfIdSignalStrength
         - ConfIdConnectionMode
         - ConfIdSecurityMode
         - ConfIdWpaPskUse
         - ConfIdWpsSupported
 
-        IAP creation and updates:
-        Mandatory for all security modes:
+        ConfID's for IAP creation and updates, these are
+        mandatory for all security modes: 
         - ConfIdSsid
         - ConfIdConnectionMode
         - ConfIdSecurityMode
+        - ConfIdWepKey1     (Empty if not used) 
+        - ConfIdWepKey2     (Empty if not used)
+        - ConfIdWepKey3     (Empty if not used)
+        - ConfIdWepKey4     (Empty if not used)
+        - ConfIdWepDefaultIndex
+        - ConfIdWpaPskUse
+        - ConfIdWpaPsk      (Empty if not used)
         - ConfIdHidden
-
-        Open: No extra configurations. 
-        802.1x: No extra configurations.
-
-        WEP:
-        - ConfIdWepKey1
-        - ConfIdWepKey2
-        - ConfIdWepKey3
-        - ConfIdWepKey4
-        - ConfIdWepDefaultIndex
-
-        WPA/WPA2:
-        - ConfIdWpaPskUse
-        - ConfIdWpaPsk
     */
     enum ConfId {
         //! QString: WLAN Network Name (SSID)
         ConfIdSsid = 0,
+        //! QByteArray: Basic Service Set Identifier
+        ConfIdBssid = 1,
         //! int: signal strength in RSSI (dBm)
-        ConfIdSignalStrength = 1,
+        ConfIdSignalStrength = 2,
         //! int: (CMManagerShim::WlanNetMode)
-        ConfIdConnectionMode = 2,
+        ConfIdConnectionMode = 3,
         //! int: (CMManagerShim::WlanSecMode)
-        ConfIdSecurityMode = 3,
+        ConfIdSecurityMode = 4,
         //! bool: true - WPA PSK, false - WPA EAP
-        ConfIdWpaPskUse = 4,
+        ConfIdWpaPskUse = 5,
         //! QString: Pre-Shared Key for WPA
         //! Length: 8-63 - Ascii key
         //! Length: 64 - Hex key
-        ConfIdWpaPsk = 5,
+        ConfIdWpaPsk = 6,
         //! QString: WEP Key for index 1:
         //! HEX: 
         //! - 64 bit: allowed key length = 10
@@ -108,20 +104,35 @@
         //! ASCII:
         //! - 64 bit: allowed key length = 5   
         //! - 128 bit: allowed key length = 13
-        ConfIdWepKey1 = 6,
+        ConfIdWepKey1 = 7,
         //! QString: WEP Key for index 2
-        ConfIdWepKey2 = 7,
+        ConfIdWepKey2 = 8,
         //! QString: WEP Key for index 3
-        ConfIdWepKey3 = 8,
+        ConfIdWepKey3 = 9,
         //! QString: WEP Key for index 4
-        ConfIdWepKey4 = 9,
+        ConfIdWepKey4 = 10,
         //! int: (CMManagerShim::WlanWepKeyIndex): Default WEP Key index
-        ConfIdWepDefaultIndex = 10,
-        //! bool: Is WLAN Hidden: true - hidden, false - not hidden.
-        ConfIdHidden = 11,
+        ConfIdWepDefaultIndex = 11,
+        //! bool: Is WLAN hidden (CMManager::ECmHidden).
+        ConfIdHidden = 12,
         //! bool: true - Wifi Protected setup is supported, false - not
-        ConfIdWpsSupported = 12
+        ConfIdWpsSupported = 13
     };
+
+    /*!
+        Function pointer type for string comparison operation customization.
+        Used for AP comparison in \a compare.
+        
+        @param [in] string1 String #1 to compare.
+        @param [in] string2 String #2 to compare.
+
+        @return Zero (0), if strings are considered to be same,
+                Positive (>0) if string1 is considered to be "greater than" string2. 
+                Negative (<0) if string1 is considered to be "less than" string2. 
+    */
+    typedef int (*StringComparator)( 
+        const QString &string1,
+        const QString &string2);
     
     WlanQtUtilsAp();
 
@@ -133,9 +144,10 @@
     
     void setValue(int identifier, QVariant value);
     
-    static bool compare(
+    static int compare(
         const WlanQtUtilsAp *ap1,
-        const WlanQtUtilsAp *ap2);
+        const WlanQtUtilsAp *ap2,
+        StringComparator comparator = 0);
     
 signals:
 
--- a/wlanutilities/wlanqtutilities/base/inc/wlanqtutilsiap.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/base/inc/wlanqtutilsiap.h	Tue Jul 06 15:29:22 2010 +0300
@@ -64,6 +64,7 @@
         - ConfIdNetworkId
         - WlanQtUtilsAp::ConfIdSsid
         - WlanQtUtilsAp::ConfIdSignalStrength
+        - WlanQtUtilsAp::ConfIdConnectionMode
         - WlanQtUtilsAp::ConfIdSecurityMode
         - WlanQtUtilsAp::ConfIdWpaPskUse
      */
--- a/wlanutilities/wlanqtutilities/base/inc/wlanqtutilsiapsettings.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/base/inc/wlanqtutilsiapsettings.h	Tue Jul 06 15:29:22 2010 +0300
@@ -23,6 +23,7 @@
 #include <QObject>
 #include <QList>
 #include <QSharedPointer>
+#include <cmmanagerdefines_shim.h>
 
 // User includes
 
@@ -53,7 +54,7 @@
 
     void fetchIaps(QList< QSharedPointer<WlanQtUtilsIap> > &iapList) const;
 
-    QSharedPointer<WlanQtUtilsIap> fetchIap(int iapId) const;
+    QSharedPointer<WlanQtUtilsIap> fetchIap(uint iapId) const;
     
     int createIap(const WlanQtUtilsAp *wlanAp);
     
@@ -62,6 +63,8 @@
     void deleteIap(int iapId);
 
     void moveIapToInternetSnap(int iapId);
+
+    void setAsHotspotIap(int iapId);
     
 signals:
 
@@ -84,6 +87,15 @@
         int index,
         CmConnectionMethodShim *iap);
 
+    CMManagerShim::ConnectionMethodAttribute mapWepKeyIndexHex(int index);
+
+    CMManagerShim::ConnectionMethodAttribute mapWepKeyIndexAscii(int index);
+    
+    void traceIap(
+        const WlanQtUtilsAp *ap,
+        int traceType,
+        uint iapId) const;
+
 private slots:
 
 private: // data
--- a/wlanutilities/wlanqtutilities/base/src/wlanqtutils.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/base/src/wlanqtutils.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -59,7 +59,11 @@
 
 /*!
     Function for requesting a single WLAN scan to be triggered.
-    Signal wlanScanReady() is emitted when new scan results are available.
+    
+    Signal wlanScanReady(int) is emitted when new scan results are available.
+    
+    NOTE: Requesting a new scan while there is an ongoing scan (for this
+    WlanQtUtils instance) is not allowed.
 */
 
 void WlanQtUtils::scanWlans()
@@ -69,7 +73,11 @@
 
 /*!
     Function for requesting a WLAN AP scan to be triggered.
+    
     Signal availableWlanAps() is emitted when new scan results are available.
+    
+    NOTE: Requesting a new scan while there is an ongoing scan (for this
+    WlanQtUtils instance) is not allowed.
 */
 
 void WlanQtUtils::scanWlanAps()
@@ -80,8 +88,11 @@
 /*!
     Function for requesting a direct WLAN scan with given SSID.
 
-    Signal wlanScanDirectReady() is emitted when new scan results are
+    Signal wlanScanDirectReady(int) is emitted when new scan results are
     available.
+    
+    NOTE: Requesting a new scan while there is an ongoing scan (for this
+    WlanQtUtils instance) is not allowed.
 
     @param [in] ssid Network name to be found
 */
@@ -92,8 +103,10 @@
 }
 
 /*!
-    Function for stopping a (possibly) ongoing WLAN scan. No scan result
-    signal will be sent before a new scan request is made.
+    Function for stopping a (possibly) ongoing WLAN scan.
+    This function can also be called when there is no scan in progres.
+    If a scan is actually cancelled, the corresponding scan result signal
+    is sent with ScanStatusCancelled status.
 */
 
 void WlanQtUtils::stopWlanScan()
@@ -103,7 +116,7 @@
 
 /*!
     Function to request details of available WLAN networks. Can be called 
-    at any time. Calling right after wlanScanReady() signal ensures you get
+    at any time. Calling right after wlanScanReady(int) signal ensures you get
     the most recent results.
 
     @param [out] wlanIapList List of available WLAN IAPs.
@@ -120,8 +133,8 @@
 /*!
     Function to request details of available WLAN networks. This function is
     used to get the results that are informed by following signals:
-    -wlanScanApReady()
-    -wlanScanDirectReady()
+    -wlanScanApReady(int)
+    -wlanScanDirectReady(int)
 
     @param [out] wlanApList List of unknown WLAN APs.
 */
--- a/wlanutilities/wlanqtutilities/base/src/wlanqtutils_p.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/base/src/wlanqtutils_p.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -27,7 +27,7 @@
 #include "wlanqtutilsiapsettings.h"
 #include "wlanqtutilsconmonwrapper.h"
 #include "wlanqtutilsesockwrapper.h"
-#include "wlanqtutilsconntestwrapper.h"
+#include "wlanqtutilsscan.h"
 
 #include "wlanqtutils.h"
 #include "wlanqtutils_p.h"
@@ -63,8 +63,10 @@
     q_ptr(q_ptr),
     mSettings(new WlanQtUtilsIapSettings(this)),
     mConMonWrapper(new WlanQtUtilsConMonWrapper(this)),
+    mScanWrapper(new WlanQtUtilsScan(this)),
     mEsockWrapper(new WlanQtUtilsEsockWrapper(this)),
-    mConnTestWrapper(new ConnTestWrapper(this)),
+    mIctService(),
+    mScanMode(ScanModeNone),
     mWlanScanList(),
     mToBeTestedIapId(WlanQtUtils::IapIdNone), 
     mConnectingIapId(WlanQtUtils::IapIdNone),
@@ -74,12 +76,17 @@
 
     // Make all connections.
     bool connectStatus = connect(
-        mConMonWrapper, 
-        SIGNAL(availableWlanApsFromWrapper(
-            QList< QSharedPointer<WlanQtUtilsAp> >&)), 
+        mScanWrapper, 
+        SIGNAL(availableWlanAps(QList< QSharedPointer<WlanQtUtilsAp> >&)), 
         this, 
-        SLOT(updateAvailableWlanAps(
-            QList< QSharedPointer<WlanQtUtilsAp> >&)));
+        SLOT(updateAvailableWlanAps(QList< QSharedPointer<WlanQtUtilsAp> >&)));
+    Q_ASSERT(connectStatus);
+    
+    connectStatus = connect(
+        mScanWrapper,
+        SIGNAL(scanFailed(int)),
+        this,
+        SLOT(reportScanResult(int)));
     Q_ASSERT(connectStatus);
 
     connectStatus = connect(
@@ -90,13 +97,6 @@
     Q_ASSERT(connectStatus);
 
     connectStatus = connect(
-        mConnTestWrapper, 
-        SIGNAL(connectivityTestResult(bool)), 
-        this,
-        SLOT(updateConnectivityTestResult(bool)));
-    Q_ASSERT(connectStatus);
-
-    connectStatus = connect(
         mConMonWrapper, 
         SIGNAL(connCreatedEventFromWrapper(uint)), 
         this,
@@ -142,8 +142,12 @@
 {
     OstTraceFunctionEntry1(WLANQTUTILSPRIVATE_SCANWLANS_ENTRY, this);
 
-    // Just forward the request to wrapper, which triggers a single WLAN scan
-    mConMonWrapper->scanAvailableWlanAPs();
+    // Scanning while there is an ongoing scan is not supported
+    Q_ASSERT(mScanMode == ScanModeNone);
+    
+    // Just forward the request to wrapper, which triggers a broadcast WLAN scan
+    mScanMode = ScanModeAvailableWlans;
+    mScanWrapper->scanWlanAps();
 
     OstTraceFunctionExit1(WLANQTUTILSPRIVATE_SCANWLANS_EXIT, this);
 }
@@ -156,8 +160,12 @@
 {
     OstTraceFunctionEntry1(WLANQTUTILSPRIVATE_SCANWLANAPS_ENTRY, this);
     
-    emit q_ptr->wlanScanApReady();
-    // TODO: implement me (wizard requires this)
+    // Scanning while there is an ongoing scan is not supported
+    Q_ASSERT(mScanMode == ScanModeNone);
+    
+    // Just forward the request to wrapper, which triggers a broadcast WLAN scan
+    mScanMode = ScanModeAvailableWlanAps;
+    mScanWrapper->scanWlanAps();
 
     OstTraceFunctionExit1(WLANQTUTILSPRIVATE_SCANWLANAPS_EXIT, this);
 }
@@ -169,11 +177,13 @@
 void WlanQtUtilsPrivate::scanWlanDirect(const QString &ssid)
 {
     OstTraceFunctionEntry1(WLANQTUTILSPRIVATE_SCANWLANDIRECT_ENTRY, this);
-    
-    Q_UNUSED(ssid);
+
+    // Scanning while there is an ongoing scan is not supported
+    Q_ASSERT(mScanMode == ScanModeNone);
     
-    emit q_ptr->wlanScanDirectReady();
-    // TODO: implement me (wizard requires this)
+    // Just forward the request to wrapper, which triggers a direct WLAN scan
+    mScanMode = ScanModeDirect;
+    mScanWrapper->scanWlanDirect(ssid);
     
     OstTraceFunctionExit1(WLANQTUTILSPRIVATE_SCANWLANDIRECT_EXIT, this);
 }
@@ -186,7 +196,14 @@
 {
     OstTraceFunctionEntry1(WLANQTUTILSPRIVATE_STOPWLANSCAN_ENTRY, this);
     
-    mConMonWrapper->stopScan();
+    if (mScanMode != ScanModeNone) {
+        // Inform that scan was cancelled
+        reportScanResult(WlanQtUtils::ScanStatusCancelled);
+        
+        // Stop the scan
+        mScanMode = ScanModeNone;
+        mScanWrapper->stopScan();
+    }
     
     OstTraceFunctionExit1(WLANQTUTILSPRIVATE_STOPWLANSCAN_EXIT, this);
 }
@@ -205,13 +222,13 @@
     wlanApList.clear();
 
     // Read the list of configured IAPs
-    QList<QSharedPointer<WlanQtUtilsIap> > configuredIapList;
+    QList< QSharedPointer<WlanQtUtilsIap> > configuredIapList;
     mSettings->fetchIaps(configuredIapList);
 
     // Match IAPs against WLAN scan results
     foreach (QSharedPointer<WlanQtUtilsIap> iap, configuredIapList) {
         foreach (QSharedPointer<WlanQtUtilsAp> scanAp, mWlanScanList) {
-            if (WlanQtUtilsAp::compare(iap.data(), scanAp.data()) == true) {
+            if (WlanQtUtilsAp::compare(iap.data(), scanAp.data()) == 0) {
                 // IAP found, add it to caller's list of known IAPs
                 // (signal strength needs to be updated manually since
                 // the IAP in our list does not have that information yet)
@@ -249,8 +266,8 @@
 {
     OstTraceFunctionEntry1(WLANQTUTILSPRIVATE_AVAILABLEWLANAPS_ENTRY, this);
     
-    Q_UNUSED(wlanApList);
-    // TODO: implement me (wizard requires this)
+    // Just copy the results
+    wlanApList = mWlanScanList;
     
     OstTraceFunctionExit1(WLANQTUTILSPRIVATE_AVAILABLEWLANAPS_EXIT, this);
 }
@@ -341,7 +358,8 @@
     OstTrace1(
         TRACE_BORDER,
         WLANQTUTILSPRIVATE_DISCONNECTIAP,
-        "WlanQtUtilsPrivate::disconnectIap;IAP ID=%d", iapId );
+        "WlanQtUtilsPrivate::disconnectIap;IAP ID=%d",
+        iapId);
 
     if (iapId != WlanQtUtils::IapIdNone) {
         // Close our RConnection handle, if needed. Wrapper ignores call, if
@@ -437,7 +455,7 @@
     bool match = false;     // Return value
     
     foreach (QSharedPointer<WlanQtUtilsIap> iap, list) {
-        if (WlanQtUtilsAp::compare(iap.data(), ap) == true) {
+        if (WlanQtUtilsAp::compare(iap.data(), ap) == 0) {
             // Match found
             match = true;
             break;
@@ -468,7 +486,7 @@
         OstTraceExt3(
             TRACE_NORMAL,
             WLANQTUTILSPRIVATE_TRACEAVAILABLEWLANAPS_IAP,
-            "WlanQtUtilsPrivate::traceAvailableWlanAps IAP;name=%S;iap->securityMode()=%d;iap->signalStrength()=%d",
+            "WlanQtUtilsPrivate::traceAvailableWlanAps IAP;name=%S;secMode=%{WlanSecMode};signalStrength=%d",
             name,
             iap->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(),
             iap->value(WlanQtUtilsAp::ConfIdSignalStrength).toInt());
@@ -479,10 +497,10 @@
         OstTraceExt3(
             TRACE_NORMAL,
             WLANQTUTILSPRIVATE_TRACEAVAILABLEWLANAPS_AP,
-            "WlanQtUtilsPrivate::traceAvailableWlanAps AP;ssid=%S;ap->securityMode()=%d;ap->signalStrength()=%d",
+            "WlanQtUtilsPrivate::traceAvailableWlanAps AP;ssid=%S;secMode=%{WlanSecMode};signalStrength=%d",
             ssid,
             ap->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(),
-            ap->value(WlanQtUtilsAp::ConfIdSignalStrength).toInt() );
+            ap->value(WlanQtUtilsAp::ConfIdSignalStrength).toInt());
     }
 #endif
 }
@@ -495,7 +513,7 @@
 */
 
 void WlanQtUtilsPrivate::updateAvailableWlanAps(
-    QList<QSharedPointer<WlanQtUtilsAp> > &availableWlanList)
+    QList< QSharedPointer<WlanQtUtilsAp> > &availableWlanList)
 {
     OstTraceFunctionEntry1(WLANQTUTILSPRIVATE_UPDATEAVAILABLEWLANAPS_ENTRY, this);
 
@@ -507,7 +525,7 @@
         for (int j = 0; j < mWlanScanList.count(); j++) {
             if (WlanQtUtilsAp::compare(
                 availableWlanList[i].data(),
-                mWlanScanList[j].data()) == true) {
+                mWlanScanList[j].data()) == 0) {
                 duplicate = true;
                 break;
             }
@@ -517,17 +535,61 @@
         }
     }
 
-    // The information is forwarded to the UI
-    OstTrace0(
-        TRACE_BORDER,
-        WLANQTUTILSPRIVATE_WLANSCANREADY,
-        "WlanQtUtilsPrivate::emit wlanScanReady");
-    emit q_ptr->wlanScanReady();
+    // The information is forwarded to the client
+    reportScanResult(WlanQtUtils::ScanStatusOk);
+    
+    // Scan is complete
+    mScanMode = ScanModeNone;
     
     OstTraceFunctionExit1(WLANQTUTILSPRIVATE_UPDATEAVAILABLEWLANAPS_EXIT, this);
 }
 
 /*!
+    Scan result handler. Reports the scanning result to the client.
+        
+    @param [in] status Scan status code (WlanQtUtils::ScanStatus).
+*/
+
+void WlanQtUtilsPrivate::reportScanResult(int status)
+{
+    switch (mScanMode) {
+    case ScanModeAvailableWlans:
+        OstTrace1(
+            TRACE_BORDER,
+            WLANQTUTILSPRIVATE_WLANSCANREADY,
+            "WlanQtUtilsPrivate::reportScanResult emit wlanScanReady;status=%{ScanStatus};",
+            status);
+        emit q_ptr->wlanScanReady(status);
+        break;
+
+    case ScanModeAvailableWlanAps:
+        OstTrace1(
+            TRACE_BORDER,
+            WLANQTUTILSPRIVATE_WLANSCANAPREADY,
+            "WlanQtUtilsPrivate::reportScanResult emit wlanScanApReady;status=%{ScanStatus};",
+            status);
+        emit q_ptr->wlanScanApReady(status);
+        break;
+
+    case ScanModeDirect:
+        OstTrace1(
+            TRACE_BORDER,
+            WLANQTUTILSPRIVATE_WLANSCANDIRECTREADY,
+            "WlanQtUtilsPrivate::reportScanResult emit wlanScanDirectReady;status=%{ScanStatus};",
+            status);
+        emit q_ptr->wlanScanDirectReady(status);
+        break;
+
+#ifndef QT_NO_DEBUG
+    default:
+        // Invalid scan mode detected
+        Q_ASSERT(0);
+        break;
+#endif        
+    }
+}
+
+/*!
     Slot for handling connection setup status event from wrapper.
 
     @param [in] isOpened Was connection setup successful?
@@ -556,8 +618,7 @@
     } else {
         // Opening succeeded, update connection status and inform UI
         if (mConnection) {
-            mConnection->setConnectionStatus(
-                WlanQtUtils::ConnStatusConnected);
+            mConnection->setConnectionStatus(WlanQtUtils::ConnStatusConnected);
         }
         
         OstTrace1(
@@ -569,9 +630,30 @@
 
         // Start ICT, if needed
         if (mConnectingIapId == mToBeTestedIapId) {
-            QSharedPointer<WlanQtUtilsIap> iap = 
-                mSettings->fetchIap(mToBeTestedIapId);
-            mConnTestWrapper->startConnectivityTest(
+            QSharedPointer<WlanQtUtilsIap> iap(mSettings->fetchIap(mConnectingIapId));
+            
+            mIctService = QSharedPointer<IctsWlanLoginInterface>(
+                new IctsWlanLoginInterface(this));
+            
+            // IctsWlanLoginInterface instance is created for each connectivity test
+            // Note: Queued connection is required since mIctService is deleted
+            // when signal comes
+            bool connectStatus = connect(
+                mIctService.data(),
+                SIGNAL(ictsResult(int)),
+                this,
+                SLOT(updateIctResult(int)),
+                Qt::QueuedConnection); 
+            Q_ASSERT(connectStatus);            
+            connectStatus = connect(
+                mIctService.data(),
+                SIGNAL(hotspotCase()),
+                this,
+                SLOT(updateIctHotspotCase()),
+                Qt::QueuedConnection);
+            Q_ASSERT(connectStatus);
+            
+            mIctService->start(
                 mToBeTestedIapId,
                 iap->value(WlanQtUtilsIap::ConfIdNetworkId).toInt());
         }
@@ -583,36 +665,71 @@
 }
 
 /*!
-    Slot for handling connectivity test result event from wrapper. Tested
-    IAP is stored to Internet SNAP, if test was successful.
+    Slot for handling internet connectivity test result event from wrapper.
+    Tested IAP is stored to Internet SNAP, if test was successful. If the
+    IAP needs Hotspot authentication, it remains ungategorized.
 
-    @param [in] result Was the test successful?
+    @param [in] result Result of internet connectivity test and hotspot
+                       authentication (IctsWlanLoginInterface::ictsResultType).
 */
 
-void WlanQtUtilsPrivate::updateConnectivityTestResult(bool result)
+void WlanQtUtilsPrivate::updateIctResult(int ictsResult)
 {
-    OstTraceFunctionEntry1(WLANQTUTILSPRIVATE_UPDATECONNECTIVITYTESTRESULT_ENTRY, this);
+    OstTraceFunctionEntry1(WLANQTUTILSPRIVATE_UPDATEICTRESULT_ENTRY, this);
 
-    if (result == true) {
+    Q_ASSERT(mToBeTestedIapId != WlanQtUtils::IapIdNone);
+    WlanQtUtils::IctStatus result = WlanQtUtils::IctFailed;
+    
+    if (ictsResult == IctsWlanLoginInterface::IctsPassed) {
         // Move the tested IAP to Internet SNAP since the test passed
         Q_ASSERT(mToBeTestedIapId != WlanQtUtils::IapIdNone);
         mSettings->moveIapToInternetSnap(mToBeTestedIapId);
-    } // else: do nothing, IAP remains to be uncategorized
-
+        result = WlanQtUtils::IctPassed;
+    } else if (ictsResult == IctsWlanLoginInterface::IctsHotspotPassed) {
+        Q_ASSERT(mToBeTestedIapId != WlanQtUtils::IapIdNone);
+        result = WlanQtUtils::IctHotspotPassed;
+    } else if (ictsResult == IctsWlanLoginInterface::IctsCanceled) {
+        Q_ASSERT(mToBeTestedIapId != WlanQtUtils::IapIdNone);
+        result = WlanQtUtils::IctCancelled;
+    } else {
+        // ICTS failed - IAP remains to be uncategorized and mIctService is deleted.
+        mIctService.clear();
+    }
+    
     // Inform UI
     OstTraceExt2(
         TRACE_NORMAL,
         WLANQTUTILSPRIVATE_ICTRESULT,
-        "WlanQtUtilsPrivate::emit ictResult;result=%hhu;IAP ID=%d",
-        result,
-        mToBeTestedIapId);
+        "WlanQtUtilsPrivate::emit ictResult;iapId=%d;result=%{IctStatus}",
+        mToBeTestedIapId,
+        result);
 
     emit q_ptr->ictResult(mToBeTestedIapId, result);
 
     // This IAP is now tested
     mToBeTestedIapId = WlanQtUtils::IapIdNone;
 
-    OstTraceFunctionExit1(WLANQTUTILSPRIVATE_UPDATECONNECTIVITYTESTRESULT_EXIT, this);
+    OstTraceFunctionExit1(WLANQTUTILSPRIVATE_UPDATEICTRESULT_EXIT, this);
+}
+
+/*!
+    Slot for setting IAP to be tested as hotspot IAP.
+*/
+
+void WlanQtUtilsPrivate::updateIctHotspotCase()
+{
+    OstTraceFunctionEntry1(WLANQTUTILSPRIVATE_UPDATEICTHOTSPOTCASE_ENTRY, this);
+
+    mSettings->setAsHotspotIap(mToBeTestedIapId);
+  
+    Q_ASSERT(mToBeTestedIapId != WlanQtUtils::IapIdNone);
+    OstTrace1(
+        TRACE_BORDER,
+        WLANQTUTILSPRIVATE_UPDATEICTHOTSPOTCASE,
+        "WlanQtUtilsPrivate::updateIctHotspotCase set as hotspot IAP;iapId=%d",
+        mToBeTestedIapId);
+        
+    OstTraceFunctionExit1(WLANQTUTILSPRIVATE_UPDATEICTHOTSPOTCASE_EXIT, this);
 }
 
 /*!
@@ -668,7 +785,7 @@
             OstTraceExt2(
                 TRACE_BORDER,
                 DUP1_WLANQTUTILSPRIVATE_WLANNETWORKCLOSED,
-                "WlanQtUtilsPrivate::emit wlanNetworkClosed;IAP ID=%d;status=%d",
+                "WlanQtUtilsPrivate::emit wlanNetworkClosed;iapID=%d;status=%d",
                 closedIapId,
                 KErrNone);
             emit q_ptr->wlanNetworkClosed(closedIapId, KErrNone);
@@ -695,7 +812,7 @@
     OstTraceExt2(
         TRACE_BORDER,
         WLANQTUTILSPRIVATE_UPDATEACTIVECONNECTION,
-        "WlanQtUtilsPrivate::updateActiveConnection;connectionId=%u;connectionStatus=%u",
+        "WlanQtUtilsPrivate::updateActiveConnection;connectionId=%u;connectionStatus=%{ConnStatus}",
         connectionId,
         (uint)connectionStatus);
 
@@ -708,7 +825,7 @@
             OstTrace1(
                 TRACE_BORDER,
                 DUP1_WLANQTUTILSPRIVATE_WLANNETWORKOPENED,
-                "WlanQtUtilsPrivate::emit wlanNetworkOpened;IAP ID=%d",
+                "WlanQtUtilsPrivate::emit wlanNetworkOpened;iapId=%d",
                 mConnection->iapId());
             emit q_ptr->wlanNetworkOpened(mConnection->iapId());
         }
--- a/wlanutilities/wlanqtutilities/base/src/wlanqtutilsap.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/base/src/wlanqtutilsap.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -21,16 +21,12 @@
 #include <QHash>
 #include <QVariant>
 #include <QDebug>
+#include <cmmanagerdefines_shim.h>
 
 // User includes
 
 #include "wlanqtutilsap.h"
 
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "wlanqtutilsapTraces.h"
-#endif
-
 /*!
     \class WlanQtUtilsApPrivate
     \brief Private implementation of WlanQtUtilsAp.
@@ -99,23 +95,9 @@
 
 QVariant WlanQtUtilsAp::value(int identifier) const
 {
+    // The configuration must exist
     Q_ASSERT(d_ptr->mConfigurations.contains(identifier));
     Q_ASSERT(d_ptr->mConfigurations[identifier].isValid());
-    
-#ifdef OST_TRACE_COMPILER_IN_USE
-    QString tmp;
-    QDebug tmpStream(&tmp);
-    tmpStream << d_ptr->mConfigurations[identifier];
-    TPtrC16 string(tmp.utf16(), tmp.length());
-    
-    OstTraceExt2(
-        TRACE_DUMP,
-        WLANQTUTILSAP_VALUE,
-        "WlanQtUtilsAp::value;identifier=%{ConfId};string=%S",
-        (TUint)identifier,
-        string);
-#endif
-    
     return d_ptr->mConfigurations[identifier];
 }
 
@@ -128,48 +110,64 @@
 
 void WlanQtUtilsAp::setValue(int identifier, QVariant value)
 {
-#ifdef OST_TRACE_COMPILER_IN_USE
-    QString tmp;
-    QDebug tmpStream(&tmp);
-    tmpStream << value;
-    TPtrC16 string(tmp.utf16(), tmp.length());
-    
-    OstTraceExt2(
-        TRACE_DUMP,
-        WLANQTUTILSAP_SETVALUE,
-        "WlanQtUtilsAp::setValue;identifier=%{ConfId};string=%S",
-        (TUint)identifier,
-        string);
-#endif
-    
     d_ptr->mConfigurations[identifier] = value;
 }
 
 /*!
-    AP comparison function.
+    AP comparison function. Does AP comparison based on following configs:
+    -SSID.
+    -Security mode.
+    -WPA PSK usage.
+    -Connection mode.
 
     @param [in] ap1 First AP to compare.
     @param [in] ap2 Second AP to compare.
+    @param [in] comparator String comparator for SSID.
+                Default comparator is QString::compare() direct memory
+                comparison which does not take the localization into account.
 
-    @return TRUE, if APs are considered to be same.
+    @return Zero (0), if APs are considered to be same,
+            Negative (>0) if ap1 is considered to be "greater than" ap2. 
+            Negative (<0) if ap1 is considered to be "less than" ap2. 
 */
 
-bool WlanQtUtilsAp::compare(
+int WlanQtUtilsAp::compare(
     const WlanQtUtilsAp *ap1,
-    const WlanQtUtilsAp *ap2)
+    const WlanQtUtilsAp *ap2,
+    StringComparator comparator)
 {
-    bool equal = false;
-    
-    // SSID (case sensitive) and security mode (with or without PSK)
-    // are the values, which identify a unique access point.
-    if (ap1->value(WlanQtUtilsAp::ConfIdSsid) ==
-        ap2->value(WlanQtUtilsAp::ConfIdSsid)
-        && ap1->value(WlanQtUtilsAp::ConfIdSecurityMode) == 
-           ap2->value(WlanQtUtilsAp::ConfIdSecurityMode)
-           && ap1->value(WlanQtUtilsAp::ConfIdWpaPskUse) ==
-              ap2->value(WlanQtUtilsAp::ConfIdWpaPskUse)) {
-        equal = true;
+    int result = 0;
+
+    // Compare SSID
+    QString ssid1 = ap1->value(WlanQtUtilsAp::ConfIdSsid).toString();
+    QString ssid2 = ap2->value(WlanQtUtilsAp::ConfIdSsid).toString();
+    if (comparator != NULL) {
+        result = comparator(ssid1, ssid2);
+    } else {
+        result = QString::compare(ssid1, ssid2);
+    }
+
+    // Compare security mode
+    if (result == 0) {
+        result = ap1->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt();
+        result -= ap2->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt();
     }
-    
-    return equal;
+
+    // Compare WPA PSK usage
+    int secMode = ap1->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(); 
+    if (result == 0 &&
+        (secMode == CMManagerShim::WlanSecModeWpa ||
+         secMode == CMManagerShim::WlanSecModeWpa2)) {
+        // WPA PSK value is boolean, but it can be converted to integer
+        result = ap1->value(WlanQtUtilsAp::ConfIdWpaPskUse).toInt();
+        result -= ap2->value(WlanQtUtilsAp::ConfIdWpaPskUse).toInt();
+    }
+
+    // Compare connection mode
+    if (result == 0) {
+        result = ap1->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt();
+        result -= ap2->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt();
+    }
+
+    return result;
 }
--- a/wlanutilities/wlanqtutilities/base/src/wlanqtutilsiapsettings.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/base/src/wlanqtutilsiapsettings.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -52,6 +52,11 @@
 
 // Local constants
 
+//! IAP trace types
+#define WLANQTUTILS_IAP_TRACE_FETCH     1
+#define WLANQTUTILS_IAP_TRACE_CREATE    2
+#define WLANQTUTILS_IAP_TRACE_UPDATE    3
+
 // WEP key lengths used to determine key format
 static const int WepHex64BitMaxLength = 10;
 static const int WepHex128BitMaxLength = 26;
@@ -115,7 +120,16 @@
             error);
     }
 
-    foreach (int iapId, iapIds) {
+#ifdef OST_TRACE_COMPILER_IN_USE
+    int iapCount = iapIds.count();
+    OstTrace1(
+        TRACE_NORMAL,
+        WLANQTUTILSIAPSETTINGS_FETCHIAPS_COUNT,
+        "WlanQtUtilsIapSettings::fetchIaps;iapCount=%d",
+        iapCount);
+#endif
+
+    foreach (uint iapId, iapIds) {
         QSharedPointer<WlanQtUtilsIap> wlanIap = fetchIap(iapId);
         if (wlanIap) {
             iapList.append(wlanIap);
@@ -133,16 +147,10 @@
     @return Found IAP, NULL if not found.
 */
 
-QSharedPointer<WlanQtUtilsIap> WlanQtUtilsIapSettings::fetchIap(int iapId) const
+QSharedPointer<WlanQtUtilsIap> WlanQtUtilsIapSettings::fetchIap(uint iapId) const
 {
     OstTraceFunctionEntry0(WLANQTUTILSIAPSETTINGS_FETCHIAP_ENTRY);
-    
-    OstTrace1(
-        TRACE_NORMAL,
-        WLANQTUTILSIAPSETTINGS_FETCHIAP,
-        "WlanQtUtilsIapSettings::fetchIap;iapId=%d",
-        iapId);
-    
+
     QSharedPointer<WlanQtUtilsIap> wlanIap;
     try {
         QScopedPointer<CmConnectionMethodShim> iap(
@@ -154,6 +162,7 @@
             int netId = iap->getIntAttribute(CMManagerShim::CmNetworkId);
             QString name = iap->getStringAttribute(CMManagerShim::CmName);
             QString ssid = iap->getStringAttribute(CMManagerShim::WlanSSID);
+            int connMode = iap->getIntAttribute(CMManagerShim::WlanConnectionMode);
             int secMode = iap->getIntAttribute(
                 CMManagerShim::WlanSecurityMode);
             bool wpaPskUse = iap->getBoolAttribute(
@@ -165,8 +174,15 @@
             wlanIap->setValue(WlanQtUtilsIap::ConfIdNetworkId, netId);
             wlanIap->setValue(WlanQtUtilsIap::ConfIdName, name);
             wlanIap->setValue(WlanQtUtilsAp::ConfIdSsid, ssid);
+            wlanIap->setValue(WlanQtUtilsAp::ConfIdConnectionMode, connMode);
             wlanIap->setValue(WlanQtUtilsAp::ConfIdSecurityMode, secMode);
             wlanIap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, wpaPskUse);
+            
+            // Trace the fetched IAP
+            traceIap(
+                wlanIap.data(),
+                WLANQTUTILS_IAP_TRACE_FETCH,
+                iapId);
         }
     } catch (const std::exception &ex) {
         int error = qt_symbian_exception2Error(ex);
@@ -201,6 +217,12 @@
             mCmManager->createConnectionMethod(KUidWlanBearerType));
         storeSettings(wlanAp, iap.data());
         iapId = iap->getIntAttribute(CMManagerShim::CmIapId);
+        
+        // Trace the created IAP
+        traceIap(
+            wlanAp,
+            WLANQTUTILS_IAP_TRACE_CREATE,
+            iapId);
     } catch (const std::exception &ex) {
         // Trace error cause and return failure (default value) to caller.
         int error = qt_symbian_exception2Error(ex);
@@ -238,6 +260,11 @@
         QScopedPointer<CmConnectionMethodShim> iap(
             mCmManager->connectionMethod(iapId));
         storeSettings(wlanAp, iap.data());
+        // Trace the updated IAP
+        traceIap(
+            wlanAp,
+            WLANQTUTILS_IAP_TRACE_UPDATE,
+            iapId);
         success = true;
     } catch (const std::exception &ex) {
         // Trace error cause and return failure (default value) to caller.
@@ -325,6 +352,36 @@
 }
 
 /*!
+    Set Hotspot metadata to the Hotspot IAP given as parameter.
+    
+    @param [in] iapId ID of IAP to set.
+*/
+
+void WlanQtUtilsIapSettings::setAsHotspotIap(int iapId)
+{
+    OstTraceFunctionEntry0(WLANQTUTILSIAPSETTINGS_SETASHOTSPOTIAP_ENTRY);
+        
+    try {
+        QScopedPointer<CmConnectionMethodShim> iap(
+            mCmManager->connectionMethod(iapId));
+        iap->setBoolAttribute(CMManagerShim::CmMetaHotSpot, true);
+        iap->update();
+    } catch (const std::exception &ex) {
+        // Just trace error cause. It is not fatal, if we are not able to
+        // set IAP as hotspot IAP. No need to retry, since errors should be very
+        // rare and it does not prevent connection opening of the hotspot IAP.
+        int error = qt_symbian_exception2Error(ex);
+        OstTrace1(
+            TRACE_NORMAL,
+            WLANQTUTILSIAPSETTINGS_SETASHOTSPOTIAP_EXCEPTION,
+            "WlanQtUtilsIapSettings::setAsHotspotIap exception;error=%d",
+            error);
+    }
+                 
+    OstTraceFunctionExit0(WLANQTUTILSIAPSETTINGS_SETASHOTSPOTIAP_EXIT);
+}
+
+/*!
     Stores the given Wlan AP settings to database using CM Manager Shim.
    
     @param [in] wlanAp WLAN AP settings to store.
@@ -336,66 +393,57 @@
     CmConnectionMethodShim *iap)
 {
     OstTraceFunctionEntry0(WLANQTUTILSIAPSETTINGS_STORESETTINGS_ENTRY);
-    
+
     int secMode = wlanAp->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt();
     QString ssid = wlanAp->value(WlanQtUtilsAp::ConfIdSsid).toString();
-    
-    // Store general values
+
+    // Store general settings
     iap->setStringAttribute(CMManagerShim::CmName, ssid);
     iap->setStringAttribute(CMManagerShim::WlanSSID, ssid);
     iap->setIntAttribute(CMManagerShim::WlanSecurityMode, secMode);
     iap->setIntAttribute(
         CMManagerShim::WlanConnectionMode, 
         wlanAp->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt());
-    
-    switch (secMode) {
-    case CMManagerShim::WlanSecModeWep:
-        // Store the 4 WEP keys (function does nothing, if a key is not set)
-        storeWepKey(
-            wlanAp->value(WlanQtUtilsAp::ConfIdWepKey1).toString(),
-            1,
-            iap);
-        storeWepKey(
-            wlanAp->value(WlanQtUtilsAp::ConfIdWepKey2).toString(),
-            2,
-            iap);
-        storeWepKey(
-            wlanAp->value(WlanQtUtilsAp::ConfIdWepKey3).toString(),
-            3,
-            iap);
-        storeWepKey(
-            wlanAp->value(WlanQtUtilsAp::ConfIdWepKey4).toString(),
-            4,
-            iap);
-        
-        iap->setIntAttribute(
-            CMManagerShim::WlanWepKeyIndex,
-            wlanAp->value(WlanQtUtilsAp::ConfIdWepDefaultIndex).toInt());
-        break;
 
-    case CMManagerShim::WlanSecModeWpa:
-    case CMManagerShim::WlanSecModeWpa2:
-        // Store WPA PSK values
-        bool usePsk = wlanAp->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool();
-        iap->setBoolAttribute(CMManagerShim::WlanEnableWpaPsk, usePsk);
-        if (usePsk) {
-            QString wpaKey(wlanAp->value(WlanQtUtilsAp::ConfIdWpaPsk ).toString());
-            iap->setString8Attribute(CMManagerShim::WlanWpaPreSharedKey, wpaKey);
-        }
-        break;
-    }
-    
+    // Store the WEP settings
+    storeWepKey(
+        wlanAp->value(WlanQtUtilsAp::ConfIdWepKey1).toString(),
+        1,
+        iap);
+    storeWepKey(
+        wlanAp->value(WlanQtUtilsAp::ConfIdWepKey2).toString(),
+        2,
+        iap);
+    storeWepKey(
+        wlanAp->value(WlanQtUtilsAp::ConfIdWepKey3).toString(),
+        3,
+        iap);
+    storeWepKey(
+        wlanAp->value(WlanQtUtilsAp::ConfIdWepKey4).toString(),
+        4,
+        iap);
+    iap->setIntAttribute(
+        CMManagerShim::WlanWepKeyIndex,
+        wlanAp->value(WlanQtUtilsAp::ConfIdWepDefaultIndex).toInt());
+
+    // Store WPA PSK settings
+    bool usePsk = wlanAp->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool();
+    iap->setBoolAttribute(CMManagerShim::WlanEnableWpaPsk, usePsk);
+    QString wpaKey(wlanAp->value(WlanQtUtilsAp::ConfIdWpaPsk).toString());
+    iap->setString8Attribute(CMManagerShim::WlanWpaPreSharedKey, wpaKey);
+
+    // Write the settings.
     iap->update();
 
     OstTraceFunctionExit0(WLANQTUTILSIAPSETTINGS_STORESETTINGS_EXIT);
 }
 
 /*!
-    Stores the given valid WEP key to database using CM Manager Shim. Ignores
-    keys with zero length.
+    Stores the given valid WEP key to database using CM Manager Shim. If key
+    is not used an empty key must be provided.
   
-    @note This method MUST not be called for invalid WEP Keys. Wlanwizard
-          validates keys, before accepting user input.
+    @note This method MUST not be called for invalid WEP Keys and/or indexes.
+          Wlanwizard validates keys, before accepting user input.
           
     @param [in] key Key to write.
     @param [in] index Key index. Valid range is [0,4].
@@ -409,69 +457,171 @@
 {
     OstTraceFunctionEntry0(WLANQTUTILSIAPSETTINGS_STOREWEPKEY_ENTRY);
     
-    // Default value is set just to silence compiler, Q_ASSERTs take care
-    // that valid attribute is set below
-    CMManagerShim::ConnectionMethodAttribute attribute = 
-        CMManagerShim::WlanWepKey1InHex;
-    
     int length = key.length();
     if (length == WepHex64BitMaxLength || length == WepHex128BitMaxLength) {
         // HEX
-        switch (index) {
-        case 1:
-            attribute = CMManagerShim::WlanWepKey1InHex;
-            break;
-            
-        case 2:
-            attribute = CMManagerShim::WlanWepKey2InHex;
-            break;
-            
-        case 3:
-            attribute = CMManagerShim::WlanWepKey3InHex;
-            break;
-            
-        case 4:
-            attribute = CMManagerShim::WlanWepKey4InHex;
-            break;
-            
-#ifndef QT_NO_DEBUG
-        default:
-            // Invalid key index detected
-            Q_ASSERT(0);
-            break;
-#endif            
-        }
+        iap->setString8Attribute(mapWepKeyIndexHex(index), key);
     } else if (length == WepAscii64BitMaxLength || length == WepAscii128BitMaxLength) {
         // ASCII
-        switch (index) {
-        case 1:
-            attribute = CMManagerShim::WlanWepKey1InAscii;
-            break;
-            
-        case 2:
-            attribute = CMManagerShim::WlanWepKey2InAscii;
-            break;
-            
-        case 3:
-            attribute = CMManagerShim::WlanWepKey3InAscii;
-            break;
-
-        case 4:
-            attribute = CMManagerShim::WlanWepKey4InAscii;
-            break;
-            
-#ifndef QT_NO_DEBUG
-        default:
-            // Invalid key index detected
-            Q_ASSERT(0);
-            break;
-#endif            
-        }
+        iap->setString8Attribute(mapWepKeyIndexAscii(index), key);
+    } else {
+        // Length must always be a valid one or zero
+        Q_ASSERT(length == 0);
+        
+        // Write default value. Note that the key is stored in the same data
+        // field regardless of the format so writing only one key is enough.
+        iap->setString8Attribute(mapWepKeyIndexHex(index), key);
     }
-    
-    if (length > 0) {
-        iap->setString8Attribute(attribute, key);
-    } // else: key is not set, ignore
 
     OstTraceFunctionExit0(WLANQTUTILSIAPSETTINGS_STOREWEPKEY_EXIT);
 }
+
+/*!
+    Maps given Hex WEP key index into the corresponding CM Manager Connection
+    Method attribute.
+    
+    @param [in] index Hex WEP key index [1,4].
+    
+    @return Connection Method attribute. 
+*/
+
+CMManagerShim::ConnectionMethodAttribute WlanQtUtilsIapSettings::mapWepKeyIndexHex(
+    int index)
+{
+    CMManagerShim::ConnectionMethodAttribute attribute = 
+        CMManagerShim::WlanWepKey1InHex;
+    
+    switch (index) {
+    case 1:
+        attribute = CMManagerShim::WlanWepKey1InHex;
+        break;
+        
+    case 2:
+        attribute = CMManagerShim::WlanWepKey2InHex;
+        break;
+        
+    case 3:
+        attribute = CMManagerShim::WlanWepKey3InHex;
+        break;
+        
+    case 4:
+        attribute = CMManagerShim::WlanWepKey4InHex;
+        break;
+        
+#ifndef QT_NO_DEBUG
+    default:
+        // Invalid key index detected
+        Q_ASSERT(0);
+        break;
+#endif
+    }
+
+    return attribute;
+}
+
+/*!
+    Maps given Ascii WEP key index into the corresponding CM Manager Connection
+    Method attribute.
+    
+    @param [in] index Ascii WEP key index [1,4].
+    
+    @return Connection Method attribute. 
+*/
+
+CMManagerShim::ConnectionMethodAttribute WlanQtUtilsIapSettings::mapWepKeyIndexAscii(
+    int index)
+{
+    CMManagerShim::ConnectionMethodAttribute attribute = 
+        CMManagerShim::WlanWepKey1InAscii;
+
+    switch (index) {
+    case 1:
+        attribute = CMManagerShim::WlanWepKey1InAscii;
+        break;
+        
+    case 2:
+        attribute = CMManagerShim::WlanWepKey2InAscii;
+        break;
+        
+    case 3:
+        attribute = CMManagerShim::WlanWepKey3InAscii;
+        break;
+
+    case 4:
+        attribute = CMManagerShim::WlanWepKey4InAscii;
+        break;
+        
+#ifndef QT_NO_DEBUG
+    default:
+        // Invalid key index detected
+        Q_ASSERT(0);
+        break;
+#endif            
+    }
+
+    return attribute;
+}
+
+/*
+    Traces given IAP (which is taken in as an AP).
+
+    @param [in] ap IAP to trace.
+    @param [in] traceType Trace type (WLANQTUTILS_IAP_TRACE_*).
+    @param [in] iapId IAP ID.
+*/
+
+void WlanQtUtilsIapSettings::traceIap(
+    const WlanQtUtilsAp *ap,
+    int traceType,
+    uint iapId) const
+{
+#ifndef OST_TRACE_COMPILER_IN_USE
+    Q_UNUSED(ap);
+    Q_UNUSED(traceType);
+    Q_UNUSED(iapId);
+#else    
+    QString ssid_string(ap->value(WlanQtUtilsAp::ConfIdSsid).toString());
+    TPtrC16 ssid(ssid_string.utf16(), ssid_string.length());
+    int secMode = ap->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt();
+    int connMode = ap->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt();    
+    bool useWpaPsk = ap->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool();
+    
+    switch (traceType) {
+    case WLANQTUTILS_IAP_TRACE_FETCH:
+        OstTraceExt5(
+            TRACE_NORMAL,
+            WLANQTUTILSIAPSETTINGS_TRACEIAP_FETCH,
+            "WlanQtUtilsIapSettings::traceIap Fetched;iapId=%u;ssid=%S;secMode=%{WlanSecMode};useWpaPsk=%u;connMode=%{WlanConnMode}",
+            iapId,
+            ssid,
+            secMode,
+            useWpaPsk,
+            connMode);
+        break;
+
+    case WLANQTUTILS_IAP_TRACE_CREATE:
+        OstTraceExt5(
+            TRACE_NORMAL,
+            WLANQTUTILSIAPSETTINGS_TRACEIAP_CREATE,
+            "WlanQtUtilsIapSettings::traceIap Created;iapId=%u;ssid=%S;secMode=%{WlanSecMode};useWpaPsk=%u;connMode=%{WlanConnMode}",
+            iapId,
+            ssid,
+            secMode,
+            useWpaPsk,
+            connMode);
+        break;
+
+    case WLANQTUTILS_IAP_TRACE_UPDATE:
+        OstTraceExt5(
+            TRACE_NORMAL,
+            WLANQTUTILSIAPSETTINGS_TRACEIAP_UPDATE,
+            "WlanQtUtilsIapSettings::traceIap Updated;iapId=%u;ssid=%S;secMode=%{WlanSecMode};useWpaPsk=%u;connMode=%{WlanConnMode}",
+            iapId,
+            ssid,
+            secMode,
+            useWpaPsk,
+            connMode);
+        break;
+    }
+#endif
+}
--- a/wlanutilities/wlanqtutilities/bwins/wlanqtutilitiesu.def	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/bwins/wlanqtutilitiesu.def	Tue Jul 06 15:29:22 2010 +0300
@@ -1,38 +1,38 @@
 EXPORTS
-	?wlanScanDirectReady@WlanQtUtils@@IAEXXZ @ 1 NONAME ; void WlanQtUtils::wlanScanDirectReady(void)
-	?iapName@WlanQtUtils@@QBE?AVQString@@H@Z @ 2 NONAME ; class QString WlanQtUtils::iapName(int) const
-	??0WlanQtUtilsAp@@QAE@XZ @ 3 NONAME ; WlanQtUtilsAp::WlanQtUtilsAp(void)
-	?updateIap@WlanQtUtils@@QAE_NHPBVWlanQtUtilsAp@@@Z @ 4 NONAME ; bool WlanQtUtils::updateIap(int, class WlanQtUtilsAp const *)
-	?createIap@WlanQtUtils@@QAEHPBVWlanQtUtilsAp@@@Z @ 5 NONAME ; int WlanQtUtils::createIap(class WlanQtUtilsAp const *)
-	?Start@RConnection@@QAEXAAVTConnPref@@AAVTRequestStatus@@@Z @ 6 NONAME ; void RConnection::Start(class TConnPref &, class TRequestStatus &)
-	?value@WlanQtUtilsAp@@QBE?AVQVariant@@H@Z @ 7 NONAME ; class QVariant WlanQtUtilsAp::value(int) const
-	??1WlanQtUtilsIap@@UAE@XZ @ 8 NONAME ; WlanQtUtilsIap::~WlanQtUtilsIap(void)
-	?qt_metacast@WlanQtUtils@@UAEPAXPBD@Z @ 9 NONAME ; void * WlanQtUtils::qt_metacast(char const *)
-	?qt_metacall@WlanQtUtils@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 10 NONAME ; int WlanQtUtils::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?availableWlanAps@WlanQtUtils@@QBEXAAV?$QList@V?$QSharedPointer@VWlanQtUtilsAp@@@@@@@Z @ 11 NONAME ; void WlanQtUtils::availableWlanAps(class QList<class QSharedPointer<class WlanQtUtilsAp> > &) const
-	??1WlanQtUtilsAp@@UAE@XZ @ 12 NONAME ; WlanQtUtilsAp::~WlanQtUtilsAp(void)
-	?compare@WlanQtUtilsAp@@SA_NPBV1@0@Z @ 13 NONAME ; bool WlanQtUtilsAp::compare(class WlanQtUtilsAp const *, class WlanQtUtilsAp const *)
-	?staticMetaObject@WlanQtUtils@@2UQMetaObject@@B @ 14 NONAME ; struct QMetaObject const WlanQtUtils::staticMetaObject
-	??0WlanQtUtilsAp@@QAE@ABV0@@Z @ 15 NONAME ; WlanQtUtilsAp::WlanQtUtilsAp(class WlanQtUtilsAp const &)
-	??_EWlanQtUtilsAp@@UAE@I@Z @ 16 NONAME ; WlanQtUtilsAp::~WlanQtUtilsAp(unsigned int)
-	?disconnectIap@WlanQtUtils@@QAEXH@Z @ 17 NONAME ; void WlanQtUtils::disconnectIap(int)
-	?scanWlanDirect@WlanQtUtils@@QAEXABVQString@@@Z @ 18 NONAME ; void WlanQtUtils::scanWlanDirect(class QString const &)
-	?tr@WlanQtUtils@@SA?AVQString@@PBD0@Z @ 19 NONAME ; class QString WlanQtUtils::tr(char const *, char const *)
-	?wlanNetworkClosed@WlanQtUtils@@IAEXHH@Z @ 20 NONAME ; void WlanQtUtils::wlanNetworkClosed(int, int)
-	?connectionStatus@WlanQtUtils@@QBE?AW4ConnStatus@1@XZ @ 21 NONAME ; enum WlanQtUtils::ConnStatus WlanQtUtils::connectionStatus(void) const
-	?setValue@WlanQtUtilsAp@@QAEXHVQVariant@@@Z @ 22 NONAME ; void WlanQtUtilsAp::setValue(int, class QVariant)
-	??1WlanQtUtils@@UAE@XZ @ 23 NONAME ; WlanQtUtils::~WlanQtUtils(void)
-	?scanWlans@WlanQtUtils@@QAEXXZ @ 24 NONAME ; void WlanQtUtils::scanWlans(void)
-	?EventType@CConnMonEventBase@@QBEHXZ @ 25 NONAME ; int CConnMonEventBase::EventType(void) const
-	?activeIap@WlanQtUtils@@QBEHXZ @ 26 NONAME ; int WlanQtUtils::activeIap(void) const
-	?GetPckgAttribute@RConnectionMonitor@@QBEXIIIAAVTDes16@@AAVTRequestStatus@@@Z @ 27 NONAME ; void RConnectionMonitor::GetPckgAttribute(unsigned int, unsigned int, unsigned int, class TDes16 &, class TRequestStatus &) const
+	?iapName@WlanQtUtils@@QBE?AVQString@@H@Z @ 1 NONAME ; class QString WlanQtUtils::iapName(int) const
+	??0WlanQtUtilsAp@@QAE@XZ @ 2 NONAME ; WlanQtUtilsAp::WlanQtUtilsAp(void)
+	?updateIap@WlanQtUtils@@QAE_NHPBVWlanQtUtilsAp@@@Z @ 3 NONAME ; bool WlanQtUtils::updateIap(int, class WlanQtUtilsAp const *)
+	?createIap@WlanQtUtils@@QAEHPBVWlanQtUtilsAp@@@Z @ 4 NONAME ; int WlanQtUtils::createIap(class WlanQtUtilsAp const *)
+	?Start@RConnection@@QAEXAAVTConnPref@@AAVTRequestStatus@@@Z @ 5 NONAME ; void RConnection::Start(class TConnPref &, class TRequestStatus &)
+	?value@WlanQtUtilsAp@@QBE?AVQVariant@@H@Z @ 6 NONAME ; class QVariant WlanQtUtilsAp::value(int) const
+	??1WlanQtUtilsIap@@UAE@XZ @ 7 NONAME ; WlanQtUtilsIap::~WlanQtUtilsIap(void)
+	?qt_metacast@WlanQtUtils@@UAEPAXPBD@Z @ 8 NONAME ; void * WlanQtUtils::qt_metacast(char const *)
+	?qt_metacall@WlanQtUtils@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 9 NONAME ; int WlanQtUtils::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?availableWlanAps@WlanQtUtils@@QBEXAAV?$QList@V?$QSharedPointer@VWlanQtUtilsAp@@@@@@@Z @ 10 NONAME ; void WlanQtUtils::availableWlanAps(class QList<class QSharedPointer<class WlanQtUtilsAp> > &) const
+	??1WlanQtUtilsAp@@UAE@XZ @ 11 NONAME ; WlanQtUtilsAp::~WlanQtUtilsAp(void)
+	?wlanScanApReady@WlanQtUtils@@IAEXH@Z @ 12 NONAME ; void WlanQtUtils::wlanScanApReady(int)
+	?staticMetaObject@WlanQtUtils@@2UQMetaObject@@B @ 13 NONAME ; struct QMetaObject const WlanQtUtils::staticMetaObject
+	??0WlanQtUtilsAp@@QAE@ABV0@@Z @ 14 NONAME ; WlanQtUtilsAp::WlanQtUtilsAp(class WlanQtUtilsAp const &)
+	??_EWlanQtUtilsAp@@UAE@I@Z @ 15 NONAME ; WlanQtUtilsAp::~WlanQtUtilsAp(unsigned int)
+	?disconnectIap@WlanQtUtils@@QAEXH@Z @ 16 NONAME ; void WlanQtUtils::disconnectIap(int)
+	?scanWlanDirect@WlanQtUtils@@QAEXABVQString@@@Z @ 17 NONAME ; void WlanQtUtils::scanWlanDirect(class QString const &)
+	?tr@WlanQtUtils@@SA?AVQString@@PBD0@Z @ 18 NONAME ; class QString WlanQtUtils::tr(char const *, char const *)
+	?wlanNetworkClosed@WlanQtUtils@@IAEXHH@Z @ 19 NONAME ; void WlanQtUtils::wlanNetworkClosed(int, int)
+	?ictResult@WlanQtUtils@@IAEXHH@Z @ 20 NONAME ; void WlanQtUtils::ictResult(int, int)
+	?compare@WlanQtUtilsAp@@SAHPBV1@0P6AHABVQString@@1@Z@Z @ 21 NONAME ; int WlanQtUtilsAp::compare(class WlanQtUtilsAp const *, class WlanQtUtilsAp const *, int (*)(class QString const &, class QString const &))
+	?connectionStatus@WlanQtUtils@@QBE?AW4ConnStatus@1@XZ @ 22 NONAME ; enum WlanQtUtils::ConnStatus WlanQtUtils::connectionStatus(void) const
+	?setValue@WlanQtUtilsAp@@QAEXHVQVariant@@@Z @ 23 NONAME ; void WlanQtUtilsAp::setValue(int, class QVariant)
+	??1WlanQtUtils@@UAE@XZ @ 24 NONAME ; WlanQtUtils::~WlanQtUtils(void)
+	?scanWlans@WlanQtUtils@@QAEXXZ @ 25 NONAME ; void WlanQtUtils::scanWlans(void)
+	?EventType@CConnMonEventBase@@QBEHXZ @ 26 NONAME ; int CConnMonEventBase::EventType(void) const
+	?activeIap@WlanQtUtils@@QBEHXZ @ 27 NONAME ; int WlanQtUtils::activeIap(void) const
 	?scanWlanAps@WlanQtUtils@@QAEXXZ @ 28 NONAME ; void WlanQtUtils::scanWlanAps(void)
 	?wlanNetworkOpened@WlanQtUtils@@IAEXH@Z @ 29 NONAME ; void WlanQtUtils::wlanNetworkOpened(int)
 	?connectIap@WlanQtUtils@@QAEXH_N@Z @ 30 NONAME ; void WlanQtUtils::connectIap(int, bool)
 	??_EWlanQtUtilsIap@@UAE@I@Z @ 31 NONAME ; WlanQtUtilsIap::~WlanQtUtilsIap(unsigned int)
 	?metaObject@WlanQtUtils@@UBEPBUQMetaObject@@XZ @ 32 NONAME ; struct QMetaObject const * WlanQtUtils::metaObject(void) const
 	??_EWlanQtUtils@@UAE@I@Z @ 33 NONAME ; WlanQtUtils::~WlanQtUtils(unsigned int)
-	?wlanScanReady@WlanQtUtils@@IAEXXZ @ 34 NONAME ; void WlanQtUtils::wlanScanReady(void)
+	?wlanScanReady@WlanQtUtils@@IAEXH@Z @ 34 NONAME ; void WlanQtUtils::wlanScanReady(int)
 	??0WlanQtUtils@@QAE@XZ @ 35 NONAME ; WlanQtUtils::WlanQtUtils(void)
 	?stopWlanScan@WlanQtUtils@@QAEXXZ @ 36 NONAME ; void WlanQtUtils::stopWlanScan(void)
 	?availableWlans@WlanQtUtils@@QBEXAAV?$QList@V?$QSharedPointer@VWlanQtUtilsIap@@@@@@AAV?$QList@V?$QSharedPointer@VWlanQtUtilsAp@@@@@@@Z @ 37 NONAME ; void WlanQtUtils::availableWlans(class QList<class QSharedPointer<class WlanQtUtilsIap> > &, class QList<class QSharedPointer<class WlanQtUtilsAp> > &) const
@@ -40,8 +40,7 @@
 	?getStaticMetaObject@WlanQtUtils@@SAABUQMetaObject@@XZ @ 39 NONAME ; struct QMetaObject const & WlanQtUtils::getStaticMetaObject(void)
 	?trUtf8@WlanQtUtils@@SA?AVQString@@PBD0@Z @ 40 NONAME ; class QString WlanQtUtils::trUtf8(char const *, char const *)
 	?deleteIap@WlanQtUtils@@QAEXH@Z @ 41 NONAME ; void WlanQtUtils::deleteIap(int)
-	?wlanScanApReady@WlanQtUtils@@IAEXXZ @ 42 NONAME ; void WlanQtUtils::wlanScanApReady(void)
-	??0WlanQtUtilsIap@@QAE@XZ @ 43 NONAME ; WlanQtUtilsIap::WlanQtUtilsIap(void)
+	??0WlanQtUtilsIap@@QAE@XZ @ 42 NONAME ; WlanQtUtilsIap::WlanQtUtilsIap(void)
+	?wlanScanDirectReady@WlanQtUtils@@IAEXH@Z @ 43 NONAME ; void WlanQtUtils::wlanScanDirectReady(int)
 	?trUtf8@WlanQtUtils@@SA?AVQString@@PBD0H@Z @ 44 NONAME ; class QString WlanQtUtils::trUtf8(char const *, char const *, int)
-	?ictResult@WlanQtUtils@@IAEXH_N@Z @ 45 NONAME ; void WlanQtUtils::ictResult(int, bool)
 
--- a/wlanutilities/wlanqtutilities/eabi/wlanqtutilitiesu.def	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/eabi/wlanqtutilitiesu.def	Tue Jul 06 15:29:22 2010 +0300
@@ -5,17 +5,17 @@
 	_ZN11WlanQtUtils11scanWlanApsEv @ 4 NONAME
 	_ZN11WlanQtUtils12stopWlanScanEv @ 5 NONAME
 	_ZN11WlanQtUtils13disconnectIapEi @ 6 NONAME
-	_ZN11WlanQtUtils13wlanScanReadyEv @ 7 NONAME
+	_ZN11WlanQtUtils13wlanScanReadyEi @ 7 NONAME
 	_ZN11WlanQtUtils14scanWlanDirectERK7QString @ 8 NONAME
-	_ZN11WlanQtUtils15wlanScanApReadyEv @ 9 NONAME
+	_ZN11WlanQtUtils15wlanScanApReadyEi @ 9 NONAME
 	_ZN11WlanQtUtils16staticMetaObjectE @ 10 NONAME DATA 16
 	_ZN11WlanQtUtils17wlanNetworkClosedEii @ 11 NONAME
 	_ZN11WlanQtUtils17wlanNetworkOpenedEi @ 12 NONAME
 	_ZN11WlanQtUtils19getStaticMetaObjectEv @ 13 NONAME
-	_ZN11WlanQtUtils19wlanScanDirectReadyEv @ 14 NONAME
+	_ZN11WlanQtUtils19wlanScanDirectReadyEi @ 14 NONAME
 	_ZN11WlanQtUtils9createIapEPK13WlanQtUtilsAp @ 15 NONAME
 	_ZN11WlanQtUtils9deleteIapEi @ 16 NONAME
-	_ZN11WlanQtUtils9ictResultEib @ 17 NONAME
+	_ZN11WlanQtUtils9ictResultEii @ 17 NONAME
 	_ZN11WlanQtUtils9scanWlansEv @ 18 NONAME
 	_ZN11WlanQtUtils9updateIapEiPK13WlanQtUtilsAp @ 19 NONAME
 	_ZN11WlanQtUtilsC1Ev @ 20 NONAME
@@ -23,7 +23,7 @@
 	_ZN11WlanQtUtilsD0Ev @ 22 NONAME
 	_ZN11WlanQtUtilsD1Ev @ 23 NONAME
 	_ZN11WlanQtUtilsD2Ev @ 24 NONAME
-	_ZN13WlanQtUtilsAp7compareEPKS_S1_ @ 25 NONAME
+	_ZN13WlanQtUtilsAp7compareEPKS_S1_PFiRK7QStringS4_E @ 25 NONAME
 	_ZN13WlanQtUtilsAp8setValueEi8QVariant @ 26 NONAME
 	_ZN13WlanQtUtilsApC1ERKS_ @ 27 NONAME
 	_ZN13WlanQtUtilsApC1Ev @ 28 NONAME
--- a/wlanutilities/wlanqtutilities/rom/wlanqtutilities.iby	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/rom/wlanqtutilities.iby	Tue Jul 06 15:29:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-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"
@@ -22,7 +22,7 @@
 
 #ifdef __PROTOCOL_WLAN
 
-file=ABI_DIR\BUILD_DIR\wlanqtutilities.dll SHARED_LIB_DIR\wlanqtutilities.dll
+file=ABI_DIR/BUILD_DIR/wlanqtutilities.dll SHARED_LIB_DIR/wlanqtutilities.dll
 
 #endif // __PROTOCOL_WLAN
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/stubs/stub_connmon.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* 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:
+* This is a source file for connmon library stub functions for emulator.
+*/
+
+#include <QString>
+#include <QObject>
+#include <QVariant>
+#include <rconnmon.h>
+#include <nifvar.h>
+#include <cmmanager_shim.h>
+
+#include "wlanqtutilsap.h"
+
+#ifdef __WINS__
+
+// -----------------------------------------------------------------------------
+// CConnMonEventBase::CConnMonEventBase
+// -----------------------------------------------------------------------------
+//
+CConnMonEventBase::CConnMonEventBase( const TInt aEventType, const TUint aConnectionId )
+    {
+    iEventType = aEventType;
+    iConnectionId = aConnectionId;
+    }
+
+// Destructor
+CConnMonEventBase::~CConnMonEventBase()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CConnMonEventBase::EventType
+// -----------------------------------------------------------------------------
+//
+TInt CConnMonEventBase::EventType() const
+    {
+    return iEventType;
+    }
+
+// -----------------------------------------------------------------------------
+// CConnMonConnectionStatusChange::CConnMonConnectionStatusChange
+// -----------------------------------------------------------------------------
+//
+CConnMonConnectionStatusChange::CConnMonConnectionStatusChange(
+    const TUint aConnectionId,
+    const TUint aSubConnectionId,
+    const TInt aConnectionStatus ) :
+    CConnMonEventBase(EConnMonConnectionStatusChange, aConnectionId)
+    {
+    iSubConnectionId = aSubConnectionId;
+    iConnectionStatus = aConnectionStatus;
+    }
+
+// Destructor
+CConnMonConnectionStatusChange::~CConnMonConnectionStatusChange()
+    {
+    }
+
+#endif // __WINS__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/stubs/stub_esock.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* 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:
+* This is a source file for esock library stub functions for emulator.
+*/
+
+#include <es_sock.h>
+
+// ----------------------------------------------------
+// Stub functions for esock library, used in emulator
+// ----------------------------------------------------
+
+/**
+ * Return always success in emulator.
+ */
+void RConnection::Start(class TConnPref &, class TRequestStatus &aStatus)
+{
+    User::RequestComplete(&aStatus, KErrNone);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/stubs/stub_wlanmgmtclient.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,88 @@
+/*
+* 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:
+* WLAN Management API stubbing for WLAN Qt Utilities use in emulator.
+*/
+
+#include <e32std.h>
+#include <e32base.h>
+#include "wlanmgmtclient.h"
+
+// ---------------------------------------------------------
+// CWlanScanRequest::NewL
+// ---------------------------------------------------------
+//
+CWlanMgmtClient* CWlanMgmtClient::NewL()
+    {
+    CWlanMgmtClient* self = new CWlanMgmtClient;
+    return self;
+    }
+    
+// ---------------------------------------------------------
+// CWlanScanRequest::~CWlanMgmtClient
+// ---------------------------------------------------------
+//
+CWlanMgmtClient::~CWlanMgmtClient()
+    {
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::CWlanMgmtClient
+// ---------------------------------------------------------
+//
+CWlanMgmtClient::CWlanMgmtClient()
+    {
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::GetScanResults
+// ---------------------------------------------------------
+//
+void CWlanMgmtClient::GetScanResults(
+    TRequestStatus& aStatus,
+    CWlanScanInfo& aResults )
+    {
+    // Complete the request immediately
+    TRequestStatus *status = &aStatus;
+    User::RequestComplete(status, KErrNone);
+    
+    // Results are returned when asked per AP
+    (void)aResults;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::GetScanResults
+// ---------------------------------------------------------
+//
+void CWlanMgmtClient::GetScanResults(
+    TWlanSsid& aSsid,
+    TRequestStatus& aStatus,
+    CWlanScanInfo& aResults )
+    {
+    // Complete the request immediately
+    TRequestStatus *status = &aStatus;
+    User::RequestComplete(status, KErrNone);
+    
+    // Results are returned when asked per AP
+    (void)aSsid;
+    (void)aResults;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::CancelGetScanResults
+// ---------------------------------------------------------
+//
+void CWlanMgmtClient::CancelGetScanResults()
+    {
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/stubs/stub_wlanscaninfo.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,335 @@
+/*
+* 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:
+* WLAN Management API stubbing for WLAN Qt Utilities use in emulator.
+*/
+
+#include <e32base.h>
+#include "wlanscaninfo.h"
+
+#include <cmmanager_shim.h>
+
+#include "wlanqtutilsap.h"
+
+// Information Element ID for SSID as specified in 802.11.
+static const TUint8 KWlan802Dot11SsidIE = 0;
+
+// Bit mask for Capability info field to get type (Infra/AdHoc).
+static const TUint8 KWlan802Dot11CapabilityEssMask = 0x0001;
+
+// Scan result list iterator. Holds the current index, starting from zero (0).
+static int ScanResultIterator = 0;
+
+// Scan result toggler. Used for switching between two different scan result lists.
+static bool ScanResultPrimary = true;
+
+// ---------------------------------------------------------
+// CWlanScanInfo::NewL
+// ---------------------------------------------------------
+//
+CWlanScanInfo* CWlanScanInfo::NewL()
+    {
+    CWlanScanInfo* self = new CWlanScanInfo;
+    return self;
+    }
+    
+// ---------------------------------------------------------
+// CWlanScanInfo::~CWlanScanInfo
+// ---------------------------------------------------------
+//
+CWlanScanInfo::~CWlanScanInfo()
+    {
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::~First
+// ---------------------------------------------------------
+//
+const TWlanScanInfoFrame* CWlanScanInfo::First()
+    {
+    // Rewind to the beginning of scan result list
+    ScanResultIterator = 0;
+    
+    return (TWlanScanInfoFrame*)1;   // Info frame is not supported
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::~Next
+// ---------------------------------------------------------
+//
+const TWlanScanInfoFrame* CWlanScanInfo::Next()
+    {
+    // Go to next AP in scan results
+    ScanResultIterator++;
+    
+    return (TWlanScanInfoFrame*)1;   // Info frame is not supported
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::~IsDone
+// ---------------------------------------------------------
+//
+TBool CWlanScanInfo::IsDone() const
+    {
+    TBool result = EFalse;
+    
+    // Amount of scan results is toggled for every scan
+    int scanResultCount;
+    if (ScanResultPrimary) {
+        scanResultCount = 6;
+    } else {
+        scanResultCount = 3;
+    }
+    
+    // Iterating is complete when iterator is one past the last item
+    if (ScanResultIterator >= scanResultCount) {
+        result = ETrue;
+
+        // Toggle scan result count
+        ScanResultPrimary = !ScanResultPrimary;
+    }
+    
+    return result;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::RXLevel
+// ---------------------------------------------------------
+//
+TUint8 CWlanScanInfo::RXLevel() const
+    {
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    int rxlevel = ap->value(WlanQtUtilsAp::ConfIdSignalStrength).toInt();
+    
+    return (TUint8)rxlevel;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::Bssid
+// ---------------------------------------------------------
+//
+void CWlanScanInfo::Bssid(
+    TWlanBssid& aBssid ) const
+    {
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    QByteArray bssid = ap->value(WlanQtUtilsAp::ConfIdBssid).toByteArray();
+
+    // Length must match, since BSSID is always the same length
+    Q_ASSERT(bssid.length() == KWlanMaxBssidLength);
+    
+    // Copy the BSSID
+    aBssid.Copy((const unsigned char *)bssid.constData(), bssid.length());
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::Capability
+// ---------------------------------------------------------
+//
+TUint16 CWlanScanInfo::Capability() const
+    {
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    
+    TUint16 capabilities = 0;
+    
+    // Only connection mode cabability is supported 
+    int connMode = ap->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt();
+    if (connMode == CMManagerShim::Infra) {
+        capabilities |= KWlan802Dot11CapabilityEssMask; 
+    }
+    
+    return capabilities;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::InformationElement
+// ---------------------------------------------------------
+//
+TInt CWlanScanInfo::InformationElement(
+    TUint8 aIE, 
+    TUint8& aLength, 
+    const TUint8** aData )
+    {
+    // Static SSID buffer
+    static TBuf8<255> ssidBuffer;
+    
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    
+    aLength = 0;
+    
+    // Only SSID IE is supported
+    Q_ASSERT(aIE == KWlan802Dot11SsidIE);
+    (void)aIE;
+    
+    // Cypy the SSID
+    QString ssid = ap->value(WlanQtUtilsAp::ConfIdSsid).toString();
+    QByteArray ssidData(ssid.toUtf8());
+    ssidBuffer.Copy(
+        (TUint8*)ssidData.data(),
+        ssidData.length());
+
+    // Give reference to the buffer to the caller
+    *aData = ssidBuffer.Ptr();
+    aLength = (TUint8)ssidBuffer.Length();
+    
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::IsProtectedSetupSupported
+// ---------------------------------------------------------
+//
+TBool CWlanScanInfo::IsProtectedSetupSupported()
+    {
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    
+    TBool wpsSupport;
+    bool wps = ap->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool();
+    if (wps) {
+        wpsSupport = ETrue;
+    } else {
+        wpsSupport = EFalse;
+    }
+    
+    return wpsSupport;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::ExtendedSecurityMode
+// ---------------------------------------------------------
+//
+TWlanConnectionExtentedSecurityMode CWlanScanInfo::ExtendedSecurityMode() const
+    {
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    int secMode = ap->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt();
+    bool pskUse = ap->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool();
+    
+    TWlanConnectionExtentedSecurityMode ret;
+    switch (secMode) {
+    case CMManagerShim::WlanSecModeWep:
+        // Both WEP security modes are mapped to same WEP sec mode value.
+        // We test both of them, and toggle the used value each time.
+        static bool wepOpen = true;
+        if (wepOpen) {
+            ret = EWlanConnectionExtentedSecurityModeWepOpen;
+        } else {
+            ret = EWlanConnectionExtentedSecurityModeWepShared;
+        }
+        wepOpen = !wepOpen;
+        break;
+        
+    case CMManagerShim::WlanSecMode802_1x:
+        ret = EWlanConnectionExtentedSecurityMode802d1x;        
+        break;
+        
+    case CMManagerShim::WlanSecModeWpa:
+        if (pskUse)
+            {
+            ret = EWlanConnectionExtentedSecurityModeWpaPsk;
+            }
+        else
+            {
+            ret = EWlanConnectionExtentedSecurityModeWpa;            
+            }
+        break;
+        
+    case CMManagerShim::WlanSecModeWpa2:
+        if (pskUse)
+            {
+            ret = EWlanConnectionExtentedSecurityModeWpa2Psk;
+            }
+        else
+            {
+            ret = EWlanConnectionExtentedSecurityModeWpa2;            
+            }
+        break;
+        
+    case CMManagerShim::WlanSecModeWapi:
+        if (pskUse)
+            {
+            ret = EWlanConnectionExtentedSecurityModeWapiPsk;
+            }
+        else
+            {
+            ret = EWlanConnectionExtentedSecurityModeWapi;            
+            }
+        break;
+        
+    default:
+        ret = EWlanConnectionExtentedSecurityModeOpen;
+        break;
+    }
+    
+    return ret;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::CWlanScanInfo
+// ---------------------------------------------------------
+//
+CWlanScanInfo::CWlanScanInfo()
+    {
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::GetCurrentAp
+// ---------------------------------------------------------
+//
+QSharedPointer<WlanQtUtilsAp> CWlanScanInfo::GetCurrentAp() const
+    {
+    // If this fails, client iterates erroneously
+    Q_ASSERT(!IsDone());
+
+    // Get the currently iterated AP
+    QSharedPointer<WlanQtUtilsAp> ap(new WlanQtUtilsAp());
+
+    // Store default setting data
+    QString ssid("Test AP ");
+    ssid.append(QString::number(ScanResultIterator + 1));
+    ap->setValue(WlanQtUtilsAp::ConfIdSsid, ssid);
+    ap->setValue(WlanQtUtilsAp::ConfIdBssid, QByteArray("123456"));
+    ap->setValue(WlanQtUtilsAp::ConfIdSignalStrength, 20);
+    ap->setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
+    ap->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeOpen);
+    ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
+    ap->setValue(WlanQtUtilsAp::ConfIdWpsSupported, false);
+
+    // Custom settings for AP # 1
+    if (ScanResultIterator == 0) {
+        ap->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa2);
+        ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
+    }
+    
+    // Custom settings for AP # 2
+    if (ScanResultIterator == 1) {
+        if (ScanResultPrimary) {
+            ap->setValue(WlanQtUtilsAp::ConfIdSignalStrength, 70);
+        } else {
+            ap->setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90);
+        }
+    }
+
+    // Custom settings for AP # 3
+    if (ScanResultIterator == 2) {
+        ap->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa2);
+        ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
+        ap->setValue(WlanQtUtilsAp::ConfIdWpsSupported, true);
+    }
+
+    // Custom settings for AP's above 3
+    if (ScanResultIterator >= 3) {
+        ap->setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90);
+    }
+    
+    return ap;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/stubs/stubs.pri	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,29 @@
+#
+# 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: 
+# Stubs for Wlan Qt Utilities emulator usage
+#
+
+symbian {
+	mmpStubRules = \
+	    "$${LITERAL_HASH}ifdef WINSCW" \
+	    "USERINCLUDE stubs" \
+	    "SOURCEPATH stubs" \
+	    "SOURCE stub_connmon.cpp" \
+	    "SOURCE stub_esock.cpp" \
+	    "SOURCE stub_wlanmgmtclient.cpp" \
+	    "SOURCE stub_wlanscaninfo.cpp" \
+	    "$${LITERAL_HASH}endif"
+	MMP_RULES += mmpStubRules
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/stubs/wlanmgmtclient.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* 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:
+* WLAN Management API stubbing for WLAN Qt Utilities use in emulator.
+*/
+
+#ifndef WLANMGMTCLIENT_H
+#define WLANMGMTCLIENT_H
+
+#include "wlanmgmtcommon.h"
+#include "wlanscaninfo.h"
+
+// CLASS DECLARATION
+
+class CWlanMgmtClient : public CBase
+    {
+    public:  // Methods
+
+        // Constructors and destructor
+
+        /**
+         * Static constructor.
+         * @return Pointer to the constructed object.
+         */
+        static CWlanMgmtClient* NewL();
+
+        /**
+         * Destructor.
+         */
+        ~CWlanMgmtClient();
+
+        /**
+         * Perform a broadcast scan and return the detected WLAN networks.
+         *
+         * @param aStatus Status of the calling active object. On successful
+         *                completion contains KErrNone, otherwise one of the
+         *                system-wide error codes.
+         * @param aResults Results of the scan.
+         */
+        void GetScanResults(
+            TRequestStatus& aStatus,
+            CWlanScanInfo& aResults );
+
+        /**
+         * Perform a direct scan for an SSID and return the detected WLAN networks.
+         * If the SSID has zero length, a broadcast scan will be done.
+         *
+         * @param aSsid name of the WLAN network
+         * @param aStatus Status of the calling active object. On successful
+         *                completion contains KErrNone, otherwise one of the
+         *                system-wide error codes.
+         * @param aResults Results of the scan.
+         */
+        void GetScanResults(
+            TWlanSsid& aSsid,
+            TRequestStatus& aStatus,
+            CWlanScanInfo& aResults );
+        
+        /**
+         * Cancel an outstanding scan request.
+         */
+        void CancelGetScanResults();
+        
+    private: // Data
+        
+        CWlanMgmtClient();
+    };
+
+#endif // WLANMGMTCLIENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/stubs/wlanscaninfo.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,129 @@
+/*
+* 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:
+* WLAN Management API stubbing for WLAN Qt Utilities use in emulator.
+*/
+
+#ifndef WLANSCANINFO_H
+#define WLANSCANINFO_H
+
+// INCLUDES
+#include <e32def.h>
+#include <e32base.h>
+#include <wlanmgmtcommon.h>
+
+#include <QSharedPointer>
+#include "wlanqtutilsap.h"
+
+typedef TUint8 TWlanScanInfoFrame;
+
+// CLASS DECLARATION
+class CWlanScanInfo : public CBase
+    {
+    public:  // Methods
+
+       // Constructors and destructor
+        
+        /**
+         * Static constructor.
+         * @return Pointer to the constructed object.
+         */
+        static CWlanScanInfo* NewL();
+        
+        /**
+         * Destructor.
+         */
+        ~CWlanScanInfo();
+
+        /**
+         * Find the data of the first access point.
+         * @return Pointer at the beginning of the first access point stored 
+         *         in the scan list. NULL if not any.
+         */
+        const TWlanScanInfoFrame* First();
+
+        /**
+         * Find the data of the next access point.
+         * @return Pointer at the beginning of the next access point stored
+         *         in the scan list. NULL if not any.
+         */
+        const TWlanScanInfoFrame* Next();
+
+        /**
+         * Find is there any more unhandled access points.
+         * @return EFalse if there is access points in the list left, 
+         *         ETrue if not.
+         */
+        TBool IsDone() const;
+
+        /**
+         * Return RX level of the BSS.
+         * @return RX level.
+         */
+        TUint8 RXLevel() const;
+
+        /**
+         * Return BSSID of the BSS.
+         * @param  aBssid ID of the access point or IBSS network.
+         * @return Pointer to the beginning of the BSSID. Length is always 6 bytes.
+         */
+        void Bssid(
+            TWlanBssid& aBssid ) const;
+
+        /**
+         * Get capability of the BSS (see IEEE 802.11 section 7.3.1.4.
+         * @return The capability information.
+         */
+        TUint16 Capability() const;
+
+        /**
+         * Return requested information element.
+         * @param aIE        Id of the requested IE data.
+         * @param aLength    Length of the IE. Zero if IE not found.
+         * @param aData      Pointer to the beginning of the IE data. NULL if IE not found.
+         * @return           General error message.
+         */
+        TInt InformationElement(
+            TUint8 aIE, 
+            TUint8& aLength, 
+            const TUint8** aData );
+
+        /**
+         * Find whether Wi-Fi Protected Setup is supported.
+         * @return ETrue if AP supports Wi-Fi Protected Setup,
+         *         EFalse if not.
+         */
+        TBool IsProtectedSetupSupported();
+
+        /**
+         * Get security mode of the BSS.
+         * @return security mode.
+         */
+        TWlanConnectionExtentedSecurityMode ExtendedSecurityMode() const;
+        
+    private: // Data
+
+        /**
+         * Constructor.
+         */
+        CWlanScanInfo();
+
+        /**
+         * Returns the currently iterated AP.
+         */
+        QSharedPointer<WlanQtUtilsAp> GetCurrentAp() const;
+        
+    };
+
+#endif // WLANSCANINFO_H 
--- a/wlanutilities/wlanqtutilities/traces/trace.properties	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/traces/trace.properties	Tue Jul 06 15:29:22 2010 +0300
@@ -1,30 +1,36 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <trace_properties>
-    <enum name="ConfId">
-        <value id="0">ConfIdSsid</value>
-        <value id="1">ConfIdSignalStrength</value>
-        <value id="2">ConfIdConnectionMode</value>
-        <value id="3">ConfIdSecurityMode</value>
-        <value id="4">ConfIdWpaPskUse</value>
-        <value id="5">ConfIdWpaPsk</value>
-        <value id="6">ConfIdWepKey1</value>
-        <value id="7">ConfIdWepKey2</value>
-        <value id="8">ConfIdWepKey3</value>
-        <value id="9">ConfIdWepKey4</value>
-        <value id="10">ConfIdWepDefaultIndex</value>
-        <value id="11">ConfIdHidden</value>
-        <value id="12">ConfIdWpsSupported</value>
-
-        <value id="100">ConfIdIapId</value>
-        <value id="101">ConfIdName</value>
-        <value id="102">ConfIdNetworkId</value>
-    </enum>
     <enum name="ConnStatus">
         <value id="0">ConnStatusNone</value>
         <value id="1">ConnStatusConnecting</value>
         <value id="2">ConnStatusConnected</value>
         <value id="3">ConnStatusDisconnected</value>
     </enum>
+    <enum name="ScanStatus">
+        <value id="0">ScanStatusOk</value>
+        <value id="1">ScanStatusCancelled</value>
+        <value id="2">ScanStatusError</value>
+    </enum>
+    <enum name="IctStatus">
+    	<value id="0">IctPassed</value>
+    	<value id="1">IctHotspotPassed</value>
+    	<value id="2">IctCancelled</value>
+    	<value id="3">IctFailed</value>
+    </enum>
+    <!-- These come from cmmanagerdefines_shim.h -->
+    <enum name="WlanSecMode">
+        <value id="1">WlanSecModeOpen</value>
+        <value id="2">WlanSecModeWep</value>
+        <value id="4">WlanSecMode802_1x</value>
+        <value id="8">WlanSecModeWpa</value>
+        <value id="16">WlanSecModeWpa2</value>
+        <value id="32">WlanSecModeWapi</value>
+    </enum>
+    <!-- These come from cmmanagerdefines_shim.h -->
+    <enum name="WlanConnMode">
+        <value id="0">Adhoc</value>
+        <value id="1">Infra</value>
+    </enum>
     <!-- These come from rconnmon.h -->
     <enum name="ConnMonEvent">
 	    <value id="1">EConnMonCreateConnection</value>
--- a/wlanutilities/wlanqtutilities/tsrc/context/wlanqtutilstestcontext.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/tsrc/context/wlanqtutilstestcontext.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -136,65 +136,74 @@
 // class WlanQtUtilsWlanScanResult
 // ---------------------------------------------------------
 
-WlanQtUtilsWlanScanResult::WlanQtUtilsWlanScanResult() :
-    wlanScanResultList_(),
-    completeWlanScan_(true),
-    scanRetValue_(KErrNone)
+WlanQtUtilsWlanScan::WlanQtUtilsWlanScan() :
+    mScanResultIterator(0),
+    mWlanScanResultList(),
+    mCompleteWlanScan(true),
+    mScanRetValue(KErrNone)
 {
 }
 
-WlanQtUtilsWlanScanResult::~WlanQtUtilsWlanScanResult()
+WlanQtUtilsWlanScan::~WlanQtUtilsWlanScan()
 {
     clearWlanScanResultList();
 }
 
-void WlanQtUtilsWlanScanResult::initialize()
+void WlanQtUtilsWlanScan::initialize()
 {
     clearWlanScanResultList();
-    completeWlanScan_ = true;
-    scanRetValue_ = KErrNone;
+    mCompleteWlanScan = true;
+    mScanRetValue = KErrNone;
 }
 
-void WlanQtUtilsWlanScanResult::createDefaultWlanScanResultList(int numberOfWlanAps)
+void WlanQtUtilsWlanScan::createDefaultWlanScanResultList(int numberOfWlanAps)
 {
     clearWlanScanResultList();
     for (int i = 0; i < numberOfWlanAps; i++) {
-        WlanQtUtilsAp *ap = new WlanQtUtilsAp();
+        QSharedPointer<WlanQtUtilsAp> ap(new WlanQtUtilsAp());
         ap->setValue(WlanQtUtilsAp::ConfIdSsid, "TestWlanAp" + QString::number(i + 1));
+        ap->setValue(WlanQtUtilsAp::ConfIdBssid, QByteArray("123456"));
         ap->setValue(WlanQtUtilsAp::ConfIdSignalStrength, 20);
         ap->setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
         ap->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeOpen);
         ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
-        // TODO: Create constructor to WlanQtUtilsWlanAp which takes all member variables as parameter.
-        wlanScanResultList_.append(ap);
+        ap->setValue(WlanQtUtilsAp::ConfIdWpsSupported, false);
+        mWlanScanResultList.append(ap);
     }
 }
 
-void WlanQtUtilsWlanScanResult::clearWlanScanResultList()
+void WlanQtUtilsWlanScan::clearWlanScanResultList()
 {
-    Q_FOREACH(WlanQtUtilsAp* ap, wlanScanResultList_)
-        {
-            delete ap;
-        }
-    wlanScanResultList_.clear();
+    mWlanScanResultList.clear();
 }
 
-void WlanQtUtilsWlanScanResult::verifyWlanScanResultList(
-    QList<QSharedPointer<WlanQtUtilsAp> > wlanApList)
+void WlanQtUtilsWlanScan::verifyWlanScanResultList(
+    QList< QSharedPointer<WlanQtUtilsAp> > wlanApList)
 {
-    QCOMPARE(wlanApList.count(), wlanScanResultList_.count());
+    QCOMPARE(wlanApList.count(), mWlanScanResultList.count());
 
-    for (int i = 0; i < wlanScanResultList_.count(); i++) {
-        QCOMPARE(wlanApList[i]->value(WlanQtUtilsAp::ConfIdSsid),
-            wlanScanResultList_[i]->value(WlanQtUtilsAp::ConfIdSsid));
-        QCOMPARE(wlanApList[i]->value(WlanQtUtilsAp::ConfIdSignalStrength),
-            wlanScanResultList_[i]->value(WlanQtUtilsAp::ConfIdSignalStrength));
-        QCOMPARE(wlanApList[i]->value(WlanQtUtilsAp::ConfIdConnectionMode),
-            wlanScanResultList_[i]->value(WlanQtUtilsAp::ConfIdConnectionMode));
-        QCOMPARE(wlanApList[i]->value(WlanQtUtilsAp::ConfIdSecurityMode),
-            wlanScanResultList_[i]->value(WlanQtUtilsAp::ConfIdSecurityMode));
-        QCOMPARE(wlanApList[i]->value(WlanQtUtilsAp::ConfIdWpaPskUse),
-            wlanScanResultList_[i]->value(WlanQtUtilsAp::ConfIdWpaPskUse));
+    for (int i = 0; i < mWlanScanResultList.count(); i++) {
+        QCOMPARE(
+            wlanApList[i]->value(WlanQtUtilsAp::ConfIdSsid),
+            mWlanScanResultList[i]->value(WlanQtUtilsAp::ConfIdSsid));
+        QCOMPARE(
+            wlanApList[i]->value(WlanQtUtilsAp::ConfIdBssid),
+            mWlanScanResultList[i]->value(WlanQtUtilsAp::ConfIdBssid));
+        QCOMPARE(
+            wlanApList[i]->value(WlanQtUtilsAp::ConfIdSignalStrength),
+            mWlanScanResultList[i]->value(WlanQtUtilsAp::ConfIdSignalStrength));
+        QCOMPARE(
+            wlanApList[i]->value(WlanQtUtilsAp::ConfIdConnectionMode),
+            mWlanScanResultList[i]->value(WlanQtUtilsAp::ConfIdConnectionMode));
+        QCOMPARE(
+            wlanApList[i]->value(WlanQtUtilsAp::ConfIdSecurityMode),
+            mWlanScanResultList[i]->value(WlanQtUtilsAp::ConfIdSecurityMode));
+        QCOMPARE(
+            wlanApList[i]->value(WlanQtUtilsAp::ConfIdWpaPskUse),
+            mWlanScanResultList[i]->value(WlanQtUtilsAp::ConfIdWpaPskUse));
+        QCOMPARE(
+            wlanApList[i]->value(WlanQtUtilsAp::ConfIdWpsSupported),
+            mWlanScanResultList[i]->value(WlanQtUtilsAp::ConfIdWpsSupported));
     }
 }
 
@@ -203,7 +212,7 @@
 // ---------------------------------------------------------
 
 WlanQtUtilsCtxConnMon::WlanQtUtilsCtxConnMon() :
-    wlanScanResult_()
+    activeConnections_()
 {
 }
 
@@ -213,7 +222,6 @@
 
 void WlanQtUtilsCtxConnMon::initialize()
 {
-    wlanScanResult_.initialize();
     activeConnections_.initialize();
 }
 
@@ -251,4 +259,5 @@
     esock_.initialize();
     connMon_.initialize();
     ict_.initialize();
+    mScan.initialize();
 }
--- a/wlanutilities/wlanqtutilities/tsrc/context/wlanqtutilstestcontext.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/tsrc/context/wlanqtutilstestcontext.h	Tue Jul 06 15:29:22 2010 +0300
@@ -130,16 +130,16 @@
 };
 
 /**
- * This class represents WLAN APs that represent the results of WLAN scanning triggered by
- * RConnectionMonitor::GetPckgAttribute()
+ * This class represents WLAN functionality test context. E.g. APs that
+ * represent the results of WLAN scanning are stored here.
  */
-class WlanQtUtilsWlanScanResult : public QObject
+class WlanQtUtilsWlanScan : public QObject
 {
     Q_OBJECT
 
 public:
-    WlanQtUtilsWlanScanResult();
-    ~WlanQtUtilsWlanScanResult();
+    WlanQtUtilsWlanScan();
+    ~WlanQtUtilsWlanScan();
 
     /**
      * Initializes context.
@@ -162,19 +162,20 @@
     void verifyWlanScanResultList(
         QList< QSharedPointer<WlanQtUtilsAp> > wlanApList); // TODO: Maybe boolean return value
 
-    /**
-     * List of WLAN access points that RConnectionMonitor stub will return in response to
-     * RConnectionMonitor::GetPckgAttribute().
-     */
-    QList<WlanQtUtilsAp *> wlanScanResultList_;
+    // Scan result list iterator. Holds the current index, starting from zero (0).
+    int mScanResultIterator;
+    
+    // List of WLAN access points that WLAN Management API stub will return when
+    // requesting for wlan scan results.
+    QList< QSharedPointer<WlanQtUtilsAp> > mWlanScanResultList;
     
     /**
      * Should scan be completed immediately or not?
      */
-    bool completeWlanScan_;
+    bool mCompleteWlanScan;
     
-    /** Return value of RConnectionMonitor::GetPckgAttribute(). */
-    int scanRetValue_;
+    /** Return value of scan request. */
+    int mScanRetValue;
     
 private:
     
@@ -200,9 +201,6 @@
      */
     void initialize();
 
-    /** Results of WLAN scanning. */
-    WlanQtUtilsWlanScanResult wlanScanResult_;
-
     /** List of active connections. */
     WlanQtUtilsCtxActiveConnections activeConnections_;
 };
@@ -253,6 +251,8 @@
     WlanQtUtilsCtxConnMon connMon_;
     /** Context for ICTS library. */
     WlanQtUtilsCtxIct ict_;
+    /** Context for scan results. */
+    WlanQtUtilsWlanScan mScan;
 };
 
 #endif // WLANQTUTILSTESTCONTEXT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/tsrc/stubs/stub_connmon.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,140 @@
+/*
+* Copyright (c) 2009-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:
+* This is a source file for connmon library stub functions for UT.
+*/
+
+#include <QString>
+#include <QObject>
+#include <QVariant>
+#include <rconnmon.h>
+#include <nifvar.h>
+#include <cmmanager_shim.h>
+
+#include "wlanqtutilsap.h"
+
+#ifdef __WINS__
+
+#include "wlanqtutilstestcontext.h"
+
+extern WlanQtUtilsTestContext testContext;
+
+// -----------------------------------------------------------------------------
+// CConnMonEventBase::CConnMonEventBase
+// -----------------------------------------------------------------------------
+//
+CConnMonEventBase::CConnMonEventBase( const TInt aEventType, const TUint aConnectionId )
+    {
+    iEventType = aEventType;
+    iConnectionId = aConnectionId;
+    }
+
+// Destructor
+CConnMonEventBase::~CConnMonEventBase()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CConnMonEventBase::EventType
+// -----------------------------------------------------------------------------
+//
+TInt CConnMonEventBase::EventType() const
+    {
+    return iEventType;
+    }
+
+// -----------------------------------------------------------------------------
+// CConnMonConnectionStatusChange::CConnMonConnectionStatusChange
+// -----------------------------------------------------------------------------
+//
+CConnMonConnectionStatusChange::CConnMonConnectionStatusChange(
+    const TUint aConnectionId,
+    const TUint aSubConnectionId,
+    const TInt aConnectionStatus ) :
+    CConnMonEventBase(EConnMonConnectionStatusChange, aConnectionId)
+    {
+    iSubConnectionId = aSubConnectionId;
+    iConnectionStatus = aConnectionStatus;
+    }
+
+// Destructor
+CConnMonConnectionStatusChange::~CConnMonConnectionStatusChange()
+    {
+    }
+
+// Request status for canceling stubbed async request
+TRequestStatus* iStubRequestStatus = 0;
+
+void RConnectionMonitor::CancelAsyncRequest(
+    TInt aReqToCancel)
+{
+    (void)aReqToCancel;
+    User::RequestComplete(iStubRequestStatus, KErrCancel);
+    iStubRequestStatus = 0;
+}
+
+void RConnectionMonitor::GetConnectionCount(
+    TUint& aConnectionCount,
+    TRequestStatus& aStatus)
+{
+    aConnectionCount = testContext.connMon_.activeConnections_.activeConnList_.count();
+    User::RequestComplete(&aStatus, KErrNone);
+}
+
+TInt RConnectionMonitor::GetConnectionInfo(
+        const TUint aIndex,
+        TUint& aConnectionId,
+        TUint& aSubConnectionCount ) const
+{
+    aConnectionId = testContext.connMon_.activeConnections_.activeConnList_[aIndex - 1]->connectionId();
+    aSubConnectionCount = 0;
+    return KErrNone; // TODO: put return value into context.
+}
+
+void RConnectionMonitor::GetIntAttribute(
+        const TUint aConnectionId,
+        const TUint /* aSubConnectionId */,
+        const TUint aAttribute,
+        TInt& aValue,
+        TRequestStatus& aStatus )
+{
+    WlanQtUtilsCtxActiveConn *activeConn = testContext.connMon_.activeConnections_.findActiveConn(aConnectionId);
+    if (aAttribute == KBearer) {
+        aValue = activeConn->connMonBearerType_;
+    } else if (aAttribute == KConnectionStatus) {
+        aValue = activeConn->connMonConnectionStatus_;
+    } else {
+        Q_ASSERT(false);
+    }
+    User::RequestComplete(&aStatus, KErrNone); // TODO: Take return value from the context.
+}
+
+void RConnectionMonitor::GetUintAttribute(
+        const TUint aConnectionId,
+        const TUint /* aSubConnectionId */,
+        const TUint aAttribute,
+        TUint& aValue,
+        TRequestStatus& aStatus )
+{
+    WlanQtUtilsCtxActiveConn *activeConn = testContext.connMon_.activeConnections_.findActiveConn(aConnectionId);
+    if (aAttribute == KIAPId) {
+        aValue = activeConn->iapId();
+    } else {
+        Q_ASSERT(false);
+    }
+
+    User::RequestComplete(&aStatus, KErrNone); // TODO: Take return value from the context.
+}
+
+#endif // __WINS__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/tsrc/stubs/stub_esock.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009-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:
+* This is a source file for esock library stub functions
+*/
+
+#include <es_sock.h>
+
+#ifdef __WINS__
+
+// ----------------------------------------------
+// Stub functions for esock library, used in UT
+// ----------------------------------------------
+
+#include "wlanqtutilstestcontext.h"
+
+extern WlanQtUtilsTestContext testContext;
+
+/**
+ * Returns value from test context.
+ * 
+ * TConnPref value cannot be verified easily because the real value passed to the function is
+ * TCommDbConnPref. Dynamic cast from TConnPref to TCommDbConnPref does not work because
+ * TConnPref does not have virtual functions which means that type information for the 
+ * class hierarchy is not created by the compiler.
+ */
+void RConnection::Start(class TConnPref &, class TRequestStatus &aStatus)
+{
+    User::RequestComplete(&aStatus, testContext.esock_.startRetValue_);
+}
+
+#endif // __WINS__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/tsrc/stubs/stub_wlanmgmtclient.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,109 @@
+/*
+* 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:
+* WLAN Management API stubbing for WLAN Qt Utilities.
+*/
+
+#include <e32std.h>
+#include <e32base.h>
+#include "wlanmgmtclient.h"
+
+#include "wlanqtutilstestcontext.h"
+
+extern WlanQtUtilsTestContext testContext;
+
+// Request status for canceling stubbed async request
+static TRequestStatus* iStubRequestStatus = 0;
+
+// ---------------------------------------------------------
+// CWlanScanRequest::NewL
+// ---------------------------------------------------------
+//
+CWlanMgmtClient* CWlanMgmtClient::NewL()
+    {
+    CWlanMgmtClient* self = new CWlanMgmtClient;
+    return self;
+    }
+    
+// ---------------------------------------------------------
+// CWlanScanRequest::~CWlanMgmtClient
+// ---------------------------------------------------------
+//
+CWlanMgmtClient::~CWlanMgmtClient()
+    {
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::CWlanMgmtClient
+// ---------------------------------------------------------
+//
+CWlanMgmtClient::CWlanMgmtClient()
+    {
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::GetScanResults
+// ---------------------------------------------------------
+//
+void CWlanMgmtClient::GetScanResults(
+    TRequestStatus& aStatus,
+    CWlanScanInfo& aResults )
+    {
+    if (testContext.mScan.mCompleteWlanScan) {
+        // Complete the request immediately
+        TRequestStatus *status = &aStatus;
+        User::RequestComplete(
+            status,
+            testContext.mScan.mScanRetValue);
+    } else {
+        iStubRequestStatus = &aStatus;
+    }
+    
+    // Results are returned when asked per AP
+    (void)aResults;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::GetScanResults
+// ---------------------------------------------------------
+//
+void CWlanMgmtClient::GetScanResults(
+    TWlanSsid& aSsid,
+    TRequestStatus& aStatus,
+    CWlanScanInfo& aResults )
+    {
+    if (testContext.mScan.mCompleteWlanScan) {
+        // Complete the request immediately
+        TRequestStatus *status = &aStatus;
+        User::RequestComplete(
+            status,
+            testContext.mScan.mScanRetValue);
+    } else {
+        iStubRequestStatus = &aStatus;
+    }
+    
+    // Results are returned when asked per AP
+    (void)aSsid;
+    (void)aResults;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::CancelGetScanResults
+// ---------------------------------------------------------
+//
+void CWlanMgmtClient::CancelGetScanResults()
+    {
+    User::RequestComplete(iStubRequestStatus, KErrCancel);
+    iStubRequestStatus = 0;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/tsrc/stubs/stub_wlanscaninfo.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,286 @@
+/*
+* 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:
+* WLAN Management API stubbing for WLAN Qt Utilities.
+*/
+
+#include <e32base.h>
+#include "wlanscaninfo.h"
+
+#include <cmmanager_shim.h>
+
+#include "wlanqtutilstestcontext.h"
+#include "wlanqtutilsap.h"
+
+extern WlanQtUtilsTestContext testContext;
+
+// Information Element ID for SSID as specified in 802.11.
+static const TUint8 KWlan802Dot11SsidIE = 0;
+
+// Bit mask for Capability info field to get type (Infra/AdHoc).
+static const TUint8 KWlan802Dot11CapabilityEssMask = 0x0001;
+
+// ---------------------------------------------------------
+// CWlanScanInfo::NewL
+// ---------------------------------------------------------
+//
+CWlanScanInfo* CWlanScanInfo::NewL()
+    {
+    CWlanScanInfo* self = new CWlanScanInfo;
+    return self;
+    }
+    
+// ---------------------------------------------------------
+// CWlanScanInfo::~CWlanScanInfo
+// ---------------------------------------------------------
+//
+CWlanScanInfo::~CWlanScanInfo()
+    {
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::~First
+// ---------------------------------------------------------
+//
+const TWlanScanInfoFrame* CWlanScanInfo::First()
+    {
+    // Rewind to the beginning of scan result list
+    testContext.mScan.mScanResultIterator = 0;
+    
+    return (TWlanScanInfoFrame*)1;   // Info frame is not supported
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::~Next
+// ---------------------------------------------------------
+//
+const TWlanScanInfoFrame* CWlanScanInfo::Next()
+    {
+    // Go to next AP in scan results
+    testContext.mScan.mScanResultIterator++;
+    
+    return (TWlanScanInfoFrame*)1;   // Info frame is not supported
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::~IsDone
+// ---------------------------------------------------------
+//
+TBool CWlanScanInfo::IsDone() const
+    {
+    TBool result = EFalse;
+    
+    // Iterating is complete when iterator is one past the last item
+    if (testContext.mScan.mScanResultIterator >=
+        testContext.mScan.mWlanScanResultList.count()) {
+        result = ETrue;
+    }
+    
+    return result;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::RXLevel
+// ---------------------------------------------------------
+//
+TUint8 CWlanScanInfo::RXLevel() const
+    {
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    int rxlevel = ap->value(WlanQtUtilsAp::ConfIdSignalStrength).toInt();
+    
+    return (TUint8)rxlevel;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::Bssid
+// ---------------------------------------------------------
+//
+void CWlanScanInfo::Bssid(
+    TWlanBssid& aBssid ) const
+    {
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    QByteArray bssid = ap->value(WlanQtUtilsAp::ConfIdBssid).toByteArray();
+
+    // Length must match, since BSSID is always the same length
+    Q_ASSERT(bssid.length() == KWlanMaxBssidLength);
+    
+    // Copy the BSSID
+    aBssid.Copy((const unsigned char *)bssid.constData(), bssid.length());
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::Capability
+// ---------------------------------------------------------
+//
+TUint16 CWlanScanInfo::Capability() const
+    {
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    
+    TUint16 capabilities = 0;
+    
+    // Only connection mode cabability is supported 
+    int connMode = ap->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt();
+    if (connMode == CMManagerShim::Infra) {
+        capabilities |= KWlan802Dot11CapabilityEssMask; 
+    }
+    
+    return capabilities;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::InformationElement
+// ---------------------------------------------------------
+//
+TInt CWlanScanInfo::InformationElement(
+    TUint8 aIE, 
+    TUint8& aLength, 
+    const TUint8** aData )
+    {
+    // Static SSID buffer
+    static TBuf8<255> ssidBuffer;
+    
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    
+    aLength = 0;
+    
+    // Only SSID IE is supported
+    Q_ASSERT(aIE == KWlan802Dot11SsidIE);
+    (void)aIE;
+    
+    // Cypy the SSID
+    QString ssid = ap->value(WlanQtUtilsAp::ConfIdSsid).toString();
+    QByteArray ssidData(ssid.toUtf8());
+    ssidBuffer.Copy(
+        (TUint8*)ssidData.data(),
+        ssidData.length());
+
+    // Give reference to the buffer to the caller
+    *aData = ssidBuffer.Ptr();
+    aLength = (TUint8)ssidBuffer.Length();
+    
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::IsProtectedSetupSupported
+// ---------------------------------------------------------
+//
+TBool CWlanScanInfo::IsProtectedSetupSupported()
+    {
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    
+    TBool wpsSupport;
+    bool wps = ap->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool();
+    if (wps) {
+        wpsSupport = ETrue;
+    } else {
+        wpsSupport = EFalse;
+    }
+    
+    return wpsSupport;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::ExtendedSecurityMode
+// ---------------------------------------------------------
+//
+TWlanConnectionExtentedSecurityMode CWlanScanInfo::ExtendedSecurityMode() const
+    {
+    QSharedPointer<WlanQtUtilsAp> ap(GetCurrentAp());
+    int secMode = ap->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt();
+    bool pskUse = ap->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool();
+    
+    TWlanConnectionExtentedSecurityMode ret;
+    switch (secMode) {
+    case CMManagerShim::WlanSecModeWep:
+        // Both WEP security modes are mapped to same WEP sec mode value.
+        // We test both of them, and toggle the used value each time.
+        static bool wepOpen = true;
+        if (wepOpen) {
+            ret = EWlanConnectionExtentedSecurityModeWepOpen;
+        } else {
+            ret = EWlanConnectionExtentedSecurityModeWepShared;
+        }
+        wepOpen = !wepOpen;
+        break;
+        
+    case CMManagerShim::WlanSecMode802_1x:
+        ret = EWlanConnectionExtentedSecurityMode802d1x;        
+        break;
+        
+    case CMManagerShim::WlanSecModeWpa:
+        if (pskUse)
+            {
+            ret = EWlanConnectionExtentedSecurityModeWpaPsk;
+            }
+        else
+            {
+            ret = EWlanConnectionExtentedSecurityModeWpa;            
+            }
+        break;
+        
+    case CMManagerShim::WlanSecModeWpa2:
+        if (pskUse)
+            {
+            ret = EWlanConnectionExtentedSecurityModeWpa2Psk;
+            }
+        else
+            {
+            ret = EWlanConnectionExtentedSecurityModeWpa2;            
+            }
+        break;
+        
+    case CMManagerShim::WlanSecModeWapi:
+        if (pskUse)
+            {
+            ret = EWlanConnectionExtentedSecurityModeWapiPsk;
+            }
+        else
+            {
+            ret = EWlanConnectionExtentedSecurityModeWapi;            
+            }
+        break;
+        
+    default:
+        ret = EWlanConnectionExtentedSecurityModeOpen;
+        break;
+    }
+    
+    return ret;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::CWlanScanInfo
+// ---------------------------------------------------------
+//
+CWlanScanInfo::CWlanScanInfo()
+    {
+    }
+
+// ---------------------------------------------------------
+// CWlanScanInfo::GetCurrentAp
+// ---------------------------------------------------------
+//
+QSharedPointer<WlanQtUtilsAp> CWlanScanInfo::GetCurrentAp() const
+    {
+    // If this fails, client iterates erroneously
+    Q_ASSERT(!IsDone());
+    
+    // Get the currently iterated AP
+    QSharedPointer<WlanQtUtilsAp> ap(
+        testContext.mScan.mWlanScanResultList[
+            testContext.mScan.mScanResultIterator]);
+    
+    return ap;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/tsrc/stubs/wlanmgmtclient.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* 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:
+* WLAN Management API stubbing for WLAN Qt Utilities.
+*/
+
+#ifndef WLANMGMTCLIENT_H
+#define WLANMGMTCLIENT_H
+
+#include "wlanmgmtcommon.h"
+#include "wlanscaninfo.h"
+
+// CLASS DECLARATION
+
+class CWlanMgmtClient : public CBase
+    {
+    public:  // Methods
+
+        // Constructors and destructor
+
+        /**
+         * Static constructor.
+         * @return Pointer to the constructed object.
+         */
+        static CWlanMgmtClient* NewL();
+
+        /**
+         * Destructor.
+         */
+        ~CWlanMgmtClient();
+
+        /**
+         * Perform a broadcast scan and return the detected WLAN networks.
+         *
+         * @param aStatus Status of the calling active object. On successful
+         *                completion contains KErrNone, otherwise one of the
+         *                system-wide error codes.
+         * @param aResults Results of the scan.
+         */
+        void GetScanResults(
+            TRequestStatus& aStatus,
+            CWlanScanInfo& aResults );
+
+        /**
+         * Perform a direct scan for an SSID and return the detected WLAN networks.
+         * If the SSID has zero length, a broadcast scan will be done.
+         *
+         * @param aSsid name of the WLAN network
+         * @param aStatus Status of the calling active object. On successful
+         *                completion contains KErrNone, otherwise one of the
+         *                system-wide error codes.
+         * @param aResults Results of the scan.
+         */
+        void GetScanResults(
+            TWlanSsid& aSsid,
+            TRequestStatus& aStatus,
+            CWlanScanInfo& aResults );
+        
+        /**
+         * Cancel an outstanding scan request.
+         */
+        void CancelGetScanResults();
+        
+    private: // Data
+        
+        CWlanMgmtClient();
+    };
+
+#endif // WLANMGMTCLIENT_H
--- a/wlanutilities/wlanqtutilities/tsrc/stubs/wlanqtutilsconnmonstub.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,704 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-* This is a source file for connmon library stub functions
-*/
-
-#include <QString>
-#include <QObject>
-#include <QVariant>
-#include <rconnmon.h>
-#include <nifvar.h>
-#include <cmmanager_shim.h>
-
-#include "wlanqtutilsap.h"
-
-#ifdef __WINS__
-
-// TODO: This function is copied from ConnMonWLANNetworksArrayPckg_v2.cpp because this
-// function, although being in rconnmon.h, is not in the interface because IMPORT_C/EXPORT_C
-// declarations are not used for this particular constructor. The only change that was made to 
-// this version was to remove traces and some empty lines. This function is needed when
-// creating output in RConnectionMonitor::GetPckgAttribute() for WLAN scan results.
-// This is needed for both UT and emulator compilation.
-CConnMonWlanNetworksPtrArrayPckg::CConnMonWlanNetworksPtrArrayPckg(
-    const RPointerArray<CConnMonWlanNetwork>& aRef,
-    TUint aBufLen )
-    {
-    RPointerArray<HBufC> items;
-    TUint len( 0 );
-
-    for ( TUint i( 0 ); i < aRef.Count(); ++i )
-        {
-        const HBufC* item( aRef[i]->ToBuf() );
-        if ( item )
-            {
-            // Is there room in buffer
-            TUint countFields( 3 ); // aRef.Count(); items->Count(); item->Length()
-            if ( (countFields + len + item->Length()) > aBufLen )
-                {
-                delete item;
-                item = NULL;
-                break;
-                }
-            items.Append( item );
-            ++( len += item->Length() ); // ++ is for item's size
-            }
-        else
-            {
-            ; // There was a trace.
-            }
-        }
-    // Check that given buflen (aBufLen) is not smaller than one
-    // item (TConnMonWLANNetwork) + aRef count + items count
-    // + item length
-    if ( items.Count() == 0 && aRef.Count() > 0 )
-        {
-        aBufLen = 2; // aRef.Count(), items.Count()
-        }
-
-    iBuf = HBufC::New( aBufLen ); // Set size exactly to a buffer length
-    if ( !iBuf )
-        {
-        items.ResetAndDestroy();
-        items.Close();
-        return;
-        }
-    iBuf->Des().Append( aRef.Count() ); // Total amount of data
-    iBuf->Des().Append( items.Count() );  // Amount of transferring data
-    for ( TUint i(0); i<items.Count(); ++i )
-        {
-        iBuf->Des().Append( items[i]->Length() );
-        iBuf->Des().Append( *items[i] );
-        }
-    items.ResetAndDestroy();
-    items.Close();
-    }
-
-// -----------------------------------------------------------------------------
-// CConnMonEventBase::CConnMonEventBase
-// -----------------------------------------------------------------------------
-//
-CConnMonEventBase::CConnMonEventBase( const TInt aEventType, const TUint aConnectionId )
-    {
-    iEventType = aEventType;
-    iConnectionId = aConnectionId;
-    }
-
-// Destructor
-CConnMonEventBase::~CConnMonEventBase()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CConnMonEventBase::EventType
-// -----------------------------------------------------------------------------
-//
-TInt CConnMonEventBase::EventType() const
-    {
-    return iEventType;
-    }
-
-// -----------------------------------------------------------------------------
-// CConnMonConnectionStatusChange::CConnMonConnectionStatusChange
-// -----------------------------------------------------------------------------
-//
-CConnMonConnectionStatusChange::CConnMonConnectionStatusChange(
-    const TUint aConnectionId,
-    const TUint aSubConnectionId,
-    const TInt aConnectionStatus ) :
-    CConnMonEventBase(EConnMonConnectionStatusChange, aConnectionId)
-    {
-    iSubConnectionId = aSubConnectionId;
-    iConnectionStatus = aConnectionStatus;
-    }
-
-// Destructor
-CConnMonConnectionStatusChange::~CConnMonConnectionStatusChange()
-    {
-    }
-
-#ifdef WLANQTUTILS_T_WLANQTUTILS_UT_FLAG
-
-// ----------------------------------------------
-// Stub functions for connmon library, used in UT
-// ----------------------------------------------
-
-#include "wlanqtutilstestcontext.h"
-
-extern WlanQtUtilsTestContext testContext;
-
-// Request status for canceling stubbed async request
-TRequestStatus* iStubRequestStatus = 0;
-
-EXPORT_C void RConnectionMonitor::CancelAsyncRequest(
-    TInt aReqToCancel)
-{
-    (void)aReqToCancel;
-    User::RequestComplete(iStubRequestStatus, KErrCancel);
-    iStubRequestStatus = 0;
-}
-
-EXPORT_C void RConnectionMonitor::GetConnectionCount(
-    TUint& aConnectionCount,
-    TRequestStatus& aStatus)
-{
-    aConnectionCount = testContext.connMon_.activeConnections_.activeConnList_.count();
-    User::RequestComplete(&aStatus, KErrNone);
-}
-
-EXPORT_C TInt RConnectionMonitor::GetConnectionInfo(
-        const TUint aIndex,
-        TUint& aConnectionId,
-        TUint& aSubConnectionCount ) const
-{
-    aConnectionId = testContext.connMon_.activeConnections_.activeConnList_[aIndex - 1]->connectionId();
-    aSubConnectionCount = 0;
-    return KErrNone; // TODO: put return value into context.
-}
-
-EXPORT_C void RConnectionMonitor::GetIntAttribute(
-        const TUint aConnectionId,
-        const TUint /* aSubConnectionId */,
-        const TUint aAttribute,
-        TInt& aValue,
-        TRequestStatus& aStatus )
-{
-    WlanQtUtilsCtxActiveConn *activeConn = testContext.connMon_.activeConnections_.findActiveConn(aConnectionId);
-    if (aAttribute == KBearer) {
-        aValue = activeConn->connMonBearerType_;
-    } else if (aAttribute == KConnectionStatus) {
-        aValue = activeConn->connMonConnectionStatus_;
-    } else {
-        Q_ASSERT(false);
-    }
-    User::RequestComplete(&aStatus, KErrNone); // TODO: Take return value from the context.
-}
-
-EXPORT_C void RConnectionMonitor::GetUintAttribute(
-        const TUint aConnectionId,
-        const TUint /* aSubConnectionId */,
-        const TUint aAttribute,
-        TUint& aValue,
-        TRequestStatus& aStatus )
-{
-    WlanQtUtilsCtxActiveConn *activeConn = testContext.connMon_.activeConnections_.findActiveConn(aConnectionId);
-    if (aAttribute == KIAPId) {
-        aValue = activeConn->iapId();
-    } else {
-        Q_ASSERT(false);
-    }
-
-    User::RequestComplete(&aStatus, KErrNone); // TODO: Take return value from the context.
-}
-
-EXPORT_C void RConnectionMonitor::GetPckgAttribute(
-    const TUint aConnectionId,
-    const TUint aSubConnectionId,
-    const TUint aAttribute,
-    TDes8& aValue,
-    TRequestStatus& aStatus ) const
-{
-    // This is copy-paste from real implementation and we'll use that for other requests.
-    TIpcArgs args(aConnectionId, aSubConnectionId, aAttribute, &aValue);
-    SendReceive(EReqGetPckgAttribute, args, aStatus);
-}
-
-// ---------------------------------------------------------
-// connUtils2ConnMonSecModeMap()
-// Local function to map WlanQtUtilsWlanSecMode into Connection
-// monitor's security mode. Currently for UT use only.
-// ---------------------------------------------------------
-//
-static TUint connUtils2ConnMonSecModeMap(int connUtilsWlanSecMode, bool pskUse)
-{
-    TUint ret;
-    switch (connUtilsWlanSecMode) {
-    case CMManagerShim::WlanSecModeWep:
-        ret = EConnMonSecurityV2WepOpen;
-        break;
-    case CMManagerShim::WlanSecMode802_1x:
-        ret = EConnMonSecurityV2802d1x;        
-        break;
-    case CMManagerShim::WlanSecModeWpa:
-        if (pskUse) {
-            ret = EConnMonSecurityV2WpaPsk;
-        } else {
-            ret = EConnMonSecurityV2Wpa;            
-        }
-        break;
-    case CMManagerShim::WlanSecModeWpa2:
-        if (pskUse) {
-            ret = EConnMonSecurityV2Wpa2Psk;
-        } else {
-            ret = EConnMonSecurityV2Wpa2;            
-        }
-        break;
-    case CMManagerShim::WlanSecModeWapi:
-        if (pskUse) {
-            ret = EConnMonSecurityV2WapiPsk;
-        } else {
-            ret = EConnMonSecurityV2Wapi;            
-        }
-        break;
-    default:
-        ret = EConnMonSecurityV2Open;
-        break;
-    }
-    return ret;
-}
-
-
-// ---------------------------------------------------------
-// connUtils2ConnMonConModeMap()
-// ---------------------------------------------------------
-//
-static TUint connUtils2ConnMonConModeMap(int connUtilsWlanConMode)
-{
-    TUint ret;
-    switch (connUtilsWlanConMode) {
-    case CMManagerShim::Adhoc:
-        ret = EConnMonAdHoc;
-        break;
-    case CMManagerShim::Infra:
-        ret = EConnMonInfraStructure;        
-        break;
-    }
-    return ret;
-}
-
-
-EXPORT_C void RConnectionMonitor::GetPckgAttribute(
-    const TUint /* aConnectionId */,
-    const TUint /* aSubConnectionId */,
-    const TUint /* aAttribute */,
-    TDes16& aValue,
-    TRequestStatus& aStatus ) const
-    {
-    // TODO: verify input parameters, i.e., first three params...
-    
-    RConnMonWlanNetworksPtrArray wlanPtrArray;
-    RBuf vendorData;
-
-    for (int i = 0; i < testContext.connMon_.wlanScanResult_.wlanScanResultList_.count(); i++) {
-        WlanQtUtilsAp* ap = testContext.connMon_.wlanScanResult_.wlanScanResultList_[i];
-        TBufC<CConnMonWlanNetwork::KMaxNameLength> name(ap->value(WlanQtUtilsAp::ConfIdSsid).toString().utf16());
-
-        TBufC<CConnMonWlanNetwork::KWlanBssId> bssid16(QString("addMAC").utf16());
-        TBuf8<CConnMonWlanNetwork::KWlanBssId> bssid;
-        bssid.Copy(bssid16);
-        
-        CConnMonWlanNetwork* wlanAp = CConnMonWlanNetwork::NewL(
-            name,
-            connUtils2ConnMonConModeMap(ap->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt()),
-            ap->value(WlanQtUtilsAp::ConfIdSignalStrength).toInt(),
-            0, // old security mode not used anymore
-            connUtils2ConnMonSecModeMap(
-                ap->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(),
-                ap->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool()),
-            0,
-            bssid,
-            vendorData );
-        wlanPtrArray.Append(wlanAp);
-    }
-
-    CConnMonWlanNetworksPtrArrayPckg wlanBuf(wlanPtrArray, 2560);
-    aValue.Copy(wlanBuf.Buf()->Des());
-
-    if (testContext.connMon_.wlanScanResult_.completeWlanScan_) {
-        User::RequestComplete(&aStatus, testContext.connMon_.wlanScanResult_.scanRetValue_);
-    } else {
-        iStubRequestStatus = &aStatus;
-    }
-    }
-
-#else // WLANQTUTILS_T_WLANQTUTILS_UT_FLAG
-
-// ----------------------------------------------------
-// Stub functions for connmon library, used in emulator
-// ----------------------------------------------------
-
-#if 0
-// In emulator, there are always two active connections.
-// The following functions return different properties of these active connection
-// so that it's easy to test in emulator.
-
-EXPORT_C void RConnectionMonitor::GetConnectionCount(
-    TUint& aConnectionCount,
-    TRequestStatus& aStatus)
-{
-    aConnectionCount = 2;
-    User::RequestComplete(&aStatus, KErrNone);
-}
-
-EXPORT_C TInt RConnectionMonitor::GetConnectionInfo(
-        const TUint aIndex,
-        TUint& aConnectionId,
-        TUint& aSubConnectionCount ) const
-{
-    if (aIndex == 1) {
-        aConnectionId = 10;
-    } else if (aIndex == 2) {
-        aConnectionId = 20;
-    } else {
-        Q_ASSERT(false);
-    }
-
-    aSubConnectionCount = 0;
-    return KErrNone;
-}
-
-EXPORT_C void RConnectionMonitor::GetIntAttribute(
-        const TUint aConnectionId,
-        const TUint /* aSubConnectionId */,
-        const TUint aAttribute,
-        TInt& aValue,
-        TRequestStatus& aStatus )
-{
-    if (aAttribute == KBearer) {
-        if (aConnectionId == 10) {
-            aValue = EBearerGPRS;
-        } else if (aConnectionId == 20) {
-            aValue = EBearerWLAN;
-        } else {
-            Q_ASSERT(false);
-        }
-    } else if (aAttribute == KConnectionStatus) {
-        if (aConnectionId == 10) {
-            aValue = KConnectionOpen;
-        } else if (aConnectionId == 20) {
-            aValue = KStartingConnection;
-        } else {
-            Q_ASSERT(false);
-        }
-    } else if (aAttribute == KSignalStrength) {
-        if (aConnectionId == 10) {
-            Q_ASSERT(false);
-        } else if (aConnectionId == 20) {
-            aValue = 78;
-        } else {
-            Q_ASSERT(false);
-        }
-    } else if (aAttribute == KNetworkMode) {
-        if (aConnectionId == 10) {
-            Q_ASSERT(false);
-        } else if (aConnectionId == 20) {
-            aValue = EConnMonInfraStructure;
-        } else {
-            Q_ASSERT(false);
-        }
-    } else if (aAttribute == KSecurityMode) {
-        if (aConnectionId == 10) {
-            Q_ASSERT(false);
-        } else if (aConnectionId == 20) {
-            aValue = EConnMonSecurityWpaPsk;
-        } else {
-            Q_ASSERT(false);
-        }
-    } else {
-        Q_ASSERT(false);
-    }
-    User::RequestComplete(&aStatus, KErrNone);
-}
-
-EXPORT_C void RConnectionMonitor::GetUintAttribute(
-        const TUint aConnectionId,
-        const TUint /* aSubConnectionId */,
-        const TUint aAttribute,
-        TUint& aValue,
-        TRequestStatus& aStatus )
-{
-    if (aAttribute == KIAPId) {
-        if (aConnectionId == 10) {
-            aValue = 1;
-        } else if (aConnectionId == 20) {
-            aValue = 10;
-        } else {
-            Q_ASSERT(false);
-        }
-    } else if (aAttribute == KDownlinkData) {
-        if (aConnectionId == 10) {
-            aValue = 123;
-        } else if (aConnectionId == 20) {
-            aValue = 12345;
-        } else {
-            Q_ASSERT(false);
-        }
-    } else if (aAttribute == KUplinkData) {
-        if (aConnectionId == 10) {
-            aValue = 987654321;
-        } else if (aConnectionId == 20) {
-            aValue = 1234567890;
-        } else {
-            Q_ASSERT(false);
-        }
-    } else if (aAttribute == KTransmitPower) {
-        if (aConnectionId == 10) {
-            Q_ASSERT(false);
-        } else if (aConnectionId == 20) {
-            aValue = 50;
-        } else {
-            Q_ASSERT(false);
-        }
-    } else {
-        Q_ASSERT(false);
-    }
-
-    User::RequestComplete(&aStatus, KErrNone);
-}
-
-EXPORT_C void RConnectionMonitor::GetBoolAttribute(
-        const TUint aConnectionId,
-        const TUint /* aSubConnectionId */,
-        const TUint aAttribute,
-        TBool& aValue,
-        TRequestStatus& aStatus )
-{
-    if (aAttribute == KConnectionActive) {
-        if (aConnectionId == 10) {
-            aValue = EFalse;
-        } else if (aConnectionId == 20) {
-            aValue = ETrue;
-        } else {
-            Q_ASSERT(false);
-        }
-    } else {
-        Q_ASSERT(false);
-    }
-
-    User::RequestComplete(&aStatus, KErrNone);
-}
-
-EXPORT_C void RConnectionMonitor::GetStringAttribute(
-    const TUint aConnectionId,
-    const TUint /* aSubConnectionId */,
-    const TUint aAttribute,
-    TDes& aValue,
-    TRequestStatus& aStatus ) const
-{
-    if (aAttribute == KIAPName) {
-        if (aConnectionId == 10) {
-            _LIT(iapNameLit, "PACKET DATA 1");
-            TBufC<KConnMonMaxStringAttributeLength> iapName(iapNameLit);
-            aValue = iapName.Des();
-        } else if (aConnectionId == 20) {
-            _LIT(iapNameLit, "WLAN IAP 3");
-            TBufC<KConnMonMaxStringAttributeLength> iapName(iapNameLit);
-            aValue = iapName.Des();
-        } else {
-            Q_ASSERT(false);
-        }
-    } else if (aAttribute == KNetworkName) {
-        if (aConnectionId == 10) {
-            Q_ASSERT(false);
-        } else if (aConnectionId == 20) {
-            _LIT(ssidLit, "WLAN SSID 3");
-            TBufC<KConnMonMaxStringAttributeLength> ssid(ssidLit);
-            aValue = ssid.Des();
-        } else {
-            Q_ASSERT(false);
-        }
-    } else if (aAttribute == KAccessPointName) {
-        if (aConnectionId == 10) {
-            _LIT(iapNameLit, "PACKET DATA 1");
-            TBufC<KConnMonMaxStringAttributeLength> iapName(iapNameLit);
-            aValue = iapName.Des();
-        } else if (aConnectionId == 20) {
-            Q_ASSERT(false);
-        } else {
-            Q_ASSERT(false);
-        }
-    } else {
-        Q_ASSERT(false);
-    }
-
-    User::RequestComplete(&aStatus, KErrNone);
-}
-
-EXPORT_C void RConnectionMonitor::GetPckgAttribute(
-    const TUint aConnectionId,
-    const TUint aSubConnectionId,
-    const TUint aAttribute,
-    TDes8& aValue,
-    TRequestStatus& aStatus ) const
-{
-    if (aAttribute == KStartTime) {
-        if (aConnectionId == 10) {
-            TDateTime dateTime(2009, EMarch, 31-1, 15, 15, 15, 0);
-            TTime time(dateTime);
-            TConnMonTimeBuf timePckg(time);
-            aValue.Copy(timePckg);
-        } else if (aConnectionId == 20) {
-            TTime time;
-            time.UniversalTime();
-            TConnMonTimeBuf timePckg(time);
-            aValue.Copy(timePckg);
-        } else {
-            Q_ASSERT(false);
-        }
-        User::RequestComplete(&aStatus, KErrNone);
-    } else if (aAttribute == KClientInfo) {
-        TConnMonClientEnum applications;
-        if (aConnectionId == 10) {
-            applications.iCount = 1;
-            applications.iUid[0].iUid = 0x10008D39; // Web
-            applications.iUid[1].iUid = 0;
-            applications.iUid[2].iUid = 0;
-            applications.iUid[3].iUid = 0;
-            applications.iUid[4].iUid = 0;
-            applications.iUid[5].iUid = 0;
-            applications.iUid[6].iUid = 0;
-            applications.iUid[7].iUid = 0;
-            applications.iUid[8].iUid = 0;
-            applications.iUid[9].iUid = 0;
-        } else if (aConnectionId == 20) {
-            applications.iCount = 7;
-            applications.iUid[0].iUid = 0x101fd9c5; // KBannedServerUID
-            applications.iUid[1].iUid = 0x1020728E; // KFeedsServerUid
-            applications.iUid[2].iUid = 0x10008D60; // KDownloadMgrServerUid
-            applications.iUid[3].iUid = 0x1000484b; // KMessagingServerUid
-            applications.iUid[4].iUid = 0x102033E6; // KJavaVMUid
-            applications.iUid[5].iUid = 0x102073CA; // KSUPLServerUid
-            applications.iUid[6].iUid = 0x200212F3; // Connect Screen
-            applications.iUid[7].iUid = 0;
-            applications.iUid[8].iUid = 0;
-            applications.iUid[9].iUid = 0;
-        } else {
-            Q_ASSERT(false);
-        }
-        TPckgBuf< TConnMonClientEnum > applicationsPckg( applications );
-        aValue.Copy(applicationsPckg);
-        User::RequestComplete(&aStatus, KErrNone);
-    } else {
-        // This is copy-paste from real implementation and we'll use that for other requests.
-        TIpcArgs args( aConnectionId, aSubConnectionId, aAttribute, &aValue );
-        SendReceive( EReqGetPckgAttribute, args, aStatus );
-    }
-}
-#endif
-
-// This function returns WLAN scan results.
-// Six results in every second scan and the others have two.
-EXPORT_C void RConnectionMonitor::GetPckgAttribute(
-    const TUint /* aConnectionId */,
-    const TUint /* aSubConnectionId */,
-    const TUint aAttribute,
-    TDes16& aValue,
-    TRequestStatus& aStatus ) const {
-
-    if (aAttribute == KWlanNetworks) {
-        RConnMonWlanNetworksPtrArray wlanPtrArray;
-        RBuf vendorData;
-    
-        TBufC<CConnMonWlanNetwork::KWlanBssId> bssid16(QString("addMAC").utf16());
-        TBuf8<CConnMonWlanNetwork::KWlanBssId> bssid;
-        bssid.Copy(bssid16);
-    
-        static bool refresh = true;
-    
-        _LIT(wlanAp1Name, "Test AP 1");
-        TBufC<CConnMonWlanNetwork::KMaxNameLength> name1(wlanAp1Name);
-        CConnMonWlanNetwork* wlanAp1 = CConnMonWlanNetwork::NewL(
-            name1,
-            EConnMonInfraStructure,
-            20,
-            EConnMonSecurityOpen,
-            EConnMonSecurityV2Open,
-            0,
-            bssid,
-            vendorData );
-        wlanPtrArray.Append(wlanAp1);
-    
-        _LIT(wlanAp2Name, "Test AP 2");
-        TBufC<CConnMonWlanNetwork::KMaxNameLength> name2(wlanAp2Name);
-        CConnMonWlanNetwork* wlanAp2 = CConnMonWlanNetwork::NewL(
-            name2,
-            EConnMonAdHoc,
-            (refresh == true) ? 20 : 90, // signal strength variates between refreshes
-            EConnMonSecurityOpen,
-            EConnMonSecurityV2Open,
-            0,
-            bssid,
-            vendorData );
-        wlanPtrArray.Append(wlanAp2);
-    
-        if (refresh) {
-            _LIT(wlanAp3Name, "Test AP 3");
-            TBufC<CConnMonWlanNetwork::KMaxNameLength> name3(wlanAp3Name);
-            CConnMonWlanNetwork* wlanAp3 = CConnMonWlanNetwork::NewL(
-                name3,
-                EConnMonInfraStructure,
-                20,
-                EConnMonSecurityWep,
-                EConnMonSecurityV2WepOpen,
-                0,
-                bssid,
-                vendorData );
-            wlanPtrArray.Append(wlanAp3);
-    
-            _LIT(wlanAp4Name, "Test AP 4");
-            TBufC<CConnMonWlanNetwork::KMaxNameLength> name4(wlanAp4Name);
-            CConnMonWlanNetwork* wlanAp4 = CConnMonWlanNetwork::NewL(
-                name4,
-                EConnMonInfraStructure,
-                20,
-                EConnMonSecurityOpen,
-                EConnMonSecurityV2Open,
-                0,
-                bssid,
-                vendorData );
-            wlanPtrArray.Append(wlanAp4);
-    
-            _LIT(wlanAp5Name, "Test AP 5");
-            TBufC<CConnMonWlanNetwork::KMaxNameLength> name5(wlanAp5Name);
-            CConnMonWlanNetwork* wlanAp5 = CConnMonWlanNetwork::NewL(
-                name5,
-                EConnMonInfraStructure,
-                20,
-                EConnMonSecurityWpa,
-                EConnMonSecurityV2Wpa,
-                0,
-                bssid,
-                vendorData );
-            wlanPtrArray.Append(wlanAp5);
-    
-            _LIT(wlanAp6Name, "Test AP 6");
-            TBufC<CConnMonWlanNetwork::KMaxNameLength> name6(wlanAp6Name);
-            CConnMonWlanNetwork* wlanAp6 = CConnMonWlanNetwork::NewL(
-                name6,
-                EConnMonInfraStructure,
-                20,
-                EConnMonSecurityWpaPsk,
-                EConnMonSecurityV2WpaPsk,
-                0,
-                bssid,
-                vendorData );
-            wlanPtrArray.Append(wlanAp6);
-    
-            refresh = false;
-        } else {
-            refresh = true;
-        }
-    
-        CConnMonWlanNetworksPtrArrayPckg wlanBuf(wlanPtrArray, 2560); // TODO: buffer size to more dynamic or use constant
-        aValue.Copy(wlanBuf.Buf()->Des());
-    } else {
-        Q_ASSERT(false);
-    }
-    
-    User::RequestComplete(&aStatus, KErrNone);
-}
-
-#endif // WLANQTUTILS_T_WLANQTUTILS_UT_FLAG
-#endif // __WINS__
--- a/wlanutilities/wlanqtutilities/tsrc/stubs/wlanqtutilsconnteststub.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-* This is a source file for connmon library stub functions
-*/
-
-#include <ictsclientinterface.h>
-
-#ifdef __WINS__
-
-#ifdef WLANQTUTILS_T_WLANQTUTILS_UT_FLAG
-
-// ----------------------------------------------
-// Stub functions for ICT library, used in UT
-// ----------------------------------------------
-
-#include "wlanqtutilstestcontext.h"
-
-extern WlanQtUtilsTestContext testContext;
-
-// ----------------------------------------------------
-// NewL is not stubbed -> parameters are not checked at all
-// ----------------------------------------------------
-
-/**
- * Empty implementation to prevent actual ICT from starting. Result callback is called directly
- * in the test cases.
- */
-EXPORT_C void CIctsClientInterface::StartL()
-    {
-    }
-
-#endif // WLANQTUTILS_T_WLANQTUTILS_UT_FLAG
-
-// ----------------------------------------------------
-// No stubs used in emulator
-// ----------------------------------------------------
-#endif // __WINS__
--- a/wlanutilities/wlanqtutilities/tsrc/stubs/wlanqtutilsesockstub.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-* This is a source file for esock library stub functions
-*/
-
-#include <es_sock.h>
-
-#ifdef __WINS__
-
-#ifdef WLANQTUTILS_T_WLANQTUTILS_UT_FLAG
-
-// ----------------------------------------------
-// Stub functions for esock library, used in UT
-// ----------------------------------------------
-
-#include "wlanqtutilstestcontext.h"
-
-extern WlanQtUtilsTestContext testContext;
-
-/**
- * Returns value from test context.
- * 
- * TConnPref value cannot be verified easily because the real value passed to the function is
- * TCommDbConnPref. Dynamic cast from TConnPref to TCommDbConnPref does not work because
- * TConnPref does not have virtual functions which means that type information for the 
- * class hierarchy is not created by the compiler.
- */
-void RConnection::Start(class TConnPref &, class TRequestStatus &aStatus)
-{
-    User::RequestComplete(&aStatus, testContext.esock_.startRetValue_);
-}
-
-#else // WLANQTUTILS_T_WLANQTUTILS_UT_FLAG
-
-// ----------------------------------------------------
-// Stub functions for esock library, used in emulator
-// ----------------------------------------------------
-
-/**
- * Return always success in emulator.
- */
-void RConnection::Start(class TConnPref &, class TRequestStatus &aStatus)
-{
-    User::RequestComplete(&aStatus, KErrNone);
-}
-
-#endif // WLANQTUTILS_T_WLANQTUTILS_UT_FLAG
-#endif // __WINS__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/tsrc/stubs/wlanscaninfo.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,129 @@
+/*
+* 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:
+* WLAN Management API stubbing for WLAN Qt Utilities.
+*/
+
+#ifndef WLANSCANINFO_H
+#define WLANSCANINFO_H
+
+// INCLUDES
+#include <e32def.h>
+#include <e32base.h>
+#include <wlanmgmtcommon.h>
+
+#include <QSharedPointer>
+#include "wlanqtutilsap.h"
+
+typedef TUint8 TWlanScanInfoFrame;
+
+// CLASS DECLARATION
+class CWlanScanInfo : public CBase
+    {
+    public:  // Methods
+
+       // Constructors and destructor
+        
+        /**
+         * Static constructor.
+         * @return Pointer to the constructed object.
+         */
+        static CWlanScanInfo* NewL();
+        
+        /**
+         * Destructor.
+         */
+        ~CWlanScanInfo();
+
+        /**
+         * Find the data of the first access point.
+         * @return Pointer at the beginning of the first access point stored 
+         *         in the scan list. NULL if not any.
+         */
+        const TWlanScanInfoFrame* First();
+
+        /**
+         * Find the data of the next access point.
+         * @return Pointer at the beginning of the next access point stored
+         *         in the scan list. NULL if not any.
+         */
+        const TWlanScanInfoFrame* Next();
+
+        /**
+         * Find is there any more unhandled access points.
+         * @return EFalse if there is access points in the list left, 
+         *         ETrue if not.
+         */
+        TBool IsDone() const;
+
+        /**
+         * Return RX level of the BSS.
+         * @return RX level.
+         */
+        TUint8 RXLevel() const;
+
+        /**
+         * Return BSSID of the BSS.
+         * @param  aBssid ID of the access point or IBSS network.
+         * @return Pointer to the beginning of the BSSID. Length is always 6 bytes.
+         */
+        void Bssid(
+            TWlanBssid& aBssid ) const;
+
+        /**
+         * Get capability of the BSS (see IEEE 802.11 section 7.3.1.4.
+         * @return The capability information.
+         */
+        TUint16 Capability() const;
+
+        /**
+         * Return requested information element.
+         * @param aIE        Id of the requested IE data.
+         * @param aLength    Length of the IE. Zero if IE not found.
+         * @param aData      Pointer to the beginning of the IE data. NULL if IE not found.
+         * @return           General error message.
+         */
+        TInt InformationElement(
+            TUint8 aIE, 
+            TUint8& aLength, 
+            const TUint8** aData );
+
+        /**
+         * Find whether Wi-Fi Protected Setup is supported.
+         * @return ETrue if AP supports Wi-Fi Protected Setup,
+         *         EFalse if not.
+         */
+        TBool IsProtectedSetupSupported();
+
+        /**
+         * Get security mode of the BSS.
+         * @return security mode.
+         */
+        TWlanConnectionExtentedSecurityMode ExtendedSecurityMode() const;
+        
+    private: // Data
+
+        /**
+         * Constructor.
+         */
+        CWlanScanInfo();
+
+        /**
+         * Returns the currently iterated AP.
+         */
+        QSharedPointer<WlanQtUtilsAp> GetCurrentAp() const;
+        
+    };
+
+#endif // WLANSCANINFO_H 
--- a/wlanutilities/wlanqtutilities/tsrc/testwlanqtutils.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/tsrc/testwlanqtutils.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -29,9 +29,7 @@
 #include "wlanqtutils.h"
 #include "wlanqtutils_p.h"
 #include "wlanqtutilsconmonwrapper.h"
-#include "wlanqtutilsconmonwrapperinfo_s60_p.h"
-#include "wlanqtutilsconntestwrapper.h"
-#include "wlanqtutilsconntestwrapper_s60_p.h"
+#include "wlanqtutilsconmonwrapperinfo_symbian.h"
 #include "testwlanqtutils.h"
 #include "wlanqtutilstestcontext.h"
 
@@ -67,7 +65,9 @@
 void TestWlanQtUtils::initTestCase()
 {
     wlanQtUtils_ = NULL;
-    signalScanReady_ = NULL;
+    mSignalScanReady = NULL;
+    mSignalScanApReady = NULL;
+    mSignalScanDirectReady = NULL;
     signalWlanNetworkOpened_ = NULL;
     signalWlanNetworkClosed_ = NULL;
     signalIctResult_ = NULL;
@@ -99,7 +99,9 @@
     testContext.initialize();
 
     QVERIFY(wlanQtUtils_ == NULL);
-    QVERIFY(signalScanReady_ == NULL);
+    QVERIFY(mSignalScanReady == NULL);
+    QVERIFY(mSignalScanApReady == NULL);
+    QVERIFY(mSignalScanDirectReady == NULL);
     QVERIFY(signalWlanNetworkOpened_ == NULL);
     QVERIFY(signalWlanNetworkClosed_ == NULL);
     QVERIFY(signalIctResult_ == NULL);
@@ -114,9 +116,17 @@
     delete wlanQtUtils_;
     wlanQtUtils_ = NULL;
 
-    QCOMPARE(signalScanReady_->count(), 0);
-    delete signalScanReady_;
-    signalScanReady_ = NULL;
+    QCOMPARE(mSignalScanReady->count(), 0);
+    delete mSignalScanReady;
+    mSignalScanReady = NULL;
+
+    QCOMPARE(mSignalScanApReady->count(), 0);
+    delete mSignalScanApReady;
+    mSignalScanApReady = NULL;
+
+    QCOMPARE(mSignalScanDirectReady->count(), 0);
+    delete mSignalScanDirectReady;
+    mSignalScanDirectReady = NULL;
 
     QCOMPARE(signalWlanNetworkOpened_->count(), 0);
     delete signalWlanNetworkOpened_;
@@ -140,20 +150,20 @@
  */
 void TestWlanQtUtils::testAvailableWlan()
 {
-    testContext.connMon_.wlanScanResult_.createDefaultWlanScanResultList(4);
+    testContext.mScan.createDefaultWlanScanResultList(4);
     
     // Request a scan to get result signal
     wlanQtUtils_->scanWlans();
     
     // Let active object run and verify signal.
-    subTestSignalWaitAndTake(signalScanReady_, NULL);
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusOk);
 
     // Get and verify the list of available WLAN APs.
     QList< QSharedPointer<WlanQtUtilsIap> > iaps;
     QList< QSharedPointer<WlanQtUtilsAp> > aps;
     wlanQtUtils_->availableWlans(iaps, aps);
 
-    testContext.connMon_.wlanScanResult_.verifyWlanScanResultList(aps);
+    testContext.mScan.verifyWlanScanResultList(aps);
     QCOMPARE(iaps.count(), 0);
     aps.clear();
 }
@@ -164,27 +174,30 @@
  * Two scan results have the same SSID but different security mode
  * Two scan results have the same SSID and security mode but different WpaPsk value
  * and both are included in the results.
+ * Two scan results have the same SSID but different connection mode
  */
 void TestWlanQtUtils::testAvailableWlanDuplicates()
 {
-    testContext.connMon_.wlanScanResult_.createDefaultWlanScanResultList(10);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[0]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[2]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[5]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID, different SecMode");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[5]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[6]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID, different SecMode");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[6]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeOpen);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[7]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID & SecMode diff Psk");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[7]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa2);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[9]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID & SecMode diff Psk");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[9]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa2);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[9]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse,true);
+    testContext.mScan.createDefaultWlanScanResultList(11);
+    testContext.mScan.mWlanScanResultList[0]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID");
+    testContext.mScan.mWlanScanResultList[2]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID");
+    testContext.mScan.mWlanScanResultList[5]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID, different SecMode");
+    testContext.mScan.mWlanScanResultList[5]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa);
+    testContext.mScan.mWlanScanResultList[6]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID, different SecMode");
+    testContext.mScan.mWlanScanResultList[6]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeOpen);
+    testContext.mScan.mWlanScanResultList[7]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID & SecMode diff Psk");
+    testContext.mScan.mWlanScanResultList[7]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa2);
+    testContext.mScan.mWlanScanResultList[9]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID & SecMode diff Psk");
+    testContext.mScan.mWlanScanResultList[9]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa2);
+    testContext.mScan.mWlanScanResultList[9]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse,true);
+    testContext.mScan.mWlanScanResultList[10]->setValue(WlanQtUtilsAp::ConfIdSsid, "Same SSID");
+    testContext.mScan.mWlanScanResultList[10]->setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Adhoc);
 
     // Request a scan to get result signal
     wlanQtUtils_->scanWlans();
     
     // Let active object run and verify signal.
-    subTestSignalWaitAndTake(signalScanReady_, NULL);
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusOk);
 
     // Get and verify the list of available WLAN APs.
     QList< QSharedPointer<WlanQtUtilsIap> > iaps;
@@ -192,8 +205,8 @@
     wlanQtUtils_->availableWlans(iaps, aps);
 
     // First remove AP that has duplicate SSID.
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_.removeAt(2);
-    testContext.connMon_.wlanScanResult_.verifyWlanScanResultList(aps);
+    testContext.mScan.mWlanScanResultList.removeAt(2);
+    testContext.mScan.verifyWlanScanResultList(aps);
     QCOMPARE(iaps.count(), 0);
     aps.clear();
 }
@@ -204,27 +217,31 @@
  */
 void TestWlanQtUtils::testAvailableWlanSecModes()
 {
-    testContext.connMon_.wlanScanResult_.createDefaultWlanScanResultList(9);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[0]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeOpen);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[0]->setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Adhoc);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[1]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWep);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[2]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecMode802_1x);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[3]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[4]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[4]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse,true);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[5]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa2);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[6]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa2);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[6]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse,true);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[7]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWapi);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[8]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWapi);
+    testContext.mScan.createDefaultWlanScanResultList(11);
+    testContext.mScan.mWlanScanResultList[0]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeOpen);
+    testContext.mScan.mWlanScanResultList[0]->setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Adhoc);
+    testContext.mScan.mWlanScanResultList[1]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWep);
+    testContext.mScan.mWlanScanResultList[2]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWep);
+    testContext.mScan.mWlanScanResultList[3]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecMode802_1x);
+    testContext.mScan.mWlanScanResultList[4]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
+    testContext.mScan.mWlanScanResultList[5]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
+    testContext.mScan.mWlanScanResultList[5]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
+    testContext.mScan.mWlanScanResultList[6]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa2);
+    testContext.mScan.mWlanScanResultList[7]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa2);
+    testContext.mScan.mWlanScanResultList[7]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
+    testContext.mScan.mWlanScanResultList[8]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWapi);
+    testContext.mScan.mWlanScanResultList[9]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWapi);
     // Let's trick the stub to return WapiPsk by putting WpaPskUse on *
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[8]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse,true);
+    testContext.mScan.mWlanScanResultList[9]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
+    testContext.mScan.mWlanScanResultList[10]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa2);
+    testContext.mScan.mWlanScanResultList[10]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
+    testContext.mScan.mWlanScanResultList[10]->setValue(WlanQtUtilsAp::ConfIdWpsSupported, true);
 
     // Request a scan to get result signal
     wlanQtUtils_->scanWlans();
     
     // Let active object run and verify signal.
-    subTestSignalWaitAndTake(signalScanReady_, NULL);
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusOk);
 
     // Get and verify the list of available WLAN APs.
     QList< QSharedPointer<WlanQtUtilsIap> > iaps;
@@ -232,8 +249,8 @@
     wlanQtUtils_->availableWlans(iaps, aps);
 
     // Remove the trick *. WapiPsk and Wapi both map to just Wapi
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[8]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse,false);
-    testContext.connMon_.wlanScanResult_.verifyWlanScanResultList(aps);
+    testContext.mScan.mWlanScanResultList[9]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse,false);
+    testContext.mScan.verifyWlanScanResultList(aps);
     QCOMPARE(iaps.count(), 0);
     aps.clear();
 }
@@ -244,18 +261,18 @@
  */
 void TestWlanQtUtils::testAvailableWlanSsids()
 {
-    testContext.connMon_.wlanScanResult_.createDefaultWlanScanResultList(6);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[1]->setValue(WlanQtUtilsAp::ConfIdSsid, "           ");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[2]->setValue(WlanQtUtilsAp::ConfIdSsid, "    whitespace around ssid  ");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[3]->setValue(WlanQtUtilsAp::ConfIdSsid, QString(QChar()));
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[4]->setValue(WlanQtUtilsAp::ConfIdSsid, "maximum length ssid that is 32 c");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[5]->setValue(WlanQtUtilsAp::ConfIdSsid, "A");
+    testContext.mScan.createDefaultWlanScanResultList(6);
+    testContext.mScan.mWlanScanResultList[1]->setValue(WlanQtUtilsAp::ConfIdSsid, "           ");
+    testContext.mScan.mWlanScanResultList[2]->setValue(WlanQtUtilsAp::ConfIdSsid, "    whitespace around ssid  ");
+    testContext.mScan.mWlanScanResultList[3]->setValue(WlanQtUtilsAp::ConfIdSsid, QString(QChar()));
+    testContext.mScan.mWlanScanResultList[4]->setValue(WlanQtUtilsAp::ConfIdSsid, "maximum length ssid that is 32 c");
+    testContext.mScan.mWlanScanResultList[5]->setValue(WlanQtUtilsAp::ConfIdSsid, "A");
 
     // Request a scan to get result signal
     wlanQtUtils_->scanWlans();
     
     // Let active object run and verify signal.
-    subTestSignalWaitAndTake(signalScanReady_, NULL);
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusOk);
 
     // Get and verify the list of available WLAN APs.
     QList< QSharedPointer<WlanQtUtilsIap> > iaps;
@@ -263,9 +280,9 @@
     wlanQtUtils_->availableWlans(iaps, aps);
 
     // Empty ssids are removed from results
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_.removeAt(3);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_.removeAt(1);
-    testContext.connMon_.wlanScanResult_.verifyWlanScanResultList(aps);
+    testContext.mScan.mWlanScanResultList.removeAt(3);
+    testContext.mScan.mWlanScanResultList.removeAt(1);
+    testContext.mScan.verifyWlanScanResultList(aps);
     QCOMPARE(iaps.count(), 0);
     aps.clear();
 }
@@ -275,20 +292,20 @@
  */
 void TestWlanQtUtils::testAvailableWlanWithIaps()
 {
-    testContext.connMon_.wlanScanResult_.createDefaultWlanScanResultList(7);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[1]->setValue(WlanQtUtilsAp::ConfIdSsid, "WLAN IAP 3");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[1]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa);    
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[1]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse,true);    
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[5]->setValue(WlanQtUtilsAp::ConfIdSsid, "WLAN IAP 1");
+    testContext.mScan.createDefaultWlanScanResultList(7);
+    testContext.mScan.mWlanScanResultList[1]->setValue(WlanQtUtilsAp::ConfIdSsid, "WLAN IAP 3");
+    testContext.mScan.mWlanScanResultList[1]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa);    
+    testContext.mScan.mWlanScanResultList[1]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse,true);    
+    testContext.mScan.mWlanScanResultList[5]->setValue(WlanQtUtilsAp::ConfIdSsid, "WLAN IAP 1");
     // SSID is found in Internet Snap, but security mode does not match:
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[6]->setValue(WlanQtUtilsAp::ConfIdSsid, "WLAN IAP 2");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[6]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa);
+    testContext.mScan.mWlanScanResultList[6]->setValue(WlanQtUtilsAp::ConfIdSsid, "WLAN IAP 2");
+    testContext.mScan.mWlanScanResultList[6]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa);
     
     // Request a scan to get result signal
     wlanQtUtils_->scanWlans();
     
     // Let active object run and verify signal.
-    subTestSignalWaitAndTake(signalScanReady_, NULL);
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusOk);
 
     // Get and verify the list of available WLAN APs.
     QList< QSharedPointer<WlanQtUtilsIap> > iaps;
@@ -297,9 +314,9 @@
 
     // Verify WLAN AP list. First, remove scan results that will not appear
     // because they are WLAN IAPs.
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_.removeAt(5);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_.removeAt(1);
-    testContext.connMon_.wlanScanResult_.verifyWlanScanResultList(aps);
+    testContext.mScan.mWlanScanResultList.removeAt(5);
+    testContext.mScan.mWlanScanResultList.removeAt(1);
+    testContext.mScan.verifyWlanScanResultList(aps);
 
     // Verify WLAN IAP list
     QCOMPARE(iaps.count(), 2);
@@ -328,48 +345,237 @@
     
     // **************** 1st scan ********************
     // 6 APs are required for this scan
-    testContext.connMon_.wlanScanResult_.createDefaultWlanScanResultList(6);
+    testContext.mScan.createDefaultWlanScanResultList(6);
 
     wlanQtUtils_->scanWlans();
-    subTestSignalWaitAndTake(signalScanReady_, NULL);
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusOk);
 
     // Get the results for the 1st scan
     wlanQtUtils_->availableWlans(iaps, aps);
     // Verify the results for the scan
-    testContext.connMon_.wlanScanResult_.verifyWlanScanResultList(aps);
+    testContext.mScan.verifyWlanScanResultList(aps);
     QCOMPARE(iaps.count(), 0);
     aps.clear();
 
     // **************** 2nd scan ********************
     // 2 APs are required for this scan
-    testContext.connMon_.wlanScanResult_.createDefaultWlanScanResultList(2);
+    testContext.mScan.createDefaultWlanScanResultList(2);
 
     wlanQtUtils_->scanWlans();
-    subTestSignalWaitAndTake(signalScanReady_, NULL);
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusOk);
 
     // Get the results for the 2nd scan
     wlanQtUtils_->availableWlans(iaps, aps);
     // Verify the results for the scan
-    testContext.connMon_.wlanScanResult_.verifyWlanScanResultList(aps);
+    testContext.mScan.verifyWlanScanResultList(aps);
     QCOMPARE(iaps.count(), 0);
     aps.clear();
 
     // **************** 3rd scan ********************
     // 4 APs are required for the 3rd scan
-    testContext.connMon_.wlanScanResult_.createDefaultWlanScanResultList(4);
+    testContext.mScan.createDefaultWlanScanResultList(4);
 
     wlanQtUtils_->scanWlans();
-    subTestSignalWaitAndTake(signalScanReady_, NULL);
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusOk);
     
     // Get the results for the 3rd scan
     wlanQtUtils_->availableWlans(iaps, aps);
     // Verify the results for the scan
-    testContext.connMon_.wlanScanResult_.verifyWlanScanResultList(aps);
+    testContext.mScan.verifyWlanScanResultList(aps);
     QCOMPARE(iaps.count(), 0);
     aps.clear();
 }
 
 /**
+ * Test availability scan that finds nothing.
+ */
+void TestWlanQtUtils::testAvailableWlanScanEmpty()
+{
+    // Form result list
+    testContext.mScan.createDefaultWlanScanResultList(0);
+
+    // Request a direct scan to get result signal
+    wlanQtUtils_->scanWlans();
+    
+    // Let active object run and verify signal.
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusOk);
+
+    // Get and verify the list of available WLAN APs.
+    QList< QSharedPointer<WlanQtUtilsIap> > iaps;
+    QList< QSharedPointer<WlanQtUtilsAp> > aps;
+    wlanQtUtils_->availableWlans(iaps, aps);
+    testContext.mScan.verifyWlanScanResultList(aps);
+    QCOMPARE(iaps.count(), 0);
+}
+
+/**
+ * Test WLAN availability scan failure.
+ */
+void TestWlanQtUtils::testAvailableWlanScanError()
+{
+    // Set the scan to fail
+    testContext.mScan.mScanRetValue = KErrGeneral;
+    
+    // Start the scan
+    wlanQtUtils_->scanWlans();
+
+    // Catch & check the scan result signal
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusError);
+}
+
+/**
+ * Test available WLAN APs when scan is triggered by client.
+ */
+void TestWlanQtUtils::testAvailableWlanAps()
+{
+    testContext.mScan.createDefaultWlanScanResultList(4);
+    
+    // Request a scan to get result signal
+    wlanQtUtils_->scanWlanAps();
+    
+    // Let active object run and verify signal.
+    subTestScanResultSignal(mSignalScanApReady, WlanQtUtils::ScanStatusOk);
+
+    // Get and verify the list of available WLAN APs.
+    QList< QSharedPointer<WlanQtUtilsAp> > aps;
+    wlanQtUtils_->availableWlanAps(aps);
+
+    testContext.mScan.verifyWlanScanResultList(aps);
+    aps.clear();
+}
+
+/**
+ * Test a direct scan that finds nothing.
+ */
+void TestWlanQtUtils::testAvailableWlanApsScanEmpty()
+{
+    // Form result list
+    testContext.mScan.createDefaultWlanScanResultList(0);
+
+    // Request a direct scan to get result signal
+    wlanQtUtils_->scanWlanAps();
+    
+    // Let active object run and verify signal.
+    subTestScanResultSignal(mSignalScanApReady, WlanQtUtils::ScanStatusOk);
+
+    // Get and verify the list of available WLAN APs.
+    QList< QSharedPointer<WlanQtUtilsAp> > aps;
+    wlanQtUtils_->availableWlanAps(aps);
+    testContext.mScan.verifyWlanScanResultList(aps);
+}
+
+/**
+ * Test cancellation of WLAN AP scan.
+ */
+void TestWlanQtUtils::testStopWlanApScan()
+{
+    // Do not complete scan request immediately
+    testContext.mScan.mCompleteWlanScan = false;
+    
+    // Start the scan
+    wlanQtUtils_->scanWlanAps();
+    // Cancel the scan
+    wlanQtUtils_->stopWlanScan();
+
+    // Catch & check the scan result signal
+    subTestScanResultSignal(mSignalScanApReady, WlanQtUtils::ScanStatusCancelled);
+}
+
+/**
+ * Test WLAN AP scan failure.
+ */
+void TestWlanQtUtils::testWlanApScanError()
+{
+    // Set the scan to fail
+    testContext.mScan.mScanRetValue = KErrGeneral;
+    
+    // Start the scan
+    wlanQtUtils_->scanWlanAps();
+
+    // Catch & check the scan result signal
+    subTestScanResultSignal(mSignalScanApReady, WlanQtUtils::ScanStatusError);
+}
+
+/**
+ * Test a basic direct scan.
+ */
+void TestWlanQtUtils::testDirectScanBasic()
+{
+    // Form result list
+    testContext.mScan.createDefaultWlanScanResultList(2);
+    testContext.mScan.mWlanScanResultList[0]->setValue(WlanQtUtilsAp::ConfIdSsid, "testssid");
+    testContext.mScan.mWlanScanResultList[0]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeOpen);
+    testContext.mScan.mWlanScanResultList[1]->setValue(WlanQtUtilsAp::ConfIdSsid, "testssid");
+    testContext.mScan.mWlanScanResultList[1]->setValue(WlanQtUtilsAp::ConfIdBssid, "654321");
+    testContext.mScan.mWlanScanResultList[1]->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
+
+    // Request a direct scan to get result signal
+    wlanQtUtils_->scanWlanDirect(QString("testssid"));
+    
+    // Let active object run and verify signal.
+    subTestScanResultSignal(mSignalScanDirectReady, WlanQtUtils::ScanStatusOk);
+
+    // Get and verify the list of available WLAN APs.
+    QList< QSharedPointer<WlanQtUtilsAp> > aps;
+    wlanQtUtils_->availableWlanAps(aps);
+
+    testContext.mScan.verifyWlanScanResultList(aps);
+    aps.clear();
+}
+
+/**
+ * Test a direct scan that finds nothing.
+ */
+void TestWlanQtUtils::testDirectScanEmpty()
+{
+    // Form result list
+    testContext.mScan.createDefaultWlanScanResultList(0);
+
+    // Request a direct scan to get result signal
+    wlanQtUtils_->scanWlanDirect(QString("notavailable"));
+    
+    // Let active object run and verify signal.
+    subTestScanResultSignal(mSignalScanDirectReady, WlanQtUtils::ScanStatusOk);
+
+    // Get and verify the list of available WLAN APs.
+    QList< QSharedPointer<WlanQtUtilsAp> > aps;
+    wlanQtUtils_->availableWlanAps(aps);
+    testContext.mScan.verifyWlanScanResultList(aps);
+}
+
+/**
+ * Test cancellation of direct scan.
+ */
+void TestWlanQtUtils::testDirectScanStop()
+{
+    // Do not complete scan request immediately
+    testContext.mScan.mCompleteWlanScan = false;
+    
+    // Start the scan
+    wlanQtUtils_->scanWlanDirect(QString("testssid"));
+    // Cancel the scan
+    wlanQtUtils_->stopWlanScan();
+
+    // Catch & check the scan result signal
+    subTestScanResultSignal(mSignalScanDirectReady, WlanQtUtils::ScanStatusCancelled);
+}
+
+/**
+ * Test direct scan failure.
+ */
+void TestWlanQtUtils::testDirectScanError()
+{
+    // Set the scan to fail
+    testContext.mScan.mScanRetValue = KErrGeneral;
+    
+    // Start the scan
+    wlanQtUtils_->scanWlanDirect(QString("boundtofail"));
+
+    // Catch & check the scan result signal
+    subTestScanResultSignal(mSignalScanDirectReady, WlanQtUtils::ScanStatusError);
+}
+
+/**
  * This function tests creation of WLAN IAP in a succesful manner.
  * - WLAN scan is made because otherwise we cannot verify that IAP creation is successful.
  * - Check that there are no available WLAN IAPs.
@@ -379,16 +585,16 @@
  */
 void TestWlanQtUtils::testCreateIapOk()
 {
-    testContext.connMon_.wlanScanResult_.createDefaultWlanScanResultList(1);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[0]->setValue(WlanQtUtilsAp::ConfIdSsid, "testCreateIapOk");
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[0]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa);
-    testContext.connMon_.wlanScanResult_.wlanScanResultList_[0]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse,true);
+    testContext.mScan.createDefaultWlanScanResultList(1);
+    testContext.mScan.mWlanScanResultList[0]->setValue(WlanQtUtilsAp::ConfIdSsid, "testCreateIapOk");
+    testContext.mScan.mWlanScanResultList[0]->setValue(WlanQtUtilsAp::ConfIdSecurityMode,CMManagerShim::WlanSecModeWpa);
+    testContext.mScan.mWlanScanResultList[0]->setValue(WlanQtUtilsAp::ConfIdWpaPskUse,true);
 
     // Request a scan to get result signal
     wlanQtUtils_->scanWlans();
     
     // Let active object run and verify signal.
-    subTestSignalWaitAndTake(signalScanReady_, NULL);
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusOk);
 
     // Ensure there are no WLAN IAPs but there is one scan result.
     QList< QSharedPointer<WlanQtUtilsIap> > iaps;
@@ -396,17 +602,15 @@
     wlanQtUtils_->availableWlans(iaps, aps);
 
     QCOMPARE(iaps.count(), 0);
-    testContext.connMon_.wlanScanResult_.verifyWlanScanResultList(aps);
+    testContext.mScan.verifyWlanScanResultList(aps);
 
     // Execute createIap() function
-    WlanQtUtilsAp wlanAp;
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, "testCreateIapOk");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90 );
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPsk, "100euronlounas");
-    int iapId = wlanQtUtils_->createIap(&wlanAp);
+    QScopedPointer<WlanQtUtilsAp> wlanAp(subTestNewAp());
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSsid, "testCreateIapOk");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWpaPsk, "100euronlounas");
+    int iapId = wlanQtUtils_->createIap(wlanAp.data());
     QVERIFY(iapId != WlanQtUtils::IapIdNone);
 
     // Verify that created IAP is in the IAP list and AP list is empty.
@@ -427,16 +631,14 @@
 void TestWlanQtUtils::testCreateIapErr()
 {
     // Execute createIap() function with invalid parameters
-    WlanQtUtilsAp wlanAp;
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, "testCreateIapErr");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90 );
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
+    QScopedPointer<WlanQtUtilsAp> wlanAp(subTestNewAp());
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSsid, "testCreateIapErr");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
     // Invalid security mode -> exception
-    wlanAp.setValue(
+    wlanAp->setValue(
         WlanQtUtilsAp::ConfIdSecurityMode,
         CMManager::EWlanSecModeWAPI + 1111);
-    int iapId = wlanQtUtils_->createIap(&wlanAp);
+    int iapId = wlanQtUtils_->createIap(wlanAp.data());
     QVERIFY(iapId == WlanQtUtils::IapIdNone);
 }
 
@@ -446,40 +648,37 @@
 void TestWlanQtUtils::testCreateIapWepKeys()
 {
     // Create the IAPs with different kind of WEP keys
-    WlanQtUtilsAp wlanAp;
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, "testCreateIapWepKeys");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWep);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, 1);
+    QScopedPointer<WlanQtUtilsAp> wlanAp(subTestNewAp());
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSsid, "testCreateIapWepKeys");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWep);
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex2);
     // All keys in HEX format
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey1, "1234567891");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey2, "1234567891");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey3, "1234567891");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey4, "1234567891");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey1, "1234567891");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey2, "1234567891");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey3, "1234567891");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey4, "1234567891");
 
-    int iapId = wlanQtUtils_->createIap(&wlanAp);
+    int iapId = wlanQtUtils_->createIap(wlanAp.data());
     QVERIFY(iapId != WlanQtUtils::IapIdNone);
     
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, 2);
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex3);
     // All keys in ASCII format
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey1, "12345");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey2, "12345");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey3, "12345");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey4, "12345");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey1, "12345");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey2, "12345");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey3, "12345");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey4, "12345");
 
-    iapId = wlanQtUtils_->createIap(&wlanAp);
+    iapId = wlanQtUtils_->createIap(wlanAp.data());
     QVERIFY(iapId != WlanQtUtils::IapIdNone);
 
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, 3);
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex4);
     // Different keys, including a missing one
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey1, "");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey2, "12345678911234567892123456");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey3, "12345");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey4, "1234567891123");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey1, "");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey2, "12345678911234567892123456");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey3, "12345");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdWepKey4, "1234567891123");
 
-    iapId = wlanQtUtils_->createIap(&wlanAp);
+    iapId = wlanQtUtils_->createIap(wlanAp.data());
     QVERIFY(iapId != WlanQtUtils::IapIdNone);
 }
 
@@ -489,18 +688,14 @@
 void TestWlanQtUtils::testUpdateIapOk()
 {
     // Create an IAP that can be updated
-    WlanQtUtilsAp wlanAp;
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, "testUpdateIapOk");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeOpen);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
-    int iapId = wlanQtUtils_->createIap(&wlanAp);
+    QScopedPointer<WlanQtUtilsAp> wlanAp(subTestNewAp());
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSsid, "testUpdateIapOk");
+    int iapId = wlanQtUtils_->createIap(wlanAp.data());
 
     // Update the name and verify it changed
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, "UPDATED_testUpdateIapOk");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSsid, "UPDATED_testUpdateIapOk");
 
-    bool success = wlanQtUtils_->updateIap(iapId, &wlanAp);
+    bool success = wlanQtUtils_->updateIap(iapId, wlanAp.data());
     QVERIFY(success == true);
     QString name = wlanQtUtils_->iapName(iapId);
     QCOMPARE(name, QString("UPDATED_testUpdateIapOk"));
@@ -523,13 +718,9 @@
 void TestWlanQtUtils::testDeleteIapOk()
 {
     // Create an IAP that can be deleted
-    WlanQtUtilsAp wlanAp;
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, "testDeleteIapOk");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90 );
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeOpen);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
-    int iapId = wlanQtUtils_->createIap(&wlanAp);
+    QScopedPointer<WlanQtUtilsAp> wlanAp(subTestNewAp());
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSsid, "testDeleteIapOk");
+    int iapId = wlanQtUtils_->createIap(wlanAp.data());
 
     // Check that IAP now exists
     QString name = wlanQtUtils_->iapName(iapId);
@@ -623,14 +814,11 @@
 void TestWlanQtUtils::testDisconnectIapOk()
 {
     // Create and connect an IAP we can then disconnect
-    WlanQtUtilsAp wlanAp;
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, "testDisconnectIapOk");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90 );
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
+    QScopedPointer<WlanQtUtilsAp> wlanAp(subTestNewAp());
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSsid, "testDisconnectIapOk");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
 
-    int iapId = wlanQtUtils_->createIap(&wlanAp);
+    int iapId = wlanQtUtils_->createIap(wlanAp.data());
     testContext.esock_.startRetValue_ = KErrNone;
     wlanQtUtils_->connectIap(iapId);
     QList<QVariant> arguments;
@@ -703,14 +891,11 @@
 void TestWlanQtUtils::testIapNameFound()
 {
     // Create the IAP we want to find with the getter
-    WlanQtUtilsAp wlanAp;
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, "testIapFound");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90 );
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa2);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
+    QScopedPointer<WlanQtUtilsAp> wlanAp(subTestNewAp());
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSsid, "testIapFound");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa2);
 
-    int iapId = wlanQtUtils_->createIap(&wlanAp);
+    int iapId = wlanQtUtils_->createIap(wlanAp.data());
     
     // Execute the function under test and check that we got the correct name
     QString name = wlanQtUtils_->iapName(iapId);
@@ -739,21 +924,18 @@
 void TestWlanQtUtils::testActiveIapFound()
 {
     // Create the IAP we want to find with the getter
-    WlanQtUtilsAp wlanAp;
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, "testConnectedWlanIdFound");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90 );
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
+    QScopedPointer<WlanQtUtilsAp> wlanAp(subTestNewAp());
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSsid, "testConnectedWlanIdFound");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
 
-    int iapId = wlanQtUtils_->createIap(&wlanAp);
+    int iapId = wlanQtUtils_->createIap(wlanAp.data());
     
     testContext.connMon_.activeConnections_.createDefaultActiveConnList(1, iapId);
 
     // Send event for connection creation.
     wlanQtUtils_->d_ptr->mConMonWrapper->d_ptrInfo->EventL(CConnMonEventBase(
-            EConnMonCreateConnection,
-            testContext.connMon_.activeConnections_.activeConnList_[0]->connectionId()));
+        EConnMonCreateConnection,
+        testContext.connMon_.activeConnections_.activeConnList_[0]->connectionId()));
 
     // Send events for connection status change -> opened.
     wlanQtUtils_->d_ptr->mConMonWrapper->d_ptrInfo->EventL(CConnMonConnectionStatusChange(
@@ -813,23 +995,20 @@
 
     // No need to verify scan results here, testAvailableWlan* test cases
     // are for that. Just make sure the result signal is received.
-    subTestSignalWaitAndTake(signalScanReady_, NULL);
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusOk);
 }
 
 /**
- * Test WLAN scan triggering interface with two consecutive requests.
+ * Test WLAN scan result ignoring & deletion during an ongoing request.
  */
 void TestWlanQtUtils::testScanWlansIgnored()
 {
     // Do not complete scan request immediately
-    testContext.connMon_.wlanScanResult_.completeWlanScan_ = false;
+    testContext.mScan.mCompleteWlanScan = false;
     
     // Execute function under test
     wlanQtUtils_->scanWlans();
 
-    // Execute function under test again -> this one is ignored
-    wlanQtUtils_->scanWlans();
-    
     // Ongoing scan is cancelled in destructors
 }
 
@@ -839,13 +1018,14 @@
 void TestWlanQtUtils::testStopWlanScanOk()
 {
     // Do not complete scan request immediately
-    testContext.connMon_.wlanScanResult_.completeWlanScan_ = false;
+    testContext.mScan.mCompleteWlanScan = false;
     // Start a scan
     wlanQtUtils_->scanWlans();
     // Execute function under test
     wlanQtUtils_->stopWlanScan();
-    
-    // No return values or signals to verify
+
+    // Catch & check the scan result signal
+    subTestScanResultSignal(mSignalScanReady, WlanQtUtils::ScanStatusCancelled);
 }
 
 /**
@@ -853,7 +1033,7 @@
  */
 void TestWlanQtUtils::testStopWlanScanIgnored()
 {
-    // Execute function under test
+    // Stop without having an active scan
     wlanQtUtils_->stopWlanScan();
     
     // No return values or signals to verify
@@ -945,7 +1125,7 @@
 {
     WlanQtUtilsAp firstAp;
     firstAp.setValue(WlanQtUtilsAp::ConfIdSsid, "testApCopyConstructor");
-    firstAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90 );
+    firstAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90);
     firstAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
     firstAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
     firstAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);    
@@ -967,13 +1147,9 @@
 void TestWlanQtUtils::testConnectionTestOk()
 {
     // Create new IAP to test
-    WlanQtUtilsAp wlanAp;
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, "testConnectionTestOk");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90 );
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeOpen);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
-    int iapId = wlanQtUtils_->createIap(&wlanAp);
+    QScopedPointer<WlanQtUtilsAp> wlanAp(subTestNewAp());
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSsid, "testConnectionTestOk");
+    int iapId = wlanQtUtils_->createIap(wlanAp.data());
     QVERIFY(iapId != WlanQtUtils::IapIdNone);
 
     testContext.esock_.startRetValue_ = KErrNone;
@@ -1007,12 +1183,14 @@
 
     // Connection test automatically started at this point. Call result function explicitly
     // No interface exists that we could check that the IAP is moved to Internet SNAP correctly
+#if 0       // TODO: Make this work with the new WLAN login interface 
     TBuf<5> string;
     wlanQtUtils_->d_ptr->mConnTestWrapper->d_ptr_->ConnectivityObserver(EConnectionOk, string);
 
     subTestSignalWaitAndTake(signalIctResult_, &arguments); 
     QCOMPARE(arguments.at(0).toInt(), iapId); 
     QCOMPARE(arguments.at(1).toBool(), true);
+#endif    
 }
 
 /**
@@ -1021,14 +1199,11 @@
 void TestWlanQtUtils::testConnectionTestErr()
 {
     // Create and connect an IAP and request ICT to be run
-    WlanQtUtilsAp wlanAp;
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, "testConnectionTestErr");
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90 );
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
-    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
+    QScopedPointer<WlanQtUtilsAp> wlanAp(subTestNewAp());
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSsid, "testConnectionTestErr");
+    wlanAp->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
     
-    int iapId = wlanQtUtils_->createIap(&wlanAp);
+    int iapId = wlanQtUtils_->createIap(wlanAp.data());
     wlanQtUtils_->connectIap(iapId, true);
 
     testContext.connMon_.activeConnections_.createDefaultActiveConnList(1, iapId);
@@ -1050,12 +1225,14 @@
 
     // Connection test automatically started at this point. Call result function explicitly
     // No interface exists that we could check that IAP is not moved to another SNAP
+#if 0       // TODO: Make this work with the new WLAN login interface 
     TBuf<5> string;
     wlanQtUtils_->d_ptr->mConnTestWrapper->d_ptr_->ConnectivityObserver(EHttpAuthenticationNeeded, string);
 
     subTestSignalWaitAndTake(signalIctResult_, &arguments); 
     QCOMPARE(arguments.at(0).toInt(), iapId); 
     QCOMPARE(arguments.at(1).toBool(), false);
+#endif
 }
 
 /**
@@ -1167,6 +1344,19 @@
 }
 
 /**
+ * Test case for catching and verifying the scan result signal.
+ * 
+ * @param [in] status Scan result status.
+ */
+void TestWlanQtUtils::subTestScanResultSignal(QSignalSpy* spy, int status)
+{
+    QList<QVariant> arguments;
+    subTestSignalWaitAndTake(spy, &arguments);
+    QCOMPARE(arguments.length(), 1);
+    QCOMPARE(arguments.at(0).toInt(), status);
+}
+
+/**
  * This function loads given CommsDat file, replacing current one.
  * If CommsDat file doesn't exist, it can be re-created by commanding WST script.
  * Using help switch is a quick way:
@@ -1197,32 +1387,54 @@
  */
 void TestWlanQtUtils::subTestNewWlanQtUtils()
 {
-    if (wlanQtUtils_ != NULL) {
-        delete wlanQtUtils_;
-    }
+    delete wlanQtUtils_;
     wlanQtUtils_ = new WlanQtUtils();
 
-    if (signalScanReady_ != NULL) {
-        delete signalScanReady_;
-    }
-    signalScanReady_ = new QSignalSpy(wlanQtUtils_, SIGNAL(wlanScanReady()));
-    QVERIFY(signalScanReady_->isValid() == true);
+    delete mSignalScanReady;
+    mSignalScanReady = new QSignalSpy(wlanQtUtils_, SIGNAL(wlanScanReady(int)));
+    QVERIFY(mSignalScanReady->isValid() == true);
 
-    if (signalWlanNetworkOpened_ != NULL) {
-        delete signalWlanNetworkOpened_;
-    }
+    delete mSignalScanApReady;
+    mSignalScanApReady = new QSignalSpy(wlanQtUtils_, SIGNAL(wlanScanApReady(int)));
+    QVERIFY(mSignalScanApReady->isValid() == true);
+
+    delete mSignalScanDirectReady;
+    mSignalScanDirectReady = new QSignalSpy(wlanQtUtils_, SIGNAL(wlanScanDirectReady(int)));
+    QVERIFY(mSignalScanDirectReady->isValid() == true);
+
+    delete signalWlanNetworkOpened_;
     signalWlanNetworkOpened_ = new QSignalSpy(wlanQtUtils_, SIGNAL(wlanNetworkOpened(int)));
     QVERIFY(signalWlanNetworkOpened_->isValid() == true);
     
-    if (signalWlanNetworkClosed_ != NULL) {
-        delete signalWlanNetworkClosed_;
-    }
+    delete signalWlanNetworkClosed_;
     signalWlanNetworkClosed_ = new QSignalSpy(wlanQtUtils_, SIGNAL(wlanNetworkClosed(int, int)));
     QVERIFY(signalWlanNetworkClosed_->isValid() == true);
     
-    if (signalIctResult_ != NULL) {
-        delete signalIctResult_;
-    }
-    signalIctResult_ = new QSignalSpy(wlanQtUtils_, SIGNAL(ictResult(int, bool)));
+    delete signalIctResult_;
+    signalIctResult_ = new QSignalSpy(wlanQtUtils_, SIGNAL(ictResult(int, int)));
     QVERIFY(signalIctResult_->isValid() == true);
 }
+
+/**
+ * Create a new AP and fill it with default values. 
+ */
+WlanQtUtilsAp *TestWlanQtUtils::subTestNewAp()
+{
+    WlanQtUtilsAp *ap = new WlanQtUtilsAp;
+
+    // Set default values
+    ap->setValue(WlanQtUtilsAp::ConfIdSsid, QString());
+    ap->setValue(WlanQtUtilsAp::ConfIdSignalStrength, 90);
+    ap->setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
+    ap->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeOpen);
+    ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
+    ap->setValue(WlanQtUtilsAp::ConfIdWpaPsk, QString());
+    ap->setValue(WlanQtUtilsAp::ConfIdWepKey1, QString());
+    ap->setValue(WlanQtUtilsAp::ConfIdWepKey2, QString());
+    ap->setValue(WlanQtUtilsAp::ConfIdWepKey3, QString());
+    ap->setValue(WlanQtUtilsAp::ConfIdWepKey4, QString());
+    ap->setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex1);
+    ap->setValue(WlanQtUtilsAp::ConfIdHidden, false);
+
+    return ap;
+}
--- a/wlanutilities/wlanqtutilities/tsrc/testwlanqtutils.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/tsrc/testwlanqtutils.h	Tue Jul 06 15:29:22 2010 +0300
@@ -22,6 +22,7 @@
 
 class QSignalSpy;
 class WlanQtUtils;
+class WlanQtUtilsAp;
 
 class TestWlanQtUtils: public QObject
 {
@@ -36,12 +37,28 @@
     void cleanup();
 
     // Test functions for public interface.
+    
+    // scanWlans()
     void testAvailableWlan();
     void testAvailableWlanDuplicates();
     void testAvailableWlanSecModes();
     void testAvailableWlanSsids();
     void testAvailableWlanWithIaps();
     void testAvailableWlanSequence();
+    void testAvailableWlanScanEmpty();
+    void testAvailableWlanScanError();
+    
+    // scanWlanAps()
+    void testAvailableWlanAps();
+    void testAvailableWlanApsScanEmpty();
+    void testStopWlanApScan();
+    void testWlanApScanError();
+    
+    // scanWlanDirect()
+    void testDirectScanBasic();
+    void testDirectScanEmpty();
+    void testDirectScanStop();
+    void testDirectScanError();
 
     void testCreateIapOk();
     void testCreateIapErr();
@@ -90,12 +107,16 @@
     
     // Helper functions, that is, sub test cases.
     void subTestSignalWaitAndTake(QSignalSpy *spy, QList<QVariant> *arguments);
+    void subTestScanResultSignal(QSignalSpy* spy, int status);
     void subTestLoadCommsDatFile(QString newCommsdatFilename);
     void subTestNewWlanQtUtils();
+    WlanQtUtilsAp *subTestNewAp();
 
     // Member variables.
     WlanQtUtils *wlanQtUtils_;
-    QSignalSpy *signalScanReady_;
+    QSignalSpy *mSignalScanReady;
+    QSignalSpy *mSignalScanApReady;
+    QSignalSpy *mSignalScanDirectReady;
     QSignalSpy *signalWlanNetworkOpened_;
     QSignalSpy *signalWlanNetworkClosed_;
     QSignalSpy *signalIctResult_;
--- a/wlanutilities/wlanqtutilities/tsrc/testwlanqtutils.pro	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/tsrc/testwlanqtutils.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -24,8 +24,8 @@
 
 DEPENDPATH += .
 
-#Store generated .moc files to their own directory
-MOC_DIR = moc
+#Store generated files to their own directory
+MOC_DIR = build
 
 # Temporary solution to fix tracecompiler
 # When tracecompiler is fixed, this can be removed
@@ -38,6 +38,8 @@
 
 INCLUDEPATH += \
     . \
+    ../../inc \
+    stubs \
     ../base/inc \
     ../wrapper/inc \
     ../traces
@@ -53,8 +55,8 @@
     ../base/inc/wlanqtutilsap.h \
     ../base/inc/wlanqtutilsconnection.h \
     ../wrapper/inc/wlanqtutilsconmonwrapper.h \
-    ../wrapper/inc/wlanqtutilsconntestwrapper.h \
     ../wrapper/inc/wlanqtutilsesockwrapper.h \
+    ../wrapper/inc/wlanqtutilsscan.h \
     ../traces/OstTraceDefinitions.h
 
 SOURCES += \
@@ -67,29 +69,27 @@
     ../base/src/wlanqtutilsconnection.cpp \
     ../base/src/wlanqtutilsiapsettings.cpp \
     ../wrapper/src/wlanqtutilsconmonwrapper.cpp \
-    ../wrapper/src/wlanqtutilsconntestwrapper.cpp \
-    ../wrapper/src/wlanqtutilsesockwrapper.cpp
+    ../wrapper/src/wlanqtutilsesockwrapper.cpp \
+    ../wrapper/src/wlanqtutilsscan.cpp
     
 symbian: { 
     HEADERS += \
-        ../wrapper/inc/wlanqtutilsconmonwrapperdisconnect_s60_p.h \
-        ../wrapper/inc/wlanqtutilsconmonwrapperinfo_s60_p.h \
-        ../wrapper/inc/wlanqtutilsconmonwrapperscan_s60_p.h \
-        ../wrapper/inc/wlanqtutilsconntestwrapper_s60_p.h \
-        ../wrapper/inc/wlanqtutilsesockwrapper_s60_p.h
+        ../wrapper/inc/wlanqtutilsconmonwrapperdisconnect_symbian.h \
+        ../wrapper/inc/wlanqtutilsconmonwrapperinfo_symbian.h \
+        ../wrapper/inc/wlanqtutilsesockwrapper_symbian.h \
+        ../wrapper/inc/wlanqtutilsscan_symbian.h \
+        stubs/wlanmgmtclient.h \
+        stubs/wlanscaninfo.h
 
     SOURCES += \
-        ../wrapper/src/wlanqtutilsconmonwrapperdisconnect_s60.cpp \
-        ../wrapper/src/wlanqtutilsconmonwrapperinfo_s60.cpp \
-        ../wrapper/src/wlanqtutilsconmonwrapperscan_s60.cpp \
-        ../wrapper/src/wlanqtutilsconntestwrapper_s60.cpp \
-        ../wrapper/src/wlanqtutilsesockwrapper_s60.cpp \
-        stubs/wlanqtutilsconnmonstub.cpp \
-        stubs/wlanqtutilsconnteststub.cpp \
-        stubs/wlanqtutilsesockstub.cpp
+        ../wrapper/src/wlanqtutilsconmonwrapperdisconnect_symbian.cpp \
+        ../wrapper/src/wlanqtutilsconmonwrapperinfo_symbian.cpp \
+        ../wrapper/src/wlanqtutilsesockwrapper_symbian.cpp \
+        ../wrapper/src/wlanqtutilsscan_symbian.cpp \
+        stubs/stub_connmon.cpp \
+        stubs/stub_esock.cpp \
+        stubs/stub_wlanmgmtclient.cpp \
+        stubs/stub_wlanscaninfo.cpp
 }
 
-LIBS += -lconnmon -lconnection_settings_shim -lextendedconnpref -lnetmeta -lesock -lictsclientinterface
-
-#UT flag is set, used in stub codes
-DEFINES += WLANQTUTILS_T_WLANQTUTILS_UT_FLAG
+LIBS += -lconnmon -lconnection_settings_shim -lextendedconnpref -lnetmeta -lesock -lictswlanlogininterface
--- a/wlanutilities/wlanqtutilities/wlanqtutilities.pro	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/wlanqtutilities.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -17,14 +17,13 @@
 
 TEMPLATE = lib
 TARGET = wlanqtutilities
-TARGET.CAPABILITY = CAP_GENERAL_DLL
 
 #BUILD_DLL macro is used to define export macro
 DEFINES += BUILD_WLANQTUTILITIES_DLL
 DEPENDPATH += .
 
-#Store generated .moc files to their own directory
-MOC_DIR = moc
+# Store generated files to their own directory
+MOC_DIR = build
 
 # Temporary solution to fix tracecompiler
 # When tracecompiler is fixed, this can be removed
@@ -33,6 +32,7 @@
 }
 
 INCLUDEPATH += \
+    ../inc \
     base/inc \
     wrapper/inc \
     traces
@@ -45,8 +45,8 @@
     base/inc/wlanqtutilsiap.h \
     base/inc/wlanqtutilsiapsettings.h \
     wrapper/inc/wlanqtutilsconmonwrapper.h \
-    wrapper/inc/wlanqtutilsconntestwrapper.h \
     wrapper/inc/wlanqtutilsesockwrapper.h \
+    wrapper/inc/wlanqtutilsscan.h \
     traces/OstTraceDefinitions.h
 
 SOURCES += \
@@ -57,32 +57,29 @@
     base/src/wlanqtutilsiap.cpp \
     base/src/wlanqtutilsiapsettings.cpp \
     wrapper/src/wlanqtutilsconmonwrapper.cpp \
-    wrapper/src/wlanqtutilsconntestwrapper.cpp \
-    wrapper/src/wlanqtutilsesockwrapper.cpp
+    wrapper/src/wlanqtutilsesockwrapper.cpp \
+    wrapper/src/wlanqtutilsscan.cpp
 
 # Common libraries
 LIBS += -lconnection_settings_shim
 
 symbian: { 
     HEADERS += \
-        wrapper/inc/wlanqtutilsconmonwrapperdisconnect_s60_p.h \
-        wrapper/inc/wlanqtutilsconmonwrapperinfo_s60_p.h \
-        wrapper/inc/wlanqtutilsconmonwrapperscan_s60_p.h \
-        wrapper/inc/wlanqtutilsconntestwrapper_s60_p.h \
-        wrapper/inc/wlanqtutilsesockwrapper_s60_p.h
+        wrapper/inc/wlanqtutilsconmonwrapperdisconnect_symbian.h \
+        wrapper/inc/wlanqtutilsconmonwrapperinfo_symbian.h \
+        wrapper/inc/wlanqtutilsesockwrapper_symbian.h \
+        wrapper/inc/wlanqtutilsscan_symbian.h
     SOURCES += \
-        wrapper/src/wlanqtutilsconmonwrapperdisconnect_s60.cpp \
-        wrapper/src/wlanqtutilsconmonwrapperinfo_s60.cpp \
-        wrapper/src/wlanqtutilsconmonwrapperscan_s60.cpp \
-        wrapper/src/wlanqtutilsconntestwrapper_s60.cpp \
-        wrapper/src/wlanqtutilsesockwrapper_s60.cpp \
-        tsrc/stubs/wlanqtutilsconnmonstub.cpp \
-        tsrc/stubs/wlanqtutilsesockstub.cpp
-               
+        wrapper/src/wlanqtutilsconmonwrapperdisconnect_symbian.cpp \
+        wrapper/src/wlanqtutilsconmonwrapperinfo_symbian.cpp \
+        wrapper/src/wlanqtutilsesockwrapper_symbian.cpp \
+        wrapper/src/wlanqtutilsscan_symbian.cpp
+
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.UID3 = 0x20029F52
     defFilePath = .
-    
+
     BLD_INF_RULES.prj_exports += "rom/wlanqtutilities.iby CORE_MW_LAYER_IBY_EXPORT_PATH(wlanqtutilities.iby)"
     BLD_INF_RULES.prj_exports += \
         "base/inc/wlanqtutils.h |../inc/wlanqtutils.h" \
@@ -90,5 +87,8 @@
         "base/inc/wlanqtutilsiap.h |../inc/wlanqtutilsiap.h"
 
     # S60 libraries                                 
-    LIBS += -lconnmon -lesock -lextendedconnpref -lnetmeta -lictsclientinterface
+    LIBS += -lconnmon -lecom -lesock -lextendedconnpref -lnetmeta -lictswlanlogininterface -lcharconv
 }
+
+# Stubs for emulator
+include(stubs/stubs.pri)
--- a/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapper.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapper.h	Tue Jul 06 15:29:22 2010 +0300
@@ -33,7 +33,6 @@
 
 class WlanQtUtilsAp;
 class WlanQtUtilsConnection;
-class WlanQtUtilsConMonWrapperScan;
 class WlanQtUtilsConMonWrapperInfo;
 class WlanQtUtilsConMonWrapperDisconnect;
 
@@ -51,14 +50,10 @@
 
     // Data types
 
-    WlanQtUtilsConMonWrapper(QObject *parent = 0);
+    explicit WlanQtUtilsConMonWrapper(QObject *parent = 0);
     
     ~WlanQtUtilsConMonWrapper();
 
-    void scanAvailableWlanAPs();
-    
-    void stopScan();
-    
     WlanQtUtilsConnection *activeConnection() const;
 
     WlanQtUtilsConnection *connectionInfo(uint connectionId) const;
@@ -68,14 +63,6 @@
 signals:
 
     /*!
-       Signal indicating available WLAN access points.
-
-       @param [in] availableWlans Available WLAN access points found in scan.
-     */
-    void availableWlanApsFromWrapper(
-        QList< QSharedPointer<WlanQtUtilsAp> > &availableWlans);
-    
-    /*!
        Signal indicating that a new connection has been created.
 
        @param [in] connectionId Connection ID.
@@ -113,9 +100,6 @@
     
     // Owned data
     
-    //! Private implementation of scan interface
-    QScopedPointer<WlanQtUtilsConMonWrapperScan> d_ptrScan;
-    
     //! Private implementation of connection info interface
     QScopedPointer<WlanQtUtilsConMonWrapperInfo> d_ptrInfo;
 
@@ -124,9 +108,8 @@
 
     // Friend classes
     
-    // These are defined as friend classes in order to be able to emit
-    // public signals directly from private implementation classes.
-    friend class WlanQtUtilsConMonWrapperScan;
+    // Friend classes in order to be able to emit public signals directly
+    // from private implementation classes.
     friend class WlanQtUtilsConMonWrapperInfo;
     
     // This is defined as a friend class in order to be able to call
--- a/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapperdisconnect_s60_p.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-* Private implementation of wrapper for Symbian Connection Monitor
-* library's connection disconnect interface.
-*/
-
-#ifndef WLANQTUTILSCONMONWRAPPERDISCONNECT_S60_P_H
-#define WLANQTUTILSCONMONWRAPPERDISCONNECT_S60_P_H
-
-// System includes
-
-#include <rconnmon.h>
-
-// User includes
-
-// Forward declarations
-
-class WlanQtUtilsConMonWrapper;
-
-// External data types
-
-// Constants
-
-// Class declaration
-
-class WlanQtUtilsConMonWrapperDisconnect
-{
-public:
-
-    // Data types
-
-    WlanQtUtilsConMonWrapperDisconnect(WlanQtUtilsConMonWrapper *wrapper);
-
-    ~WlanQtUtilsConMonWrapperDisconnect();
-
-    void DisconnectConnection(int iapId);
-
-protected:
-
-private:
-
-private: // data
-    
-    // Owned data
-
-    RConnectionMonitor iMonitor; //!< Handle to Connection Monitor Server
-    
-    // Not owned data
-
-    //! Public implementation to report progress to
-    WlanQtUtilsConMonWrapper *q_ptr;
-
-    // Friend classes
-};
-
-#endif // WLANQTUTILSCONMONWRAPPERDISCONNECT_S60_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapperdisconnect_symbian.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2009-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:
+* Private implementation of wrapper for Symbian Connection Monitor
+* library's connection disconnect interface.
+*/
+
+#ifndef WLANQTUTILSCONMONWRAPPERDISCONNECT_SYMBIAN_H
+#define WLANQTUTILSCONMONWRAPPERDISCONNECT_SYMBIAN_H
+
+// System includes
+
+#include <rconnmon.h>
+
+// User includes
+
+// Forward declarations
+
+class WlanQtUtilsConMonWrapper;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+class WlanQtUtilsConMonWrapperDisconnect
+{
+public:
+
+    // Data types
+
+    WlanQtUtilsConMonWrapperDisconnect(WlanQtUtilsConMonWrapper *wrapper);
+
+    ~WlanQtUtilsConMonWrapperDisconnect();
+
+    void DisconnectConnection(int iapId);
+
+protected:
+
+private:
+
+private: // data
+    
+    // Owned data
+
+    RConnectionMonitor iMonitor; //!< Handle to Connection Monitor Server
+    
+    // Not owned data
+
+    //! Public implementation to report progress to
+    WlanQtUtilsConMonWrapper *q_ptr;
+
+    // Friend classes
+};
+
+#endif // WLANQTUTILSCONMONWRAPPERDISCONNECT_SYMBIAN_H
--- a/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapperinfo_s60_p.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-* Private implementation of wrapper for Symbian Connection Monitor
-* library's connection info interface.
-*/
-
-#ifndef WLANQTUTILSCONMONWRAPPERINFO_S60_P_H
-#define WLANQTUTILSCONMONWRAPPERINFO_S60_P_H
-
-// System includes
-
-#include <rconnmon.h>
-
-// User includes
-
-#include "wlanqtutils.h"
-
-// Forward declarations
-
-class WlanQtUtilsConnection;
-class WlanQtUtilsConMonWrapper;
-
-// External data types
-
-// Constants
-
-// Class declaration
-
-class WlanQtUtilsConMonWrapperInfo : public MConnectionMonitorObserver
-{
-public:
-    
-    // Data types
-
-    WlanQtUtilsConMonWrapperInfo(WlanQtUtilsConMonWrapper *wrapper);
-
-    ~WlanQtUtilsConMonWrapperInfo();
-
-    WlanQtUtilsConnection *ActiveConnection();
-
-    WlanQtUtilsConnection *ConnectionInfo(uint connectionId);
-
-protected:
-
-private:
-    
-    TBool ConnectionInfoDetails(WlanQtUtilsConnection *connection);
-
-    void EventL(const CConnMonEventBase& connMonEvent);
-
-    WlanQtUtils::ConnStatus ConnMonConnStatusMap(TInt connStatus);
-
-    TBool IsWlanConnection(TUint connectionId);
-
-private: // data
-    
-    // Owned data
-
-    RConnectionMonitor iMonitor; //!< Handle to Connection Monitor Server
-
-    TRequestStatus iStatus; //!< Request status
-
-    //! ID of the connection we are currently monitoring
-    TUint iMonitoringConnection;
-
-    // Not owned data
-    
-    //! Public implementation to report progress to
-    WlanQtUtilsConMonWrapper *q_ptr;
-
-    // Friend classes
-
-    // TestWlanQtUtils is defined as a friend class in order to be able to
-    // call event handlers of wrappers.
-    friend class TestWlanQtUtils;
-};
-
-#endif // WLANQTUTILSCONMONWRAPPERINFO_S60_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapperinfo_symbian.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2009-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:
+* Private implementation of wrapper for Symbian Connection Monitor
+* library's connection info interface.
+*/
+
+#ifndef WLANQTUTILSCONMONWRAPPERINFO_SYMBIAN_H
+#define WLANQTUTILSCONMONWRAPPERINFO_SYMBIAN_H
+
+// System includes
+
+#include <rconnmon.h>
+
+// User includes
+
+#include "wlanqtutils.h"
+
+// Forward declarations
+
+class WlanQtUtilsConnection;
+class WlanQtUtilsConMonWrapper;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+class WlanQtUtilsConMonWrapperInfo : public MConnectionMonitorObserver
+{
+public:
+    
+    // Data types
+
+    WlanQtUtilsConMonWrapperInfo(WlanQtUtilsConMonWrapper *wrapper);
+
+    ~WlanQtUtilsConMonWrapperInfo();
+
+    WlanQtUtilsConnection *ActiveConnection();
+
+    WlanQtUtilsConnection *ConnectionInfo(uint connectionId);
+
+protected:
+
+private:
+    
+    TBool ConnectionInfoDetails(WlanQtUtilsConnection *connection);
+
+    void EventL(const CConnMonEventBase& connMonEvent);
+
+    WlanQtUtils::ConnStatus ConnMonConnStatusMap(TInt connStatus);
+
+    TBool IsWlanConnection(TUint connectionId);
+
+private: // data
+    
+    // Owned data
+
+    RConnectionMonitor iMonitor; //!< Handle to Connection Monitor Server
+
+    TRequestStatus iStatus; //!< Request status
+
+    //! ID of the connection we are currently monitoring
+    TUint iMonitoringConnection;
+
+    // Not owned data
+    
+    //! Public implementation to report progress to
+    WlanQtUtilsConMonWrapper *q_ptr;
+
+    // Friend classes
+
+    // TestWlanQtUtils is defined as a friend class in order to be able to
+    // call event handlers of wrappers.
+    friend class TestWlanQtUtils;
+};
+
+#endif // WLANQTUTILSCONMONWRAPPERINFO_SYMBIAN_H
--- a/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconmonwrapperscan_s60_p.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-* Private implementation of wrapper for Symbian Connection Monitor
-* library's scan interface.
-*/
-
-#ifndef WLANQTUTILSCONMONWRAPPERSCAN_S60_P_H
-#define WLANQTUTILSCONMONWRAPPERSCAN_S60_P_H
-
-// System includes
-
-#include <e32base.h>
-#include <rconnmon.h>
-
-// User includes
-
-// Forward declarations
-
-class WlanQtUtilsAp;
-class WlanQtUtilsConMonWrapper;
-
-// External data types
-
-// Constants
-
-// Class declaration
-
-class WlanQtUtilsConMonWrapperScan : public CActive
-{
-public:
-
-    // Data types
-
-    WlanQtUtilsConMonWrapperScan(WlanQtUtilsConMonWrapper *wrapper);
-
-    ~WlanQtUtilsConMonWrapperScan();
-
-    void ScanAvailableWlanAPs();
-
-    void StopScan();
-
-protected:
-
-private:
-
-    void DoCancel();
-
-    void RunL();
-
-    void StoreConMonSecMode(
-        QSharedPointer<WlanQtUtilsAp> ap,
-        TUint conMonSecMode);
-    
-    void StoreConMonConnMode(
-        QSharedPointer<WlanQtUtilsAp> ap,
-        TInt conMonConnMode);
-
-private: // data
-    
-    // Owned data
-
-    RConnectionMonitor iMonitor; //!< Handle to Connection Monitor Server
-
-    //! Scan package used with Connection Monitor Server scan request
-    CConnMonWlanNetworksPtrArrayPckg* iWlanBuf;
-
-    //! wlan pointer used with Connection Monitor Server scan request
-    TPtr iWlanPtr;
-
-    /*!
-       Has scanning been cancelled by client, are we allowed to report
-       results?
-     */
-    TBool iScanCancelled;
-    
-    // Not owned data
-
-    //! Public implementation to report progress to
-    WlanQtUtilsConMonWrapper *q_ptr;
-    
-    // Friend classes
-};
-
-#endif // WLANQTUTILSCONMONWRAPPERSCAN_S60_P_H
--- a/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconntestwrapper.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-*
-*/
-
-#ifndef WLANQTUTILSCONNTESTWRAPPER_H_
-#define WLANQTUTILSCONNTESTWRAPPER_H_
-
-#include <QObject>
-#include <QScopedPointer>
-
-class ConnTestWrapperPrivate;
-
-/**
-* ConnTestWrapper class.
-*/
-class ConnTestWrapper: public QObject
-{
-    Q_OBJECT
-    
-    // TestWlanQtUtils is defined as a friend class in order to be able to
-    // call event handlers of wrappers.
-    friend class TestWlanQtUtils;
-
-public: // Constructor and destructor
-    
-    /**
-    * Default constructor
-    */
-    ConnTestWrapper(QObject *parent = 0);
-    
-    /**
-    * Destructor
-    */
-    ~ConnTestWrapper();
-    
-public: 
-    
-    /**
-    * Called by private wrapper when connectivity test is ready.
-    * 
-    * @param[in] result Result of internet connectivity test
-    */
-    void connectivityTestDone(bool result);
-
-public slots:
-
-    /**
-    * Starts internet connectivity test.
-    * 
-    * @param[in] iapId iap id
-    * @param[in] netId network id
-    */
-    void startConnectivityTest(int iapId, int netId);
-        
-signals:
-
-    /**
-    * Signal for emitting connectivity test result.
-    * 
-    * @param[in] result Result of internet connectivity test
-    */
-    void connectivityTestResult(bool result);
-
-private:
-    
-    /**
-    * d_ptr pointer to ConnTestWrapperPrivate
-    * Owned by ConnTestWrapper object, instantiated in constructor.
-    */
-    QScopedPointer<ConnTestWrapperPrivate> d_ptr_;
-};
-
-#endif /* WLANQTUTILSCONNTESTWRAPPER_H_ */
--- a/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsconntestwrapper_s60_p.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-*
-*/
-
-#ifndef WLANQTUTILSCONNTESTWRAPPER_S60_P_H_
-#define WLANQTUTILSCONNTESTWRAPPER_S60_P_H_
-
-#include <ictsclientinterface.h>
-
-QT_BEGIN_NAMESPACE
-
-/**
-* ConnTestWrapperPrivate class.
-*/
-class ConnTestWrapperPrivate: public MIctsObserver
-{
-
-    // TestWlanQtUtils is defined as a friend class in order to be able to
-    // call event handlers of wrappers.
-    friend class TestWlanQtUtils;
-
-public:
-    
-    /**
-    * Default constructor
-    */
-    ConnTestWrapperPrivate(ConnTestWrapper *aWrapper);
-    
-    /**
-    * Destructor
-    */
-    ~ConnTestWrapperPrivate();
-
-public: // From MICTSObserver
-    
-    /**
-    * Called when internet connectivity tests are being done.
-    * 
-    * @param[in] aResult Result of connectivity test
-    * @param[in] aString String containing possible HTML response
-    */
-    void ConnectivityObserver( TIctsTestResult aResult, const TDesC& aString );
-
-public: 
-    
-    /**
-    * Starts internet connectivity test wrapped.
-    * 
-    * @param[in] iapId iap id
-    * @param[in] netId network id
-    */
-    void startConnectivityTest( int aIapId, int aNetId );
-    
-    /**
-    * Starts the actual internet connectivity test.
-    * 
-    * @param[in] iapId iap id
-    * @param[in] netId network id
-    */
-    void startConnectivityTestL( TInt aIapId, TInt aNetId );
-
-private:
-    
-    /**
-    * Pointer to ConnTestWrapper
-    * Owned by ConnTestWrapperPrivate object, instantiated in constructor.
-    */
-    ConnTestWrapper *q_ptr;
-    
-    /**
-    * Pointer to Internet Connectivity Test Service
-    * Owned by ConnTestWrapperPrivate.
-    */
-    CIctsClientInterface* iIct;
-
-};
-
-QT_END_NAMESPACE
-
-#endif /* WLANQTUTILSCONNTESTWRAPPER_S60_P_H_ */
--- a/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsesockwrapper_s60_p.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-* Private implementation of wrapper for Symbian Esock library.
-*/
-
-#ifndef WLANQTUTILSESOCKWRAPPER_S60_P_H
-#define WLANQTUTILSESOCKWRAPPER_S60_P_H
-
-// System includes
-
-#include <es_sock.h>
-
-// User includes
-
-// Forward declarations
-
-// External data types
-
-// Constants
-
-// Class declaration
-
-class WlanQtUtilsEsockWrapperPrivate: public CActive
-{
-
-public:
-    
-    // Data types
-
-    WlanQtUtilsEsockWrapperPrivate(WlanQtUtilsEsockWrapper *wrapper);
-    
-    ~WlanQtUtilsEsockWrapperPrivate();
-
-    void ConnectIap(int iapId);
-    
-    void DisconnectIap();
-
-protected:
-    
-private:
-    
-    void RunL();
-    
-    void DoCancel();
-        
-private: // data
-
-    // Owned data
-    
-    RSocketServ iSocketServer; //!< Socket server handle
-    RConnection iConnection;   //!< Connection handle
-    TBool iConnectionActive;   //!< Do we have an active connection handle?
-
-    // Not owned data
-    
-    //! Public implementation to report progress to
-    WlanQtUtilsEsockWrapper *q_ptr;
-
-    // Friend classes
-};
-
-#endif // WLANQTUTILSESOCKWRAPPER_S60_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsesockwrapper_symbian.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2009-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:
+* Private implementation of wrapper for Symbian Esock library.
+*/
+
+#ifndef WLANQTUTILSESOCKWRAPPER_SYMBIAN_H
+#define WLANQTUTILSESOCKWRAPPER_SYMBIAN_H
+
+// System includes
+
+#include <es_sock.h>
+
+// User includes
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+class WlanQtUtilsEsockWrapperPrivate: public CActive
+{
+
+public:
+    
+    // Data types
+
+    WlanQtUtilsEsockWrapperPrivate(WlanQtUtilsEsockWrapper *wrapper);
+    
+    ~WlanQtUtilsEsockWrapperPrivate();
+
+    void ConnectIap(int iapId);
+    
+    void DisconnectIap();
+
+protected:
+    
+private:
+    
+    void RunL();
+    
+    void DoCancel();
+        
+private: // data
+
+    // Owned data
+    
+    RSocketServ iSocketServer; //!< Socket server handle
+    RConnection iConnection;   //!< Connection handle
+    TBool iConnectionActive;   //!< Do we have an active connection handle?
+
+    // Not owned data
+    
+    //! Public implementation to report progress to
+    WlanQtUtilsEsockWrapper *q_ptr;
+
+    // Friend classes
+};
+
+#endif // WLANQTUTILSESOCKWRAPPER_SYMBIAN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsscan.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,104 @@
+/*
+* 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: 
+* WLAN scan platform specific implementation wrapper.
+*/
+
+#ifndef WLANQTUTILSSCAN_H
+#define WLANQTUTILSSCAN_H
+
+// System includes
+
+#include <QObject>
+#include <QList>
+#include <QSharedPointer>
+
+// User includes
+
+#include "wlanqtutilsap.h"
+
+// Forward declarations
+
+class WlanQtUtilsScanPrivate;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+class WlanQtUtilsScan : public QObject
+{
+    Q_OBJECT
+
+public:
+
+    // Data types
+
+    explicit WlanQtUtilsScan(QObject *parent = 0);
+    
+    ~WlanQtUtilsScan();
+
+    void scanWlanAps();
+
+    void scanWlanDirect(const QString &ssid);
+
+    void stopScan();
+
+signals:
+    
+    /*!
+        Signal indicating available WLAN access points.
+
+        @param [in] availableWlans Available WLAN access points found in scan.
+    */
+    void availableWlanAps(
+        QList< QSharedPointer<WlanQtUtilsAp> > &availableWlans);
+
+    /*!
+        Signal indicating that scanning failed.
+        
+        @param [in] status Scan status code (ScanStatus).
+    */
+    void scanFailed(int status);
+    
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+
+    Q_DISABLE_COPY(WlanQtUtilsScan)
+
+private slots:
+
+private: // data
+
+    // Owned data
+
+    //! Private implementation of scan interface
+    WlanQtUtilsScanPrivate *d_ptr;
+
+    // Not owned data
+    
+    // Friend classes
+
+    // Needed to be able to emit public signals directly from
+    // private implementation.
+    friend class WlanQtUtilsScanPrivate;
+};
+
+#endif // WLANQTUTILSSCAN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsscan_symbian.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,104 @@
+/*
+* 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: 
+* Symbian platform specific implementation of WLAN scanning.
+*/
+
+#ifndef WLANQTUTILSSCAN_SYMBIAN_H
+#define WLANQTUTILSSCAN_SYMBIAN_H
+
+// System includes
+
+#include <wlanmgmtclient.h>
+#include <QString>
+#include <QSharedPointer>
+
+// User includes
+
+#include "wlanqtutilsap.h"
+
+// Forward declarations
+
+class CWlanMgmtClient;
+class CWlanScanInfo;
+class WlanQtUtilsScan;
+
+// External data types
+
+// Constants
+
+// Class declaration
+
+class WlanQtUtilsScanPrivate : public CActive
+{
+
+public:
+
+    // Data types
+
+    static WlanQtUtilsScanPrivate *NewL(WlanQtUtilsScan *q_ptr);
+    
+    ~WlanQtUtilsScanPrivate();
+
+    void Scan();
+    
+    void Scan(const QString &ssid);
+    
+    void StopScan();
+    
+protected:
+
+    void RunL();
+
+    void DoCancel();
+
+private:
+
+    explicit WlanQtUtilsScanPrivate(WlanQtUtilsScan *q_ptr);
+
+    void ConstructL();
+
+    void ExtractScanResults(
+        QList< QSharedPointer<WlanQtUtilsAp> > &scanResults);
+    
+    QString ExtractSsid();
+    
+    QByteArray ExtractBssid();
+    
+    void StoreSecMode(
+        QSharedPointer<WlanQtUtilsAp> ap,
+        TUint wlanSecMode);
+
+private: // data
+    
+    //! Public implementation reference
+    WlanQtUtilsScan *q_ptr;
+    
+    // Owned data
+
+    //! WLAN Management Client
+    CWlanMgmtClient *mWlanMgmtClient;
+
+    //! Scanned SSID
+    TWlanSsid mWlanSsid;
+    
+    //! Scan results
+    CWlanScanInfo *mResults;
+
+    // Not owned data
+    
+    // Friend classes
+};
+
+#endif // WLANQTUTILSSCAN_SYMBIAN_H
--- a/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapper.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapper.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -22,17 +22,16 @@
 
 // User includes
 
-#include "wlanqtutilsconmonwrapperdisconnect_s60_p.h"
-#include "wlanqtutilsconmonwrapperinfo_s60_p.h"
-#include "wlanqtutilsconmonwrapperscan_s60_p.h"
+#include "wlanqtutilsconmonwrapperdisconnect_symbian.h"
+#include "wlanqtutilsconmonwrapperinfo_symbian.h"
 #include "wlanqtutilsconmonwrapper.h"
 
 /*!
     \class WlanQtUtilsConMonWrapper
     \brief Wrapper for Symbian Connection Monitor library.
 
-    Provides functionality to scan WLAN networks, to retrieve connection 
-    information, and to disconnect connections.
+    Provides functionality to retrieve connection information,
+    and to disconnect connections.
 */
 
 // External function prototypes
@@ -51,7 +50,6 @@
 
 WlanQtUtilsConMonWrapper::WlanQtUtilsConMonWrapper(QObject *parent) :
     QObject(parent),
-    d_ptrScan(new WlanQtUtilsConMonWrapperScan(this)),
     d_ptrInfo(new WlanQtUtilsConMonWrapperInfo(this)),
     d_ptrDisconnect(new WlanQtUtilsConMonWrapperDisconnect(this))
 {
@@ -66,24 +64,6 @@
 }
 
 /*!
-   Start a WLAN scan.
-*/
-
-void WlanQtUtilsConMonWrapper::scanAvailableWlanAPs()
-{
-    d_ptrScan->ScanAvailableWlanAPs();
-}
-
-/*!
-   Stop a (possibly) ongoing WLAN scan.
-*/
-
-void WlanQtUtilsConMonWrapper::stopScan()
-{
-    d_ptrScan->StopScan();
-}
-
-/*!
    Return active connection information.
 
    @return Information of active connection, 0 if not found.
--- a/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapperdisconnect_s60.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2009-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:
- * Private implementation of wrapper for Symbian Connection Monitor
- * library's connection disconnect interface.
- */
-
-// System includes
-
-// User includes
-
-#include "wlanqtutilsconmonwrapper.h"
-#include "wlanqtutilsconmonwrapperdisconnect_s60_p.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "wlanqtutilsconmonwrapperdisconnect_s60Traces.h"
-#endif
-
-/*!
-    \class WlanQtUtilsConMonWrapperDisconnect
-    \brief Private wrapper for Symbian Connection Monitor library.
-
-    Provides functionality to disconnect connections regardless of how
-    many applications are using the connection.
-*/
-
-// External function prototypes
-
-// Local constants
-
-// ======== LOCAL FUNCTIONS ========
-
-// ======== MEMBER FUNCTIONS ========
-
-/*!
-    Constructor.
-    
-    @param [in] wrapper Wrapper to report progress to.
- */
-
-WlanQtUtilsConMonWrapperDisconnect::WlanQtUtilsConMonWrapperDisconnect(
-    WlanQtUtilsConMonWrapper *wrapper) :
-    q_ptr(wrapper)
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERDISCONNECT_WLANQTUTILSCONMONWRAPPERDISCONNECT_ENTRY, this);
-    
-    // Errors in Connection Monitor Server connection are fatal so just
-    // throw them as exceptions
-    QT_TRAP_THROWING(iMonitor.ConnectL());
-
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERDISCONNECT_WLANQTUTILSCONMONWRAPPERDISCONNECT_EXIT, this);
-}
-
-/*!
-    Destructor.
- */
-
-WlanQtUtilsConMonWrapperDisconnect::~WlanQtUtilsConMonWrapperDisconnect()
-{
-    OstTraceFunctionEntry1(DUP1_WLANQTUTILSCONMONWRAPPERDISCONNECT_WLANQTUTILSCONMONWRAPPERDISCONNECT_ENTRY, this);
-
-    iMonitor.Close();
-
-    OstTraceFunctionExit1(DUP1_WLANQTUTILSCONMONWRAPPERDISCONNECT_WLANQTUTILSCONMONWRAPPERDISCONNECT_EXIT, this);
-}
-
-/*!
-    Disconnects the connection with the given IAP ID.
-    
-    @param [in] wrapper Wrapper to report progress to.
- */
-
-void WlanQtUtilsConMonWrapperDisconnect::DisconnectConnection(int iapId)
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERDISCONNECT_DISCONNECTCONNECTION_ENTRY, this);
-
-    OstTrace1(
-        TRACE_NORMAL,
-        WLANQTUTILSCONMONWRAPPERDISCONNECT_DISCONNECTCONNECTION,
-        "WlanQtUtilsConMonWrapperDisconnect::DisconnectConnection;iapId=%d", iapId);
-    
-    // Loop through connections to find the one with the IAP ID we want
-    TUint count;
-    TRequestStatus status;
-    iMonitor.GetConnectionCount(count, status);
-    User::WaitForRequest(status);
-    if (status.Int() == KErrNone) {
-        for (TInt i = 1; i <= count; i++) {
-            TUint numSubConnections;
-            TUint iap = 0;
-            TUint connectionId = 0;
-            TInt ret = iMonitor.GetConnectionInfo(
-                i,
-                connectionId,
-                numSubConnections);
-            if (ret == KErrNone) {
-                iMonitor.GetUintAttribute(connectionId, 0, KIAPId, iap, status);
-                User::WaitForRequest(status);
-                if (status.Int() == KErrNone) {
-                    if (iap == iapId) {
-                        OstTrace1(
-                            TRACE_NORMAL,
-                            WLANQTUTILSCONMONWRAPPERDISCONNECT_DISCONNECTCONNECTION_STOP,
-                            "WlanQtUtilsConMonWrapperDisconnect::DisconnectConnection Stopping connection;connectionId=%u",
-                            connectionId);
-                        
-                        // Match found, stop connection
-                        TInt KErr = iMonitor.SetBoolAttribute(
-                            connectionId,
-                            0,
-                            KConnectionStop,
-                            ETrue);
-    
-                        OstTrace1(
-                            TRACE_NORMAL,
-                            WLANQTUTILSCONMONWRAPPERDISCONNECT_DISCONNECTCONNECTION_RESULT,
-                            "WlanQtUtilsConMonWrapperDisconnect::DisconnectConnection Result;KErr=%d", KErr);
-                    }
-                }
-            }
-        }
-    }
-    
-    OstTraceFunctionExit1( WLANQTUTILSCONMONWRAPPERDISCONNECT_DISCONNECTCONNECTION_EXIT, this);
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapperdisconnect_symbian.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2009-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:
+ * Private implementation of wrapper for Symbian Connection Monitor
+ * library's connection disconnect interface.
+ */
+
+// System includes
+
+// User includes
+
+#include "wlanqtutilsconmonwrapper.h"
+#include "wlanqtutilsconmonwrapperdisconnect_symbian.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanqtutilsconmonwrapperdisconnect_symbianTraces.h"
+#endif
+
+/*!
+    \class WlanQtUtilsConMonWrapperDisconnect
+    \brief Private wrapper for Symbian Connection Monitor library.
+
+    Provides functionality to disconnect connections regardless of how
+    many applications are using the connection.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+    
+    @param [in] wrapper Wrapper to report progress to.
+ */
+
+WlanQtUtilsConMonWrapperDisconnect::WlanQtUtilsConMonWrapperDisconnect(
+    WlanQtUtilsConMonWrapper *wrapper) :
+    q_ptr(wrapper)
+{
+    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERDISCONNECT_WLANQTUTILSCONMONWRAPPERDISCONNECT_ENTRY, this);
+    
+    // Errors in Connection Monitor Server connection are fatal so just
+    // throw them as exceptions
+    QT_TRAP_THROWING(iMonitor.ConnectL());
+
+    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERDISCONNECT_WLANQTUTILSCONMONWRAPPERDISCONNECT_EXIT, this);
+}
+
+/*!
+    Destructor.
+ */
+
+WlanQtUtilsConMonWrapperDisconnect::~WlanQtUtilsConMonWrapperDisconnect()
+{
+    OstTraceFunctionEntry1(DUP1_WLANQTUTILSCONMONWRAPPERDISCONNECT_WLANQTUTILSCONMONWRAPPERDISCONNECT_ENTRY, this);
+
+    iMonitor.Close();
+
+    OstTraceFunctionExit1(DUP1_WLANQTUTILSCONMONWRAPPERDISCONNECT_WLANQTUTILSCONMONWRAPPERDISCONNECT_EXIT, this);
+}
+
+/*!
+    Disconnects the connection with the given IAP ID.
+    
+    @param [in] wrapper Wrapper to report progress to.
+ */
+
+void WlanQtUtilsConMonWrapperDisconnect::DisconnectConnection(int iapId)
+{
+    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERDISCONNECT_DISCONNECTCONNECTION_ENTRY, this);
+
+    OstTrace1(
+        TRACE_NORMAL,
+        WLANQTUTILSCONMONWRAPPERDISCONNECT_DISCONNECTCONNECTION,
+        "WlanQtUtilsConMonWrapperDisconnect::DisconnectConnection;iapId=%d", iapId);
+    
+    // Loop through connections to find the one with the IAP ID we want
+    TUint count;
+    TRequestStatus status;
+    iMonitor.GetConnectionCount(count, status);
+    User::WaitForRequest(status);
+    if (status.Int() == KErrNone) {
+        for (TInt i = 1; i <= count; i++) {
+            TUint numSubConnections;
+            TUint iap = 0;
+            TUint connectionId = 0;
+            TInt ret = iMonitor.GetConnectionInfo(
+                i,
+                connectionId,
+                numSubConnections);
+            if (ret == KErrNone) {
+                iMonitor.GetUintAttribute(connectionId, 0, KIAPId, iap, status);
+                User::WaitForRequest(status);
+                if (status.Int() == KErrNone) {
+                    if (iap == iapId) {
+                        OstTrace1(
+                            TRACE_NORMAL,
+                            WLANQTUTILSCONMONWRAPPERDISCONNECT_DISCONNECTCONNECTION_STOP,
+                            "WlanQtUtilsConMonWrapperDisconnect::DisconnectConnection Stopping connection;connectionId=%u",
+                            connectionId);
+                        
+                        // Match found, stop connection
+                        TInt KErr = iMonitor.SetBoolAttribute(
+                            connectionId,
+                            0,
+                            KConnectionStop,
+                            ETrue);
+    
+                        OstTrace1(
+                            TRACE_NORMAL,
+                            WLANQTUTILSCONMONWRAPPERDISCONNECT_DISCONNECTCONNECTION_RESULT,
+                            "WlanQtUtilsConMonWrapperDisconnect::DisconnectConnection Result;KErr=%d", KErr);
+                    }
+                }
+            }
+        }
+    }
+    
+    OstTraceFunctionExit1( WLANQTUTILSCONMONWRAPPERDISCONNECT_DISCONNECTCONNECTION_EXIT, this);
+}
--- a/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapperinfo_s60.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,354 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-* Private implementation of wrapper for Symbian Connection Monitor
-* library's scan interface.
-*/
-
-// System includes
-
-#include <rconnmon.h>
-#include <nifvar.h>
-
-// User includes
-
-#include "wlanqtutils.h"
-#include "wlanqtutilsconnection.h"
-#include "wlanqtutilsconmonwrapper.h"
-#include "wlanqtutilsconmonwrapperinfo_s60_p.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "wlanqtutilsconmonwrapperinfo_s60Traces.h"
-#endif
-
-/*!
-    \class WlanQtUtilsConMonWrapperInfo
-    \brief Private wrapper for Symbian Connection Monitor library.
-
-    Provides functionality to request information about connections.
-*/
-
-// External function prototypes
-
-// Local constants
-
-// ======== LOCAL FUNCTIONS ========
-
-// ======== MEMBER FUNCTIONS ========
-
-/*!
-    Constructor.
-    
-    @param [in] wrapper Wrapper to report progress to.
-*/
-
-WlanQtUtilsConMonWrapperInfo::WlanQtUtilsConMonWrapperInfo(
-    WlanQtUtilsConMonWrapper *wrapper) :
-    iMonitoringConnection(0),
-    q_ptr(wrapper)
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_WLANQTUTILSCONMONWRAPPERINFO_ENTRY, this);
-
-    // Errors in Connection Monitor Server connection are fatal so just
-    // throw them as exceptions
-    QT_TRAP_THROWING(
-        iMonitor.ConnectL();
-        iMonitor.NotifyEventL(*this);
-        );
-
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_WLANQTUTILSCONMONWRAPPERINFO_EXIT, this);
-}
-
-/*!
-    Destructor.
-*/
-
-WlanQtUtilsConMonWrapperInfo::~WlanQtUtilsConMonWrapperInfo()
-{
-    OstTraceFunctionEntry1(DUP1_WLANQTUTILSCONMONWRAPPERINFO_WLANQTUTILSCONMONWRAPPERINFO_ENTRY, this);
-
-    iMonitor.CancelNotifications();
-    iMonitor.Close();
-
-    OstTraceFunctionExit1(DUP1_WLANQTUTILSCONMONWRAPPERINFO_WLANQTUTILSCONMONWRAPPERINFO_EXIT, this);
-}
-
-/*!
-   Getter for active connection information.
-
-   @return Information of active connection, if one exists.
-*/ 
-
-WlanQtUtilsConnection *WlanQtUtilsConMonWrapperInfo::ActiveConnection()
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_ACTIVECONNECTION_ENTRY, this);
-
-    // Get number of active connections
-    TRequestStatus status;
-
-    WlanQtUtilsConnection *activeConn = NULL;
-    TUint numConnections = 0;
-    iMonitor.GetConnectionCount(numConnections, status);
-    User::WaitForRequest(status);
-    if (status.Int() == KErrNone) {
-        // Get connection info of this connection
-        for (TUint i = 1; i <= numConnections; i++) {
-            TUint numSubConnections = 0;
-            TUint connectionId = 0;
-            TInt ret = iMonitor.GetConnectionInfo(
-                i,
-                connectionId,
-                numSubConnections);
-            if (ret == KErrNone) {
-                activeConn = ConnectionInfo(connectionId);
-                if (activeConn != NULL) {
-                    // ConnectionInfo() only returns WLAN connections,
-                    // and there may be only one active WLAN connection,
-                    // so this is the one we want to return and also
-                    // remember later.
-                    Q_ASSERT(iMonitoringConnection == 0 
-                        || iMonitoringConnection == connectionId);
-                    iMonitoringConnection = connectionId;
-                    break;
-                }
-            }
-        }
-    }
-
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_ACTIVECONNECTION_EXIT, this);
-    return activeConn;
-}
-
-/*!
-   Returns information of a connection with the given connection ID.
-
-   @param[in] connectionId Connection ID.
-   @return Information of the given connection, if one exists.
-*/
-
-WlanQtUtilsConnection *WlanQtUtilsConMonWrapperInfo::ConnectionInfo(
-    uint connectionId)
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_CONNECTIONINFO_ENTRY, this);
-    
-    WlanQtUtilsConnection *activeConn = NULL;
-
-    if (IsWlanConnection(connectionId)) {
-        activeConn = new WlanQtUtilsConnection();
-        activeConn->setConnectionId(connectionId);
-        if (!ConnectionInfoDetails(activeConn)) {
-            delete activeConn;
-            activeConn = NULL;
-        }
-    }
-
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_CONNECTIONINFO_EXIT, this);
-    return activeConn;
-}
-
-/*!
-   Gets detailed information of a given connection.
-
-   @param[out] connection Where to store info. Connection ID must already
-                          be valid.
-                          
-   @return Returns ETrue if detail fetching succeeded.
-*/
-
-TBool WlanQtUtilsConMonWrapperInfo::ConnectionInfoDetails(
-    WlanQtUtilsConnection *connection)
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_CONNECTIONINFODETAILS_ENTRY, this);
-    Q_ASSERT(connection != NULL);
-
-    TBool success = EFalse;
-    TUint connectionId = connection->connectionId();
-    TRequestStatus status;
-
-    // Get connection IAP ID.
-    TUint iapId = 0;
-    iMonitor.GetUintAttribute(
-        connectionId,
-        0,
-        KIAPId,
-        iapId,
-        status);
-    User::WaitForRequest(status);
-    if (status.Int() == KErrNone) {
-        connection->setIapId(iapId);
-
-        // Get connection status.
-        TInt connectionStatus = 0;
-        iMonitor.GetIntAttribute(
-            connectionId,
-            0,
-            KConnectionStatus,
-            connectionStatus,
-            status);
-        User::WaitForRequest(status);
-        if (status.Int() == KErrNone) {
-            connection->setConnectionStatus(
-                ConnMonConnStatusMap(connectionStatus));
-            success = ETrue;
-        }
-    }
-
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_CONNECTIONINFODETAILS_EXIT, this);
-    return success;
-}
-
-/*!
-   Handler of Connection Monitor Server events.
-   
-   @param [in] connMonEvent Connection monitor event.
-*/
-
-void WlanQtUtilsConMonWrapperInfo::EventL(const CConnMonEventBase& connMonEvent)
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_EVENTL_ENTRY, this);
-
-    TUint connectionId = connMonEvent.ConnectionId();
-    
-    OstTraceExt2(
-        TRACE_NORMAL,
-        WLANQTUTILSCONMONWRAPPERINFO_EVENTL_EVENTTYPE,
-        "WlanQtUtilsConMonWrapperInfo::EventL;connectionId=%u;aConnMonEvent.EventType()=%{ConnMonEvent}",
-        connectionId,
-        connMonEvent.EventType());
-
-    switch (connMonEvent.EventType()) {
-    case EConnMonCreateConnection:
-        // Filter out other than WLAN connections
-        if (IsWlanConnection(connectionId)) {
-            iMonitoringConnection = connectionId;
-            emit q_ptr->connCreatedEventFromWrapper(connectionId);
-        }
-        break;
-        
-    case EConnMonDeleteConnection:
-        if (iMonitoringConnection == connectionId) {
-            iMonitoringConnection = 0;
-            emit q_ptr->connDeletedEventFromWrapper(connectionId);
-        }
-        break;
-        
-    case EConnMonConnectionStatusChange:
-        if (iMonitoringConnection == connectionId) {
-            // Find out the new status for the connection
-            const CConnMonConnectionStatusChange *connMonStatusEvent;
-            connMonStatusEvent =
-                static_cast< const CConnMonConnectionStatusChange* >(&connMonEvent);
-            WlanQtUtils::ConnStatus connectionStatus;
-            connectionStatus =
-                ConnMonConnStatusMap(connMonStatusEvent->ConnectionStatus());
-            
-            OstTraceExt2(
-                TRACE_NORMAL,
-                WLANQTUTILSCONMONWRAPPERINFO_EVENTL_CONNSTATUS,
-                "WlanQtUtilsConMonWrapperInfo::EventL;connectionId=%u;eventConnectionStatusChange->ConnectionStatus()=%{ConnMonConnStatus}",
-                connectionId,
-                connMonStatusEvent->ConnectionStatus());
-    
-            if (connectionStatus != WlanQtUtils::ConnStatusNone) {
-                emit q_ptr->connStatusEventFromWrapper(
-                    connectionId,
-                    connectionStatus);
-            }
-        }
-        break;
-        
-    default:
-        // Not interesting
-        break;
-    }
-
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_EVENTL_EXIT, this);
-}
-
-/*!
-   Maps Connection Monitor's connection status value into
-   WlanQtUtilsConnectionStatus.
-   
-   Note: Mapping is only valid for WLAN connections.
-
-   @param connStatus Connection status as used by Connection
-                     Monitor server. Defined in nifvar.h.
-   @return Connection status in Wlan Qt Utilities style.
-*/
-
-WlanQtUtils::ConnStatus WlanQtUtilsConMonWrapperInfo::ConnMonConnStatusMap(
-    TInt connStatus)
-    {    
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_CONNMONCONNSTATUSMAP_ENTRY, this);
-
-    WlanQtUtils::ConnStatus utilsConnStatus;
-    switch (connStatus) {
-    // KConnectionOpen is not final status for WLAN, because DHCP is
-    // run after that
-    case KConnectionOpen:
-    case KStartingConnection:
-        utilsConnStatus = WlanQtUtils::ConnStatusConnecting;
-        break;
-        
-    case KLinkLayerOpen:
-        utilsConnStatus = WlanQtUtils::ConnStatusConnected;
-        break;
-        
-    case KLinkLayerClosed:
-        utilsConnStatus = WlanQtUtils::ConnStatusDisconnected;
-        break;
-        
-    default:
-        // Ignore all other values
-        utilsConnStatus = WlanQtUtils::ConnStatusNone;
-        break;
-    }
-    
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_CONNMONCONNSTATUSMAP_EXIT, this);
-    return utilsConnStatus;
-}
-
-/*!
-    Checks the bearer of given connection.
-    Meant for filtering handling only for WLAN IAP's.
-    
-    @param [in] connectionId Connection ID.
-    
-    @return Returns ETrue if connection a WLAN connection, otherwise false. 
-*/
-
-TBool WlanQtUtilsConMonWrapperInfo::IsWlanConnection(TUint connectionId)
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_ISWLANCONNECTION_ENTRY, this);
-    
-    TBool result = EFalse;
-    TRequestStatus status;
-
-    TInt bearer = 0;
-    iMonitor.GetIntAttribute(
-        connectionId,
-        0,
-        KBearer,
-        bearer,
-        status);
-    User::WaitForRequest(status);
-
-    if (status.Int() == KErrNone && bearer == EBearerWLAN) {
-        result = ETrue;
-    }
-    
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_ISWLANCONNECTION_EXIT, this);
-    return result;
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapperinfo_symbian.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,354 @@
+/*
+* Copyright (c) 2009-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:
+* Private implementation of wrapper for Symbian Connection Monitor
+* library's scan interface.
+*/
+
+// System includes
+
+#include <rconnmon.h>
+#include <nifvar.h>
+
+// User includes
+
+#include "wlanqtutils.h"
+#include "wlanqtutilsconnection.h"
+#include "wlanqtutilsconmonwrapper.h"
+#include "wlanqtutilsconmonwrapperinfo_symbian.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanqtutilsconmonwrapperinfo_symbianTraces.h"
+#endif
+
+/*!
+    \class WlanQtUtilsConMonWrapperInfo
+    \brief Private wrapper for Symbian Connection Monitor library.
+
+    Provides functionality to request information about connections.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+    
+    @param [in] wrapper Wrapper to report progress to.
+*/
+
+WlanQtUtilsConMonWrapperInfo::WlanQtUtilsConMonWrapperInfo(
+    WlanQtUtilsConMonWrapper *wrapper) :
+    iMonitoringConnection(0),
+    q_ptr(wrapper)
+{
+    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_WLANQTUTILSCONMONWRAPPERINFO_ENTRY, this);
+
+    // Errors in Connection Monitor Server connection are fatal so just
+    // throw them as exceptions
+    QT_TRAP_THROWING(
+        iMonitor.ConnectL();
+        iMonitor.NotifyEventL(*this);
+        );
+
+    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_WLANQTUTILSCONMONWRAPPERINFO_EXIT, this);
+}
+
+/*!
+    Destructor.
+*/
+
+WlanQtUtilsConMonWrapperInfo::~WlanQtUtilsConMonWrapperInfo()
+{
+    OstTraceFunctionEntry1(DUP1_WLANQTUTILSCONMONWRAPPERINFO_WLANQTUTILSCONMONWRAPPERINFO_ENTRY, this);
+
+    iMonitor.CancelNotifications();
+    iMonitor.Close();
+
+    OstTraceFunctionExit1(DUP1_WLANQTUTILSCONMONWRAPPERINFO_WLANQTUTILSCONMONWRAPPERINFO_EXIT, this);
+}
+
+/*!
+   Getter for active connection information.
+
+   @return Information of active connection, if one exists.
+*/ 
+
+WlanQtUtilsConnection *WlanQtUtilsConMonWrapperInfo::ActiveConnection()
+{
+    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_ACTIVECONNECTION_ENTRY, this);
+
+    // Get number of active connections
+    TRequestStatus status;
+
+    WlanQtUtilsConnection *activeConn = NULL;
+    TUint numConnections = 0;
+    iMonitor.GetConnectionCount(numConnections, status);
+    User::WaitForRequest(status);
+    if (status.Int() == KErrNone) {
+        // Get connection info of this connection
+        for (TUint i = 1; i <= numConnections; i++) {
+            TUint numSubConnections = 0;
+            TUint connectionId = 0;
+            TInt ret = iMonitor.GetConnectionInfo(
+                i,
+                connectionId,
+                numSubConnections);
+            if (ret == KErrNone) {
+                activeConn = ConnectionInfo(connectionId);
+                if (activeConn != NULL) {
+                    // ConnectionInfo() only returns WLAN connections,
+                    // and there may be only one active WLAN connection,
+                    // so this is the one we want to return and also
+                    // remember later.
+                    Q_ASSERT(iMonitoringConnection == 0 
+                        || iMonitoringConnection == connectionId);
+                    iMonitoringConnection = connectionId;
+                    break;
+                }
+            }
+        }
+    }
+
+    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_ACTIVECONNECTION_EXIT, this);
+    return activeConn;
+}
+
+/*!
+   Returns information of a connection with the given connection ID.
+
+   @param[in] connectionId Connection ID.
+   @return Information of the given connection, if one exists.
+*/
+
+WlanQtUtilsConnection *WlanQtUtilsConMonWrapperInfo::ConnectionInfo(
+    uint connectionId)
+{
+    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_CONNECTIONINFO_ENTRY, this);
+    
+    WlanQtUtilsConnection *activeConn = NULL;
+
+    if (IsWlanConnection(connectionId)) {
+        activeConn = new WlanQtUtilsConnection();
+        activeConn->setConnectionId(connectionId);
+        if (!ConnectionInfoDetails(activeConn)) {
+            delete activeConn;
+            activeConn = NULL;
+        }
+    }
+
+    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_CONNECTIONINFO_EXIT, this);
+    return activeConn;
+}
+
+/*!
+   Gets detailed information of a given connection.
+
+   @param[out] connection Where to store info. Connection ID must already
+                          be valid.
+                          
+   @return Returns ETrue if detail fetching succeeded.
+*/
+
+TBool WlanQtUtilsConMonWrapperInfo::ConnectionInfoDetails(
+    WlanQtUtilsConnection *connection)
+{
+    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_CONNECTIONINFODETAILS_ENTRY, this);
+    Q_ASSERT(connection != NULL);
+
+    TBool success = EFalse;
+    TUint connectionId = connection->connectionId();
+    TRequestStatus status;
+
+    // Get connection IAP ID.
+    TUint iapId = 0;
+    iMonitor.GetUintAttribute(
+        connectionId,
+        0,
+        KIAPId,
+        iapId,
+        status);
+    User::WaitForRequest(status);
+    if (status.Int() == KErrNone) {
+        connection->setIapId(iapId);
+
+        // Get connection status.
+        TInt connectionStatus = 0;
+        iMonitor.GetIntAttribute(
+            connectionId,
+            0,
+            KConnectionStatus,
+            connectionStatus,
+            status);
+        User::WaitForRequest(status);
+        if (status.Int() == KErrNone) {
+            connection->setConnectionStatus(
+                ConnMonConnStatusMap(connectionStatus));
+            success = ETrue;
+        }
+    }
+
+    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_CONNECTIONINFODETAILS_EXIT, this);
+    return success;
+}
+
+/*!
+   Handler of Connection Monitor Server events.
+   
+   @param [in] connMonEvent Connection monitor event.
+*/
+
+void WlanQtUtilsConMonWrapperInfo::EventL(const CConnMonEventBase& connMonEvent)
+{
+    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_EVENTL_ENTRY, this);
+
+    TUint connectionId = connMonEvent.ConnectionId();
+    
+    OstTraceExt2(
+        TRACE_NORMAL,
+        WLANQTUTILSCONMONWRAPPERINFO_EVENTL_EVENTTYPE,
+        "WlanQtUtilsConMonWrapperInfo::EventL;connectionId=%u;aConnMonEvent.EventType()=%{ConnMonEvent}",
+        connectionId,
+        connMonEvent.EventType());
+
+    switch (connMonEvent.EventType()) {
+    case EConnMonCreateConnection:
+        // Filter out other than WLAN connections
+        if (IsWlanConnection(connectionId)) {
+            iMonitoringConnection = connectionId;
+            emit q_ptr->connCreatedEventFromWrapper(connectionId);
+        }
+        break;
+        
+    case EConnMonDeleteConnection:
+        if (iMonitoringConnection == connectionId) {
+            iMonitoringConnection = 0;
+            emit q_ptr->connDeletedEventFromWrapper(connectionId);
+        }
+        break;
+        
+    case EConnMonConnectionStatusChange:
+        if (iMonitoringConnection == connectionId) {
+            // Find out the new status for the connection
+            const CConnMonConnectionStatusChange *connMonStatusEvent;
+            connMonStatusEvent =
+                static_cast< const CConnMonConnectionStatusChange* >(&connMonEvent);
+            WlanQtUtils::ConnStatus connectionStatus;
+            connectionStatus =
+                ConnMonConnStatusMap(connMonStatusEvent->ConnectionStatus());
+            
+            OstTraceExt2(
+                TRACE_NORMAL,
+                WLANQTUTILSCONMONWRAPPERINFO_EVENTL_CONNSTATUS,
+                "WlanQtUtilsConMonWrapperInfo::EventL;connectionId=%u;eventConnectionStatusChange->ConnectionStatus()=%{ConnMonConnStatus}",
+                connectionId,
+                connMonStatusEvent->ConnectionStatus());
+    
+            if (connectionStatus != WlanQtUtils::ConnStatusNone) {
+                emit q_ptr->connStatusEventFromWrapper(
+                    connectionId,
+                    connectionStatus);
+            }
+        }
+        break;
+        
+    default:
+        // Not interesting
+        break;
+    }
+
+    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_EVENTL_EXIT, this);
+}
+
+/*!
+   Maps Connection Monitor's connection status value into
+   WlanQtUtilsConnectionStatus.
+   
+   Note: Mapping is only valid for WLAN connections.
+
+   @param connStatus Connection status as used by Connection
+                     Monitor server. Defined in nifvar.h.
+   @return Connection status in Wlan Qt Utilities style.
+*/
+
+WlanQtUtils::ConnStatus WlanQtUtilsConMonWrapperInfo::ConnMonConnStatusMap(
+    TInt connStatus)
+    {    
+    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_CONNMONCONNSTATUSMAP_ENTRY, this);
+
+    WlanQtUtils::ConnStatus utilsConnStatus;
+    switch (connStatus) {
+    // KConnectionOpen is not final status for WLAN, because DHCP is
+    // run after that
+    case KConnectionOpen:
+    case KStartingConnection:
+        utilsConnStatus = WlanQtUtils::ConnStatusConnecting;
+        break;
+        
+    case KLinkLayerOpen:
+        utilsConnStatus = WlanQtUtils::ConnStatusConnected;
+        break;
+        
+    case KLinkLayerClosed:
+        utilsConnStatus = WlanQtUtils::ConnStatusDisconnected;
+        break;
+        
+    default:
+        // Ignore all other values
+        utilsConnStatus = WlanQtUtils::ConnStatusNone;
+        break;
+    }
+    
+    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_CONNMONCONNSTATUSMAP_EXIT, this);
+    return utilsConnStatus;
+}
+
+/*!
+    Checks the bearer of given connection.
+    Meant for filtering handling only for WLAN IAP's.
+    
+    @param [in] connectionId Connection ID.
+    
+    @return Returns ETrue if connection a WLAN connection, otherwise false. 
+*/
+
+TBool WlanQtUtilsConMonWrapperInfo::IsWlanConnection(TUint connectionId)
+{
+    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERINFO_ISWLANCONNECTION_ENTRY, this);
+    
+    TBool result = EFalse;
+    TRequestStatus status;
+
+    TInt bearer = 0;
+    iMonitor.GetIntAttribute(
+        connectionId,
+        0,
+        KBearer,
+        bearer,
+        status);
+    User::WaitForRequest(status);
+
+    if (status.Int() == KErrNone && bearer == EBearerWLAN) {
+        result = ETrue;
+    }
+    
+    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERINFO_ISWLANCONNECTION_EXIT, this);
+    return result;
+}
--- a/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapperscan_s60.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,330 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-* Private implementation of wrapper for Symbian Connection Monitor
-* library's scan interface.
-*/
-
-// System includes
-
-#include <QSharedPointer>
-#include <QVariant>
-#include <rconnmon.h>
-#include <cmmanagerdefines_shim.h>
-
-// User includes
-
-#include "wlanqtutilsap.h"
-#include "wlanqtutilsconmonwrapper.h"
-#include "wlanqtutilsconmonwrapperscan_s60_p.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "wlanqtutilsconmonwrapperscan_s60Traces.h"
-#endif
-
-/*!
-    \class WlanQtUtilsConMonWrapperScan
-    \brief Private wrapper for Symbian Connection Monitor library.
-
-    Provides functionality to scan WLAN networks.
-*/
-
-// External function prototypes
-
-// Local constants
-
-//! Size of the scan result buffer. Good for about 100 networks.
-#define SCAN_RESULT_BUFFER_SIZE 15000
-
-// ======== LOCAL FUNCTIONS ========
-
-// ======== MEMBER FUNCTIONS ========
-
-/*!
-    Constructor.
-    
-    @param [in] wrapper Wrapper to report progress to.
- */
-
-WlanQtUtilsConMonWrapperScan::WlanQtUtilsConMonWrapperScan(
-    WlanQtUtilsConMonWrapper *wrapper) :
-    CActive(EPriorityStandard),
-    iWlanBuf(NULL),
-    iWlanPtr(0, 0),
-    iScanCancelled(EFalse),
-    q_ptr(wrapper)
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERSCAN_WLANQTUTILSCONMONWRAPPERSCAN_ENTRY, this);
-    
-    CActiveScheduler::Add(this);
-    // Errors in Connection Monitor Server connection are fatal so just
-    // throw them as exceptions
-    QT_TRAP_THROWING(iMonitor.ConnectL());
-
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERSCAN_WLANQTUTILSCONMONWRAPPERSCAN_EXIT, this);
-}
-
-/*!
-    Destructor.
- */
-
-WlanQtUtilsConMonWrapperScan::~WlanQtUtilsConMonWrapperScan()
-{
-    OstTraceFunctionEntry1(DUP1_WLANQTUTILSCONMONWRAPPERSCAN_WLANQTUTILSCONMONWRAPPERSCAN_ENTRY, this);
-
-    // Cancel possibly ongoing scan
-    Cancel();
-    // Cancel notifications and close connection monitor session
-    iMonitor.Close();
-    delete iWlanBuf;
-
-    OstTraceFunctionExit1(DUP1_WLANQTUTILSCONMONWRAPPERSCAN_WLANQTUTILSCONMONWRAPPERSCAN_EXIT, this);
-}
-
-/*!
-    Request a scan for available WLAN networks.
- */
-
-void WlanQtUtilsConMonWrapperScan::ScanAvailableWlanAPs()
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERSCAN_SCANAVAILABLEWLANAPS_ENTRY, this);
-
-    if (!IsActive()) {
-        // Reserve the scan result buffer, if this is the first scan
-        // request. Same buffer is used for the lifetime of this object.
-        if (iWlanBuf == NULL) {
-            iWlanBuf = new CConnMonWlanNetworksPtrArrayPckg(
-                SCAN_RESULT_BUFFER_SIZE);
-            iWlanPtr.Set(iWlanBuf->Buf()->Des());
-        }
-
-        iScanCancelled = EFalse;
-        iMonitor.GetPckgAttribute(
-            EBearerIdWLAN,
-            0,
-            KWlanNetworks,
-            iWlanPtr,
-            iStatus);
-        SetActive();
-    }
-
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERSCAN_SCANAVAILABLEWLANAPS_EXIT, this);
-}
-
-/*!
-    Stops a possibly ongoing WLAN scan.
- */
-
-void WlanQtUtilsConMonWrapperScan::StopScan()
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERSCAN_STOPSCAN_ENTRY, this);
-
-    iScanCancelled = ETrue;
-    Cancel();
-
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERSCAN_STOPSCAN_EXIT, this);
-}
-
-/*!
-   From CActive: called when active object is cancelled.
- */
-
-void WlanQtUtilsConMonWrapperScan::DoCancel()
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERSCAN_DOCANCEL_ENTRY, this);
-
-    // Stop scan request, if one is active
-    iMonitor.CancelAsyncRequest(EConnMonGetPckgAttribute);
-
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERSCAN_DOCANCEL_EXIT, this);
-}
-
-/*!
-   From CActive: called when async scan request has been completed.
-   Reports results to owning wrapper.
- */
-
-void WlanQtUtilsConMonWrapperScan::RunL()
-{
-    OstTraceFunctionEntry1(WLANQTUTILSCONMONWRAPPERSCAN_RUNL_ENTRY, this);
-    
-    OstTrace1(
-        TRACE_NORMAL,
-        WLANQTUTILSCONMONWRAPPERSCAN_RUNL_STATUS,
-        "WlanQtUtilsConMonWrapperScan::RunL;iStatus=%d", iStatus.Int() );
-    
-    if (iStatus == KErrNone) {
-        RConnMonWlanNetworksPtrArray wlanPtrArray;
-        iWlanBuf->UnpackToL(wlanPtrArray);
-        QList< QSharedPointer<WlanQtUtilsAp> > wlanScanResult;
-
-        OstTrace1(
-            TRACE_NORMAL,
-            WLANQTUTILSCONMONWRAPPERSCAN_RUNL_COUNT,
-            "WlanQtUtilsConMonWrapperScan::RunL;count=%d",
-            wlanPtrArray.Count());
-        
-        for (TInt i = 0; i < wlanPtrArray.Count(); i++) {
-            // Convert name to QString
-            TBuf<CConnMonWlanNetwork::KMaxNameLength> wlanName =
-                    wlanPtrArray[i]->Name();
-            QString wlanNameInQt =
-                QString::fromUtf16(wlanName.Ptr(), wlanName.Length());
-
-            OstTraceExt1(
-                TRACE_DUMP,
-                WLANQTUTILSCONMONWRAPPERSCAN_RUNL,
-                "WlanQtUtilsConMonWrapperScan::RunL;name=%S",
-                wlanPtrArray[i]->Name());
-            
-            // Skip over hidden networks. There is no spec for what
-            // their names will contain, but at least names with only
-            // null characters and whitespace characters are seen
-            // in real life.
-            wlanNameInQt.remove(QChar());
-            if (wlanNameInQt.trimmed().isEmpty()) {
-                delete wlanPtrArray[i];
-                continue;
-            }
-            
-            // Go ahead and create the access point
-            QSharedPointer<WlanQtUtilsAp> ap = 
-                QSharedPointer<WlanQtUtilsAp>(new WlanQtUtilsAp());
-
-            ap->setValue(WlanQtUtilsAp::ConfIdSsid, wlanNameInQt);
-
-            StoreConMonConnMode(ap, wlanPtrArray[i]->ConnectionMode());
-            ap->setValue(
-                WlanQtUtilsAp::ConfIdSignalStrength, 
-                wlanPtrArray[i]->SignalStrength());
-
-            // Security mode values defined in enum TConnMonSecurityModeV2,
-            // rconnmon.h.
-            StoreConMonSecMode(ap, wlanPtrArray[i]->SecurityModeV2());
-
-            // TODO: "Adding WLAN network manually" subfreature:
-            // wps (Wifi Protected Setup) support, read this from connmon
-            ap->setValue(WlanQtUtilsAp::ConfIdWpsSupported, false);
-            // TODO: "Adding WLAN network manually" subfreature:
-            // different scan requests needed to identify hidden networks
-            ap->setValue(WlanQtUtilsAp::ConfIdHidden, false);
-            
-            wlanScanResult.append(ap);
-            delete wlanPtrArray[i];
-        }
-        // Don't report results, if scan was cancelled
-        if (!iScanCancelled) {
-            emit q_ptr->availableWlanApsFromWrapper(wlanScanResult);                
-        }
-        // else: scan was probably stopped before results were reveived
-        
-        wlanPtrArray.Close();
-        
-        // QSharedPointer takes care of memory deallocation
-        wlanScanResult.clear();
-    }
-
-    OstTraceFunctionExit1(WLANQTUTILSCONMONWRAPPERSCAN_RUNL_EXIT, this);
-}
-
-/*!
-   Stores Security mode parameters received from ConnMon to \a ap class.
-
-   @param ap Access Point object to where the configuration is stored
-   @param conMonSecMode Security mode to store.
- */
-
-void WlanQtUtilsConMonWrapperScan::StoreConMonSecMode(
-    QSharedPointer<WlanQtUtilsAp> ap,
-    TUint conMonSecMode)
-    {
-    // Entry-exit traces left out on purpose, because this is a simple
-    // function and called many times inside a loop.
-    
-    CMManagerShim::WlanSecMode secMode;
-    ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
-    
-    switch (conMonSecMode) {
-    case EConnMonSecurityV2WepOpen:
-    case EConnMonSecurityV2WepShared:
-        secMode = CMManagerShim::WlanSecModeWep;
-        break;
-        
-    case EConnMonSecurityV2802d1x:
-        secMode = CMManagerShim::WlanSecMode802_1x;
-        break;
-        
-    case EConnMonSecurityV2Wpa:
-        secMode = CMManagerShim::WlanSecModeWpa;
-        break;
-        
-    case EConnMonSecurityV2WpaPsk:
-        secMode = CMManagerShim::WlanSecModeWpa;
-        ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
-        break;
-        
-    case EConnMonSecurityV2Wpa2:
-        secMode = CMManagerShim::WlanSecModeWpa2;
-        break;
-        
-    case EConnMonSecurityV2Wpa2Psk:
-        secMode = CMManagerShim::WlanSecModeWpa2;
-        ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
-        break;
-        
-    case EConnMonSecurityV2Wapi:
-    case EConnMonSecurityV2WapiPsk:
-        secMode = CMManagerShim::WlanSecModeWapi;
-        break;
-        
-    default:
-        Q_ASSERT(conMonSecMode == EConnMonSecurityV2Open);
-        secMode = CMManagerShim::WlanSecModeOpen;
-        break;
-    }
-    
-    ap->setValue(WlanQtUtilsAp::ConfIdSecurityMode, secMode);
-}
-
-/*!
-   Stores connection mode parameters received from ConnMon to \a ap class.
-
-   @param ap Access Point object to where the configuration is stored
-   @param conMonConnMode Connection mode to store.
- */
-
-void WlanQtUtilsConMonWrapperScan::StoreConMonConnMode(
-    QSharedPointer<WlanQtUtilsAp> ap,
-    TInt conMonConnMode)
-{
-    // Entry-exit traces left out on purpose, because this is a simple
-    // function and called many times inside a loop.
-    
-    CMManagerShim::WlanConnMode connMode; 
-    
-    switch (conMonConnMode){
-    case EConnMonInfraStructure:
-    case EConnMonSecureInfra:
-        connMode = CMManagerShim::Infra;
-        break;
-        
-    default:
-        Q_ASSERT(conMonConnMode == EConnMonAdHoc);
-        connMode = CMManagerShim::Adhoc;
-        break;
-    }
-    
-    ap->setValue(WlanQtUtilsAp::ConfIdConnectionMode, connMode);
-}
--- a/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconntestwrapper.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-*
-*/
-
-// INCLUDE FILES
-#include "wlanqtutilsconntestwrapper.h"
-#include "wlanqtutilsconntestwrapper_s60_p.h"
-
-ConnTestWrapper::ConnTestWrapper(QObject *parent) :
-    QObject(parent),
-    d_ptr_(new ConnTestWrapperPrivate(this))
-{
-}
-
-ConnTestWrapper::~ConnTestWrapper()
-{
-}
-
-void ConnTestWrapper::connectivityTestDone(bool result)
-{
-    emit connectivityTestResult(result);
-}
-
-void ConnTestWrapper::startConnectivityTest(int iapId, int netId)
-{
-    d_ptr_->startConnectivityTest(iapId, netId);
-}
-
-//end of file
--- a/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconntestwrapper_s60.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-*
-*/
-
-// INCLUDE FILES
-#include <e32base.h>
-#include <ictscommon.h>
-
-#include "wlanqtutilsconntestwrapper.h"
-#include "wlanqtutilsconntestwrapper_s60_p.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "wlanqtutilsconntestwrapper_s60Traces.h"
-#endif
-
-
-// =========== PRIVATE CLASS MEMBER FUNCTIONS ===============
-//
-ConnTestWrapperPrivate::ConnTestWrapperPrivate(
-    ConnTestWrapper *aWrapper )
-: q_ptr( aWrapper ), iIct( NULL )
-    {
-    OstTraceFunctionEntry1( CONNTESTWRAPPERPRIVATE_CONNTESTWRAPPERPRIVATE_ENTRY, this );
-    OstTraceFunctionExit1( CONNTESTWRAPPERPRIVATE_CONNTESTWRAPPERPRIVATE_EXIT, this );
-    }
-
-ConnTestWrapperPrivate::~ConnTestWrapperPrivate()
-    {
-    OstTraceFunctionEntry1( CONNTESTWRAPPERPRIVATE_CONNTESTWRAPPERPRIVATEDESTR_ENTRY, this );
-    
-    if ( !NULL ) 
-        {
-        delete iIct;
-        }        
-    
-    OstTraceFunctionExit1( CONNTESTWRAPPERPRIVATE_CONNTESTWRAPPERPRIVATEDESTR_EXIT, this );
-    }
-
-void ConnTestWrapperPrivate::ConnectivityObserver( 
-    TIctsTestResult aResult, 
-    const TDesC& /*aString*/ )
-    {
-    OstTraceFunctionEntry1( CONNTESTWRAPPERPRIVATE_CONNECTIVITYOBSERVER_ENTRY, this );
-    OstTrace1(
-        TRACE_NORMAL,
-        CONNTESTWRAPPERPRIVATE_CONNECTIVITYOBSERVER,
-        "ConnTestWrapperPrivate::ConnectivityObserver;aResult=%u", aResult );
-    
-    if ( aResult == EConnectionOk )
-        {
-        q_ptr->connectivityTestDone( ETrue );            
-        }
-    else
-        {
-        q_ptr->connectivityTestDone( EFalse );            
-        }
-    
-    delete iIct;
-    iIct = NULL;
-
-    OstTraceFunctionExit1( CONNTESTWRAPPERPRIVATE_CONNECTIVITYOBSERVER_EXIT, this );
-    }
-
-void ConnTestWrapperPrivate::startConnectivityTest(
-    int aIapId, int aNetId )
-    {
-    OstTraceFunctionEntry1( CONNTESTWRAPPERPRIVATE_STARTCONNECTIVITYTEST_ENTRY, this );
-    OstTraceExt2(
-        TRACE_NORMAL,
-        CONNTESTWRAPPERPRIVATE_STARTCONNECTIVITYTEST,
-        "ConnTestWrapperPrivate::startConnectivityTest;aIapId=%d;aNetId=%d", aIapId, aNetId );
-    
-    TRAPD( err, startConnectivityTestL( aIapId, aNetId ) );
-    
-    // Check if startConnectivityTestL() leaved.
-    if ( KErrNone != err )
-        {
-        q_ptr->connectivityTestDone( EFalse );
-        }
-
-    OstTraceFunctionExit1( CONNTESTWRAPPERPRIVATE_STARTCONNECTIVITYTEST_EXIT, this );
-    }
-
-void ConnTestWrapperPrivate::startConnectivityTestL(
-    TInt aIapId, TInt aNetId )
-    {
-    OstTraceFunctionEntry1( CONNTESTWRAPPERPRIVATE_STARTCONNECTIVITYTESTL_ENTRY, this );
-    
-    iIct = CIctsClientInterface::NewL( aIapId, aNetId, *this );
-    iIct->StartL();
- 
-    OstTraceFunctionExit1( CONNTESTWRAPPERPRIVATE_STARTCONNECTIVITYTESTL_EXIT, this );
-    }
-
-//end of file
--- a/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsesockwrapper.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsesockwrapper.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -22,7 +22,7 @@
 // User includes
 
 #include "wlanqtutilsesockwrapper.h"
-#include "wlanqtutilsesockwrapper_s60_p.h"
+#include "wlanqtutilsesockwrapper_symbian.h"
 
 /*!
     \class WlanQtUtilsEsockWrapper
--- a/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsesockwrapper_s60.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*
-* Copyright (c) 2009-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:
-* Private implementation of wrapper for Symbian Esock library.
-*/
-
-// System includes
-
-#include <e32base.h>
-#include <es_sock.h>
-#include <in_sock.h>
-#include <extendedconnpref.h>
-
-// User includes
-
-#include "wlanqtutilsesockwrapper.h"
-#include "wlanqtutilsesockwrapper_s60_p.h"
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "wlanqtutilsesockwrapper_s60Traces.h"
-#endif
-
-/*!
-    \class WlanQtUtilsWlanQtUtilsEsockWrapperPrivate
-    \brief Private implementation of wrapper for Symbian Esock library.
-
-    Provides functionality to connect and disconnect IAPs.
-*/
-
-// External function prototypes
-
-// Local constants
-
-// ======== LOCAL FUNCTIONS ========
-
-// ======== MEMBER FUNCTIONS ========
-
-/*!
-    Constructor.
-    
-    @param [in] wrapper Wrapper to report progress to.
- */
-
-WlanQtUtilsEsockWrapperPrivate::WlanQtUtilsEsockWrapperPrivate(
-    WlanQtUtilsEsockWrapper *wrapper) :
-    CActive(EPriorityStandard),
-    iConnectionActive(EFalse),
-    q_ptr(wrapper)
-{
-    OstTraceFunctionEntry1(WLANQTUTILSESOCKWRAPPERPRIVATE_WLANQTUTILSESOCKWRAPPERPRIVATE_ENTRY, this);
-
-    CActiveScheduler::Add(this);
-    
-    // Establish a session to Socket Server. Errors in Socket Server
-    // connection are fatal so just throw them as exceptions
-    qt_symbian_throwIfError(iSocketServer.Connect());
-
-    OstTraceFunctionExit1(WLANQTUTILSESOCKWRAPPERPRIVATE_WLANQTUTILSESOCKWRAPPERPRIVATE_EXIT, this);
-}
-
-/*!
-    Destructor.
- */
-
-WlanQtUtilsEsockWrapperPrivate::~WlanQtUtilsEsockWrapperPrivate()
-{
-    OstTraceFunctionEntry1(DUP1_WLANQTUTILSESOCKWRAPPERPRIVATE_WLANQTUTILSESOCKWRAPPERPRIVATE_ENTRY, this);
-
-    // Close any possibly ongoing connection
-    Cancel();
-    // Close Socket Server session
-    iSocketServer.Close();
-    
-    OstTraceFunctionExit1(DUP1_WLANQTUTILSESOCKWRAPPERPRIVATE_WLANQTUTILSESOCKWRAPPERPRIVATE_EXIT, this);
-}
-
-/*!
-   Starts connection creation to given IAP.
-
-   @param [in] iapId IAP ID to connect.
- */
-
-void WlanQtUtilsEsockWrapperPrivate::ConnectIap(int iapId)
-{
-    OstTraceFunctionEntry1(WLANQTUTILSESOCKWRAPPERPRIVATE_CONNECTIAP_ENTRY, this);
-    
-    // Cancel a (possibly) ongoing previous request
-    Cancel();
-    
-    OstTrace1(
-        TRACE_NORMAL,
-        WLANQTUTILSESOCKWRAPPERPRIVATE_CONNECTIAP,
-        "WlanQtUtilsEsockWrapperPrivate::connectIap;iapId=%d",
-        iapId );
-    
-    // Open an RConnection object. Errors in RConnection opening are
-    // fatal so just throw them as exceptions
-    qt_symbian_throwIfError(iConnection.Open(iSocketServer));
-    
-    // Create overrides for connection preferences to force opening of the
-    // given IAP without any user prompts.
-    TConnPrefList prefList;
-    TExtendedConnPref prefs;
-    prefs.SetIapId(iapId);
-    prefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
-    QT_TRAP_THROWING(prefList.AppendL(&prefs));
-     
-    // Start a connection with connection preferences
-    iConnection.Start(prefList, iStatus);
-
-    iConnectionActive = ETrue;
-    
-    SetActive();
-    
-    OstTraceFunctionExit1(WLANQTUTILSESOCKWRAPPERPRIVATE_CONNECTIAP_EXIT, this);
-}
-
-/*!
-   Disconnects connection, if one is active.
- */
-
-void WlanQtUtilsEsockWrapperPrivate::DisconnectIap()
-{      
-    OstTraceFunctionEntry1(WLANQTUTILSESOCKWRAPPERPRIVATE_DISCONNECTIAP_ENTRY, this);
-    
-    if (iConnectionActive) {
-        OstTrace0(
-            TRACE_NORMAL,
-            WLANQTUTILSESOCKWRAPPERPRIVATE_DISCONNECTIAP_DISCONNECT,
-            "WlanQtUtilsEsockWrapperPrivate::disconnectIap Disconnecting connection");
-        
-        iConnectionActive = EFalse;
-        iConnection.Close();            
-    } else {
-        OstTrace0(
-            TRACE_NORMAL,
-            WLANQTUTILSESOCKWRAPPERPRIVATE_DISCONNECTIAP_IGNORED,
-            "WlanQtUtilsEsockWrapperPrivate::disconnectIap Ignored since no active connection");
-    }
-    
-    OstTraceFunctionExit1(WLANQTUTILSESOCKWRAPPERPRIVATE_DISCONNECTIAP_EXIT, this);
-}
-
-/*!
-   From CActive: called when async request (RConnection::Start())
-   has been completed.
- */
-
-void WlanQtUtilsEsockWrapperPrivate::RunL()
-{
-    OstTraceFunctionEntry1(WLANQTUTILSESOCKWRAPPERPRIVATE_RUNL_ENTRY, this);
-
-    OstTrace1(
-        TRACE_NORMAL,
-        WLANQTUTILSESOCKWRAPPERPRIVATE_RUNL,
-        "WlanQtUtilsEsockWrapperPrivate::RunL;iStatus=%d", iStatus.Int());
-    
-    bool success;
-    if (iStatus == KErrNone) {
-        success = true;
-    } else {
-        success = false;
-        iConnectionActive = EFalse;
-    }
-    
-    // Report to public wrapper
-    q_ptr->updateConnection(success, iStatus.Int());
-    
-    OstTraceFunctionExit1(WLANQTUTILSESOCKWRAPPERPRIVATE_RUNL_EXIT, this);
-}
-
-/*!
-   From CActive: called when active object is cancelled.
- */
-
-void WlanQtUtilsEsockWrapperPrivate::DoCancel()
-{
-    OstTraceFunctionEntry1(WLANQTUTILSESOCKWRAPPERPRIVATE_DOCANCEL_ENTRY, this);
-    
-    // Disconnect, if needed.
-    DisconnectIap();
-    
-    OstTraceFunctionExit1(WLANQTUTILSESOCKWRAPPERPRIVATE_DOCANCEL_EXIT, this);
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsesockwrapper_symbian.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,196 @@
+/*
+* Copyright (c) 2009-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:
+* Private implementation of wrapper for Symbian Esock library.
+*/
+
+// System includes
+
+#include <e32base.h>
+#include <es_sock.h>
+#include <in_sock.h>
+#include <extendedconnpref.h>
+
+// User includes
+
+#include "wlanqtutilsesockwrapper.h"
+#include "wlanqtutilsesockwrapper_symbian.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanqtutilsesockwrapper_symbianTraces.h"
+#endif
+
+/*!
+    \class WlanQtUtilsWlanQtUtilsEsockWrapperPrivate
+    \brief Private implementation of wrapper for Symbian Esock library.
+
+    Provides functionality to connect and disconnect IAPs.
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+    
+    @param [in] wrapper Wrapper to report progress to.
+ */
+
+WlanQtUtilsEsockWrapperPrivate::WlanQtUtilsEsockWrapperPrivate(
+    WlanQtUtilsEsockWrapper *wrapper) :
+    CActive(EPriorityStandard),
+    iConnectionActive(EFalse),
+    q_ptr(wrapper)
+{
+    OstTraceFunctionEntry1(WLANQTUTILSESOCKWRAPPERPRIVATE_WLANQTUTILSESOCKWRAPPERPRIVATE_ENTRY, this);
+
+    CActiveScheduler::Add(this);
+    
+    // Establish a session to Socket Server. Errors in Socket Server
+    // connection are fatal so just throw them as exceptions
+    qt_symbian_throwIfError(iSocketServer.Connect());
+
+    OstTraceFunctionExit1(WLANQTUTILSESOCKWRAPPERPRIVATE_WLANQTUTILSESOCKWRAPPERPRIVATE_EXIT, this);
+}
+
+/*!
+    Destructor.
+ */
+
+WlanQtUtilsEsockWrapperPrivate::~WlanQtUtilsEsockWrapperPrivate()
+{
+    OstTraceFunctionEntry1(DUP1_WLANQTUTILSESOCKWRAPPERPRIVATE_WLANQTUTILSESOCKWRAPPERPRIVATE_ENTRY, this);
+
+    // Close any possibly ongoing connection
+    Cancel();
+    // Close Socket Server session
+    iSocketServer.Close();
+    
+    OstTraceFunctionExit1(DUP1_WLANQTUTILSESOCKWRAPPERPRIVATE_WLANQTUTILSESOCKWRAPPERPRIVATE_EXIT, this);
+}
+
+/*!
+   Starts connection creation to given IAP.
+
+   @param [in] iapId IAP ID to connect.
+ */
+
+void WlanQtUtilsEsockWrapperPrivate::ConnectIap(int iapId)
+{
+    OstTraceFunctionEntry1(WLANQTUTILSESOCKWRAPPERPRIVATE_CONNECTIAP_ENTRY, this);
+    
+    // Cancel a (possibly) ongoing previous request
+    Cancel();
+    
+    OstTrace1(
+        TRACE_NORMAL,
+        WLANQTUTILSESOCKWRAPPERPRIVATE_CONNECTIAP,
+        "WlanQtUtilsEsockWrapperPrivate::connectIap;iapId=%d",
+        iapId );
+    
+    // Open an RConnection object. Errors in RConnection opening are
+    // fatal so just throw them as exceptions
+    qt_symbian_throwIfError(iConnection.Open(iSocketServer));
+    
+    // Create overrides for connection preferences to force opening of the
+    // given IAP without any user prompts.
+    TConnPrefList prefList;
+    TExtendedConnPref prefs;
+    prefs.SetIapId(iapId);
+    prefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+    QT_TRAP_THROWING(prefList.AppendL(&prefs));
+     
+    // Start a connection with connection preferences
+    iConnection.Start(prefList, iStatus);
+
+    iConnectionActive = ETrue;
+    
+    SetActive();
+    
+    OstTraceFunctionExit1(WLANQTUTILSESOCKWRAPPERPRIVATE_CONNECTIAP_EXIT, this);
+}
+
+/*!
+   Disconnects connection, if one is active.
+ */
+
+void WlanQtUtilsEsockWrapperPrivate::DisconnectIap()
+{      
+    OstTraceFunctionEntry1(WLANQTUTILSESOCKWRAPPERPRIVATE_DISCONNECTIAP_ENTRY, this);
+    
+    if (iConnectionActive) {
+        OstTrace0(
+            TRACE_NORMAL,
+            WLANQTUTILSESOCKWRAPPERPRIVATE_DISCONNECTIAP_DISCONNECT,
+            "WlanQtUtilsEsockWrapperPrivate::disconnectIap Disconnecting connection");
+        
+        iConnectionActive = EFalse;
+        iConnection.Close();            
+    } else {
+        OstTrace0(
+            TRACE_NORMAL,
+            WLANQTUTILSESOCKWRAPPERPRIVATE_DISCONNECTIAP_IGNORED,
+            "WlanQtUtilsEsockWrapperPrivate::disconnectIap Ignored since no active connection");
+    }
+    
+    OstTraceFunctionExit1(WLANQTUTILSESOCKWRAPPERPRIVATE_DISCONNECTIAP_EXIT, this);
+}
+
+/*!
+   From CActive: called when async request (RConnection::Start())
+   has been completed.
+ */
+
+void WlanQtUtilsEsockWrapperPrivate::RunL()
+{
+    OstTraceFunctionEntry1(WLANQTUTILSESOCKWRAPPERPRIVATE_RUNL_ENTRY, this);
+
+    OstTrace1(
+        TRACE_NORMAL,
+        WLANQTUTILSESOCKWRAPPERPRIVATE_RUNL,
+        "WlanQtUtilsEsockWrapperPrivate::RunL;iStatus=%d", iStatus.Int());
+    
+    bool success;
+    if (iStatus == KErrNone) {
+        success = true;
+    } else {
+        success = false;
+        iConnectionActive = EFalse;
+    }
+    
+    // Report to public wrapper
+    q_ptr->updateConnection(success, iStatus.Int());
+    
+    OstTraceFunctionExit1(WLANQTUTILSESOCKWRAPPERPRIVATE_RUNL_EXIT, this);
+}
+
+/*!
+   From CActive: called when active object is cancelled.
+ */
+
+void WlanQtUtilsEsockWrapperPrivate::DoCancel()
+{
+    OstTraceFunctionEntry1(WLANQTUTILSESOCKWRAPPERPRIVATE_DOCANCEL_ENTRY, this);
+    
+    // Disconnect, if needed.
+    DisconnectIap();
+    
+    OstTraceFunctionExit1(WLANQTUTILSESOCKWRAPPERPRIVATE_DOCANCEL_EXIT, this);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsscan.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,89 @@
+/*
+* 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: 
+* WLAN scan platform specific implementation wrapper.
+*/
+
+// System includes
+
+// User includes
+
+#include "wlanqtutilsscan_symbian.h"
+#include "wlanqtutilsscan.h"
+
+/*!
+    \class WlanQtUtilsScan
+    \brief WLAN scan platform specific implementation wrapper.
+
+    This class implements the WLAN scanning functionality platform independently.
+    The private implementation class implements the platform specific parts. 
+*/
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor.
+    
+    @param [in] parent Parent object.
+*/
+
+WlanQtUtilsScan::WlanQtUtilsScan(QObject *parent) :
+    QObject(parent)
+{
+    QT_TRAP_THROWING(d_ptr = WlanQtUtilsScanPrivate::NewL(this));
+}
+
+/*!
+    Destructor.
+*/
+
+WlanQtUtilsScan::~WlanQtUtilsScan()
+{
+    delete d_ptr;
+}
+
+/*!
+    Scans available WLAN AP's (i.e. broadcast scan).
+*/
+
+void WlanQtUtilsScan::scanWlanAps()
+{
+    d_ptr->Scan();
+}
+
+/*!
+    Scans with given WLAN SSID (i.e. direct scan).
+    
+    @param [in] ssid WLAN SSID to scan.
+*/
+
+void WlanQtUtilsScan::scanWlanDirect(const QString &ssid)
+{
+    d_ptr->Scan(ssid);
+}
+
+/*!
+    Stops current scan. Can also be called if there is no scan in progres.
+*/
+
+void WlanQtUtilsScan::stopScan()
+{
+    d_ptr->StopScan();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsscan_symbian.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,418 @@
+/*
+* 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: 
+* Symbian platform specific implementation of WLAN scanning.
+*/
+
+// System includes
+
+#include <QList>
+#include <cmmanagerdefines_shim.h>
+#include <utf.h>
+
+// User includes
+
+#include "wlanqtutils.h"
+#include "wlanqtutilsap.h"
+#include "wlanqtutilsscan.h"
+#include "wlanqtutilsscan_symbian.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wlanqtutilsscan_symbianTraces.h"
+#endif
+
+
+/*!
+    \class WlanQtUtilsScanPrivate
+    \brief Symbian platform specific implementation of WLAN scanning.
+
+    Symbian platform specific implementation of WLAN scanning. 
+*/
+
+
+// External function prototypes
+
+// Local constants
+
+// Information Element ID for SSID as specified in 802.11.
+static const TUint8 KWlan802Dot11SsidIE = 0;
+
+// Bit mask for Capability info field to get type (Infra/AdHoc).
+static const TUint8 KWlan802Dot11CapabilityEssMask = 0x0001;
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Static factory constructor.
+    
+    @param [in,out] wrapper Public implementation class reference.
+    
+    @return New instance of the class.
+*/
+
+WlanQtUtilsScanPrivate *WlanQtUtilsScanPrivate::NewL(WlanQtUtilsScan *wrapper)
+{
+    OstTraceFunctionEntry0(WLANQTUTILSSCANPRIVATE_NEWL_ENTRY);
+    
+    WlanQtUtilsScanPrivate *self = new (ELeave) WlanQtUtilsScanPrivate(wrapper);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    
+    OstTraceFunctionExit0(WLANQTUTILSSCANPRIVATE_NEWL_EXIT);
+    return self;
+}
+
+/*!
+    Destructor.
+*/
+
+WlanQtUtilsScanPrivate::~WlanQtUtilsScanPrivate()
+{
+    OstTraceFunctionEntry0(WLANQTUTILSSCANPRIVATE_WLANQTUTILSSCANPRIVATE_ENTRY);
+    
+    Cancel();
+    delete mWlanMgmtClient;
+    mWlanMgmtClient = NULL;
+    delete mResults;
+    mResults = NULL;
+    
+    OstTraceFunctionExit0(WLANQTUTILSSCANPRIVATE_WLANQTUTILSSCANPRIVATE_EXIT);
+}
+
+/*!
+    Starts a broadcast scan of available access points.
+*/
+
+void WlanQtUtilsScanPrivate::Scan()
+{
+    OstTraceFunctionEntry0(WLANQTUTILSSCANPRIVATE_SCAN_ENTRY);
+    
+    // Scanning while previous scan is not complete is not supported
+    Q_ASSERT(!IsActive());
+    
+    // Make the scan
+    mWlanMgmtClient->GetScanResults(iStatus, *mResults);
+    SetActive();
+    
+    OstTraceFunctionExit0(WLANQTUTILSSCANPRIVATE_SCAN_EXIT);
+}
+
+/*!
+    Starts a direct scan of available access points having given SSID.
+    
+    @param ssid SSID to scan.
+*/
+
+void WlanQtUtilsScanPrivate::Scan(const QString &ssid)
+{
+    OstTraceFunctionEntry0(WLANQTUTILSSCANPRIVATE_SCAN_SSID_ENTRY);
+    
+    // Scanning while previous scan is not complete is not supported
+    Q_ASSERT(!IsActive());
+    
+    // Convert from QString to TBuf8
+    TBuf<KWlanMaxSsidLength> buffer(ssid.utf16());
+    TInt error = CnvUtfConverter::ConvertFromUnicodeToUtf8(mWlanSsid, buffer);
+    qt_symbian_throwIfError(error);
+
+    OstTraceExt1(
+        TRACE_NORMAL,
+        WLANQTUTILSSCANPRIVATE_SCAN_SSID,
+        "WlanQtUtilsScanPrivate::Scan;mWlanSsid=%s",
+        mWlanSsid);
+
+    // Make the scan
+    mWlanMgmtClient->GetScanResults(mWlanSsid, iStatus, *mResults);
+    SetActive();
+
+    OstTraceFunctionExit0(WLANQTUTILSSCANPRIVATE_SCAN_SSID_EXIT);
+}
+
+/*!
+    Stops an ongoing scan.
+*/
+
+void WlanQtUtilsScanPrivate::StopScan()
+{
+    OstTraceFunctionEntry0(WLANQTUTILSSCANPRIVATE_STOPSCAN_ENTRY);
+    
+    Cancel();
+    
+    OstTraceFunctionExit0(WLANQTUTILSSCANPRIVATE_STOPSCAN_EXIT);
+}
+
+/*!
+    Scan results handler.
+*/
+
+void WlanQtUtilsScanPrivate::RunL()
+{
+    OstTraceFunctionEntry0(WLANQTUTILSSCANPRIVATE_RUNL_ENTRY);
+    
+    QT_TRYCATCH_LEAVING(
+        if (iStatus != KErrNone) {
+            emit q_ptr->scanFailed(WlanQtUtils::ScanStatusError);
+        } else {
+            QList< QSharedPointer<WlanQtUtilsAp> > scanResults;
+            ExtractScanResults(scanResults);
+            
+            // Inform about the results 
+            emit q_ptr->availableWlanAps(scanResults);
+        }
+    );
+    
+    OstTraceFunctionExit0(WLANQTUTILSSCANPRIVATE_RUNL_EXIT);
+}
+
+/*!
+    Cancels an outstanding request.
+*/
+
+void WlanQtUtilsScanPrivate::DoCancel()
+{
+    OstTraceFunctionEntry0(WLANQTUTILSSCANPRIVATE_DOCANCEL_ENTRY);
+    
+    mWlanMgmtClient->CancelGetScanResults();
+
+    OstTraceFunctionExit0(WLANQTUTILSSCANPRIVATE_DOCANCEL_EXIT);
+}
+
+/*!
+    Constructor.
+    
+    @param [in,out] wrapper Public implementation class reference.
+*/
+
+WlanQtUtilsScanPrivate::WlanQtUtilsScanPrivate(WlanQtUtilsScan *wrapper) :
+    CActive(EPriorityStandard),
+    q_ptr(wrapper),
+    mWlanMgmtClient(NULL),
+    mResults(NULL)
+{
+    OstTraceFunctionEntry0(DUP1_WLANQTUTILSSCANPRIVATE_WLANQTUTILSSCANPRIVATE_ENTRY);
+    OstTraceFunctionExit0(DUP1_WLANQTUTILSSCANPRIVATE_WLANQTUTILSSCANPRIVATE_EXIT);
+}
+
+/*!
+    Second phase constructor.
+*/
+
+void WlanQtUtilsScanPrivate::ConstructL()
+{
+    OstTraceFunctionEntry0(WLANQTUTILSSCANPRIVATE_CONSTRUCTL_ENTRY);
+    
+    CActiveScheduler::Add(this);
+    mWlanMgmtClient = CWlanMgmtClient::NewL();
+    mResults = CWlanScanInfo::NewL();
+    
+    OstTraceFunctionExit0(WLANQTUTILSSCANPRIVATE_CONSTRUCTL_EXIT);
+}
+
+/*
+    Extracts scan results and stores them into the given AP list.
+    
+    @param [out] scanResults Scan result list.
+*/
+
+void WlanQtUtilsScanPrivate::ExtractScanResults(
+    QList< QSharedPointer<WlanQtUtilsAp> > &scanResults)
+{
+    for (mResults->First(); !mResults->IsDone(); mResults->Next()) {
+        // Create an access point for each result
+        QSharedPointer<WlanQtUtilsAp> ap(new WlanQtUtilsAp());
+        
+        // SSID
+        QString ssid = ExtractSsid();
+
+        // Skip over hidden networks. There is no spec for what
+        // their names will contain, but at least names with only
+        // null characters and whitespace characters are seen
+        // in real life.
+        if (ssid.trimmed().isEmpty()) {
+            continue;
+        }
+        ap->setValue(WlanQtUtilsAp::ConfIdSsid, ssid);
+        
+        // BSSID
+        QByteArray bssid = ExtractBssid();
+        ap->setValue(WlanQtUtilsAp::ConfIdBssid, bssid);
+        
+        // Signal strength
+        ap->setValue(
+            WlanQtUtilsAp::ConfIdSignalStrength,
+            (int)mResults->RXLevel());
+
+        // Connection Mode
+        CMManagerShim::WlanConnMode connMode;
+        if (mResults->Capability() & KWlan802Dot11CapabilityEssMask) {
+            connMode = CMManagerShim::Infra;
+        } else {
+            connMode = CMManagerShim::Adhoc;
+        }
+        ap->setValue(WlanQtUtilsAp::ConfIdConnectionMode, (int)connMode);
+
+        // Security Mode parameters
+        StoreSecMode(ap, mResults->ExtendedSecurityMode());
+        
+        // Hidden attribute
+        // These scan results do not tell if the AP is hidden or not
+        ap->setValue(WlanQtUtilsAp::ConfIdHidden, false);
+        
+        // WPS support
+        TBool wpsSupported = mResults->IsProtectedSetupSupported();
+        ap->setValue(
+            WlanQtUtilsAp::ConfIdWpsSupported,
+            (wpsSupported == EFalse) ? false : true);
+
+        // Append the AP to scan result list
+        scanResults.append(ap);
+    }
+}
+
+/*!
+    Extracts and cleans up the WLAN SSID from current scan result element.
+    
+    @return SSID string.
+*/
+
+QString WlanQtUtilsScanPrivate::ExtractSsid()
+{
+    // Get the SSID in raw data format
+    TUint8 ieLen;
+    const TUint8* ieData;
+    TInt ret = mResults->InformationElement(KWlan802Dot11SsidIE, ieLen, &ieData);
+    
+    // Convert into QString
+    QString ssid;
+    if (ret == KErrNone && ieLen > 0) {
+        // Trace the buffer as data to ease low level debugging
+        OstTraceData(
+            TRACE_DUMP,
+            WLANQTUTILSSCANPRIVATE_EXTRACTSSID_DATA,
+            "WlanQtUtilsScanPrivate::ExtractSsid data 0x%{hex8[]}",
+            ieData,
+            ieLen);
+
+        ssid = QString::fromUtf8((char *)ieData, ieLen);
+
+#ifdef OST_TRACE_COMPILER_IN_USE
+        TPtrC16 string(ssid.utf16(), ssid.length());
+        OstTraceExt1(
+            TRACE_DUMP,
+            WLANQTUTILSSCANPRIVATE_EXTRACTSSID_STRING,
+            "WlanQtUtilsScanPrivate::ExtractSsid string;ssid=%S",
+            string);
+#endif
+    }
+    
+    // Remove nul characters
+    ssid.remove(QChar());
+    
+    return ssid;
+}
+
+/*!
+    Extracts the WLAN BSSID from current scan result element.
+    
+    @return BSSID array.
+*/
+
+QByteArray WlanQtUtilsScanPrivate::ExtractBssid()
+{
+    TWlanBssid wlanBssid;
+    mResults->Bssid(wlanBssid);
+    QByteArray bssid;
+    for (int i = 0; i < (int)wlanBssid.Length(); i++) {
+        bssid[i] = (char)wlanBssid[i];
+    }
+
+#ifdef OST_TRACE_COMPILER_IN_USE
+    QString bssidHex(bssid.toHex());
+    TPtrC16 string(bssidHex.utf16(), bssidHex.length());
+
+    OstTraceExt1(
+        TRACE_DUMP,
+        WLANQTUTILSSCANPRIVATE_EXTRACTBSSID,
+        "WlanQtUtilsScanPrivate::ExtractBssid;bssid=%S",
+        string);
+#endif
+
+    return bssid;
+}
+
+/*!
+    Stores Security mode parameters to \a ap class.
+
+    @param [in,out] ap Access Point object to where the configuration is stored.
+    @param [in] secMode Security mode to store.
+*/
+
+void WlanQtUtilsScanPrivate::StoreSecMode(
+    QSharedPointer<WlanQtUtilsAp> ap,
+    TUint wlanSecMode)
+{
+    CMManagerShim::WlanSecMode secMode = CMManagerShim::WlanSecModeOpen;
+    ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
+    
+    switch (wlanSecMode) {
+    case EWlanConnectionExtentedSecurityModeWepOpen:
+    case EWlanConnectionExtentedSecurityModeWepShared:
+        secMode = CMManagerShim::WlanSecModeWep;
+        break;
+    
+    case EWlanConnectionExtentedSecurityMode802d1x:
+        secMode = CMManagerShim::WlanSecMode802_1x;
+        break;
+        
+    case EWlanConnectionExtentedSecurityModeWpa:
+        secMode = CMManagerShim::WlanSecModeWpa;
+        break;
+        
+    case EWlanConnectionExtentedSecurityModeWpaPsk:
+        secMode = CMManagerShim::WlanSecModeWpa;
+        ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
+        break;
+        
+    case EWlanConnectionExtentedSecurityModeWpa2:
+        secMode = CMManagerShim::WlanSecModeWpa2;
+        break;
+        
+    case EWlanConnectionExtentedSecurityModeWpa2Psk:
+        secMode = CMManagerShim::WlanSecModeWpa2;
+        ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
+        break;
+
+    case EWlanConnectionExtentedSecurityModeWapi:
+    case EWlanConnectionExtentedSecurityModeWapiPsk:
+        secMode = CMManagerShim::WlanSecModeWapi;
+        break;
+
+    case EWlanConnectionExtentedSecurityModeOpen:
+        secMode = CMManagerShim::WlanSecModeOpen;
+        break;
+        
+#ifndef QT_NO_DEBUG
+    default:
+        // Invalid security mode detected
+        Q_ASSERT(0);
+        break;
+#endif        
+    }
+    
+    ap->setValue(WlanQtUtilsAp::ConfIdSecurityMode, secMode);
+}
--- a/wlanutilities/wlansniffer/wlansnifferapplication/inc/wlansnifferengine.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/inc/wlansnifferengine.h	Tue Jul 06 15:29:22 2010 +0300
@@ -118,6 +118,8 @@
 private slots:
 
     void updateSetting(const XQSettingsKey &key, const QVariant &value);
+    
+    void handleWlanScanReady(int status);
 
 private: // data
 
@@ -137,6 +139,9 @@
     //! WLAN scan timer ID
     int mScanTimerId;                           
     
+    //! TRUE if scanning has been enabled
+    bool mScanEnabled;
+    
     //! TRUE if embedded
     bool mEmbedded;                             
     
--- a/wlanutilities/wlansniffer/wlansnifferapplication/inc/wlansnifferlistview.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/inc/wlansnifferlistview.h	Tue Jul 06 15:29:22 2010 +0300
@@ -110,6 +110,8 @@
     
     void handleWlanToggled();
     
+    void startWlanWizard();
+    
     void handleWlanEnableDialogClosed(HbAction *action);
 
 private: // data
--- a/wlanutilities/wlansniffer/wlansnifferapplication/inc/wlansniffermainwindow.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/inc/wlansniffermainwindow.h	Tue Jul 06 15:29:22 2010 +0300
@@ -23,6 +23,7 @@
 #include <QObject>
 #include <QString>
 #include <HbMainWindow>
+#include <QSharedPointer>
 
 // User includes
 
@@ -81,7 +82,7 @@
 
     // Owned data
 
-    WlanWizard *mWizard;                //!< WLAN Wizard object
+    QSharedPointer<WlanWizard> mWizard; //!< WLAN Wizard object
     WlanSnifferListView *mListView;     //!< List view object
 
     // Not owned data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/res/listview.css	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,6 @@
+/* WLAN status label in list view. */
+HbLabel#statusLabel::text {
+    /* Status label should take no more than two rows. */
+    text-line-count-min: 1;
+    text-line-count-max: 2;
+}
--- a/wlanutilities/wlansniffer/wlansnifferapplication/res/wlansniffer.qrc	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/res/wlansniffer.qrc	Tue Jul 06 15:29:22 2010 +0300
@@ -4,7 +4,8 @@
         <file>wlansnifferlistview.docml</file>
     </qresource>
 
-    <qresource prefix="/wlansnifferlistlayout" >
+    <qresource prefix="/wlansnifferlayout" >
+        <file>listview.css</file>
         <file>hblistviewitem.css</file>
         <file>hblistviewitem.widgetml</file>
     </qresource>
--- a/wlanutilities/wlansniffer/wlansnifferapplication/res/wlansnifferlistview.docml	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/res/wlansnifferlistview.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -58,9 +58,9 @@
     </section>
     <section name="embedded">
         <widget name="content" role="HbView:widget" type="HbWidget">
-            <widget name="subTitle" type="HbGroupBox">
-                <bool name="collapsable" value="FALSE"/>
+            <widget name="subTitle" type="HbDataForm">
                 <string locid="txt_occ_subhead_wireless_lan" name="heading"/>
+                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Minimum" verticalStretch="0"/>
             </widget>
             <layout orientation="Vertical" spacing="0un" type="linear">
                 <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
--- a/wlanutilities/wlansniffer/wlansnifferapplication/src/wlansniffer.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/src/wlansniffer.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -19,6 +19,7 @@
 
 #include <QProcess>
 #include <QLocale>
+#include <HbStyleLoader>
 #include <HbTranslator>
 
 // User includes
@@ -41,6 +42,9 @@
 
 // Local constants
 
+//! Location of WLAN Sniffer custom layout definitions
+static const QString WlanSnifferLayoutPath(":/wlansnifferlayout/");
+
 // ======== LOCAL FUNCTIONS ========
 
 // ======== MEMBER FUNCTIONS ========
@@ -55,12 +59,22 @@
 WlanSniffer::WlanSniffer(int argc, char* argv[]) :
     HbApplication(argc, argv),
     mEngine(new WlanSnifferEngine(this)),
-    mTranslator(new HbTranslator()),
+    mTranslator(),
     mMainWindow(0)
 {
     OstTraceFunctionEntry0(WLANSNIFFER_WLANSNIFFER_ENTRY);
+
+    // Start scanning immediately to get the first scan results as soon as
+    // possible, since the scanning takes time.
+    if (mEngine->masterWlan() && !mEngine->forceDisableWlan()) {
+        mEngine->startWlanScanning();
+    }
     
-    // Install also common localization
+    // Register custom layout location
+    HbStyleLoader::registerFilePath(WlanSnifferLayoutPath);
+
+    // Install localization
+    mTranslator = QSharedPointer<HbTranslator>(new HbTranslator());
     mTranslator->loadCommon();
     
     mMainWindow = QSharedPointer<WlanSnifferMainWindow>(
@@ -92,6 +106,9 @@
 WlanSniffer::~WlanSniffer()
 {
     OstTraceFunctionEntry0(WLANSNIFFER_WLANSNIFFERDESTR_ENTRY);
+
+    HbStyleLoader::unregisterFilePath(WlanSnifferLayoutPath);
+    
     OstTraceFunctionExit0(WLANSNIFFER_WLANSNIFFERDESTR_EXIT);
 }
 
--- a/wlanutilities/wlansniffer/wlansnifferapplication/src/wlansnifferengine.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/src/wlansnifferengine.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -83,6 +83,7 @@
     mService(new WlanSnifferService(this)),
     mSettingsManager(new XQSettingsManager(this)),
     mScanTimerId(0),
+    mScanEnabled(false),
     mEmbedded(false),
     mWlanQtUtils(new WlanQtUtils())
 {
@@ -170,29 +171,24 @@
 {
     OstTraceFunctionEntry0(WLANSNIFFERENGINE_STARTWLANSCANNING_ENTRY);
 
-    // A valid timer ID means scan is ON 
-    if (mScanTimerId == 0) {
+    if (!mScanEnabled) {
         OstTrace0(
             TRACE_NORMAL,
             WLANSNIFFERENGINE_STARTWLANSCANNING,
             "WlanSnifferEngine::startWlanScanning Periodic WLAN scanning starting");
 
-        // Connect signal forwarding
+        mScanEnabled = true;
+        // Connect response signal
         bool connectStatus = connect(
             mWlanQtUtils.data(),
-            SIGNAL(wlanScanReady()),
+            SIGNAL(wlanScanReady(int)),
             this,
-            SIGNAL(wlanScanReady()));
+            SLOT(handleWlanScanReady(int)));
         Q_ASSERT(connectStatus);
 
-        // Start the first scan
+        // Start the first scan. Scan timer is started when scan result
+        // signal is received.
         mWlanQtUtils->scanWlans();
-        
-        // Start timer for the next scan
-        mScanTimerId = startTimer(scanTimerInterval);
-        
-        // The timer start must succeed
-        Q_ASSERT(mScanTimerId != 0);
     }
     
     OstTraceFunctionExit0(WLANSNIFFERENGINE_STARTWLANSCANNING_EXIT);
@@ -207,22 +203,24 @@
 {
     OstTraceFunctionEntry0(WLANSNIFFERENGINE_STOPWLANSCANNING_ENTRY);
     
-    // A valid timer ID means scan is ON 
-    if (mScanTimerId != 0) {
+    if (mScanEnabled) {
         OstTrace0(
             TRACE_NORMAL,
             WLANSNIFFERENGINE_STOPWLANSCANNING,
             "WlanSnifferEngine::stopWlanScanning Periodic WLAN scanning stopped");
-        
-        // Disconnect signal forwarding
+
+        mScanEnabled = false;
+        // Disconnect response signal
         disconnect(
             mWlanQtUtils.data(),
-            SIGNAL(wlanScanReady()),
+            SIGNAL(wlanScanReady(int)),
             this,
-            SIGNAL(wlanScanReady()));
+            SLOT(handleWlanScanReady(int)));
         
-        killTimer(mScanTimerId);
-        mScanTimerId = 0;
+        if (mScanTimerId != 0) {
+            killTimer(mScanTimerId);
+            mScanTimerId = 0;
+        }
     }
     
     OstTraceFunctionExit0(WLANSNIFFERENGINE_STOPWLANSCANNING_EXIT);
@@ -417,3 +415,34 @@
     
     OstTraceFunctionExit1(WLANSNIFFERENGINE_UPDATESETTING_EXIT, this);
 }
+
+/*!
+    Slot for handling Wlan scan result.
+
+    @param [in] status Scan status code.
+*/
+
+void WlanSnifferEngine::handleWlanScanReady(int status)
+{   
+    OstTraceFunctionEntry1(WLANSNIFFERENGINE_HANDLEWLANSCANREADY_ENTRY, this);
+
+    OstTrace1(
+        TRACE_NORMAL,
+        WLANSNIFFERENGINE_HANDLEWLANSCANREADY,
+        "WlanSnifferEngine::handleWlanScanReady;status=%d",
+        status);
+    
+    // Forward result signal only, if there was no error
+    if (status == WlanQtUtils::ScanStatusOk) {
+        emit wlanScanReady();
+    }
+    
+    // Start timer for the next scan, if not running already
+    if (mScanTimerId == 0) {
+        mScanTimerId = startTimer(scanTimerInterval);
+        // The timer start must succeed
+        Q_ASSERT(mScanTimerId != 0);
+    }
+    
+    OstTraceFunctionExit1(WLANSNIFFERENGINE_HANDLEWLANSCANREADY_EXIT, this);
+}
--- a/wlanutilities/wlansniffer/wlansnifferapplication/src/wlansnifferlistview.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/src/wlansnifferlistview.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -91,12 +91,6 @@
 {
     OstTraceFunctionEntry0(WLANSNIFFERLISTVIEW_WLANSNIFFERLISTVIEW_ENTRY);
 
-    // Start scanning immediately to get the first scan results as soon as
-    // possible, since the scanning takes time.
-    if (mEngine->masterWlan() && !mEngine->forceDisableWlan()) {
-        mEngine->startWlanScanning();
-    }
-    
     // Initialize UI from the docml based on standalone/embedded status
     loadDocml(mEngine->isEmbedded());
 
@@ -172,6 +166,14 @@
         SLOT(handleWlanToggled()));
     Q_ASSERT(connectStatus);
 
+    // Connect adding WLAN manually
+    connectStatus = connect(
+        mAddWlanAction,
+        SIGNAL(triggered(bool)),
+        this,
+        SLOT(startWlanWizard()));
+    Q_ASSERT(connectStatus);
+    
     // Connect WLAN scan results signal
     connectStatus = connect(
         mEngine,
@@ -631,6 +633,21 @@
 }
 
 /*!
+    Function for handling WLAN Wizard starting when adding WLAN manually.
+*/
+
+void WlanSnifferListView::startWlanWizard()
+{
+    OstTraceFunctionEntry0(WLANSNIFFERLISTVIEW_STARTWLANWIZARD_ENTRY);
+
+    // TODO: Stop connections & do other cleanup before wizard can start? 
+
+    emit wizardTriggered(NULL);
+
+    OstTraceFunctionExit0(WLANSNIFFERLISTVIEW_STARTWLANWIZARD_EXIT);
+}
+
+/*!
     Function to handle the input received when the wlan enabling 
     query is closed.
     
--- a/wlanutilities/wlansniffer/wlansnifferapplication/src/wlansnifferlistwidget.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/src/wlansnifferlistwidget.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -21,7 +21,6 @@
 #include <HbListWidget>
 #include <HbListWidgetItem>
 #include <HbAbstractViewItem>
-#include <HbStyleLoader>
 #include <HbStringUtil>
 #include <cmmanagerdefines_shim.h>
 
@@ -49,10 +48,26 @@
 
 // Local constants
 
-//! Location of WLAN Sniffer List Layout definitions
-static const QString WlanSnifferLayoutPath(":/wlansnifferlistlayout/");
+// ======== LOCAL FUNCTIONS ========
+
+/*!
+    String comparator for list view. Used for locale-aware SSID comparison
+    in list view.
+    
+    @param [in] string1 String #1 to compare.
+    @param [in] string2 String #2 to compare.
 
-// ======== LOCAL FUNCTIONS ========
+    @return Zero (0), if strings are considered to be same,
+            Positive (>0) if string1 is considered to be "greater than" string2. 
+            Negative (<0) if string1 is considered to be "less than" string2. 
+*/
+
+static int WlanSsidStringComparator(
+    const QString &string1,
+    const QString &string2)
+{
+    return HbStringUtil::compareC(string1, string2);    
+}
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -67,12 +82,9 @@
 {
     OstTraceFunctionEntry0(WLANSNIFFERLISTWIDGET_WLANSNIFFERLISTWIDGET_ENTRY);
     
-    // Register custom layout location
-    HbStyleLoader::registerFilePath(WlanSnifferLayoutPath);
-    
     // Set custom WLAN list item layout
     mListWidget->setLayoutName("wlanlistitem");
-    
+
     OstTraceFunctionExit0(WLANSNIFFERLISTWIDGET_WLANSNIFFERLISTWIDGET_EXIT);
 }
 
@@ -83,9 +95,6 @@
 WlanSnifferListWidget::~WlanSnifferListWidget()
 {
     OstTraceFunctionEntry0(DUP1_WLANSNIFFERLISTWIDGET_WLANSNIFFERLISTWIDGET_ENTRY);
-    
-    HbStyleLoader::unregisterFilePath(WlanSnifferLayoutPath);
-    
     OstTraceFunctionExit0(DUP1_WLANSNIFFERLISTWIDGET_WLANSNIFFERLISTWIDGET_EXIT);
 }
 
@@ -233,14 +242,7 @@
     int result = HbStringUtil::compareC(
         iap1->value(WlanQtUtilsIap::ConfIdName).toString(),
         iap2->value(WlanQtUtilsIap::ConfIdName).toString());
-    
-    // If name is equal, compare based on security mode
-    if (result == 0) {
-        result =
-            iap1->value(WlanQtUtilsIap::ConfIdSecurityMode).toInt() -
-            iap2->value(WlanQtUtilsIap::ConfIdSecurityMode).toInt();
-    }
-    
+
     return (result < 0) ? true : false;
 }
 
@@ -257,18 +259,12 @@
     const QSharedPointer<WlanQtUtilsAp> ap1,
     const QSharedPointer<WlanQtUtilsAp> ap2)
 {
-    // Primary comparison is based on the SSID
-    int result = HbStringUtil::compareC(
-        ap1->value(WlanQtUtilsAp::ConfIdSsid).toString(),
-        ap2->value(WlanQtUtilsAp::ConfIdSsid).toString());
-
-    // If SSID is equal, compare based on security mode
-    if (result == 0) {
-        result =
-            ap1->value(WlanQtUtilsIap::ConfIdSecurityMode).toInt() -
-            ap2->value(WlanQtUtilsIap::ConfIdSecurityMode).toInt();
-    }
-
+    // Use AP comparison function with localized SSID comparison
+    int result = WlanQtUtilsAp::compare(
+        ap1.data(),
+        ap2.data(),
+        WlanSsidStringComparator);
+        
     return (result < 0) ? true : false;
 }
 
@@ -324,7 +320,7 @@
         HbListWidgetItem *item = mListWidget->item(row);
         if (item->data().canConvert<WlanQtUtilsAp>()) {
             WlanQtUtilsAp oldAp = item->data().value<WlanQtUtilsAp>();
-            if (WlanQtUtilsAp::compare(ap.data(), &oldAp) == true) {
+            if (WlanQtUtilsAp::compare(ap.data(), &oldAp) == 0) {
                 result = static_cast<WlanSnifferListItem *>(item);
                 break;
             }
@@ -364,11 +360,10 @@
     
     WlanSnifferListItem *item = new WlanSnifferListItem();
     item->setNetworkName(iap->value(WlanQtUtilsIap::ConfIdName).toString());
+    // Note: WPS icon is needed only in IAP setup, no longer here
     if (iap->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt() !=
         CMManagerShim::WlanSecModeOpen) {
-        item->setSecureIcon("qtg_small_secure");
-        // TODO: Handle WPS case - it uses a different icon!
-        // Will be implemented with "Adding WLAN IAP manually" subfeature.
+        item->setSecureIcon("qtg_small_lock");
     }
 
     item->setLeftIcon(
@@ -400,11 +395,13 @@
     
     WlanSnifferListItem *item = new WlanSnifferListItem();
     item->setNetworkName(ap->value(WlanQtUtilsAp::ConfIdSsid).toString());
-    if (ap->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt() 
+    if (ap->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool()) {
+        // WPS is supported, use a dedicated security icon
+        item->setSecureIcon("qtg_small_wifi");
+    } else if (ap->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt() 
         != CMManagerShim::WlanSecModeOpen) {
-        item->setSecureIcon("qtg_small_secure");
-        // TODO: Handle WPS case - it uses a different icon!
-        // Will be implemented with "Adding WLAN IAP manually" subfeature.
+        // Other secure networks
+        item->setSecureIcon("qtg_small_lock");
     }
     item->setSignalIcon(
         signalStrengthIconChoose(
@@ -505,7 +502,7 @@
             Q_ASSERT(item->data().canConvert<WlanQtUtilsAp>());
             WlanQtUtilsAp oldAp = item->data().value<WlanQtUtilsAp>();
             foreach (QSharedPointer<WlanQtUtilsAp> newAp, aps) {
-                if (WlanQtUtilsAp::compare(newAp.data(), &oldAp) == true) {
+                if (WlanQtUtilsAp::compare(newAp.data(), &oldAp) == 0) {
                     found = true;
                     break;
                 }
@@ -527,7 +524,7 @@
             row++;
         }
     }
-    
+
     OstTraceFunctionExit0(WLANSNIFFERLISTWIDGET_REMOVELOSTITEMS_EXIT);
 }
 
--- a/wlanutilities/wlansniffer/wlansnifferapplication/src/wlansniffermainwindow.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/src/wlansniffermainwindow.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -85,9 +85,6 @@
 WlanSnifferMainWindow::~WlanSnifferMainWindow()
 {
     OstTraceFunctionEntry0(WLANSNIFFERMAINWINDOW_WLANSNIFFERMAINWINDOWDESTR_ENTRY);
-    
-    delete mWizard;
-    
     OstTraceFunctionExit0(WLANSNIFFERMAINWINDOW_WLANSNIFFERMAINWINDOWDESTR_EXIT);
 }
 
@@ -132,7 +129,7 @@
 /*!
     Starts WLAN Wizard for new WLAN IAP creation.
     
-    @param [in] ap WLAN Access Point to create.
+    @param [in] ap WLAN Access Point to create, or NULL for adding WLAN manually.
  */
 
 void WlanSnifferMainWindow::startWlanWizard(const WlanQtUtilsAp *ap)
@@ -144,28 +141,34 @@
     // Stop WLAN scanning for the duration of WLAN Wizard
     mEngine->stopWlanScanning();
     
-    mWizard = new WlanWizard(this);
+    mWizard = QSharedPointer<WlanWizard>(new WlanWizard(this));
     bool connectStatus = connect(
-        mWizard,
+        mWizard.data(),
         SIGNAL(finished(int,bool)),
         this,
-        SLOT(handleWlanWizardComplete(int,bool)));
+        SLOT(handleWlanWizardComplete(int,bool)),
+        Qt::QueuedConnection);
     Q_ASSERT(connectStatus == true);
     
     connectStatus = connect(
-        mWizard,
+        mWizard.data(),
         SIGNAL(cancelled()),
         this,
-        SLOT(handleWlanWizardCancelled()));
+        SLOT(handleWlanWizardCancelled()),
+        Qt::QueuedConnection);
     Q_ASSERT(connectStatus == true);
     
-    mWizard->setParameters(
-        ap->value(WlanQtUtilsAp::ConfIdSsid).toString(),
-        ap->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt(),
-        ap->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(),
-        ap->value(WlanQtUtilsAp::ConfIdWpaPskUse).toInt(),
-        ap->value(WlanQtUtilsAp::ConfIdHidden).toBool(),
-        ap->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool());
+    // Create an IAP for a specific AP
+    if (ap) {
+        mWizard->setParameters(
+            ap->value(WlanQtUtilsAp::ConfIdSsid).toString(),
+            ap->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt(),
+            ap->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(),
+            ap->value(WlanQtUtilsAp::ConfIdWpaPskUse).toInt(),
+            ap->value(WlanQtUtilsAp::ConfIdHidden).toBool(),
+            ap->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool());
+    }
+    // else: Add WLAN IAP manually
     
     mWizard->show();
 
@@ -185,29 +188,25 @@
 {
     OstTraceFunctionEntry0(WLANSNIFFERMAINWINDOW_HANDLEWLANWIZARDCOMPLETE_ENTRY);
 
-    // Enable scanning again
-    mEngine->startWlanScanning();
-    
-    // TODO: Will be needed in "Adding WLAN network manually" subfeature
-    Q_UNUSED(connected);
-    
-    // The IAP ID must be valid
-    Q_ASSERT(iapId != WlanQtUtils::IapIdNone);
-    
-    // Connect (share) the new IAP in order to keep the connection open when
-    // deleting Wizard.
-    // Todo: this needs some checking when "Adding WLAN IAP manually" subfeature
-    // is implemented, because we don't want to connect the IAP, if Wizard didn't
-    // connect it.
-    mEngine->wlanQtUtils()->connectIap(iapId, false);
-    
     // The wizard must exist
     Q_ASSERT(mWizard);
     
-    // Delete the Wizard instance, but only when returning to event loop, because
-    // execution returns back to Wizard after this slot.
-    mWizard->deleteLater();
-    mWizard = NULL;
+    // Enable scanning again
+    mEngine->startWlanScanning();
+
+    if (connected) {
+        // The IAP ID must be valid
+        Q_ASSERT(iapId != WlanQtUtils::IapIdNone);
+        
+        // Connect (share) the new IAP in order to keep the connection open when
+        // deleting Wizard.
+        mEngine->wlanQtUtils()->connectIap(iapId, false);
+    }
+    // else: created IAP not connected at all, or already dropped
+    // (probably due to being out of coverage) so don't try to share it
+    
+    // Delete the Wizard instance. This is OK since the connect is Qt::QueuedConnection.
+    mWizard.clear();
     
     OstTraceFunctionExit0(WLANSNIFFERMAINWINDOW_HANDLEWLANWIZARDCOMPLETE_EXIT);
 }
@@ -220,16 +219,14 @@
 {
     OstTraceFunctionEntry0(WLANSNIFFERMAINWINDOW_HANDLEWLANWIZARDCANCELLED_ENTRY);
 
-    // Enable scanning again
-    mEngine->startWlanScanning();
-    
     // The wizard must exist
     Q_ASSERT(mWizard);
     
-    // Delete the Wizard instance, but only when returning to event loop, because
-    // execution returns back to Wizard after this slot.
-    mWizard->deleteLater();
-    mWizard = NULL;
+    // Enable scanning again
+    mEngine->startWlanScanning();
+    
+    // Delete the Wizard instance. This is OK since the connect is Qt::QueuedConnection.
+    mWizard.clear();
     
     OstTraceFunctionExit0(WLANSNIFFERMAINWINDOW_HANDLEWLANWIZARDCANCELLED_EXIT);
 }
--- a/wlanutilities/wlansniffer/wlansnifferapplication/tsrc/t_wlansniffer.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/tsrc/t_wlansniffer.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -354,6 +354,7 @@
     iap2->setValue(WlanQtUtilsIap::ConfIdName, "SSID 2");
     iap2->setValue(WlanQtUtilsAp::ConfIdSsid, "SSID 2");
     iap2->setValue(WlanQtUtilsAp::ConfIdSignalStrength, 10);
+    iap2->setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
     iap2->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
     QSharedPointer<WlanQtUtilsIap> iap4(new WlanQtUtilsIap());
     iap4->setValue(WlanQtUtilsIap::ConfIdIapId, 4);
@@ -361,6 +362,7 @@
     iap4->setValue(WlanQtUtilsIap::ConfIdName, "SSID 4");
     iap4->setValue(WlanQtUtilsAp::ConfIdSsid, "SSID 4");
     iap4->setValue(WlanQtUtilsAp::ConfIdSignalStrength, 20);
+    iap4->setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
     iap4->setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeWpa);
     
     appendWlanAp("SSID 1", 20, 0, CMManagerShim::WlanSecModeOpen);
@@ -531,6 +533,7 @@
     ap->setValue(WlanQtUtilsAp::ConfIdConnectionMode, networkMode);
     ap->setValue(WlanQtUtilsAp::ConfIdSecurityMode, securityMode);
     ap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
+    ap->setValue(WlanQtUtilsAp::ConfIdWpsSupported, false);
     mAps.append(ap);
 }
 
@@ -552,6 +555,9 @@
     iap->setValue(WlanQtUtilsIap::ConfIdName, name);
     iap->setValue(WlanQtUtilsAp::ConfIdSsid, ssId);
     iap->setValue(WlanQtUtilsAp::ConfIdSignalStrength, signalStrength);
+    iap->setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
     iap->setValue(WlanQtUtilsAp::ConfIdSecurityMode, securityMode);
+    iap->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, false);
+    iap->setValue(WlanQtUtilsAp::ConfIdWpsSupported, false);
     mIaps.append(QSharedPointer<WlanQtUtilsIap>(iap));
 }
--- a/wlanutilities/wlansniffer/wlansnifferapplication/wlansnifferapplication.pro	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferapplication/wlansnifferapplication.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -17,7 +17,6 @@
 
 TEMPLATE = app
 TARGET = wlansniffer
-TARGET.CAPABILITY = CAP_APPLICATION NetworkControl
 DEPENDPATH += .
 # Own headers
 INCLUDEPATH += \
@@ -69,6 +68,7 @@
 LIBS += -lwlanqtutilities -lxqservice -lxqserviceutil -lqtsysteminfo -lwlanwizard -lxqsettingsmanager
 
 symbian*: {
+    TARGET.CAPABILITY = CAP_APPLICATION NetworkControl
     TARGET.UID3 = 0x10281CAA
     
     BLD_INF_RULES.prj_exports += "rom/wlansniffer.iby CORE_MW_LAYER_IBY_EXPORT_PATH(wlansniffer.iby)"
--- a/wlanutilities/wlansniffer/wlansnifferkeepalive/group/wsfkeepalive.mmp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferkeepalive/group/wsfkeepalive.mmp	Tue Jul 06 15:29:22 2010 +0300
@@ -26,6 +26,7 @@
 SOURCEPATH   ../src
 SOURCE       main.cpp
 SOURCE       wsfkeepalive.cpp
+SOURCE       wsfkeepalivecmm.cpp
 SOURCE       wsfkeepaliveconnmon.cpp
 SOURCE       wsfkeepaliveconnmondisc.cpp
 SOURCE       wsfkeepaliveesock.cpp
@@ -36,6 +37,7 @@
 LIBRARY      esock.lib
 LIBRARY      extendedconnpref.lib
 LIBRARY      netmeta.lib
+LIBRARY		 cmmanager.lib
 
 CAPABILITY   CAP_APPLICATION NetworkControl
 
--- a/wlanutilities/wlansniffer/wlansnifferkeepalive/inc/wsfkeepalive.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferkeepalive/inc/wsfkeepalive.h	Tue Jul 06 15:29:22 2010 +0300
@@ -26,6 +26,7 @@
  
 // Forward declarations
 
+class CWsfKeepaliveCmm;
 class CWsfKeepaliveConnMon;
 class CWsfKeepaliveConnMonDisc;
 class CWsfKeepaliveEsock;
@@ -131,6 +132,11 @@
     CWsfKeepaliveTimer* iTimer;
 
     /**
+     * Connection Method Manager class reference
+     */
+    CWsfKeepaliveCmm* iCmMgr;
+    
+    /**
      * Connection Monitor class reference
      */
     CWsfKeepaliveConnMon* iConnMon;
@@ -159,6 +165,11 @@
      * State of the keepalive implementation
      */
     TUint iState;
+    
+    /**
+     * IapId of the connection
+     */
+    TUint iIapId;
     };
 
 #endif // WSFKEEPALIVE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlansniffer/wlansnifferkeepalive/inc/wsfkeepalivecmm.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,95 @@
+/*
+ * 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:
+ * Connection Method Manager interface implementation.
+ */
+
+#ifndef WSFKEEPALIVECMM_H
+#define WSFKEEPALIVECMM_H
+
+// System includes
+ 
+#include <e32base.h>
+#include <cmmanager.h>
+
+// User includes
+
+// Forward declarations
+
+class CWsfKeepalive;
+
+// External data types
+
+// Global function prototypes
+ 
+// Constants
+
+// Class declaration
+
+/**
+ *  Connection Method Manager interface implementation.
+ * 
+ *  This class uses the Connection Method Manager interface to get and deleted
+ *  Hotspot IAP.
+ */
+class CWsfKeepaliveCmm : public CBase
+    {
+    // Friend classes:
+
+public:
+
+    // Data types
+
+    /** Constructors */
+    
+    /**
+     * Two-phased constructor.
+     * 
+     */
+    static CWsfKeepaliveCmm* NewL();
+    
+    /**> Destructor */
+    virtual ~CWsfKeepaliveCmm();
+
+public:
+
+    /**
+     * Cm Manager Hotspot info getter.
+     */
+    TBool CWsfKeepaliveCmm::GetHotspotInfoL(TInt32 aIapId);
+
+    /**
+     * Cm Manager Hotspot IAP deleter.
+     */
+    TBool CWsfKeepaliveCmm::DeleteHotspotIapL(TInt32 aIapId);
+
+protected:
+    
+private:
+    
+    CWsfKeepaliveCmm();
+
+    void ConstructL();
+    
+    
+private: // Data
+    
+    /**
+     * Handle to Connection Method Manger
+     */
+    RCmManager iCmManager;
+
+    };
+
+#endif // WSFKEEPALIVECMM_H
--- a/wlanutilities/wlansniffer/wlansnifferkeepalive/src/wsfkeepalive.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlansniffer/wlansnifferkeepalive/src/wsfkeepalive.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -22,6 +22,7 @@
 // User include files
 
 #include "wsfkeepalivetimer.h"
+#include "wsfkeepalivecmm.h"
 #include "wsfkeepaliveconnmon.h"
 #include "wsfkeepaliveconnmondisc.h"
 #include "wsfkeepaliveesock.h"
@@ -44,11 +45,15 @@
 // UID of Wlan sniffer application
 static const TUid KWlanSnifferUid = { 0x10281CAA };
 
+// UID of Wlan login application
+static const TUid KWlanloginUid = { 0x2002E6D0 };
+
 // List of UIDs of clients not considered as "real"
 static const TUid KDiscardedClientUids[] = 
     {
         { 0x2002FF5F }, // Sniffer keepalive process, that is, us
         KWlanSnifferUid, // Sniffer application (wlansniffer.exe)
+        KWlanloginUid, //   Wlan Login application (wlanlogin.exe)
         { 0x101fD9C5 }  // DHCP server (dhcpserv.exe)
     };
 
@@ -75,6 +80,7 @@
 
     delete iEsock;
     delete iConnMonDisc;
+    delete iCmMgr;
     delete iConnMon;
     delete iTimer;
     
@@ -163,6 +169,7 @@
         // Start to monitor this connection, and add us as a user to the
         // connection
         iConnectionId = aConnectionId;
+        iIapId = aIapId;
         iEsock->ConnectL( aIapId );
 
         // Assume there are no real clients yet. Setup timer for polling
@@ -192,6 +199,30 @@
     // Stop also the polling timer
     iTimer->Stop();
     
+    OstTrace1(
+        TRACE_NORMAL,
+        CWSFKEEPALIVE_WLANCONNECTIONCLOSED_IAPID,
+        "CWsfKeepalive::WlanConnectionClosed iapId=%d",
+        iIapId );
+    
+    // If connected to hotspot IAP, the IAP must be deleted
+    if ( iCmMgr->GetHotspotInfoL( iIapId ) )
+        {
+        OstTrace0(
+            TRACE_NORMAL,
+            CWSFKEEPALIVE_WLANCONNECTIONCLOSED_HOTSPOTDETECTED,
+            "CWsfKeepalive::WlanConnectionClosed Hotspot IAP detected" );
+
+        if ( !iCmMgr->DeleteHotspotIapL( iIapId ) )
+            {
+            OstTrace0(
+                TRACE_NORMAL,
+                CWSFKEEPALIVE_WLANCONNECTIONCLOSED_HOTSPOTDELETEFAILED,
+                "CWsfKeepalive::WlanConnectionClosed Hotspot delete failed" );
+            }
+        iIapId = 0;
+        }
+    
     OstTraceFunctionExit0( CWSFKEEPALIVE_WLANCONNECTIONCLOSED_EXIT );
     }
 
@@ -201,7 +232,8 @@
 //
 CWsfKeepalive::CWsfKeepalive() :
     iConnectionId( KInvalidConnectionId ),
-    iState( EInactive )
+    iState( EInactive ),
+    iIapId( 0 )
     {
     OstTraceFunctionEntry0( CWSFKEEPALIVE_CWSFKEEPALIVE_ENTRY );
     OstTraceFunctionExit0( CWSFKEEPALIVE_CWSFKEEPALIVE_EXIT );
@@ -219,6 +251,7 @@
     iConnMon = CWsfKeepaliveConnMon::NewL( *this );
     iConnMonDisc = CWsfKeepaliveConnMonDisc::NewL();
     iEsock = CWsfKeepaliveEsock::NewL();
+    iCmMgr = CWsfKeepaliveCmm::NewL();
     
     OstTraceFunctionExit0( CWSFKEEPALIVE_CONSTRUCTL_EXIT );
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlansniffer/wlansnifferkeepalive/src/wsfkeepalivecmm.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,135 @@
+/*
+ * 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:
+ * Connection Method Manager interface implementation.
+ */
+
+// System include files
+
+#include <nifvar.h>
+#include <cmmanagerdef.h>
+#include <cmconnectionmethod.h>
+
+// User include files
+
+#include "wsfkeepalive.h"
+#include "wsfkeepalivecmm.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wsfkeepalivecmmTraces.h"
+#endif
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+CWsfKeepaliveCmm* CWsfKeepaliveCmm::NewL()
+    {
+    OstTraceFunctionEntry0( CWSFKEEPALIVECMM_NEWL_ENTRY );
+    
+    CWsfKeepaliveCmm* me = new ( ELeave ) CWsfKeepaliveCmm();
+    CleanupStack::PushL( me );
+    me->ConstructL();
+    CleanupStack::Pop( me );
+    
+    OstTraceFunctionExit0( CWSFKEEPALIVECMM_NEWL_EXIT );
+    return me;
+    }
+
+CWsfKeepaliveCmm::~CWsfKeepaliveCmm()
+    {
+    OstTraceFunctionEntry0(
+        DUP1_CWSFKEEPALIVECMM_CWSFKEEPALIVECMM_ENTRY );
+
+    iCmManager.Close();
+    
+    OstTraceFunctionExit0(
+        DUP1_CWSFKEEPALIVECMM_CWSFKEEPALIVECMM_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Default constructor
+// ---------------------------------------------------------------------------
+//
+CWsfKeepaliveCmm::CWsfKeepaliveCmm()
+    {
+    OstTraceFunctionEntry0( CWSFKEEPALIVECMM_CWSFKEEPALIVECMM_ENTRY );
+    OstTraceFunctionExit0( CWSFKEEPALIVECMM_CWSFKEEPALIVECMM_EXIT );
+    }
+
+// ---------------------------------------------------------------------------
+// Leaving constructor
+// ---------------------------------------------------------------------------
+//
+void CWsfKeepaliveCmm::ConstructL()
+    {
+    OstTraceFunctionEntry0( CWSFKEEPALIVECMM_CONSTRUCTL_ENTRY );
+    
+    iCmManager.OpenL();
+    
+    OstTraceFunctionExit0( CWSFKEEPALIVECMM_CONSTRUCTL_EXIT );
+    }
+ 
+// ---------------------------------------------------------
+// Gets Hotspot metadata information
+// ---------------------------------------------------------
+//
+TBool CWsfKeepaliveCmm::GetHotspotInfoL(TInt32 aIapId)
+    {
+    OstTraceFunctionEntry0( CWSFKEEPALIVECMM_GETHOTSPOTINFO_ENTRY );
+    TBool isHotspotIap = EFalse; 
+
+    RCmConnectionMethod connectionMethod = iCmManager.ConnectionMethodL(aIapId);
+    
+    TRAPD(err, isHotspotIap = connectionMethod.GetBoolAttributeL( CMManager::ECmMetaHotSpot ));
+    
+    if (err != KErrNone)
+        {
+        isHotspotIap = EFalse;
+        }
+    
+    OstTrace1(
+        TRACE_NORMAL,
+        CWSFKEEPALIVECMM_GETHOTSPOTINFO_HOTSPOT,
+        "CWsfKeepaliveCmm::GetHotspotInfoL isHotspotIap=%d",
+        isHotspotIap );
+    
+    OstTraceFunctionExit0( CWSFKEEPALIVECMM_GETHOTSPOTINFO_EXIT );
+    return isHotspotIap;
+    }
+
+// ---------------------------------------------------------
+// Delete Hotspot IAP
+// ---------------------------------------------------------
+//
+TBool CWsfKeepaliveCmm::DeleteHotspotIapL(TInt32 aIapId)
+    {
+    OstTraceFunctionEntry0( CWSFKEEPALIVECMM_DELETEHOTSPOTIAP_ENTRY );
+    TBool ret = EFalse;
+    
+    RCmConnectionMethod connectionMethod = iCmManager.ConnectionMethodL(aIapId);
+    TRAPD(err, ret = connectionMethod.DeleteL());
+    
+    if (err != KErrNone)
+            {
+            ret = EFalse;
+            }
+    
+    OstTraceFunctionExit0( CWSFKEEPALIVECMM_DELETEHOTSPOTIAP_EXIT );
+    return ret;
+    }
--- a/wlanutilities/wlanutilities.pro	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanutilities.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -19,10 +19,13 @@
 
 SUBDIRS  += \
     wlanqtutilities \
+    eapwizard \
+    wpswizard \
     wlanwizard \
     wlansniffer \
     wlanentryplugin \
     wlanindicatorplugin \
-    cpwlansettingsplugin
+    cpwlansettingsplugin \
+    wlanlogin
 
 CONFIG += ordered
--- a/wlanutilities/wlanwizard/inc/wlanwizard.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizard.h	Tue Jul 06 15:29:22 2010 +0300
@@ -27,7 +27,7 @@
 // Forward declarations
 class HbMainWindow;
 class WlanWizardPrivate;
-class TestWlanWizardUi;
+class TestWlanWizardContext;
 
 // External data types
 
@@ -80,7 +80,7 @@
     
     // Friend classes
     friend class WlanWizardPrivate;
-    friend class TestWlanWizardUi;    
+    friend class TestWlanWizardContext;    
 };
 
 /*! @} */
--- a/wlanutilities/wlanwizard/inc/wlanwizard_p.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizard_p.h	Tue Jul 06 15:29:22 2010 +0300
@@ -1,20 +1,19 @@
 /*
- * 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: 
- *   WLAN Wizard: Private implementation.
- *
- */
+* 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: 
+* WLAN Wizard: Private implementation.
+*/
 
 #ifndef WLANWIZARD_P_H
 #define WLANWIZARD_P_H
@@ -43,7 +42,7 @@
 class EapWizard;
 class WpsWizard;
 
-class TestWlanWizardUi;
+class TestWlanWizardContext;
 
 // External data types
 
@@ -91,8 +90,9 @@
     // from WlanWizardHelper, for all wizards
     virtual QVariant configuration(ConfigurationId confId) const;
     virtual void setConfiguration(ConfigurationId confId, const QVariant &value);
+    virtual void clearConfiguration(ConfigurationId confId);
+    virtual bool configurationExists(ConfigurationId confId);
     virtual void enableNextButton(bool enable);
-    virtual void enablePrevButton(bool enable);
     virtual void addPage(int pageId, WlanWizardPage *page);
     virtual void nextPage();
     virtual HbMainWindow* mainWindow() const;
@@ -102,6 +102,8 @@
 signals:
     
 public slots:
+
+    void cancelTriggered();
     
 protected:
 
@@ -112,7 +114,6 @@
     static const int PageTimeout = 1500;
 
 private slots:
-    void cancelTriggered();
     void previousTriggered();
     void nextTriggered();
     void finishTriggered();
@@ -165,9 +166,9 @@
     QScopedPointer<HbDocumentLoader> mDocLoader;
     //! Extensible Authentication Protocol (EAP) Wizard plugin, instantiated
     //! when required
-    EapWizard* mEapWizard;
+    QScopedPointer<EapWizard> mEapWizard;
     //! Wifi Protected Setup (WPS) Wizard plugin, instantiated when required
-    WpsWizard* mWpsWizard;
+    QScopedPointer<WpsWizard> mWpsWizard;
     //! Maps UI object of page into a control object
     QHash<HbWidget* , WlanWizardPage *> mPageMapper;
     //! Maps page id to control object of page.
@@ -184,7 +185,7 @@
     
     // Friend classes
     friend class WlanWizard;
-    friend class TestWlanWizardUi;
+    friend class TestWlanWizardContext;
 };
 
 /*! @} */
--- a/wlanutilities/wlanwizard/inc/wlanwizardhelper.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizardhelper.h	Tue Jul 06 15:29:22 2010 +0300
@@ -84,6 +84,13 @@
         ConfProcessSettings = 14,
         //! QString: Localized error string for WlanWizardPageGenericError
         ConfGenericErrorString = 15,
+        //! WlanWizardScanList: Available network options
+        ConfAvailableNetworkOptions = 16,
+        //! bool: Wps supported
+        ConfWpsSupported = 17,
+        //! int: Identifies how many steps should be gone backwards from 
+        // GenericErrorPage
+        ConfGenericErrorPageStepsBackwards = 18,
     };
     
 public:
@@ -111,6 +118,22 @@
         const QVariant &value) = 0;
     
     /*!
+     * Clears wlan configuration at the given configuration identifier and sets
+     * the configuration value to type Invalid.
+     * 
+     * @param [in] confId Configuration Identifier do to be cleared
+     */
+    virtual void clearConfiguration(ConfigurationId confId) = 0;
+    
+    /*!
+     * Tests whether a configuration has been set.
+     * 
+     * @param [in] confId Configuration Identifier do to be tested
+     * @return true if configuration value != Invalid, else false.
+     */
+    virtual bool configurationExists(ConfigurationId confId) = 0;
+    
+    /*!
        Enables the next button in wizard.
        
        @param [in] enable to enable button set to true.
@@ -118,13 +141,6 @@
     virtual void enableNextButton(bool enable) = 0;
 
     /*!
-       Enables the previous button in wizard.
-       
-       @param [in] enable to enable button set to true.
-     */
-    virtual void enablePrevButton(bool enable) = 0;
-
-    /*!
        Adds a new wizard page into the wizard framework.
        
        @param [in] pageId The identifier of Page. See WlanWizardPage::PageIds.
--- a/wlanutilities/wlanwizard/inc/wlanwizardpage.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizardpage.h	Tue Jul 06 15:29:22 2010 +0300
@@ -64,6 +64,10 @@
 class WlanWizardPage
 {
 public:
+    //! default value for previousTriggered(), step one step.
+    static const int OneStepBackwards = 1;
+    static const int SingleResult = 1;
+    
     /*!
        Defines common page ids for wizard and page id pools for wizard plugins.
        
@@ -153,13 +157,20 @@
        In case the wizard page does not want to make any movement forwards
        WlanWizardPage::PageNone MUST be returned.
        
+       Default implementation: Page ID WlanWizardPage::PageNone is retuned and
+       removeFromStack is false.
+       
        @param [out] removeFromStack return value to the caller, if this page
        needs to be removed from the stack, which means that this page cannot be
        accessible from the next page using "previous" toolbar button. 
        
        @return page identifier of next wizard page
      */
-    virtual int nextId(bool &removeFromStack) const = 0;
+    virtual int nextId(bool &removeFromStack) const
+    {
+        removeFromStack = false;
+        return WlanWizardPage::PageNone;
+    }
 
     /*!
        This method is called when "previous" button has been pressed.
@@ -185,8 +196,6 @@
 public slots:
     
 protected:
-    //! default value for previousTriggered(), step one step.
-    static const int OneStepBackwards = 1;
     
 protected slots:
 
--- a/wlanutilities/wlanwizard/inc/wlanwizardpagegenericerror.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizardpagegenericerror.h	Tue Jul 06 15:29:22 2010 +0300
@@ -45,9 +45,9 @@
 
 public: // From WlanWizardPage
     HbWidget* initializePage();
-    int nextId(bool &removeFromStack) const;
     bool showPage();
-
+    int previousTriggered();
+    
 signals:
     
 public slots:
--- a/wlanutilities/wlanwizard/inc/wlanwizardpageinternal.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizardpageinternal.h	Tue Jul 06 15:29:22 2010 +0300
@@ -28,6 +28,7 @@
 // Forward declarations
 class HbWidget;
 class WlanWizardPrivate;
+class HbDocumentLoader;
 
 // External data types
 
@@ -74,8 +75,12 @@
 public slots:
     
 protected:
-    //! default value for previousTriggered(), step one step.
-    static const int OneStepBackwards = 1;
+    void loadDocmlSection(
+        HbDocumentLoader *loader,
+        Qt::Orientation orientation,
+        const QString &filename,
+        const QString &portraitSection,
+        const QString &landscapeSection) const;
     
 protected slots:
 
--- a/wlanutilities/wlanwizard/inc/wlanwizardpagenetworkmode.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizardpagenetworkmode.h	Tue Jul 06 15:29:22 2010 +0300
@@ -16,10 +16,6 @@
  *
  */
 
-/*
- * %version: 8 %
- */
-
 #ifndef WLANWIZARDPAGENETWORKMODE_H
 #define WLANWIZARDPAGENETWORKMODE_H
 
@@ -33,6 +29,7 @@
 class HbLabel;
 class WlanWizardPrivate;
 class HbDocumentLoader;
+class WlanNetworkSetting;
 
 // External data types
 
@@ -48,63 +45,33 @@
     Q_OBJECT
 public:
     
-    /*!
-     * Constructor method for the network mode view object
-     * @param parent pointer to parent object.
-     */
-    WlanWizardPageNetworkMode(WlanWizardPrivate* parent);
-    
-    /*!
-     * Destructor for the network mode view object.
-     */
-    ~WlanWizardPageNetworkMode();
-
+    explicit WlanWizardPageNetworkMode(WlanWizardPrivate* parent);
+    virtual ~WlanWizardPageNetworkMode();
     
 public: // From WlanWizardPageInternal
-    /*!
-     * Page initialization procedures. Inherited from WlanWizardPage.
-     */
     HbWidget* initializePage();
-
-    /*!
-     * Evaluates the network mode selection and sets the configuration in
-     * the wlanwizard.
-     * @param removeFromStack output parameter that returns false
-     * @return WlanWizardPageSecurityMode page id.
-     */
-    int nextId(bool &removeFromStack) const;
-    
-    /*!
-     * This method is overrides the default implementation from WlanWizardPage.
-     * It indicates whether the Next-button should be enabled or not.
-     * @return true, if a mode has been selected.
-     */
+    int nextId(bool &removeFromStack) const;   
     bool showPage();
 
+signals:
+    
 public slots:
-    /*!
-     * Is invoked when user selects a mode from the radio button list.
-     * (HbRadioButtonList's itemSelected-signal)
-     */
-    void itemSelected(int index);
-
-    /*!
-     * Loads the document orientation information from occ_add_wlan_02_03.docml.
-     * This is called each time phone orientation changes.
-     * @param orientation indicates whether the phone is in portrait or
-     * landscape mode.
-     */
-    void loadDocml(Qt::Orientation orientation);
+    void itemSelected();
+    void loadDocmlSection(Qt::Orientation orientation);
+    
+protected:
+    
+protected slots:
     
 private:
-    
-    /*!
-     * A support function to map the radio button list to a generic network
-     * mode list. This enables the changing of button order without it
-     * affecting the entire class.
-     */
+    Q_DISABLE_COPY(WlanWizardPageNetworkMode)
     void addToList(QStringList &list, const QString &item, int mode, bool isHidden);
-    
+    void populateRadioButtonList(QStringList &list);
+    int selectNextPage(const WlanNetworkSetting &setting) const;
+
+private slots:
+
+private:
     /*!
      * Pointer to the view.
      */
--- a/wlanutilities/wlanwizard/inc/wlanwizardpageprocessingsettings.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizardpageprocessingsettings.h	Tue Jul 06 15:29:22 2010 +0300
@@ -23,9 +23,7 @@
 
 // User includes
 #include "wlanwizardpageinternal.h"
-#ifdef ICT_RESULT_ENUM
 #include "wlanqtutils.h"
-#endif
 
 // Forward declarations
 class HbDocumentLoader;
@@ -60,11 +58,7 @@
 public slots:
     void loadDocmlSection(Qt::Orientation orientation);
     void wlanNetworkClosed(int iapId, int reason);
-#ifdef ICT_RESULT_ENUM
-    void ictResult(int iapId, WlanLoginIctsResultType result);
-#else
-    void ictResult(int iapId, bool result);
-#endif
+    void ictResult(int iapId, int result);
     void wlanNetworkOpened(int iapId);
     
 protected:
--- a/wlanutilities/wlanwizard/inc/wlanwizardpagescanning.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizardpagescanning.h	Tue Jul 06 15:29:22 2010 +0300
@@ -19,16 +19,21 @@
 #define WLANWIZARDPAGESCANNING_H
 
 // System includes
+#include <QSharedPointer>
+#include <QList>
+#include <QHash>
 
 // User includes
 #include "wlanwizardpageinternal.h"
 #include "wlanwizard.h"
+#include "wlanwizardscanlist.h"
 
 // Forward declarations
 class WlanWizardPrivate;
 class HbLabel;
 class HbProgressBar;
 class HbDocumentLoader;
+class WlanQtUtilsAp;
 
 // External data types
 
@@ -44,94 +49,44 @@
     Q_OBJECT
     
 public:
-    /*!
-     * Constructor method for the scanning view object.
-     * @param parent pointer to parent object.
-     */
-    WlanWizardPageScanning(WlanWizardPrivate* parent);
-    
-    /*!
-     * Destructor for the scanning view object.
-     */
-    ~WlanWizardPageScanning();
-
-    /*!
-     * Page initialization procedures. Inherited from WlanWizardPage.
-     * @see WlanWizardPage
-     */
-    HbWidget* initializePage();
-    
-    /*!
-     * Validates the scan results and sets the configuration in the wlanwizard.
-     * @param removeFromStack output parameter that returns true.
-     * @return depending on the scan results, returns the appropriate view
-     * identifier.
-     */
-    int nextId(bool &removeFromStack) const;
-    
-    /*!
-     * Reimplements the default function in WlanWizardPage.
-     * @return true
-     * @see WlanWizardPage
-     */
-    bool requiresStartOperation();
+    explicit WlanWizardPageScanning(WlanWizardPrivate* parent);
+    virtual ~WlanWizardPageScanning();
     
-    /*!
-     * Reimplements the empty default function in WlanWizardPage. Initiates
-     * AP scan.
-     * @see WlanWizardPage
-     */
+public:
+    HbWidget* initializePage();
+    int nextId(bool &removeFromStack) const;
+    int previousTriggered();
+    bool showPage();
+    bool requiresStartOperation();
     void startOperation();
+
+signals:
     
-    /*!
-     * This method is overrides the default implementation from WlanWizardPage.
-     * It indicates whether the Next-button should be enabled or not.
-     * @return always false - the scanning proceeds to next window
-     * automatically or not at all.
-     */
-    bool showPage();
-
 public slots:
-    /*!
-     * Loads the document orientation information from occ_add_wlan_06.docml
-     * This is called each time phone orientation changes.
-     * @param orientation indicates whether the phone is in portrait or
-     * landscape mode.
-     */
-    void loadDocml(Qt::Orientation orientation);
+    void loadDocmlSection(Qt::Orientation orientation);
+    void wlanScanResultPreCheck(int scanStatus);
+    void wlanScanDirectReady(int scanStatus);
     
-    /*!
-     * Checks whether the view is active. If it is, execute wlanScanApReady. If
-     * not, set mScanResultsAvailable to true.
-     */
-    void wlanScanResultPreCheck();
+protected:
     
-    /*!
-     * Processes the direct scan results. If no results were found, the next
-     * page is network mode query.
-     * If match is found and scan result indicates
-     * a) Open network, the next page is result processing.
-     * b) Network with WEP/WPA/WPA2 protection, the next page is key query.
-     * c) EAP protected network, the next page is EAP type query.
-     * d) WPS support, the next page is WPS configuration page.
-     * All matching results are considered hidden networks.
-     */
-    void wlanScanDirectReady();
+protected slots:
     
 private:
-    /*!
-     * Processes the Access Point scan results in search for an access point
-     * with an SSID that matches the SSID given by the user. If no match is
-     * found, a direct scan is initiated with the SSID given by the user.
-     * If match is found and scan result indicates
-     * a) Open network, the next page is result processing.
-     * b) Network with WEP/WPA/WPA2 protection, the next page is key query.
-     * c) EAP protected network, the next page is EAP type query.
-     * d) WPS support, the next page is WPS configuration page.
-     * All matching results are considered public networks.
-     */
+    Q_DISABLE_COPY(WlanWizardPageScanning)
     void wlanScanApReady();
+    void getSsidMatchList(
+        QString ssid,
+        const QList<QSharedPointer<WlanQtUtilsAp> > &matchList);
+    void getFinalScanResults(
+        const QList<QSharedPointer<WlanQtUtilsAp> > &directScanResults,
+        const QList<QSharedPointer<WlanQtUtilsAp> > &openScanResults,
+        QList<WlanScanResult> &finalResults);
+    int processMultipleScanResults(const QList<WlanScanResult> &finalResults);
+    void selectNextPageActions(const QList<WlanScanResult> &finalResults);
+    
+private slots:
 
+private:
     /*!
      * Pointer to the view.
      */
@@ -143,11 +98,6 @@
     HbLabel *mLabel;
 
     /*!
-     * Pointer to the progress bar widget.
-     */
-    HbProgressBar *mBar;
-
-    /*!
      * Pointer to document loader object.
      */
     HbDocumentLoader *mLoader;
@@ -158,9 +108,19 @@
     int mNextPageId;
     
     /*!
-     * Indicator, whether AP scan results are available or not
+     * Indicator, whether AP scan results are available or not.
      */
     bool mScanResultsAvailable;
+    
+    /*!
+     * Indicator of the current scan status.
+     */
+    int mScanStatus;
+    
+    /*!
+     * list containing the results of a normal scan of open networks.
+     */
+    QList<QSharedPointer<WlanQtUtilsAp> > mWlanApList;
 };
 
 /*! @} */
--- a/wlanutilities/wlanwizard/inc/wlanwizardpagesecuritymode.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizardpagesecuritymode.h	Tue Jul 06 15:29:22 2010 +0300
@@ -16,10 +16,6 @@
  *
  */
 
-/*
- * %version: 10 %
- */
-
 #ifndef WLANWIZARDPAGESECURITYMODE_H
 #define WLANWIZARDPAGESECURITYMODE_H
 
@@ -47,77 +43,37 @@
 {
     Q_OBJECT
 public:
-    /*!
-     * Constructor method for the Sequrity mode query view object.
-     * @param parent pointer to parent object.
-     */
-    WlanWizardPageSecurityMode(WlanWizardPrivate* parent);
+    explicit WlanWizardPageSecurityMode(WlanWizardPrivate* parent);
+    virtual ~WlanWizardPageSecurityMode();
     
-    /*!
-     * Destructor for the Sequrity mode query view object.
-     */
-    ~WlanWizardPageSecurityMode();
-
-    /*!
-     * Page initialization procedures. Inherited from WlanWizardPage.
-     * @see WlanWizardPage
-     */
+public:
     HbWidget* initializePage();
-
-    /*!
-     * Validates the Sequrity more selection and sets the configuration in
-     * the wlanwizard.
-     * @param removeFromStack output parameter that returns false.
-     * @return depending on the sequrity mode, returns the appropriate view
-     * identifier.
-     */
     int nextId(bool &removeFromStack) const;
-    
-    /*!
-     * This method is overrides the default implementation from WlanWizardPage.
-     * It indicates whether the Next-button should be enabled or not.
-     * @return true, if a mode has been selected.
-     */
     bool showPage();
     
-private slots:
-    /*!
-     * Is invoked when user selects a mode from the radio button list.
-     * (HbRadioButtonList's itemSelected-signal)
-     * @param index of the selected item in the  radio button list. 
-     */
-    void itemSelected(int index);
-    
-    /*!
-     * Loads the document orientation information from occ_add_wlan_02_03.docml
-     * This is called each time phone orientation changes.
-     * @param orientation indicates whether the phone is in portrait or
-     * landscape mode.
-     */
-    void loadDocml(Qt::Orientation orientation);
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
     
 private:
-    
-    /*!
-     * Support function that creates the contents of the security mode list. 
-     */
+    Q_DISABLE_COPY(WlanWizardPageSecurityMode)
     void populateSecModeList();
+    void addToList(
+        QStringList &list,
+        const QString &item,
+        int mode,
+        int page,
+        bool psk);
+  
+private slots: 
+    void itemSelected();
+    void loadDocmlSection(Qt::Orientation orientation);
     
-    /*!
-     * A support function to map the radio button list to a generic network
-     * mode list. This enables the changing of button order without it
-     * affecting the entire class.
-     * @param list is a reference to a local list that will be placed as an
-     * argument to the radio button list.
-     * @param item is a reference to the text value that is appended to the
-     * list
-     * @param mode is the security mode associated with the item
-     * @param page is the id of the next wizard page when this item is selected.
-     * @param psk indicates whether password needs to be queried. 
-     */
-    void addToList(QStringList &list, const QString &item, int mode, int page,
-        bool psk);
-    
+private:
     /*!
      * Pointer to the view.
      */
--- a/wlanutilities/wlanwizard/inc/wlanwizardpagessid.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizardpagessid.h	Tue Jul 06 15:29:22 2010 +0300
@@ -44,70 +44,29 @@
 class WlanWizardPageSsid: public WlanWizardPageInternal
 {
     Q_OBJECT
-    friend class TestWlanWizardUi;
 public:
-    /*!
-     * Constructor method for the SSID query view object.
-     * @param parent pointer to parent object.
-     */
-    WlanWizardPageSsid(WlanWizardPrivate* parent);
-    
-    /*!
-     * Destructor for the SSID query view object.
-     */
-    ~WlanWizardPageSsid();
-
-    /*!
-     * Page initialization procedures. Inherited from WlanWizardPage.
-     */
-    HbWidget* initializePage();
+    explicit WlanWizardPageSsid(WlanWizardPrivate* parent);
+    virtual ~WlanWizardPageSsid();
     
-    /*!
-     * This method is overrides the default implementation from WlanWizardPage.
-     * It indicates whether the Next-button should be enabled or not.
-     * @return true, if mSsid edit field is not empty.
-     */
+public:
+    HbWidget* initializePage();
     virtual bool showPage();
-
-    /*!
-     * Validates the SSID selection and sets the configuration in
-     * the wlanwizard.
-     * @param removeFromStack output parameter that returns false.
-     * @return WlanWizardPageScanning page id.
-     */
     int nextId(bool &removeFromStack) const;
-   
-public slots:
-    /*!
-     * Loads the document orientation information from occ_add_wlan_01_04.docml
-     * This is called each time phone orientation changes.
-     * @param orientation indicates whether the phone is in portrait or
-     * landscape mode.
-     */
-    void loadDocml(Qt::Orientation orientation);
+
+signals:
     
-    /*!
-     * Executed when changes have been made to the mSsid field.
-     * @param text is not used at this point.
-     */
+public slots: 
+    void loadDocmlSection(Qt::Orientation orientation);
     void textChanged(const QString &text);
     
 protected:
-    /*!
-     * Reimplements QObject function that is invoked on any event. This
-     * function handles only a focus event to mSsid edit field.
-     * @param obj contains the object, where the event originates from.
-     * @param event contains the event id.
-     */
-    bool eventFilter(QObject *obj, QEvent *event);
     
+protected slots:
+
 private:
-    /*!
-     * Converts status identifier to plain-text QString format.
-     * @param status indicates SSID status code.
-     * @return status text.
-     */
-    QString SsidStatusToErrorString(WlanWizardUtils::SsidStatus status) const;
+    Q_DISABLE_COPY(WlanWizardPageSsid)
+    
+private slots:
     
 private:
     /*!
@@ -126,14 +85,12 @@
     HbLineEdit *mSsid;
     
     /*!
-     * Pointer to error label object.
-     */
-    HbLabel *mLabelError;
-    
-    /*!
      * Pointer to the document loader object.
      */
     HbDocumentLoader *mLoader;
+    
+    // Friend classes
+    friend class TestWlanWizardUi;
 };
 
 /*! @} */
--- a/wlanutilities/wlanwizard/inc/wlanwizardpagesummary.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizardpagesummary.h	Tue Jul 06 15:29:22 2010 +0300
@@ -46,7 +46,6 @@
 
 public: // From WlanWizardPage
     HbWidget* initializePage();
-    int nextId(bool &removeFromStack) const;
 
 signals:
     
--- a/wlanutilities/wlanwizard/inc/wlanwizardplugin.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/inc/wlanwizardplugin.h	Tue Jul 06 15:29:22 2010 +0300
@@ -86,11 +86,6 @@
     };
     
     /*!
-       Deletes wizard specific settings if any.
-     */
-    virtual void deleteSettings() {};
-    
-    /*!
        Maps plugin specific error codes into a localized string.
        
        @param [in] errorCode Symbian error code.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/inc/wlanwizardscanlist.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,129 @@
+/*
+ * 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: 
+ *   WLAN Wizard Plugin API: Service required from the wizard plugin.
+ *
+ */
+
+#ifndef WLANWIZARDSCANLIST_H_
+#define WLANWIZARDSCANLIST_H_
+
+// System includes
+#include <QList>
+#include <QHash>
+#include <QMetaType>
+#include <QString>
+#include <QSharedPointer>
+
+/*!
+   @addtogroup group_wlan_wizard
+   @{
+ */
+
+// User includes
+
+// Forward declarations
+class WlanQtUtilsAp;
+
+// External data types
+/*!
+ * Data structure with scan results and access point visibility information.
+ */
+class WlanScanResult
+{
+public:
+    QSharedPointer<WlanQtUtilsAp> scanResult;
+    bool networkHidden;
+};
+
+/*!
+ * Data structure containing security setting information and wizard page
+ * navigation information.
+ */
+class WlanSecuritySetting
+{
+public:
+    int mode;
+    bool usePsk;
+    int nextPageId;
+    
+    bool operator==(const WlanSecuritySetting& setting) const {
+        return (mode == setting.mode && 
+            usePsk == setting.usePsk &&
+            nextPageId == setting.nextPageId);
+    }
+};
+
+/*!
+ * Data structure containing network mode, visibility and wireless protection
+ * setup suppport information.
+ */
+class WlanNetworkSetting 
+{
+public:
+    int mode;
+    bool hidden;
+    bool wpsSupported;
+    
+    bool operator==(const WlanNetworkSetting& setting) const {
+        return (mode == setting.mode && 
+            hidden == setting.hidden &&
+            wpsSupported == setting.wpsSupported);
+    }
+};
+
+/*!
+ * Necessary public function for an argument of type WlanNetworkSetting to
+ * function as a QHash key.
+ */
+inline uint qHash(const WlanNetworkSetting &key)
+ {
+    uint hash = key.mode;
+    hash <<= 1;
+    hash |= key.hidden ? 1 : 0;
+    hash <<= 1;
+    hash |= key.wpsSupported ? 1 : 0;
+    return qHash(hash);
+ }
+
+// Constants
+
+class WlanWizardScanList
+{
+public:
+    WlanWizardScanList();
+    WlanWizardScanList(const WlanWizardScanList &scanList);
+    ~WlanWizardScanList();
+    void build(const QList<WlanScanResult> &results);
+    const WlanSecuritySetting &getSecMode(WlanNetworkSetting netMode, int index = 0) const;
+    int netModes() const;
+    int secModes(WlanNetworkSetting netMode) const;
+    QList<WlanNetworkSetting> getNetModes() const;
+    
+private:
+    // Disabling implicit assignment operator
+    WlanWizardScanList &operator=(const WlanWizardScanList &);
+    
+private:
+    QHash<WlanNetworkSetting, QList<WlanSecuritySetting> > mOpenOptions;
+};
+
+/*!
+ * This macro makes WlanWizardScanList QVariant-compatible.
+ */
+Q_DECLARE_METATYPE(WlanWizardScanList)
+
+/*! @} */
+
+#endif /* WLANWIZARDSCANLIST_H_ */
--- a/wlanutilities/wlanwizard/resources/occ_add_wlan_01_04.docml	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/resources/occ_add_wlan_01_04.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <widget name="occ_add_wlan_01" type="HbWidget">
         <widget name="container" type="HbWidget">
             <widget name="dialog" type="HbLabel">
@@ -45,7 +45,7 @@
             <widget name="container" type="HbWidget">
                 <widget name="dialog" type="HbLabel">
                     <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-                    <sizehint type="FIXED" width="expr((var(hb-param-screen-width) - var(hb-param-margin-gene-middle-horizontal))  / 2  - var(hb-param-margin-gene-screen) - var(hb-param-margin-gene-popup))"/>
+                    <sizehint type="FIXED" width="expr((var(hb-param-screen-width) - var(hb-param-margin-gene-middle-horizontal))  / 2  - var(hb-param-margin-gene-screen) - var(hb-param-margin-gene-popup) +var(hb-param-margin-gene-middle-horizontal))"/>
                     <contentsmargins bottom="0un" left="0un" right="var(hb-param-margin-gene-middle-horizontal)" top="0un"/>
                 </widget>
                 <layout spacing="0un" type="grid">
@@ -57,7 +57,7 @@
             </widget>
         </widget>
     </section>
-    <metadata activeUIState="landscape" display="NHD landscape" unit="un">
+    <metadata activeUIState="landscape" display="NHD-3.2-inch_landscape" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="portrait" sections="#common portrait_section"/>
         <uistate name="landscape" sections="#common landscape_section"/>
--- a/wlanutilities/wlanwizard/resources/occ_add_wlan_02_03.docml	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/resources/occ_add_wlan_02_03.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <widget name="occ_add_wlan_02" type="HbWidget">
         <widget name="list" type="HbRadioButtonList"/>
         <widget name="dialog_6" type="HbLabel">
@@ -19,6 +19,7 @@
                 <anchoritem dst="list" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
                 <anchoritem dst="list" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="dialog_6" srcEdge="BOTTOM"/>
                 <anchoritem dst="list" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="list" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
                 <anchoritem dst="dialog_6" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
                 <anchoritem dst="dialog_6" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
                 <anchoritem dst="dialog_6" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
@@ -37,10 +38,11 @@
                 <anchoritem dst="list" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="dialog_6" srcEdge="RIGHT"/>
                 <anchoritem dst="list" dstEdge="TOP" spacing="0un" src="dialog_6" srcEdge="TOP"/>
                 <anchoritem dst="list" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="list" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>                
             </layout>
         </widget>
     </section>
-    <metadata activeUIState="portrait" display="NHD portrait" unit="un">
+    <metadata activeUIState="portrait" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="landscape" sections="#common landscape_section"/>
         <uistate name="portrait" sections="#common portrait_section"/>
--- a/wlanutilities/wlanwizard/resources/occ_add_wlan_05.docml	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/resources/occ_add_wlan_05.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <widget name="occ_add_wlan_05" type="HbListWidget"/>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
     </metadata>
 </hbdocument>
--- a/wlanutilities/wlanwizard/resources/occ_add_wlan_06.docml	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/resources/occ_add_wlan_06.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <widget name="occ_add_wlan_06" type="HbWidget">
         <widget name="dialog" type="HbLabel">
             <enums name="textWrapping" value="TextWordWrap"/>
@@ -44,7 +44,7 @@
             </layout>
         </widget>
     </section>
-    <metadata activeUIState="portrait" display="NHD portrait" unit="un">
+    <metadata activeUIState="portrait" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="portrait" sections="#common portrait_section"/>
         <uistate name="landscape" sections="#common landscape_section"/>
--- a/wlanutilities/wlanwizard/resources/occ_add_wlan_error.docml	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/resources/occ_add_wlan_error.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <widget name="occ_add_wlan_error" type="HbWidget">
         <widget name="dialog" type="HbLabel">
             <enums name="textWrapping" value="TextWordWrap"/>
@@ -13,7 +13,7 @@
             <anchoritem dst="dialog" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
         </layout>
     </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
     </metadata>
 </hbdocument>
--- a/wlanutilities/wlanwizard/resources/occ_wlan_wizard_main.docml	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/resources/occ_wlan_wizard_main.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -1,30 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <object name="actionCancel" type="HbAction">
-        <string locid="txt_occ_button_cancel" name="iconText" value="txt_occ_button_cancel"/>
-        <string locid="txt_occ_button_cancel" name="text" value="txt_occ_button_cancel"/>
+        <icon iconName="qtg_mono_exit" name="icon"/>
     </object>
     <object name="actionPrevious" type="HbAction">
-        <string locid="txt_occ_button_previous" name="iconText" value="txt_occ_button_previous"/>
-        <string locid="txt_occ_button_previous" name="text" value="txt_occ_button_previous"/>
+        <icon iconName="qtg_mono_arrow_left" name="icon"/>
     </object>
     <object name="actionNext" type="HbAction">
-        <string locid="txt_occ_button_next" name="iconText" value="txt_occ_button_next"/>
-        <string locid="txt_occ_button_next" name="text" value="txt_occ_button_next"/>
+        <icon iconName="qtg_mono_arrow_right" name="icon"/>
     </object>
     <object name="actionFinish" type="HbAction">
-        <string locid="txt_occ_button_finish" name="iconText" value="txt_occ_button_finish"/>
-        <string locid="txt_occ_button_finish" name="text" value="txt_occ_button_finish"/>
+        <icon iconName="qtg_mono_tick" name="icon"/>
     </object>
     <widget name="dialog" type="HbDialog">
-        <widget name="title" role="HbDialog:headingWidget" type="HbLabel"/>
-        <widget name="stackedWidget" role="HbDialog:contentWidget" type="HbStackedWidget"/>
         <bool name="backgroundFaded" value="TRUE"/>
         <integer name="timeout" value="0"/>
         <enums name="frameType" value="Strong"/>
         <enums name="dismissPolicy" value="NoDismiss"/>
+        <widget name="title" role="HbDialog:headingWidget" type="HbLabel"/>
+        <widget name="stackedWidget" role="HbDialog:contentWidget" type="HbStackedWidget"/>
     </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
     </metadata>
 </hbdocument>
--- a/wlanutilities/wlanwizard/src/wlanwizard_p.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/src/wlanwizard_p.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -31,13 +31,8 @@
 #include <HbStyleLoader>
 
 // User includes
-#ifdef WLAN_WIZARD_RND_EAP
 #include "eapwizard.h"
-#endif
-
-#ifdef WLAN_WIZARD_RND_WPS
 #include "wpswizard.h"
-#endif
 #include "wlanqtutils.h"
 #include "wlanqtutilsap.h"
 #include "wlanwizardplugin.h"
@@ -48,13 +43,10 @@
 #include "wlanwizardpagesummary.h"
 #include "wlanwizardpageprocessingsettings.h"
 #include "wlanwizardpagegenericerror.h"
-
-#ifdef WLAN_WIZARD_RND
 #include "wlanwizardpagessid.h"
 #include "wlanwizardpagenetworkmode.h"
 #include "wlanwizardpagescanning.h"
 #include "wlanwizardpagesecuritymode.h"
-#endif
 
 #include "OstTraceDefinitions.h"
 #ifdef OST_TRACE_COMPILER_IN_USE
@@ -128,6 +120,14 @@
     // Creates the control object of the wlan wizard pages. 
     createPages();
 
+    // EAP Wizard will add wizard pages at construction phase using
+    // WlanWizardHelper::addPage()
+    mEapWizard.reset(new EapWizard(this) );
+
+    // WPS Wizard will add wizard pages at construction phase using
+    // WlanWizardHelper::addPage()
+    mWpsWizard.reset(new WpsWizard(this));
+
     // First page is SSID query, unless client sets configurations via
     // setParameters(), which decides the first page..
     mFirstPageId = WlanWizardPageInternal::PageSsid;
@@ -165,17 +165,16 @@
     // parent of the objects.
     mPages.clear();
     
-#ifdef WLAN_WIZARD_RND_EAP
-    delete mEapWizard;
-#endif
-#ifdef WLAN_WIZARD_RND_WPS
-    delete mWpsWizard;
-#endif
     // timer is cancelled/deleted automatically when the parent (this) is deleted 
     
     // TODO: See TSW Error: MTAA-854DK8 and loadDocml()
     HbStyleLoader::unregisterFilePath(":/css/custom.css");
     
+    mDialog->setAttribute( Qt::WA_DeleteOnClose, true );
+    mDialog->close();
+    // Remove the pointer from QScopedPointer to prevent double deallocation
+    mDialog.take();
+    
     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_DWLANWIZARDPRIVATE_DONE,
         "WlanWizardPrivate::~WlanWizardPrivate-Done;this=%x",
         this );
@@ -272,10 +271,8 @@
     WlanWizardPlugin* plugin = NULL;
 
     if (isEapEnabled()) {
-#ifdef WLAN_WIZARD_RND_EAP
-        plugin = mEapWizard;
+        plugin = mEapWizard.data();
         Q_ASSERT(plugin);
-#endif
     }
     
     OstTrace1( TRACE_NORMAL, WLANWIZARDPRIVATE_WLANWIZARDPLUGIN, 
@@ -325,6 +322,15 @@
     int securityMode = configuration(ConfSecurityMode).toInt();
     WlanQtUtilsAp wlanAp;
    
+    // Set default values
+    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPsk, QString());
+    wlanAp.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true );
+    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex1 );
+    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey1, QString());
+    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey2, QString());
+    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey3, QString());
+    wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey4, QString());
+    
     // Set configuration
     wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, configuration(ConfSsid));
     wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, 
@@ -440,6 +446,30 @@
 }
 
 /*!
+ * See WlanWizardHelper::clearConfiguration().
+ */
+void WlanWizardPrivate::clearConfiguration(ConfigurationId confId)
+{
+    OstTrace1( TRACE_FLOW, WLANWIZARDPRIVATE_CLEARCONFIGURATION,
+        "WlanWizardPrivate::clearConfiguration;confId=%{ConfigurationId}",
+        (uint)confId );
+    
+    mConfigurations.remove(confId);
+}
+
+/*!
+ * See WlanWizardHelper::configurationExists().
+ */
+bool WlanWizardPrivate::configurationExists(ConfigurationId confId)
+{
+    OstTrace1( TRACE_DUMP, WLANWIZARDPRIVATE_CONFIGURATIONEXISTS,
+        "WlanWizardPrivate::configurationExists;confId=%{ConfigurationId}",
+        (uint)confId );
+    
+    return mConfigurations[confId].isValid();
+}
+    
+/*!
    See WlanWizardHelper::enableNextButton().
  */
 void WlanWizardPrivate::enableNextButton(bool enable)
@@ -451,18 +481,6 @@
 }
 
 /*!
-   See WlanWizardHelper::enablePrevButton().
- */
-void WlanWizardPrivate::enablePrevButton(bool enable)
-{
-    OstTraceExt2( TRACE_FLOW, WLANWIZARDPRIVATE_ENABLEPREVBUTTON,
-        "WlanWizardPrivate::enablePrevButton;this=%x;enable=%x", 
-        (unsigned)this, (uint)(enable) );
-    
-    mActionPrevious->setEnabled(enable);
-}
-
-/*!
    See WlanWizardHelper::addPage().
  */
 void WlanWizardPrivate::addPage(int pageId, WlanWizardPage *page)
@@ -519,55 +537,38 @@
 int WlanWizardPrivate::nextPageId(bool useWps)
 {
     int ret;
-    int secMode = configuration(WlanWizardHelper::ConfSecurityMode).toInt();
-    switch (secMode) {
-    case CMManagerShim::WlanSecModeWep:
-        ret = WlanWizardPageInternal::PageKeyQuery;
-        break;
-        
-    case CMManagerShim::WlanSecModeWpa:
-    case CMManagerShim::WlanSecModeWpa2:
-        if (configuration(WlanWizardHelper::ConfUsePsk).toBool()) {
-            ret = WlanWizardPageInternal::PageKeyQuery;
-        } else {
-#ifdef WLAN_WIZARD_RND_EAP
-            ret = WlanWizardPage::PageEapStart;
-#else
-            ret = WlanWizardPageInternal::PageProcessSettings;
-            setConfiguration(ConfSecurityMode, CMManagerShim::WlanSecModeOpen);
-#endif
-
-        }
-        break;
-        
-    case CMManagerShim::WlanSecMode802_1x:
-#ifdef WLAN_WIZARD_RND_EAP
-        ret = WlanWizardPage::PageEapStart;
-#else
-        ret = WlanWizardPageInternal::PageProcessSettings;
-        setConfiguration(ConfSecurityMode, CMManagerShim::WlanSecModeOpen);
-#endif
-        break;
-        
-    case CMManagerShim::WlanSecModeWapi:
-    case CMManagerShim::WlanSecModeOpen:
-    default:
-        Q_ASSERT(
-            secMode == CMManagerShim::WlanSecModeOpen || 
-            secMode == CMManagerShim::WlanSecModeWapi);
-        
-        setConfiguration(ConfSecurityMode, CMManagerShim::WlanSecModeOpen);
-        ret = WlanWizardPageInternal::PageProcessSettings;
-        break;
-    }
-
-    Q_UNUSED(useWps);
-#ifdef WLAN_WIZARD_RND_WPS
-    // TODO: WPS: and switch case above to else branch
     if (useWps) {
         ret = WlanWizardPage::PageWpsStart;
+    } else {
+        int secMode = configuration(WlanWizardHelper::ConfSecurityMode).toInt();
+        switch (secMode) {
+        case CMManagerShim::WlanSecModeWep:
+            ret = WlanWizardPageInternal::PageKeyQuery;
+            break;
+            
+        case CMManagerShim::WlanSecModeWpa:
+        case CMManagerShim::WlanSecModeWpa2:
+            if (configuration(WlanWizardHelper::ConfUsePsk).toBool()) {
+                ret = WlanWizardPageInternal::PageKeyQuery;
+            } else {
+                ret = WlanWizardPage::PageEapStart;
+            }
+            break;
+            
+        case CMManagerShim::WlanSecMode802_1x:
+            ret = WlanWizardPage::PageEapStart;
+            break;
+            
+        default:
+            Q_ASSERT(
+                secMode == CMManagerShim::WlanSecModeOpen || 
+                secMode == CMManagerShim::WlanSecModeWapi);
+            
+            setConfiguration(ConfSecurityMode, CMManagerShim::WlanSecModeOpen);
+            ret = WlanWizardPageInternal::PageProcessSettings;
+            break;
+        }
     }
-#endif
 
     OstTraceExt3( TRACE_NORMAL, WLANWIZARDPRIVATE_NEXTPAGEID,
         "WlanWizardPrivate::nextPageId;this=%x;useWps=%x;ret=%{PageIds}",
@@ -607,12 +608,6 @@
         
         // if IAP deletion fails, there is nothing we can do with it
         mWlanQtUtils->deleteIap(referenceId);
-        WlanWizardPlugin* plugin = wlanWizardPlugin();
-        if (plugin) {
-            // if deletion of plugin specific configuration fails we are not
-            // able to do anything
-            plugin->deleteSettings();
-        }
         setConfiguration(ConfIapId, WlanQtUtils::IapIdNone);
     }
     closeViews();
@@ -812,6 +807,10 @@
                 setConfiguration(
                     ConfGenericErrorString, 
                     hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret"));
+                
+                setConfiguration(
+                    ConfGenericErrorPageStepsBackwards, 
+                    WlanWizardPage::OneStepBackwards);
             }
             OstTraceExt2( TRACE_FLOW, WLANWIZARDPRIVATE_SHOWPAGE_UPDATE,
                 "WlanWizardPrivate::showPage - change page;this=%x;"
@@ -819,25 +818,6 @@
                 ( unsigned )this, pageId);
         }
     }
-    
-#ifdef WLAN_WIZARD_RND_EAP
-    if (pageId == WlanWizardPage::PageEapStart) {
-        if (!mEapWizard) {
-            // EAP Wizard will add wizard pages at construction phase using
-            // WlanWizardHelper::addPage()
-            mEapWizard = new EapWizard(this);
-        }
-    }
-#endif
-#ifdef WLAN_WIZARD_RND_WPS
-    if (pageId == WlanWizardPage::PageWpsStart) {
-        if (!mWpsWizard) {
-            // WPS Wizard will add wizard pages at construction phase using
-            // WlanWizardHelper::addPage()
-            mWpsWizard = new WpsWizard(this);
-        }
-    }
-#endif
 
     // Create visualization of next page and store it to mappers
     WlanWizardPage* page = mPages[pageId];
@@ -882,33 +862,42 @@
  */
 void WlanWizardPrivate::createPages()
 {
-    OstTrace0( TRACE_NORMAL, WLANWIZARDPRIVATE_CREATEPAGES,
-        "WlanWizardPrivate::createPages" );
+    OstTrace0(
+        TRACE_NORMAL,
+        WLANWIZARDPRIVATE_CREATEPAGES,
+        "WlanWizardPrivate::createPages");
     
-    addPage(WlanWizardPageInternal::PageKeyQuery, 
+    addPage(
+        WlanWizardPageInternal::PageKeyQuery, 
         new WlanWizardPageKeyQuery(this));
     
-    addPage(WlanWizardPageInternal::PageProcessSettings, 
+    addPage(
+        WlanWizardPageInternal::PageProcessSettings, 
         new WlanWizardPageProcessingSettings(this));
     
-    addPage(WlanWizardPageInternal::PageSummary, 
+    addPage(
+        WlanWizardPageInternal::PageSummary, 
         new WlanWizardPageSummary(this));
 
-    addPage(WlanWizardPageInternal::PageGenericError, 
+    addPage(
+        WlanWizardPageInternal::PageGenericError, 
         new WlanWizardPageGenericError(this));
     
-#ifdef WLAN_WIZARD_RND
-    addPage(WlanWizardPageInternal::PageSsid, new WlanWizardPageSsid(this));
+    addPage(
+        WlanWizardPageInternal::PageSsid,
+        new WlanWizardPageSsid(this));
     
-    addPage(WlanWizardPageInternal::PageScanning, 
+    addPage(
+        WlanWizardPageInternal::PageScanning, 
         new WlanWizardPageScanning(this));
     
-    addPage(WlanWizardPageInternal::PageNetworkMode, 
+    addPage(
+        WlanWizardPageInternal::PageNetworkMode, 
         new WlanWizardPageNetworkMode(this));
     
-    addPage(WlanWizardPageInternal::PageNetworkSecurity, 
+    addPage(
+        WlanWizardPageInternal::PageNetworkSecurity, 
         new WlanWizardPageSecurityMode(this));
-#endif
 }
 
 /*!
@@ -918,8 +907,8 @@
  */
 void WlanWizardPrivate::closeViews()
 {
+    mDialog->hide();
     mClosed = true;
-    mDialog->close();
 }
 
 /*!
--- a/wlanutilities/wlanwizard/src/wlanwizardpagegenericerror.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/src/wlanwizardpagegenericerror.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -97,20 +97,6 @@
 }
 
 /*!
-   See WlanWizardPage::nextId()
-   
-   @param [out] removeFromStack return value is always false
-   
-   @return WlanWizardPageInternal::PageNone
- */
-int WlanWizardPageGenericError::nextId(bool &removeFromStack) const
-{
-    removeFromStack = false;
-    return WlanWizardPageInternal::PageNone;
-}
-
-
-/*!
    See WlanWizardPage::showPage()
    
    @return false. Next button is dimmed when the page is displayed.
@@ -120,4 +106,13 @@
     return false;
 }
 
-
+/*!
+    See WlanWizardPage::previousTriggered()
+   
+   @return steps backwards
+ */
+int WlanWizardPageGenericError::previousTriggered()
+{
+    return mWizard->configuration(
+        WlanWizardHelper::ConfGenericErrorPageStepsBackwards).toInt();
+}
--- a/wlanutilities/wlanwizard/src/wlanwizardpageinternal.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/src/wlanwizardpageinternal.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -18,6 +18,8 @@
 
 // System includes
 #include <HbWidget>
+#include <HbDocumentLoader>
+#include <HbMainWindow>
 
 // User includes
 #include "wlanwizard_p.h"
@@ -54,3 +56,33 @@
 WlanWizardPageInternal::~WlanWizardPageInternal()
 {
 }
+
+
+/*!
+   Loads requested section from given docml file.
+   
+   @param [in] loader Document loader for docml
+   @param [in] orientation Orientation to be loaded
+   @param [in] filename the name of docml filename
+   @param [in] portraitSection the name of section to be loaded in portrait mode
+   @param [in] landscapeSection the name of section to be loaded in landscape mode
+ */
+void WlanWizardPageInternal::loadDocmlSection(
+    HbDocumentLoader *loader,
+    Qt::Orientation orientation,
+    const QString &filename,
+    const QString &portraitSection,
+    const QString &landscapeSection) const
+{
+    bool ok;
+    
+    // Then load the orientation specific section
+    if (orientation == Qt::Horizontal) {
+        loader->load(filename, landscapeSection, &ok);
+        Q_ASSERT(ok);
+    } else {
+        Q_ASSERT(orientation == Qt::Vertical);
+        loader->load(filename, portraitSection, &ok);
+        Q_ASSERT(ok);
+    }
+}
--- a/wlanutilities/wlanwizard/src/wlanwizardpagekeyquery.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/src/wlanwizardpagekeyquery.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -23,6 +23,7 @@
 #include <HbLabel>
 #include <HbLineEdit>
 #include <HbEditorInterface>
+#include <HbParameterLengthLimiter>
 
 // User includes
 #include "wlanwizard.h"
@@ -125,8 +126,9 @@
     }
     
     mLabelTitle->setPlainText(
-        hbTrId("txt_occ_dialog_enter_key_for_1").arg(mWizard->configuration(
-            WlanWizardPrivate::ConfSsid).toString()));
+        HbParameterLengthLimiter(
+            hbTrId("txt_occ_dialog_enter_key_for_1")).arg(
+                mWizard->configuration(WlanWizardPrivate::ConfSsid).toString()));
     
     return mWidget;
 }
@@ -139,19 +141,12 @@
  */
 void WlanWizardPageKeyQuery::loadDocmlSection(Qt::Orientation orientation)
 {
-    bool ok = false;
-    
-    // Load the orientation specific section
-    if (orientation == Qt::Horizontal) {
-        mDocLoader->load(
-            ":/docml/occ_add_wlan_01_04.docml", "landscape_section", &ok);
-        Q_ASSERT(ok);
-    } else {
-        Q_ASSERT(orientation == Qt::Vertical);
-        mDocLoader->load(
-            ":/docml/occ_add_wlan_01_04.docml", "portrait_section", &ok);
-        Q_ASSERT(ok);
-    }
+    WlanWizardPageInternal::loadDocmlSection(
+        mDocLoader,
+        orientation,
+        ":/docml/occ_add_wlan_01_04.docml", 
+        "portrait_section",
+        "landscape_section");
 }
 
 /*!
@@ -169,7 +164,7 @@
 int WlanWizardPageKeyQuery::nextId(bool &removeFromStack) const
 {
     WlanWizardUtils::KeyStatus status(WlanWizardUtils::KeyStatusOk);
-    int pageId = WlanWizardPage::PageNone;
+    int pageId = WlanWizardPage::nextId(removeFromStack);
     int secMode = mWizard->configuration(
         WlanWizardPrivate::ConfSecurityMode).toInt();
     
@@ -252,7 +247,6 @@
         break;
 
     case WlanWizardUtils::KeyStatusWpaTooShort:
-    case WlanWizardUtils::KeyStatusWpaTooLong:
         errorString = hbTrId("txt_occ_dialog_preshared_key_too_short_at_least");
         break;
 
@@ -260,7 +254,6 @@
         errorString = hbTrId("txt_occ_dialog_key_is_of_incorrect_length_please");
         break;
 
-    case WlanWizardUtils::KeyStatusOk:
     default:
         Q_ASSERT(WlanWizardUtils::KeyStatusOk == status);
         // nothing to do here.
--- a/wlanutilities/wlanwizard/src/wlanwizardpagenetworkmode.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/src/wlanwizardpagenetworkmode.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -28,13 +28,17 @@
 #include "wlanwizard_p.h"
 #include "wlanwizard.h"
 #include "wlanwizardpagenetworkmode.h"
+#include "wlanwizardscanlist.h"
 #include "OstTraceDefinitions.h"
 #ifdef OST_TRACE_COMPILER_IN_USE
 #include "wlanwizardpagenetworkmodeTraces.h"
 #endif
 
+// Local constants
+
 /*!
- * Contructor. Member initialization.
+ * Constructor method for the network mode view object
+ * @param parent [in] pointer to parent object.
  */
 WlanWizardPageNetworkMode::WlanWizardPageNetworkMode(
     WlanWizardPrivate* parent) :
@@ -58,6 +62,7 @@
 
 /*!
  * Page initialization. If view is already loaded, does nothing.
+ * Inherited from WlanWizardPage.
  */
 HbWidget* WlanWizardPageNetworkMode::initializePage()
 {
@@ -70,71 +75,77 @@
         bool ok;
 
         mLoader->load(":/docml/occ_add_wlan_02_03.docml", &ok);
-        Q_ASSERT_X(ok, "WLAN Wizard", "Invalid docml file");
+        Q_ASSERT(ok);
 
-        loadDocml(mWizard->mainWindow()->orientation());
+        loadDocmlSection(mWizard->mainWindow()->orientation());
 
         mWidget = qobject_cast<HbWidget*> (mLoader->findWidget(
             "occ_add_wlan_02"));
-        Q_ASSERT_X(mWidget != NULL, "WlanWizardPageNetworkMode", "View not found");
+        Q_ASSERT(mWidget != NULL);
 
         mList = qobject_cast<HbRadioButtonList*> (mLoader->findWidget("list"));
-        Q_ASSERT_X(mList != NULL, "WlanWizardPageNetworkMode", "List not found");
+        Q_ASSERT(mList != NULL);
 
         mLabel = qobject_cast<HbLabel*> (mLoader->findWidget("dialog_6"));
-        Q_ASSERT_X(mLabel != NULL, "WlanWizardPageNetworkMode", "Label not found");
+        Q_ASSERT(mLabel != NULL);
 
         // Connect document loading to main window orientation changes.
-        ok &= connect(mWizard->mainWindow(),
+        ok = connect(mWizard->mainWindow(),
             SIGNAL(orientationChanged(Qt::Orientation)), this,
-            SLOT(loadDocml(Qt::Orientation)));
-
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(ok);
+        
         // Connect a function to a radio button selection.
-        ok &= connect(mList, SIGNAL(itemSelected(int)), this,
-            SLOT(itemSelected(int)));
-
-        Q_ASSERT_X(ok, "WLAN Wizard", "orientationChanged slot connection failed");
+        ok = connect(mList, SIGNAL(itemSelected(int)), this,
+            SLOT(itemSelected()));
+        Q_ASSERT(ok);
 
         mLabel->setPlainText(hbTrId(
             "txt_occ_dialog_select_network_mode_and_status"));
-
-        QStringList items;
-
-        addToList(items, hbTrId("txt_occ_dblist_val_infrastructure_public"),
-            CMManagerShim::Infra, false);
-
-        addToList(items, hbTrId("txt_occ_list_infrastructure_hidden"),
-            CMManagerShim::Infra, true);
-
-        addToList(items, hbTrId("txt_occ_list_adhoc_1"), CMManagerShim::Adhoc,
-            false);
-
-        mList->setItems(items);
-
     }
+    
+    QStringList items;
+    
+    populateRadioButtonList(items);
+    
+    mList->setItems(items);
+    
     return mWidget;
 }
 
 /*!
- * When moving to next page, write user selections to the wizard and return
- * Security mode query page id.
+ * Evaluates the network mode selection and sets the configuration in
+ * the wlanwizard.
+ * @param [out] removeFromStack always returns false.
+ * @return WlanWizardPageSecurityMode page id.
  */
 int WlanWizardPageNetworkMode::nextId(bool &removeFromStack) const
 {
     removeFromStack = false;
-    // TODO: wk18: proper code
+    WlanNetworkSetting setting;
+    setting.mode = mNetworkModes.at(mList->selected());
+    setting.hidden = mIsHidden.at(mList->selected());
+    
+    // TODO: Still no wps handling.
+    setting.wpsSupported = false;
+    
     mWizard->setConfiguration(WlanWizardPrivate::ConfNetworkMode,
-        mNetworkModes.at(mList->selected()));
+        setting.mode);
     
     mWizard->setConfiguration(WlanWizardPrivate::ConfHiddenWlan,
-        mIsHidden.at(mList->selected()));
+        setting.hidden);
 
+    if (mWizard->configurationExists(WlanWizardPrivate::ConfAvailableNetworkOptions)) {
+        return selectNextPage(setting);
+    }
+    
     return WlanWizardPageInternal::PageNetworkSecurity;
 }
 
 /*!
- * Indicates the validity of the network mode page.
- * @see WlanWizardPage
+ * This method is overrides the default implementation from WlanWizardPage.
+ * It indicates whether the Next-button should be enabled or not.
+ * @return mValid, which is true if a radio button has been selected.
  */
 bool WlanWizardPageNetworkMode::showPage()
 {
@@ -142,10 +153,10 @@
 }
 
 /*!
- * Sets the page as valid, if any mode is selected.
- * (Initially none is selected.) 
+ * This function is invoked when user selects a mode from the radio button list.
+ * (HbRadioButtonList's itemSelected-signal)
  */
-void WlanWizardPageNetworkMode::itemSelected(int /* index */)
+void WlanWizardPageNetworkMode::itemSelected()
 {
     OstTrace0( TRACE_BORDER, WLANWIZARDPAGENETWORKMODE_ITEMSELECTED,
         "WlanWizardPageNetworkMode::itemSelected" );
@@ -155,36 +166,105 @@
 }
 
 /*!
- * Loads the ui layout file with current orientation.
+ * Loads the document orientation information from occ_add_wlan_02_03.docml.
+ * This is called each time phone orientation changes.
+ * @param [in] orientation indicates whether the phone is in portrait or
+ * landscape mode.
  */
-void WlanWizardPageNetworkMode::loadDocml(Qt::Orientation orientation)
+void WlanWizardPageNetworkMode::loadDocmlSection(Qt::Orientation orientation)
 {
     OstTrace1( TRACE_NORMAL, WLANWIZARDPAGENETWORKMODE_LOADDOCML,
         "WlanWizardPageNetworkMode::loadDocml - Orientation;orientation=%x",
         ( TUint )( orientation ) );
 
-    bool ok;
-    if (orientation == Qt::Horizontal) {
-        mLoader->load(":/docml/occ_add_wlan_02_03.docml", "landscape_section",
-            &ok);
-        Q_ASSERT_X(ok, "WLAN Wizard", "Landscape section not found");
+    WlanWizardPageInternal::loadDocmlSection(
+        mLoader,
+        orientation,
+        ":/docml/occ_add_wlan_02_03.docml", 
+        "portrait_section",
+        "landscape_section");
+}
+
+/*!
+ * A support function to map the radio button list to a generic network
+ * mode list. This enables the changing of button order without it
+ * affecting the entire class.
+ * In case previous scan has revealed multiple results with the same ssid, only
+ * available network mode options are shown in the radio button list.
+ * @param [out] list is the list of captions used for the radio buttons.
+ * @param [in] item is the caption to be added.
+ * @param [in] mode is the network mode to be added.
+ * @param [in] isHidden is the visibility status of the network.
+ */
+void WlanWizardPageNetworkMode::addToList(QStringList &list,
+    const QString &item, int mode, bool isHidden)
+{
+        
+    if (mWizard->configurationExists(WlanWizardHelper::ConfAvailableNetworkOptions)) {
+        WlanWizardScanList networkOptions = mWizard->configuration(
+            WlanWizardHelper::ConfAvailableNetworkOptions).value<WlanWizardScanList> ();
+
+        QList<WlanNetworkSetting> modes = networkOptions.getNetModes();
+
+        for (int i = 0; i < modes.size(); i++) {
+            if (modes[i].mode == mode && modes[i].hidden == isHidden) {
+                list << item;
+                mNetworkModes.append(mode);
+                mIsHidden.append(isHidden);
+            }
+        }
     }
-    else {
-        mLoader->load(":/docml/occ_add_wlan_02_03.docml", "portrait_section",
-            &ok);
-        Q_ASSERT_X(ok, "WLAN Wizard", "Portrait section not found");
+    else {  
+        list << item;
+        mNetworkModes.append(mode);
+        mIsHidden.append(isHidden);
     }
 }
 
 /*!
- * Mode and visibility lists are populated to the same order as the radio
- * button list.
+ * This function checks the sets up the radio button list for user input.
+ * @param [out] list is the list of captions used for the radio buttons.
  */
-void WlanWizardPageNetworkMode::addToList(QStringList &list,
-    const QString &item, int mode, bool isHidden)
+void WlanWizardPageNetworkMode::populateRadioButtonList(QStringList &list)
 {
-    list << item;
-    mNetworkModes.append(mode);
-    mIsHidden.append(isHidden);
+    list.clear();
+    mNetworkModes.clear();
+    mIsHidden.clear();
+
+    // A list is created. Since there is no practical way of knowing whether
+    // the new contents are different from the previous contents (if there
+    // even were any in the first place) the validity is always reset.
+    mValid = false;
+        
+    addToList(list, hbTrId("txt_occ_dblist_val_infrastructure_public"),
+        CMManagerShim::Infra, false);
+
+    addToList(list, hbTrId("txt_occ_list_infrastructure_hidden"),
+        CMManagerShim::Infra, true);
+
+    addToList(list, hbTrId("txt_occ_list_adhoc_1"), CMManagerShim::Adhoc,
+        false);
 }
 
+/*!
+ * This function selects the next page. Security mode may be skipped in case
+ * scan results exist and only single option remains.
+ * @param [in] setting indicates the selected network mode.
+ * @return Security mode query page identifier unless it can be skipped.
+ */
+int WlanWizardPageNetworkMode::selectNextPage(const WlanNetworkSetting &setting) const
+{
+    WlanWizardScanList networkOptions = mWizard->configuration(
+        WlanWizardHelper::ConfAvailableNetworkOptions).value<WlanWizardScanList>();
+    
+    if (networkOptions.secModes(setting) == SingleResult) {
+        WlanSecuritySetting secMode = networkOptions.getSecMode(setting);
+        
+        mWizard->setConfiguration(WlanWizardHelper::ConfSecurityMode, secMode.mode);
+        mWizard->setConfiguration(WlanWizardHelper::ConfUsePsk, secMode.usePsk);
+        return secMode.nextPageId;
+    }
+    
+    return WlanWizardPageInternal::PageNetworkSecurity;
+}
+
--- a/wlanutilities/wlanwizard/src/wlanwizardpageprocessingsettings.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/src/wlanwizardpageprocessingsettings.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -21,6 +21,7 @@
 #include <HbWidget>
 #include <HbLabel>
 #include <HbProgressBar>
+#include <HbParameterLengthLimiter>
 #include <wlanerrorcodes.h>
 
 // User includes
@@ -69,24 +70,26 @@
 
     bool ok;
     ok = connect(
-        utils, SIGNAL(wlanNetworkOpened(int)), 
-        this, SLOT(wlanNetworkOpened(int)));
+        utils,
+        SIGNAL(wlanNetworkOpened(int)), 
+        this,
+        SLOT(wlanNetworkOpened(int)));
     Q_ASSERT(ok);
     
     ok = connect(
-        utils, SIGNAL(wlanNetworkClosed(int,int)), 
-        this, SLOT(wlanNetworkClosed(int,int)));
+        utils,
+        SIGNAL(wlanNetworkClosed(int,int)), 
+        this,
+        SLOT(wlanNetworkClosed(int,int)));
     Q_ASSERT(ok);
     
-#ifdef ICT_RESULT_ENUM
     ok = connect(
-        utils, SIGNAL(ictResult(int,WlanLoginIctsResultType)), 
-        this, SLOT(ictResult(int,WlanLoginIctsResultType)));
-#else
-    ok &= connect(
-        utils, SIGNAL(ictResult(int,bool)), 
-        this, SLOT(ictResult(int,bool)));
-#endif
+        utils,
+        SIGNAL(ictResult(int,int)), 
+        this,
+        SLOT(ictResult(int,int)));
+    Q_ASSERT(ok);
+
     Q_UNUSED(ok);
     Q_ASSERT(ok);
 }
@@ -127,8 +130,10 @@
         Q_ASSERT(ok);
     }
     
-    mLabel->setPlainText(hbTrId("txt_occ_dialog_checking_connection_to_1").arg(
-        mWizard->configuration(WlanWizardPrivate::ConfSsid).toString()));
+    mLabel->setPlainText(
+        HbParameterLengthLimiter(
+            hbTrId("txt_occ_dialog_checking_connection_to_1")).arg(
+                mWizard->configuration(WlanWizardPrivate::ConfSsid).toString()));
 
     return mWidget;
 }
@@ -165,17 +170,12 @@
  */
 void WlanWizardPageProcessingSettings::loadDocmlSection(Qt::Orientation orientation)
 {
-    bool ok;
-    // Load the orientation specific section   
-    if (orientation == Qt::Horizontal) {
-        mDocLoader->load(":/docml/occ_add_wlan_06.docml", "landscape_section", &ok);
-        Q_ASSERT(ok);
-    }
-    else {
-        Q_ASSERT(orientation == Qt::Vertical);
-        mDocLoader->load(":/docml/occ_add_wlan_06.docml", "portrait_section", &ok);
-        Q_ASSERT(ok);
-    }
+    WlanWizardPageInternal::loadDocmlSection(
+        mDocLoader,
+        orientation,
+        ":/docml/occ_add_wlan_06.docml", 
+        "portrait_section",
+        "landscape_section");
 }
 
 /*!
@@ -222,10 +222,9 @@
         case KErrWlanSharedKeyAuthFailed:
             errorText = hbTrId("txt_occ_dialog_incorrect_wep_key_please_check_the");
             break;
-        
-        case KErrNone:
-            // Do nothing, when connection is dropped we don't get any error code
+
         default:
+            // Handles also KErrNone
             // Get plugin specific localized error text if any
             WlanWizardPlugin *plugin = mWizard->wlanWizardPlugin();
             
@@ -240,6 +239,11 @@
         mNextPageId = WlanWizardPageInternal::PageGenericError;
         mWizard->setConfiguration(
             WlanWizardHelper::ConfGenericErrorString, errorText);
+        
+        mWizard->setConfiguration(
+            WlanWizardHelper::ConfGenericErrorPageStepsBackwards, 
+            WlanWizardPage::OneStepBackwards);
+        
         mWizard->nextPage();
     }
     
@@ -255,8 +259,7 @@
    @param [in] iapId IAP ID
    @param [in] reason ICT result, Symbian error code
  */
-#ifdef ICT_RESULT_ENUM
-void WlanWizardPageProcessingSettings::ictResult(int iapId, WlanLoginIctsResultType reason)
+void WlanWizardPageProcessingSettings::ictResult(int iapId, int reason)
 {
     OstTraceExt2( 
         TRACE_BORDER, 
@@ -265,44 +268,28 @@
         iapId, reason );
     
     if (iapId != mWizard->configuration(WlanWizardHelper::ConfIapId).toInt()) {
-        Q_ASSERT(false);
         return;
     }
-    mWizard->setConfiguration(WlanWizardPrivate::ConfConnected, true);
-    mWizard->setConfiguration(WlanWizardPrivate::ConfIctStatus, reason);
-    if(reason == IctsCanceled) {
-        QString errorText;
-        // TODO: What error string should be loaded?
-        mNextPageId = WlanWizardPageInternal::PageGenericError;
-        mWizard->setConfiguration(
-            WlanWizardHelper::ConfGenericErrorString, errorText);
+    
+    // Cast of result .
+    WlanQtUtils::IctStatus status = 
+        static_cast<WlanQtUtils::IctStatus>(reason);
+
+    if(status == WlanQtUtils::IctCancelled) {
+        
+        mNextPageId = WlanWizardPageInternal::PageNone;
+        mWizard->cancelTriggered();
     }
+    else {
+        mWizard->setConfiguration(WlanWizardPrivate::ConfConnected, true);
+    }
+    mWizard->setConfiguration(WlanWizardPrivate::ConfIctStatus, status);
+        
     mWizard->nextPage();
     
     OstTrace0( TRACE_BORDER, WLANWIZARDPAGEPROCESSINGSETTINGS_ICTRESULT_DONE, 
         "WlanWizardPageProcessingSettings::ictResult - Done" );
 }
-#else
-void WlanWizardPageProcessingSettings::ictResult(int iapId, bool reason)
-{
-    OstTraceExt2( 
-        TRACE_BORDER, 
-        WLANWIZARDPAGEPROCESSINGSETTINGS_ICTRESULT_1, 
-        "WlanWizardPageProcessingSettings::ictResult;iapId=%d;result=%d", 
-        iapId, reason );
-    
-    if (iapId != mWizard->configuration(WlanWizardHelper::ConfIapId).toInt()) {
-        Q_ASSERT(false);
-        return;
-    }
-    mWizard->setConfiguration(WlanWizardPrivate::ConfConnected, true);
-    mWizard->setConfiguration(WlanWizardPrivate::ConfIctStatus, reason);
-    mWizard->nextPage();
-    
-    OstTrace0( TRACE_BORDER, WLANWIZARDPAGEPROCESSINGSETTINGS_ICTRESULT_DONE_1, 
-        "WlanWizardPageProcessingSettings::ictResult - Done" );
-}
-#endif
 
 /*!
    Handles wlanNetworkOpened(int) signal from WlanQtUtils.
@@ -354,6 +341,10 @@
         mWizard->setConfiguration(
             WlanWizardHelper::ConfGenericErrorString, 
             hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret"));
+        
+        mWizard->setConfiguration(
+            WlanWizardHelper::ConfGenericErrorPageStepsBackwards, 
+            WlanWizardPage::OneStepBackwards);
         mWizard->nextPage();
     }
 }
--- a/wlanutilities/wlanwizard/src/wlanwizardpagescanning.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/src/wlanwizardpagescanning.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -1,27 +1,27 @@
 /*
- * 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: 
- * WLAN Wizard Page: Scan processing.
- */
+* 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: 
+* WLAN Wizard Page: Scan processing.
+*/
 
 // System includes
+#include <HbParameterLengthLimiter>
 #include <HbMainWindow>
 #include <HbDocumentLoader>
 #include <HbWidget>
 #include <HbLabel>
 #include <HbProgressBar>
-#include <QDebug>
 #include <cmmanagerdefines_shim.h>
 #include <wlanqtutils.h>
 #include <wlanqtutilsap.h>
@@ -34,25 +34,33 @@
 #include "wlanwizardpagescanningTraces.h"
 #endif
 
+// Local constants
+
 /*!
- * Constructor. Member initialization.
+ * Constructor method for the scanning view object.
+ * @param [in] parent pointer to parent object.
  */
 WlanWizardPageScanning::WlanWizardPageScanning(WlanWizardPrivate* parent) :
     WlanWizardPageInternal(parent),
     mWidget(NULL),
     mLabel(NULL),
-    mBar(NULL),
     mLoader(NULL),
     mNextPageId(WlanWizardPage::PageNone),
-    mScanResultsAvailable(false)
+    mScanResultsAvailable(false),
+    mScanStatus(WlanQtUtils::ScanStatusOk)
 {
     WlanQtUtils* utils = mWizard->wlanQtUtils();
 
     // Connect normal scan completion signal from wlanQtUtils to result
     // handler. Connect here instead of initializePage, since this signal may
     // need to be caught event if the window is not active.
-    bool ok = connect(utils, SIGNAL(wlanScanApReady()), this,
-        SLOT(wlanScanResultPreCheck()));
+    bool ok = connect(
+        utils,
+        SIGNAL(wlanScanApReady(int)),
+        this,
+        SLOT(wlanScanResultPreCheck(int)));
+    
+    Q_ASSERT(ok);
 }
 
 /*!
@@ -65,66 +73,73 @@
 }
 
 /*!
- * Page initialization. If view is already loaded, does nothing.
+ * Page initialization. If view is already loaded, does nothing. Inherited from
+ * WlanWizardPage.
+ * @return pointer to widget "occ_add_wlan_06".
  */
 HbWidget* WlanWizardPageScanning::initializePage()
 {
-    OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_INITIALIZEPAGE,
-        "WlanWizardPageScanning::initializePage" );
+    OstTrace0(
+        TRACE_NORMAL,
+        WLANWIZARDPAGESCANNING_INITIALIZEPAGE,
+        "WlanWizardPageScanning::initializePage");
 
     // Next page id is reset with each initialization.    
     mNextPageId = WlanWizardPage::PageNone;
 
     if (mWidget == NULL) {
-
         mLoader = new HbDocumentLoader(mWizard->mainWindow());
 
         bool ok;
 
         mLoader->load(":/docml/occ_add_wlan_06.docml", &ok);
-        Q_ASSERT_X(ok, "WlanWizardPageScanning", "Invalid docml file");
+        Q_ASSERT(ok);
 
         // Initialize orientation
-        loadDocml(mWizard->mainWindow()->orientation());
+        loadDocmlSection(mWizard->mainWindow()->orientation());
 
         // Load widgets
         mWidget = qobject_cast<HbWidget*> (mLoader->findWidget(
             "occ_add_wlan_06"));
-        Q_ASSERT_X(mWidget != NULL, "WlanWizardPageScanning", "View not found");
+        Q_ASSERT(mWidget != NULL);
 
         mLabel = qobject_cast<HbLabel*> (mLoader->findWidget("dialog"));
-        Q_ASSERT_X(mLabel != NULL, "WlanWizardPageScanning",
-            "textLabel not found");
-
-        mBar = qobject_cast<HbProgressBar*> (mLoader->findWidget("progressBar"));
-        Q_ASSERT_X(mBar != NULL, "WlanWizardPageScanning",
-            "progressBar not found");
+        Q_ASSERT(mLabel != NULL);
 
         WlanQtUtils* utils = mWizard->wlanQtUtils();
 
         // Connect orientation signal from the main window to orientation
         // loader.
-        ok &= connect(mWizard->mainWindow(),
-            SIGNAL(orientationChanged(Qt::Orientation)), this,
-            SLOT(loadDocml(Qt::Orientation)));
+        ok = connect(
+            mWizard->mainWindow(),
+            SIGNAL(orientationChanged(Qt::Orientation)),
+            this,
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(ok);
 
         // Connect direct scan completion signal from wlanQtUtils to result
         // handler.
-        ok &= connect(utils, SIGNAL(wlanScanDirectReady()), this,
-            SLOT(wlanScanDirectReady()));
-
+        ok = connect(
+            utils,
+            SIGNAL(wlanScanDirectReady(int)),
+            this,
+            SLOT(wlanScanDirectReady(int)));
         Q_ASSERT(ok);
-
     }
 
-    mLabel->setPlainText(hbTrId("txt_occ_dialog_searching").arg(
-        mWizard->configuration(WlanWizardPrivate::ConfSsid).toString()));
+    mLabel->setPlainText(HbParameterLengthLimiter(
+        hbTrId("txt_occ_dialog_searching")).arg(mWizard->configuration(
+            WlanWizardPrivate::ConfSsid).toString()));
+
 
     return mWidget;
 }
 
 /*!
  * Sends the user to the next page.
+ * @param [out] removeFromStack is always true: this page is removed from the 
+ * stacked widget after "Next" button is pressed.
+ * @return the id value of the next page.
  */
 int WlanWizardPageScanning::nextId(bool &removeFromStack) const
 {
@@ -134,196 +149,59 @@
 }
 
 /*!
- * Always false. Moving to next page is not done manually.
- * @see WlanWizardPage
+ * This function reimplements WlanWizardPage::previousTriggered. When going
+ * back from scanning view, the ongoing scan operation is also stopped. Since
+ * there is no need to react to following the acknowledgement signal from
+ * wlanQtUtils, the corresponding handler slots are disconnected before the
+ * opration and immediately connected again.
+ * @return one step backwards value.
+ */
+int WlanWizardPageScanning::previousTriggered()
+{
+    disconnect(this, SLOT(wlanScanDirectReady(int)));
+    disconnect(this, SLOT(wlanScanResultPreCheck(int)));
+    
+    WlanQtUtils* utils = mWizard->wlanQtUtils();
+    
+    utils->stopWlanScan();
+
+    bool ok = connect(
+        utils,
+        SIGNAL(wlanScanApReady(int)),
+        this,
+        SLOT(wlanScanResultPreCheck(int)));
+    Q_ASSERT(ok);
+    
+    ok = connect(
+        utils,
+        SIGNAL(wlanScanDirectReady(int)),
+        this,
+        SLOT(wlanScanDirectReady(int)));
+    Q_ASSERT(ok);
+    
+    return OneStepBackwards;
+    
+}
+
+/*!
+ * This method is overrides the default implementation from WlanWizardPage.
+ * It indicates whether the Next-button should be enabled or not. It also resets
+ * the ConfProcessSettings-configuration to false - meaning that if no scan
+ * results are available, no iap is created.
+ * @return always false - the scanning proceeds to next window
+ * automatically or not at all.
  */
 bool WlanWizardPageScanning::showPage()
 {
+    mWizard->setConfiguration(WlanWizardHelper::ConfProcessSettings, false);
     return false;
 }
 
 /*!
- * Loads the document orientation-specific parameters.
- */
-void WlanWizardPageScanning::loadDocml(Qt::Orientation orientation)
-{
-    OstTrace1( TRACE_NORMAL, WLANWIZARDPAGESCANNING_LOADDOCML,
-        "WlanWizardPageScanning::loadDocml - orientation ;orientation=%x",
-        ( TUint )( orientation ) );
-
-    bool ok;
-    // Then load the orientation specific section
-    if (orientation == Qt::Horizontal) {
-        mLoader->load(":/docml/occ_add_wlan_06.docml", "landscape_section", &ok);
-        Q_ASSERT(ok);
-    } else {
-        Q_ASSERT(orientation == Qt::Vertical);
-        mLoader->load(":/docml/occ_add_wlan_06.docml", "portrait_section", &ok);
-        Q_ASSERT(ok);
-    }
-}
-
-void WlanWizardPageScanning::wlanScanResultPreCheck()
-{
-    if (!mWidget) {
-        OstTrace1( TRACE_BORDER, WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK,
-            "WlanWizardPageScanning::wlanScanResultPreCheck no widget;this=%x",
-            this );
-
-        mScanResultsAvailable = true;
-    }
-    else {
-        if (mWizard->isCurrentPage(mWidget)) {
-            OstTrace0( TRACE_BORDER,
-                DUP1_WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK,
-                "WlanWizardPageScanning::wlanScanResultPreCheck go to results");
-
-            wlanScanApReady();
-        }
-        else {
-            OstTrace0( TRACE_BORDER,
-                DUP2_WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK,
-                "WlanWizardPageScanning::wlanScanResultPreCheck"
-                " not current widget" );
-
-            mScanResultsAvailable = true;
-        }
-    }
-}
-
-/*!
- * Public networks did not reveal matches. Direct scan has been performed to
- * find out if the network is hidden but in range. If network is found, proceed
- * to next page according to scan results.
- * If nothing is found, proceed to manual network 
- * mode selection page.
- */
-void WlanWizardPageScanning::wlanScanDirectReady()
-{
-    OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_WLANSCANDIRECTREADY,
-        "WlanWizardPageScanning::wlanScanDirectReady" );
-
-    WlanQtUtils* utils = mWizard->wlanQtUtils();
-
-    Q_ASSERT(utils);
-
-    QList<QSharedPointer<WlanQtUtilsAp> > wlanApList;
-
-    utils->availableWlanAps(wlanApList);
-
-    qDebug("WlanWizardPageScanning::wlanScanDirectReady - results read");
-
-    QSharedPointer<WlanQtUtilsAp> item;
-
-    qDebug("%d APs found", wlanApList.size());
-    if(wlanApList.isEmpty()) {
-        qDebug("Match not found. Go to manual settings.");
-        mNextPageId = WlanWizardPageInternal::PageNetworkMode;
-    }
-    else {
-        int strongestSignal = 0;
-        int strongestIndex = 0;
-
-        for (int i = 0; i < wlanApList.size(); i++) {
-            // All direct scan results are matches. No need to compare ssids.
-            // In case there are multiple matches to direct scan, use the
-            // strongest signal on the result list.
-            item = wlanApList.at(i);
-            int str = item->value(WlanQtUtilsAp::ConfIdSignalStrength).toInt();
-            if (str > strongestSignal) {
-                qDebug("Strongest signal %d at %d", str, i);
-                strongestSignal = str;
-                strongestIndex = i;
-            }
-        }
-
-        item = wlanApList.at(strongestIndex);
-        qDebug("Select AP at %d", strongestIndex);
-        mNextPageId = mWizard->getNextPageId(
-            item->value(WlanQtUtilsAp::ConfIdSsid).toString(),
-            item->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt(),
-            item->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(),
-            item->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool(),
-            true, // hidden
-            item->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool());
-    }
-
-    mWizard->nextPage();
-
-}
-
-/*!
- * All wlan channels have been scanned for public networks. Now process the
- * results. If a network is found which matches the ssid set by the user,
- * proceed to next page according to the network attributes.
- * If no ssid match is found, proceed to a direct scan.
- */
-void WlanWizardPageScanning::wlanScanApReady()
-{
-    OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_WLANSCANAPREADY,
-        "WlanWizardPageScanning::wlanScanApReady" );
-
-    WlanQtUtils* utils = mWizard->wlanQtUtils();
-    Q_ASSERT(utils);
-    
-    QList<QSharedPointer<WlanQtUtilsAp> > wlanApList;
-    
-    // Fetch the list of scan results.
-    utils->availableWlanAps(wlanApList);
-
-    qDebug("WlanWizardPageScanning::wlanScanApReady - results read");
-
-    QString ssid =
-        mWizard->configuration(WlanWizardPrivate::ConfSsid).toString();
-    qDebug() << "SSID scanned by user " << ssid;
-
-    bool matchFound = false;
-    int strongestSignal = -1;
-    int strongestIndex = 0;
-    QSharedPointer<WlanQtUtilsAp> item;
-        
-    qDebug("%d APs found", wlanApList.size());
-
-    for (int i = 0; i < wlanApList.size(); i++) {
-        // In case there are multiple matches to direct scan, use the
-        // strongest signal on the result list.
-        item = wlanApList.at(i);
-        if (item->value(WlanQtUtilsAp::ConfIdSsid).toString() == ssid) {
-            qDebug("Match found");
-            matchFound = true;
-
-            int str = item->value(WlanQtUtilsAp::ConfIdSignalStrength).toInt();
-            if (str > strongestSignal) {
-                qDebug("Strongest signal %d at %d", str, i);
-                strongestSignal = str;
-                strongestIndex = i;
-            }
-        }
-    }
-
-    if (matchFound) {
-        qDebug("Select AP at %d", strongestIndex);
-        item = wlanApList.at(strongestIndex);
-        mNextPageId = mWizard->getNextPageId(
-            item->value(WlanQtUtilsAp::ConfIdSsid).toString(),
-            item->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt(),
-            item->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(),
-            item->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool(),
-            false, // public
-            item->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool());
-        // The ssid indicated by the user was found. Proceed to next page.
-        mWizard->nextPage();
-    }
-    else {
-        qDebug("Match not found. Perform direct scan.");
-        utils->scanWlanDirect(ssid);
-    }
-
-}
-
-/*!
- * Overloaded function from WlanWizardPage. Indicates that this window requires
- * post-initialization start operations.
+ * Reimplements the default function in WlanWizardPage. Indicates to the
+ * framework that startOperation() function must be executed.
+ * @return true
+ * @see WlanWizardPage
  */
 bool WlanWizardPageScanning::requiresStartOperation()
 {
@@ -332,7 +210,7 @@
 
 /*!
  * Wlan scan is performed as a "post-initialization" which is executed in a
- * separate scheduler loop.
+ * separate scheduler loop. If scan results are available, starts reading them.
  */
 void WlanWizardPageScanning::startOperation()
 {
@@ -346,3 +224,252 @@
     }
 }
 
+/*!
+ * Loads the document orientation information from occ_add_wlan_06.docml
+ * This is called each time phone orientation changes.
+ * @param [in] orientation indicates whether the phone is in portrait or
+ * landscape mode.
+ */
+void WlanWizardPageScanning::loadDocmlSection(Qt::Orientation orientation)
+{
+    OstTrace1( TRACE_NORMAL, WLANWIZARDPAGESCANNING_LOADDOCML,
+        "WlanWizardPageScanning::loadDocml - orientation ;orientation=%x",
+        ( TUint )( orientation ) );
+
+    WlanWizardPageInternal::loadDocmlSection(
+        mLoader,
+        orientation,
+        ":/docml/occ_add_wlan_06.docml", 
+        "portrait_section",
+        "landscape_section");
+}
+
+/*!
+ * Checks whether the view is active. If it is, execute wlanScanApReady. If
+ * not, set mScanResultsAvailable to true.
+ * @param [in] scanStatus indicates whether the scan was succesful, cancelled of
+ * failed. The argument is saved to a member variable.
+ */
+void WlanWizardPageScanning::wlanScanResultPreCheck(int scanStatus)
+{
+    mScanStatus = scanStatus;
+    
+    if (!mWidget) {
+        OstTrace1( TRACE_BORDER, WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK,
+            "WlanWizardPageScanning::wlanScanResultPreCheck no widget;this=%x",
+            this );
+
+        mScanResultsAvailable = true;
+    } else {
+        if (mWizard->isCurrentPage(mWidget)) {
+            OstTrace0( TRACE_BORDER,
+                DUP1_WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK,
+                "WlanWizardPageScanning::wlanScanResultPreCheck go to results");
+
+            wlanScanApReady();
+        } else {
+            OstTrace0( TRACE_BORDER,
+                DUP2_WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK,
+                "WlanWizardPageScanning::wlanScanResultPreCheck"
+                " not current widget" );
+
+            mScanResultsAvailable = true;
+        }
+    }
+}
+
+/*!
+ * Processes the direct scan results.
+ * @param [in] scanStatus indicates whether the scan was succesful, canceled or
+ * failed. In case the scan was not succesful, always proceed to manual wizard.
+ */
+void WlanWizardPageScanning::wlanScanDirectReady(int scanStatus)
+{
+    OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_WLANSCANDIRECTREADY,
+        "WlanWizardPageScanning::wlanScanDirectReady" );
+
+    WlanQtUtils* utils = mWizard->wlanQtUtils();
+
+    Q_ASSERT(utils);
+
+    QList<WlanScanResult> filteredResults;
+
+    if (scanStatus == WlanQtUtils::ScanStatusOk) {
+        QList<QSharedPointer<WlanQtUtilsAp> > directScanResults;
+        // Read the directed scan results from Qt Utils
+        utils->availableWlanAps(directScanResults);
+
+        // Identify open and hidden networks.
+        getFinalScanResults(directScanResults, mWlanApList, filteredResults);
+    }
+
+    // Process the scan results. If scan status is not ok, feed an empty
+    // result table to the selection function.
+    selectNextPageActions(filteredResults);
+}
+
+/*!
+ * All wlan channels have been scanned for public networks. After processing the
+ * results a direct scan is initiated. This function also checks whether the
+ * scan was succesful, canceled or failed. In case the scan was not succesful,
+ * always proceed to manual wizard.
+ */
+void WlanWizardPageScanning::wlanScanApReady()
+{
+    OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_WLANSCANAPREADY,
+        "WlanWizardPageScanning::wlanScanApReady" );
+
+    if (mScanStatus == WlanQtUtils::ScanStatusOk) {
+        WlanQtUtils* utils = mWizard->wlanQtUtils();
+        Q_ASSERT(utils);
+
+        QList<QSharedPointer<WlanQtUtilsAp> > openScanResults;
+
+        // Fetch the list of scan results.
+        utils->availableWlanAps(openScanResults);
+
+        // The name of the network that we are looking for.
+        QString ssid =
+            mWizard->configuration(WlanWizardPrivate::ConfSsid).toString();
+
+        // Store matching scan results.
+        getSsidMatchList(ssid, openScanResults);
+
+        // Next directed scan.
+        utils->scanWlanDirect(ssid);
+    }
+    else {
+        mWizard->clearConfiguration(WlanWizardHelper::ConfAvailableNetworkOptions);
+        mNextPageId = WlanWizardPageInternal::PageNetworkMode;
+        mWizard->nextPage();
+    }
+}
+
+/*!
+ * This function stores all the APs that match ssid parameter to mWlanApList
+ * member list.
+ * @param [in] ssid is the name of the network we are interested in.
+ * @param [in] matchList is the list of all APs that were revealed in the scan.
+ */
+void WlanWizardPageScanning::getSsidMatchList(
+    QString ssid,
+    const QList<QSharedPointer<WlanQtUtilsAp> > &matchList)
+{
+    mWlanApList.clear();
+    QSharedPointer<WlanQtUtilsAp> item;
+
+    for (int i = 0; i < matchList.size(); i++) {
+        item = matchList.at(i);
+        if (item->value(WlanQtUtilsAp::ConfIdSsid).toString() == ssid) {
+            mWlanApList.append(item);
+        }
+    }
+}
+
+/*
+ * Find out which of the direct scan results are open networks by comparing
+ * result to open scan results. Return finalResults.
+ * @param [in] directScanResults are the results of a directed scan.
+ * @param [in] openScanResults are the results of a scan inquiring any APs.
+ * @param [out] finalResults is a list of APs with visibility flag included.
+ */
+void WlanWizardPageScanning::getFinalScanResults(
+    const QList<QSharedPointer<WlanQtUtilsAp> > &directScanResults,
+    const QList<QSharedPointer<WlanQtUtilsAp> > &openScanResults,
+    QList<WlanScanResult> &finalResults)
+{
+    finalResults.clear();
+
+    // The key assumption of this algorithm is that both direct and public scan
+    // reveal the same set of AP:s with the exception of hidden AP:s.
+    // In other words: Direct scan result set is the whole set with each AP 
+    // marked as hidden by default. If an AP has been revealed also by public
+    // scan, it is changed to visible.
+    for (int i = 0; i < directScanResults.size(); i++) {
+        WlanScanResult resultItem;
+
+        resultItem.scanResult = directScanResults.at(i);
+        
+        // Initialize as hidden.
+        resultItem.networkHidden = true;
+         
+        for (int j = 0; j < openScanResults.size(); j++) {
+            if (WlanQtUtilsAp::compare(
+                openScanResults.at(j).data(), 
+                directScanResults.at(i).data()) == 0) {
+                // Mark open, if a public scan revealed the same AP
+                resultItem.networkHidden = false;
+            }
+        }
+
+        finalResults.append(resultItem);
+    }
+}
+
+/*!
+ * This function processes the scan results in case multiple results were
+ * acquired with matching SSIDs.
+ * @param [in] finalResults is the list of APs revealed by the last scans.
+ * @return the identifier of the next page.
+ */
+int WlanWizardPageScanning::processMultipleScanResults(
+    const QList<WlanScanResult> &finalResults)
+{
+    WlanWizardScanList networkOptions;
+    int nextPage;
+
+    // Build the list of results to be placed in the configuration.
+    networkOptions.build(finalResults);
+    
+    QVariant tmp;
+    tmp.setValue(networkOptions);
+
+    mWizard->setConfiguration(
+        WlanWizardHelper::ConfAvailableNetworkOptions, tmp);
+
+    // If there are more than one network mode choices, go to manual selection
+    // of network mode.
+    if (networkOptions.netModes() > SingleResult) {
+        nextPage = WlanWizardPageInternal::PageNetworkMode;
+    } else {
+        // if only a single network mode option is available, the mode query
+        // may be skipped and the next page is set to security mode query.
+        WlanNetworkSetting setting = networkOptions.getNetModes().at(0);
+        mWizard->setConfiguration(WlanWizardHelper::ConfNetworkMode, setting.mode);
+        mWizard->setConfiguration(WlanWizardHelper::ConfHiddenWlan, setting.hidden);
+        nextPage = WlanWizardPageInternal::PageNetworkSecurity;
+    }
+    
+    return nextPage;
+}
+
+/*!
+ * This function decides what to do with the scan results.
+ * @param [in] finalResults is the list of APs revealed by the last scans.
+ */
+void WlanWizardPageScanning::selectNextPageActions(
+    const QList<WlanScanResult> &finalResults)
+{
+    mWizard->clearConfiguration(WlanWizardHelper::ConfAvailableNetworkOptions);
+    
+    if (finalResults.isEmpty()) {
+        // In case of no results at all were found.
+        mNextPageId = WlanWizardPageInternal::PageNetworkMode;
+    } else if (finalResults.size() == SingleResult) {
+        // In case there is only a single result.
+        WlanScanResult item = finalResults.first();
+        mNextPageId = mWizard->getNextPageId(
+            item.scanResult->value(WlanQtUtilsAp::ConfIdSsid).toString(),
+            item.scanResult->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt(),
+            item.scanResult->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(),
+            item.scanResult->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool(),
+            item.networkHidden,
+            item.scanResult->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool());
+    } else {
+        // In case more than one result is available.
+        mWizard->setConfiguration(WlanWizardHelper::ConfProcessSettings, true);
+        mNextPageId = processMultipleScanResults(finalResults);
+    }
+
+    mWizard->nextPage();
+}
--- a/wlanutilities/wlanwizard/src/wlanwizardpagesecuritymode.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/src/wlanwizardpagesecuritymode.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -28,13 +28,15 @@
 #include "wlanwizard_p.h"
 #include "wlanwizard.h"
 #include "wlanwizardpagesecuritymode.h"
+#include "wlanwizardscanlist.h"
 #include "OstTraceDefinitions.h"
 #ifdef OST_TRACE_COMPILER_IN_USE
 #include "wlanwizardpagesecuritymodeTraces.h"
 #endif
 
 /*!
- * Constructor. Member initialization.
+ * Constructor method for the Sequrity mode query view object.
+ * @param [in] parent pointer to parent object.
  */
 WlanWizardPageSecurityMode::WlanWizardPageSecurityMode(
     WlanWizardPrivate* parent) :
@@ -57,7 +59,8 @@
 }
 
 /*!
- * Page initialization. If view is already loaded, does nothing.
+ * Page initialization. If view widget is already loaded, does nothing.
+ * @return pointer to widget "occ_add_wlan_02".
  */
 HbWidget* WlanWizardPageSecurityMode::initializePage()
 {
@@ -71,70 +74,49 @@
         bool ok;
 
         mLoader->load( ":/docml/occ_add_wlan_02_03.docml", &ok );
-        Q_ASSERT_X(ok, "WlanWizardPageSecurityMode", "Invalid docml file");
+        Q_ASSERT(ok);
               
         // Initialize orientation
-        loadDocml( mWizard->mainWindow()->orientation() );
+        loadDocmlSection( mWizard->mainWindow()->orientation() );
 
         // Load widgets
         mWidget = qobject_cast<HbWidget*> (mLoader->findWidget("occ_add_wlan_02"));
-        Q_ASSERT_X(mWidget != NULL, "WlanWizardPageSecurityMode", "View not found");
+        Q_ASSERT(mWidget != NULL);
 
         mList = qobject_cast<HbRadioButtonList*> (mLoader->findWidget("list"));
-        Q_ASSERT_X(mList != NULL, "WlanWizardPageSecurityMode", "List not found");
+        Q_ASSERT(mList != NULL);
 
         mLabel = qobject_cast<HbLabel*> (mLoader->findWidget("dialog_6"));
-        Q_ASSERT_X(mLabel != NULL, "WlanWizardPageSecurityMode", "Label not found");
+        Q_ASSERT(mLabel != NULL);
         
         mLabel->setPlainText(hbTrId("txt_occ_dialog_select_network_security_mode"));
 
-        // Create contents to the security mode radio button list.
-        populateSecModeList();
-
         // Connect orientation signal from the main window to orientation
         // loader.
         ok &= connect( mWizard->mainWindow(),
                  SIGNAL(orientationChanged(Qt::Orientation)),
-                 this, SLOT(loadDocml(Qt::Orientation)));
+                 this, SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(ok);
  
         // Connect signal from the radio button list indicating that an item
         // has been selected to validation handler.
         ok &= connect( mList, SIGNAL(itemSelected(int)),
-                 this, SLOT(itemSelected(int)));
-        
-        Q_ASSERT_X(ok, "WlanWizardPageSecurityMode", "slot connection failed");
-        
-        
+                 this, SLOT(itemSelected())); 
+        Q_ASSERT(ok);
+    }
+    
+    // Create contents to the security mode radio button list.
+    populateSecModeList();
 
-    }
     return mWidget;
 }
 
 /*!
- * Indicates the validity of the security mode page.
- * @see WlanWizardPage
- */
-bool WlanWizardPageSecurityMode::showPage()
-{
-    return mValid;
-}
-
-/*!
- * Sets the page as valid, if any mode is selected.
- * (Initially none is selected.) 
- */
-void WlanWizardPageSecurityMode::itemSelected(int /* index */)
-{
-    OstTrace0( TRACE_BORDER, WLANWIZARDPAGESECURITYMODE_ITEMSELECTED,
-        "WlanWizardPageSecurityMode::itemSelected" );
-    
-    mValid = true;
-    mWizard->enableNextButton(mValid);
-}
-
-/*!
- * Evaluates and returns the next page id.
- * @see initializePage()
+ * Validates the Sequrity more selection and sets the configuration in
+ * the wlanwizard.
+ * @param [out] removeFromStack returns false.
+ * @return depending on the sequrity mode, returns the appropriate view
+ * identifier.
  */
 int WlanWizardPageSecurityMode::nextId(bool &removeFromStack) const
 {
@@ -154,23 +136,46 @@
 }
 
 /*!
- * Loads the document with given orientation.
+ * This method is overrides the default implementation from WlanWizardPage.
+ * It indicates whether the Next-button should be enabled or not.
+ * @return true, if a mode has been selected.
+ */
+bool WlanWizardPageSecurityMode::showPage()
+{
+    return mValid;
+}
+
+/*!
+ * Is invoked when user selects a mode from the radio button list.
+ * (HbRadioButtonList's itemSelected-signal)
  */
-void WlanWizardPageSecurityMode::loadDocml(Qt::Orientation orientation)
+void WlanWizardPageSecurityMode::itemSelected()
+{
+    OstTrace0( TRACE_BORDER, WLANWIZARDPAGESECURITYMODE_ITEMSELECTED,
+        "WlanWizardPageSecurityMode::itemSelected" );
+    
+    mValid = true;
+    mWizard->enableNextButton(mValid);
+}
+
+/*!
+ * Loads the document orientation information from occ_add_wlan_02_03.docml
+ * This is called each time phone orientation changes.
+ * @param [in] orientation indicates whether the phone is in portrait or
+ * landscape mode.
+ */
+void WlanWizardPageSecurityMode::loadDocmlSection(Qt::Orientation orientation)
 {
     OstTrace1( TRACE_NORMAL, WLANWIZARDPAGESECURITYMODE_LOADDOCML,
         "WlanWizardPageSecurityMode::loadDocml - orientation;orientation=%x",
         ( TUint )( orientation ) );
     
-    bool ok;
-    if( orientation == Qt::Horizontal ) {
-        mLoader->load(":/docml/occ_add_wlan_02_03.docml", "landscape_section", &ok);
-        Q_ASSERT_X(ok, "WlanWizardPageSecurityMode", "Landscape section not found");
-    }
-    else {
-        mLoader->load(":/docml/occ_add_wlan_02_03.docml", "portrait_section", &ok);
-        Q_ASSERT_X(ok, "WlanWizardPageSecurityMode", "Portrait section not found");
-    }
+    WlanWizardPageInternal::loadDocmlSection(
+        mLoader,
+        orientation,
+        ":/docml/occ_add_wlan_02_03.docml", 
+        "portrait_section",
+        "landscape_section");
 }
 
 /*!
@@ -182,6 +187,12 @@
 
     mSecModes.clear();
     mPageIds.clear();
+    mUsePsk.clear();
+    
+    // A list is created. Since there is no practical way of knowing whether
+    // the new contents are different from the previous contents (if there
+    // even were any in the first place) the validity is always reset.
+    mValid = false;
 
     // Create the radio button list to correspond to correct security mode
     // identifiers and page identifiers.
@@ -197,7 +208,7 @@
         true);
 
     // In case of Ad-hoc network, exclude wpa, eap and 802.1X modes.
-    if(mWizard->configuration(WlanWizardPrivate::ConfNetworkMode).toInt()
+    if (mWizard->configuration(WlanWizardPrivate::ConfNetworkMode).toInt()
         != CMManagerShim::Adhoc) {
 
         addToList(items, hbTrId("txt_occ_list_wpa_with_password"),
@@ -205,7 +216,6 @@
             WlanWizardPageInternal::PageKeyQuery,
             true);
 
-        // TODO: Fix these codes
         addToList(items, hbTrId("txt_occ_list_wpa_with_eap"),
             CMManagerShim::WlanSecModeWpa,
             WlanWizardPage::PageEapStart,
@@ -221,16 +231,46 @@
 }
 
 /*!
- * Creates lists for security modes and page id:s so that they can be referred
- * with radio button widget index.
+ * A support function to map the radio button list to a generic network
+ * mode list. This enables the changing of button order without it
+ * affecting the entire class.
+ * @param [out] list is a reference to a local list that will be placed as an
+ * argument to the radio button list.
+ * @param [in] item is a reference to the text value that is appended to the
+ * list
+ * @param [in] mode is the security mode associated with the item
+ * @param [in] page is the id of the next wizard page when this item is selected.
+ * @param [in] psk indicates whether password needs to be queried. 
  */
 void WlanWizardPageSecurityMode::addToList(QStringList &list,
     const QString &item, int mode, int page, bool psk)
 {
-    list << item;
-    mSecModes.append(mode);
-    mPageIds.append(page);
-    mUsePsk.append(psk);
+    if (mWizard->configurationExists(WlanWizardHelper::ConfAvailableNetworkOptions)) {
+        WlanNetworkSetting netMode;
+        netMode.mode = mWizard->configuration(WlanWizardPrivate::ConfNetworkMode).toInt();
+        netMode.hidden = mWizard->configuration(WlanWizardPrivate::ConfHiddenWlan).toBool();
+
+        // wps always set to false at this point of the wizard.
+        netMode.wpsSupported = false;
+
+        WlanWizardScanList networkOptions = mWizard->configuration(
+            WlanWizardHelper::ConfAvailableNetworkOptions).value<WlanWizardScanList>();
+
+        for (int i = 0; i < networkOptions.secModes(netMode); i++) {
+            WlanSecuritySetting secMode = networkOptions.getSecMode(netMode, i);
+
+            if (secMode.mode == mode && secMode.usePsk == psk) {
+                list << item;
+                mSecModes.append(mode);
+                mPageIds.append(page);
+                mUsePsk.append(psk);
+            }
+        }
+    }
+    else {
+        list << item;
+        mSecModes.append(mode);
+        mPageIds.append(page);
+        mUsePsk.append(psk);
+    }
 }
-
-
--- a/wlanutilities/wlanwizard/src/wlanwizardpagessid.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/src/wlanwizardpagessid.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -1,20 +1,19 @@
 /*
- * 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: 
- *   WLAN Wizard Page: SSID Selection.
- *
- */
+* 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: 
+* WLAN Wizard Page: SSID Selection.
+*/
 
 // System includes
 #include <HbDocumentLoader>
@@ -35,14 +34,14 @@
 #endif
 
 /*!
- * Constructor. Member initialization.
+ * Constructor method for the SSID query view object.
+ * @param [in] parent pointer to parent object.
  */
 WlanWizardPageSsid::WlanWizardPageSsid(WlanWizardPrivate* parent) :
     WlanWizardPageInternal(parent),
     mWidget(NULL),
     mLabel(NULL),
     mSsid(NULL),
-    mLabelError(NULL),
     mLoader(NULL)
 {
 
@@ -59,178 +58,131 @@
 
 /*!
  * Page initialization. If view is already loaded, does nothing.
+ * @return pointer to widget "occ_add_wlan_01".
  */
 HbWidget* WlanWizardPageSsid::initializePage()
 {
     OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESSID_INITIALIZEPAGE,
         "WlanWizardPageSsid::initializePage" );
 
-    if (mWidget == NULL) {
-        bool ok;
+    // It is not possible for this method to be called more than once during
+    // wizard lifetime.
+    Q_ASSERT(mWidget == NULL);
 
-        mLoader = new HbDocumentLoader(mWizard->mainWindow());
+    bool ok;
 
-        mLoader->load(":/docml/occ_add_wlan_01_04.docml", &ok);
-        Q_ASSERT_X(ok, "WlanWizardPageSsid", "Invalid docml file");
+    mLoader = new HbDocumentLoader(mWizard->mainWindow());
 
-        // Load orientation
-        loadDocml(mWizard->mainWindow()->orientation());
+    mLoader->load(":/docml/occ_add_wlan_01_04.docml", &ok);
+    Q_ASSERT(ok);
+
+    // Load orientation
+    loadDocmlSection(mWizard->mainWindow()->orientation());
 
-        // Load widgets
-        mWidget = qobject_cast<HbWidget*> (mLoader->findWidget(
-            "occ_add_wlan_01"));
-        Q_ASSERT_X(mWidget != NULL, "WlanWizardPageSsid", "View not found");
-
-        mLabel = qobject_cast<HbLabel*> (mLoader->findWidget("dialog"));
-        Q_ASSERT_X(mLabel != NULL, "WlanWizardPageSsid", "dialog not found");
+    // Load widgets
+    mWidget = qobject_cast<HbWidget*> (mLoader->findWidget(
+        "occ_add_wlan_01"));
+    Q_ASSERT(mWidget != NULL);
 
-        mSsid = qobject_cast<HbLineEdit*> (mLoader->findWidget("lineEditKey"));
-        Q_ASSERT_X(mSsid != NULL, "WlanWizardPageSsid", "lineEditKey not found");
+    mLabel = qobject_cast<HbLabel*> (mLoader->findWidget("dialog"));
+    Q_ASSERT(mLabel != NULL);
 
-        mLabelError = qobject_cast<HbLabel*> (mLoader->findWidget(
-            "labelErrorNote"));
-        Q_ASSERT_X(mLabelError != NULL, "WlanWizardPageSsid",
-            "labelErrorNote not found");
+    mSsid = qobject_cast<HbLineEdit*> (mLoader->findWidget("lineEditKey"));
+    Q_ASSERT(mSsid != NULL);
+
+    mLabel->setPlainText(hbTrId(
+        "txt_occ_dialog_insert_the_name_of_the_new_wlan_net"));
 
-        mLabel->setPlainText(hbTrId(
-            "txt_occ_dialog_insert_the_name_of_the_new_wlan_net"));
+    // Connect orientation signal from the main window to orientation
+    // loader.
+    ok = connect(mWizard->mainWindow(),
+        SIGNAL(orientationChanged(Qt::Orientation)), this,
+        SLOT(loadDocmlSection(Qt::Orientation)));
+    Q_ASSERT(ok);
 
-        // Connect orientation signal from the main window to orientation
-        // loader.
-        ok &= connect(mWizard->mainWindow(),
-            SIGNAL(orientationChanged(Qt::Orientation)), this,
-            SLOT(loadDocml(Qt::Orientation)));
-
-        // Connect text change-signal from input dialog to handler function
-        ok &= connect(mSsid, SIGNAL(textChanged(const QString &)), this,
-            SLOT(textChanged(const QString &)));
-
-        Q_ASSERT(ok);
+    // Connect text change-signal from input dialog to handler function
+    ok = connect(mSsid, SIGNAL(textChanged(const QString &)), this,
+        SLOT(textChanged(const QString &)));
+    Q_ASSERT(ok);
 
-        HbEditorInterface editInterface(mSsid);
-        editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
-
+    HbEditorInterface editInterface(mSsid);
+    
+    // TODO: remove (HbEditorConstraints) type cast when 
+    // Q_DECLARE_OPERATORS_FOR_FLAGS(HbEditorConstraints) is defined (SDK xxx)
+    editInterface.setInputConstraints(
+        (HbEditorConstraints)(HbEditorConstraintAutoCompletingField |
+            HbEditorConstraintLatinAlphabetOnly));
+    
+    editInterface.setSmileyTheme(HbSmileyTheme());
+    editInterface.setEditorClass(HbInputEditorClassNetworkName);
+    mSsid->setInputMethodHints(
+        Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase);
+    mSsid->setMaxLength(WlanWizardUtils::SsidMaxLength);
 
-        editInterface.setSmileyTheme(HbSmileyTheme());
-        //editInterface.setEditorClass(HbInputEditorClassNetworkName);
-        mSsid->setInputMethodHints(
-            Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase);
-        mSsid->setMaxLength(WlanWizardUtils::SsidMaxLength);
-        mSsid->installEventFilter(this);
-    }
-	
-	// Open virtual keyboard by setting focus to line edit
-	mSsid->setFocus();
-
-    return mWidget;
+	return mWidget;
 }
 
 /*!
- * Selection of the next page.
+ * This method is overrides the default implementation from WlanWizardPage.
+ * It indicates whether the Next-button should be enabled or not.
+ * @return true, if mSsid edit field is not empty.
+ */
+bool WlanWizardPageSsid::showPage()
+{
+    // Initiate the scanning of public APs here.
+    mWizard->wlanQtUtils()->scanWlanAps();
+    
+    // Open virtual keyboard by setting focus to line edit
+    mSsid->setFocus();
+
+    return !(mSsid->text().isEmpty());
+}
+
+/*!
+ * Stores the SSID selection in the configuration.
+ * @param [out] removeFromStack returns false.
+ * @return WlanWizardPageScanning page id.
  */
 int WlanWizardPageSsid::nextId(bool &removeFromStack) const
 {
-    int pageId = WlanWizardPage::PageNone;
     removeFromStack = false;
 
-    WlanWizardUtils::SsidStatus status = WlanWizardUtils::validateSsid(
-        mSsid->text());
-
-    if (status != WlanWizardUtils::SsidStatusOk) {
-        mLabelError->setPlainText(SsidStatusToErrorString(status));
-    }
-    else {
-        // SSID is stored into configuration
-        mWizard->setConfiguration(WlanWizardPrivate::ConfSsid, mSsid->text());
-        pageId = WlanWizardPageInternal::PageScanning;
-    }
-
-    return pageId;
+    // SSID is stored into configuration
+    mWizard->setConfiguration(WlanWizardPrivate::ConfSsid, mSsid->text());
+    
+    return WlanWizardPageInternal::PageScanning;
 }
 
 /*!
- * Load the document with given screen orientation.
+ * Loads the document orientation information from occ_add_wlan_01_04.docml
+ * This is called each time phone orientation changes.
+ * @param [in] orientation indicates whether the phone is in portrait or
+ * landscape mode.
  */
-void WlanWizardPageSsid::loadDocml(Qt::Orientation orientation)
+void WlanWizardPageSsid::loadDocmlSection(Qt::Orientation orientation)
 {
     OstTrace1( TRACE_FLOW, WLANWIZARDPAGESSID_LOADDOCML,
         "WlanWizardPageSsid::loadDocml - orientation ;orientation=%x",
         ( TUint )( orientation ) );
 
-    bool ok;
-    // Then load the orientation specific section
-    if (orientation == Qt::Horizontal) {
-        qDebug("Loading landscape section for wlan_01_04");
-        mLoader->load(":/docml/occ_add_wlan_01_04.docml", "landscape_section",
-            &ok);
-        Q_ASSERT(ok);
-    }
-    else {
-        Q_ASSERT(orientation == Qt::Vertical);
-        qDebug("Loading portrait section for wlan_01_04");
-        mLoader->load(":/docml/occ_add_wlan_01_04.docml", "portrait_section",
-            &ok);
-        Q_ASSERT(ok);
-    }
-}
-
-/*!
- * Actions, when user makes changes to the text editor widget.
- */
-void WlanWizardPageSsid::textChanged(const QString & /* text */)
-{
-    OstTrace0( TRACE_FLOW, WLANWIZARDPAGESSID_TEXTCHANGED,
-        "WlanWizardPageSsid::textChanged in text edit widget" );
-
-    mWizard->enableNextButton(showPage());
+    WlanWizardPageInternal::loadDocmlSection(
+        mLoader,
+        orientation,
+        ":/docml/occ_add_wlan_01_04.docml", 
+        "portrait_section",
+        "landscape_section");
 }
 
 /*!
- * Returns true, if the text editor widget contains any characters.
+ * Executed when changes have been made to the mSsid field (and the field is
+ * not empty).
+ * @param [in] text is not used at this point.
  */
-bool WlanWizardPageSsid::showPage()
+void WlanWizardPageSsid::textChanged(const QString &text)
 {
-    // Initiate the scanning of public APs here.
-    mWizard->wlanQtUtils()->scanWlanAps();
-
-   return !(mSsid->text().isEmpty());
-}
-
-/*!
- * Filter to catch focus event to the text editor widget.
- */
-bool WlanWizardPageSsid::eventFilter(QObject *obj, QEvent *event)
-{
-    if (obj == mSsid && event->type() == QEvent::FocusIn) {
-        OstTrace0( TRACE_BORDER, WLANWIZARDPAGESSID_EVENTFILTER,
-            "WlanWizardPageSsid::eventFilter text edit widget received focus" );
-
-        mLabelError->setPlainText("");
-    }
-    return false;
-}
+    Q_UNUSED(text);
+    OstTrace0( TRACE_FLOW, WLANWIZARDPAGESSID_TEXTCHANGED,
+        "WlanWizardPageSsid::textChanged in text edit widget" );
 
-/*!
- * Conversion function from SsidStatus to plain text.
- */
-QString WlanWizardPageSsid::SsidStatusToErrorString(
-    WlanWizardUtils::SsidStatus status) const
-{
-    QString errorString;
-    switch (status) {
-    case WlanWizardUtils::SsidStatusIllegalCharacters:
-        errorString = hbTrId(
-            "txt_occ_dialog_illegal_characters_in_key_please_c");
-        break;
-    case WlanWizardUtils::SsidStatusInvalidLength:
-        errorString
-            = hbTrId("txt_occ_dialog_key_is_of_incorrect_length_please");
-        break;
-    case WlanWizardUtils::SsidStatusOk:
-    default:
-        Q_ASSERT(WlanWizardUtils::SsidStatusOk == status);
-        break;
-    }
-    return errorString;
+    mWizard->enableNextButton(!(mSsid->text().isEmpty()));
 }
-
--- a/wlanutilities/wlanwizard/src/wlanwizardpagesummary.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/src/wlanwizardpagesummary.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -25,9 +25,7 @@
 #include <HbStyleLoader>
 
 // User includes
-#ifdef ICT_RESULT_ENUM
-#include "wlanqtutilscommon.h"
-#endif
+#include "wlanqtutils.h"
 #include "wlanwizard_p.h"
 #include "wlanwizardplugin.h"
 #include "wlanwizardsummaryviewitem.h"
@@ -99,22 +97,6 @@
 }
 
 /*!
-   See WlanWizardPage::nextId()
-   
-   @note this method is never called, because 'Next' toolbar button is not
-   visible in summary page.
-   
-   @param [out] removeFromStack return value is always false
-   
-   @return WlanWizardPageInternal::PageNone
- */
-int WlanWizardPageSummary::nextId(bool &removeFromStack) const
-{
-    removeFromStack = false;
-    return WlanWizardPage::PageNone;
-}
-
-/*!
    Loads docml.
  */
 void WlanWizardPageSummary::loadDocml()
@@ -157,7 +139,6 @@
         ret = hbTrId("txt_occ_dblist_network_mode_val_adhoc");
         break;
 
-     case CMManagerShim::Infra:
      default:
          Q_ASSERT(mode == CMManagerShim::Infra); 
          if (mWizard->configuration(WlanWizardPrivate::ConfHiddenWlan).toBool()) {
@@ -205,7 +186,6 @@
         }
         break;
         
-    case CMManagerShim::WlanSecModeOpen:
     default:
         Q_ASSERT(mode == CMManagerShim::WlanSecModeOpen);
         ret = hbTrId("txt_occ_dblist_security_mode_val_open");
@@ -229,31 +209,23 @@
 
     // TODO: Hotspot: no need to show destination..
     QString value;
-#ifdef ICT_RESULT_ENUM
+
     switch (mWizard->configuration(WlanWizardPrivate::ConfIctStatus).toInt()) {
-    case IctsPassed:
+    case WlanQtUtils::IctPassed:
         value = hbTrId("txt_occ_dblist_destination_val_internet");
         appendToList(row, hbTrId("txt_occ_dblist_destination"), value);
         break;
-    case IctsHotspotPassed:
-        // Add nothing to list. 
-        break;
-    case IctsCanceled:
-        // TODO: Next page: gereric error page. movement should be done from processsettings page not here.
-        break;
-    case IctsFailed:
-    default:
+        
+    case WlanQtUtils::IctFailed:
         value = hbTrId("txt_occ_dblist_destination_val_uncategorized");
         appendToList(row, hbTrId("txt_occ_dblist_destination"), value);
+        break;
+        
+    default:
+        Q_ASSERT(WlanQtUtils::IctHotspotPassed == mWizard->configuration(WlanWizardPrivate::ConfIctStatus).toInt());
+        // Add nothing to list.
+        break;
     }
-#else
-    if (mWizard->configuration(WlanWizardPrivate::ConfIctStatus).toBool()) {
-        value = hbTrId("txt_occ_dblist_destination_val_internet");
-    } else {
-        value = hbTrId("txt_occ_dblist_destination_val_uncategorized");
-    }
-	appendToList(row, hbTrId("txt_occ_dblist_destination"), value);
-#endif
 }
 
 /*!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/src/wlanwizardscanlist.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,160 @@
+/*
+ * 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: 
+ *   Wlan Wizard Scan List: Hierarchical list of scan results that can be
+ *   utilized to limit available selection options in manual wlan wizard.
+ *
+ */
+
+// System includes
+#include <HbGlobal>
+#include <QString>
+#include <cmmanagerdefines_shim.h>
+#include <wlanqtutilsap.h>
+
+// User includes
+#include "wlanwizardscanlist.h"
+#include "wlanwizardpageinternal.h"
+
+/*!
+ * Constructor for WlanWizardScanList object.
+ */
+WlanWizardScanList::WlanWizardScanList()
+{
+
+}
+
+/*!
+ * Copy Constructor for WlanWizardScanList object.
+ * @param [in] scanList is the object to be copied.
+ */
+WlanWizardScanList::WlanWizardScanList(const WlanWizardScanList &scanList):
+    mOpenOptions(scanList.mOpenOptions)
+{
+
+}
+
+/*!
+ * Destructor for WlanWizardScanList object.
+ */
+WlanWizardScanList::~WlanWizardScanList()
+{
+
+}
+
+/*!
+ * This function builds a hash list of scan results. Key value in a hash item
+ * is the network mode and the associated value is a list of security modes.
+ * In other words, it is a list of network modes where each network mode points
+ * to one or more security modes.
+ * @param [in] results contains a list of scan results.
+ */
+void WlanWizardScanList::build(const QList<WlanScanResult> &results)
+{
+    for (int i = 0; i < results.size(); i++) {
+        WlanNetworkSetting netMode;
+        WlanSecuritySetting secMode;
+        WlanScanResult item = results.at(i);
+        
+        netMode.wpsSupported = item.scanResult->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool();
+        netMode.mode = item.scanResult->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt();
+        netMode.hidden = (netMode.mode == CMManagerShim::Adhoc) ? false : item.networkHidden;
+        
+        secMode.mode = item.scanResult->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt();
+        secMode.usePsk = (secMode.mode == CMManagerShim::WlanSecModeWep) ? true
+            : item.scanResult->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool();
+
+        switch (secMode.mode) {
+        case CMManagerShim::WlanSecMode802_1x:
+            secMode.nextPageId = WlanWizardPage::PageEapStart;
+            break;
+            
+        case CMManagerShim::WlanSecModeWep:
+            secMode.nextPageId = WlanWizardPageInternal::PageKeyQuery;
+            break;
+            
+        case CMManagerShim::WlanSecModeWpa:
+        case CMManagerShim::WlanSecModeWpa2:
+            if (secMode.usePsk) {
+                secMode.nextPageId = WlanWizardPageInternal::PageKeyQuery;
+            }
+            else {
+                secMode.nextPageId = WlanWizardPage::PageEapStart;
+            }
+            break;
+
+        default:
+            Q_ASSERT(CMManagerShim::WlanSecModeOpen == secMode.mode ||
+                CMManagerShim::WlanSecModeWapi == secMode.mode);
+            secMode.nextPageId = WlanWizardPage::PageProcessSettings;
+            break;
+            
+        }
+        
+        // prevent duplicate settings.
+        if (!mOpenOptions.contains(netMode)) {
+            QList<WlanSecuritySetting> secList;
+            secList.append(secMode);
+            mOpenOptions.insert(netMode, secList);
+        }
+        else if (!(mOpenOptions.find(netMode)->contains(secMode))) {
+            mOpenOptions.find(netMode)->append(secMode);  
+        }
+        // else an identical key-value pair is already in the list -> not added.
+    }
+}
+
+/*!
+ * This function returns a security mode setting at the requested location.
+ * This function does not do any validity checks for the lists, so the user
+ * needs to use netModes and secModes functions to prevent over-indexing.
+ * @param [in] netMode key value for the hash list.
+ * @param [in] index list index pointing to the security mode item.
+ * @return security setting item reference.
+ */
+const WlanSecuritySetting &WlanWizardScanList::getSecMode(
+    WlanNetworkSetting netMode,
+    int index) const
+{
+    return mOpenOptions.value(netMode).at(index);
+}
+
+/*!
+ * The number of key values available in the hash list.
+ * @return the number of keys.
+ */
+int WlanWizardScanList::netModes() const
+{
+    return mOpenOptions.size();
+}
+
+/*!
+ * The size of the security mode list associated to a network mode.
+ * @param [in] netMode key value for the hash list.
+ * @return the size of the list associated with the key.
+ */
+int WlanWizardScanList::secModes(WlanNetworkSetting netMode) const
+{
+    return mOpenOptions.find(netMode)->size();
+}
+
+/*!
+ * This function returns the list of keys in the hash.
+ * @return a list of keys.
+ */
+QList<WlanNetworkSetting> WlanWizardScanList::getNetModes() const
+{
+    return mOpenOptions.keys();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/make_ctc.bat	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,17 @@
+:: 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:
+:: Batch file to instrument and run test cases with CTC.
+
+@echo off
+call ctcwrap -C EXCLUDE=* -C NO_EXCLUDE+..\src\*.cpp -C NO_EXCLUDE+..\..\eapwizard\src\*.cpp -C NO_EXCLUDE+..\..\wpswizard\src\*.cpp -i fd -v -2comp sbs -c winscw_udeb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/make_ctc_post.bat	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,17 @@
+:: 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:
+:: Batch file to create coverage reports from CTC results.
+
+call ctcpost -p profile.txt
+call ctc2html -i profile.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/make_ctc_with_clean.bat	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,24 @@
+:: 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:
+:: Batch file to instrument and run test cases with CTC.
+
+@echo off
+del MON.*
+del profile.txt
+rmdir /S /Q CTCHTML
+call sbs clean
+call sbs reallyclean
+call make distclean
+call qmake "CONFIG-=debug"
+call ctcwrap -C EXCLUDE=* -C NO_EXCLUDE+..\src\*.cpp -C NO_EXCLUDE+..\..\eapwizard\src\*.cpp -C NO_EXCLUDE+..\..\wpswizard\src\*.cpp -i fd -v -2comp sbs -c winscw_udeb
--- a/wlanutilities/wlanwizard/t_wlanwizard/run_wst.bat	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-::=============================================================================
-:: 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:
-::
-::=============================================================================
-
-:: Script(s) uses following environment settings:
-:: - CD
-:: - DATE
-:: - TIME
-:: - TEMP
-
-
-::-----------------------------------------------------------------------------
-:: Do the preparations:
-:: - Don't show the commands
-:: - Use local parameters -- don't pollute the global one
-:: - Dim the lights for time of script execution
-:: - Store the current working directory
-::-----------------------------------------------------------------------------
-
-@echo off
-:: echo *** RUN_WST: START:
-setlocal
-color 08
-pushd .
-if not exist run_wst.bat goto INVALID_DIR
-
-
-::-----------------------------------------------------------------------------
-:: Set the local variables
-::-----------------------------------------------------------------------------
-
-::echo *** RUN_WST: SET VARIABLES:
-set wst_root_dir=%cd%
-set wst_log_dir=%wst_root_dir%\wst_log
-set wst_report_dir=%wst_root_dir%\wst_report
-set log_file=%wst_log_dir%\wst_log.txt
-set build_script=%wst_root_dir%\wst_script\wst_make.bat
-
-::-----------------------------------------------------------------------------
-:: Check that script exists
-::-----------------------------------------------------------------------------
-
-::echo *** RUN_WST: SOME CHECKS:
-if not exist %build_script% goto INVALID_DIR
-:: Create output directory if it does not exist
-if not exist %wst_log_dir% mkdir %wst_log_dir%
-if not exist %wst_report_dir% mkdir %wst_report_dir%
-:: Create log file
-echo *** WST_LOG: BEGIN *** > %log_file%
-
-
-::-----------------------------------------------------------------------------
-:: Check parameters
-::-----------------------------------------------------------------------------
-
-set command=ERROR
-if [%1]==[] set command=CLEAN_OLD_FILES COMPILE_TEST_CASES RUN_TEST_CASES GENERATE_REPORTS SHOW_RESULTS
-if [%1]==[CLEAN_OLD] set command=CLEAN_OLD_FILES
-if [%1]==[CASES] set command=COMPILE_TEST_CASES
-if [%1]==[RUN] set command=RUN_TEST_CASES
-if [%1]==[REPORTS] set command=GENERATE_REPORTS
-if [%1]==[RESULTS] set command=SHOW_RESULTS
-if [%1]==[BROWSE] set command=START_BROWSER
-if [%1]==[/?] goto HELP
-if [%1]==[HELP] goto HELP
-if [%1]==[/h] goto HELP
-if [%1]==[-h] goto HELP
-
-::-----------------------------------------------------------------------------
-:PARSE_COMMANDS
-::-----------------------------------------------------------------------------
-
-:: echo *** RUN_WST: COMMAND: %command%
-:: echo *** RUN_WST: CALL SCRIPT:
-for %%i IN ( %command% ) DO (
-    call %build_script% %wst_root_dir% wst_log.txt %%i
-    for /f "tokens=3 delims= " %%x in ('find /C " Error " %log_file%') do (
-        if not [%%x]==[0] goto ERROR
-    )
-)
-
-goto THE_END
-
-
-::-----------------------------------------------------------------------------
-:INVALID_DIR
-::-----------------------------------------------------------------------------
-
-echo *** RUN_WST: INVALID DIR:
-echo *** Test script sub-script not found!
-echo *** Please be sure to run the script in same directory,
-echo *** i.e. .\run_wst.bat , and NOT .\wst\run_wst.bat
-
-goto THE_END
-
-
-::-----------------------------------------------------------------------------
-:ERROR
-::-----------------------------------------------------------------------------
-
-echo *** RUN_WST: ERROR:
-color 48
-echo Error in compilation:
-findstr /C:" Error " < %log_file%
-echo.
-Echo Quitting WST.
-
-goto THE_END
-
-
-::-----------------------------------------------------------------------------
-:HELP
-::-----------------------------------------------------------------------------
-
-echo *** RUN_WST: HELP:
-echo Run Wlan Qt Utilities Workstation Testing
-echo.
-echo RUN_WST [param]
-echo.
-echo   param
-echo     [none]  - Do all, from CLEAN_OLD to RESULTS
-echo.
-echo     CLEAN_OLD - Clean metrics and other generated files
-echo     CASES   - Build only Tester components
-echo     RUN     - Run Tester
-echo     REPORTS - Generate reports
-echo     RESULTS - Show results
-echo     BROWSE  - Start browser
-echo.
-
-
-::-----------------------------------------------------------------------------
-:THE_END
-::-----------------------------------------------------------------------------
-
-echo *** RUN_WST: Completed:
-color
-popd
--- a/wlanutilities/wlanwizard/t_wlanwizard/stubs/context_wlanqtutils.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* 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 "context_wlanqtutils.h"
-#include "wlanqtutils.h"
-#include "wlanqtutilsap.h"
-
-WlanQtUtilsContext::WlanQtUtilsContext(WlanQtUtils *utils )
-: mUtils(utils)
-{
-    
-    
-}
-
-WlanQtUtilsContext::~WlanQtUtilsContext()
-{
-    
-}
-  
-void WlanQtUtilsContext::setScanWlanApsResult(
-    QList<QSharedPointer<WlanQtUtilsAp> > result )
-{
-    mUtils->mScanWlanAps = result;
-}
-
-void WlanQtUtilsContext::setScanWlanDirectResult( QString ssid,
-    QList<QSharedPointer<WlanQtUtilsAp> > result )
-{
-    mUtils->mScanWlanDirectSsid = ssid;
-    mUtils->mScanWlanDirect = result;
-}
-
-void WlanQtUtilsContext::setCreateWlanIapResult(int iapId)
-{
-    mUtils->mCreateWlanIapReturn = iapId;
-}
- 
-void WlanQtUtilsContext::setUpdateWlanIapResult(bool returnValue)
-{
-    mUtils->mUpdateWlanIapReturn = returnValue;
-}
-        
-void WlanQtUtilsContext::setConnectionSuccessed(bool value)
-{
-    mUtils->mConnectionSuccess = value;
-}
-    
-void WlanQtUtilsContext::setSignalWlanNetworkOpened(int iapId)
-{
-    mUtils->mWlanNetworkOpenedIapId = iapId;
-}
- 
-void WlanQtUtilsContext::setSignalWlanNetworkClosed(int iapId, int reason)
-{
-    mUtils->mWlanNetworkClosedIapId = iapId;
-    mUtils->mWlanNetworkClosedReason = (bool)reason;
-}
-#ifdef ICT_RESULT_ENUM
-void WlanQtUtilsContext::setSignalIctResult(int iapId, WlanLoginIctsResultType result)
-#else
-void WlanQtUtilsContext::setSignalIctResult(int iapId, bool result)
-#endif
-{
-    mUtils->mIctResultIapId = iapId;
-    mUtils->mIctResultResults = result;
-}
-    
-QStringList WlanQtUtilsContext::calledMethods()
-{
-    QStringList methods = mUtils->mCalledMethods;
-    mUtils->mCalledMethods.clear();
-    return methods;
-}
-    
-bool WlanQtUtilsContext::verifyWlanIapSettings(WlanQtUtilsAp &ref)
-{
-    bool ret = true;
-    if (!mUtils->mWlanAp){
-        qWarning("WlanQtUtilsContext::verifyWlanIapSettings: iap not created");
-        ret = false;
-    }
-    
-    if (!(*(mUtils->mWlanAp) == ref)){
-        qWarning("WlanQtUtilsContext::verifyWlanIapSettings: settings does not match");
-        ret = false;
-    }
-    return ret;
-}
--- a/wlanutilities/wlanwizard/t_wlanwizard/stubs/context_wlanqtutils.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* 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:
-*/
-
-#ifndef CONTROL_WLANQTUTILS_H
-#define CONTROL_WLANQTUTILS_H
-
-#include <QObject>
-#include <QSharedPointer>
-
-#include "wlanqtutilscommon.h"
-
-class WlanQtUtils;
-class WlanQtUtilsWlanIap;
-class WlanQtUtilsAp;
-
-class Q_DECL_EXPORT WlanQtUtilsContext: public QObject
-{
-    Q_OBJECT
-
-public:
-    WlanQtUtilsContext(WlanQtUtils *utils );
-    ~WlanQtUtilsContext();
-  
-public:
-    void setScanWlanApsResult( QList<QSharedPointer<WlanQtUtilsAp> > result );
-    
-    void setScanWlanDirectResult( QString ssid, 
-        QList<QSharedPointer<WlanQtUtilsAp> > result );
-    
-    void setCreateWlanIapResult(int iapId);
-    
-    void setUpdateWlanIapResult(bool returnValue);
-    
-    void setConnectionSuccessed(bool value);
-    
-    void setSignalWlanNetworkOpened(int iapId);
-    
-    void setSignalWlanNetworkClosed(int iapId, int reason);
-    
-#ifdef ICT_RESULT_ENUM
-    void setSignalIctResult(int iapId, WlanLoginIctsResultType result);
-#else
-    void setSignalIctResult(int iapId, bool result);
-#endif
-    
-    QStringList calledMethods();
-    
-    bool verifyWlanIapSettings(WlanQtUtilsAp &ref);
-    
-private:
-    WlanQtUtils* mUtils;
-};
-
-#endif /* CONTROL_WLANQTUTILS_H */
-
-// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtcertificateinfo.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,71 @@
+/*
+ * 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: 
+ *   Stub file for eapwizard!!
+ *
+ */
+
+#ifndef EAPQTCERTIFICATEINFO_H
+#define EAPQTCERTIFICATEINFO_H
+
+#include <QMetaType>
+#include <QVariant>
+#include <eapqtconfigdefs.h>
+
+class EapQtCertificateInfoPrivate;
+
+class EapQtCertificateInfo
+{
+public:
+
+    enum ItemId
+    {
+        /*! QString */
+        SubjectName,
+        /*! QString */
+        IssuerName,
+        /*! QString */
+        SerialNumber,
+        /*! QByteArray */
+        SubjectKeyId,
+        /*! QString */
+        ThumbPrint,
+        /*! QString */
+        CertificateLabel,
+        /*! marker for the last item */
+        ItemIdLast
+    };
+
+public:
+
+    EapQtCertificateInfo();
+    ~EapQtCertificateInfo();
+
+    EapQtCertificateInfo(const EapQtCertificateInfo &certInfo);
+    EapQtCertificateInfo &operator=(const EapQtCertificateInfo &certInfo);
+
+    QVariant value(ItemId id) const;
+    void setValue(ItemId id, QVariant newValue);
+
+public: // FOR TESTING PURPOSE
+    bool operator==(const EapQtCertificateInfo & rhs ) const;
+    
+private:
+    QScopedPointer<EapQtCertificateInfoPrivate> d_ptr;
+};
+
+// Make the class known to QMetaType to support using QVariant
+Q_DECLARE_METATYPE(EapQtCertificateInfo)
+
+#endif /* EAPQTCERTIFICATEINFO_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtcertificateinfo_stub.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,126 @@
+/*
+ * 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: 
+ *   Certificate information data structure for EAP QT configuration interface
+ *
+ */
+
+/*
+ * %version: 2 %
+ */
+
+#include "eapqtcertificateinfo.h"
+#include <QDebug>
+class EapQtCertificateInfoPrivate
+{
+    friend class EapQtCertificateInfo; 
+public:
+
+    EapQtCertificateInfoPrivate() {};
+    ~EapQtCertificateInfoPrivate() {};
+    
+    // copy constructor
+    EapQtCertificateInfoPrivate(const EapQtCertificateInfoPrivate &certInfo)
+    {
+        mCerts = certInfo.mCerts;
+    }
+
+    QVariant value(int id);
+    void setValue(int id, QVariant newValue);
+
+private:
+    // disable assignment
+    EapQtCertificateInfoPrivate &operator=(const EapQtCertificateInfoPrivate&);
+    QHash<int, QVariant> mCerts;
+
+};
+
+
+//----------------------------------------------------------------------------
+//              EapQtCertificateInfo                
+//----------------------------------------------------------------------------
+
+
+EapQtCertificateInfo::EapQtCertificateInfo() :
+    d_ptr(new EapQtCertificateInfoPrivate)
+{
+}
+
+EapQtCertificateInfo::~EapQtCertificateInfo()
+{
+    // scoped pointer deleted automatically
+}
+
+EapQtCertificateInfo::EapQtCertificateInfo(const EapQtCertificateInfo &certInfo) :
+    d_ptr(new EapQtCertificateInfoPrivate(*(certInfo.d_ptr)))
+{
+}
+
+EapQtCertificateInfo& EapQtCertificateInfo::operator=(const EapQtCertificateInfo &certInfo)
+{
+    // check if assigning to myself
+    if (this != &certInfo) {
+        d_ptr.reset(new EapQtCertificateInfoPrivate(*(certInfo.d_ptr)));
+    }
+    return *this;
+}
+
+QVariant EapQtCertificateInfo::value(ItemId id) const
+{
+    // check for valid range, otherwise memory is consumed for no reason
+    if(id >= ItemIdLast) {
+        qDebug("ERROR: EapQtCertificateInfo::value - invalid id!");
+        return QVariant::Invalid;
+    }
+    return d_ptr->mCerts[id];
+}
+
+void EapQtCertificateInfo::setValue(ItemId id, QVariant newValue)
+{
+    // check for valid range, otherwise memory is consumed for no reason
+    if(id < ItemIdLast) {
+        d_ptr->mCerts[id] = newValue;
+    } else {
+        qDebug("ERROR: EapQtCertificateInfo::setValue - invalid id!");
+    }
+    return;
+}
+
+bool EapQtCertificateInfo::operator==(const EapQtCertificateInfo & rhs ) const
+{
+    bool ret = true;
+    if (d_ptr->mCerts.size() != rhs.d_ptr->mCerts.size()) {
+        qWarning("EapQtCertificateInfo::operator==(): size: expect %d, actual %d ",
+            d_ptr->mCerts.size(),
+            rhs.d_ptr->mCerts.size() );
+        ret = false;
+    }
+    QHashIterator<int, QVariant> i(d_ptr->mCerts);
+    
+    while (i.hasNext()) {
+        i.next();
+        if (!rhs.d_ptr->mCerts.contains(i.key())){
+            qWarning("EapQtCertificateInfo::operator==(): key not found: %d", i.key());
+            ret = false;
+            
+        }
+        if (i.value() != rhs.d_ptr->mCerts[i.key()]){
+            qWarning("EapQtCertificateInfo::operator==(): values not match");
+            qDebug() << "Expect: " << i.value();
+            qDebug() << "Actual: " << i.value();
+            ret = false;
+        }
+    }
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfig.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,160 @@
+/*
+ * 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: 
+ *   DUMMY: Stub for eapwizard testing
+ *
+ */
+
+#ifndef EAPQTCONFIG_H
+#define EAPQTCONFIG_H
+
+#include <QList>
+#include <QVariant>
+#include <eapqtconfigdefs.h>
+
+class EapQtConfigPrivate;
+
+class EapQtConfig
+{
+public:
+    enum SettingsId
+    {
+        // see also EapSettings.h
+
+        /*! bool */
+        UsernameAutomatic,
+        /*! QString */
+        Username,
+        /*! bool */
+        PasswordPrompt,
+        /*! write-only: QString */
+        Password,
+        /*! bool
+         * in read: defines if password already exists in settings database
+         * in write: when true, defines that password is not included in the provided
+         *      configuration since it already exists in settings database, i.e. earlier
+         *      set password remains unchanged */
+        PasswordStored,
+        /*! write-only: bool
+         * true: clears the password from database
+         * false: does nothing
+         */
+        PasswordClear,
+        /*! bool */
+        RealmAutomatic,
+        /*! QString */
+        Realm,
+        /*! bool */
+        UsePseudonyms,
+        /*! bool */
+        VerifyServerRealm,
+        /*! bool */
+        ClientAuthenticationRequired,
+        /*! uint */
+        SessionValidityTime,
+        /*! 
+         * QList<uint> contains RFC numbers for activated ciphersuites
+         *
+         * Refer to RFC2246 chapter A.5 for the values.
+         *
+         * Supported CipherSuites by EAP Server default implementation: 
+         * TLS_NULL_WITH_NULL_NULL = (0x0000), 
+         * - No key exchange, no encryption and no authentication.
+         * TLS_RSA_WITH_RC4_128_MD5 = (0x0004),
+         * - RSA key exchange, RC4_128 encryption and MD5 authentication.
+         *   NOTE this is included only because PEAP requires this cipher 
+         *   suite as a mandatory. Think carefully whether this meets your 
+         *   security requirements.
+         * TLS_RSA_WITH_RC4_128_SHA = (0x0005), 
+         * - RSA key exchange, RC4_128 encryption and SHA1 authentication.
+         *   NOTE this is included only because PEAP requires this cipher 
+         *   suite as a mandatory. Think carefully whether this meets your 
+         *   security
+         *   requirements.
+         * TLS_RSA_WITH_3DES_EDE_CBC_SHA = (0x000a)
+         * - RSA key exchange, 3DES-EDE-CBC encryption and SHA1 
+         *   authentication.
+         * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = (0x0016)
+         * - Diffie-Helmann RSA key exchange, 3DES-EDE-CBC encryption and SHA1
+         *   authentication.
+         * TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = (0x0013)
+         * - Diffie-Helmann DSS key exchange, 3DES-EDE-CBC encryption and SHA1
+         *   authentication.
+         * TLS_RSA_WITH_AES_128_CBC_SHA      = 0x002F
+         * - RSA key exchange, AES-128 encryption and SHA1 authentication.
+         * TLS_DHE_DSS_WITH_AES_128_CBC_SHA  = 0x0032
+         * - Diffie-Helmann DSS key exchange, AES-128-CBC encryption and SHA1
+         *   authentication.
+         * TLS_DHE_RSA_WITH_AES_128_CBC_SHA  = 0x0033
+         * - Diffie-Helmann RSA key exchange, AES-128-CBC encryption and SHA1
+         *   authentication.
+         * TLS_DH_anon_WITH_AES_128_CBC_SHA  = 0x0034,
+         * - Supported when EAP-FAST is supported 
+         * - Diffie-Helmann anonymous key exchange, AES-128-CBC encryption and 
+         *   SHA1 authentication.
+         */
+        CipherSuites,
+        /*! bool */
+        PeapVersion0Allowed,
+        /*! bool */
+        PeapVersion1Allowed,
+        /*! bool */
+        PeapVersion2Allowed,
+        /*! QList< QVariant(EapQtCertificateInfo) > */
+        AuthorityCertificate,
+        /*! QList< QVariant(EapQtCertificateInfo) > */
+        UserCertificate,
+        /*! QList< QVariant(EapQtPluginHandle) > */
+        InnerType,
+        /*!  EapQtPluginHandle */
+        OuterType,
+        /*! bool */
+        ProvisioningModeAuthenticated,
+        /*! bool */
+        ProvisioningModeUnauthenticated,
+        /*! QString */
+        PACGroupReference,
+        /*! bool */
+        WarnADHPNoPAC,
+        /*! bool */
+        WarnADHPNoMatchingPAC,
+        /*! bool */
+        WarnNotDefaultServer,
+        /*! bool */
+        UseIdentityPrivacy,
+        /*! bool */
+        AuthorityCertificateAutomatic,
+        /*! marker for the last entry */
+        SettingsIdLast
+    };
+
+public:
+    EapQtConfig();
+    EapQtConfig(const EapQtConfig& other);
+    ~EapQtConfig();
+
+    QVariant value(SettingsId id);
+    void setValue(SettingsId id, QVariant newValue);
+    QList<EapQtConfig::SettingsId> validate(
+        QList<EapQtConfig::SettingsId> ids);
+    void clear();
+    
+public: // FOR TESTING PURPOSE
+    bool operator==(const EapQtConfig & rhs ) const;
+
+private:
+    QHash<int, QVariant> mSettings;
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfig_stub.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,153 @@
+/*
+ * 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: 
+ *   STUB: EAPWIZARD: EAP method QT configuration
+ *
+ */
+
+/*
+ * %version: 3 %
+ */
+
+#include "eapqtconfig.h"
+#include <eapqtpluginhandle.h>
+#include "eapqtcertificateinfo.h"
+#include <QDebug>
+
+//----------------------------------------------------------------------------
+//              EapQtConfig                
+//----------------------------------------------------------------------------
+
+EapQtConfig::EapQtConfig()
+{
+}
+
+EapQtConfig::EapQtConfig(const EapQtConfig &other)
+{
+    mSettings = other.mSettings;
+}
+
+EapQtConfig::~EapQtConfig()
+{
+    // scoped pointer deleted automatically
+}
+
+QVariant EapQtConfig::value(SettingsId id)
+{
+    // check for valid range, otherwise memory is consumed for no reason
+    if(id >= SettingsIdLast) {
+        qDebug("ERROR: EapQtConfig::value - invalid id!");
+        return QVariant::Invalid;
+    }
+    return mSettings[id];
+}
+
+void EapQtConfig::setValue(SettingsId id, QVariant newValue)
+{
+    // check for valid range, otherwise memory is consumed for no reason
+    if(id < SettingsIdLast) {
+        mSettings[id] = newValue;
+    } else {
+        qDebug("ERROR: EapQtConfig::setValue - invalid id!");
+    }
+    return;
+}
+
+void EapQtConfig::clear() {
+    mSettings.clear();
+    return;
+}
+
+QList<EapQtConfig::SettingsId> EapQtConfig::validate(
+    QList<EapQtConfig::SettingsId> ids)
+{
+    Q_UNUSED(ids);
+    return QList<EapQtConfig::SettingsId>();
+}
+
+bool EapQtConfig::operator==(const EapQtConfig & rhs ) const
+{
+    bool ret = true;
+    if (mSettings.size() != rhs.mSettings.size()) {
+        qWarning("EapQtConfig::operator==(): size: expect %d, actual %d ",
+            mSettings.size(),
+            rhs.mSettings.size() );
+        ret = false;
+    }
+    QHashIterator<int, QVariant> i(mSettings);
+    
+    while (i.hasNext()) {
+        i.next();
+        if (!rhs.mSettings.contains(i.key())){
+            qWarning("EapQtConfig::operator==(): key not found: %d", i.key());
+            ret = false;
+            
+        }
+        if (i.key() == EapQtConfig::InnerType) {
+            QList<QVariant> list1(mSettings[i.key()].toList());
+            QList<QVariant> list2(rhs.mSettings[i.key()].toList());
+            
+            if (list1.length() != 1 || list1.length() != list2.length()){
+                qWarning("Invalid length in EapQtConfig::InnerType");
+                ret = false;
+            } else {
+                EapQtPluginHandle handle1 = list1.at(0).value<EapQtPluginHandle> ();
+                EapQtPluginHandle handle2 = list2.at(0).value<EapQtPluginHandle> ();
+                if (handle1.pluginId() != handle2.pluginId()){
+                    qWarning("Outer: %d", handle1.pluginId());
+                    qWarning("Outer: %d", handle2.pluginId());
+                    ret = false;
+                }
+            }
+        }
+        else if (i.key() == EapQtConfig::OuterType) {
+            EapQtPluginHandle handle = mSettings[i.key()].value<EapQtPluginHandle> ();
+            EapQtPluginHandle handle2 = rhs.mSettings[i.key()].value<EapQtPluginHandle> ();
+            if (handle.pluginId() != handle2.pluginId()){
+                qWarning("Outer: %d", handle.pluginId());
+                qWarning("Outer: %d", handle2.pluginId());
+                ret = false;
+            }
+        }
+        else if (i.key() == EapQtConfig::AuthorityCertificate ||
+                 i.key() == EapQtConfig::UserCertificate) {
+            QList<QVariant> list1(mSettings[i.key()].toList());
+            QList<QVariant> list2(rhs.mSettings[i.key()].toList());
+            
+            if (list1.length() != 1 || list1.length() != list2.length()) {
+                qWarning("Invalid length Certs %d", i.key());
+                ret = false;
+            } else {
+                EapQtCertificateInfo cert1 = list1.at(0).value<EapQtCertificateInfo>();
+                EapQtCertificateInfo cert2 = list2.at(0).value<EapQtCertificateInfo>();
+                
+                if (!(cert1 == cert2)) {
+                    ret = false;
+                    qWarning("Invalid certs %d", i.key());
+                }
+            }
+        }
+        else {
+            if (i.value() != rhs.mSettings[i.key()]){
+                qWarning("EapQtConfig::operator==(): values does not match %d", i.key());
+                qDebug() << "Expect: " << i.value();
+                qDebug() << "Actual: " << rhs.mSettings[i.key()];
+                ret = false;
+            }
+        }
+    }
+    return ret;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfiginterface.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,134 @@
+/*
+ * 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: 
+ *   EAP method configuration QT interface
+ *
+ */
+
+/*
+ * %version: 5 %
+ */
+
+#ifndef EAPQTCONFIGINTERFACE_H
+#define EAPQTCONFIGINTERFACE_H
+
+#include <qglobal.h>
+#include <QStringList>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtpluginhandle.h>
+#include <eapqtconfigdefs.h>
+#include "eapqtconfig.h"
+#include "eapqtpacstoreconfig.h"
+#include "eapqtcertificateinfo.h"
+#include "eapqtvalidator.h"
+
+class EapQtConfigInterfaceContext;
+/*!
+ * @addtogroup group_eap_config_api
+ * @{
+ */
+
+/*!
+ */
+class EapQtConfigInterface
+{
+public:
+
+    enum EapBearerType
+    {
+        // EAP configuration interface for WLAN
+        EapBearerTypeWlan,
+        // EAP configuration interface for VPN
+        EapBearerTypeVpn,
+    };
+
+    static const int IapIdUndefined = -1;
+
+public:
+    EapQtConfigInterface(const EapBearerType bearerType, const int iapId);
+    ~EapQtConfigInterface();
+    bool setConfigurationReference(const int iapId);
+    QList<EapQtCertificateInfo> certificateAuthorityCertificates();
+    QList<EapQtCertificateInfo> userCertificates();
+    
+    bool updateCertificates();
+    
+    bool isSupportedOuterType(const EapQtPluginHandle& handle);
+    bool isSupportedInnerType(const EapQtPluginHandle& outerHandle,
+        const EapQtPluginHandle& innerHandle);
+    
+    bool setSelectedOuterTypes(const QList<EapQtPluginHandle>& outerHandles);
+    bool saveConfiguration(const EapQtPluginHandle& pluginHandle, EapQtConfig &config);
+    bool deleteConfiguration();
+    EapQtValidator *validatorEap(EapQtExpandedEapType type, EapQtConfig::SettingsId id);
+    
+    bool readPacStoreConfiguration(EapQtPacStoreConfig &config);
+    bool savePacStoreConfiguration(EapQtPacStoreConfig &config);
+    EapQtValidator *validatorPacStore(EapQtPacStoreConfig::PacStoreSettings id);
+    
+private:
+    Q_DISABLE_COPY(EapQtConfigInterface)
+    QStringList mCalledMethods;
+    
+    // setConfigurationReference
+    int mIapId;
+    bool mReturnSetConfigurationReference;
+    
+    // certificateAuthorityCertificates
+    QList<EapQtCertificateInfo> mCertsCa;
+    
+    // userCertificates
+    QList<EapQtCertificateInfo> mCertsUser;
+    
+    // isSupportedOuterType
+    QList<EapQtPluginHandle> mSupportedOuterTypes;
+    
+    // isSupportedInnerType
+    QList<EapQtPluginHandle> mSupportedInnerTypes;
+    int mSupportedInnerTypesOuterHandle;
+    
+    // setSelectedOuterTypes
+    QList<EapQtPluginHandle> mSetSelectectedOuterTypes;
+    bool mReturnSetSelectedOuterTypes;
+    
+    // saveConfiguration
+    EapQtPluginHandle::Plugin mOuterPlugin;
+    EapQtConfig mSaveConfigurationsOuter;
+    bool mReturnSaveConfigurationOuter;
+    EapQtPluginHandle::Plugin mInnerPlugin;
+    EapQtConfig mSaveConfigurationsInner;
+    bool mReturnSaveConfigurationInner;
+
+    // validatorEap
+    QHash<EapQtExpandedEapType::Type, QHash<EapQtConfig::SettingsId, EapQtValidator *> > mValidator;
+    
+    // readPacStoreConfiguration
+    EapQtPacStoreConfig mReadPacStoreConfiguration;
+    bool mReadPacStoreConfigurationReturn;
+    
+    // savePacStoreConfiguration
+    EapQtPacStoreConfig mSavePacStoreConfiguration;
+    bool mSavePacStoreConfigurationReturn;
+    
+    // validatorPacStore, key: EapQtPacStoreConfig::PacStoreSettings
+    QHash<int ,EapQtValidator* > mValidatorPacStore;
+    
+    friend class EapQtConfigInterfaceContext;
+};
+
+/*! @} */
+
+#endif
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfiginterface_context.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,422 @@
+/*
+ * 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 <QTest>
+
+#include "eapqtconfiginterface_context.h"
+#include "eapqtvalidator_stub.h"
+#include "eapqtexpandedeaptype.h"
+
+EapQtConfigInterfaceContext::EapQtConfigInterfaceContext() : 
+    mEapQtConfig(NULL)
+{
+}
+
+EapQtConfigInterfaceContext::~EapQtConfigInterfaceContext()
+{
+    mEapQtConfig->mValidator.clear();
+}
+
+void EapQtConfigInterfaceContext::setObject(EapQtConfigInterface *eapQtConfig)
+{
+    mEapQtConfig = eapQtConfig;
+}
+
+void EapQtConfigInterfaceContext::createEapAkaSim(int type)
+{
+    QList<EapQtPluginHandle> types;
+    types.append((EapQtPluginHandle::Plugin)type);
+    setSupportedOuterTypes(types);
+
+    setSelectectedOuterTypes(types, true);
+    
+    EapQtConfig config;
+    config.setValue(EapQtConfig::UsernameAutomatic, true);
+    config.setValue(EapQtConfig::RealmAutomatic, true);
+    setOuterConfig((EapQtPluginHandle::Plugin)type, config, true);
+}
+
+void EapQtConfigInterfaceContext::createLeap(
+    const QString& username, 
+    const QString& passwd)
+{
+    QList<EapQtPluginHandle> types;
+    types.append(EapQtPluginHandle::PluginLeap);
+    setSupportedOuterTypes(types);
+
+    setSelectectedOuterTypes(types, true);
+    
+    EapQtConfig config;
+    config.setValue(EapQtConfig::UsernameAutomatic, false);
+    config.setValue(EapQtConfig::Username, username);
+    config.setValue(EapQtConfig::PasswordPrompt, false);
+    config.setValue(EapQtConfig::Password, passwd);
+    setOuterConfig(EapQtPluginHandle::PluginLeap, config, true);
+    
+    // validators
+    createInnerTypeValidators(EapQtPluginHandle::PluginLeap);
+}
+
+void EapQtConfigInterfaceContext::createEapIdentifyValidators(EapQtPluginHandle::Plugin outerType)
+{
+    EapQtPluginHandle typeHandle(outerType);
+    
+    EapQtValidatorStub *valStub = new EapQtValidatorStub(EapQtValidator::StatusOk);
+    setValidator(typeHandle.type().type(), EapQtConfig::Username, valStub);
+    
+    valStub = new EapQtValidatorStub(EapQtValidator::StatusOk);
+    setValidator(typeHandle.type().type(), EapQtConfig::Realm, valStub);
+}
+
+void EapQtConfigInterfaceContext::createEapTtlsPeap(
+    EapQtPluginHandle::Plugin type,
+    bool automaticCert,
+    bool usernameAutomatic, 
+    const QString &username,
+    bool realmAutomatic, 
+    const QString &realm,
+    EapQtPluginHandle::Plugin innerType)
+{
+    EapQtPluginHandle typeHandle(type);
+    
+    QList<EapQtPluginHandle> types;
+    types.append(typeHandle);
+    setSupportedOuterTypes(types);
+    setSelectectedOuterTypes(types, true);
+    
+    // Certs
+    QList<EapQtCertificateInfo> certs;
+    EapQtCertificateInfo caCert;
+    caCert.setValue(EapQtCertificateInfo::CertificateLabel, "My Super Cert");
+    certs.append(caCert);
+    setCertsCa(certs);
+    
+    // CREATE VALIDATOR
+    createEapIdentifyValidators(type);
+    
+    // CREATE CONFIGURATION FOR TTLS/PEAP
+    
+    EapQtConfig config;
+    config.setValue(EapQtConfig::UseIdentityPrivacy, false);
+    config.setValue(EapQtConfig::VerifyServerRealm, false);
+    config.setValue(EapQtConfig::ClientAuthenticationRequired, false);
+    
+    config.setValue(EapQtConfig::UsernameAutomatic, usernameAutomatic);
+    config.setValue(EapQtConfig::Username, username);
+    config.setValue(EapQtConfig::RealmAutomatic, realmAutomatic);
+    config.setValue(EapQtConfig::Realm, realm);
+    if (automaticCert){
+        config.setValue(EapQtConfig::AuthorityCertificateAutomatic, true);
+    }
+    else {
+        QList<QVariant> caCerts;
+        caCerts.append(qVariantFromValue(caCert));
+        config.setValue(EapQtConfig::AuthorityCertificate, caCerts);
+        config.setValue(EapQtConfig::AuthorityCertificateAutomatic, false);
+    }
+    if (type == EapQtPluginHandle::PluginPeap){
+        if (innerType == EapQtPluginHandle::PluginEapMschapv2){
+            config.setValue(EapQtConfig::PeapVersion0Allowed, true);
+            config.setValue(EapQtConfig::PeapVersion1Allowed, false);  
+        }
+        else {
+            config.setValue(EapQtConfig::PeapVersion0Allowed, false);
+            config.setValue(EapQtConfig::PeapVersion1Allowed, true);
+        }
+        config.setValue(EapQtConfig::PeapVersion2Allowed, false);
+    }
+    QList<QVariant> innerTypeList;
+    EapQtPluginHandle inner(innerType);
+    innerTypeList.append(qVariantFromValue(inner));
+    config.setValue(EapQtConfig::InnerType, innerTypeList);
+    
+    setOuterConfig(type, config, true);
+}
+
+void EapQtConfigInterfaceContext::createEapTls(
+    QList<EapQtCertificateInfo> &caCerts,
+    int indexForCaCert,
+    QList<EapQtCertificateInfo> &userCerts,
+    int indexForUserCert)
+{
+    QList<EapQtPluginHandle> types;
+    types.append(EapQtPluginHandle::PluginEapTls);
+    setSupportedOuterTypes(types);
+    setSelectectedOuterTypes(types, true);
+    
+    // Certs
+    setCertsCa(caCerts);
+    setCertsUser(userCerts);
+    
+    // CREATE VALIDATOR
+    createEapIdentifyValidators(EapQtPluginHandle::PluginEapTls);
+    
+    // CREATE CONFIGURATION FOR TTLS/PEAP
+    
+    EapQtConfig config;
+    config.setValue(EapQtConfig::UseIdentityPrivacy, false);
+    config.setValue(EapQtConfig::VerifyServerRealm, false);
+    config.setValue(EapQtConfig::ClientAuthenticationRequired, true);
+    
+    config.setValue(EapQtConfig::UsernameAutomatic, true);
+    config.setValue(EapQtConfig::Username, QString());
+    config.setValue(EapQtConfig::RealmAutomatic, true);
+    config.setValue(EapQtConfig::Realm, QString());
+    
+    if (caCerts.length() == 0){
+        config.setValue(EapQtConfig::AuthorityCertificateAutomatic, true);
+    } else {
+        QList<QVariant> caCertsVariant;
+        caCertsVariant.append(qVariantFromValue(caCerts[indexForCaCert]));    
+        config.setValue(EapQtConfig::AuthorityCertificate, caCertsVariant);
+        config.setValue(EapQtConfig::AuthorityCertificateAutomatic, false);
+    }
+    
+    if (indexForUserCert != -1) {
+        QList<QVariant> certs;
+        certs.append(qVariantFromValue(userCerts[indexForUserCert]));
+        config.setValue(EapQtConfig::UserCertificate, certs);
+    }
+    
+    setOuterConfig(EapQtPluginHandle::PluginEapTls, config, true);
+}
+
+void EapQtConfigInterfaceContext::createInner(
+    EapQtPluginHandle::Plugin outerType,
+    EapQtPluginHandle::Plugin innerType, 
+    const QString &username,
+    const QString &password)
+{
+    EapQtPluginHandle innerHandle(innerType);
+    
+    QList<EapQtPluginHandle> types;
+    types.append(innerHandle);
+    setSupportedInnerTypes(outerType, types);
+
+    EapQtConfig config;
+    EapQtPluginHandle outerTypeHandle(outerType);
+    config.setValue(EapQtConfig::OuterType, qVariantFromValue(outerTypeHandle));
+    config.setValue(EapQtConfig::UsernameAutomatic, false);
+    config.setValue(EapQtConfig::Username, username);
+    config.setValue(EapQtConfig::PasswordPrompt, false);
+    config.setValue(EapQtConfig::Password, password);
+    setInnerConfig(innerType, config, true);
+    
+    createInnerTypeValidators(innerType);
+}
+
+void EapQtConfigInterfaceContext::createInnerTypeValidators(EapQtPluginHandle::Plugin innerType)
+{
+    EapQtPluginHandle innerHandle(innerType);
+    
+    // validators
+    EapQtValidatorStub *valStub = new EapQtValidatorStub(EapQtValidator::StatusOk);
+    setValidator(innerHandle.type().type(), EapQtConfig::Username, valStub);
+    
+    valStub = new EapQtValidatorStub(EapQtValidator::StatusOk);
+    setValidator(innerHandle.type().type(), EapQtConfig::Password, valStub);    
+}
+
+void EapQtConfigInterfaceContext::createEapFast(
+    int pacState, const QString &password)
+{
+    QList<EapQtPluginHandle> types;
+    types.append(EapQtPluginHandle::PluginEapFast);
+    setSupportedOuterTypes(types);
+    setSelectectedOuterTypes(types, true);
+
+    EapQtPacStoreConfig pacStoreConfig;
+    pacStoreConfig.setValue(EapQtPacStoreConfig::PacStoreState, pacState);
+    setPacStoreConfigRead(pacStoreConfig, true);
+    
+    if (pacState == EapQtPacStoreConfig::PacStoreStateStoreNotExists ||
+        pacState == EapQtPacStoreConfig::PacStoreStatePasswordRequired) {
+        pacStoreConfig.clear();
+        pacStoreConfig.setValue(
+            EapQtPacStoreConfig::PacStorePassword, 
+            password);
+        
+        pacStoreConfig.setValue(
+            EapQtPacStoreConfig::PacStoreSavePassword, 
+            true);
+        
+        setPacStoreConfigSave(pacStoreConfig, true);
+    }
+    
+    if (pacState == EapQtPacStoreConfig::PacStoreStateStoreNotExists) {
+        EapQtValidatorStub *validator = new EapQtValidatorStub(EapQtValidator::StatusOk);
+        setValidatorPacStore(EapQtPacStoreConfig::PacStorePassword, validator);
+    }
+
+    if (pacState == EapQtPacStoreConfig::PacStoreStatePasswordRequired) {
+        EapQtValidatorStub *validator = new EapQtValidatorStub(EapQtValidator::StatusOk);
+        setValidatorPacStore(EapQtPacStoreConfig::PacStorePasswordConfirmation, validator);
+    }
+    
+    EapQtConfig config;
+    config.setValue(EapQtConfig::ProvisioningModeAuthenticated, false);
+    config.setValue(EapQtConfig::ProvisioningModeUnauthenticated, true);
+    config.setValue(EapQtConfig::VerifyServerRealm, false);
+    config.setValue(EapQtConfig::UseIdentityPrivacy, false);
+    
+    QList<QVariant> innerTypeList;
+    EapQtPluginHandle inner(EapQtPluginHandle::PluginEapMschapv2);
+    innerTypeList.append(qVariantFromValue(inner));
+    config.setValue(EapQtConfig::InnerType, innerTypeList);
+    
+    setOuterConfig(EapQtPluginHandle::PluginEapFast, config, true);
+}
+
+QStringList EapQtConfigInterfaceContext::calledMethods()
+{
+    QStringList methods = mEapQtConfig->mCalledMethods;
+    mEapQtConfig->mCalledMethods.clear();
+    return methods;
+}
+
+void EapQtConfigInterfaceContext::setConfigurationReference(
+    int iapId, 
+    bool retValue)
+{
+    mEapQtConfig->mIapId = iapId;
+    setConfigurationReferenceReturn(retValue);
+}
+
+void EapQtConfigInterfaceContext::setConfigurationReferenceReturn(bool retValue)
+{
+    mEapQtConfig->mReturnSetConfigurationReference = retValue;    
+}
+
+void EapQtConfigInterfaceContext::setCertsCa(
+    QList<EapQtCertificateInfo> &certs)
+{
+    mEapQtConfig->mCertsCa = certs;
+}
+
+void EapQtConfigInterfaceContext::setCertsUser(
+    QList<EapQtCertificateInfo> &certs)
+{
+    mEapQtConfig->mCertsUser = certs;
+}
+
+void EapQtConfigInterfaceContext::setSupportedOuterTypes(
+    QList<EapQtPluginHandle> &outerTypes)
+{
+    mEapQtConfig->mSupportedOuterTypes = outerTypes;
+}
+
+void EapQtConfigInterfaceContext::setSupportedInnerTypes(
+    EapQtPluginHandle outerHandle, 
+    QList<EapQtPluginHandle> &innerTypes)
+{
+    mEapQtConfig->mSupportedInnerTypes = innerTypes;
+    mEapQtConfig->mSupportedInnerTypesOuterHandle = outerHandle.pluginId();
+}
+
+void EapQtConfigInterfaceContext::setSelectectedOuterTypes(
+    QList<EapQtPluginHandle> &types,
+    bool retValue)
+{
+    mEapQtConfig->mSetSelectectedOuterTypes = types;
+    setSelectectedOuterTypesReturn(retValue);
+}
+
+void EapQtConfigInterfaceContext::setSelectectedOuterTypesReturn(bool retValue)
+{
+    mEapQtConfig->mReturnSetSelectedOuterTypes = retValue;
+}
+
+void EapQtConfigInterfaceContext::setOuterConfig(
+    EapQtPluginHandle::Plugin handle,
+    EapQtConfig &config, 
+    bool retValue)
+{
+    mEapQtConfig->mOuterPlugin = handle;
+    mEapQtConfig->mSaveConfigurationsOuter = config;
+    setOuterConfigReturn(retValue);
+}
+
+void EapQtConfigInterfaceContext::setOuterConfigReturn(bool retValue)
+{
+    mEapQtConfig->mReturnSaveConfigurationOuter = retValue;
+}
+
+void EapQtConfigInterfaceContext::setInnerConfig(
+    EapQtPluginHandle::Plugin handle,
+    EapQtConfig &config, 
+    bool retValue)
+{
+    mEapQtConfig->mInnerPlugin = handle;
+    mEapQtConfig->mSaveConfigurationsInner = config;
+    setInnerConfigReturn(retValue);
+}
+
+void EapQtConfigInterfaceContext::setInnerConfigReturn(bool retValue)
+{
+    mEapQtConfig->mReturnSaveConfigurationInner = retValue;
+}
+
+void EapQtConfigInterfaceContext::setValidator(
+    EapQtExpandedEapType::Type eapType,
+    EapQtConfig::SettingsId id, 
+    EapQtValidator *validator)
+{
+    QCOMPARE(mEapQtConfig->mValidator[eapType][id] == NULL, true);
+    mEapQtConfig->mValidator[eapType][id] = validator;
+}
+
+
+EapQtValidator *EapQtConfigInterfaceContext::validator(
+    EapQtExpandedEapType::Type eapType,
+    EapQtConfig::SettingsId id)
+{
+    return mEapQtConfig->mValidator[eapType][id];
+}
+
+void EapQtConfigInterfaceContext::setPacStoreConfigRead(
+    EapQtPacStoreConfig &config,
+    bool retValue)
+{
+    mEapQtConfig->mReadPacStoreConfiguration = config;
+    setPacStoreConfigReadReturn(retValue);
+}
+
+void EapQtConfigInterfaceContext::setPacStoreConfigReadReturn(bool retValue)
+{
+    mEapQtConfig->mReadPacStoreConfigurationReturn = retValue;
+}
+
+void EapQtConfigInterfaceContext::setPacStoreConfigSave(
+    EapQtPacStoreConfig &config,
+    bool retValue)
+{
+    mEapQtConfig->mSavePacStoreConfiguration = config;
+    setPacStoreConfigSaveReturn(retValue);
+}
+
+void EapQtConfigInterfaceContext::setPacStoreConfigSaveReturn(bool retValue)
+{
+    mEapQtConfig->mSavePacStoreConfigurationReturn = retValue;
+}
+
+void EapQtConfigInterfaceContext::setValidatorPacStore(int id, EapQtValidator * validator)
+{
+    mEapQtConfig->mValidatorPacStore[id] = validator;
+}
+
+EapQtValidator *EapQtConfigInterfaceContext::validatorPacStore(int id)
+{
+    return mEapQtConfig->mValidatorPacStore[id];
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfiginterface_context.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* 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:
+*/
+
+#ifndef EAPQTCONFIGINTERFACE_CONTEXT_H
+#define EAPQTCONFIGINTERFACE_CONTEXT_H
+
+#include "eapqtconfiginterface.h"
+#include "eapqtpacstoreconfig.h"
+
+class EapQtConfigInterfaceContext
+{
+public:
+    EapQtConfigInterfaceContext();
+    ~EapQtConfigInterfaceContext();
+
+    void setObject(EapQtConfigInterface *eapQtConfig);
+    
+public: // Helpper methods to create simple valid configurations
+    void createEapAkaSim(int pluginHandleEnum);
+    
+    void createLeap(const QString& username, const QString& passwd);
+
+    void createEapIdentifyValidators(EapQtPluginHandle::Plugin outerType);
+    
+    void createEapTtlsPeap(
+        EapQtPluginHandle::Plugin type,
+        bool automaticCert,
+        bool usernameAutomatic,
+        const QString &username,
+        bool realmAutomatic,
+        const QString &realm,
+        EapQtPluginHandle::Plugin innerType);
+
+    void createEapTls(
+        QList<EapQtCertificateInfo> &caCerts,
+        int indexForCaCert,
+        QList<EapQtCertificateInfo> &userCerts,
+        int indexForUserCert);
+    
+    void createInner(
+        EapQtPluginHandle::Plugin outerType,
+        EapQtPluginHandle::Plugin innerType,
+        const QString &username,
+        const QString &password);
+    
+    void createInnerTypeValidators(EapQtPluginHandle::Plugin innerType);
+    
+    void createEapFast(int pacState, const QString &password = QString());
+    
+public: // Methods to set the exact behavior of the interface
+    QStringList calledMethods();
+    void setConfigurationReference(int iapId, bool retValue);
+    void setConfigurationReferenceReturn(bool retValue);
+    void setCertsCa(QList<EapQtCertificateInfo> &certs);
+    void setCertsUser(QList<EapQtCertificateInfo> &certs);
+    void setSupportedOuterTypes(QList<EapQtPluginHandle> &outerTypes);
+    void setSupportedInnerTypes(EapQtPluginHandle outerHandle, QList<EapQtPluginHandle> &innerTypes);
+    void setSelectectedOuterTypes(QList<EapQtPluginHandle> &types, bool retValue);
+    void setSelectectedOuterTypesReturn(bool retValue);
+    void setOuterConfig(EapQtPluginHandle::Plugin handle, EapQtConfig &config, bool retValue);
+    void setOuterConfigReturn(bool retValue);
+    void setInnerConfig(EapQtPluginHandle::Plugin handle, EapQtConfig &config, bool retValue);
+    void setInnerConfigReturn(bool retValue);
+    // Moved ownership to context
+    void setValidator(
+        EapQtExpandedEapType::Type eapType,
+        EapQtConfig::SettingsId, 
+        EapQtValidator *validator);
+    
+    EapQtValidator *validator(
+        EapQtExpandedEapType::Type eapType,
+        EapQtConfig::SettingsId id);
+
+    void setPacStoreConfigRead(EapQtPacStoreConfig &config, bool retValue);
+    void setPacStoreConfigReadReturn(bool retValue);
+    void setPacStoreConfigSave(EapQtPacStoreConfig &config, bool retValue);
+    void setPacStoreConfigSaveReturn(bool retValue);
+    void setValidatorPacStore(int id, EapQtValidator * validator);
+    
+    EapQtValidator *validatorPacStore(int id);
+
+    
+private:
+    EapQtConfigInterface* mEapQtConfig;
+};
+
+#endif /* EAPQTCONFIGINTERFACE_CONTEXT_H */
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfiginterface_stub.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,152 @@
+/*
+ * 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: 
+ *   Stub for EAP method configuration QT interface
+ *
+ */
+
+/*
+ * %version: 5 %
+ */
+
+#include <QList>
+#include <QDebug>
+#include <QTest>
+#include "eapqtconfiginterface.h"
+
+//----------------------------------------------------------------------------
+//              EapQtConfigInterface
+//----------------------------------------------------------------------------
+
+EapQtConfigInterface::EapQtConfigInterface(
+    const EapBearerType bearerType, 
+    const int iapId)
+{
+    mCalledMethods.append("EapQtConfigInterface");
+    QCOMPARE(bearerType, EapQtConfigInterface::EapBearerTypeWlan);
+    QCOMPARE(iapId, EapQtConfigInterface::IapIdUndefined);
+}
+
+EapQtConfigInterface::~EapQtConfigInterface()
+{
+    mCalledMethods.append("~EapQtConfigInterface");
+}
+
+bool EapQtConfigInterface::setConfigurationReference(const int iapId)
+{
+    mCalledMethods.append("setConfigurationReference");
+    QCOMPARE(iapId, mIapId);
+    
+    return mReturnSetConfigurationReference;
+}
+
+QList<EapQtCertificateInfo> EapQtConfigInterface::certificateAuthorityCertificates()
+{
+    mCalledMethods.append("certificateAuthorityCertificates");
+    return mCertsCa;
+}
+
+QList<EapQtCertificateInfo> EapQtConfigInterface::userCertificates()
+{
+    mCalledMethods.append("userCertificates");
+    return mCertsUser;
+}
+
+
+bool EapQtConfigInterface::updateCertificates()
+{
+    mCalledMethods.append("updateCertificates");
+    return true;
+}
+
+bool EapQtConfigInterface::isSupportedOuterType(const EapQtPluginHandle& handle)
+{
+    mCalledMethods.append("isSupportedOuterType");
+    return mSupportedOuterTypes.contains(handle);
+}
+
+bool EapQtConfigInterface::isSupportedInnerType(
+    const EapQtPluginHandle& outerHandle,
+    const EapQtPluginHandle& innerHandle)
+{
+    mCalledMethods.append("isSupportedOuterType");
+    QCOMPARE(mSupportedInnerTypesOuterHandle, (int)outerHandle.pluginId());
+    return mSupportedInnerTypes.contains(innerHandle);
+}
+
+bool EapQtConfigInterface::setSelectedOuterTypes(
+    const QList<EapQtPluginHandle>& outerHandles)
+{
+    mCalledMethods.append("setSelectedOuterTypes");
+    QCOMPARE(mSetSelectectedOuterTypes, outerHandles);
+    return mReturnSetSelectedOuterTypes;
+}
+
+bool EapQtConfigInterface::saveConfiguration(
+    const EapQtPluginHandle& pluginInfo,
+    EapQtConfig &config)
+{
+    mCalledMethods.append("saveConfiguration");
+    
+    if (pluginInfo == mOuterPlugin) {
+        QCOMPARE(config == mSaveConfigurationsOuter, true);
+        return mReturnSaveConfigurationOuter;
+    } else {
+        QCOMPARE(pluginInfo == mInnerPlugin, true);
+        QCOMPARE(config == mSaveConfigurationsInner, true);
+        return mReturnSaveConfigurationInner;
+    }
+}
+
+bool EapQtConfigInterface::deleteConfiguration()
+{
+    mCalledMethods.append("deleteConfiguration");
+    return true;
+}
+
+EapQtValidator *EapQtConfigInterface::validatorEap(
+    EapQtExpandedEapType type,
+    EapQtConfig::SettingsId id)
+{
+    mCalledMethods.append("validatorEap");
+    
+    QCOMPARE(mValidator[type.type()][id] != NULL, true);
+    EapQtValidator *validator = mValidator[type.type()][id];
+    mValidator[type.type()].remove(id);
+    return validator;
+}
+
+
+bool EapQtConfigInterface::readPacStoreConfiguration(EapQtPacStoreConfig &config)
+{
+    config = mReadPacStoreConfiguration;
+    return mReadPacStoreConfigurationReturn;
+}
+
+bool EapQtConfigInterface::savePacStoreConfiguration(EapQtPacStoreConfig &config)
+{
+    QCOMPARE(config == mSavePacStoreConfiguration, true);
+    return mSavePacStoreConfigurationReturn;
+}
+
+EapQtValidator *EapQtConfigInterface::validatorPacStore(
+    EapQtPacStoreConfig::PacStoreSettings id)
+{
+    mCalledMethods.append("validatorPacStore");
+    
+    QCOMPARE(mValidatorPacStore.contains(id), true);
+    EapQtValidator *validator = mValidatorPacStore[id];
+    mValidatorPacStore.remove(id);
+    return validator;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtpacstoreconfig.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,96 @@
+/*
+ * 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:
+ *   EAP-FAST PAC store configuration data
+ *
+ */
+
+/*
+ * %version: 2 %
+ */
+
+#ifndef EAPQTPACSTORECONFIG_H
+#define EAPQTPACSTORECONFIG_H
+
+#include <QVariant>
+
+class EapQtPacStoreConfig
+{
+public:
+
+    // PAC store is global, i.e. only a single PAC store exists in a device
+
+    enum PacStoreState
+    {
+        // PAC store does not exist and needs to be created
+        PacStoreStateStoreNotExists = 0,
+        // PAC store exists but the password has not been stored and
+        // is needed to access the PAC store
+        PacStoreStatePasswordRequired,
+        // PAC store password has been stored to settings database
+        // and is not needed to use the PAC store
+        PacStoreStatePasswordStored,
+        // TODO: remove? delete automatically if corrupted
+        // Existing PAC store is corrupted and should be reset
+        PacStoreStateCorrupted,
+        // marker for the last item
+        PacStoreStateLast
+    };
+
+    enum PacStoreSettings
+    {
+        /*! write-only: QString
+         *      password to be used for accessing the PAC store
+         *      - must be new password if the read PacStoreState is PacStoreStateStoreNotExists
+         *      - must be password of the existing PAC store if the PacStoreState state is
+         *        PacStoreStatePasswordRequired */
+        PacStorePassword = 0,
+        /*! write-only: bool
+         *      true: saves the password given in settings
+         *      false: clears the earlier stored password from database, i.e. password
+         *        will be prompted when needed, PAC store itself remains valid
+         *      QVariant::Invalid: no actions */
+        PacStoreSavePassword,
+        /*! write-only: bool
+         *      true: deletes PAC store, i.e. clears everything related to the
+         *        existing PAC store inlcuding saved password
+         *      false/QVariant::Invalid: no actions */
+        PacStoreReset,
+        /*! read-only: int (PacStoreState) */
+        PacStoreState,
+        /*! no write nor read operation, for validator usage only
+         *  - uses the validator to check if the given password
+         *      can open the existing PAC store */
+        PacStorePasswordConfirmation,
+        // marker for the last item
+        PacStoreLast
+    };
+
+public:
+    EapQtPacStoreConfig();
+    ~EapQtPacStoreConfig();
+
+    QVariant value(PacStoreSettings id);
+    void setValue(PacStoreSettings id, QVariant newValue);
+    void clear();
+
+public: // FOR TESTING PURPOSE
+    bool operator==(const EapQtPacStoreConfig & rhs ) const;
+    bool operator=(const EapQtPacStoreConfig & rhs );
+    
+private:
+    QHash <int, QVariant> mPacStoreSettings;
+};
+
+#endif /* EAPQTPACSTORECONFIG_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtpacstoreconfig_stub.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,90 @@
+/*
+ * 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: 
+ *   EAP-FAST PAC store configuration data
+ *
+ */
+
+/*
+ * %version: 2 %
+ */
+#include <QDebug>
+#include <eapqtpacstoreconfig.h>
+
+EapQtPacStoreConfig::EapQtPacStoreConfig()
+{
+}
+
+EapQtPacStoreConfig::~EapQtPacStoreConfig()
+{
+    // scoped pointer deleted automatically
+}
+
+QVariant EapQtPacStoreConfig::value(PacStoreSettings id)
+{
+    // check for valid range, otherwise memory is consumed for no reason
+    if(id >= PacStoreLast) {
+        qDebug("ERROR: EapQtPacStoreConfig::value - invalid id!");
+        return QVariant::Invalid;
+    }
+    return mPacStoreSettings[id];
+}
+
+void EapQtPacStoreConfig::setValue(PacStoreSettings id, QVariant newValue)
+{
+    // check for valid range, otherwise memory is consumed for no reason
+    if(id < PacStoreLast) {
+        mPacStoreSettings[id] = newValue;
+    } else {
+        qDebug("ERROR: EapQtPacStoreConfig::setValue - invalid id!");
+    }
+}
+
+void EapQtPacStoreConfig::clear() {
+    mPacStoreSettings.clear();
+}
+
+bool EapQtPacStoreConfig::operator==(const EapQtPacStoreConfig & rhs ) const
+{
+    bool ret = true;
+    if (mPacStoreSettings.size() != rhs.mPacStoreSettings.size()) {
+        qWarning("EapQtPacStoreConfig::operator==(): size: expect %d, actual %d ",
+            mPacStoreSettings.size(),
+            rhs.mPacStoreSettings.size() );
+        ret = false;
+    }
+    QHashIterator<int, QVariant> i(mPacStoreSettings);
+    
+    while (i.hasNext()) {
+        i.next();
+        if (!rhs.mPacStoreSettings.contains(i.key())){
+            qWarning("EapQtPacStoreConfig::operator==(): key not found: %d", i.key());
+            ret = false;
+            
+        }
+        if (i.value() != rhs.mPacStoreSettings[i.key()]){
+            qWarning("EapQtPacStoreConfig::operator==(): values not match");
+            qDebug() << "Expect: " << i.value();
+            qDebug() << "Actual: " << rhs.mPacStoreSettings[i.key()];
+            ret = false;
+        }
+    }
+    return ret;
+}
+
+
+bool EapQtPacStoreConfig::operator=(const EapQtPacStoreConfig & rhs )
+{
+    mPacStoreSettings = rhs.mPacStoreSettings;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtvalidator.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,86 @@
+/*
+ * 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: 
+ *   Stub for EAP WIZARD testing: EAP QT configuration validator interface
+ *
+ */
+
+/*
+ * %version: 2 %
+ */
+
+#ifndef EAPQTVALIDATOR_H
+#define EAPQTVALIDATOR_H
+
+#include <QVariant>
+#include <eapqtconfigdefs.h>
+
+/*!
+ * @addtogroup group_eap_config_api
+ * @{
+ */
+
+class HbLineEdit;
+
+/*!
+ * Eap Qt Validator interface. This interface provides a method to configure
+ * the editor to use required constraints, hints, editor classes and so one
+ * depending on the EAP type and the configuration identifier.
+ * See updateEditor() method for further details.
+ * 
+ * Another important method of this class is the validate() method. With
+ * that method you can check that the content and format is valid for 
+ * given configuration compination.
+ * 
+ * An instance of validator can be created with 
+ * EapQtConfigInterface::validatorEap() method.
+ */
+
+class EapQtValidator
+{
+public:
+
+    /*!
+     * Validation status.
+     */
+    enum Status {
+        /// Ok
+        StatusOk,
+        /// Content is invalid
+        StatusInvalid,
+        /// The length is not valid
+        StatusInvalidLength,
+        /// Invalid characters detected
+        StatusInvalidCharacters,
+        /// Input is too short
+        StatusTooShort, 
+        /// Input is too long
+        StatusTooLong,  
+    };
+    
+public:
+
+    EapQtValidator() {};
+    virtual ~EapQtValidator() {};
+    virtual Status validate(QVariant value) = 0;
+    virtual void updateEditor(HbLineEdit* edit) = 0;
+    
+private:
+
+    Q_DISABLE_COPY(EapQtValidator)
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtvalidator_stub.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,45 @@
+/*
+ * 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: 
+ *   EAP method validator: Stub or EapWizard testing
+ *
+ */
+
+#include "eapqtvalidator_stub.h"
+
+EapQtValidatorStub::EapQtValidatorStub(
+    EapQtValidator::Status status) :
+    mStatus(status)
+{
+}
+
+EapQtValidatorStub::~EapQtValidatorStub()
+{
+}
+
+EapQtValidator::Status EapQtValidatorStub::validate(QVariant value)
+{
+    Q_UNUSED(value);
+    return mStatus;
+}
+
+void EapQtValidatorStub::updateEditor(HbLineEdit *edit)
+{
+    Q_UNUSED(edit);
+}
+
+void EapQtValidatorStub::setReturnValue(EapQtValidator::Status status)
+{
+    mStatus = status;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtvalidator_stub.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,53 @@
+/*
+ * 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: 
+ *   Stub for EAP WIZARD testing: EAP QT configuration validator interface
+ *
+ */
+
+/*
+ * %version: 2 %
+ */
+
+#ifndef EAPQTVALIDATOR_STUB_H
+#define EAPQTVALIDATOR_STUB_H
+
+#include <eapqtvalidator.h>
+
+/*!
+ * @addtogroup group_eap_config_api
+ * @{
+ */
+
+class HbLineEdit;
+
+class EapQtValidatorStub : public EapQtValidator 
+{
+   
+public:
+
+    EapQtValidatorStub(EapQtValidator::Status status);
+    ~EapQtValidatorStub();
+    virtual EapQtValidator::Status validate(QVariant value);
+    void updateEditor(HbLineEdit* edit );
+    void setReturnValue(EapQtValidator::Status status);
+    
+private:
+    EapQtValidator::Status mStatus;
+    Q_DISABLE_COPY(EapQtValidatorStub)
+};
+
+/*! @} */
+
+#endif
--- a/wlanutilities/wlanwizard/t_wlanwizard/stubs/stub_wlanqtutils.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
- * 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 "wlanqtutilsap.h"
-#include "wlanqtutils.h"
-#include <QDebug>
-
-WlanQtUtils::WlanQtUtils() : mWlanAp(NULL)
-{
-    mWlanNetworkActiveIapId = -1;
-    mCalledMethods.append("WlanQtUtils");
-}
-
-WlanQtUtils::~WlanQtUtils()
-{
-    mCalledMethods.append("~WlanQtUtils");
-    delete mWlanAp;
-}
-
-void WlanQtUtils::availableWlanAps(QList<QSharedPointer<WlanQtUtilsAp> > &wlanApList)
-{
-    wlanApList = *mScanResult;
-    mCalledMethods.append("availableWlanAps");
-}
-
-int WlanQtUtils::createIap(const WlanQtUtilsAp * wlanAp)
-{
-    mCalledMethods.append("createIap");
-    delete mWlanAp;
-    mWlanAp = new WlanQtUtilsAp(*wlanAp);
-    return mCreateWlanIapReturn;
-}
-
-bool WlanQtUtils::updateIap(int iapId, const WlanQtUtilsAp * wlanAp)
-{
-    mCalledMethods.append("updateIap"); 
-    qDebug("updateWlanIap iapId = %d", iapId);
-    qDebug("mCreateWlanIapReturn = %d", mCreateWlanIapReturn);
-    delete mWlanAp;
-    mWlanAp = new WlanQtUtilsAp(*wlanAp);
-    QCOMPARE(iapId, mCreateWlanIapReturn);
-    return mUpdateWlanIapReturn;
-}
-
-void WlanQtUtils::deleteIap(int iapId)
-{
-    mCalledMethods.append("deleteIap");
-    QCOMPARE(iapId, mCreateWlanIapReturn);
-}
-
-int WlanQtUtils::connectedWlanId()
-{
-    mCalledMethods.append("connectedWlanId");
-    return mCreateWlanIapReturn;
-}
-
-void WlanQtUtils::connectIap(int iapId, bool runIct)
-{
-    qDebug("connectIap iapId = %d", iapId);
-    qDebug("mCreateWlanIapReturn = %d", mCreateWlanIapReturn);
-    mCalledMethods.append("connectIap");
-    QCOMPARE(iapId, mCreateWlanIapReturn);
-    QCOMPARE(runIct, true);
-    
-    if (mConnectionSuccess) {
-        mWlanNetworkActiveIapId = iapId;
-        emit wlanNetworkOpened(mWlanNetworkOpenedIapId);
-        emit ictResult(mIctResultIapId, mIctResultResults);
-    } else {
-        emit wlanNetworkClosed(
-            mWlanNetworkClosedIapId,
-            mWlanNetworkClosedReason );
-    }
-}
-
-void WlanQtUtils::disconnectIap(int iapId)
-{
-    qDebug("disconnectIap iapId = %d", iapId);
-    qDebug("mCreateWlanIapReturn = %d", mCreateWlanIapReturn);
-    mCalledMethods.append("disconnectIap");
-    QCOMPARE(iapId, mCreateWlanIapReturn);
-}
-
-int WlanQtUtils::activeIap()
-{
-    mCalledMethods.append("activeIap");
-    return mCreateWlanIapReturn;
-}
-
-void WlanQtUtils::scanWlanAps()
-{
-    mCalledMethods.append("scanWlanAps");
-    mScanResult = &mScanWlanAps;
-    
-    emit wlanScanApReady();
-}
-
-void WlanQtUtils::scanWlanDirect(const QString &ssid)
-{
-    mCalledMethods.append("scanWlanDirect");
-    QCOMPARE(ssid, mScanWlanDirectSsid);
-    mScanResult = &mScanWlanDirect;
-    
-    emit wlanScanDirectReady();
-}
-
-void WlanQtUtils::stopWlanScan()
-{
-    mCalledMethods.append("stopWlanScan");
-}
-
--- a/wlanutilities/wlanwizard/t_wlanwizard/stubs/stub_wlanqtutilsap.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * 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:
- * This is the source file for WlanQtUtilsAp class.
- */
-
-#include <QString>
-#include <QHash>
-#include <QVariant>
-#include <QDebug>
-#include "wlanqtutilscommon.h"
-#include "wlanqtutilsap.h"
-
-class WlanQtUtilsApPrivate
-{
-    friend class WlanQtUtilsAp;
-
-private:
-    QHash<int, QVariant> mConfigurations;
-};
-
-WlanQtUtilsAp::WlanQtUtilsAp() :
-    d_ptr(new WlanQtUtilsApPrivate())
-{
-}
-
-WlanQtUtilsAp::WlanQtUtilsAp(const WlanQtUtilsAp &ref) :
-    d_ptr(new WlanQtUtilsApPrivate())
-{
-    d_ptr->mConfigurations = ref.d_ptr->mConfigurations;
-}
-
-WlanQtUtilsAp::~WlanQtUtilsAp()
-{
-    d_ptr->mConfigurations.clear();
-    delete d_ptr;
-}
-
-QVariant WlanQtUtilsAp::value(int identifier) const
-{
-    return d_ptr->mConfigurations[identifier];
-}
-
-void WlanQtUtilsAp::setValue(int identifier, QVariant value)
-{
-    d_ptr->mConfigurations[identifier] = value;
-}
-
-bool WlanQtUtilsAp::operator==(const WlanQtUtilsAp & rhs ) const
-{
-    bool ret = true;
-    if (d_ptr->mConfigurations.size() != rhs.d_ptr->mConfigurations.size()) {
-        qWarning("WlanQtUtilsAp::operator==(): size: expect %d, actual %d ",
-            d_ptr->mConfigurations.size(),
-            rhs.d_ptr->mConfigurations.size() );
-        ret = false;
-    }
-    QHashIterator<int, QVariant> i(d_ptr->mConfigurations);
-    
-    while (i.hasNext()) {
-        i.next();
-        if (!rhs.d_ptr->mConfigurations.contains(i.key())){
-            qWarning("WlanQtUtilsAp::operator==(): key not found: %d", i.key());
-            ret = false;
-            
-        }
-        if (i.value() != rhs.d_ptr->mConfigurations[i.key()]){
-            qWarning("WlanQtUtilsAp::operator==(): values not match");
-            qDebug() << "Expect: " << i.value();
-            qDebug() << "Actual: " << i.value();
-            ret = false;
-        }
-    }
-    return ret;
-}
-
-
--- a/wlanutilities/wlanwizard/t_wlanwizard/stubs/stubs.pri	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/stubs.pri	Tue Jul 06 15:29:22 2010 +0300
@@ -18,13 +18,30 @@
 
 DEFINES += BUILD_WLANQTUTILITIES_DLL
 
-HEADERS   += \
-             stubs/wlanqtutils.h \
-             stubs/wlanqtutilscommon.h \
-             stubs/wlanqtutilsap.h \
-             stubs/context_wlanqtutils.h
-             
-SOURCES   += \
-             stubs/stub_wlanqtutils.cpp \
-             stubs/stub_wlanqtutilsap.cpp \
-             stubs/context_wlanqtutils.cpp
+HEADERS += \
+    stubs/eapqtcertificateinfo.h \
+    stubs/eapqtconfig.h \
+    stubs/eapqtconfiginterface.h \
+    stubs/eapqtconfiginterface_context.h \
+    stubs/eapqtpacstoreconfig.h \
+    stubs/eapqtvalidator.h \
+    stubs/eapqtvalidator_stub.h \
+    stubs/wlanmgmtclient.h \
+    stubs/wlanmgmtclient_context.h \
+    stubs/wlanqtutils.h \
+    stubs/wlanqtutils_context.h \
+    stubs/wlanqtutilsap.h \
+    stubs/wlanqtutilscommon.h
+    
+SOURCES += \
+    stubs/eapqtcertificateinfo_stub.cpp \
+    stubs/eapqtconfig_stub.cpp \
+    stubs/eapqtconfiginterface_stub.cpp \
+    stubs/eapqtconfiginterface_context.cpp \
+    stubs/eapqtpacstoreconfig_stub.cpp \
+    stubs/eapqtvalidator_stub.cpp \
+    stubs/wlanmgmtclient_stub.cpp \
+    stubs/wlanmgmtclient_context.cpp \
+    stubs/wlanqtutils_context.cpp \
+    stubs/wlanqtutils_stub.cpp \
+    stubs/wlanqtutilsap_stub.cpp 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanmgmtclient.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* 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:
+* WLAN Management API stubbing for WLAN Qt Utilities.
+*/
+
+#ifndef WLANMGMTCLIENT_H
+#define WLANMGMTCLIENT_H
+
+#include "wlanmgmtcommon.h"
+#include "wlanscaninfo.h"
+
+class WlanMgmtClientContext;
+
+// CLASS DECLARATION
+
+class CWlanMgmtClient : public CBase
+    {
+    public:  // Methods
+
+        // Constructors and destructor
+
+        /**
+         * Static constructor.
+         * @return Pointer to the constructed object.
+         */
+        static CWlanMgmtClient* NewL();
+
+        /**
+         * Destructor.
+         */
+        ~CWlanMgmtClient();
+
+        /**
+         * Start Protected Setup.
+         *
+         * @param aStatus Status of the calling active object. On successful
+         *                completion contains KErrNone, otherwise one of the
+         *                system-wide error codes.
+         * @param aSsid SSID of the network to configure.
+         * @param aWpsPin PIN value to be used. "00000000" (string of eight zeros)
+         *                if push button method is used.
+         * @param aCredentials Results of a successful Protected Setup operation.
+         * @sa \link psetup Protected Setup-specific error codes \endlink.
+         */
+        virtual void RunProtectedSetup(
+            TRequestStatus& aStatus,
+            const TWlanSsid& aSsid,
+            const TWlanWpsPin& aWpsPin,
+            CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials );
+        
+        /**
+         * Cancel an outstanding Protected Setup operation.
+         */
+        virtual void CancelProtectedSetup();
+        
+    private: // Data
+        
+        CWlanMgmtClient();
+        CArrayFixSeg<TWlanProtectedSetupCredentialAttribute> *iResults;
+        TWlanSsid iSsid;
+        TInt iCompletionCode;
+        
+        friend class WlanMgmtClientContext;
+    };
+
+#endif // WLANMGMTCLIENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanmgmtclient_context.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,84 @@
+/*
+ * 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 <QTest>
+
+#include "wlanmgmtclient_context.h"
+
+WlanMgmtClientContext::WlanMgmtClientContext() : 
+    mWlanMgmtClient(NULL)
+{
+}
+
+WlanMgmtClientContext::~WlanMgmtClientContext()
+{
+}
+
+void WlanMgmtClientContext::setObject(CWlanMgmtClient *wlanMgmtClient)
+{
+    mWlanMgmtClient = wlanMgmtClient;
+}
+
+
+void WlanMgmtClientContext::setRunProtectedSetup(const QString &ssid, int completionCode)
+{
+    mWlanMgmtClient->iSsid.Copy((unsigned char*)ssid.toAscii().constData()); 
+    mWlanMgmtClient->iCompletionCode = completionCode;
+}
+
+void WlanMgmtClientContext::appendResult(
+    const QString &ssid,
+    int securityMode,
+    int operatingMode,
+    int defaultWepKeyIndex,
+    const QString &wepKey1,
+    const QString &wepKey2,
+    const QString &wepKey3,
+    const QString &wepKey4,
+    const QString &wpaKey)
+{
+    TWlanProtectedSetupCredentialAttribute attr;
+    
+    attr.iOperatingMode =(TWlanOperatingMode)operatingMode;
+    attr.iSecurityMode = (TWlanIapSecurityMode)securityMode;
+    
+    attr.iSsid.Copy(
+        (unsigned char*)ssid.toLatin1().constData(), 
+        ssid.length());
+    
+    attr.iWepKey1.Copy(
+        (unsigned char*)wepKey1.toLatin1().constData(), 
+        wepKey1.length());
+    
+    attr.iWepKey2.Copy(
+        (unsigned char*)wepKey2.toLatin1().constData(), 
+        wepKey2.length());
+    
+    attr.iWepKey3.Copy(
+        (unsigned char*)wepKey3.toLatin1().constData(), 
+        wepKey3.length());
+    
+    attr.iWepKey4.Copy(
+        (unsigned char*)wepKey4.toLatin1().constData(), 
+        wepKey4.length());
+    
+    attr.iWepDefaultKey = (TWlanDefaultWepKey)defaultWepKeyIndex;
+    
+    attr.iWpaPreSharedKey.Copy(
+        (unsigned char*)wpaKey.toLatin1().constData(), 
+            wpaKey.length());
+
+    mWlanMgmtClient->iResults->AppendL(attr);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanmgmtclient_context.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* 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:
+*/
+
+#ifndef WLANMGMTCLIENT_CONTEXT_H
+#define WLANMGMTCLIENT_CONTEXT_H
+
+#include "wlanmgmtclient.h"
+
+class WlanMgmtClientContext
+{
+public:
+    WlanMgmtClientContext();
+    ~WlanMgmtClientContext();
+
+    void setObject(CWlanMgmtClient *eapQtConfig);
+public:
+    
+    void setRunProtectedSetup(const QString &ssid, int completionCode);
+    void appendResult(
+        const QString &ssid,
+        int securityMode,
+        int operatingMode,
+        int defaultWepKeyIndex,
+        const QString &wepKey1 = QString(),
+        const QString &wepKey2 = QString(),
+        const QString &wepKey3 = QString(),
+        const QString &wepKey4 = QString(),
+        const QString &wpaKey  = QString());
+    
+private:
+    CWlanMgmtClient* mWlanMgmtClient;
+    
+};
+
+#endif /* WLANMGMTCLIENT_CONTEXT_H */
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanmgmtclient_stub.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,83 @@
+/*
+* 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:
+* WLAN Management API stubbing for WLAN Qt Utilities.
+*/
+
+#include <QTest>
+
+#include <e32std.h>
+#include <e32base.h>
+#include <e32cmn.h>
+#include "wlanmgmtclient.h"
+#include "testwlanwizardcontext.h"
+
+// ---------------------------------------------------------
+// CWlanScanRequest::NewL
+// ---------------------------------------------------------
+//
+CWlanMgmtClient* CWlanMgmtClient::NewL()
+    {
+    CWlanMgmtClient* self = new CWlanMgmtClient;
+
+    TestWlanWizardContext::setWlanMgmtClientObject(self);
+    return self;
+    }
+    
+// ---------------------------------------------------------
+// CWlanScanRequest::~CWlanMgmtClient
+// ---------------------------------------------------------
+//
+CWlanMgmtClient::~CWlanMgmtClient()
+    {
+    delete iResults;
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::CWlanMgmtClient
+// ---------------------------------------------------------
+//
+CWlanMgmtClient::CWlanMgmtClient()
+    {
+    iResults = new (ELeave) CArrayFixSeg<TWlanProtectedSetupCredentialAttribute> (4);
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::RunProtectedSetup
+// ---------------------------------------------------------
+//
+void CWlanMgmtClient::RunProtectedSetup(
+    TRequestStatus& aStatus,
+    const TWlanSsid& aSsid,
+    const TWlanWpsPin& aWpsPin,
+    CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials )
+{
+    Q_UNUSED(aWpsPin);
+    QCOMPARE(aSsid, iSsid);
+    for (int i = 0 ; i < iResults->Count() ; ++i){
+        aCredentials.AppendL(iResults->At(i));
+    }
+    User::RequestComplete(&aStatus, iCompletionCode);
+}
+
+// ---------------------------------------------------------
+// CWlanScanRequest::CancelProtectedSetup
+// ---------------------------------------------------------
+//
+void CWlanMgmtClient::CancelProtectedSetup()
+    {
+    // TODO
+    //User::RequestComplete(iStubRequestStatus, KErrCancel);
+    //iStubRequestStatus = 0;
+    }
--- a/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutils.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutils.h	Tue Jul 06 15:29:22 2010 +0300
@@ -36,6 +36,38 @@
     //! "None" IAP ID value (e.g. for "not found" cases)
     static const int IapIdNone = -1;
     
+    /*!
+        WLAN connection status.
+        Remember to update traces/trace.properties when modifying this enum.
+    */
+    enum ConnStatus {
+        ConnStatusNone = 0,         //!< Reserved.
+        ConnStatusConnecting,       //!< Connecting.
+        ConnStatusConnected,        //!< Connected.
+        ConnStatusDisconnected      //!< Disconnected.
+    };
+    
+    /*!
+        WLAN scan status
+        Remember to update traces/trace.properties when modifying this enum.
+    */
+    enum ScanStatus {
+        ScanStatusOk = 0,           //!< Scan succeeded.
+        ScanStatusCancelled,        //!< Scan was cancelled.
+        ScanStatusError             //!< Scan failed.
+    };
+    
+    /*! 
+        Internet Connectivity Test status.
+        Remember to update traces/trace.properties when modifying this enum.
+    */        
+    enum IctStatus {
+        IctPassed = 0,              //!< Normal ICT passed.
+        IctHotspotPassed,           //!< Hotspot ICT passed.
+        IctCancelled,               //!< ICT was cancelled.
+        IctFailed                   //!< ICT failed.
+    }; 
+
 public:
     WlanQtUtils();
     
@@ -65,21 +97,20 @@
 
 signals:
     
-    void wlanScanApReady();
+    void wlanScanApReady(int scanStatus);
    
-    void wlanScanDirectReady();
+    void wlanScanDirectReady(int scanStatus);
     
     void wlanNetworkOpened(int iapId);
 
     void wlanNetworkClosed(int iapId, int reason);
 
-#ifdef ICT_RESULT_ENUM
-    void ictResult(int iapId, WlanLoginIctsResultType result);
-#else
-    void ictResult(int iapId, bool result);
-#endif
+    void ictResult(int iapId, int result);
 
 private: // Return values for all methods.
+    
+    void emitScanApsReady();
+    
     QList<QSharedPointer<WlanQtUtilsAp> > mScanWlanAps;
     QList<QSharedPointer<WlanQtUtilsAp> > mScanWlanDirect;
     QList<QSharedPointer<WlanQtUtilsAp> > *mScanResult;
@@ -90,19 +121,23 @@
     int mWlanNetworkOpenedIapId;
     int mWlanNetworkActiveIapId;
     int mWlanNetworkClosedIapId;
-    bool mWlanNetworkClosedReason;
+    int mWlanNetworkClosedReason;
+    
+    int mActiveWlanIapReturn;
     
     int mIctResultIapId;
-#ifdef ICT_RESULT_ENUM
-    WlanLoginIctsResultType mIctResultResults;
-#else
-    bool mIctResultResults;
-#endif
+    WlanQtUtils::IctStatus mIctResultResults;
+
     bool mConnectionSuccess;
     
     QStringList mCalledMethods;
     
     WlanQtUtilsAp *mWlanAp;
+    
+    bool mEmitScanApReady;
+    
+    int mScanApStatus;
+    int mScanDirectStatus;
 };
 
 #endif /* WLANQTUTILS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutils_context.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,135 @@
+/*
+* 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 "wlanqtutils_context.h"
+#include "wlanqtutils.h"
+#include "wlanqtutilsap.h"
+
+WlanQtUtilsContext::WlanQtUtilsContext(WlanQtUtils *utils )
+: mUtils(utils)
+{
+    
+    
+}
+
+WlanQtUtilsContext::~WlanQtUtilsContext()
+{
+    
+}
+  
+void WlanQtUtilsContext::setScanWlanApsResult(
+    QList<QSharedPointer<WlanQtUtilsAp> > result )
+{
+    mUtils->mScanWlanAps = result;
+}
+
+void WlanQtUtilsContext::setScanWlanDirectResult( QString ssid,
+    QList<QSharedPointer<WlanQtUtilsAp> > result )
+{
+    mUtils->mScanWlanDirectSsid = ssid;
+    mUtils->mScanWlanDirect = result;
+}
+
+void WlanQtUtilsContext::setCreateWlanIapResult(int iapId)
+{
+    mUtils->mCreateWlanIapReturn = iapId;
+    mUtils->mActiveWlanIapReturn = iapId;
+}
+
+void WlanQtUtilsContext::setActiveWlanIapResult(int iapId)
+{
+    mUtils->mActiveWlanIapReturn = iapId;
+}
+
+void WlanQtUtilsContext::setUpdateWlanIapResult(bool returnValue)
+{
+    mUtils->mUpdateWlanIapReturn = returnValue;
+}
+        
+void WlanQtUtilsContext::setConnectionSuccessed(bool value)
+{
+    mUtils->mConnectionSuccess = value;
+}
+    
+void WlanQtUtilsContext::setSignalWlanNetworkOpened(int iapId)
+{
+    mUtils->mWlanNetworkOpenedIapId = iapId;
+}
+ 
+void WlanQtUtilsContext::setSignalWlanNetworkClosed(int iapId, int reason)
+{
+    mUtils->mWlanNetworkClosedIapId = iapId;
+    mUtils->mWlanNetworkClosedReason = reason;
+}
+
+void WlanQtUtilsContext::setSignalIctResult(int iapId, WlanQtUtils::IctStatus result)
+{
+    mUtils->mIctResultIapId = iapId;
+    mUtils->mIctResultResults = result;
+}
+
+void WlanQtUtilsContext::setScanApStatus(int status)
+{
+    mUtils->mScanApStatus = status;
+}
+
+void WlanQtUtilsContext::setScanDirectStatus(int status)
+{
+    mUtils->mScanDirectStatus = status;
+}
+
+void WlanQtUtilsContext::setImmediateApScanResult(bool immediate)
+{
+    mUtils->mEmitScanApReady = immediate;
+}
+
+void WlanQtUtilsContext::emitScanApReady()
+{
+    mUtils->emitScanApsReady();
+}
+    
+QStringList WlanQtUtilsContext::calledMethods()
+{
+    QStringList methods = mUtils->mCalledMethods;
+    mUtils->mCalledMethods.clear();
+    return methods;
+}
+    
+bool WlanQtUtilsContext::verifyWlanIapSettings(WlanQtUtilsAp &ref)
+{
+    bool ret = true;
+    if (!mUtils->mWlanAp){
+        qWarning("WlanQtUtilsContext::verifyWlanIapSettings: iap not created");
+        ret = false;
+    }
+    
+    if (!(*(mUtils->mWlanAp) == ref)){
+        qWarning("WlanQtUtilsContext::verifyWlanIapSettings: settings does not match");
+        ret = false;
+    }
+    return ret;
+}
+
+void WlanQtUtilsContext::emitWlanNetworkOpened(int iapId)
+{
+    emit mUtils->wlanNetworkOpened(iapId);
+}
+
+void WlanQtUtilsContext::emitWlanNetworkClosed(int iapId, int reason)
+{
+    emit mUtils->wlanNetworkClosed(iapId, reason);   
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutils_context.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* 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:
+*/
+
+#ifndef WLANQTUTILS_CONTEXT_H
+#define WLANQTUTILS_CONTEXT_H
+
+#include <QObject>
+#include <QSharedPointer>
+
+#include "wlanqtutilscommon.h"
+#include "wlanqtutils.h"
+
+class WlanQtUtilsWlanIap;
+class WlanQtUtilsAp;
+
+class Q_DECL_EXPORT WlanQtUtilsContext: public QObject
+{
+    Q_OBJECT
+
+public:
+    WlanQtUtilsContext(WlanQtUtils *utils );
+    ~WlanQtUtilsContext();
+  
+public:
+    void setScanWlanApsResult( QList<QSharedPointer<WlanQtUtilsAp> > result );
+    
+    void setScanWlanDirectResult( QString ssid, 
+        QList<QSharedPointer<WlanQtUtilsAp> > result );
+    
+    void setCreateWlanIapResult(int iapId);
+    
+    void setActiveWlanIapResult(int iapId);
+    
+    void setUpdateWlanIapResult(bool returnValue);
+    
+    void setConnectionSuccessed(bool value);
+    
+    void setSignalWlanNetworkOpened(int iapId);
+    
+    void setSignalWlanNetworkClosed(int iapId, int reason);
+    
+    void setSignalIctResult(int iapId, WlanQtUtils::IctStatus result);
+    
+    void setImmediateApScanResult(bool immediate);
+    
+    void setScanApStatus(int status);
+    
+    void setScanDirectStatus(int status);
+    
+    void emitScanApReady();
+    
+    QStringList calledMethods();
+    
+    bool verifyWlanIapSettings(WlanQtUtilsAp &ref);
+    
+    void emitWlanNetworkOpened(int iapId);
+    void emitWlanNetworkClosed(int iapId, int reason);
+        
+private:
+    WlanQtUtils* mUtils;
+};
+
+#endif /* WLANQTUTILS_CONTEXT_H */
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutils_stub.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,138 @@
+/*
+ * 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 "wlanqtutilsap.h"
+#include "wlanqtutils.h"
+#include <QDebug>
+
+WlanQtUtils::WlanQtUtils() : mWlanAp(NULL), mEmitScanApReady(true),
+mScanApStatus(ScanStatusOk), mScanDirectStatus(ScanStatusOk)
+{
+    mWlanNetworkActiveIapId = -1;
+    mCalledMethods.append("WlanQtUtils");
+}
+
+WlanQtUtils::~WlanQtUtils()
+{
+    mCalledMethods.append("~WlanQtUtils");
+    delete mWlanAp;
+}
+
+void WlanQtUtils::availableWlanAps(QList<QSharedPointer<WlanQtUtilsAp> > &wlanApList)
+{
+    wlanApList = *mScanResult;
+    mCalledMethods.append("availableWlanAps");
+}
+
+int WlanQtUtils::createIap(const WlanQtUtilsAp * wlanAp)
+{
+    mCalledMethods.append("createIap");
+    delete mWlanAp;
+    mWlanAp = new WlanQtUtilsAp(*wlanAp);
+    return mCreateWlanIapReturn;
+}
+
+bool WlanQtUtils::updateIap(int iapId, const WlanQtUtilsAp * wlanAp)
+{
+    mCalledMethods.append("updateIap"); 
+    qDebug("updateWlanIap iapId = %d", iapId);
+    qDebug("mCreateWlanIapReturn = %d", mCreateWlanIapReturn);
+    delete mWlanAp;
+    mWlanAp = new WlanQtUtilsAp(*wlanAp);
+    QCOMPARE(iapId, mCreateWlanIapReturn);
+    return mUpdateWlanIapReturn;
+}
+
+void WlanQtUtils::deleteIap(int iapId)
+{
+    mCalledMethods.append("deleteIap");
+    QCOMPARE(iapId, mCreateWlanIapReturn);
+}
+
+int WlanQtUtils::connectedWlanId()
+{
+    mCalledMethods.append("connectedWlanId");
+    return mCreateWlanIapReturn;
+}
+
+void WlanQtUtils::connectIap(int iapId, bool runIct)
+{
+    qDebug("connectIap iapId = %d", iapId);
+    qDebug("mCreateWlanIapReturn = %d", mCreateWlanIapReturn);
+    mCalledMethods.append("connectIap");
+    QCOMPARE(iapId, mCreateWlanIapReturn);
+    QCOMPARE(runIct, true);
+    
+    if (mConnectionSuccess) {
+        mWlanNetworkActiveIapId = iapId;
+        emit wlanNetworkOpened(mWlanNetworkOpenedIapId);
+        emit ictResult(mIctResultIapId - 1, false);
+        emit ictResult(mIctResultIapId, mIctResultResults);
+    } else {
+        emit wlanNetworkClosed(
+            mWlanNetworkClosedIapId -1,
+            mWlanNetworkClosedReason );
+        
+        emit wlanNetworkClosed(
+            mWlanNetworkClosedIapId,
+            mWlanNetworkClosedReason );
+    }
+}
+
+void WlanQtUtils::disconnectIap(int iapId)
+{
+    qDebug("disconnectIap iapId = %d", iapId);
+    qDebug("mActiveWlanIapReturn = %d", mActiveWlanIapReturn);
+    mCalledMethods.append("disconnectIap");
+    QCOMPARE(iapId, mActiveWlanIapReturn);
+}
+
+int WlanQtUtils::activeIap()
+{
+    mCalledMethods.append("activeIap");
+    return mActiveWlanIapReturn;
+}
+
+void WlanQtUtils::scanWlanAps()
+{
+    mCalledMethods.append("scanWlanAps");
+    mScanResult = &mScanWlanAps;
+    
+    if(mEmitScanApReady) {
+        emit wlanScanApReady(mScanApStatus);
+    }
+}
+
+void WlanQtUtils::scanWlanDirect(const QString &ssid)
+{
+    mCalledMethods.append("scanWlanDirect");
+    QCOMPARE(ssid, mScanWlanDirectSsid);
+    mScanResult = &mScanWlanDirect;
+    
+    emit wlanScanDirectReady(mScanDirectStatus);
+}
+
+void WlanQtUtils::stopWlanScan()
+{
+    mCalledMethods.append("stopWlanScan");
+}
+
+void WlanQtUtils::emitScanApsReady()
+{
+    emit wlanScanApReady(mScanApStatus);
+}
+
+
--- a/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutilsap.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutilsap.h	Tue Jul 06 15:29:22 2010 +0300
@@ -114,6 +114,10 @@
     void setValue(int identifier, QVariant value );
     bool operator==(const WlanQtUtilsAp & rhs ) const;
     
+    static bool compare(
+        const WlanQtUtilsAp *ap1,
+        const WlanQtUtilsAp *ap2);
+
 private:
     WlanQtUtilsApPrivate *d_ptr;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutilsap_stub.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,117 @@
+/*
+ * 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:
+ * This is the source file for WlanQtUtilsAp class.
+ */
+
+#include <QString>
+#include <QHash>
+#include <QVariant>
+#include <QDebug>
+#include "wlanqtutilscommon.h"
+#include "wlanqtutilsap.h"
+
+class WlanQtUtilsApPrivate
+{
+    friend class WlanQtUtilsAp;
+
+private:
+    QHash<int, QVariant> mConfigurations;
+};
+
+WlanQtUtilsAp::WlanQtUtilsAp() :
+    d_ptr(new WlanQtUtilsApPrivate())
+{
+}
+
+WlanQtUtilsAp::WlanQtUtilsAp(const WlanQtUtilsAp &ref) :
+    d_ptr(new WlanQtUtilsApPrivate())
+{
+    d_ptr->mConfigurations = ref.d_ptr->mConfigurations;
+}
+
+WlanQtUtilsAp::~WlanQtUtilsAp()
+{
+    d_ptr->mConfigurations.clear();
+    delete d_ptr;
+}
+
+QVariant WlanQtUtilsAp::value(int identifier) const
+{
+    return d_ptr->mConfigurations[identifier];
+}
+
+void WlanQtUtilsAp::setValue(int identifier, QVariant value)
+{
+    d_ptr->mConfigurations[identifier] = value;
+}
+
+bool WlanQtUtilsAp::operator==(const WlanQtUtilsAp & rhs ) const
+{
+    bool ret = true;
+    if (d_ptr->mConfigurations.size() != rhs.d_ptr->mConfigurations.size()) {
+        qWarning("WlanQtUtilsAp::operator==(): size: expect %d, actual %d ",
+            d_ptr->mConfigurations.size(),
+            rhs.d_ptr->mConfigurations.size() );
+        ret = false;
+    }
+    QHashIterator<int, QVariant> i(d_ptr->mConfigurations);
+    
+    while (i.hasNext()) {
+        i.next();
+        if (!rhs.d_ptr->mConfigurations.contains(i.key())){
+            qWarning("WlanQtUtilsAp::operator==(): key not found: %d", i.key());
+            ret = false;
+            
+        }
+        if (i.value() != rhs.d_ptr->mConfigurations[i.key()]){
+            qWarning("WlanQtUtilsAp::operator==(): values not match %d", i.key());
+            qDebug() << "Expect: " << i.value();
+            qDebug() << "Actual: " << rhs.d_ptr->mConfigurations[i.key()];
+            ret = false;
+        }
+    }
+    return ret;
+}
+
+/*!
+    AP comparison function.
+
+    @param [in] ap1 First AP to compare.
+    @param [in] ap2 Second AP to compare.
+
+    @return TRUE, if APs are considered to be same.
+*/
+
+bool WlanQtUtilsAp::compare(
+    const WlanQtUtilsAp *ap1,
+    const WlanQtUtilsAp *ap2)
+{
+    bool equal = false;
+    
+    // SSID (case sensitive) and security mode (with or without PSK)
+    // are the values, which identify a unique access point.
+    if (ap1->value(WlanQtUtilsAp::ConfIdSsid) ==
+        ap2->value(WlanQtUtilsAp::ConfIdSsid)
+        && ap1->value(WlanQtUtilsAp::ConfIdSecurityMode) == 
+           ap2->value(WlanQtUtilsAp::ConfIdSecurityMode)
+           && ap1->value(WlanQtUtilsAp::ConfIdWpaPskUse) ==
+              ap2->value(WlanQtUtilsAp::ConfIdWpaPskUse)) {
+        equal = true;
+    }
+    
+    return equal;
+}
+
+
--- a/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutilscommon.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutilscommon.h	Tue Jul 06 15:29:22 2010 +0300
@@ -36,16 +36,6 @@
 // Maximum length of WPA key
 static const int KMaxWPAKeyLen = 256;
 
-#ifdef ICT_RESULT_ENUM
-enum WlanLoginIctsResultType {
-   IctsPassed,      // Icts is passed
-   IctsHotspotPassed,                  // Icts and Hotspot authentication are passed
-   IctsCanceled,          // User has canceled operation
-   IctsFailed
-};                   // Icts or/and Hotspot authentication are failed
-#endif
-
-
 /**
  * Bearer type.
  */
--- a/wlanutilities/wlanwizard/t_wlanwizard/t_wlanwizard.pro	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/t_wlanwizard/t_wlanwizard.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -17,77 +17,125 @@
 include(stubs/stubs.pri)
 include(ut/ut.pri)
 
-QT 		+= testlib
-CONFIG 	+= hb qtestlib
+QT         += testlib
+CONFIG     += hb qtestlib
 
 TEMPLATE = app
 TARGET = t_wlanwizard
 
 DEPENDPATH += .
-MOC_DIR    = _moc
-RCC_DIR    = _resources
+MOC_DIR    = build
+RCC_DIR    = build
 
 VERSION = 0.0.1
 
 DEFINES += BUILD_WLAN_WIZARD_DLL
-DEFINES += WLAN_WIZARD_RND
+DEFINES += BUILD_EAP_WIZARD_DLL
+DEFINES += BUILD_WPS_WIZARD_DLL
 
 RESOURCES += ../resources/resource.qrc
+RESOURCES += ../../eapwizard/resources/eapwizard_resource.qrc
+RESOURCES += ../../wpswizard/resources/wpswizard_resource.qrc
 
 INCLUDEPATH += \
-		stubs \
-		$$MW_LAYER_SYSTEMINCLUDE \
-		$$OS_LAYER_SYSTEMINCLUDE
-
+    stubs
+        
 # OST trace system requires traces directory to be in USERINCLUDES
 MMP_RULES += "USERINCLUDE ../traces"
 
 # WLAN WIZARD HEADERS
 HEADERS   += \
-             ../inc/wlanwizard.h \
-             ../inc/wlanwizard_p.h \
-             ../inc/wlanwizardpage.h \
-             ../inc/wlanwizardhelper.h \
-             ../inc/wlanwizardutils.h \
-             ../inc/wlanwizardpageinternal.h \
-             ../inc/wlanwizardpagekeyquery.h \
-             ../inc/wlanwizardpageprocessingsettings.h \
-             ../inc/wlanwizardpagesummary.h \
-             ../inc/wlanwizardsummaryviewitem.h \
-             ../inc/wlanwizardpagegenericerror.h \
-             ../inc/wlanwizardpagenetworkmode.h \
-             ../inc/wlanwizardpagescanning.h \
-             ../inc/wlanwizardpagesecuritymode.h \
-             ../inc/wlanwizardpagessid.h 
+    ../inc/wlanwizard.h \
+    ../inc/wlanwizard_p.h \
+    ../inc/wlanwizardscanlist.h \
+    ../inc/wlanwizardpage.h \
+    ../inc/wlanwizardhelper.h \
+    ../inc/wlanwizardutils.h \
+    ../inc/wlanwizardpageinternal.h \
+    ../inc/wlanwizardpagekeyquery.h \
+    ../inc/wlanwizardpageprocessingsettings.h \
+    ../inc/wlanwizardpagesummary.h \
+    ../inc/wlanwizardsummaryviewitem.h \
+    ../inc/wlanwizardpagegenericerror.h \
+    ../inc/wlanwizardpagenetworkmode.h \
+    ../inc/wlanwizardpagescanning.h \
+    ../inc/wlanwizardpagesecuritymode.h \
+    ../inc/wlanwizardpagessid.h 
 
-# WLAN WIZARD SOURCES             
-SOURCES   += ../src/wlanwizard.cpp \
-             ../src/wlanwizard_p.cpp \
-             ../src/wlanwizardutils.cpp \
-             ../src/wlanwizardpageinternal.cpp \
-             ../src/wlanwizardpagekeyquery.cpp \
-             ../src/wlanwizardpageprocessingsettings.cpp \
-             ../src/wlanwizardpagesummary.cpp \
-             ../src/wlanwizardsummaryviewitem.cpp \
-             ../src/wlanwizardpagegenericerror.cpp \
-             ../src/wlanwizardpagenetworkmode.cpp \
-             ../src/wlanwizardpagescanning.cpp \
-             ../src/wlanwizardpagesecuritymode.cpp \
-             ../src/wlanwizardpagessid.cpp
+# WLAN WIZARD SOURCES    
+SOURCES   += \
+    ../src/wlanwizard.cpp \
+    ../src/wlanwizard_p.cpp \
+    ../src/wlanwizardscanlist.cpp \
+    ../src/wlanwizardutils.cpp \
+    ../src/wlanwizardpageinternal.cpp \
+    ../src/wlanwizardpagekeyquery.cpp \
+    ../src/wlanwizardpageprocessingsettings.cpp \
+    ../src/wlanwizardpagesummary.cpp \
+    ../src/wlanwizardsummaryviewitem.cpp \
+    ../src/wlanwizardpagegenericerror.cpp \
+    ../src/wlanwizardpagenetworkmode.cpp \
+    ../src/wlanwizardpagescanning.cpp \
+    ../src/wlanwizardpagesecuritymode.cpp \
+    ../src/wlanwizardpagessid.cpp
+  
+# EAP Wizard headers
+HEADERS += \
+    ../../eapwizard/inc/eapwizard.h \
+    ../../eapwizard/inc/eapwizard_p.h \
+    ../../eapwizard/inc/eapwizardpage.h \
+    ../../eapwizard/inc/eapwizardpageoutertype.h \
+    ../../eapwizard/inc/eapwizardpagecertca.h \
+    ../../eapwizard/inc/eapwizardpagecertuser.h \
+    ../../eapwizard/inc/eapwizardpageidentity.h \
+    ../../eapwizard/inc/eapwizardpageinnertype.h \
+    ../../eapwizard/inc/eapwizardpageusernamepassword.h \
+    ../../eapwizard/inc/eapwizardpagenewpacstore.h \
+    ../../eapwizard/inc/eapwizardpagepacstorepasswordconfirm.h
+
+# EAP Wizard sources
+SOURCES += \
+    ../../eapwizard/src/eapwizard.cpp \
+    ../../eapwizard/src/eapwizard_p.cpp \ 
+    ../../eapwizard/src/eapwizardpage.cpp \
+    ../../eapwizard/src/eapwizardpageoutertype.cpp \
+    ../../eapwizard/src/eapwizardpagecertca.cpp \
+    ../../eapwizard/src/eapwizardpagecertuser.cpp \
+    ../../eapwizard/src/eapwizardpageidentity.cpp \
+    ../../eapwizard/src/eapwizardpageinnertype.cpp \
+    ../../eapwizard/src/eapwizardpageusernamepassword.cpp \
+    ../../eapwizard/src/eapwizardpagenewpacstore.cpp \
+    ../../eapwizard/src/eapwizardpagepacstorepasswordconfirm.cpp
+    
+# WPS Wizard sources
+HEADERS += \
+    ../../wpswizard/inc/wpswizard.h \
+    ../../wpswizard/inc/wpswizard_p.h \
+    ../../wpswizard/inc/wpswizardpage.h \
+    ../../wpswizard/inc/wpswizardsteptwo.h \
+    ../../wpswizard/inc/wpswizardstepthreebutton.h \
+    ../../wpswizard/inc/wpswizardstepthreenumber.h \
+    ../../wpswizard/inc/wpswizardstepfour.h \
+    ../../wpswizard/inc/wpswizardstepfour_p.h \
+    ../../wpswizard/inc/wpswizardstepfive.h \
+    ../../wpswizard/inc/cwpsactiverunner.h \
+    ../../wpswizard/inc/mwpsactiverunnercallback.h \
+    
+SOURCES += \ 
+    ../../wpswizard/src/wpswizard.cpp \
+    ../../wpswizard/src/wpswizard_p.cpp \    
+    ../../wpswizard/src/wpswizardpage.cpp \
+    ../../wpswizard/src/wpswizardsteptwo.cpp \
+    ../../wpswizard/src/wpswizardstepthreebutton.cpp \
+    ../../wpswizard/src/wpswizardstepthreenumber.cpp \
+    ../../wpswizard/src/wpswizardstepfour.cpp \
+    ../../wpswizard/src/wpswizardstepfour_p.cpp \
+    ../../wpswizard/src/wpswizardstepfive.cpp \
+    ../../wpswizard/src/cwpsactiverunner.cpp
+    
+LIBS      += -leapqtplugininfo
     
 symbian: {
-	TARGET.CAPABILITY = ALL -TCB 
-}
-
-ict_result_enum_used: {
-	message(*** ict result enumerated instead of boolean.)
-	DEFINES+=ICT_RESULT_ENUM
+    TARGET.CAPABILITY = ALL -TCB 
+    TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
 }
-
-coverage_test: {
-	message(*** Coverage test mode build - no OST traces.)
-	#NO_OST_TRACES flag is set
-}
-else {
-	message(*** Normal Symbian-mode build.)
-}
\ No newline at end of file
--- a/wlanutilities/wlanwizard/t_wlanwizard/ut/main.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/main.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -22,28 +22,59 @@
 #include <QList>
 
 // User includes
-#include "testwlanwizardui.h"
 #include "testwlanwizard.h"
-#include "hbautotest.h"
+#include "testwlanwizardeap.h"
+#include "testwlanwizardconnect.h"
+#include "testwlanwizardmanual.h"
+#include "testwlanwizardwps.h"
 
 // ======== LOCAL FUNCTIONS ========
 int main(int argc, char *argv[])
 {
-    qDebug("TestWlanWizardUI main start");
+    qDebug("TestWlanWizard main start");
     HbApplication app(argc, argv);
-    app.setApplicationName("TestWlanWizardUI");
-
+    int res = 0;
     char *pass[3];
     pass[0] = argv[0];
     pass[1] = "-o";
-    pass[2] = "c:\\data\\TestWlanWizard.txt";
-    TestWlanWizard tcUtilities;
-    int res = QTest::qExec(&tcUtilities, 3, pass);
+    
+    // log folder: \epoc32\winscw\c\data
+    
+    app.setApplicationName("TestWlanWizardUtilities");
+    pass[2] = "c:\\data\\TestWlanWizardUtilities.txt";
+    TestWlanWizard *tcUtilities = new TestWlanWizard();
+    res |= QTest::qExec(tcUtilities, 3, pass);
+    delete tcUtilities;
+    tcUtilities = NULL;
 
-    pass[2] = "c:\\data\\TestWlanWizardUi.txt";
-    TestWlanWizardUi tc;
-    res = QTest::qExec(&tc, 3, pass);
+    app.setApplicationName("TestWlanWizardConnect");
+    pass[2] = "c:\\data\\TestWlanWizardConnect.txt";
+    TestWlanWizardConnect *tcConnect = new TestWlanWizardConnect();
+    res |= QTest::qExec(tcConnect, 3, pass);
+    delete tcConnect;
+    tcConnect = NULL;
     
-    qDebug("TestWlanWizardUI main exit");
+    app.setApplicationName("TestWlanWizardManual");
+    pass[2] = "c:\\data\\TestWlanWizardManual.txt";
+    TestWlanWizardManual *tcManual = new TestWlanWizardManual();
+    res |= QTest::qExec(tcManual, 3, pass);
+    delete tcManual;
+    tcManual = NULL;
+
+    app.setApplicationName("TestWlanWizardEap");
+    pass[2] = "c:\\data\\TestWlanWizardEap.txt";
+    TestWlanWizardEap *tcEap = new TestWlanWizardEap();
+    res |= QTest::qExec(tcEap, 3, pass);
+    delete tcEap;
+    tcEap = NULL;
+
+    app.setApplicationName("TestWlanWizardWps");
+    pass[2] = "c:\\data\\TestWlanWizardWps.txt";
+    TestWlanWizardWps *tcWps = new TestWlanWizardWps();
+    res |= QTest::qExec(tcWps, 3, pass);
+    delete tcWps;
+    tcWps = NULL;
+    
+    qDebug("TestWlanWizard main exit");
     return res;
 }
--- a/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizard.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizard.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -317,3 +317,31 @@
     WlanWizardUtils::KeyStatus status = WlanWizardUtils::isHex(key);
     QCOMPARE(status, WlanWizardUtils::KeyStatusIllegalCharacters);
 }
+
+void TestWlanWizard::testSsidValidCharacters()
+{
+    QString key("12345678901234567890123456789012");
+    WlanWizardUtils::SsidStatus status = WlanWizardUtils::validateSsid(key);
+    QCOMPARE(status, WlanWizardUtils::SsidStatusOk);
+}
+
+void TestWlanWizard::testSsidValidCharacters2()
+{
+    QString key("1");
+    WlanWizardUtils::SsidStatus status = WlanWizardUtils::validateSsid(key);
+    QCOMPARE(status, WlanWizardUtils::SsidStatusOk);
+}
+
+void TestWlanWizard::testSsidInvalidTooShort()
+{
+    QString key("");
+    WlanWizardUtils::SsidStatus status = WlanWizardUtils::validateSsid(key);
+    QCOMPARE(status, WlanWizardUtils::SsidStatusInvalidLength);
+}
+
+void TestWlanWizard::testSsidInvalidTooLong()
+{
+    QString key("123456789012345678901234567890123");
+    WlanWizardUtils::SsidStatus status = WlanWizardUtils::validateSsid(key);
+    QCOMPARE(status, WlanWizardUtils::SsidStatusInvalidLength);
+}
--- a/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizard.h	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizard.h	Tue Jul 06 15:29:22 2010 +0300
@@ -84,6 +84,12 @@
     void testHexInvalidCharacters_A_Lower();
     void testHexInvalidCharacters_F_Upper();
     
+    // SSID test cases
+    void testSsidValidCharacters();
+    void testSsidValidCharacters2();
+    void testSsidInvalidTooShort();
+    void testSsidInvalidTooLong();
+    
 private:
  
 };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardconnect.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,608 @@
+/*
+ * 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:
+ */
+
+// System includes
+#include <HbApplication>
+#include <HbDocumentLoader>
+#include <HbStackedWidget>
+#include <HbRadioButtonList>
+#include <HbAction>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <QGraphicsWidget>
+#include <QObjectList>
+#include <QtCore>
+#include <QTest>
+#include <QDebug>
+#include <QList>
+#include <cmmanagerdefines_shim.h>
+#include <wlanerrorcodes.h>
+
+// User includes
+#include "testwlanwizardconnect.h"
+#include "testwlanwizardconnect_conf.h"
+#include "hbautotest.h"
+#include "wlanwizard.h"
+#include "wlanwizard_p.h"
+#include "wlanwizardpagessid.h"
+#include "wlanqtutils_context.h"
+#include "wlanqtutils.h"
+#include "wlanqtutilsap.h"
+
+// External function prototypes
+
+// Local constants
+
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+// ---------------------------------------------------------
+// TEST CASES
+// ---------------------------------------------------------
+
+/*!
+ * Connect to open:
+ * - verifies IAP settings
+ * - ICT success
+ * - Finish button pressed
+ */
+void TestWlanWizardConnect::tc_connect_to_open_success()
+{
+#ifdef tc_connect_to_open_success_enabled
+    tc_connect_success("tc_connect_to_open_success", CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeOpen, false, "");
+#endif 
+}
+
+/*!
+ * Connect to open
+ */
+void TestWlanWizardConnect::tc_connect_to_open_success_hidden()
+{
+#ifdef tc_connect_to_open_success_hidden_enabled
+    tc_connect_success("tc_connect_to_open_success_hidden", CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeOpen, true, "");
+#endif 
+}
+
+/*!
+ * Connect to open
+ */
+void TestWlanWizardConnect::tc_connect_to_open_success_adhoc()
+{
+#ifdef tc_connect_to_open_success_adhoc_enabled
+    tc_connect_success("tc_connect_to_open_success_adhoc", CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeOpen, true, "");
+#endif 
+}
+
+/*!
+ * Connect to open
+ */
+void TestWlanWizardConnect::tc_connect_to_wep_success()
+{
+#ifdef tc_connect_to_wep_success_enabled
+    tc_connect_success("tc_connect_to_wep_success", CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeWep, true, "abcde");
+#endif 
+}
+
+/*!
+ * Connect to open
+ */
+void TestWlanWizardConnect::tc_connect_to_wpa_psk_success()
+{
+#ifdef tc_connect_to_wpa_psk_success_enabled
+    tc_connect_success("tc_connect_to_wpa_psk_success", CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa, false, "password");
+#endif 
+}
+/*!
+ * Connect to open
+ */
+void TestWlanWizardConnect::tc_connect_to_wpa2_psk_success()
+{
+#ifdef tc_connect_to_wpa2_psk_success_enabled
+    tc_connect_success("tc_connect_to_wpa2_psk_success", CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeWpa2, false, "password");
+#endif 
+}
+
+/*!
+ * Connect to open:
+ * - Opens
+ * - ICT success
+ * - Cancel pressed in summary page
+ */
+void TestWlanWizardConnect::tc_connect_to_open_success_cancel()
+{
+#ifdef tc_connect_to_open_success_cancel_enabled
+
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+    mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+
+    mView->mWizard->setParameters("tc_connect_to_open_success_cancel",
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeOpen, false, false, false);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "tc_connect_to_open_success_cancel"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    QTest::qWait(WaitTimeForUi);
+
+    // Ignore previous calls
+    mWlanQtUtilsContext->calledMethods();
+
+    QCOMPARE( mouseClickCancel(), true );
+
+    QStringList calledMethods;
+    calledMethods << "disconnectIap" << "deleteIap";
+
+    QCOMPARE(mWlanQtUtilsContext->calledMethods(), calledMethods);
+    QCOMPARE(verifyStatus(WizardStatusSignalCancelled), true);
+#endif 
+}
+
+void TestWlanWizardConnect::tc_network_failure_OpenAuthFailed()
+{
+#ifdef tc_network_failure_OpenAuthFailed_enabled
+    tc_network_error_codes(
+        "tc_network_failure_OpenAuthFailed", 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeOpen, 
+        false, 
+        "",
+        hbTrId("txt_occ_dialog_authentication_unsuccessful"), 
+        KErrWlanOpenAuthFailed );
+#endif
+}
+void TestWlanWizardConnect::tc_network_failure_SharedKeyAuthRequired()
+{
+#ifdef tc_network_failure_SharedKeyAuthRequired_enabled
+    tc_network_error_codes(
+        "tc_network_failure_SharedKeyAuthRequired", 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeOpen, 
+        false, 
+        "",
+        hbTrId("txt_occ_dialog_authentication_unsuccessful"), 
+        KErrWlanSharedKeyAuthRequired );
+#endif
+}
+void TestWlanWizardConnect::tc_network_failure_WpaAuthRequired()
+{
+#ifdef tc_network_failure_WpaAuthRequired_enabled
+    tc_network_error_codes(
+        "tc_network_failure_WpaAuthRequired", 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeOpen, 
+        false, 
+        "",
+        hbTrId("txt_occ_dialog_authentication_unsuccessful"), 
+        KErrWlanWpaAuthRequired );
+#endif
+}
+void TestWlanWizardConnect::tc_network_failure_WpaAuthFailed()
+{
+#ifdef tc_network_failure_WpaAuthFailed_enabled
+    tc_network_error_codes(
+        "tc_network_failure_WpaAuthFailed", 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeWpa, 
+        true, 
+        "password",
+        hbTrId("txt_occ_dialog_authentication_unsuccessful"), 
+        KErrWlanWpaAuthFailed );
+#endif
+}
+void TestWlanWizardConnect::tc_network_failure_802dot1xAuthFailed()
+{
+#ifdef tc_network_failure_802dot1xAuthFailed_enabled
+    tc_network_error_codes(
+        "tc_network_failure_802dot1xAuthFailed", 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeOpen, 
+        false, 
+        "",
+        hbTrId("txt_occ_dialog_authentication_unsuccessful"), 
+        KErrWlan802dot1xAuthFailed );
+#endif
+}
+void TestWlanWizardConnect::tc_network_failure_IllegalEncryptionKeys()
+{
+#ifdef tc_network_failure_IllegalEncryptionKeys_enabled
+    tc_network_error_codes(
+        "tc_network_failure_IllegalEncryptionKeys", 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeOpen, 
+        false, 
+        "",
+        hbTrId("txt_occ_dialog_authentication_unsuccessful"), 
+        KErrWlanIllegalEncryptionKeys );
+#endif
+}
+void TestWlanWizardConnect::tc_network_failure_PskModeRequired()
+{
+#ifdef tc_network_failure_PskModeRequired_enabled
+    tc_network_error_codes(
+        "tc_network_failure_PskModeRequired", 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeOpen, 
+        false, 
+        "",
+        hbTrId("txt_occ_dialog_authentication_unsuccessful"), 
+        KErrWlanPskModeRequired );
+#endif
+}
+void TestWlanWizardConnect::tc_network_failure_EapModeRequired()
+{
+#ifdef tc_network_failure_EapModeRequired_enabled
+    tc_network_error_codes(
+        "tc_network_failure_EapModeRequired", 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeOpen, 
+        false, 
+        "",
+        hbTrId("txt_occ_dialog_authentication_unsuccessful"), 
+        KErrWlanEapModeRequired );
+#endif
+}
+void TestWlanWizardConnect::tc_network_failure_IllefalWpaPskKey()
+{
+#ifdef tc_network_failure_IllefalWpaPskKey_enabled
+    tc_network_error_codes(
+        "tc_network_failure_IllefalWpaPskKey", 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeOpen, 
+        false, 
+        "",
+        hbTrId("txt_occ_dialog_incorrect_wpa_preshared_key_pleas"), 
+        KErrWlanIllegalWpaPskKey );
+#endif
+}
+void TestWlanWizardConnect::tc_network_failure_SharedKeyAuthFailed()
+{
+#ifdef tc_network_failure_SharedKeyAuthFailed_enabled
+    tc_network_error_codes(
+        "tc_network_failure_SharedKeyAuthFailed", 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeOpen, 
+        false, 
+        "",
+        hbTrId("txt_occ_dialog_incorrect_wep_key_please_check_the"), 
+        KErrWlanSharedKeyAuthFailed );
+#endif
+}
+void TestWlanWizardConnect::tc_network_failure_ErrNone()
+{
+#ifdef tc_network_failure_ErrNone_enabled
+    tc_network_error_codes(
+        "tc_network_failure_ErrNone", 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeOpen, 
+        false, 
+        "",
+        hbTrId("txt_occ_dialog_incorrect_wep_key_please_check_the"), 
+        KErrWlanSharedKeyAuthFailed );
+#endif
+}
+void TestWlanWizardConnect::tc_network_failure_30180()
+{
+#ifdef tc_network_failure_30180_enabled
+    const QString ssid("tc_network_failure_30180");
+    tc_network_error_codes(
+        ssid, 
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeWep, 
+        false, 
+        "abcde",
+        hbTrId("txt_occ_dialog_connection_failed"), 
+        30180 );
+    
+    QCOMPARE( mouseClickPrevious(), true );
+    QTest::qWait(WaitTimeForUi);
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QTest::qWait(WaitTimeForUi);
+    
+    QCOMPARE( mouseClickNext(), true );
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QTest::qWait(WaitTimeForUi);
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, hbTrId("txt_occ_dialog_connection_failed")), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QTest::qWait(WaitTimeForUi);
+
+    QStringList calledMethods;
+    calledMethods 
+        << "updateIap" 
+        << "activeIap" 
+        << "disconnectIap"
+        << "connectIap";
+    
+    QCOMPARE(mWlanQtUtilsContext->calledMethods(), calledMethods);
+    
+#endif
+}
+
+void TestWlanWizardConnect::tc_iap_creation_fails()
+{
+#ifdef tc_iap_creation_fails_enabled
+
+    const QString ssid("tc_iap_creation_fails");
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(-1);
+
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeOpen, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+    QCOMPARE( verifyCurrentPageWithInfo(
+            WlanWizardPageInternal::PageGenericError,
+            hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret") ), true );
+    
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QTest::qWait(WaitTimeForUi);
+    
+    QStringList calledMethods;
+    calledMethods << "WlanQtUtils" << "createIap";
+    QCOMPARE(mWlanQtUtilsContext->calledMethods(), calledMethods);
+    
+    QCOMPARE( mouseClickCancel(), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyStatus(WizardStatusSignalCancelled, 2), true);
+    QTest::qWait(WaitTimeForUi);
+#endif 
+}
+
+void TestWlanWizardConnect::tc_cancel_key_query()
+{
+#ifdef tc_cancel_key_query_enabled
+      
+    const QString ssid("tc_cancel_key_query");
+    
+    mView->mWizard->setParameters(
+        ssid,
+        CMManagerShim::Adhoc, 
+        CMManagerShim::WlanSecModeWep,
+        true, false, false);
+    mView->showWizard();
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QTest::qWait(WaitTimeForUi);
+
+    QCOMPARE( mouseClickCancel(), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyStatus(WizardStatusSignalCancelled), true);    
+    
+    mWlanQtUtilsContext->emitWlanNetworkClosed(-1, KErrCancel);
+    callWlanWizard_startPageOperation();
+    
+    QStringList calledMethods;
+    calledMethods << "WlanQtUtils";
+    QCOMPARE(mWlanQtUtilsContext->calledMethods(), calledMethods);
+#endif
+}
+
+/*!
+ * Helpper test case for testing success case with compinations of provided
+ * parameters.
+ */
+void TestWlanWizardConnect::tc_connect_success(const QString &ssid, int networkMode,
+    int securityMode, bool hidden, QString key)
+{
+
+    mWlanQtUtilsContext->setCreateWlanIapResult(2);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(2);
+    mWlanQtUtilsContext->setSignalIctResult(2, WlanQtUtils::IctPassed);
+
+    mView->mWizard->setParameters(ssid, networkMode, securityMode, true, hidden, false);
+
+    WlanQtUtilsAp ap;
+    ap.setValue(WlanQtUtilsAp::ConfIdConnectionMode, networkMode);
+    ap.setValue(WlanQtUtilsAp::ConfIdSecurityMode, securityMode);
+    ap.setValue(WlanQtUtilsAp::ConfIdSsid, ssid);
+    ap.setValue(WlanQtUtilsAp::ConfIdHidden, hidden);
+
+    // Default values
+    ap.setValue(WlanQtUtilsAp::ConfIdWpaPsk, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true );
+    ap.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex1 );
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey1, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey2, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey3, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey4, QString());
+    
+    QStringList calledMethods;
+    calledMethods << "WlanQtUtils";
+    QCOMPARE(mWlanQtUtilsContext->calledMethods(), calledMethods);
+
+    mView->showWizard();
+    if (securityMode == CMManagerShim::WlanSecModeWep || securityMode
+        == CMManagerShim::WlanSecModeWpa || securityMode == CMManagerShim::WlanSecModeWpa2) {
+        // Key query short pwd
+        QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, ssid), true );
+        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+        QTest::qWait(WaitTimeForUi);
+
+        QCOMPARE( mouseClickObject("lineEditKey"), true );
+        QTest::qWait(WaitTimeForUi);
+            
+        if (securityMode == CMManagerShim::WlanSecModeWep) {
+            ap.setValue(WlanQtUtilsAp::ConfIdWepKey1, key);
+            ap.setValue(WlanQtUtilsAp::ConfIdWepKey2, key);
+            ap.setValue(WlanQtUtilsAp::ConfIdWepKey3, key);
+            ap.setValue(WlanQtUtilsAp::ConfIdWepKey4, key);
+            ap.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex1);
+            QCOMPARE( insertTextToObject("lineEditKey", "abcde"), true );
+        }
+        else {
+            QCOMPARE( insertTextToObject("lineEditKey", "password"), true );
+            ap.setValue(WlanQtUtilsAp::ConfIdWpaPsk, key);
+            ap.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
+        }
+        QCOMPARE( mouseClickObject("dialog"), true );
+
+        QTest::qWait(WaitTimeForUi);
+        QCOMPARE( mouseClickNext(), true );
+
+        QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+        QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+        QTest::qWait(WaitTimeForUi);
+
+        QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+        QTest::qWait(WaitTimeForUi);
+    }
+    else {
+        QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+
+        QTest::qWait(WaitTimeForUi);
+        QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+        QTest::qWait(WaitTimeForUi);
+    }
+    
+    QCOMPARE(verifySummaryPage(
+        ssid,
+        networkMode,
+        hidden, 
+        securityMode, 
+        true,
+        hbTrId("txt_occ_dblist_destination_val_internet")),true);
+
+    calledMethods.clear();
+    calledMethods << "createIap" << "activeIap" << "connectIap";
+    QCOMPARE( mWlanQtUtilsContext->calledMethods(), calledMethods);
+    QCOMPARE( mWlanQtUtilsContext->verifyWlanIapSettings(ap), true);
+    QTest::qWait(WaitTimeForUi);
+
+    QCOMPARE( mouseClickFinish(), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyStatus(WizardStatusSignalFinished, 2), true);
+}
+
+/*!
+ * Helpper test case for testing success case with compinations of provided
+ * parameters.
+ */
+void TestWlanWizardConnect::tc_network_error_codes(
+    const QString &ssid, 
+    int networkMode,
+    int securityMode, 
+    bool hidden, 
+    QString key, 
+    const QString &errorString, 
+    int errorCode)
+{
+    mWlanQtUtilsContext->setCreateWlanIapResult(2);
+    mWlanQtUtilsContext->setConnectionSuccessed(false);
+    mWlanQtUtilsContext->setSignalWlanNetworkClosed(2, errorCode);
+    mWlanQtUtilsContext->setActiveWlanIapResult(1);
+    mView->mWizard->setParameters(ssid, networkMode, securityMode, true, hidden, false);
+
+    WlanQtUtilsAp ap;
+    ap.setValue(WlanQtUtilsAp::ConfIdConnectionMode, networkMode);
+    ap.setValue(WlanQtUtilsAp::ConfIdSecurityMode, securityMode);
+    ap.setValue(WlanQtUtilsAp::ConfIdSsid, ssid);
+    ap.setValue(WlanQtUtilsAp::ConfIdHidden, hidden);
+
+    // Default values
+    ap.setValue(WlanQtUtilsAp::ConfIdWpaPsk, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true );
+    ap.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex1 );
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey1, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey2, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey3, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey4, QString());
+    
+    QStringList calledMethods;
+    calledMethods << "WlanQtUtils";
+    QCOMPARE(mWlanQtUtilsContext->calledMethods(), calledMethods);
+
+    mView->showWizard();
+    if (securityMode == CMManagerShim::WlanSecModeWep || securityMode
+        == CMManagerShim::WlanSecModeWpa || securityMode == CMManagerShim::WlanSecModeWpa2) {
+        // Key query short pwd
+        QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, ssid), true );
+        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+        QTest::qWait(WaitTimeForUi);
+
+        QCOMPARE( mouseClickObject("lineEditKey"), true );
+        QTest::qWait(WaitTimeForUi);
+
+        if (securityMode == CMManagerShim::WlanSecModeWep) {
+            ap.setValue(WlanQtUtilsAp::ConfIdWepKey1, key);
+            ap.setValue(WlanQtUtilsAp::ConfIdWepKey2, key);
+            ap.setValue(WlanQtUtilsAp::ConfIdWepKey3, key);
+            ap.setValue(WlanQtUtilsAp::ConfIdWepKey4, key);
+            ap.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex1);
+            QCOMPARE( insertTextToObject("lineEditKey", "abcde"), true );
+        }
+        else {
+            QCOMPARE( insertTextToObject("lineEditKey", "password"), true );
+            ap.setValue(WlanQtUtilsAp::ConfIdWpaPsk, key);
+            ap.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true);
+        }
+        QCOMPARE( mouseClickObject("dialog"), true );
+
+        QTest::qWait(WaitTimeForUi);
+        QCOMPARE( mouseClickNext(), true );
+
+        QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+        QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+        QTest::qWait(WaitTimeForUi);
+
+        QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, errorString), true );
+        QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+        QTest::qWait(WaitTimeForUi);
+    }
+    else {
+        QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+        QTest::qWait(WaitTimeForUi);
+
+        QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, errorString), true );
+        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+        QTest::qWait(WaitTimeForUi);
+    }
+
+    calledMethods.clear();
+    calledMethods 
+        << "createIap" 
+        << "activeIap" 
+        << "disconnectIap" 
+        << "connectIap";
+    QCOMPARE( mWlanQtUtilsContext->calledMethods(), calledMethods);
+    QCOMPARE( mWlanQtUtilsContext->verifyWlanIapSettings(ap), true);
+    QTest::qWait(WaitTimeForUi);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardconnect.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,67 @@
+/*
+ * 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:
+ */
+
+#ifndef TESTWLANWIZARDRNDCONNECT_H_
+#define TESTWLANWIZARDRNDCONNECT_H_
+
+#include "testwlanwizardcontext.h"
+
+class TestWlanWizardConnect : public TestWlanWizardContext
+{
+Q_OBJECT
+
+private slots:
+    void tc_connect_to_open_success();
+    void tc_connect_to_open_success_hidden();
+    void tc_connect_to_open_success_adhoc();
+    void tc_connect_to_wep_success();
+    void tc_connect_to_wpa_psk_success();
+    void tc_connect_to_wpa2_psk_success();
+    void tc_connect_to_open_success_cancel();
+    void tc_network_failure_OpenAuthFailed();
+    void tc_network_failure_SharedKeyAuthRequired();
+    void tc_network_failure_WpaAuthRequired();
+    void tc_network_failure_WpaAuthFailed();
+    void tc_network_failure_802dot1xAuthFailed();
+    void tc_network_failure_IllegalEncryptionKeys();
+    void tc_network_failure_PskModeRequired();
+    void tc_network_failure_EapModeRequired();
+    void tc_network_failure_IllefalWpaPskKey();
+    void tc_network_failure_SharedKeyAuthFailed();
+    void tc_network_failure_ErrNone();
+    void tc_network_failure_30180();
+    void tc_iap_creation_fails();
+    void tc_cancel_key_query();
+    
+private:
+    void tc_connect_success(
+        const QString &ssid,
+        int networkMode,
+        int securityMode,
+        bool hidden,
+        QString key);
+    
+    void tc_network_error_codes(
+        const QString &ssid,
+        int networkMode,
+        int securityMode,
+        bool hidden,
+        QString key,
+        const QString &errorString,
+        int errorCode);
+};
+
+#endif /* TESTWLANWIZARDRNDCONNECT_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardconnect_conf.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,46 @@
+/*
+ * 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:
+ */
+
+// System includes
+
+// User includes
+
+// External function prototypes
+
+// Local constants
+
+
+#define tc_connect_to_open_success_enabled
+#define tc_connect_to_open_success_hidden_enabled;
+#define tc_connect_to_open_success_adhoc_enabled;
+#define tc_connect_to_wep_success_enabled;
+#define tc_connect_to_wpa_psk_success_enabled;
+#define tc_connect_to_wpa2_psk_success_enabled;
+#define tc_connect_to_open_success_cancel_enabled
+#define tc_network_failure_OpenAuthFailed_enabled
+#define tc_network_failure_SharedKeyAuthRequired_enabled
+#define tc_network_failure_WpaAuthRequired_enabled
+#define tc_network_failure_WpaAuthFailed_enabled
+#define tc_network_failure_802dot1xAuthFailed_enabled
+#define tc_network_failure_IllegalEncryptionKeys_enabled
+#define tc_network_failure_PskModeRequired_enabled
+#define tc_network_failure_EapModeRequired_enabled
+#define tc_network_failure_IllefalWpaPskKey_enabled
+#define tc_network_failure_SharedKeyAuthFailed_enabled
+#define tc_network_failure_ErrNone_enabled
+#define tc_network_failure_30180_enabled
+#define tc_iap_creation_fails_enabled
+#define tc_cancel_key_query_enabled
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardcontext.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,962 @@
+/*
+ * 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 includes
+#include <HbApplication>
+#include <HbDocumentLoader>
+#include <HbStackedWidget>
+#include <HbRadioButtonList>
+#include <HbAction>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <HbCheckBox>
+#include <QGraphicsWidget>
+#include <QObjectList>
+#include <QtCore>
+#include <QTest>
+#include <QDebug>
+#include <QList>
+#include <HbListWidget>
+#include <HbListWidgetItem>
+#include <HbParameterLengthLimiter>
+
+// User includes
+#include "testwlanwizardcontext.h"
+#include "hbautotest.h"
+#include "wlanwizard.h"
+#include "wlanwizard_p.h"
+#include "wlanwizardpageinternal.h"
+#include "wlanwizardhelper.h"
+#include "wlanqtutils_context.h"
+#include "wlanqtutils.h"
+#include "wlanqtutilsap.h"
+#include "eapqtconfiginterface_context.h"
+#include "eapwizard.h"
+#include "eapwizard_p.h"
+#include "eapwizardpage.h"
+#include "wpswizardpage.h"
+#include "wlanmgmtclient_context.h"
+#include "wpswizardstepfour.h"
+#include "wpswizardstepfour_p.h"
+#include "cwpsactiverunner.h"
+
+// External function prototypes
+
+// Local constants
+class TestRadioButtonList: public HbRadioButtonList
+{
+public:
+    void emitActivated(const QModelIndex &modelIndex)
+    { HbRadioButtonList::emitActivated(modelIndex); }
+};
+
+
+// ---------------------------------------------------------
+// FRAMEWORK FUNCTIONS
+// ---------------------------------------------------------
+
+ContextWlanApList::ContextWlanApList()
+{
+
+}
+
+ContextWlanApList::~ContextWlanApList()
+{
+    clear();
+}
+
+void ContextWlanApList::Add(QString name, int netMode, int secMode, bool wpaPskInUse,
+    bool wpsSupported, int signalStrength)
+{
+    QSharedPointer<WlanQtUtilsAp> temp = QSharedPointer<WlanQtUtilsAp>(new WlanQtUtilsAp());
+    temp->setValue(WlanQtUtilsAp::ConfIdSsid, name);
+    temp->setValue(WlanQtUtilsAp::ConfIdConnectionMode, netMode);
+    temp->setValue(WlanQtUtilsAp::ConfIdSecurityMode, secMode);
+    temp->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, wpaPskInUse);
+    temp->setValue(WlanQtUtilsAp::ConfIdWpsSupported, wpsSupported);
+    temp->setValue(WlanQtUtilsAp::ConfIdSignalStrength, signalStrength);
+
+    mList.append(temp);
+}
+
+void ContextWlanApList::clear()
+{
+    mList.clear();
+}
+
+
+TestWlanWizardContext::TestWlanWizardContext() :
+    mView(NULL),
+    mMainWindow(NULL),
+    mWlanQtUtilsContext(NULL),
+    mEapQtUtilsContext(NULL),
+    mWlanMgmtClientContext(NULL),
+    mApList(NULL),
+    mApOpenList(NULL)   
+{
+    
+}
+TestWlanWizardContext::~TestWlanWizardContext()
+{
+    
+}
+
+/**
+ * This function will be called before the first test function is executed.
+ */
+void TestWlanWizardContext::initTestCase()
+{
+    qDebug("TestWlanWizardContext::initTestCase");
+
+    mMainWindow = new HbAutoTestMainWindow;
+
+    mView = new TestView();
+
+    mMainWindow->addView(mView);
+    mMainWindow->setCurrentView(mView);
+    mMainWindow->installEventFilter(this);
+    mMainWindow->show();
+
+    QTest::qWait(1);
+    while (!mEvent) {
+        QTest::qWait(WaitTimeForUi);
+    }
+    mEvent = false;
+    mApList = new ContextWlanApList();
+    mApOpenList = new ContextWlanApList();
+
+}
+
+/**
+ * This function will be called after the last test function was executed.
+ */
+void TestWlanWizardContext::cleanupTestCase()
+{
+    qDebug("TestWlanWizardContext::cleanupTestCase");
+
+    qDebug("delete mApList");
+    delete mApList;
+    mApList = NULL;
+    delete mApOpenList;
+    mApOpenList = NULL;
+
+    qDebug("delete mMainWindow");
+    mMainWindow->setAttribute( Qt::WA_DeleteOnClose, true );
+    mMainWindow->close();
+    mMainWindow = NULL;
+    QTest::qWait(WaitTimeForUi);
+    qDebug("TestWlanWizardContext::cleanupTestCase exit");
+}
+
+/**
+ * This function will be called before each test function is executed.
+ */
+void TestWlanWizardContext::init()
+{
+    qDebug("TestWlanWizardContext::init()");
+
+    mView->createWizard();
+    mWlanQtUtilsContext = new WlanQtUtilsContext(mView->mWizard->d_ptr->mWlanQtUtils.data());
+
+    mEapQtUtilsContext = new EapQtConfigInterfaceContext();
+    mEapQtUtilsContext->setObject(getEapQtConfig());
+    
+    mWlanMgmtClientContext = new WlanMgmtClientContext();
+    //mWlanMgmtClientContext->setObject(mWlanMgmtClient);
+    
+    WpsPageStepFour* wps = (WpsPageStepFour*)(mView->mWizard->d_ptr->mPages[WpsWizardPage::PageWpsWizardStep4]);
+    Q_ASSERT(wps);
+    mWlanMgmtClientContext->setObject(wps->d_ptr->mWpsActiveRunner->iWLANMgmtClient);
+}
+
+/**
+ * This function will be called after each test function is executed.
+ */
+void TestWlanWizardContext::cleanup()
+{
+    qDebug("TestWlanWizardContext::cleanup()");
+
+    delete mWlanQtUtilsContext;
+    delete mEapQtUtilsContext;
+    delete mWlanMgmtClientContext;
+    
+    mView->deleteWizard();
+    mApList->clear();
+    mApOpenList->clear();
+    QTest::qWait(1);
+}
+
+
+/*!
+ * Filter to catch focus event to the text editor widget.
+ */
+bool TestWlanWizardContext::eventFilter(QObject *obj, QEvent *event)
+{
+    if (obj == mMainWindow && event->type() == QEvent::Show) {
+        mMainWindow->removeEventFilter(this);
+        mEvent = true;
+    }
+    return false;
+}
+
+QGraphicsWidget* TestWlanWizardContext::findChildItem(const QString &itemName, QGraphicsWidget *widget)
+{
+    QList<QGraphicsItem*> list = widget->childItems();
+    for (int i = 0; i < list.size(); i++) {
+        QGraphicsWidget* item = (QGraphicsWidget*) list[i];
+        if (item->objectName() == itemName) {
+            return item;
+        }
+        else if ((item = findChildItem(itemName, item))) {
+            return item;
+        }
+    }
+    return 0;
+}
+
+bool TestWlanWizardContext::verifyStatus(WizardStatusSignal status, int iapId)
+{
+    return mView->verifyStatus(status, iapId);
+}
+
+bool TestWlanWizardContext::verifyCurrentPage(int pageId, int retries, int wait_ms)
+{
+    bool ret = true;
+    
+    for (int i = 0; i < retries; i++) {
+        QTest::qWait(wait_ms);
+
+        WlanWizardPrivate *pPrivate = mView->mWizard->d_ptr;
+        HbWidget* current = qobject_cast<HbWidget*> (pPrivate->mStackedWidget->currentWidget());
+        WlanWizardPage *page = pPrivate->mPageMapper[current];
+
+        // TODO: verify title in this method
+        
+        if (page == pPrivate->mPages[pageId]) {
+            switch(pageId) {
+            case WlanWizardPageInternal::PageNetworkMode:
+                return verifyDialogText("dialog_6", hbTrId("txt_occ_dialog_select_network_mode_and_status"));
+            
+            case WlanWizardPageInternal::PageNetworkSecurity:
+                return verifyDialogText("dialog_6", hbTrId("txt_occ_dialog_select_network_security_mode"));
+            
+            case WlanWizardPageInternal::PageSsid:
+                return verifyDialogText("dialog", hbTrId("txt_occ_dialog_insert_the_name_of_the_new_wlan_net"));
+            
+            case WlanWizardPageInternal::PageSummary:
+                if (pPrivate->mTitle->plainText() != hbTrId("txt_occ_title_wlan_setup_wizard_summary")){
+                    qWarning("TestWlanWizardContext::verifyCurrentPage: Invalid title");
+                    return false;
+                }
+                return true;
+               
+            case EapWizardPage::PageOuterType:
+                return verifyDialogText("title", hbTrId("txt_occ_title_select_eap_type"));
+
+            case EapWizardPage::PageCertificateCa:
+                return verifyDialogText("title", hbTrId("txt_occ_title_select_authority_certificate"));
+                
+            case EapWizardPage::PageCertificateUser:
+                return verifyDialogText("title", hbTrId("txt_occ_title_select_user_certificate"));
+                
+            case EapWizardPage::PageNewPacStorePassword:
+                ret &= verifyDialogText("setlabel_55", hbTrId("txt_occ_setlabel_new_pac_store_password"));
+                ret &= verifyDialogText("setlabel_56", hbTrId("txt_occ_setlabel_confirm_password"));
+                return ret;
+
+            case EapWizardPage::PagePromptPacStorePassword:
+                return verifyDialogText("setlabel_59", hbTrId("txt_occ_setlabel_eap_pac_store_password"));
+
+            case WpsWizardPage::PageWpsWizardStep2:
+                return verifyDialogText("label", hbTrId("txt_occ_dialog_selected_network_supports_wifi_pro"));
+                break;
+
+            case WpsWizardPage::PageWpsWizardStep3_Button:
+                return verifyDialogText("label_heading", hbTrId("txt_occ_dialog_first_press_button_on_the_wireless"));
+                break;
+
+            case WpsWizardPage::PageWpsWizardStep3_Number:
+                // TODO: something better here??
+                return true;
+                
+            case WpsWizardPage::PageWpsWizardStep4:
+                return verifyDialogText("label_heading", hbTrId("txt_occ_dialog_negotiating"));
+                
+            case WpsWizardPage::PageWpsWizardStep5:
+                return verifyDialogText("label", hbTrId("txt_occ_dialog_settings_received_for_multiple_wlan"));
+                
+            default:
+                return false;
+            }
+        }
+    }
+    qWarning("verifyCurrentPage: expected: %d", pageId);
+    return false;
+}
+
+bool TestWlanWizardContext::verifyCurrentPageWithInfo(
+    int pageId, const QString &info, int retries, int wait_ms)
+{
+    bool ret = true;
+    for (int i = 0; i < retries; i++) {
+        QTest::qWait(wait_ms);
+
+        WlanWizardPrivate *pPrivate = mView->mWizard->d_ptr;
+        HbWidget* current = qobject_cast<HbWidget*> (pPrivate->mStackedWidget->currentWidget());
+        WlanWizardPage *page = pPrivate->mPageMapper[current];
+
+        // TODO: verify title in this method
+        
+        if (page == pPrivate->mPages[pageId]) {
+            switch(pageId) {
+            case WlanWizardPageInternal::PageGenericError:
+                return verifyDialogText("dialog", info);
+
+            case WlanWizardPageInternal::PageKeyQuery:
+                return verifyDialogText("dialog", HbParameterLengthLimiter(hbTrId("txt_occ_dialog_enter_key_for_1")).arg(info));
+
+            case WlanWizardPageInternal::PageProcessSettings:
+                return verifyDialogText("dialog", HbParameterLengthLimiter(hbTrId("txt_occ_dialog_checking_connection_to_1")).arg(info));
+
+            case WlanWizardPageInternal::PageScanning:
+                return verifyDialogText("dialog", HbParameterLengthLimiter(hbTrId("txt_occ_dialog_searching")).arg(info));
+               
+            case EapWizardPage::PageUsernamePassword:
+                ret &= verifyDialogText(
+                    "setlabel_55",
+                    HbParameterLengthLimiter(hbTrId("txt_occ_setlabel_user_name_for_1")).arg(info));
+                ret &= verifyDialogText("setlabel_56", hbTrId("txt_occ_setlabel_eap_password"));
+                return ret;
+                
+            case EapWizardPage::PageIdentity:
+                ret &= verifyDialogText("setlabel_53", HbParameterLengthLimiter(hbTrId("txt_occ_setlabel_user_name_for_1")).arg(info));
+                ret &= verifyDialogText("setlabel_53_val", hbTrId("txt_occ_setlabel_user_name_val_generate_automatic"));
+                ret &= verifyDialogText("setlabel_54", hbTrId("txt_occ_setlabel_eap_realm"));
+                ret &= verifyDialogText("setlabel_54_val", hbTrId("txt_occ_setlabel_eap_realm_val_generate_automatically"));
+                return ret;
+                
+            case EapWizardPage::PageInnerTypePeap:
+            case EapWizardPage::PageInnerTypeEapTtls:
+                return verifyDialogText("title", HbParameterLengthLimiter(hbTrId("txt_occ_title_select_innear_eap_type_for_1")).arg(info));
+            
+            default:
+                return verifyCurrentPage(pageId, retries, wait_ms);
+            }
+        }
+    }
+    qWarning("verifyCurrentPage: expected: %d", pageId);
+    return false;
+}
+
+
+bool TestWlanWizardContext::verifyDialogText(const QString objName, const QString text)
+{
+    HbWidget* current = qobject_cast<HbWidget*> (
+        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
+    HbWidget* widget = qobject_cast<HbWidget*> (
+        findChildItem(objName, current));
+    
+    if (widget) {
+        HbLabel *label = qobject_cast<HbLabel*>(widget);
+        if (label) {
+            if(label->plainText() == text) {
+                if (!label->isVisible()){
+                    qWarning("verifyDialogText: not visible");
+                    return false;
+                }
+                return true;
+                
+            } else {
+                qWarning("verifyDialogText: not match");
+                qDebug() << "expect: " << text;
+                qDebug() << "actual: " << label->plainText();
+                return false;
+            }
+        }
+        HbCheckBox *checkBox = qobject_cast<HbCheckBox*>(widget);
+        if (checkBox) {
+            if(checkBox->text() == text) {
+                if (!checkBox->isVisible()){
+                    qWarning("verifyDialogText: not visible");
+                    return false;
+                }
+                return true;
+                
+            } else {
+                qWarning("verifyDialogText: not match");
+                qDebug() << "expect: " << text;
+                qDebug() << "actual: " << checkBox->text();
+                return false;
+            }
+        }
+    }
+    
+    qWarning("verifyDialogText: object not found");
+    
+    return false;
+}
+
+bool TestWlanWizardContext::verifyActionButtons(ButtonStatus prevStatus,
+    ButtonStatus cancelStatus,
+    ButtonStatus nextStatus,
+    ButtonStatus finishStatus)
+{
+    WlanWizardPrivate *pPrivate = mView->mWizard->d_ptr;
+    ButtonStatus prevReally = ButtonHidden;
+    ButtonStatus cancelReally = ButtonHidden;
+    ButtonStatus nextReally = ButtonHidden;
+    ButtonStatus finishReally = ButtonHidden;
+
+    if(pPrivate->mActionPrevious->isVisible()) {
+        if(pPrivate->mActionPrevious->isEnabled()) {
+            prevReally = ButtonEnabled;
+        } else {
+            prevReally = ButtonDisabled;
+        }
+    }
+
+    if(pPrivate->mActionCancel->isVisible()) {
+        if(pPrivate->mActionCancel->isEnabled()) {
+            cancelReally = ButtonEnabled;
+        } else {
+            cancelReally = ButtonDisabled;
+        }
+    }
+
+    if(pPrivate->mActionNext->isVisible()) {
+        if(pPrivate->mActionNext->isEnabled()) {
+            nextReally = ButtonEnabled;
+        } else {
+            nextReally = ButtonDisabled;
+        }
+    }
+
+    if(pPrivate->mActionFinish->isVisible()) {
+        if(pPrivate->mActionFinish->isEnabled()) {
+            finishReally = ButtonEnabled;
+        } else {
+            finishReally = ButtonDisabled;
+        }
+    }
+    bool ret = true;
+    if (prevReally != prevStatus){
+        qWarning("Previous Button: really: %d, status: %d", prevReally, prevStatus);
+        ret = false;
+    }
+    if (cancelReally != cancelStatus){
+        qWarning("Cancel Button: really: %d, status: %d", cancelReally, cancelStatus);
+        ret = false;
+    }
+    if (nextReally != nextStatus){
+        qWarning("Next Button: really: %d, status: %d", nextReally, nextStatus);
+        ret = false;
+    }
+    if (finishReally != finishStatus){
+        qWarning("Finish Button: really: %d, status: %d", finishReally, finishStatus);
+        ret = false;
+    }
+    
+    return ret;
+}
+
+bool TestWlanWizardContext::verifySummaryPage(
+    const QString &ssid, 
+    int netMode, 
+    bool hidden,
+    int secMode, 
+    bool useWpaPsk,
+    const QString &destination, 
+    int outerType,
+    int innerType,
+    bool eapFastProvMode)
+{
+    bool ret = true;
+    int i = 0;
+    HbListWidget* listWidget = qobject_cast<HbListWidget*> (
+        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
+    
+    if (!listWidget){
+        qWarning("verifySummaryPage: ListWidget not found");
+        return false;
+    }
+    
+    // VERIFY: NETWORK NAME
+    HbListWidgetItem *item = listWidget->item(i++);
+    if (item->text() != hbTrId("txt_occ_dblist_network_name")) {
+        qWarning("verifySummaryPage: no match network name");
+        ret = false;
+    }
+    
+    if (item->secondaryText() != ssid){
+        qWarning("verifySummaryPage: no match ssid");
+        ret = false;
+    }
+    
+    // VERIFY: NETWORK MODE
+    item = listWidget->item(i++);
+    if (item->text() != hbTrId("txt_occ_dblist_network_mode")) {
+        qWarning("verifySummaryPage: no match network mode");
+        ret = false;
+    }
+    
+    if (item->secondaryText() != toNetworkModeString(netMode, hidden)){
+        qWarning("verifySummaryPage: no match network mode value");
+        ret = false;
+    }
+    
+    // VERIFY: SECURITY MODE
+    item = listWidget->item(i++);
+    if (item->text() != hbTrId("txt_occ_dblist_security_mode")) {
+        qWarning("verifySummaryPage: no match security mode");
+        ret = false;
+    }
+    
+    if (item->secondaryText() != toSecurityModeString(secMode, useWpaPsk)){
+        qWarning("verifySummaryPage: no match security mode value");
+        ret = false;
+    }
+    
+    // VERIFY: EAP OUTER TYPE
+    if (outerType != -1) {
+        item = listWidget->item(i++);
+        if (item->text() != hbTrId("txt_occ_dblist_outer_eap")) {
+            qWarning("verifySummaryPage: no match eap outer type");
+            ret = false;
+        }
+        if (item->secondaryText() != eapTypeToString(outerType)){
+            qWarning("verifySummaryPage: no match eap outer type value");
+            ret = false;
+        }
+    }
+    
+    // VERIFY: EAP INNER TYPE
+    if (innerType != -1) {
+        item = listWidget->item(i++);
+        if (item->text() != hbTrId("txt_occ_dblist_inner_eap")) {
+            qWarning("verifySummaryPage: no match eap inner type");
+            ret = false;
+        }
+        if (item->secondaryText() != eapTypeToString(innerType)){
+            qWarning("verifySummaryPage: no match eap inner type value");
+            ret = false;
+        }
+    }
+    
+    // VERIFY: EAP FAST PROVISIONING MODE
+    if (eapFastProvMode) {
+        item = listWidget->item(i++);
+        if (item->text() != hbTrId("txt_occ_dblist_provisioning_mode_for_eapfast")) {
+            qWarning("verifySummaryPage: no match eap prov mode");
+            ret = false;
+        }
+        if (item->secondaryText() != hbTrId("txt_occ_dblist_provisioning_mode_for_val_unauthent")){
+            qWarning("verifySummaryPage: no match eap prov mode value");
+            ret = false;
+        }
+    }
+
+    // VERIFY: DESTINATION
+    if (destination.length() > 0) {
+        item = listWidget->item(i++);
+        if (item->text() != hbTrId("txt_occ_dblist_destination")) {
+            qWarning("verifySummaryPage: no match destination");
+            ret = false;
+        }
+        if (item->secondaryText() != destination){
+            qWarning("verifySummaryPage: no match destination value");
+            ret = false;
+        }
+    }
+
+    
+    return ret;
+}
+
+bool TestWlanWizardContext::mouseClickObject(const QString objName)
+{
+    HbWidget* current = qobject_cast<HbWidget*> (
+        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
+    HbWidget* widget = (HbWidget*) findChildItem(objName, current);
+    
+    if (widget) {
+        HbAutoTest::mouseClick(mMainWindow, widget);
+        widget->clearFocus();
+        widget->setFocus();
+        return true;
+    }
+    qWarning("mouseClickObject: object not found");
+    
+    return false;
+}
+
+bool TestWlanWizardContext::insertTextToObject(const QString objName, const QString text)
+{
+    HbWidget* current = qobject_cast<HbWidget*> (
+        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
+    HbWidget* widget = (HbWidget*) findChildItem(objName, current);
+
+    if (widget) {
+        for (int i = 0; i < text.size(); i++) {
+            HbAutoTest::keyPress(mMainWindow, text.at(i).toAscii(), 0, 10);
+            QTest::qWait(20);
+        }
+        return true;
+    }
+    qWarning("insertTextToObject: object not found");
+    return false;
+}
+
+bool TestWlanWizardContext::selectRadioButton(const QString objName, int index)
+{
+    HbWidget* current = qobject_cast<HbWidget*> (
+        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
+    TestRadioButtonList* widget = (TestRadioButtonList*) findChildItem(objName, current);
+
+    if (widget) {
+        if (widget->items().length() <= index) {
+            qWarning("selectRadioButton: index out of range");
+            return false;
+        }
+        widget->setSelected(index);
+        widget->emitActivated(widget->currentIndex());
+        return true;
+    }
+    qWarning("selectRadioButton: object not found");
+    
+    return false;
+}
+
+bool TestWlanWizardContext::verifyRadioButtonState(
+    const QString objName, 
+    int index, 
+    const QString &text)
+{
+    HbWidget* current = qobject_cast<HbWidget*> (
+        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
+    
+    HbRadioButtonList* widget = qobject_cast<HbRadioButtonList*>( 
+        findChildItem(objName, current));
+
+    if (widget) {
+        if (widget->selected() != index) {
+            qWarning("verifyRadioButtonState: invalid index");
+            return false;
+        }
+        
+        if (widget->items().at(index) != text) {
+            qWarning("verifyRadioButtonState: text does not match");
+            return false;
+        }
+        
+        return true;
+    }
+    qWarning("verifyRadioButtonState: object not found");
+    
+    return false;
+}
+
+QStringList TestWlanWizardContext::verifyRadioButtons(const QString objName)
+{
+    HbWidget* current = qobject_cast<HbWidget*> (
+        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
+
+    HbRadioButtonList* widget = qobject_cast<HbRadioButtonList*>( 
+        findChildItem(objName, current));
+    
+    QStringList ret;
+
+    if (widget) {
+        ret = widget->items();
+    }
+    else {
+        qWarning("verifyRadioButtons: object not found");
+    }
+
+    return ret;
+}
+
+int TestWlanWizardContext::verifySelectedRadioButton(const QString objName)
+{
+    HbWidget* current = qobject_cast<HbWidget*> (
+        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
+
+    HbRadioButtonList* widget = qobject_cast<HbRadioButtonList*>( 
+        findChildItem(objName, current));
+
+    int ret = ListNotFound;
+
+    if (widget) {
+        ret = widget->selected();
+    }
+    else {
+        qWarning("verifySelectedRadioButton: object not found");
+    }
+
+    return ret;
+}
+
+bool TestWlanWizardContext::verifyCheckBoxState(const QString &objName, bool checked)
+{
+    HbWidget* current = qobject_cast<HbWidget*> (
+        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
+    HbCheckBox* widget = qobject_cast<HbCheckBox*>(
+        findChildItem(objName, current));
+
+    if (widget) {
+        if (widget->isChecked() != checked) {
+            qWarning("Checkbox in wrong state");
+            return false;
+        }
+        return true;
+    } 
+    qWarning("verifyCheckBoxState: object not found");
+    return false;
+}
+
+bool TestWlanWizardContext::selectCheckBoxState(const QString &objName, bool check)
+{
+    HbWidget* current = qobject_cast<HbWidget*> (
+        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
+    HbCheckBox* widget = qobject_cast<HbCheckBox*>(
+        findChildItem(objName, current));
+
+    if (widget) {
+        if (check) {
+            widget->setCheckState(Qt::Checked);
+        } else {
+            widget->setCheckState(Qt::Unchecked);
+        }
+        return true;
+        
+    } 
+    qWarning("selectCheckBoxState: object not found");
+    return false; 
+}
+
+bool TestWlanWizardContext::mouseClickNext()
+{
+    if (mView->mWizard->d_ptr->mActionNext->isEnabled()) {
+        mView->mWizard->d_ptr->mActionNext->activate(QAction::Trigger);
+        return true;
+    }
+    qWarning("Next button not enabled");
+    return false;
+}
+
+bool TestWlanWizardContext::mouseClickPrevious()
+{
+    if (mView->mWizard->d_ptr->mActionPrevious->isEnabled()) {
+        mView->mWizard->d_ptr->mActionPrevious->activate(QAction::Trigger);
+        return true;
+    }
+    qWarning("mouseClickPrevious: Previous button not enabled");
+    
+    return false;
+}
+
+bool TestWlanWizardContext::mouseClickCancel()
+{
+    if (mView->mWizard->d_ptr->mActionCancel->isEnabled()) {
+        mView->mWizard->d_ptr->mActionCancel->activate(QAction::Trigger);
+        return true;
+    }
+    qWarning("mouseClickCancel: Cancel button not enabled");
+    
+    return false;
+}
+
+bool TestWlanWizardContext::mouseClickFinish()
+{
+    if (mView->mWizard->d_ptr->mActionFinish->isEnabled()) {
+        mView->mWizard->d_ptr->mActionFinish->activate(QAction::Trigger);
+        return true;
+    }
+    qWarning("mouseClickFinish: Finish button not enabled");
+    
+    return false;
+}
+
+QString TestWlanWizardContext::toNetworkModeString(int netMode, bool isHidden)
+{
+    QString ret;
+    switch (netMode) {
+    case CMManagerShim::Adhoc:
+        ret = hbTrId("txt_occ_dblist_network_mode_val_adhoc");
+        break;
+
+     default:
+         if (isHidden) {
+             ret = hbTrId("txt_occ_dblist_network_mode_val_infrastructure_hi");
+         } else {
+             ret = hbTrId("txt_occ_dblist_network_mode_val_infrastructure_pu");
+         }
+         break;
+     }
+    return ret;
+} 
+
+QString TestWlanWizardContext::toSecurityModeString(int secMode, int useWpaPsk)
+{
+    QString ret;
+    switch (secMode) {
+    case CMManagerShim::WlanSecMode802_1x:
+        ret = hbTrId("txt_occ_dblist_security_mode_val_8021x");
+        break;
+        
+    case CMManagerShim::WlanSecModeWep:
+        ret = hbTrId("txt_occ_dblist_security_mode_val_wep");
+        break;
+        
+    case CMManagerShim::WlanSecModeWpa:
+        if (useWpaPsk) {
+            ret = hbTrId("txt_occ_dblist_security_mode_val_wpawpa2psk");
+        } else {
+            ret = hbTrId("txt_occ_dblist_security_mode_val_wpawpa2_with_eap");
+        }
+        break;
+        
+    case CMManagerShim::WlanSecModeWpa2:
+        if (useWpaPsk) {
+            ret = hbTrId("txt_occ_dblist_security_mode_val_wpa2_with_passwor");
+        } else {
+            ret = hbTrId("txt_occ_dblist_security_mode_val_wpa2_with_eap");
+        }
+        break;
+        
+    default:
+        Q_ASSERT(secMode == CMManagerShim::WlanSecModeOpen);
+        ret = hbTrId("txt_occ_dblist_security_mode_val_open");
+        break;
+    }
+    return ret;
+}
+
+
+EapQtConfigInterface *TestWlanWizardContext::getEapQtConfig()
+{
+    return mView->mWizard->d_ptr->mEapWizard->d_ptr->mEapConfIf.data();
+}
+
+QString TestWlanWizardContext::eapTypeToString(int type)
+{
+    QCOMPARE(mView->mWizard->d_ptr->mEapWizard != NULL, true);
+    return mView->mWizard->d_ptr->mEapWizard->d_ptr->eapTypeToString(type);
+}
+
+void TestWlanWizardContext::callWlanWizard_startPageOperation()
+{
+    mView->mWizard->d_ptr->startPageOperation();
+}
+
+
+void TestWlanWizardContext::setWlanMgmtClientObject(CWlanMgmtClient* object)
+{
+    // TODO: mWlanMgmtClient = object;
+}
+
+TestView::TestView() : mWizard(NULL)
+{
+    qDebug("TestView::TestView()");
+}
+
+TestView::~TestView()
+{
+    qDebug("TestView::~TestView()");
+}
+
+void TestView::createWizard()
+{
+    qDebug("TestView::createWizard");
+    Q_ASSERT(mWizard == NULL);
+    mWizard = new WlanWizard(mainWindow());
+    bool ok;
+    ok = connect(
+        mWizard, SIGNAL(finished(int, bool)), 
+        this, SLOT(finished(int, bool)), 
+        Qt::QueuedConnection);
+    Q_ASSERT(ok);
+
+    ok = connect(
+        mWizard, SIGNAL(cancelled()), 
+        this, SLOT(cancelled()),
+        Qt::QueuedConnection);
+    Q_ASSERT(ok);
+    
+    mWizardStatus = WizardStatusSignalNone;
+    mConnectedIapId = -100;
+}
+
+void TestView::showWizard()
+{
+    qDebug("TestView::showWizard()");
+    Q_ASSERT(mWizard);
+    mWizard->show();
+}
+
+void TestView::deleteWizard()
+{
+    qDebug("TestView::deleteWizard");
+
+    Q_ASSERT(mWizard != NULL);
+    QMetaObject::invokeMethod(mWizard, "deleteLater", Qt::QueuedConnection);
+    QTest::qWait(100); 
+    mWizard = NULL; 
+}
+
+void TestView::finished(int iapId, bool connected)
+{
+    qDebug("TestView::complete(), iap id: %d, connected: %d", iapId, connected);
+    
+    if (mWizardStatus != WizardStatusSignalNone) {
+        qWarning("TestView::finished: multiple signals received");
+        mWizardStatus = WizardStatusSignalUndefined;
+    } else {
+        mWizardStatus = WizardStatusSignalFinished;
+        mConnectedIapId = iapId;
+    }
+}
+
+void TestView::cancelled()
+{
+    qDebug("TestView::cancelled()");
+    if (mWizardStatus != WizardStatusSignalNone) {
+        qWarning("TestView::cancelled: multiple signals received");
+        mWizardStatus = WizardStatusSignalUndefined;
+    } else {
+        mWizardStatus = WizardStatusSignalCancelled;
+    }
+}
+
+bool TestView::verifyStatus(WizardStatusSignal status, int iapId )
+{
+    // Since connections to cancelled and finished signals are queued
+    // we need to use qWait() here.
+    QTest::qWait(100);
+    bool ret = true;
+    if (status != mWizardStatus){
+        qWarning("TestView::verifyStatus, status: expected: %d, actual: %d", status, mWizardStatus);
+        ret = false;
+    }
+    if (status == WizardStatusSignalFinished) {
+        if (iapId != mConnectedIapId) {
+            qWarning("TestView::verifyStatus, iapid: expected: %d, actual: %d", iapId, mConnectedIapId);
+            ret = false;
+        }
+    }
+    return ret;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardcontext.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,191 @@
+/*
+ * 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:
+ */
+
+#ifndef TESTWLANWIZARDRNDUICONTEXT_H_
+#define TESTWLANWIZARDRNDUICONTEXT_H_
+
+#include <QObject>
+#include <HbView>
+#include <QSharedPointer>
+
+class QGraphicsItem;
+class HbAutoTestMainWindow;
+class WlanWizard;
+class WlanQtUtilsContext;
+class WlanQtUtils;
+class WlanQtUtilsAp;
+class QString;
+class EapWizard;
+class EapQtConfigInterfaceContext;
+class EapQtConfigInterface;
+class WlanMgmtClientContext;
+class CWlanMgmtClient;
+
+//! 1sec 
+#define WaitTimeForUi 500
+
+enum WizardStatusSignal{
+    WizardStatusSignalNone,
+    WizardStatusSignalFinished,
+    WizardStatusSignalCancelled,
+    WizardStatusSignalUndefined,
+};
+
+class ContextWlanApList
+{
+public:
+    ContextWlanApList();
+    ~ContextWlanApList();
+    
+    void Add(QString name,
+        int netMode,
+        int secMode,
+        bool wpaPskInUse,
+        bool wpsSupported,
+        int signalStrength = 0);
+    
+    void clear();
+    
+    const QList<QSharedPointer<WlanQtUtilsAp> > &List() { return mList; }
+private:
+    QList<QSharedPointer<WlanQtUtilsAp> > mList;
+};
+
+class TestView: public HbView
+{
+Q_OBJECT
+
+public: 
+
+
+public:
+    TestView();
+    virtual ~TestView();
+       
+    void createWizard();
+    void showWizard();
+    bool verifyStatus(WizardStatusSignal status, int iapId = -100);
+    
+private slots:
+    void finished(int iapId, bool connected);
+    void cancelled();
+
+public:
+    void deleteWizard();
+    
+public:
+    WlanWizard *mWizard;
+
+private:
+    WizardStatusSignal mWizardStatus;
+    int mConnectedIapId;
+};
+
+
+class TestWlanWizardContext : public QObject
+{
+Q_OBJECT
+public:
+    TestWlanWizardContext();
+    virtual ~TestWlanWizardContext();
+
+public slots:
+    // Test framework functions
+    void initTestCase();
+    void cleanupTestCase();
+    void init();
+    void cleanup();
+    
+protected:
+    static const int ListNotFound = -2;
+    static const int ListNoneSelected = -1;
+    
+    enum ButtonStatus {
+        ButtonHidden,
+        ButtonDisabled,
+        ButtonEnabled
+    };
+    /*!
+     * Reimplements QObject function that is invoked on any event. This
+     * function handles only a focus event to mSsid edit field.
+     * @param obj contains the object, where the event originates from.
+     * @param event contains the event id.
+     */
+    bool eventFilter(QObject *obj, QEvent *event);
+    
+    QGraphicsWidget* findChildItem(const QString &itemName, QGraphicsWidget *widget);
+    bool verifyStatus(WizardStatusSignal status, int iapId = -100);
+    bool verifyCurrentPage(int pageId, int retries = 10, int wait_ms = 200);
+    bool verifyCurrentPageWithInfo(int pageId, const QString &info, int retries = 10, int wait_ms = 200);
+    bool verifyDialogText(const QString objName, const QString text);
+    bool verifyActionButtonVisibility(bool prevVisible, bool cancelVisible,
+        bool nextVisible, bool finishVisible);
+    bool verifyActionButtons(ButtonStatus prevStatus, ButtonStatus cancelStatus,
+        ButtonStatus nextStatus, ButtonStatus finishStatus);
+    bool verifySummaryPage(
+        const QString &ssid, 
+        int netMode,
+        bool hidden,
+        int secMode, 
+        bool useWpaPsk,
+        const QString &destination = QString(), 
+        int outerType = -1,
+        int innerType = -1,
+        bool eapFastProvMode = false);
+    
+    bool mouseClickObject(const QString objName);
+    bool insertTextToObject(const QString objName, const QString text);
+    bool selectRadioButton(const QString objName, int index);
+    bool verifyRadioButtonState(const QString objName, int index, const QString &text);
+    bool verifyCheckBoxState(const QString &objName, bool checked);
+    QStringList verifyRadioButtons(const QString objName);
+    int verifySelectedRadioButton(const QString objName);
+    bool selectCheckBoxState(const QString &objName, bool check);
+    
+    bool mouseClickNext();
+    bool mouseClickPrevious();
+    bool mouseClickCancel();
+    bool mouseClickFinish();
+    
+    QString toNetworkModeString(int netMode, bool isHidden);
+    QString toSecurityModeString(int secMode, int useWpaPsk);
+    
+    EapQtConfigInterface *getEapQtConfig();
+    QString eapTypeToString(int type);
+    
+    void callWlanWizard_startPageOperation();
+    
+public:
+    static void setWlanMgmtClientObject(CWlanMgmtClient* object);
+    
+public:
+    
+    static CWlanMgmtClient *mWlanMgmtClient;
+    
+protected:
+    bool mEvent;
+
+    // Test data
+    TestView *mView;
+    HbAutoTestMainWindow *mMainWindow;
+    WlanQtUtilsContext *mWlanQtUtilsContext;
+    EapQtConfigInterfaceContext *mEapQtUtilsContext;
+    WlanMgmtClientContext *mWlanMgmtClientContext;
+    ContextWlanApList *mApList;
+    ContextWlanApList *mApOpenList;
+};
+
+#endif /* TESTWLANWIZARDRNDUICONTEXT_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardeap.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,1837 @@
+/*
+ * 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:
+ */
+
+// System includes
+#include <QTest>
+#include <QDebug>
+#include <QList>
+#include <cmmanagerdefines_shim.h>
+#include <wlanerrorcodes.h>
+
+// User includes
+#include "testwlanwizardeap.h"
+#include "testwlanwizardeap_conf.h"
+#include "hbautotest.h"
+#include "wlanwizard.h"
+#include "wlanwizard_p.h"
+#include "wlanqtutils_context.h"
+#include "wlanqtutils.h"
+#include "wlanqtutilsap.h"
+#include "wlanwizardpageinternal.h"
+#include "eapwizardpage.h"
+#include "eapqtvalidator_stub.h"
+
+#include "eapqtconfiginterface_context.h"
+
+// External function prototypes
+
+// Local constants
+
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+// ---------------------------------------------------------
+// TEST CASES
+// ---------------------------------------------------------
+void TestWlanWizardEap::tc_eap_outer_page_orientation_change()
+{
+#ifdef tc_eap_outer_page_orientation_change_enabled
+   
+    const QString ssid("tc_eap_outer_page_orientation_change");
+    
+    mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa2, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype(ButtonDisabled);
+    
+    mMainWindow->setOrientation(Qt::Horizontal, false);
+    QTest::qWait(WaitTimeForUi);
+
+    verify_outertype(ButtonDisabled);
+    
+    mMainWindow->setOrientation(Qt::Vertical, false);
+    QTest::qWait(WaitTimeForUi);
+    
+    verify_outertype(ButtonDisabled);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka()
+{
+#ifdef tc_eap_aka_enabled
+    tc_eap_aka_sim(EapQtPluginHandle::PluginEapAka);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_sim()
+{
+#ifdef tc_eap_sim_enabled
+    tc_eap_aka_sim(EapQtPluginHandle::PluginEapSim);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_leap()
+{
+#ifdef tc_eap_leap_enabled
+    const QString username("user");
+    const QString password("passwd");
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+    mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+    
+    mEapQtUtilsContext->setConfigurationReference(3, true);
+    mEapQtUtilsContext->createLeap(username,password);
+    
+    const QString ssid("tc_eap_leap");
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    verify_username_password_click_next(EapQtPluginHandle::PluginLeap, username, password);
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QTest::qWait(WaitTimeForUi);
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+    QTest::qWait(WaitTimeForUi);
+    
+    QCOMPARE( verifySummaryPage(
+        ssid,
+        CMManagerShim::Infra,
+        false, 
+        CMManagerShim::WlanSecModeWpa, 
+        false,
+        hbTrId("txt_occ_dblist_destination_val_internet"),
+        EapQtPluginHandle::PluginLeap),true);
+    
+    QTest::qWait(WaitTimeForUi);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_peap_gtc()
+{
+#ifdef tc_eap_peap_gtc_enabled
+    tc_eap_peap_ttls(
+        EapQtPluginHandle::PluginPeap, 
+        EapQtPluginHandle::PluginEapGtc);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_peap_mschapv2()
+{
+#ifdef tc_eap_peap_mschapv2_enabled
+    tc_eap_peap_ttls(
+        EapQtPluginHandle::PluginPeap, 
+        EapQtPluginHandle::PluginEapMschapv2);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_ttls_mschapv2()
+{
+#ifdef tc_eap_ttls_mschapv2_enabled
+    tc_eap_peap_ttls(
+        EapQtPluginHandle::PluginEapTtls, 
+        EapQtPluginHandle::PluginPlainMschapv2);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_ttls_pap()
+{
+#ifdef tc_eap_ttls_pap_enabled
+    tc_eap_peap_ttls(
+        EapQtPluginHandle::PluginEapTtls, 
+        EapQtPluginHandle::PluginPap);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_ttls_gtc()
+{
+#ifdef tc_eap_ttls_gtc_enabled
+    tc_eap_peap_ttls(
+        EapQtPluginHandle::PluginEapTtls, 
+        EapQtPluginHandle::PluginEapGtc);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanUserRejected()
+{
+#ifdef tc_eap_aka_connect_KErrWlanUserRejected_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanUserRejected,
+        hbTrId("txt_occ_dialog_1_auth_failed_user_cert_rej").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanUserCertificateExpired()
+{
+#ifdef tc_eap_aka_connect_KErrWlanUserCertificateExpired_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanUserCertificateExpired,
+        hbTrId("txt_occ_dialog_1_auth_failed_user_cert_exp").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanServerCertificateExpired()
+{
+#ifdef tc_eap_aka_connect_KErrWlanServerCertificateExpired_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanServerCertificateExpired,
+        hbTrId("txt_occ_dialog_1_authentication_failed_server_ce").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanCerficateVerifyFailed()
+{
+#ifdef tc_eap_aka_connect_KErrWlanCerficateVerifyFailed_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanCerficateVerifyFailed,
+        hbTrId("txt_occ_dialog_1_authentication_failed_could_not").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif    
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanNoCipherSuite()
+{
+#ifdef tc_eap_aka_connect_KErrWlanNoCipherSuite_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanNoCipherSuite,
+        hbTrId("txt_occ_dialog_1_authentication_failed_cipher_su").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif     
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanSimNotInstalled()
+{
+#ifdef tc_eap_aka_connect_KErrWlanSimNotInstalled_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanSimNotInstalled,
+        hbTrId("txt_occ_dialog_1_authentication_failed_check_sim").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif      
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastPacStoreCorrupted()
+{
+#ifdef tc_eap_aka_connect_KErrWlanEapFastPacStoreCorrupted_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanEapFastPacStoreCorrupted,
+        hbTrId("txt_occ_dialog_1_authentication_failed_reset_pac").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapFast)));
+#endif      
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapSimFailed()
+{
+#ifdef tc_eap_aka_connect_KErrWlanEapSimFailed_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanEapSimFailed,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif      
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanNotSubscribed()
+{
+#ifdef tc_eap_aka_connect_KErrWlanNotSubscribed_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanNotSubscribed,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif      
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrCancel()
+{
+#ifdef tc_eap_aka_connect_KErrCancel_enabled
+    tc_eap_aka_connect_error(
+        KErrCancel,
+        hbTrId("txt_occ_dialog_connection_failed"));
+#endif       
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapTlsFailed()
+{
+#ifdef tc_eap_aka_connect_KErrWlanEapTlsFailed_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanEapTlsFailed,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif
+}
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapPeapFailed()
+{
+#ifdef tc_eap_aka_connect_KErrWlanEapPeapFailed_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanEapPeapFailed,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));    
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapAkaFailed()
+{
+#ifdef tc_eap_aka_connect_KErrWlanEapAkaFailed_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanEapAkaFailed,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapTtlsFailed()
+{
+#ifdef tc_eap_aka_connect_KErrWlanEapTtlsFailed_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanEapTtlsFailed,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanLeapFailed()
+{
+#ifdef tc_eap_aka_connect_KErrWlanLeapFailed_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanLeapFailed,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanNoUserCertificate()
+{
+#ifdef tc_eap_aka_connect_KErrWlanNoUserCertificate_enabled 
+    tc_eap_aka_connect_error(
+        KErrWlanNoUserCertificate,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastTunnelCompromiseError()
+{
+#ifdef tc_eap_aka_connect_KErrWlanEapFastTunnelCompromiseError_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanEapFastTunnelCompromiseError,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));    
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastUnexpextedTlvExhanged()
+{
+#ifdef tc_eap_aka_connect_KErrWlanEapFastUnexpextedTlvExhanged_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanEapFastUnexpextedTlvExhanged,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));    
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastNoPacNorCertsToAuthenticateWithProvDisabled()
+{
+#ifdef tc_eap_aka_connect_KErrWlanEapFastNoPacNorCertsToAuthenticateWithProvDisabled_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanEapFastNoPacNorCertsToAuthenticateWithProvDisabled,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastNoMatchingPacForAid()
+{
+#ifdef tc_eap_aka_connect_KErrWlanEapFastNoMatchingPacForAid_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanEapFastNoMatchingPacForAid,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastAuthFailed()
+{
+#ifdef tc_eap_aka_connect_KErrWlanEapFastAuthFailed_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanEapFastAuthFailed,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));    
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanAccessBarred()
+{
+#ifdef tc_eap_aka_connect_KErrWlanAccessBarred_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanAccessBarred,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));    
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanPasswordExpired()
+{
+#ifdef tc_eap_aka_connect_KErrWlanPasswordExpired_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanPasswordExpired,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));    
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanNoDialinPermissions()
+{
+#ifdef tc_eap_aka_connect_KErrWlanNoDialinPermissions_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanNoDialinPermissions,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));    
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanAccountDisabled()
+{
+#ifdef tc_eap_aka_connect_KErrWlanAccountDisabled_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanAccountDisabled,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanRestrictedLogonHours()
+{
+#ifdef tc_eap_aka_connect_KErrWlanRestrictedLogonHours_enabled
+    tc_eap_aka_connect_error(
+        KErrWlanRestrictedLogonHours,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapAka)));    
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_ttls_mschapv2_connect_KErrWlanEapGtcFailed()
+{
+#ifdef tc_eap_ttls_mschapv2_connect_KErrWlanEapGtcFailed_enabled
+    tc_eap_peap_ttls(
+        EapQtPluginHandle::PluginEapTtls, 
+        EapQtPluginHandle::PluginPlainMschapv2,
+        KErrWlanEapGtcFailed,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginPlainMschapv2)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_ttls_mschapv2_connect_KErrWlanEapMsChapv2()
+{
+#ifdef tc_eap_ttls_mschapv2_connect_KErrWlanEapMsChapv2_enabled
+    tc_eap_peap_ttls(
+        EapQtPluginHandle::PluginEapTtls, 
+        EapQtPluginHandle::PluginPlainMschapv2,
+        KErrWlanEapMsChapv2,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginPlainMschapv2)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_ttls_mschapv2_connect_KErrWlanNotSubscribed()
+{
+#ifdef tc_eap_ttls_mschapv2_connect_KErrWlanNotSubscribed_enabled
+    tc_eap_peap_ttls(
+        EapQtPluginHandle::PluginEapTtls, 
+        EapQtPluginHandle::PluginPlainMschapv2,
+        KErrWlanNotSubscribed,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginPlainMschapv2)));
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_ttls_gtc_back_and_forward()
+{
+#ifdef tc_eap_ttls_gtc_back_and_forward_enabled
+    tc_eap_peap_ttls(
+        EapQtPluginHandle::PluginEapTtls, 
+        EapQtPluginHandle::PluginEapGtc,
+        KErrWlanNotSubscribed,
+        hbTrId("txt_occ_dialog_1_authentication_failed").arg(
+            eapTypeToString(EapQtPluginHandle::PluginEapGtc)));
+    
+    // Go back to outertype selection page
+    QCOMPARE(mouseClickPrevious(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_username_password(EapQtPluginHandle::PluginEapGtc);
+
+    QCOMPARE(mouseClickPrevious(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_innertype(
+        EapQtPluginHandle::PluginEapTtls,
+        ButtonEnabled);
+
+    QCOMPARE(mouseClickPrevious(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_identity_page(eapTypeToString(EapQtPluginHandle::PluginEapTtls));
+    
+    QCOMPARE(mouseClickPrevious(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_ca_cert_page();
+    
+    QCOMPARE(mouseClickPrevious(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_outertype(ButtonEnabled);
+    
+    // Go forward to username & password page
+    QCOMPARE(mouseClickNext(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_ca_cert_page();
+    
+    // Create new validators
+    mEapQtUtilsContext->createEapIdentifyValidators(EapQtPluginHandle::PluginEapTtls);
+    mEapQtUtilsContext->createInnerTypeValidators(EapQtPluginHandle::PluginEapGtc);
+    
+    QCOMPARE(mouseClickNext(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_identity_page(eapTypeToString(EapQtPluginHandle::PluginEapTtls));
+    
+    QCOMPARE(mouseClickNext(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_innertype(
+        EapQtPluginHandle::PluginEapTtls,
+        ButtonEnabled);
+    
+    QCOMPARE(mouseClickNext(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_username_password(EapQtPluginHandle::PluginEapGtc);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_set_outer_type_fails()
+{
+#ifdef tc_eap_aka_set_outer_type_fails_enabled
+    const QString ssid("tc_eap_aka_set_outer_type_fails");
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(false);
+    mWlanQtUtilsContext->setSignalWlanNetworkClosed(3, KErrCancel);
+    
+    mEapQtUtilsContext->setConfigurationReference(3, true);
+    mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka);
+    mEapQtUtilsContext->setSelectectedOuterTypesReturn(false);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa2, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( 
+        verifyCurrentPageWithInfo(
+            WlanWizardPageInternal::PageGenericError, 
+            hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret")), true );
+    
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_save_outer_configuration_fails()
+{
+#ifdef tc_eap_aka_save_outer_configuration_fails_enabled
+    const QString ssid("tc_eap_aka_save_outer_configuration_fails");
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(false);
+    mWlanQtUtilsContext->setSignalWlanNetworkClosed(3, KErrCancel);
+    
+    mEapQtUtilsContext->setConfigurationReference(3, true);
+    mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka);
+    mEapQtUtilsContext->setOuterConfigReturn(false);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa2, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( 
+        verifyCurrentPageWithInfo(
+            WlanWizardPageInternal::PageGenericError, 
+            hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret")), true );
+    
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_aka_set_configuration_reference_fails()
+{
+#ifdef tc_eap_aka_set_configuration_reference_fails_enabled
+    const QString ssid("tc_eap_aka_set_configuration_reference_fails");
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(false);
+    mWlanQtUtilsContext->setSignalWlanNetworkClosed(3, KErrCancel);
+    
+    mEapQtUtilsContext->setConfigurationReference(3, false);
+    mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa2, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( 
+        verifyCurrentPageWithInfo(
+            WlanWizardPageInternal::PageGenericError, 
+            hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret")), true );
+    
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_peap_gtc_save_inner_configuration_fails()
+{
+#ifdef tc_eap_peap_gtc_save_inner_configuration_fails_enabled
+    tc_eap_peap_ttls(
+        EapQtPluginHandle::PluginEapTtls, 
+        EapQtPluginHandle::PluginEapGtc,
+        KErrGeneral, // Not used directly in sub test case
+        hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret"),
+        false );
+#endif
+}
+
+
+void TestWlanWizardEap::tc_eap_peap_identity_validators()
+{
+#ifdef tc_eap_peap_identity_validators_enabled
+    const QString ssid("tc_eap_peap_identity_validators");
+    const QString username("u");
+    const QString password("p");
+    const QString usernameIdentity("identity");
+    const QString realm("realm.com");
+    EapQtPluginHandle::Plugin outerType(EapQtPluginHandle::PluginPeap);
+    EapQtPluginHandle::Plugin innerType(EapQtPluginHandle::PluginEapGtc);
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+    mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+
+    mEapQtUtilsContext->setConfigurationReference(3, true);
+    mEapQtUtilsContext->createEapTtlsPeap(
+        outerType,
+        true,
+        true,
+        usernameIdentity,
+        true,
+        realm,
+        innerType );
+
+    EapQtValidatorStub* validatorUser = (EapQtValidatorStub*)mEapQtUtilsContext->validator(
+        EapQtExpandedEapType::TypePeap, EapQtConfig::Username);
+    EapQtValidatorStub* validatorRealm = (EapQtValidatorStub*)mEapQtUtilsContext->validator(
+        EapQtExpandedEapType::TypePeap,EapQtConfig::Realm);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    verify_ca_cert_page_select_and_click_next(true);
+    
+    QCOMPARE( verifyCurrentPageWithInfo(EapWizardPage::PageIdentity, eapTypeToString(outerType)), true );
+    // Check box checked next enabled
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QCOMPARE(verifyCheckBoxState("setlabel_53_val", true), true);
+    QCOMPARE(verifyCheckBoxState("setlabel_54_val", true), true);
+
+    // 1. Username validator returns false, checkbox not checked
+    validatorUser->setReturnValue(EapQtValidator::StatusInvalid);
+    validatorRealm->setReturnValue(EapQtValidator::StatusOk);
+    
+    QCOMPARE(selectCheckBoxState("setlabel_53_val", false), true);
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+  
+    // 2. Username validator returns true, checkbox not checked
+    validatorUser->setReturnValue(EapQtValidator::StatusOk);
+    validatorRealm->setReturnValue(EapQtValidator::StatusOk);
+    QCOMPARE( mouseClickObject("lineEditUsername"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditUsername", username), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );    
+
+    // 3. back to valid state, checkboc checked
+    QCOMPARE(selectCheckBoxState("setlabel_53_val", true), true);
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+
+    // 4. Realm validator returns false, checkbox not checked
+    validatorUser->setReturnValue(EapQtValidator::StatusOk);
+    validatorRealm->setReturnValue(EapQtValidator::StatusInvalid);
+
+    QCOMPARE(selectCheckBoxState("setlabel_54_val", false), true);
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    
+    // 5. Realm validator returns true, checkbox not checked
+    validatorUser->setReturnValue(EapQtValidator::StatusOk);
+    validatorRealm->setReturnValue(EapQtValidator::StatusOk);
+    QCOMPARE( mouseClickObject("lineEditRealm"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditRealm", username), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );    
+
+    // 6. back to valid state, checkboc checked
+    QCOMPARE(selectCheckBoxState("setlabel_54_val", true), true);
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_leap_user_password_validators()
+{
+#ifdef tc_eap_leap_user_password_validators_enabled
+    const QString ssid("tc_eap_leap_user_password_validators");
+    const QString username("u");
+    const QString password("p");
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+    mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+    
+    mEapQtUtilsContext->setConfigurationReference(3, true);
+    mEapQtUtilsContext->createLeap(username,password);
+    
+    EapQtValidatorStub* validatorUser = (EapQtValidatorStub*)mEapQtUtilsContext->validator(
+        EapQtExpandedEapType::TypeLeap, EapQtConfig::Username);
+    EapQtValidatorStub* validatorPassword = (EapQtValidatorStub*)mEapQtUtilsContext->validator(
+        EapQtExpandedEapType::TypeLeap, EapQtConfig::Password);
+    validatorUser->setReturnValue(EapQtValidator::StatusInvalid);
+    validatorPassword->setReturnValue(EapQtValidator::StatusInvalid);
+
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+
+    // 1. By default both validator return invalid
+    QCOMPARE( 
+        verifyCurrentPageWithInfo(
+            EapWizardPage::PageUsernamePassword, 
+            eapTypeToString(EapQtPluginHandle::PluginLeap)), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    
+    // 2. User return ok, password invalid 
+    validatorUser->setReturnValue(EapQtValidator::StatusOk);
+    QCOMPARE( mouseClickObject("lineEditUsername"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditUsername", username), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    
+    // 3. User return ok, password ok
+    validatorPassword->setReturnValue(EapQtValidator::StatusOk);
+    QCOMPARE( mouseClickObject("lineEditPassword"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditPassword", password), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_tls_no_user_certificate()
+{
+#ifdef tc_eap_tls_no_user_certificate_enabled
+    
+    const QString ssid("tc_eap_tls_no_user_certificate");
+    
+    QList<EapQtCertificateInfo> caCerts;
+    QList<EapQtCertificateInfo> userCerts;
+    
+    EapQtCertificateInfo caCert;
+    caCert.setValue(EapQtCertificateInfo::CertificateLabel, "My Super Cert 1");
+    caCerts.append(caCert);
+    
+    mEapQtUtilsContext->createEapTls(
+        caCerts,
+        0,
+        userCerts,
+        -1);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa2, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    verify_ca_cert_page_select_and_click_next(false);
+    verify_user_cert_page_select_and_click_next(ButtonDisabled, -1);
+
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_tls_one_user_certificate_with_ca_selection()
+{
+#ifdef tc_eap_tls_one_user_certificate_with_ca_selection_enabled
+    const QString ssid("tc_eap_tls_one_user_certificate_with_ca_selection");
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+    mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+    
+    mEapQtUtilsContext->setConfigurationReference(3, true);
+    
+    QList<EapQtCertificateInfo> caCerts;
+    QList<EapQtCertificateInfo> userCerts;
+    
+    EapQtCertificateInfo cert;
+    cert.setValue(EapQtCertificateInfo::CertificateLabel, "My CA Cert");
+    caCerts.append(cert);
+    
+    cert.setValue(EapQtCertificateInfo::CertificateLabel, "My User Cert");
+    userCerts.append(cert);
+    
+    mEapQtUtilsContext->createEapTls(
+        caCerts,
+        0,
+        userCerts,
+        0);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa2, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    verify_ca_cert_page_select_and_click_next(false);
+    verify_user_cert_page_select_and_click_next(ButtonEnabled, 0);
+    verify_identity_and_click_next(eapTypeToString(EapQtPluginHandle::PluginEapTls));
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+    
+    QCOMPARE( verifySummaryPage(
+        ssid,
+        CMManagerShim::Infra,
+        false, 
+        CMManagerShim::WlanSecModeWpa2, 
+        false,
+        hbTrId("txt_occ_dblist_destination_val_internet"),
+        EapQtPluginHandle::PluginEapTls),true);
+    
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_tls_two_user_certificates()
+{
+#ifdef tc_eap_tls_two_user_certificates_enabled
+    const QString ssid("tc_eap_tls_two_user_certificates");
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+    mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+    
+    mEapQtUtilsContext->setConfigurationReference(3, true);
+    
+    QList<EapQtCertificateInfo> caCerts;
+    QList<EapQtCertificateInfo> userCerts;
+    
+    EapQtCertificateInfo cert;
+    cert.setValue(EapQtCertificateInfo::CertificateLabel, "My CA Cert");
+    caCerts.append(cert);
+    cert.setValue(EapQtCertificateInfo::CertificateLabel, "My Super CA Cert");
+    caCerts.append(cert);
+    
+    cert.setValue(EapQtCertificateInfo::CertificateLabel, "My User Cert");
+    userCerts.append(cert);
+    cert.setValue(EapQtCertificateInfo::CertificateLabel, "My User Cert Second");
+    userCerts.append(cert);
+    
+    mEapQtUtilsContext->createEapTls(
+        caCerts,
+        0,
+        userCerts,
+        1);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa2, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    verify_ca_cert_page_select_and_click_next(false);
+    verify_user_cert_page_select_and_click_next(ButtonDisabled, 1);
+    verify_identity_and_click_next(eapTypeToString(EapQtPluginHandle::PluginEapTls));
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+    
+    QCOMPARE( verifySummaryPage(
+        ssid,
+        CMManagerShim::Infra,
+        false, 
+        CMManagerShim::WlanSecModeWpa2, 
+        false,
+        hbTrId("txt_occ_dblist_destination_val_internet"),
+        EapQtPluginHandle::PluginEapTls),true);
+    
+#endif 
+}
+
+void TestWlanWizardEap::tc_eap_tls_back_and_forward_certs_with_cert_update()
+{
+#ifdef tc_eap_tls_back_and_forward_certs_with_cert_update_enabled
+    const QString ssid("tc_eap_tls_two_user_certificates");
+    
+    const QString caCert1("My CA Cert");
+    const QString caCert2("My CA Cert Second");
+
+    const QString userCert1("My User Cert");
+    const QString userCert2("My User Cert Second");
+    
+    QList<EapQtCertificateInfo> caCerts;
+    QList<EapQtCertificateInfo> userCerts;
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+    mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+    
+    mEapQtUtilsContext->setConfigurationReference(3, true);
+    
+    EapQtCertificateInfo cert;
+    cert.setValue(EapQtCertificateInfo::CertificateLabel, caCert1);
+    caCerts.append(cert);
+    
+    cert.setValue(EapQtCertificateInfo::CertificateLabel, userCert1);
+    userCerts.append(cert);
+    
+    mEapQtUtilsContext->createEapTls(
+        caCerts,
+        0,
+        userCerts,
+        0);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa2, 
+        false, false, false);
+
+    mView->showWizard();
+    verify_outertype_select_first(ButtonDisabled);
+    verify_ca_cert_page_select_and_click_next(true);
+    verify_user_cert_page_select_and_click_next(ButtonEnabled, 0);
+    verify_identity_page(eapTypeToString(EapQtPluginHandle::PluginEapTls));
+
+    // backwards
+    QCOMPARE(mouseClickPrevious(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_user_cert_page(ButtonEnabled, userCert1, 0 );
+
+    QCOMPARE(mouseClickPrevious(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_ca_cert_page();
+
+    QCOMPARE(mouseClickPrevious(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_outertype(ButtonEnabled);
+
+    cert.setValue(EapQtCertificateInfo::CertificateLabel, caCert2);
+    caCerts.append(cert);
+    mEapQtUtilsContext->setCertsCa(caCerts);
+    
+    cert.setValue(EapQtCertificateInfo::CertificateLabel, userCert2);
+    userCerts.append(cert);
+    mEapQtUtilsContext->setCertsUser(userCerts);
+
+    mEapQtUtilsContext->createEapIdentifyValidators(EapQtPluginHandle::PluginEapTls);
+    
+    // Forward
+    QCOMPARE(mouseClickNext(), true);
+    verify_ca_cert_page_select_and_click_next(false);
+    verify_user_cert_page(ButtonDisabled);
+
+    // backwards
+    QCOMPARE(mouseClickPrevious(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_ca_cert_page(caCert1, 1);
+
+    QCOMPARE(mouseClickPrevious(), true);
+    QTest::qWait(WaitTimeForUi);
+    verify_outertype(ButtonEnabled);
+
+    QCOMPARE(mouseClickNext(), true);
+    verify_ca_cert_page(caCert1, 1);
+
+    QCOMPARE(mouseClickNext(), true);
+    verify_user_cert_page_select_and_click_next(ButtonDisabled, 0);
+
+    verify_identity_and_click_next(eapTypeToString(EapQtPluginHandle::PluginEapTls));        
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+    
+    QCOMPARE( verifySummaryPage(
+        ssid,
+        CMManagerShim::Infra,
+        false, 
+        CMManagerShim::WlanSecModeWpa2, 
+        false,
+        hbTrId("txt_occ_dblist_destination_val_internet"),
+        EapQtPluginHandle::PluginEapTls),true);
+    
+#endif 
+}
+
+void TestWlanWizardEap::tc_eap_sim_finish()
+{
+#ifdef tc_eap_sim_finish_enabled
+    tc_eap_aka_sim(EapQtPluginHandle::PluginEapAka);
+    
+    QCOMPARE( mouseClickFinish(), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyStatus(WizardStatusSignalFinished, 3), true);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_sim_cancel()
+{
+#ifdef tc_eap_sim_cancel_enabled
+    tc_eap_aka_sim(EapQtPluginHandle::PluginEapAka);
+    
+    QCOMPARE( mouseClickCancel(), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE(verifyStatus(WizardStatusSignalCancelled), true);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_fast_confirmed()
+{
+#ifdef tc_eap_fast_confirmed_enabled
+    tc_eap_fast(
+        EapQtPacStoreConfig::PacStoreStatePasswordStored,
+        true);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_fast_new_store()
+{
+#ifdef tc_eap_fast_new_store_enabled
+    tc_eap_fast(
+        EapQtPacStoreConfig::PacStoreStateStoreNotExists,
+        true);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_fast_new_store_save_fails()
+{
+#ifdef tc_eap_fast_new_store_save_fails_enabled
+    tc_eap_fast(
+        EapQtPacStoreConfig::PacStoreStateStoreNotExists,
+        false);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_fast_new_store_and_validators()
+{
+#ifdef tc_eap_fast_new_store_and_validators_enabled
+    const QString ssid("tc_eap_fast_new_store_and_validators");
+    const QString username("user");
+
+    mWlanQtUtilsContext->setCreateWlanIapResult(4);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(4);
+    mWlanQtUtilsContext->setSignalIctResult(4, WlanQtUtils::IctPassed);
+
+    mEapQtUtilsContext->setConfigurationReference(4, true);
+    mEapQtUtilsContext->createEapFast(EapQtPacStoreConfig::PacStoreStateStoreNotExists);
+    mEapQtUtilsContext->createInner(
+        EapQtPluginHandle::PluginEapFast,
+        EapQtPluginHandle::PluginEapMschapv2,
+        "u",
+        "p");
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa, 
+        false, false, false);
+
+    mView->showWizard();
+    EapQtValidatorStub *validator = (EapQtValidatorStub*)mEapQtUtilsContext->validatorPacStore(
+        EapQtPacStoreConfig::PacStorePassword);
+    validator->setReturnValue(EapQtValidator::StatusInvalid);
+    
+    verify_outertype_select_first(ButtonDisabled);
+    verify_new_pac_store_password_page(ButtonDisabled);
+    
+    QCOMPARE( mouseClickObject("lineEditUsername"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditUsername", username), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    
+    validator->setReturnValue(EapQtValidator::StatusOk);
+    
+    QCOMPARE( mouseClickObject("lineEditPassword"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditPassword", username), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    
+    QCOMPARE( mouseClickNext(), true );
+    verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
+
+#endif
+}
+
+
+void TestWlanWizardEap::tc_eap_fast_new_store_back_and_forwards()
+{
+#ifdef tc_eap_fast_new_store_back_and_forwards_enabled
+    const QString ssid("tc_eap_fast_new_store_back_and_forwards");
+    const QString username("u");
+    const QString password("p");
+
+    mWlanQtUtilsContext->setCreateWlanIapResult(4);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(4);
+    mWlanQtUtilsContext->setSignalIctResult(4, WlanQtUtils::IctPassed);
+
+    mEapQtUtilsContext->setConfigurationReference(4, true);
+    mEapQtUtilsContext->createEapFast(EapQtPacStoreConfig::PacStoreStateStoreNotExists);
+    mEapQtUtilsContext->createInner(
+        EapQtPluginHandle::PluginEapFast,
+        EapQtPluginHandle::PluginEapMschapv2,
+        username,
+        password);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    verify_new_pac_store_password_page(ButtonEnabled);
+    QCOMPARE( mouseClickNext(), true );
+    verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
+    
+    // backwards
+    QCOMPARE( mouseClickPrevious(), true );
+    verify_new_pac_store_password_page(ButtonEnabled);
+    QCOMPARE( mouseClickPrevious(), true );
+    
+    mEapQtUtilsContext->createInnerTypeValidators(EapQtPluginHandle::PluginEapMschapv2);
+    
+    // forwards
+    verify_outertype_select_first(ButtonEnabled);
+    verify_new_pac_store_password_page(ButtonEnabled);
+    QCOMPARE( mouseClickNext(), true );
+    verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_fast_new_store_read_config_fail()
+{
+#ifdef tc_eap_fast_new_store_read_config_fail_enabled
+    tc_eap_fast(
+        EapQtPacStoreConfig::PacStoreStateStoreNotExists,
+        true,
+        false);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_fast_confirm_store()
+{
+#ifdef tc_eap_fast_confirm_store_enabled
+    tc_eap_fast(
+        EapQtPacStoreConfig::PacStoreStatePasswordRequired,
+        true);
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_fast_confirm_store_and_validators()
+{
+#ifdef tc_eap_fast_confirm_store_and_validators_enabled
+    const QString ssid("tc_eap_fast_confirm_store_and_validators");
+    const QString username_invalid("invalid");
+    const QString username_valid("valid");
+
+    mWlanQtUtilsContext->setCreateWlanIapResult(4);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(4);
+    mWlanQtUtilsContext->setSignalIctResult(4, WlanQtUtils::IctPassed);
+
+    mEapQtUtilsContext->setConfigurationReference(4, true);
+    mEapQtUtilsContext->createEapFast(EapQtPacStoreConfig::PacStoreStatePasswordRequired);
+    mEapQtUtilsContext->createInner(
+        EapQtPluginHandle::PluginEapFast,
+        EapQtPluginHandle::PluginEapMschapv2,
+        "u",
+        "p");
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa, 
+        false, false, false);
+
+    mView->showWizard();
+    EapQtValidatorStub *validator = (EapQtValidatorStub*)mEapQtUtilsContext->validatorPacStore(
+        EapQtPacStoreConfig::PacStorePasswordConfirmation);
+    validator->setReturnValue(EapQtValidator::StatusInvalid);
+    
+    verify_outertype_select_first(ButtonDisabled);
+    verify_confirm_pac_store_password_page(ButtonEnabled);
+    
+    QCOMPARE( mouseClickObject("lineEditPasswordConfirm"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditPasswordConfirm", username_invalid), true );
+    QCOMPARE( mouseClickObject("labelError"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    
+    QCOMPARE( mouseClickNext(), true );
+    verify_confirm_pac_store_password_page(ButtonEnabled);
+    QCOMPARE( verifyDialogText("labelError", hbTrId("txt_occ_info_incorrect_password")), true);
+
+
+    validator->setReturnValue(EapQtValidator::StatusOk);
+    
+    QCOMPARE( mouseClickObject("lineEditPasswordConfirm"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditPasswordConfirm", username_valid), true );
+    QCOMPARE( mouseClickObject("labelError"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyDialogText("labelError", hbTrId("txt_occ_info_incorrect_password")), false);
+    
+    QCOMPARE( mouseClickNext(), true );
+    verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
+
+#endif
+}
+
+void TestWlanWizardEap::tc_eap_fast_confirm_store_back_and_forwards()
+{
+#ifdef tc_eap_fast_confirm_store_back_and_forwards_enabled
+    const QString ssid("tc_eap_fast_confirm_store_back_and_forwards");
+    const QString username("u");
+    const QString password("p");
+
+    mWlanQtUtilsContext->setCreateWlanIapResult(4);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(4);
+    mWlanQtUtilsContext->setSignalIctResult(4, WlanQtUtils::IctPassed);
+
+    mEapQtUtilsContext->setConfigurationReference(4, true);
+    mEapQtUtilsContext->createEapFast(EapQtPacStoreConfig::PacStoreStatePasswordRequired);
+    mEapQtUtilsContext->createInner(
+        EapQtPluginHandle::PluginEapFast,
+        EapQtPluginHandle::PluginEapMschapv2,
+        username,
+        password);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    verify_confirm_pac_store_password_page(ButtonEnabled);
+    QCOMPARE( mouseClickNext(), true );
+    verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
+    
+    // backwards
+    QCOMPARE( mouseClickPrevious(), true );
+    verify_confirm_pac_store_password_page(ButtonEnabled);
+    QCOMPARE( mouseClickPrevious(), true );
+    
+    mEapQtUtilsContext->createInnerTypeValidators(EapQtPluginHandle::PluginEapMschapv2);
+    
+    // forwards
+    verify_outertype_select_first(ButtonEnabled);
+    verify_confirm_pac_store_password_page(ButtonEnabled);
+    QCOMPARE( mouseClickNext(), true );
+    verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
+#endif
+}
+
+
+// ---------------------------------------------------------
+// HELPPER VERIFICATORS & NAVIGATORS
+// ---------------------------------------------------------
+
+void TestWlanWizardEap::verify_outertype_select_first(
+    TestWlanWizardContext::ButtonStatus nextButtonStatus)
+{
+    verify_outertype(nextButtonStatus);
+    
+    QCOMPARE( selectRadioButton( "list", 0 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QCOMPARE( mouseClickNext(), true );
+}
+
+void TestWlanWizardEap::verify_outertype(
+    TestWlanWizardContext::ButtonStatus nextButtonStatus)
+{
+    QCOMPARE( verifyCurrentPage(EapWizardPage::PageOuterType), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
+}
+
+void TestWlanWizardEap::verify_innertype_select_first(
+    int outerType,
+    TestWlanWizardContext::ButtonStatus nextButtonStatus)
+{
+    verify_innertype(outerType, nextButtonStatus);
+    
+    QCOMPARE( selectRadioButton( "list", 0 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QCOMPARE( mouseClickNext(), true );
+}
+
+void TestWlanWizardEap::verify_innertype(
+    int outerType, 
+    TestWlanWizardContext::ButtonStatus nextButtonStatus)
+{
+    int pageId;
+    if (outerType == EapQtPluginHandle::PluginPeap){
+        pageId = EapWizardPage::PageInnerTypePeap;
+        
+    } else {
+        Q_ASSERT(outerType == EapQtPluginHandle::PluginEapTtls);
+        pageId = EapWizardPage::PageInnerTypeEapTtls;
+    }
+    QCOMPARE( verifyCurrentPageWithInfo(pageId, eapTypeToString(outerType)), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
+}
+
+void TestWlanWizardEap::verify_username_password_click_next(
+    int type, 
+    const QString &username, 
+    const QString &password)
+{
+    verify_username_password(type);
+    
+    QCOMPARE( mouseClickObject("lineEditUsername"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditUsername", username), true );
+    QTest::qWait(WaitTimeForUi);
+
+    QCOMPARE( mouseClickObject("lineEditPassword"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditPassword", password), true );
+    QTest::qWait(WaitTimeForUi);
+    
+    QCOMPARE( mouseClickObject("setlabel_56"), true );
+    QCOMPARE( mouseClickNext(), true );
+}
+
+void TestWlanWizardEap::verify_username_password(int type)
+{
+    QCOMPARE( verifyCurrentPageWithInfo(EapWizardPage::PageUsernamePassword, eapTypeToString(type)), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+}
+
+void TestWlanWizardEap::verify_ca_cert_page_select_and_click_next(bool automatic)
+{
+    verify_ca_cert_page();
+    
+    int index = 0;
+    if (automatic == false) {
+        index = 1;
+    }
+    QCOMPARE( selectRadioButton( "list", index ), true );
+    QTest::qWait(WaitTimeForUi);
+    
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QCOMPARE( mouseClickNext(), true );
+}
+
+
+void TestWlanWizardEap::verify_ca_cert_page()
+{
+    QCOMPARE( verifyCurrentPage(EapWizardPage::PageCertificateCa), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+ 
+    QCOMPARE( verifyRadioButtonState(
+        "list", 
+        0, 
+        hbTrId("txt_occ_setlabel_val_select_automatically")), true);
+}
+
+void TestWlanWizardEap::verify_ca_cert_page(const QString &text, int index)
+{
+    QCOMPARE( verifyCurrentPage(EapWizardPage::PageCertificateCa), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    
+    QCOMPARE( verifyRadioButtonState("list", index, text), true);
+}
+
+void TestWlanWizardEap::verify_user_cert_page_select_and_click_next(
+    ButtonStatus nextButtonStatus,
+    int index)
+{
+    verify_user_cert_page(nextButtonStatus);
+
+    if (index != -1){
+        QCOMPARE( selectRadioButton( "list", index ), true );
+        QTest::qWait(WaitTimeForUi);
+    
+        QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+        QCOMPARE( mouseClickNext(), true );
+    } else {
+        QCOMPARE( 
+            verifyDialogText(
+                "errorLabel",
+                hbTrId("txt_occ_dialog_no_certificates_installed_wizard_c")), true);
+        QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    }
+}
+
+void TestWlanWizardEap::verify_user_cert_page(ButtonStatus nextButtonStatus)
+{
+    QCOMPARE( verifyCurrentPage(EapWizardPage::PageCertificateUser), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
+}
+
+
+void TestWlanWizardEap::verify_user_cert_page(
+    ButtonStatus nextButtonStatus,
+    const QString &text,
+    int index)
+{
+    QCOMPARE( verifyCurrentPage(EapWizardPage::PageCertificateUser), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
+    
+    QCOMPARE( verifyRadioButtonState("list", index, text), true);
+}
+
+void TestWlanWizardEap::verify_identity_modify_and_click_next(
+    const QString &outerType,
+    bool usernameAutomatic,
+    const QString &username,
+    bool realmAutomatic,
+    const QString &realm)
+{
+    QCOMPARE( verifyCurrentPageWithInfo(EapWizardPage::PageIdentity, outerType), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QTest::qWait(WaitTimeForUi);
+    
+    QCOMPARE(verifyCheckBoxState("setlabel_53_val", true), true);
+    QCOMPARE(verifyCheckBoxState("setlabel_54_val", true), true);
+    
+    QCOMPARE(selectCheckBoxState("setlabel_53_val", usernameAutomatic), true);
+    QCOMPARE(selectCheckBoxState("setlabel_54_val", realmAutomatic), true);
+        
+    QTest::qWait(WaitTimeForUi);
+    
+    QCOMPARE(verifyCheckBoxState("setlabel_53_val", usernameAutomatic), true);
+    QCOMPARE(verifyCheckBoxState("setlabel_54_val", realmAutomatic), true);
+    
+    QCOMPARE( mouseClickObject("lineEditUsername"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditUsername", username), true );
+    QTest::qWait(WaitTimeForUi);
+
+    QCOMPARE( mouseClickObject("lineEditRealm"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditRealm", realm), true );
+    QTest::qWait(WaitTimeForUi);
+    
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QTest::qWait(WaitTimeForUi);
+    
+    QCOMPARE( mouseClickObject("setlabel_53"), true );
+    QCOMPARE( mouseClickNext(), true );
+}
+
+void TestWlanWizardEap::verify_identity_and_click_next(const QString &outerType)
+{
+    verify_identity_page(outerType);
+    
+    QCOMPARE(verifyCheckBoxState("setlabel_53_val", true), true);
+    QCOMPARE(verifyCheckBoxState("setlabel_54_val", true), true);
+    
+    QCOMPARE( mouseClickObject("setlabel_53"), true );
+    QCOMPARE( mouseClickNext(), true );
+}
+
+void TestWlanWizardEap::verify_identity_page(const QString &outerType)
+{
+    QCOMPARE( verifyCurrentPageWithInfo(EapWizardPage::PageIdentity, outerType), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+}
+
+
+void TestWlanWizardEap::verify_new_pac_store_password_page(
+    ButtonStatus nextButtonStatus )
+{
+    QCOMPARE( verifyCurrentPage(EapWizardPage::PageNewPacStorePassword), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
+}
+
+
+void TestWlanWizardEap::verify_confirm_pac_store_password_page(
+    ButtonStatus nextButtonStatus)
+{
+    QCOMPARE( verifyCurrentPage(EapWizardPage::PagePromptPacStorePassword), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
+}
+
+// ---------------------------------------------------------
+// SUBTEST CASES
+// ---------------------------------------------------------
+
+
+void TestWlanWizardEap::tc_eap_aka_sim(int type)
+{
+    // TODO: verify IAP settings
+    // TODO: verify call stack
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+    mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+    
+    mEapQtUtilsContext->setConfigurationReference(3, true);
+    mEapQtUtilsContext->createEapAkaSim(type);
+    
+    const QString ssid("tc_eap_aka_sim");
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecMode802_1x, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+    
+    QCOMPARE( verifySummaryPage(
+        ssid,
+        CMManagerShim::Infra,
+        false, 
+        CMManagerShim::WlanSecMode802_1x, 
+        true,
+        hbTrId("txt_occ_dblist_destination_val_internet"),
+        type),true);
+}
+
+void TestWlanWizardEap::tc_eap_peap_ttls(
+    int outerType, 
+    int innerType,
+    int errorCode,
+    const QString &errorString,
+    bool saveInnerConfReturn )
+{
+    // TODO: verify IAP settings
+    // TODO: verify call stack
+    const QString ssid("tc_eap_peap_ttls");
+    const QString username("u");
+    const QString password("p");
+
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    
+    if (errorCode == KErrNone) {
+        mWlanQtUtilsContext->setConnectionSuccessed(true);
+        mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+        mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+    } else {
+        mWlanQtUtilsContext->setConnectionSuccessed(false);
+        mWlanQtUtilsContext->setSignalWlanNetworkClosed(3, errorCode);
+    }
+    mEapQtUtilsContext->setConfigurationReference(3, true);
+    mEapQtUtilsContext->createEapTtlsPeap(
+        (EapQtPluginHandle::Plugin)outerType,
+        true,
+        true,
+        QString(), //usernameIdentity,
+        true,
+        QString(), //realm,
+        (EapQtPluginHandle::Plugin)innerType );
+
+    mEapQtUtilsContext->createInner(
+        (EapQtPluginHandle::Plugin)outerType,
+        (EapQtPluginHandle::Plugin)innerType,
+        username,
+        password);
+    
+    mEapQtUtilsContext->setInnerConfigReturn(saveInnerConfReturn);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    verify_ca_cert_page_select_and_click_next(true);
+    verify_identity_and_click_next(eapTypeToString((EapQtPluginHandle::Plugin)outerType));
+    verify_innertype_select_first(
+        (EapQtPluginHandle::Plugin)outerType,
+        ButtonDisabled);
+    
+    verify_username_password_click_next(innerType, username, password);
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+
+    if (errorCode == KErrNone){
+        QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+        
+        QCOMPARE( verifySummaryPage(
+            ssid,
+            CMManagerShim::Infra,
+            false, 
+            CMManagerShim::WlanSecModeWpa, 
+            false,
+            hbTrId("txt_occ_dblist_destination_val_internet"),
+            (EapQtPluginHandle::Plugin)outerType,
+            (EapQtPluginHandle::Plugin)innerType),true);
+        
+    } else {
+        QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, errorString), true );
+        QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    }
+}
+
+void TestWlanWizardEap::tc_eap_aka_connect_error(
+    int errorCode, 
+    const QString &errorString)
+{
+    // TODO: verify IAP settings
+    // TODO: verify call stack
+    
+    const QString ssid(errorString);
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(false);
+    mWlanQtUtilsContext->setSignalWlanNetworkClosed(3, errorCode);
+    
+    mEapQtUtilsContext->setConfigurationReference(3, true);
+    mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa2, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, errorString), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+}
+
+
+void TestWlanWizardEap::tc_eap_fast(
+    int pacStoreState, 
+    bool savePacStoreReturn,
+    bool readPacStoreReturn)
+{
+    // TODO: verify IAP settings
+    // TODO: verify call stack
+    
+    const QString ssid("tc_eap_fast");
+    const QString username("u");
+    const QString password("p");
+
+    mWlanQtUtilsContext->setCreateWlanIapResult(4);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(4);
+    mWlanQtUtilsContext->setSignalIctResult(4, WlanQtUtils::IctPassed);
+
+    mEapQtUtilsContext->setConfigurationReference(4, true);
+    mEapQtUtilsContext->createEapFast(pacStoreState);
+    mEapQtUtilsContext->setPacStoreConfigSaveReturn(savePacStoreReturn);
+    mEapQtUtilsContext->setPacStoreConfigReadReturn(readPacStoreReturn);
+    
+    if (!readPacStoreReturn) {
+        EapQtPacStoreConfig pacStoreConfig;
+        pacStoreConfig.setValue(
+            EapQtPacStoreConfig::PacStoreReset, 
+            true);
+        
+        mEapQtUtilsContext->setPacStoreConfigSave(pacStoreConfig, true);
+    }
+    
+    mEapQtUtilsContext->createInner(
+        EapQtPluginHandle::PluginEapFast,
+        EapQtPluginHandle::PluginEapMschapv2,
+        username,
+        password);
+    
+    mView->mWizard->setParameters(
+        ssid, 
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeWpa, 
+        false, false, false);
+
+    mView->showWizard();
+    
+    verify_outertype_select_first(ButtonDisabled);
+    
+    if (!readPacStoreReturn) {
+        EapQtPacStoreConfig pacStoreConfig;
+        
+        pacStoreConfig.setValue(
+            EapQtPacStoreConfig::PacStorePassword, 
+            "");
+        
+        pacStoreConfig.setValue(
+            EapQtPacStoreConfig::PacStoreSavePassword, 
+            true);
+
+        
+        mEapQtUtilsContext->setPacStoreConfigSave(pacStoreConfig, true);
+    }
+    
+    switch (pacStoreState){
+    case EapQtPacStoreConfig::PacStoreStateStoreNotExists:
+        verify_new_pac_store_password_page(ButtonEnabled);
+        QCOMPARE( mouseClickNext(), true );
+        break;
+        
+    case EapQtPacStoreConfig::PacStoreStatePasswordRequired:
+        verify_confirm_pac_store_password_page(ButtonEnabled);
+        QCOMPARE( mouseClickNext(), true );
+        break;
+    }
+
+    verify_username_password_click_next(EapQtPluginHandle::PluginEapMschapv2,username,password);
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+
+    if (savePacStoreReturn) {
+        
+        QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+        
+        QCOMPARE( verifySummaryPage(
+            ssid,
+            CMManagerShim::Infra,
+            false, 
+            CMManagerShim::WlanSecModeWpa, 
+            false,
+            hbTrId("txt_occ_dblist_destination_val_internet"),
+            EapQtPluginHandle::PluginEapFast,
+            EapQtPluginHandle::PluginEapMschapv2,
+            true) ,true);
+    } else {
+        QCOMPARE( 
+            verifyCurrentPageWithInfo(
+                WlanWizardPageInternal::PageGenericError, 
+                hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret")), true );
+        QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );        
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardeap.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,157 @@
+/*
+ * 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:
+ */
+
+#ifndef TESTWLANWIZARDRNDEAP_H
+#define TESTWLANWIZARDRNDEAP_H
+
+#include "testwlanwizardcontext.h"
+
+class TestWlanWizardEap : public TestWlanWizardContext
+{
+Q_OBJECT
+
+private slots:
+    void tc_eap_outer_page_orientation_change();
+    void tc_eap_aka();
+    void tc_eap_sim();
+    void tc_eap_leap();
+    void tc_eap_peap_gtc();
+    void tc_eap_peap_mschapv2();
+    void tc_eap_ttls_mschapv2();
+    void tc_eap_ttls_pap();
+    void tc_eap_ttls_gtc();
+    void tc_eap_aka_connect_KErrWlanUserRejected();
+    void tc_eap_aka_connect_KErrWlanUserCertificateExpired();
+    void tc_eap_aka_connect_KErrWlanServerCertificateExpired();
+    void tc_eap_aka_connect_KErrWlanCerficateVerifyFailed();
+    void tc_eap_aka_connect_KErrWlanNoCipherSuite();
+    void tc_eap_aka_connect_KErrWlanSimNotInstalled();
+    void tc_eap_aka_connect_KErrWlanEapFastPacStoreCorrupted();
+    void tc_eap_aka_connect_KErrWlanEapSimFailed();
+    void tc_eap_aka_connect_KErrWlanNotSubscribed();
+    void tc_eap_aka_connect_KErrCancel();
+    void tc_eap_aka_connect_KErrWlanEapTlsFailed();
+    void tc_eap_aka_connect_KErrWlanEapPeapFailed();
+    void tc_eap_aka_connect_KErrWlanEapAkaFailed();
+    void tc_eap_aka_connect_KErrWlanEapTtlsFailed();
+    void tc_eap_aka_connect_KErrWlanLeapFailed();
+    void tc_eap_aka_connect_KErrWlanNoUserCertificate();
+    void tc_eap_aka_connect_KErrWlanEapFastTunnelCompromiseError();
+    void tc_eap_aka_connect_KErrWlanEapFastUnexpextedTlvExhanged();
+    void tc_eap_aka_connect_KErrWlanEapFastNoPacNorCertsToAuthenticateWithProvDisabled();
+    void tc_eap_aka_connect_KErrWlanEapFastNoMatchingPacForAid();
+    void tc_eap_aka_connect_KErrWlanEapFastAuthFailed();
+    void tc_eap_aka_connect_KErrWlanAccessBarred();
+    void tc_eap_aka_connect_KErrWlanPasswordExpired();
+    void tc_eap_aka_connect_KErrWlanNoDialinPermissions();
+    void tc_eap_aka_connect_KErrWlanAccountDisabled();
+    void tc_eap_aka_connect_KErrWlanRestrictedLogonHours();
+    void tc_eap_ttls_mschapv2_connect_KErrWlanEapGtcFailed();
+    void tc_eap_ttls_mschapv2_connect_KErrWlanEapMsChapv2();
+    void tc_eap_ttls_mschapv2_connect_KErrWlanNotSubscribed();
+    void tc_eap_ttls_gtc_back_and_forward();
+    void tc_eap_aka_set_outer_type_fails();
+    void tc_eap_aka_save_outer_configuration_fails();
+    void tc_eap_aka_set_configuration_reference_fails();
+    void tc_eap_peap_gtc_save_inner_configuration_fails();
+    void tc_eap_peap_identity_validators();
+    void tc_eap_leap_user_password_validators();
+    void tc_eap_tls_no_user_certificate();
+    void tc_eap_tls_one_user_certificate_with_ca_selection();
+    void tc_eap_tls_two_user_certificates();
+    void tc_eap_tls_back_and_forward_certs_with_cert_update();
+    void tc_eap_sim_finish();
+    void tc_eap_sim_cancel();
+    void tc_eap_fast_confirmed();
+    void tc_eap_fast_new_store();
+    void tc_eap_fast_new_store_save_fails();
+    void tc_eap_fast_new_store_and_validators();
+    void tc_eap_fast_new_store_back_and_forwards();
+    void tc_eap_fast_new_store_read_config_fail();
+    void tc_eap_fast_confirm_store();
+    void tc_eap_fast_confirm_store_and_validators();
+    void tc_eap_fast_confirm_store_back_and_forwards();
+         
+private: // Helpper methods
+    void verify_outertype_select_first(
+        TestWlanWizardContext::ButtonStatus nextButtonStatus);
+    void verify_outertype(
+        TestWlanWizardContext::ButtonStatus nextButtonStatus);
+    
+    void verify_innertype_select_first(
+        int outerType,
+        TestWlanWizardContext::ButtonStatus nextButtonStatus);
+    
+    void verify_innertype(
+        int outerType,
+        TestWlanWizardContext::ButtonStatus nextButtonStatus);
+    
+    void verify_username_password_click_next(
+        int type, 
+        const QString &username, 
+        const QString &password);
+    
+    void verify_username_password(int type);
+    
+    void verify_ca_cert_page_select_and_click_next(bool automatic);
+    void verify_ca_cert_page();
+    void verify_ca_cert_page( const QString &text, int index);
+    
+    void verify_user_cert_page_select_and_click_next(
+        ButtonStatus nextButtonStatus,
+        int index);
+    
+    void verify_user_cert_page(ButtonStatus nextButtonStatus);
+    void verify_user_cert_page(
+        ButtonStatus nextButtonStatus, 
+        const QString &text,
+        int index);
+    
+    void verify_identity_modify_and_click_next(
+        const QString &outerType,        
+        bool usernameAutomatic,
+        const QString &username,
+        bool realmAutomatic,
+        const QString &realm);
+    void verify_identity_and_click_next(const QString &outerType);
+    void verify_identity_page(const QString &outerType);
+    
+    void verify_new_pac_store_password_page(ButtonStatus nextButtonStatus);
+    void verify_confirm_pac_store_password_page(ButtonStatus nextButtonStatus);
+    
+private: // Helpper test cases
+    void tc_eap_aka_sim(int type);
+    
+    void tc_eap_peap_ttls(
+        int outerType, 
+        int innerType,
+        int errorCode = 0,
+        const QString &errorString = QString(),
+        bool saveInnerConfReturn = true);
+    
+    void tc_eap_aka_connect_error(
+        int errorCode, 
+        const QString &errorString);
+
+    void tc_eap_fast(
+        int pacStoreState, 
+        bool savePacStoreReturn,
+        bool readPacStoreReturn = true);
+    
+    
+};
+
+#endif /* TESTWLANWIZARDRNDEAP_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardeap_conf.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,85 @@
+/*
+ * 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:
+ */
+
+// System includes
+
+// User includes
+
+// External function prototypes
+
+// Local constants
+
+#define tc_eap_outer_page_orientation_change_enabled
+#define tc_eap_aka_enabled
+#define tc_eap_sim_enabled
+#define tc_eap_leap_enabled
+#define tc_eap_peap_gtc_enabled
+#define tc_eap_peap_mschapv2_enabled
+#define tc_eap_ttls_mschapv2_enabled
+#define tc_eap_ttls_pap_enabled
+#define tc_eap_ttls_gtc_enabled
+#define tc_eap_aka_connect_KErrWlanUserRejected_enabled
+#define tc_eap_aka_connect_KErrWlanUserCertificateExpired_enabled
+#define tc_eap_aka_connect_KErrWlanServerCertificateExpired_enabled
+#define tc_eap_aka_connect_KErrWlanCerficateVerifyFailed_enabled
+#define tc_eap_aka_connect_KErrWlanNoCipherSuite_enabled
+#define tc_eap_aka_connect_KErrWlanSimNotInstalled_enabled
+#define tc_eap_aka_connect_KErrWlanEapFastPacStoreCorrupted_enabled
+#define tc_eap_aka_connect_KErrWlanEapSimFailed_enabled
+#define tc_eap_aka_connect_KErrWlanNotSubscribed_enabled
+#define tc_eap_aka_connect_KErrCancel_enabled
+#define tc_eap_aka_connect_KErrWlanEapTlsFailed_enabled
+#define tc_eap_aka_connect_KErrWlanEapPeapFailed_enabled 
+#define tc_eap_aka_connect_KErrWlanEapAkaFailed_enabled
+#define tc_eap_aka_connect_KErrWlanEapTtlsFailed_enabled
+#define tc_eap_aka_connect_KErrWlanLeapFailed_enabled 
+#define tc_eap_aka_connect_KErrWlanNoUserCertificate_enabled
+#define tc_eap_aka_connect_KErrWlanEapFastTunnelCompromiseError_enabled
+#define tc_eap_aka_connect_KErrWlanEapFastUnexpextedTlvExhanged_enabled
+#define tc_eap_aka_connect_KErrWlanEapFastNoPacNorCertsToAuthenticateWithProvDisabled_enabled
+#define tc_eap_aka_connect_KErrWlanEapFastNoMatchingPacForAid_enabled
+#define tc_eap_aka_connect_KErrWlanEapFastAuthFailed_enabled
+#define tc_eap_aka_connect_KErrWlanAccessBarred_enabled
+#define tc_eap_aka_connect_KErrWlanPasswordExpired_enabled
+#define tc_eap_aka_connect_KErrWlanNoDialinPermissions_enabled
+#define tc_eap_aka_connect_KErrWlanAccountDisabled_enabled
+#define tc_eap_aka_connect_KErrWlanRestrictedLogonHours_enabled
+#define tc_eap_ttls_mschapv2_connect_KErrWlanEapGtcFailed_enabled
+#define tc_eap_ttls_mschapv2_connect_KErrWlanEapMsChapv2_enabled
+#define tc_eap_ttls_mschapv2_connect_KErrWlanNotSubscribed_enabled
+#define tc_eap_ttls_gtc_back_and_forward_enabled
+#define tc_eap_aka_set_outer_type_fails_enabled
+#define tc_eap_aka_save_outer_configuration_fails_enabled
+#define tc_eap_aka_set_configuration_reference_fails_enabled
+#define tc_eap_peap_gtc_save_inner_configuration_fails_enabled
+#define tc_eap_peap_identity_validators_enabled
+#define tc_eap_leap_user_password_validators_enabled
+#define tc_eap_tls_no_user_certificate_enabled
+#define tc_eap_tls_one_user_certificate_with_ca_selection_enabled
+#define tc_eap_tls_two_user_certificates_enabled
+#define tc_eap_tls_back_and_forward_certs_with_cert_update_enabled
+#define tc_eap_sim_finish_enabled
+#define tc_eap_sim_cancel_enabled
+#define tc_eap_fast_confirmed_enabled
+#define tc_eap_fast_new_store_enabled
+#define tc_eap_fast_new_store_save_fails_enabled
+#define tc_eap_fast_new_store_and_validators_enabled
+#define tc_eap_fast_new_store_back_and_forwards_enabled
+#define tc_eap_fast_new_store_read_config_fail_enabled
+#define tc_eap_fast_confirm_store_enabled
+#define tc_eap_fast_confirm_store_and_validators_enabled
+#define tc_eap_fast_confirm_store_back_and_forwards_enabled
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardmanual.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,1170 @@
+/*
+ * 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:
+ */
+
+// System includes
+#include <HbApplication>
+#include <HbDocumentLoader>
+#include <HbStackedWidget>
+#include <HbRadioButtonList>
+#include <HbAction>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <QGraphicsWidget>
+#include <QObjectList>
+#include <QtCore>
+#include <QTest>
+#include <QDebug>
+#include <QList>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+#include "testwlanwizardmanual.h"
+#include "testwlanwizardmanual_conf.h"
+#include "hbautotest.h"
+#include "wlanwizard.h"
+#include "wlanwizard_p.h"
+#include "wlanwizardpagessid.h"
+#include "wlanqtutils_context.h"
+#include "wlanqtutils.h"
+#include "wlanqtutilsap.h"
+
+// External function prototypes
+
+// Local constants
+
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+// ---------------------------------------------------------
+// TEST CASES
+// ---------------------------------------------------------
+
+
+void TestWlanWizardManual::tcStartWizard()
+{
+    qDebug("Start TestWlanWizardManual");
+}
+
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_open_scan_results_received_at_scan_page()
+{
+#ifdef tc_open_scan_results_received_at_scan_page_enabled
+    
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    
+    mWlanQtUtilsContext->setImmediateApScanResult(false);
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    mWlanQtUtilsContext->emitScanApReady();
+    mWlanQtUtilsContext->setImmediateApScanResult(true);
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    
+#endif
+}
+
+/*!
+ * 
+ */ 
+void TestWlanWizardManual::tc_attempt_to_input_too_long_ssid()
+{
+#ifdef tc_attempt_to_input_too_long_ssid_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
+
+    mWlanQtUtilsContext->setScanWlanDirectResult("12345678901234567890123456789012", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "1234567890123456789012345678901234567890"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "12345678901234567890123456789012"), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );  
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+#endif
+}
+
+/*!
+ *  
+ */
+void TestWlanWizardManual::tc_scan_succesful_press_cancel_at_summary()
+{
+#ifdef tc_scan_succesful_press_cancel_at_summary_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );  
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    // Currently against the spec in http://wikis.in.nokia.com/pub/UXD/101ConnectionManager/occ_logical_flows_and_wireframes.pdf
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+
+    QCOMPARE( mouseClickCancel(), true );
+
+    QTest::qWait(WaitTimeForUi);
+
+#endif
+}
+
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_press_previous_at_scanning_page()
+{
+#ifdef tc_press_previous_at_scanning_page_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );  
+
+    // Click previous button and next again
+    QCOMPARE( mouseClickPrevious(), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    // Currently against the spec in http://wikis.in.nokia.com/pub/UXD/101ConnectionManager/occ_logical_flows_and_wireframes.pdf
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+
+#endif
+}
+
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_scan_succesful_go_to_summary_and_finish()
+{
+#ifdef tc_scan_succesful_go_to_summary_and_finish_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
+
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true ); 
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    // Currently against the spec in http://wikis.in.nokia.com/pub/UXD/101ConnectionManager/occ_logical_flows_and_wireframes.pdf
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+    QCOMPARE( mouseClickFinish(), true );
+#endif
+}
+
+/*!
+ * Stop verifying buttons for views that have been already verified.
+ */
+void TestWlanWizardManual::tc_wep_pwd_too_short_error_label()
+{
+#ifdef tc_wep_pwd_too_short_error_label_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    
+    // Key query short pwd
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "password"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyDialogText("labelErrorNote", hbTrId("txt_occ_dialog_key_is_of_incorrect_length_please")), true );
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+
+    // Key query success
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyDialogText("labelErrorNote", ""), true );
+    QCOMPARE( insertTextToObject("lineEditKey", "12345"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+#endif
+}
+
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_press_previous_at_key_query()
+{
+#ifdef tc_press_previous_at_key_query_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
+    QCOMPARE( mouseClickPrevious(), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
+#endif
+}
+
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_manual_selection_with_press_previous()
+{
+#ifdef tc_manual_selection_with_press_previous_enabled
+
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true ); 
+    QCOMPARE( mouseClickPrevious(), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkMode, "huuhaa3421"), true );
+    QCOMPARE( selectRadioButton( "list", 0 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkSecurity, "huuhaa3421"), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true ); 
+    QCOMPARE( mouseClickPrevious(), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkMode, "huuhaa3421"), true );
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkSecurity, "huuhaa3421"), true );
+    QCOMPARE( selectRadioButton( "list", 0 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
+#endif    
+}
+
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_illegal_characters_in_wep_key()
+{
+#ifdef tc_illegal_characters_in_wep_key_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
+    
+    QCOMPARE( insertTextToObject("lineEditKey", "passworddd"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyDialogText("labelErrorNote", hbTrId("txt_occ_dialog_illegal_characters_in_key_please_c")), true );
+    QTest::qWait(WaitTimeForUi);
+
+#endif
+}
+
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_too_short_wpa_key()
+{
+#ifdef tc_too_short_wpa_key_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QTest::qWait(2000);
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
+    
+    QCOMPARE( insertTextToObject("lineEditKey", "1234"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyDialogText("labelErrorNote", hbTrId("txt_occ_dialog_preshared_key_too_short_at_least")), true );
+    QTest::qWait(WaitTimeForUi);
+#endif
+}
+
+/*!
+ * wpa psk
+ */
+void TestWlanWizardManual::tc_wpa_psk_success()
+{
+#ifdef tc_wpa_psk_success_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QTest::qWait(2000);
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
+
+    QCOMPARE( insertTextToObject("lineEditKey", "1234567890"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+#endif
+}
+
+/*!
+ * no wpa psk
+ */
+void TestWlanWizardManual::tc_wpa_no_psk_go_to_eap_start()
+{
+#ifdef tc_wpa_no_psk_go_to_eap_start_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageEapStart), true );
+    QCOMPARE( mouseClickPrevious(), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageEapStart), true );    
+#endif
+}
+
+/*!
+ * wpa2 psk
+ */
+void TestWlanWizardManual::tc_wpa2_psk_success()
+{
+#ifdef tc_wpa2_psk_success_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, true, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QTest::qWait(2000);
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
+
+    QCOMPARE( insertTextToObject("lineEditKey", "1234567890"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+#endif
+}
+
+/*!
+ * wpa2 no psk
+ */
+void TestWlanWizardManual::tc_wpa2_no_psk_go_to_eap_start()
+{
+#ifdef tc_wpa2_no_psk_go_to_eap_start_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageEapStart), true );
+#endif
+}
+
+/*!
+ * Wlan network closed -> generic error
+ */
+void TestWlanWizardManual::tc_network_closed_generic_error()
+{
+#ifdef tc_network_closed_generic_error_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkClosed(100, 1);
+    mWlanQtUtilsContext->setConnectionSuccessed(false);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, hbTrId("txt_occ_dialog_connection_failed")), true );
+    
+#endif
+}
+
+/*!
+ * adhoc no psk
+ */
+void TestWlanWizardManual::tc_adhoc_network_no_psk()
+{
+#ifdef tc_adhoc_network_no_psk_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Adhoc, CMManagerShim::WlanSecModeOpen, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    
+#endif
+}
+
+/*!
+ * 802_1x
+ */
+void TestWlanWizardManual::tc_secmode_802_1x_go_to_eap_start()
+{
+#ifdef tc_secmode_802_1x_go_to_eap_start_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageEapStart), true );
+#endif
+}
+
+/*!
+ * Wapi
+ */
+void TestWlanWizardManual::tc_sec_mode_wapi()
+{
+#ifdef tc_sec_mode_wapi_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWapi, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+#endif
+}
+
+/*!
+ * Multiple AP scan match results
+ */
+void TestWlanWizardManual::tc_multiple_open_scan_results_single_match()
+{
+#ifdef tc_multiple_open_scan_results_single_match_enabled
+    mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+    mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 400);
+    mApOpenList->Add("foobar", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 300);
+    mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 200);
+
+    mApList->Add("foobar", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 300);
+    
+    mWlanQtUtilsContext->setScanWlanApsResult(mApOpenList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("foobar", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "foobar"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "foobar"), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "foobar"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+#endif
+}
+
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_iap_creation_fail()
+{
+#ifdef tc_iap_creation_fail_enabled
+    
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(-1);
+    
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
+    
+    QStringList buttons;
+    buttons << hbTrId("txt_occ_dblist_val_infrastructure_public") 
+            << hbTrId("txt_occ_list_infrastructure_hidden") 
+            << hbTrId("txt_occ_list_adhoc_1");
+    QCOMPARE( verifyRadioButtons("list"), buttons );
+
+    QCOMPARE( selectRadioButton( "list", 2 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickPrevious(), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
+    QCOMPARE( verifySelectedRadioButton("list"), ListNoneSelected );
+    QCOMPARE( selectRadioButton( "list", 2 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkSecurity, "huuhaa3421"), true );
+    
+    buttons.clear();
+    buttons << hbTrId("txt_occ_list_open") 
+            << hbTrId("txt_occ_list_wep_1");
+    QCOMPARE( verifyRadioButtons("list"), buttons );
+    
+    QCOMPARE( selectRadioButton( "list", 0 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret")), true );
+#endif
+}
+
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_scan_ap_status_not_ok()
+{
+#ifdef tc_scan_ap_status_not_ok_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mWlanQtUtilsContext->setScanApStatus(WlanQtUtils::ScanStatusError);
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
+#endif
+}
+    
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_scan_direct_status_not_ok()
+{
+#ifdef tc_scan_direct_status_not_ok_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    //mWlanQtUtilsContext->setImmediateApScanResult(false);
+    mWlanQtUtilsContext->setScanDirectStatus(WlanQtUtils::ScanStatusError);
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
+#endif
+}
+
+/*!
+ * Ict Result enumerator used. Hotspot.
+ */
+void TestWlanWizardManual::tc_ictresult_enumerated_hotspot()
+{
+#ifdef tc_ictresult_enumerated_hotspot_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 400);
+    
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctHotspotPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(1000);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(1000);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(1000);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    QTest::qWait(5000);
+#endif
+}
+
+/*!
+ * Ict Result enumerator used. Ict canceled.
+ */
+void TestWlanWizardManual::tc_ictresult_enumerated_cancel()
+{
+#ifdef tc_ictresult_enumerated_cancel_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 400);
+    
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctCancelled);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(1000);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(1000);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(1000);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+#endif
+}
+
+/*!
+ * Ict fails in this case
+ */
+void TestWlanWizardManual::tc_multiple_ssids_with_same_name_2_netmode_options()
+{
+#ifdef tc_multiple_ssids_with_same_name_2_netmode_options_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+    // Add duplicates
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+    
+    // Add all five kinds of security modes.
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false, 500);
+    mApList->Add("huuhaa3421", CMManagerShim::Adhoc, CMManagerShim::WlanSecModeOpen, false, false, 400);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false, 300);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false, 200);
+    
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctFailed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    
+    mView->showWizard();
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( selectRadioButton( "list", 1 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+#endif
+}
+
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_multiple_ssids_with_same_name_press_previous()
+{
+#ifdef tc_multiple_ssids_with_same_name_press_previous_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+    // Add duplicates
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+
+    // Add all five kinds of security modes.
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false, 500);
+    mApList->Add("huuhaa3421", CMManagerShim::Adhoc, CMManagerShim::WlanSecModeOpen, false, false, 400);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, true, false, 300);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false, 200);
+
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( selectRadioButton( "list", 0 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
+    QCOMPARE( mouseClickPrevious(), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
+    QCOMPARE( selectRadioButton( "list", 1 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
+#endif
+}
+
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_multiple_ssids_with_same_name_all_sec_modes()
+{
+#ifdef tc_multiple_ssids_with_same_name_all_sec_modes_enabled
+    mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+    // Add duplicates
+    mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+
+    // Add all five kinds of security modes.
+    mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false, 500);
+    mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, true, false, 500);
+    mApOpenList->Add("huuhaa3421", CMManagerShim::Adhoc, CMManagerShim::WlanSecModeOpen, false, false, 400);
+    mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false, 200);
+    mApOpenList->Add("dippadappa", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 200);
+    
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+    // Add duplicates
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+
+    // Add all five kinds of security modes.
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false, 500);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, true, false, 500);
+    mApList->Add("huuhaa3421", CMManagerShim::Adhoc, CMManagerShim::WlanSecModeOpen, false, false, 400);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, true, false, 300);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false, 200);
+
+    mWlanQtUtilsContext->setScanWlanApsResult(mApOpenList->List());
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( selectRadioButton( "list", 0 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
+    QCOMPARE( mouseClickPrevious(), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
+    QCOMPARE( mouseClickNext(), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
+    QCOMPARE( selectRadioButton( "list", 0 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
+#endif
+}
+   
+/*!
+ * 
+ */
+void TestWlanWizardManual::tc_multiple_ssids_with_same_name_orientation_switch()
+{
+#ifdef tc_multiple_ssids_with_same_name_orientation_switch_enabled
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+    // Add duplicates
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
+
+    // Add all five kinds of security modes.
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false, 500);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, true, false, 300);
+    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false, 200);
+
+    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
+    mWlanQtUtilsContext->setCreateWlanIapResult(100);
+    mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+
+    mView->showWizard();
+
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
+    
+    mMainWindow->setOrientation(Qt::Horizontal, false);
+    QTest::qWait(WaitTimeForUi);
+    mMainWindow->setOrientation(Qt::Vertical, false);
+    QTest::qWait(WaitTimeForUi);
+
+    QCOMPARE( mouseClickObject("lineEditKey"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickObject("dialog"), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
+    QCOMPARE( selectRadioButton( "list", 0 ), true );
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( mouseClickNext(), true );
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
+#endif
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardmanual.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,60 @@
+/*
+ * 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:
+ */
+
+#ifndef TESTWLANWIZARDRNMANUAL_H_
+#define TESTWLANWIZARDRNMANUAL_H_
+
+#include "testwlanwizardcontext.h"
+
+class TestWlanWizardManual : public TestWlanWizardContext
+{
+Q_OBJECT
+
+private slots:
+    // Test cases
+    void tcStartWizard();
+    void tc_open_scan_results_received_at_scan_page();
+    void tc_attempt_to_input_too_long_ssid();
+    void tc_scan_succesful_press_cancel_at_summary();
+    void tc_press_previous_at_scanning_page();
+    void tc_scan_succesful_go_to_summary_and_finish();
+    void tc_wep_pwd_too_short_error_label();
+    void tc_press_previous_at_key_query();
+    void tc_manual_selection_with_press_previous();
+    void tc_illegal_characters_in_wep_key();
+    void tc_too_short_wpa_key();
+    void tc_wpa_psk_success();
+    void tc_wpa_no_psk_go_to_eap_start();
+    void tc_wpa2_psk_success();
+    void tc_wpa2_no_psk_go_to_eap_start();
+    void tc_network_closed_generic_error();
+    void tc_adhoc_network_no_psk();
+    void tc_secmode_802_1x_go_to_eap_start();
+    void tc_sec_mode_wapi();
+    void tc_multiple_open_scan_results_single_match();
+    void tc_iap_creation_fail();
+    void tc_scan_ap_status_not_ok();
+    void tc_scan_direct_status_not_ok();
+    void tc_ictresult_enumerated_hotspot();
+    void tc_ictresult_enumerated_cancel();
+    void tc_multiple_ssids_with_same_name_2_netmode_options();
+    void tc_multiple_ssids_with_same_name_press_previous();
+    void tc_multiple_ssids_with_same_name_all_sec_modes();
+    void tc_multiple_ssids_with_same_name_orientation_switch();
+    
+};
+
+#endif /* TESTWLANWIZARDRNMANUAL_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardmanual_conf.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,51 @@
+/*
+ * 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:
+ */
+
+// System includes
+
+// User includes
+
+// External function prototypes
+
+// Local constants
+#define tc_open_scan_results_received_at_scan_page_enabled
+#define tc_attempt_to_input_too_long_ssid_enabled
+#define tc_scan_succesful_press_cancel_at_summary_enabled
+#define tc_press_previous_at_scanning_page_enabled
+#define tc_scan_succesful_go_to_summary_and_finish_enabled
+#define tc_wep_pwd_too_short_error_label_enabled
+#define tc_press_previous_at_key_query_enabled
+#define tc_manual_selection_with_press_previous_enabled
+#define tc_illegal_characters_in_wep_key_enabled
+#define tc_too_short_wpa_key_enabled
+#define tc_wpa_psk_success_enabled
+#define tc_wpa_no_psk_go_to_eap_start_enabled
+#define tc_wpa2_psk_success_enabled
+#define tc_wpa2_no_psk_go_to_eap_start_enabled
+#define tc_network_closed_generic_error_enabled
+#define tc_adhoc_network_no_psk_enabled
+#define tc_secmode_802_1x_go_to_eap_start_enabled
+#define tc_sec_mode_wapi_enabled
+#define tc_multiple_open_scan_results_single_match_enabled
+#define tc_iap_creation_fail_enabled
+#define tc_scan_ap_status_not_ok_enabled
+#define tc_scan_direct_status_not_ok_enabled
+#define tc_ictresult_enumerated_hotspot_enabled
+#define tc_ictresult_enumerated_cancel_enabled
+#define tc_multiple_ssids_with_same_name_2_netmode_options_enabled
+#define tc_multiple_ssids_with_same_name_press_previous_enabled
+#define tc_multiple_ssids_with_same_name_all_sec_modes_enabled
+#define tc_multiple_ssids_with_same_name_orientation_switch_enabled
--- a/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardui.cpp	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1729 +0,0 @@
-/*
- * 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:
- */
-
-// System includes
-#include <HbApplication>
-#include <HbDocumentLoader>
-#include <HbStackedWidget>
-#include <HbRadioButtonList>
-#include <HbAction>
-#include <HbLineEdit>
-#include <HbLabel>
-#include <QGraphicsWidget>
-#include <QObjectList>
-#include <QtCore>
-#include <QTest>
-#include <QDebug>
-#include <QList>
-#include <cmmanagerdefines_shim.h>
-
-// User includes
-#include "testwlanwizardui.h"
-#include "testwlanwizardui_conf.h"
-#include "hbautotest.h"
-#include "wlanwizard.h"
-#include "wlanwizard_p.h"
-#include "wlanwizardpagessid.h"
-#include "context_wlanqtutils.h"
-#include "wlanqtutils.h"
-#include "wlanqtutilsap.h"
-
-// External function prototypes
-
-// Local constants
-
-class TestRadioButtonList: public HbRadioButtonList
-{
-public:
-    void emitActivated(const QModelIndex &modelIndex)
-    { HbRadioButtonList::emitActivated(modelIndex); }
-};
-
-// ======== LOCAL FUNCTIONS ========
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------
-// FRAMEWORK FUNCTIONS
-// ---------------------------------------------------------
-
-ContextWlanApList::ContextWlanApList()
-{
-
-}
-
-ContextWlanApList::~ContextWlanApList()
-{
-    clear();
-}
-
-void ContextWlanApList::Add(QString name, int netMode, int secMode, bool wpaPskInUse,
-    bool wpsSupported, int signalStrength)
-{
-    QSharedPointer<WlanQtUtilsAp> temp = QSharedPointer<WlanQtUtilsAp>(new WlanQtUtilsAp());
-    temp->setValue(WlanQtUtilsAp::ConfIdSsid, name);
-    temp->setValue(WlanQtUtilsAp::ConfIdConnectionMode, netMode);
-    temp->setValue(WlanQtUtilsAp::ConfIdSecurityMode, secMode);
-    temp->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, wpaPskInUse);
-    temp->setValue(WlanQtUtilsAp::ConfIdWpsSupported, wpsSupported);
-    temp->setValue(WlanQtUtilsAp::ConfIdSignalStrength, signalStrength);
-
-    mList.append(temp);
-}
-
-void ContextWlanApList::clear()
-{
-    mList.clear();
-}
-
-/**
- * This function will be called before the first test function is executed.
- */
-void TestWlanWizardUi::initTestCase()
-{
-    qDebug("TestWlanWizardUi::initTestCase");
-
-    mMainWindow = new HbAutoTestMainWindow;
-
-    mView = new TestView();
-
-    mMainWindow->addView(mView);
-    mMainWindow->setCurrentView(mView);
-    mMainWindow->installEventFilter(this);
-    mMainWindow->show();
-
-    QTest::qWait(1);
-    while (!mEvent) {
-        QTest::qWait(WaitTimeForUi);
-    }
-    mEvent = false;
-
-    mApList = new ContextWlanApList();
-
-}
-
-/**
- * This function will be called after the last test function was executed.
- */
-void TestWlanWizardUi::cleanupTestCase()
-{
-    qDebug("TestWlanWizardUi::cleanupTestCase");
-
-    qDebug("delete mApList");
-    delete mApList;
-    mApList = NULL;
-
-    qDebug("delete mMainWindow");
-    mMainWindow->deleteLater();
-
-    qDebug("TestWlanWizardUi::cleanupTestCase exit");
-}
-
-/**
- * This function will be called before each test function is executed.
- */
-void TestWlanWizardUi::init()
-{
-    qDebug("TestWlanWizardUi::init()");
-
-    mView->createWizard();
-    mWlanQtUtilsContext = new WlanQtUtilsContext(mView->mWizard->d_ptr->mWlanQtUtils.data());
-}
-
-/**
- * This function will be called after each test function is executed.
- */
-void TestWlanWizardUi::cleanup()
-{
-    qDebug("TestWlanWizardUi::cleanup()");
-
-    delete mWlanQtUtilsContext;
-    mView->deleteWizard();
-    mApList->clear();
-    QTest::qWait(1);
-}
-
-// ---------------------------------------------------------
-// TEST CASES
-// ---------------------------------------------------------
-
-
-void TestWlanWizardUi::tcStartWizard()
-{
-    qDebug("Start mView");
-}
-
-/*!
- * 
- */
-void TestWlanWizardUi::tc01()
-{
-#ifdef tc01_enabled
-    
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
-
-    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-    
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", ""), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), false );
-#endif
-}
-
-/*!
- * 
- */ 
-void TestWlanWizardUi::tc02()
-{
-#ifdef tc02_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
-
-    mWlanQtUtilsContext->setScanWlanDirectResult("12345678901234567890123456789012", mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "1234567890123456789012345678901234567890"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );  
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-#endif
-}
-
-/*!
- *  
- */
-void TestWlanWizardUi::tc03()
-{
-#ifdef tc03_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );  
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    // Currently against the spec in http://wikis.in.nokia.com/pub/UXD/101ConnectionManager/occ_logical_flows_and_wireframes.pdf
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
-
-    QCOMPARE( mouseClickCancel(), true );
-
-    QTest::qWait(WaitTimeForUi);
-
-#endif
-}
-
-/*!
- * 
- */
-void TestWlanWizardUi::tc04()
-{
-#ifdef tc04_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );  
-
-    // Click previous button and next again
-    QCOMPARE( mouseClickPrevious(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    // Currently against the spec in http://wikis.in.nokia.com/pub/UXD/101ConnectionManager/occ_logical_flows_and_wireframes.pdf
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
-    QCOMPARE( mouseClickFinish(), true );
-#endif
-}
-
-/*!
- * 
- */
-void TestWlanWizardUi::tc05()
-{
-#ifdef tc05_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
-
-    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true ); 
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    // Currently against the spec in http://wikis.in.nokia.com/pub/UXD/101ConnectionManager/occ_logical_flows_and_wireframes.pdf
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
-    QCOMPARE( mouseClickFinish(), true );
-#endif
-}
-
-/*!
- * 
- */
-void TestWlanWizardUi::tc06()
-{
-#ifdef tc06_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true ); 
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    // Currently against the spec in http://wikis.in.nokia.com/pub/UXD/101ConnectionManager/occ_logical_flows_and_wireframes.pdf
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
-    QCOMPARE( mouseClickFinish(), true );
-#endif
-}
-
-/*!
- * Stop verifying buttons for views that have been already verified.
- */
-void TestWlanWizardUi::tc07()
-{
-#ifdef tc07_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    
-    // Key query short pwd
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageKeyQuery), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "password"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( verifyDialogText("labelErrorNote", hbTrId("txt_occ_dialog_key_is_of_incorrect_length_please")), true );
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-
-    // Key query success
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( verifyDialogText("labelErrorNote", ""), true );
-    QCOMPARE( insertTextToObject("lineEditKey", "12345"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    QCOMPARE( mouseClickFinish(), true );
-    
-#endif
-}
-
-/*!
- * 
- */
-void TestWlanWizardUi::tc08()
-{
-#ifdef tc08_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageKeyQuery), true );
-    QCOMPARE( mouseClickPrevious(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageKeyQuery), true );
-
-#endif
-}
-
-/*!
- * 
- */
-void TestWlanWizardUi::tc09()
-{
-#ifdef tc09_enabled
-
-    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
-    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true ); 
-    QCOMPARE( mouseClickPrevious(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( mouseClickNext(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
-    QCOMPARE( selectRadioButton( "list", 0 ), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
-    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true ); 
-    QCOMPARE( mouseClickPrevious(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
-    QCOMPARE( mouseClickNext(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
-    QCOMPARE( selectRadioButton( "list", 0 ), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
-    QCOMPARE( mouseClickNext(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
-    QCOMPARE( mouseClickFinish(), true );
-#endif    
-}
-
-/*!
- * 
- */
-void TestWlanWizardUi::tc10()
-{
-#ifdef tc10_enabled
-    mMainWindow->setOrientation(Qt::Horizontal, false);
-    QTest::qWait(WaitTimeForUi);
-
-    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
-    QCOMPARE( mouseClickPrevious(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( mouseClickNext(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true ); 
-    QCOMPARE( selectRadioButton( "list", 0 ), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
-    QCOMPARE( mouseClickPrevious(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
-    QCOMPARE( mouseClickNext(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
-    QCOMPARE( selectRadioButton( "list", 0 ), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    QCOMPARE( mouseClickFinish(), true );
-#endif    
-}
-
-/*!
- * 
- */
-void TestWlanWizardUi::tc11()
-{
-#ifdef tc11_enabled
-    mMainWindow->setOrientation(Qt::Horizontal, false);
-    QTest::qWait(WaitTimeForUi);
-
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    
-    // Key query short pwd
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageKeyQuery), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "password"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( verifyDialogText("labelErrorNote", hbTrId("txt_occ_dialog_key_is_of_incorrect_length_please")), true );
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-
-    // Key query success
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "12345"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    QCOMPARE( mouseClickFinish(), true );
-#endif    
-}
-
-/*!
- * 
- */
-void TestWlanWizardUi::tc12()
-{
-#ifdef tc12_enabled
-
-    mView->mWizard->setParameters("huuhaa3421",
-        CMManagerShim::Infra,
-        CMManagerShim::WlanSecModeWep,
-        false, false, false);
-
-    mView->showWizard();
-
-    mMainWindow->setOrientation(Qt::Horizontal, false);
-    QTest::qWait(WaitTimeForUi);
-
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    QTest::qWait(4000);
-
-#endif    
-}
-
-/*
- * 
- */
-void TestWlanWizardUi::tc13()
-{
-#ifdef tc13_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageKeyQuery), true );
-    
-    QCOMPARE( insertTextToObject("lineEditKey", "passworddd"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( verifyDialogText("labelErrorNote", hbTrId("txt_occ_dialog_illegal_characters_in_key_please_c")), true );
-    QTest::qWait(WaitTimeForUi);
-
-#endif
-}
-
-void TestWlanWizardUi::tc14()
-{
-#ifdef tc14_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QTest::qWait(2000);
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageKeyQuery), true );
-    
-    QCOMPARE( insertTextToObject("lineEditKey", "1234"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( verifyDialogText("labelErrorNote", hbTrId("txt_occ_dialog_preshared_key_too_short_at_least")), true );
-    QTest::qWait(WaitTimeForUi);
-#endif
-}
-
-/*
- * wpa psk
- */
-void TestWlanWizardUi::tc15()
-{
-#ifdef tc15_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QTest::qWait(2000);
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageKeyQuery), true );
-
-    QCOMPARE( insertTextToObject("lineEditKey", "1234567890"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    QCOMPARE( mouseClickFinish(), true );
-#endif
-}
-
-/*
- * no wpa psk
- */
-void TestWlanWizardUi::tc16()
-{
-#ifdef tc16_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    QCOMPARE( mouseClickFinish(), true );
-#endif
-}
-
-/*
- * wpa2 psk
- */
-void TestWlanWizardUi::tc17()
-{
-#ifdef tc17_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, true, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QTest::qWait(2000);
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageKeyQuery), true );
-
-    QCOMPARE( insertTextToObject("lineEditKey", "1234567890"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    QCOMPARE( mouseClickFinish(), true );
-#endif
-}
-
-/*
- * wpa2 no psk
- */
-void TestWlanWizardUi::tc18()
-{
-#ifdef tc18_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    QCOMPARE( mouseClickFinish(), true );
-#endif
-}
-
-/*
- * wpa2 no psk
- */
-void TestWlanWizardUi::tc19()
-{
-#ifdef tc19_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(0, false);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(false);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 20, 500), false );
-#endif
-}
-
-/*
- * Wlan network closed -> generic error
- */
-void TestWlanWizardUi::tc20()
-{
-#ifdef tc20_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkClosed(100, 1);
-    mWlanQtUtilsContext->setConnectionSuccessed(false);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageGenericError, 10, 500), true );
-    
-#endif
-}
-
-/*
- * adhoc no psk
- */
-void TestWlanWizardUi::tc21()
-{
-#ifdef tc21_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Adhoc, CMManagerShim::WlanSecModeOpen, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    
-#endif
-}
-
-/*
- * 802_1x
- */
-void TestWlanWizardUi::tc22()
-{
-#ifdef tc22_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-#endif
-}
-
-/*
- * Wapi
- */
-void TestWlanWizardUi::tc23()
-{
-#ifdef tc23_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWapi, false, false);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-#endif
-}
-
-/*
- * Multiple AP scan match results
- */
-void TestWlanWizardUi::tc24()
-{
-#ifdef tc24_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 400);
-    mApList->Add("foobar", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false, 300);
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 200);
-
-    mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-#endif
-}
-
-/*
- * Multiple Direct scan match results
- */
-void TestWlanWizardUi::tc25()
-{
-#ifdef tc25_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 400);
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false, 300);
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 200);
-
-    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
-    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-#endif
-}
-
-/*!
- * Connect to open:
- * - verifies IAP settings
- * - ICT success
- * - Finish button pressed
- */
-void TestWlanWizardUi::tc_connect_to_open_success()
-{
-#ifdef tc_connect_to_open_success_enabled
-    tc_connect_success(
-        "tc_connect_to_open_success",
-        CMManagerShim::Infra,
-        CMManagerShim::WlanSecModeOpen,
-        false,
-        "" );
-#endif 
-}
-
-/*!
- * Connect to open
- */
-void TestWlanWizardUi::tc_connect_to_open_success_hidden()
-{
-#ifdef tc_connect_to_open_success_hidden_enabled
-    tc_connect_success(
-        "tc_connect_to_open_success_hidden",
-        CMManagerShim::Infra,
-        CMManagerShim::WlanSecModeOpen,
-        true,
-        "" );
-#endif 
-}
-
-/*!
- * Connect to open
- */
-void TestWlanWizardUi::tc_connect_to_open_success_adhoc()
-{
-#ifdef tc_connect_to_open_success_adhoc_enabled
-    tc_connect_success(
-        "tc_connect_to_open_success_adhoc",
-        CMManagerShim::Adhoc,
-        CMManagerShim::WlanSecModeOpen,
-        true,
-        "" );
-#endif 
-}
-
-/*!
- * Connect to open
- */
-void TestWlanWizardUi::tc_connect_to_wep_success()
-{
-#ifdef tc_connect_to_wep_success_enabled
-    tc_connect_success(
-        "tc_connect_to_wep_success",
-        CMManagerShim::Adhoc,
-        CMManagerShim::WlanSecModeWep,
-        true,
-        "abcde" );
-#endif 
-}
-
-
-/*!
- * Connect to open
- */
-void TestWlanWizardUi::tc_connect_to_wpa_psk_success()
-{
-#ifdef tc_connect_to_wpa_psk_success_enabled
-    tc_connect_success(
-        "tc_connect_to_wpa_psk_success",
-        CMManagerShim::Infra,
-        CMManagerShim::WlanSecModeWpa,
-        false,
-        "password" );
-#endif 
-}
-/*!
- * Connect to open
- */
-void TestWlanWizardUi::tc_connect_to_wpa2_psk_success()
-{
-#ifdef tc_connect_to_wpa2_psk_success_enabled
-    tc_connect_success(
-        "tc_connect_to_wpa2_psk_success",
-        CMManagerShim::Adhoc,
-        CMManagerShim::WlanSecModeWpa2,
-        false,
-        "password" );
-#endif 
-}
-
-
-/*!
- * Connect to open:
- * - Opens
- * - ICT success
- * - Cancel pressed in summary page
- */
-void TestWlanWizardUi::tc_connect_to_open_success_cancel()
-{
-#ifdef tc_connect_to_open_success_cancel_enabled
-
-    mWlanQtUtilsContext->setCreateWlanIapResult(3);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
-    mWlanQtUtilsContext->setSignalIctResult(3, true);
-    
-    mView->mWizard->setParameters(
-        "tc_connect_to_open_success_cancel",
-        CMManagerShim::Infra,
-        CMManagerShim::WlanSecModeOpen,
-        false, false, false);
-    
-    mView->showWizard();
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    QTest::qWait(WaitTimeForUi);
-    
-    // Ignore previous calls
-    mWlanQtUtilsContext->calledMethods();
-    
-    QCOMPARE( mouseClickCancel(), true );
-    
-    QStringList calledMethods;
-    calledMethods 
-        << "disconnectIap"
-        << "deleteIap";
-    
-    QCOMPARE(mWlanQtUtilsContext->calledMethods(), calledMethods);
-    QCOMPARE( mView->verifyStatus(TestView::WizardStatusSignalCancelled), true);
-#endif 
-}
-
-/*!
- * Helpper test case for testing success case with compinations of provided
- * parameters.
- */
-void TestWlanWizardUi::tc_connect_success(
-    const QString &ssid,
-    int networkMode,
-    int securityMode,
-    bool hidden,
-    QString key)
-{
-    
-    mWlanQtUtilsContext->setCreateWlanIapResult(2);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(2);
-    mWlanQtUtilsContext->setSignalIctResult(2, true);
-    
-    mView->mWizard->setParameters(
-        ssid,
-        networkMode,
-        securityMode,
-        true, 
-        hidden,
-        false);
-
-    WlanQtUtilsAp ap;
-    ap.setValue(WlanQtUtilsAp::ConfIdConnectionMode, networkMode);
-    ap.setValue(WlanQtUtilsAp::ConfIdSecurityMode, securityMode);
-    ap.setValue(WlanQtUtilsAp::ConfIdSsid, ssid);
-    ap.setValue(WlanQtUtilsAp::ConfIdHidden, hidden);
-    
-    QStringList calledMethods;
-    calledMethods << "WlanQtUtils";
-    QCOMPARE(mWlanQtUtilsContext->calledMethods(), calledMethods);
-
-    mView->showWizard();
-    if (securityMode == CMManagerShim::WlanSecModeWep ||
-        securityMode == CMManagerShim::WlanSecModeWpa ||
-        securityMode == CMManagerShim::WlanSecModeWpa2) {
-        // Key query short pwd
-        QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageKeyQuery), true );
-        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
-        QTest::qWait(WaitTimeForUi);
-        
-        QCOMPARE( mouseClickObject("lineEditKey"), true );
-        QTest::qWait(WaitTimeForUi);
-        
-        if (securityMode == CMManagerShim::WlanSecModeWep) {
-            ap.setValue(WlanQtUtilsAp::ConfIdWepKey1, key );
-            ap.setValue(WlanQtUtilsAp::ConfIdWepKey2, key );
-            ap.setValue(WlanQtUtilsAp::ConfIdWepKey3, key );
-            ap.setValue(WlanQtUtilsAp::ConfIdWepKey4, key );
-            ap.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex1);
-            QCOMPARE( insertTextToObject("lineEditKey", "abcde"), true );
-        } 
-        else {
-            QCOMPARE( insertTextToObject("lineEditKey", "password"), true );
-            ap.setValue(WlanQtUtilsAp::ConfIdWpaPsk, key );
-            ap.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true );
-        }
-        QCOMPARE( mouseClickObject("dialog"), true );
-        
-        QTest::qWait(WaitTimeForUi);
-        QCOMPARE( mouseClickNext(), true );
-
-        QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-        QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-        QTest::qWait(WaitTimeForUi);
-        
-        QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
-        QTest::qWait(WaitTimeForUi);
-    }
-    else {
-        QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
-        
-        QTest::qWait(WaitTimeForUi);
-        QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-        QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
-        QTest::qWait(WaitTimeForUi);
-    }
-    
-    calledMethods.clear();
-    calledMethods 
-        << "createIap" 
-        << "activeIap"
-        << "connectIap";
-    QCOMPARE( mWlanQtUtilsContext->calledMethods(), calledMethods);
-    
-    QCOMPARE( mWlanQtUtilsContext->verifyWlanIapSettings(ap), true);
-    
-    QTest::qWait(WaitTimeForUi);
-    QCOMPARE( mouseClickFinish(), true );
-    QCOMPARE( mView->verifyStatus(TestView::WizardStatusSignalFinished, 2), true);
-}
-
-/*
- * Ict Result enumerator used. Hotspot.
- */
-void TestWlanWizardUi::tc26()
-{
-#ifdef tc26_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 400);
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false, 300);
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 200);
-
-    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, IctsHotspotPassed);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(1000);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(1000);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(1000);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
-    QTest::qWait(5000);
-#endif
-}
-
-/*
- * Ict Result enumerator used. Ict canceled.
- */
-void TestWlanWizardUi::tc27()
-{
-#ifdef tc27_enabled
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 400);
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false, 300);
-    mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 200);
-
-    mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
-    mWlanQtUtilsContext->setCreateWlanIapResult(100);
-    mWlanQtUtilsContext->setSignalIctResult(100, IctsCanceled);
-    mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
-    mWlanQtUtilsContext->setConnectionSuccessed(true);
-
-    QCOMPARE( mouseClickObject("lineEditKey"), true );
-    QTest::qWait(1000);
-    QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
-    QTest::qWait(1000);
-    QCOMPARE( mouseClickObject("dialog"), true );
-    QTest::qWait(1000);
-    QCOMPARE( mouseClickNext(), true );
-
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageScanning), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageProcessSettings), true );
-    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageGenericError, 10, 500), true );
-    QTest::qWait(5000);
-#endif
-}
-
-/*!
- * Filter to catch focus event to the text editor widget.
- */
-bool TestWlanWizardUi::eventFilter(QObject *obj, QEvent *event)
-{
-    if (obj == mMainWindow && event->type() == QEvent::Show) {
-        mMainWindow->removeEventFilter(this);
-        mEvent = true;
-    }
-    return false;
-}
-
-QGraphicsWidget* TestWlanWizardUi::findChildItem(const QString &itemName, QGraphicsWidget *widget)
-{
-    QList<QGraphicsItem*> list = widget->childItems();
-    for (int i = 0; i < list.size(); i++) {
-        QGraphicsWidget* item = (QGraphicsWidget*) list[i];
-        if (item->objectName() == itemName) {
-            return item;
-        }
-        else if ((item = findChildItem(itemName, item))) {
-            return item;
-        }
-    }
-    return 0;
-}
-
-bool TestWlanWizardUi::verifyCurrentPage(int pageId, int retries, int wait_ms)
-{
-    for (int i = 0; i < retries; i++) {
-        QTest::qWait(wait_ms);
-
-        WlanWizardPrivate *pPrivate = mView->mWizard->d_ptr;
-        HbWidget* current = qobject_cast<HbWidget*> (pPrivate->mStackedWidget->currentWidget());
-        WlanWizardPage *page = pPrivate->mPageMapper[current];
-
-        // TODO: verify title in this method
-        
-        if (page == pPrivate->mPages[pageId]) {
-            switch(pageId) {
-            case WlanWizardPageInternal::PageEapStart:
-                return true;
-            case WlanWizardPageInternal::PageGenericError:
-                return true;
-            case WlanWizardPageInternal::PageKeyQuery:
-                // TODO: add parameter SSID, FAILS without it
-                return true; // verifyDialogText("dialog", hbTrId("txt_occ_dialog_enter_key_for_1"));
-            case WlanWizardPageInternal::PageNetworkMode:
-                return verifyDialogText("dialog_6", hbTrId("txt_occ_dialog_select_network_mode_and_status"));
-            case WlanWizardPageInternal::PageNetworkSecurity:
-                return verifyDialogText("dialog_6", hbTrId("txt_occ_dialog_select_network_security_mode"));
-            case WlanWizardPageInternal::PageProcessSettings:
-                // TODO: add parameter SSID, FAILS without it
-                return true; // verifyDialogText("dialog", hbTrId("txt_occ_dialog_checking_connection_to_1"));
-            case WlanWizardPageInternal::PageScanning:
-                return true; // verifyDialogText("dialog", hbTrId("TODO_1"));
-            case WlanWizardPageInternal::PageSsid:
-                return verifyDialogText("dialog", hbTrId("txt_occ_dialog_insert_the_name_of_the_new_wlan_net"));
-            case WlanWizardPageInternal::PageSummary:
-                if (pPrivate->mTitle->plainText() != hbTrId("txt_occ_title_wlan_setup_wizard_summary")){
-                    qWarning("TestWlanWizardUi::verifyCurrentPage: Invalid title");
-                    return false;
-                }
-                return true;
-            case WlanWizardPageInternal::PageWpsStart:
-                return true;
-            default:
-                return true;
-            }
-        }
-    }
-    qWarning("verifyCurrentPage: expected: %d", pageId);
-    return false;
-}
-
-bool TestWlanWizardUi::verifyDialogText(const QString objName, const QString text)
-{
-    HbWidget* current = qobject_cast<HbWidget*> (
-        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
-    HbLabel* widget = (HbLabel*) findChildItem(objName, current);
-
-    if (widget) {
-        if(widget->plainText() == text) {
-            return true;
-        }
-        else {
-            qWarning("verifyDialogText: not match");
-            qDebug() << "expect: " << text;
-            qDebug() << "actual: " << widget->plainText();
-        }
-    } else {
-        qWarning("verifyDialogText: object not found");
-    }
-    
-    return false;
-}
-
-bool TestWlanWizardUi::verifyActionButtons(ButtonStatus prevStatus,
-    ButtonStatus cancelStatus,
-    ButtonStatus nextStatus,
-    ButtonStatus finishStatus)
-{
-    WlanWizardPrivate *pPrivate = mView->mWizard->d_ptr;
-    ButtonStatus prevReally = ButtonHidden;
-    ButtonStatus cancelReally = ButtonHidden;
-    ButtonStatus nextReally = ButtonHidden;
-    ButtonStatus finishReally = ButtonHidden;
-
-    if(pPrivate->mActionPrevious->isVisible()) {
-        if(pPrivate->mActionPrevious->isEnabled()) {
-            prevReally = ButtonEnabled;
-        } else {
-            prevReally = ButtonDisabled;
-        }
-    }
-
-    if(pPrivate->mActionCancel->isVisible()) {
-        if(pPrivate->mActionCancel->isEnabled()) {
-            cancelReally = ButtonEnabled;
-        } else {
-            cancelReally = ButtonDisabled;
-        }
-    }
-
-    if(pPrivate->mActionNext->isVisible()) {
-        if(pPrivate->mActionNext->isEnabled()) {
-            nextReally = ButtonEnabled;
-        } else {
-            nextReally = ButtonDisabled;
-        }
-    }
-
-    if(pPrivate->mActionFinish->isVisible()) {
-        if(pPrivate->mActionFinish->isEnabled()) {
-            finishReally = ButtonEnabled;
-        } else {
-            finishReally = ButtonDisabled;
-        }
-    }
-    bool ret = true;
-    if (prevReally != prevStatus){
-        qWarning("Previous Button: really: %d, status: %d", prevReally, prevStatus);
-        ret = false;
-    }
-    if (cancelReally != cancelStatus){
-        qWarning("Cancel Button: really: %d, status: %d", cancelReally, cancelStatus);
-        ret = false;
-    }
-    if (nextReally != nextStatus){
-        qWarning("Next Button: really: %d, status: %d", nextReally, nextStatus);
-        ret = false;
-    }
-    if (finishReally != finishStatus){
-        qWarning("Finish Button: really: %d, status: %d", finishReally, finishStatus);
-        ret = false;
-    }
-    
-    return ret;
-}
-
-bool TestWlanWizardUi::mouseClickObject(const QString objName)
-{
-    HbWidget* current = qobject_cast<HbWidget*> (
-        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
-    HbWidget* widget = (HbWidget*) findChildItem(objName, current);
-    
-    if (widget) {
-        HbAutoTest::mouseClick(mMainWindow, widget);
-        widget->clearFocus();
-        widget->setFocus();
-        return true;
-    }
-    qWarning("mouseClickObject: object not found");
-    
-    return false;
-}
-
-bool TestWlanWizardUi::insertTextToObject(const QString objName, const QString text)
-{
-    HbWidget* current = qobject_cast<HbWidget*> (
-        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
-    HbWidget* widget = (HbWidget*) findChildItem(objName, current);
-
-    if (widget) {
-        for (int i = 0; i < text.size(); i++) {
-            HbAutoTest::keyPress(mMainWindow, text.at(i).toAscii(), 0, 10);
-            QTest::qWait(20);
-        }
-        return true;
-    }
-    qWarning("insertTextToObject: object not found");
-    return false;
-}
-
-bool TestWlanWizardUi::selectRadioButton(const QString objName, int index)
-{
-    HbWidget* current = qobject_cast<HbWidget*> (
-        mView->mWizard->d_ptr->mStackedWidget->currentWidget());
-    TestRadioButtonList* widget = (TestRadioButtonList*) findChildItem(objName, current);
-
-    if (widget) {
-        widget->setSelected(index);
-        widget->emitActivated(widget->currentIndex());
-        return true;
-    }
-    return false;
-}
-
-bool TestWlanWizardUi::mouseClickNext()
-{
-    if (mView->mWizard->d_ptr->mActionNext->isEnabled()) {
-        mView->mWizard->d_ptr->mActionNext->activate(QAction::Trigger);
-        return true;
-    }
-    qWarning("Next button not enabled");
-    return false;
-}
-
-bool TestWlanWizardUi::mouseClickPrevious()
-{
-    if (mView->mWizard->d_ptr->mActionPrevious->isEnabled()) {
-        mView->mWizard->d_ptr->mActionPrevious->activate(QAction::Trigger);
-        return true;
-    }
-    qWarning("Previous button not enabled");
-    return false;
-}
-
-bool TestWlanWizardUi::mouseClickCancel()
-{
-    if (mView->mWizard->d_ptr->mActionCancel->isEnabled()) {
-        mView->mWizard->d_ptr->mActionCancel->activate(QAction::Trigger);
-        return true;
-    }
-    qWarning("Cancel button not enabled");
-    return false;
-}
-
-bool TestWlanWizardUi::mouseClickFinish()
-{
-    if (mView->mWizard->d_ptr->mActionFinish->isEnabled()) {
-        mView->mWizard->d_ptr->mActionFinish->activate(QAction::Trigger);
-        return true;
-    }
-    qWarning("Finish button not enabled");
-    return false;
-}
-
-TestView::TestView() : mWizard(NULL)
-{
-    qDebug("TestView::TestView()");
-}
-
-TestView::~TestView()
-{
-    qDebug("TestView::~TestView()");
-}
-
-void TestView::createWizard()
-{
-    qDebug("TestView::createWizard");
-    Q_ASSERT(mWizard == NULL);
-    mWizard = new WlanWizard(mainWindow());
-    bool ok;
-    ok = connect(
-        mWizard, SIGNAL(finished(int, bool)), 
-        this, SLOT(finished(int, bool)), 
-        Qt::QueuedConnection);
-    Q_ASSERT(ok);
-
-    ok = connect(
-        mWizard, SIGNAL(cancelled()), 
-        this, SLOT(cancelled()),
-        Qt::QueuedConnection);
-    Q_ASSERT(ok);
-    
-    mWizardStatus = WizardStatusSignalNone;
-    mConnectedIapId = -100;
-}
-
-void TestView::showWizard()
-{
-    qDebug("TestView::showWizard()");
-    Q_ASSERT(mWizard);
-    mWizard->show();
-}
-
-void TestView::deleteWizard()
-{
-    qDebug("TestView::deleteWizard");
-
-    Q_ASSERT(mWizard != NULL);
-    QTest::qWait(10);
-    QTest::qWait(10); 
-    QMetaObject::invokeMethod(mWizard, "deleteLater", Qt::QueuedConnection); 
-    QTest::qWait(10); 
-    mWizard = NULL; 
-}
-
-void TestView::finished(int iapId, bool connected)
-{
-    qDebug("TestView::complete(), iap id: %d, connected: %d", iapId, connected);
-    
-    if (mWizardStatus != WizardStatusSignalNone) {
-        qWarning("TestView::finished: multiple signals received");
-        mWizardStatus = WizardStatusSignalUndefined;
-    } else {
-        mWizardStatus = WizardStatusSignalFinished;
-        mConnectedIapId = iapId;
-    }
-}
-
-void TestView::cancelled()
-{
-    qDebug("TestView::cancelled()");
-    if (mWizardStatus != WizardStatusSignalNone) {
-        qWarning("TestView::cancelled: multiple signals received");
-        mWizardStatus = WizardStatusSignalUndefined;
-    } else {
-        mWizardStatus = WizardStatusSignalCancelled;
-    }
-}
-
-bool TestView::verifyStatus(WizardStatusSignal status, int iapId )
-{
-    // Since connections to cancelled and finished signals are queued
-    // we need to use qWait() here.
-    QTest::qWait(100);
-    bool ret = true;
-    if (status != mWizardStatus){
-        qWarning("TestView::verifyStatus, status: expected: %d, actual: %d", status, mWizardStatus);
-        ret = false;
-    }
-    if (status == WizardStatusSignalFinished) {
-        if (iapId != mConnectedIapId) {
-            qWarning("TestView::verifyStatus, iapid: expected: %d, actual: %d", iapId, mConnectedIapId);
-            ret = false;
-        }
-    }
-    return ret;
-}
--- a/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardui.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-/*
- * 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:
- */
-
-#ifndef TESTWLANWIZARDRNDUI_H_
-#define TESTWLANWIZARDRNDUI_H_
-
-#include <QObject>
-#include <HbView>
-#include <QSharedPointer>
-
-class QGraphicsItem;
-class HbAutoTestMainWindow;
-class WlanWizard;
-class WlanQtUtilsContext;
-class WlanQtUtils;
-class WlanQtUtilsAp;
-class QString;
-
-class ContextWlanApList
-{
-public:
-    ContextWlanApList();
-    ~ContextWlanApList();
-    
-    void Add(QString name,
-        int netMode,
-        int secMode,
-        bool wpaPskInUse,
-        bool wpsSupported,
-        int signalStrength = 0);
-    
-    void clear();
-    
-    const QList<QSharedPointer<WlanQtUtilsAp> > &List() { return mList; }
-private:
-    QList<QSharedPointer<WlanQtUtilsAp> > mList;
-};
-
-class TestView: public HbView
-{
-Q_OBJECT
-
-public: 
-    enum WizardStatusSignal{
-        WizardStatusSignalNone,
-        WizardStatusSignalFinished,
-        WizardStatusSignalCancelled,
-        WizardStatusSignalUndefined,
-    };
-
-public:
-    TestView();
-    virtual ~TestView();
-       
-    void createWizard();
-    void showWizard();
-    
-    bool verifyStatus(WizardStatusSignal status, int iapId = -100);
-    
-private slots:
-    void finished(int iapId, bool connected);
-    void cancelled();
-
-public:
-    void deleteWizard();
-    
-public:
-    WlanWizard *mWizard;
-
-private:
-    WizardStatusSignal mWizardStatus;
-    int mConnectedIapId;
-};
-
-
-class TestWlanWizardUi: public QObject
-{
-Q_OBJECT
-
-public slots:
-    // Test framework functions
-    void initTestCase();
-    void cleanupTestCase();
-    void init();
-    void cleanup();
-
-private slots:
-    // Test cases
-    void tcStartWizard();
-    void tc01();
-    void tc02();
-    void tc03();
-    void tc04();
-    void tc05();
-    void tc06();
-    void tc07();
-    void tc08();
-    void tc09();
-    void tc10();
-    void tc11();
-    void tc12();
-    void tc13();
-    void tc14();
-    void tc15();
-    void tc16();
-    void tc17();
-    void tc18();
-    void tc19();
-    void tc20();
-    void tc21();
-    void tc22();
-    void tc23();
-    void tc24();
-    void tc25();
-    void tc26();
-    void tc27();
-    void tc_connect_to_open_success();
-    void tc_connect_to_open_success_hidden();
-    void tc_connect_to_open_success_adhoc();
-    void tc_connect_to_wep_success();
-    void tc_connect_to_wpa_psk_success();
-    void tc_connect_to_wpa2_psk_success();
-    void tc_connect_to_open_success_cancel();
-    
-protected:
-    
-    enum ButtonStatus {
-        ButtonHidden,
-        ButtonDisabled,
-        ButtonEnabled
-    };
-    /*!
-     * Reimplements QObject function that is invoked on any event. This
-     * function handles only a focus event to mSsid edit field.
-     * @param obj contains the object, where the event originates from.
-     * @param event contains the event id.
-     */
-    bool eventFilter(QObject *obj, QEvent *event);
-    
-    QGraphicsWidget* findChildItem(const QString &itemName, QGraphicsWidget *widget);
-    
-    bool verifyCurrentPage(int pageId, int retries = 10, int wait_ms = 200);
-    bool verifyDialogText(const QString objName, const QString text);
-    bool verifyActionButtonVisibility(bool prevVisible, bool cancelVisible,
-        bool nextVisible, bool finishVisible);
-    bool verifyActionButtons(ButtonStatus prevStatus, ButtonStatus cancelStatus,
-        ButtonStatus nextStatus, ButtonStatus finishStatus);
-    bool mouseClickObject(const QString objName);
-    bool insertTextToObject(const QString objName, const QString text);
-    bool selectRadioButton(const QString objName, int index);
-    
-    bool mouseClickNext();
-    bool mouseClickPrevious();
-    bool mouseClickCancel();
-    bool mouseClickFinish();
-    
-private:
-    
-private:
-    void tc_connect_success(
-        const QString &ssid,
-        int networkMode,
-        int securityMode,
-        bool hidden,
-        QString key);
-    
-    bool mEvent;
-
-    // Test data
-    TestView *mView;
-    HbAutoTestMainWindow *mMainWindow;
-    
-    WlanQtUtilsContext *mWlanQtUtilsContext;
-    
-    ContextWlanApList *mApList;   
-    
-    bool mNoCleanup;
-    
-};
-
-#endif /* TESTWLANWIZARDRNDUI_H_ */
--- a/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardui_conf.h	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * 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:
- */
-
-// System includes
-
-// User includes
-
-// External function prototypes
-
-// Local constants
-
-//! 1sec 
-#define WaitTimeForUi 1000
-
-/*
-#define tc01_enabled
-#define tc02_enabled
-#define tc03_enabled
-#define tc04_enabled
-#define tc05_enabled
-#define tc06_enabled
-#define tc07_enabled
-#define tc08_enabled
-#define tc09_enabled
-#define tc10_enabled
-#define tc11_enabled
-#define tc12_enabled
-#define tc13_enabled
-#define tc14_enabled
-#define tc15_enabled
-#define tc16_enabled
-#define tc17_enabled
-#define tc18_enabled
-#define tc19_enabled
-#define tc20_enabled
-#define tc21_enabled
-#define tc22_enabled
-#define tc23_enabled
-#define tc24_enabled
-#define tc25_enabled
-// test cases covering "ict_result_enum_used" build configuration
-#define tc26_enabled
-#define tc27_enabled
-
-#define tc_connect_to_open_success_enabled
-#define tc_connect_to_open_success_hidden_enabled;
-#define tc_connect_to_open_success_adhoc_enabled;
-*/
-#define tc_connect_to_wep_success_enabled;
-#define tc_connect_to_wpa_psk_success_enabled;
-#define tc_connect_to_wpa2_psk_success_enabled;
-#define tc_connect_to_open_success_cancel_enabled
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardwps.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,490 @@
+/*
+ * 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 includes
+#include <QTest>
+#include <QDebug>
+#include <QList>
+#include <cmmanagerdefines_shim.h>
+#include <wlanerrorcodes.h>
+
+// User includes
+#include "testwlanwizardwps.h"
+#include "testwlanwizardwps_conf.h"
+#include "wlanwizard.h"
+#include "wlanwizard_p.h"
+#include "wlanqtutils_context.h"
+#include "wlanqtutils.h"
+#include "wlanqtutilsap.h"
+#include "wlanwizardpageinternal.h"
+#include "wpswizardpage.h"
+
+#include "wlanmgmtclient_context.h"
+
+// External function prototypes
+
+// Local constants
+
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+// ---------------------------------------------------------
+// TEST CASES
+// ---------------------------------------------------------
+
+void TestWlanWizardWps::tcConfigureManualOpen()
+{
+#ifdef tcConfigureManualOpen_enabled
+    const QString ssid("tcConfigureManualOpen"); 
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+    mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+    
+    WlanQtUtilsAp ap;
+    ap.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra);
+    ap.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeOpen);
+    ap.setValue(WlanQtUtilsAp::ConfIdSsid, ssid);
+    ap.setValue(WlanQtUtilsAp::ConfIdHidden, false);
+
+    // Default values
+    ap.setValue(WlanQtUtilsAp::ConfIdWpaPsk, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true );
+    ap.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex1 );
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey1, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey2, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey3, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey4, QString());
+    
+    mView->mWizard->setParameters(
+        ssid,
+        CMManagerShim::Infra,
+        CMManagerShim::WlanSecModeOpen,
+        false, false, true);
+        
+    mView->showWizard();
+    verifyModeSelection();
+    QCOMPARE(selectRadioButton("radioButtonList", 2), true);
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QCOMPARE(mouseClickNext(), true);
+    QTest::qWait(WaitTimeForUi);
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    QCOMPARE( mWlanQtUtilsContext->verifyWlanIapSettings(ap), true);
+#endif
+}
+
+void TestWlanWizardWps::tcPushButtonOpen()
+{
+#ifdef tcPushButtonOpen_enabled
+    tcPushButton(
+        "tcPushButtonOpen",
+        EWlanIapSecurityModeAllowUnsecure,
+        CMManagerShim::WlanSecModeOpen,
+        EWlanOperatingModeInfrastructure,
+        CMManagerShim::Infra,
+        EWlanDefaultWepKey1,
+        CMManagerShim::WepKeyIndex1);
+#endif
+}
+
+void TestWlanWizardWps::tcPushButtonWep1()
+{
+#ifdef tcPushButtonWep1_enabled
+    tcPushButton(
+        "tcPushButtonWep1",
+        EWlanIapSecurityModeWep,
+        CMManagerShim::WlanSecModeWep,
+        EWlanOperatingModeAdhoc,
+        CMManagerShim::Adhoc,
+        EWlanDefaultWepKey1,
+        CMManagerShim::WepKeyIndex1);
+#endif
+}
+
+void TestWlanWizardWps::tcPushButtonWep2()
+{
+#ifdef tcPushButtonWep2_enabled
+    tcPushButton(
+        "tcPushButtonWep2",
+        EWlanIapSecurityModeWep,
+        CMManagerShim::WlanSecModeWep,
+        EWlanOperatingModeAdhoc,
+        CMManagerShim::Adhoc,
+        EWlanDefaultWepKey2,
+        CMManagerShim::WepKeyIndex2);
+#endif
+}
+
+void TestWlanWizardWps::tcPushButtonWep3()
+{
+#ifdef tcPushButtonWep3_enabled
+    tcPushButton(
+        "tcPushButtonWep3",
+        EWlanIapSecurityModeWep,
+        CMManagerShim::WlanSecModeWep,
+        EWlanOperatingModeAdhoc,
+        CMManagerShim::Adhoc,
+        EWlanDefaultWepKey3,
+        CMManagerShim::WepKeyIndex3);
+#endif
+}
+
+void TestWlanWizardWps::tcPushButtonWep4()
+{
+#ifdef tcPushButtonWep4_enabled
+    tcPushButton(
+        "tcPushButtonWep4",
+        EWlanIapSecurityModeWep,
+        CMManagerShim::WlanSecModeWep,
+        EWlanOperatingModeAdhoc,
+        CMManagerShim::Adhoc,
+        EWlanDefaultWepKey4,
+        CMManagerShim::WepKeyIndex4);
+#endif
+}
+
+void TestWlanWizardWps::tcPushButtonWpa()
+{
+#ifdef tcPushButtonWpa_enabled
+    tcPushButton(
+        "tcPushButtonWpa",
+        EWlanIapSecurityModeWpa,
+        CMManagerShim::WlanSecModeWpa,
+        EWlanOperatingModeAdhoc,
+        CMManagerShim::Adhoc,
+        EWlanDefaultWepKey1,
+        CMManagerShim::WepKeyIndex1);
+#endif
+}
+
+void TestWlanWizardWps::tcPushButtonWpa2()
+{
+#ifdef tcPushButtonWpa2_enabled
+    tcPushButton(
+        "tcPushButtonWpa2",
+        EWlanIapSecurityModeWpa2Only,
+        CMManagerShim::WlanSecModeWpa2,
+        EWlanOperatingModeAdhoc,
+        CMManagerShim::Adhoc,
+        EWlanDefaultWepKey1,
+        CMManagerShim::WepKeyIndex1);
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupOOBInterfaceReadError()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupOOBInterfaceReadError_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupOOBInterfaceReadError,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupDecryptionCRCFailure()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupDecryptionCRCFailure_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupDecryptionCRCFailure,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetup2_4ChannelNotSupported()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetup2_4ChannelNotSupported_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetup2_4ChannelNotSupported,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetup5_0ChannelNotSupported()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetup5_0ChannelNotSupported_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetup5_0ChannelNotSupported,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupNetworkAuthFailure()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupNetworkAuthFailure_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupNetworkAuthFailure,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupNoDHCPResponse()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupNoDHCPResponse_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupNoDHCPResponse,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupFailedDHCPConfig()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupFailedDHCPConfig_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupFailedDHCPConfig,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupIPAddressConflict()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupIPAddressConflict_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupIPAddressConflict,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupCouldNotConnectToRegistrar()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupCouldNotConnectToRegistrar_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupCouldNotConnectToRegistrar,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupMultiplePBCSessionsDetected()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupMultiplePBCSessionsDetected_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupMultiplePBCSessionsDetected,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupRogueActivitySuspected()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupRogueActivitySuspected_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupRogueActivitySuspected,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupDeviceBusy()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupDeviceBusy_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupDeviceBusy,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupSetupLocked()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupSetupLocked_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupSetupLocked,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupMessageTimeout()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupMessageTimeout_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupMessageTimeout,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupRegistrationSessionTimeout()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupRegistrationSessionTimeout_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupRegistrationSessionTimeout,
+        hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupDevicePasswordAuthFailure()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupDevicePasswordAuthFailure_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupDevicePasswordAuthFailure,
+        hbTrId("txt_occ_dialog_configuration_failed_authenticatio"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupPINMethodNotSupported()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupPINMethodNotSupported_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupPINMethodNotSupported,
+        hbTrId("txt_occ_dialog_configuration_failed_authenticatio"));
+#endif
+}
+
+void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupPBMethodNotSupported()
+{
+#ifdef tcPinCode_KErrWlanProtectedSetupPBMethodNotSupported_enabled
+    tcPinCode_failure(
+        KErrWlanProtectedSetupPBMethodNotSupported,
+        hbTrId("txt_occ_dialog_configuration_failed_authenticatio"));
+#endif
+}
+
+void TestWlanWizardWps::verifyModeSelection()
+{
+    QCOMPARE( verifyCurrentPage(WpsWizardPage::PageWpsWizardStep2 ), true );
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    
+    QStringList list;
+    list << hbTrId("txt_occ_list_use_pushbutton")
+         << hbTrId("txt_occ_list_use_pin_code")
+         << hbTrId("txt_occ_list_configure_manually");
+    
+    QCOMPARE(verifyRadioButtons("radioButtonList"), list);
+}
+
+
+void TestWlanWizardWps::tcPushButton(
+    const QString &ssid,
+    int secModeWlan,
+    int secModeCmm,
+    int operModeWlan,
+    int operModeCmm,
+    int defaultWepKeyIndexWlan,
+    int defaultWepKeyIndexCmm)
+{
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+    mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+    
+    WlanQtUtilsAp ap;
+    ap.setValue(WlanQtUtilsAp::ConfIdConnectionMode, operModeCmm);
+    ap.setValue(WlanQtUtilsAp::ConfIdSecurityMode, secModeCmm);
+    ap.setValue(WlanQtUtilsAp::ConfIdSsid, ssid);
+    ap.setValue(WlanQtUtilsAp::ConfIdHidden, false);
+
+    // Default values
+    ap.setValue(WlanQtUtilsAp::ConfIdWpaPsk, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true );
+    ap.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex1 );
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey1, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey2, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey3, QString());
+    ap.setValue(WlanQtUtilsAp::ConfIdWepKey4, QString());
+    
+    if (secModeCmm == CMManagerShim::WlanSecModeWep){
+        ap.setValue(WlanQtUtilsAp::ConfIdWepKey1, "wepkey1");
+        ap.setValue(WlanQtUtilsAp::ConfIdWepKey2, "wepkey2");
+        ap.setValue(WlanQtUtilsAp::ConfIdWepKey3, "wepkey3");
+        ap.setValue(WlanQtUtilsAp::ConfIdWepKey4, "wepkey4");
+        ap.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, defaultWepKeyIndexCmm );
+    } else if (secModeCmm == CMManagerShim::WlanSecModeWpa ||
+        secModeCmm == CMManagerShim::WlanSecModeWpa2) {
+        ap.setValue(WlanQtUtilsAp::ConfIdWpaPsk, "wpapsk");
+    }
+    
+    mWlanMgmtClientContext->setRunProtectedSetup(ssid, KErrNone);
+    mWlanMgmtClientContext->appendResult(
+        ssid,
+        secModeWlan,
+        operModeWlan,
+        defaultWepKeyIndexWlan,
+        "wepkey1",
+        "wepkey2",
+        "wepkey3",
+        "wepkey4",
+        "wpapsk");
+        
+    mView->mWizard->setParameters(
+        ssid,
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeWep,
+        false, false, true);
+        
+    mView->showWizard();
+    verifyModeSelection();
+
+    QCOMPARE(selectRadioButton("radioButtonList", 0), true);
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QCOMPARE(mouseClickNext(), true);
+    QTest::qWait(WaitTimeForUi);
+
+    QCOMPARE( verifyCurrentPage(WpsWizardPage::PageWpsWizardStep3_Button), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QCOMPARE( mouseClickNext(), true);
+    QCOMPARE( verifyCurrentPage(WpsWizardPage::PageWpsWizardStep4), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
+    QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
+    QTest::qWait(WaitTimeForUi);
+    
+    QCOMPARE( mWlanQtUtilsContext->verifyWlanIapSettings(ap), true);
+}
+
+
+void TestWlanWizardWps::tcPinCode_failure(
+    int errorCode,
+    const QString &errorText)
+{
+    const QString ssid("tcPinCode_failure");
+    
+    mWlanQtUtilsContext->setCreateWlanIapResult(3);
+    mWlanQtUtilsContext->setConnectionSuccessed(true);
+    mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
+    mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
+
+    mWlanMgmtClientContext->setRunProtectedSetup(ssid, errorCode);
+        
+    mView->mWizard->setParameters(
+        ssid,
+        CMManagerShim::Adhoc,
+        CMManagerShim::WlanSecModeWep,
+        false, false, true);
+        
+    mView->showWizard();
+    verifyModeSelection();
+
+    QCOMPARE(selectRadioButton("radioButtonList", 1), true);
+    QTest::qWait(WaitTimeForUi);
+    QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    QCOMPARE(mouseClickNext(), true);
+    QTest::qWait(WaitTimeForUi);
+
+    QCOMPARE( verifyCurrentPage(WpsWizardPage::PageWpsWizardStep3_Number), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
+    
+    QCOMPARE(mouseClickNext(), true);
+    QTest::qWait(WaitTimeForUi);
+    
+    QCOMPARE( verifyCurrentPage(WpsWizardPage::PageWpsWizardStep4), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    
+    QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, errorText), true );
+    QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
+    QTest::qWait(WaitTimeForUi);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardwps.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,80 @@
+/*
+ * 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:
+ */
+
+#ifndef TESTWLANWIZARDRNDWPS_H
+#define TESTWLANWIZARDRNDWPS_H
+
+#include "testwlanwizardcontext.h"
+
+class TestWlanWizardWps : public TestWlanWizardContext
+{
+Q_OBJECT
+
+private slots:
+    void tcConfigureManualOpen();
+    void tcPushButtonOpen();
+    void tcPushButtonWep1();
+    void tcPushButtonWep2();
+    void tcPushButtonWep3();
+    void tcPushButtonWep4();
+    void tcPushButtonWpa();
+    void tcPushButtonWpa2();
+    void tcPinCode_KErrWlanProtectedSetupOOBInterfaceReadError();
+    void tcPinCode_KErrWlanProtectedSetupDecryptionCRCFailure();
+    void tcPinCode_KErrWlanProtectedSetup2_4ChannelNotSupported();
+    void tcPinCode_KErrWlanProtectedSetup5_0ChannelNotSupported();
+    void tcPinCode_KErrWlanProtectedSetupNetworkAuthFailure();
+    void tcPinCode_KErrWlanProtectedSetupNoDHCPResponse();
+    void tcPinCode_KErrWlanProtectedSetupFailedDHCPConfig();
+    void tcPinCode_KErrWlanProtectedSetupIPAddressConflict();
+    void tcPinCode_KErrWlanProtectedSetupCouldNotConnectToRegistrar();
+    void tcPinCode_KErrWlanProtectedSetupMultiplePBCSessionsDetected();
+    void tcPinCode_KErrWlanProtectedSetupRogueActivitySuspected();
+    void tcPinCode_KErrWlanProtectedSetupDeviceBusy();
+    void tcPinCode_KErrWlanProtectedSetupSetupLocked();
+    void tcPinCode_KErrWlanProtectedSetupMessageTimeout();
+    void tcPinCode_KErrWlanProtectedSetupRegistrationSessionTimeout();
+    void tcPinCode_KErrWlanProtectedSetupDevicePasswordAuthFailure();
+    void tcPinCode_KErrWlanProtectedSetupPINMethodNotSupported();
+    void tcPinCode_KErrWlanProtectedSetupPBMethodNotSupported();
+    /*
+    void tcPushButton_KErrNone_back_forward_KErrNone();
+    void tcPinCodeMultipleResults();
+    void tcPinCodeMultipleResults_back_and_forward();
+    */
+
+private: // Helper methods
+    void verifyModeSelection();
+    
+private: // Helper test cases 
+    void tcPushButton(
+        const QString &ssid,
+        int secModeWlan,
+        int secModeCmm,
+        int operModeWlan,
+        int operModeCmm,
+        int defaultWepKeyIndexWlan,
+        int defaultWepKeyIndexCmm);
+    
+    void tcPinCode_failure(
+        int errorCode,
+        const QString &errorText);
+    
+
+    
+};
+
+#endif /* TESTWLANWIZARDRNDWPS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/testwlanwizardwps_conf.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,51 @@
+/*
+ * 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 includes
+
+// User includes
+
+// External function prototypes
+
+// Local constants
+
+#define tcConfigureManualOpen_enabled
+#define tcPushButtonOpen_enabled
+#define tcPushButtonWep1_enabled
+#define tcPushButtonWep2_enabled
+#define tcPushButtonWep3_enabled
+#define tcPushButtonWep4_enabled
+#define tcPushButtonWpa_enabled
+#define tcPushButtonWpa2_enabled
+#define tcPinCode_KErrWlanProtectedSetupOOBInterfaceReadError_enabled
+#define tcPinCode_KErrWlanProtectedSetupDecryptionCRCFailure_enabled
+#define tcPinCode_KErrWlanProtectedSetup2_4ChannelNotSupported_enabled
+#define tcPinCode_KErrWlanProtectedSetup5_0ChannelNotSupported_enabled
+#define tcPinCode_KErrWlanProtectedSetupNetworkAuthFailure_enabled
+#define tcPinCode_KErrWlanProtectedSetupNoDHCPResponse_enabled
+#define tcPinCode_KErrWlanProtectedSetupFailedDHCPConfig_enabled
+#define tcPinCode_KErrWlanProtectedSetupIPAddressConflict_enabled
+#define tcPinCode_KErrWlanProtectedSetupCouldNotConnectToRegistrar_enabled
+#define tcPinCode_KErrWlanProtectedSetupMultiplePBCSessionsDetected_enabled
+#define tcPinCode_KErrWlanProtectedSetupRogueActivitySuspected_enabled
+#define tcPinCode_KErrWlanProtectedSetupDeviceBusy_enabled
+#define tcPinCode_KErrWlanProtectedSetupSetupLocked_enabled
+#define tcPinCode_KErrWlanProtectedSetupMessageTimeout_enabled
+#define tcPinCode_KErrWlanProtectedSetupRegistrationSessionTimeout_enabled
+#define tcPinCode_KErrWlanProtectedSetupDevicePasswordAuthFailure_enabled
+#define tcPinCode_KErrWlanProtectedSetupPINMethodNotSupported_enabled
+#define tcPinCode_KErrWlanProtectedSetupPBMethodNotSupported_enabled
+
--- a/wlanutilities/wlanwizard/t_wlanwizard/ut/ut.pri	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/t_wlanwizard/ut/ut.pri	Tue Jul 06 15:29:22 2010 +0300
@@ -13,17 +13,28 @@
 # 	
 # 
 # Description: 
-#	UT for Wlan wizard testing
+#   UT for Wlan wizard testing
 #
 
 HEADERS += \
-	ut/hbautotest.h \ 
-	ut/testwlanwizard.h \
-    ut/testwlanwizardui.h \
-    ut/testwlanwizardui_conf.h
+    ut/hbautotest.h \ 
+    ut/testwlanwizard.h \
+    ut/testwlanwizardeap.h \
+    ut/testwlanwizardeap_conf.h \
+    ut/testwlanwizardcontext.h \
+    ut/testwlanwizardmanual.h \
+    ut/testwlanwizardmanual_conf.h \
+    ut/testwlanwizardconnect.h \
+    ut/testwlanwizardconnect_conf.h \
+    ut/testwlanwizardwps.h \
+    ut/testwlanwizardwps_conf.h
 
 SOURCES += \
-	ut/main.cpp \ 
+    ut/main.cpp \ 
     ut/hbautotest.cpp \
-    ut/testwlanwizardui.cpp \
-    ut/testwlanwizard.cpp
\ No newline at end of file
+    ut/testwlanwizardeap.cpp \
+    ut/testwlanwizardcontext.cpp \
+    ut/testwlanwizardconnect.cpp \
+    ut/testwlanwizardmanual.cpp \
+    ut/testwlanwizard.cpp \
+    ut/testwlanwizardwps.cpp
--- a/wlanutilities/wlanwizard/t_wlanwizard/wst_script/wst_make.bat	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-::=============================================================================
-:: 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:
-::
-::=============================================================================
-::
-:: Following commands are implemented:
-:: - CLEAN_OLD_FILES
-:: - RUN_TEST_CASES
-:: - GENERATE_REPORTS
-:: - SHOW_RESULTS
-:: - START_BROWSER
-::=============================================================================
-
-::-----------------------------------------------------------------------------
-:: Do the preparations:
-:: - Don't show the commands
-:: - Use local parameters -- don't pollute the global one
-::-----------------------------------------------------------------------------
-@echo off
-
-::echo *** WST_MAKE: START:
-setlocal
-
-::-----------------------------------------------------------------------------
-:: Check input
-:: 
-:: Parameters that are required:
-:: 1) wst_root_dir
-:: 2) log_file_name
-:: 3) the command
-::-----------------------------------------------------------------------------
-
-:: (1)
-if not exist %1 goto ERROR
-if [%1]==[] goto ERROR
-set wst_root_dir=%1
-set wst_log_dir=%1\wst_log
-set wst_report_dir=%1\wst_report
-set wlanwizard_root_dir=%1\..
-set wlanwizard_test_dir=%1\
-
-:: (2)
-if [%2]==[] goto ERROR
-set log_file_name=%2
-set log_file=%wst_log_dir%\%log_file_name%
-if not exist %log_file% goto ERROR
-echo *** DATE AND TIME: %date%, %time% >> %log_file%
-::echo *** WST_MAKE: INFO: WLAN Wizard root dir: %wlanwizard_root_dir%
-::echo *** WST_MAKE: INFO: WLAN Wizard test dir: %wlanwizard_test_dir%
-::echo *** WST_MAKE: INFO: WST log dir:             %wst_log_dir%
-::echo *** WST_MAKE: INFO: WST log file:            %log_file%
-
-:: (3)
-if [%3]==[] goto ERROR
-goto %3
-
-:: Error if label not found.
-goto ERROR
-
-::-----------------------------------------------------------------------------
-:CLEAN_OLD_FILES
-::-----------------------------------------------------------------------------
-
-echo *** WST_MAKE: CLEAN_OLD_FILES:
-echo *** WST_LOG: CLEAN_OLD_FILES >> %log_file%
-
-move %wst_log_dir%\%log_file_name% %wst_root_dir%
-del /F /S /Q %wst_log_dir%\*
-del /F /S /Q %wst_report_dir%\*
-rmdir /S /Q %wst_log_dir%\CMTHTML
-rmdir /S /Q %wst_log_dir%\CTCHTML
-move %wst_root_dir%\%log_file_name% %wst_log_dir% 
-del \epoc32\winscw\c\data\wlanwizard_qtext_log.txt
-
-goto THE_END
-
-::-----------------------------------------------------------------------------
-:COMPILE_TEST_CASES
-::-----------------------------------------------------------------------------
-
-echo *** WST_MAKE: COMPILE_TEST_CASES:
-echo *** WST_LOG: COMPILE_TEST_CASES >> %log_file%
-
-cd %wlanwizard_test_dir%
-call sbs reallyclean >> %log_file% 2>&1
-call make distclean >> %log_file% 2>&1
-call qmake "CONFIG += coverage_test debug" >> %log_file% 2>&1
-call sbs -c winscw_udeb  >> %log_file% 2>&1
-:: Call CTC instrumentation script. Source directories hard coded, because NO_EXCLUDE does not like % characters...
-call ctcwrap -C EXCLUDE=* -C NO_EXCLUDE+..\src\*.cpp -2comp -n %wst_log_dir%\MON.sym -i d -v sbs -c winscw_udeb >> %log_file% 2>&1
-
-goto THE_END
-
-::-----------------------------------------------------------------------------
-:RUN_TEST_CASES
-::-----------------------------------------------------------------------------
-
-echo *** WST_MAKE: RUN_TEST_CASES:
-echo *** WST_LOG: RUN_TEST_CASES >> %log_file%
-
-call \epoc32\release\winscw\udeb\t_wlanwizard.exe -o c:\data\wlanwizard_qtext_log.txt
-
-goto THE_END
-
-::-----------------------------------------------------------------------------
-:GENERATE_REPORTS
-::-----------------------------------------------------------------------------
-
-echo *** WST_MAKE: GENERATE_REPORTS:
-echo *** WST_LOG: GENERATE_REPORTS >> %log_file%
-
-cd %wst_log_dir%
-
-call ctcpost -p %wst_log_dir%\ctc_coverage.txt
-call ctc2html -nsb -i %wst_log_dir%\ctc_coverage.txt
-
-call dir /s /b %wlanwizard_root_dir%\src\*.cpp > %wst_log_dir%\raw_filelist.txt
-
-call findstr /I /V "moc_" %wst_log_dir%\raw_filelist.txt > %wst_log_dir%\filelist.txt
-call cmt -f %wst_log_dir%\filelist.txt -o cmt_metrics.txt  >> %log_file%
-call cmt2html -nsb -i cmt_metrics.txt
-
-:: Clean up temp files
-call del %wst_log_dir%\*filelist.txt
-
-echo *** WST_MAKE: COPY LOGS:
-call copy %TEMP%\epocwind.out %wst_log_dir%\epocwind.txt
-
-goto THE_END
-
-::-----------------------------------------------------------------------------
-:SHOW_RESULTS
-::-----------------------------------------------------------------------------
-
-echo *** WST_MAKE: SHOW_RESULTS:
-echo *** WST_LOG: SHOW_RESULTS >> %log_file%
-echo *** Module tests:
-call findstr /C:"Totals: " \epoc32\winscw\c\data\wlanwizard_qtext_log.txt
-echo *** Coverage:
-call findstr /C:"Number of " %wst_log_dir%\ctc_coverage.txt
-call findstr /C:"TER       " %wst_log_dir%\ctc_coverage.txt
-
-goto THE_END 
-
-::-----------------------------------------------------------------------------
-:START_BROWSER
-::-----------------------------------------------------------------------------
-
-echo *** WST_MAKE: START_BROWSER:
-echo *** WST_LOG: START_BROWSER >> %log_file%
-echo.
-echo Starting up browser to show the results
-
-start %wst_root_dir%\wst_report\coverage.html
-
-goto THE_END
-
-::-----------------------------------------------------------------------------
-:ERROR
-::-----------------------------------------------------------------------------
-
-echo *** WST_MAKE: ERROR:
-endlocal
-echo wst_make *** Error (unknown parameter) >> %log_file%
-
-goto THE_END
-
-::-----------------------------------------------------------------------------
-:THE_END
-::-----------------------------------------------------------------------------
-:: echo *** WST_MAKE: END:
--- a/wlanutilities/wlanwizard/traces/trace.properties	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/traces/trace.properties	Tue Jul 06 15:29:22 2010 +0300
@@ -17,6 +17,9 @@
         <value id="13">ConfUsePsk</value>
         <value id="14">ConfProcessSessings</value>
         <value id="15">ConfGenericErrorString</value>
+        <value id="16">ConfAvailableNetworkOptions</value>
+        <value id="17">ConfWpsSupported</value>
+        <value id="18">ConfGenericErrorPageStepsBackwards</value>
     </enum>
     <enum name="PageIds">
         <value id="0">PageNone</value>
@@ -37,6 +40,12 @@
         <value id="8198">EapPageNewPacStorePassword</value>
         <value id="8199">EapPagePromptPacStorePassword</value>
         <value id="8200">EapPageUsernamePassword</value>
+        <value id="12288">PageWpsWizardStep2</value>
+        <value id="12289">PageWpsWizardStep3_Button</value>
+        <value id="12290">PageWpsWizardStep3_Number</value>
+        <value id="12291">PageWpsWizardStep4</value>
+        <value id="12292">PageWpsWizardStep5</value>
+        <value id="12293">PageWpsWizardStep6</value>
     </enum>
     <enum name="KeyStatus">
         <value id="0">KeyStatusOk</value>
--- a/wlanutilities/wlanwizard/wlanwizard.pro	Wed Jun 23 19:25:42 2010 +0300
+++ b/wlanutilities/wlanwizard/wlanwizard.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-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"
@@ -11,9 +11,8 @@
 #
 # Contributors:
 # 	
-# 
 # Description: 
-#	WLAN Settings Wizard
+# WLAN Settings Wizard
 #
 
 TEMPLATE = lib
@@ -32,86 +31,70 @@
 
 TRANSLATIONS = wlanwizard.ts
 
-HEADERS   += \
-             inc/wlanwizard.h \
-             inc/wlanwizard_p.h \
-             inc/wlanwizardhelper.h \
-             inc/wlanwizardpage.h \
-             inc/wlanwizardpagegenericerror.h \             
-             inc/wlanwizardpageinternal.h \
-             inc/wlanwizardpagekeyquery.h \
-             inc/wlanwizardpageprocessingsettings.h \
-             inc/wlanwizardpagesummary.h \
-             inc/wlanwizardsummaryviewitem.h \
-             inc/wlanwizardutils.h
-             
-SOURCES   += src/wlanwizard.cpp \
-             src/wlanwizard_p.cpp \
-             src/wlanwizardpagegenericerror.cpp \
-             src/wlanwizardpageinternal.cpp \
-             src/wlanwizardpagekeyquery.cpp \
-             src/wlanwizardpageprocessingsettings.cpp \
-             src/wlanwizardpagesummary.cpp \
-             src/wlanwizardsummaryviewitem.cpp \
-             src/wlanwizardutils.cpp             
+HEADERS += \
+    inc/wlanwizard.h \
+    inc/wlanwizard_p.h \
+    inc/wlanwizardscanlist.h \
+    inc/wlanwizardhelper.h \
+    inc/wlanwizardpage.h \
+    inc/wlanwizardpagegenericerror.h \             
+    inc/wlanwizardpageinternal.h \
+    inc/wlanwizardpagekeyquery.h \
+    inc/wlanwizardpagenetworkmode.h \
+    inc/wlanwizardpageprocessingsettings.h \
+    inc/wlanwizardpagescanning.h \
+    inc/wlanwizardpagesecuritymode.h \
+    inc/wlanwizardpagessid.h \
+    inc/wlanwizardpagesummary.h \
+    inc/wlanwizardsummaryviewitem.h \
+    inc/wlanwizardutils.h
+
+SOURCES += \
+    src/wlanwizard.cpp \
+    src/wlanwizard_p.cpp \
+    src/wlanwizardscanlist.cpp \
+    src/wlanwizardpagegenericerror.cpp \
+    src/wlanwizardpageinternal.cpp \
+    src/wlanwizardpagekeyquery.cpp \
+    src/wlanwizardpagenetworkmode.cpp \
+    src/wlanwizardpageprocessingsettings.cpp \
+    src/wlanwizardpagescanning.cpp \
+    src/wlanwizardpagesecuritymode.cpp \
+    src/wlanwizardpagessid.cpp \
+    src/wlanwizardpagesummary.cpp \
+    src/wlanwizardsummaryviewitem.cpp \
+    src/wlanwizardutils.cpp             
  
-LIBS  += -lwlanqtutilities
- 
+LIBS += \ 
+    -lwlanqtutilities \
+    -leapwizard \
+    -lwpswizard
+
 symbian {
-	INCLUDEPATH += \
-		inc \
-		..\inc \
+    INCLUDEPATH += \
+        inc \
+        ..\inc
 
-	TARGET.UID3 = 0x2002C39A
-	TARGET.CAPABILITY = CAP_GENERAL_DLL
-	TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.UID3 = 0x2002C39A
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+    TARGET.EPOCALLOWDLLDATA = 1
 	
-	# Localition of directories for def files
+    # Localition of directories for def files
     defFilePath = .
 	
-	# OST trace system requires traces directory to be in USERINCLUDES
-  	MMP_RULES += "USERINCLUDE traces"
+    # OST trace system requires traces directory to be in USERINCLUDES
+    MMP_RULES += "USERINCLUDE traces"
   	
-  	BLD_INF_RULES.prj_exports += \ 
-  		"rom/wlanwizard.iby CORE_MW_LAYER_IBY_EXPORT_PATH(wlanwizard.iby)"
+    BLD_INF_RULES.prj_exports += \ 
+        "rom/wlanwizard.iby CORE_MW_LAYER_IBY_EXPORT_PATH(wlanwizard.iby)"
   		
     BLD_INF_RULES.prj_exports += \
         "rom/wlanwizard_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(wlanwizard_resources.iby)"
   	
   	# Export wlanwizard and wlanwizard plugin apis
-  	BLD_INF_RULES.prj_exports += \ 
-  		"inc/wlanwizard.h |../inc/wlanwizard.h" \
-        "inc/wlanwizardhelper.h |../inc/wlanwizardhelper.h" \
-        "inc/wlanwizardpage.h |../inc/wlanwizardpage.h" \
-        "inc/wlanwizardplugin.h |../inc/wlanwizardplugin.h"
-}
-
-# this enables "eap wizard"
-wlanwizard_rnd_eap|wlanwizard_rnd_all{
-	DEFINES += WLAN_WIZARD_RND_EAP
-	LIBS    += -leapwizard
-}
-
-# this enables "wps wizard"
-wlanwizard_rnd_wps|wlanwizard_rnd_all{
-	DEFINES += WLAN_WIZARD_RND_WPS
-	LIBS    += -lwpswizard
+     BLD_INF_RULES.prj_exports += \ 
+         "inc/wlanwizard.h |../inc/wlanwizard.h" \
+         "inc/wlanwizardhelper.h |../inc/wlanwizardhelper.h" \
+         "inc/wlanwizardpage.h |../inc/wlanwizardpage.h" \
+         "inc/wlanwizardplugin.h |../inc/wlanwizardplugin.h"
 }
-
-# this enables "add wlan manual" feature
-wlanwizard_rnd|wlanwizard_rnd_all|wlanwizard_rnd_eap|wlanwizard_rnd_wps{
-	DEFINES += WLAN_WIZARD_RND
-	HEADERS += \
-             inc/wlanwizardpagenetworkmode.h \
-             inc/wlanwizardpagescanning.h \
-             inc/wlanwizardpagesecuritymode.h \
-             inc/wlanwizardpagessid.h 
-             
-	SOURCES += \
-             src/wlanwizardpagenetworkmode.cpp \
-             src/wlanwizardpagescanning.cpp \
-             src/wlanwizardpagesecuritymode.cpp \
-             src/wlanwizardpagessid.cpp
-}
-
-
--- a/wlanutilities/wlanwizard/wlanwizard_rnd.pro	Wed Jun 23 19:25:42 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 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: 
-#	WLAN Settings Wizard
-#
-
-include(wlanwizard.pro)
-
-DEFINES += WLAN_WIZARD_RND
-
-HEADERS   += \
-             inc/wlanwizardpagenetworkmode.h \
-             inc/wlanwizardpagescanning.h \
-             inc/wlanwizardpagesecuritymode.h \
-             inc/wlanwizardpagessid.h 
-             
-SOURCES   += \
-             src/wlanwizardpagenetworkmode.cpp \
-             src/wlanwizardpagescanning.cpp \
-             src/wlanwizardpagesecuritymode.cpp \
-             src/wlanwizardpagessid.cpp
--- a/wlanutilities/wlanwizard/wlanwizard_rnd_all.pro	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#
-# 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: 
-#	WLAN Settings Wizard
-#
-
-include(wlanwizard_rnd.pro)
-
-DEFINES += WLAN_WIZARD_RND_WPS
-DEFINES += WLAN_WIZARD_RND_EAP
-
-LIBS  += -lwpswizard 
-LIBS  += -leapwizard
--- a/wlanutilities/wlanwizard/wlanwizard_rnd_eap.pro	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#
-# 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: 
-#	WLAN Settings Wizard
-#
-
-include(wlanwizard_rnd.pro)
-
-DEFINES += WLAN_WIZARD_RND_EAP
-
-LIBS  += -leapwizard
--- a/wlanutilities/wlanwizard/wlanwizard_rnd_wps.pro	Wed Jun 23 19:25:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#
-# 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: 
-#	WLAN Settings Wizard
-#
-
-include(wlanwizard_rnd.pro)
-
-DEFINES += WLAN_WIZARD_RND_WPS
-
-LIBS  += -lwpswizard
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/bwins/wpswizardu.def	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	?qt_metacall@WpsWizard@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1 NONAME ; int WpsWizard::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??_EWpsWizard@@UAE@I@Z @ 2 NONAME ; WpsWizard::~WpsWizard(unsigned int)
+	?metaObject@WpsWizard@@UBEPBUQMetaObject@@XZ @ 3 NONAME ; struct QMetaObject const * WpsWizard::metaObject(void) const
+	?qt_metacast@WpsWizard@@UAEPAXPBD@Z @ 4 NONAME ; void * WpsWizard::qt_metacast(char const *)
+	?trUtf8@WpsWizard@@SA?AVQString@@PBD0H@Z @ 5 NONAME ; class QString WpsWizard::trUtf8(char const *, char const *, int)
+	??1WpsWizard@@UAE@XZ @ 6 NONAME ; WpsWizard::~WpsWizard(void)
+	??0WpsWizard@@QAE@PAVWlanWizardHelper@@@Z @ 7 NONAME ; WpsWizard::WpsWizard(class WlanWizardHelper *)
+	?staticMetaObject@WpsWizard@@2UQMetaObject@@B @ 8 NONAME ; struct QMetaObject const WpsWizard::staticMetaObject
+	?tr@WpsWizard@@SA?AVQString@@PBD0@Z @ 9 NONAME ; class QString WpsWizard::tr(char const *, char const *)
+	?getStaticMetaObject@WpsWizard@@SAABUQMetaObject@@XZ @ 10 NONAME ; struct QMetaObject const & WpsWizard::getStaticMetaObject(void)
+	?tr@WpsWizard@@SA?AVQString@@PBD0H@Z @ 11 NONAME ; class QString WpsWizard::tr(char const *, char const *, int)
+	?trUtf8@WpsWizard@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString WpsWizard::trUtf8(char const *, char const *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/eabi/wpswizardu.def	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,14 @@
+EXPORTS
+	_ZN9WpsWizard11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+	_ZN9WpsWizard11qt_metacastEPKc @ 2 NONAME
+	_ZN9WpsWizard16staticMetaObjectE @ 3 NONAME DATA 16
+	_ZN9WpsWizard19getStaticMetaObjectEv @ 4 NONAME
+	_ZN9WpsWizardC1EP16WlanWizardHelper @ 5 NONAME
+	_ZN9WpsWizardC2EP16WlanWizardHelper @ 6 NONAME
+	_ZN9WpsWizardD0Ev @ 7 NONAME
+	_ZN9WpsWizardD1Ev @ 8 NONAME
+	_ZN9WpsWizardD2Ev @ 9 NONAME
+	_ZNK9WpsWizard10metaObjectEv @ 10 NONAME
+	_ZTI9WpsWizard @ 11 NONAME
+	_ZTV9WpsWizard @ 12 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/inc/cwpsactiverunner.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* 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: WPS Wizard: Wrapper for middleware calls 
+*
+*/
+
+#ifndef CWPSACTIVERUNNER_H_
+#define CWPSACTIVERUNNER_H_
+
+// System includes
+#include <e32base.h>
+#include <wlanmgmtclient.h>
+
+// User includes
+#include "mwpsactiverunnercallback.h"
+
+// Forward declarations
+// External data types
+// Constants
+
+/*!
+ * @addtogroup group_wps_wizard_plugin
+ * @{
+ */
+// Class declaration
+class CWpsActiveRunner : public CActive
+{
+public:
+    static CWpsActiveRunner* NewL(MWpsActiveRunnerCallback& aObserver);
+    virtual ~CWpsActiveRunner();
+public:
+
+    void RunL();
+    void DoCancel();
+    TInt RunError(TInt aError);
+    void StartSetup(RBuf8& aSsid, int aPin);
+	
+protected:
+
+private:
+    explicit CWpsActiveRunner(MWpsActiveRunnerCallback& aObserver);
+    void ConstructL();
+    void InitializeL();
+private:    
+
+    //! observer for notification of WPS setup completion
+    MWpsActiveRunnerCallback& iObserver;
+    //! To know if cancel was called before the completion
+    TBool isCancelTriggered;
+    //! WLAN management client object
+    CWlanMgmtClient* iWLANMgmtClient;
+    //! Array to hold the results of the WPS setup
+    CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>* iIapParametersArray;
+    
+    friend class TestWlanWizardContext;
+};
+
+#endif /* CWPSACTIVERUNNER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/inc/mwpsactiverunnercallback.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* 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: Interface class for the middleware callback
+*
+*/
+#ifndef MWPSACTIVERUNNERCALLBACK_H_
+#define MWPSACTIVERUNNERCALLBACK_H_
+
+// System includes
+#include <QList>
+#include <wlanmgmtcommon.h>
+
+// User includes
+// Forward declarations
+// External data types
+// Constants
+
+/*!
+ * @addtogroup group_wps_wizard_plugin
+ * @{
+ */
+
+// Class declaration
+class MWpsActiveRunnerCallback
+    {
+public:
+    /*!
+     * Callback to notify the completion of middleware API call
+     */
+    virtual void WpsActiveRunnerStopped(
+        QList<TWlanProtectedSetupCredentialAttribute>& aCredentials,
+        TInt aError) = 0;
+    };
+
+#endif /* MWPSACTIVERUNNERCALLBACK_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/inc/wpswizard.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,84 @@
+/*
+ * 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: 
+ *   WPS Wizard API
+ *
+ */
+
+#ifndef WPSWIZARD_H_
+#define WPSWIZARD_H_
+
+
+// System includes
+#include <QObject>
+
+// User includes
+#include "wlanwizardplugin.h"
+
+// Forward declarations
+class WlanWizardHelper;
+class WpsWizardPrivate;
+
+// External data types
+// Constants
+
+
+//Export Declaration
+#ifdef BUILD_WPS_WIZARD_DLL
+#define WPS_WIZARD_EXPORT Q_DECL_EXPORT
+#else
+#define WPS_WIZARD_EXPORT Q_DECL_IMPORT
+#endif
+
+/*!
+ * @addtogroup group_wps_wizard_plugin
+ * @{
+ */
+
+// Class declaration
+class WPS_WIZARD_EXPORT WpsWizard: public QObject, public WlanWizardPlugin
+{
+    Q_OBJECT
+   
+public:
+    
+   explicit WpsWizard( WlanWizardHelper *wizardHelper);
+    ~WpsWizard();
+
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+
+    Q_DISABLE_COPY(WpsWizard)
+
+private slots:
+
+private:   
+	
+    //data 
+    
+    //! pointer to the private implementation class.
+    QScopedPointer<WpsWizardPrivate> d_ptr;
+    
+    friend class WpsWizardPrivate;
+    friend class TestWlanWizardContext;
+};
+
+#endif /* WPSWIZARD_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/inc/wpswizard_p.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,125 @@
+/*
+ * 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: WPS wizard private implementation
+ *
+ */
+
+#ifndef WPSWIZARD_P_H_
+#define WPSWIZARD_P_H_
+
+// System includes
+#include <QObject>
+#include <wlanmgmtcommon.h>
+
+
+// User includes
+#include "wlanwizardhelper.h"
+#include "wpswizard.h"
+
+// Forward declarations
+class HbStackedWidget;
+class HbTranslator;
+class HbWidget;
+class HbLabel;
+class HbView;
+class HbAction;
+class HbDocumentLoader;
+class WlanWizardHelper;
+
+// External data types
+// Constants
+
+/*!
+ * @addtogroup group_wps_wizard_plugin
+ * @{
+ */
+
+// Class declaration
+class WpsWizardPrivate : public QObject
+    {
+    Q_OBJECT
+      
+public:
+    WpsWizardPrivate(WpsWizard* wizard, WlanWizardHelper *wizardHelper);
+    ~WpsWizardPrivate();
+public:
+
+    void enableNextButton(bool enable);
+
+    void nextPage();
+
+    QString getSsid();
+
+    void storeSettings(int index);
+    
+    HbMainWindow* mainWindow();
+
+    void storeSettingsArray(
+            QList<TWlanProtectedSetupCredentialAttribute>& credentials);
+    QList<TWlanProtectedSetupCredentialAttribute> getSettingsArray();
+
+    void setPin(int random);
+
+    int getPin();
+
+    int nextPageId(bool useWps);
+
+    void setConfiguration(WlanWizardHelper::ConfigurationId confId,
+            const QVariant &value);
+    
+    
+signals:
+
+public slots:
+
+protected:
+
+protected slots:
+
+private:
+
+    void createPages();
+    
+    int convertSecurityModes(TWlanIapSecurityMode securityMode);
+    
+    int convertNetworkModes(TWlanOperatingMode networkMode);
+    
+    int convertDefaultWepKey(TWlanDefaultWepKey defaultWepKey);
+
+    Q_DISABLE_COPY(WpsWizardPrivate)
+
+private slots:
+
+private:
+        
+    //data
+
+    //! Pointer to the WPS wizard
+    WpsWizard *q_ptr;
+    //! pointer to the wizard helper object
+    WlanWizardHelper *mWizardHelper;
+    //! Translation object
+    QScopedPointer<HbTranslator> mTranslator;
+    //! Object containing WLAN credentials
+    TWlanProtectedSetupCredentialAttribute mWpsAttr;
+    //! Array of objects containing WLAN credentials.
+    QList<TWlanProtectedSetupCredentialAttribute> mIapList;
+    //! Random number generated for Number entry mode
+    int mRandomNumber;
+    
+    friend class WpsWizard;
+    friend class TestWlanWizardContext;
+    };
+
+#endif /* WPSWIZARD_P_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/inc/wpswizardpage.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,104 @@
+/*
+* 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: API for wps wizard pages
+*
+*/
+
+#ifndef WPSWIZARDPAGE_H_
+#define WPSWIZARDPAGE_H_
+
+
+// System includes
+#include <QObject>
+
+// User includes
+#include "wlanwizardpage.h"
+
+// Forward declarations
+class WpsWizardPrivate;
+class HbWidget;
+
+
+// External data types
+// Constants
+
+/*!
+ * @addtogroup group_wps_wizard_plugin
+ * @{
+ */
+
+// Class declaration
+class WpsWizardPage : public QObject, public WlanWizardPage
+{
+    Q_OBJECT
+    
+public:
+    enum WpsPageIds {
+        PageWpsWizardStep2 = WlanWizardPage::PageWpsStart,
+        PageWpsWizardStep3_Button,
+        PageWpsWizardStep3_Number,
+        PageWpsWizardStep4,
+        PageWpsWizardStep5,
+        PageWpsWizardStep6
+    };
+    
+    enum WpsMode {
+        WpsPushButtonMode = 0,
+        WpsPinCodeMode,
+        WpsManualMode
+    };  
+    
+public:
+    explicit WpsWizardPage(WpsWizardPrivate* parent);
+    virtual ~WpsWizardPage();
+
+    /*!
+     * Creates a visualization of the page.
+     */
+    virtual HbWidget* initializePage() = 0;
+    /*!
+     * Returns id of next page. updates settings EapWizard.
+     */
+    virtual int nextId(bool &removeFromStack) const = 0;
+    /*!
+     * This method is called when "previous" button has been pressed.
+     */
+    virtual int previousTriggered() { return OneStepBackwards;};
+    /*!
+     * This method is called when Cancel button has been pressed.
+     */
+    virtual void cancelTriggered() {};
+    
+signals:
+
+public slots:
+
+protected:
+
+    //data
+    //! Pointer to private implementation
+    WpsWizardPrivate* mWizard;
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(WpsWizardPage)
+    
+private slots:
+    
+private:
+	
+};
+
+#endif /* WPSWIZARDPAGE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/inc/wpswizardstepfive.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,101 @@
+/*
+* 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: WPS wizard page step 5
+*
+*/
+
+#ifndef WPSWIZARDSTEPFIVE_H_
+#define WPSWIZARDSTEPFIVE_H_
+
+
+// System includes
+#include <QObject>
+#include <HbDocumentLoader>
+
+// User includes
+#include "wpswizardpage.h"
+
+// Forward declarations
+class HbRadioButtonList;
+class HbWidget;
+class HbLabel;
+class HbProgressBar;
+class WpsWizardPrivate;
+
+
+// External data types
+// Constants
+
+/*!
+ * @addtogroup group_wps_wizard_plugin
+ * @{
+ */
+
+// Class declaration
+class WpsPageStepFive : public WpsWizardPage
+    {
+Q_OBJECT
+
+public:
+    
+    explicit WpsPageStepFive(WpsWizardPrivate* parent);
+    ~WpsPageStepFive();
+
+public:
+
+    HbWidget* initializePage();
+
+    int nextId(bool &removeFromStack) const;
+
+    int previousTriggered();
+
+    void cancelTriggered();
+
+    bool showPage();
+	
+signals:
+
+public slots:
+
+    void itemSelected(int index);
+    
+    void loadDocmlSection(Qt::Orientation orientation);
+
+protected:
+
+protected slots:
+
+private:
+
+    Q_DISABLE_COPY(WpsPageStepFive)
+	
+private slots:
+
+private:    
+    
+    //data
+
+    //! Pointer to the HbWidget object
+    HbWidget *mWidget;
+    //! Radio button list object
+    HbRadioButtonList *mRadio;
+    //! Heading label object
+    HbLabel *mHeading;
+    //! variable used to determine if next button has to be enabled.
+    bool mValid;
+    //! Documentloader object
+    HbDocumentLoader *mLoader;
+    };
+
+#endif /* WPSWIZARDSTEPFIVE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/inc/wpswizardstepfour.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,114 @@
+/*
+* 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: WPS wizard page step 4
+*
+*/
+
+#ifndef WPSWIZARDSTEPFOUR_H_
+#define WPSWIZARDSTEPFOUR_H_
+
+
+// System includes
+#include <QObject>
+#include <HbDocumentLoader>
+
+// User includes
+#include "wpswizardpage.h"
+#include "mwpsactiverunnercallback.h"
+#include "cwpsactiverunner.h"
+
+// Forward declarations
+class HbWidget;
+class WpsWizardPrivate;
+class WpsPageStepFourPrivate;
+
+// External data types
+// Constants
+
+/*!
+ * @addtogroup group_wps_wizard_plugin
+ * @{
+ */
+
+// Class declaration
+class WpsPageStepFour : public WpsWizardPage
+    {
+Q_OBJECT
+
+public:
+
+    explicit WpsPageStepFour(WpsWizardPrivate* parent);
+    ~WpsPageStepFour();
+
+public:
+
+    HbWidget* initializePage();
+
+    int nextId(bool &removeFromStack) const;
+
+    int previousTriggered();
+
+    void cancelTriggered();
+
+    void startOperation();
+
+    bool requiresStartOperation();
+
+    void setCredentials(
+            QList<TWlanProtectedSetupCredentialAttribute>& credentials,
+            int credentialscount);
+
+    void handleError( int aErrorCode );
+
+    bool showPage();
+
+signals:
+
+public slots:
+
+    void loadDocmlSection(Qt::Orientation orientation);
+
+protected:
+
+protected slots:
+
+private:
+
+    void startWpsRunner();
+
+    Q_DISABLE_COPY(WpsPageStepFour)
+
+private slots:
+
+private:
+
+    //data
+
+    //! HbWidget object displayed on the page
+    HbWidget *mWidget;
+    //! Member variable to hold the result of of the WPS operation
+    int mWpsErrorCode;
+    //! Member variable containing the count of received settings.
+    int mCountCredentials;
+    //! variable to determine whether to enable the next button or not.
+    bool mValid;
+    //! Document loader object.
+    HbDocumentLoader *mLoader;
+    //! Pointer to Private Implementation
+    QScopedPointer<WpsPageStepFourPrivate> d_ptr;
+
+    friend class TestWlanWizardContext;
+    };
+
+#endif /* WPSWIZARDSTEPFOUR_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/inc/wpswizardstepfour_p.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,73 @@
+/*
+ * 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: WPS Wizard: Wrapper for middleware calls 
+ *
+ */
+
+#ifndef WPSWIZARDSTEPFOUR__P_H_
+#define WPSWIZARDSTEPFOUR__P_H_
+
+// System includes
+
+// User includes
+#include "wpswizardstepfour.h"
+
+// Forward declarations
+class MWpsActiveRunnerCallback;
+class CWpsActiveRunner;
+
+
+// External data types
+// Constants
+
+/*!
+ * @addtogroup group_wps_wizard_plugin
+ * @{
+ */
+
+// Class declaration
+class WpsPageStepFourPrivate : public MWpsActiveRunnerCallback
+    {
+public:
+    
+    explicit WpsPageStepFourPrivate(WpsPageStepFour* pageStepFour);
+       ~WpsPageStepFourPrivate();
+ 
+    /*!
+     * From mwpsactiverunnercallback.h
+     * This method is called from the active runner class to notify the end
+     * of operation
+     */
+    void WpsActiveRunnerStopped(
+            QList<TWlanProtectedSetupCredentialAttribute>& aCredentials,
+            TInt aError);
+    
+    void StartSetup(QString ssid,int pin);
+    
+    void Cancel();
+       
+
+protected:
+
+private: // data
+
+    //! C-Class implementation of the WPS setup functionality.
+    QScopedPointer<CWpsActiveRunner> mWpsActiveRunner;
+    //! Pointer to the WpsPageStepFour object
+    WpsPageStepFour* q_ptr;
+    
+    friend class TestWlanWizardContext;
+    };
+
+#endif /* WPSWIZARDSTEPFOUR__P_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/inc/wpswizardstepthreebutton.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* 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: Step 3 Button press mode
+*
+*/
+
+#ifndef WPSWIZARDSTEPTHREEBUTTON_H_
+#define WPSWIZARDSTEPTHREEBUTTON_H_
+
+// System includes
+#include <QObject>
+#include <HbDocumentLoader>
+
+// User includes
+#include "wpswizardpage.h"
+
+// Forward declarations
+class HbRadioButtonList;
+class HbWidget;
+class HbLabel;
+class WpsWizardPrivate;
+
+// External data types
+
+// Constants
+
+/*!
+ * @addtogroup group_wps_wizard_plugin
+ * @{
+ */
+
+// Class declaration
+class WpsPageStepThreeButton : public WpsWizardPage
+    {
+Q_OBJECT
+
+public:
+    explicit WpsPageStepThreeButton(WpsWizardPrivate* parent);
+    ~WpsPageStepThreeButton();
+
+public:
+
+    HbWidget* initializePage();
+
+    int nextId(bool &removeFromStack) const;
+
+    int previousTriggered();
+    
+signals:
+
+public slots:
+
+    void loadDocmlSection(Qt::Orientation orientation);
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(WpsPageStepThreeButton)
+
+private slots:
+
+private: //data    
+    //! Pointer to the widget object
+    HbWidget *mWidget;
+    //! Pointer to the label displaying the heading
+    HbLabel *mHeading;
+    //! Document loader object.
+    HbDocumentLoader *mLoader;
+    };
+
+#endif /* WPSWIZARDSTEPTHREEBUTTON_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/inc/wpswizardstepthreenumber.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,90 @@
+/*
+ * 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: Step 3 Number mode
+ *
+ */
+
+#ifndef WPSWIZARDSTEPTHREENUMBER_H_
+#define WPSWIZARDSTEPTHREENUMBER_H_
+
+// System includes
+#include <QObject>
+#include <HbDocumentLoader>
+
+// User includes
+#include "wpswizardpage.h"
+
+// Forward declarations
+class HbRadioButtonList;
+class HbWidget;
+class HbLabel;
+class WpsWizardPrivate;
+
+// External data types
+// Constants
+
+/*!
+ * @addtogroup group_wps_wizard_plugin
+ * @{
+ */
+
+// Class declaration
+class WpsPageStepThreeNumber : public WpsWizardPage
+{
+Q_OBJECT
+
+public:
+    explicit WpsPageStepThreeNumber(WpsWizardPrivate* parent);
+    ~WpsPageStepThreeNumber();
+
+public:
+    HbWidget* initializePage();
+
+    int nextId(bool &removeFromStack) const;
+
+    int previousTriggered();
+
+    void cancelTriggered();
+
+    bool showPage();
+
+private:
+    int computeRandNumber();
+
+    int computeCheckSum(int aPin);
+
+signals:
+
+public slots:
+    void loadDocmlSection(Qt::Orientation orientation);
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(WpsPageStepThreeNumber)
+
+private slots:
+
+private: //data
+    //! Pointer to the widget object.
+    HbWidget *mWidget;
+    //! Label object used for displaying the heading.
+    HbLabel *mHeading;
+    //! Document loader object
+    HbDocumentLoader *mLoader;
+};
+
+#endif /* WPSWIZARDSTEPTHREENUMBER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/inc/wpswizardsteptwo.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,93 @@
+/*
+* 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: WPS wizard page 2
+*
+*/
+#ifndef WPSWIZARDSTEPTWO_H_
+#define WPSWIZARDSTEPTWO_H_
+
+// System includes
+#include <QObject>
+#include <HbDocumentLoader>
+
+// User includes
+#include "wpswizardpage.h"
+
+// Forward declarations
+class HbRadioButtonList;
+class HbWidget;
+class HbLabel;
+class WpsWizardPrivate;
+
+// External data types
+// Constants
+
+/*!
+ * @addtogroup group_wps_wizard_plugin
+ * @{
+ */
+
+// Class declaration
+class WpsPageStepTwo : public WpsWizardPage
+    {
+Q_OBJECT
+
+public:
+    explicit WpsPageStepTwo(WpsWizardPrivate* parent);
+    ~WpsPageStepTwo();
+
+public:
+    HbWidget* initializePage();
+
+    int nextId(bool &removeFromStack) const;
+
+    int previousTriggered();
+
+    void cancelTriggered();
+
+    bool showPage();
+	
+signals:
+
+public slots:
+    void itemSelected(int index);
+    
+    void loadDocmlSection(Qt::Orientation orientation);
+
+protected:
+
+protected slots:
+
+private:
+    Q_DISABLE_COPY(WpsPageStepTwo)
+
+private slots:   
+
+private: //data
+    //! Pointer to the widget object
+    HbWidget *mWidget;
+    //! Radio button list object
+    HbRadioButtonList *mRadio;
+    //! Label object used to display the heading
+    HbLabel *mHeading;
+    //! Variable used to determine whether to enable next button or not
+    bool mValid;
+    //! Variable used to store the item selected.
+    int mItemSelected;
+    //! Document loader object.
+    HbDocumentLoader* mLoader;
+    };
+
+
+#endif /* WPSWIZARDSTEPTWO_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/resources/occ_wps_01_05.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+	<widget name="occ_wps_P1" type="HbWidget">
+		<widget name="radioButtonList" type="HbRadioButtonList"/>
+        <widget name="label" type="HbLabel">
+			<enums name="textWrapping" value="TextWordWrap"/>
+			<enums name="alignment" value="AlignTop"/>
+            <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>			
+		</widget>
+		<sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+		<layout type="anchor"/>
+	</widget>
+	<section name="portrait">
+		<widget name="occ_wps_P1" type="HbWidget">
+			<widget name="label" type="HbLabel">
+				<sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+            </widget>
+			<layout type="anchor">
+                <anchoritem dst="radioButtonList" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="radioButtonList" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="label" srcEdge="BOTTOM"/>
+                <anchoritem dst="radioButtonList" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="radioButtonList" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="label" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="label" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="label" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+            </layout>
+		</widget>
+	</section>
+	<section name="landscape">
+		<widget name="occ_wps_P1" type="HbWidget">
+			 <widget name="label" type="HbLabel">
+                <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>                
+                <sizehint type="FIXED" width="expr((var(hb-param-screen-width) - var(hb-param-margin-gene-middle-horizontal))  / 2  - var(hb-param-margin-gene-screen) - var(hb-param-margin-gene-popup))"/>
+            </widget>
+			<layout type="anchor">
+                <anchoritem dst="label" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="label" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="radioButtonList" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="label" srcEdge="RIGHT"/>
+                <anchoritem dst="radioButtonList" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="radioButtonList" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="radioButtonList" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+            </layout>
+		</widget>
+	</section>	
+	<metadata activeUIState="portrait" display="NHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <uistate name="landscape" sections="#common landscape"/>
+        <uistate name="portrait" sections="#common portrait"/>
+    </metadata>
+</hbdocument>
+				
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/resources/occ_wps_02_03.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <widget name="occ_wps_P2" type="HbWidget">
+        <widget name="label_heading" type="HbLabel">
+            <enums name="textWrapping" value="TextWordWrap"/>
+			<enums name="alignment" value="AlignTop"/>
+        </widget>
+        <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+        <layout orientation="Vertical" type="linear">
+            <contentsmargins bottom="0un" left="var(hb-param-margin-gene-popup)" right="var(hb-param-margin-gene-popup)" top="var(hb-param-margin-gene-popup)"/>
+            <linearitem itemname="label_heading"/>
+        </layout>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/resources/occ_wps_P4.docml	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+	<widget name="occ_wps_P4" type="HbWidget">
+		<widget name="label_heading" type="HbLabel">
+            <string locid="txt_occ_dialog_negotiating" name="plainText" value="Negotiating...."/>
+			<enums name="alignment" value="AlignTop"/>
+            <enums name="textWrapping" value="TextWordWrap"/>
+            <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>            			
+        </widget>
+		<widget name="horizontalProgressBar" type="HbProgressBar">
+            <integer name="progressValue" value="0"/>
+            <integer name="minimum" value="0"/>
+            <enums name="orientation" value="Horizontal"/>
+            <integer name="maximum" value="0"/>
+        </widget>
+		<sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+        <layout type="anchor"/>
+	</widget>
+	<section name="portrait">
+		<widget name="occ_wps_P4" type="HbWidget">
+			<widget name="label_heading" type="HbLabel">
+                <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+            </widget>
+			<layout type="anchor">
+                <anchoritem dst="horizontalProgressBar" dstEdge="LEFT" spacing="0un" src="label_heading" srcEdge="LEFT"/>
+                <anchoritem dst="horizontalProgressBar" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="label_heading" srcEdge="BOTTOM"/>
+                <anchoritem dst="horizontalProgressBar" dstEdge="RIGHT" spacing="0un" src="label_heading" srcEdge="RIGHT"/>
+                <anchoritem dst="label_heading" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="label_heading" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="label_heading" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+            </layout>
+		</widget>
+	</section>
+	<section name="landscape">
+		<widget name="occ_wps_P4" type="HbWidget">
+			<widget name="label_heading" type="HbLabel">
+                <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                <sizehint type="FIXED" width="expr((var(hb-param-screen-width) - var(hb-param-margin-gene-middle-horizontal))  / 2  - var(hb-param-margin-gene-screen) - var(hb-param-margin-gene-popup))"/>
+            </widget>
+			<layout type="anchor">
+                <anchoritem dst="label_heading" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="label_heading" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="horizontalProgressBar" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="label_heading" srcEdge="RIGHT"/>
+                <anchoritem dst="horizontalProgressBar" dstEdge="TOP" spacing="0un" src="label_heading" srcEdge="TOP"/>
+                <anchoritem dst="horizontalProgressBar" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+            </layout>
+		</widget>
+	</section>
+  <metadata activeUIState="portrait" display="NHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <uistate name="landscape" sections="#common landscape"/>
+        <uistate name="portrait" sections="#common portrait"/>
+    </metadata>
+</hbdocument>
+			
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/resources/wpswizard_resource.qrc	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<RCC>
+    <qresource prefix="/docml">
+        <file>occ_wps_01_05.docml</file>
+        <file>occ_wps_02_03.docml</file>
+        <file>occ_wps_P4.docml</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/rom/wpswizard.iby	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* 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:IBY file for WPS Wizard
+*
+*/
+
+#ifndef WPSWIZARD_IBY
+#define WPSWIZARD_IBY
+
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
+file=ABI_DIR/BUILD_DIR/wpswizard.dll SHARED_LIB_DIR/wpswizard.dll
+
+#endif // __PROTOCOL_WLAN
+
+#endif // WPSWIZARD_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/rom/wpswizard_resources.iby	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* 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:
+* WPS Wizard resource iby.
+*/
+
+#ifndef WPSWIZARD_RESOURCES_IBY
+#define WPSWIZARD_RESOURCES_IBY
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh> 
+
+#ifdef __PROTOCOL_WLAN
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/wpswizardplugin.qm QT_TRANSLATIONS_DIR/wpswizardplugin.qm 
+
+#endif // __PROTOCOL_WLAN
+
+#endif // WPSWIZARD_RESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/src/cwpsactiverunner.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,223 @@
+/*
+ * 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: Implementation of middleware wrapper class
+ *
+ *
+ */
+// System includes
+#include <wlanmgmtcommon.h>
+#include <e32math.h>
+
+// User includes
+#include "cwpsactiverunner.h"
+
+// External function prototypes
+
+//Constants
+static const TInt KArrayGranularity = 4;
+static const TInt KDefaultPinLength = 10;
+
+// Trace includes
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cwpsactiverunnerTraces.h"
+#endif
+
+/*!
+ \class CWpsActiveRunner
+ \brief CWpsActiveRunner is a wrapper class wlan Mgmt engine interface.
+ The wrapper class for wlan management engine calls
+ */
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+ * Creates the instance of active runner which encapsulates the wlan mgmt
+ * interface middleware calls
+ *
+ *
+ * \param MWpsActiveRunnerCallback[in] call back interface to notify the
+ *      completion of the middleware calls
+ */
+CWpsActiveRunner* CWpsActiveRunner::NewL(MWpsActiveRunnerCallback& aObserver)
+{
+    OstTraceFunctionEntry0( CWPSACTIVERUNNER_NEWL_ENTRY );
+    CWpsActiveRunner* self = new (ELeave) CWpsActiveRunner(aObserver);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    OstTraceFunctionExit0( CWPSACTIVERUNNER_NEWL_EXIT );
+    return self;
+}
+
+/*!
+ * Creates the instance of active runner which encapsulates the wlan mgmt
+ * interface middleware calls
+ *
+ *
+ * \param MWpsActiveRunnerCallback[in] call back interface to notify the
+ *      completion of the middleware calls
+ */
+CWpsActiveRunner::CWpsActiveRunner(MWpsActiveRunnerCallback& aObserver) :
+    CActive(EPriorityStandard),
+    iObserver(aObserver),
+    isCancelTriggered(false),
+    iWLANMgmtClient(NULL),
+    iIapParametersArray(NULL)
+{
+    OstTraceFunctionEntry1( CWPSACTIVERUNNER_CWPSACTIVERUNNER_ENTRY, this );
+    OstTraceFunctionExit1( CWPSACTIVERUNNER_CWPSACTIVERUNNER_EXIT, this );
+}
+
+/*!
+ * ConstructL, Two phased constructor.
+ *
+ */
+void CWpsActiveRunner::ConstructL()
+{
+    OstTraceFunctionEntry1( CWPSACTIVERUNNER_CONSTRUCTL_ENTRY, this );
+
+    CActiveScheduler::Add(this);
+    InitializeL();
+    OstTraceFunctionExit1( CWPSACTIVERUNNER_CONSTRUCTL_EXIT, this );
+}
+
+/*!
+ * Initializes the member variables for making the middleware calls
+ *
+ */
+
+void CWpsActiveRunner::InitializeL()
+{
+    OstTraceFunctionEntry1( CWPSACTIVERUNNER_INITIALIZEL_ENTRY, this );
+    iWLANMgmtClient = CWlanMgmtClient::NewL();
+    iIapParametersArray = new (ELeave) CArrayFixSeg<
+        TWlanProtectedSetupCredentialAttribute> (KArrayGranularity);
+    
+    OstTraceFunctionExit1( CWPSACTIVERUNNER_INITIALIZEL_EXIT, this );
+}
+
+/*!
+ * Destructor
+ *
+ */
+CWpsActiveRunner::~CWpsActiveRunner()
+{
+    OstTraceFunctionEntry0( DUP1_CWPSACTIVERUNNER_CWPSACTIVERUNNER_ENTRY );
+    Cancel();
+    delete iWLANMgmtClient;
+    delete iIapParametersArray;
+    OstTraceFunctionExit0( DUP1_CWPSACTIVERUNNER_CWPSACTIVERUNNER_EXIT );
+}
+
+/*!
+ * Initiates the call to the middleware
+ *
+ * \param aSsid[in] The network ssid to which we have to connect
+ * \param aPin[in] The pin to be used for WPS negotiating
+ */
+void CWpsActiveRunner::StartSetup(RBuf8& aSsid, int aPin)
+{
+    OstTraceFunctionEntry1( CWPSACTIVERUNNER_STARTSETUP_ENTRY, this );
+    TWlanSsid ssid;
+    TWlanWpsPin pin;
+
+    isCancelTriggered = false;
+    ssid.Copy(aSsid);
+    TBuf8<KDefaultPinLength> pinCode;
+
+    if (aPin == 0) {
+        pinCode.AppendFill('0', 8);
+    }
+    else {
+        pinCode.AppendNum(aPin);
+    }
+
+    pin.Copy(pinCode);
+
+    iWLANMgmtClient->RunProtectedSetup(iStatus, ssid, pin, *iIapParametersArray);
+
+    SetActive();
+
+    OstTraceFunctionExit1( CWPSACTIVERUNNER_STARTSETUP_EXIT, this );
+}
+
+/*!
+ * RunL implementation
+ */
+void CWpsActiveRunner::RunL()
+{
+    OstTraceFunctionEntry1( CWPSACTIVERUNNER_RUNL_ENTRY, this );
+
+    TInt completionCode = iStatus.Int();
+    QList<TWlanProtectedSetupCredentialAttribute> credentials;
+
+    if(!isCancelTriggered) {
+
+        if (completionCode < KErrNone) {
+            //Raise Error
+        QT_TRYCATCH_LEAVING(iObserver.WpsActiveRunnerStopped(credentials, completionCode));
+        }
+        else {
+            TInt len = iIapParametersArray->Length();
+            TInt count;
+            for(count=0;count<iIapParametersArray->Count();count++)
+                {
+                TWlanProtectedSetupCredentialAttribute attr =(*iIapParametersArray)[count];
+                credentials.append(attr);
+                }
+            QT_TRYCATCH_LEAVING(iObserver.WpsActiveRunnerStopped(credentials,completionCode));
+
+        }
+    }
+
+    OstTraceFunctionExit1( CWPSACTIVERUNNER_RUNL_EXIT, this );
+}
+
+/*!
+ * Cancels the ongoing call
+ */
+void CWpsActiveRunner::DoCancel()
+{
+    OstTraceFunctionEntry1( CWPSACTIVERUNNER_DOCANCEL_ENTRY, this );
+    isCancelTriggered = true;
+    if(iWLANMgmtClient)
+        {
+        iWLANMgmtClient->CancelProtectedSetup();
+        }
+    OstTraceFunctionExit1( CWPSACTIVERUNNER_DOCANCEL_EXIT, this );
+}
+
+/*!
+ * Handles the error usecase
+ */
+TInt CWpsActiveRunner::RunError(TInt aError)
+{
+    OstTraceFunctionEntry1( CWPSACTIVERUNNER_RUNERROR_ENTRY, this );
+
+    OstTrace1( TRACE_ERROR, CWPSACTIVERUNNER_RUNERROR, "CWpsActiveRunner::RunError;aError=%d", aError );
+
+    QList<TWlanProtectedSetupCredentialAttribute> credentials;
+    if(iWLANMgmtClient)
+        {
+        iWLANMgmtClient->CancelProtectedSetup();
+        }
+
+    QT_TRYCATCH_LEAVING(iObserver.WpsActiveRunnerStopped(credentials, aError));
+
+    return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/src/wpswizard.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,82 @@
+/*
+ * 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 the "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: 
+ *   WPS Wizard: API implementation.
+ *
+ */
+
+// System includes
+#include <QApplication>
+
+// User includes
+// WLAN Wizard
+#include "wlanwizardhelper.h"
+
+// WPS Wizard 
+#include "wpswizard.h"
+#include "wpswizard_p.h"
+
+// Wizard Pages
+#include "wpswizardsteptwo.h"
+#include "wpswizardstepthreebutton.h"
+#include "wpswizardstepthreenumber.h"
+#include "wpswizardstepfour.h"
+#include "wpswizardstepfive.h"
+
+// Trace includes
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wpswizardTraces.h"
+#endif
+
+//Forward Declarations
+class WlanWizardHelper;
+
+// External function prototypes
+
+//Local Constants
+
+/*!
+    \class WpsWizard
+    \brief Provides the WPS wizard implementation 
+ */
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+   Creates the WpsWizard object
+   
+   @param [in] wizardHelper WlanWizardHelper* Helper class to from the framework
+ */
+
+WpsWizard::WpsWizard(WlanWizardHelper *wizardHelper) :
+    d_ptr(NULL)
+{
+    OstTraceFunctionEntry1(WPSWIZARD_WPSWIZARD_ENTRY, this); 
+    d_ptr.reset(new WpsWizardPrivate(this, wizardHelper));
+    OstTraceFunctionExit1(WPSWIZARD_WPSWIZARD_EXIT, this);
+}
+
+/*!
+   Destructor
+   
+ */
+WpsWizard::~WpsWizard()
+{
+    OstTraceFunctionEntry1(WPSWIZARD_WPSWIZARD_DESTRUCTOR_ENTRY, this);
+    OstTraceFunctionExit1(WPSWIZARD_WPSWIZARD_DESTRUCTOR_EXIT, this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/src/wpswizard_p.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,391 @@
+/*
+ * 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 the "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: 
+ *   WPS Wizard: Private implementation.
+ *
+ */
+
+// System includes
+#include <HbTranslator>
+#include <HbDocumentLoader>
+#include <QGraphicsWidget>
+#include <HbMainWindow>
+#include <HbView>
+#include <HbStackedWidget>
+#include <HbLabel>
+#include <HbAction>
+#include <QApplication>
+#include <cmmanagerdefines_shim.h>
+
+// Trace includes
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wpswizard_pTraces.h"
+#endif
+
+// User includes
+#include "wlanwizardhelper.h"
+// WPS Wizard 
+#include "wpswizard.h"
+#include "wpswizard_p.h"
+// Wizard Pages
+#include "wpswizardsteptwo.h"
+#include "wpswizardstepthreebutton.h"
+#include "wpswizardstepthreenumber.h"
+#include "wpswizardstepfour.h"
+#include "wpswizardstepfive.h"
+
+//Forward Decalrations
+
+// External function prototypes
+
+// Local constants
+
+
+/*!
+ \class WpsWizardPrivate
+ \brief This class providesthe private class implementation for WPS wizard 
+ */
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+   Constructor for the private implementation of wps wizard
+   
+   @param [in] wizard WpsWizard* pointer to the framework object
+   @param [in] wizardHelper WlanWizardHelper * pointer to the wizard helpper class 
+   
+   @return WpsWizardPrivate 
+ */
+WpsWizardPrivate::WpsWizardPrivate(WpsWizard* wizard,
+    WlanWizardHelper *wizardHelper) :
+    q_ptr(wizard), 
+    mWizardHelper(wizardHelper),
+    mTranslator(new HbTranslator("wpswizardplugin")), 
+    mRandomNumber(0)
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_WPSWIZARDPRIVATE_ENTRY, this);
+    createPages();
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_WPSWIZARDPRIVATE_EXIT, this);
+}
+
+/*!
+   Destructor
+ */
+WpsWizardPrivate::~WpsWizardPrivate()
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_WPSWIZARDPRIVATE_DESTRUCTOR_ENTRY, this);
+    // have to delete the memory that was allocated in this object
+    mIapList.clear();
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_WPSWIZARDPRIVATE_DESTRUCTOR_EXIT, this);
+}
+
+/*!
+   Provides the caller with the functionality to enable/disable the 'Next' button
+   
+   @param [in] enable bool to indicate whether to enable or disable the 'next button'
+ */
+void WpsWizardPrivate::enableNextButton(bool enable)
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_ENABLENEXTBUTTON_ENTRY, this);
+    mWizardHelper->enableNextButton(enable);
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_ENABLENEXTBUTTON_EXIT, this);
+}
+
+/*!
+   Provides the functionality to automatically move to the next page.
+ */
+void WpsWizardPrivate::nextPage()
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_NEXTPAGE_ENTRY, this);
+    mWizardHelper->nextPage();
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_NEXTPAGE_EXIT, this);
+}
+
+/*!
+   Provides access to the main window
+   
+   @return HbMainWindow* An instance of HbMainWindow.
+ */
+HbMainWindow* WpsWizardPrivate::mainWindow()
+{
+    return mWizardHelper->mainWindow();
+}
+
+/*!
+   Provides the functionality to store the received settings
+   
+   @param [in] index int indicates the index in the array of received 
+            settings to be stored
+ */
+void WpsWizardPrivate::storeSettings(int index)
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_STORESETTINGS_ENTRY, this);
+    
+    if (mIapList.count() > index)
+        {
+        mWpsAttr = mIapList[index];
+    
+        // SSID
+        QString ssid = QString::fromUtf8(reinterpret_cast<const char*> (mWpsAttr.iSsid.Ptr()),
+                mWpsAttr.iSsid.Length());    
+        mWizardHelper->setConfiguration(WlanWizardHelper::ConfSsid, ssid);
+        // WEP Key1
+        QString str = QString::fromUtf8(reinterpret_cast<const char*>(mWpsAttr.iWepKey1.Ptr()),
+                mWpsAttr.iWepKey1.Length());
+        mWizardHelper->setConfiguration(WlanWizardHelper::ConfKeyWep1, str);
+        // WEP Key2
+        str = QString::fromUtf8(reinterpret_cast<const char*> (mWpsAttr.iWepKey2.Ptr()),
+                mWpsAttr.iWepKey2.Length());
+        mWizardHelper->setConfiguration(WlanWizardHelper::ConfKeyWep2, str);
+        // WEP Key3
+        str = QString::fromUtf8(reinterpret_cast<const char*> (mWpsAttr.iWepKey3.Ptr()),
+                mWpsAttr.iWepKey3.Length());
+        mWizardHelper->setConfiguration(WlanWizardHelper::ConfKeyWep3, str);
+        // WEP Key4
+        str = QString::fromUtf8(reinterpret_cast<const char*> (mWpsAttr.iWepKey4.Ptr()),
+                mWpsAttr.iWepKey4.Length());
+        mWizardHelper->setConfiguration(WlanWizardHelper::ConfKeyWep4, str);
+        //Default WEP key in use
+        mWizardHelper->setConfiguration(WlanWizardHelper::ConfKeyWepDefault,
+                convertDefaultWepKey(mWpsAttr.iWepDefaultKey));
+        //Key WPA
+        str = QString::fromUtf8(reinterpret_cast<const char*> (mWpsAttr.iWpaPreSharedKey.Ptr()),
+                mWpsAttr.iWpaPreSharedKey.Length());
+        mWizardHelper->setConfiguration(WlanWizardHelper::ConfKeyWpa, str);
+        // security mode
+        mWizardHelper->setConfiguration(WlanWizardHelper::ConfSecurityMode,
+                convertSecurityModes(mWpsAttr.iSecurityMode));
+        // Network Mode
+        mWizardHelper->setConfiguration(WlanWizardHelper::ConfNetworkMode,
+                convertNetworkModes(mWpsAttr.iOperatingMode));
+        
+        mWizardHelper->setConfiguration(WlanWizardHelper::ConfUsePsk, true);
+        }
+
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_STORESETTINGS_EXIT, this);
+}
+
+/*!
+   Provides the functionality to retrieve the ssid of the network to connect
+   
+   @return returns the SSID as a QString
+ */
+QString WpsWizardPrivate::getSsid()
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_GETSSID_ENTRY, this);
+    QString ssid;
+    ssid = mWizardHelper->configuration(WlanWizardHelper::ConfSsid).toString();
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_GETSSID_EXIT, this);
+    return ssid;
+}
+
+/*!
+   Provides functionality for the caller to store the array of 
+   recieved settings from AP
+   
+   @param [in] credentials QList<TWlanProtectedSetupCredentialAttribute>& 
+        received settings from wps enabled AP
+ */
+void WpsWizardPrivate::storeSettingsArray(QList<
+        TWlanProtectedSetupCredentialAttribute>& credentials)
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_STORESETTINGSARRAY_ENTRY, this);
+    mIapList = credentials;
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_STORESETTINGSARRAY_EXIT, this);
+}
+
+/*!
+   Returns the array of settings received from the AP
+   
+   @return Array containing the settings
+ */
+QList<TWlanProtectedSetupCredentialAttribute> WpsWizardPrivate::getSettingsArray()
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_GETSETTINGSARRAY_ENTRY, this);
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_GETSETTINGSARRAY_EXIT, this);
+    return mIapList;
+}
+
+/*!
+   Creates the required pages for WPS setup
+ */
+void WpsWizardPrivate::createPages()
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_CREATEPAGES_ENTRY, this);
+    
+    mWizardHelper->addPage(WpsWizardPage::PageWpsWizardStep2,
+            new WpsPageStepTwo(this));
+
+    mWizardHelper->addPage(WpsWizardPage::PageWpsWizardStep3_Button,
+            new WpsPageStepThreeButton(this));
+    
+    mWizardHelper->addPage(WpsWizardPage::PageWpsWizardStep3_Number,
+            new WpsPageStepThreeNumber(this));
+    
+    mWizardHelper->addPage(WpsWizardPage::PageWpsWizardStep4,
+            new WpsPageStepFour(this));
+    
+    mWizardHelper->addPage(WpsWizardPage::PageWpsWizardStep5,
+            new WpsPageStepFive(this));
+    
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_CREATEPAGES_EXIT, this);
+}
+
+/*!
+   Converts enums between wlan security mode to cm manager enums.
+   
+   @param [in] securityMode Security operating mode from wlanmgmt api
+   
+   @return int converted CMManagerShim::WlanSecMode codes
+ */
+int WpsWizardPrivate::convertSecurityModes(TWlanIapSecurityMode securityMode)
+{
+    CMManagerShim::WlanSecMode cmManagerSecurityMode;
+    switch(securityMode) {
+    case EWlanIapSecurityModeWep:
+        cmManagerSecurityMode = CMManagerShim::WlanSecModeWep;
+        break;
+        
+    case EWlanIapSecurityModeWpa:
+        cmManagerSecurityMode = CMManagerShim::WlanSecModeWpa;
+        break;
+        
+    case EWlanIapSecurityModeWpa2Only:
+        cmManagerSecurityMode = CMManagerShim::WlanSecModeWpa2;
+        break;
+        
+    default:
+        // invalid securityMode.
+        // Not possible to get EWlanIapSecurityMode802d1x here. Since not 
+        // supported with wps
+        Q_ASSERT(EWlanIapSecurityModeAllowUnsecure == securityMode);
+        cmManagerSecurityMode = CMManagerShim::WlanSecModeOpen;
+        break;
+    }
+    
+    return cmManagerSecurityMode;
+}
+
+/*!
+   Converts enums between wlan wep key index to cm manager enums.
+   
+   @param [in] defaultWepKey Default wep key used in wlanmgmt api
+   
+   @return int converted CMManagerShim::WlanWepKeyIndex codes
+ */
+int WpsWizardPrivate::convertDefaultWepKey(TWlanDefaultWepKey defaultWepKey)
+{
+    int cmManagerWepKeyIndex;
+    
+    switch (defaultWepKey) {
+    case EWlanDefaultWepKey2:
+        cmManagerWepKeyIndex = CMManagerShim::WepKeyIndex2;
+        break;
+        
+    case EWlanDefaultWepKey3:
+        cmManagerWepKeyIndex = CMManagerShim::WepKeyIndex3;
+        break;
+        
+    case EWlanDefaultWepKey4:
+        cmManagerWepKeyIndex = CMManagerShim::WepKeyIndex4;
+        break;
+        
+    case EWlanDefaultWepKey1:
+    default:
+        // It is possible that the value of defaultWepKey is not initialized
+        // when security mode is Open. That's why we cannot assert here.
+        cmManagerWepKeyIndex = CMManagerShim::WepKeyIndex1;
+        break;
+    }
+    return cmManagerWepKeyIndex;
+}
+
+/*!
+   Converts enums between wlan network mode to cm manager enums.
+   
+   @param [in] networkMode Networking operating mode from wlanmgmt api
+   
+   @return int converted CMManagerShim::WlanConnMode codes
+ */
+int WpsWizardPrivate::convertNetworkModes(TWlanOperatingMode networkMode)
+{
+    CMManagerShim::WlanConnMode wlanConnMode;
+    switch (networkMode) {
+    case EWlanOperatingModeAdhoc:
+        wlanConnMode = CMManagerShim::Adhoc;
+        break;
+        
+    default: 
+        Q_ASSERT(EWlanOperatingModeInfrastructure == networkMode);
+        wlanConnMode = CMManagerShim::Infra;
+        break;
+    }
+    return wlanConnMode;
+}
+
+/*!
+   Provides with the functionality to store the PIN generated
+   
+   @param [in] random The generated PIN code to be used in succesive steps
+   
+ */
+void WpsWizardPrivate::setPin(int random)
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_SETPIN_ENTRY, this);
+    mRandomNumber = random;
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_SETPIN_EXIT, this);
+}
+
+/*!
+   Returns the PIN code stored in one of the WPS Pages
+   
+   @return PIN code to be used in the WPS operation.
+ */
+int WpsWizardPrivate::getPin()
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_GETPIN_ENTRY, this); 
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_GETPIN_EXIT, this);
+    return mRandomNumber;
+}
+
+/*!
+   Returns page id when manual configuration is chosen
+   
+   @param [in] useWps is WPS used or not?
+   
+   @return new page id
+ */
+int WpsWizardPrivate::nextPageId(bool useWps)
+{
+    OstTraceFunctionEntry1(WPSWIZARDPRIVATE_NEXTPAGEID_ENTRY, this);
+    OstTraceFunctionExit1(WPSWIZARDPRIVATE_NEXTPAGEID_EXIT, this);
+    return mWizardHelper->nextPageId(useWps);
+}
+
+/*!
+    Sets wlan configuration value for given configuration identifier.
+    See ConfigurationId for further details about the data types in QVariant.
+    
+    @param [in] confId Configuration Identifier do to be set
+    @param [in] value  Value for configuration.
+  */
+void WpsWizardPrivate::setConfiguration(
+    WlanWizardHelper::ConfigurationId confId,
+    const QVariant &value)
+{
+    mWizardHelper->setConfiguration(confId, value);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/src/wpswizardpage.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,69 @@
+/*
+ * 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: 
+ *   WPS Wizard: API for wizard pages.
+ *
+ */
+
+// System includes
+#include <HbWidget>
+
+// User includes
+#include "wpswizard_p.h"
+#include "wpswizardpage.h"
+
+// Trace includes
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wpswizardpageTraces.h"
+#endif
+
+// External function prototypes
+
+// Local constants
+
+/*!
+   \class WpsWizardPage
+   \brief Implementation of the basic wps wizard page functionality 
+ */
+
+// ======== LOCAL FUNCTIONS ========
+
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+   Constructor for the WPS page baseclass
+   
+   @param [in] parent WpsWizardPrivate* pointer to the implementation class
+ */
+
+WpsWizardPage::WpsWizardPage(WpsWizardPrivate* parent) :
+    QObject(parent),
+    mWizard(parent)
+{
+    OstTraceFunctionEntry1(WPSWIZARDPAGE_WPSWIZARDPAGE_ENTRY, this); 
+    OstTraceFunctionExit1(WPSWIZARDPAGE_WPSWIZARDPAGE_EXIT, this);
+}
+
+/*!
+   Destructor
+ */
+WpsWizardPage::~WpsWizardPage()
+{
+    OstTraceFunctionEntry1(WPSWIZARDPAGE_WPSWIZARDPAGE_DESTRUCTOR_ENTRY, this);
+    mWizard = NULL;
+    OstTraceFunctionExit1(WPSWIZARDPAGE_WPSWIZARDPAGE_DESTRUCTOR_EXIT, this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/src/wpswizardstepfive.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,229 @@
+/*
+ * 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: 
+ *   WPS Wizard Page: Step 5
+ *
+ */
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbWidget>
+#include <HbRadioButtonList>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <HbMainWindow>
+
+// User includes
+#include "wpswizardstepfive.h"
+#include "wpswizard_p.h"
+
+// Trace Includes
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wpswizardstepfiveTraces.h"
+#endif
+
+// External function prototypes
+
+// Local constants
+
+
+/*!
+   \class WpsPageStepFive
+   \brief Implementation of wps wizard page for step five. 
+ */
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+   Constructor for WPS page five
+   
+   @param [in] parent WpsWizardPrivate* Pointer to the WPS wizard private 
+          implementation 
+ */
+WpsPageStepFive::WpsPageStepFive(WpsWizardPrivate* parent) :
+    WpsWizardPage(parent), 
+    mWidget(NULL), 
+    mRadio(NULL), 
+    mHeading(NULL),
+    mValid(false),
+    mLoader(NULL)
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_WPSPAGESTEPFIVE_ENTRY, this);
+    OstTraceFunctionExit1(WPSPAGESTEPFIVE_WPSPAGESTEPFIVE_EXIT, this);
+}
+
+/*!
+   Destructor
+ */
+WpsPageStepFive::~WpsPageStepFive()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_WPSPAGESTEPFIVE_DESTRUCTOR_ENTRY, this); 
+    delete mLoader;
+    OstTraceFunctionExit1(WPSPAGESTEPFIVE_WPSPAGESTEPFIVE_DESTRUCTOR_EXIT, this);
+}
+
+/*!
+   Loads the page with all the widgets
+   
+   @return HbWidget* Returns the view widget
+ */
+HbWidget* WpsPageStepFive::initializePage()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_INITIALIZEPAGE_ENTRY, this);
+
+    if (!mWidget) {
+        bool ok;
+        
+        mLoader = new HbDocumentLoader(mWizard->mainWindow());
+        
+        mLoader->load(":/docml/occ_wps_01_05.docml", &ok);
+        Q_ASSERT(ok);
+        
+        // Initialize orientation
+        loadDocmlSection(mWizard->mainWindow()->orientation());
+
+        mWidget = qobject_cast<HbWidget*> (mLoader->findWidget("occ_wps_P1"));
+        Q_ASSERT(mWidget);
+
+        mHeading = qobject_cast<HbLabel*> (mLoader->findWidget("label"));
+        Q_ASSERT(mHeading);
+        
+        mHeading->setPlainText(hbTrId("txt_occ_dialog_settings_received_for_multiple_wlan"));
+
+        mRadio = qobject_cast<HbRadioButtonList*> (mLoader->findWidget(
+                "radioButtonList"));
+        Q_ASSERT(mRadio);
+
+        QList<TWlanProtectedSetupCredentialAttribute> arr = mWizard->getSettingsArray();
+
+        QStringList ssidList;
+        for (int count = 0; count < arr.count(); count++)
+            {
+            TWlanProtectedSetupCredentialAttribute attr = arr[count];
+            QString ssid = QString::fromUtf8((const char*) attr.iSsid.Ptr(),
+                    attr.iSsid.Length());
+            ssidList.append(ssid);
+            }
+        mRadio->setItems(ssidList);
+
+        bool connectOk = connect(
+            mRadio, 
+            SIGNAL(itemSelected(int)), 
+            this,
+            SLOT(itemSelected(int)));
+        Q_ASSERT(connectOk);
+        
+        connectOk = connect(
+            mWizard->mainWindow(), 
+            SIGNAL(orientationChanged(Qt::Orientation)),
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+                   
+        Q_ASSERT(connectOk);
+    }
+    
+    OstTraceFunctionExit1(WPSPAGESTEPFIVE_INITIALIZEPAGE_EXIT, this);
+    return mWidget;
+}
+
+/*!
+   Determines the Number of steps to move backwards when 'Prev' Button
+   is clicked
+   
+   @return int Number of pages to move backwards
+ */
+int WpsPageStepFive::previousTriggered()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_PREVIOUSTRIGGERED_ENTRY, this); 
+    OstTraceFunctionExit1(WPSPAGESTEPFIVE_PREVIOUSTRIGGERED_EXIT, this);
+    
+    return (PageWpsWizardStep5 - PageWpsWizardStep2) - 1;
+}
+/*!
+   CallBack when the cancel button is clicked
+ */
+void WpsPageStepFive::cancelTriggered()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_CANCELTRIGGERED_ENTRY, this); 
+    OstTraceFunctionExit1(WPSPAGESTEPFIVE_CANCELTRIGGERED_EXIT, this);
+}
+
+/*!
+   Funtion to determine the next page to be displayed in the wizard process
+   
+   @param [out] removeFromStack bool RemoveFromStack indicating whether the current 
+          page should be removed from the stack
+   
+   @return int Page Id of the next page to be displayed.
+ */
+int WpsPageStepFive::nextId(bool &removeFromStack) const
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_NEXTID_ENTRY, this);
+    removeFromStack = false;
+    OstTraceFunctionExit1(WPSPAGESTEPFIVE_NEXTID_EXIT, this);
+    return WlanWizardPage::PageProcessSettings;
+}
+
+/*!
+   Determines whether the Next action button should be enabled or not
+   
+   @return bool Indicating whether next button is enabled or not.
+ */
+bool WpsPageStepFive::showPage()
+{
+    return mValid;
+}
+
+
+/*!
+   Call back when an item is selected from the list on the UI
+   
+   @param [in] index Indicating the relative position in the list
+ */
+void WpsPageStepFive::itemSelected(int index)
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_ITEMSELECTED_ENTRY, this);
+    mValid = true;
+    mWizard->storeSettings(index);
+    mWizard->enableNextButton(mValid);
+    OstTraceFunctionExit1(WPSPAGESTEPFIVE_ITEMSELECTED_EXIT, this);
+}
+
+
+/*!
+   Loads docml at initialization phase and when HbMainWindow sends orientation()
+   signal.
+   
+   @param [in] orientation orientation to be loaded.
+ */
+void WpsPageStepFive::loadDocmlSection(Qt::Orientation orientation)
+{
+    bool ok = false;
+    
+    // Load the orientation specific section
+    if (orientation == Qt::Horizontal) {
+    mLoader->load(":/docml/occ_wps_01_05.docml", "landscape", &ok);
+        Q_ASSERT(ok);
+    } 
+    else {
+        Q_ASSERT(orientation == Qt::Vertical);
+        mLoader->load(":/docml/occ_wps_01_05.docml", "portrait", &ok);
+        Q_ASSERT(ok);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/src/wpswizardstepfour.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,330 @@
+/*
+ * 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: 
+ *   WPS Wizard Page: Step 4 progress bar display
+ *
+ */
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbWidget>
+#include <HbRadioButtonList>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <HbProgressBar>
+#include <HbMessageBox>
+#include <HbMainWindow>
+#include <platform\wlanerrorcodes.h>
+
+// User includes
+#include "wpswizardstepfour.h"
+#include "wpswizardstepfour_p.h"
+#include "wpswizard_p.h"
+
+// Trace includes
+
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wpswizardstepfourTraces.h"
+#endif
+
+// External function prototypes
+
+// Local constants
+
+
+/*!
+   \class WpsPageStepFour
+   \brief Implementation of wps wizard page for step four.
+ */
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+
+/*!
+   Constructor for WPS page four
+   
+   @param [in] parent Pointer to the WPS wizard private implementation 
+ */
+WpsPageStepFour::WpsPageStepFour(WpsWizardPrivate* parent) :
+    WpsWizardPage(parent), 
+    mWidget(NULL), 
+    mWpsErrorCode(0), 
+    mCountCredentials(0), 
+    mLoader(NULL),
+    d_ptr(NULL)
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFOUR_WPSPAGESTEPFOUR_ENTRY, this);
+    d_ptr.reset(new WpsPageStepFourPrivate(this));
+    OstTraceFunctionExit1(WPSPAGESTEPFOUR_WPSPAGESTEPFOUR_EXIT, this);
+}
+
+/*!
+   Destructor
+ */
+WpsPageStepFour::~WpsPageStepFour()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFOUR_WPSPAGESTEPFOUR_DESTRUCTOR_ENTRY, this);   
+    delete mLoader;
+    OstTraceFunctionExit1(WPSPAGESTEPFOUR_WPSPAGESTEPFOUR_DESTRUCTOR_EXIT, this);
+}
+
+/*!
+   Loads the page with all the widgets
+   
+   @return HbWidget* Returns the view widget
+ */
+HbWidget* WpsPageStepFour::initializePage()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFOUR_INITIALIZEPAGE_ENTRY, this);
+
+    if (!mWidget) {    
+        bool ok;
+
+        mLoader = new HbDocumentLoader(mWizard->mainWindow());
+        
+        mLoader->load(":/docml/occ_wps_P4.docml", &ok);
+        Q_ASSERT(ok);
+        
+        // Initialize orientation
+        loadDocmlSection(mWizard->mainWindow()->orientation());
+
+        mWidget = qobject_cast<HbWidget*> (mLoader->findWidget("occ_wps_P4"));
+        Q_ASSERT(mWidget);
+
+        bool connectOk = connect(
+            mWizard->mainWindow(), 
+            SIGNAL(orientationChanged(Qt::Orientation)),
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(connectOk);
+    }
+
+    OstTraceFunctionExit1(WPSPAGESTEPFOUR_INITIALIZEPAGE_EXIT, this);
+
+    return mWidget;
+}
+
+/*!
+   In case the wizard page needs timer protection to the page use this
+   method to start control operation of the page. This method will be called
+   after requiresStartOperation() if true is returned with different call
+   stack.
+   
+   See requiresStartOperation(), WlanWizardHelper::nextPage().
+ */
+
+void WpsPageStepFour::startOperation()
+{
+    startWpsRunner();
+}
+
+/*!
+   Funtion to determine the next page to be displayed in the wizard process
+   
+   @param [out] removeFromStack bool variable indicating whether the current 
+   page should be removed from the stack
+   
+   @return int Page Id of the next page to be displayed.
+ */
+int WpsPageStepFour::nextId(bool &removeFromStack) const
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFOUR_NEXTID_ENTRY, this);
+
+    int id = WpsWizardPage::PageNone;
+    removeFromStack = false;
+    
+    // Error has occured go to error page
+    if(mWpsErrorCode != 0) {
+        return WlanWizardPage::PageGenericError;
+    }
+    
+    if(mCountCredentials == 0) {
+        id = WlanWizardPage::PageProcessSettings;
+    } else if (mCountCredentials >= 2) {
+        id = WpsWizardPage::PageWpsWizardStep5;
+    } else {
+        // only one response received. So go to the summary page
+        mWizard->storeSettings(0);
+        id = WlanWizardPage::PageProcessSettings;
+    } 
+    
+    OstTraceFunctionExit1(WPSPAGESTEPFOUR_NEXTID_EXIT, this);
+    return id;
+}
+
+/*!
+   If the wizard page requires timer protection and asyncronous time
+   lasting operation, protect parameters should return true. This is used
+   in pages e.g. where progressbar is shown. The whole point is to 
+   initialize the UI before starting the operation, so that the progress bar
+   is painted before the operation takes place.
+   
+   In practise this means that if true is returned in protect.
+   - WlanWizardPage::startOperation() is called to start the page operation.
+   - 1.5sec timer is used to protect the page
+   - wizardPage MUST call WlanWizardHelper::nextPage() to trigger entry to
+     next wizard page.
+   
+   @return true if protection is need. see description of the method.
+ */
+
+bool WpsPageStepFour::requiresStartOperation()
+{
+    return true;
+}
+
+/*!
+   Determines the Number of steps to move backwards when 'Prev' Button
+   is clicked
+   
+   @return int Number of pages to move backwards
+ */
+int WpsPageStepFour::previousTriggered()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFOUR_PREVIOUSTRIGGERED_ENTRY, this);
+    d_ptr->Cancel();
+    OstTraceFunctionExit1(WPSPAGESTEPFOUR_PREVIOUSTRIGGERED_EXIT, this);
+    return (PageWpsWizardStep4 - PageWpsWizardStep2) - 1;
+}
+
+/*!
+   Determines whether the Next action button should be enabled or not
+   
+   @return bool Indicating whether next button is enabled or not.
+ */
+bool WpsPageStepFour::showPage()
+{
+    mWpsErrorCode = 0;
+    
+    return false;
+}
+
+/*!
+   Handles the error case. Based on the error code decides
+   whether to retry or stop the wizard
+   
+   @param [in] aErrorCode integer variable indicating the error codes
+ */
+void WpsPageStepFour::handleError(int aErrorCode)
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFOUR_HANDLEERROR_ENTRY, this);
+    QString str;
+    OstTrace1( TRACE_ERROR, WPSPAGESTEPFOUR_HANDLEERROR, "WpsPageStepFour::handleError;aErrorCode=%d", aErrorCode );
+    mWpsErrorCode = aErrorCode;
+    switch (aErrorCode) {
+        case KErrWlanProtectedSetupOOBInterfaceReadError:
+        case KErrWlanProtectedSetupDecryptionCRCFailure:
+        case KErrWlanProtectedSetup2_4ChannelNotSupported:
+        case KErrWlanProtectedSetup5_0ChannelNotSupported:
+        case KErrWlanProtectedSetupNetworkAuthFailure:
+        case KErrWlanProtectedSetupNoDHCPResponse:
+        case KErrWlanProtectedSetupFailedDHCPConfig:
+        case KErrWlanProtectedSetupIPAddressConflict:
+        case KErrWlanProtectedSetupCouldNotConnectToRegistrar:
+        case KErrWlanProtectedSetupMultiplePBCSessionsDetected:
+        case KErrWlanProtectedSetupRogueActivitySuspected:
+        case KErrWlanProtectedSetupDeviceBusy:
+        case KErrWlanProtectedSetupSetupLocked:
+        case KErrWlanProtectedSetupMessageTimeout:
+        case KErrWlanProtectedSetupRegistrationSessionTimeout:
+            str = QString(hbTrId("txt_occ_dialog_configuration_failed_please_try_ag"));
+            break;
+
+        case KErrWlanProtectedSetupDevicePasswordAuthFailure:
+        case KErrWlanProtectedSetupPINMethodNotSupported:
+        case KErrWlanProtectedSetupPBMethodNotSupported:
+        default:
+            str = QString(hbTrId("txt_occ_dialog_configuration_failed_authenticatio"));
+            break;
+
+        } 
+    
+    mValid = false;
+    mWizard->setConfiguration(WlanWizardHelper::ConfGenericErrorString, str);
+    mWizard->setConfiguration(
+            WlanWizardHelper::ConfGenericErrorPageStepsBackwards,
+            (PageWpsWizardStep4 - PageWpsWizardStep2));
+    mWizard->nextPage();
+  
+    OstTraceFunctionExit1(WPSPAGESTEPFOUR_HANDLEERROR_EXIT, this) ;
+}
+
+/*!
+   Provides the functionality to initiate the WPS functionality
+ */
+void WpsPageStepFour::startWpsRunner()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPFOUR_STARTWPSRUNNER_ENTRY, this);
+    mValid  = false;
+    d_ptr->StartSetup(mWizard->getSsid(), mWizard->getPin());
+    OstTraceFunctionExit1(WPSPAGESTEPFOUR_STARTWPSRUNNER_EXIT, this);
+}
+
+/*!
+   Stores the credentials set by the user, through the WPs Wizard
+   
+   @param [in] credentials List of Credentials entered by user.
+   
+   @param credentialscount Number Of Credentials in the list 
+ */
+void WpsPageStepFour::setCredentials(
+    QList<TWlanProtectedSetupCredentialAttribute>& credentials,
+    int credentialscount)
+{
+    OstTraceFunctionEntry1( WPSPAGESTEPFOUR_SETCREDENTIALS_ENTRY, this );
+
+    mCountCredentials = credentialscount;
+    mWizard->storeSettingsArray(credentials);
+    mWizard->nextPage();
+    // enable the next button
+
+    OstTraceFunctionExit1( WPSPAGESTEPFOUR_SETCREDENTIALS_EXIT, this );
+}
+
+/*!
+   CallBack when the cancel button is clicked
+ */
+void WpsPageStepFour::cancelTriggered()
+{
+    OstTraceFunctionEntry1( WPSPAGESTEPFOUR_CANCELTRIGGERED_ENTRY, this );
+    d_ptr->Cancel();
+    OstTraceFunctionExit1( WPSPAGESTEPFOUR_CANCELTRIGGERED_EXIT, this );
+}
+
+/*!
+   Loads docml at initialization phase and when HbMainWindow sends 
+   orientation() signal.
+   
+   @param orientation[in] orientation to be loaded.
+ */
+void WpsPageStepFour::loadDocmlSection(Qt::Orientation orientation)
+{
+    bool ok = false;
+    
+    // Load the orientation specific section
+    if (orientation == Qt::Horizontal) {
+    mLoader->load(":/docml/occ_wps_P4.docml", "landscape", &ok);
+        Q_ASSERT(ok);
+    } 
+    else {
+        Q_ASSERT(orientation == Qt::Vertical);
+        mLoader->load(":/docml/occ_wps_P4.docml", "portrait", &ok);
+        Q_ASSERT(ok);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/src/wpswizardstepfour_p.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,135 @@
+/*
+ * 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: 
+ *   WPS Wizard Page: Step 4 progress bar display
+ *
+ */
+
+//System Includes
+
+//User Includes
+#include "wpswizard.h"
+#include "wpswizardstepfour_p.h"
+#include "cwpsactiverunner.h"
+
+// Trace includes
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wpswizardstepfour_pTraces.h"
+#endif
+
+// External function prototypes
+
+// Local constants
+
+
+/*!
+   \class WpsPageStepFourPrivate
+   \brief Private implementation of wps wizard page for step four. 
+ */
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+   Constructor for WPS page four
+   
+   @param [in] WpsPageStepFour* Pointer to the public/Ui class 
+ */
+
+WpsPageStepFourPrivate::WpsPageStepFourPrivate(WpsPageStepFour* pageStepFour) :
+    mWpsActiveRunner(NULL), 
+    q_ptr(pageStepFour)
+{
+    OstTraceFunctionEntry1( WPSPAGESTEPFOURPRIVATE_WPSPAGESTEPFOURPRIVATE_ENTRY, this );
+    // start the framework.
+    CWpsActiveRunner* runner = NULL;
+    QT_TRAP_THROWING(runner = CWpsActiveRunner::NewL(*this));
+    mWpsActiveRunner.reset(runner);
+    
+    OstTraceFunctionExit1( WPSPAGESTEPFOURPRIVATE_WPSPAGESTEPFOURPRIVATE_EXIT, this );
+}
+
+/*!
+   Destructor
+ */
+WpsPageStepFourPrivate::~WpsPageStepFourPrivate()
+{
+    OstTraceFunctionEntry1( DUP1_WPSPAGESTEPFOURPRIVATE_WPSPAGESTEPFOURPRIVATE_ENTRY, this );
+    OstTraceFunctionExit1( DUP1_WPSPAGESTEPFOURPRIVATE_WPSPAGESTEPFOURPRIVATE_EXIT, this );
+}
+
+/*!
+   This method will initiate the WPS setup functionality.
+   
+   @param [in] ssid name of the network which supports wps
+   @param [in] pin pin number to be used for WPS negotiating.
+ */
+void WpsPageStepFourPrivate::StartSetup(QString ssid, int pin)
+{
+    OstTraceFunctionEntry1( WPSPAGESTEPFOURPRIVATE_STARTSETUP_ENTRY, this );
+    TPtrC ptrName(reinterpret_cast<const TText*> (ssid.constData()));
+
+    RBuf8 ssidName;
+    ssidName.Create(ptrName.Length());
+    ssidName.Copy(ptrName);
+
+    mWpsActiveRunner->StartSetup(ssidName, pin);
+    ssidName.Close();
+    OstTraceFunctionExit1( WPSPAGESTEPFOURPRIVATE_STARTSETUP_EXIT, this );
+}
+
+/*!
+   CallBack informing the completion of the WPS setup.
+   
+   @param [in] aCredentials An array of credentials from the remote AP
+   @param [in] aError integer variable indicating result of the operation
+ */
+void WpsPageStepFourPrivate::WpsActiveRunnerStopped(
+    QList<TWlanProtectedSetupCredentialAttribute>& aCredentials, 
+    TInt aError)
+{
+    OstTraceFunctionEntry1( WPSPAGESTEPFOURPRIVATE_WPSACTIVERUNNERSTOPPED_ENTRY, this );
+
+    // mWpsErrorCode = aError;
+    if (aError == KErrNone) {
+        q_ptr->setCredentials(aCredentials, aCredentials.count());
+    }
+    else if (aError == KErrCancel) {
+        // operation was cancelled 
+
+    }
+    else {
+        OstTrace1( 
+            TRACE_ERROR, 
+            WPSPAGESTEPFOURPRIVATE_WPSACTIVERUNNERSTOPPED_ERROR, 
+            "WpsPageStepFourPrivate::WpsActiveRunnerStopped;Error=%d", 
+            aError );
+        
+        q_ptr->handleError(aError);
+    } 
+    OstTraceFunctionExit1( WPSPAGESTEPFOURPRIVATE_WPSACTIVERUNNERSTOPPED_EXIT, this );
+}
+
+/*!
+   To cancel the ongoing WPS setup implementation.
+ */
+void WpsPageStepFourPrivate::Cancel()
+{
+    OstTraceFunctionEntry1( WPSPAGESTEPFOURPRIVATE_CANCEL_ENTRY, this );
+    mWpsActiveRunner->DoCancel();
+    OstTraceFunctionExit1( WPSPAGESTEPFOURPRIVATE_CANCEL_EXIT, this );
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/src/wpswizardstepthreebutton.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,165 @@
+/*
+ * 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: 
+ *   WPS Wizard Page: Step 3 Push button number
+ *
+ */
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbWidget>
+#include <HbRadioButtonList>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <HbMainwindow>
+
+// User includes
+#include "wpswizardstepthreebutton.h"
+#include "wpswizard_p.h"
+
+// Trace includes
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wpswizardstepthreebuttonTraces.h"
+#endif
+
+// External function prototypes
+
+// Local constants
+
+/*!
+   \class WpsPageStepThreeButton
+   \brief Implementation of wps wizard page for step three button press mode.
+ */
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+   Constructor for WPS page three button
+   
+   @param [in] parent Pointer to the WPS wizard private implementation 
+ */
+WpsPageStepThreeButton::WpsPageStepThreeButton(WpsWizardPrivate* parent) :
+    WpsWizardPage(parent), 
+    mWidget(NULL), 
+    mHeading(NULL),
+    mLoader(NULL)
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREEBUTTON_WPSPAGESTEPTHREEBUTTON_ENTRY, this); 
+    OstTraceFunctionExit1(WPSPAGESTEPTHREEBUTTON_WPSPAGESTEPTHREEBUTTON_EXIT, this);
+
+}
+
+/*!
+   Destructor
+ */
+WpsPageStepThreeButton::~WpsPageStepThreeButton()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREEBUTTON_WPSPAGESTEPTHREEBUTTON_DESTRUCTOR_ENTRY, this);
+    delete mLoader;
+    OstTraceFunctionExit1(WPSPAGESTEPTHREEBUTTON_WPSPAGESTEPTHREEBUTTON_DESTRUCTOR_EXIT, this);
+}
+
+/*!
+   Loads the page with all the widgets
+   
+   @return HbWidget* Returns the view widget
+ */
+HbWidget* WpsPageStepThreeButton::initializePage()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREEBUTTON_INITIALIZEPAGE_ENTRY, this);
+
+    if (!mWidget) {
+        bool ok;
+        mLoader = new HbDocumentLoader(mWizard->mainWindow());
+        
+        mLoader->load(":/docml/occ_wps_02_03.docml", &ok);
+        Q_ASSERT(ok);
+        
+        // Initialize orientation
+        loadDocmlSection(mWizard->mainWindow()->orientation());
+
+        mWidget = qobject_cast<HbWidget*> (mLoader->findWidget("occ_wps_P2"));
+        Q_ASSERT(mWidget);
+
+        mHeading = qobject_cast<HbLabel*> (mLoader->findWidget("label_heading"));
+        Q_ASSERT(mHeading);
+        
+        mHeading->setPlainText(hbTrId("txt_occ_dialog_first_press_button_on_the_wireless"));
+        
+        bool connectOk = connect(
+            mWizard->mainWindow(), 
+            SIGNAL(orientationChanged(Qt::Orientation)),
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+       Q_ASSERT(connectOk);
+    } 
+    
+    OstTraceFunctionExit1(WPSPAGESTEPTHREEBUTTON_INITIALIZEPAGE_EXIT, this);
+    return mWidget;
+}
+
+/*!
+   Funtion to determine the next page to be displayed in the wizard process
+   
+   @param [out] removeFromStack bool indicating whether the current page should be 
+   removed from the stack
+   
+   @return int Page Id of the next page to be displayed.
+ */
+int WpsPageStepThreeButton::nextId(bool &removeFromStack) const
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREEBUTTON_NEXTID_ENTRY, this);
+    removeFromStack = false;
+    OstTraceFunctionExit1(WPSPAGESTEPTHREEBUTTON_NEXTID_EXIT, this);
+
+    return WpsWizardPage::PageWpsWizardStep4;
+}
+
+/*!
+   Determines the Number of steps to move backwards when 'Prev' Button
+   is clicked
+   
+   @return int Number of pages to move backwards
+ */
+int WpsPageStepThreeButton::previousTriggered()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREEBUTTON_PREVIOUSTRIGGERED_ENTRY, this); 
+    OstTraceFunctionExit1(WPSPAGESTEPTHREEBUTTON_PREVIOUSTRIGGERED_EXIT, this);
+    return (PageWpsWizardStep3_Button - PageWpsWizardStep2);
+}
+
+/*!
+   Loads docml at initialization phase and when HbMainWindow sends 
+   orientation() signal.
+   
+   @param [in] orientation orientation to be loaded.
+ */
+void WpsPageStepThreeButton::loadDocmlSection(Qt::Orientation orientation)
+{
+    bool ok = false;
+    
+    // Load the orientation specific section
+    if (orientation == Qt::Horizontal) {
+        mLoader->load(":/docml/occ_wps_02_03.docml", "landscape", &ok);
+        Q_ASSERT(ok);
+    } else {
+        Q_ASSERT(orientation == Qt::Vertical);
+        mLoader->load(":/docml/occ_wps_02_03.docml", "portrait", &ok);
+        Q_ASSERT(ok);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/src/wpswizardstepthreenumber.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,248 @@
+/*
+ * 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: 
+ *   WPS Wizard Page: Step 3 Number enter mode.
+ *
+ */
+
+// System includes
+#include <HbDocumentLoader>
+#include <HbWidget>
+#include <HbRadiobuttonList>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <QTextStream>
+#include <QTime>
+#include <HbMainWindow>
+
+// User includes
+#include "wpswizardstepthreenumber.h"
+#include "wpswizard_p.h"
+
+// Trace includes
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wpswizardstepthreenumberTraces.h"
+#endif
+
+// External function prototypes
+
+// Local constants
+const static int KMaxPINLength = 8;
+
+/*!
+   \class WpsPageStepThreeNumber
+   \brief Implementation of wps wizard page for step three PIN Entry mode. 
+ */
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+   Constructor for WPS page three number entry mode
+   
+   @param [in] parent Pointer to the WPS wizard private implementation 
+ */
+WpsPageStepThreeNumber::WpsPageStepThreeNumber(WpsWizardPrivate* parent) :
+    WpsWizardPage(parent), 
+    mWidget(NULL), 
+    mHeading(NULL),
+    mLoader(NULL)
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREENUMBER_WPSPAGESTEPTHREENUMBER_ENTRY, this); 
+    OstTraceFunctionExit1(WPSPAGESTEPTHREENUMBER_WPSPAGESTEPTHREENUMBER_EXIT, this);
+
+}
+
+/*!
+   Destructor
+ */
+WpsPageStepThreeNumber::~WpsPageStepThreeNumber()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREENUMBER_WPSPAGESTEPTHREENUMBER_DESTRUCTOR_ENTRY, this);
+    delete mLoader;
+    OstTraceFunctionExit1(WPSPAGESTEPTHREENUMBER_WPSPAGESTEPTHREENUMBER_DESTRUCTOR_EXIT, this);
+}
+
+/*!
+   Loads the page with all the widgets
+   
+   @return HbWidget* Returns the view widget
+ */
+HbWidget* WpsPageStepThreeNumber::initializePage()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREENUMBER_INITIALIZEPAGE_ENTRY, this);
+
+    if (!mWidget) {
+        bool ok;
+        mLoader = new HbDocumentLoader(mWizard->mainWindow());
+        
+        mLoader->load(":/docml/occ_wps_02_03.docml", &ok);
+        Q_ASSERT(ok);
+        
+        // Initialize orientation
+        loadDocmlSection(mWizard->mainWindow()->orientation());
+
+        mWidget = qobject_cast<HbWidget*> (mLoader->findWidget("occ_wps_P2"));
+        Q_ASSERT(mWidget);
+
+        mHeading= qobject_cast<HbLabel*> (mLoader->findWidget("label_heading"));
+        Q_ASSERT(mHeading);
+        
+        bool connectOk = connect(
+            mWizard->mainWindow(), 
+            SIGNAL(orientationChanged(Qt::Orientation)),
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(connectOk);
+    } 
+    
+    OstTraceFunctionExit1(WPSPAGESTEPTHREENUMBER_INITIALIZEPAGE_EXIT, this);
+
+    return mWidget;
+}
+
+/*!
+   Funtion to determine the next page to be displayed in the wizard process
+   
+   @param [out] removeFromStack bool indicating whether the current page should be 
+   removed from the stack
+   
+   @return int Page Id of the next page to be displayed.
+ */
+int WpsPageStepThreeNumber::nextId(bool &removeFromStack) const
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREENUMBER_NEXTID_ENTRY, this);
+    removeFromStack = false;
+    OstTraceFunctionExit1(WPSPAGESTEPTHREENUMBER_NEXTID_EXIT, this);
+
+    return WpsWizardPage::PageWpsWizardStep4;
+}
+
+/*!
+   Determines the Number of steps to move backwards when 'Prev' Button
+   is clicked
+   
+   @return int Number of pages to move backwards
+ */
+int WpsPageStepThreeNumber::previousTriggered()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREENUMBER_PREVIOUSTRIGGERED_ENTRY, this);
+    
+    mWizard->setPin(0);
+    
+    OstTraceFunctionExit1(WPSPAGESTEPTHREENUMBER_PREVIOUSTRIGGERED_EXIT, this);
+    return (PageWpsWizardStep3_Number - PageWpsWizardStep2) - 1;
+}
+
+/*!
+   CallBack when the cancel button is clicked
+ */
+void WpsPageStepThreeNumber::cancelTriggered()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREENUMBER_CANCELTRIGGERED_ENTRY, this);
+    mWizard->setPin(0);    
+    OstTraceFunctionExit1(WPSPAGESTEPTHREENUMBER_CANCELTRIGGERED_EXIT, this);
+}
+
+
+/*!
+   Determines whether the Next action button should be enabled or not
+   
+   @return bool Indicating whether next button is enabled or not.
+ */
+bool WpsPageStepThreeNumber::showPage()
+{
+    int randomNumber = computeRandNumber();
+    mHeading->setPlainText(hbTrId(
+            "txt_occ_dialog_enter_1_on_the_wireless_station_t").arg(
+            randomNumber));
+    mWizard->setPin(randomNumber);
+    return true;
+}
+
+/*!
+   Computes the Random number based on current system time
+   
+   @return int Returns the generated random number
+ */
+int WpsPageStepThreeNumber::computeRandNumber()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREENUMBER_COMPUTERANDNUMBER_ENTRY, this);
+
+    int pin = 0;
+    QTime time(0, 0);
+    int seed = time.secsTo(QTime::currentTime());
+    
+    do {
+        qsrand(seed);
+        pin = qrand();
+    } while (pin < (10 ^ (KMaxPINLength - 2)) || (((pin / 1000000) % 10)) == 0);
+    
+    //last digit is checksum, so we need 7 digits
+    //and the first shouldn't be 0
+    pin = pin % 10000000;
+    int checkSum = computeCheckSum(pin);
+    pin *= 10;
+    pin += checkSum;
+    
+    OstTraceFunctionExit1(WPSPAGESTEPTHREENUMBER_COMPUTERANDNUMBER_EXIT, this);
+    return pin;
+}
+
+/*!
+   Computes the checksum for a given pin
+   
+   @return Returns the generated checksum
+ */
+int WpsPageStepThreeNumber::computeCheckSum(int aPin)
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTHREENUMBER_COMPUTECHECKSUM_ENTRY, this);
+
+    int accum = 0;
+    aPin *= 10;
+    accum += 3 * ((aPin / 10000000) % 10);
+    accum += 1 * ((aPin / 1000000) % 10);
+    accum += 3 * ((aPin / 100000) % 10);
+    accum += 1 * ((aPin / 10000) % 10);
+    accum += 3 * ((aPin / 1000) % 10);
+    accum += 1 * ((aPin / 100) % 10);
+    accum += 3 * ((aPin / 10) % 10);
+    int digit = (accum % 10);
+    OstTraceFunctionExit1(WPSPAGESTEPTHREENUMBER_COMPUTECHECKSUM_EXIT, this);
+    return (10 - digit) % 10;
+}
+
+/*!
+   Loads docml at initialization phase and when HbMainWindow sends 
+   orientation() signal.
+   
+   @param [in] orientation orientation to be loaded.
+ */
+void WpsPageStepThreeNumber::loadDocmlSection(Qt::Orientation orientation)
+{
+    bool ok = false;
+
+    // Load the orientation specific section
+    if (orientation == Qt::Horizontal) {
+        mLoader->load(":/docml/occ_wps_02_03.docml", "landscape", &ok);
+        Q_ASSERT(ok);
+    } else {
+        Q_ASSERT(orientation == Qt::Vertical);
+        mLoader->load(":/docml/occ_wps_02_03.docml", "portrait", &ok);
+        Q_ASSERT(ok);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/src/wpswizardsteptwo.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,227 @@
+/*
+ * 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: 
+ *   WPS Wizard Page: Step 2
+ *
+ */
+
+// System includes
+#include <HbWidget>
+#include <HbRadioButtonList>
+#include <HbLineEdit>
+#include <HbLabel>
+#include <HbMainWindow>
+
+// User includes
+#include "wpswizardsteptwo.h"
+#include "wpswizard_p.h"
+
+// Trace includes
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wpswizardsteptwoTraces.h"
+#endif
+
+// External function prototypes
+
+// Local constants
+
+/*!
+   \class WpsPageStepTwo
+   \brief Implementation of wps wizard page for step two. 
+ */
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+   Constructor for WPS page two
+   
+   @param [in] parent Pointer to the WPS wizard private implementation 
+ */
+WpsPageStepTwo::WpsPageStepTwo(WpsWizardPrivate* parent) :
+    WpsWizardPage(parent), 
+    mWidget(NULL), 
+    mRadio(NULL), 
+    mHeading(NULL),
+    mValid(false), 
+    mItemSelected(0),
+    mLoader(NULL)
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTWO_WPSPAGESTEPTWO_ENTRY, this); 
+    OstTraceFunctionExit1(WPSPAGESTEPTWO_WPSPAGESTEPTWO_EXIT, this);
+
+}
+
+/*!
+   Destructor
+ */
+WpsPageStepTwo::~WpsPageStepTwo()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTWO_WPSPAGESTEPTWO_DESTRUCTOR_ENTRY, this);
+    delete mLoader;
+    OstTraceFunctionExit1(WPSPAGESTEPTWO_WPSPAGESTEPTWO_DESTRUCTOR_EXIT, this);
+}
+
+/*!
+   Loads the page with all the widgets
+   
+   @return HbWidget* Returns the view widget
+ */
+HbWidget* WpsPageStepTwo::initializePage()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTWO_INITIALIZEPAGE_ENTRY, this);
+
+    if (!mWidget) {
+        bool ok;
+        mLoader = new HbDocumentLoader(mWizard->mainWindow());
+        
+        mLoader->load(":/docml/occ_wps_01_05.docml", &ok);
+        Q_ASSERT(ok);
+        
+        // Initialize orientation
+        loadDocmlSection(mWizard->mainWindow()->orientation());
+
+        mWidget = qobject_cast<HbWidget*> (mLoader->findWidget("occ_wps_P1"));
+        Q_ASSERT(mWidget);
+
+        mHeading = qobject_cast<HbLabel*> (mLoader->findWidget("label"));
+        Q_ASSERT(mHeading);
+        mHeading->setPlainText(hbTrId("txt_occ_dialog_selected_network_supports_wifi_pro"));
+
+        mRadio = qobject_cast<HbRadioButtonList*> (mLoader->findWidget("radioButtonList"));
+        Q_ASSERT(mRadio); 
+        
+        //Set Options
+        QStringList list;
+        list << hbTrId("txt_occ_list_use_pushbutton")
+             << hbTrId("txt_occ_list_use_pin_code")
+             << hbTrId("txt_occ_list_configure_manually");
+        mRadio->setItems(list);
+
+        bool connectOk = connect(
+            mRadio, 
+            SIGNAL(itemSelected(int)), 
+            this,
+            SLOT(itemSelected(int)));
+        Q_ASSERT(connectOk);
+
+        connectOk = connect(
+            mWizard->mainWindow(), 
+            SIGNAL(orientationChanged(Qt::Orientation)),
+            this, 
+            SLOT(loadDocmlSection(Qt::Orientation)));
+        Q_ASSERT(connectOk);
+    }
+    
+    OstTraceFunctionExit1(WPSPAGESTEPTWO_INITIALIZEPAGE_EXIT, this);
+    return mWidget;
+}
+
+/*!
+   Funtion to determine the next page to be displayed in the wizard process
+   
+   @param [out] removeFromStack bool indicating whether the current page should be 
+   removed from the stack
+   
+   @return int Page Id of the next page to be displayed.
+ */
+int WpsPageStepTwo::nextId(bool &removeFromStack) const
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTWO_NEXTID_ENTRY, this);
+    int id = WpsWizardPage::PageWpsWizardStep3_Button;
+    removeFromStack = false;
+    
+    if (mItemSelected == WpsPushButtonMode) {
+        id = WpsWizardPage::PageWpsWizardStep3_Button;
+        
+    } else if (mItemSelected == WpsPinCodeMode) {
+        id = WpsWizardPage::PageWpsWizardStep3_Number;
+        
+    } else {
+        id = mWizard->nextPageId(false);
+    }
+    
+    OstTraceFunctionExit1(WPSPAGESTEPTWO_NEXTID_EXIT, this);
+    return id;
+}
+
+/*!
+   Determines the Number of steps to move backwards when 'Prev' Button
+   is clicked
+   
+   @return int Number of pages to move backwards
+ */
+int WpsPageStepTwo::previousTriggered()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTWO_PREVIOUSTRIGGERED_ENTRY, this);
+    OstTraceFunctionExit1(WPSPAGESTEPTWO_PREVIOUSTRIGGERED_EXIT, this);
+    return 1;
+}
+
+/*!
+   CallBack when the cancel button is clicked
+ */
+void WpsPageStepTwo::cancelTriggered()
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTWO_CANCELTRIGGERED_ENTRY, this); 
+    OstTraceFunctionExit1(WPSPAGESTEPTWO_CANCELTRIGGERED_EXIT, this);
+}
+
+/*!
+   Determines whether the Next action button should be enabled or not
+   
+   @return bool Indicating whether next button is enabled or not.
+ */
+bool WpsPageStepTwo::showPage()
+{
+    return mValid;
+}
+
+/*!
+   Call back when an item is selected from the list on the UI
+   
+   @param [in] index Indcating the relative position in the list
+ */
+void WpsPageStepTwo::itemSelected(int index)
+{
+    OstTraceFunctionEntry1(WPSPAGESTEPTWO_ITEMSELECTED_ENTRY, this);
+    mValid = true;
+    mWizard->enableNextButton(mValid);
+    mItemSelected = index;   
+    OstTraceFunctionExit1(WPSPAGESTEPTWO_ITEMSELECTED_EXIT, this);
+}
+
+/*!
+   Loads docml at initialization phase and when HbMainWindow sends 
+   orientation() signal.
+   
+   @param [in] orientation orientation to be loaded.
+ */
+void WpsPageStepTwo::loadDocmlSection(Qt::Orientation orientation)
+{
+    bool ok = false;
+    
+    // Load the orientation specific section
+    if (orientation == Qt::Horizontal) {
+        mLoader->load(":/docml/occ_wps_01_05.docml", "landscape", &ok);
+        Q_ASSERT(ok);
+    }  else {
+        Q_ASSERT(orientation == Qt::Vertical);
+        mLoader->load(":/docml/occ_wps_01_05.docml", "portrait", &ok);
+        Q_ASSERT(ok);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/stubs/stub_wlanmgmtclient.cpp	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* 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:
+* WLAN Management API stubbing for WPS Wizard use in emulator.
+*/
+
+#include <e32std.h>
+#include <e32base.h>
+#include "wlanmgmtclient.h"
+
+// ---------------------------------------------------------
+// CWlanScanRequest::NewL
+// ---------------------------------------------------------
+//
+CWlanMgmtClient* CWlanMgmtClient::NewL()
+    {
+    CWlanMgmtClient* self = new CWlanMgmtClient;
+    return self;
+    }
+    
+// ---------------------------------------------------------
+// CWlanScanRequest::~CWlanMgmtClient
+// ---------------------------------------------------------
+//
+CWlanMgmtClient::~CWlanMgmtClient()
+    {
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::CWlanMgmtClient
+// ---------------------------------------------------------
+//
+CWlanMgmtClient::CWlanMgmtClient()
+    {
+    }
+
+// ---------------------------------------------------------
+// CWlanScanRequest::RunProtectedSetup
+// ---------------------------------------------------------
+//
+void CWlanMgmtClient::RunProtectedSetup(
+    TRequestStatus& aStatus,
+    const TWlanSsid& aSsid,
+    const TWlanWpsPin& /* aWpsPin */,
+    CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials )
+{
+    // Complete the request immediately
+    TRequestStatus *status = &aStatus;
+    TInt err = KErrNone;
+    TWlanProtectedSetupCredentialAttribute attr;
+    
+    attr.iSsid.Copy(aSsid);
+    attr.iSecurityMode = EWlanIapSecurityModeAllowUnsecure;
+    attr.iAuthenticationMode = EWlanAuthenticationModeOpen;
+    attr.iOperatingMode = EWlanOperatingModeInfrastructure;
+    attr.iWepDefaultKey = EWlanDefaultWepKey1;
+    
+    TRAP(err, aCredentials.AppendL(attr) );
+    User::RequestComplete(status, err);
+}
+
+// ---------------------------------------------------------
+// CWlanScanRequest::CancelProtectedSetup
+// ---------------------------------------------------------
+//
+void CWlanMgmtClient::CancelProtectedSetup()
+    {
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/stubs/stubs.pri	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,26 @@
+#
+# 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: 
+# Stubs for WpsWizard emulator usage
+#
+
+symbian {
+	mmpStubRules = \
+	    "$${LITERAL_HASH}ifdef WINSCW" \
+	    "USERINCLUDE stubs" \
+	    "SOURCEPATH stubs" \
+	    "SOURCE stub_wlanmgmtclient.cpp" \
+	    "$${LITERAL_HASH}endif"
+	MMP_RULES += mmpStubRules
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/stubs/wlanmgmtclient.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* 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:
+* WLAN Management API stubbing for WPSWizard
+*/
+
+#ifndef WLANMGMTCLIENT_H
+#define WLANMGMTCLIENT_H
+
+#include "wlanmgmtcommon.h"
+#include "wlanscaninfo.h"
+
+// CLASS DECLARATION
+
+class CWlanMgmtClient : public CBase
+    {
+    public:  // Methods
+
+        // Constructors and destructor
+
+        /**
+         * Static constructor.
+         * @return Pointer to the constructed object.
+         */
+        static CWlanMgmtClient* NewL();
+
+        /**
+         * Destructor.
+         */
+        ~CWlanMgmtClient();
+
+        /**
+         * Start Protected Setup.
+         *
+         * @param aStatus Status of the calling active object. On successful
+         *                completion contains KErrNone, otherwise one of the
+         *                system-wide error codes.
+         * @param aSsid SSID of the network to configure.
+         * @param aWpsPin PIN value to be used. "00000000" (string of eight zeros)
+         *                if push button method is used.
+         * @param aCredentials Results of a successful Protected Setup operation.
+         * @sa \link psetup Protected Setup-specific error codes \endlink.
+         */
+        virtual void RunProtectedSetup(
+            TRequestStatus& aStatus,
+            const TWlanSsid& aSsid,
+            const TWlanWpsPin& aWpsPin,
+            CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials );
+        
+        /**
+         * Cancel an outstanding Protected Setup operation.
+         */
+        virtual void CancelProtectedSetup();
+        
+    private: // Data
+        
+        CWlanMgmtClient();
+    };
+
+#endif // WLANMGMTCLIENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/traces/OstTraceDefinitions.h	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,21 @@
+/*
+ * 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: TraceHeader ,includes the TraceAPI 
+ *   
+ *
+ */
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wlanutilities/wpswizard/wpswizard.pro	Tue Jul 06 15:29:22 2010 +0300
@@ -0,0 +1,75 @@
+#
+# 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: WPS wizard 
+#
+
+
+TEMPLATE = lib
+TARGET = wpswizard
+DEFINES += BUILD_WPS_WIZARD_DLL
+VERSION = 0.0.1
+CONFIG += hb
+MOC_DIR = build
+RCC_DIR = build
+RESOURCES += resources/wpswizard_resource.qrc
+TRANSLATIONS += wpswizardplugin.ts
+
+INCLUDEPATH += inc \
+        ../inc
+
+HEADERS += inc/wpswizard.h \
+    inc/wpswizard_p.h \
+    inc/wpswizardpage.h \
+    inc/wpswizardsteptwo.h \
+    inc/wpswizardstepthreebutton.h \
+    inc/wpswizardstepthreenumber.h \
+    inc/wpswizardstepfour.h \
+    inc/wpswizardstepfour_p.h \
+    inc/wpswizardstepfive.h \
+    inc/cwpsactiverunner.h \
+    inc/mwpsactiverunnercallback.h \
+    
+SOURCES += src/wpswizard_p.cpp \
+    src/wpswizard.cpp \
+    src/wpswizardpage.cpp \
+    src/wpswizardsteptwo.cpp \
+    src/wpswizardstepthreebutton.cpp \
+    src/wpswizardstepthreenumber.cpp \
+    src/wpswizardstepfour.cpp \
+    src/wpswizardstepfour_p.cpp \
+    src/wpswizardstepfive.cpp \
+    src/cwpsactiverunner.cpp
+    
+
+symbian { 
+
+    LIBS += -lecom    
+        
+    TARGET.UID3 = 0x2003D2FE
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+    
+    TARGET.EPOCALLOWDLLDATA = 1
+        
+    MMP_RULES += "USERINCLUDE traces"
+    
+    # location of directories for def files
+    defFilePath = .
+    
+    BLD_INF_RULES.prj_exports += "rom/wpswizard.iby CORE_MW_LAYER_IBY_EXPORT_PATH(wpswizard.iby)"
+    BLD_INF_RULES.prj_exports += "rom/wpswizard_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(wpswizard_resources.iby)"
+    BLD_INF_RULES.prj_exports += "inc/wpswizard.h |../inc/wpswizard.h"       
+}
+
+include (stubs/stubs.pri)
+