Revision: 201015
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 03 May 2010 12:38:03 +0300
changeset 29 26b6f0522fd8
parent 25 98b66e4fb0be
child 30 398876c4ffa7
child 33 8110bf1194d1
Revision: 201015 Kit: 201018
appinstall_plat/sifui_api/bwins/sifuiu.def
appinstall_plat/sifui_api/eabi/sifuiu.def
appinstall_plat/sifui_api/group/bld.inf
appinstall_plat/sifui_api/group/sifui.mmp
appinstall_plat/sifui_api/inc/sifui.h
appinstall_plat/sifui_api/inc/sifuidefs.h
appinstall_plat/sifui_api/inc/sifuiprivate.h
appinstall_plat/sifui_api/rom/sifui.iby
appinstall_plat/sifui_api/src/sifui.cpp
appinstall_plat/sifui_api/src/sifuiprivate.cpp
appinstaller/AppinstUi/Daemon/Inc/DialogWrapper.h
appinstaller/AppinstUi/Daemon/Inc/SilentLauncher.h
appinstaller/AppinstUi/Daemon/Inc/daemonbehaviour.h
appinstaller/AppinstUi/Daemon/Inc/daemoninstaller.h
appinstaller/AppinstUi/Daemon/Inc/silentuninstaller.h
appinstaller/AppinstUi/Daemon/Inc/uninstaller.h
appinstaller/AppinstUi/Daemon/Src/DialogWrapper.cpp
appinstaller/AppinstUi/Daemon/Src/SilentLauncher.cpp
appinstaller/AppinstUi/Daemon/Src/daemonbehaviour.cpp
appinstaller/AppinstUi/Daemon/Src/daemoninstaller.cpp
appinstaller/AppinstUi/Daemon/Src/main.cpp
appinstaller/AppinstUi/Daemon/Src/previouslyInstalledAppsCache.cpp
appinstaller/AppinstUi/Daemon/Src/silentuninstaller.cpp
appinstaller/AppinstUi/Daemon/Src/uninstaller.cpp
appinstaller/AppinstUi/Daemon/Src/versionRevisor.cpp
appinstaller/AppinstUi/Server/Data/SWInstSvrUI_reg.rss
appinstaller/AppinstUi/group/daemon.mmp
appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialog.h
appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogcontentwidget.h
appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogdefinitions.h
appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogtitlewidget.h
appinstaller/AppinstUi/sifuidevicedialogplugin/loc/sifuidevicedialogplugin.ts
appinstaller/AppinstUi/sifuidevicedialogplugin/loc/sifuidevicedialogplugin.xls
appinstaller/AppinstUi/sifuidevicedialogplugin/resources/qgn_indi_midp_trusted.svg
appinstaller/AppinstUi/sifuidevicedialogplugin/resources/qgn_menu_am_sis.svg
appinstaller/AppinstUi/sifuidevicedialogplugin/rom/sifuidevicedialogplugin_resources.iby
appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.pro
appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.qrc
appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialog.cpp
appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogcontentwidget.cpp
appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogtitlewidget.cpp
appinstaller/AppinstUi/sifuiinstallindicatorplugin/rom/sifuiinstallindicatorplugin.iby
appinstaller/AppinstUi/sisxsifplugin/data/sisxsifuidata.rss
appinstaller/AppinstUi/sisxsifplugin/group/bld.inf
appinstaller/AppinstUi/sisxsifplugin/group/sisxsifplugin.mmp
appinstaller/AppinstUi/sisxsifplugin/inc/sisxsiflangname.rh
appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginactiveimpl.h
appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginuihandler.h
appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginuihandlersilent.h
appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifuilangname.h
appinstaller/AppinstUi/sisxsifplugin/loc/sisxsifui.loc
appinstaller/AppinstUi/sisxsifplugin/loc/sisxsifui.xls
appinstaller/AppinstUi/sisxsifplugin/rom/sisxsifplugin.iby
appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginactiveimpl.cpp
appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandler.cpp
appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandlersilent.cpp
appinstaller/AppinstUi/sisxsifplugin/src/sisxsifuilangname.cpp
appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner.cpp
appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner.h
appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner_symbian.cpp
appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner_symbian.h
appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.cpp
appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.h
appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.iby
appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.pkg
appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.pro
iaupdate/IAD/api/bwins/iaupdateapiu.def
iaupdate/IAD/api/client/inc/iaupdateclient.h
iaupdate/IAD/api/client/inc/iaupdatemanager.h
iaupdate/IAD/api/client/src/iaupdateclient.cpp
iaupdate/IAD/api/client/src/iaupdatemanager.cpp
iaupdate/IAD/api/eabi/iaupdateapiu.def
iaupdate/IAD/api/group/bld.inf
iaupdate/IAD/api/group/iaupdateapi.mmp
iaupdate/IAD/api/iaupdateapi.pro
iaupdate/IAD/backgroundchecker/group/iaupdatebg.mmp
iaupdate/IAD/backgroundchecker/inc/iaupdatebgcheckermode.h
iaupdate/IAD/backgroundchecker/inc/iaupdatebgrefreshtimer.h
iaupdate/IAD/backgroundchecker/inc/iaupdatebgsoftnotification.h
iaupdate/IAD/backgroundchecker/src/iaupdatebgmain.cpp
iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp
iaupdate/IAD/backgroundchecker/src/iaupdatebgremindertimer.cpp
iaupdate/IAD/backgroundchecker/src/iaupdatebgsoftnotification.cpp
iaupdate/IAD/bgcindicatorplugin/bgcindicatorplugin.pro
iaupdate/IAD/bgcindicatorplugin/moc_bgcindicatorplugin.cpp
iaupdate/IAD/bgcindicatorplugin/qmakepluginstubs/bgcindicatorplugin.qtplugin
iaupdate/IAD/bgcindicatorplugin/src/bgcindicator.cpp
iaupdate/IAD/bwins/iaupdateapiu.def
iaupdate/IAD/configurator/group/iadctrldcmoadapter.mmp
iaupdate/IAD/configurator/src/iadctrldcmoadapter.cpp
iaupdate/IAD/eabi/iaupdateapiu.def
iaupdate/IAD/firmwareupdate/group/iaupdatefwupdate.mmp
iaupdate/IAD/firmwareupdate/inc/iaupdatefwfotamodel.h
iaupdate/IAD/firmwareupdate/inc/iaupdatefwsynchandler.h
iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp
iaupdate/IAD/firmwareupdate/src/iaupdatefwsynchandler.cpp
iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncutil.cpp
iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp
iaupdate/IAD/group/bld.inf
iaupdate/IAD/launcher/group/bld.inf
iaupdate/IAD/launcher/group/iaupdatelauncher.mmp
iaupdate/IAD/launcher/group/iaupdatelauncher.rss
iaupdate/IAD/launcher/group/iaupdatelauncher_reg.rss
iaupdate/IAD/launcher/iaupdatelauncher.pro
iaupdate/IAD/launcher/inc/iaupdatelauncherapplication.h
iaupdate/IAD/launcher/inc/iaupdatelauncherappui.h
iaupdate/IAD/launcher/inc/iaupdatelauncherclient.h
iaupdate/IAD/launcher/inc/iaupdatelauncherdocument.h
iaupdate/IAD/launcher/inc/iaupdatelaunchermanager.h
iaupdate/IAD/launcher/src/iaupdatelauncher.cpp
iaupdate/IAD/launcher/src/iaupdatelauncherapplication.cpp
iaupdate/IAD/launcher/src/iaupdatelauncherappui.cpp
iaupdate/IAD/launcher/src/iaupdatelauncherclient.cpp
iaupdate/IAD/launcher/src/iaupdatelauncherdocument.cpp
iaupdate/IAD/launcher/src/iaupdatelaunchermain.cpp
iaupdate/IAD/launcher/src/iaupdatelaunchermanager.cpp
iaupdate/IAD/tools/bwins/iaupdatetoolsu.def
iaupdate/IAD/tools/eabi/iaupdatetoolsu.def
iaupdate/IAD/tools/group/bld.inf
iaupdate/IAD/tools/group/iaupdatetools.mmp
iaupdate/IAD/tools/inc/iaupdatetools.h
iaupdate/IAD/tools/src/iaupdatetools.cpp
iaupdate/IAD/ui/group/2000F85A.txt
iaupdate/IAD/ui/group/backup_registration.xml
iaupdate/IAD/ui/group/bld.inf
iaupdate/IAD/ui/group/iaupdate.mmp
iaupdate/IAD/ui/group/iaupdate.rss
iaupdate/IAD/ui/group/iaupdate_reg.rss
iaupdate/IAD/ui/iaupdate.pro
iaupdate/IAD/ui/iaupdate.qrc
iaupdate/IAD/ui/inc/iaupdateaccesspointhandler.h
iaupdate/IAD/ui/inc/iaupdateagreement.h
iaupdate/IAD/ui/inc/iaupdateapplication.h
iaupdate/IAD/ui/inc/iaupdateappui.h
iaupdate/IAD/ui/inc/iaupdatecontainerobserver.h
iaupdate/IAD/ui/inc/iaupdatedetailsdialog.h
iaupdate/IAD/ui/inc/iaupdatedialogutil.h
iaupdate/IAD/ui/inc/iaupdatedocument.h
iaupdate/IAD/ui/inc/iaupdateengine.h
iaupdate/IAD/ui/inc/iaupdatefwdetailsdialog.h
iaupdate/IAD/ui/inc/iaupdatehistorycontainer.h
iaupdate/IAD/ui/inc/iaupdatehistoryview.h
iaupdate/IAD/ui/inc/iaupdatemaincontainer.h
iaupdate/IAD/ui/inc/iaupdatemainview.h
iaupdate/IAD/ui/inc/iaupdatemainwindow.h
iaupdate/IAD/ui/inc/iaupdatenavipanehandler.h
iaupdate/IAD/ui/inc/iaupdateprogressdialog.h
iaupdate/IAD/ui/inc/iaupdaterefreshhandler.h
iaupdate/IAD/ui/inc/iaupdateserver.h
iaupdate/IAD/ui/inc/iaupdateserviceprovider.h
iaupdate/IAD/ui/inc/iaupdatesession.h
iaupdate/IAD/ui/inc/iaupdatesettingdialog.h
iaupdate/IAD/ui/inc/iaupdatestatusdialog.h
iaupdate/IAD/ui/inc/iaupdatestatuspanehandler.h
iaupdate/IAD/ui/inc/iaupdatetools.h
iaupdate/IAD/ui/inc/iaupdateuicontroller.h
iaupdate/IAD/ui/inc/iaupdatewaitdialog.h
iaupdate/IAD/ui/inc/iaupdatewaitdialogobserver.h
iaupdate/IAD/ui/service_conf.xml
iaupdate/IAD/ui/src/iaupdateaccesspointhandler.cpp
iaupdate/IAD/ui/src/iaupdateagreement.cpp
iaupdate/IAD/ui/src/iaupdateapplication.cpp
iaupdate/IAD/ui/src/iaupdateappui.cpp
iaupdate/IAD/ui/src/iaupdateautomaticcheck.cpp
iaupdate/IAD/ui/src/iaupdatedetailsdialog.cpp
iaupdate/IAD/ui/src/iaupdatedialogutil.cpp
iaupdate/IAD/ui/src/iaupdatedocument.cpp
iaupdate/IAD/ui/src/iaupdateengine.cpp
iaupdate/IAD/ui/src/iaupdatefwdetailsdialog.cpp
iaupdate/IAD/ui/src/iaupdatehistorycontainer.cpp
iaupdate/IAD/ui/src/iaupdatehistoryview.cpp
iaupdate/IAD/ui/src/iaupdatemain.cpp
iaupdate/IAD/ui/src/iaupdatemaincontainer.cpp
iaupdate/IAD/ui/src/iaupdatemainview.cpp
iaupdate/IAD/ui/src/iaupdatemainwindow.cpp
iaupdate/IAD/ui/src/iaupdatenavipanehandler.cpp
iaupdate/IAD/ui/src/iaupdateprogressdialog.cpp
iaupdate/IAD/ui/src/iaupdatequeryhistory.cpp
iaupdate/IAD/ui/src/iaupdateroaminghandler.cpp
iaupdate/IAD/ui/src/iaupdateserver.cpp
iaupdate/IAD/ui/src/iaupdateserviceprovider.cpp
iaupdate/IAD/ui/src/iaupdatesession.cpp
iaupdate/IAD/ui/src/iaupdatesettingdialog.cpp
iaupdate/IAD/ui/src/iaupdatestatusdialog.cpp
iaupdate/IAD/ui/src/iaupdatestatuspanehandler.cpp
iaupdate/IAD/ui/src/iaupdatetools.cpp
iaupdate/IAD/ui/src/iaupdateuicontroller.cpp
iaupdate/IAD/ui/src/iaupdatewaitdialog.cpp
iaupdate/IAD/updater/group/iaupdater.mmp
iaupdate/IAD/updater/inc/iaupdaterdialog.h
iaupdate/IAD/updater/src/iaupdaterdialog.cpp
iaupdate/group/backup_registration.xml
iaupdate/group/bld.inf
iaupdate/iaupdate.pro
iaupdate/rom/iaupdate.iby
iaupdate/rom/iaupdate_stub.SIS
iaupdate/rom/iaupdate_stub.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_01.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_02.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_03.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_04.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_05.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/pu_int_nr_option_01.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_01.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_04.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_06.pkg
installationservices/switestfw/inc_private/captestframeworkserver.h
installationservices/switestfw/inc_private/captestframeworkstep.h
installationservices/switestfw/inc_private/tsecurityutils.h
installationservices/switestfw/inc_private/tsecurityutilsserver.h
installationservices/switestfw/scripts/tsecurityutils.ini
installationservices/switestfw/scripts/tsecurityutils.script
ncdengine/debuglogger/obex/inc/btservicesearcher.h
ncdengine/debuglogger/obex/src/btservicesearcher.cpp
ncdengine/debuglogger/obex/src/objectexchangeclient.cpp
ncdengine/engine/accesspointmanager/src/catalogsaccesspointmanagerimpl.cpp
ncdengine/engine/accesspointmanager/src/catalogsaccesspointsettings.cpp
ncdengine/engine/group/bld.inf
ncdengine/engine/group/catalogsdebug.mmp
ncdengine/engine/src/catalogsdebug.cpp
ncdengine/engine/src/stackpointer.cia
ncdengine/engine/src/stackpointer.s
ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp
ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp
ncdengine/provider/server/inc/ncdfavoritemanagerimpl.h
secureswitools/makekeys/group/bld.inf
secureswitools/makekeys/group/makekeys.ipr
secureswitools/makekeys/group/security_makekeys.mrp
--- a/appinstall_plat/sifui_api/bwins/sifuiu.def	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstall_plat/sifui_api/bwins/sifuiu.def	Mon May 03 12:38:03 2010 +0300
@@ -1,11 +1,15 @@
 EXPORTS
-	?ShowConfirmationL@CSifUi@@QAEHABVCAppInfo@Swi@@HPBVCApaMaskedBitmap@@ABV?$RPointerArray@VCCertificateInfo@Swi@@@@@Z @ 1 NONAME ; int CSifUi::ShowConfirmationL(class Swi::CAppInfo const &, int, class CApaMaskedBitmap const *, class RPointerArray<class Swi::CCertificateInfo> const &)
-	?Mode@CSifUi@@QAE?AW4TMode@1@XZ @ 2 NONAME ; enum CSifUi::TMode CSifUi::Mode(void)
-	?ShowCompleteL@CSifUi@@QAEXXZ @ 3 NONAME ; void CSifUi::ShowCompleteL(void)
-	?IncreaseProgressBarValueL@CSifUi@@QAEXH@Z @ 4 NONAME ; void CSifUi::IncreaseProgressBarValueL(int)
-	?ShowFailedL@CSifUi@@QAEXH@Z @ 5 NONAME ; void CSifUi::ShowFailedL(int)
-	?SetMode@CSifUi@@QAEXW4TMode@1@@Z @ 6 NONAME ; void CSifUi::SetMode(enum CSifUi::TMode)
-	?ShowProgressL@CSifUi@@QAEXABVCAppInfo@Swi@@HH@Z @ 7 NONAME ; void CSifUi::ShowProgressL(class Swi::CAppInfo const &, int, int)
-	?NewLC@CSifUi@@SAPAV1@XZ @ 8 NONAME ; class CSifUi * CSifUi::NewLC(void)
-	?NewL@CSifUi@@SAPAV1@XZ @ 9 NONAME ; class CSifUi * CSifUi::NewL(void)
+	?ShowCompleteL@CSifUi@@QAEXXZ @ 1 NONAME ; void CSifUi::ShowCompleteL(void)
+	?ShowConfirmationL@CSifUi@@QAEHABVCAppInfo@Swi@@HPBVCApaMaskedBitmap@@@Z @ 2 NONAME ; int CSifUi::ShowConfirmationL(class Swi::CAppInfo const &, int, class CApaMaskedBitmap const *)
+	?SetMemorySelectionL@CSifUi@@QAEXABV?$RArray@H@@@Z @ 3 NONAME ; void CSifUi::SetMemorySelectionL(class RArray<int> const &)
+	?SetCertificateInfoL@CSifUi@@QAEXABV?$RPointerArray@VCCertificateInfo@Swi@@@@@Z @ 4 NONAME ; void CSifUi::SetCertificateInfoL(class RPointerArray<class Swi::CCertificateInfo> const &)
+	?Mode@CSifUi@@QAE?AW4TMode@1@XZ @ 5 NONAME ; enum CSifUi::TMode CSifUi::Mode(void)
+	?IncreaseProgressBarValueL@CSifUi@@QAEXH@Z @ 6 NONAME ; void CSifUi::IncreaseProgressBarValueL(int)
+	?ShowFailedL@CSifUi@@QAEXH@Z @ 7 NONAME ; void CSifUi::ShowFailedL(int)
+	?SetMode@CSifUi@@QAEXW4TMode@1@@Z @ 8 NONAME ; void CSifUi::SetMode(enum CSifUi::TMode)
+	?ShowFailedL@CSifUi@@QAEXHABVTDesC16@@0@Z @ 9 NONAME ; void CSifUi::ShowFailedL(int, class TDesC16 const &, class TDesC16 const &)
+	?SelectedDrive@CSifUi@@QAEHAAH@Z @ 10 NONAME ; int CSifUi::SelectedDrive(int &)
+	?ShowProgressL@CSifUi@@QAEXABVCAppInfo@Swi@@HH@Z @ 11 NONAME ; void CSifUi::ShowProgressL(class Swi::CAppInfo const &, int, int)
+	?NewL@CSifUi@@SAPAV1@XZ @ 12 NONAME ; class CSifUi * CSifUi::NewL(void)
+	?NewLC@CSifUi@@SAPAV1@XZ @ 13 NONAME ; class CSifUi * CSifUi::NewLC(void)
 
--- a/appinstall_plat/sifui_api/eabi/sifuiu.def	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstall_plat/sifui_api/eabi/sifuiu.def	Mon May 03 12:38:03 2010 +0300
@@ -1,13 +1,19 @@
 EXPORTS
 	_ZN6CSifUi11ShowFailedLEi @ 1 NONAME
-	_ZN6CSifUi13ShowCompleteLEv @ 2 NONAME
-	_ZN6CSifUi13ShowProgressLERKN3Swi8CAppInfoEii @ 3 NONAME
-	_ZN6CSifUi17ShowConfirmationLERKN3Swi8CAppInfoEiPK16CApaMaskedBitmapRK13RPointerArrayINS0_16CCertificateInfoEE @ 4 NONAME
-	_ZN6CSifUi25IncreaseProgressBarValueLEi @ 5 NONAME
-	_ZN6CSifUi4ModeEv @ 6 NONAME
-	_ZN6CSifUi4NewLEv @ 7 NONAME
-	_ZN6CSifUi5NewLCEv @ 8 NONAME
-	_ZN6CSifUi7SetModeENS_5TModeE @ 9 NONAME
-	_ZTI6CSifUi @ 10 NONAME
-	_ZTV6CSifUi @ 11 NONAME
+	_ZN6CSifUi11ShowFailedLEiRK7TDesC16S2_ @ 2 NONAME
+	_ZN6CSifUi13SelectedDriveERi @ 3 NONAME
+	_ZN6CSifUi13ShowCompleteLEv @ 4 NONAME
+	_ZN6CSifUi13ShowProgressLERKN3Swi8CAppInfoEii @ 5 NONAME
+	_ZN6CSifUi17ShowConfirmationLERKN3Swi8CAppInfoEiPK16CApaMaskedBitmap @ 6 NONAME
+	_ZN6CSifUi19SetCertificateInfoLERK13RPointerArrayIN3Swi16CCertificateInfoEE @ 7 NONAME
+	_ZN6CSifUi19SetMemorySelectionLERK6RArrayIiE @ 8 NONAME
+	_ZN6CSifUi25IncreaseProgressBarValueLEi @ 9 NONAME
+	_ZN6CSifUi4ModeEv @ 10 NONAME
+	_ZN6CSifUi4NewLEv @ 11 NONAME
+	_ZN6CSifUi5NewLCEv @ 12 NONAME
+	_ZN6CSifUi7SetModeENS_5TModeE @ 13 NONAME
+	_ZTI13CSifUiPrivate @ 14 NONAME
+	_ZTI6CSifUi @ 15 NONAME
+	_ZTV13CSifUiPrivate @ 16 NONAME
+	_ZTV6CSifUi @ 17 NONAME
 
--- a/appinstall_plat/sifui_api/group/bld.inf	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstall_plat/sifui_api/group/bld.inf	Mon May 03 12:38:03 2010 +0300
@@ -23,6 +23,7 @@
 
 PRJ_EXPORTS
 ../inc/sifui.h          MW_LAYER_PLATFORM_EXPORT_PATH( sifui.h )
+../rom/sifui.iby        CORE_MW_LAYER_IBY_EXPORT_PATH( sifui.iby )
 
 PRJ_MMPFILES
 sifui.mmp
--- a/appinstall_plat/sifui_api/group/sifui.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstall_plat/sifui_api/group/sifui.mmp	Mon May 03 12:38:03 2010 +0300
@@ -29,12 +29,15 @@
 
 SOURCEPATH      ../src
 SOURCE          sifui.cpp
+SOURCE          sifuiprivate.cpp
 
 USERINCLUDE     ../inc
 MW_LAYER_SYSTEMINCLUDE
 
-LIBRARY         euser.lib		// User
-LIBRARY         HbCore.lib		// CHbDeviceDialog
-LIBRARY         apgrfx.lib		// CApaMaskedBitmap
-LIBRARY         fbscli.lib		// CFbsBitmap
+LIBRARY         euser.lib       // User
+LIBRARY         HbCore.lib      // CHbDeviceDialog
+LIBRARY         apgrfx.lib      // CApaMaskedBitmap
+LIBRARY         fbscli.lib      // CFbsBitmap
+LIBRARY         bafl.lib        // CDesC16ArrayFlat
+LIBRARY         efsrv.lib       // RFs
 
--- a/appinstall_plat/sifui_api/inc/sifui.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstall_plat/sifui_api/inc/sifui.h	Mon May 03 12:38:03 2010 +0300
@@ -16,43 +16,34 @@
 */
 
 
+/********************************************************
+ *                                                      *
+ *   WARNING - WORK-IN-PROGRESS - THIS API MAY CHANGE   *
+ *                                                      *
+ ********************************************************/
+
 #ifndef C_SIFUI_H
 #define C_SIFUI_H
 
-#include <e32base.h>                            // CActive
-#include <hb/hbcore/hbsymbiandevicedialog.h>    // MHbDeviceDialogObserver
-
-
+#include <e32base.h>                            // CBase
 
-/******************************************************************
- *                                                                *
- *   WARNING - WORK-IN-PROGRESS - THIS API CHANGES ALL THE TIME   *
- *                                                                *
- ******************************************************************/
-
-
-
-class MSifUiCertificateDetailsProvider;
-class MSifUiDrmDetailsProvider;
-class CHbDeviceDialog;
-class CHbSymbianVariantMap;
-class CActiveSchedulerWait;
+class CSifUiPrivate;
 class CApaMaskedBitmap;
-
 namespace Swi {
     class CAppInfo;
     class CCertificateInfo;
 }
 
+
 /**
  * CSifUi provides UI dialogs for SW installation. UI dialogs are
- * global and they can be used in a non-UI code (like in SIF plugins).
+ * global and they can be used in a non-UI code (like SIF plugins).
  * SW install device dialog plugin implements the UI dialogs.
  *
- * @lib SifUi.lib
+ * @lib sifui.lib
  * @since 10.1
  */
-class CSifUi : public CActive, public MHbDeviceDialogObserver
+class CSifUi : public CBase
     {
     public:     // constructor and destructor
         /**
@@ -74,50 +65,51 @@
 
     public:     // new functions
         /**
-         * Defines installation or uninstallation mode.
-         */
-        enum TMode {
-            EUnspecified = 0,
-            EInstalling = 1,
-            EUninstalling = 2
-        };
-
-        /**
-         * Defines installing or uninstalling mode. Selected mode defines
-         * the dialog titles and buttons.
-         * @param aMode - installing or uninstalling mode
-         */
-        IMPORT_C void SetMode( TMode aMode );
-
-        /**
-         * Returns the currently selected mode.
-         * @return TMode - installing or uninstalling mode
-         */
-        IMPORT_C TMode Mode();
-
-        /**
-         * Displays main installation/uninstallation confirmation query and waits
-         * for user response. Returns ETrue if user accepted the query. Confirmation
-         * dialog is left on the screen. Subsequent ShowProgressL() call replaces it's
-         * content with main progress note, and ShowFailedL() or ShowCompleteL() calls
-         * replace it's content with the error or complete dialogs.
+         * Displays main installation confirmation query and waits for user response.
+         * Returns ETrue if user accepted the query. The next ShowProgressL() call
+         * changes the dialog to installation progress note. And finally, ShowFailedL()
+         * or ShowCompleteL() changes the dialog to the final error or complete note.
+         * If the installation confirmation query should contain memory selection option,
+         * then set the selectable drives with SetMemorySelectionL() first. User selected
+         * drive can be retrieved with SelectedDrive().
          * @param aAppInfo - application information (name, version, and vendor)
-         * @param aAppSize - application size in bytes (not displayed if zero)
+         * @param aAppSize - application size in bytes, not displayed if zero
          * @param aAppIcon - application icon, default icon is displayed if NULL
-         * @param aCertificates - certificate details
          * @return TBools - ETrue if user accepted the query, EFalse otherwise
          */
         IMPORT_C TBool ShowConfirmationL( const Swi::CAppInfo& aAppInfo,
-                TInt aAppSize, const CApaMaskedBitmap* aAppIcon,
+                TInt aAppSize = 0, const CApaMaskedBitmap* aAppIcon = NULL );
+
+        /**
+         * Defines memory selection alternatives for the main installation
+         * confirmation query displayed with ShowConfirmationL() function.
+         * @param aDriveNumbers - options for memory selection
+         */
+        IMPORT_C void SetMemorySelectionL( const RArray<TInt>& aDriveNumbers );
+
+        /**
+         * Gets the selected drive where new component should be installed.
+         * Use RFs::DriveToChar() to convert the drive number to drive letter.
+         * @param aDriveNumber - selected drive number
+         * @return TInt - KErrNone if successful, otherwise Symbian error code
+         */
+        IMPORT_C TInt SelectedDrive( TInt& aDriveNumber );
+
+        /**
+         * Defines certificate details for the main installation confirmation
+         * query displayed with ShowConfirmationL() function.
+         * @param aCertificates - certificate details
+         */
+        IMPORT_C void SetCertificateInfoL(
                 const RPointerArray<Swi::CCertificateInfo>& aCertificates );
 
         /**
-         * Displays main installation/uninstallation progress note. If progress note
-         * or main confirmation query is already displayed, then updates the dialog
-         * content. Use IncreaseProgressBarValueL() to increase the progress bar value.
-         * Dialog remains still on the screen after progress bar shows full 100% value.
-         * Use ShowFailedL() or ShowCompleteL() to replace the dialog content with the
-         * final error or complete note.
+         * Displays main installation progress note. If the progress note or main
+         * confirmation query is already displayed, then updates the dialog content.
+         * Use IncreaseProgressBarValueL() to increase the progress bar value.
+         * Dialog remains on the screen after progress bar shows full 100% value.
+         * Use ShowFailedL() or ShowCompleteL() to replace the dialog content
+         * with the final error or complete note.
          * @param aAppInfo - application information (name, version, and vendor)
          * @param aAppSize - application size in bytes (not displayed if zero)
          * @param aProgressBarFinalValue - final value of the progress bar
@@ -135,49 +127,39 @@
         IMPORT_C void IncreaseProgressBarValueL( TInt aIncrement );
 
         /**
-         * Displays main installation/uninstallation complete note. Installation complete
-         * note contains button to launch application libaray.
+         * Displays main installation complete note. Installation complete note contains
+         * button to launch the application libaray to show the recently installed apps.
          */
         IMPORT_C void ShowCompleteL();
 
         /**
-         * Displays main installation/uninstallation error note. Installation error note
-         * contains button to see detailed error message.
+         * Displays main installation error note. Installation error note contains button
+         * to see detailed error message when available.
          * @param aErrorCode - error code
+         * @param aErrorMessage - localized error message to be displayed
+         * @param aErrorDetails - localized error message details (if any)
          */
-        IMPORT_C void ShowFailedL( TInt aErrorCode );
+        IMPORT_C void ShowFailedL( TInt aErrorCode, const TDesC& aErrorMessage,
+            const TDesC& aErrorDetails = KNullDesC );
+
 
-    protected:  // from CActive
-        void DoCancel();
-        void RunL();
 
-    private:    // from MHbDeviceDialogObserver
-        void DataReceived( CHbSymbianVariantMap& aData );
-        void DeviceDialogClosed( TInt aCompletionCode );
+        /** DEPRECATED -- DO NOT USE -- WILL BE REMOVED */
+        enum TMode {
+            EUnspecified = 0,
+            EInstalling = 1,
+            EUninstalling = 2
+        };
+        IMPORT_C void SetMode( TMode aMode );
+        IMPORT_C TMode Mode();
+        IMPORT_C void ShowFailedL( TInt aErrorCode );
 
     private:    // new functions
         CSifUi();
         void ConstructL();
-        void ClearParamsL();
-        void ChangeNoteTypeL( TInt aType );
-        void AddParamL( const TDesC& aKey, TInt aValue );
-        void AddParamL( const TDesC& aKey, const TDesC& aValue );
-        void AddParamsAppInfoAndSizeL( const Swi::CAppInfo& aAppInfo, TInt aAppSize );
-        void AddParamsIconL( const CApaMaskedBitmap* aIcon );
-        void AddParamsCertificatesL( const RPointerArray<Swi::CCertificateInfo>& aCertificates );
-        void DisplayDeviceDialogL();
-        TInt WaitForResponse();
-        void ResponseReceived( TInt aCompletionCode );
 
     private:    // data
-        TMode iMode;
-        CHbDeviceDialog* iDeviceDialog;
-        CHbSymbianVariantMap* iVariantMap;
-        CActiveSchedulerWait* iWait;
-        TBool iIsDisplayingDialog;
-        TInt iCompletionCode;
-        TInt iReturnValue;
-        CApaMaskedBitmap* iBitmap;
+        CSifUiPrivate* iPrivate;
     };
 
 
--- a/appinstall_plat/sifui_api/inc/sifuidefs.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstall_plat/sifui_api/inc/sifuidefs.h	Mon May 03 12:38:03 2010 +0300
@@ -36,11 +36,10 @@
 
 // Variant map keys for dialog type and title (common to all dialog types)
 _LIT( KSifUiDialogType, "type" );                   // enum TSifUiDeviceDialogType
-_LIT( KSifUiDialogMode, "mode" );                   // enum TSifUiDeviceDialogMode
 
 // Variant map keys for device dialog return values
 _LIT( KSifUiQueryAccepted, "accept" );              // boolean
-_LIT( KSifUiSelectedMemoryIndex, "memi" );          // integer
+_LIT( KSifUiSelectedMemory, "drv" );                // drive letter
 
 // Variant map keys for "confirmation query" dialog parameters
 _LIT( KSifUiApplicationName, "app" );               // descriptor
@@ -49,7 +48,7 @@
 _LIT( KSifUiApplicationVersion, "ver" );            // descriptor
 _LIT( KSifUiApplicationSize, "size" );              // integer
 _LIT( KSifUiApplicationDetails, "details" );        // descriptor array
-_LIT( KSifUiMemorySelection, "mem" );               // boolean
+_LIT( KSifUiMemorySelection, "mem" );               // descriptor (comma separated drive letters)
 _LIT( KSifUiCertificates, "cert" );                 // boolean ???
 
 // Variant map keys for "progress note" dialog parameters
@@ -59,6 +58,8 @@
 
 // Variant map keys for "error" dialog parameters
 _LIT( KSifUiErrorCode, "err" );                     // integer
+_LIT( KSifUiErrorMessage, "msg" );                  // string
+_LIT( KSifUiErrorDetails, "det" );                  // string
 
 #endif  // SIFUIDEFS_H
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstall_plat/sifui_api/inc/sifuiprivate.h	Mon May 03 12:38:03 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:  Private implementation part of the CSifUi API.
+*/
+
+
+#ifndef C_SIFUIPRIVATE_H
+#define C_SIFUIPRIVATE_H
+
+#include <e32base.h>                            // CActive
+#include <hb/hbcore/hbsymbiandevicedialog.h>    // MHbDeviceDialogObserver
+#include <bamdesca.h>                           // MDesCArray
+
+class CHbDeviceDialog;
+class CHbSymbianVariantMap;
+class CActiveSchedulerWait;
+class CApaMaskedBitmap;
+
+namespace Swi {
+    class CAppInfo;
+    class CCertificateInfo;
+}
+
+/**
+ * Private part of the SIF UI API.
+ * Only CSifUi class should use CSifUiPrivate class.
+ */
+class CSifUiPrivate : public CActive, public MHbDeviceDialogObserver
+    {
+    public:     // constructor and destructor
+        static CSifUiPrivate* NewL();
+        CSifUiPrivate::~CSifUiPrivate();
+
+    public:     // new functions
+        TBool ShowConfirmationL( const Swi::CAppInfo& aAppInfo, TInt aAppSize,
+        		const CApaMaskedBitmap* aAppIcon );
+        void SetMemorySelectionL( const RArray<TInt>& aDriveNumbers );
+        TInt SelectedDrive( TInt& aDriveNumber );
+        void SetCertificateInfoL( const RPointerArray<Swi::CCertificateInfo>& aCertificates );
+        void ShowProgressL( const Swi::CAppInfo& aAppInfo, TInt aAppSize,
+                TInt aProgressBarFinalValue );
+        void IncreaseProgressBarValueL( TInt aIncrement );
+        void ShowCompleteL();
+        void ShowFailedL( TInt aErrorCode, const TDesC& aErrorMessage,
+                const TDesC& aErrorDetails );
+
+    protected:  // from CActive
+        void DoCancel();
+        void RunL();
+
+    private:    // from MHbDeviceDialogObserver
+        void DataReceived( CHbSymbianVariantMap& aData );
+        void DeviceDialogClosed( TInt aCompletionCode );
+
+    private:    // new functions
+        CSifUiPrivate();
+        void ConstructL();
+        void ClearParamsL();
+        void ChangeNoteTypeL( TInt aType );
+        void AddParamL( const TDesC& aKey, TInt aValue );
+        void AddParamL( const TDesC& aKey, const TDesC& aValue );
+        void AddParamListL( const TDesC& aKey, const MDesCArray& aList );
+        void AddParamsAppInfoAndSizeL( const Swi::CAppInfo& aAppInfo, TInt aAppSize );
+        void AddParamsIconL( const CApaMaskedBitmap* aIcon );
+        void AddParamsCertificatesL( const RPointerArray<Swi::CCertificateInfo>& aCertificates );
+        void DisplayDeviceDialogL();
+        TInt WaitForResponse();
+        void ResponseReceived( TInt aCompletionCode );
+
+    private:    // data
+        CHbDeviceDialog* iDeviceDialog;
+        CHbSymbianVariantMap* iVariantMap;
+        CActiveSchedulerWait* iWait;
+        TBool iIsDisplayingDialog;
+        TInt iCompletionCode;
+        TInt iReturnValue;
+        CApaMaskedBitmap* iBitmap;
+        HBufC* iSelectableDrives;
+        TBool iSelectedDriveSet;
+        TChar iSelectedDrive;
+    };
+
+
+#endif  // C_SIFUIPRIVATE_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstall_plat/sifui_api/rom/sifui.iby	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* 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: ROM image files for SIF UI DLL.
+*
+*/
+
+#ifndef SIFUI_IBY
+#define SIFUI_IBY
+
+file=ABI_DIR\BUILD_DIR\sifui.dll    SHARED_LIB_DIR\sifui.dll
+
+#endif  // SIFUI_IBY
--- a/appinstall_plat/sifui_api/src/sifui.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstall_plat/sifui_api/src/sifui.cpp	Mon May 03 12:38:03 2010 +0300
@@ -16,11 +16,7 @@
 */
 
 #include "sifui.h"                              // CSifUi
-#include "sifuidefs.h"                          // SIF UI device dialog parameters
-#include <hb/hbcore/hbsymbiandevicedialog.h>    // CHbDeviceDialog
-#include <hb/hbcore/hbsymbianvariant.h>         // CHbSymbianVariantMap
-#include <swi/msisuihandlers.h>                 // Swi::CAppInfo
-#include <apgicnfl.h>                           // CApaMaskedBitmap
+#include "sifuiprivate.h"                       // CSifUiPrivate
 
 
 // ======== MEMBER FUNCTIONS ========
@@ -54,29 +50,7 @@
 //
 CSifUi::~CSifUi()
     {
-    Cancel();
-    delete iWait;
-    delete iDeviceDialog;
-    delete iVariantMap;
-    delete iBitmap;
-    }
-
-// ---------------------------------------------------------------------------
-// CSifUi::SetMode()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CSifUi::SetMode( TMode aMode )
-    {
-    iMode = aMode;
-    }
-
-// ---------------------------------------------------------------------------
-// CSifUi::Mode()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CSifUi::TMode CSifUi::Mode()
-    {
-    return iMode;
+	delete iPrivate;
     }
 
 // ---------------------------------------------------------------------------
@@ -84,28 +58,38 @@
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TBool CSifUi::ShowConfirmationL( const Swi::CAppInfo& aAppInfo,
-        TInt aAppSize, const CApaMaskedBitmap* aAppIcon,
-        const RPointerArray<Swi::CCertificateInfo>& aCertificates )
-    {
-    ChangeNoteTypeL( ESifUiConfirmationQuery );
+    TInt aAppSize, const CApaMaskedBitmap* aAppIcon )
+	{
+	return iPrivate->ShowConfirmationL( aAppInfo, aAppSize, aAppIcon );
+	}
+
+// ---------------------------------------------------------------------------
+// CSifUi::SetMemorySelectionL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CSifUi::SetMemorySelectionL( const RArray<TInt>& aDriveNumbers )
+	{
+	iPrivate->SetMemorySelectionL( aDriveNumbers );
+	}
 
-    AddParamsAppInfoAndSizeL( aAppInfo, aAppSize );
-    if( aAppIcon )
-        {
-        AddParamsIconL( aAppIcon );
-        }
-    if( aCertificates.Count() )
-        {
-        AddParamsCertificatesL( aCertificates );
-        }
+// ---------------------------------------------------------------------------
+// CSifUi::SelectedDrive()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CSifUi::SelectedDrive( TInt& aDriveNumber )
+	{
+	return iPrivate->SelectedDrive( aDriveNumber );
+	}
 
-    // TODO: send drive list for drive selection, get selected drive
-    AddParamL( KSifUiMemorySelection, ETrue );
-
-    DisplayDeviceDialogL();
-    User::LeaveIfError( WaitForResponse() );
-    return( iReturnValue == KErrNone );
-    }
+// ---------------------------------------------------------------------------
+// CSifUi::SetCertificateInfoL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CSifUi::SetCertificateInfoL(
+        const RPointerArray<Swi::CCertificateInfo>& aCertificates )
+	{
+	iPrivate->SetCertificateInfoL( aCertificates );
+	}
 
 // ---------------------------------------------------------------------------
 // CSifUi::ShowProgressL()
@@ -114,12 +98,7 @@
 EXPORT_C void CSifUi::ShowProgressL( const Swi::CAppInfo& aAppInfo,
         TInt aAppSize, TInt aProgressBarFinalValue )
     {
-    ChangeNoteTypeL( ESifUiProgressNote );
-
-    AddParamsAppInfoAndSizeL( aAppInfo, aAppSize );
-    AddParamL( KSifUiProgressNoteFinalValue, aProgressBarFinalValue );
-
-    DisplayDeviceDialogL();
+	iPrivate->ShowProgressL( aAppInfo, aAppSize, aProgressBarFinalValue );
     }
 
 // ---------------------------------------------------------------------------
@@ -128,11 +107,7 @@
 //
 EXPORT_C void CSifUi::IncreaseProgressBarValueL( TInt aNewValue )
     {
-    ChangeNoteTypeL( ESifUiProgressNote );
-
-    AddParamL( KSifUiProgressNoteValue, aNewValue );
-
-    DisplayDeviceDialogL();
+	iPrivate->IncreaseProgressBarValueL( aNewValue );
     }
 
 // ---------------------------------------------------------------------------
@@ -141,89 +116,25 @@
 //
 EXPORT_C void CSifUi::ShowCompleteL()
     {
-    ChangeNoteTypeL( ESifUiCompleteNote );
-    DisplayDeviceDialogL();
-    User::LeaveIfError( WaitForResponse() );
+	iPrivate->ShowCompleteL();
     }
 
 // ---------------------------------------------------------------------------
 // CSifUi::ShowFailedL()
 // ---------------------------------------------------------------------------
 //
-EXPORT_C void CSifUi::ShowFailedL( TInt aErrorCode )
-    {
-    ChangeNoteTypeL( ESifUiErrorNote );
-
-    AddParamL( KSifUiErrorCode, aErrorCode );
-
-    DisplayDeviceDialogL();
-    User::LeaveIfError( WaitForResponse() );
-    }
-
-// ---------------------------------------------------------------------------
-// CSifUi::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::DoCancel()
-    {
-    if( iWait && iWait->IsStarted() && iWait->CanStopNow() )
-        {
-        iCompletionCode = KErrCancel;
-        iWait->AsyncStop();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CSifUi::RunL()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::RunL()
+EXPORT_C void CSifUi::ShowFailedL( TInt aErrorCode, const TDesC& aErrorMessage,
+        const TDesC& aErrorDetails )
     {
-    if( iWait )
-        {
-        iWait->AsyncStop();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CSifUi::DataReceived()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::DataReceived( CHbSymbianVariantMap& aData )
-    {
-    const CHbSymbianVariant* acceptedVariant = aData.Get( KSifUiQueryAccepted );
-    if( acceptedVariant )
-        {
-        TBool* acceptedValue = acceptedVariant->Value<TBool>();
-        if( acceptedValue && *acceptedValue )
-            {
-            iReturnValue = KErrNone;
-            }
-        else
-            {
-            iReturnValue = KErrCancel;
-            }
-        ResponseReceived( KErrNone );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CSifUi::DeviceDialogClosed()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::DeviceDialogClosed( TInt aCompletionCode )
-    {
-    iIsDisplayingDialog = EFalse;
-    ResponseReceived( aCompletionCode );
+	iPrivate->ShowFailedL( aErrorCode, aErrorMessage, aErrorDetails );
     }
 
 // ---------------------------------------------------------------------------
 // CSifUi::CSifUi()
 // ---------------------------------------------------------------------------
 //
-CSifUi::CSifUi() : CActive( CActive::EPriorityStandard )
+CSifUi::CSifUi()
     {
-    CActiveScheduler::Add( this );
     }
 
 // ---------------------------------------------------------------------------
@@ -232,162 +143,29 @@
 //
 void CSifUi::ConstructL()
     {
-    iWait = new( ELeave ) CActiveSchedulerWait;
-    // iDeviceDialog is allocated later, first call of DisplayDeviceDialogL()
-    }
-
-// ---------------------------------------------------------------------------
-// CSifUi::ClearParamsL()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::ClearParamsL()
-    {
-    if( iVariantMap )
-        {
-        delete iVariantMap;
-        iVariantMap = NULL;
-        }
-    iVariantMap = CHbSymbianVariantMap::NewL();
-    }
-
-// ---------------------------------------------------------------------------
-// CSifUi::ChangeNoteTypeL()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::ChangeNoteTypeL( TInt aType )
-    {
-    ClearParamsL();
-    AddParamL( KSifUiDialogType, aType );
-    AddParamL( KSifUiDialogMode, iMode );
+	iPrivate = CSifUiPrivate::NewL();
     }
 
-// ---------------------------------------------------------------------------
-// CSifUi::AddParamL()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::AddParamL( const TDesC& aKey, TInt aValue )
-    {
-    CHbSymbianVariant* variant = NULL;
-    variant = CHbSymbianVariant::NewL( &aValue, CHbSymbianVariant::EInt );
-    iVariantMap->Add( aKey, variant );
-    }
+
+
 
-// ---------------------------------------------------------------------------
-// CSifUi::AddParamL()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::AddParamL( const TDesC& aKey, const TDesC& aValue )
+// DEPRECATED FUNCTIONS -- TO BE REMOVED
+
+EXPORT_C void CSifUi::SetMode( TMode /*aMode*/ )
     {
-    CHbSymbianVariant* variant = NULL;
-    variant = CHbSymbianVariant::NewL( &aValue, CHbSymbianVariant::EDes );
-    iVariantMap->Add( aKey, variant );
-    }
-
-// ---------------------------------------------------------------------------
-// CSifUi::AddParamsAppInfoAndSizeL()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::AddParamsAppInfoAndSizeL( const Swi::CAppInfo& aAppInfo, TInt aAppSize )
-    {
-    AddParamL( KSifUiApplicationName, aAppInfo.AppName() );
-    const TVersion& version( aAppInfo.AppVersion() );
-    if( version.iBuild || version.iMajor || version.iMinor )
-        {
-        AddParamL( KSifUiApplicationVersion, version.Name() );
-        }
-    if( aAppInfo.AppVendor().Length() )
-        {
-        AddParamL( KSifUiApplicationDetails, aAppInfo.AppVendor() );
-        }
-    if( aAppSize > 0 )
-        {
-        AddParamL( KSifUiApplicationSize, aAppSize );
-        }
+    User::Invariant();
     }
 
-// ---------------------------------------------------------------------------
-// CSifUi::AddParamsIconL()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::AddParamsIconL( const CApaMaskedBitmap* aIcon )
+EXPORT_C CSifUi::TMode CSifUi::Mode()
     {
-    if( aIcon )
-        {
-        if( iBitmap )
-            {
-            delete iBitmap;
-            iBitmap = NULL;
-            }
-        iBitmap = CApaMaskedBitmap::NewL( aIcon );
-
-        CHbSymbianVariant* variant = NULL;
-        TInt bitmapHandle = iBitmap->Handle();
-        variant = CHbSymbianVariant::NewL( &bitmapHandle, CHbSymbianVariant::EInt );
-        iVariantMap->Add( KSifUiApplicationIconHandle, variant );
-        TInt bitmapMaskHandle = iBitmap->Mask()->Handle();
-        variant = CHbSymbianVariant::NewL( &bitmapMaskHandle, CHbSymbianVariant::EInt );
-        iVariantMap->Add( KSifUiApplicationIconMaskHandle, variant );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CSifUi::AddParamsCertificatesL()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::AddParamsCertificatesL( const RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/ )
-    {
-    // TODO: implement
+    User::Invariant();
+    return EUnspecified;
     }
 
-// ---------------------------------------------------------------------------
-// CSifUi::DisplayDeviceDialogL()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::DisplayDeviceDialogL()
+EXPORT_C void CSifUi::ShowFailedL( TInt /*aErrorCode*/ )
     {
-    if( iDeviceDialog && iIsDisplayingDialog )
-        {
-        iDeviceDialog->Update( *iVariantMap );
-        }
-    else
-        {
-        if( !iDeviceDialog )
-            {
-            iDeviceDialog = CHbDeviceDialog::NewL();
-            }
-        iDeviceDialog->Show( KSifUiDeviceDialog, *iVariantMap, this );
-        iIsDisplayingDialog = ETrue;
-        }
+    User::Invariant();
     }
 
-// ---------------------------------------------------------------------------
-// CSifUi::WaitForResponse()
-// ---------------------------------------------------------------------------
-//
-TInt CSifUi::WaitForResponse()
-    {
-    iCompletionCode = KErrInUse;
-    iReturnValue = KErrUnknown;
-    if( !IsActive() && iWait && !iWait->IsStarted() )
-        {
-        iStatus = KRequestPending;
-        SetActive();
-        iWait->Start();
-        }
-    return iCompletionCode;
-    }
 
-// ---------------------------------------------------------------------------
-// CSifUi::ResponseReceived()
-// ---------------------------------------------------------------------------
-//
-void CSifUi::ResponseReceived( TInt aCompletionCode )
-    {
-    if( IsActive() )
-        {
-        iCompletionCode = aCompletionCode;
-        TRequestStatus* status( &iStatus );
-        User::RequestComplete( status, KErrNone );
-        }
-    }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstall_plat/sifui_api/src/sifuiprivate.cpp	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,444 @@
+/*
+* 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 RSifUiCli class.
+*
+*/
+
+#include "sifuiprivate.h"                       // CSifUiPrivate
+#include "sifuidefs.h"                          // SIF UI device dialog parameters
+#include <hb/hbcore/hbsymbiandevicedialog.h>    // CHbDeviceDialog
+#include <hb/hbcore/hbsymbianvariant.h>         // CHbSymbianVariantMap
+#include <swi/msisuihandlers.h>                 // Swi::CAppInfo
+#include <apgicnfl.h>                           // CApaMaskedBitmap
+
+const TInt KDriveLettersLen = 32;
+
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::NewL()
+// ---------------------------------------------------------------------------
+//
+CSifUiPrivate* CSifUiPrivate::NewL()
+    {
+    CSifUiPrivate* self = new( ELeave ) CSifUiPrivate();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::~CSifUiPrivate()
+// ---------------------------------------------------------------------------
+//
+CSifUiPrivate::~CSifUiPrivate()
+    {
+    Cancel();
+    delete iWait;
+    delete iDeviceDialog;
+    delete iVariantMap;
+    delete iBitmap;
+    delete iSelectableDrives;
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::ShowConfirmationL()
+// ---------------------------------------------------------------------------
+//
+TBool CSifUiPrivate::ShowConfirmationL( const Swi::CAppInfo& aAppInfo,
+    TInt aAppSize, const CApaMaskedBitmap* aAppIcon )
+	{
+	ChangeNoteTypeL( ESifUiConfirmationQuery );
+
+	AddParamsAppInfoAndSizeL( aAppInfo, aAppSize );
+	if( aAppIcon )
+		{
+		AddParamsIconL( aAppIcon );
+		}
+	if( iSelectableDrives )
+		{
+		AddParamL( KSifUiMemorySelection, *iSelectableDrives );
+		}
+
+	DisplayDeviceDialogL();
+	User::LeaveIfError( WaitForResponse() );
+	return( iReturnValue == KErrNone );
+	}
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::SetMemorySelectionL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::SetMemorySelectionL( const RArray<TInt>& aDriveNumbers )
+	{
+	if( iSelectableDrives )
+		{
+		delete iSelectableDrives;
+		iSelectableDrives = NULL;
+		}
+
+	TInt driveCount = aDriveNumbers.Count();
+	if( driveCount > 0 )
+		{
+		const TChar KComma = ',';
+		TBuf<KDriveLettersLen> driveList;
+		for( TInt index = 0; index < driveCount; ++index )
+			{
+			TChar driveLetter;
+			TInt err = RFs::DriveToChar( aDriveNumbers[ index ], driveLetter );
+			if( !err )
+				{
+				driveList.Append( driveLetter );
+				driveList.Append( KComma );
+				}
+			}
+		iSelectableDrives = driveList.AllocL();
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::SelectedDrive()
+// ---------------------------------------------------------------------------
+//
+TInt CSifUiPrivate::SelectedDrive( TInt& aDriveNumber )
+	{
+    if( iSelectedDriveSet )
+        {
+        return RFs::CharToDrive( iSelectedDrive, aDriveNumber );
+        }
+    return KErrNotFound;
+	}
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::SetCertificateInfoL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::SetCertificateInfoL(
+        const RPointerArray<Swi::CCertificateInfo>& aCertificates )
+	{
+   if( aCertificates.Count() )
+		{
+		AddParamsCertificatesL( aCertificates );
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::ShowProgressL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::ShowProgressL( const Swi::CAppInfo& aAppInfo,
+        TInt aAppSize, TInt aProgressBarFinalValue )
+    {
+    ChangeNoteTypeL( ESifUiProgressNote );
+
+    AddParamsAppInfoAndSizeL( aAppInfo, aAppSize );
+    AddParamL( KSifUiProgressNoteFinalValue, aProgressBarFinalValue );
+
+    DisplayDeviceDialogL();
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::IncreaseProgressBarValueL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::IncreaseProgressBarValueL( TInt aNewValue )
+    {
+    ChangeNoteTypeL( ESifUiProgressNote );
+
+    AddParamL( KSifUiProgressNoteValue, aNewValue );
+
+    DisplayDeviceDialogL();
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::ShowCompleteL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::ShowCompleteL()
+    {
+    ChangeNoteTypeL( ESifUiCompleteNote );
+    DisplayDeviceDialogL();
+    User::LeaveIfError( WaitForResponse() );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::ShowFailedL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::ShowFailedL( TInt aErrorCode, const TDesC& aErrorMessage,
+        const TDesC& aErrorDetails )
+    {
+    ChangeNoteTypeL( ESifUiErrorNote );
+
+    AddParamL( KSifUiErrorCode, aErrorCode );
+    AddParamL( KSifUiErrorMessage, aErrorMessage );
+    if( aErrorDetails != KNullDesC )
+        {
+        AddParamL( KSifUiErrorDetails, aErrorDetails );
+        }
+
+    DisplayDeviceDialogL();
+    User::LeaveIfError( WaitForResponse() );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::DoCancel()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::DoCancel()
+    {
+    if( iWait && iWait->IsStarted() && iWait->CanStopNow() )
+        {
+        iCompletionCode = KErrCancel;
+        iWait->AsyncStop();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::RunL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::RunL()
+    {
+    if( iWait )
+        {
+        iWait->AsyncStop();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::DataReceived()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::DataReceived( CHbSymbianVariantMap& aData )
+    {
+    const CHbSymbianVariant* selectedDriveVariant = aData.Get( KSifUiSelectedMemory );
+    if( selectedDriveVariant )
+    	{
+		iSelectedDrive = *( selectedDriveVariant->Value<TChar>() );
+		iSelectedDriveSet = ETrue;
+    	}
+
+    const CHbSymbianVariant* acceptedVariant = aData.Get( KSifUiQueryAccepted );
+    if( acceptedVariant )
+        {
+        TBool* acceptedValue = acceptedVariant->Value<TBool>();
+        if( acceptedValue && *acceptedValue )
+            {
+            iReturnValue = KErrNone;
+            }
+        else
+            {
+            iReturnValue = KErrCancel;
+            }
+        ResponseReceived( KErrNone );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::DeviceDialogClosed()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::DeviceDialogClosed( TInt aCompletionCode )
+    {
+    iIsDisplayingDialog = EFalse;
+    ResponseReceived( aCompletionCode );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::CSifUiPrivate()
+// ---------------------------------------------------------------------------
+//
+CSifUiPrivate::CSifUiPrivate() : CActive( CActive::EPriorityStandard )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::ConstructL()
+    {
+    iWait = new( ELeave ) CActiveSchedulerWait;
+    // iDeviceDialog is allocated later, first call of DisplayDeviceDialogL()
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::ClearParamsL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::ClearParamsL()
+    {
+    if( iVariantMap )
+        {
+        delete iVariantMap;
+        iVariantMap = NULL;
+        }
+    iVariantMap = CHbSymbianVariantMap::NewL();
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::ChangeNoteTypeL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::ChangeNoteTypeL( TInt aType )
+    {
+    ClearParamsL();
+    AddParamL( KSifUiDialogType, aType );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::AddParamL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::AddParamL( const TDesC& aKey, TInt aValue )
+    {
+    CHbSymbianVariant* variant = NULL;
+    variant = CHbSymbianVariant::NewL( &aValue, CHbSymbianVariant::EInt );
+    iVariantMap->Add( aKey, variant );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::AddParamL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::AddParamL( const TDesC& aKey, const TDesC& aValue )
+    {
+    CHbSymbianVariant* variant = NULL;
+    variant = CHbSymbianVariant::NewL( &aValue, CHbSymbianVariant::EDes );
+    iVariantMap->Add( aKey, variant );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::AddParamListL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::AddParamListL( const TDesC& aKey, const MDesCArray& aList )
+    {
+    CHbSymbianVariant* variant = NULL;
+    variant = CHbSymbianVariant::NewL( &aList, CHbSymbianVariant::EDesArray );
+    iVariantMap->Add( aKey, variant );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::AddParamsAppInfoAndSizeL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::AddParamsAppInfoAndSizeL( const Swi::CAppInfo& aAppInfo, TInt aAppSize )
+    {
+    AddParamL( KSifUiApplicationName, aAppInfo.AppName() );
+    const TVersion& version( aAppInfo.AppVersion() );
+    if( version.iBuild || version.iMajor || version.iMinor )
+        {
+        AddParamL( KSifUiApplicationVersion, version.Name() );
+        }
+    if( aAppInfo.AppVendor().Length() )
+        {
+        AddParamL( KSifUiApplicationDetails, aAppInfo.AppVendor() );
+        }
+    if( aAppSize > 0 )
+        {
+        AddParamL( KSifUiApplicationSize, aAppSize );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::AddParamsIconL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::AddParamsIconL( const CApaMaskedBitmap* aIcon )
+    {
+    if( aIcon )
+        {
+        if( iBitmap )
+            {
+            delete iBitmap;
+            iBitmap = NULL;
+            }
+        iBitmap = CApaMaskedBitmap::NewL( aIcon );
+
+        CHbSymbianVariant* variant = NULL;
+        TInt bitmapHandle = iBitmap->Handle();
+        variant = CHbSymbianVariant::NewL( &bitmapHandle, CHbSymbianVariant::EInt );
+        iVariantMap->Add( KSifUiApplicationIconHandle, variant );
+        TInt bitmapMaskHandle = iBitmap->Mask()->Handle();
+        variant = CHbSymbianVariant::NewL( &bitmapMaskHandle, CHbSymbianVariant::EInt );
+        iVariantMap->Add( KSifUiApplicationIconMaskHandle, variant );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::AddParamsCertificatesL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::AddParamsCertificatesL( const RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/ )
+    {
+    // TODO: implement
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::DisplayDeviceDialogL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::DisplayDeviceDialogL()
+    {
+    if( iDeviceDialog && iIsDisplayingDialog )
+        {
+        iDeviceDialog->Update( *iVariantMap );
+        }
+    else
+        {
+        if( !iDeviceDialog )
+            {
+            iDeviceDialog = CHbDeviceDialog::NewL();
+            }
+        iDeviceDialog->Show( KSifUiDeviceDialog, *iVariantMap, this );
+        iIsDisplayingDialog = ETrue;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::WaitForResponse()
+// ---------------------------------------------------------------------------
+//
+TInt CSifUiPrivate::WaitForResponse()
+    {
+    iCompletionCode = KErrInUse;
+    iReturnValue = KErrUnknown;
+    if( !IsActive() && iWait && !iWait->IsStarted() )
+        {
+        iStatus = KRequestPending;
+        SetActive();
+        iWait->Start();
+        }
+    return iCompletionCode;
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::ResponseReceived()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::ResponseReceived( TInt aCompletionCode )
+    {
+    if( IsActive() )
+        {
+        iCompletionCode = aCompletionCode;
+        TRequestStatus* status( &iStatus );
+        User::RequestComplete( status, KErrNone );
+        }
+    }
+
--- a/appinstaller/AppinstUi/Daemon/Inc/DialogWrapper.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Inc/DialogWrapper.h	Mon May 03 12:38:03 2010 +0300
@@ -22,10 +22,14 @@
 //  INCLUDES
 #include <e32base.h>
 #include <f32file.h>
+
 // TODO probably removed in 10.1
 // #include <barsc.h>
 #include "dialogwatcher.h"
 
+class CHbDeviceProgressDialogSymbian;
+class CHbDeviceNotificationDialogSymbian;
+
 namespace Swi
 {
 
@@ -107,12 +111,16 @@
         HBufC* ReadResourceLC( TInt aResourceId );        
 
     private: //  Data
-
-        //RResourceFile iResourceFile;        
+          
         RFs& iFs;        
         TInt iNoteId;  
         TInt iDisableAllNotes;
         CDialogWatcher* iWatcher;
+        
+        TBool iIsProgressDialog;
+        CHbDeviceProgressDialogSymbian* iHbProgressDialog;
+        TBool iIsUninstallerProgressDialog;                    
+        CHbDeviceProgressDialogSymbian* iHbProgressDialogForUninstaller;                
     };
 }
 
--- a/appinstaller/AppinstUi/Daemon/Inc/SilentLauncher.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Inc/SilentLauncher.h	Mon May 03 12:38:03 2010 +0300
@@ -56,7 +56,17 @@
         * @param aFile - Name of the file to install
         * @param aStatus - Request status
         */
-        void InstallL( const TDesC& aFile, TRequestStatus& aStatus );
+       // void InstallL( const TDesC& aFile, TRequestStatus& aStatus );
+ 
+        /**
+        * Perform installation with file handle.
+        * @since 10.1
+        * @param aFileHandle - Handle of the file to be installed 
+        * @param aStatus - Request status
+        */
+        void InstallL( RFile& aFileHandle, 
+                       const TDesC& aFile, 
+                       TRequestStatus& aStatus );
 
         /**
         * Cancel the current installation.
@@ -88,7 +98,9 @@
         // File server
         RFs& iFs;
         // Defines if we have connected to SWI server.
-        TBool iConnected;                    
+        TBool iConnected;   
+        
+        HBufC* iDrive;
     };
 }
 
--- a/appinstaller/AppinstUi/Daemon/Inc/daemonbehaviour.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Inc/daemonbehaviour.h	Mon May 03 12:38:03 2010 +0300
@@ -117,12 +117,7 @@
      */
     void ProcessPreinstalledFilesL(TInt aDrive, const TDesC& aDirectory);
     
-    /**
-     * Update component status to SCR and AppArc.
-     *
-     * @param aChangeType Defines if drive is mounted or unmounted.
-     * @param aDrive Drive which is mounted or unmounted.
-     */    
+    
     void UpdateComponentStatusL( TChangeType aChangeType, TInt aDrive );
 
           
--- a/appinstaller/AppinstUi/Daemon/Inc/daemoninstaller.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Inc/daemoninstaller.h	Mon May 03 12:38:03 2010 +0300
@@ -176,7 +176,7 @@
         /**
         * Indicates if this package is valid.
         */
-        TBool IsValidPackageL( const TDesC& aPackageName );      
+        TBool IsValidPackageL();      
         	          
 	
     private:
@@ -212,6 +212,9 @@
         CProgramStatus* iProgramStatus;   
         // For plugin support
         TBool iUpdateCache;
+        // File handle for USIF.
+        RFile iSisFileHandle;
+        TBool iFileOpen;
     };		
 }
 
--- a/appinstaller/AppinstUi/Daemon/Inc/silentuninstaller.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Inc/silentuninstaller.h	Mon May 03 12:38:03 2010 +0300
@@ -62,7 +62,7 @@
         void UninstallL(         
                 TUid& aUid, 
                 TRequestStatus& aReqStatus, 
-                TDesC8& aMIME  );
+                TDesC& aMIME  );
 
         /**
          * Cancel the current installation.        
--- a/appinstaller/AppinstUi/Daemon/Inc/uninstaller.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Inc/uninstaller.h	Mon May 03 12:38:03 2010 +0300
@@ -163,7 +163,7 @@
         // Uninstaller dialog.        
         CDialogWrapper* iDialogs;
         // Descriptor for mime type.
-        HBufC8* iMime;                 
+        HBufC* iMime;                 
     };      
 
 } //namespace Swi
--- a/appinstaller/AppinstUi/Daemon/Src/DialogWrapper.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Src/DialogWrapper.cpp	Mon May 03 12:38:03 2010 +0300
@@ -18,21 +18,15 @@
 
 
 // INCLUDE FILES
-// TODO needs to be removed in 10.1
-//#include <AknGlobalNote.h> 
-//#include <avkon.rsg>
-// TODO maybe removed 10.1
-//#include <bautils.h>  // file operations like FileMan
-//#include <data_caging_path_literals.hrh> // resource paths
-// TODO probably not needed in QT.
-//#include <swidaemon.rsg>
-
+#include <hb/hbwidgets/hbdeviceprogressdialogsymbian.h>
+#include <hb/hbwidgets/hbdevicenotificationdialogsymbian.h>
 #include "DialogWrapper.h"
 #include "SWInstDebug.h"
 
-//_LIT( KDaemonResourceFile, "swidaemon.rsc" );
+using namespace Swi;
 
-using namespace Swi;
+//TODO: remove when HB dialogs do not crash in HW/WINS
+#define _SWIDAEMON_DISABLE_NOTES_
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -54,22 +48,14 @@
 //
 void CDialogWrapper::ConstructL()
     {
-//TODO: All resoureces nees to be rewriten for device dialogs (QT)    
-    // Get resource file path
-    //TFileName fileName;
-    //fileName.Copy( TParsePtrC( RProcess().FileName() ).Drive() );
-    //fileName.Append( KDC_RESOURCE_FILES_DIR );
-    //fileName.Append( KDaemonResourceFile );
-    
-    // Get language of resource file        
-    //BaflUtils::NearestLanguageFile( iFs, fileName );
-
-    // Open resource file
-    //iResourceFile.OpenL( iFs, fileName );
-    //iResourceFile.ConfirmSignatureL();
-  
+    iIsProgressDialog = EFalse;
+    iHbProgressDialog = NULL;
+    iIsUninstallerProgressDialog = EFalse;
+    iHbProgressDialogForUninstaller = NULL;
+                  
     // By default Daemon will show all notes.
     iDisableAllNotes = EFalse;
+    
     // Create watcher AO for PS Key.
     iWatcher = CDialogWatcher::NewL( this );   
     // Get current PS Key 
@@ -104,8 +90,8 @@
 //    
 CDialogWrapper::~CDialogWrapper()
     {
-    //iResourceFile.Close();
-    
+    delete iHbProgressDialog;
+    delete iHbProgressDialogForUninstaller;                          
     if ( iWatcher )
         {
         iWatcher->StopWatcher();
@@ -121,17 +107,39 @@
 // 
 void CDialogWrapper::ShowUntrustedResultL()
     {
-    //TODO: All resoureces nees to be rewriten for device dialogs (QT)    
+    FLOG( _L("Daemon: CDialogWrapper::ShowUntrustedResultL") );
+
+#ifdef _SWIDAEMON_DISABLE_NOTES_
+    FLOG( _L("Daemon: CDialogWrapper: iDisableAllNotes = ETrue") );
+    iDisableAllNotes = ETrue;
+#endif      
+      
     // Let watcher to know that waiting note is canceled.
-    //iWatcher->CancelNoteRequest();
+    iWatcher->CancelNoteRequest();            
+        
+    // Inform watcher that we have request to show note. 
+    iWatcher->CancelNoteRequest();   
     
-    //if ( iDisableAllNotes == EFalse )
-    //    {    
-    //    HBufC* string = ReadResourceLC( R_DAEMON_UNTRUSTED_FOUND );    
-    //    CAknGlobalNote* note = CAknGlobalNote::NewLC();
-    //    note->ShowNoteL( EAknGlobalInformationNote, *string );   
-    //    CleanupStack::PopAndDestroy( 2, string ); 
-    //    }
+    if ( iDisableAllNotes == EFalse )
+        {    
+        CHbDeviceNotificationDialogSymbian* notificationDialog = 
+                CHbDeviceNotificationDialogSymbian::NewL( NULL );
+        
+        CleanupStack::PushL( notificationDialog );
+        
+//TODO get string from log file.  
+        _LIT( KTempIconText,"note_info");
+        _LIT( KTempTextTitle,"SW Silent Installer" );
+        _LIT( KTempTextForErrorMessage,"Untrusted software was found." ); 
+                     
+        //notificationDialog->SetTimeout( KHbLongNotificationDialogTimeout );        
+        
+        notificationDialog->NotificationL( KTempIconText, 
+                                           KTempTextTitle , 
+                                           KTempTextForErrorMessage );
+                    
+        CleanupStack::PopAndDestroy( notificationDialog );        
+        }   
     }
 
 // -----------------------------------------------------------------------------
@@ -142,18 +150,35 @@
 // 
 void CDialogWrapper::ShowErrorResultL()
     { 
-    //TODO: All resoureces nees to be rewriten for device dialogs (QT)   
-    // Let watcher to know that waiting note is canceled.
+    FLOG( _L("Daemon: CDialogWrapper::ShowErrorResultL") );
+    
+#ifdef _SWIDAEMON_DISABLE_NOTES_
+    FLOG( _L("Daemon: CDialogWrapper: iDisableAllNotes = ETrue") );
+    iDisableAllNotes = ETrue;
+#endif  
+    
+    // Inform watcher that we have request to show note. 
     iWatcher->CancelNoteRequest();   
     
     if ( iDisableAllNotes == EFalse )
-        {
-        /*
-        HBufC* string = ReadResourceLC( R_DAEMON_INSTALLATION_ERROR );    
-        CAknGlobalNote* note = CAknGlobalNote::NewLC();
-        note->ShowNoteL( EAknGlobalInformationNote, *string );   
-        CleanupStack::PopAndDestroy( 2, string );
-        */  
+        {    
+        CHbDeviceNotificationDialogSymbian* notificationDialog = 
+                CHbDeviceNotificationDialogSymbian::NewL( NULL );
+        
+        CleanupStack::PushL( notificationDialog );
+        
+//TODO get string from log file.  
+        _LIT( KTempIconText,"note_info");
+        _LIT( KTempTextTitle,"SW Silent Installer" );
+        _LIT( KTempTextForErrorMessage,"Installation was not completed." ); 
+                   
+        //notificationDialog->SetTimeout( KHbLongNotificationDialogTimeout );        
+        
+        notificationDialog->NotificationL( KTempIconText, 
+                                           KTempTextTitle , 
+                                           KTempTextForErrorMessage );
+               
+        CleanupStack::PopAndDestroy( notificationDialog ); 
         }
     }
 
@@ -165,19 +190,28 @@
 // 
 void CDialogWrapper::ShowWaitingNoteL()
 	{
-    //TODO: All resoureces nees to be rewriten for device dialogs (QT)   
+    FLOG( _L("Daemon: CDialogWrapper::ShowWaitingNoteL") );
+    
+#ifdef _SWIDAEMON_DISABLE_NOTES_
+    FLOG( _L("Daemon: CDialogWrapper: iDisableAllNotes = ETrue") );
+    iDisableAllNotes = ETrue;
+#endif
+    
     if ( iDisableAllNotes == EFalse )
-        {
-        /*
-        if ( iNoteId == 0 )
-            {            
-            HBufC* string = ReadResourceLC( R_DAEMON_INSTALLING );   
-            CAknGlobalNote* note = CAknGlobalNote::NewLC();
-            note->SetSoftkeys( R_AVKON_SOFTKEYS_EMPTY );
-            iNoteId = note->ShowNoteL( EAknGlobalWaitNote, *string );
-            CleanupStack::PopAndDestroy( 2, string );           
+        {          
+        if ( !iIsProgressDialog )
+            {    
+            iHbProgressDialog = CHbDeviceProgressDialogSymbian::NewL( 
+                                   CHbDeviceProgressDialogSymbian::EWaitDialog, 
+                                   NULL );
+            iIsProgressDialog = ETrue;
+            
+//TODO get string from log file.            
+            _LIT( KTempTextForProgressDialog,"Installing" );
+            
+            iHbProgressDialog->SetTextL( KTempTextForProgressDialog );            
+            iHbProgressDialog->ShowL();
             }
-        */    
         }
     else if ( iDisableAllNotes )
         {
@@ -194,17 +228,17 @@
 // -----------------------------------------------------------------------------
 // 
 void CDialogWrapper::CancelWaitingNoteL()
-	{
-    //TODO: All resoureces nees to be rewriten for device dialogs (QT)   
-    /*
-	if ( iNoteId )
+	{ 
+    FLOG( _L("Daemon: CDialogWrapper::CancelWaitingNoteL") );
+    
+	if ( iIsProgressDialog )
 		{
-		CAknGlobalNote* note = CAknGlobalNote::NewLC();
-		note->CancelNoteL( iNoteId );
-		iNoteId = 0;
-		CleanupStack::PopAndDestroy();
+		iHbProgressDialog->Cancel();
+		delete iHbProgressDialog;
+		iHbProgressDialog = NULL;
+		iIsProgressDialog = EFalse;
 		}
-	*/	
+		
     // Let watcher to know that waiting note is canceled.
 	iWatcher->CancelNoteRequest();
  	}
@@ -215,18 +249,9 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 // 
-HBufC* CDialogWrapper::ReadResourceLC( TInt aResourceId )
+HBufC* CDialogWrapper::ReadResourceLC( TInt /*aResourceId*/ )
     {
-    //TODO: All resoureces nees to be rewriten for device dialogs (QT)   
-    /*
-    TResourceReader reader;
-    HBufC8* buff = iResourceFile.AllocReadLC( aResourceId );    
-    reader.SetBuffer( buff );
-    HBufC* text = reader.ReadHBufCL();
-    CleanupStack::PopAndDestroy( buff );
-    CleanupStack::PushL( text );
-    return text;
-    */
+    //TODO: All resoureces nees to be rewriten for device dialogs (QT)    
     return NULL;
     }
 
@@ -247,19 +272,28 @@
 // 
 void CDialogWrapper::ShowWaitingNoteForUninstallerL()
     {
+    FLOG( _L("Daemon: CDialogWrapper::ShowWaitingNoteForUninstallerL") );
+    
+#ifdef _SWIDAEMON_DISABLE_NOTES_
+    FLOG( _L("Daemon: CDialogWrapper: iDisableAllNotes = ETrue") );
+    iDisableAllNotes = ETrue;
+#endif
+    
     //TODO: All resoureces nees to be rewriten for device dialogs (QT)   
     if ( iDisableAllNotes == EFalse )
         {
-        /*
-        if ( iNoteId == 0 )
-            {
-            HBufC* string = ReadResourceLC( R_UNINSTALLER_INSTALL );   
-            CAknGlobalNote* note = CAknGlobalNote::NewLC();
-            note->SetSoftkeys( R_AVKON_SOFTKEYS_EMPTY );
-            iNoteId = note->ShowNoteL( EAknGlobalWaitNote, *string );
-            CleanupStack::PopAndDestroy( 2, string );
+        if ( !iIsUninstallerProgressDialog )
+            {    
+            iHbProgressDialogForUninstaller = 
+                    CHbDeviceProgressDialogSymbian::NewL( 
+                                   CHbDeviceProgressDialogSymbian::EWaitDialog, 
+                                   NULL );
+            iIsUninstallerProgressDialog = ETrue;
+    //TODO get string from log file.            
+            _LIT( KTempTextForProgressDialog,"Uninstalling" );            
+            iHbProgressDialogForUninstaller->SetTextL( KTempTextForProgressDialog );            
+            iHbProgressDialogForUninstaller->ShowL();
             }
-        */    
         }
     else if ( iDisableAllNotes )
         {
--- a/appinstaller/AppinstUi/Daemon/Src/SilentLauncher.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Src/SilentLauncher.cpp	Mon May 03 12:38:03 2010 +0300
@@ -50,8 +50,9 @@
     iSifResults = Usif::COpaqueNamedParams::NewL();
     
     // Set needed parameters for silent install.
-    iSifOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue ); 
-/*    
+    FLOG( _L("Daemon: CSilentLauncher::ConstructL: InstallSilently") );
+    iSifOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue );
+
     iSifOptions->AddIntL( Usif::KSifInParam_PerformOCSP, EFalse );   
     // Note if upgrade is allowed, see NeedsInstallingL function.
     iSifOptions->AddIntL( Usif::KSifInParam_AllowUpgrade, EFalse );
@@ -65,7 +66,7 @@
     iSifOptions->AddIntL( Usif::KSifInParam_AllowDownload, ETrue );
     iSifOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, ETrue );
     iSifOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, ETrue );
-*/    
+    
 // TODO: is this defined in USIF?    
     //iSifOptions->AddIntL( Usif::KSifInParam_Languages, NULL );
     
@@ -109,7 +110,7 @@
 // -----------------------------------------------------------------------------
 //    
 CSilentLauncher::~CSilentLauncher()
-    {
+    {   
     delete iSifOptions;
     delete iSifResults;
     
@@ -117,17 +118,21 @@
         {
         iSWInstallerFW.Close();
         }
+    
+    delete iDrive;
     }
 
+
 // -----------------------------------------------------------------------------
 // CSilentLauncher::InstallL
-// Perform installation.
-// (other items were commented in a header).
+// Perform installation with file handle.
 // -----------------------------------------------------------------------------
 //
-void CSilentLauncher::InstallL( const TDesC& aFile, TRequestStatus& aStatus )
+void CSilentLauncher::InstallL( RFile& aFileHandle, 
+                                const TDesC& aFile, 
+                                TRequestStatus& aStatus )
     {
-    FLOG( _L("Daemon: CSilentLauncher::InstallL START") );
+    FLOG( _L("Daemon: CSilentLauncher::InstallL (aFileHandle) START") );
     
     if ( !iConnected )
          {
@@ -141,19 +146,21 @@
 //    iDrive = NULL;
 //    iDrive = HBufC::NewLC( 8 );
 //    TPtr drivePtr = iDrive->Des();
-//    drivePtr.Append( aFile[0] );
-    
+//     
+//    TInt driveNumber = 0;
+//    TDriveInfo driveInfo;
+//    aFileHandle.Drive( driveNumber, driveInfo );
 // TODO: how is this used? Is this drive letter?      
 //    iSifOptions->AddStringL( Usif::KSifInParam_Drive , *drive );
-//          
+                                 
     FLOG( _L("Daemon: Launch install") );
-    iSWInstallerFW.Install( aFile, 
+    iSWInstallerFW.Install( aFileHandle, 
                            *iSifOptions, 
                            *iSifResults,
                            aStatus,
                            ETrue );
     
-    FLOG( _L("Daemon: CSilentLauncher::InstallL END") );       
+    FLOG( _L("Daemon: CSilentLauncher::InstallL (aFileHandle) END") );       
     }
        
 // -----------------------------------------------------------------------------
--- a/appinstaller/AppinstUi/Daemon/Src/daemonbehaviour.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Src/daemonbehaviour.cpp	Mon May 03 12:38:03 2010 +0300
@@ -173,8 +173,10 @@
             if ( count )            
                 {                             
                 for(index = 0; index < count; index++ )
-                    {                                        
+                    {                   
                     ProcessPreinstalledFilesL(iDriveArray[index]);
+                    
+                    FLOG_1( _L("Daemon: StartInstallingL for drive: %d"), index);
                     iSisInstaller->StartInstallingL();                
                     }
                 }                
@@ -190,12 +192,7 @@
 //          
 void CDaemonBehaviour::ProcessPreinstalledFilesL(TInt aDrive)
     {
-//    _LIT( KDaemonPrivatePath,":\\private\\10202dce\\" );
-    
-    // NOTE this is only for testing since we can not use
-    // Daemon's private folder. Sifserver do not have allfiles
-    // capability currently.
-    _LIT( KDaemonPrivatePath,":\\installs\\swidaemon\\" );
+     _LIT( KDaemonPrivatePath,":\\private\\10202dce\\" );
     
 #ifndef RD_MULTIPLE_DRIVE
     iSisInstaller->Cancel();
@@ -218,7 +215,7 @@
 //        
 void CDaemonBehaviour::ProcessPreinstalledFilesL(TInt aDrive, const TDesC& aDirectory)
     {
-    FLOG( _L("Daemon: ProcessPreInstalledFilesL") );
+    FLOG_1( _L("Daemon: ProcessPreInstalledFilesL: Drive index: %d"), aDrive );
     TPath preInstalledPath;
     TChar drive;
     RFs::DriveToChar(aDrive, drive);
@@ -227,8 +224,8 @@
     
     FLOG_1( _L("Daemon: ProcessPreInstalledFilesL Getting dir %S"), &preInstalledPath );
     CDir* dir = NULL;
-    TInt err = iFs.GetDir(preInstalledPath, KEntryAttNormal, ESortNone, dir); 
-    if (err != KErrNone && err != KErrPathNotFound)
+    TInt err = iFs.GetDir( preInstalledPath, KEntryAttNormal, ESortNone, dir ); 
+    if ( err != KErrNone && err != KErrPathNotFound )
         {
         FLOG_1( _L("Daemon: ProcessPreInstalledFilesL GetDir with error %d"), err );
         User::Leave(err);
--- a/appinstaller/AppinstUi/Daemon/Src/daemoninstaller.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Src/daemoninstaller.cpp	Mon May 03 12:38:03 2010 +0300
@@ -91,12 +91,18 @@
     iFilesToInstall.ResetAndDestroy();
     iFilesToInstall.Close();
     delete iInstallLauncher;
-    delete iDialogs;  
-    iFs.Close();
-    iApaSession.Close();    
+    delete iDialogs;      
     delete iPreviouslyInstalledAppsCache;
     delete iInstallationFailedAppsCache;  
-    delete iShutdownWatcher;  
+    delete iShutdownWatcher;
+    
+    if ( iFileOpen )
+        {
+        iSisFileHandle.Close();   
+        }    
+    
+    iFs.Close();
+    iApaSession.Close();        
     }
 	
 // -----------------------------------------------------------------------
@@ -117,7 +123,8 @@
     // For uninstaller
     // SisInstaller do not own this so do not delete.     
     iProgramStatus = &aMainStatus;  
-    iUpdateCache = ETrue;       
+    iUpdateCache = ETrue;    
+    iFileOpen = EFalse;    
     }
 		
 // -----------------------------------------------------------------------
@@ -169,19 +176,21 @@
         
     if ( !iInstallLauncher )
         {
-        iInstallLauncher = CSilentLauncher::NewL( iFs );
+        iInstallLauncher = CSilentLauncher::NewL( iFs );   
+        
+        // Update cache so we do not try to start install for
+        // components which are installed. This is done always
+        // when new install session is started (e.g. after mmc insert).
+        FLOG( _L("Daemon: StartInstallingL: Update installed cache") );
+        TRAP_IGNORE( iPreviouslyInstalledAppsCache->UpdateAllL() );
+        TRAP_IGNORE( iPreviouslyInstalledAppsCache->FlushToDiskL() );         
         }   
 
     if ( iState == EDSisInstallerStateIdle )
-        {
+        {                
         // Reset the error
         iInstallErr = KErrNone; 
-        // Update cache so we do not try to start install for
-        // components which are installed.
-        FLOG( _L("Daemon: StartInstallingL: Update installed cache") );
-        TRAP_IGNORE( iPreviouslyInstalledAppsCache->UpdateAllL() );
-        TRAP_IGNORE( iPreviouslyInstalledAppsCache->FlushToDiskL() );    
-        
+          
         CompleteSelf();
         }
     }
@@ -258,7 +267,8 @@
 //
 void CSisInstaller::RunL()
     {
-    FLOG_2( _L("Daemon: Installer RunL status:%d, state:%d"), iStatus.Int(), iState );                
+    FLOG_1( _L("Daemon: Installer RunL status:%d"), iStatus.Int() );  
+    FLOG_1( _L("Daemon: Installer RunL state:%d"), iState );                
     
     // For uninstaller
     // Check that uninstaller is not running.
@@ -284,9 +294,10 @@
             // Reached when installation is completed
             case EDSisInstallerStateInstalling:
                 FLOG( _L("Daemon: RunL: EDSisInstallerStateInstalling") );
-                FLOG_1( _L("Daemon: Installation completed with %d"), iStatus.Int() );                    
-                // Installation is completed, check result
+                FLOG_1( _L("Daemon: Installation completed with %d"), 
+                        iStatus.Int() );                  
                 
+                // Installation is completed, check result                
                 if ( iStatus.Int() == SwiUI::KSWInstErrBusy )
                     {
                     FLOG( _L("Daemon: RunL: iStatus: KSWInstErrBusy") );
@@ -298,12 +309,26 @@
                     SetActive();                        
                     break;                        
                     }                
-                else if ( (iStatus.Int() == SwiUI::KSWInstErrSecurityFailure && iInstallErr == KErrNone) ||
-                          (iStatus.Int() != KErrNone && iStatus.Int() != SwiUI::KSWInstErrSecurityFailure) )
+                else if ( (iStatus.Int() == SwiUI::KSWInstErrSecurityFailure && 
+                           iInstallErr == KErrNone) ||
+                          (iStatus.Int() != KErrNone && 
+                           iStatus.Int() != SwiUI::KSWInstErrSecurityFailure) )
                     {
-                    FLOG( _L("Daemon: RunL: iStatus: KSWInstErrSecurityFailure or error") );
+                    FLOG( _L("Daemon: RunL: iStatus: error of sec. failure") );
                     iInstallErr = iStatus.Int();                        
                     }
+                
+                // Close current sisx except if installer engine is busy.
+                // If installer is busy we will try again later.
+                if ( iStatus.Int() != SwiUI::KSWInstErrBusy )
+                    {
+                    if ( iFileOpen )
+                         {
+                         FLOG_1( _L("Daemon: RunL: Close File: %S"), &iSisFile );
+                         iSisFileHandle.Close();
+                         iFileOpen = EFalse;
+                         }    
+                    }
                     
                 // Catch all installation error from SwiUI and update cache.              
                 if ( iStatus.Int() != KErrNone )
@@ -312,10 +337,11 @@
                     if ( iCurrentPackageId != TUid::Uid( NULL ) )
                         {
                         FLOG( _L("Daemon: RunL: Add UID to cache.") );                    
-                        iInstallationFailedAppsCache->AddPackageUID( iCurrentPackageId ); 
+                        iInstallationFailedAppsCache->AddPackageUID( 
+                                iCurrentPackageId ); 
                         // Clear current UID                    
                         iCurrentPackageId = TUid::Null();                     
-                        }
+                        }                                                         
                     }  
                  else
                     {
@@ -323,7 +349,8 @@
                     if ( iCurrentPackageId != TUid::Uid( NULL ) )
                         {                
                         FLOG( _L("Daemon: RunL: Add UID to cache.") );
-                        iPreviouslyInstalledAppsCache->UpdateAddL( iCurrentPackageId );                        
+                        iPreviouslyInstalledAppsCache->UpdateAddL( 
+                                iCurrentPackageId );                        
                         // Clear current UID                    
                         iCurrentPackageId = TUid::Null(); 
                         }
@@ -349,7 +376,17 @@
                 // Install a file
             case EDSisInstallerStateIdle:
                 {  
-                FLOG( _L("Daemon: RunL: EDSisInstallerStateIdle") );    
+                FLOG( _L("Daemon: RunL: EDSisInstallerStateIdle") );  
+                
+                // Make sure that current file is closed before we
+                // open new file handle.
+                if ( iFileOpen )
+                    {
+                    FLOG( _L("Daemon: RunL: StateIdle: CLOSE CURRENT FILE") );
+                    FLOG_1( _L("Daemon: RunL: Close File: %S"), &iSisFile );
+                    iSisFileHandle.Close();
+                    iFileOpen = EFalse;
+                    }    
                 
                 // Let's update installed apps cache so we do not give
                 // installed pacakges several time to plug-in. 
@@ -363,14 +400,33 @@
                     }
                 
                 if ( iFileIndex < iFilesToInstall.Count() )
-                    {             
+                    { 
+                    // Get next sisx package from array.                 
                     iSisFile.Copy( *iFilesToInstall[iFileIndex] );
-                    ++iFileIndex;
-                               
-                    // No need to install if the package has been installed 
-                    // some time in the past
-                    if ( IsValidPackageL( iSisFile ) && NeedsInstallingL( iSisFile ) )
-                        { 
+                    ++iFileIndex;    
+                    
+                    FLOG_1( _L("Daemon: RunL: Open File: %S"), &iSisFile );
+                    TInt err = KErrNone;
+                    // Let's open the file in here bacause IsValidPackageL
+                    // needs to open the file anyway.
+                    err = iSisFileHandle.Open( 
+                                       iFs, 
+                                       iSisFile, 
+                                       EFileRead | EFileShareReadersOnly );                    
+                    
+                    if ( err )
+                        {
+                        FLOG_1( _L("Daemon: File open ERROR = %d"), err );
+                        iFileOpen = EFalse;                        
+                        } 
+                    else
+                        {
+                        iFileOpen = ETrue;                    
+                        }
+                    
+                    if ( iFileOpen && IsValidPackageL() && 
+                            NeedsInstallingL( iSisFile ) )
+                        {                                           
                         // If there is plugin for SWI Daemon then let's us it.
                         // Daemon will give all files to plug-in which will 
                         // handle installation. There is not feedback so SWI 
@@ -379,8 +435,10 @@
                             {
                             // Notify plug-in if not yet done.                                                                 
                             iDaemonBehaviour->NotifyPlugin();
-                            FLOG_1( _L("Daemon: Use plugin to install: %S"), &iSisFile );                             
-                            TRAP_IGNORE( iDaemonBehaviour->RequestPluginInstall( iSisFile ) );                                                                                  
+                            FLOG_1( _L("Daemon: Use plugin to install: %S"), 
+                                    &iSisFile );                             
+                            TRAP_IGNORE( iDaemonBehaviour->RequestPluginInstall( 
+                                    iSisFile ) );                                                                                  
                             
                             // Let's continue to give all packages to plug-in. 
                             // Note that we do not have iStatus as this is not async. call 
@@ -394,22 +452,25 @@
                             }                            
                         else
                             {                                                
-                            FLOG_1( _L("Daemon: Kick off the install for %S"), &iSisFile );
-                            iInstallLauncher->InstallL( iSisFile, iStatus );
+                            FLOG_1( _L("Daemon: Start install for %S"), &iSisFile );
+                                                                                                                                                                                                                                                   
+                            iInstallLauncher->InstallL( iSisFileHandle, 
+                                                        iSisFile, 
+                                                        iStatus );
+                            
                             iDialogs->ShowWaitingNoteL(); 
                             iState = EDSisInstallerStateInstalling;                       
                             iInstallerState = iState;                                                   
-                            SetActive();
+                            SetActive();                               
                             }
                         }               
                     else
                         {                  
-                        FLOG_1( _L("Daemon: No need to install %S"), &iSisFile );                                
+                        FLOG_1( _L("Daemon: NOT INSTALLING: %S"), &iSisFile );                                                 
                         iState = EDSisInstallerStateIdle;                
                         iInstallerState = iState;                   
                         // Clear current pkg UID                    
-                        iCurrentPackageId = TUid::Null();                                   
-                        
+                        iCurrentPackageId = TUid::Null();                                                           
                         CompleteSelf();                    
                         }                        
                     }
@@ -424,13 +485,56 @@
                 break;
                 
             case EDSisInstallerStateInstallerBusy:
+                {
                 // Try to install the file again
-                FLOG( _L("Daemon: RunL: EDSisInstallerStateInstallerBusy") );  
-                FLOG_1( _L("Daemon: Kick off the install for %S"), &iSisFile );
-                iInstallLauncher->InstallL( iSisFile, iStatus );
-                iState = EDSisInstallerStateInstalling;                   
-                iInstallerState = iState;                                   
-                SetActive(); 
+                FLOG( _L("Daemon: RunL: EDSisInstallerStateInstallerBusy") ); 
+                                
+                // If file is not open, try to open it.
+                if ( !iFileOpen )
+                    {
+                    FLOG( _L("Daemon: RunL: Error file not open !") ); 
+                    FLOG_1( _L("Daemon: Open File: %S"), &iSisFile );
+                
+                    TInt err = iSisFileHandle.Open( 
+                                    iFs, 
+                                    iSisFile, 
+                                    EFileRead | EFileShareReadersOnly
+                                    /*EFileShareReadersOrWriters|EFileRead*/ ); 
+                                                           
+                    if ( err )
+                         {
+                         FLOG_1( _L("Daemon: File open ERROR = %d"), err );
+                         iFileOpen = EFalse;
+                         }
+                    else
+                        {
+                        FLOG( _L("Daemon: RunL: File open") );                     
+                        iFileOpen = ETrue;                    
+                        }
+                    }
+                
+                if ( iFileOpen )
+                    {
+                    FLOG_1( _L("Daemon: Try install again for: %S"), &iSisFile );
+                    iInstallLauncher->InstallL( iSisFileHandle,
+                                                iSisFile, 
+                                                iStatus );                
+                
+                    iState = EDSisInstallerStateInstalling;                   
+                    iInstallerState = iState;                                   
+                    SetActive(); 
+                    }
+                else
+                    {
+                    // If we cannot open the sis file let's continue
+                    // and install rest of the packages.
+                    // We can try to install this next time in boot 
+                    // or when media is mounted.
+                    iState = EDSisInstallerStateIdle;                                                 
+                    iInstallerState = iState;  
+                    CompleteSelf(); 
+                    } 
+                }
                 break;                       
                 
                 // Active object in unknown state
@@ -476,7 +580,8 @@
     {
     FLOG_1( _L("Daemon: InstallationCompleted with result = %d"), aResult );  
     iState = EDSisInstallerStateIdle;    
-    iInstallErr = KErrNone;    
+    iInstallErr = KErrNone;     
+    FLOG( _L("Daemon: InstallationCompleted: Delete iInstallLauncher") );
     delete iInstallLauncher;
     iInstallLauncher = NULL;
     // We need to update cache again in RunL if plug-in is loaded.
@@ -488,9 +593,18 @@
         {                
         iInstallerState = EDSisInstallerStateCompleted; 
         }
+    
+    // Make sure that current file is closed before exit.
+    // File may be open if this is called from RunError/DoCancel etc.
+    if ( iFileOpen )
+        {
+        FLOG( _L("Daemon: InstallationCompleted: File open - Close it !!!") );
+        iSisFileHandle.Close();
+        iFileOpen = EFalse;
+        }    
                             
     TRAP_IGNORE( iDialogs->CancelWaitingNoteL() );
-    
+        
     if ( aResult != KErrNone && 
          iSisFile.Length() > 0 && 
          IsMediaPresent( TChar( iSisFile[0] ) ) )
@@ -504,13 +618,6 @@
             TRAP_IGNORE( iDialogs->ShowErrorResultL() );
             }    
         }
-
-//TODO: remove this update. This is done in start installing !!!!     
-    //FLOG( _L("Daemon: InstallationCompleted: Update installed cache") );
-    // Update cache so we do not start to install those packages 
-    // which are installed by the user manyally. 
-    // NOTE! plugin will install stuff after this call.
-    //TRAP_IGNORE(iPreviouslyInstalledAppsCache->UpdateAllL());
     
     TRAP_IGNORE(iPreviouslyInstalledAppsCache->FlushToDiskL(););    
     TRAP_IGNORE(iInstallationFailedAppsCache->FlushToDiskL());   
@@ -650,22 +757,26 @@
 // CSisInstaller::IsValidPackageL
 // -----------------------------------------------------------------------
 //
-TBool CSisInstaller::IsValidPackageL( const TDesC& aPackageName )
+TBool CSisInstaller::IsValidPackageL()
     {
-    TBool result( EFalse );
-  
-    RFile file;
+    TBool result( EFalse ); 
+    
+    if ( !iFileOpen )
+        {
+        FLOG( _L("Daemon: IsValidPackageL: ERROR FILE NOT OPEN") );
+        return result;
+        }
+    
     TUid appUid;
     TDataType dataType;
-    User::LeaveIfError( file.Open( iFs, aPackageName, EFileRead ) );        
-    iApaSession.AppForDocument( file, appUid, dataType );
-    file.Close();
+        
+    iApaSession.AppForDocument( iSisFileHandle, appUid, dataType );
     
     if ( dataType.Des8() == SwiUI::KSisxMimeType )
         {
         result = ETrue;
-        }
-
+        }           
+           
     FLOG_1( _L("Daemon: IsValidPackageL = %d"), result );  
     return result;    
     }
--- a/appinstaller/AppinstUi/Daemon/Src/main.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Src/main.cpp	Mon May 03 12:38:03 2010 +0300
@@ -43,7 +43,16 @@
     FLOG( _L("Daemon: Rename thread to SWI Daemon") );
     // Rename thread as SWI Daemon.
     User::RenameThread( KSWIDaemonInstaller );  
-  
+
+#ifdef __WINS__   
+//TODO: this is tomprary hack since we can not show UI
+// dialogs if QT is not up in wins.
+FLOG( _L("Daemon: Let's wait QT UI to boot up in WINS env.") );   
+FLOG( _L("Daemon: Start SWI Daemon after 300 sec.") );   
+User::After( 150000000 );
+User::After( 15000000 );
+#endif  // WINS
+
     // For uninstaller
     // Set status to installing just to be sure that uninstaller 
     // do not run before installing in complete.
--- a/appinstaller/AppinstUi/Daemon/Src/previouslyInstalledAppsCache.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Src/previouslyInstalledAppsCache.cpp	Mon May 03 12:38:03 2010 +0300
@@ -88,8 +88,7 @@
 //  
 CPreviouslyInstalledAppsCache *CPreviouslyInstalledAppsCache::NewL()
 	{
-	CPreviouslyInstalledAppsCache *self = 
-	        new(ELeave)CPreviouslyInstalledAppsCache;
+	CPreviouslyInstalledAppsCache *self = new(ELeave)CPreviouslyInstalledAppsCache;
 	CleanupStack::PushL(self);
 	self->ConstructL();
 	CleanupStack::Pop(self);
@@ -113,8 +112,7 @@
 	{
     FLOG( _L("Daemon: CPreviouslyInstalledAppsCache::UpdateAllL ") );
     
-    // nb. Default constructor gives handle to current thread.
-	RThread ourThread; 
+	RThread ourThread; // nb. Default constructor gives handle to current thread.
 	
 	if( !ourThread.HasCapability(ECapabilityReadUserData, 0) )
 		{
@@ -203,27 +201,25 @@
 //  
 void CPreviouslyInstalledAppsCache::ConstructL()
 	{
-    User::LeaveIfError(iFs.Connect());
-    TInt drive = 0;
+	User::LeaveIfError(iFs.Connect());
+	TInt drive = 0;
     iFs.CharToDrive( 
             TParsePtrC( PathInfo::PhoneMemoryRootPath() ).Drive()[0], 
             drive );
     
     iFs.CreatePrivatePath( drive );
-    
-    // Read cache file
-    TRAP_IGNORE( InitFromCacheFileL() );
-    
+
+	// Read cache file
+	TRAP_IGNORE(InitFromCacheFileL());
+		
     TRAPD( err, UpdateAllL() );
-    
-    if( err == KErrNone )
+    if(err == KErrNone)
         {
-        // If we managed to scan the registry, and update the cache, 
-        // flush to disk.
+        // If we managed to scan the registry, and update the cache, flush to disk.
         TRAP_IGNORE(FlushToDiskL());
         }	
-    
-    }
+
+	}
 
 // -----------------------------------------------------------------------
 // CPreviouslyInstalledAppsCache::InitFromCacheFileL
@@ -231,34 +227,34 @@
 //  
 void CPreviouslyInstalledAppsCache::InitFromCacheFileL()
 	{
-    // Read in existing cache file.
-    RFile cacheFile;
-    TInt err = cacheFile.Open( iFs, 
+	// Read in existing cache file.
+	RFile cacheFile;
+	TInt err = cacheFile.Open( iFs, 
                                KPreInstalledApps, 
                                EFileStream|EFileRead);
-    if ( err != KErrNone )
-        {
-        return; // No existing cache file to read.
-        }
-    CleanupClosePushL( cacheFile );
-    
-    // Now read the cache
-    RFileReadStream cacheReadStream( cacheFile );
-    cacheReadStream.PushL();
-    
-    iPrevPkgUids.Reset();
-    TInt32 count( cacheReadStream.ReadInt32L() );
-    
-    for ( TInt i = 0; i < count; i++ )
-        {
-        TUid packageId;
-        packageId.iUid = cacheReadStream.ReadInt32L();
-        (void)iPrevPkgUids.InsertInSignedKeyOrder( packageId );
-        }	
-    
-    CleanupStack::PopAndDestroy(&cacheReadStream);
-    CleanupStack::PopAndDestroy(&cacheFile);
-	}
+	if ( err != KErrNone )
+		{
+			return; // No existing cache file to read.
+		}
+	CleanupClosePushL( cacheFile );
+	
+	// Now read the cache
+	RFileReadStream cacheReadStream( cacheFile );
+	cacheReadStream.PushL();
+
+	iPrevPkgUids.Reset();
+	TInt32 count( cacheReadStream.ReadInt32L() );
+
+	for ( TInt i = 0; i < count; i++ )
+		{
+		TUid packageId;
+		packageId.iUid = cacheReadStream.ReadInt32L();
+		(void)iPrevPkgUids.InsertInSignedKeyOrder( packageId );
+		}	
+	
+	CleanupStack::PopAndDestroy(&cacheReadStream);
+	CleanupStack::PopAndDestroy(&cacheFile);
+}
 
 // -----------------------------------------------------------------------
 // CPreviouslyInstalledAppsCache::FlushToDiskL
@@ -267,36 +263,32 @@
 void CPreviouslyInstalledAppsCache::FlushToDiskL()
 	{
 	// Write to disk
-    RFile cacheFile;
-    TInt err = cacheFile.Open( iFs, 
-    KPreInstalledApps, 
-    EFileStream|EFileWrite );
-    if ( err != KErrNone )
-        {
-        User::LeaveIfError( cacheFile.Create( iFs, 
-                                              KPreInstalledApps, 
-                                              EFileStream|EFileWrite) );
-        }
-    CleanupClosePushL( cacheFile );
-    
-    // Truncate file.
-    User::LeaveIfError( cacheFile.SetSize(0) );
-    
-    // Now write the cache
-    RFileWriteStream cacheWriteStream( cacheFile );
-    cacheWriteStream.PushL();
-    
-    TInt32 count( iPrevPkgUids.Count() );
-    cacheWriteStream.WriteInt32L(count);
-    
-    for ( TInt i = 0; i < count; i++ )
-        {
-        cacheWriteStream.WriteInt32L( iPrevPkgUids[i].iUid );
-        }	
-    
-    cacheWriteStream.CommitL();
-    CleanupStack::PopAndDestroy( &cacheWriteStream );
-    CleanupStack::PopAndDestroy( &cacheFile );
+	RFile cacheFile;
+	TInt err = cacheFile.Open(iFs, KPreInstalledApps, EFileStream|EFileWrite);
+	if(err != KErrNone)
+		{
+			User::LeaveIfError(cacheFile.Create(iFs, KPreInstalledApps, EFileStream|EFileWrite));
+		}
+	CleanupClosePushL(cacheFile);
+
+	// Truncate file.
+	User::LeaveIfError(cacheFile.SetSize(0));
+	
+	// Now write the cache
+	RFileWriteStream cacheWriteStream(cacheFile);
+	cacheWriteStream.PushL();
+
+	TInt32 count(iPrevPkgUids.Count());
+	cacheWriteStream.WriteInt32L(count);
+
+	for (TInt i = 0; i < count; i++)
+		{
+		cacheWriteStream.WriteInt32L(iPrevPkgUids[i].iUid);
+		}	
+	
+	cacheWriteStream.CommitL();
+	CleanupStack::PopAndDestroy(&cacheWriteStream);
+	CleanupStack::PopAndDestroy(&cacheFile);
 	}
 
 // End of file
--- a/appinstaller/AppinstUi/Daemon/Src/silentuninstaller.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Src/silentuninstaller.cpp	Mon May 03 12:38:03 2010 +0300
@@ -41,16 +41,13 @@
 //
 void CSilentUninstaller::ConstructL()
     {
-    iConnected = EFalse; 
-    
+    iConnected = EFalse;     
     iSifOptions = Usif::COpaqueNamedParams::NewL();
-    iSifResults = Usif::COpaqueNamedParams::NewL();
-    
-    // Set parameters for silent uninstall.
-    // iSifOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, ETrue );    
-    // iSifOptions->AddIntL( Usif::KSifInParam_AllowAppBreakDependency, EFalse );   
-// TODO: Should "silent install" be defined also for uninstall
-    //iSifOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue );     
+    iSifResults = Usif::COpaqueNamedParams::NewL();    
+    // Set parameters for silent uninstall.    
+    iSifOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue );       
+    iSifOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, ETrue );    
+    iSifOptions->AddIntL( Usif::KSifInParam_AllowAppBreakDependency, EFalse );     
     }
 
 
@@ -94,24 +91,21 @@
 void CSilentUninstaller::UninstallL( 
     TUid& aUid, 
     TRequestStatus& aReqStatus, 
-    TDesC8& aMIME )
+    TDesC& aMIME )
     {
     FLOG_1( _L("Daemon: UninstallL: UID = 0x%x"), aUid.iUid );
     
     if ( !iConnected )
         {               
         FLOG( _L("[CSilentUninstaller] Connect to sif installer server") );    
-        User::LeaveIfError( iSWInstallerFW.Connect() );                     
-    
+        User::LeaveIfError( iSWInstallerFW.Connect() );                         
         FLOG( _L("[CSilentUninstaller] Connect to SisRegistery") );      
-        User::LeaveIfError( iRegistrySession.Connect() );           
-        
+        User::LeaveIfError( iRegistrySession.Connect() );                   
         iConnected = ETrue;   
         }
-    
-// TODO: How is mime type set ?    
+      
     // Set MIME type.
-    //iSifOptions->AddStringL( Usif::KSifInParam_MimeType, aMIME );  
+    iSifOptions->AddStringL( Usif::KSifInParam_MimeType, aMIME );  
            
     // Usif need the component ID, so we need to map the package UID to 
     // component ID. To do this simple we need SisRegistry.           
--- a/appinstaller/AppinstUi/Daemon/Src/uninstaller.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Src/uninstaller.cpp	Mon May 03 12:38:03 2010 +0300
@@ -34,6 +34,7 @@
 using namespace Swi;
 
 const static TInt KWaitTime = 3000000; // 2 secs
+const TInt KMimeTextLength = 64;
 
 // -----------------------------------------------------------------------
 // Two phased construction
@@ -114,9 +115,13 @@
     iFs.ShareProtected();
     iUidArrayIndex = 0;
     iSilentUninstaller = NULL;
-    iState = EUninstallerStateIdle;      
-    // Alloc descriptor for mime type sis/sisx
-    iMime = SwiUI::KSisxMimeType().AllocL();      
+    iState = EUninstallerStateIdle;   
+    
+    // Alloc descriptor for mime type sis/sisx    
+    iMime = HBufC::NewL( KMimeTextLength );
+    TPtr iMimePtr = iMime->Des();
+    iMimePtr.Copy( SwiUI::KSisxMimeType );
+         
     // Note this will create new instance for dialog class and
     // also new dialog watcher AO for uninstaller.
     // Since uninstaller is used rarely this is not big issue.
--- a/appinstaller/AppinstUi/Daemon/Src/versionRevisor.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Daemon/Src/versionRevisor.cpp	Mon May 03 12:38:03 2010 +0300
@@ -45,605 +45,609 @@
 const TInt KVerRevSisVersionSame = 300;
 const TInt KVerRevSisVersionNewer = 400;
 
-using namespace Swi;
-//namespace Swi
-//    {
-// -----------------------------------------------------------------------
-// Two-phased constructor
-// -----------------------------------------------------------------------
-//    
-CVersionRevisor* CVersionRevisor::NewL( CProgramStatus& aMainStatus )
-    {
-    CVersionRevisor* self = NewLC( aMainStatus );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ------------------------------------------------------------------------
-// Two-phased constructor
-// ------------------------------------------------------------------------
-//    
-CVersionRevisor* CVersionRevisor::NewLC( CProgramStatus& aMainStatus )
-    {
-    CVersionRevisor* self = new (ELeave) CVersionRevisor;
-    CleanupStack::PushL( self );
-    self->ConstructL( aMainStatus );
-    return self;    
-    }
-  
-// -----------------------------------------------------------------------
-// 2nd constructor
-// -----------------------------------------------------------------------
-//    
-void CVersionRevisor::ConstructL( CProgramStatus& aMainStatus )
-    {
-    FLOG( _L("[VersionRev] ConstructL start") );
-    iSisUninstaller = NULL;
-    iStartupReason = KErrNone; 
-    // Note revisor do not own this instance.
-    iProgramStatus = &aMainStatus;         
-    User::LeaveIfError( iFs.Connect() );
-    // Get system startup reason.
-    TRAP_IGNORE( StartUpReasonL() );         
-    FLOG( _L("[VersionRev] ConstructL end") );
-    }
-
-// -----------------------------------------------------------------------
-// c++ destructor
-// -----------------------------------------------------------------------
-//    
-CVersionRevisor::~CVersionRevisor()
+namespace Swi
     {
-    FLOG( _L("[VersionRev] ~CVersionRevisor start") );         
-    delete iSisUninstaller;
-    iSisUninstaller = NULL;         
-    iStubDataArray.ResetAndDestroy();               
-    iFs.Close(); 
-    FLOG( _L("[VersionRev] ~CVersionRevisor end") ); 
-    }
- 
-// -----------------------------------------------------------------------
-// Starts uninstall process.
-// -----------------------------------------------------------------------
-//    
-TInt CVersionRevisor::StartProcessL()
-    {  
-    FLOG( _L("[VersionRev] StartProcessL start") );        
-    TInt err = KErrNone;
+    // -----------------------------------------------------------------------
+    // Two-phased constructor
+    // -----------------------------------------------------------------------
+    //    
+    CVersionRevisor* CVersionRevisor::NewL( CProgramStatus& aMainStatus )
+        {
+        CVersionRevisor* self = NewLC( aMainStatus );
+        CleanupStack::Pop( self );
+        return self;
+        }
+    
+    // ------------------------------------------------------------------------
+    // Two-phased constructor
+    // ------------------------------------------------------------------------
+    //    
+    CVersionRevisor* CVersionRevisor::NewLC( CProgramStatus& aMainStatus )
+        {
+        CVersionRevisor* self = new (ELeave) CVersionRevisor;
+        CleanupStack::PushL( self );
+        self->ConstructL( aMainStatus );
+        return self;    
+        }
+      
+    // -----------------------------------------------------------------------
+    // 2nd constructor
+    // -----------------------------------------------------------------------
+    //    
+    void CVersionRevisor::ConstructL( CProgramStatus& aMainStatus )
+        {
+        FLOG( _L("[VersionRev] ConstructL start") );
+        iSisUninstaller = NULL;
+        iStartupReason = KErrNone; 
+        // Note revisor do not own this instance.
+        iProgramStatus = &aMainStatus;         
+        User::LeaveIfError( iFs.Connect() );
+        // Get system startup reason.
+        TRAP_IGNORE( StartUpReasonL() );         
+        FLOG( _L("[VersionRev] ConstructL end") );
+        }
     
-    // If firmware update is done, start scan process.
-     if( iStartupReason == EFirmwareUpdate )
-          {                             
-          iSisUninstaller = 
-              CSisPkgUninstaller::NewL( *iProgramStatus, *this );  
-          
-          TRAP( err, ProcessStubFilesL() );
-          FLOG_1( _L("[VersionRev] Process stub TRAP error = %d"), err );
-           
-          TRAP( err, ProcessSisRegistryL() ); 
-          FLOG_1( _L("[VersionRev] Process sis TRAP error = %d"), err );
-           
-          iSisUninstaller->StartUninstallL();                           
-          }        
-     else
-         {
-         FLOG( _L("[VersionRev] StartProcessL: No firmware update") );
-         // Ok, no need to start process. Leave so main will call delete. 
-         User::Leave( KErrAbort );
-         }
-                                                 
-    FLOG( _L("[VersionRev] StartProcessL end") );
-    return KErrNone;
-    }
+    // -----------------------------------------------------------------------
+    // c++ destructor
+    // -----------------------------------------------------------------------
+    //    
+    CVersionRevisor::~CVersionRevisor()
+        {
+        FLOG( _L("[VersionRev] ~CVersionRevisor start") );         
+        delete iSisUninstaller;
+        iSisUninstaller = NULL;         
+        iStubDataArray.ResetAndDestroy();               
+        iFs.Close(); 
+        FLOG( _L("[VersionRev] ~CVersionRevisor end") ); 
+        }
+     
+    // -----------------------------------------------------------------------
+    // Starts uninstall process.
+    // -----------------------------------------------------------------------
+    //    
+    TInt CVersionRevisor::StartProcessL()
+        {  
+        FLOG( _L("[VersionRev] StartProcessL start") );        
+        TInt err = KErrNone;
+        
+//#ifdef _DEBUG        
+//FLOG( _L("[VersionRev] FOR TESTING: STARTUP REASON = Firmwareupdate ! ! !") );          
+//iStartupReason = EFirmwareUpdate;
+//#endif
 
-// -----------------------------------------------------------------------
-// Reads stub sis files.
-// -----------------------------------------------------------------------
-//    
-TInt CVersionRevisor::ProcessStubFilesL()
-    {  
-    FLOG( _L("[VersionRev] ProcessStubFilesL start") );
-    CDir* dir;
-    
-    TInt err = iFs.GetDir( 
-            KVerRevStubSISDir, 
-            KEntryAttNormal, 
-            ESortNone, 
-            dir );
-    
-    if ( err == KErrNone )
-        {
-        CleanupStack::PushL( dir );
+        // If firmware update is done, start scan process.
+         if( iStartupReason == EFirmwareUpdate )
+              {                             
+              iSisUninstaller = 
+                  CSisPkgUninstaller::NewL( *iProgramStatus, *this );  
+              
+              TRAP( err, ProcessStubFilesL() );
+              FLOG_1( _L("[VersionRev] Process stub TRAP error = %d"), err );
+               
+              TRAP( err, ProcessSisRegistryL() ); 
+              FLOG_1( _L("[VersionRev] Process sis TRAP error = %d"), err );
+               
+              iSisUninstaller->StartUninstallL();                           
+              }        
+         else
+             {
+             FLOG( _L("[VersionRev] StartProcessL: No firmware update") );
+             // Ok, no need to start process. Leave so main will call delete. 
+             User::Leave( KErrAbort );
+             }
+                                                     
+        FLOG( _L("[VersionRev] StartProcessL end") );
+        return KErrNone;
+        }
+   
+    // -----------------------------------------------------------------------
+    // Reads stub sis files.
+    // -----------------------------------------------------------------------
+    //    
+    TInt CVersionRevisor::ProcessStubFilesL()
+        {  
+        FLOG( _L("[VersionRev] ProcessStubFilesL start") );
+        CDir* dir;
         
-        TInt count = dir->Count();
-        FLOG_1( _L("[VersionRev] Stub count = %d"), count );
-
-        for ( TInt index = 0; index < count; index++ )
+        TInt err = iFs.GetDir( 
+                KVerRevStubSISDir, 
+                KEntryAttNormal, 
+                ESortNone, 
+                dir );
+        
+        if ( err == KErrNone )
             {
-            FLOG_1( _L("[VersionRev] Stub index = %d"), index );                                               
-            TFileName stubName;                 
-            stubName.Append( KVerRevStubSISDir );
-            stubName.Append( (*dir)[index].iName );                
-            FLOG_1( _L("[VersionRev] Stub name: %S\n "), 
-                    &(*dir)[index].iName );                
-            // Function needs to be trapped because SisController leavs 
-            // if some corrupted file is in dir etc.
-            TRAP( err, AppendStubInfoL( stubName ) );                            
-            }                       
-        CleanupStack::PopAndDestroy( dir ); 
+            CleanupStack::PushL( dir );
+            
+            TInt count = dir->Count();
+            FLOG_1( _L("[VersionRev] Stub count = %d"), count );
+
+            for ( TInt index = 0; index < count; index++ )
+                {
+                FLOG_1( _L("[VersionRev] Stub index = %d"), index );                                               
+                TFileName stubName;                 
+                stubName.Append( KVerRevStubSISDir );
+                stubName.Append( (*dir)[index].iName );                
+                FLOG_1( _L("[VersionRev] Stub name: %S\n "), 
+                        &(*dir)[index].iName );                
+                // Function needs to be trapped because SisController leavs 
+                // if some corrupted file is in dir etc.
+                TRAP( err, AppendStubInfoL( stubName ) );                            
+                }                       
+            CleanupStack::PopAndDestroy( dir ); 
+            }
+        
+        FLOG( _L("[VersionRev] ProcessStubFilesL end") );         
+        return err;
         }
     
-    FLOG( _L("[VersionRev] ProcessStubFilesL end") );         
-    return err;
-    }
-
-// -----------------------------------------------------------------------
-// Checks rom updates from sis registry and adds pkg UID to array for
-// uninstaller process.
-//
-// Pre contitons for uninstall is: 
-// 1. sis version is older or same as rom STUB version.
-// 2. sis has files only in C drvie.
-// 3. if sis version is same as stub version, all binary files must be
-// present in rom (z:\sys\bin).
-// Rom STUB <- SA       = uninstalled
-// Rom STUB <- SP       = no uninstall, returned drive is Z   (0x04)
-// Rom STUB <- PU       = no uninstall, returned drive is Z+C (0x2000004)
-// Rom STUB <- SA <- SP = SA is uninstalled, SP is not (n-gage) 
-// Rom STUB <- SA <- PU = uninstalled
-// Rom STUB <- SA + emped. sis = SA is uninstalled, empedded pkg is not.
-// -----------------------------------------------------------------------
-//    
-TInt CVersionRevisor::ProcessSisRegistryL()
-    {
-    FLOG( _L("[VersionRev] ProcessSisRegistryL start") );        
-    TInt stubArrayCount = iStubDataArray.Count();
-    FLOG_1( _L("[VersionRev] Stub array count = %d"), stubArrayCount );
-    
-    if ( stubArrayCount )
+    // -----------------------------------------------------------------------
+    // Checks rom updates from sis registry and adds pkg UID to array for
+    // uninstaller process.
+    //
+    // Pre contitons for uninstall is: 
+    // 1. sis version is older or same as rom STUB version.
+    // 2. sis has files only in C drvie.
+    // 3. if sis version is same as stub version, all binary files must be
+    // present in rom (z:\sys\bin).
+    // Rom STUB <- SA       = uninstalled
+    // Rom STUB <- SP       = no uninstall, returned drive is Z   (0x04)
+    // Rom STUB <- PU       = no uninstall, returned drive is Z+C (0x2000004)
+    // Rom STUB <- SA <- SP = SA is uninstalled, SP is not (n-gage) 
+    // Rom STUB <- SA <- PU = uninstalled
+    // Rom STUB <- SA + emped. sis = SA is uninstalled, empedded pkg is not.
+    // -----------------------------------------------------------------------
+    //    
+    TInt CVersionRevisor::ProcessSisRegistryL()
         {
-        Swi::RSisRegistrySession sisRegSession;                                        
-        User::LeaveIfError( sisRegSession.Connect() );                
-        CleanupClosePushL( sisRegSession );
-                           
-        Swi::RSisRegistryEntry entry;                                    
-        TInt err = KErrNone;
-                     
-        // Search correct sis pagace and open entry to it.
-        for ( TInt stubIndex = 0; stubIndex < stubArrayCount; stubIndex++ )
-            {                  
-            TUid stubUID = iStubDataArray[stubIndex]->pkgUID;                 
-            FLOG_1( _L("[VersionRev] Stub UID: 0x%x \n "), stubUID.iUid );                                                  
+        FLOG( _L("[VersionRev] ProcessSisRegistryL start") );        
+        TInt stubArrayCount = iStubDataArray.Count();
+        FLOG_1( _L("[VersionRev] Stub array count = %d"), stubArrayCount );
+        
+        if ( stubArrayCount )
+            {
+            Swi::RSisRegistrySession sisRegSession;                                        
+            User::LeaveIfError( sisRegSession.Connect() );                
+            CleanupClosePushL( sisRegSession );
+                               
+            Swi::RSisRegistryEntry entry;                                    
+            TInt err = KErrNone;
+                         
+            // Search correct sis pagace and open entry to it.
+            for ( TInt stubIndex = 0; stubIndex < stubArrayCount; stubIndex++ )
+                {                  
+                TUid stubUID = iStubDataArray[stubIndex]->pkgUID;                 
+                FLOG_1( _L("[VersionRev] Stub UID: 0x%x \n "), stubUID.iUid );                                                  
+                                
+                TBool isInstalled = sisRegSession.IsInstalledL( stubUID );
+                                                                             
+                if ( isInstalled )
+                    {                                
+                    err = entry.Open( sisRegSession, stubUID );                     
+                    
+                    if ( !err )
+                        {
+                        CleanupClosePushL( entry );                                                                                                                                                                                                                                                                                      
+                                                
+                        TUint drives = entry.InstalledDrivesL();
+                        FLOG_1( _L("[VersionRev] Installe drive: 0x%x \n "), 
+                                drives );                                                                                               
+                                                
+                        if ( drives == KVerRevDriveC )
+                            { 
+                            FLOG( _L("[VersionRev] SIS is installed to C:") );                                                        
+                            FLOG( _L("[VersionRev] Check SIS version") );
+                                                        
+                            TVersion stubVersion(
+                                    iStubDataArray[stubIndex]->major,
+                                    iStubDataArray[stubIndex]->minor,
+                                    iStubDataArray[stubIndex]->build );
+                                                     
+                            // Check sis and stub version.              
+                            TInt ver = CompareVersions( 
+                                   entry.VersionL(), 
+                                   stubVersion ); 
+                            FLOG_1( _L("[VersionRev] CompareVer.= %d "), ver );                                                                                           
+                            TBool removePkg = EFalse;
                             
-            TBool isInstalled = sisRegSession.IsInstalledL( stubUID );
-                                                                         
-            if ( isInstalled )
-                {                                
-                err = entry.Open( sisRegSession, stubUID );                     
-                
-                if ( !err )
-                    {
-                    CleanupClosePushL( entry );                                                                                                                                                                                                                                                                                      
-                                            
-                    TUint drives = entry.InstalledDrivesL();
-                    FLOG_1( _L("[VersionRev] Installe drive: 0x%x \n "), 
-                            drives );                                                                                               
-                                            
-                    if ( drives == KVerRevDriveC )
-                        { 
-                        FLOG( _L("[VersionRev] SIS is installed to C:") );                                                        
-                        FLOG( _L("[VersionRev] Check SIS version") );
-                                                    
-                        TVersion stubVersion(
-                                iStubDataArray[stubIndex]->major,
-                                iStubDataArray[stubIndex]->minor,
-                                iStubDataArray[stubIndex]->build );
-                                                 
-                        // Check sis and stub version.              
-                        TInt ver = CompareVersions( 
-                               entry.VersionL(), 
-                               stubVersion ); 
-                        FLOG_1( _L("[VersionRev] CompareVer.= %d "), ver );                                                                                           
-                        TBool removePkg = EFalse;
-                        
-                        if ( ver == KVerRevSisVersionSame )
-                            {
-                            // If version is same check that all binary 
-                            // files in rom is found. If files are missing
-                            // do not remove sis pkg.
-                            FLOG( _L("[VersionRev] Sis version same"));
-                            removePkg = AllRomBinariesFoundL( entry );
-                            }
-                        if ( ver == KVerRevSisVersionOlder )
-                            {
-                            FLOG( _L("[VersionRev] Sis version older"));
-                            removePkg = ETrue;
-                            } 
-                        
-                        // Add uid to uninstall array if removePkg is true.
-                        if ( removePkg )
-                            {                                                                   
-                            iSisUninstaller->AddUidToListL( stubUID );
-                            FLOG_1( _L("[VersionRev] Uninst. UID:0x%x"), 
-                                      stubUID.iUid );                                  
-                            } 
-                        }//if
-                    CleanupStack::PopAndDestroy(); //entry                         
-                    }//if                                                                   
-                } //if                                                                          
-            } //for  
-        CleanupStack::PopAndDestroy(); //sisRegSession
-        } //if
-      
-    return KErrNone;
-    }
+                            if ( ver == KVerRevSisVersionSame )
+                                {
+                                // If version is same check that all binary 
+                                // files in rom is found. If files are missing
+                                // do not remove sis pkg.
+                                FLOG( _L("[VersionRev] Sis version same"));
+                                removePkg = AllRomBinariesFoundL( entry );
+                                }
+                            if ( ver == KVerRevSisVersionOlder )
+                                {
+                                FLOG( _L("[VersionRev] Sis version older"));
+                                removePkg = ETrue;
+                                } 
+                            
+                            // Add uid to uninstall array if removePkg is true.
+                            if ( removePkg )
+                                {                                                                   
+                                iSisUninstaller->AddUidToListL( stubUID );
+                                FLOG_1( _L("[VersionRev] Uninst. UID:0x%x"), 
+                                          stubUID.iUid );                                  
+                                } 
+                            }//if
+                        CleanupStack::PopAndDestroy(); //entry                         
+                        }//if                                                                   
+                    } //if                                                                          
+                } //for  
+            CleanupStack::PopAndDestroy(); //sisRegSession
+            } //if
+          
+        return KErrNone;
+        }
 
-
-// -----------------------------------------------------------------------
-// This function reads firmware string and checks if firmware update has
-// been done. This function does create file to private directory and
-// saves current firmware version string to it.
-// -----------------------------------------------------------------------
-//    
-void CVersionRevisor::StartUpReasonL()
-    {          
-    FLOG( _L("[VersionRev] StartUpReasonL") );                           
-    iStartupReason = KErrNotFound;                               
-    HBufC* currentVersionString = HBufC::NewLC( KVerRevStrLength*2 );
-    TPtr currentStringPtr = currentVersionString->Des();
     
-    // Get current firmware string from sysutil. 
-    // Firmware string is saved to Z:\\resource\\versions\\sw.txt
-    SysUtil::GetSWVersion( currentStringPtr );
-    FLOG_1( _L("[VersionRev] Firmware version = %S "), 
-            &currentStringPtr );                 
-    TUint result;
-    // If private directory is not found create it. 
-    TInt err = iFs.Att( KVerRevPrivatePath, result );
-    
-    if ( ! err == KErrNone && result & KEntryAttDir )
-        {                 
-        iFs.CreatePrivatePath( EDriveC ); 
-        FLOG( _L("[VersionRev] StartUpReasonL: Create private folder") );
-        }
-           
-    RFile file; 
-    TFindFile find( iFs );                      
-    // Check if version file is found in Daemon private director.
-    err = find.FindByPath( KVerRevVersionFile(), &KVerRevPrivatePath() );
-    FLOG_1( _L("[VersionRev] StartUpReasonL: Find file = %d"), err );  
-    
-    if ( err )
-        {
-        // If file is not found this is first boot or user memory (C:) has 
-        // been formatted. No need to start version checking but let's save
-        // the current firmware version to Daemon private folder.
-        err = file.Create( 
-                iFs, 
-                KVerRevVersionFile, 
-                EFileWrite|EFileRead|EFileStreamText );
+    // -----------------------------------------------------------------------
+    // This function reads firmware string and checks if firmware update has
+    // been done. This function does create file to private directory and
+    // saves current firmware version string to it.
+    // -----------------------------------------------------------------------
+    //    
+    void CVersionRevisor::StartUpReasonL()
+        {          
+        FLOG( _L("[VersionRev] StartUpReasonL") );                           
+        iStartupReason = KErrNotFound;                               
+        HBufC* currentVersionString = HBufC::NewLC( KVerRevStrLength*2 );
+        TPtr currentStringPtr = currentVersionString->Des();
         
-        FLOG_1( _L("[VersionRev] file create err = %d"), err ); 
-        User::LeaveIfError( err );
-        
-        // Write current firmware version strign to file. 
-        WriteFileText( file, currentStringPtr );
+        // Get current firmware string from sysutil. 
+        // Firmware string is saved to Z:\\resource\\versions\\sw.txt
+        SysUtil::GetSWVersion( currentStringPtr );
+        FLOG_1( _L("[VersionRev] Firmware version = %S "), 
+                &currentStringPtr );                 
+        TUint result;
+        // If private directory is not found create it. 
+        TInt err = iFs.Att( KVerRevPrivatePath, result );
         
-        file.Flush();
-        file.Close();                        
-        }
-    else
-        {
-        
-        HBufC* previousVersionString = HBufC::NewLC( KVerRevStrLength*2 );
-        TPtr previousStringPtr = previousVersionString->Des();            
-        
-        // Open firmware version file from private directory.
-        err = file.Open( 
-                iFs, 
-                KVerRevVersionFile, 
-                EFileWrite|EFileRead|EFileStreamText );
-        
-        FLOG_1( _L("[VersionRev] file open err = %d"), err ); 
-        User::LeaveIfError( err );            
+        if ( ! err == KErrNone && result & KEntryAttDir )
+            {                 
+            iFs.CreatePrivatePath( EDriveC ); 
+            FLOG( _L("[VersionRev] StartUpReasonL: Create private folder") );
+            }
+               
+        RFile file; 
+        TFindFile find( iFs );                      
+        // Check if version file is found in Daemon private director.
+        err = find.FindByPath( KVerRevVersionFile(), &KVerRevPrivatePath() );
+        FLOG_1( _L("[VersionRev] StartUpReasonL: Find file = %d"), err );  
         
-        // Read previous firmware string from the file. 
-        ReadFileText( file, previousStringPtr );
-        FLOG_1( _L("[VersionRev] Previous sw version: %S"), 
-                &previousStringPtr ); 
-                    
-        file.Close();
-        
-        if ( previousStringPtr.Length() != 0 )
-            {                                                                             
-            // Compare firmware strings.
-            err = previousVersionString->Compare( currentStringPtr );
-            FLOG_1( _L("[VersionRev] String compare = %d"), err ); 
+        if ( err )
+            {
+            // If file is not found this is first boot or user memory (C:) has 
+            // been formatted. No need to start version checking but let's save
+            // the current firmware version to Daemon private folder.
+            err = file.Create( 
+                    iFs, 
+                    KVerRevVersionFile, 
+                    EFileWrite|EFileRead|EFileStreamText );
+            
+            FLOG_1( _L("[VersionRev] file create err = %d"), err ); 
+            User::LeaveIfError( err );
             
-            if ( err == KErrNone )
-                {  
-                // Strings are identical, no firmware update.
-                iStartupReason = KErrNone;
-                FLOG( _L("[VersionRev] iStartupReason = KErrNone") );                 
-                }
-            else
-                {
-                iStartupReason = EFirmwareUpdate;
-                FLOG( _L("[VersionRev] iStartupReason = EFirmwareUpdate") );                     
-                file.Replace(                    
+            // Write current firmware version strign to file. 
+            WriteFileText( file, currentStringPtr );
+            
+            file.Flush();
+            file.Close();                        
+            }
+        else
+            {
+            
+            HBufC* previousVersionString = HBufC::NewLC( KVerRevStrLength*2 );
+            TPtr previousStringPtr = previousVersionString->Des();            
+            
+            // Open firmware version file from private directory.
+            err = file.Open( 
                     iFs, 
                     KVerRevVersionFile, 
-                    EFileWrite|EFileStreamText );                                        
-                // Ok we have firmware update. Let's write new firmware 
-                // string to file and start version checking.
-                WriteFileText( file, currentStringPtr );                                                                                 
-                file.Flush();
-                file.Close();  
-                }
-            }            
-        CleanupStack::PopAndDestroy(); //previousVersionString  
-        }                                                                   
-    CleanupStack::PopAndDestroy( ); //currentVersionString                  
-    }
- 
-
-// -----------------------------------------------------------------------
-// Help function to read firmware version string from file.
-// -----------------------------------------------------------------------
-//  
-void CVersionRevisor::ReadFileText( RFile& aFile, TDes& aText )
-    {                        
-    TFileText fileText;
-    fileText.Set( aFile );
-    fileText.Read( aText );
+                    EFileWrite|EFileRead|EFileStreamText );
+            
+            FLOG_1( _L("[VersionRev] file open err = %d"), err ); 
+            User::LeaveIfError( err );            
+            
+            // Read previous firmware string from the file. 
+            ReadFileText( file, previousStringPtr );
+            FLOG_1( _L("[VersionRev] Previous sw version: %S"), 
+                    &previousStringPtr ); 
+                        
+            file.Close();
+            
+            if ( previousStringPtr.Length() != 0 )
+                {                                                                             
+                // Compare firmware strings.
+                err = previousVersionString->Compare( currentStringPtr );
+                FLOG_1( _L("[VersionRev] String compare = %d"), err ); 
+                
+                if ( err == KErrNone )
+                    {  
+                    // Strings are identical, no firmware update.
+                    iStartupReason = KErrNone;
+                    FLOG( _L("[VersionRev] iStartupReason = KErrNone") );                 
+                    }
+                else
+                    {
+                    iStartupReason = EFirmwareUpdate;
+                    FLOG( _L("[VersionRev] iStartupReason = EFirmwareUpdate") );                     
+                    file.Replace(                    
+                        iFs, 
+                        KVerRevVersionFile, 
+                        EFileWrite|EFileStreamText );                                        
+                    // Ok we have firmware update. Let's write new firmware 
+                    // string to file and start version checking.
+                    WriteFileText( file, currentStringPtr );                                                                                 
+                    file.Flush();
+                    file.Close();  
+                    }
+                }            
+            CleanupStack::PopAndDestroy(); //previousVersionString  
+            }                                                                   
+        CleanupStack::PopAndDestroy( ); //currentVersionString                  
+        }
      
-     // Replace new-line patterns with real ones.
-     TInt position = aText.Find( KVerRevNewLinePattern );
-     while ( position != KErrNotFound )
-         {
-         // err is a position
-         aText.Replace( 
-                 position, 
-                 KVerRevNewLinePattern().Length(), 
-                 KVerRevNewLine );
+    
+    // -----------------------------------------------------------------------
+    // Help function to read firmware version string from file.
+    // -----------------------------------------------------------------------
+    //  
+    void CVersionRevisor::ReadFileText( RFile& aFile, TDes& aText )
+        {                        
+        TFileText fileText;
+        fileText.Set( aFile );
+        fileText.Read( aText );
          
-         position = aText.Find( KVerRevNewLinePattern );
-         }                        
-    }
-
+         // Replace new-line patterns with real ones.
+         TInt position = aText.Find( KVerRevNewLinePattern );
+         while ( position != KErrNotFound )
+             {
+             // err is a position
+             aText.Replace( 
+                     position, 
+                     KVerRevNewLinePattern().Length(), 
+                     KVerRevNewLine );
+             
+             position = aText.Find( KVerRevNewLinePattern );
+             }                        
+        }
 
-// -----------------------------------------------------------------------
-// Help function to write firmware version string from file.
-// -----------------------------------------------------------------------
-//  
-void CVersionRevisor::WriteFileText( RFile& aFile, TDes& aText )
-    { 
-    // Replace real new-line marker with pattern. This makes 
-    // reading operation easy.
-    TInt position = aText.Find( KVerRevNewLine );                
-    while ( position != KErrNotFound )
-        {                
-        aText.Replace( 
-                position, 
-                KVerRevNewLine().Length(), 
-                KVerRevNewLinePattern );
-         
-         position = aText.Find( KVerRevNewLine );
-         }
-                 
-    TFileText fileText;
-    fileText.Set( aFile );
-    fileText.Write( aText );                       
-    }
     
-
-// -----------------------------------------------------------------------
-// This function reads stub sis files version and uid and adds the info
-// in array.
-// -----------------------------------------------------------------------
-//  
-void CVersionRevisor::AppendStubInfoL( TDesC& aStubName )
-    {                                             
-    CFileSisDataProvider* provider = 
-        CFileSisDataProvider::NewLC( iFs, aStubName );
-            
-    Sis::CController* stubData = Sis::CController::NewLC( *provider );
-            
-    const Sis::CVersion& version = stubData->Info().Version();
-            
-    TVersionRevStubData* stubPkg = new( ELeave ) TVersionRevStubData();
-    CleanupStack::PushL( stubPkg );        
-    stubPkg->pkgUID = stubData->Info().Uid().Uid();
-    stubPkg->major = version.Major();
-    stubPkg->minor = version.Minor();
-    stubPkg->build = version.Build();
-    
-    iStubDataArray.AppendL( stubPkg );
-    
-    CleanupStack::Pop( stubPkg );
+    // -----------------------------------------------------------------------
+    // Help function to write firmware version string from file.
+    // -----------------------------------------------------------------------
+    //  
+    void CVersionRevisor::WriteFileText( RFile& aFile, TDes& aText )
+        { 
+        // Replace real new-line marker with pattern. This makes 
+        // reading operation easy.
+        TInt position = aText.Find( KVerRevNewLine );                
+        while ( position != KErrNotFound )
+            {                
+            aText.Replace( 
+                    position, 
+                    KVerRevNewLine().Length(), 
+                    KVerRevNewLinePattern );
+             
+             position = aText.Find( KVerRevNewLine );
+             }
+                     
+        TFileText fileText;
+        fileText.Set( aFile );
+        fileText.Write( aText );                       
+        }
+        
     
-#ifdef _DEBUG  
-    RDebug::Print( _L("[VersionRev] Add Stub UID: 0x%x Ver: %d.%d.%d\n "),                  
-              stubData->Info().Uid().Uid(),
-              version.Major(),
-              version.Minor(),
-              version.Build() );        
-#endif
+    // -----------------------------------------------------------------------
+    // This function reads stub sis files version and uid and adds the info
+    // in array.
+    // -----------------------------------------------------------------------
+    //  
+    void CVersionRevisor::AppendStubInfoL( TDesC& aStubName )
+        {                                             
+        CFileSisDataProvider* provider = 
+            CFileSisDataProvider::NewLC( iFs, aStubName );
+                
+        Sis::CController* stubData = Sis::CController::NewLC( *provider );
+                
+        const Sis::CVersion& version = stubData->Info().Version();
                 
-    CleanupStack::PopAndDestroy( 2, provider );
-    provider = NULL;
-    stubData = NULL;
-    stubPkg = NULL;        
-    }
+        TVersionRevStubData* stubPkg = new( ELeave ) TVersionRevStubData();
+        CleanupStack::PushL( stubPkg );        
+        stubPkg->pkgUID = stubData->Info().Uid().Uid();
+        stubPkg->major = version.Major();
+        stubPkg->minor = version.Minor();
+        stubPkg->build = version.Build();
+        
+        iStubDataArray.AppendL( stubPkg );
+        
+        CleanupStack::Pop( stubPkg );
+        
+ #ifdef _DEBUG  
+        RDebug::Print( _L("[VersionRev] Add Stub UID: 0x%x Ver: %d.%d.%d\n "),                  
+                  stubData->Info().Uid().Uid(),
+                  version.Major(),
+                  version.Minor(),
+                  version.Build() );        
+ #endif
+                    
+        CleanupStack::PopAndDestroy( 2, provider );
+        provider = NULL;
+        stubData = NULL;
+        stubPkg = NULL;        
+        }
 
-// -----------------------------------------------------------------------    
-// This function compares sis and stub versions. 
-// -----------------------------------------------------------------------
-//   
-TInt CVersionRevisor::CompareVersions( 
-    TVersion aSisVer, 
-    TVersion aStubVer )
-    { 
-    FLOG( _L("[VersionRev] CompareVersions()") );
-                    
-    // Compare major version
-    if ( aSisVer.iMajor > aStubVer.iMajor  )
-        {
-        FLOG( _L("[VersionRev] STUB major version older ") );
-        return KVerRevSisVersionNewer;
-        }
-    // If same major version, check minor version.
-    else if ( aSisVer.iMajor == aStubVer.iMajor )
-        {                           
-        if ( aSisVer.iMinor > aStubVer.iMinor )
+    // -----------------------------------------------------------------------    
+    // This function compares sis and stub versions. 
+    // -----------------------------------------------------------------------
+    //   
+    TInt CVersionRevisor::CompareVersions( 
+        TVersion aSisVer, 
+        TVersion aStubVer )
+        { 
+        FLOG( _L("[VersionRev] CompareVersions()") );
+                        
+        // Compare major version
+        if ( aSisVer.iMajor > aStubVer.iMajor  )
             {
-            FLOG( _L("[VersionRev] STUB minor version older ") );
+            FLOG( _L("[VersionRev] STUB major version older ") );
             return KVerRevSisVersionNewer;
             }
-        // If same minor version, check build version.
-        else if ( aSisVer.iMinor == aStubVer.iMinor )
-            {
-            if ( aSisVer.iBuild > aStubVer.iBuild  )
+        // If same major version, check minor version.
+        else if ( aSisVer.iMajor == aStubVer.iMajor )
+            {                           
+            if ( aSisVer.iMinor > aStubVer.iMinor )
                 {
-                FLOG( _L("[VersionRev] STUB build version older ") );
-                return KVerRevSisVersionNewer;                        
-                }  
-            else if ( aSisVer.iBuild == aStubVer.iBuild  )
+                FLOG( _L("[VersionRev] STUB minor version older ") );
+                return KVerRevSisVersionNewer;
+                }
+            // If same minor version, check build version.
+            else if ( aSisVer.iMinor == aStubVer.iMinor )
                 {
-                // Sis build version is same as stub.
-                FLOG( _L("[VersionRev] Build version same ") );
-                return KVerRevSisVersionSame;                        
-                }                                  
-            else // build
+                if ( aSisVer.iBuild > aStubVer.iBuild  )
+                    {
+                    FLOG( _L("[VersionRev] STUB build version older ") );
+                    return KVerRevSisVersionNewer;                        
+                    }  
+                else if ( aSisVer.iBuild == aStubVer.iBuild  )
+                    {
+                    // Sis build version is same as stub.
+                    FLOG( _L("[VersionRev] Build version same ") );
+                    return KVerRevSisVersionSame;                        
+                    }                                  
+                else // build
+                    {
+                    // Sis build version is older.
+                    FLOG( _L("[VersionRev] SIS build version OLDER !") );
+                    return KVerRevSisVersionOlder;
+                    }
+                }
+            else // minor
                 {
-                // Sis build version is older.
-                FLOG( _L("[VersionRev] SIS build version OLDER !") );
+                // Sis minor version is older.
+                FLOG( _L("[VersionRev] SIS minor version OLDER !") );
                 return KVerRevSisVersionOlder;
-                }
-            }
-        else // minor
+                }            
+            }        
+        else //major
             {
-            // Sis minor version is older.
-            FLOG( _L("[VersionRev] SIS minor version OLDER !") );
+            // Sis major version is older.
+            FLOG( _L("[VersionRev] SIS major version OLDER !") );
             return KVerRevSisVersionOlder;
             }            
-        }        
-    else //major
+        }
+  
+    // -----------------------------------------------------------------------    
+    // This function check that all sis pkg's binary files are found from rom. 
+    // -----------------------------------------------------------------------
+    //     
+    TBool CVersionRevisor::AllRomBinariesFoundL( Swi::RSisRegistryEntry& aEntry )
         {
-        // Sis major version is older.
-        FLOG( _L("[VersionRev] SIS major version OLDER !") );
-        return KVerRevSisVersionOlder;
-        }            
-    }
-
-// -----------------------------------------------------------------------    
-// This function check that all sis pkg's binary files are found from rom. 
-// -----------------------------------------------------------------------
-//     
-TBool CVersionRevisor::AllRomBinariesFoundL( Swi::RSisRegistryEntry& aEntry )
-    {
-    FLOG( _L("[VersionRev] AllRomBinariesFoundL") );
-    TBool allBinaryFilesFound = EFalse;
-    TInt err = KErrNone;
-    RPointerArray<HBufC> sisFilesArray;
-    RPointerArray<HBufC> binaryFilesArray;
-            
-    // Get installed files from this entry.
-    aEntry.FilesL( sisFilesArray );
-    TInt arrayCount = sisFilesArray.Count();   
-    FLOG_1( _L("[VersionRev] Sis files count = %d"), arrayCount );
-    
-    if ( arrayCount )
-        {                                                   
-        for ( TInt index = 0; index < arrayCount; index++ )
-            {
-            // Get file path
-            HBufC* tempFilePath = sisFilesArray[index]->AllocL();
-            CleanupStack::PushL( tempFilePath );
-            FLOG_1( _L("[VersionRev] File path: %S \n"), tempFilePath );                
-            
-            // Check if file is installed to sys\bin folder.
-            // Search \sys\bin string from the descriptor's data.
-            err = tempFilePath->Find( KVerRevSysPath );
-            FLOG_1( _L("[VersionRev] Sys path found = %d"), err );
-            
-            if ( err != KErrNotFound )
-                {
-                // If binary file, add to array.
-                binaryFilesArray.Append( tempFilePath );
-                CleanupStack::Pop(); //tempFilePath
-                }
-            else
-                {
-                // Delete temp descriptor.
-                CleanupStack::PopAndDestroy( tempFilePath );
-                tempFilePath = NULL;
-                }                
-            }
+        FLOG( _L("[VersionRev] AllRomBinariesFoundL") );
+        TBool allBinaryFilesFound = EFalse;
+        TInt err = KErrNone;
+        RPointerArray<HBufC> sisFilesArray;
+        RPointerArray<HBufC> binaryFilesArray;
+                
+        // Get installed files from this entry.
+        aEntry.FilesL( sisFilesArray );
+        TInt arrayCount = sisFilesArray.Count();   
+        FLOG_1( _L("[VersionRev] Sis files count = %d"), arrayCount );
         
-        // Count how meny binary files are found.
-        TInt binaryCount = binaryFilesArray.Count();
-        FLOG_1( _L("[VersionRev] Binary files count = %d"), binaryCount );
-        if ( binaryCount )
-            {
-            TInt foundInRomCount = 0;
-            TFindFile find( iFs );
-            TParse stringParser;                
-            TFileName binaryFileNameAndExt;
+        if ( arrayCount )
+            {                                                   
+            for ( TInt index = 0; index < arrayCount; index++ )
+                {
+                // Get file path
+                HBufC* tempFilePath = sisFilesArray[index]->AllocL();
+                CleanupStack::PushL( tempFilePath );
+                FLOG_1( _L("[VersionRev] File path: %S \n"), tempFilePath );                
+                
+                // Check if file is installed to sys\bin folder.
+                // Search \sys\bin string from the descriptor's data.
+                err = tempFilePath->Find( KVerRevSysPath );
+                FLOG_1( _L("[VersionRev] Sys path found = %d"), err );
+                
+                if ( err != KErrNotFound )
+                    {
+                    // If binary file, add to array.
+                    binaryFilesArray.Append( tempFilePath );
+                    CleanupStack::Pop(); //tempFilePath
+                    }
+                else
+                    {
+                    // Delete temp descriptor.
+                    CleanupStack::PopAndDestroy( tempFilePath );
+                    tempFilePath = NULL;
+                    }                
+                }
             
-            for ( TInt index = 0; index < binaryCount; index++ )
-                 {
-                 // Get binary file path.
-                 HBufC* binaryPathBuf = binaryFilesArray[index];
-                 // Parse file name and extension.                                                  
-                 stringParser.Set( *binaryPathBuf ,NULL, NULL );                                                                                  
-                 binaryFileNameAndExt.Copy( stringParser.NameAndExt() );                                          
-                 FLOG_1( _L("[VersionRev] Search file: %S \n"), 
-                         &binaryFileNameAndExt );   
-                                                         
-                 // Search file in z:\sys\bin.
-                 // Note path must contain drive letter.
-                 err = find.FindByPath( 
-                         binaryFileNameAndExt, 
-                         &KVerRevRomSysPath() ); 
-                 FLOG_1( _L("[VersionRev] Found in rom = %d"), err );
-                 
-                 if ( err == KErrNone )
+            // Count how meny binary files are found.
+            TInt binaryCount = binaryFilesArray.Count();
+            FLOG_1( _L("[VersionRev] Binary files count = %d"), binaryCount );
+            if ( binaryCount )
+                {
+                TInt foundInRomCount = 0;
+                TFindFile find( iFs );
+                TParse stringParser;                
+                TFileName binaryFileNameAndExt;
+                
+                for ( TInt index = 0; index < binaryCount; index++ )
                      {
-                     // File found in rom. Increase counter.
-                     foundInRomCount++;
-                     }                                                  
-                 } //for
+                     // Get binary file path.
+                     HBufC* binaryPathBuf = binaryFilesArray[index];
+                     // Parse file name and extension.                                                  
+                     stringParser.Set( *binaryPathBuf ,NULL, NULL );                                                                                  
+                     binaryFileNameAndExt.Copy( stringParser.NameAndExt() );                                          
+                     FLOG_1( _L("[VersionRev] Search file: %S \n"), 
+                             &binaryFileNameAndExt );   
+                                                             
+                     // Search file in z:\sys\bin.
+                     // Note path must contain drive letter.
+                     err = find.FindByPath( 
+                             binaryFileNameAndExt, 
+                             &KVerRevRomSysPath() ); 
+                     FLOG_1( _L("[VersionRev] Found in rom = %d"), err );
+                     
+                     if ( err == KErrNone )
+                         {
+                         // File found in rom. Increase counter.
+                         foundInRomCount++;
+                         }                                                  
+                     } //for
+                
+                // Check that all binary files are found in rom.
+                if ( binaryCount == foundInRomCount )
+                    {
+                    allBinaryFilesFound = ETrue;
+                    FLOG( _L("[VersionRev] All rom file found !") );
+                    }                
+                } //if  
             
-            // Check that all binary files are found in rom.
-            if ( binaryCount == foundInRomCount )
-                {
-                allBinaryFilesFound = ETrue;
-                FLOG( _L("[VersionRev] All rom file found !") );
-                }                
-            } //if  
+            // Free all objects and array.
+            binaryFilesArray.ResetAndDestroy();
+            }
+        // Free all objects and array.
+        sisFilesArray.ResetAndDestroy();
         
-        // Free all objects and array.
-        binaryFilesArray.ResetAndDestroy();
+        return allBinaryFilesFound;
         }
-    // Free all objects and array.
-    sisFilesArray.ResetAndDestroy();
+    
     
-    return allBinaryFilesFound;
-    }
-
+    // -----------------------------------------------------------------------
+    // This function handles VersionRevisors self exit.
+    // -----------------------------------------------------------------------
+    //      
+     void CVersionRevisor::Exit()
+         {
+         FLOG( _L("[VersionRev] Exit() ") );         
+         // Ok all is done. Free all resources and exit.
+         delete this;
+         }
 
-// -----------------------------------------------------------------------
-// This function handles VersionRevisors self exit.
-// -----------------------------------------------------------------------
-//      
- void CVersionRevisor::Exit()
-     {
-     FLOG( _L("[VersionRev] Exit() ") );         
-     // Ok all is done. Free all resources and exit.
-     delete this;
-     }
-
-//    } // namespace Swi
+    } // namespace Swi
 
 //EOF
--- a/appinstaller/AppinstUi/Server/Data/SWInstSvrUI_reg.rss	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/Server/Data/SWInstSvrUI_reg.rss	Mon May 03 12:38:03 2010 +0300
@@ -35,17 +35,17 @@
 
     datatype_list= 
         {
-        DATATYPE { priority=EDataTypePrioritySystem; type="x-epoc/x-sisx-app"; },
-        DATATYPE { priority=EDataTypePrioritySystem; type="application/vnd.symbian.install"; },
-        DATATYPE { priority=EDataTypePrioritySystem; type="x-epoc/x-app268436505"; },  /* x-epoc/x-app + Decimal value of 0x10000049 (UID3 of legacy sis files) */
-        DATATYPE { priority=EDataTypePrioritySystem; type="text/vnd.sun.j2me.app-descriptor"; },
-        DATATYPE { priority=EDataTypePrioritySystem; type="application/java-archive"; },
-        DATATYPE { priority=EDataTypePrioritySystem; type="application/x-java-archive"; },
-        DATATYPE { priority=EDataTypePrioritySystem; type="application/java"; },
-        DATATYPE { priority=EDataTypePrioritySystem; type="application/x-pip"; }
+        DATATYPE { priority=EDataTypePriorityLow; type="x-epoc/x-sisx-app"; },
+        DATATYPE { priority=EDataTypePriorityLow; type="application/vnd.symbian.install"; },
+        DATATYPE { priority=EDataTypePriorityLow; type="x-epoc/x-app268436505"; },  /* x-epoc/x-app + Decimal value of 0x10000049 (UID3 of legacy sis files) */
+        DATATYPE { priority=EDataTypePriorityLow; type="text/vnd.sun.j2me.app-descriptor"; },
+        DATATYPE { priority=EDataTypePriorityLow; type="application/java-archive"; },
+        DATATYPE { priority=EDataTypePriorityLow; type="application/x-java-archive"; },
+        DATATYPE { priority=EDataTypePriorityLow; type="application/java"; },
+        DATATYPE { priority=EDataTypePriorityLow; type="application/x-pip"; }
 #ifdef __WEB_WIDGETS
-        , DATATYPE { priority=EDataTypePrioritySystem; type="application/x-nokia-widget"; }
-        , DATATYPE { priority=EDataTypePrioritySystem; type="application/widget"; }
+        , DATATYPE { priority=EDataTypePriorityLow; type="application/x-nokia-widget"; }
+        , DATATYPE { priority=EDataTypePriorityLow; type="application/widget"; }
 #endif
         };  
     }
--- a/appinstaller/AppinstUi/group/daemon.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/group/daemon.mmp	Mon May 03 12:38:03 2010 +0300
@@ -21,15 +21,7 @@
 
 MACRO __DATA_CAGING__
 
-//CAPABILITY    TrustedUI ReadUserData AllFiles WriteDeviceData ReadDeviceData
-
-CAPABILITY 		AllFiles ProtServ ReadDeviceData WriteDeviceData TrustedUI ReadUserData  
-
-// TCB, WriteUserData, DRM, PowerMgmt, MultimediaDD, CommDD, DiskAdmin, NetworkControl, SwEvent, NetworkServices, LocalServices
-// Location, SurroundingsDD, UserEnvironment
-
-// AllFiles needed because uninstaller have to search sys\bin folder.
-// WriteDeviceData for PS keys.
+CAPABILITY 		TrustedUI ReadUserData AllFiles WriteDeviceData ReadDeviceData  
  
 TARGET         swidaemon.exe
 TARGETTYPE     exe
@@ -88,6 +80,7 @@
 LIBRARY        swiobserverclient.lib
 LIBRARY        sif.lib               // USIF SW Installer FW
 LIBRARY        scrclient.lib
+LIBRARY        hbwidgets.lib         // For Symbian Device Dialogs
 
 DEBUGLIBRARY   flogger.lib
 
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialog.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialog.h	Mon May 03 12:38:03 2010 +0300
@@ -46,7 +46,6 @@
 
 public:     // new functions
     static SifUiDeviceDialogType dialogType(const QVariantMap &parameters);
-    static SifUiDeviceDialogMode dialogMode(const QVariantMap &parameters);
 
 public:     // from HbDeviceDialogInterface
     bool setDeviceDialogParameters(const QVariantMap &parameters);
@@ -77,7 +76,7 @@
 private slots:
     void handleAccepted();
     void handleCancelled();
-    void handleMemorySelectionChanged(const QString &text);
+    void handleMemorySelectionChanged(const QChar &driveLetter);
     void handleDisplayCertificateDetails();
     void handleHidePressed();
     void handleIndicatorActivityChanged();
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogcontentwidget.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogcontentwidget.h	Mon May 03 12:38:03 2010 +0300
@@ -47,7 +47,10 @@
     void progressInfo(int &finalValue, int &currentValue) const;
 
 signals:
-    void memorySelectionChanged(const QString &text);
+    void memorySelectionChanged(const QChar &driveLetter);
+
+private slots:
+	void handleMemorySelectionChange(int selectedIndex);
 
 private:
     Q_DISABLE_COPY(SifUiDialogContentWidget)
@@ -58,9 +61,9 @@
     void addDetail(const QString &detailText);
     void updateAppIcon(const QVariantMap &parameters);
     void updateAppSize(const QVariantMap &parameters);
-    void updateMemorySelection(const QVariantMap &parameters);
-    void updateProgressBar(const QVariantMap &parameters);
-    void updateErrorText(const QVariantMap &parameters);
+    bool updateMemorySelection(const QVariantMap &parameters);
+    bool updateProgressBar(const QVariantMap &parameters);
+    bool updateErrorText(const QVariantMap &parameters);
 
 private:    // data
     HbLabel *mAppIcon;
@@ -70,6 +73,7 @@
     QGraphicsLinearLayout *mAppDetailsLayout;
     HbStackedWidget *mStackedWidget;
     HbComboBox *mMemorySelection;
+    QStringList mDriveLetterList;
     HbProgressBar *mProgressBar;
     HbLabel *mErrorText;
     CFbsBitmap *mBitmap;
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogdefinitions.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogdefinitions.h	Mon May 03 12:38:03 2010 +0300
@@ -27,20 +27,13 @@
     SifUiErrorNote = 4
     };
 
-enum SifUiDeviceDialogMode {
-    SifUiUnspecified = 0,
-    SifUiInstalling = 1,
-    SifUiUninstalling = 2
-};
-
 // Variant map keys for dialog type and title (common to all dialog types)
-const QString KeySifUiDialogType = "type";              // enum SifUiDeviceDialogType
-const QString KSifUiDialogMode = "mode";                // enum SifUiDeviceDialogMode
+const QString KSifUiDialogType = "type";                // enum SifUiDeviceDialogType
 const QString KSifUiDialogTitle = "title";              // string
 
 // Variant map keys for device dialog return values
 const QString KSifUiQueryAccepted = "accept";           // boolean
-const QString KSifUiSelectedMemoryIndex = "memi";       // integer
+const QString KSifUiSelectedMemory = "drv";             // drive letter
 
 // Variant map keys for "confirmation query" dialog parameters
 const QString KSifUiApplicationName = "app";            // string
@@ -49,7 +42,7 @@
 const QString KSifUiApplicationVersion = "ver";         // string
 const QString KSifUiApplicationSize = "size";           // integer
 const QString KSifUiApplicationDetails = "details";     // string list
-const QString KSifUiMemorySelection = "mem";            // string list
+const QString KSifUiMemorySelection = "mem";            // string (comma separated drive letters)
 const QString KSifUiCertificates = "cert";              // string list ??
 
 // Variant map keys for "progress note" dialog parameters
@@ -59,7 +52,8 @@
 
 // Variant map keys for "error" dialog parameters
 const QString KSifUiErrorCode = "err";                  // integer
-
+const QString KSifUiErrorMessage = "msg";               // string
+const QString KSifUiErrorDetails = "det";               // string
 
 #endif // SIFUIDIALOGDEFINITIONS_H
 
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogtitlewidget.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogtitlewidget.h	Mon May 03 12:38:03 2010 +0300
@@ -42,7 +42,7 @@
 
 private:
     Q_DISABLE_COPY(SifUiDialogTitleWidget)
-    QString defaultTitle(SifUiDeviceDialogType type, SifUiDeviceDialogMode mode);
+    QString defaultTitle(SifUiDeviceDialogType type);
     void createCertButton();
     void removeCertButton();
 
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/loc/sifuidevicedialogplugin.ts	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="3.0" sourcelanguage="en_GB">
-<context>
-<message numerus="no" id="txt_sisxui_install_appname_version">
-    <comment>Template for application name and version in SW install confirmation query. %1 is the application name and %2 is the version number. Version number consist of major, minor, and build numbers. For example: &quot;Chess (v 1.01(123))&quot;.</comment>        
-    <source>%1 (v %2)</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri3_large_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P01</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_uninstall_complete_head">
-    <comment>Uninstallation complete note title. Indicates that application was succesfully removed.</comment>        
-    <source>Removed</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid></extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature></extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_appsize_mb">
-    <comment>Application size in SW install confirmation query, %1 is in megabytes</comment>        
-    <source>Size: %1 MB</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri3_large_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P01</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_close">
-    <comment>Closes the dialog. Control returns back to where the installation was started.</comment>        
-    <source>Close</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P03</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_uninstall_failed_head">
-    <comment>Uninstallation failed note title. Indicates that uninstallation failed.</comment>        
-    <source>Remove failed</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid></extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature></extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_show">
-    <comment>Opens Application Library to view the installed application.</comment>        
-    <source>Show</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P03</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_appsize_kb">
-    <comment>Application size in SW install confirmation query, %1 is in kilobytes</comment>        
-    <source>Size: %1 kB</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri3_large_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P01</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_error_details">
-    <comment>Shows a dialog with further info about the failure (i.e. why installation failed).</comment>        
-    <source>Details</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P04</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_conf_head">
-    <comment>Install confirmation query title. Installation starts if the user accepts the query.</comment>        
-    <source>Install?</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P01</extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_failed_head">
-    <comment>Installation failed note title. Indicates that installation failed.</comment>        
-    <source>Installation failed</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P04</extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_hide">
-    <comment>Hides the progress dialog. Progress note moves into universal indicator.</comment>        
-    <source>Hide</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P02</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_uninstall_conf_head">
-    <comment>Uninstall confirmation query title. Asks permission to remove selected application/other content.</comment>        
-    <source>Remove?</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid></extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature></extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_cancel">
-    <comment>Cancels the SW install confirmation query and closes the dialog.</comment>        
-    <source>Cancel</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P01</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_complete_head">
-    <comment>Installation complete note title. Indicates that installation was succesfully completed. User has option to launch AppLib.</comment>        
-    <source>Installed</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P03</extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_appsize_b">
-    <comment>Application size in SW install confirmation query, %1 is in bytes</comment>        
-    <source>Size: %1 B</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri3_large_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P01</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_install_ok">
-    <comment>Accepts the SW install confirmation query and starts installation.</comment>        
-    <source>Ok</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P01</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_uninstalling_progress_head">
-    <comment>Progress note title. Uninstallation is going on and progress bar shows how it proceeds.</comment>        
-    <source>Removing</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid></extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature></extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_sisxui_installing_progress_head">
-    <comment>Progress note title. Installation is going on and progress bar shows how it proceeds.</comment>        
-    <source>Installing</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>Installer_P02</extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>In</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-</context>
-</TS>
Binary file appinstaller/AppinstUi/sifuidevicedialogplugin/loc/sifuidevicedialogplugin.xls has changed
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/resources/qgn_indi_midp_trusted.svg	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg width="16" height="16" viewBox="0 0 16 16">
-<path fill="#496DA2" d="M10.61,7.411H9.651v0.003l-2.188,8.539c0.62-0.047,1.979-0.227,3.015-0.583 c2.477-0.776,2.543-3.669,2.543-3.669c0.02-0.002,0.021-0.004,0-0.004l0.156-5.019L10.61,7.411z"/>
-<path fill="#A2C2DD" d="M10.492,12.252c0-0.011,0-4.838,0-4.838l-9.94-0.557l0.112,4.63c0.053,1.974,1.425,3.954,2.82,4.091 l3.802,0.377C8.292,15.861,10.354,14.993,10.492,12.252z"/>
-<path fill="#496DA2" d="M6.105,10.902c0.613-0.453,0.605-1.24,0.189-1.717C5.977,8.824,5.549,8.795,5.538,8.794 C5.527,8.793,5.239,8.719,4.781,9.022c-0.417,0.387-0.425,1.172,0.189,1.757L4.619,13.23l1.925,0.193L6.105,10.902z"/>
-<path fill="#235487" d="M5.148,10.779c0,0-0.237-0.098-0.444-0.66C4.526,8.994,5.291,8.857,5.279,8.855 c-0.011,0-0.298-0.075-0.756,0.229c-0.417,0.387-0.425,1.172,0.189,1.756l-0.352,2.452l0.521-0.095L5.148,10.779z"/>
-<polygon fill="#CEE1EF" points="13.177,6.66 3.135,6.063 0.552,6.857 10.789,7.411 "/>
-<path fill="#496DA2" d="M5.071,6.567c0-0.49-0.192-1.703,0.785-1.989c1.624-0.475,2.268,0.99,2.268,2.262 c0,0.491,2.336,0.379,2.309-0.17c-0.027-0.548-0.279-3.594-2.84-4.136C2.985,2.016,2.76,6.01,2.906,6.567 C3.033,7.049,5.071,6.878,5.071,6.567z"/>
-</svg>
\ No newline at end of file
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/resources/qgn_menu_am_sis.svg	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg width="100%" height="100%" viewBox="0 0 88 88">
-<linearGradient id="_12" gradientUnits="userSpaceOnUse" x1="44.68" y1="44.13" x2="62.99" y2="80.2">
-<stop stop-color="#A2C2DD" offset="0.1"/>
-<stop stop-color="#6C83BB" offset="0.71"/>
-<stop stop-color="#003D6D" offset="0.99"/>
-</linearGradient>
-<path fill="url(#_12)" d="M14.475,14.003c0,0,0.809,11.089,0.952,13.061c-5.274-2.117-12.123,2.153-12.088,8.081 c0.032,5.237,6.587,11.975,13.074,9.778l0.983,16.064l19.536,6.212l3.87-3.304c-1.391-1.28-4.237-6.712-0.913-10.679 c1.636,0.074,3.803,1.019,5.318,3.341c-0.755,0.446-2.435,1.438-2.435,1.438l1.769,18.358l15.22,5.217L70.69,74.02 c0,0,0.713-11.908,0.78-13.026c6.92-0.28,10.947-6.543,10.947-11.571c0-6.004-4.893-12.288-12.286-12.695 c0.042-1.229,0.537-15.648,0.537-15.648l-23.381-4.272l-4.885,3.214c3.509,4.846,3.525,10.268,1.019,13.249 c-3.51,2.305-11.719-5.695-4.459-17.366l-20.704-3.978L14.475,14.003z"/>
-<linearGradient id="_13" gradientUnits="userSpaceOnUse" x1="48.4" y1="45.14" x2="26.4" y2="15.64">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#A2C2DD" offset="0.35"/>
-<stop stop-color="#6C83BB" offset="0.7"/>
-<stop stop-color="#003D6D" offset="1"/>
-</linearGradient>
-<path fill="url(#_13)" d="M24.994,28.365l8.648-9.673l4.228-2.288c-6.905,12.095,2.267,20.532,6.18,17.29 c-0.206,0.233-1.306,5.171-1.306,5.171L24.994,28.365z"/>
-<linearGradient id="_14" gradientUnits="userSpaceOnUse" x1="49.78" y1="73.59" x2="33.78" y2="54.09">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#A2C2DD" offset="0.35"/>
-<stop stop-color="#6C83BB" offset="0.7"/>
-<stop stop-color="#003D6D" offset="1"/>
-</linearGradient>
-<path fill="url(#_14)" d="M39.571,52.482c-3.281,3.521-1.765,8.89,0.253,11.328l-3.05,2.604L20.548,42.523L39.571,52.482z "/>
-<linearGradient id="_15" gradientUnits="userSpaceOnUse" x1="66.5" y1="18.51" x2="66.79" y2="46.9">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#A2C2DD" offset="0.35"/>
-<stop stop-color="#6C83BB" offset="0.7"/>
-<stop stop-color="#003D6D" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_15)" points="63.325,42.008 63.278,24.622 69.948,21.658 69.371,38.502 "/>
-<linearGradient id="_16" gradientUnits="userSpaceOnUse" x1="25.65" y1="17.91" x2="27.75" y2="12.21">
-<stop stop-color="#FFFFFF" offset="0.05"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_16)" points="15.205,14.4 18.376,12.659 37.964,16.356 33.643,18.692 "/>
-<linearGradient id="_17" gradientUnits="userSpaceOnUse" x1="55.45" y1="24.23" x2="58.18" y2="16.83">
-<stop stop-color="#FFFFFF" offset="0.05"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_17)" points="43.376,20.218 47.438,17.545 69.948,21.658 63.807,24.622 "/>
-<linearGradient id="_18" gradientUnits="userSpaceOnUse" x1="9.41" y1="29.03" x2="15.24" y2="32.03">
-<stop stop-color="#FFFFFF" offset="0.05"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<path fill="url(#_18)" d="M5.168,31.243c3.055-4.432,8.436-4.929,11.075-3.032l0.301,3.842L5.168,31.243z"/>
-<linearGradient id="_19" gradientUnits="userSpaceOnUse" x1="66" y1="32.31" x2="81.16" y2="58.31">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#A2C2DD" offset="0.35"/>
-<stop stop-color="#6C83BB" offset="0.7"/>
-<stop stop-color="#003D6D" offset="1"/>
-</linearGradient>
-<path fill="url(#_19)" d="M63.479,40.737l5.963-3.383c7.639-1.027,18.434,11.723,8.048,20.789L63.479,40.737z"/>
-<linearGradient id="_20" gradientUnits="userSpaceOnUse" x1="53.27" y1="11.98" x2="36.67" y2="58.23">
-<stop stop-color="#FFFFFF" offset="0.05"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<path fill="url(#_20)" d="M63.543,40.685c7.758-3.933,16.752,4.756,16.232,11.543c-0.824,10.789-12.64,9.004-16.388,5.077 L45.833,69.03c4.174-3.883,1.91-14.799-4.674-16.367c-6.584-1.569-9.549,7.171-4.385,13.751l-18.709-5.948l-1.01-16.502 c-6.7,3.158-12.989-4.322-13.017-8.823c-0.04-6.581,7.252-8.843,12.437-3.323L15.205,14.4l18.438,4.292 c-4.241,6.53,0.437,15.692,5.636,16.821c5.2,1.128,9.505-7.159,4.098-15.296l20.431,4.404L63.543,40.685z"/>
-<polygon fill="#A15EB6" points="59.654,80.794 45.195,75.838 43.51,58.344 60.175,62.587 "/>
-<polygon fill="#5E1B67" points="59.654,80.794 70.012,73.638 71.094,55.58 59.654,62.587 "/>
-<linearGradient id="_21" gradientUnits="userSpaceOnUse" x1="43.41" y1="57.36" x2="71.04" y2="57.36">
-<stop stop-color="#DEDEED" offset="0"/>
-<stop stop-color="#9646AC" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_21)" points="43.408,58.344 59.654,62.587 71.042,55.58 54.517,52.14 "/>
-<linearGradient id="_22" gradientUnits="userSpaceOnUse" x1="32.16" y1="82.01" x2="58.74" y2="74.55">
-<stop stop-color="#DEDEED" offset="0"/>
-<stop stop-color="#9646AC" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_22)" points="58.806,67.904 59.629,80.923 45.193,75.631 "/>
-<rect fill="none" height="88" width="88"/>
-</svg>
\ No newline at end of file
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/rom/sifuidevicedialogplugin_resources.iby	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/rom/sifuidevicedialogplugin_resources.iby	Mon May 03 12:38:03 2010 +0300
@@ -20,7 +20,7 @@
 
 #include <data_caging_paths_for_iby.hrh>
 
-data=DATAZ_/APP_RESOURCE_DIR/sifuidevicedialogplugin.rsc APP_RESOURCE_DIR/sifuidevicedialogplugin.rsc 
-data=DATAZ_/QT_TRANSLATIONS_DIR/sifuidevicedialogplugin.qm QT_TRANSLATIONS_DIR/sifuidevicedialogplugin.qm
+// TODO: enable when translations ready
+//data=DATAZ_/QT_TRANSLATIONS_DIR/sifuidevicedialogplugin.qm QT_TRANSLATIONS_DIR/sifuidevicedialogplugin.qm
 
 #endif  // SIFUIDEVICEDIALOGPLUGIN_RESOURCES_IBY
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.pro	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.pro	Mon May 03 12:38:03 2010 +0300
@@ -25,7 +25,7 @@
 INCLUDEPATH += ../sifuiinstallindicatorplugin/inc
 DEPENDPATH += .
 
-LIBS += -lQtPublishSubscribe
+LIBS += -lQtPublishSubscribe -lQtSystemInfo
 
 HEADERS += inc/sifuidevicedialogplugin.h \
     inc/sifuidialogdefinitions.h \
@@ -38,8 +38,6 @@
     src/sifuidialogtitlewidget.cpp \
     src/sifuidialogcontentwidget.cpp
 
-RESOURCES += sifuidevicedialogplugin.qrc
-
 symbian: {
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.CAPABILITY = CAP_GENERAL_DLL
@@ -49,7 +47,7 @@
     pluginstub.path = /resource/plugins/devicedialogs
     DEPLOYMENT += pluginstub
 
-	LIBS += -lfbscli
+	LIBS += -lfbscli -lPlatformEnv
 }
 
 BLD_INF_RULES.prj_exports += \
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.qrc	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<RCC>
-    <qresource prefix="/" >
-        <file alias="default_app_icon.svg" >resources/qgn_menu_am_sis.svg</file>
-        <file alias="cert_indi_icon.svg" >resources/qgn_indi_midp_trusted.svg</file>
-    </qresource>
-</RCC>
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialog.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialog.cpp	Mon May 03 12:38:03 2010 +0300
@@ -68,8 +68,8 @@
 SifUiDeviceDialogType SifUiDialog::dialogType(const QVariantMap &parameters)
 {
     SifUiDeviceDialogType type = SifUiUnspecifiedDialog;
-    if (parameters.contains(KeySifUiDialogType)) {
-        type = static_cast<SifUiDeviceDialogType>(parameters.value(KeySifUiDialogType).toInt());
+    if (parameters.contains(KSifUiDialogType)) {
+        type = static_cast<SifUiDeviceDialogType>(parameters.value(KSifUiDialogType).toInt());
         Q_ASSERT(type == SifUiConfirmationQuery || type == SifUiProgressNote ||
             type == SifUiCompleteNote || type == SifUiErrorNote);
     }
@@ -77,20 +77,6 @@
 }
 
 // ----------------------------------------------------------------------------
-// SifUiDialog::dialogMode()
-// ----------------------------------------------------------------------------
-//
-SifUiDeviceDialogMode SifUiDialog::dialogMode(const QVariantMap &parameters)
-{
-    SifUiDeviceDialogMode mode = SifUiUnspecified;
-    if (parameters.contains(KSifUiDialogMode)) {
-        mode = static_cast<SifUiDeviceDialogMode>(parameters.value(KSifUiDialogMode).toInt());
-        Q_ASSERT(mode == SifUiInstalling || mode == SifUiUninstalling);
-    }
-    return mode;
-}
-
-// ----------------------------------------------------------------------------
 // SifUiDialog::setDeviceDialogParameters()
 // ----------------------------------------------------------------------------
 //
@@ -219,14 +205,11 @@
     Q_ASSERT(mContent == 0);
     mContent = new SifUiDialogContentWidget(this);
     mContent->constructFromParameters(parameters);
-    connect(mContent, SIGNAL(memorySelectionChanged(const QString &)),
-            this, SLOT(handleMemorySelectionChanged(const QString &)));
+    connect(mContent, SIGNAL(memorySelectionChanged(const QChar &)),
+            this, SLOT(handleMemorySelectionChanged(const QChar &)));
     setContentWidget(mContent);
 
     // Buttons
-    // build error in wk10: 
-    // Error: #20: identifier "mConfirmInstallAction" is undefined
-    //Q_ASSERT(mConfirmInstallAction == 0);
     updateButtons();
 
     return true;
@@ -375,10 +358,10 @@
 // SifUiDialog::handleMemorySelectionChanged()
 // ----------------------------------------------------------------------------
 //
-void SifUiDialog::handleMemorySelectionChanged(const QString &text)
+void SifUiDialog::handleMemorySelectionChanged(const QChar &driveLetter)
 {
-    QVariant memorySelection(text);
-    mResultMap.insert(KSifUiSelectedMemoryIndex, memorySelection);
+    QVariant memorySelection(driveLetter);
+    mResultMap.insert(KSifUiSelectedMemory, memorySelection);
 }
 
 // ----------------------------------------------------------------------------
@@ -387,8 +370,8 @@
 //
 void SifUiDialog::handleDisplayCertificateDetails()
 {
-    // TODO: display certificate details dialog
-    HbMessageBox::warning(tr("Not implemented yet"));
+    // TODO: display certificate details, or the following note:
+    HbMessageBox::warning(tr("Application is not certified. It's origin and authenticity cannot be proved."));
 }
 
 // ----------------------------------------------------------------------------
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogcontentwidget.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogcontentwidget.cpp	Mon May 03 12:38:03 2010 +0300
@@ -23,18 +23,28 @@
 #include <hbcombobox.h>
 #include <hbprogressbar.h>
 #include <QPixmap>
-#include <QDir>
-#include <QFileInfoList>
+#include <qsysteminfo.h>                    // QSystemStorageInfo
+QTM_USE_NAMESPACE
 #if defined(Q_OS_SYMBIAN)
+#include <driveinfo.h>                      // DriveInfo
 #include <fbs.h>                            // CFbsBitmap
 #endif  // Q_OS_SYMBIAN
 
-// See definitions in sifuidevicedialogplugin.qrc
-const char KSifUiDialogIconAppDefault[] = ":/default_app_icon.svg";
+const char KSifUiDefaultApplicationIcon[] = "qtg_large_application.svg";
+
+const int KSifUiKilo = 1024;
+const int KSifUiMega = 1024*1024;
 
 const int KAppNameIndex = 0;
 const int KAppSizeIndex = 1;
 
+enum TSifUiDriveName {
+    EUnknown,
+    EPhoneMemory,
+    EMassStorage,
+    EMemoryCard
+};
+
 
 // ======== LOCAL FUNCTIONS ========
 
@@ -57,6 +67,31 @@
     return bitmap;
 }
 
+// ----------------------------------------------------------------------------
+// driveName()
+// ----------------------------------------------------------------------------
+//
+TSifUiDriveName driveName(const QChar& volume)
+{
+#if defined(Q_OS_SYMBIAN)
+    int err = 0;
+    TChar drive;
+    err = DriveInfo::GetDefaultDrive(DriveInfo::EDefaultPhoneMemory, drive);
+    if (!err && volume.toAscii() == drive) {
+        return EPhoneMemory;
+    }
+    err = DriveInfo::GetDefaultDrive(DriveInfo::EDefaultMassStorage, drive);
+    if (!err && volume.toAscii() == drive) {
+        return EMassStorage;
+    }
+    err = DriveInfo::GetDefaultDrive(DriveInfo::EDefaultRemovableMassStorage, drive);
+    if (!err && volume.toAscii() == drive) {
+        return EMemoryCard;
+    }
+#endif  // Q_OS_SYMBIAN
+    return EUnknown;
+}
+
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -123,8 +158,8 @@
 
     Q_ASSERT(mMemorySelection == 0);
     mMemorySelection = new HbComboBox;
-    connect(mMemorySelection, SIGNAL(currentIndexChanged(const QString &)),
-            this, SIGNAL(memorySelectionChanged(const QString &)));
+    connect(mMemorySelection, SIGNAL(currentIndexChanged(int)),
+            this, SIGNAL(handleMemorySelectionChange(int)));
     mStackedWidget->addWidget(mMemorySelection);
 
     Q_ASSERT(mProgressBar == 0);
@@ -137,9 +172,11 @@
     mStackedWidget->addWidget(mErrorText);
 
     mMainLayout->addItem(mStackedWidget);
-    updateMemorySelection(parameters);
-    updateProgressBar(parameters);
-    updateErrorText(parameters);
+    if (!updateErrorText(parameters) &&
+        !updateProgressBar(parameters) &&
+        !updateMemorySelection(parameters)) {
+        mStackedWidget->hide();
+    }
 
     setLayout(mMainLayout);
     }
@@ -177,9 +214,17 @@
     }
 
     // Stacked widgets: memory selection, progress bar and error text
-    updateMemorySelection(parameters);
-    updateProgressBar(parameters);
-    updateErrorText(parameters);
+    if (updateErrorText(parameters) ||
+        updateProgressBar(parameters) ||
+        updateMemorySelection(parameters)) {
+        if (!mStackedWidget->isVisible()) {
+            mStackedWidget->show();
+        }
+    } else {
+        if (mStackedWidget->isVisible()) {
+            mStackedWidget->hide();
+        }
+    }
 }
 
 // ----------------------------------------------------------------------------
@@ -252,6 +297,18 @@
 }
 
 // ----------------------------------------------------------------------------
+// SifUiDialogContentWidget::handleMemorySelectionChange()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialogContentWidget::handleMemorySelectionChange(int selectedIndex)
+{
+    QChar selectedDrive = mDriveLetterList[selectedIndex][0];
+    // TODO: save selected drive to cenrep
+
+    emit memorySelectionChanged( selectedDrive );
+}
+
+// ----------------------------------------------------------------------------
 // SifUiDialogContentWidget::applicationName()
 // ----------------------------------------------------------------------------
 //
@@ -286,21 +343,21 @@
     if (parameters.contains(KSifUiApplicationSize)) {
         uint size = parameters.value(KSifUiApplicationSize).toUInt();
         if (size > 0) {
-            if (size > KMega) {
+            if (size > KSifUiMega) {
                 //: Application size in SW install confirmation query, %1 is in megabytes
                 // TODO: enable when translations ready
-                //appSize = hbTrId("txt_sisxui_install_appsize_mb").arg(size/KMega);
-                appSize = tr("Size: %1 MB").arg(size/KMega);
-            } else if(size > KKilo) {
+                //appSize = hbTrId("txt_sisxui_install_appsize_mb").arg(size/KSifUiMega);
+                appSize = tr("%1 MB").arg(size/KSifUiMega);
+            } else if(size > KSifUiKilo) {
                 //: Application size in SW install confirmation query, %1 is in kilobytes
                 // TODO: enable when translations ready
-                //appSize = hbTrId("txt_sisxui_install_appsize_kb").arg(size/KKilo);
-                appSize = tr("Size: %1 kB").arg(size/KKilo);
+                //appSize = hbTrId("txt_sisxui_install_appsize_kb").arg(size/KSifUiKilo);
+                appSize = tr("%1 kB").arg(size/KSifUiKilo);
             } else {
                 //: Application size in SW install confirmation query, %1 is in bytes
                 // TODO: enable when translations ready
                 //appSize = hbTrId("txt_sisxui_install_appsize_b").arg(size);
-                appSize = tr("Size: %1 B").arg(size);
+                appSize = tr("%1 B").arg(size);
             }
         }
     }
@@ -372,7 +429,7 @@
         mAppIcon->setIcon(HbIcon(pixmap));
     } else {
         if (mAppIcon->icon().isNull()) {
-            mAppIcon->setIcon(HbIcon(KSifUiDialogIconAppDefault));
+            mAppIcon->setIcon(HbIcon(KSifUiDefaultApplicationIcon));
         }
     }
 }
@@ -403,28 +460,73 @@
 // SifUiDialogContentWidget::updateMemorySelection()
 // ----------------------------------------------------------------------------
 //
-void SifUiDialogContentWidget::updateMemorySelection(const QVariantMap &parameters)
+bool SifUiDialogContentWidget::updateMemorySelection(const QVariantMap &parameters)
 {
     if (parameters.contains(KSifUiMemorySelection)) {
+        QString drives = parameters.value(KSifUiMemorySelection).toString();
+        mDriveLetterList = drives.split(",");
 
-        // TODO: get user visible drives, icons for them, and free sizes
-        // it might be better to get this list from Symbian-side via SifUi API
         QStringList driveList;
-        QFileInfoList driveInfoList = QDir::drives();
-        foreach(const QFileInfo &driveInfo, driveInfoList) {
-            const QChar driveName = driveInfo.absolutePath()[0];
-            switch (driveName.toAscii()) {
-                case 'C':
-                    driveList << "C: Phone memory";
+        QSystemStorageInfo info;
+        QStringList volumeList = info.logicalDrives();
+        foreach (QString volume, volumeList) {
+            if (mDriveLetterList.contains(volume)) {
+                qlonglong size = info.availableDiskSpace(volume);
+                switch (driveName(volume[0])) {
+                case EPhoneMemory:
+                    if (size > KSifUiMega) {
+                        //: Drive name for internal phone memory with megabytes of free space.
+                        //: %1 is replaced with drive letter (usually 'C')
+                        //: %2 is replaced with available free space (in megabytes, MB)
+                        //TODO: use hbTrId("txt_sisxui_device_memory_mb") when available
+                        driveList.append(tr("%1: Device (%L2 MB free)"
+                            ).arg(volume).arg(size/KSifUiMega));
+                    } else {
+                        //: Drive name for internal phone memory with kilobytes of free space.
+                        //: %1 is replaced with drive letter (usually 'C')
+                        //: %2 is replaced with available free space (in kilobytes, kB)
+                        //TODO: use hbTrId("txt_sisxui_device_memory_kb") when available
+                        driveList.append(tr("%1: Device (%L2 kB free)"
+                            ).arg(volume).arg(size/KSifUiKilo));
+                    }
                     break;
-                case 'E':
-                    driveList << "E: Mass memory";
+                case EMassStorage:
+                    if (size > KSifUiMega) {
+                        //: Drive name for mass storage with megabytes of free space.
+                        //: %1 is replaced with drive letter (usually 'E')
+                        //: %2 is replaced with available free space (in megabytes, MB)
+                        // TODO: use hbTrId("txt_sisxui_mass_storage_mb") when available
+                        driveList.append(tr("%1: Mass.mem (%L2 MB free)"
+                            ).arg(volume).arg(size/KSifUiMega));
+                    } else {
+                        //: Drive name for mass storage with kilobytes of free space.
+                        //: %1 is replaced with drive letter (usually 'E')
+                        //: %2 is replaced with available free space (in kilobytes, kB)
+                        // TODO: use hbTrId("txt_sisxui_mass_storage_kb") when available
+                        driveList.append(tr("%1: Mass.mem (%L2 kB free)"
+                            ).arg(volume).arg(size/KSifUiKilo));
+                    }
                     break;
-                case 'F':
-                    driveList << "F: Memory card";
+                case EMemoryCard:
+                    if (size > KSifUiMega) {
+                        //: Drive name for memory card with megabytes of free space.
+                        //: %1 is replaced with drive letter (usually 'F')
+                        //: %2 is replaced with available free space (in megabytes, MB)
+                        // TODO: use hbTrId("txt_sisxui_memory_card_mb") when available
+                        driveList.append(tr("%1: Mem.card (%L2 MB free)"
+                            ).arg(volume).arg(size/KSifUiMega));
+                    } else {
+                        //: Drive name for memory card with kilobytes of free space.
+                        //: %1 is replaced with drive letter (usually 'F')
+                        //: %2 is replaced with available free space (in kilobytes, kB)
+                        // TODO: use hbTrId("txt_sisxui_memory_card_kb") when available
+                        driveList.append(tr("%1: Mem.card (%L2 kB free)"
+                            ).arg(volume).arg(size/KSifUiKilo));
+                    }
                     break;
                 default:
                     break;
+                }
             }
         }
 
@@ -432,14 +534,17 @@
         mStackedWidget->setCurrentWidget(mMemorySelection);
 
         // TODO: set selected item, read the default from cenrep
+
+        return true;
     }
+    return false;
 }
 
 // ----------------------------------------------------------------------------
 // SifUiDialogContentWidget::updateProgressBar()
 // ----------------------------------------------------------------------------
 //
-void SifUiDialogContentWidget::updateProgressBar(const QVariantMap &parameters)
+bool SifUiDialogContentWidget::updateProgressBar(const QVariantMap &parameters)
 {
     bool progressBarChanged = false;
     if (parameters.contains(KSifUiProgressNoteFinalValue)) {
@@ -455,20 +560,23 @@
     if (progressBarChanged) {
         mStackedWidget->setCurrentWidget(mProgressBar);
     }
+    return progressBarChanged;
 }
 
 // ----------------------------------------------------------------------------
 // SifUiDialogContentWidget::updateErrorText()
 // ----------------------------------------------------------------------------
 //
-void SifUiDialogContentWidget::updateErrorText(const QVariantMap &parameters)
+bool SifUiDialogContentWidget::updateErrorText(const QVariantMap &parameters)
 {
     if (parameters.contains(KSifUiErrorCode)) {
         // TODO: proper error texts
         QString errorText = tr("Error %1").arg(parameters.value(KSifUiErrorCode).toInt());
         mErrorText->setPlainText(errorText);
         mStackedWidget->setCurrentWidget(mErrorText);
+        return true;
     }
+    return false;
 }
 
 
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogtitlewidget.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogtitlewidget.cpp	Mon May 03 12:38:03 2010 +0300
@@ -21,8 +21,9 @@
 #include <hblabel.h>
 #include <hbpushbutton.h>
 
-// See definitions in sifuidevicedialogplugin.qrc
-const char KSifUiDialogIconCertificates[] = ":/cert_indi_icon.svg";
+const char KSifUiCertTrusted[]    = "qtg_small_secure.svg";
+// TODO: enable when available, take also in use
+//const char KSifUiCertNotTrusted[] = "qtg_small_untrusted.svg";
 
 
 // ----------------------------------------------------------------------------
@@ -58,8 +59,7 @@
         titleLabel = new HbLabel(titleText);
     } else {
         SifUiDeviceDialogType type = SifUiDialog::dialogType(parameters);
-        SifUiDeviceDialogMode mode = SifUiDialog::dialogMode(parameters);
-        titleLabel = new HbLabel(defaultTitle(type, mode));
+        titleLabel = new HbLabel(defaultTitle(type));
     }
     titleLabel->setFontSpec(HbFontSpec(HbFontSpec::Title));
     mLayout->addItem(titleLabel);
@@ -83,98 +83,49 @@
         titleText = parameters.value(KSifUiDialogTitle).toString();
     } else {
         SifUiDeviceDialogType type = SifUiDialog::dialogType(parameters);
-        SifUiDeviceDialogMode mode = SifUiDialog::dialogMode(parameters);
-        titleText = defaultTitle(type, mode);
+        titleText = defaultTitle(type);
     }
     if (titleText != mTitle->plainText()) {
         mTitle->setPlainText(titleText);
     }
-
-    if (parameters.contains(KSifUiCertificates)) {
-        createCertButton();
-    } else {
-        removeCertButton();
-    }
 }
 
 // ----------------------------------------------------------------------------
 // SifUiDialogTitleWidget::defaultTitle()
 // ----------------------------------------------------------------------------
 //
-QString SifUiDialogTitleWidget::defaultTitle(SifUiDeviceDialogType type,
-    SifUiDeviceDialogMode mode)
+QString SifUiDialogTitleWidget::defaultTitle(SifUiDeviceDialogType type)
 {
     QString title;
-    switch (mode) {
-        case SifUiInstalling:
-            switch (type) {
-                case SifUiConfirmationQuery:
-                    //: Install confirmation query title. Installation starts if
-                    //: the user accepts the query.
-                    // TODO: enable when translations ready
-                    //title = hbTrId("txt_sisxui_install_conf_head");
-                    title = tr("Install?");
-                    break;
-                case SifUiProgressNote:
-                    //: Progress note title. Installation is going on and progress
-                    //: bar shows how it proceeds.
-                    // TODO: enable when translations ready
-                    //title = hbTrId("txt_sisxui_installing_progress_head");
-                    title = tr("Installing");
-                    break;
-                case SifUiCompleteNote:
-                    //: Installation complete note title. Indicates that installation
-                    //: was succesfully completed. User has option to launch AppLib
-                    // TODO: enable when translations ready
-                    //title = hbTrId("txt_sisxui_install_complete_head");
-                    title = tr("Installed");
-                    break;
-                case SifUiErrorNote:
-                    //: Installation failed note title. Indicates that installation failed.
-                    // TODO: enable when translations ready
-                    //title = hbTrId("txt_sisxui_install_failed_head");
-                    title = tr("Install failed");
-                    break;
-                case SifUiUnspecifiedDialog:
-                default:
-                    break;
-            }
+    switch (type) {
+        case SifUiConfirmationQuery:
+            //: Install confirmation query title. Installation starts if
+            //: the user accepts the query.
+            // TODO: enable when translations ready
+            //title = hbTrId("txt_sisxui_install_conf_head");
+            title = tr("Install?");
+            break;
+        case SifUiProgressNote:
+            //: Progress note title. Installation is going on and progress
+            //: bar shows how it proceeds.
+            // TODO: enable when translations ready
+            //title = hbTrId("txt_sisxui_installing_progress_head");
+            title = tr("Installing");
             break;
-        case SifUiUninstalling:
-            switch (type) {
-                case SifUiConfirmationQuery:
-                    //: Uninstall confirmation query title. Asks permission to
-                    //: remove selected application/other content.
-                    // TODO: enable when translations ready
-                    //title = hbTrId("txt_sisxui_uninstall_conf_head");
-                    title = tr("Remove?");
-                    break;
-                case SifUiProgressNote:
-                    //: Progress note title. Uninstallation is going on and progress
-                    //: bar shows how it proceeds.
-                    // TODO: enable when translations ready
-                    //title = hbTrId("txt_sisxui_uninstalling_progress_head");
-                    title = tr("Removing");
-                    break;
-                case SifUiCompleteNote:
-                    //: Uninstallation complete note title. Indicates that application
-                    //: was succesfully removed.
-                    // TODO: enable when translations ready
-                    //title = hbTrId("txt_sisxui_uninstall_complete_head");
-                    title = tr("Removed");
-                    break;
-                case SifUiErrorNote:
-                    //: Uninstallation failed note title. Indicates that uninstallation failed.
-                    // TODO: enable when translations ready
-                    //title = hbTrId("txt_sisxui_uninstall_failed_head");
-                    title = tr("Uninstall failed");
-                    break;
-                case SifUiUnspecifiedDialog:
-                default:
-                    break;
-            }
+        case SifUiCompleteNote:
+            //: Installation complete note title. Indicates that installation
+            //: was succesfully completed. User has option to launch AppLib
+            // TODO: enable when translations ready
+            //title = hbTrId("txt_sisxui_install_complete_head");
+            title = tr("Installed");
             break;
-        case SifUiUnspecified:
+        case SifUiErrorNote:
+            //: Installation failed note title. Indicates that installation failed.
+            // TODO: enable when translations ready
+            //title = hbTrId("txt_sisxui_install_failed_head");
+            title = tr("Install failed");
+            break;
+        case SifUiUnspecifiedDialog:
         default:
             break;
     }
@@ -189,7 +140,8 @@
 {
     if (!mCertButton) {
         HbPushButton *certButton = new HbPushButton;
-        certButton->setIcon(HbIcon(KSifUiDialogIconCertificates));
+        // TODO: show KSifUiCertNotTrusted when needed (and when available)
+        certButton->setIcon(HbIcon(KSifUiCertTrusted));
         connect(certButton,SIGNAL(clicked()),this,SIGNAL(certificatesClicked()));
         mLayout->addStretch();
         mLayout->addItem(certButton);
--- a/appinstaller/AppinstUi/sifuiinstallindicatorplugin/rom/sifuiinstallindicatorplugin.iby	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sifuiinstallindicatorplugin/rom/sifuiinstallindicatorplugin.iby	Mon May 03 12:38:03 2010 +0300
@@ -18,10 +18,9 @@
 #ifndef SIFUIINSTALLINDICATORPLUGIN_IBY
 #define SIFUIINSTALLINDICATORPLUGIN_IBY
 
-REM DLL
 file=ABI_DIR\UREL\sifuiinstallindicatorplugin.dll SHARED_LIB_DIR\sifuiinstallindicatorplugin.dll UNPAGED
 data=\epoc32\data\z\resource\plugins\indicators\sifuiinstallindicatorplugin.qtplugin \resource\plugins\indicators\sifuiinstallindicatorplugin.qtplugin
-data=\epoc32\winscw\c\resource\qt\crml\sifuiinstallindicatorplugin.qcrml \resource\qt\crml\sifuiinstallindicatorplugin.qcrml \resource\qt\crml\sifuiinstallindicatorplugin.qcrml
+data=\epoc32\data\z\resource\qt\crml\sifuiinstallindicatorplugin.qcrml \resource\qt\crml\sifuiinstallindicatorplugin.qcrml
 
 #endif  // SIFUIINSTALLINDICATORPLUGIN_IBY
 
--- a/appinstaller/AppinstUi/sisxsifplugin/data/sisxsifuidata.rss	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* 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:   Resource definitions for SISX SIF plugin.
-*
-*/
-
-#include <uikon.rh>                 // RSS_SIGNATURE
-#include <e32lang.h>                // TLanguage enum
-#include <languages.hrh>            // S60 added language codes
-#include "sisxsiflangname.rh"       // LANG_NAME
-#include <sisxsifui.loc>            // Localised UI strings
-
-
-// ---------------------------------------------------------------------------
-// Resource headers
-// ---------------------------------------------------------------------------
-//
-NAME SXUI
-RESOURCE RSS_SIGNATURE { }
-
-
-// ---------------------------------------------------------------------------
-// Language names array
-// ---------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_sisxui_languages_array
-    {
-    items =
-        {
-		LANG_NAME { id = ELangTest; txt = qtn_swins_lqi_unknow; },
-		LANG_NAME { id = ELangEnglish; txt = qtn_swins_lqi_uk; },
-		LANG_NAME { id = ELangFrench; txt = qtn_swins_lqi_french; },
-		LANG_NAME { id = ELangGerman; txt = qtn_swins_lqi_german; },
-		LANG_NAME { id = ELangSpanish; txt = qtn_swins_lqi_span; },
-		LANG_NAME { id = ELangItalian; txt = qtn_swins_lqi_ital; },
-		LANG_NAME { id = ELangSwedish; txt = qtn_swins_lqi_swedish; },
-		LANG_NAME { id = ELangDanish; txt = qtn_swins_lqi_danish; },
-		LANG_NAME { id = ELangNorwegian; txt = qtn_swins_lqi_norweg; },
-		LANG_NAME { id = ELangFinnish; txt = qtn_swins_lqi_finnish; },
-		LANG_NAME { id = ELangAmerican; txt = qtn_swins_lqi_us; },
-		LANG_NAME { id = ELangSwissFrench; txt = qtn_swins_lqi_swissfre; },
-		LANG_NAME { id = ELangSwissGerman; txt = qtn_swins_lqi_swissger; },
-		LANG_NAME { id = ELangPortuguese; txt = qtn_swins_lqi_portug; },
-		LANG_NAME { id = ELangTurkish; txt = qtn_swins_lqi_turk; },
-		LANG_NAME { id = ELangIcelandic; txt = qtn_swins_lqi_ice; },
-		LANG_NAME { id = ELangRussian; txt = qtn_swins_lqi_russ; },
-		LANG_NAME { id = ELangHungarian; txt = qtn_swins_lqi_hung; },
-		LANG_NAME { id = ELangDutch; txt = qtn_swins_lqi_dutch; },
-		LANG_NAME { id = ELangBelgianFlemish; txt = qtn_swins_lqi_belgdutch; },
-		LANG_NAME { id = ELangAustralian; txt = qtn_swins_lqi_austeng; },
-		LANG_NAME { id = ELangBelgianFrench; txt = qtn_swins_lqi_belgfrench; },
-		LANG_NAME { id = ELangAustrian; txt = qtn_swins_lqi_austrger; },
-		LANG_NAME { id = ELangNewZealand; txt = qtn_swins_lqi_nzeng; },
-		LANG_NAME { id = ELangInternationalFrench; txt = qtn_swins_lqi_intfrench; },
-		LANG_NAME { id = ELangCzech; txt = qtn_swins_lqi_czech; },
-		LANG_NAME { id = ELangSlovak; txt = qtn_swins_lqi_slovak; },
-		LANG_NAME { id = ELangPolish; txt = qtn_swins_lqi_polish; },
-		LANG_NAME { id = ELangSlovenian; txt = qtn_swins_lqi_sloven; },
-		LANG_NAME { id = ELangTaiwanChinese; txt = qtn_swins_lqi_taiwchin; },
-		LANG_NAME { id = ELangHongKongChinese; txt = qtn_swins_lqi_hkchin; },
-		LANG_NAME { id = ELangPrcChinese; txt = qtn_swins_lqi_prcchin; },
-		LANG_NAME { id = ELangJapanese; txt = qtn_swins_lqi_japan; },
-		LANG_NAME { id = ELangThai; txt = qtn_swins_lqi_thai; },
-		LANG_NAME { id = ELangAfrikaans; txt = qtn_swins_lqi_afrik; },
-		LANG_NAME { id = ELangAlbanian; txt = qtn_swins_lqi_alb; },
-		LANG_NAME { id = ELangAmharic; txt = qtn_swins_lqi_amhar; },
-		LANG_NAME { id = ELangArabic; txt = qtn_swins_lqi_arabic; },
-		LANG_NAME { id = ELangArmenian; txt = qtn_swins_lqi_armenian; },
-		LANG_NAME { id = ELangTagalog; txt = qtn_swins_lqi_taga; },
-		LANG_NAME { id = ELangBelarussian; txt = qtn_swins_lqi_belarus; },
-		LANG_NAME { id = ELangBengali; txt = qtn_swins_lqi_beng; },
-		LANG_NAME { id = ELangBulgarian; txt = qtn_swins_lqi_bulg; },
-		LANG_NAME { id = ELangBurmese; txt = qtn_swins_lqi_burm; },
-		LANG_NAME { id = ELangCatalan; txt = qtn_swins_lqi_catalan; },
-		LANG_NAME { id = ELangCroatian; txt = qtn_swins_lqi_croat; },
-		LANG_NAME { id = ELangCanadianEnglish; txt = qtn_swins_lqi_caneng; },
-		LANG_NAME { id = ELangInternationalEnglish; txt = qtn_swins_lqi_inteng; },
-		LANG_NAME { id = ELangSouthAfricanEnglish; txt = qtn_swins_lqi_saeng; },
-		LANG_NAME { id = ELangEstonian; txt = qtn_swins_lqi_estonia; },
-		LANG_NAME { id = ELangFarsi; txt = qtn_swins_lqi_farsi; },
-		LANG_NAME { id = ELangCanadianFrench; txt = qtn_swins_lqi_canfrench; },
-		LANG_NAME { id = ELangScotsGaelic; txt = qtn_swins_lqi_scotgael; },
-		LANG_NAME { id = ELangGeorgian; txt = qtn_swins_lqi_georg; },
-		LANG_NAME { id = ELangGreek; txt = qtn_swins_lqi_greek; },
-		LANG_NAME { id = ELangCyprusGreek; txt = qtn_swins_lqi_cygreek; },
-		LANG_NAME { id = ELangGujarati; txt = qtn_swins_lqi_gujarat; },
-		LANG_NAME { id = ELangHebrew; txt = qtn_swins_lqi_hebr; },
-		LANG_NAME { id = ELangHindi; txt = qtn_swins_lqi_hindi; },
-		LANG_NAME { id = ELangIndonesian; txt = qtn_swins_lqi_indon; },
-		LANG_NAME { id = ELangIrish; txt = qtn_swins_lqi_irish; },
-		LANG_NAME { id = ELangSwissItalian; txt = qtn_swins_lqi_swissital; },
-		LANG_NAME { id = ELangKannada; txt = qtn_swins_lqi_kannada; },
-		LANG_NAME { id = ELangKazakh; txt = qtn_swins_lqi_kazakh; },
-		LANG_NAME { id = ELangKhmer; txt = qtn_swins_lqi_khmer; },
-		LANG_NAME { id = ELangKorean; txt = qtn_swins_lqi_korean; },
-		LANG_NAME { id = ELangLao; txt = qtn_swins_lqi_lao; },
-		LANG_NAME { id = ELangLatvian; txt = qtn_swins_lqi_latv; },
-		LANG_NAME { id = ELangLithuanian; txt = qtn_swins_lqi_lith; },
-		LANG_NAME { id = ELangMacedonian; txt = qtn_swins_lqi_maced; },
-		LANG_NAME { id = ELangMalay; txt = qtn_swins_lqi_malay; },
-		LANG_NAME { id = ELangMalayalam; txt = qtn_swins_lqi_malyalam; },
-		LANG_NAME { id = ELangMarathi; txt = qtn_swins_lqi_marath; },
-		LANG_NAME { id = ELangMoldavian; txt = qtn_swins_lqi_molda; },
-		LANG_NAME { id = ELangMongolian; txt = qtn_swins_lqi_mong; },
-		LANG_NAME { id = ELangNorwegianNynorsk; txt = qtn_swins_lqi_nornynorsk; },
-		LANG_NAME { id = ELangBrazilianPortuguese; txt = qtn_swins_lqi_brazport; },
-		LANG_NAME { id = ELangPunjabi; txt = qtn_swins_lqi_punj; },
-		LANG_NAME { id = ELangRomanian; txt = qtn_swins_lqi_roman; },
-		LANG_NAME { id = ELangSerbian; txt = qtn_swins_lqi_serb; },
-		LANG_NAME { id = ELangSinhalese; txt = qtn_swins_lqi_sinhal; },
-		LANG_NAME { id = ELangSomali; txt = qtn_swins_lqi_somal; },
-		LANG_NAME { id = ELangInternationalSpanish; txt = qtn_swins_lqi_intspan; },
-		LANG_NAME { id = ELangLatinAmericanSpanish; txt = qtn_swins_lqi_latspan; },
-		LANG_NAME { id = ELangSwahili; txt = qtn_swins_lqi_swahil; },
-		LANG_NAME { id = ELangFinlandSwedish; txt = qtn_swins_lqi_finswe; },
-		LANG_NAME { id = ELangReserved1; txt = qtn_swins_lqi_tajik; },
-		LANG_NAME { id = ELangTamil; txt = qtn_swins_lqi_tamil; },
-		LANG_NAME { id = ELangTelugu; txt = qtn_swins_lqi_telugu; },
-		LANG_NAME { id = ELangTibetan; txt = qtn_swins_lqi_tibet; },
-		LANG_NAME { id = ELangTigrinya; txt = qtn_swins_lqi_tigrin; },
-		LANG_NAME { id = ELangCyprusTurkish; txt = qtn_swins_lqi_cyturk; },
-		LANG_NAME { id = ELangTurkmen; txt = qtn_swins_lqi_turkmen; },
-		LANG_NAME { id = ELangUkrainian; txt = qtn_swins_lqi_ukran; },
-		LANG_NAME { id = ELangUrdu; txt = qtn_swins_lqi_urdu; },
-		LANG_NAME { id = ELangReserved2; txt = qtn_swins_lqi_uzbek; },
-		LANG_NAME { id = ELangVietnamese; txt = qtn_swins_lqi_viet; },
-		LANG_NAME { id = ELangWelsh; txt = qtn_swins_lqi_welsh; },
-		LANG_NAME { id = ELangZulu; txt = qtn_swins_lqi_zulu; },
-		LANG_NAME { id = ELangBasque; txt = qtn_swins_lqi_basque; },
-		LANG_NAME { id = ELangGalician; txt = qtn_swins_lqi_galic; },
-		LANG_NAME { id = ELangEnglish_Apac; txt = qtn_swins_lqi_apaceng; },
-		LANG_NAME { id = ELangEnglish_Taiwan; txt = qtn_swins_lqi_tweng; },
-		LANG_NAME { id = ELangEnglish_HongKong; txt = qtn_swins_lqi_hkeng; },
-		LANG_NAME { id = ELangEnglish_Prc; txt = qtn_swins_lqi_prceng; },
-		LANG_NAME { id = ELangEnglish_Japan; txt = qtn_swins_lqi_jpneng; },
-		LANG_NAME { id = ELangEnglish_Thailand; txt = qtn_swins_lqi_thaieng; },
-		LANG_NAME { id = ELangMalay_Apac; txt = qtn_swins_lqi_apacmalay; },
-
-		// Additional S60 language codes (not defined in TLanguage enum)
-		LANG_NAME { id = KLangApacIndonesian; txt = qtn_swins_lqi_apacind; },
-
-		// Old language IDs (used in S60 3.2 products):
-		LANG_NAME { id = 401; txt = qtn_swins_lqi_basque; },
-		LANG_NAME { id = 402; txt = qtn_swins_lqi_galic; }
-		};
-	}
-
--- a/appinstaller/AppinstUi/sisxsifplugin/group/bld.inf	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/group/bld.inf	Mon May 03 12:38:03 2010 +0300
@@ -22,7 +22,7 @@
 DEFAULT
 
 PRJ_EXPORTS
-../loc/sisxsifui.loc    MW_LAYER_LOC_EXPORT_PATH( sisxsifui.loc )
+../rom/sisxsifplugin.iby    CORE_MW_LAYER_IBY_EXPORT_PATH( sisxsifplugin.iby )
 
 PRJ_MMPFILES
 sisxsifplugin.mmp
--- a/appinstaller/AppinstUi/sisxsifplugin/group/sisxsifplugin.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/group/sisxsifplugin.mmp	Mon May 03 12:38:03 2010 +0300
@@ -22,41 +22,35 @@
 TARGETTYPE      PLUGIN
 UID             0x10009D8D 0x20022FC1
 
-CAPABILITY      CAP_ECOM_PLUGIN DRM
+CAPABILITY      CAP_ECOM_PLUGIN
 VENDORID        VID_DEFAULT
 
 START RESOURCE  ../data/20022FC1.rss
 TARGET          sisxsifplugin.rsc
 END
 
-START RESOURCE  ../data/sisxsifuidata.rss
-HEADER
-TARGET          sisxsifuidata.rsc
-TARGETPATH      RESOURCE_FILES_DIR
-LANGUAGE_IDS
-END
-
 SOURCEPATH      ../src
 SOURCE          sisxsifpluginmain.cpp
 SOURCE          sisxsifplugin.cpp
 SOURCE          sisxsifpluginactiveimpl.cpp
 SOURCE          sisxsifpluginuihandler.cpp
-SOURCE          sisxsifuilangname.cpp
 SOURCE          sisxsifuiselectioncache.cpp
+SOURCE          sisxsifpluginuihandlersilent.cpp
 
 USERINCLUDE     ../inc
 USERINCLUDE     ../../../../installationservices/swi/inc
 USERINCLUDE     ../../../../installationservices/swi/inc/swi
 MW_LAYER_SYSTEMINCLUDE
 
-LIBRARY         euser.lib				// User
-LIBRARY         ecom.lib				// ECom
+LIBRARY         euser.lib               // User
+LIBRARY         ecom.lib                // ECom
 LIBRARY         sif.lib                 // USIF
 LIBRARY         scrclient.lib           // SCR
 LIBRARY         sifui.lib               // CSifUi
 LIBRARY         sisregistryclient.lib   // Swi::RSisRegistrySession
 LIBRARY         sishelper.lib           // Swi::CAsyncLauncher
 LIBRARY         bafl.lib                // TResourceReader
-LIBRARY         efsrv.lib				// TDriveUnit
-LIBRARY         featmgr.lib				// FeatureManager
+LIBRARY         efsrv.lib               // RFs
+LIBRARY         PlatformEnv.lib         // TDriveInfo
+LIBRARY         featmgr.lib             // FeatureManager
 
--- a/appinstaller/AppinstUi/sisxsifplugin/inc/sisxsiflangname.rh	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2008-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:   LANG_NAME resource header for SISX SIF plugin
-*
-*/
-
-
-#ifndef SISXSIFLANGNAME_RH
-#define SISXSIFLANGNAME_RH
-
-STRUCT LANG_NAME
-    {
-    WORD id = 0;
-    LTEXT txt;
-    }
-
-#endif // SISXSIFLANGNAME_RH
-
--- a/appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginactiveimpl.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginactiveimpl.h	Mon May 03 12:38:03 2010 +0300
@@ -35,6 +35,7 @@
 namespace Usif
 {
     class CSisxSifPluginUiHandler;
+    class CSisxSifPluginUiHandlerSilent;
 
     /**
      *  SISX SIF plugin active implementation
@@ -75,18 +76,19 @@
     private:    // new functions
         CSisxSifPluginActiveImpl();
         void ConstructL();
-        void CompleteRequest( TRequestStatus& aStatus, TInt aResult );
-        void CommonRequestPreamble( const TSecurityContext& aSecurityContext,
-                const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
-                TRequestStatus& aStatus );
+        Swi::MUiHandler& UiHandlerL( TBool aUseSilentMode = EFalse );
+        void CommonRequestPreamble( const COpaqueNamedParams& aInputParams,
+                COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus );
+        void CompleteClientRequest( TInt aResult );
         void DoInstallL( const TDesC& aFileName );
-        void DoUninstallL( TComponentId aComponentId, TRequestStatus& aStatus );
+        void DoUninstallL( TComponentId aComponentId );
         void DoActivateL( TComponentId aComponentId );
         void DoDeactivateL( TComponentId aComponentId );
         TInt ConvertToSifErrorCode( TInt aSwiErrorCode );
         TComponentId GetLastInstalledComponentIdL();
-        TBool NeedUserCapabilityL();
+        TBool RequiresUserCapabilityL();
         void ProcessSilentInstallL();
+        void ProcessSilentUninstallL();
         void SetSilentInstallFileL( const TDesC& aFileName );
         void SetSilentInstallFile( RFile& aFileHandle );
         static TInt GrantCapabilitiesHelpCallback( TAny* aPtr );
@@ -95,15 +97,27 @@
         RFs iFs;
         Swi::CAsyncLauncher* iAsyncLauncher;
         CSisxSifPluginUiHandler* iUiHandler;
+        CSisxSifPluginUiHandlerSilent* iUiHandlerSilent;
         Swi::CInstallPrefs* iInstallPrefs;
         TRequestStatus* iClientStatus;
         const COpaqueNamedParams* iInputParams;
         COpaqueNamedParams* iOutputParams;
         CComponentInfo* iComponentInfo;
         HBufC* iFileName;
-        RFile* iFileHandle;         // not owned
-        TBool iSilentInstall;       // ETrue when silent install has been requested
-        TBool iInstallRequest;      // ETrue when install requestes has been made
+        RFile* iFileHandle;             // not owned
+        TBool iUseSilentMode;
+        TBool iIsPackageCheckedForSilentInstall;
+
+        enum TOperationType
+            {
+            ENone,
+            EGetComponentInfo,
+            EInstall,
+            EUninstall,
+            EActivate,
+            EDeactivate
+            };
+        TOperationType iOperation;
         };
 
 }   // namespace Usif
--- a/appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginuihandler.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginuihandler.h	Mon May 03 12:38:03 2010 +0300
@@ -21,10 +21,8 @@
 #include <e32base.h>                    // CBase
 #include <swi/msisuihandlers.h>         // MUiHandler
 #include <f32file.h>                    // RFs
-#include <barsc.h>                      // RResourceFile
-#include <sifui.h>                      // CSifUi::TMode
+#include <sifui.h>                      // CSifUi
 
-class CSifUi;
 class CSisxSifUiSelectionCache;
 
 
@@ -97,17 +95,15 @@
     private:    // new functions
         CSisxSifPluginUiHandler( RFs& aFs );
         void ConstructL();
-        void OpenResourceFileL();
-        HBufC* ReadStringResourceL( TInt aResourceId );
-        void CloseResourceFile();
+        void MemorySelectionL();
 
     private:    // data
         RFs& iFs;
-        RResourceFile iResourceFile;
         CSisxSifUiSelectionCache* iSelectionCache;
         CSifUi* iSifUi;
         CApaMaskedBitmap* iLogo;
         TBool iQuestionIncompatibleDisplayed;
+        RArray<TInt> iSelectableDrives;
         };
 
 }   // namespace Usif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginuihandlersilent.h	Mon May 03 12:38:03 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:  MUiHandler for silent install/uninstall operations.
+*
+*/
+
+#ifndef C_SISXSIFPLUGUIHANDLERSILENT_H
+#define C_SISXSIFPLUGUIHANDLERSILENT_H
+
+#include <e32base.h>                    // CBase
+#include <swi/msisuihandlers.h>         // MUiHandler
+#include <f32file.h>                    // RFs
+
+
+namespace Usif
+{
+    /**
+     *  Silent SISX SIF plugin UI handler
+     *  Universal Software Install Framework (USIF) plugin for native SISX
+     *  installation. CSisxSifPluginActiveImpl is active object that takes
+     *  care of SISX installation operations.
+     */
+    class CSisxSifPluginUiHandlerSilent : public CBase, public Swi::MUiHandler
+        {
+    public:     // constructors and destructor
+        static CSisxSifPluginUiHandlerSilent* NewL( RFs& aFs );
+        ~CSisxSifPluginUiHandlerSilent();
+
+    public:     // from MUiHandler
+        // from MCommonDialogs
+        TBool DisplayTextL( const Swi::CAppInfo& aAppInfo, Swi::TFileTextOption aOption,
+                const TDesC& aText );
+        void DisplayErrorL( const Swi::CAppInfo& aAppInfo, Swi::TErrorDialog aType,
+                const TDesC& aParam );
+        TBool DisplayDependencyBreakL( const Swi::CAppInfo& aAppInfo,
+                const RPointerArray<TDesC>& aComponents );
+        TBool DisplayApplicationsInUseL( const Swi::CAppInfo& aAppInfo,
+                const RPointerArray<TDesC>& aAppNames );
+        TBool DisplayQuestionL( const Swi::CAppInfo& aAppInfo, Swi::TQuestionDialog aQuestion,
+                const TDesC& aDes );
+
+        // from MInstallerUiHandler
+        TBool DisplayInstallL( const Swi::CAppInfo& aAppInfo, const CApaMaskedBitmap* aLogo,
+                const RPointerArray<Swi::CCertificateInfo>& aCertificates );
+        TBool DisplayGrantCapabilitiesL( const Swi::CAppInfo& aAppInfo,
+                const TCapabilitySet& aCapabilitySet );
+        TInt DisplayLanguageL( const Swi::CAppInfo& aAppInfo,
+                const RArray<TLanguage>& aLanguages );
+        TInt DisplayDriveL( const Swi::CAppInfo& aAppInfo, TInt64 aSize,
+                const RArray<TChar>& aDriveLetters, const RArray<TInt64>& aDriveSpaces );
+        TBool DisplayUpgradeL( const Swi::CAppInfo& aAppInfo,
+                const Swi::CAppInfo& aExistingAppInfo );
+        TBool DisplayOptionsL( const Swi::CAppInfo& aAppInfo,
+                const RPointerArray<TDesC>& aOptions, RArray<TBool>& aSelections );
+        TBool HandleInstallEventL( const Swi::CAppInfo& aAppInfo, Swi::TInstallEvent aEvent,
+                TInt aValue, const TDesC& aDes );
+        void HandleCancellableInstallEventL( const Swi::CAppInfo& aAppInfo,
+                Swi::TInstallCancellableEvent aEvent, Swi::MCancelHandler& aCancelHandler,
+                TInt aValue, const TDesC& aDes );
+        TBool DisplaySecurityWarningL( const Swi::CAppInfo& aAppInfo,
+                Swi::TSignatureValidationResult aSigValidationResult,
+                RPointerArray<CPKIXValidationResultBase>& aPkixResults,
+                RPointerArray<Swi::CCertificateInfo>& aCertificates, TBool aInstallAnyway );
+        TBool DisplayOcspResultL( const Swi::CAppInfo& aAppInfo,
+                Swi::TRevocationDialogMessage aMessage,
+                RPointerArray<TOCSPOutcome>& aOutcomes,
+                RPointerArray<Swi::CCertificateInfo>& aCertificates, TBool aWarningOnly );
+        void DisplayCannotOverwriteFileL( const Swi::CAppInfo& aAppInfo,
+                const Swi::CAppInfo& aInstalledAppInfo, const TDesC& aFileName );
+        TBool DisplayMissingDependencyL( const Swi::CAppInfo& aAppInfo,
+                const TDesC& aDependencyName, TVersion aWantedVersionFrom,
+                TVersion aWantedVersionTo, TVersion aInstalledVersion );
+
+        // from MUninstallerUiHandler
+        TBool DisplayUninstallL( const Swi::CAppInfo& aAppInfo );
+
+    protected:  // new functions
+        CSisxSifPluginUiHandlerSilent( RFs& aFs );
+
+    private:    // new functions
+        void ConstructL();
+
+    protected:  // data
+        RFs& iFs;
+        };
+
+}   // namespace Usif
+
+#endif      // C_SISXSIFPLUGUIHANDLERSILENT_H
+
--- a/appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifuilangname.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2008-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:   Defines class for language id amd name pairs
-*
-*/
-
-
-#ifndef SISXUILANGNAME_H
-#define SISXUILANGNAME_H
-
-#include <e32base.h>        // CBase
-
-class TResourceReader;
-
-
-class CLangName : public CBase
-    {
-public:     // constructors and destructor
-    static CLangName* NewL( TResourceReader& aReader );
-    ~CLangName();
-    
-public:     // new functions
-    TLanguage Id() const;
-    TPtrC Name() const;
-
-private:    // new functions
-    CLangName();
-    void ConstructFromResourceL( TResourceReader& aReader );
-
-private:    // data
-    TLanguage iId;
-    HBufC* iName;
-    };
-
-#endif // SISXUILANGNAME_H
--- a/appinstaller/AppinstUi/sisxsifplugin/loc/sisxsifui.loc	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,682 +0,0 @@
-/*
-* 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:   Localised strings for SISX installer (SISX SIF plugin)
-*
-*/
-
-//--------------------------------------------------------
-// LANGUAGES
-//--------------------------------------------------------
-
-// d: Heading of the language list query
-// d: Indicates that list is meant to be shown the possible language alternatives.
-// l: qtl_dialog_pri_heading
-// r: 3.0
-#define qtn_swins_lqh_lang_sel "Select language:"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language code was not known for the installer.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_unknow "Unknown language"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is UK English.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_uk "UK English"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is French.
-// l: qtl_list_popup_sec_add
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_french "French"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is German.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_german "German"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Spanish.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_span "Spanish"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Italian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_ital "Italian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Swedish.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_swedish "Swedish"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Danish.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_danish "Danish"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Norwegian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_norweg "Norwegian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Finnish.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_finnish "Finnish"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is US English.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_us "US English"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is swiss French.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_swissfre "Swiss French"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Swiss German.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_swissger "Swiss German"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Portuguese.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_portug "Portuguese"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Turkish.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_turk "Turkish"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Icelandic.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_ice "Icelandic"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Russian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_russ "Russian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Hungarian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_hung "Hungarian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Dutch.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_dutch "Dutch"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Belgian Dutch.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_belgdutch "Belgian Dutch"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Australian English.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_austeng "Australian English"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Belgian French.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_belgfrench "Belgian French"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Austrian German.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_austrger "Austrian German"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is New Zealand English.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_nzeng "New Zealand English"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is International French.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_intfrench "International French"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Czech.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_czech "Czech"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Slovak.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_slovak "Slovak"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Polish.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_polish "Polish"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Slovenian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_sloven "Slovenian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Taiwan Chinese.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_taiwchin "Taiwan Chinese"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Honk Kong Chinese.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_hkchin "Honk Kong Chinese"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Prc Chinese.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_prcchin "Prc Chinese"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Japanese.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_japan "Japanese"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Thai.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_thai "Thai"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Afrikaans.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_afrik "Afrikaans"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Albanian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_alb "Albanian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Amharic.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_amhar "Amharic"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Arabic.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_arabic "Arabic"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Armenian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_armenian "Armenian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Belarussian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_belarus "Belarussian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Bengali.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_beng "Bengali"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Bulgarian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_bulg "Bulgarian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Burmese.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_burm "Burmese"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Catalan.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_catalan "Catalan"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Croatian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_croat "Croatian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Canadian English.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_caneng "Canadian English"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is International English.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_inteng "International English"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is South African English.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_saeng "South African English"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Estonian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_estonia "Estonian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Farsi.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_farsi "Farsi"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Canadian French.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_canfrench "Canadian French"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Scots gaelic.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_scotgael "Scots gaelic"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Georgian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_georg "Georgian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Greek.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_greek "Greek"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Cyprus Greek.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_cygreek "Cyprus Greek"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Gujarati.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_gujarat "Gujarati"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Hebrew.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_hebr "Hebrew"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Hindi.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_hindi "Hindi"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Indonesian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_indon "Indonesian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Irish.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_irish "Irish"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Swiss Italian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_swissital "Swiss Italian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Kannada.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_kannada "Kannada"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Kazakh.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_kazakh "Kazakh"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Khmer.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_khmer "Khmer"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Korean.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_korean "Korean"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Lao.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_lao "Lao"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Latvian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_latv "Latvian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Lithuanian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_lith "Lithuanian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Macedonian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_maced "Macedonian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Malay.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_malay "Malay"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Malyalam.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_malyalam "Malyalam"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Marathi.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_marath "Marathi"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Moldavian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_molda "Moldavian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Mongolianh.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_mong "Mongolian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Norwegian nynorsk.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_nornynorsk "Norwegian nynorsk"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Brazilian Portuguese.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_brazport "Brazilian Portuguese"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Punjabi.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_punj "Punjabi"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Romanian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_roman "Romanian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Serbian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_serb "Serbian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Sinhalese.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_sinhal "Sinhalese"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Somali.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_somal "Somali"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is International Spanish.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_intspan "International Spanish"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Latin American Spanish.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_latspan "Latin American Spanish"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Swahili.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_swahil "Swahili"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Finland Swedish.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_finswe "Finland Swedish"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Tajik.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_tajik "Tajik"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Tamil.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_tamil "Tamil"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Telugu.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_telugu "Telugu"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Tibetan.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_tibet "Tibetan"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Tigrinya.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_tigrin "Tigrinya"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Cyprus Turkish.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_cyturk "Cyprus Turkish"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Turkmen.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_turkmen "Turkmen"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Ukranian.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_ukran "Ukranian"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Urdu.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_urdu "Urdu"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Uzbek.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_uzbek "Uzbek"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Vietnamese.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_viet "Vietnamese"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Welsh.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_welsh "Welsh"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Zulu.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_zulu "Zulu"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Tagalog.
-// l: qtl_list_popup_sec_add
-// r: 3.0
-#define qtn_swins_lqi_taga "Tagalog"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Basque.
-// l: qtl_list_popup_sec_add
-// r: 5.0
-#define qtn_swins_lqi_basque "Basque"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Galician.
-// l: qtl_list_popup_sec_add
-// r: 5.0
-#define qtn_swins_lqi_galic "Galician"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is English (APAC).
-// l: qtl_list_popup_sec_add
-// r: 5.0
-#define qtn_swins_lqi_apaceng "English (APAC)"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is English (Taiwan).
-// l: qtl_list_popup_sec_add
-// r: 5.0
-#define qtn_swins_lqi_tweng "English (Taiwan)"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is English (Hongkong).
-// l: qtl_list_popup_sec_add
-// r: 5.0
-#define qtn_swins_lqi_hkeng "English (Hongkong)"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is English (PrcChina).
-// l: qtl_list_popup_sec_add
-// r: 5.0
-#define qtn_swins_lqi_prceng "English (PrcChina)"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is English (Japanese).
-// l: qtl_list_popup_sec_add
-// r: 5.0
-#define qtn_swins_lqi_jpneng "English (Japanese)"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is English (Thai).
-// l: qtl_list_popup_sec_add
-// r: 5.0
-#define qtn_swins_lqi_thaieng "English (Thai)"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Malay (APAC).
-// l: qtl_list_popup_sec_add
-// r: 5.0
-#define qtn_swins_lqi_apacmalay "Malay (APAC)"
-
-// d: One of the items in the language selection list.
-// d: Indicates that the language in question in the selection list is Indonesian (APAC).
-// l: qtl_list_popup_sec_add
-// r: 5.0
-#define qtn_swins_lqi_apacind "Indonesian (APAC)"
-
Binary file appinstaller/AppinstUi/sisxsifplugin/loc/sisxsifui.xls has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sisxsifplugin/rom/sisxsifplugin.iby	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* 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: ROM image files for native SISX SIF plugin.
+*
+*/
+
+#ifndef SISXSIFPLUGIN_IBY
+#define SISXSIFPLUGIN_IBY
+
+ECOM_PLUGIN( sisxsifplugin.dll, sisxsifplugin.rsc )
+
+#endif  // SISXSIFPLUGIN_IBY
--- a/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginactiveimpl.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginactiveimpl.cpp	Mon May 03 12:38:03 2010 +0300
@@ -17,6 +17,7 @@
 
 #include "sisxsifpluginactiveimpl.h"    // CSisxSifPluginActiveImpl
 #include "sisxsifpluginuihandler.h"     // CSisxSifPluginUiHandler
+#include "sisxsifpluginuihandlersilent.h" // CSisxSifPluginUiHandlerSilent
 #include "sisxsifcleanuputils.h"        // CleanupResetAndDestroyPushL
 #include "sisxsifplugin.pan"            // Panic codes
 #include <usif/sif/sifcommon.h>         // Usif::CComponentInfo
@@ -73,6 +74,7 @@
 	Cancel();
     delete iAsyncLauncher;
     delete iUiHandler;
+    delete iUiHandlerSilent;
     delete iInstallPrefs;
     delete iComponentInfo;
     delete iFileName;
@@ -85,6 +87,8 @@
 //
 void CSisxSifPluginActiveImpl::DoCancel()
     {
+    FLOG( _L("CSisxSifPluginActiveImpl::DoCancel") );
+
     if( iClientStatus )
         {
         if( iAsyncLauncher )
@@ -94,8 +98,7 @@
             iAsyncLauncher = NULL;
             }
 
-        User::RequestComplete( iClientStatus, KErrCancel );
-        iClientStatus = NULL;
+        CompleteClientRequest( KErrCancel );
         }
     }
 
@@ -106,12 +109,13 @@
 void CSisxSifPluginActiveImpl::RunL()
     {
     TInt result = iStatus.Int();
-    FLOG_1( _L("CSisxSifPluginActiveImpl::RunL(), result %d"), result );
+    FLOG_2( _L("CSisxSifPluginActiveImpl::RunL(), op %d, result %d"), iOperation, result );
 
-    if( iSilentInstall )
+    if( result == KErrNone && iOperation == EInstall &&
+            iUseSilentMode && !iIsPackageCheckedForSilentInstall )
         {
-        FLOG( _L("CSisxSifPluginActiveImpl::RunL, silent install") );
-        ProcessSilentInstallL();
+        ProcessSilentInstallL();    // makes the real silent install request
+        iIsPackageCheckedForSilentInstall = ETrue;
         }
     else
         {
@@ -119,7 +123,7 @@
             {
             iOutputParams->AddIntL( KSifOutParam_ExtendedErrCode, result );
 
-            if( iInstallRequest && result == KErrNone )
+            if( iOperation == EInstall && result == KErrNone )
                 {
                 TComponentId resultComponentId = 0;
                 TRAPD( getLastIdErr, resultComponentId = GetLastInstalledComponentIdL() );
@@ -131,7 +135,7 @@
             }
 
         TInt errorCode = ConvertToSifErrorCode( result );
-        if( !iSilentInstall )
+        if( !iUseSilentMode )
             {
             if( errorCode == KErrNone )
                 {
@@ -174,15 +178,16 @@
         CComponentInfo& aComponentInfo,
         TRequestStatus& aStatus )
 	{
+    iOperation = EGetComponentInfo;
     aStatus = KRequestPending;
     iClientStatus = &aStatus;
 
-    TRAPD( err, iAsyncLauncher->GetComponentInfoL( *iUiHandler, aFileName,
+    TRAPD( err, iAsyncLauncher->GetComponentInfoL( UiHandlerL(), aFileName,
             *iInstallPrefs, aComponentInfo, iStatus ) );
     FLOG_1( _L("CSisxSifPluginActiveImpl::GetComponentInfo, err = %d"), err );
     if( err != KErrNone )
         {
-        CompleteRequest( aStatus, err );
+        CompleteClientRequest( err );
         return;
         }
 
@@ -199,18 +204,19 @@
         CComponentInfo& aComponentInfo,
         TRequestStatus& aStatus )
 	{
+    iOperation = EGetComponentInfo;
     aStatus = KRequestPending;
     iClientStatus = &aStatus;
 
-    TRAPD( err, iAsyncLauncher->GetComponentInfoL( *iUiHandler, aFileHandle,
+    TRAPD( err, iAsyncLauncher->GetComponentInfoL( UiHandlerL(), aFileHandle,
             *iInstallPrefs, aComponentInfo, iStatus ) );
     FLOG_1( _L("CSisxSifPluginActiveImpl::GetComponentInfo, err = %d"), err );
+
     if( err != KErrNone )
         {
-        CompleteRequest( aStatus, err );
+        CompleteClientRequest( err );
         return;
         }
-
     SetActive();
 	}
 
@@ -225,20 +231,26 @@
         COpaqueNamedParams& aOutputParams,
         TRequestStatus& aStatus )
 	{
-    CommonRequestPreamble( aSecurityContext, aInputParams, aOutputParams, aStatus );
-
-    FLOG_2( _L("CSisxSifPluginActiveImpl::Install: %S, iSilentInstall=%d"),
-            &aFileName, iSilentInstall );
+    iOperation = EInstall;
+    CommonRequestPreamble( aInputParams, aOutputParams, aStatus );
 
-    TRAPD( err, DoInstallL( aFileName ) );
-    FLOG_2( _L("CSisxSifPluginActiveImpl::Install, iInstallRequest=%d, err=%d"),
-            iInstallRequest, err );
-    if( err != KErrNone )
+    if( iUseSilentMode && !aSecurityContext.HasCapability( ECapabilityTrustedUI ) )
         {
-        CompleteRequest( aStatus, err );
+        FLOG( _L("CSisxSifPluginActiveImpl: missing ECapabilityTrustedUI ERROR") );
+        CompleteClientRequest( KErrPermissionDenied );
         return;
         }
 
+    FLOG_2( _L("CSisxSifPluginActiveImpl::Install: %S, iUseSilentMode=%d"),
+            &aFileName, iUseSilentMode );
+    TRAPD( err, DoInstallL( aFileName ) );
+    FLOG_1( _L("CSisxSifPluginActiveImpl::Install, err=%d"), err );
+
+    if( err != KErrNone )
+        {
+        CompleteClientRequest( err );
+        return;
+        }
     SetActive();
 	}
 
@@ -253,36 +265,42 @@
         COpaqueNamedParams& aOutputParams,
         TRequestStatus& aStatus )
 	{
-    CommonRequestPreamble( aSecurityContext, aInputParams, aOutputParams, aStatus );
+    iOperation = EInstall;
+    CommonRequestPreamble( aInputParams, aOutputParams, aStatus );
 
-    FLOG_1( _L("CSisxSifPluginActiveImpl::Install, iSilentInstall=%d"), iSilentInstall );
+    if( iUseSilentMode && !aSecurityContext.HasCapability( ECapabilityTrustedUI ) )
+        {
+        FLOG( _L("CSisxSifPluginActiveImpl: missing ECapabilityTrustedUI ERROR") );
+        CompleteClientRequest( KErrPermissionDenied );
+        return;
+        }
 
-    TInt err;
-    if( iSilentInstall )
+    FLOG_1( _L("CSisxSifPluginActiveImpl::Install, iUseSilentMode=%d"), iUseSilentMode );
+    TInt err = KErrNone;
+    if( iUseSilentMode )
         {
         // Silent install does a few addtional checks on the package to see if is
         // signed and had the required capabilities. So we need to the get the
         // package component information without installing it. Real silent install
         // operation is started in RunL() after this GetComponentInfoL() completes.
         SetSilentInstallFile( aFileHandle );
-        TRAP( err, iAsyncLauncher->GetComponentInfoL( *iUiHandler, aFileHandle, *iInstallPrefs,
-                *iComponentInfo, iStatus ) );
+        TRAP( err, iAsyncLauncher->GetComponentInfoL( UiHandlerL( iUseSilentMode ),
+                aFileHandle, *iInstallPrefs, *iComponentInfo, iStatus ) );
+        FLOG_1( _L("CSisxSifPluginActiveImpl::GetComponentInfoL, err=%d"), err );
         }
     else
         {
         // Proceed with the normal installation.
-        TRAP( err, iAsyncLauncher->InstallL( *iUiHandler, aFileHandle, *iInstallPrefs, iStatus ) );
-        iInstallRequest = ETrue;
+        TRAP( err, iAsyncLauncher->InstallL( UiHandlerL(), aFileHandle,
+                *iInstallPrefs, iStatus ) );
+        FLOG_1( _L("CSisxSifPluginActiveImpl::Install, err=%d"), err );
         }
 
-    FLOG_2( _L("CSisxSifPluginActiveImpl::Install, iInstallRequest=%d, err=%d"),
-            iInstallRequest, err );
     if( err != KErrNone )
         {
-        CompleteRequest( aStatus, err );
+        CompleteClientRequest( err );
         return;
         }
-
     SetActive();
 	}
 
@@ -297,16 +315,27 @@
         COpaqueNamedParams& aOutputParams,
         TRequestStatus& aStatus )
 	{
-    CommonRequestPreamble( aSecurityContext, aInputParams, aOutputParams, aStatus );
+    iOperation = EUninstall;
+    CommonRequestPreamble( aInputParams, aOutputParams, aStatus );
 
-    TRAPD( err, DoUninstallL( aComponentId, aStatus ) );
+    // Uninstall is always silent. TrustedUI capability is always required.
+    if( !aSecurityContext.HasCapability( ECapabilityTrustedUI ) )
+        {
+        FLOG( _L( "CSisxSifPluginActiveImpl: missing ECapabilityTrustedUI ERROR") );
+        CompleteClientRequest( KErrPermissionDenied );
+        return;
+        }
+    iUseSilentMode = ETrue;     // no complete/error notes launched in RunL
+
+    FLOG( _L("CSisxSifPluginActiveImpl::Uninstall") );
+    TRAPD( err, DoUninstallL( aComponentId ) );
     FLOG_1( _L("CSisxSifPluginActiveImpl::Uninstall, err=%d"), err );
+
     if( err != KErrNone )
         {
-        CompleteRequest( aStatus, err );
+        CompleteClientRequest( err );
         return;
         }
-
     SetActive();
 	}
 
@@ -319,6 +348,7 @@
         const TSecurityContext& /*aSecurityContext*/,
         TRequestStatus& aStatus )
 	{
+    iOperation = EActivate;
     aStatus = KRequestPending;
     iClientStatus = &aStatus;
 
@@ -326,12 +356,13 @@
     FLOG_2( _L("CSisxSifPluginActiveImpl::Activate, component %d, err=%d"), aComponentId, err );
     if( err != KErrNone )
         {
-        CompleteRequest( aStatus, err );
+        CompleteClientRequest( err );
         return;
         }
 
     iStatus = KRequestPending;
-    CompleteRequest( iStatus, KErrNone );
+    TRequestStatus* status = &iStatus;
+    User::RequestComplete( status, KErrNone );
     SetActive();
 	}
 
@@ -344,20 +375,21 @@
         const TSecurityContext& /*aSecurityContext*/,
         TRequestStatus& aStatus )
 	{
+    iOperation = EDeactivate;
     aStatus = KRequestPending;
     iClientStatus = &aStatus;
 
-    Swi::RSisRegistryWritableSession sisRegSession;
     TRAPD( err, DoDeactivateL( aComponentId ) );
     FLOG_2( _L("CSisxSifPluginActiveImpl::Deactivate, component %d, err=%d"), aComponentId, err );
     if( err != KErrNone )
         {
-        CompleteRequest( aStatus, err );
+        CompleteClientRequest( err );
         return;
         }
 
     iStatus = KRequestPending;
-    CompleteRequest( iStatus, KErrNone );
+    TRequestStatus* status = &iStatus;
+    User::RequestComplete( status, KErrNone );
     SetActive();
 	}
 
@@ -378,20 +410,47 @@
     {
     User::LeaveIfError( iFs.Connect() );
 
-    iUiHandler = CSisxSifPluginUiHandler::NewL( iFs );
     iAsyncLauncher = Swi::CAsyncLauncher::NewL();
     iInstallPrefs = Swi::CInstallPrefs::NewL();
     iComponentInfo = CComponentInfo::NewL();
     }
 
 // ---------------------------------------------------------------------------
-// CSisxSifPluginActiveImpl::Complete()
+// CSisxSifPluginActiveImpl::UiHandlerL()
 // ---------------------------------------------------------------------------
 //
-void CSisxSifPluginActiveImpl::CompleteRequest( TRequestStatus& aStatus, TInt aResult )
+Swi::MUiHandler& CSisxSifPluginActiveImpl::UiHandlerL( TBool aUseSilentMode )
     {
-    TRequestStatus* statusPtr = &aStatus;
-    User::RequestComplete( statusPtr, aResult );
+    Swi::MUiHandler* handler = NULL;
+
+    if( aUseSilentMode )
+        {
+        if( iUiHandler )
+            {
+            delete iUiHandler;
+            iUiHandler = NULL;
+            }
+        if( !iUiHandlerSilent )
+            {
+            iUiHandlerSilent = CSisxSifPluginUiHandlerSilent::NewL( iFs );
+            }
+        handler = iUiHandlerSilent;
+        }
+    else
+        {
+        if( iUiHandlerSilent )
+            {
+            delete iUiHandlerSilent;
+            iUiHandlerSilent = NULL;
+            }
+        if( !iUiHandler )
+            {
+            iUiHandler = CSisxSifPluginUiHandler::NewL( iFs );
+            }
+        handler = iUiHandler;
+        }
+
+    return *handler;
     }
 
 // ---------------------------------------------------------------------------
@@ -399,7 +458,6 @@
 // ---------------------------------------------------------------------------
 //
 void CSisxSifPluginActiveImpl::CommonRequestPreamble(
-        const TSecurityContext& aSecurityContext,
         const COpaqueNamedParams& aInputParams,
         COpaqueNamedParams& aOutputParams,
         TRequestStatus& aStatus )
@@ -407,24 +465,28 @@
     aStatus = KRequestPending;
     iClientStatus = &aStatus;
 
+    TInt silentInstall = 0;
+    TRAPD( err, aInputParams.GetIntByNameL( KSifInParam_InstallSilently, silentInstall ) );
+    iUseSilentMode = ( err == KErrNone && silentInstall != 0 );
+    iIsPackageCheckedForSilentInstall = EFalse;
+
     iInputParams = &aInputParams;
     iOutputParams = &aOutputParams;
 
-    // Check InstallSilently opaque input argument
-    TInt silentInstall = 0;
-    TRAP_IGNORE( aInputParams.GetIntByNameL( KSifInParam_InstallSilently, silentInstall ) );
-    if( silentInstall )
+    // TODO: KSifInParam_InstallInactive
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginActiveImpl::CompleteClientRequest()
+// ---------------------------------------------------------------------------
+//
+void CSisxSifPluginActiveImpl::CompleteClientRequest( TInt aResult )
+    {
+    if( iClientStatus )
         {
-        iSilentInstall = ETrue;
-        if( !aSecurityContext.HasCapability( ECapabilityTrustedUI ) )
-            {
-            FLOG( _L("CSisxSifPluginActiveImpl: missing ECapabilityTrustedUI ERROR") );
-            CompleteRequest( aStatus, KErrPermissionDenied );
-            iClientStatus = NULL;
-            }
+        User::RequestComplete( iClientStatus, aResult );
+        iClientStatus = NULL;
         }
-
-    // TODO: KSifInParam_InstallInactive
     }
 
 // ---------------------------------------------------------------------------
@@ -433,21 +495,21 @@
 //
 void CSisxSifPluginActiveImpl::DoInstallL( const TDesC& aFileName )
     {
-    if( iSilentInstall )
+    if( iUseSilentMode )
         {
         // Silent install does a few addtional checks on the package to see if is
         // signed and had the required capabilities. So we need to the get the
         // package component information without installing it. Real silent install
         // operation is started in RunL() after this GetComponentInfoL() completes.
         SetSilentInstallFileL( aFileName );
-        iAsyncLauncher->GetComponentInfoL( *iUiHandler, aFileName, *iInstallPrefs,
-                *iComponentInfo, iStatus );
+        iIsPackageCheckedForSilentInstall = EFalse;
+        iAsyncLauncher->GetComponentInfoL( UiHandlerL( iUseSilentMode ), aFileName,
+                *iInstallPrefs, *iComponentInfo, iStatus );
         }
     else
         {
         // Proceed with the normal installation.
-        iAsyncLauncher->InstallL( *iUiHandler, aFileName, *iInstallPrefs, iStatus );
-        iInstallRequest = ETrue;
+        iAsyncLauncher->InstallL( UiHandlerL(), aFileName, *iInstallPrefs, iStatus );
         }
     }
 
@@ -455,7 +517,7 @@
 // CSisxSifPluginActiveImpl::DoUninstallL()
 // ---------------------------------------------------------------------------
 //
-void CSisxSifPluginActiveImpl::DoUninstallL( TComponentId aComponentId, TRequestStatus& /*aStatus*/ )
+void CSisxSifPluginActiveImpl::DoUninstallL( TComponentId aComponentId )
     {
     RSoftwareComponentRegistry scrSession;
     User::LeaveIfError( scrSession.Connect() );
@@ -475,7 +537,7 @@
     TUid objectId = TUid::Uid( intPropertyEntry->IntValue() );
     CleanupStack::PopAndDestroy( 2, &scrSession );      // propertyEntry, scrSession
 
-    iAsyncLauncher->UninstallL( *iUiHandler, objectId, iStatus );
+    iAsyncLauncher->UninstallL( UiHandlerL( iUseSilentMode ), objectId, iStatus );
     }
 
 // ---------------------------------------------------------------------------
@@ -508,6 +570,9 @@
 //
 TInt CSisxSifPluginActiveImpl::ConvertToSifErrorCode( TInt aSwiErrorCode )
     {
+    FLOG_1( _L("CSisxSifPluginActiveImpl::ConvertToSifErrorCode(), aSwiErrorCode=%d"),
+            aSwiErrorCode );
+
     // TODO: need to show also SWI error code in UI somehow when necessary
 
     if( aSwiErrorCode > KSystemWideErrorsBoundary )
@@ -609,7 +674,7 @@
 //
 TComponentId CSisxSifPluginActiveImpl::GetLastInstalledComponentIdL()
     {
-    ASSERT( iInstallRequest );
+    ASSERT( iOperation == EInstall );
 
     // Find the id of the last installed component and return it
     TInt uid;
@@ -627,10 +692,10 @@
     }
 
 // ---------------------------------------------------------------------------
-// CSisxSifPluginActiveImpl::NeedUserCapabilityL()
+// CSisxSifPluginActiveImpl::RequiresUserCapabilityL()
 // ---------------------------------------------------------------------------
 //
-TBool CSisxSifPluginActiveImpl::NeedUserCapabilityL()
+TBool CSisxSifPluginActiveImpl::RequiresUserCapabilityL()
     {
     // Silent install is not allowed when the package requires additional capabilities
     // than what it is signed for (Package may request for some capability that is not
@@ -653,38 +718,32 @@
 //
 void CSisxSifPluginActiveImpl::ProcessSilentInstallL()
     {
-    // We need to do this only once per installation request
-    iSilentInstall = EFalse;
-    iInstallRequest = ETrue;
-
-    // TODO: should self-signed packages that do not contain executables be allowed?
-    //TBool hasExecutable = iComponentInfo->RootNodeL().HasExecutable();
-
-    TBool isNotAuthenticated = ( iComponentInfo->RootNodeL().Authenticity() == ENotAuthenticated );
-    TBool reqUserCap = NeedUserCapabilityL();
-    if( isNotAuthenticated || reqUserCap )
+    TBool isAuthenticated = ( iComponentInfo->RootNodeL().Authenticity() == EAuthenticated );
+    TBool requiresUserCapability = RequiresUserCapabilityL();
+    if( !isAuthenticated || requiresUserCapability )
         {
-        if( isNotAuthenticated )
+        if( !isAuthenticated )
             {
             FLOG( _L("Silent Install is not allowed on unsigned or self-signed packages") );
             }
-        if( reqUserCap )
+        if( requiresUserCapability )
             {
             FLOG( _L("Silent Install is not allowed when user capabilities are required") );
             }
-        User::RequestComplete( iClientStatus, KErrPermissionDenied );
-        iClientStatus = NULL;
+        CompleteClientRequest( KErrPermissionDenied );
         }
     else
         {
         TInt err = KErrNone;
         if( iFileHandle )
             {
-            TRAP( err, iAsyncLauncher->InstallL( *iUiHandler, *iFileHandle, *iInstallPrefs, iStatus ) );
+            TRAP( err, iAsyncLauncher->InstallL( UiHandlerL( iUseSilentMode ), *iFileHandle,
+                    *iInstallPrefs, iStatus ) );
             }
         else if( iFileName )
             {
-            TRAP( err, iAsyncLauncher->InstallL( *iUiHandler, *iFileName, *iInstallPrefs, iStatus ) );
+            TRAP( err, iAsyncLauncher->InstallL( UiHandlerL( iUseSilentMode ), *iFileName,
+                    *iInstallPrefs, iStatus ) );
             }
         else
             {
@@ -697,8 +756,7 @@
             }
         else
             {
-            User::RequestComplete( iClientStatus, err );
-            iClientStatus = NULL;
+            CompleteClientRequest( err );
             }
         }
     }
--- a/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandler.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandler.cpp	Mon May 03 12:38:03 2010 +0300
@@ -19,11 +19,9 @@
 #include "sisxsifplugin.pan"            // Panic codes
 #include "sisxsifcleanuputils.h"        // CleanupResetAndDestroyPushL
 #include "sisxsifuiselectioncache.h"    // CSisxUISelectionCache
-#include "sisxsifuilangname.h"          // CLangName
-#include <data_caging_path_literals.hrh> // KDC_RESOURCE_FILES_DIR
-#include <sisxsifuidata.rsg>            // Resource IDs
 #include <sifui.h>                      // CSifUi
 #include <bautils.h>                    // BaflUtils
+#include <driveinfo.h>                  // DriveInfo
 #include <featmgr.h>                    // FeatureManager
 //#include <csxhelp/am.hlp.hrh>           // Help IDs
 #include <hb/hbcore/hbsymbiandevicedialog.h> // CHbDeviceDialog
@@ -31,8 +29,6 @@
 
 using namespace Usif;
 
-_LIT( KSisxUIResourceFileName, "sisxsifuidata.rsc" );
-
 // TODO: replace with proper tracing support
 #ifdef _DEBUG
 #define FLOG(x)         RDebug::Print(x);
@@ -45,14 +41,6 @@
 #endif
 
 
-// ======== LOCAL FUNCTIONS =========
-
-TBool HasLangId( const TLanguage* aId, const CLangName& aLang )
-    {
-    return( *aId == aLang.Id() );
-    }
-
-
 // ======== MEMBER FUNCTIONS ========
 
 // ---------------------------------------------------------------------------
@@ -60,26 +48,26 @@
 // ---------------------------------------------------------------------------
 //
 CSisxSifPluginUiHandler* CSisxSifPluginUiHandler::NewL( RFs& aFs )
-	{
+    {
     FLOG( _L("CSisxSifPluginUiHandler::NewL") );
-	CSisxSifPluginUiHandler *self = new( ELeave ) CSisxSifPluginUiHandler( aFs );
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	CleanupStack::Pop( self );
-	return self;
-	}
+    CSisxSifPluginUiHandler *self = new( ELeave ) CSisxSifPluginUiHandler( aFs );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
 
 // ---------------------------------------------------------------------------
 // CSisxSifPluginUiHandler::~CSisxSifPluginUiHandler()
 // ---------------------------------------------------------------------------
 //
 CSisxSifPluginUiHandler::~CSisxSifPluginUiHandler()
-	{
+    {
     FLOG( _L("CSisxSifPluginUiHandler::~CSisxSifPluginUiHandler") );
     delete iSelectionCache;
     delete iSifUi;
-    CloseResourceFile();
-	}
+    iSelectableDrives.Close();
+    }
 
 // ---------------------------------------------------------------------------
 // CSisxSifPluginUiHandler::DisplayTextL()
@@ -164,12 +152,13 @@
     {
     FLOG( _L("CSisxSifPluginUiHandler::DisplayInstallL") );
 
-    iSifUi->SetMode( CSifUi::EInstalling );
-
     // TODO: show preparing note -- unless it can be displayed already earlier.
     // Preparing note should not have any buttons yet, but it might display some
     // application details already.
 
+    // TODO: SISX SIF plugin needs to set memory selection when needed
+    MemorySelectionL();
+
     return ETrue;
     }
 
@@ -297,7 +286,7 @@
 TBool CSisxSifPluginUiHandler::DisplaySecurityWarningL( const Swi::CAppInfo& aAppInfo,
         Swi::TSignatureValidationResult aSigValidationResult,
         RPointerArray<CPKIXValidationResultBase>& /*aPkixResults*/,
-        RPointerArray<Swi::CCertificateInfo>& aCertificates,
+        RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/,
         TBool aInstallAnyway )
     {
     FLOG( _L("CSisxSifPluginUiHandler::DisplaySecurityWarningL") );
@@ -309,7 +298,7 @@
     switch( aSigValidationResult )
         {
         case Swi::EValidationSucceeded:
-            result = iSifUi->ShowConfirmationL( aAppInfo, appSize, iLogo, aCertificates );
+            result = iSifUi->ShowConfirmationL( aAppInfo, appSize, iLogo );
             break;
 
         case Swi::ESignatureSelfSigned:
@@ -322,7 +311,7 @@
         case Swi::EMandatorySignatureMissing:
             if( aInstallAnyway )
                 {
-                result = iSifUi->ShowConfirmationL( aAppInfo, appSize, iLogo, aCertificates );
+                result = iSifUi->ShowConfirmationL( aAppInfo, appSize, iLogo );
                 }
             break;
 
@@ -374,13 +363,11 @@
 // CSisxSifPluginUiHandler::DisplayUninstallL()
 // ---------------------------------------------------------------------------
 //
-TBool CSisxSifPluginUiHandler::DisplayUninstallL( const Swi::CAppInfo& /*aAppInfo*/ )
+TBool CSisxSifPluginUiHandler::DisplayUninstallL( const Swi::CAppInfo& aAppInfo )
     {
     FLOG( _L("CSisxSifPluginUiHandler::DisplayUninstallL") );
 
-    iSifUi->SetMode( CSifUi::EUninstalling );
-
-    return ETrue;
+    return iSifUi->ShowConfirmationL( aAppInfo );
     }
 
 // ---------------------------------------------------------------------------
@@ -403,7 +390,8 @@
     {
     if( iSifUi )
         {
-        iSifUi->ShowFailedL( aErrorCode );
+        _LIT( KErrorMessage, "Error" );
+        iSifUi->ShowFailedL( aErrorCode, KErrorMessage );
         }
     }
 
@@ -421,46 +409,35 @@
 //
 void CSisxSifPluginUiHandler::ConstructL()
     {
-    OpenResourceFileL();
     iSifUi = CSifUi::NewL();
     iSelectionCache = CSisxSifUiSelectionCache::NewL();
     }
 
 // ---------------------------------------------------------------------------
-// CSisxSifPluginUiHandler::OpenResourceFileL()
-// ---------------------------------------------------------------------------
-//
-void CSisxSifPluginUiHandler::OpenResourceFileL()
-    {
-    TFileName fileName;
-    fileName.Copy( KDC_RESOURCE_FILES_DIR );
-    fileName.Append( KSisxUIResourceFileName );
-    BaflUtils::NearestLanguageFile( iFs, fileName );
-    iResourceFile.OpenL( iFs, fileName );
-    iResourceFile.ConfirmSignatureL();
-    }
-
-// ---------------------------------------------------------------------------
-// CSisxSifPluginUiHandler::ReadStringResourceL()
+// CSisxSifPluginUiHandler::MemorySelectionL()
 // ---------------------------------------------------------------------------
 //
-HBufC* CSisxSifPluginUiHandler::ReadStringResourceL( TInt aResourceId )
+void CSisxSifPluginUiHandler::MemorySelectionL()
     {
-    HBufC8* buffer = iResourceFile.AllocReadLC( aResourceId );
-    TResourceReader reader;
-    reader.SetBuffer( buffer );
-    const TPtrC ptr( reader.ReadTPtrC() );
-    HBufC* string = ptr.AllocL();
-    CleanupStack::PopAndDestroy( buffer );
-    return string;
+    TDriveList driveList;
+    TInt driveCount = 0;
+    TInt err = DriveInfo::GetUserVisibleDrives( iFs, driveList, driveCount );
+    User::LeaveIfError( err );
+
+    iSelectableDrives.Reset();
+    TInt driveListLength = driveList.Length();
+    for( TInt driveNumber = 0; driveNumber < driveListLength; driveNumber++ )
+        {
+        if( driveList[ driveNumber ] )
+            {
+            TUint driveStatus = 0;
+            err = DriveInfo::GetDriveStatus( iFs, driveNumber, driveStatus );
+            if( !err && !( driveStatus & DriveInfo::EDriveRemote ) )
+                {
+                iSelectableDrives.Append( driveNumber );
+                }
+            }
+        }
+    iSifUi->SetMemorySelectionL( iSelectableDrives );
     }
 
-// ---------------------------------------------------------------------------
-// CSisxSifPluginUiHandler::CloseResourceFile()
-// ---------------------------------------------------------------------------
-//
-void CSisxSifPluginUiHandler::CloseResourceFile()
-    {
-    iResourceFile.Close();
-    }
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandlersilent.cpp	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,327 @@
+/*
+* 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: Native SISX SIF (Software Install Framework) plugin.
+*
+*/
+
+#include "sisxsifpluginuihandlersilent.h"   // CSisxSifPluginUiHandlerSilentSilent
+#include "sisxsifplugin.pan"                // Panic codes
+#include "sisxsifcleanuputils.h"            // CleanupResetAndDestroyPushL
+
+using namespace Usif;
+
+// TODO: replace with proper tracing support
+#ifdef _DEBUG
+#define FLOG(x)         RDebug::Print(x);
+#define FLOG_1(x,y)     RDebug::Print(x, y);
+#define FLOG_2(x,y,z)   RDebug::Print(x, y, z);
+#else
+#define FLOG(x)
+#define FLOG_1(x,y)
+#define FLOG_2(x,y,z)
+#endif
+
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::NewL()
+// ---------------------------------------------------------------------------
+//
+CSisxSifPluginUiHandlerSilent* CSisxSifPluginUiHandlerSilent::NewL( RFs& aFs )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::NewL") );
+    CSisxSifPluginUiHandlerSilent *self = new( ELeave ) CSisxSifPluginUiHandlerSilent( aFs );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::~CSisxSifPluginUiHandlerSilent()
+// ---------------------------------------------------------------------------
+//
+CSisxSifPluginUiHandlerSilent::~CSisxSifPluginUiHandlerSilent()
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::~CSisxSifPluginUiHandlerSilent") );
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayTextL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplayTextL( const Swi::CAppInfo& /*aAppInfo*/,
+        Swi::TFileTextOption /*aOption*/, const TDesC& /*aText*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayTextL") );
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayErrorL()
+// ---------------------------------------------------------------------------
+//
+void CSisxSifPluginUiHandlerSilent::DisplayErrorL( const Swi::CAppInfo& /*aAppInfo*/,
+        Swi::TErrorDialog /*aType*/, const TDesC& /*aParam*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayErrorL") );
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplayDependencyBreakL( const Swi::CAppInfo& /*aAppInfo*/,
+        const RPointerArray<TDesC>& /*aComponents*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayDependencyBreakL") );
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayApplicationsInUseL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplayApplicationsInUseL( const Swi::CAppInfo& /*aAppInfo*/,
+        const RPointerArray<TDesC>& /*aAppNames*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayApplicationsInUseL") );
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayQuestionL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplayQuestionL( const Swi::CAppInfo& /*aAppInfo*/,
+        Swi::TQuestionDialog aQuestion, const TDesC& /*aDes*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayQuestionL") );
+
+    TBool result = ETrue;
+    switch( aQuestion )
+        {
+        case Swi::EQuestionIncompatible:
+            break;
+        case Swi::EQuestionOverwriteFile:
+        default:
+            break;
+        }
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayInstallL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplayInstallL( const Swi::CAppInfo& /*aAppInfo*/,
+        const CApaMaskedBitmap* /*aLogo*/,
+        const RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayInstallL") );
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayGrantCapabilitiesL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplayGrantCapabilitiesL( const Swi::CAppInfo& /*aAppInfo*/,
+        const TCapabilitySet& /*aCapabilitySet*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayGrantCapabilitiesL") );
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayLanguageL()
+// ---------------------------------------------------------------------------
+//
+TInt CSisxSifPluginUiHandlerSilent::DisplayLanguageL( const Swi::CAppInfo& /*aAppInfo*/,
+        const RArray<TLanguage>& /*aLanguages*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayLanguageL") );
+
+    return 0;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayDriveL()
+// ---------------------------------------------------------------------------
+//
+TInt CSisxSifPluginUiHandlerSilent::DisplayDriveL( const Swi::CAppInfo& /*aAppInfo*/,
+        TInt64 /*aSize*/, const RArray<TChar>& /*aDriveLetters*/,
+        const RArray<TInt64>& /*aDriveSpaces*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayDriveL") );
+
+    return 0;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayUpgradeL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplayUpgradeL( const Swi::CAppInfo& /*aAppInfo*/,
+        const Swi::CAppInfo& /*aExistingAppInfo*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayUpgradeL") );
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayOptionsL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplayOptionsL( const Swi::CAppInfo& /*aAppInfo*/,
+        const RPointerArray<TDesC>& /*aOptions*/, RArray<TBool>& /*aSelections*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayOptionsL") );
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::HandleInstallEventL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::HandleInstallEventL( const Swi::CAppInfo& /*aAppInfo*/,
+        Swi::TInstallEvent /*aEvent*/, TInt /*aValue*/, const TDesC& /*aDes*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::HandleInstallEventL") );
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::HandleCancellableInstallEventL()
+// ---------------------------------------------------------------------------
+//
+void CSisxSifPluginUiHandlerSilent::HandleCancellableInstallEventL(
+        const Swi::CAppInfo& /*aAppInfo*/, Swi::TInstallCancellableEvent /*aEvent*/,
+        Swi::MCancelHandler& /*aCancelHandler*/, TInt /*aValue*/,const TDesC& /*aDes*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::HandleCancellableInstallEventL") );
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplaySecurityWarningL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplaySecurityWarningL( const Swi::CAppInfo& /*aAppInfo*/,
+        Swi::TSignatureValidationResult aSigValidationResult,
+        RPointerArray<CPKIXValidationResultBase>& /*aPkixResults*/,
+        RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/,
+        TBool aInstallAnyway )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplaySecurityWarningL") );
+    TBool result = EFalse;
+
+    switch( aSigValidationResult )
+        {
+        case Swi::EValidationSucceeded:
+            result = ETrue;
+            break;
+
+        case Swi::ESignatureSelfSigned:
+        case Swi::ENoCertificate:
+        case Swi::ECertificateValidationError:
+        case Swi::ESignatureNotPresent:
+        case Swi::ESignatureCouldNotBeValidated:
+        case Swi::ENoCodeSigningExtension:
+        case Swi::ENoSupportedPolicyExtension:
+        case Swi::EMandatorySignatureMissing:
+            if( aInstallAnyway )
+                {
+                result = ETrue;
+                }
+            break;
+
+        default:
+            break;
+        }
+
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayOcspResultL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplayOcspResultL( const Swi::CAppInfo& /*aAppInfo*/,
+        Swi::TRevocationDialogMessage /*aMessage*/, RPointerArray<TOCSPOutcome>& /*aOutcomes*/,
+        RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/,TBool /*aWarningOnly*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayOcspResultL") );
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayCannotOverwriteFileL()
+// ---------------------------------------------------------------------------
+//
+void CSisxSifPluginUiHandlerSilent::DisplayCannotOverwriteFileL( const Swi::CAppInfo& /*aAppInfo*/,
+        const Swi::CAppInfo& /*aInstalledAppInfo*/,const TDesC& /*aFileName*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayCannotOverwriteFileL") );
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayMissingDependencyL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplayMissingDependencyL( const Swi::CAppInfo& /*aAppInfo*/,
+        const TDesC& /*aDependencyName*/, TVersion /*aWantedVersionFrom*/,
+        TVersion /*aWantedVersionTo*/, TVersion /*aInstalledVersion*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayMissingDependencyL") );
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::DisplayUninstallL()
+// ---------------------------------------------------------------------------
+//
+TBool CSisxSifPluginUiHandlerSilent::DisplayUninstallL( const Swi::CAppInfo& /*aAppInfo*/ )
+    {
+    FLOG( _L("CSisxSifPluginUiHandlerSilent::DisplayUninstallL") );
+
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::CSisxSifPluginUiHandlerSilent()
+// ---------------------------------------------------------------------------
+//
+CSisxSifPluginUiHandlerSilent::CSisxSifPluginUiHandlerSilent( RFs& aFs ) : iFs( aFs )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerSilent::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CSisxSifPluginUiHandlerSilent::ConstructL()
+    {
+    }
+
--- a/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifuilangname.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2008-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:   CLangName class contains language id amd name
-*
-*/
-
-
-#include "sisxsifuilangname.h"          // CLangName
-#include <barsread.h>                   // TResourceReader
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CLangName::NewL()
-// ---------------------------------------------------------------------------
-//
-CLangName* CLangName::NewL( TResourceReader& aReader )
-    {
-    CLangName* self = new (ELeave) CLangName;
-    CleanupStack::PushL( self );
-    self->ConstructFromResourceL( aReader );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CLangName::~CLangName()
-// ---------------------------------------------------------------------------
-//
-CLangName::~CLangName()
-    {
-    delete iName;
-    }
-
-// ---------------------------------------------------------------------------
-// CLangName::Id()
-// ---------------------------------------------------------------------------
-//
-TLanguage CLangName::Id() const
-    {
-    return iId;
-    }
-
-// ---------------------------------------------------------------------------
-// CLangName::Name()
-// ---------------------------------------------------------------------------
-//
-TPtrC CLangName::Name() const
-    {
-    return *iName;
-    }
-
-// ---------------------------------------------------------------------------
-// CLangName::CLangName()
-// ---------------------------------------------------------------------------
-//
-CLangName::CLangName()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CLangName::ConstructFromResourceL()
-// ---------------------------------------------------------------------------
-//
-void CLangName::ConstructFromResourceL( TResourceReader& aReader )
-    {
-    iId = static_cast< TLanguage >( aReader.ReadInt16() );
-    iName = aReader.ReadHBufC16L();
-    }
-
--- a/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner.cpp	Mon May 03 12:38:03 2010 +0300
@@ -39,6 +39,20 @@
     }
 }
 
+void ActiveRunner::remove(const Usif::TComponentId& aComponentId, bool silent)
+{
+    if (d_ptr) {
+        d_ptr->Remove(aComponentId, silent);
+    }
+}
+
+void ActiveRunner::remove(const TUid& aUid, const TDesC8& aMime, bool silent)
+{
+    if (d_ptr) {
+        d_ptr->Remove(aUid, aMime, silent);
+    }
+}
+
 void ActiveRunner::handleCompletion()
 {
     emit opCompleted();
--- a/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner.h	Mon May 03 12:38:03 2010 +0300
@@ -19,6 +19,7 @@
 #define ACTIVERUNNER_H
 
 #include <QObject>
+#include <usif/usifcommon.h>
 
 class ActiveRunnerPrivate;
 
@@ -37,6 +38,8 @@
 
 public:     // new functions
     void install(const QString &fileName, bool silent);
+    void remove(const Usif::TComponentId& aComponentId, bool silent);
+    void remove(const TUid& aUid, const TDesC8& aMime, bool silent);
 
 protected:
     void handleCompletion();
--- a/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner_symbian.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner_symbian.cpp	Mon May 03 12:38:03 2010 +0300
@@ -21,12 +21,12 @@
 
 ActiveRunnerPrivate::ActiveRunnerPrivate(ActiveRunner *aRunner) :
         CActive( CActive::EPriorityStandard ), q_ptr( aRunner )
-{
+    {
     CActiveScheduler::Add(this);
-}
+    }
 
 ActiveRunnerPrivate::~ActiveRunnerPrivate()
-{
+    {
     Cancel();
     if( iUseSif )
         {
@@ -39,10 +39,10 @@
     delete iFileName;
     delete iArguments;
     delete iResults;
-}
+    }
 
 TInt ActiveRunnerPrivate::Initialize( bool aUseSif )
-{
+    {
     iUseSif = aUseSif;
     TInt ret = KErrNone;
     if( iUseSif )
@@ -54,16 +54,28 @@
         ret = iSWInstLauncher.Connect();
         }
     return ret;
-}
+    }
 
 TInt ActiveRunnerPrivate::Install( const QString& aFileName, bool aSilent )
-{
+    {
     TRAPD( err, DoInstallL( aFileName, aSilent ) );
     return err;
-}
+    }
+
+TInt ActiveRunnerPrivate::Remove( const Usif::TComponentId& aComponentId, bool aSilent )
+    {
+    TRAPD( err, DoRemoveL( aComponentId, aSilent ) );
+    return err;
+    }
+
+TInt ActiveRunnerPrivate::Remove( const TUid& aUid, const TDesC8& aMime, bool aSilent )
+    {
+    TRAPD( err, DoRemoveL( aUid, aMime, aSilent ) );
+    return err;
+    }
 
 void ActiveRunnerPrivate::DoCancel()
-{
+    {
     if( iUseSif )
         {
         iSoftwareInstall.CancelOperation();
@@ -72,26 +84,28 @@
         {
         iSWInstLauncher.CancelAsyncRequest( SwiUI::ERequestInstall );
         }
-}
+    }
 
 void ActiveRunnerPrivate::RunL()
-{
+    {
     User::LeaveIfError( iStatus.Int() );
 
     RDebug::Printf( "USIFTestInstaller: Installation completed" );
-    if( q_ptr ) {
+    if( q_ptr )
+        {
         q_ptr->handleCompletion();
+        }
     }
-}
 
 TInt ActiveRunnerPrivate::RunError( TInt aError )
-{
+    {
     RDebug::Printf( "USIFTestInstaller: Error %d", aError );
-    if( q_ptr ) {
+    if( q_ptr )
+        {
         q_ptr->handleError( aError );
-    }
+        }
     return KErrNone;
-}
+    }
 
 void ActiveRunnerPrivate::DoInstallL( const QString& aFileName, bool aSilent )
     {
@@ -151,3 +165,40 @@
     SetActive();
     }
 
+void ActiveRunnerPrivate::DoRemoveL( const Usif::TComponentId& aComponentId, bool aSilent )
+    {
+    if( aSilent )
+        {
+        delete iArguments;
+        iArguments = NULL;
+        iArguments = Usif::COpaqueNamedParams::NewL();
+        iArguments->AddIntL( Usif::KSifInParam_InstallSilently, 1 );
+
+        delete iResults;
+        iResults = NULL;
+        iResults = Usif::COpaqueNamedParams::NewL();
+
+        iSoftwareInstall.Uninstall( aComponentId, *iArguments, *iResults, iStatus );
+        }
+    else
+        {
+        iSoftwareInstall.Uninstall( aComponentId, iStatus );
+        }
+    SetActive();
+    }
+
+void ActiveRunnerPrivate::DoRemoveL( const TUid& aUid, const TDesC8& aMime, bool aSilent )
+    {
+    if( aSilent )
+        {
+        SwiUI::TUninstallOptions defaultOptions;
+        SwiUI::TUninstallOptionsPckg optPckg( defaultOptions );
+        iSWInstLauncher.SilentUninstall( iStatus, aUid, optPckg, aMime );
+        }
+    else
+        {
+        iSWInstLauncher.Uninstall( iStatus, aUid, aMime );
+        }
+    SetActive();
+    }
+
--- a/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner_symbian.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner_symbian.h	Mon May 03 12:38:03 2010 +0300
@@ -36,6 +36,8 @@
 public:     // new functions
     TInt Initialize( bool aUseSif );
     TInt Install( const QString& aFileName, bool aSilent );
+    TInt Remove( const Usif::TComponentId& aComponentId, bool aSilent );
+    TInt Remove( const TUid& aUid, const TDesC8& aMime, bool aSilent );
 
 protected:  // from CActive
     void DoCancel();
@@ -44,6 +46,8 @@
 
 private:    // new functions
     void DoInstallL( const QString& aFileName, bool aSilent );
+    void DoRemoveL( const Usif::TComponentId& aComponentId, bool aSilent );
+    void DoRemoveL( const TUid& aUid, const TDesC8& aMime, bool aSilent );
 
 private:    // data
     ActiveRunner *q_ptr;
--- a/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.cpp	Mon May 03 12:38:03 2010 +0300
@@ -26,13 +26,23 @@
 #include <hbmessagebox.h>
 #include <QGraphicsLinearLayout>
 #include <QDir>
+#include <xqappmgr.h>                       // XQApplicationManager
+#include <usif/scr/scr.h>                   // RSoftwareComponentRegistry
 
-#define INSTALLS_PATH "C:\\Data\\Installs\\"
+using namespace Usif;
+
+#define INSTALLS_PATH_1 "C:\\Data\\Installs\\"
+#define INSTALLS_PATH_2 "E:\\Installs\\"
+#define INSTALLS_PATH_3 "F:\\Installs\\"
+#define INSTALLS_PATH_4 "C:\\"
+#define INSTALLS_PATH_5 "E:\\"
+#define INSTALLS_PATH_6 "F:\\"
 
 
 TestInstaller::TestInstaller(int& argc, char* argv[]) : HbApplication(argc, argv),
-    mMainWindow(0), mMainView(0), mFileNames(), mSelectableFiles(0),
-    mUseSilentInstall(false), mRunner(0)
+    mMainWindow(0), mMainView(0), mUseSilentInstall(false),
+    mInstallDirectories(0), mInstallableFiles(0), mRemovableApps(0),
+    mCurrentDirPath(), mCurrentFile(), mRunner(0)
 {
     mMainWindow = new HbMainWindow();
     mMainView = new HbView();
@@ -40,33 +50,67 @@
 
     QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
 
-    mSelectableFiles = new HbComboBox;
-    mSelectableFiles->setEditable(false);
-    connect(mSelectableFiles, SIGNAL(currentIndexChanged(int)),
-            this, SLOT(selectedFileChanged(int)));
-    layout->addItem(mSelectableFiles);
+    HbCheckBox *silentInstallCheckBox = new HbCheckBox;
+    silentInstallCheckBox->setText(tr("Silent install/uninstall"));
+    connect(silentInstallCheckBox, SIGNAL(stateChanged(int)),
+        this, SLOT(silentCheckChanged(int)));
+    layout->addItem(silentInstallCheckBox);
+    layout->addStretch();
+
+    HbLabel *installTitle = new HbLabel(tr("Install:"));
+    layout->addItem(installTitle);
 
-    HbCheckBox *silentInstallCheckBox = new HbCheckBox;
-    silentInstallCheckBox->setText(tr("Silent install"));
-    connect(silentInstallCheckBox, SIGNAL(stateChanged(int)), this, SLOT(silentCheckChanged(int)));
-    layout->addItem(silentInstallCheckBox);
+    mInstallDirectories = new HbComboBox;
+    mInstallDirectories->setEditable(false);
+    QStringList dirList;
+    getInstallDirs(dirList);
+    mInstallDirectories->setItems(dirList);
+    connect(mInstallDirectories, SIGNAL(currentIndexChanged(int)),
+        this, SLOT(installableDirChanged(int)));
+    layout->addItem(mInstallDirectories);
+
+    mInstallableFiles = new HbComboBox;
+    mInstallableFiles->setEditable(false);
+    connect(mInstallableFiles, SIGNAL(currentIndexChanged(int)),
+            this, SLOT(installableFileChanged(int)));
+    layout->addItem(mInstallableFiles);
 
     HbPushButton *installNew = new HbPushButton(tr("Install using new API"));
     layout->addItem(installNew);
     HbPushButton *installOld = new HbPushButton(tr("Install using old API"));
     layout->addItem(installOld);
+    HbPushButton *launchApp = new HbPushButton(tr("Install by opening file"));
+    layout->addItem(launchApp);
+    connect(installNew, SIGNAL(clicked()), this, SLOT(installUsingNewApi()));
+    connect(installOld, SIGNAL(clicked()), this, SLOT(installUsingOldApi()));
+    connect(launchApp, SIGNAL(clicked()), this, SLOT(installByOpeningFile()));
+    layout->addStretch();
+
+    HbLabel *uninstallTitle = new HbLabel(tr("Uninstall:"));
+    layout->addItem(uninstallTitle);
+    mRemovableApps = new HbComboBox;
+    mRemovableApps->setEditable(false);
+    layout->addItem(mRemovableApps);
+
+    HbPushButton *removeNew = new HbPushButton(tr("Remove using new API"));
+    layout->addItem(removeNew);
+    HbPushButton *removeOld = new HbPushButton(tr("Remove using old API"));
+    layout->addItem(removeOld);
+    connect(removeNew, SIGNAL(clicked()), this, SLOT(removeUsingNewApi()));
+    connect(removeOld, SIGNAL(clicked()), this, SLOT(removeUsingOldApi()));
+    layout->addStretch();
+
     HbPushButton *quit = new HbPushButton(tr("Exit"));
     layout->addItem(quit);
 
-    connect(installNew, SIGNAL(clicked()), this, SLOT(installUsingNewApi()));
-    connect(installOld, SIGNAL(clicked()), this, SLOT(installUsingOldApi()));
     connect(quit, SIGNAL(clicked()), this, SLOT(closeApp()));
 
     mMainView->setLayout(layout);
     mMainWindow->addView(mMainView);
     mMainWindow->show();
 
-    changeDir(INSTALLS_PATH);
+    changeDir(mInstallDirectories->currentText());
+    getRemovableApps();
 }
 
 TestInstaller::~TestInstaller()
@@ -76,38 +120,71 @@
     delete mMainWindow;
 }
 
-void TestInstaller::selectedFileChanged(int /*index*/)
-{
-    if (mSelectableFiles) {
-        mFileNames.clear();
-        QString selectedFile(mDirPath);
-        selectedFile.append(mSelectableFiles->currentText());
-        mFileNames.append(selectedFile);
-    }
-}
-
 void TestInstaller::silentCheckChanged(int state)
 {
     Qt::CheckState s = static_cast<Qt::CheckState>(state);
     mUseSilentInstall = (s == Qt::Checked);
 }
 
+void TestInstaller::installableDirChanged(int /*index*/)
+{
+    if (mInstallDirectories) {
+        changeDir(mInstallDirectories->currentText());
+    }
+}
+
+void TestInstaller::installableFileChanged(int /*index*/)
+{
+    if (mInstallableFiles) {
+        mCurrentFile = mCurrentDirPath;
+        mCurrentFile.append(mInstallableFiles->currentText());
+    }
+}
+
 void TestInstaller::installUsingNewApi()
 {
-    createRunner(true);
+    if (isFileSelected() && createRunner(true)) {
+        doInstall(mCurrentFile);
+    }
 }
 
 void TestInstaller::installUsingOldApi()
 {
-    createRunner(false);
+    if (isFileSelected() && createRunner(false)) {
+        doInstall(mCurrentFile);
+    }
+}
+
+void TestInstaller::installByOpeningFile()
+{
+    if (mInstallableFiles) {
+        doOpenFile(mCurrentFile);
+    }
+}
+
+void TestInstaller::removeUsingNewApi()
+{
+    if (isFileSelected() && createRunner(true)) {
+        removeSelectedUsingNewApi();
+    }
+}
+
+void TestInstaller::removeUsingOldApi()
+{
+    if (isFileSelected() && createRunner(false)) {
+        removeSelectedUsingOldApi();
+    }
 }
 
 void TestInstaller::handleComplete()
 {
-    HbMessageBox::information(tr("Installed"));
+    HbMessageBox::information(tr("Completed"));
 
     delete mRunner;
     mRunner = 0;
+
+    changeDir(mCurrentDirPath);
+    getRemovableApps();
 }
 
 void TestInstaller::handleError(int error)
@@ -129,61 +206,127 @@
     qApp->exit();
 }
 
+void TestInstaller::fileOpenOk(const QVariant &/*result*/)
+{
+    HbMessageBox::information(tr("Open ok"));
+}
+
+void TestInstaller::fileOpenFailed(int errorCode, const QString &errorMsg)
+{
+    HbMessageBox::warning(tr("Open failed: %1: %2").arg(errorCode).arg(errorMsg));
+}
+
+void TestInstaller::getInstallDirs(QStringList& dirList)
+{
+    QStringList possibleDirs;
+    possibleDirs << INSTALLS_PATH_1 << INSTALLS_PATH_2 << INSTALLS_PATH_3
+        << INSTALLS_PATH_4 << INSTALLS_PATH_5 << INSTALLS_PATH_6;
+
+    QListIterator<QString> iter(possibleDirs);
+    while (iter.hasNext()) {
+        QString dirName(iter.next());
+        QDir dir(dirName);
+        if (dir.exists()) {
+            dirList.append(dirName);
+        }
+    }
+}
+
 void TestInstaller::changeDir(const QString& dirPath)
 {
-    bool filesFound = false;
-
     QDir dir(dirPath);
     if (dir.exists()) {
-        mDirPath = dirPath;
-        mSelectableFiles->clear();
+        mCurrentDirPath = dirPath;
+        mInstallableFiles->clear();
 
         QFileInfoList list = dir.entryInfoList(QDir::Files);
         QListIterator<QFileInfo> iter(list);
         while (iter.hasNext()) {
             const QFileInfo &info(iter.next());
-            mSelectableFiles->addItem(info.fileName());
+            mInstallableFiles->addItem(info.fileName());
         }
-        filesFound = (mSelectableFiles->count() > 0);
-
-        mFileNames.clear();
-        if (filesFound) {
-            QString fileSelectedByDefault(dirPath);
-            fileSelectedByDefault.append(mSelectableFiles->currentText());
-            mFileNames.append(fileSelectedByDefault);
-        }
-    }
 
-    if (!filesFound) {
-        HbMessageBox::warning(tr("No files in '%1'").arg(dirPath));
-    }
-}
-
-void TestInstaller::createRunner(bool useSif)
-{
-    if (!mFileNames.count()) {
-        HbMessageBox::warning(tr("No files selected"));
-        changeDir(INSTALLS_PATH);
-    } else {
-        if (!mRunner) {
-            mRunner = new ActiveRunner(useSif);
-            connect(mRunner, SIGNAL(opCompleted()), this, SLOT(handleComplete()));
-            connect(mRunner, SIGNAL(opFailed(int)), this, SLOT(handleError(int)));
-            installSelected();
-        } else {
-            HbMessageBox::warning(tr("Already running"));
+        mCurrentFile.clear();
+        if (mInstallableFiles->count()) {
+            mCurrentFile = mCurrentDirPath;
+            mCurrentFile.append(mInstallableFiles->currentText());
         }
     }
 }
 
-void TestInstaller::installSelected()
+void TestInstaller::getRemovableApps()
+{
+    TRAP_IGNORE(doGetRemovableAppsL());
+}
+
+void TestInstaller::doGetRemovableAppsL()
 {
-    if (mFileNames.count()) {
-        QStringListIterator fileNamesIterator(mFileNames);
-        while (fileNamesIterator.hasNext()) {
-            doInstall(fileNamesIterator.next());
+    mRemovableApps->clear();
+    mRemovableComponentIds.clear();
+    mRemovableUids.clear();
+    mRemovableSoftwareTypes.clear();
+
+    RSoftwareComponentRegistry registry;
+    User::LeaveIfError(registry.Connect());
+    CleanupClosePushL(registry);
+
+    RArray<TComponentId> componentIdList;
+    registry.GetComponentIdsL(componentIdList);
+    for (int i = 0; i < componentIdList.Count(); ++i) {
+        TComponentId compId = componentIdList[i];
+        CComponentEntry *compEntry = CComponentEntry::NewLC();
+        if (registry.GetComponentL(compId, *compEntry)) {
+            if (compEntry->IsRemovable()) {
+                TPtrC compName = compEntry->Name();
+                QString name = QString::fromUtf16(compName.Ptr(), compName.Length());
+                mRemovableApps->addItem(name);
+
+                mRemovableComponentIds.append(compId);
+
+                _LIT(KCompUid, "CompUid");
+                CPropertyEntry *property = registry.GetComponentPropertyL(compId, KCompUid);
+                CleanupStack::PushL(property);
+                CIntPropertyEntry* intProperty = dynamic_cast<CIntPropertyEntry*>(property);
+                mRemovableUids.append(TUid::Uid(intProperty->IntValue()));
+                CleanupStack::PopAndDestroy(property);
+
+                TPtrC softwareType = compEntry->SoftwareType();
+                if (softwareType == KSoftwareTypeNative) {
+                    mRemovableSoftwareTypes.append(Native);
+                } else if (softwareType == KSoftwareTypeJava) {
+                    mRemovableSoftwareTypes.append(Java);
+                } else {
+                    mRemovableSoftwareTypes.append(Unknown);
+                }
+            }
         }
+        CleanupStack::PopAndDestroy(compEntry);
     }
+
+    CleanupStack::PopAndDestroy(&registry);
+}
+
+bool TestInstaller::isFileSelected()
+{
+    if (mCurrentFile.isEmpty()) {
+        HbMessageBox::warning(tr("No files selected"));
+        changeDir(mCurrentDirPath);
+        return false;
+    }
+    return true;
+}
+
+bool TestInstaller::createRunner(bool useSif)
+{
+    if (!mRunner) {
+        mRunner = new ActiveRunner(useSif);
+        connect(mRunner, SIGNAL(opCompleted()), this, SLOT(handleComplete()));
+        connect(mRunner, SIGNAL(opFailed(int)), this, SLOT(handleError(int)));
+    } else {
+        HbMessageBox::warning(tr("Already running"));
+        return false;
+    }
+    return true;
 }
 
 void TestInstaller::doInstall(const QString &fileName)
@@ -193,3 +336,58 @@
     }
 }
 
+void TestInstaller::doOpenFile(const QString &fileName)
+{
+    QFile file(fileName);
+    if (file.exists()) {
+        XQApplicationManager appManager;
+        XQAiwRequest *request = appManager.create(file);
+        if (request) {
+            connect(request, SIGNAL(requestOk(const QVariant &)),
+                this, SLOT(fileOpenOk(const QVariant &)));
+            connect(request, SIGNAL(requestError(int, const QString &)),
+                this, SLOT(fileOpenFailed(int, const QString &)));
+            QList<QVariant> args;
+            args << file.fileName();
+            request->setArguments(args);
+            if (request->send()) {
+                HbMessageBox::information(tr("Opening..."));
+            } else {
+                HbMessageBox::warning(tr("Cannot open"));
+            }
+            delete request;
+        } else {
+            HbMessageBox::warning(tr("No handler for file '%1'").arg(fileName));
+        }
+    }
+}
+
+void TestInstaller::removeSelectedUsingNewApi()
+{
+    if (mRemovableApps && mRunner) {
+        int index = mRemovableApps->currentIndex();
+        const TComponentId &compId(mRemovableComponentIds.at(index));
+        mRunner->remove(compId, mUseSilentInstall);
+    }
+}
+
+void TestInstaller::removeSelectedUsingOldApi()
+{
+    if (mRemovableApps && mRunner) {
+        int index = mRemovableApps->currentIndex();
+        const TUid &uid(mRemovableUids.at(index));
+
+        if (mRemovableSoftwareTypes.at(index) == Native) {
+            _LIT8(KSisxMimeType, "x-epoc/x-sisx-app");
+            mRunner->remove(uid, KSisxMimeType, mUseSilentInstall);
+        } else if (mRemovableSoftwareTypes.at(index) == Java) {
+            _LIT8(KJarMIMEType, "application/java-archive");
+            mRunner->remove(uid, KJarMIMEType, mUseSilentInstall);
+        } else {
+            HbMessageBox::warning(tr("Not supported software type"));
+            delete mRunner;
+            mRunner = 0;
+        }
+    }
+}
+
--- a/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.h	Mon May 03 12:38:03 2010 +0300
@@ -20,6 +20,7 @@
 
 #include <hbapplication.h>
 #include <QStringList>
+#include <usif/usifcommon.h>
 
 class HbMainWindow;
 class HbView;
@@ -37,27 +38,49 @@
     ~TestInstaller();
 
 private slots:
-    void selectedFileChanged(int index);
     void silentCheckChanged(int state);
+    void installableDirChanged(int index);
+    void installableFileChanged(int index);
     void installUsingNewApi();
     void installUsingOldApi();
+    void installByOpeningFile();
+    void removeUsingNewApi();
+    void removeUsingOldApi();
     void handleComplete();
     void handleError(int error);
     void closeApp();
+    void fileOpenOk(const QVariant &result);
+    void fileOpenFailed(int errorCode, const QString &errorMsg);
 
 private:    // functions
+    void getInstallDirs(QStringList& dirList);
     void changeDir(const QString& dirPath);
-    void createRunner(bool useSif);
-    void installSelected();
+    void getRemovableApps();
+    void doGetRemovableAppsL();
+    bool isFileSelected();
+    bool createRunner(bool useSif);
     void doInstall(const QString &fileName);
+    void doOpenFile(const QString &fileName);
+    void removeSelectedUsingNewApi();
+    void removeSelectedUsingOldApi();
 
 private:    // data
     HbMainWindow *mMainWindow;
     HbView       *mMainView;
-    QStringList  mFileNames;
-    HbComboBox   *mSelectableFiles;
     bool         mUseSilentInstall;
-    QString      mDirPath;
+    HbComboBox   *mInstallDirectories;
+    HbComboBox   *mInstallableFiles;
+    HbComboBox   *mRemovableApps;
+    QList<Usif::TComponentId> mRemovableComponentIds;
+    QList<TUid>  mRemovableUids;
+    enum TSoftwareType {
+        Unknown,
+        Native,
+        Java
+    };
+    QList<TSoftwareType>  mRemovableSoftwareTypes;
+    QString      mCurrentDirPath;
+    QString      mCurrentFile;
     ActiveRunner *mRunner;
 };
 
--- a/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.iby	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.iby	Mon May 03 12:38:03 2010 +0300
@@ -18,10 +18,7 @@
 #ifndef __TESTINSTALLER_IBY__
 #define __TESTINSTALLER_IBY__
 
-#include <data_caging_paths_for_iby.hrh>
-
-S60_APP_EXE( testinstaller )
-S60_APP_AIF_RSC( testinstaller )
-S60_APP_RESOURCE( testinstaller )
+file=ABI_DIR/BUILD_DIR/testinstaller.exe SHARED_LIB_DIR/testinstaller.exe
+HB_UPGRADABLE_APP_REG_RSC( testinstaller )
 
 #endif  // __TESTINSTALLER_IBY__
--- a/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.pkg	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.pkg	Mon May 03 12:38:03 2010 +0300
@@ -1,3 +1,4 @@
+;
 ; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ; All rights reserved.
 ; This component and the accompanying materials are made available
--- a/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.pro	Fri Apr 16 15:05:20 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.pro	Mon May 03 12:38:03 2010 +0300
@@ -33,10 +33,11 @@
     TARGET.UID3 = 0x0fe91d97      // random UID
     TARGET.VID = VID_DEFAULT
 
-    INCLUDEPATH += /epoc32/include/platform/mw \
+    INCLUDEPATH += /epoc32/include/mw \ 
+        /epoc32/include/platform/mw \
         /epoc32/include/mw/hb/hbcore \
         /epoc32/include/mw/hb/hbwidgets
-    LIBS += -lHbCore -lHbWidgets -lsif -lswinstcli
+    LIBS += -lHbCore -lHbWidgets -lxqservice -lsif -lscrclient -lswinstcli
 
 	HEADERS += activerunner_symbian.h
 	SOURCES += activerunner_symbian.cpp
--- a/iaupdate/IAD/api/bwins/iaupdateapiu.def	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-EXPORTS
-	??1CIAUpdate@@UAE@XZ @ 1 NONAME ; CIAUpdate::~CIAUpdate(void)
-	??1CIAUpdateParameters@@UAE@XZ @ 2 NONAME ; CIAUpdateParameters::~CIAUpdateParameters(void)
-	??1CIAUpdateResult@@UAE@XZ @ 3 NONAME ; CIAUpdateResult::~CIAUpdateResult(void)
-	?CancelCount@CIAUpdateResult@@QBEHXZ @ 4 NONAME ; int CIAUpdateResult::CancelCount(void) const
-	?CheckUpdates@CIAUpdate@@QAEXABVCIAUpdateParameters@@@Z @ 5 NONAME ; void CIAUpdate::CheckUpdates(class CIAUpdateParameters const &)
-	?CommandLineArguments@CIAUpdateParameters@@QBEABVTDesC8@@XZ @ 6 NONAME ; class TDesC8 const & CIAUpdateParameters::CommandLineArguments(void) const
-	?CommandLineExecutable@CIAUpdateParameters@@QBEABVTDesC16@@XZ @ 7 NONAME ; class TDesC16 const & CIAUpdateParameters::CommandLineExecutable(void) const
-	?FailCount@CIAUpdateResult@@QBEHXZ @ 8 NONAME ; int CIAUpdateResult::FailCount(void) const
-	?NewL@CIAUpdate@@SAPAV1@AAVMIAUpdateObserver@@@Z @ 9 NONAME ; class CIAUpdate * CIAUpdate::NewL(class MIAUpdateObserver &)
-	?NewL@CIAUpdateParameters@@SAPAV1@XZ @ 10 NONAME ; class CIAUpdateParameters * CIAUpdateParameters::NewL(void)
-	?NewL@CIAUpdateResult@@SAPAV1@XZ @ 11 NONAME ; class CIAUpdateResult * CIAUpdateResult::NewL(void)
-	?NewLC@CIAUpdate@@SAPAV1@AAVMIAUpdateObserver@@@Z @ 12 NONAME ; class CIAUpdate * CIAUpdate::NewLC(class MIAUpdateObserver &)
-	?NewLC@CIAUpdateParameters@@SAPAV1@XZ @ 13 NONAME ; class CIAUpdateParameters * CIAUpdateParameters::NewLC(void)
-	?NewLC@CIAUpdateResult@@SAPAV1@XZ @ 14 NONAME ; class CIAUpdateResult * CIAUpdateResult::NewLC(void)
-	?SearchCriteria@CIAUpdateParameters@@QBEABVTDesC16@@XZ @ 15 NONAME ; class TDesC16 const & CIAUpdateParameters::SearchCriteria(void) const
-	?SetCancelCount@CIAUpdateResult@@QAEXH@Z @ 16 NONAME ; void CIAUpdateResult::SetCancelCount(int)
-	?SetCommandLineArgumentsL@CIAUpdateParameters@@QAEXABVTDesC8@@@Z @ 17 NONAME ; void CIAUpdateParameters::SetCommandLineArgumentsL(class TDesC8 const &)
-	?SetCommandLineExecutableL@CIAUpdateParameters@@QAEXABVTDesC16@@@Z @ 18 NONAME ; void CIAUpdateParameters::SetCommandLineExecutableL(class TDesC16 const &)
-	?SetFailCount@CIAUpdateResult@@QAEXH@Z @ 19 NONAME ; void CIAUpdateResult::SetFailCount(int)
-	?SetSearchCriteriaL@CIAUpdateParameters@@QAEXABVTDesC16@@@Z @ 20 NONAME ; void CIAUpdateParameters::SetSearchCriteriaL(class TDesC16 const &)
-	?SetSuccessCount@CIAUpdateResult@@QAEXH@Z @ 21 NONAME ; void CIAUpdateResult::SetSuccessCount(int)
-	?SetUid@CIAUpdateParameters@@QAEXABVTUid@@@Z @ 22 NONAME ; void CIAUpdateParameters::SetUid(class TUid const &)
-	?ShowUpdates@CIAUpdate@@QAEXABVCIAUpdateParameters@@@Z @ 23 NONAME ; void CIAUpdate::ShowUpdates(class CIAUpdateParameters const &)
-	?SuccessCount@CIAUpdateResult@@QBEHXZ @ 24 NONAME ; int CIAUpdateResult::SuccessCount(void) const
-	?Uid@CIAUpdateParameters@@QBEABVTUid@@XZ @ 25 NONAME ; class TUid const & CIAUpdateParameters::Uid(void) const
-	?Update@CIAUpdate@@QAEXABVCIAUpdateParameters@@@Z @ 26 NONAME ; void CIAUpdate::Update(class CIAUpdateParameters const &)
-	?UpdateQuery@CIAUpdate@@QAEXXZ @ 27 NONAME ; void CIAUpdate::UpdateQuery(void)
-	?SetShowProgress@CIAUpdateParameters@@QAEXH@Z @ 28 NONAME ; void CIAUpdateParameters::SetShowProgress(int)
-	?ShowProgress@CIAUpdateParameters@@QBEHXZ @ 29 NONAME ; int CIAUpdateParameters::ShowProgress(void) const
-	?Importance@CIAUpdateParameters@@QBEIXZ @ 30 NONAME ; unsigned int CIAUpdateParameters::Importance(void) const
-	?Refresh@CIAUpdateParameters@@QBEHXZ @ 31 NONAME ; int CIAUpdateParameters::Refresh(void) const
-	?SetImportance@CIAUpdateParameters@@QAEXI@Z @ 32 NONAME ; void CIAUpdateParameters::SetImportance(unsigned int)
-	?SetRefresh@CIAUpdateParameters@@QAEXH@Z @ 33 NONAME ; void CIAUpdateParameters::SetRefresh(int)
-	?SetType@CIAUpdateParameters@@QAEXI@Z @ 34 NONAME ; void CIAUpdateParameters::SetType(unsigned int)
-	?Type@CIAUpdateParameters@@QBEIXZ @ 35 NONAME ; unsigned int CIAUpdateParameters::Type(void) const
-
--- a/iaupdate/IAD/api/client/inc/iaupdateclient.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/api/client/inc/iaupdateclient.h	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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"
@@ -20,187 +20,93 @@
 #ifndef IA_UPDATE_CLIENT_H
 #define IA_UPDATE_CLIENT_H
 
-#include <AknServerApp.h> 
+
 #include <e32std.h>
 #include <e32cmn.h>
+#include <iaupdateobserver.h>
+#include <QObject>
 
 class CIAUpdateParameters;
-
-/**
- * RIAUpdateClient object provides methods to delegate update actions
- * to the server side. Updating will be targeted to the update items that 
- * qualify the requirements of CIAUpdateParameters objects. In asynchronous 
- * actions, observers will be informed about the completion of update action.
- * 
- * Because this object is R-class, it does not provide constructor or destructor.
- * Usage:
- * - First, call Open-function.
- * - Second, use update functions to start update.
- * - Finally, user has to call Close-function to terminate object. 
- *   Otherwise, memory leaks may occur.
- *
- * @see CIAUpdateParameters
- * @see CIAUpdate
- *
- * @since S60 v3.2
- */
-NONSHARABLE_CLASS( RIAUpdateClient ) : public RAknAppServiceBase 
-    {
-
-public:
-
-    /**
-     * Constructor.
-     */
-     
-     RIAUpdateClient();
-
-    /** 
-     * This function will open the update action.
-     *
-     * @note This has to be called before calling operation functions.
-     *
-     * @return System wide error code.
-     *
-     * @since S60 v3.2
-     */
-    TInt Open( TBool aToBackground );
-    
-    /** 
-     * Close releases the resources allocated by this class object.
-     * After Close is called, this R-class object may go out of scope.
-     *
-     * @note If Close is called before asynchronous operation has finished, 
-     * the operation will continue but callback functions of the observer
-     * will not be called when operation progresses. 
-     * 
-     * @since S60 v3.2
-     */
-    void Close();
+class MIAUpdateObserver;
+class XQServiceRequest;
 
 
-    /** 
-     * @see CIAUpdate::CheckUpdates
-     *
-     * @note The client server connection has to be opened by calling
-     * Open function before this function can be called.
-     *
-     * @param aAvailableUpdates Number of the updates that were found available.
-     * @param aStatus The status will be updated when the operation
-     * has been completed.
-     * @return Informs if the initialization of server request failed.
-     *         System wide error code. 
-     *
-     * @since S60 v3.2
-     */
-    TInt CheckUpdates( const CIAUpdateParameters& aUpdateParameters,
-                       TInt& aAvailableUpdates,
-                       TRequestStatus& aStatus );
+class IAUpdateClient : public QObject
+//NONSHARABLE_CLASS( IAUpdateClient ) : public QObject
+    {
+    Q_OBJECT
+public:
     
+    enum RequestType
+        {
+        /**
+        * No operation is going on.
+        */ 
+        NoOperation,       
+            
+        /**
+        * Update check has been requested.
+        */
+        CheckUpdates,
+
+        /**
+        * Show Update operation has been requested.
+        */
+        ShowUpdates,     
+            
+        /**
+        * Update query has been requested.
+        */
+        UpdateQuery,
+        /**
+        * Bring to foreground has been requested.
+        */
+        BroughtToForeground
+        };
+
+    IAUpdateClient(MIAUpdateObserver& aObserver);
+     
+     
+    ~IAUpdateClient();
+
+    int initRequest(const CIAUpdateParameters* updateParameters, const QString& message, bool toBackground);
+
+    void checkUpdates(const CIAUpdateParameters& updateParameters);
+
+    void showUpdates(const CIAUpdateParameters& updateParameters);
+
+    void updateQuery();
+    
+    void update();
         
-    /** 
-     * @see CIAUpdate::ShowUpdates
-     *
-     * @note The client server connection has to be opened by calling
-     * Open function before this function can be called.
-     *
-     * @param aNumberOfSuccessfullUpdates Number of the successfull updates 
-     *                                    that were done during the update.
-     * @param aNumberOfFailedUpdates Number of the failed updates 
-     *                               that were done during the update.
-     * @param aNumberOfCancelledUpdates Number of the cancelled updates 
-     *                                  during the update.     
-     * @param aStatus The status will be updated when the operation
-     * has been completed.
-     * @return Informs if the initialization of server request failed.
-     *         System wide error code. 
-     *
-     * @since S60 v3.2
-     */
-    TInt ShowUpdates( const CIAUpdateParameters& aUpdateParameters,
-                      TInt& aNumberOfSuccessfullUpdates,
-                      TInt& aNumberOfFailedUpdates,
-                      TInt& aNumberOfCancelledUpdates,
-                      TRequestStatus& aStatus );
-    
+    void broughtToForeground();
+
+protected slots:
 
-        
-                 
-    /** 
-     * @see CIAUpdate::Update
-     *
-     * @note The client server connection has to be opened by calling
-     * Open function before this function can be called.
-     *
-     * @param aUpdateNow  Value depending on a user's choice
-     * @param aStatus The status will be updated when the operation
-     * has been completed.
-     * @return Informs if the initialization of server request failed.
-     *         System wide error code. 
-     *
-     * @since S60 v3.2
-     */
-    TInt UpdateQuery( TBool& aUpdateNow, TRequestStatus& aStatus );
-                      
-    
-    void BroughtToForeground();
+    void requestCompleted(const QVariant& value);
     
-    
-    /**
-     * Cancels the ongoing asynchronous operation.
-     * The active object that has started the update operation
-     * will be informed when the requested update operation 
-     * has been cancelled.
-     *
-     * @since S60 v3.2
-     */             
-    void CancelAsyncRequest();
-
-
-public: // RAknAppServiceBase
-
-    /**
-     * @see RAknAppServiceBase::ServiceUid
-     *
-     * @since S60 v3.2
-     */
-    TUid ServiceUid() const;
+    void requestError(int err);     
 
 
 private:
-
-    // These functions send the operation requests to the server.
-    
-    TInt SendCheckUpdatesRequest( TInt aUpdateFunction,
-                                  const CIAUpdateParameters& aUpdateParameters,
-                                  TInt& aCount,
-                                  TRequestStatus& aStatus );
+     
+    QString qStringFromTDesC16( const TDesC16& aDes16 ); 
+     
+    QString qStringFromTDesC8( const TDesC8& aDes8 );
+     
+    QString qStringFromTDesC( const TDesC& aDes );
 
-    TInt SendUpdateRequest( TInt aUpdateFunction,
-                            const CIAUpdateParameters& aUpdateParameters,
-                            TInt& aNumberOfSuccessfullUpdates,
-                            TInt& aNumberOfFailedUdpdates,
-                            TInt& aNumberOfCancelledUpdates,
-                            TRequestStatus& aStatus );
-    
-    void ConnectNewAppToBackgroundL( TUid aAppUid );
-    
-    void ServerName(TName& aServerName, TUid aAppServerUid, TUint aServerDifferentiator);
-    
-    TUint GenerateServerDifferentiatorAndName(TName& aServerName, TUid aAppServerUid);
-    
                                
 private: //data
-
-    HBufC8* iData;
     
-    TBool iConnected;
+    XQServiceRequest* mServiceRequest;
     
-    TInt iOwnWgId;
+    // Informs what kind of operation is going on.
+    RequestType mCurrentRequestType;
     
-    TPtr8 iPtr1;
-    TPtr8 iPtr2;
-    TPtr8 iPtr3;  
+    // Observer who will be informed about the completion of the operations. 
+    MIAUpdateObserver& mObserver; 
+         
     };
 
 #endif // IA_UPDATE_CLIENT_H
--- a/iaupdate/IAD/api/client/inc/iaupdatemanager.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/api/client/inc/iaupdatemanager.h	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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"
@@ -15,8 +15,6 @@
 *
 */
 
-
-
 #ifndef IA_UPDATE_MANAGER_H
 #define IA_UPDATE_MANAGER_H
 
@@ -26,9 +24,8 @@
 #include <e32std.h>
 #include <coemain.h>
 
-#include "iaupdateclient.h"
-
 //FORWARD DECLARATIONS
+class IAUpdateClient;
 class CIAUpdateParameters;
 class MIAUpdateObserver;
 class CEikonEnv;
@@ -49,184 +46,34 @@
  *
  * @since S60 v3.2
  */
-NONSHARABLE_CLASS( CIAUpdateManager ) : public CActive, public MCoeForegroundObserver
+NONSHARABLE_CLASS( CIAUpdateManager ) : public CBase, public MCoeForegroundObserver
     {
 
 public:
 
-    /**
-     * These values inform what operation has been requested.
-     *
-     * @since S60 v3.2
-     */
-    enum TIAUpdateType
-        {
-        /**
-         * No operation is going on.
-         */ 
-        EIAUpdateIdle,       
-        
-        /**
-         * Update check has been requested.
-         */
-        EIAUpdateCheck,
-
-        /**
-         * Update operation has been requested.
-         */
-        EIAUpdateUpdate,     
-        
-        /**
-         * Update query has been requested.
-         */
-        EIAUpdateQuery   
-        };
-
-
-    /**
-     * @param aObserver Callback functions of the observer are called
-     * when operations progress.    
-     * @return CIAUpdateManager* Pointer to the created CIAUpdateManager 
-     * object that can be used for update actions.
-     *
-     * @since S60 v3.2
-     */
     static CIAUpdateManager* NewL( MIAUpdateObserver& aObserver );
     
-    /**
-     * @see NewL
-     *
-     * @since S60 v3.2
-     */
     static CIAUpdateManager* NewLC( MIAUpdateObserver& aObserver );
     
 
-    /**
-     * Destructor
-     *
-     * @since S60 v3.2
-     */
-    virtual ~CIAUpdateManager();
-    
 
-    /** 
-     * @see CIAUpdate::CheckUpdates
-     *
-     * @since S60 v3.2
-     */
+    ~CIAUpdateManager();
+  
     void CheckUpdates( const CIAUpdateParameters& aUpdateParameters );
-    
-        
-    /** 
-     * @see CIAUpdate::ShowUpdates
-     *
-     * @since S60 v3.2
-     */
+  
     void ShowUpdates( const CIAUpdateParameters& aUpdateParameters );
-    
-
-    /** 
-     * @see CIAUpdate::Update
-     *
-     * @since S60 v3.2
-     */
-    void Update( const CIAUpdateParameters& aUpdateParameters );
-    
-     /** 
-     * @see CIAUpdate::UpdateQuery
-     *
-     * @since S60 v3.2
-     */   
+ 
     void UpdateQuery();
-
-
-protected: // CActive
-
-    /**
-     * @see CActive::DoCancel
-     *
-     * @since S60 v3.2
-     */
-    virtual void DoCancel();
-
-    /**
-     * When the server side has finished operation, the CActive object will
-     * be informed about it, and as a result RunL will be called. This function
-     * well inform the observer that the operation has been completed.
-     * @see CActive::RunL
-     *
-     * @since S60 v3.2
-     */
-    virtual void RunL();
-
-
-protected:
-
-    /**
-     * @see NewL
-     *
-     * @since S60 v3.2
-     */
-    CIAUpdateManager( MIAUpdateObserver& aObserver );
     
-    /**
-     * @see NewL
-     *
-     * @since S60 v3.2
-     */
-    virtual void ConstructL();
-
-
-    /**
-     * Resets all the result variables to their default values.
-     *
-     * @since S60 v3.2
-     */
-    virtual void ResetResults();
-
-
-    /**
-     * @return ETrue if an operation is going on. Else EFalse.
-     *
-     * @since S60 v3.2
-     */
-    TBool BusyCheck() const;
-
-
-    /**
-     * @return RIAUpdateClient& Handles the client server communication.
-     *
-     * @since S60 v3.2
-     */
-    RIAUpdateClient& UpdateClient();
-
-
-    /**
-     * @return MUpdateObserver& Observer who will be informed about the
-     * completion of the operations.
-     *
-     * @since S60 v3.2
-     */
-    MIAUpdateObserver& Observer() const;
-
-
-    /**
-     * @return TIAUpdateType Informs what kind of operation is going on.
-     *
-     * @since S60 v3.2
-     */
-    TIAUpdateType UpdateType() const;
-    
-    /**
-     * @param aUpdateType Informs what kind of operation is going on.
-     *
-     * @since S60 v3.2
-     */
-    void SetUpdateType( TIAUpdateType aUpdateType );
+    void Update( const CIAUpdateParameters& aUpdateParameters );
 
 
 private:
 
+    CIAUpdateManager();
+    
+    void ConstructL( MIAUpdateObserver& aObserver );
+
     // Prevent these if not implemented
     CIAUpdateManager( const CIAUpdateManager& aObject );
     CIAUpdateManager& operator =( const CIAUpdateManager& aObject );
@@ -245,29 +92,11 @@
 
 
 private: // data
-
-    // Observer who will be informed about the completion of the operations. 
-    MIAUpdateObserver& iObserver;    
-    
+   
     // Handles the client server communication.
-    RIAUpdateClient iUpdateClient;
-
-    // Informs what kind of operation is going on.
-    TIAUpdateType iUpdateType;
+    IAUpdateClient* iUpdateClient;
 
-    // This is used to storage the success count values for update operations.
-    TInt iSuccessCount;
-    
-    // This is used to storage the fail count values for update operations.
-    TInt iFailCount;
-    
-    // This is used to storage the cancel count values for update operations.
-    TInt iCancelCount;
-
-    TBool iUpdateNow;
-    
     CEikonEnv* iEikEnv; //not owned
-
     };
 
 #endif // IA_UPDATE_IMPL_H
--- a/iaupdate/IAD/api/client/src/iaupdateclient.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/api/client/src/iaupdateclient.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:   This module contains the implementation of RIAUpdateClient
+* Description:   This module contains the implementation of IAUpdateClient
 *                class member functions.
 *
 */
@@ -22,345 +22,405 @@
 #include <eikenv.h>
 #include <apgcli.h>
 #include <e32math.h>
+#include <iaupdateparameters.h>
+#include <iaupdateresult.h>
+#include <xqservicerequest.h>
+#include <xqserviceutil.h>
+#include <xqrequestinfo.h>
+
 #include "iaupdateclient.h"
 #include "iaupdateclientdefines.h"
-#include "iaupdatetools.h"
 #include "iaupdatedebug.h"
 
 
 // -----------------------------------------------------------------------------
-// RIAUpdateClient::RIAUpdateClient
-// 
-// -----------------------------------------------------------------------------
-// 
-RIAUpdateClient::RIAUpdateClient() 
-: iPtr1( NULL, 0 ),
-  iPtr2( NULL, 0 ),
-  iPtr3( NULL, 0 )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// RIAUpdateClient::Open
+// IAUpdateClient::IAUpdateClient
 // 
 // -----------------------------------------------------------------------------
 // 
-TInt RIAUpdateClient::Open( TBool aToBackground )
+IAUpdateClient::IAUpdateClient(MIAUpdateObserver& observer):
+    mObserver(observer)
     {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::Open() begin");
-    TInt error( KErrNone );
-    
-    if ( !iConnected )
-        {
-        if ( aToBackground )
-            {
-            TRAP( error, ConnectNewAppToBackgroundL( ServiceUid() ) );
-            }
-        else
-            {
-            TRAP( error, ConnectNewAppL( ServiceUid() ) );
-            }
-         if ( error == KErrNone ) 
-            {
-            iConnected = ETrue;
-            CEikonEnv* eikEnv = CEikonEnv::Static();
-            if ( eikEnv )
-                {
-            	RWindowGroup owngroup;
-		        iOwnWgId = eikEnv->RootWin().Identifier(); 
-		        
-	            TPckg<TInt> wgId( iOwnWgId );
-	            delete iData;
-	            iData = NULL;
-	             TRAP_IGNORE( iData = wgId.AllocL() );
-	            
-                TIpcArgs args;
-                args.Set( 0, iData );
-    
-	            SendReceive( IAUpdateClientDefines::EIAUpdateServerSendWgId, args );    
-		        } 
-            }
-        }
-    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", error );
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::Open() begin");
-    return error;
+    mServiceRequest = NULL;
+    mCurrentRequestType = NoOperation;
     }
 
 // -----------------------------------------------------------------------------
-// RIAUpdateClient::Close
-// 
-// -----------------------------------------------------------------------------
-//
-void RIAUpdateClient::Close()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::Close() begin");
-    // Let the parent handle closing.
-    RAknAppServiceBase::Close();
-    iConnected = EFalse;
-    delete iData;
-    iData = NULL;
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::Close() end");
-    }
-
-// -----------------------------------------------------------------------------
-// RIAUpdateClient::CheckUpdates
-// 
-// -----------------------------------------------------------------------------
-//
-TInt RIAUpdateClient::CheckUpdates( const CIAUpdateParameters& aUpdateParameters,
-                                    TInt& aAvailableUpdates, 
-                                    TRequestStatus& aStatus )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::CheckUpdates()");
-    // Inform the caller about the success of the request initializing.
-    return SendCheckUpdatesRequest( IAUpdateClientDefines::EIAUpdateServerCheckUpdates,
-                                    aUpdateParameters,
-                                    aAvailableUpdates,
-                                    aStatus );
-    }
-
-// -----------------------------------------------------------------------------
-// RIAUpdateClient::ShowUpdates
+// IAUpdateClient::~IAUpdateClient
 // 
 // -----------------------------------------------------------------------------
-//
-TInt RIAUpdateClient::ShowUpdates( const CIAUpdateParameters& aUpdateParameters,
-                                   TInt& aNumberOfSuccessfullUpdates,
-                                   TInt& aNumberOfFailedUpdates,
-                                   TInt& aNumberOfCancelledUpdates,
-                                   TRequestStatus& aStatus )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::ShowUpdates()");
-    // Inform the caller about the success of the request initializing.
-    return SendUpdateRequest( IAUpdateClientDefines::EIAUpdateServerShowUpdates,
-                              aUpdateParameters,
-                              aNumberOfSuccessfullUpdates,
-                              aNumberOfFailedUpdates,
-                              aNumberOfCancelledUpdates,
-                              aStatus );
-    }
-    
-
-// -----------------------------------------------------------------------------
-// RIAUpdateClient::UpdateQuery
 // 
-// -----------------------------------------------------------------------------
-//    
-TInt RIAUpdateClient::UpdateQuery( TBool& aUpdateNow, TRequestStatus& aStatus )
+IAUpdateClient::~IAUpdateClient() 
     {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::UpdateQuery() begin");
-	TPckg<TBool> updateNow( aUpdateNow );
-	iPtr1.Set( updateNow );
-	            
-    TIpcArgs args;
-    args.Set( 1, &iPtr1 );
-    
-	SendReceive( IAUpdateClientDefines::EIAUpdateServerShowUpdateQuery, 
-	             args, 
-	             aStatus );    
-	IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::UpdateQuery() begin");    
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// RIAUpdateClient::BroughtToForeground
-// 
-// -----------------------------------------------------------------------------
-//
-void RIAUpdateClient::BroughtToForeground()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::BroughtToForeground() begin");
-    if ( iConnected )
+    if ( mServiceRequest)
         {
-    	SendReceive( IAUpdateClientDefines::EIAUpdateServerToForeground );
+        delete mServiceRequest;
         }
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::BroughtToForeground() end");
     }
 
 
 // -----------------------------------------------------------------------------
-// RIAUpdateClient::CancelAsyncRequest
+// IAUpdateClient::initRequest
 // 
 // -----------------------------------------------------------------------------
-//
-void RIAUpdateClient::CancelAsyncRequest()
+// 
+int IAUpdateClient::initRequest(const CIAUpdateParameters* updateParameters, const QString& message, bool toBackground)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::initRequest() begin");
+    int error(KErrNone);
+    if (mCurrentRequestType != NoOperation) 
+        {
+        error = KErrServerBusy;
+        }
+    else if (!mServiceRequest)
+    {
+        mServiceRequest = new XQServiceRequest("com.nokia.services.swupdate.swupdate_interface", message, false);
+        connect(mServiceRequest, SIGNAL(requestCompleted(QVariant)), this, SLOT(requestCompleted(QVariant)));
+        connect(mServiceRequest, SIGNAL(requestError(int)), this, SLOT(requestError(int)));
+    }
+    else
     {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::CancelAsyncRequest() begin");
-    // We suppose that an active object will
-    // wait for the cancellation to complete.
-    // So, let the server know that operation is cancelled.
-    // The server should set the correct status and complete
-    // the request of the active object. So, the cancellation 
-    // can proceed to the end.
-    if ( iConnected )
+        mServiceRequest->setMessage(message);
+    }
+    XQRequestInfo requestInfo;
+    requestInfo.setBackground(toBackground);
+    mServiceRequest->setInfo(requestInfo);
+    
+    if (error == KErrNone)
+    {    
+        if (!mServiceRequest)
         {
-    	SendReceive( IAUpdateClientDefines::EIAUpdateServerCancel ); 
+            error = KErrNoMemory;    
         }
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::CancelAsyncRequest() end");
-    }
-
-
+        else
+        {    
+            int wgId = 0;
+            CEikonEnv* eikEnv = CEikonEnv::Static();
+            if ( eikEnv )
+            {
+                RWindowGroup owngroup;
+                wgId = eikEnv->RootWin().Identifier();
+            }
+            IAUPDATE_TRACE_1("IAUpdateClient::initRequest() wgId: %d", wgId);
+            QString stringWgid;
+            stringWgid.setNum(wgId);
+            *mServiceRequest << stringWgid;  
+            if (updateParameters)
+            {    
+                IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::initRequest() UID: %d", updateParameters->Uid().iUid);
+                QString stringUid; 
+                stringUid.setNum(updateParameters->Uid().iUid);
+                *mServiceRequest << stringUid;
+                
+                IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::initRequest() searchcriteria: %S", &updateParameters->SearchCriteria());
+                *mServiceRequest << qStringFromTDesC(updateParameters->SearchCriteria());
+                
+                IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::initRequest() executable: %S", &updateParameters->CommandLineExecutable());
+                *mServiceRequest << qStringFromTDesC(updateParameters->CommandLineExecutable());
+                
+                IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::initRequest() arguments: %S8", &updateParameters->CommandLineArguments());
+                *mServiceRequest << qStringFromTDesC8(updateParameters->CommandLineArguments());
+                
+                IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::initRequest() show progress: %d", updateParameters->ShowProgress());
+                QString stringShowProgress;
+                stringShowProgress.setNum(updateParameters->ShowProgress());
+                *mServiceRequest << stringShowProgress;
+                
+                IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::initRequest() importance: %d", updateParameters->Importance());
+                QString stringImportance;
+                stringImportance.setNum(updateParameters->Importance());
+                *mServiceRequest << stringImportance;
+                
+                IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::initRequest() type: %d", updateParameters->Type());
+                QString stringType;
+                stringType.setNum(updateParameters->Type());
+                *mServiceRequest << stringType;
+                
+                IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::initRequest() refresh: %d", updateParameters->Refresh());
+                QString stringRefresh;
+                stringRefresh.setNum(updateParameters->Refresh());
+                *mServiceRequest << stringRefresh;
+            }
+        }
+    }                 
+     
+    
+    IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::initRequest() error code: %d", error );
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::initRequest() end");
+    return error;
+}
 
 // -----------------------------------------------------------------------------
-// RIAUpdateClient::ServiceUid()
-// 
-// -----------------------------------------------------------------------------
-//
-TUid RIAUpdateClient::ServiceUid() const
-    {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::ServiceUid()");
-    return IAUpdateClientDefines::KIAUpdateServiceUid;    
-    }
-
-// -----------------------------------------------------------------------------
-// RIAUpdateClient::SendCheckUpdatesRequest
+// IAUpdateClient::checkUpdates
 // 
 // -----------------------------------------------------------------------------
 //
-TInt RIAUpdateClient::SendCheckUpdatesRequest( TInt aUpdateFunction,
-                                               const CIAUpdateParameters& aUpdateParameters,
-                                               TInt& aCount,
-                                               TRequestStatus& aStatus )
+void IAUpdateClient::checkUpdates(const CIAUpdateParameters& updateParameters)
     {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::SendCheckUpdatesRequest() begin");
-    
-    aStatus = KRequestPending;
-
-    delete iData;
-    iData = NULL;   
-    
-    TInt error( KErrNone );
-    TRAP( error, 
-          IAUpdateTools::ExternalizeParametersL( iData, 
-                                                 aUpdateParameters ) );
-    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", error );
-
-    // Because this function does not leave,
-    // use error value to check if request can be done.
-    if ( error == KErrNone )
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::checkUpdates()");
+    QString message("checkUpdates(QString,QString,QString,QString,QString,QString,QString,QString,QString)");
+    //QString message("checkUpdates(int,int)");
+    int ret = initRequest(&updateParameters,message,!updateParameters.ShowProgress());
+    if (ret == KErrNone)
         {
-        TPckg<TInt> count( aCount );
-	    iPtr1.Set( count );
-	            
-        TIpcArgs args;
-        args.Set( 0, iData );
-        args.Set( 1, &iPtr1 );
-              
-        // Start the asynchronous operation in the server side.
-        SendReceive( aUpdateFunction, args, aStatus );        
+        if (mServiceRequest->send()) 
+            {
+            mCurrentRequestType = CheckUpdates;
+            }
+        else
+            {
+            mObserver.CheckUpdatesComplete(ret,0);        
+            }
         }
-
-    // Inform the caller about the success of the request initializing.
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::SendCheckUpdatesRequest() begin");
-    return error;
     }
 
 // -----------------------------------------------------------------------------
-// RIAUpdateClient::SendUpdateRequest
+// IAUpdateClient::showUpdates
+// 
+// -----------------------------------------------------------------------------
+//
+void IAUpdateClient::showUpdates(const CIAUpdateParameters& updateParameters)
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::showUpdates()");
+    QString message("showUpdates(QString,QString,QString,QString,QString,QString,QString,QString,QString)");
+    int ret = initRequest(&updateParameters, message, false);
+    if (ret == KErrNone)
+        {
+        if (mServiceRequest->send())
+            {
+            mCurrentRequestType = ShowUpdates;
+            }
+        else
+            {
+            mObserver.UpdateComplete(ret,NULL);
+            }
+        }
+    }
+    
+
+// -----------------------------------------------------------------------------
+// IAUpdateClient::updateQuery
+// 
+// -----------------------------------------------------------------------------
+//    
+void IAUpdateClient::updateQuery()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::updateQuery() begin");
+    QString message("updateQuery(QString)");
+    CIAUpdateParameters* nullParameters = NULL;
+    int ret = initRequest(nullParameters, message, false);
+    if (ret == KErrNone)
+    {
+        if (mServiceRequest->send()) 
+        {
+            mCurrentRequestType = UpdateQuery;
+        }
+        else
+        {
+            mObserver.UpdateQueryComplete(ret,false);
+        }
+    }
+	IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::updateQuery() end");    
+}
+
+// -----------------------------------------------------------------------------
+// IAUpdateClient::update
+// 
+// -----------------------------------------------------------------------------
+// 
+void IAUpdateClient::update()
+{
+    mObserver.UpdateComplete(KErrNotSupported,NULL);
+}
+
+// -----------------------------------------------------------------------------
+// IAUpdateClient::broughtToForeground
 // 
 // -----------------------------------------------------------------------------
 //
-TInt RIAUpdateClient::SendUpdateRequest( TInt aUpdateFunction,
-                                         const CIAUpdateParameters& aUpdateParameters,
-                                         TInt& aNumberOfSuccessfullUpdates,
-                                         TInt& aNumberOfFailedUpdates,
-                                         TInt& aNumberOfCancelledUpdates,
-                                         TRequestStatus& aStatus )
+void IAUpdateClient::broughtToForeground()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::broughtToForeground() begin");
+    if (mServiceRequest)
     {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::SendUpdateRequest() begin");
-    aStatus = KRequestPending;
+        QString message("broughtToForeground(int)");
+        CIAUpdateParameters* nullParameters = NULL;
+        int ret = initRequest(nullParameters, message, false);
+        if (ret == KErrNone)
+        {
+            if (mServiceRequest->send())
+            {
+                mCurrentRequestType = BroughtToForeground;
+            }
+        }
+    } 
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::broughtToForeground() end");
+}
 
-    delete iData;
-    iData = NULL;   
-    
-    TInt error( KErrNone );
-    TRAP( error, 
-          IAUpdateTools::ExternalizeParametersL( iData, 
-                                                 aUpdateParameters ) );
-    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", error );
-    // Because this function does not leave,
-    // use error value to check if request can be done.
-    if ( error == KErrNone )
+// -----------------------------------------------------------------------------
+// IAUpdateClient::requestCompleted
+// 
+// -----------------------------------------------------------------------------
+//
+void IAUpdateClient::requestCompleted(const QVariant& value)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::requestCompleted() begin");
+    RequestType requestType = mCurrentRequestType;
+    IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::requestCompleted()request type: %d", requestType );
+    QList<QVariant> resultlist = value.toList();
+    int errorCode = resultlist.at(0).toInt();
+    CIAUpdateResult* updateResult(NULL);
+            
+    if ( requestType == ShowUpdates )
+    {
+        // Update result object is required.
+        // Notice that the ownership is transferred later.
+        // So, this function does not need to delete updateResult object.
+        TRAPD( trapError, updateResult = CIAUpdateResult::NewL() );
+        if ( updateResult )
+        {
+            updateResult->SetSuccessCount(resultlist.at(1).toInt());
+            updateResult->SetFailCount(resultlist.at(2).toInt());
+            updateResult->SetCancelCount(resultlist.at(3).toInt());
+        }
+        else
         {
-        TPckg<TInt> successCount( aNumberOfSuccessfullUpdates );
-	    iPtr1.Set( successCount );
-
-        TPckg<TInt> failCount( aNumberOfFailedUpdates );
-	    iPtr2.Set( failCount );
+            // Something went wrong when creating update result object.
+            // Update the error code accordingly.
+            errorCode = trapError;
+        }
+            // Let's assume that connection is not needed anymore
+        if (mServiceRequest)
+        {
+            delete mServiceRequest;
+            mServiceRequest= NULL;
+        }
+    }
+        
+    // Inform that no operation is going on anymore.
+    // This is required for busy check.
+    mCurrentRequestType = NoOperation;
+        
+    // Use the request type of the ongoing operation to check what callback
+    // function to call.
+    int countOfUpdates = 0;
+    bool updateNow = false;
+    switch (requestType)
+    {
+        case CheckUpdates:
+        countOfUpdates = resultlist.at(1).toInt();    
+        if (countOfUpdates == 0)
+        {
+            // Let's assume that connection is not needed anymore
+            delete mServiceRequest;  
+            mServiceRequest= NULL;
+        }
+        IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::requestCompleted() count of updates: %d", countOfUpdates );
+        mObserver.CheckUpdatesComplete(errorCode, countOfUpdates);
+        break;
 
-        TPckg<TInt> cancelCount( aNumberOfCancelledUpdates );
-	    iPtr3.Set( cancelCount );
-	    	            
-        TIpcArgs args;
-        args.Set( 0, iData );
-        args.Set( 1, &iPtr1 );
-        args.Set( 2, &iPtr2 );
-        args.Set( 3, &iPtr3 );
-      
-        // Start the asynchronous operation in the server side.
-        SendReceive( aUpdateFunction, args, aStatus );        
+        case ShowUpdates:
+        // Notice that ownership of result object is transferred here.
+        IAUPDATE_TRACE_3("[IAUPDATE] IAUpdateClient::requestCompleted() success count: %d failed count: %d cancelled count: %d", updateResult->SuccessCount(), updateResult->FailCount(), updateResult->CancelCount() );
+        mObserver.UpdateComplete(errorCode, updateResult);
+        break;
+                
+        case UpdateQuery:
+        updateNow = resultlist.at(1).toBool();      
+        if ( !updateNow )
+        {
+            // Let's assume that connection is not needed anymore
+            delete mServiceRequest;
+            mServiceRequest= NULL;
+        }    
+        IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateClient::requestCompleted() update now: %d", updateNow );
+        mObserver.UpdateQueryComplete(errorCode, updateNow);
+        break;
+             
+        default:
+        // Should not ever come here.
+        break;
+    }
+            
+    // Do not anything else than return after callback function is called because 
+    // this instance can be deleted by a client in a callback function
+    // 
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::requestCompleted() end");
+}
+
+// -----------------------------------------------------------------------------
+// IAUpdateClient::requestError
+// 
+// -----------------------------------------------------------------------------
+//
+void IAUpdateClient::requestError(int /*err*/)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::requestError() begin");
+    if ( mServiceRequest)
+        {
+            delete mServiceRequest;
+            mServiceRequest= NULL;
         }
-
-    // Inform the caller about the success of the request initializing.
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::SendUpdateRequest() end");
-    return error;
-    }    
-
-void RIAUpdateClient::ConnectNewAppToBackgroundL( TUid aAppUid )
+    RequestType requestType = mCurrentRequestType;
+    mCurrentRequestType = NoOperation;
+    // because this method is called also when iaupdate is closed normally, error code is not passed to a client   
+    CIAUpdateResult* updateResult(NULL);
+    switch (requestType)
     {
-    TName notUsed;
-    const TUint differentiator = GenerateServerDifferentiatorAndName(notUsed, aAppUid);
-    TRequestStatus requestStatusForRendezvous;
-          
-    RApaLsSession apa;
-    User::LeaveIfError(apa.Connect());
-    CleanupClosePushL(apa);
-            
-    TApaAppInfo info;
-    User::LeaveIfError(apa.GetAppInfo(info, aAppUid));
+        case CheckUpdates:
+        mObserver.CheckUpdatesComplete(0, 0);
+        break;
+
+        case ShowUpdates:
+        // Notice that ownership of result object is transferred here.
+        TRAP_IGNORE( updateResult = CIAUpdateResult::NewL() );    
+        mObserver.UpdateComplete(0, updateResult);
+        break;
+                    
+        case UpdateQuery:
+        mObserver.UpdateQueryComplete(0, false);
+        break;
+                 
+        default:
+        // Should not ever come here.
+        break;
+    }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateClient::requestError() end");
+}     
 
-    CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
-    cmdLine->SetExecutableNameL(info.iFullName);
-    cmdLine->SetServerRequiredL( differentiator );
-    cmdLine->SetCommandL(EApaCommandBackground);
-            
-    TThreadId notUsedId;
-    User::LeaveIfError(apa.StartApp(*cmdLine, notUsedId, &requestStatusForRendezvous));
+// -----------------------------------------------------------------------------
+// IAUpdateClient::qStringFromTDesC16
+// 
+// -----------------------------------------------------------------------------
+//
+QString IAUpdateClient::qStringFromTDesC16( const TDesC16& aDes16 )             
+{
+    return QString::fromUtf16( aDes16.Ptr(), aDes16.Length() );
+}
 
-    CleanupStack::PopAndDestroy(2, &apa);   // cmdLine and apa
-      
-    User::WaitForRequest(requestStatusForRendezvous);
-    User::LeaveIfError(requestStatusForRendezvous.Int());
-    
-    TName serverName;
-    ServerName(serverName, aAppUid, differentiator);
-    ConnectExistingByNameL(serverName);
-    }
+// -----------------------------------------------------------------------------
+// IAUpdateClient::qStringFromTDesC8
+// 
+// -----------------------------------------------------------------------------
+//
+QString IAUpdateClient::qStringFromTDesC8( const TDesC8& aDes8 )                
+{
+    return QString::fromUtf8( reinterpret_cast<const char*>( aDes8.Ptr() ), aDes8.Length() );
+}
+
+// -----------------------------------------------------------------------------
+// IAUpdateClient::qStringFromTDesC
+// 
+// -----------------------------------------------------------------------------
+//
+QString IAUpdateClient::qStringFromTDesC( const TDesC& aDes )                    
+{
+#if defined(_UNICODE)
+    return qStringFromTDesC16( aDes );
+#else
+    return qStringFromTDesC8( aDes );
+#endif
+}
 
 
 
-
-void RIAUpdateClient::ServerName(TName& aServerName, TUid aAppServerUid, TUint aServerDifferentiator)
-    {
-    _LIT(KServerNameFormat, "%08x_%08x_AppServer");
-    aServerName.Format(KServerNameFormat, aServerDifferentiator, aAppServerUid);
-    }
-    
-TUint RIAUpdateClient::GenerateServerDifferentiatorAndName(TName& aServerName, TUid aAppServerUid)
-    {
-    TUint r;
-    FOREVER
-        {
-        r = Math::Random();
-        if (r==0)
-            continue;
-        ServerName(aServerName, aAppServerUid, r);
-        TFindServer find(aServerName);
-        TFullName fullName;
-        if (find.Next(fullName) == KErrNone)
-            continue;
-        break;
-        }       
-    return r;
-    }
--- a/iaupdate/IAD/api/client/src/iaupdatemanager.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/api/client/src/iaupdatemanager.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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"
@@ -20,14 +20,13 @@
 
 // INCLUDES
 #include <eikenv.h>
-#include <iaupdateobserver.h>
-#include <iaupdateresult.h>
 
 #include "iaupdatemanager.h"
 #include "iaupdateclient.h"
 #include "iaupdatedebug.h"
 
 
+
 // -----------------------------------------------------------------------------
 // CIAUpdateManager::NewL
 // 
@@ -50,9 +49,9 @@
 CIAUpdateManager* CIAUpdateManager::NewLC( MIAUpdateObserver& aObserver )
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::NewLC() begin");
-    CIAUpdateManager* self = new( ELeave ) CIAUpdateManager( aObserver );
+    CIAUpdateManager* self = new( ELeave ) CIAUpdateManager();
     CleanupStack::PushL( self );
-    self->ConstructL();
+    self->ConstructL( aObserver );
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::NewLC() end");
     return self;
     }
@@ -62,10 +61,7 @@
 // 
 // -----------------------------------------------------------------------------
 //    
-CIAUpdateManager::CIAUpdateManager( MIAUpdateObserver& aObserver )
-: CActive( CActive::EPriorityStandard ),
-  iObserver( aObserver ),
-  iUpdateType( EIAUpdateIdle )
+CIAUpdateManager::CIAUpdateManager()
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::CIAUpdateManager()");
     iEikEnv = CEikonEnv::Static();
@@ -76,10 +72,14 @@
 // 
 // -----------------------------------------------------------------------------
 //    
-void CIAUpdateManager::ConstructL()
+void CIAUpdateManager::ConstructL( MIAUpdateObserver& aObserver )
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::ConstructL() begin");
-    CActiveScheduler::Add( this );
+    iUpdateClient = new IAUpdateClient( aObserver );
+    if ( !iUpdateClient )
+        {
+        User::Leave(KErrNoMemory);
+        }
     if ( iEikEnv )
         {
     	iEikEnv->AddForegroundObserverL(*this);
@@ -95,10 +95,7 @@
 CIAUpdateManager::~CIAUpdateManager()
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::~CIAUpdateManager() begin");
-    // If an operation is still active, 
-    // then DoCancel will cancel ongoing request
-    Cancel();
-    UpdateClient().Close();
+    delete iUpdateClient;
     if ( iEikEnv )
         {
     	iEikEnv->RemoveForegroundObserver(*this);
@@ -114,60 +111,9 @@
 void CIAUpdateManager::CheckUpdates( const CIAUpdateParameters& aUpdateParameters )
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::CheckUpdates() begin");
-    if ( BusyCheck() )
-        {
-        // An operation is already going on.
-        // Do not continue with this new operation.
-        // Only, inform the observer with the error code.
-        // Notice that the callback is called synchronously here 
-        // because there is no better way to do it. Asynchronous way 
-        // would be really cumbersome because this object is already active. 
-        // This error is users fault. Therefore we, could also panic here.
-        Observer().CheckUpdatesComplete( KErrServerBusy, 0 );
-        return;
-        }
-
-    // Reset result values because we are starting a new operation.
-    ResetResults();
+    
+    iUpdateClient->checkUpdates( aUpdateParameters );
 
-    // Set the update type. 
-    // So, we know later in RunL what operation was requested.
-    SetUpdateType( EIAUpdateCheck );
-    
-    TInt error( UpdateClient().Open( ETrue) );
-    if ( error == KErrNone )
-        {    
-        error =
-            UpdateClient().CheckUpdates( aUpdateParameters, 
-                                         iSuccessCount, 
-                                         iStatus );
-        }        
-
-    if ( error == KErrNone )
-        {
-        // Set this object active.
-        // Because everything went ok, 
-        // the operation will be handled asynchronously
-        // and the service provider will inform us when the operation
-        // is finished.
-        SetActive();        
-        }
-    else
-        {
-        // Because we are going to activate this active object,
-        // set the status pending.
-        iStatus = KRequestPending;
-        
-        // An error occurred above. 
-        // Therefore, the operation did not proceed any further.
-        // Set this object active for asynchronous error handling.
-        SetActive();
-                
-        // Now, that everything is ready, just inform the active scheduler
-        // that operation is finished. Pass the error code for the observer.
-        TRequestStatus* status( &iStatus );
-        User::RequestComplete( status, error );                
-        }
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::CheckUpdates() end");
     }
 
@@ -179,62 +125,8 @@
 void CIAUpdateManager::ShowUpdates( const CIAUpdateParameters& aUpdateParameters )
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::ShowUpdates() begin");
-    if ( BusyCheck() )
-         {
-         // An update operation is already going on.
-         // Do not continue with this new operation.
-         // Only, inform the observer with the error code.
-         // Notice that the callback is called synchronously here 
-         // because there is no better way to do it. Asynchronous way 
-         // would be really cumbersome because this object is already active. 
-         // This error is users fault. Therefore we, could also panic here.
-         Observer().UpdateComplete( KErrServerBusy, NULL );
-         return;
-         }
-
-    // Reset result values because we are starting a new operation.
-    ResetResults();
+    iUpdateClient->showUpdates( aUpdateParameters );
 
-    // Set the update type. 
-    // So, we know later in RunL what operation was requested.
-    SetUpdateType( EIAUpdateUpdate );
-    
-    TInt error( UpdateClient().Open( EFalse ) );
-    if ( error == KErrNone )
-        {    
-        error =
-            UpdateClient().ShowUpdates( aUpdateParameters, 
-                                        iSuccessCount,
-                                        iFailCount,
-                                        iCancelCount,  
-                                        iStatus );
-        }        
-
-    if ( error == KErrNone )
-        {
-        // Set this object active.
-        // Because everything went ok, 
-        // the operation will be handled asynchronously
-        // and the service provider will inform us when the operation
-        // is finished.
-        SetActive();        
-        }
-    else
-        {
-        // Because we are going to activate this active object,
-        // set the status pending.
-        iStatus = KRequestPending;
-        
-        // An error occurred above. 
-        // Therefore, the operation did not proceed any further.
-        // Set this object active for asynchronous error handling.
-        SetActive();
-                
-        // Now, that everything is ready, just inform the active scheduler
-        // that operation is finished. Pass the error code for the observer.
-        TRequestStatus* status( &iStatus );
-        User::RequestComplete( status, error );                
-        }
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::ShowUpdates() end");
     }
     
@@ -246,9 +138,9 @@
 void CIAUpdateManager::Update( const CIAUpdateParameters& /*aUpdateParameters*/ )
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::Update() begin");
-    Observer().UpdateComplete( KErrNotSupported, NULL );
-    
-    
+
+    iUpdateClient->update();
+   
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::Update() begin");
     }
 
@@ -260,247 +152,13 @@
 void CIAUpdateManager::UpdateQuery()
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::UpdateQuery() begin");
-    if ( BusyCheck() )
-        {
-        // An update operation is already going on.
-        // Do not continue with this new operation.
-        // Only, inform the observer with the error code.
-        // Notice that the callback is called synchronously here 
-        // because there is no better way to do it. Asynchronous way 
-        // would be really cumbersome because this object is already active. 
-        // This error is users fault. Therefore we, could also panic here.
-        Observer().UpdateQueryComplete( KErrServerBusy, EFalse );
-        return;
-    }
-
-    // Reset result values because we are starting a new operation.
-    ResetResults();
-
-    // Set the update type. 
-    // So, we know later in RunL what operation was requested.
-    SetUpdateType( EIAUpdateQuery );
-    
-    TInt error( UpdateClient().Open( EFalse ) );
-    if ( error == KErrNone )
-        {    
-        error =
-            UpdateClient().UpdateQuery( iUpdateNow, iStatus );
-        }        
-
-    if ( error == KErrNone )
-        {
-        // Set this object active.
-        // Because everything went ok, 
-        // the operation will be handled asynchronously
-        // and the service provider will inform us when the operation
-        // is finished.
-        SetActive();        
-        }
-    else
-        {
-        // Because we are going to activate this active object,
-        // set the status pending.
-        iStatus = KRequestPending;
         
-        // An error occurred above. 
-        // Therefore, the operation did not proceed any further.
-        // Set this object active for asynchronous error handling.
-        SetActive();
-                
-        // Now, that everything is ready, just inform the active scheduler
-        // that operation is finished. Pass the error code for the observer.
-        TRequestStatus* status( &iStatus );
-        User::RequestComplete( status, error );                
-        }
+    iUpdateClient->updateQuery();
+          
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::UpdateQuery() end");
     }
 
-// -----------------------------------------------------------------------------
-// CIAUpdateManager::DoCancel
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateManager::DoCancel()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::DoCancel() begin");
-    UpdateClient().CancelAsyncRequest();
 
-    // Reset result values because we are starting a new operation.
-    ResetResults();
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::DoCancel() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateManager::RunL
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateManager::RunL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::RunL() begin");
-    // Update operation error code
-    TInt errorCode( iStatus.Int() );
-    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", errorCode );
-    if ( errorCode == KErrServerTerminated )
-        {
-    	// Handle is released if server is terminated
-        UpdateClient().Close();
-        }
-
-    // Variables for operation and result information.
-    TIAUpdateType updateType( UpdateType() );
-    IAUPDATE_TRACE_1("[IAUPDATE] update type: %d", updateType );
-    CIAUpdateResult* updateResult( NULL );
-        
-    if ( updateType == EIAUpdateUpdate )
-        {
-        // Update result object is required.
-        // Notice that the ownership is transferred later.
-        // So, this function does not need to delete updateResult object.
-        TRAPD( trapError, updateResult = CIAUpdateResult::NewL() );
-        if ( updateResult )
-            {
-            updateResult->SetSuccessCount( iSuccessCount );
-            updateResult->SetFailCount( iFailCount );
-            updateResult->SetCancelCount( iCancelCount );
-            }
-        else
-            {
-            // Something went wrong when creating update result object.
-            // Update the error code accordingly.
-            errorCode = trapError;
-            }
-        // Let's assume that connection is not needed anymore
-        UpdateClient().Close();
-        }
-
-    
-    // Inform that no operation is going on anymore.
-    // This is required for busy check.
-    SetUpdateType( EIAUpdateIdle );    
-    
-    // Use the update type of the ongoing operation to check what callback
-    // function to call.
-    switch ( updateType )
-        {
-        case EIAUpdateCheck:
-            if ( iSuccessCount == 0 )
-                {
-            	// Let's assume that connection is not needed anymore
-                UpdateClient().Close();
-                }
-            IAUPDATE_TRACE_1("[IAUPDATE] success count: %d", iSuccessCount );
-            Observer().CheckUpdatesComplete( errorCode, iSuccessCount );
-            break;
-
-        case EIAUpdateUpdate:
-            // Notice that ownership of result object is transferred here.
-            IAUPDATE_TRACE_3("[IAUPDATE] success count: %d failed count: %d cancelled count: %d", iSuccessCount, iFailCount, iCancelCount );
-            Observer().UpdateComplete( errorCode, updateResult );
-            break;
-            
-        case EIAUpdateQuery:
-            if ( !iUpdateNow )
-                {
-            	// Let's assume that connection is not needed anymore
-                UpdateClient().Close();
-                } 
-            IAUPDATE_TRACE_1("[IAUPDATE] update now: %d", iUpdateNow );
-            Observer().UpdateQueryComplete( errorCode, iUpdateNow );
-            break;
-         
-        default:
-            // Should not ever come here.
-            break;
-        }
-        
-    // Do not anything else than return after callback function is called because 
-    // this instance can be deleted by a client in a callback function
-    // 
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::RunL() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateManager::ResetResults
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateManager::ResetResults()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::ResetResults() begin");
-    // Set the member variables to their default values.
-    iSuccessCount = 0;
-    iFailCount = 0;
-    iCancelCount = 0;
-    iUpdateNow = EFalse;
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::ResetResults() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateManager::BusyCheck
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CIAUpdateManager::BusyCheck() const
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::BusyCheck()");
-    if ( UpdateType() == EIAUpdateIdle )
-        {
-        return EFalse;
-        }
-    else
-        {
-        return ETrue; 
-        }
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateManager::UpdateClient 
-// 
-// -----------------------------------------------------------------------------
-//
-RIAUpdateClient& CIAUpdateManager::UpdateClient()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::UpdateClient()");
-    return iUpdateClient;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateManager::Observer
-// 
-// -----------------------------------------------------------------------------
-//
-MIAUpdateObserver& CIAUpdateManager::Observer() const
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::Observer()");
-    return iObserver;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateManager::UpdateType
-// 
-// -----------------------------------------------------------------------------
-//
-CIAUpdateManager::TIAUpdateType CIAUpdateManager::UpdateType() const
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::UpdateType()");
-    return iUpdateType;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateManager::SetUpdateType
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateManager::SetUpdateType( CIAUpdateManager::TIAUpdateType aUpdateType )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::SetUpdateType() begin");
-    IAUPDATE_TRACE_1("[IAUPDATE] update type: %d", aUpdateType );
-    iUpdateType = aUpdateType;
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::SetUpdateType() end");
-    }
- 
 // -----------------------------------------------------------------------------
 // CIAUpdateManager::HandleGainingForeground
 //  iaupdate.exe is brought to foreground if visible request is ongoing
@@ -509,7 +167,7 @@
 void CIAUpdateManager::HandleGainingForeground()
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::HandleGainingForeground() begin");
-	iUpdateClient.BroughtToForeground();   
+	//iUpdateClient->broughtToForeground();   
 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateManager::HandleGainingForeground() end");  
     }
 
--- a/iaupdate/IAD/api/eabi/iaupdateapiu.def	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-EXPORTS
-	_ZN15CIAUpdateResult12SetFailCountEi @ 1 NONAME
-	_ZN15CIAUpdateResult14SetCancelCountEi @ 2 NONAME
-	_ZN15CIAUpdateResult15SetSuccessCountEi @ 3 NONAME
-	_ZN15CIAUpdateResult4NewLEv @ 4 NONAME
-	_ZN15CIAUpdateResult5NewLCEv @ 5 NONAME
-	_ZN15CIAUpdateResultD0Ev @ 6 NONAME
-	_ZN15CIAUpdateResultD1Ev @ 7 NONAME
-	_ZN15CIAUpdateResultD2Ev @ 8 NONAME
-	_ZN19CIAUpdateParameters18SetSearchCriteriaLERK7TDesC16 @ 9 NONAME
-	_ZN19CIAUpdateParameters24SetCommandLineArgumentsLERK6TDesC8 @ 10 NONAME
-	_ZN19CIAUpdateParameters25SetCommandLineExecutableLERK7TDesC16 @ 11 NONAME
-	_ZN19CIAUpdateParameters4NewLEv @ 12 NONAME
-	_ZN19CIAUpdateParameters5NewLCEv @ 13 NONAME
-	_ZN19CIAUpdateParameters6SetUidERK4TUid @ 14 NONAME
-	_ZN19CIAUpdateParametersD0Ev @ 15 NONAME
-	_ZN19CIAUpdateParametersD1Ev @ 16 NONAME
-	_ZN19CIAUpdateParametersD2Ev @ 17 NONAME
-	_ZN9CIAUpdate11ShowUpdatesERK19CIAUpdateParameters @ 18 NONAME
-	_ZN9CIAUpdate11UpdateQueryEv @ 19 NONAME
-	_ZN9CIAUpdate12CheckUpdatesERK19CIAUpdateParameters @ 20 NONAME
-	_ZN9CIAUpdate4NewLER17MIAUpdateObserver @ 21 NONAME
-	_ZN9CIAUpdate5NewLCER17MIAUpdateObserver @ 22 NONAME
-	_ZN9CIAUpdate6UpdateERK19CIAUpdateParameters @ 23 NONAME
-	_ZN9CIAUpdateD0Ev @ 24 NONAME
-	_ZN9CIAUpdateD1Ev @ 25 NONAME
-	_ZN9CIAUpdateD2Ev @ 26 NONAME
-	_ZNK15CIAUpdateResult11CancelCountEv @ 27 NONAME
-	_ZNK15CIAUpdateResult12SuccessCountEv @ 28 NONAME
-	_ZNK15CIAUpdateResult9FailCountEv @ 29 NONAME
-	_ZNK19CIAUpdateParameters14SearchCriteriaEv @ 30 NONAME
-	_ZNK19CIAUpdateParameters20CommandLineArgumentsEv @ 31 NONAME
-	_ZNK19CIAUpdateParameters21CommandLineExecutableEv @ 32 NONAME
-	_ZNK19CIAUpdateParameters3UidEv @ 33 NONAME
-	_ZTI15CIAUpdateResult @ 34 NONAME ; #<TI>#
-	_ZTI19CIAUpdateParameters @ 35 NONAME ; #<TI>#
-	_ZTI9CIAUpdate @ 36 NONAME ; #<TI>#
-	_ZTV15CIAUpdateResult @ 37 NONAME ; #<VT>#
-	_ZTV19CIAUpdateParameters @ 38 NONAME ; #<VT>#
-	_ZTV9CIAUpdate @ 39 NONAME ; #<VT>#
-	_ZN19CIAUpdateParameters15SetShowProgressEi @ 40 NONAME
-	_ZNK19CIAUpdateParameters12ShowProgressEv @ 41 NONAME
-	_ZN19CIAUpdateParameters10SetRefreshEi @ 42 NONAME
-	_ZN19CIAUpdateParameters13SetImportanceEj @ 43 NONAME
-	_ZN19CIAUpdateParameters7SetTypeEj @ 44 NONAME
-	_ZNK19CIAUpdateParameters10ImportanceEv @ 45 NONAME
-	_ZNK19CIAUpdateParameters4TypeEv @ 46 NONAME
-	_ZNK19CIAUpdateParameters7RefreshEv @ 47 NONAME
-
--- a/iaupdate/IAD/api/group/bld.inf	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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:   Build information file for IA Update API
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-iaupdateapi.mmp
\ No newline at end of file
--- a/iaupdate/IAD/api/group/iaupdateapi.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2007-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:   Project definition file of iaupdateapi.dll
-*
-*/
-
-
-
-#include <platform_paths.hrh>
-
-
-CAPABILITY      CAP_GENERAL_DLL
-
-TARGET          iaupdateapi.dll
-TARGETTYPE      dll
-UID             0x1000008d 0x2000F85C
-VERSION         10.1
-
-PAGED
-
-
-// API source files
-SOURCEPATH      ../src
-SOURCE          iaupdate.cpp
-SOURCE          iaupdateparameters.cpp
-SOURCE          iaupdateresult.cpp
-
-// Client header files
-USERINCLUDE     ../client/inc
-
-// Client source files
-SOURCEPATH      ../client/src
-SOURCE          iaupdateclient.cpp
-SOURCE          iaupdatemanager.cpp
-
-// Client uses IAD UI services.
-// So, IAD UID information is required.
-USERINCLUDE     ../../ui/inc
-// for iaupdatetools methods
-USERINCLUDE     ../../tools/inc
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY         iaupdatetools.lib
-LIBRARY         euser.lib
-LIBRARY         estor.lib
-LIBRARY         avkon.lib
-LIBRARY         apparc.lib
-LIBRARY         eikcore.lib
-LIBRARY         cone.lib
-LIBRARY         ws32.lib
-LIBRARY         apgrfx.lib
-
-// For debugging and logging purposes
-USERINCLUDE     ../../engine/inc
-DEBUGLIBRARY    flogger.lib
-
-SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/api/iaupdateapi.pro	Mon May 03 12:38:03 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:   
+#                
+
+
+TEMPLATE = lib
+TARGET = iaupdateapi 	
+
+symbian {
+    TARGET.UID3 = 0x2000F85C
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+    TARGET.EPOCALLOWDLLDATA=1
+    MMP_RULES += "OPTION ARMCC --export_all_vtbl"
+} 
+
+DEPENDPATH += .
+DEPENDPATH += ./src
+DEPENDPATH += ./client/src
+DEPENDPATH += ./inc
+DEPENDPATH += ./client/inc
+DEPENDPATH += ../ui/inc
+DEPENDPATH += ../engine/inc
+
+INCLUDEPATH += .
+INCLUDEPATH += ../ui/inc
+INCLUDEPATH += ../engine/inc
+
+
+CONFIG += hb
+
+# Input
+SOURCES += iaupdate.cpp \
+           iaupdateparameters.cpp \
+           iaupdateresult.cpp \
+           iaupdateclient.cpp \
+           iaupdatemanager.cpp
+
+HEADERS = iaupdateclient.h \
+          iaupdatemanager.h 
+
+LIBS += -lcone
+LIBS += -lws32
+LIBS += -lxqservice
+LIBS += -lxqserviceutil
+LIBS += -lflogger
--- a/iaupdate/IAD/backgroundchecker/group/iaupdatebg.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/group/iaupdatebg.mmp	Mon May 03 12:38:03 2010 +0300
@@ -32,6 +32,10 @@
 USERINCLUDE         ../../ui/inc
 USERINCLUDE         ../../firmwareupdate/inc
 
+SYSTEMINCLUDE     /epoc32/include/mw/hb
+SYSTEMINCLUDE     /epoc32/include/mw/hb/hbcore 
+SYSTEMINCLUDE     /epoc32/include/mw/hb/hbwidgets
+
 MW_LAYER_SYSTEMINCLUDE
 
 SOURCEPATH          ../src
@@ -61,6 +65,11 @@
 LIBRARY             commonengine.lib
 LIBRARY             sysversioninfo.lib
 LIBRARY             FeatMgr.lib
+
+// HLa
+LIBRARY     hbcore.lib
+LIBRARY     hbwidgets.lib
+
 DEBUGLIBRARY 	    flogger.lib
 
 SMPSAFE
--- a/iaupdate/IAD/backgroundchecker/inc/iaupdatebgcheckermode.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/inc/iaupdatebgcheckermode.h	Mon May 03 12:38:03 2010 +0300
@@ -25,11 +25,11 @@
     {
     ESleepMode,
     EFirstTimeMode,
+//    EFirstTimeMode2,
     EFirstTimeMode2,
-    EFirstTimeMode3,
     ENormalMode,
-    ERetryMode,
-    EFirstTimeRemindMode
+    ERetryMode
+//    EFirstTimeRemindMode
     };
 
 #endif //IAUPDATEBGCHECKERMODE_H
--- a/iaupdate/IAD/backgroundchecker/inc/iaupdatebgrefreshtimer.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/inc/iaupdatebgrefreshtimer.h	Mon May 03 12:38:03 2010 +0300
@@ -34,7 +34,7 @@
 // FORWARD DECLARATIONS
 class CIAUpdate;
 class CIAUpdateParameters;
-class CAknSoftNotifier;
+// class CAknSoftNotifier;
 class CInternalFileHandler;
 class CIdleObserver;
 
@@ -150,11 +150,13 @@
 
         TInt SetRetryTimesL( TInt aRetry );
           
-        HBufC* ReadResourceLC( TInt aResourceId );
+        // HBufC* ReadResourceLC( TInt aResourceId );
         
         void StartIaupdateL() const;
         
-        void LaunchSoftNotificationL( const TInt& aResourceId, const TInt& SK1, const TInt& SK2 );
+        // void LaunchSoftNotificationL( const TInt& aResourceId, const TInt& SK1, const TInt& SK2 );
+        
+        void LaunchNotificationL( const int aNrOfUpdates );
         
         TBool IsAutoUpdateDisabledL();
         
@@ -197,7 +199,7 @@
         CIAUpdateBGInternalFileHandler* iInternalFile;
         TIAUpdateBGMode iMode;
         CIAUpdateBGSoftNotification* iSoftNotification;
-        RResourceFile iResourceFile;
+        // RResourceFile iResourceFile;
         RFs iFs;
     };        
 
--- a/iaupdate/IAD/backgroundchecker/inc/iaupdatebgsoftnotification.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/inc/iaupdatebgsoftnotification.h	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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,13 +22,12 @@
 
 // INCLUDES
 #include <e32base.h>
-#include <AknDynamicSoftNotifier.h>
+
+#include <hbdevicenotificationdialogsymbian.h>
 #include "iaupdatebgcheckermode.h"
 
+
 // FORWARD DECLARATION
-class TAknDynamicSoftNotificationParams;
-class CIAUpdateBGInternalFileHandler;
-
 class MIAUpdateBGSoftNotificationCallBack
     {
     public:
@@ -39,104 +38,79 @@
 
 // CLASS DECLARATION
 /**
- *  Controls the native soft notifications.
- *  This class delegates method calls to AvKon soft notification.
+ *  Controls the background indicator notifications. 
  *
- *  @since 3.2
  */
-class CIAUpdateBGSoftNotification : public CBase, public MAknDynamicSoftNoteObserver
+class CIAUpdateBGSoftNotification : public CBase, 
+                                    public MHbDeviceNotificationDialogObserver
     {
     public:  // Constructors and destructor
 
         /**
          * Static constructor
          */
-        static CIAUpdateBGSoftNotification* NewL( MIAUpdateBGSoftNotificationCallBack* aCallback, CIAUpdateBGInternalFileHandler* aInternalFile );
+        static CIAUpdateBGSoftNotification* NewL( 
+                MIAUpdateBGSoftNotificationCallBack* aCallback ); 
 
         /**
          * Destructor.
          */
         virtual ~CIAUpdateBGSoftNotification();
-
-    public: // From MAknDynamicSoftNotifierObserver
-
-        /**
-         * Dynamic soft notification was accepted by user.
-         *
-         * @param aNoteId Identification of notification.
-         */
-        void NotificationAccepted( TInt aIdentifier );
-
-        /**
-         * Dynamic soft notification was canceled by user.
-         *
-         * @param aNoteId Identification of notification.
-         */
-        void NotificationCanceled( TInt aIdentifier );
-
+        
     public: // New functions
         
-        void StartObservingIfNeededL();
-        
-        
-        /**
-         * Add a custom soft notification. If a custom soft notification with
-         * exactly the same parameters already exists,
-         * its count is increased by aCount.
-         *
-         * @param aNotificationId identifier for this notification
-         * @param aCount addition count
-         */
-        void ShowSoftNotificationL();
-
-        /**
-         * Cancels custom soft notification.
-         *
-         * @param aNotificationId identifier for this notification
-         */
-        void RemoveSoftNotificationL( TInt aNotifierID );
+         /**
+          * Shows notification and  indicator. 
+          *
+          * @param aNrOfUpdates number of updates
+          */
+         void ShowNotificationL();
+         
+         /**
+          * Shows indicator. 
+          *
+          * @param aMode indicator mode (EFirstTimeMode / ENormalMode)
+          */
+         void ShowIndicatorL();
+         
+         /**
+          * Removes indicator. 
+          *
+          * @param aNrOfUpdates number of updates
+          */
+         void RemoveIndicatorL();
 
         /**
          * Set a text for a soft notification.
          *
-         * @param aSingularText singular text for soft notification
-         * @param aPluralText plural text for soft notification
+         * @param aTitle title for soft notification
+         * @param aText  text for soft notification
          */
-        void SetTextL( const TDesC& aText, const TDesC& aGroupText );
+        void SetTextL( const TDesC& aTitle, const TDesC& aText ); 
 
         /**
-         * Set labels for soft notification's softkeys.
-         *
-         * @param aSoftkey1Label Label for the softkey 1
-         * @param aSoftkey2Label Label for the softkey 2
-         */
-        void SetSoftkeyLabelsL( const TDesC& aSoftkey1Label,
-            const TDesC& aSoftkey2Label );
-
+        * Set an image path for a soft notification.
+        *
+        * @param aImage image path for soft notification
+        */
+        void SetImagePathL( const TDesC& aImage );
+        
         /**
-         * Set an image for a soft notification.
-         *
-         * @param aImage image for soft notification
-         */
-        void SetImageL( const TDesC8& aImage );
+        * Set number of updates a soft notification.
+        *
+        * @param aNrOfUpdates 0 - first time, >< 0 normal case
+        */
+        void SetNrOfUpdates( const TInt& aNrOfUpdates);
 
-        /**
-         * Returns the notification id.
-         *
-         * @return notification id
-         */
-        TInt Id();
 
     private:  // Constructors
         /**
          * C++ constructor.
          *
-         * @param aAppId View activation application id.
-         * @param aNotificationId Notification id.
-         * @param aEventSource Event source used for posting events from
-         *        native to Java side.
+         * @param aCallback notification callback
          */
-        CIAUpdateBGSoftNotification( MIAUpdateBGSoftNotificationCallBack* aCallback, CIAUpdateBGInternalFileHandler* aInternalFile );
+        CIAUpdateBGSoftNotification( 
+                MIAUpdateBGSoftNotificationCallBack* aCallback); 
 
         /**
          * 2nd phase constructor.
@@ -148,31 +122,71 @@
         /**
          * Set assigned member data to custom notification parameters
          *
-         * @param aParam custom soft notification params to fill
+         */
+        void FillNotificationParams();
+        
+        /**
+         * Notification dialog activationobserver
+         *
+         * @param aDialog notification dialog
+         */
+        virtual void NotificationDialogActivated(
+                const CHbDeviceNotificationDialogSymbian* aDialog );
+        /**
+         * Notification dialog activationobserver
+         *
+         * @param aDialog notification dialog
+         * @param aCompletionCode completion code
          */
-        void FillNotificationParams( TAknDynamicSoftNotificationParams& aParam );
-
+        virtual void NotificationDialogClosed( 
+                const CHbDeviceNotificationDialogSymbian* aDialog, 
+                TInt aCompletionCode );
+        
+        /**
+         * Enable/disable indicator
+         *
+         * @param aEnabled ETrue-enabled, EFalse-disabled
+         */        
+        void SetIndicatorEnabled(TBool aEnabled);
+        
+        /**
+         * Get indicator enablation state
+         *
+         * @return aEnabled ETrue-enabled, EFalse-disabled
+         */ 
+        TBool IsIndicatorEnabled();
+        
+        /**
+         * Set number of updates
+         *
+         * @param aNrOfUpdates number of updates 
+         */ 
+        // void SetNrOfUpdates( const int aNrOfUpdates );
+        
+        /**
+         * Get number of updates
+         *
+         * @return  number of updates 
+         */ 
+        int GetNrOfUpdates();
+        
     private:  // Data
-        /// Own. AvKon custom soft notifier
-        CAknDynamicSoftNotifier* iNotifier;
-        /// View activation application id
-        TUid iAppId;
-        /// Notification Id
-        TInt iNotificationId;
-        /// Own. Softkey 1 label
-        HBufC* iSoftkey1;
-        /// Own. Softkey 2 label
-        HBufC* iSoftkey2;
-        /// Own. Note label when single dialog is shown
-        HBufC* iLabel;
-        /// Own. Note label when notifications are groupped
-        HBufC* iGroupLabel;
-        /// Own. Image data byte array
+        // Note title
+        HBufC* iTitle; 
+        // Note text
+        HBufC* iText; 
+        /// Image data byte array
         HBufC8* iImageData;
-        
+        // Notification callback
         MIAUpdateBGSoftNotificationCallBack* iCallback;
-        
-        CIAUpdateBGInternalFileHandler* iInternalFile; //not owned
+        // Image path
+        HBufC* iImagePath;
+        // Number of updates
+        int iNrOfUpdates;
+        // Indictor activation state
+        TBool iActivateIndicator;
+        //Notification dialog
+        CHbDeviceNotificationDialogSymbian* iNotificationDialog;
 
     };
 
--- a/iaupdate/IAD/backgroundchecker/src/iaupdatebgmain.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/src/iaupdatebgmain.cpp	Mon May 03 12:38:03 2010 +0300
@@ -26,7 +26,6 @@
 // LOCAL FUNCTION PROTOTYPES
 LOCAL_C TInt ThreadStartL();
 LOCAL_C TBool IAUpdateEnabledL();
-LOCAL_C void RemoveExistingSoftNotificationL();
 
 //Const
 _LIT( KBackgroundChecker, "iaupdatebgchecker" );
@@ -70,7 +69,6 @@
     if ( !IAUpdateEnabledL() )
         {
         FLOG("[bgchecker] ThreadStartL() IAUpdate not enabled");
-        RemoveExistingSoftNotificationL();
         return KErrNone;  
         }
     TFullName name;
@@ -110,7 +108,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// IAUpdateEnabledL()
+// IAUpdateEnabledL() 
 // ---------------------------------------------------------------------------
 //
 LOCAL_C TBool IAUpdateEnabledL() 
@@ -138,24 +136,5 @@
     return enabled;        
     }
 
-// ---------------------------------------------------------------------------
-// RemoveExistingSoftNotificationL()
-// ---------------------------------------------------------------------------
-//
-LOCAL_C void RemoveExistingSoftNotificationL() 
-    {
-    FLOG("[bgchecker] RemoveExistingSoftNotificationL() begin");
-    
-    CIAUpdateBGInternalFileHandler* internalFile = CIAUpdateBGInternalFileHandler::NewLC();
-    CIAUpdateBGSoftNotification* softNotification = CIAUpdateBGSoftNotification::NewL( NULL, internalFile );
-    CleanupStack::PushL( softNotification );
-    softNotification->RemoveSoftNotificationL( softNotification->Id() );
-    CleanupStack::PopAndDestroy( softNotification );
-    CleanupStack::PopAndDestroy( internalFile );
-    
-    FLOG("[bgchecker] RemoveExistingSoftNotificationL() end");
-    return;        
-    }
-
 //EOF  
 
--- a/iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -25,9 +25,6 @@
 #include <apgwgnam.h>
 #include <apgcli.h>
 #include <apacmdln.h>
-#include <avkon.hrh>
-#include <StringLoader.h> 
-#include <iaupdate.rsg>
 #include <data_caging_path_literals.hrh>
 #include <bautils.h>
 #include <apgtask.h>
@@ -45,9 +42,10 @@
 
 //MACROS
 _LIT8( KRefreshFromNetworkDenied, "1" );
-_LIT(KIAUpdateResourceFile, "iaupdate.rsc");
+// _LIT(KIAUpdateResourceFile, "iaupdate.rsc");
 _LIT(KIAUpdateLauncherExe, "iaupdatelauncher.exe" );
 _LIT(KImageFile, "qgn_note_swupdate_notification.svg");
+_LIT8( KFirstTimeCase, "0" );
 
 //CONSTANTS
 const TUint KIADUpdateLauncherUid( 0x2001FE2F );
@@ -84,23 +82,25 @@
     
     iInternalFile = CIAUpdateBGInternalFileHandler::NewL();
     
-    iSoftNotification = CIAUpdateBGSoftNotification::NewL( this, iInternalFile );
-    iSoftNotification->StartObservingIfNeededL();
+    iSoftNotification = CIAUpdateBGSoftNotification::NewL( this ); //, iInternalFile );
+    // HLa: iSoftNotification->StartObservingIfNeededL();
     
     // Get resource file path
+    /* HLa
     TFileName fileName;
     fileName.Copy(TParsePtrC(RProcess().FileName()).Drive());
     fileName.Append(KDC_APP_RESOURCE_DIR);
     fileName.Append(KIAUpdateResourceFile);
-
+    */
+    
     User::LeaveIfError(iFs.Connect());
 
     // Get language of resource file        
-    BaflUtils::NearestLanguageFile( iFs, fileName );
+    //BaflUtils::NearestLanguageFile( iFs, fileName );
 
     // Open resource file
-    iResourceFile.OpenL( iFs, fileName );
-    iResourceFile.ConfirmSignatureL();    
+    //iResourceFile.OpenL( iFs, fileName );
+    //iResourceFile.ConfirmSignatureL();    
     }
     
     
@@ -125,7 +125,7 @@
     delete iInternalFile;
     delete iSoftNotification;
     
-    iResourceFile.Close();
+    // iResourceFile.Close();
     iFs.Close();
     }
 
@@ -139,10 +139,26 @@
         
     iMode = ModeL();
     
+    //HLa
+    TBool test1 = IsAgreementAcceptedL();
+    TBool test2 = ReminderOnL();
+    
+    int test = 0;
     switch ( iMode )
         {
         case EFirstTimeMode:
-        case EFirstTimeRemindMode:    
+         
+        // while not released keep in sleep mode
+        //int test = 1;
+        if ( test == 0 )
+            {
+            ListenAutoUpdateSettingsL();
+            iMode = ESleepMode;
+            SetModeL( iMode );
+            return;
+            }
+        
+        //case EFirstTimeRemindMode:    
             {
             if ( IsFirstTimeDialogDisabledL() )
                 {
@@ -217,15 +233,15 @@
                                                   
             break;
             }
-
+/*
         case EFirstTimeMode2:
             {
             FLOG("[bgchecker] StartProcessL EFirstTimeMode2");
             RunL();
             break;
             }
-
-        case EFirstTimeMode3:
+*/
+        case EFirstTimeMode2:
             {
             FLOG("[bgchecker] StartProcessL EFirstTimeMode 3");
             //if user accepted the disclaimer already and reboot the phone, 
@@ -250,6 +266,22 @@
                 }
                     
             iNotifyHandler->StartListeningL();  
+            
+
+            if ( !IsAgreementAcceptedL() )
+                {
+                FLOG("[bgchecker] EFirstTimeMode4 ShowIndicator");
+                // Set number of updates; zero for first case
+                iSoftNotification->SetNrOfUpdates( 0 );
+                
+                // do not show indicator when testing
+                int test = 0;
+                if ( test == 1)
+                  iSoftNotification->ShowIndicatorL();
+                
+                }
+            
+            
             break;
             }
 
@@ -334,6 +366,7 @@
             //start reminder timer also if user choose later before reboot
             //check the value from private folder
              
+            
               if ( ReminderOnL() )
                   {
                   TTime currenttime;
@@ -360,6 +393,7 @@
                       iReminderTimer->StartReminderTimerL( timetogo );
                       }
                   }
+                  
             }
     }
 
@@ -588,6 +622,7 @@
     //turn off the reminder, user will decide whether to turn if on or off
     //The user's decision will be checked in soft notification callback function
     
+    
     if ( ReminderOnL())
         {
         FLOG( "Do CheckUpdates 3");
@@ -595,6 +630,7 @@
         SetReminderL( EFalse );
         }
     
+    
     if( !iUpdate )
         {
         iUpdate = CIAUpdate::NewL( *this );
@@ -644,6 +680,15 @@
     {
     FLOG_NUM( "CheckUpdatesComplete aErrorCode = %d", aErrorCode );
     FLOG_NUM( "CheckUpdatesComplete aAvailableUpdates = %d", aAvailableUpdates );
+    
+    //HLa
+    int test = 0;
+    if ( test == 0 )
+        {
+        aErrorCode = 0;
+        aAvailableUpdates = 0;
+        }
+    
     if ( !IAUpdateEnabledL() )
         {
         Shutdown();
@@ -688,8 +733,9 @@
             {             
             FLOG( "CheckUpdatesComplete 4");
     
-            LaunchSoftNotificationL(R_IAUPDATE_UPDATE_AVAILABLE,
-                        R_TEXT_SOFTKEY_SHOW, R_TEXT_SOFTKEY_LATER );
+            LaunchNotificationL( aAvailableUpdates );
+            //LaunchSoftNotificationL(R_IAUPDATE_UPDATE_AVAILABLE,
+            //            R_TEXT_SOFTKEY_SHOW, R_TEXT_SOFTKEY_LATER );
             }
 
             FLOG( "CheckUpdatesComplete 5");
@@ -893,6 +939,147 @@
             break;
             
         case EFirstTimeMode:
+        //case EFirstTimeRemindMode:
+            {
+            FLOG("[bgchecker] runl EFirstTimeMode");
+            
+            if ( iRuns == 0 )
+                {
+                FLOG("[bgchecker] runl run = 0");
+                HandlerFirstTimeL();
+                }
+            else
+                {
+                FLOG("[bgchecker] runl still wait");
+                TTimeIntervalMinutes timetowait = TimeIntervalFromNextShowOfNewFeatureDialogL();
+                                   
+                if ( timetowait.Int() <= 0 )
+                    {
+                    StartL( StartNow );
+                    }
+                 else
+                    {
+                    StartL( timetowait );
+                    } 
+                }
+            }
+            break;
+        /*
+        case EFirstTimeMode2:
+            {
+            FLOG("[bgchecker] runl EFirstTimeMode2");
+            LaunchNotificationL( 1 );
+            //LaunchSoftNotificationL(R_IAUPDATE_REMIND_LATER, R_TEXT_SOFTKEY_YES, R_TEXT_SOFTKEY_NO );
+            }
+            break;
+        */
+        case EFirstTimeMode2:
+            {
+            FLOG("[bgchecker] runl EFirstTimeMode3");                 
+            //disclaimer is not accepted  
+           
+            if ( !IsAgreementAcceptedL()  )
+                {
+                FLOG("[bgchecker] runl EFirstTimeMode reject disclaimer");
+                //user accepte the new feature dialog but user reject sthe disclaimer
+                //in sleep mode now
+                iMode = ESleepMode;
+                SetModeL( iMode );
+                //subscribe to cenrep key for automatic checking for wake up from sleep mode
+                ListenAutoUpdateSettingsL(); 
+                }
+            else
+                {
+                FLOG("[bgchecker] runl EFirstTimeMode go to normal mode");
+                //Set to Normal mode
+                //check autochecksetting in Runl later
+                iMode = ENormalMode;
+                SetModeL( iMode );
+                StartL( StartNow );
+                }
+            }
+            break;
+            
+        default:
+            break;
+        };
+       
+    }
+
+/*
+// ----------------------------------------------------------
+// CIAUpdateBGTimer::RunL()
+// ----------------------------------------------------------
+void CIAUpdateBGTimer::RunL()
+    {
+    FLOG("[bgchecker]RunL() ");
+    if ( !IAUpdateEnabledL() )
+        {
+        Shutdown();
+        return;
+        }
+    User::LeaveIfError( iStatus.Int() );
+    //Check the mode again, in case the mode is changed while waiting.
+    iMode = ModeL();
+    
+    switch ( iMode )
+        {
+        case ENormalMode:
+        case ERetryMode:
+            {     
+            FLOG("[bgchecker]RunL() ENormalMode");                                    
+            //roaming case is checked in IAUpdate server side
+            if ( IsAutoUpdateDisabledL() )
+                {
+                ListenAutoUpdateSettingsL();
+                
+                iMode = ESleepMode;
+                SetModeL( iMode );
+                
+                //the program is waked up when automatic checking is changed by user.
+                //cenrep call back will be used.
+                return;
+                }                        
+            
+            FLOG("[bgchecker]RunL() ENormalMode 1");
+            
+            if(iRuns == 0)
+                {
+                FLOG("[bgchecker]RunL() ENormalMode 2");
+                // if user did the refresh from server while waiting, restart the timer.
+                // the last refresh time is read from the private file of IAUpdate server.
+                TTimeIntervalMinutes timetowait =
+                        TimeIntervalFromNextRefreshL();
+
+                if (timetowait.Int() <= 0 )
+                    {
+                    DoUpdatesCheckingL( ETrue );
+                    }
+                else
+                    {
+                    StartL( timetowait );
+                    }
+                FLOG("[bgchecker]RunL() ENormalMode 3");
+                }
+            else
+                {
+                FLOG("[bgchecker]RunL() ENormalMode 4");
+                TTimeIntervalMinutes timetowait = TimeIntervalFromNextRefreshL();
+                   
+                   if ( timetowait.Int() <= 0 )
+                       {
+                       StartL( StartNow );
+                       }
+                   else
+                       {
+                       StartL( timetowait );
+                       }
+                   FLOG("[bgchecker]RunL() ENormalMode 5");
+                 }        
+            }
+            break;
+            
+        case EFirstTimeMode:
         case EFirstTimeRemindMode:
             {
             FLOG("[bgchecker] runl EFirstTimeMode");
@@ -922,7 +1109,8 @@
         case EFirstTimeMode2:
             {
             FLOG("[bgchecker] runl EFirstTimeMode2");
-            LaunchSoftNotificationL(R_IAUPDATE_REMIND_LATER, R_TEXT_SOFTKEY_YES, R_TEXT_SOFTKEY_NO );
+            LaunchNotificationL( 1 );
+            //LaunchSoftNotificationL(R_IAUPDATE_REMIND_LATER, R_TEXT_SOFTKEY_YES, R_TEXT_SOFTKEY_NO );
             }
             break;
 
@@ -957,8 +1145,7 @@
             break;
         };
        
-    }
-
+    }*/
 
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::HandlerFirstTimeL()
@@ -984,8 +1171,9 @@
         {
         //this is first time mode
         FLOG("[bgchecker]HandlerFirstTimeL 3 ");
-        LaunchSoftNotificationL( R_IAUPDATE_FEATURES_AVAILABLE,
-                    R_TEXT_SOFTKEY_OK, R_TEXT_SOFTKEY_CANCEL );
+        LaunchNotificationL( 0 );
+        // LaunchSoftNotificationL( R_IAUPDATE_FEATURES_AVAILABLE,
+        //            R_TEXT_SOFTKEY_OK, R_TEXT_SOFTKEY_CANCEL );
         }
     }
 
@@ -1252,11 +1440,12 @@
         FLOG(" current mode is FirstTimeMode ");
         interval = FirstTimeDialogDelayInMinutesL();
         }
+    /*
     else if ( ModeL() == EFirstTimeRemindMode )
         {
         FLOG(" current mode is FirstTimeRemindMode");
         interval = FirstTimeDialogReminderIntervalInMinutesL();
-        }
+        }*/
     else
         {
         //nothing
@@ -1290,6 +1479,137 @@
       switch ( iMode )
           {
           case EFirstTimeMode:
+          // case EFirstTimeRemindMode:     
+                 {
+                 
+                 FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode");
+                 if ( !aIsAccepted )
+                     {
+                     FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode, not accepted");
+                     //in sleep mode now
+                     iMode = ESleepMode;
+                     SetModeL( iMode );
+                     
+                     //subscribe to cenrep key for automatic checking for wake up from sleep mode
+                     ListenAutoUpdateSettingsL();
+                     
+                     /*
+                     FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode not accepted");
+                     iMode = EFirstTimeMode2;
+                     SetModeL( iMode );
+                     StartL( StartNow );
+                     */
+                     }
+                 else
+                     {
+                     FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMod accepeted");
+                     StartIaupdateL();
+                     //iaupdate is launched
+                     //check the disclaimer acceptance and automatic checking setting in 10mins
+
+                     StartL( KDelayForUserToAcceptDisclaimer );
+                     iMode = EFirstTimeMode2;     
+                     SetModeL( iMode );
+
+                     
+                     //Still in first time mode, 
+                     //check user's setting and disclamier after 10mins.
+                     }
+                 break;
+                 }
+                 
+                 
+          /*       
+          case EFirstTimeMode2:  // reminder 
+              {
+              FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode2 ");
+              if ( aIsAccepted ) // reminder accepted ?
+                  {
+                  FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode2, accepted");
+                  //user wants to be reminder so remind in 4 weeks
+                  //set to first time remind mode
+                  iMode = EFirstTimeRemindMode;
+                  SetModeL( iMode );
+                  TTimeIntervalMinutes fourweeks( FirstTimeDialogReminderIntervalInMinutesL() );            
+                  TTime currenttime;
+                  currenttime.UniversalTime();
+                        
+                  //save the next show new feature dialog time
+                  //in case use switch off the device and restarted.      
+                  User::LeaveIfError( SetLastTimeShowNewFeatureDialogL( currenttime ) );
+                        
+                  StartL( fourweeks );
+                  return;
+                  }
+              else
+                  {
+                  FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode2, not accepted");
+                  //in sleep mode now
+                  iMode = ESleepMode;
+                  SetModeL( iMode );
+                  
+                  //subscribe to cenrep key for automatic checking for wake up from sleep mode
+                  ListenAutoUpdateSettingsL(); 
+                  }
+              break;
+              }
+          */    
+          case ENormalMode:
+              {
+              FLOG("[bgchecker] SoftNotificationCallBack ENormalMode");
+              if ( !aIsAccepted )
+                  {
+                  FLOG("[bgchecker] SoftNotificationCallBack ENormalMode not accpeted");
+                  //user wants to be reminded later
+                  TTimeIntervalMinutes oneweek( UpdateAvailableReminderIntervalInMinutesL() );   
+                  TTime currenttime;
+                  currenttime.UniversalTime();
+                  TTime nextRemindTime = currenttime + oneweek;
+
+                  SetReminderL( ETrue );
+                  SetNextRemindTimeL( nextRemindTime );
+                  
+                  iReminderTimer->StartReminderTimerL( oneweek );
+                  
+                  //the reminder call back function will be called when reminder timer expires.
+                  }
+              else
+                  {
+                  //accepted, launch iad
+                  StartIaupdateL();
+                  }
+              break;
+              }
+
+          case ESleepMode:
+              {
+              FLOG("[bgchecker] SoftNotificationCallBack ESleepMode");
+              //donothing
+              break;
+              }
+
+          default:
+              break;
+          }
+    }
+
+/*
+// ----------------------------------------------------------
+// CIAUpdateBGTimer::DoSoftNotificationCallBackL()
+// ----------------------------------------------------------
+void CIAUpdateBGTimer::DoSoftNotificationCallBackL( TBool aIsAccepted )
+    {
+    FLOG("[bgchecker] SoftNotificationCallBack");
+    if ( !IAUpdateEnabledL() )
+        {
+        Shutdown();
+        return;
+        }
+    iMode = ModeL(); 
+    
+      switch ( iMode )
+          {
+          case EFirstTimeMode:
           case EFirstTimeRemindMode:     
                  {
                  
@@ -1321,10 +1641,10 @@
                  
                  
                  
-          case EFirstTimeMode2:
+          case EFirstTimeMode2:  // reminder 
               {
               FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode2 ");
-              if ( aIsAccepted )
+              if ( aIsAccepted ) // reminder accepted ?
                   {
                   FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode2, accepted");
                   //user wants to be reminder so remind in 4 weeks
@@ -1392,7 +1712,7 @@
           default:
               break;
           }
-    }
+    } */
 
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::SoftNotificationCallBack()
@@ -1412,6 +1732,7 @@
     }
 
 
+
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::DoReminderTimerCallBack()
 // ----------------------------------------------------------
@@ -1461,10 +1782,76 @@
     {
     TRAP_IGNORE( DoReminderTimerCallBackL() );
     }
-
+   
+// ----------------------------------------------------------
+// CIAUpdateBGTimer::LaunchNotificationL( const int aNrOfUpdates )
+// ----------------------------------------------------------
+void CIAUpdateBGTimer::LaunchNotificationL( const int aNrOfUpdates )
+    {
+    
+    _LIT( KIcon, "C:\\qgn_note_swupdate_notification.svg" );
+    _LIT( KFirstTimeText, "Check for updates ?" );
+    _LIT( KNormalText, "Updates available" );
+    _LIT( KSecondText, "Tap to view" );
+    
+    FLOG("[bgchecker] LaunchNotificationL ");
+        
+    iMode = ModeL();
+    
+    //text for 1st line
+     if ( iMode == ENormalMode )
+         {
+         
+         }
+    
+    //TBuf<256> iconPath;
+    TBuf<128> titleText;
+    TBuf<128> secondText;
+    
+    //title text (normal/first time)
+    if ( iMode == ENormalMode )
+        {
+        titleText.Append(KNormalText);
+        }
+    else
+        {
+        titleText.Append(KFirstTimeText);
+        }
+    
+    //text for 2nd line
+    secondText.Append(KSecondText);
+            
+    // icon
+    if ( iMode == ENormalMode )
+        {
+        TFileName path;
+        TInt err = GetPrivatePathL( path ); 
+        
+        if ( err == KErrNone )
+            {
+            iSoftNotification->SetImagePathL( path );
+            //HBufC8* image = LoadFileLC( path );   
+            //iSoftNotification->SetImageL( *image );
+            //CleanupStack::PopAndDestroy( image );
+            }
+        }
+  
+    // Set texts
+    iSoftNotification->SetTextL( titleText, secondText );
+    
+    // Set number of updates
+    iSoftNotification->SetNrOfUpdates( aNrOfUpdates );
+   
+    iSoftNotification->ShowNotificationL();
+    FLOG("[bgchecker] LaunchSoftNotificationL 1");
+    // CleanupStack::PopAndDestroy( 3 ); //text, sk1, sk2
+    
+    return;
+    }
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::LaunchSoftNotificationL()
 // ----------------------------------------------------------
+/*
 void CIAUpdateBGTimer::LaunchSoftNotificationL( const TInt& aResourceId, const TInt& SK1, const TInt& SK2 )
     {     
     iInternalFile->ReadControllerDataL(); 
@@ -1492,19 +1879,19 @@
             {
             HBufC8* image = LoadFileLC( path );   
             iSoftNotification->SetImageL( *image );
+            //iSoftNotification->SetImagePathL( *image );
             CleanupStack::PopAndDestroy( image );
             }
         }
   
     
     iSoftNotification->SetTextL( *text, *text );
-    iSoftNotification->SetSoftkeyLabelsL( *sk1, *sk2 );
    
     iSoftNotification->ShowSoftNotificationL();
     FLOG("[bgchecker] LaunchSoftNotificationL 1");
     CleanupStack::PopAndDestroy( 3 ); //text, sk1, sk2
     }
-
+*/
 
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::GetPrivatePathL()
@@ -1646,6 +2033,7 @@
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::ReadResourceLC()
 // ----------------------------------------------------------
+ /* HLa
 HBufC* CIAUpdateBGTimer::ReadResourceLC( TInt aResourceId )
     {
     TResourceReader reader;
@@ -1655,7 +2043,7 @@
     CleanupStack::PopAndDestroy( buff );
     CleanupStack::PushL( text );
     return text;
-    }
+    } */
 
 
 // ----------------------------------------------------------
@@ -1797,7 +2185,7 @@
     
     if ( iSoftNotification )
         {
-        TRAP_IGNORE( iSoftNotification->RemoveSoftNotificationL( iSoftNotification->Id() ) );    
+        // TRAP_IGNORE( iSoftNotification->RemoveSoftNotificationL( iSoftNotification->Id() ) );    
         delete iSoftNotification;
         iSoftNotification = NULL;
         }
--- a/iaupdate/IAD/backgroundchecker/src/iaupdatebgremindertimer.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/src/iaupdatebgremindertimer.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -17,14 +17,8 @@
 
 
 #include    <e32std.h>
-#include    <AknSoftNotifier.h>
-#include    <AknNotifyStd.h>
-#include    <AknSoftNotificationParameters.h>
-#include    <avkon.rsg>
-#include    <iaupdate.rsg>
 #include    <centralrepository.h>
 #include    "iaupdatebgremindertimer.h"
-#include    "iaupdate.hrh"
 #include    "iaupdateprivatecrkeys.h"
 #include    "iaupdatebgconst.h"
 
--- a/iaupdate/IAD/backgroundchecker/src/iaupdatebgsoftnotification.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/src/iaupdatebgsoftnotification.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -18,26 +18,74 @@
 
 
 // INCLUDE FILES
-#include <AknDynamicSoftNotifier.h>
-#include <AknDynamicSoftNotificationParams.h>
+#include <hbindicatorsymbian.h>
+#include <hbsymbianvariant.h>
 
 #include "iaupdatebgsoftnotification.h"
 #include "iaupdatebginternalfilehandler.h"
 #include "iaupdatebgconst.h"
 #include "iaupdatebglogger.h"
 
+// Indicator type
+_LIT(KIndicatorTypeBgc, "com.nokia.iaupdate.indicatorplugin/1.0");
 
 // ============================ MEMBER FUNCTIONS ===============================
+void CIAUpdateBGSoftNotification::NotificationDialogActivated(
+        const CHbDeviceNotificationDialogSymbian* /* aDialog */)
+    {
+    
+    FLOG("[bgchecker] softnotification callback function ACCEPTED");
+    
+    // indicator shall not be shown 
+    SetIndicatorEnabled( EFalse );
+    
+    // Remove (possibly) existing indicator
+    RemoveIndicatorL();
+    
+    iCallback->SoftNotificationCallBack( ETrue );
+    
+    // remove dialog
+    //delete iNotificationDialog;
+    //iNotificationDialog = 0;
+    
+    return;
+    }
+
+void CIAUpdateBGSoftNotification::NotificationDialogClosed
+         ( const CHbDeviceNotificationDialogSymbian* /* aDialog */, 
+           TInt /* aCompletionCode*/ )
+    {
+    
+    
+    FLOG("[bgchecker] softnotification callback function Closed");
+
+    // Set indicator, if needed
+    if (IsIndicatorEnabled())
+        {
+        ShowIndicatorL();
+        }
+    
+    
+    iCallback->SoftNotificationCallBack( EFalse );
+    
+    // remove dialog
+    //delete iNotificationDialog;
+    //iNotificationDialog = 0;
+    
+    return;
+    }
+
+
 // -----------------------------------------------------------------------------
 // CIAUpdateBGSoftNotification::NewLC
 // Static constructor
 // -----------------------------------------------------------------------------
 //
-CIAUpdateBGSoftNotification* CIAUpdateBGSoftNotification::NewL( MIAUpdateBGSoftNotificationCallBack* aCallback, 
-                                                                CIAUpdateBGInternalFileHandler* aInternalFile )
+CIAUpdateBGSoftNotification* CIAUpdateBGSoftNotification::NewL( 
+        MIAUpdateBGSoftNotificationCallBack* aCallback ) 
     {   
     CIAUpdateBGSoftNotification* self =
-        new ( ELeave ) CIAUpdateBGSoftNotification( aCallback, aInternalFile );
+        new ( ELeave ) CIAUpdateBGSoftNotification( aCallback );
     CleanupStack::PushL( self );
     
     self->ConstructL();
@@ -52,83 +100,99 @@
 //
 CIAUpdateBGSoftNotification::~CIAUpdateBGSoftNotification()
     {
-    delete iSoftkey1;
-    delete iSoftkey2;
 
-    delete iLabel;
-    delete iGroupLabel;
+    delete iTitle;
+    delete iText;
 
-    delete iImageData;
+    delete iImagePath;
+    
+    delete iNotificationDialog;
 
-    delete iNotifier;
     }
-
+   
 // -----------------------------------------------------------------------------
-// CIAUpdateBGSoftNotification::NotificationAccepted
-// Dynamic soft notification was accepted by user.
+// CIAUpdateBGSoftNotification::ShowSoftNotificationL
+// Displays notification
 // -----------------------------------------------------------------------------
 //
-void CIAUpdateBGSoftNotification::NotificationAccepted( TInt /*aIdentifier*/ )
+void CIAUpdateBGSoftNotification::ShowNotificationL()
     {
-    FLOG("[bgchecker] softnotification callback function ACCEPTED");
-    //remove the soft notifiation id
-    iInternalFile->SetSoftNotificationID( 0 );
-    TRAP_IGNORE( iInternalFile->WriteControllerDataL() );
+    _LIT( KIcon, "C:\\qgn_note_swupdate_notification.svg" );
+    _LIT( KFirstTimeText, "Check for updates ?" );
+    _LIT( KNormalText, "Check for updates ?" );
+    _LIT( KTextRow2, "Tap to view" );
+    
+    FLOG("[bgchecker] ShowNotificationL");
+    
+    // crete dialog, id does not exist already
+    if (!iNotificationDialog)
+        {
+        iNotificationDialog = CHbDeviceNotificationDialogSymbian::NewL( this );
+        }
     
-    iCallback->SoftNotificationCallBack( ETrue );
+    //CleanupStack::PushL( notificationDialog ); // --> memberiin - delete closessa/activaatiossa/destructorissa
+                                                           //    + leave kiinni + tuhoaminen
+    // save number of updates
+    //SetNrOfUpdates ( aNrOfUpdates );
+    
+    // enable indicator showing
+    SetIndicatorEnabled( ETrue );
+
+    // fill texts, icon & behaviour parameters
+    FillNotificationParams();
+    
+    iNotificationDialog->ShowL();
+    
+    return;
+    
     }
 
 // -----------------------------------------------------------------------------
-// CIAUpdateBGSoftNotification::NotificationCanceled
-// Dynamic soft notification was canceled by user.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateBGSoftNotification::NotificationCanceled( TInt /*aIdentifier*/ )
-    {
-    FLOG("[bgchecker] softnotification callback function Canceled");
-    //remove the soft notifiation id
-    iInternalFile->SetSoftNotificationID( 0 );
-    TRAP_IGNORE( iInternalFile->WriteControllerDataL() );
-          
-    iCallback->SoftNotificationCallBack( EFalse );
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateBGSoftNotification::ShowSoftNotificationL
-// Displays a soft notification
+// CIAUpdateBGSoftNotification::ShowIndicatorL
+// Displays indicator
 // -----------------------------------------------------------------------------
 //
-void CIAUpdateBGSoftNotification::ShowSoftNotificationL()
+void CIAUpdateBGSoftNotification::ShowIndicatorL()
     {
-    TAknDynamicSoftNotificationParams param( KSoftNotificationPriority );
-    FillNotificationParams( param );
+    
+    FLOG("[bgchecker] ShowIndicatorL");
     
-    TInt oldId = iNotificationId;
-    iNotificationId =
-        iNotifier->SetDynamicNotificationCountL( param, iNotificationId, 1 );
-
-    if( oldId != iNotificationId )
-        {           
-        FLOG("[bgchecker] softnotification save notification Id");
-        iInternalFile->SetSoftNotificationID( iNotificationId );
-        TRAP_IGNORE( iInternalFile->WriteControllerDataL() );
-        
-        iNotifier->StopObserving( oldId );
-        iNotifier->StartObservingL( iNotificationId, this );
-        }
+    CHbIndicatorSymbian *ind = CHbIndicatorSymbian::NewL();
+    CleanupStack::PushL( ind );
+            
+    TInt value = GetNrOfUpdates();
+            
+    // Set indicator
+    CHbSymbianVariant* varValue = CHbSymbianVariant::NewL( &value,
+        CHbSymbianVariant::EInt );
+    CleanupStack::PushL( varValue );
+    // Temporary removal 
+    // ind->Activate( KIndicatorTypeBgc, varValue );
+    CleanupStack::PopAndDestroy( varValue );
+    CleanupStack::PopAndDestroy( ind );
+    
+    return;
+    
     }
 
 // -----------------------------------------------------------------------------
-// CIAUpdateBGSoftNotification::RemoveSoftNotificationL
-// Cancels and removes the soft notification
+// CIAUpdateBGSoftNotification::Remove indicator
+// Removes indicator
 // -----------------------------------------------------------------------------
 //
-void CIAUpdateBGSoftNotification::RemoveSoftNotificationL( TInt aNotifierId )
+void CIAUpdateBGSoftNotification::RemoveIndicatorL()
     {
-    if ( aNotifierId != 0 )
-        {
-        iNotifier->CancelDynamicNotificationL( aNotifierId );
-        }
+    
+    FLOG("[bgchecker] RemoveIndicatorL");
+    
+    CHbIndicatorSymbian *ind = CHbIndicatorSymbian::NewL();
+    CleanupStack::PushL( ind );
+    // Temporary removal 
+    // ind->Deactivate( KIndicatorTypeBgc ); 
+    CleanupStack::PopAndDestroy(ind);
+    
+    return;
+    
     }
 
 // -----------------------------------------------------------------------------
@@ -136,58 +200,42 @@
 // Sets a text for a soft notification
 // -----------------------------------------------------------------------------
 //
-void CIAUpdateBGSoftNotification::SetTextL( const TDesC& aText, const TDesC& aGroupText )
+void CIAUpdateBGSoftNotification::SetTextL( 
+        const TDesC& aTitle, const TDesC& aText )
     {
-    HBufC* txt = aText.AllocL();
-    delete iLabel;
-    iLabel = txt;
+    HBufC* txt = aTitle.AllocL();
+    delete iTitle;
+    iTitle = txt;
 
-    txt = aGroupText.AllocL();
-    delete iGroupLabel;
-    iGroupLabel = txt;
+    txt = aText.AllocL();
+    delete iText;
+    iText = txt;
     }
 
 // -----------------------------------------------------------------------------
-// CIAUpdateBGSoftNotification::SetSoftkeyLabelsL
-// Sets new labels for softkeys
+// CIAUpdateBGSoftNotification::SetImagePathL
+// Sets an image path for a soft notification
 // -----------------------------------------------------------------------------
 //
-void CIAUpdateBGSoftNotification::SetSoftkeyLabelsL(
-    const TDesC& aSoftkey1Label,
-    const TDesC& aSoftkey2Label )
+void CIAUpdateBGSoftNotification::SetImagePathL( const TDesC& aImage )
     {
-    HBufC* txt = aSoftkey1Label.AllocL();
-    delete iSoftkey1;
-    iSoftkey1 = txt;
-
-    txt = aSoftkey2Label.AllocL();
-    delete iSoftkey2;
-    iSoftkey2 = txt;
+    HBufC* txt = aImage.AllocL();
+    delete iImagePath;
+    iImagePath = txt;
+    return;
     }
 
 // -----------------------------------------------------------------------------
-// CIAUpdateBGSoftNotification::SetImageL
-// Sets an image for a soft notification
+// CIAUpdateBGSoftNotification::SetNrOfUpdates
+// Sets an image path for a soft notification
 // -----------------------------------------------------------------------------
 //
-void CIAUpdateBGSoftNotification::SetImageL(
-    const TDesC8& aImage )
+void CIAUpdateBGSoftNotification::SetNrOfUpdates( const TInt& aNrOfUpdates)
     {
-    HBufC8* image = aImage.AllocL();
-    delete iImageData;
-    iImageData = image;
+    // save number of updates
+    iNrOfUpdates = aNrOfUpdates;
+    return;
     }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateBGSoftNotification::Id
-// Notification Id
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateBGSoftNotification::Id()
-    {
-    return iNotificationId;
-    }
-
 // -----------------------------------------------------------------------------
 // CIAUpdateBGSoftNotification::ConstructL
 // Symbian 2nd phase constructor can leave.
@@ -196,11 +244,6 @@
 void CIAUpdateBGSoftNotification::ConstructL()
     {
     FLOG("[bgchecker] softnotification ConstructL");
-    iNotifier = CAknDynamicSoftNotifier::NewL();
-    
-    iInternalFile->ReadControllerDataL();
-    iNotificationId = iInternalFile->SoftNotificationID();
-      
     }
 
 // -----------------------------------------------------------------------------
@@ -209,54 +252,81 @@
 // might leave.
 // -----------------------------------------------------------------------------
 //
-CIAUpdateBGSoftNotification::CIAUpdateBGSoftNotification( MIAUpdateBGSoftNotificationCallBack* aCallback, 
-                                                          CIAUpdateBGInternalFileHandler* aInternalFile ) 
-    : iCallback ( aCallback ), iInternalFile ( aInternalFile )
+CIAUpdateBGSoftNotification::CIAUpdateBGSoftNotification( 
+        MIAUpdateBGSoftNotificationCallBack* aCallback )
+    : iCallback ( aCallback )
     {
     }
 
 // -----------------------------------------------------------------------------
-// CIAUpdateBGSoftNotification::StartObservingIfNeededL
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateBGSoftNotification::StartObservingIfNeededL()
-    {
-    if ( iNotificationId )
-        {
-        FLOG("[bgchecker] softnotification There is a buffered softnotification");
-        //a buffering soft notification
-        iNotifier->StartObservingL( iNotificationId, this );
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // CIAUpdateBGSoftNotification::FillNotificationParams
 // -----------------------------------------------------------------------------
 //
-void CIAUpdateBGSoftNotification::FillNotificationParams(
-    TAknDynamicSoftNotificationParams& aParam )
+
+void CIAUpdateBGSoftNotification::FillNotificationParams()
     {
-    if( iSoftkey1 && iSoftkey2 )
-        {
-        aParam.SetSoftkeys( *iSoftkey1, *iSoftkey2 );
-        }
-
-    if( iLabel )
+    
+    // set title, text and icon
+    if ( iTitle )
         {
-        aParam.SetNoteLabels( *iLabel, *iLabel );
+        iNotificationDialog->SetTitleL(iTitle->Des());
         }
-
-    if( iGroupLabel )
+    
+    if ( iText )
         {
-        //aParam.SetGroupLabels( *iGroupLabel, *iGroupLabel );
+        iNotificationDialog->SetTextL(iText->Des());
         }
-
-    if( iImageData )
+    
+    if ( iImagePath )
         {
-        aParam.SetImageData( *iImageData );
+        iNotificationDialog->SetIconNameL(iImagePath->Des());
         }
     
-    aParam.EnableObserver();
+    // set wrapping, timeout and touch 
+    iNotificationDialog->SetTitleTextWrappingL(
+            CHbDeviceNotificationDialogSymbian::TextWordWrap);
+    iNotificationDialog->SetTimeoutL(4000); //default 3000
+    iNotificationDialog->EnableTouchActivationL(ETrue); // default FALSE
+  
+    }  
+// ----------------------------------------------------------
+// CIAUpdateBGSoftNotification::EnableIndicator(TBool aEnabled)
+// ----------------------------------------------------------
+void CIAUpdateBGSoftNotification::SetIndicatorEnabled( TBool aEnabled )
+    {
+    
+    iActivateIndicator = aEnabled;
+    
+    }
+
+// ----------------------------------------------------------
+// CIAUpdateBGSoftNotification::IndicatorEnabled()
+// ----------------------------------------------------------
+TBool CIAUpdateBGSoftNotification::IsIndicatorEnabled()
+    {
+    
+    return iActivateIndicator;
+    
+    }
+// ----------------------------------------------------------
+// CIAUpdateBGSoftNotification::SetNrOfUpdates( TIAUpdateBGMode aNrOfUpdates )
+// ----------------------------------------------------------
+/*
+void CIAUpdateBGSoftNotification::SetNrOfUpdates( const int aNrOfUpdates )
+    {
+    
+    iNrOfUpdates = aNrOfUpdates;
+    
+    }*/
+
+// ----------------------------------------------------------
+// CIAUpdateBGSoftNotification::GetNrOfUpdates()
+// ----------------------------------------------------------
+int CIAUpdateBGSoftNotification::GetNrOfUpdates()
+    {
+    
+    return iNrOfUpdates;
+    
     }
 
 //  End of File
--- a/iaupdate/IAD/bgcindicatorplugin/bgcindicatorplugin.pro	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/bgcindicatorplugin/bgcindicatorplugin.pro	Mon May 03 12:38:03 2010 +0300
@@ -45,4 +45,8 @@
   "$${LITERAL_HASH}include <platform_paths.hrh>" \
   "rom/bgcindicatorplugin.iby             CORE_APP_LAYER_IBY_EXPORT_PATH(bgcindicatorplugin.iby)" 
   
- LIBS += -lxqservice
+LIBS += -lxqservice
+LIBS += -lws32
+LIBS += -lapparc
+LIBS += -lapgrfx
+
--- a/iaupdate/IAD/bgcindicatorplugin/moc_bgcindicatorplugin.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/****************************************************************************
-** Meta object code from reading C++ file 'bgcindicatorplugin.h'
-**
-** Created: Tue 9. Mar 13:36:17 2010
-**      by: The Qt Meta Object Compiler version 62 (Qt 4.6.2)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#include "inc/bgcindicatorplugin.h"
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'bgcindicatorplugin.h' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 62
-#error "This file was generated using the moc from 4.6.2. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-QT_BEGIN_MOC_NAMESPACE
-static const uint qt_meta_data_BgcIndicatorPlugin[] = {
-
- // content:
-       4,       // revision
-       0,       // classname
-       0,    0, // classinfo
-       0,    0, // methods
-       0,    0, // properties
-       0,    0, // enums/sets
-       0,    0, // constructors
-       0,       // flags
-       0,       // signalCount
-
-       0        // eod
-};
-
-static const char qt_meta_stringdata_BgcIndicatorPlugin[] = {
-    "BgcIndicatorPlugin\0"
-};
-
-const QMetaObject BgcIndicatorPlugin::staticMetaObject = {
-    { &QObject::staticMetaObject, qt_meta_stringdata_BgcIndicatorPlugin,
-      qt_meta_data_BgcIndicatorPlugin, 0 }
-};
-
-#ifdef Q_NO_DATA_RELOCATION
-const QMetaObject &BgcIndicatorPlugin::getStaticMetaObject() { return staticMetaObject; }
-#endif //Q_NO_DATA_RELOCATION
-
-const QMetaObject *BgcIndicatorPlugin::metaObject() const
-{
-    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
-}
-
-void *BgcIndicatorPlugin::qt_metacast(const char *_clname)
-{
-    if (!_clname) return 0;
-    if (!strcmp(_clname, qt_meta_stringdata_BgcIndicatorPlugin))
-        return static_cast<void*>(const_cast< BgcIndicatorPlugin*>(this));
-    if (!strcmp(_clname, "HbIndicatorPluginInterface"))
-        return static_cast< HbIndicatorPluginInterface*>(const_cast< BgcIndicatorPlugin*>(this));
-    if (!strcmp(_clname, "com.nokia.hb.HbIndicatorPluginInterface/1.0"))
-        return static_cast< HbIndicatorPluginInterface*>(const_cast< BgcIndicatorPlugin*>(this));
-    return QObject::qt_metacast(_clname);
-}
-
-int BgcIndicatorPlugin::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
-{
-    _id = QObject::qt_metacall(_c, _id, _a);
-    if (_id < 0)
-        return _id;
-    return _id;
-}
-QT_END_MOC_NAMESPACE
--- a/iaupdate/IAD/bgcindicatorplugin/qmakepluginstubs/bgcindicatorplugin.qtplugin	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-This file is a Qt plugin stub file. The real Qt plugin is located in /sys/bin. Created:2010-03-09T13:36:13
--- a/iaupdate/IAD/bgcindicatorplugin/src/bgcindicator.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/bgcindicatorplugin/src/bgcindicator.cpp	Mon May 03 12:38:03 2010 +0300
@@ -76,7 +76,7 @@
     case TextRole: 
         {
         QString text("");
-        if ( mNrOfUpdates == 1 )
+        if ( mNrOfUpdates > 0 )
             text.append(QString("Updates available"));
         else
             text.append(QString("Check for updates?"));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/bwins/iaupdateapiu.def	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,37 @@
+EXPORTS
+	??1CIAUpdate@@UAE@XZ @ 1 NONAME ; CIAUpdate::~CIAUpdate(void)
+	??1CIAUpdateParameters@@UAE@XZ @ 2 NONAME ; CIAUpdateParameters::~CIAUpdateParameters(void)
+	??1CIAUpdateResult@@UAE@XZ @ 3 NONAME ; CIAUpdateResult::~CIAUpdateResult(void)
+	?CancelCount@CIAUpdateResult@@QBEHXZ @ 4 NONAME ; int CIAUpdateResult::CancelCount(void) const
+	?CheckUpdates@CIAUpdate@@QAEXABVCIAUpdateParameters@@@Z @ 5 NONAME ; void CIAUpdate::CheckUpdates(class CIAUpdateParameters const &)
+	?CommandLineArguments@CIAUpdateParameters@@QBEABVTDesC8@@XZ @ 6 NONAME ; class TDesC8 const & CIAUpdateParameters::CommandLineArguments(void) const
+	?CommandLineExecutable@CIAUpdateParameters@@QBEABVTDesC16@@XZ @ 7 NONAME ; class TDesC16 const & CIAUpdateParameters::CommandLineExecutable(void) const
+	?FailCount@CIAUpdateResult@@QBEHXZ @ 8 NONAME ; int CIAUpdateResult::FailCount(void) const
+	?NewL@CIAUpdate@@SAPAV1@AAVMIAUpdateObserver@@@Z @ 9 NONAME ; class CIAUpdate * CIAUpdate::NewL(class MIAUpdateObserver &)
+	?NewL@CIAUpdateParameters@@SAPAV1@XZ @ 10 NONAME ; class CIAUpdateParameters * CIAUpdateParameters::NewL(void)
+	?NewL@CIAUpdateResult@@SAPAV1@XZ @ 11 NONAME ; class CIAUpdateResult * CIAUpdateResult::NewL(void)
+	?NewLC@CIAUpdate@@SAPAV1@AAVMIAUpdateObserver@@@Z @ 12 NONAME ; class CIAUpdate * CIAUpdate::NewLC(class MIAUpdateObserver &)
+	?NewLC@CIAUpdateParameters@@SAPAV1@XZ @ 13 NONAME ; class CIAUpdateParameters * CIAUpdateParameters::NewLC(void)
+	?NewLC@CIAUpdateResult@@SAPAV1@XZ @ 14 NONAME ; class CIAUpdateResult * CIAUpdateResult::NewLC(void)
+	?SearchCriteria@CIAUpdateParameters@@QBEABVTDesC16@@XZ @ 15 NONAME ; class TDesC16 const & CIAUpdateParameters::SearchCriteria(void) const
+	?SetCancelCount@CIAUpdateResult@@QAEXH@Z @ 16 NONAME ; void CIAUpdateResult::SetCancelCount(int)
+	?SetCommandLineArgumentsL@CIAUpdateParameters@@QAEXABVTDesC8@@@Z @ 17 NONAME ; void CIAUpdateParameters::SetCommandLineArgumentsL(class TDesC8 const &)
+	?SetCommandLineExecutableL@CIAUpdateParameters@@QAEXABVTDesC16@@@Z @ 18 NONAME ; void CIAUpdateParameters::SetCommandLineExecutableL(class TDesC16 const &)
+	?SetFailCount@CIAUpdateResult@@QAEXH@Z @ 19 NONAME ; void CIAUpdateResult::SetFailCount(int)
+	?SetSearchCriteriaL@CIAUpdateParameters@@QAEXABVTDesC16@@@Z @ 20 NONAME ; void CIAUpdateParameters::SetSearchCriteriaL(class TDesC16 const &)
+	?SetSuccessCount@CIAUpdateResult@@QAEXH@Z @ 21 NONAME ; void CIAUpdateResult::SetSuccessCount(int)
+	?SetUid@CIAUpdateParameters@@QAEXABVTUid@@@Z @ 22 NONAME ; void CIAUpdateParameters::SetUid(class TUid const &)
+	?ShowUpdates@CIAUpdate@@QAEXABVCIAUpdateParameters@@@Z @ 23 NONAME ; void CIAUpdate::ShowUpdates(class CIAUpdateParameters const &)
+	?SuccessCount@CIAUpdateResult@@QBEHXZ @ 24 NONAME ; int CIAUpdateResult::SuccessCount(void) const
+	?Uid@CIAUpdateParameters@@QBEABVTUid@@XZ @ 25 NONAME ; class TUid const & CIAUpdateParameters::Uid(void) const
+	?Update@CIAUpdate@@QAEXABVCIAUpdateParameters@@@Z @ 26 NONAME ; void CIAUpdate::Update(class CIAUpdateParameters const &)
+	?UpdateQuery@CIAUpdate@@QAEXXZ @ 27 NONAME ; void CIAUpdate::UpdateQuery(void)
+	?SetShowProgress@CIAUpdateParameters@@QAEXH@Z @ 28 NONAME ; void CIAUpdateParameters::SetShowProgress(int)
+	?ShowProgress@CIAUpdateParameters@@QBEHXZ @ 29 NONAME ; int CIAUpdateParameters::ShowProgress(void) const
+	?Importance@CIAUpdateParameters@@QBEIXZ @ 30 NONAME ; unsigned int CIAUpdateParameters::Importance(void) const
+	?Refresh@CIAUpdateParameters@@QBEHXZ @ 31 NONAME ; int CIAUpdateParameters::Refresh(void) const
+	?SetImportance@CIAUpdateParameters@@QAEXI@Z @ 32 NONAME ; void CIAUpdateParameters::SetImportance(unsigned int)
+	?SetRefresh@CIAUpdateParameters@@QAEXH@Z @ 33 NONAME ; void CIAUpdateParameters::SetRefresh(int)
+	?SetType@CIAUpdateParameters@@QAEXI@Z @ 34 NONAME ; void CIAUpdateParameters::SetType(unsigned int)
+	?Type@CIAUpdateParameters@@QBEIXZ @ 35 NONAME ; unsigned int CIAUpdateParameters::Type(void) const
+
--- a/iaupdate/IAD/configurator/group/iadctrldcmoadapter.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/configurator/group/iadctrldcmoadapter.mmp	Mon May 03 12:38:03 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"
@@ -45,12 +45,6 @@
 LANGUAGE_IDS
 end
 
-START RESOURCE 	iadctrl.rss
-    HEADER
-    TARGETPATH  RESOURCE
-    LANGUAGE_IDS
-END 
-
 LIBRARY 				euser.lib ECom.lib efsrv.lib 
 LIBRARY					FeatMgr.lib 
 LIBRARY 				commonengine.lib               // Series 60 common components library
--- a/iaupdate/IAD/configurator/src/iadctrldcmoadapter.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/configurator/src/iadctrldcmoadapter.cpp	Mon May 03 12:38:03 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"
@@ -17,8 +17,6 @@
 
 #include <featmgr.h>
 #include <featurecontrol.h>
-#include <iadctrl.rsg>
-#include <stringresourcereader.h> 
 #include <f32file.h> 
 #include <data_caging_path_literals.hrh>
 #include "iadctrldcmoadapter.h"
@@ -213,15 +211,15 @@
 // CiadCtrlDCMOAdapter::GetLocalizedNameL
 // Returns the localized name of IAD plug-in Adapter.
 // ----------------------------------------------------------------------------------------
-void CiadCtrlDCMOAdapter::GetLocalizedNameL( HBufC*& aLocName )
+void CiadCtrlDCMOAdapter::GetLocalizedNameL( HBufC*& /*aLocName*/ )
 {
 	TFileName myFileName;
     TParse parseObj;
     parseObj.Set( KRuntimeResourceFileName(), &KDC_RESOURCE_FILES_DIR,NULL );
     myFileName = parseObj.FullName();
-	CStringResourceReader* test = CStringResourceReader::NewLC( myFileName );
+/*	CStringResourceReader* test = CStringResourceReader::NewLC( myFileName );
 	TPtrC buf;
 	buf.Set(test->ReadResourceString( R_SWUPDATE_CONFIGURING_TITLE ) ); 
 	aLocName = buf.AllocL() ; 
-	CleanupStack::PopAndDestroy( test );
+	CleanupStack::PopAndDestroy( test );*/
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/eabi/iaupdateapiu.def	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,49 @@
+EXPORTS
+	_ZN15CIAUpdateResult12SetFailCountEi @ 1 NONAME
+	_ZN15CIAUpdateResult14SetCancelCountEi @ 2 NONAME
+	_ZN15CIAUpdateResult15SetSuccessCountEi @ 3 NONAME
+	_ZN15CIAUpdateResult4NewLEv @ 4 NONAME
+	_ZN15CIAUpdateResult5NewLCEv @ 5 NONAME
+	_ZN15CIAUpdateResultD0Ev @ 6 NONAME
+	_ZN15CIAUpdateResultD1Ev @ 7 NONAME
+	_ZN15CIAUpdateResultD2Ev @ 8 NONAME
+	_ZN19CIAUpdateParameters18SetSearchCriteriaLERK7TDesC16 @ 9 NONAME
+	_ZN19CIAUpdateParameters24SetCommandLineArgumentsLERK6TDesC8 @ 10 NONAME
+	_ZN19CIAUpdateParameters25SetCommandLineExecutableLERK7TDesC16 @ 11 NONAME
+	_ZN19CIAUpdateParameters4NewLEv @ 12 NONAME
+	_ZN19CIAUpdateParameters5NewLCEv @ 13 NONAME
+	_ZN19CIAUpdateParameters6SetUidERK4TUid @ 14 NONAME
+	_ZN19CIAUpdateParametersD0Ev @ 15 NONAME
+	_ZN19CIAUpdateParametersD1Ev @ 16 NONAME
+	_ZN19CIAUpdateParametersD2Ev @ 17 NONAME
+	_ZN9CIAUpdate11ShowUpdatesERK19CIAUpdateParameters @ 18 NONAME
+	_ZN9CIAUpdate11UpdateQueryEv @ 19 NONAME
+	_ZN9CIAUpdate12CheckUpdatesERK19CIAUpdateParameters @ 20 NONAME
+	_ZN9CIAUpdate4NewLER17MIAUpdateObserver @ 21 NONAME
+	_ZN9CIAUpdate5NewLCER17MIAUpdateObserver @ 22 NONAME
+	_ZN9CIAUpdate6UpdateERK19CIAUpdateParameters @ 23 NONAME
+	_ZN9CIAUpdateD0Ev @ 24 NONAME
+	_ZN9CIAUpdateD1Ev @ 25 NONAME
+	_ZN9CIAUpdateD2Ev @ 26 NONAME
+	_ZNK15CIAUpdateResult11CancelCountEv @ 27 NONAME
+	_ZNK15CIAUpdateResult12SuccessCountEv @ 28 NONAME
+	_ZNK15CIAUpdateResult9FailCountEv @ 29 NONAME
+	_ZNK19CIAUpdateParameters14SearchCriteriaEv @ 30 NONAME
+	_ZNK19CIAUpdateParameters20CommandLineArgumentsEv @ 31 NONAME
+	_ZNK19CIAUpdateParameters21CommandLineExecutableEv @ 32 NONAME
+	_ZNK19CIAUpdateParameters3UidEv @ 33 NONAME
+	_ZTI15CIAUpdateResult @ 34 NONAME ; #<TI>#
+	_ZTI19CIAUpdateParameters @ 35 NONAME ; #<TI>#
+	_ZTI9CIAUpdate @ 36 NONAME ; #<TI>#
+	_ZTV15CIAUpdateResult @ 37 NONAME ; #<VT>#
+	_ZTV19CIAUpdateParameters @ 38 NONAME ; #<VT>#
+	_ZTV9CIAUpdate @ 39 NONAME ; #<VT>#
+	_ZN19CIAUpdateParameters15SetShowProgressEi @ 40 NONAME
+	_ZNK19CIAUpdateParameters12ShowProgressEv @ 41 NONAME
+	_ZN19CIAUpdateParameters10SetRefreshEi @ 42 NONAME
+	_ZN19CIAUpdateParameters13SetImportanceEj @ 43 NONAME
+	_ZN19CIAUpdateParameters7SetTypeEj @ 44 NONAME
+	_ZNK19CIAUpdateParameters10ImportanceEv @ 45 NONAME
+	_ZNK19CIAUpdateParameters4TypeEv @ 46 NONAME
+	_ZNK19CIAUpdateParameters7RefreshEv @ 47 NONAME
+
--- a/iaupdate/IAD/firmwareupdate/group/iaupdatefwupdate.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/group/iaupdatefwupdate.mmp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -48,41 +48,13 @@
 
 
 LIBRARY         euser.lib
-LIBRARY         eikcoctl.lib 
-LIBRARY         avkon.lib 
 LIBRARY         centralrepository.lib
 LIBRARY         SyncMLClientAPI.lib
-LIBRARY	        esock.lib
 LIBRARY         fotaengine.lib
-LIBRARY		http.lib
-LIBRARY		bafl.lib
-LIBRARY		inetprotutil.lib
-LIBRARY		commdb.lib
-LIBRARY		CommonEngine.lib
-LIBRARY		efsrv.lib
-LIBRARY 	etel3rdparty.lib
 LIBRARY		ConnMon.lib
-LIBRARY    	xmlframework.lib
-LIBRARY		cone.lib
 LIBRARY		sysutil.lib
-LIBRARY		eikdlg.lib
-LIBRARY		aknnotify.lib
-LIBRARY		eiksrv.lib
-LIBRARY		apgrfx.lib 
-LIBRARY		apparc.lib 
-LIBRARY		apsettingshandlerui.lib
-LIBRARY 	apengine.lib 
-LIBRARY 	eikcore.lib 
-LIBRARY         ConnectionUiUtilities.lib
 LIBRARY         nsmltransporthandler.lib
-LIBRARY         nsmltransport.lib
-LIBRARY         nsmlhistorylog.lib
-LIBRARY         syncservice.lib
-LIBRARY	        sysversioninfo.lib 
-LIBRARY		aknskins.lib
-LIBRARY		eikctl.lib
 LIBRARY         cmmanager.lib
-LIBRARY         commonengine.lib
 DEBUGLIBRARY 	flogger.lib
 
 SMPSAFE
--- a/iaupdate/IAD/firmwareupdate/inc/iaupdatefwfotamodel.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwfotamodel.h	Mon May 03 12:38:03 2010 +0300
@@ -181,6 +181,12 @@
           * @return ETrue if DM support is available
           */
          TBool IsDMSupportAvailableL();
+         
+         /**
+         * Tries to resume suspended firmware update package download.
+         * @return Error code.
+         */
+         TInt TryResumeFwUpdDownload();
 
         
     public: // Functions from base classes
--- a/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsynchandler.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsynchandler.h	Mon May 03 12:38:03 2010 +0300
@@ -22,7 +22,6 @@
 
 // INCLUDES
 #include <e32base.h>
-#include <AknProgressDialog.h>
 #include <SyncMLObservers.h>
 #include <cmmanagerext.h>
 
@@ -47,9 +46,7 @@
 NONSHARABLE_CLASS (CIAUpdateFWSyncHandler) : public CBase, 
 						public MIAUpdateFWActiveCallerObserver,
 						public MSyncMLEventObserver,
-						public MSyncMLProgressObserver,
-						public MProgressDialogCallback
-						
+						public MSyncMLProgressObserver
 	{
     public:
         /**
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp	Mon May 03 12:38:03 2010 +0300
@@ -402,11 +402,23 @@
 // Fetches the state of last or current Fota operation
 // -----------------------------------------------------------------------------
 //
- RFotaEngineSession::TState CIAUpdateFWFotaModel::GetCurrentFwUpdState()
-	{
+RFotaEngineSession::TState CIAUpdateFWFotaModel::GetCurrentFwUpdState()
+	  {
     FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::GetCurrentFwUpdState()" );	
-	const TInt x = -1;
-	return iFotaEngine.GetState(x);
-	}
+	  // Workaround because fotaserver has closed all sessions if DM UI was closed.
+	  // So, we cannot rely on existing session but a new one needs to be opened.
+	  iFotaEngine.Close();
+	  iFotaEngine.OpenL();
+	  const TInt x = -1;
+	  return iFotaEngine.GetState(x);
+	  }
+
 
+TInt CIAUpdateFWFotaModel::TryResumeFwUpdDownload()
+    {	
+    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::TryResumeFwUpdDownload()" );	    
+    TInt retval = iFotaEngine.TryResumeDownload();
+    return retval;
+    }
+	
 //  End of File  
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwsynchandler.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwsynchandler.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -19,14 +19,10 @@
 
 
 // INCLUDES
-#include <aknnotewrappers.h>
-#include <AknWaitDialog.h>
 #include <StringLoader.h>
 #include <e32property.h>
 #include <data_caging_path_literals.hrh>  // for resource and bitmap directories
 #include <SyncMLErr.h>      // sync error codes
-#include <iaupdate.rsg>
-#include <AknsUtils.h>
 #include <DevManInternalCRKeys.h>
 #include <centralrepository.h>
 #include <rconnmon.h>
@@ -82,11 +78,11 @@
 //
 CIAUpdateFWSyncHandler::~CIAUpdateFWSyncHandler()
     {
-    if ( iWaitDialog )
+    /*if ( iWaitDialog )
         {
         TRAP_IGNORE( iWaitDialog->ProcessFinishedL() );
         iWaitDialog = NULL;
-        }
+        }*/
     
 	delete iState;
 	delete iActiveCaller;
@@ -334,12 +330,12 @@
 	iSyncRunning = EFalse;
 	iSyncError = aError;
 
-    if ( iWaitDialog )
+    /*if ( iWaitDialog )
         {
         
         iWaitDialog->ProcessFinishedL();
         iWaitDialog = NULL;
-        }
+        }*/
 
 	iUseFotaProgressNote = EFalse;
     iSyncJob.Close();
@@ -716,10 +712,10 @@
 //
 void CIAUpdateFWSyncHandler::ShowProgressDialogL( )
 	{
-        iWaitDialog = new ( ELeave ) CAknWaitDialog(
-            ( REINTERPRET_CAST( CEikDialog**, &iWaitDialog ) ) );
-        iWaitDialog->ExecuteLD( R_FOTA_CHECK_WAIT_NOTE );
-        iWaitDialog->SetCallback( this );
+        //iWaitDialog = new ( ELeave ) CAknWaitDialog(
+        //    ( REINTERPRET_CAST( CEikDialog**, &iWaitDialog ) ) );
+        //iWaitDialog->ExecuteLD( R_FOTA_CHECK_WAIT_NOTE );
+        //iWaitDialog->SetCallback( this );
 	}
 
 // -----------------------------------------------------------------------------
@@ -728,11 +724,11 @@
 //
 void CIAUpdateFWSyncHandler::HideProgressDialogL()
     {
-    if ( iWaitDialog )
+    /*if ( iWaitDialog )
         {
         iWaitDialog->ProcessFinishedL();
         iWaitDialog = NULL;
-        }
+        }*/
     }
 
 // -----------------------------------------------------------------------------
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncutil.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncutil.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -20,11 +20,8 @@
 
 // INCLUDES
 #include <SyncMLTransportProperties.h>
-#include <eikenv.h>
-#include <bautils.h>
 #include <collate.h>
-#include <StringLoader.h>
-#include <avkon.rsg>
+
 
 #include "iaupdatefwsyncutil.h"
 #include "iaupdatefwdebug.h"
@@ -156,10 +153,10 @@
 		FLOG( "[OMADM] TUtil::SyncTimeLC time" );
 		
 		TBuf<KBufSize> timeFormat;
-		HBufC* buf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
+		/*HBufC* buf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
 		TUtil::StrCopy( timeFormat, *buf );
 		CleanupStack::PopAndDestroy( buf );
-		homeTime.FormatL( ptr, timeFormat );
+		homeTime.FormatL( ptr, timeFormat );*/
 		
 		FLOG( "[OMADM] TUtil::SyncTimeLC time done" );
 		}
@@ -168,10 +165,10 @@
 		FLOG( "[OMADM] TUtil::SyncTimeLC date" );
 		
 		TBuf<KBufSize> dateFormat;
-        HBufC* buf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO );
+        /*HBufC* buf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO );
         TUtil::StrCopy( dateFormat, *buf );
         CleanupStack::PopAndDestroy( buf );
-		homeTime.FormatL(ptr, dateFormat);
+		homeTime.FormatL(ptr, dateFormat);*/
 		
 		FLOG( "[OMADM] TUtil::SyncTimeLC date done" );
 		}
@@ -238,12 +235,12 @@
 // TUtil::GetDateTextL
 // -----------------------------------------------------------------------------
 //
-void TUtil::GetDateTextL(TDes& aText, TTime aDateTime)
+void TUtil::GetDateTextL(TDes& /*aText*/, TTime aDateTime)
 	{
 	TTime homeTime = ConvertUniversalToHomeTime( aDateTime );
-	HBufC* hBuf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO );
-    homeTime.FormatL( aText, *hBuf );
-    CleanupStack::PopAndDestroy( hBuf );
+	//HBufC* hBuf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO );
+    //homeTime.FormatL( aText, *hBuf );
+    //CleanupStack::PopAndDestroy( hBuf );
 	}
 
 
@@ -251,12 +248,12 @@
 // TUtil::GetTimeTextL
 // -----------------------------------------------------------------------------
 //
-void TUtil::GetTimeTextL( TDes& aText, TTime aDateTime )
+void TUtil::GetTimeTextL( TDes& /*aText*/, TTime aDateTime )
 	{
 	TTime homeTime = ConvertUniversalToHomeTime( aDateTime );
-	HBufC* hBuf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
-    homeTime.FormatL( aText, *hBuf );
-    CleanupStack::PopAndDestroy( hBuf );
+	//HBufC* hBuf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
+    //homeTime.FormatL( aText, *hBuf );
+    //CleanupStack::PopAndDestroy( hBuf );
 	}
 
 
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -15,12 +15,9 @@
 *
 */
 
-
-#include <iaupdate.rsg>
-#include <StringLoader.h> 
-#include <aknmessagequerydialog.h>
-#include <aknnotewrappers.h>
+#include <e32base.h>
 #include <DevManInternalCRKeys.h>
+#include <centralrepository.h>
 #include <e32property.h>
 
 #include "iaupdatefwupdatehandler.h"
@@ -139,7 +136,7 @@
         {
         case ENSU:
             {          
-            HBufC* text1 = StringLoader::LoadLC( R_IAUPDATE_INFO_NSU_1 );  
+            /*HBufC* text1 = StringLoader::LoadLC( R_IAUPDATE_INFO_NSU_1 );  
             HBufC* text2 = StringLoader::LoadLC( R_IAUPDATE_INFO_NSU_2 );
             
             HBufC* text = HBufC::NewLC( text1->Length() +
@@ -155,7 +152,7 @@
             CleanupStack::PopAndDestroy( heading ); //text, heading
             CleanupStack::PopAndDestroy( text );
             CleanupStack::PopAndDestroy( text2 );
-            CleanupStack::PopAndDestroy( text1 );
+            CleanupStack::PopAndDestroy( text1 );*/
           
             break;
             }
@@ -174,6 +171,13 @@
                 //still allow user to continue
                 if ( ( fotamodelstate != RFotaEngineSession::EDownloadComplete ) && ( fotamodelstate != RFotaEngineSession::EStartingUpdate ) )
                     {
+		                //if download is suspended, try to resume it.
+		                if ( fotamodelstate == RFotaEngineSession::EDownloadProgressingWithResume)
+		                    {
+		                    TInt result = iFotaModel->TryResumeFwUpdDownload();
+						            FLOG_NUM( "[IAUPDATEFW] TryResumeFwUpdDownload result  = %d", result );   
+		                    }
+                    //anyway, DM is in use
                     isDmActive = ETrue;
                     }
                 }
@@ -223,16 +227,16 @@
 //  CIAUpdateFWUpdateHandler::ShowDialogL()
 // -----------------------------------------------------------------------------
 //
-void CIAUpdateFWUpdateHandler::ShowDialogL(TDesC& aText, TDesC& aHeading )
+void CIAUpdateFWUpdateHandler::ShowDialogL(TDesC& /*aText*/, TDesC& /*aHeading*/ )
     {  
-    CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( aText );
+    //CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( aText );
 
-    dlg->PrepareLC( R_IAUPDATE_MESSAGE_QUERY );
+    //dlg->PrepareLC( R_IAUPDATE_MESSAGE_QUERY );
 
-    CAknPopupHeadingPane* headingPane = dlg->Heading();
-    headingPane->SetTextL( aHeading );
+    //CAknPopupHeadingPane* headingPane = dlg->Heading();
+    //headingPane->SetTextL( aHeading );
 	    
-    TInt ret = dlg->RunLD();
+    //TInt ret = dlg->RunLD();
     }
         
 
@@ -278,12 +282,12 @@
     if (error != KErrNone)
         {
 
-        CAknInformationNote* queryDialog = new (ELeave) CAknInformationNote;
+        //CAknInformationNote* queryDialog = new (ELeave) CAknInformationNote;
         
-        HBufC* error = HBufC::NewL(20);
-                  TPtr ptrerror = error->Des();
-                  ptrerror.Copy(_L("sync problem")); 
-        queryDialog->ExecuteLD( *error  );
+        //HBufC* error = HBufC::NewL(20);
+        //          TPtr ptrerror = error->Des();
+        //          ptrerror.Copy(_L("sync problem")); 
+        //queryDialog->ExecuteLD( *error  );
         }
     }
 
--- a/iaupdate/IAD/group/bld.inf	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/group/bld.inf	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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,9 +22,6 @@
 PRJ_PLATFORMS
 DEFAULT
 
-PRJ_EXPORTS
-
-../loc/iaupdate.loc  MW_LAYER_LOC_EXPORT_PATH(iaupdate.loc)
 
 PRJ_MMPFILES
 
@@ -34,28 +31,14 @@
 // IA Engine
 #include "../engine/group/bld.inf"
 
-// IA Tools
-#include "../tools/group/bld.inf"
-
-// IA API
-// Compile API before UI because UI imports the IA API library
-#include "../api/group/bld.inf"
-
 // firmware update 
-// Compile before UI and bgchecker because they import the library
 #include "../firmwareupdate/group/bld.inf"
 
-// IA UI
-#include "../ui/group/bld.inf"
-
 // IA Enabler
 #include "../enabler/group/bld.inf"
 
 // background checker
 #include "../backgroundchecker/group/bld.inf"
 
-// launcher
-#include "../launcher/group/bld.inf"
-
 // configurator
 #include "../configurator/group/bld.inf"
--- a/iaupdate/IAD/launcher/group/bld.inf	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2008 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 definition file of iaupdatelauncher.exe
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-
-PRJ_EXTENSIONS
-
-START EXTENSION s60/mifconv
-  OPTION TARGETFILE iaupdatelauncher_aif.mif
-  OPTION SOURCES -c8,8 qgn_menu_swupdate
-END
-
-
-PRJ_MMPFILES
-
-iaupdatelauncher.mmp
-
--- a/iaupdate/IAD/launcher/group/iaupdatelauncher.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2008-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:   Project definition file of iaupdatelauncher.exe
-*
-*/
-
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-#include "../inc/iaupdatelauncheruids.h"
-
-CAPABILITY        CAP_APPLICATION
-VENDORID          VID_DEFAULT
-
-TARGET            iaupdatelauncher.exe
-TARGETTYPE        exe
-UID		          0x100039CE KIAUpdateLauncherUid
-
-PAGED
-
-MW_LAYER_SYSTEMINCLUDE
-
-USERINCLUDE       ../inc
-USERINCLUDE       ../../engine/inc
-USERINCLUDE       ../../ui/inc
-USERINCLUDE       ../../updater/inc
-USERINCLUDE       ../../api/client/inc
-USERINCLUDE       ../../loc
-
-SOURCEPATH        ../src
-SOURCE            iaupdatelauncher.cpp
-SOURCE            iaupdatelauncherapplication.cpp
-SOURCE            iaupdatelauncherappui.cpp
-SOURCE            iaupdatelauncherdocument.cpp
-SOURCE            iaupdatelaunchermanager.cpp
-SOURCE            iaupdatelauncherclient.cpp
-
-LIBRARY           euser.lib
-LIBRARY           apparc.lib
-LIBRARY           cone.lib
-LIBRARY           eikcore.lib
-LIBRARY           avkon.lib
-DEBUGLIBRARY      flogger.lib
-
-// Path for resources
-SOURCEPATH .
-
-START RESOURCE    iaupdatelauncher.rss
-HEADER
-TARGETPATH        APP_RESOURCE_DIR
-LANGUAGE_IDS
-END //RESOURCE
-
-START RESOURCE    iaupdatelauncher_reg.rss
-DEPENDS iaupdatelauncher.rsg
-TARGETPATH 	      /private/10003a3f/apps
-END //RESOURCE
-
-SMPSAFE
-
-// End of File
-
--- a/iaupdate/IAD/launcher/group/iaupdatelauncher.rss	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2008 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:   Resource definitions for IAD launcher
-*
-*/
-
-
-
-//  RESOURCE IDENTIFIER
-NAME IALA    // 4 letter ID
-
-
-//  INCLUDES
-#include <eikon.rh>
-#include <appinfo.rh>
-#include <data_caging_paths_strings.hrh>
-#include <iaupdate.loc>
-
-
-//  RESOURCE DEFINITIONS
-// -----------------------------------------------------------------------------
-//
-//    Define the resource file signature
-//    This resource should be empty.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE
-    {
-    }
-
-
-// ---------------------------------------------------------------------------- 
-//
-// r_iaupdatelauncher_localisable_app_info
-//
-// ---------------------------------------------------------------------------- 
-//
-RESOURCE LOCALISABLE_APP_INFO r_iaupdatelauncher_localisable_app_info
-    {
-    short_caption = qtn_swupdate_caption_grid_ph2;
-    caption_and_icon = 
-    CAPTION_AND_ICON_INFO
-        {
-        caption = qtn_swupdate_caption_list_ph2;
-        number_of_icons = 1;
-        icon_file = APP_BITMAP_DIR"\\iaupdate_aif.mif";
-	};
-    }
-
-// End of File
-
--- a/iaupdate/IAD/launcher/group/iaupdatelauncher_reg.rss	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2008 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:   registration resource file of IAD client launcher
-*
-*/
-
-
-
-#include <appinfo.rh>
-#include <iaupdatelauncher.rsg>
-#include <data_caging_paths_strings.hrh>
-#include "iaupdatelauncheruids.h"
-
-UID2 KUidAppRegistrationResourceFile
-UID3 KIAUpdateLauncherUid
-
-RESOURCE APP_REGISTRATION_INFO
-  {
-  app_file="iaupdatelauncher";
-  localisable_resource_file =  APP_RESOURCE_DIR"\\iaupdatelauncher";
-  localisable_resource_id = R_IAUPDATELAUNCHER_LOCALISABLE_APP_INFO;
-
-  embeddability=KAppNotEmbeddable;
-  newfile=KAppDoesNotSupportNewFile;
-  }
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/launcher/iaupdatelauncher.pro	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,42 @@
+#
+# 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:   
+#                
+
+
+TEMPLATE = app
+TARGET = iaupdatelauncher 	
+
+symbian {
+    TARGET.UID3 = 0x2001FE2F
+    TARGET.CAPABILITY = CAP_APPLICATION
+}    
+DEPENDPATH += .
+DEPENDPATH += ./src
+DEPENDPATH += ./inc
+
+INCLUDEPATH += .
+INCLUDEPATH += ../engine/inc
+
+CONFIG += hb
+
+# Input
+SOURCES += iaupdatelaunchermain.cpp \
+           iaupdatelauncherclient.cpp 
+
+HEADERS = iaupdatelauncherclient.h 
+
+LIBS += -lxqservice
+LIBS += -lxqserviceutil
+LIBS += -lflogger
\ No newline at end of file
--- a/iaupdate/IAD/launcher/inc/iaupdatelauncherapplication.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2008 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 the header file of the CIaupdateLauncherApplication class 
-*
-*/
-
-
-
-#ifndef __IAUPDATELAUNCHERAPPLICATION_H__
-#define __IAUPDATELAUNCHERAPPLICATION_H__
-
-// INCLUDES
-#include <aknapp.h>
-
-// CLASS DECLARATION
-
-/**
-* CIaupdateLauncherApplication application class.
-* Provides factory to create concrete document object.
-* An instance of CIaupdateLauncherApplication is the application part of the
-* AVKON application framework for the IAupdate client launcher application.
-*/
-class CIAUpdateLauncherApplication : public CAknApplication
-    {
-    public: // Functions from base classes
-
-        /**
-        * From CApaApplication, AppDllUid.
-        * @return Application's UID (KUidHelloWorldBasicApp).
-        */
-        TUid AppDllUid() const;
-
-    protected: // Functions from base classes
-
-        /**
-        * From CApaApplication, CreateDocumentL.
-        * Creates CIaupdateLauncherDocument document object. The returned
-        * pointer in not owned by the CIaupdateLauncherApplication object.
-        * @return A pointer to the created document object.
-        */
-        CApaDocument* CreateDocumentL();
-    };
-
-#endif // __IAUPDATELAUNCHERAPPLICATION_H__
-
-// End of File
-
--- a/iaupdate/IAD/launcher/inc/iaupdatelauncherappui.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2008 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 the header file of the CIAUpdateLauncherAppUi class 
-*
-*/
-
-
-
-
-#ifndef __IAUPDATELAUNCHERAPPUI_H__
-#define __IAUPDATELAUNCHERAPPUI_H__
-
-// INCLUDES
-#include <aknappui.h>
-
-// FORWARD DECLARATIONS
-class CIAUpdateLauncherManager;
-
-// CLASS DECLARATION
-/**
-* CLauncherAppUi application UI class.
-* Interacts with the user through the UI and request message processing
-* from the handler class
-*/
-class CIAUpdateLauncherAppUi : public CAknAppUi
-                          
-    {
-    public: // Constructors and destructor
-
-        /**
-        * ConstructL.
-        * 2nd phase constructor.
-        */
-        void ConstructL();
-
-        /**
-        * C++ default constructor. This needs to be public due to
-        * the way the framework constructs the AppUi
-        */
-        CIAUpdateLauncherAppUi();
-
-        /**
-        * Virtual Destructor.
-        */
-        virtual ~CIAUpdateLauncherAppUi();
-
-    private: // from CAknViewAppUi
-    
-         /*!
-          * @function HandleCommandL  
-          * @discussion Handle user menu selections
-          * @param aCommand the enumerated code for the option selected
-          */
-        void HandleCommandL( TInt aCommand );
-
-        
-     private: // from CEikAppUi
-        /**
-        * @param aCommand - The shell command sent to the application
-        * @param aDocumentName - The document name that will be given to 
-        * OpenFileL()
-        * @param aTail - The rest of the command line
-        * @return Whether the final document name represents an existing file
-        */
-        TBool ProcessCommandParametersL( TApaCommand aCommand,
-                                         TFileName& aDocumentName,
-                                         const TDesC8& aTail );
-
-        
-    private: // Data
-    
-        CIAUpdateLauncherManager* iLauncherManager; 
-        TBool iRefreshFromNetworkDenied;
-    };
-
-#endif // __IAUPDATELAUNCHERAPPUI_H__
-
-// End of File
-
--- a/iaupdate/IAD/launcher/inc/iaupdatelauncherclient.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/launcher/inc/iaupdatelauncherclient.h	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -19,63 +19,30 @@
 
 #ifndef IA_UPDATE_LAUNCHER_CLIENT_H
 #define IA_UPDATE_LAUNCHER_CLIENT_H
+#include <QObject>
 
-#include <AknServerApp.h> 
-#include <e32std.h>
+class XQServiceRequest;
 
-/**
- *  
- */
-class RIAUpdateLauncherClient : public RAknAppServiceBase 
-    {
-
+//class IAUpdateLauncherClient 
+class IAUpdateLauncherClient : public QObject
+{
+     Q_OBJECT
 public:
 
-    /**
-     * Constructor.
-     */
      
-     RIAUpdateLauncherClient();
-
-    /** 
-     * This function will crete new embedded IAUpdate instance.
-     */
-    TInt Open();
-    
-    /** 
-     * Close client server connection to IAUpdate
-     */
-    void Close();
-
+     IAUpdateLauncherClient();
+     ~IAUpdateLauncherClient();
 
-    /** 
-     * Command asks IAUpdate to show updates list
-     *
-     * @param aStatus The status will be updated when the operation
-     * has been completed.
-     */
-    void ShowUpdates( TBool& aRefreshFromNetworkDenied, 
-                      TRequestStatus& aStatus );
-    
-    /** 
-     * Cancel async ShowUpdates() request
-     */
-     void CancelAsyncRequest();
- 
-public: // RAknAppServiceBase
+     void launch();
 
-    /**
-     * @see RAknAppServiceBase::ServiceUid
-     */
-    TUid ServiceUid() const;
+protected slots:
+     void requestCompleted(const QVariant& value);
+     void requestError(int err); 
 
                                
-private: //data
+private: 
 
-     TBool iConnected;
-     
-     TPtr8 iPtr1;
-
+     XQServiceRequest* mServiceRequest;
      };
 
 #endif // IA_UPDATE_LAUNCHER_CLIENT_H
--- a/iaupdate/IAD/launcher/inc/iaupdatelauncherdocument.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2008 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 the header file of the CIAUpdateLauncherDocument
-*                class 
-*
-*/
-
-
-
-
-#ifndef __IAUPDATELAUNCHERDOCUMENT_H__
-#define __IAUPDATELAUNCHERDOCUMENT_H__
-
-// INCLUDES
-#include <AknDoc.h>
-
-// FORWARD DECLARATIONS
-class CIAUpdateLauncherAppUi;
-class CEikApplication;
-
-
-// CLASS DECLARATION
-
-/**
-* CLauncherDocument application class.
-* An instance of class CLauncherDocument is the Document part of the
-* AVKON application framework for the Launcher example application.
-*/
-class CIAUpdateLauncherDocument : public CAknDocument
-    {
-    public: // Constructors and destructor
-
-        /**
-        * NewL.
-        * Two-phased constructor.
-        * Construct a CIAUpdateLauncherDocument for the AVKON application aApp
-        * using two phase construction, and return a pointer
-        * to the created object.
-        * @param aApp Application creating this document.
-        * @return A pointer to the created instance of CIAUpdateLauncherDocument
-        */
-        static CIAUpdateLauncherDocument* NewL( CEikApplication& aApp );
-
-        /**
-        * NewLC.
-        * Two-phased constructor.
-        * Construct a CIAUpdateLauncherDocument for the AVKON application aApp
-        * using two phase construction, and return a pointer
-        * to the created object.
-        * @param aApp Application creating this document.
-        * @return A pointer to the created instance of CIAUpdateLauncherDocument.
-        */
-        static CIAUpdateLauncherDocument* NewLC( CEikApplication& aApp );
-
-        /**
-        * ~CLauncherDocument
-        * Virtual Destructor.
-        */
-        virtual ~CIAUpdateLauncherDocument();
-
-    public: // Functions from base classes
-
-        /**
-        * CreateAppUiL
-        * From CEikDocument, CreateAppUiL.
-        * Create a CIAUpdateLauncherAppUi object and return a pointer to it.
-        * The object returned is owned by the Uikon framework.
-        * @return Pointer to created instance of AppUi.
-        */
-        CEikAppUi* CreateAppUiL();
-
-    private: // Constructors
-
-        /**
-        * ConstructL
-        * 2nd phase constructor.
-        */
-        void ConstructL();
-
-        /**
-        * CLauncherDocument.
-        * C++ default constructor.
-        * @param aApp Application creating this document.
-        */
-        CIAUpdateLauncherDocument( CEikApplication& aApp );
-
-    };
-
-#endif // __IAUPDATELAUNCHERDOCUMENT_H__
-
-// End of File
-
--- a/iaupdate/IAD/launcher/inc/iaupdatelaunchermanager.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2008 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 the header file of the CIAUpdateLauncherManager class 
-*
-*/
-
-
-
-#ifndef IA_UPDATE_LAUNCHER_MANAGER_H
-#define IA_UPDATE_LAUNCHER_MANAGER_H
-
-
-//INCLUDES
-#include <e32base.h>
-#include <e32std.h>
-#include <coemain.h>
-
-#include "iaupdatelauncherclient.h"
-
-/**
- * 
-  */
-class CIAUpdateLauncherManager : public CActive
-    {
-
-public:
-
-    /**
-     * Symbian two phased constructor.
-     */
-    static CIAUpdateLauncherManager* NewL( TBool& aRefreshFromNetworkDenied );
-    
-    /**
-     * Symbian two phased constructor.
-     */
-    static CIAUpdateLauncherManager* NewLC( TBool& aRefreshFromNetworkDenied );
-    
-
-    /**
-     * Destructor
-     */
-    virtual ~CIAUpdateLauncherManager();
-    
-
-    
-
-private: // CActive
-
-    /**
-     * @see CActive::DoCancel
-     */
-    void DoCancel();
-
-    /**
-     * When the server side has finished operation, the CActive object will
-     * be informed about it, and as a result RunL will be called. This function
-     * well inform the observer that the operation has been completed.
-     * @see CActive::RunL
-     */
-    void RunL();
-
-
-private:
-
-    /**
-     * private C++ constructor
-     */
-    CIAUpdateLauncherManager();
-    
-    /**
-     * @see NewL
-     */
-    void ConstructL( TBool& aRefreshFromNetworkDenied );
-
-  
-private:
-
-    // Prevent these if not implemented
-    CIAUpdateLauncherManager( const CIAUpdateLauncherManager& aObject );
-    CIAUpdateLauncherManager& operator =( const CIAUpdateLauncherManager& aObject );
-    
-
-private: // data
-       
-    // Handles the client server communication.
-    RIAUpdateLauncherClient iUpdateClient;
-        
-    CEikonEnv* iEikEnv; //not owned
-
-    };
-
-#endif // IA_UPDATE_LAUNCHER_MANAGER_H
--- a/iaupdate/IAD/launcher/src/iaupdatelauncher.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2008 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:   IAUpdate client launcher.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <eikstart.h>
-#include "iaupdatelauncherapplication.h"
-#include "iaupdatedebug.h"
-
-
-LOCAL_C CApaApplication* NewApplication()
-	{
-	IAUPDATE_TRACE("[IAUPDATE] NewApplication() begin");
-	return new CIAUpdateLauncherApplication;
-	}
-
-GLDEF_C TInt E32Main()
-	{
-	return EikStart::RunApplication( NewApplication );
-	}
-
--- a/iaupdate/IAD/launcher/src/iaupdatelauncherapplication.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2008 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:   IAUpdate client launcher.
-*
-*/
-
-
-
-
-// INCLUDE FILES
-#include "iaupdatelauncherdocument.h"
-#include "iaupdatelauncherapplication.h"
-#include "iaupdatelauncheruids.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// UID for the application;
-// this should correspond to the uid defined in the mmp file
-static const TUid KUidIaupdateLauncherApp = { KIAUpdateLauncherUid };
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherApplication::CreateDocumentL()
-// Creates CApaDocument object
-// -----------------------------------------------------------------------------
-//
-CApaDocument* CIAUpdateLauncherApplication::CreateDocumentL()
-    {
-    // Create an Launcher document, and return a pointer to it
-    return (static_cast<CApaDocument*>
-                    ( CIAUpdateLauncherDocument::NewL( *this ) ) );
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherApplication::AppDllUid()
-// Returns application UID
-// -----------------------------------------------------------------------------
-//
-TUid CIAUpdateLauncherApplication::AppDllUid() const
-    {
-    // Return the UID for the Launcher application
-    return KUidIaupdateLauncherApp;
-    }
-
-// End of File
-
--- a/iaupdate/IAD/launcher/src/iaupdatelauncherappui.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2008 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 module contains the implementation of CIAUpdateLauncherAppUi class 
-*                member functions.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "iaupdatelauncherappui.h"
-#include "iaupdatelaunchermanager.h"
-#include "iaupdatedebug.h"
-
-_LIT8( KRefreshFromNetworkDenied, "1" );
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherAppUi::ConstructL()
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateLauncherAppUi::ConstructL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherAppUi::ConstructL() begin");
-    // Initialise app UI with standard value.
-    BaseConstructL( ENoAppResourceFile );
-    StatusPane()->MakeVisible( EFalse );
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherAppUi::ConstructL() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherrAppUi::CIAUpdateLauncherAppUi()
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateLauncherAppUi::CIAUpdateLauncherAppUi()
-    {
-    SetFullScreenApp( EFalse );
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherAppUi::~CIAUpdateLauncherAppUi()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateLauncherAppUi::~CIAUpdateLauncherAppUi()
-    {
-    delete iLauncherManager;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherAppUi::HandleCommandL
-// 
-// -----------------------------------------------------------------------------
-//         
-void CIAUpdateLauncherAppUi::HandleCommandL( TInt aCommand )
-    {
-    switch(aCommand)
-        {
-        case EEikCmdExit:
-        case EAknCmdExit:
-        case EAknSoftkeyExit:
-            {
-            delete iLauncherManager;
-            iLauncherManager = NULL;
-            Exit();	
-            break;
-            }
-             
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherAppUi::ProcessCommandParametersL
-// 
-// -----------------------------------------------------------------------------
-// 
-TBool CIAUpdateLauncherAppUi::ProcessCommandParametersL( TApaCommand /*aCommand*/,
-                                                         TFileName& /*aDocumentName*/,
-                                                         const TDesC8& aTail )
-   {
-   IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherAppUi::ProcessCommandParametersL() begin");
-   if ( aTail == KRefreshFromNetworkDenied )
-       {
-   	   iRefreshFromNetworkDenied = ETrue;
-       }
-   iLauncherManager = CIAUpdateLauncherManager::NewL( iRefreshFromNetworkDenied );
-
-   IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherAppUi::ProcessCommandParametersL() end");
-   return ETrue;	
-   }
-    
-// End of File
-
--- a/iaupdate/IAD/launcher/src/iaupdatelauncherclient.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/launcher/src/iaupdatelauncherclient.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:   This module contains the implementation of RIAUpdateLauncherClient
+* Description:   This module contains the implementation of IAUpdateLauncherClient
 *                class member functions.
 *
 */
@@ -19,107 +19,64 @@
 
 
 //INCLUDES
+#include <qapplication.h>
+#include <xqservicerequest.h>
+#include <xqserviceutil.h>
+#include <xqrequestinfo.h>
+
 #include "iaupdatelauncherclient.h"
-#include "iaupdateclientdefines.h"
 #include "iaupdatedebug.h"
 
-// -----------------------------------------------------------------------------
-// RIAUpdateLauncherClient::RIAUpdateLauncherClient
-// 
-// -----------------------------------------------------------------------------
-// 
-RIAUpdateLauncherClient::RIAUpdateLauncherClient() 
-: iPtr1( NULL, 0 )
-    {
-    }
+ 
 
+IAUpdateLauncherClient::IAUpdateLauncherClient()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateLauncherClient::IAUpdateLauncherClient()");
+    mServiceRequest = NULL;
+}
 
-// -----------------------------------------------------------------------------
-// RIAUpdateLauncherClient::Open
-// 
-// -----------------------------------------------------------------------------
-// 
-TInt RIAUpdateLauncherClient::Open()
+IAUpdateLauncherClient::~IAUpdateLauncherClient()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateLauncherClient::~IAUpdateLauncherClient() begin");
+    if ( mServiceRequest)
     {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateLauncherClient::Open() begin");
-        
-    TInt error = KErrNone;
-    if ( !iConnected )
-        {
-        TRAP( error, ConnectChainedAppL( ServiceUid() ) );
-        if ( error == KErrNone )
-            {
-            iConnected = ETrue;
-            }
-        }	
-    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", error );
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateLauncherClient::Open() end");
-    return error;
+       delete mServiceRequest;
     }
-
-// -----------------------------------------------------------------------------
-// RIAUpdateLauncherClient::Close
-// 
-// -----------------------------------------------------------------------------
-//
-void RIAUpdateLauncherClient::Close()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateLauncherClient::Close() begin");
-    // Let the parent handle closing.
-    RAknAppServiceBase::Close();
-    iConnected = EFalse;
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateLauncherClient::Close() end");
-    }
-
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateLauncherClient::~IAUpdateLauncherClient() end");
+}
 
-// -----------------------------------------------------------------------------
-// RIAUpdateLauncherClient::ShowUpdates()
-// 
-// -----------------------------------------------------------------------------
-//
-void RIAUpdateLauncherClient::ShowUpdates( TBool& aRefreshFromNetworkDenied, 
-                                           TRequestStatus& aStatus )
+void IAUpdateLauncherClient::launch()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateLauncherClient::launch() begin");
+    mServiceRequest = new XQServiceRequest("com.nokia.services.swupdate.swupdate_interface","startedByLauncher(bool)",false);
+    
+    XQRequestInfo requestInfo;
+    requestInfo.setEmbedded(true);
+    mServiceRequest->setInfo(requestInfo);
+    bool ret = mServiceRequest->send();   
+    IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateLauncherClient::launch() ret %d", ret );
+    if (!ret)
     {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateLauncherClient::ShowUpdates() begin");
-    if ( iConnected )
-        {
-        TPckg<TBool> refreshFromNetworkDenied( aRefreshFromNetworkDenied );
-	    iPtr1.Set( refreshFromNetworkDenied );
-	    TIpcArgs args;
-        args.Set( 0, &iPtr1 );
-    	SendReceive( IAUpdateClientDefines::EIAUpdateServerStartedByLauncher, 
-    	             args,
-    	             aStatus );
-        }
- 
-        
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateLauncherClient::ShowUpdates() end");
+        IAUPDATE_TRACE("[IAUPDATE] send failed");
+        qApp->quit();
     }
+    else
+    {
+        connect(mServiceRequest, SIGNAL(requestCompleted(QVariant)), this, SLOT(requestCompleted(QVariant)));
+        connect(mServiceRequest, SIGNAL(requestError(int)), this, SLOT(requestError(int)));
+    }    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateLauncherClient::launch() end");
+}
 
-// -----------------------------------------------------------------------------
-// RIAUpdateLauncherClient::CancelAsyncRequest()
-// 
-// -----------------------------------------------------------------------------
-//    
-void RIAUpdateLauncherClient::CancelAsyncRequest()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateLauncherClient::CancelAsyncRequest() begin");
-    if ( iConnected )
-        {
-    	SendReceive( IAUpdateClientDefines::EIAUpdateServerCancel ); 
-        }
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateLauncherClient::CancelAsyncRequest() end");
-    }
+void IAUpdateLauncherClient::requestCompleted(const QVariant& /*value*/)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateLauncherClient::requestCompleted()");
+    qApp->quit();
+}
 
+void IAUpdateLauncherClient::requestError(int err)
+{
+    IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateLauncherClient::requestError() %d", err );
+    qApp->quit();
+}
 
-// -----------------------------------------------------------------------------
-// RIAUpdateLauncherClient::ServiceUid()
-// 
-// -----------------------------------------------------------------------------
-//
-TUid RIAUpdateLauncherClient::ServiceUid() const
-    {
-    IAUPDATE_TRACE("[IAUPDATE] RIAUpdateLauncherClient::ServiceUid()");
-    return IAUpdateClientDefines::KIAUpdateServiceUid;    
-    }
-
--- a/iaupdate/IAD/launcher/src/iaupdatelauncherdocument.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2008 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 module contains the implementation of CIAUpdateLauncherDocument class 
-*                member functions.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "iaupdatelauncherappui.h"
-#include "iaupdatelauncherdocument.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherDocument::NewL()
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateLauncherDocument* CIAUpdateLauncherDocument::NewL( CEikApplication& aApp )
-    {
-    CIAUpdateLauncherDocument* self = NewLC( aApp );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherDocument::NewLC()
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateLauncherDocument* CIAUpdateLauncherDocument::NewLC( CEikApplication& aApp )
-    {
-    CIAUpdateLauncherDocument* self =
-        new ( ELeave ) CIAUpdateLauncherDocument( aApp );
-
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherDocument::ConstructL()
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateLauncherDocument::ConstructL()
-    {
-    // No implementation required
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherDocument::CIAUpdateLauncherDocument()
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateLauncherDocument::CIAUpdateLauncherDocument( CEikApplication& aApp )
-    : CAknDocument( aApp )
-    {
-    // No implementation required
-    }
-
-// ---------------------------------------------------------------------------
-// CIAUpdateLauncherDocument::~CIAUpdateLauncherDocument()
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CIAUpdateLauncherDocument::~CIAUpdateLauncherDocument()
-    {
-    // No implementation required
-    }
-
-// ---------------------------------------------------------------------------
-// CIAUpdateLauncherDocument::CreateAppUiL()
-// Constructs CreateAppUi.
-// ---------------------------------------------------------------------------
-//
-CEikAppUi* CIAUpdateLauncherDocument::CreateAppUiL()
-    {
-    // Create the application user interface, and return a pointer to it;
-    // the framework takes ownership of this object
-    return ( static_cast <CEikAppUi*> ( new ( ELeave ) CIAUpdateLauncherAppUi ) );
-    }
-
-// End of File
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/launcher/src/iaupdatelaunchermain.cpp	Mon May 03 12:38:03 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 the License "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 module contains the implementation of main function
+*
+*/
+
+#include <QApplication>
+#include "iaupdatelauncherclient.h"
+
+int main(int argc, char *argv[])
+{
+    QApplication app(argc, argv);
+    IAUpdateLauncherClient launcherClient;
+    launcherClient.launch();
+    return app.exec();
+}
--- a/iaupdate/IAD/launcher/src/iaupdatelaunchermanager.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
-* Copyright (c) 2008 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 module contains the implementation of CIAUpdateLauncherManager
-*                class member functions.
-*
-*/
-
-
-
-// INCLUDES
-#include <eikenv.h>
-
-#include "iaupdatelauncherappui.h"
-#include "iaupdatelaunchermanager.h"
-#include "iaupdatelauncherclient.h"
-#include "iaupdatedebug.h"
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherManager::NewL
-// 
-// -----------------------------------------------------------------------------
-// 
-CIAUpdateLauncherManager* CIAUpdateLauncherManager::NewL( TBool& aRefreshFromNetworkDenied )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::NewL() begin");
-    CIAUpdateLauncherManager* self = CIAUpdateLauncherManager::NewLC( aRefreshFromNetworkDenied );
-    CleanupStack::Pop( self );
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::NewL() end");
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherManager::NewLC
-// 
-// -----------------------------------------------------------------------------
-//    
-CIAUpdateLauncherManager* CIAUpdateLauncherManager::NewLC( TBool& aRefreshFromNetworkDenied )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::NewLC() begin");
-    CIAUpdateLauncherManager* self = new( ELeave ) CIAUpdateLauncherManager();
-    CleanupStack::PushL( self );
-    self->ConstructL( aRefreshFromNetworkDenied );
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::NewLC() end");
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherManager::CIAUpdateLauncherManager
-// 
-// -----------------------------------------------------------------------------
-//    
-CIAUpdateLauncherManager::CIAUpdateLauncherManager()
-: CActive( CActive::EPriorityStandard )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::CIAUpdateLauncherManager()");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherManager::ConstructL()
-// 
-// -----------------------------------------------------------------------------
-//    
-void CIAUpdateLauncherManager::ConstructL( TBool& aRefreshFromNetworkDenied )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::ConstructL() begin");
-    CActiveScheduler::Add( this );
-    TInt error( iUpdateClient.Open() );
-    IAUPDATE_TRACE_1("[IAUPDATE] CIAUpdateLauncherManager::ConstructL() error code: %d", error);
-    if ( error == KErrNone )
-        {    
-        iUpdateClient.ShowUpdates( aRefreshFromNetworkDenied, iStatus );
-        SetActive();        
-        }
-    else
-        {
-        iEikEnv = CEikonEnv::Static();
-        CIAUpdateLauncherAppUi* appUi = 
-       	            static_cast< CIAUpdateLauncherAppUi* >( iEikEnv->EikAppUi() );
-        appUi->Exit();
-        }
- 
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::ConstructL() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherManager::~CIAUpdateLauncherManager
-// 
-// -----------------------------------------------------------------------------
-//
-CIAUpdateLauncherManager::~CIAUpdateLauncherManager()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::~CIAUpdateLauncherManager() begin");
-    Cancel();
-    iUpdateClient.Close();
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::~CIAUpdateLauncherManager() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherManager::DoCancel
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateLauncherManager::DoCancel()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::DoCancel() begin");
-    iUpdateClient.CancelAsyncRequest();
-
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::DoCancel() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateLauncherManager::RunL
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateLauncherManager::RunL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::RunL() begin");
-    iEikEnv = CEikonEnv::Static();
-    CIAUpdateLauncherAppUi* appUi = 
-       	            static_cast< CIAUpdateLauncherAppUi* >( iEikEnv->EikAppUi() );
-    appUi->Exit();
-     
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLauncherManager::RunL() end");
-    }
-
-
-
-
-
-
-
-
-
-
--- a/iaupdate/IAD/tools/bwins/iaupdatetoolsu.def	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-EXPORTS
-	?ExternalizeParametersL@IAUpdateTools@@YAXAAPAVHBufC8@@ABVCIAUpdateParameters@@@Z @ 1 NONAME ; void IAUpdateTools::ExternalizeParametersL(class HBufC8 * &, class CIAUpdateParameters const &)
-	?InternalizeParametersL@IAUpdateTools@@YAXAAVCIAUpdateParameters@@ABVTDesC8@@@Z @ 2 NONAME ; void IAUpdateTools::InternalizeParametersL(class CIAUpdateParameters &, class TDesC8 const &)
-	?ExternalizeDes8L@IAUpdateTools@@YAXABVTDesC8@@AAVRWriteStream@@@Z @ 3 NONAME ; void IAUpdateTools::ExternalizeDes8L(class TDesC8 const &, class RWriteStream &)
-	?ExternalizeDesL@IAUpdateTools@@YAXABVTDesC16@@AAVRWriteStream@@@Z @ 4 NONAME ; void IAUpdateTools::ExternalizeDesL(class TDesC16 const &, class RWriteStream &)
-	?InternalizeDes8L@IAUpdateTools@@YAHAAPAVHBufC8@@AAVRReadStream@@@Z @ 5 NONAME ; int IAUpdateTools::InternalizeDes8L(class HBufC8 * &, class RReadStream &)
-	?InternalizeDesL@IAUpdateTools@@YAHAAPAVHBufC16@@AAVRReadStream@@@Z @ 6 NONAME ; int IAUpdateTools::InternalizeDesL(class HBufC16 * &, class RReadStream &)
-
--- a/iaupdate/IAD/tools/eabi/iaupdatetoolsu.def	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-EXPORTS
-	_ZN13IAUpdateTools22ExternalizeParametersLERP6HBufC8RK19CIAUpdateParameters @ 1 NONAME
-	_ZN13IAUpdateTools22InternalizeParametersLER19CIAUpdateParametersRK6TDesC8 @ 2 NONAME
-	_ZN13IAUpdateTools15ExternalizeDesLERK7TDesC16R12RWriteStream @ 3 NONAME
-	_ZN13IAUpdateTools15InternalizeDesLERP7HBufC16R11RReadStream @ 4 NONAME
-	_ZN13IAUpdateTools16ExternalizeDes8LERK6TDesC8R12RWriteStream @ 5 NONAME
-	_ZN13IAUpdateTools16InternalizeDes8LERP6HBufC8R11RReadStream @ 6 NONAME
-
--- a/iaupdate/IAD/tools/group/bld.inf	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2008 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:   Build information file for IA Update tools
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-
-PRJ_MMPFILES
-
-iaupdatetools.mmp
-
-
-PRJ_EXPORTS
-
-
-
--- a/iaupdate/IAD/tools/group/iaupdatetools.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2008-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:   Project definition file of iaupdatetools.dll
-*
-*/
-
-
-
-#include <platform_paths.hrh>
-
-
-CAPABILITY      CAP_GENERAL_DLL
-
-TARGET          iaupdatetools.dll
-TARGETTYPE      dll
-UID             0x1000008d 0x20019596
-
-PAGED
-
-SOURCEPATH      ../src
-SOURCE          iaupdatetools.cpp
-
-// Client header files
-USERINCLUDE     ../inc
-
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY         iaupdateapi.lib
-LIBRARY         euser.lib
-LIBRARY         estor.lib
-LIBRARY         avkon.lib
-LIBRARY         apparc.lib
-LIBRARY         eikcore.lib
-LIBRARY         cone.lib
-
-// For debugging and logging purposes
-USERINCLUDE     ../../engine/inc
-DEBUGLIBRARY    flogger.lib
-
-SMPSAFE
--- a/iaupdate/IAD/tools/inc/iaupdatetools.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 the header file of the IAUpdateTools functions
-*
-*/
-
-
-
-#ifndef IA_UPDATE_TOOLS_H
-#define IA_UPDATE_TOOLS_H
-
-#include <e32base.h>
-#include <e32cmn.h>
-
-class RReadStream;
-class RWriteStream;
-
-
-/**
- * IAUpdateTools provides general tool functions
- *
- * @since S60 v3.2
- */
-namespace IAUpdateTools
-    {
-
-    /**
-     * @param aTarget The old pointer data will be deleted and the pointer will point to the new data 
-     * that will contain externalization of the CIAUpdateParameters object.
-     * @param aSource CIAUpdateParameters object that will be externalized to a descriptor.
-     * @exception Leaves with system wide error code.
-     */
-    IMPORT_C void ExternalizeParametersL( HBufC8*& aTarget,
-                                          const CIAUpdateParameters& aSource );
-
-    /**
-     * Internalizes CIAUpdateParameters from the source descriptor data.
-     *
-     * @param aTarget CIAUpdateParameters object that will be internalized.
-     * @param aSource Data that is used to internalize CIAUpdateParameters object.
-     * @exception Leaves with system wide error code.
-     */
-    IMPORT_C void InternalizeParametersL( CIAUpdateParameters& aTarget, 
-                                          const TDesC8& aSource );
-
-
-    /**
-     * Externalizes the descriptor to the stream with length information
-     *
-     * @param aDes Descriptor to externalize
-     * @param aStream Target stream
-     * @exception Leaves with system wide error code.
-     */
-    IMPORT_C void ExternalizeDesL( const TDesC& aDes, 
-                                   RWriteStream& aStream );
-
-    /**
-     * Internalizes a descriptor written with ExternalizeDesL() from the stream
-     *
-     * @param Target descriptor pointer. Old descriptor is deleted if the read is 
-     * successful.
-     * @param aStream Source stream
-     * @return Length of the read data
-     * @exception Leaves with system wide error code. 
-     */
-    IMPORT_C TInt InternalizeDesL( HBufC*& aDes, 
-                                   RReadStream& aStream );
-
-
-    /**
-     * @see ExternalizeDesL
-     */
-    IMPORT_C void ExternalizeDes8L( const TDesC8& aDes, 
-                                    RWriteStream& aStream );
-
-    /**
-     * @see InternalizeDesL
-     */
-    IMPORT_C TInt InternalizeDes8L( HBufC8*& aDes, 
-                                    RReadStream& aStream );
-
-    }
-
-#endif // IA_UPDATE_TOOLS_H
--- a/iaupdate/IAD/tools/src/iaupdatetools.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,252 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 module contains the implementation of IAUpdateTools functions
-*
-*/
-
-
-
-
-
-
-#include <s32mem.h>
-#include <iaupdateparameters.h>
-
-#include "iaupdatetools.h"
-#include "iaupdatedebug.h"
-
-// -----------------------------------------------------------------------------
-// IAUpdateTools::ExternalizeParametersL
-// 
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C void IAUpdateTools::ExternalizeParametersL( HBufC8*& aTarget,
-                                                     const CIAUpdateParameters& aSource )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateTools::ExternalizeParametersL begin");
-    // Notice!
-    // If you make changes here. Also, remember to make corresponding
-    // changes to the InternalizeParametersL
-
-    // The size of the buffer will contain:
-    // - 1 TInt for UIDs,
-    // - 1 TBool for ShowProgress boolean
-    // - 1 TUint for importance
-    // - 1 TUint for type
-    // - 1 TBool for Refresh boolean
-    
-    // - 3 TInt for descriptor lengths
-    // --> bytes for 5 + 3 = 8 TInt values are needed 
-    //     (sizeof( TInt ) * KNumberOfTInts)
-    // - 3 descriptor TDesC texts
-    const TInt KNumberOfTInts( 8 );
-
-    // Notice, that because descriptor texts that are included
-    // here are TDesC, their Size-information has to be used
-    // instead of Length.
-    HBufC8* tmp = 
-        HBufC8::NewLC( sizeof( TInt ) * KNumberOfTInts
-                       + aSource.SearchCriteria().Size()
-                       + aSource.CommandLineExecutable().Size()
-                       + aSource.CommandLineArguments().Size() );
-
-    // Create stream that uses the buffer created above.
-    // By using the stream, the values are easier to insert into the buffer.
-    TPtr8 ptr( tmp->Des() );    
-    RDesWriteStream stream( ptr );
-    CleanupClosePushL( stream );
-
-    // These are integers for uids
-    IAUPDATE_TRACE_1("[IAUPDATE] uid: %x", aSource.Uid().iUid );
-    stream.WriteInt32L( aSource.Uid().iUid );
-
-    // These are length and data pairs for descriptors
-    IAUPDATE_TRACE_1("[IAUPDATE] search criteria: %S", &aSource.SearchCriteria() );
-    ExternalizeDesL( aSource.SearchCriteria(), stream );
-    IAUPDATE_TRACE_1("[IAUPDATE] command line executable: %S", &aSource.CommandLineExecutable() );
-    ExternalizeDesL( aSource.CommandLineExecutable(), stream );
-#ifdef _DEBUG
-    HBufC* temp = HBufC::NewL( aSource.CommandLineArguments().Length() );
-    temp->Des().Copy( aSource.CommandLineArguments()) ;
-    IAUPDATE_TRACE_1("[IAUPDATE] command line arguments: %S", temp );
-    delete temp;
-#endif //_DEBUG
-    ExternalizeDes8L( aSource.CommandLineArguments(), stream );
-    
-    // Boolean for ShowProgress
-    stream.WriteInt32L( aSource.ShowProgress() );
-    
-    // TUint for importance
-    stream.WriteInt32L( aSource.Importance() );
-    
-    // TUint for type
-    stream.WriteInt32L( aSource.Type() );
-    
-    // Boolean for Refresh
-    stream.WriteInt32L( aSource.Refresh() );
-
-    // Stream is not needed anymore
-    CleanupStack::PopAndDestroy( &stream );
-
-    // Remove tmp from the stack but do not delete it because it will be
-    // assigned to the aTarget below.
-    CleanupStack::Pop( tmp );
-    
-    // Replace aTarget with new value
-    delete aTarget;
-    aTarget = tmp;
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateTools::ExternalizeParametersL end");
-    }
-
-// -----------------------------------------------------------------------------
-// IAUpdateTools::InternalizeParametersL
-// 
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C void IAUpdateTools::InternalizeParametersL( CIAUpdateParameters& aTarget, 
-                                                     const TDesC8& aSource )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateTools::InternalizeParametersL begin");
-    // Notice!
-    // If you make changes here. Also, remember to make corresponding
-    // changes to the ExternalizeParametersL
-
-    // InternalizeDesL function will set values into this tmp descriptor.
-    HBufC* tmp( NULL );
-    
-    // Create stream that uses the given buffer.
-    RDesReadStream stream( aSource );
-    CleanupClosePushL( stream );
-
-    aTarget.SetUid( TUid::Uid( stream.ReadInt32L() ) );
-    IAUPDATE_TRACE_1("[IAUPDATE] uid: %x", aTarget.Uid().iUid );
-    
-    InternalizeDesL( tmp, stream );
-    CleanupStack::PushL( tmp );
-    aTarget.SetSearchCriteriaL( *tmp );
-    IAUPDATE_TRACE_1("[IAUPDATE] search criteria: %S", tmp );
-    CleanupStack::PopAndDestroy( tmp );
-    tmp = NULL;
-        
-    InternalizeDesL( tmp, stream );
-    CleanupStack::PushL( tmp );
-    aTarget.SetCommandLineExecutableL( *tmp );
-    IAUPDATE_TRACE_1("[IAUPDATE] command line executable: %S", tmp );
-    CleanupStack::PopAndDestroy( tmp );
-    tmp = NULL;
-
-    HBufC8* tmp8( NULL );        
-    InternalizeDes8L( tmp8, stream );
-    CleanupStack::PushL( tmp8 );
-    aTarget.SetCommandLineArgumentsL( *tmp8 );
-#ifdef _DEBUG
-    tmp = HBufC::NewL( tmp8->Length() );
-    tmp->Des().Copy( *tmp8 ) ;
-    IAUPDATE_TRACE_1("[IAUPDATE] command line arguments: %S", tmp );
-    delete tmp;
-    tmp = NULL;
-#endif //_DEBUG
-    CleanupStack::PopAndDestroy( tmp8 );
-    tmp8 = NULL;
-    
-    aTarget.SetShowProgress( stream.ReadInt32L() );
-
-    // new parameters (in phase 2 IAD) do not always exist. Parameters may have written by old IAD in selfupdate case.
-    TRAPD( err, aTarget.SetImportance( stream.ReadInt32L() ) );
-    if ( err != KErrEof )
-        {
-        User::LeaveIfError( err );
-        aTarget.SetType( stream.ReadInt32L() );
-        aTarget.SetRefresh( stream.ReadInt32L() );
-        }
-     
-    IAUPDATE_TRACE_1("[IAUPDATE] show progress: %d", aTarget.ShowProgress() );
-    CleanupStack::PopAndDestroy( &stream );   
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateTools::InternalizeParametersL end");
-    }
-
-
-// -----------------------------------------------------------------------------
-// IAUpdateTools::ExternalizeDesL
-// 
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C void IAUpdateTools::ExternalizeDesL( const TDesC& aDes, 
-                                              RWriteStream& aStream )
-    {
-    aStream.WriteInt32L( aDes.Length() );
-    aStream.WriteL( aDes );
-    }
-
-// -----------------------------------------------------------------------------
-// IAUpdateTools::InternalizeDesL
-// 
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C TInt IAUpdateTools::InternalizeDesL( HBufC*& aDes, 
-                                              RReadStream& aStream )
-    {
-    TInt length = aStream.ReadInt32L();
-    if ( length > 0 ) 
-        {
-        HBufC* target = HBufC::NewLC( length );
-        TPtr ptr( target->Des() );        
-        aStream.ReadL( ptr, length );
-        delete aDes;
-        aDes = target;
-        CleanupStack::Pop( target );
-        }
-    else
-        {
-        delete aDes;
-        aDes = KNullDesC().AllocL();
-        }
-    return length;
-    }
-
-// -----------------------------------------------------------------------------
-// IAUpdateTools::ExternalizeDes8L
-// 
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C void IAUpdateTools::ExternalizeDes8L( const TDesC8& aDes, RWriteStream& aStream )
-    {
-    aStream.WriteInt32L( aDes.Length() );
-    aStream.WriteL( aDes );
-    }
-
-// -----------------------------------------------------------------------------
-// IAUpdateTools::InternalizeDes8L
-// 
-// -----------------------------------------------------------------------------
-// 
-EXPORT_C TInt IAUpdateTools::InternalizeDes8L( HBufC8*& aDes, RReadStream& aStream )
-    {
-    TInt length = aStream.ReadInt32L();
-    if ( length > 0 ) 
-        {
-        HBufC8* target = HBufC8::NewLC( length );
-        TPtr8 ptr( target->Des() );        
-        aStream.ReadL( ptr, length );
-        delete aDes;
-        aDes = target;
-        CleanupStack::Pop( target );
-        }
-    else
-        {
-        delete aDes;
-        aDes = KNullDesC8().AllocL();
-        }
-    return length;
-    }
Binary file iaupdate/IAD/ui/group/2000F85A.txt has changed
--- a/iaupdate/IAD/ui/group/backup_registration.xml	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<backup_registration version="1.0">
-    <proxy_data_manager sid = "0x10202BE9" />
-    <restore requires_reboot = "no"/>
-</backup_registration>
--- a/iaupdate/IAD/ui/group/bld.inf	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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:   Build information file for IA Update UI
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-
-
-PRJ_EXTENSIONS
-
-START EXTENSION s60/mifconv
-  OPTION TARGETFILE iaupdate.mif
-  OPTION HEADERFILE iaupdate.mbg
-  OPTION SOURCES \
-	-c8,8 qgn_prop_cale_accepted -c8,8 qgn_prop_swupd_failed \
-	-c8,8 qgn_indi_important_add -c8,8 qgn_indi_tb_swupd_start\
-        -c8,8 qgn_indi_tb_swupd_detail -c8,8 qgn_indi_tb_swupd_history
-END
-
-START EXTENSION s60/mifconv
-  OPTION TARGETFILE iaupdate_aif.mif
-  OPTION SOURCES -c8,8 qgn_menu_swupdate
-END
-
-
-PRJ_MMPFILES
-
-iaupdate.mmp
-
-
-PRJ_EXPORTS
-
-// Config file
-backup_registration.xml        /epoc32/release/winscw/udeb/z/private/2000F85A/backup_registration.xml
-backup_registration.xml        /epoc32/release/winscw/urel/z/private/2000F85A/backup_registration.xml
-backup_registration.xml        /epoc32/data/z/private/2000F85A/backup_registration.xml
--- a/iaupdate/IAD/ui/group/iaupdate.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
-* Copyright (c) 2007-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:   Project definition file of iaupdate.exe
-*
-*/
-
-
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-#include "../inc/iaupdateuids.h"
-
-CAPABILITY CAP_APPLICATION TrustedUI PowerMgmt
-
-VENDORID   VID_DEFAULT 
-
-PAGED
-
-TARGETPATH	/sys/bin
-TARGET      iaupdate.exe
-TARGETTYPE  exe
-
-UID               0x100039CE KIAUpdateUiUid
-
-SOURCEPATH        ../src
-SOURCE            iaupdateapplication.cpp 
-SOURCE            iaupdateappui.cpp
-SOURCE            iaupdatedocument.cpp 
-SOURCE            iaupdatemainview.cpp
-SOURCE            iaupdatemaincontainer.cpp
-SOURCE            iaupdateuicontroller.cpp
-SOURCE            iaupdatewaitdialog.cpp
-SOURCE            iaupdateprogressdialog.cpp
-SOURCE            iaupdateserver.cpp
-SOURCE            iaupdatesession.cpp
-SOURCE            iaupdatenodefilter.cpp
-SOURCE 		      iaupdatesettingdialog.cpp
-SOURCE 		      iaupdatedialogutil.cpp
-SOURCE            iaupdatehistorycontainer.cpp
-SOURCE            iaupdatehistoryview.cpp
-SOURCE            iaupdatestarter.cpp
-SOURCE            iaupdatestatusdialog.cpp 
-SOURCE            iaupdatedetailsdialog.cpp 
-SOURCE            iaupdatefwdetailsdialog.cpp 
-SOURCE            iaupdateuiconfigdata.cpp
-SOURCE            iaupdateagreement.cpp
-SOURCE            iaupdateautomaticcheck.cpp
-SOURCE            iaupdatefirsttimeinfo.cpp
-SOURCE            iaupdatefirsttimedatefile.cpp
-SOURCE            iaupdatequeryhistory.cpp
-SOURCE            iaupdatestatuspanehandler.cpp
-SOURCE            iaupdatenavipanehandler.cpp
-SOURCE            iaupdateaccesspointhandler.cpp
-SOURCE            iaupdateroaminghandler.cpp
-SOURCE            iaupdateparametersfilemanager.cpp
-SOURCE            iaupdategloballockhandler.cpp
-SOURCE            iaupdaterefreshhandler.cpp
-SOURCE            iaupdateinstallationlistener.cpp
-SOURCE            iaupdatedeputils.cpp
-SOURCE            iaupdateuitimer.cpp
-SOURCE            iaupdatenodeid.cpp
-
-USERINCLUDE       ../inc
-USERINCLUDE       ../../tools/inc
-USERINCLUDE       ../../api/client/inc
-USERINCLUDE       ../../engine/inc 
-USERINCLUDE       ../../updater/inc
-USERINCLUDE       ../../updater/updaterfiles/inc
-USERINCLUDE       ../../loc
-USERINCLUDE       ../../firmwareupdate/inc
-USERINCLUDE       ../../launcher/inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY           iaupdatetools.lib
-LIBRARY           iaupdateapi.lib
-LIBRARY           iaupdateengine.lib
-LIBRARY           iaupdaterfiles.lib
-LIBRARY           bafl.lib              // CDesC16Array
-LIBRARY           commonengine.lib      // StringLoader
-LIBRARY           euser.lib
-LIBRARY           apparc.lib
-LIBRARY           cone.lib 
-LIBRARY           eikcore.lib 
-LIBRARY           eikcoctl.lib          // CEikStatusPanelBase
-LIBRARY           avkon.lib  
-LIBRARY           sisregistryclient.lib // RSisRegistrySession RSisRegistryEntry
-LIBRARY           egul.lib
-LIBRARY           aknicon.lib
-LIBRARY           estor.lib
-LIBRARY			  efsrv.lib		        //RF
-LIBRARY           eikcdlg.lib
-LIBRARY           eikctl.lib
-LIBRARY           apgrfx.lib
-LIBRARY           ws32.lib 
-LIBRARY	          FeatMgr.lib
-LIBRARY           commdb.lib
-LIBRARY	          apsettingshandlerui.lib
-LIBRARY           ConnectionUiUtilities.lib
-LIBRARY           eikdlg.lib
-LIBRARY           centralrepository.lib
-LIBRARY           cmmanager.lib
-LIBRARY           xmlframework.lib	// Xml::CParser
-LIBRARY           aknskins.lib
-LIBRARY           hlplch.lib 
-LIBRARY           sysutil.lib
-LIBRARY           commonui.lib  //CErrorUi
-LIBRARY           ConnMon.lib
-LIBRARY           iaupdatefwupdate.lib
-LIBRARY           starterclient.lib
-
-DEBUGLIBRARY      flogger.lib
-
-
-// Path for resources
-SOURCEPATH .
-
-START RESOURCE	iaupdate.rss
-HEADER
-TARGETPATH	    APP_RESOURCE_DIR
-LANGUAGE_IDS
-END //RESOURCE
-
-
-START RESOURCE	iaupdate_reg.rss
-DEPENDS iaupdate.rsg
-TARGETPATH	/private/10003a3f/apps
-END //RESOURCE
-
-SMPSAFE
--- a/iaupdate/IAD/ui/group/iaupdate.rss	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1341 +0,0 @@
-/*
-* Copyright (c) 2007-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:   Resource definitions
-*
-*/
-
-
-
-NAME HELL
-
-#include <eikon.rh>
-#include <eikon.rsg>
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.hrh>
-#include <avkon.mbg>
-#include <avkon.loc>
-#include <appinstui.loc>
-#include <appinfo.rh>
-#include <iaupdate.mbg>
-#include <iaupdate.loc>
-#include "iaupdate.hrh"
-#include <data_caging_paths_strings.hrh>
-
-
-// ---------------------------------------------------------
-//   
-//    Define the resource file signature 
-//    This resource should be empty.
-//
-// ---------------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE { }
-
-// ---------------------------------------------------------
-//   
-//    Default Document Name
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_default_document_name { buf=""; }
-
-// ---------------------------------------------------------
-//   
-//    Define default menu and CBA key.
-//
-// ---------------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
-    {
-    status_pane = r_iaupdate_status_pane;
-    cba = r_iaupdate_softkeys_options_exit__options;
-    }
-        
-// ---------------------------------------------------------
-//   
-//    App Info
-//
-// ---------------------------------------------------------
-//
-RESOURCE LOCALISABLE_APP_INFO r_iaupdate_localisable_app_info
-	{
-	short_caption = qtn_swupdate_caption_grid_ph2;
-	caption_and_icon =
-		{
-		CAPTION_AND_ICON_INFO 
-			{
-			caption = qtn_swupdate_caption_list_ph2;
-			number_of_icons = 1;
-			icon_file = APP_BITMAP_DIR"\\iaupdate_aif.mif";
-			}
-		};
-	}
-
-
-
-
-// ---------------------------------------------------------
-//   
-//    Strings
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE TBUF r_iaupdate_refreshing_update_list
-    {
-    buf = qtn_swupdate_refreshing_update_list;	
-    }
-
-RESOURCE TBUF r_iaupdate_downloading_note
-    {
-    buf = qtn_swupdate_downloading;
-    }
-
-RESOURCE TBUF r_iaupdate_installing_note
-    {    
-    buf = qtn_swupdate_installing;
-    }
-
-RESOURCE TBUF r_iaupdate_name_with_version
-    {
-    buf = qtn_swupdate_name_with_version;
-    }
-
-RESOURCE TBUF r_iaupdate_des_required_update_kb
-    {
-    buf = qtn_swupdate_required_update_kb;
-    }
-    
-RESOURCE TBUF r_iaupdate_des_required_update_mb
-    {
-    buf = qtn_swupdate_required_update_mb;
-    }
-
-RESOURCE TBUF r_iaupdate_des_critical_update_kb
-    {
-    buf = qtn_swupdate_critical_update_kb;
-    }
-    
-RESOURCE TBUF r_iaupdate_des_critical_update_mb
-    {
-    buf = qtn_swupdate_critical_update_mb;
-    }
-
-RESOURCE TBUF r_iaupdate_des_critical_update_no_size
-    {
-    buf = qtn_swupdate_critical_update_no_size;
-    }
-    
-RESOURCE TBUF r_iaupdate_des_recommended_update_kb
-    {
-    buf = qtn_swupdate_recommended_update_kb;
-    }
-    
-RESOURCE TBUF r_iaupdate_des_recommended_update_mb
-    {
-    buf = qtn_swupdate_recommended_update_mb;
-    }    
-    
-RESOURCE TBUF r_iaupdate_des_normal_update_kb
-    {
-    buf = qtn_swupdate_normal_update_kb;
-    }
-    
-RESOURCE TBUF r_iaupdate_des_normal_update_mb
-    {
-    buf = qtn_swupdate_normal_update_mb;
-    }
-    
-RESOURCE TBUF r_iaupdate_text_no_updates    
-    {    
-    buf = qtn_swupdate_empty_no_updates_available;
-    }
-
-RESOURCE TBUF r_iaupdate_refresh_failed    
-    {    
-    buf = qtn_swupdate_refresh_failed;
-    }
-    
-RESOURCE TBUF r_iaupdate_program_update
-    {
-    buf = qtn_swupdate_program_update;
-    }
-
-RESOURCE TBUF r_iaupdate_program_automatic_update_disabled
-    { 
-    buf = qtn_swupdate_program_automatic_update_disabled_ph2;
-    }
-
-
-//
-// pc udpate dialog resources
-//
-
-RESOURCE TBUF r_iaupdate_new_sw_title
-    {
-    buf = qtn_swupdate_new_sw_title;
-    }
-
-RESOURCE TBUF r_iaupdate_info_nsu_1
-    {
-    buf = qtn_swupdate_info_nsu_1;
-    }
-
-RESOURCE TBUF r_iaupdate_info_nsu_2
-    {
-    buf = qtn_swupdate_info_nsu_2;
-    }
-
-// -----------------------------------------------------------------------------
-//
-//    r_iaupdate_msk_mark
-//    Middle softkey label: Mark
-//
-// -----------------------------------------------------------------------------
-//  
-RESOURCE TBUF r_iaupdate_msk_mark
-    {
-    buf = qtn_msk_mark;	
-    }
-    
-// -----------------------------------------------------------------------------
-//
-//    r_iaupdate_msk_unmark
-//    Middle softkey label: Unmark
-//
-// -----------------------------------------------------------------------------
-//  
-RESOURCE TBUF r_iaupdate_msk_unmark
-    {
-    buf = qtn_msk_unmark;	
-    } 
-	    
-// ---------------------------------------------------------
-//   
-//    Define status pane.
-//
-// ---------------------------------------------------------
-//
-RESOURCE STATUS_PANE_APP_MODEL r_iaupdate_status_pane
-    {
-    layout = R_AVKON_STATUS_PANE_LAYOUT_USUAL;
-    panes =
-        {		
-        SPANE_PANE
-            {
-            id = EEikStatusPaneUidTitle;
-            type = EAknCtTitlePane;
-            resource = r_iaupdate_title_pane_text;
-            }
-        };
-    }
-    
-//----------------------------------------------------
-//   
-//    r_iaupdate_title_pane_text
-//    title pane resource for status pane
-//
-//----------------------------------------------------
-//
-RESOURCE TITLE_PANE r_iaupdate_title_pane_text
-    {
-    txt = qtn_swupdate_title_ph2;
-    }
-    
-
-// ---------------------------------------------------------
-//   
-//   r_iaupdate_refresh_dialog
-//   Refresh dialog
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE DIALOG r_iaupdate_refresh_dialog
-    {
-    flags = EAknWaitNoteFlags;
-
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EGeneralNote;
-            control = AVKON_NOTE
-                {
-                layout = EWaitLayout;
-                singular_label = qtn_swupdate_refreshing_update_list;
-                imagefile = AVKON_BITMAP_FILE;
-                imageid = EMbmAvkonQgn_note_progress;
-                imagemask = EMbmAvkonQgn_note_progress_mask;
-                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
-                };
-            }
-        };
-    }
-    
-   
-  
-
-
-//------------------------------------------------------------------------------
-//
-//    r_iaupdate_wait_dialog
-//    Defines a wait dialog
-//
-//------------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_iaupdate_wait_dialog
-    {
-    flags = EAknWaitNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_CANCEL;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EGeneralNote;
-            control = AVKON_NOTE
-                {
-                layout = EWaitLayout;
-                animation = R_QGN_GRAF_WAIT_BAR_ANIM;                
-                };
-            }
-        };
-    }
-
-//------------------------------------------------------------------------------
-//
-//    r_iaupdate_progress_dialog
-//    Defines a progress dialog
-//
-//------------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_iaupdate_progress_dialog
-    {
-    flags = EAknProgressNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_CANCEL;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EAknNoteProgressBar;
-            control = AVKON_NOTE
-                {
-                layout = EProgressLayout;                            
-                };
-            }
-        };
-    }
-
-//----------------------------------------------------
-//
-// r_fota_check_wait_note
-//
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_fota_check_wait_note
-    {
-    flags = EAknWaitNoteFlags;
-    buttons = R_AVKON_SOFTKEYS_CANCEL;
-    items =
-        {
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EGeneralNote;
-            control = AVKON_NOTE 
-                {
-                layout = EWaitLayout;
-                singular_label = qtn_gen_note_processing;
-                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
-                };
-            }
-        };
-    } 
-
-
-//------------------------------------------------------------------------------
-// Softkey resource
-//------------------------------------------------------------------------------
-//
-RESOURCE CBA r_iaupdate_softkeys_options_exit__options
-    {
-    buttons =
-        {
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyOptions;
-            txt = text_softkey_option;
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyExit;
-            txt = text_softkey_exit;
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyOptions;
-            txt = text_softkey_option;
-            }
-        };
-    }
-
-
-// ---------------------------------------------------------
-//   
-//   r_iaupdate_main_view
-//   Main view
-//
-// ---------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_iaupdate_main_view
-    {
-    menubar = r_iaupdate_main_menubar;
-    cba = r_iaupdate_softkeys_options_exit__options;
-    toolbar = r_iaupdate_main_toolbar;
-    }
-
-    
-// ---------------------------------------------------------
-//   
-//   r_iaupdate_text_title_main_view
-//   title pane resource for status pane in main view
-//
-// ---------------------------------------------------------
-//   
-RESOURCE TBUF r_iaupdate_text_title_main_view
-    {
-    buf = qtn_swupdate_title_ph2;
-    }
-
-// ---------------------------------------------------------
-//   
-//   r_iaupdate_main_menubar
-//   Menu for main view
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE MENU_BAR r_iaupdate_main_menubar
-    {
-    titles =
-        {
-        MENU_TITLE {menu_pane = r_iaupdate_main_menu;}
-        };
-    }
-
-// ---------------------------------------------------------
-//   
-//   r_iaupdate_main_menu
-//   Menu for main view
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE MENU_PANE r_iaupdate_main_menu
-    {
-    items = 
-        {
-        MENU_ITEM 
-            {
-            command = EIAUpdateCmdStartUpdate; 
-            txt = qtn_swupdate_option_start_update;
-            },
-        MENU_ITEM
-            {
-            command = EIAUpdateCmdUpdateWithPC;
-            txt = qtn_swupdate_option_update_with_pc;
-            },
-        MENU_ITEM 
-            {
-            command = EAknCmdMark; 
-            txt = qtn_options_list_mark_one;
-            flags = EEikMenuItemAction;  
-            },
-        MENU_ITEM 
-            {
-            command = EAknCmdUnmark; 
-            txt = qtn_options_list_unmark_one;
-            flags = EEikMenuItemAction;
-            },
-        MENU_ITEM 
-            {
-            command = EIAUpdateCmdUpdateDetails; 
-            txt = qtn_swupdate_option_update_details;
-            flags = EEikMenuItemSpecific; 
-            },
-        MENU_ITEM 
-            {
-            command = EIAUpdateCmdUpdateHistory; 
-            txt = qtn_swupdate_option_update_history;
-            },
-        MENU_ITEM 
-            {
-            command = EIAUpdateCmdSettings; 
-            txt = qtn_swupdate_option_settings;
-            },
-        MENU_ITEM 
-            {
-            command = EIAUpdateCmdDisclaimer; 
-            txt = qtn_swupdate_option_disclaimer;
-            },
-        MENU_ITEM 
-            {
-            command = EAknCmdHelp;
-            txt = qtn_options_help;
-            },
-        MENU_ITEM 
-            {
-            command = EAknCmdExit;   
-            txt = qtn_options_exit;
-            }
-            
-        };
-    }
-
-
-//----------------------------------------------------
-//
-//    r_iaupdate_main_toolbar
-//
-//
-//
-//----------------------------------------------------
-//
-RESOURCE AVKON_TOOLBAR r_iaupdate_main_toolbar
-    {
-    flags = KAknToolbarFixed;
-    items =
-        {
-        TBAR_CTRL
-            {
-            type = EAknCtButton;
-            id = EIAUpdateCmdStartUpdate;
-            control = AVKON_BUTTON
-                {
-                flags = KAknButtonSizeFitText; 
-                states =
-                    {
-                    AVKON_BUTTON_STATE
-                        {
-                        helptxt = qtn_swupdate_tb_tooltip_start_update;
-                        bmpfile = BITMAP_DIR"\\iaupdate.mif";
-#ifndef __S60_32__
-                        bmpid = EMbmIaupdateQgn_indi_tb_swupd_start;
-                        bmpmask = EMbmIaupdateQgn_indi_tb_swupd_start_mask;
-#endif
-                        } 
-                    };            
-                };
-            },
-        TBAR_CTRL
-            {
-            type = EAknCtButton;
-            id = EIAUpdateCmdMarkedUpdateDetails;
-            control = AVKON_BUTTON
-                {
-                flags = KAknButtonSizeFitText; 
-                states =
-                    {
-                    AVKON_BUTTON_STATE
-                        {
-                        helptxt = qtn_swupdate_tb_tooltip_details;
-                        bmpfile = BITMAP_DIR"\\iaupdate.mif";
-#ifndef __S60_32__
-                        bmpid = EMbmIaupdateQgn_indi_tb_swupd_detail;
-                        bmpmask = EMbmIaupdateQgn_indi_tb_swupd_detail_mask;
-#endif
-                        }  
-                    };            
-                };
-            },
-        TBAR_CTRL
-            {
-            type = EAknCtButton;
-            id = EIAUpdateCmdUpdateHistory;
-            control = AVKON_BUTTON
-                {
-                flags = KAknButtonSizeFitText; 
-                states =
-                    {
-                    AVKON_BUTTON_STATE
-                        {
-                        helptxt = qtn_swupdate_tb_tooltip_history;
-                        bmpfile = BITMAP_DIR"\\iaupdate.mif";
-#ifndef __S60_32__
-                        bmpid = EMbmIaupdateQgn_indi_tb_swupd_history;
-                        bmpmask = EMbmIaupdateQgn_indi_tb_swupd_history_mask;
-#endif
-                        }  
-                    };            
-                };
-            }
-        };
-    }
-
-
-
-
-
-   
-// ---------------------------------------------------------
-//   
-//   r_iaupdate_updates_list
-//   List of updates available
-//
-// ---------------------------------------------------------
-RESOURCE LISTBOX r_iaupdate_updates_list
-    {
-    flags = EAknListBoxMultiselectionList;
-    }
-
-	    
-// ---------------------------------------------------------
-//   
-//   r_iaupdate_history_list
-//   List of update history
-//
-// ---------------------------------------------------------
-RESOURCE LISTBOX r_iaupdate_history_list
-    {
-    flags = EAknListBoxSelectionList;
-    }
-
-// ---------------------------------------------------------
-//   
-//   r_iaupdate_history_view
-//   History view
-//
-// ---------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_iaupdate_history_view
-    {
-    cba = R_AVKON_SOFTKEYS_BACK;
-    }
-       
-
-
-// ---------------------------------------------------------
-//   
-//   Strings
-//
-// ---------------------------------------------------------
-//
-
-
-RESOURCE TBUF r_iaupdate_navipane_kilobyte 
-    {
-    buf = qtn_swupdate_navipane_kilobyte;
-    }
-
-RESOURCE TBUF r_iaupdate_navipane_megabyte 
-    {
-    buf = qtn_swupdate_navipane_megabyte;
-    }
-
-     
-RESOURCE TBUF r_iaupdate_no_updates_done
-    { 
-    buf = qtn_swupdate_no_updates_done_main_pane;
-    }
-
-RESOURCE TBUF r_iaupdate_text_download_cancelled
-    {
-    buf = qtn_swupdate_download_cancelled;
-    }
-    
-RESOURCE TBUF r_iaupdate_text_download_failed
-    {
-    buf = qtn_swupdate_download_failed;
-    }
-
-RESOURCE TBUF r_iaupdate_text_install_cancelled
-    {
-    buf = qtn_swupdate_installation_cancelled;
-    }
-    
-RESOURCE TBUF r_iaupdate_text_install_failed
-    {
-    buf = qtn_swupdate_installation_failed;
-    }
-
-RESOURCE TBUF r_iaupdate_text_update_successfull
-    {
-    buf = qtn_swupdate_update_successful;
-    }
-
-RESOURCE TBUF r_iaupdate_text_update_no_memory
-    {
-    buf = qtn_swupdate_not_enough_memory;
-    }
-
-RESOURCE TBUF r_iaupdate_text_title_pane_history
-    {
-    buf = qtn_swupdate_history_title;
-    }
-
-RESOURCE TBUF r_iaupdate_firmware_with_others
-    {
-    buf = qtn_swupdate_firmware_with_others;
-    }
-
-RESOURCE TBUF r_iaupdate_cannot_omit
-    {
-    buf = qtn_swupdate_cannot_omit;
-    }
-
-RESOURCE TBUF r_iaupdate_main_device_fw
-    {
-    buf  = qtn_swupdate_main_device_fw;
-    }
-
-//background check strings
-
-RESOURCE LBUF r_iaupdate_update_available
-    {
-    txt = qtn_swupdate_update_available;
-    }
-
-RESOURCE LBUF r_iaupdate_features_available
-    {
-    txt = qtn_swupdate_features_available_query;
-    }
-
-RESOURCE LBUF r_iaupdate_remind_later
-    {
-    txt = qtn_swupdate_remind_later;
-    }
-
-RESOURCE LBUF r_text_softkey_later
-    {
-    txt = text_softkey_later;
-    }
-
-RESOURCE LBUF r_text_softkey_show
-    {
-    txt = text_softkey_show;
-    }
-
-RESOURCE LBUF r_text_softkey_yes
-    {
-    txt = text_softkey_yes;
-    }
-
-RESOURCE LBUF r_text_softkey_no
-    {
-    txt = text_softkey_no;
-    }
-
-RESOURCE LBUF r_text_softkey_ok
-    {
-    txt = text_softkey_ok;
-    }
-
-RESOURCE LBUF r_text_softkey_cancel
-    {
-    txt = text_softkey_cancel;
-    }
-
-//
-// Utility resources
-//
-
-
-//------------------------------------------------------------------------------
-// message query resource
-//------------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_iaupdate_message_query
-    {
-    flags = EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
-    items=
-        {
-        DLG_LINE 
-            {
-            type = EAknCtPopupHeadingPane;
-            id = EAknMessageQueryHeaderId;
-            control = AVKON_HEADING
-                {
-                };
-            },
-        DLG_LINE
-            {
-            type = EAknCtMessageQuery;
-            id = EAknMessageQueryContentId;
-            control = AVKON_MESSAGE_QUERY
-                {
-                };
-            }
-        };
-    }
-
-
-//------------------------------------------------------------------------------
-// confirmation query resource
-//------------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_iaupdate_confirmation_query
-	{ 
-	flags=EGeneralQueryFlags;
-	buttons=R_AVKON_SOFTKEYS_YES_NO__YES;
-	items=
-		{
-		DLG_LINE
-			{
-			type=EAknCtQuery;
-			id=EGeneralQuery;
-			control=AVKON_CONFIRMATION_QUERY
-				{
-				layout=EConfirmationLayout;
-				};
-			}
-		};
-	} 
-
-//------------------------------------------------------------------------------
-// information query resource
-//------------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_iaupdate_information_query
-    {
-    flags=EGeneralQueryFlags;
-    buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
-    items=
-        {
-        DLG_LINE
-            {
-            type=EAknCtQuery;
-            id=EGeneralQuery;
-            control= AVKON_CONFIRMATION_QUERY
-                {
-                layout = EConfirmationQueryLayout;
-                animation = R_QGN_NOTE_INFO_ANIM;
-                };
-            }
-        };
-    }
-
-
-//
-// Not enough memory dialog resources
-//
-
-RESOURCE TBUF r_iaupdate_insufficient_memory
-    {
-    buf = qtn_swupdate_insufficient_memory;
-    }
-
-//
-// Automatic updates check dialog resources
-//
-
-    
-RESOURCE TBUF r_iaupdate_turn_on_autoupd_checks
-    {
-    buf = qtn_swupdate_turn_on_autoupd_checks;
-    }
-
-
-//
-// Phone restart query dialog resources
-//
-RESOURCE TBUF r_iaupdate_phone_restart_query
-    {
-    buf = qtn_swupdate_phone_restart_query;
-    }
-
-
-//
-// Activate automatic network connections dialog resources
-//
-
-RESOURCE TBUF r_iaupdate_allow_nw_title
-    {
-    buf = qtn_swupdate_allow_nw_title;
-    }
-   
-//
-// Dependencies found dialog resources
-//
-
-RESOURCE TBUF r_iaupdate_dependency_title
-    {
-    buf = qtn_swupdate_dependency_title; 	
-    }
-
-RESOURCE TBUF r_iaupdate_dependency_mark_one
-    {
-    buf = qtn_swupdate_dependency_mark_one; 
-    }    
-
-RESOURCE TBUF r_iaupdate_dependency_unmark_one
-    {
-    buf = qtn_swupdate_dependency_unmark_one; 	
-    }
-
-RESOURCE TBUF r_iaupdate_dependency_mark_many
-    {
-    buf = qtn_swupdate_dependency_mark_many; 	
-    }
-    
-RESOURCE TBUF r_iaupdate_dependency_unmark_many
-    {
-    buf = qtn_swupdate_dependency_unmark_many; 	
-    }
-
-RESOURCE TBUF r_iaupdate_separator
-    {
-    buf = qtn_swupdate_separator;
-    }
-
-
-//
-// Update status dialog resources
-//
-
-RESOURCE TBUF r_iaupdate_status_dialog_title
-    {
-    buf = qtn_swupdate_results;
-    }
-
-RESOURCE TBUF r_iaupdate_status_dialog_successful
-    {
-    buf = qtn_swupdate_successful;
-    }
-
-RESOURCE TBUF r_iaupdate_status_dialog_successful_one
-    {
-    buf = qtn_swupdate_successful_one;
-    }
-RESOURCE TBUF r_iaupdate_status_dialog_cancelled
-    {
-    buf = qtn_swupdate_cancelled;
-    }
-
-RESOURCE TBUF r_iaupdate_status_dialog_cancelled_one
-    {
-    buf = qtn_swupdate_cancelled_one;
-    }
-
-RESOURCE TBUF r_iaupdate_status_dialog_failed
-    {
-    buf = qtn_swupdate_failed;
-    }
-
-RESOURCE TBUF r_iaupdate_status_dialog_failed_one
-    {
-    buf = qtn_swupdate_failed_one;
-    }
-
-RESOURCE TBUF r_iaupdate_close_all
-    {
-    buf = qtn_swupdate_close_all;	
-    }    
-
-RESOURCE TBUF r_iaupdate_status_dialog_text_link
-    {
-    buf = qtn_swupdate_text_link;
-    }
-
-
-
-//
-// Update details dialog resources
-//
-
-RESOURCE TBUF r_iaupdate_details_dialog_title
-    {
-    buf = qtn_swupdate_details_title;
-    }
-
-RESOURCE TBUF r_iaupdate_details_dialog_app_name
-    {
-    buf = qtn_swupdate_application_name;
-    }
-
-RESOURCE TBUF r_iaupdate_details_dialog_description
-    {
-    buf = qtn_swupdate_description;
-    }
-
-RESOURCE TBUF r_iaupdate_details_dialog_version
-    {
-    buf = qtn_swupdate_version;
-    }
-
-RESOURCE TBUF r_iaupdate_details_dialog_version_format
-    {
-    buf = qtn_swupdate_version_format;
-    }
-
-RESOURCE TBUF r_iaupdate_details_dialog_file_size
-    {
-    buf = qtn_swupdate_file_size;
-    }
-
-RESOURCE TBUF r_iaupdate_details_dialog_size_kilobyte
-    {
-    buf = qtn_swupdate_size_kilobyte;
-    }
-
-RESOURCE TBUF r_iaupdate_details_dialog_size_megabyte
-    {
-    buf = qtn_swupdate_size_megabyte;
-    }
-
-RESOURCE TBUF r_iaupdate_fw_description
-    {
-    buf = qtn_swupdate_fw_description_text;
-    }
-
-
-//
-// Settings dialog resources
-//
-
-RESOURCE TBUF r_iaupdate_setting_dialog_title
-    {
-    buf = qtn_swupdate_setting_dialog_title;
-    }
-
-
-RESOURCE MENU_BAR r_iaupdate_setting_dialog_menu
-	{
-	titles= 
-	    { 
-	    MENU_TITLE 
-                { 
-	        menu_pane=r_iaupdate_setting_dialog_menu_pane;
-	        }
-	    };
-	}
-
-
-RESOURCE MENU_PANE r_iaupdate_setting_dialog_menu_pane
-    {
-    items=
-        {
-	MENU_ITEM { command=EAknCmdOpen; txt=qtn_options_change; flags = EEikMenuItemAction; },
-		
-    	MENU_ITEM { command=EAknCmdHelp; txt=qtn_options_help; },
-    	
-	MENU_ITEM { command=EAknCmdExit; txt=qtn_options_exit; }        
-        };
-    }
-
-
-//------------------------------------------------------------------------------
-// Softkey resource
-//------------------------------------------------------------------------------
-//
-RESOURCE CBA r_cba_options_back_change
-    {
-    buttons =
-        {
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyOptions;
-            txt = text_softkey_option;
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyBack;
-            txt = text_softkey_back;
-            },
-        CBA_BUTTON
-            {
-            id = EAknSoftkeyOpen;
-            txt = qtn_msk_change;
-            }
-        };
-    }
-
-
-
-// -----------------------------------------------------------------------------
-// setting dialog resource.
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_iaupdate_setting_dialog
-    {
-    flags=EEikDialogFlagWait | 
-          EEikDialogFlagFillAppClientRect | 
-          EEikDialogFlagNotifyEsc | 
-          EEikDialogFlagCbaButtons;
-    
-    buttons = r_cba_options_back_change;
-    
-    items=
-        {
-        DLG_LINE
-            {
-            type=EAknCtLastControlId;
-	          itemflags=EEikDlgItemTakesEnterKey;
-	          id=EIAUpdateSettingDialogList;
-	          control=AVKON_SETTING_ITEM_LIST
-	          {
-	          items =
-                  {
-                  AVKON_SETTING_ITEM
-                      {
-                      identifier = EIAUpdateSettingAccessPoint;
-                      name = qtn_swupdate_default_access_point;
-                      },
-                 AVKON_SETTING_ITEM
-                     {
-                     identifier = EIAUpdateSettingAutoUpdateCheck;
-                     name = qtn_swupdate_automatic_update_checks;
-                     setting_page_resource = r_iaupdate_auto_update_check_setting_page;
-                     associated_resource = r_iaupdate_auto_update_check_texts;
-                     }
-                 };
-	          };
-            }
-        };
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_iaupdate_default_connection
-// ?description
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_iaupdate_default_connection
-    {
-    buf = qtn_swupdate_default_connection;
-    }
-
-
-
-// -----------------------------------------------------------------------------
-//
-// r_iaupdate_roaming_warning_texts
-// ?description
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_POPUP_SETTING_TEXTS r_iaupdate_auto_update_check_texts
-    {
-    flags = 0;
-    setting_texts_resource = r_iaupdate_auto_update_check_texts_array;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_iaupdate_auto_update_check_texts
-// ?description
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_iaupdate_auto_update_check_texts_array
-    {
-    items =
-        {
-        AVKON_ENUMERATED_TEXT { value = EIAUpdateSettingValueEnable; 
-                                text = qtn_swupdate_checks_enabled; },
-        AVKON_ENUMERATED_TEXT { value = EIAUpdateSettingValueDisableWhenRoaming;  
-                                text = qtn_swupdate_checks_no_when_roaming; },
-        AVKON_ENUMERATED_TEXT { value = EIAUpdateSettingValueDisable;  
-                                text = qtn_swupdate_checks_disabled; }
-        };
-    }
-    
-// -----------------------------------------------------------------------------
-//
-// r_iaupdate_roaming_warning_texts
-// ?description
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_POPUP_SETTING_TEXTS r_iaupdate_roaming_warning_texts
-    {
-    flags = 0;
-    setting_texts_resource = r_iaupdate_roaming_warning_texts_array;
-    }
-
-
-RESOURCE ARRAY r_iaupdate_roaming_warning_texts_array
-    {
-    items =
-        {
-        AVKON_ENUMERATED_TEXT { value = EIAUpdateSettingValueOn; 
-                                text = qtn_swupdate_roaming_warn_on; },
-        AVKON_ENUMERATED_TEXT { value = EIAUpdateSettingValueOff;  
-                                text = qtn_swupdate_roaming_warn_off; }
-        };
-    }
-    
-
-// -----------------------------------------------------------------------------
-//
-// r_iaupdate_auto_update_check_setting_page
-// ?description
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_iaupdate_auto_update_check_setting_page
-    {
-    label = qtn_swupdate_automatic_update_checks;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    type = EAknCtPopupSettingList;
-    editor_resource_id = r_iaupdate_empty_popup_setting_list_control;
-    }
-
-    
-// -----------------------------------------------------------------------------
-//
-// r_iaupdate_roaming_warning_setting_page
-// ?description
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_iaupdate_roaming_warning_setting_page
-    {
-    label = qtn_swupdate_roaming_warning;
-    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
-    type = EAknCtPopupSettingList;
-    editor_resource_id = r_iaupdate_empty_popup_setting_list_control;
-    }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_iaupdate_empty_popup_setting_list_control
-// ?description
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE POPUP_SETTING_LIST r_iaupdate_empty_popup_setting_list_control
-    {
-    }
-
-
-
-//
-// Agreement dialog resources
-//
-
-RESOURCE TBUF r_iaupdate_agreement_dialog_title
-    {
-    buf = qtn_swupdate_nokia_agreement_title;
-    }
-
-RESOURCE TBUF r_iaupdate_agreement_dialog_text_1
-    {
-    buf = qtn_swupdate_nokia_agreement_1_phase2;
-    }
-
-RESOURCE TBUF r_iaupdate_agreement_dialog_text_2
-    {
-    buf = qtn_swupdate_nokia_agreement_2_phase2;
-    }
-
-RESOURCE TBUF r_iaupdate_agreement_dialog_text_3
-    {
-    buf = qtn_swupdate_nokia_agreement_3_phase2;
-    }
-
-RESOURCE TBUF r_iaupdate_agreement_dialog_text_4
-    {
-    buf = qtn_swupdate_nokia_agreement_4_phase2;
-    }
-    
-RESOURCE TBUF r_iaupdate_agreement_dialog_text_5
-    {
-    buf = qtn_swupdate_nokia_agreement_5_phase2;
-    }
-    
-RESOURCE TBUF r_iaupdate_agreement_dialog_text_6
-    {
-    buf = qtn_swupdate_nokia_agreement_6_phase2;
-    }
-    
-RESOURCE TBUF r_iaupdate_agreement_dialog_text_7
-    {
-    buf = qtn_swupdate_nokia_agreement_7_phase2;
-    }
-    
-RESOURCE TBUF r_iaupdate_agreement_dialog_text_8
-    {
-    buf = qtn_swupdate_nokia_agreement_8_phase2;
-    }
-    
-RESOURCE TBUF r_iaupdate_agreement_dialog_text_9
-    {
-    buf = qtn_swupdate_nokia_agreement_9_phase2;
-    }
-    
-RESOURCE TBUF r_iaupdate_agreement_dialog_copyright
-    {
-    buf = qtn_swupdate_nokia_agreement_copyright_phase2;
-    }
-//------------------------------------------------------------------------------
-//
-//    r_iaupdate_softkeys_accept_decline__accept
-//    Defines softkeys accept, decline, accept (MSK)
-//
-//------------------------------------------------------------------------------
-//
-RESOURCE CBA r_iaupdate_softkeys_accept_decline__accept
-    {
-    buttons =
-        {
-        CBA_BUTTON { id = EAknSoftkeyYes; txt = text_softkey_accept; },
-        CBA_BUTTON { id = EAknSoftkeyNo; txt = qtn_swupdate_softkey_decline; },
-        CBA_BUTTON { id = EAknSoftkeyYes; txt = text_softkey_accept; }
-        };
-    }
-
-
-//------------------------------------------------------------------------------
-//
-//    r_iaupdate_softkeys_now_later__now
-//    Defines softkeys now, later, now (MSK)
-//
-//------------------------------------------------------------------------------
-//
-RESOURCE CBA r_iaupdate_softkeys_now_later__now
-    {
-    buttons =
-        {
-        CBA_BUTTON { id = EIAUpdateSoftkeyNow; txt = qtn_swupdate_now; },
-        CBA_BUTTON { id = EIAUpdateSoftkeyLater; txt = qtn_swupdate_later; },
-        CBA_BUTTON { id = EIAUpdateSoftkeyNow; txt = qtn_swupdate_now; }
-        };
-    }
-    
-//------------------------------------------------------------------------------
-//
-//    r_iaupdate_softkeys_continue_cancel__continue
-//    Defines softkeys continue, canclel, continue (MSK)
-//
-//------------------------------------------------------------------------------
-//
-RESOURCE CBA r_iaupdate_softkeys_continue_cancel__continue
-    {
-    buttons =
-        {
-        CBA_BUTTON { id = EAknSoftkeyOk; txt = text_softkey_continue; },
-        CBA_BUTTON { id = EAknSoftkeyCancel; txt = text_softkey_cancel; },
-        CBA_BUTTON { id = EAknSoftkeyOk; txt = text_softkey_continue; }
-        };
-    }
-
--- a/iaupdate/IAD/ui/group/iaupdate_reg.rss	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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:   registration resource file
-*
-*/
-
-
-
-#include <appinfo.rh>
-#include <iaupdate.rsg>
-#include <data_caging_paths_strings.hrh>
-#include "iaupdateuids.h"
-
-UID2 KUidAppRegistrationResourceFile
-UID3 KIAUpdateUiUid
-
-RESOURCE APP_REGISTRATION_INFO 
-	{
-	app_file = "iaupdate";
-        localisable_resource_file = APP_RESOURCE_DIR"\\iaupdate";
-        localisable_resource_id = R_IAUPDATE_LOCALISABLE_APP_INFO;  
-        newfile = KAppDoesNotSupportNewFile;
-        hidden = KAppIsHidden; 
-	}
-
-// End of File
-
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/iaupdate.pro	Mon May 03 12:38:03 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:   
+#                
+
+
+TEMPLATE = app
+TARGET = iaupdate
+
+
+symbian {
+    TARGET.UID3 = 0x2000F85A
+    TARGET.CAPABILITY = CAP_APPLICATION TrustedUI PowerMgmt
+    rssrules = "hidden = KAppIsHidden;"
+    RSS_RULES += rssrules
+}
+
+DEPENDPATH += .
+DEPENDPATH += ./src
+DEPENDPATH += ./inc
+
+INCLUDEPATH += .
+INCLUDEPATH += ../engine/inc
+INCLUDEPATH += ../api/client/inc
+INCLUDEPATH += ../updater/inc
+INCLUDEPATH += ../updater/updaterfiles/inc
+INCLUDEPATH += ../firmwareupdate/inc
+INCLUDEPATH += ../launcher/inc
+
+CONFIG += hb
+
+# Input
+SOURCES += iaupdatemain.cpp \
+    iaupdateapplication.cpp \
+    iaupdatemainwindow.cpp \
+    iaupdatemainview.cpp \
+    iaupdatehistoryview.cpp \
+    iaupdateengine.cpp \
+    iaupdateagreement.cpp \
+    iaupdateautomaticcheck.cpp \
+    iaupdatedeputils.cpp \ 
+    iaupdatefirsttimedatefile.cpp \
+    iaupdatefirsttimeinfo.cpp \
+    iaupdategloballockhandler.cpp \
+    iaupdateinstallationlistener.cpp \
+    iaupdatenodefilter.cpp \
+    iaupdateparametersfilemanager.cpp \
+    iaupdatequeryhistory.cpp \
+    iaupdaterefreshhandler.cpp \
+    iaupdateroaminghandler.cpp \ 
+    iaupdatestarter.cpp \
+    iaupdateuiconfigdata.cpp \
+    iaupdateuicontroller.cpp \
+    iaupdateuitimer.cpp \
+    iaupdateserviceprovider.cpp \
+    iaupdatewaitdialog.cpp \
+    iaupdatenodeid.cpp \
+    iaupdatetools.cpp
+    
+
+HEADERS = iaupdateapplication.h \
+    iaupdatemainwindow.h \
+    iaupdatehistoryview.h \
+    iaupdatemainview.h \
+    iaupdateengine.h \
+    iaupdatewaitdialog.h \
+    iaupdatewaitdialogobserver.h \
+    iaupdateagreement.h \
+    iaupdateautomaticcheck.h \
+    iaupdatedeputils.h \
+    iaupdatefileconsts.h \
+    iaupdatefirsttimedatefile.h \
+    iaupdatefirsttimeinfo.h \
+    iaupdategloballockhandler.h \
+    iaupdateinstallationlistener.h \
+    iaupdatenodefilter.h \
+    iaupdateparametersfilemanager.h \
+    iaupdateprivatecrkeys.h \
+    iaupdatequeryhistory.h \
+    iaupdaterefreshhandler.h \
+    iaupdaterefreshobserver.h \
+    iaupdaterequestobserver.h \
+    iaupdateresultsinfo.h \
+    iaupdateroaminghandler.h \
+    iaupdateroaminghandlerobserver.h \
+    iaupdatestarter.h \
+    iaupdatestarterobserver.h \
+    iaupdateuiconfigconsts.h \
+    iaupdateuiconfigdata.h \
+    iaupdateuicontroller.h \
+    iaupdateuicontrollerobserver.h \
+    iaupdateuidefines.h \
+    iaupdateuids.h \
+    iaupdateuitimer.h \
+    iaupdateserviceprovider.h \
+    iaupdatenodeid.h \
+    iaupdatetools.h
+
+
+LIBS += -lbafl
+LIBS += -liaupdateengine
+LIBS += -liaupdateapi
+LIBS += -liaupdatefwupdate
+LIBS += -liaupdaterfiles
+LIBS += -lflogger
+LIBS += -lxqservice
+LIBS += -lxqserviceutil
+LIBS += -lxqutils
+LIBS += -lcentralrepository
+LIBS += -lcmmanager
+LIBS += -lconnmon
+LIBS += -lefsrv
+LIBS += -lestor
+LIBS += -lsysutil
+LIBS += -lfeatmgr
+LIBS += -lcone
+LIBS += -lws32
+LIBS += -lapparc
+LIBS += -lapgrfx
+
+
+
+CONFIG += service
+
+SERVICE.FILE = service_conf.xml
+SERVICE.OPTIONS = embeddable
+
+
+RESOURCES = iaupdate.qrc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/iaupdate.qrc	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<RCC>
+    <qresource prefix="/xml">
+        <file>iaupdate_mainview.docml</file>
+    </qresource>
+</RCC>
--- a/iaupdate/IAD/ui/inc/iaupdateaccesspointhandler.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 of CIAUpdateAccessPointHandler class
-*
-*/
-
-
-
-#ifndef IAUPDATEACCESSPOINTHANDLER_H
-#define IAUPDATEACCESSPOINTHANDLER_H
-
-
-//  INCLUDES
-#include <e32base.h>
-
-// Access point selection
-#include <cmmanager.h>
-
-//FORWARD DECLARATIONS
-class CCmApplicationSettingsUi;
-
-
-/**
-* CIAUpdateAccessPointHandler 
-*
-* CIAUpdateAccessPointHandler is for setting internet access points.
-*/
-class CIAUpdateAccessPointHandler : public CBase
-    {
-    public:
-	enum TExitMode
-		{
-	    EDialogSelect,
-	    EDialogCancel,
-	    EDialogExit
-		};
-   
-    public:
-        /**
-        * Two-phased constructor.
-        */
-        static CIAUpdateAccessPointHandler* NewL();
-
-	    /**
-        * Destructor.
-        */
-        virtual ~CIAUpdateAccessPointHandler();
-
-    private:
-        /**
-        * C++ default constructor.
-        */
-	    CIAUpdateAccessPointHandler();
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-	    void ConstructL();
-
-    public: //functions
-	    /**
-        * Displays dialog for selecting one access point.
-        * @return ETrue if user selected access point, EFalse otherwise.
-        */
-        TInt ShowApSelectDialogL( TInt& aItemUid, HBufC*& aItemName );
-	          
-        /**
-        * Gets access point name
-		* @param aItemUid Access point id
-		* @paran aName Access point name
-        * @return Error value.
-        */
-        TInt GetApNameL( TInt aItemUid, HBufC*& aItemName );
-       
-        /**
-        * Get for Default Connection text
-		* @param aLabelText Localised text for "Default connection" text
-        */
-        void GetDefaultConnectionLabelL( HBufC*& aLabelText ); 
-    
-    private:  //data
-    	TBool iIdAppCsdSupport;
-    	
-    	CCmApplicationSettingsUi* iCmUi;
-    	RCmManager iCmManager;
-    };
-
-
-#endif  //IAUPDATEACCESSPOINTHANDLER_H
-            
-// End of File
--- a/iaupdate/IAD/ui/inc/iaupdateagreement.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdateagreement.h	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -24,7 +24,7 @@
 #include <e32base.h>
 
 // FORWARD DECLARATIONS
-
+class HbAction;
 
 // CLASS DECLARATION
 /**
@@ -90,11 +90,8 @@
     /**
     * Shows agreement dialog
     * 
-    * @param aCbaResource Resource id of CBA
-    *
-    * @return Value of user selection 
-    */
-    TInt ShowDialogL( TInt aCbaResourceId );
+     */
+    HbAction* ShowDialogL( HbAction *primaryAction, HbAction *secondaryAction );
     
     
 private: //data
--- a/iaupdate/IAD/ui/inc/iaupdateapplication.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdateapplication.h	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -11,56 +11,30 @@
 *
 * Contributors:
 *
-* Description:   This file contains the header file of the CIAUpdateApplication
+* Description:   This file contains the header file of the IAUpdateApplication
 *                class 
 *
 */
 
-
-
-#ifndef __IAUPDATE_APPLICATION_H__
-#define __IAUPDATE_APPLICATION_H__
+#ifndef IAUPDATEAPPLICATION_H_
+#define IAUPDATEAPPLICATION_H_
 
-// INCLUDES
-#include <aknapp.h>
-
-#include "iaupdateuids.h"
+#include <QSharedPointer>
+#include <HbApplication.h>
 
-// CONSTANTS
-// UID for the application, this should correspond to the uid defined in the mmp file
-static const TUid KUidIAUpdateApp = { KIAUpdateUiUid };
-
+// forward declarations
+class IAUpdateEngine;
+class IAUpdateMainWindow;
 
-/**
-* CAppMngrApp application class.
-* Provides factory to create concrete document object and
-* application server object
-*/
-class CIAUpdateApplication : public CAknApplication
+class IAUpdateApplication : public HbApplication
     {
+public:
+    IAUpdateApplication(int argc, char* argv[]);
+    virtual ~IAUpdateApplication();
     
-private:  // from CAknApplication
-
-    /**
-    * Returns application's UID 
-    * @return The UID value 
-    */
-    TUid AppDllUid() const;
+private:
+    QSharedPointer<IAUpdateEngine> mEngine;         // owned
+    QSharedPointer<IAUpdateMainWindow> mMainWindow; // owned
+    };
 
-    /**
-    * From CApaApplication, creates CAppMngrDocument document object.
-    * @return A pointer to the created document object.
-    */
-    CApaDocument* CreateDocumentL();
-    
-    /**
-    * Creates application server.
-    * @param aAppServer Instance of application server class
-    */
-    void NewAppServerL( CApaAppServer*& aAppServer );
-    };
-    
-
-#endif // __IAUPDATE_APPLICATION_H__
-
-// End of File
\ No newline at end of file
+#endif /* IAUPDATEAPPLICATION_H_ */
--- a/iaupdate/IAD/ui/inc/iaupdateappui.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,445 +0,0 @@
-/*
-* Copyright (c) 2007-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 file contains the header file of the CIAUpdateAppUi class 
-*
-*/
-
-
-
-#ifndef __IAUPDATE_APPUI_H__
-#define __IAUPDATE_APPUI_H__
-
-//INCLUDES
-#include <e32base.h>
-#include <aknViewAppUi.h> 
-#include <cmmanagerext.h>
-
-#include "iaupdateuidefines.h"
-#include "iaupdateuicontrollerobserver.h"
-#include "iaupdatedialogutil.h"
-#include "iaupdateuitimerobserver.h"
-
-// FORWARD DECLARATIONS
-class CIAUpdateMainView;
-class CIAUpdateHistoryView;
-class CIAUpdateUiController;
-class CIAUpdateParameters;
-class MIAUpdateRequestObserver;
-class CIAUpdateGlobalLockHandler;
-class CIAUpdateUITimer;
-
-/*! 
-@class CIAUpdateAppUi
-  
-An instance of class CIAUpdateAppUi is the UserInterface part of the AVKON
-application framework for the IAUpdate example application
-*/
-class CIAUpdateAppUi : 
-    public CAknViewAppUi, 
-    public MIAUpdateUiControllerObserver,
-    public MIAUpdateTextLinkObserver,
-    public MIAUpdateUITimerObserver
-    {
-public:
-
-    /*
-     * Perform the second phase construction of a CIAUpdateAppUi object
-     * this needs to be public due to the way the framework constructs the AppUi 
-     */
-    void ConstructL();
-    
-    /*!
-     * Perform the first phase of two phase construction.
-     * This needs to be public due to the way the framework constructs the AppUi 
-     */
-    CIAUpdateAppUi();
-
-
-    /*
-     * Destroy the object and release all memory objects
-     */
-    virtual ~CIAUpdateAppUi();
-    
-    void StartedByLauncherL( MIAUpdateRequestObserver& aObserver, 
-                             TBool aRefreshFromNetworkDenied );
-    
-    /**
-     * When the update check operation is started through
-     * the API, the session directs the requests for the UI. UI will
-     * handle the operation and inform the observer when the operation is
-     * completed.
-     * @param aObserver This observer is informed when the operation has
-     * been completed.
-     * @param aFilterParams These parameters are used when update items
-     * are filtered for the UI list.
-     */
-    void CheckUpdatesRequestL( MIAUpdateRequestObserver& aObserver,
-                               CIAUpdateParameters* aFilterParams );
-
-    /**
-     * When the show update operation is started through
-     * the API, the session directs the requests for the UI. UI will
-     * hanle the operation and inform the observer when the operation is
-     * completed.
-     * @param aObserver This observer is informed when the operation has
-     * been completed.
-     * @param aFilterParams These parameters are used when update items
-     * are filtered for the UI list.
-     */
-    void ShowUpdatesRequestL( MIAUpdateRequestObserver& aObserver,
-                              CIAUpdateParameters* aFilterParams );
-    
-             
-    
-    /** 
-     * When the update operation is started through
-     * the API, the session directs the requests for the UI. UI will
-     * hanle the operation and inform the observer when the operation is
-     * completed.
-     * @param aObserver This observer is informed when the operation has
-     * been completed.
-     * @param aUid  Uid of the caller of the request
-     */
-    void ShowUpdateQueryRequestL( MIAUpdateRequestObserver& aObserver, TUint aUid );
-    
-    /**
-     *  Handle removal of observer
-     */    
-    void HandleObserverRemoval();
-    
-    /**
-    * Set this application visible/unvisible
-    * @param aVisible If EFalse application is put background and is hidden in FSW 
-    */
-    void SetVisibleL( TBool aVisible );
-    
-    /**
-    * Show status dialog of update
-    */ 
-    void ShowStatusDialogL();
-    
-    /**
-    * Starts CIdle. Status dialog is shown in callback function. 
-    */ 
-    void ShowStatusDialogDeferredL();
-    
-    /**
-    * Get CIAUpdateUiController instance
-    * @return Returns pointer of iController
-    */    
-    CIAUpdateUiController* Controller() const;
-    
-    /**
-    * Performs cancel depending on ongoing request and state
-    */   
-    void PotentialCancel();
-    
-    /**
-    * Set ordinal position to foreground and 
-    * set iClientMovedToBackground to EFalse
-    */  
-    void HandleClientToForegroundL();
-    
-    /**
-    * Handle situation when iaupdate.exe leaves running although 
-    * client session has been closed
-    */
-    void HandleAllClientsClosedL();
-    
-    /**
-    * Indicates whether Status dialog to be shown or not when history view is deactivated
-    *
-    * @return ETrue when status dialog to be re-shown
-    */ 
-    TBool ShowStatusDialogAgain() const;
-        
-    /**
-    * Starts monitoring of window group list changes 
-    */
-    void StartWGListChangeMonitoring();
-    
-    /**
-    * Stops monitoring of window group list changes 
-    */
-    void StopWGListChangeMonitoring();
-    
-    /**
-    * Set window group id of client application 
-    *
-    * @param aWgId Window group id
-    */
-    void SetClientWgId( TInt aWgId );
-    
-    /**
-    * Is client application in backround
-    *
-    * @param True value if client application is in background
-    */
-    TInt ClientInBackgroundL() const;
-    
-    
-    /**
-    * Set DM support
-    * 
-    * @param True value if DM is supported
-    */
-    void SetDMSupport( TBool aDMSupport );
-    
-    /**
-    * Check DM support
-    * 
-    * @return True value if DM is supported
-    */
-    TBool IsDMSupport();
-    
-    /**
-     * Check if DM support is set
-     * 
-     * @return True value if DM support is set
-     */
-    TBool IsDMSupportSet();
-    
-    /**
-    * Check if UI refresh allowed
-    * 
-    * @return True value if UI refresh is allowed 
-    */
-    TBool UiRefreshAllowed();
-    
-        
-private: // from CAknViewAppUi
-    
-    /*!
-     * @function HandleCommandL  
-     * @discussion Handle user menu selections
-     * @param aCommand the enumerated code for the option selected
-     */
-    void HandleCommandL( TInt aCommand );
-    
-    /**
-    * Handle window server event
-    *
-    * @param aEvent The window server event that occurred
-    * @param aDestination The controller associated with the event 
-    */
-    void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
-    
-             
-private: // From MIAUpdateTextLinkObserver    
-    void TextLinkL( TInt aLinkId );
-
-    
-private: // From MIAUpdateUiControllerObserver   
-    /**
-    * Called when async engine start-up is completed
-    *
-    * @param aError Error code
-    */
-    void StartupComplete( TInt aError ); 
-    
-    /**
-    * Leaving method, called as trapped in StartupComplete
-    */
-    void StartupCompleteL(); 
- 
-    
-    /**
-    * Handles leave error. 
-    *
-    * @param aError Error code
-    */      
-    void HandleLeaveErrorL( TInt aError );
-    
-    /**
-    * Handles leave error withot leaving
-    *
-    * @param aError Error code
-    */      
-    void HandleLeaveErrorWithoutLeave( TInt aError );
-            
-    /**
-    * Called when async update list refresh is completed
-    *
-    * @param aError Error code
-    */
-    void RefreshCompleteL( TBool aWithViewActivation, TInt aError );
-    
-    /**
-    * Called when async updating is completed
-    *
-    * @param aError Error code
-    */     
-    void UpdateCompleteL( TInt aError );
-    
-    /**
-    * Choose a usable IAP from all SNAPs
-    *
-    * @param aCmManagerExt handle of connection manager
-    */  
-    TUint32 GetBestIAPInAllSNAPsL( RCmManagerExt& aCmManagerExt  );
-    
-    /**
-     * Choose a usable IAP from Internet SNAP
-     *
-     * @param aCmManagerExt handle of connection manager
-     */
-    TUint32 GetBestIAPInInternetSNAPL( RCmManagerExt& aCmManagerExt  );
-
-    /**
-    * Choose the best IAP under the given SNAP
-    *
-    * @param aCmManagerExt handle of connection manager
-    * @param aSNAP SNAP ID
-    */  
-    TUint32 GetBestIAPInThisSNAPL( RCmManagerExt& aCmManagerExt, TUint32 aSNAP = 0);
-
-private: // from MIAUpdateUITimerObserver
-
-     virtual void BackgroundDelayComplete( TInt aError );   
-     
-     virtual void ForegroundDelayComplete( TInt aError );
-     
-     virtual void ProcessStartDelayComplete( TInt aError );
-
-private: // new methods
-           
-    /**
-    * Refreshes main view 
-    * @param aError  Error code
-    */              
-    void RefreshL( TInt aError );
-    
-    /**
-    * Informs an observer that its async request is completed 
-    *
-    * @param aError  Error code 
-    */ 
-    void InformRequestObserver( TInt aError );
-    
-    /**
-     * Sets the default connection method used for network access.
-     * Connection can be set as an accesspoint or as a snap for example.
-     *
-     * @param aTotalSilent Set to ETrue if want silent connection
-     *
-     * @note Not stored persistently. A client needs to set this 
-     * again every time it creates the controller.
-     *
-     * @note Leaves with KErrNotFound if connection method was not
-     * set in the repocitory.
-     */
-    void SetDefaultConnectionMethodL( TBool aTotalSilent );
-        
-    
-    /**
-    * Shows update query dialog (now/later) 
-    */ 
-    void ShowUpdateQueryL();
-    
-    /**
-    * Hides this application from fast swap window 
-    *
-    * @param aAlwaysAsk
-    */ 
-    void HideApplicationInFSWL( TBool aHide);
-    
-    /**
-    * Shows global error note 
-    *
-    * @param aError Symbian error code
-    */ 
-    void ShowGlobalErrorNoteL( TInt aError ) const;
-       
-    /**
-    * CIdle callback function, that shows status dialog
-    * To be used to guarantee that possible old status dialog is totally 
-    * removed by AVKON before showing new one  
-    *
-    * @param aPtr  Pointer to this instance
-    */ 
-    static TInt ShowStatusDialogCallbackL( TAny* aPtr );
-    
-    /**
-    * CIdle callback function, that shows update query dialog
-    * To be used because a client to be informed immediately that its 
-    * async request is issued. Waiting dialog cannot be shown before responding to a client  
-    *
-    * @param aPtr  Pointer to this instance
-    */
-    static TInt UpdateQueryCallbackL( TAny* aPtr );
-    
-    /**
-    * CIdle callback function, that performs automatic update check ann query
-    *
-    * @param aPtr  Pointer to this instance
-    */
-    static TInt AutomaticCheckCallbackL( TAny* aPtr );
-    
-    /**
-    * History view is activated from a link in message query
-    */
-    void HandleTextLinkL();
-            
-private:  //data
-
-    CIAUpdateMainView* iMainView;
-
-    CIAUpdateHistoryView* iHistoryView;
-        
-    CIAUpdateUiController* iController;
-    
-    CIAUpdateGlobalLockHandler* iGlobalLockHandler;
-    
-    CIAUpdateUITimer* iForegroundTimer; 
-    
-    CIAUpdateUITimer* iBackgroundTimer;
-    
-    MIAUpdateRequestObserver* iRequestObserver;
-    
-    TIAUpdateDialogParam* iDialogParam;
-    
-    IAUpdateUiDefines::TIAUpdateUiRequestType iRequestType;
-    
-    CIdle* iIdle;
-    
-    CIdle* iIdleAutCheck;
-           
-    TBool iShowStatusDialogAgain;
-    
-    TUint iUpdatequeryUid;
-    
-    TBool iUpdateNow;
-    
-    TBool iInstUiOnTop;
-    
-    TBool iStartedFromApplication;
-    
-    TBool iClientMovedToBackground;
-    
-    RArray<TUint32> iDestIdArray;
-    
-    TInt iWgId;
-    
-    TBool iIsDMSupported;
-    
-    TBool iIsDMSet;
-    
-    TBool iUiRefreshAllowed;
-    
-    TBool iRebootAfterInstall;
-    };
-
-
-#endif // __IAUPDATE_APPUI_H__
-
--- a/iaupdate/IAD/ui/inc/iaupdatecontainerobserver.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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:   MIAUpdateContainerObserver interface
-*
-*/
-
-
-
-#ifndef IAUPDATECONTAINEROBSERVER_H
-#define IAUPDATECONTAINEROBSERVER_H
-
-#include <e32base.h>
-
-class MIAUpdateContainerObserver
-{
-public: // Observer API
-    /**
-    * Mark list item
-    * @param aMark True ig marking, False if unmarking
-    * @param aIndex  Index of the item
-    * @return False value if marking/unmarking cancelled when dependencies/dependants not found
-    */ 
-    virtual TBool MarkListItemL( TBool aMark, TInt aIndex ) = 0;
-
-    /**
-    * Set text label to middle soft key
-    * @param aVisible   True value when MSK text is visible
-    * @param aSelected  True value when list item is selected( marked)
-    */
-    virtual void SetMiddleSKTextL( TBool aVisible, TBool aSelected ) = 0;
-};
-	
-#endif // IAUPDATECONTAINEROBSERVER_H
--- a/iaupdate/IAD/ui/inc/iaupdatedetailsdialog.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2008 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 the header file of the CIAUpdateDetailsDialog
-*
-*/
-
-
-
-#ifndef IAUPDATEDETAILSDIALOG_H
-#define IAUPDATEDETAILSDIALOG_H
-
-
-//  INCLUDES
-#include <e32base.h>
-
-#include "iaupdateversion.h"
-
-// FORWARD DECLARATIONS
-class TIAUpdateDialogParam;
-
-/*
-* CIAUpdateDetailsDialog
-*
-* CIAUpdateDetailsDialog is used for displaying update details.
-*/
-class CIAUpdateDetailsDialog : public CBase
-    {
-	public:
-	
-	    /**
-        * Launches dialog.
-        * @param aParam Class that contains dialog parameters.
-        * @return Completion code.
-        */
-		static TBool ShowDialogL( TIAUpdateDialogParam* aParam );
-		
-	public:// Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-		static CIAUpdateDetailsDialog* NewL( TIAUpdateDialogParam* aParam );
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CIAUpdateDetailsDialog();
-    
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CIAUpdateDetailsDialog( TIAUpdateDialogParam* aParam );
-	
-        /**
-        * By default Symbian OS constructor is private.
-        */
-        void ConstructL();
-        
-    private:
-        void ConstructTextL();
-        TInt BufferSize();
-        HBufC* FileSizeTextLC( TInt aFileSize );
-        HBufC* VersionTextLC( TIAUpdateVersion aVersion );
-        TBool ShowDialogL();
-        
-    private:
-        TIAUpdateDialogParam* iParam;
-        
-        HBufC* iBuf;
-  
-    };
-#endif      // IAUPDATEDETAILSDIALOG_H
-            
-// End of File
--- a/iaupdate/IAD/ui/inc/iaupdatedialogutil.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 IAUPDATEDIALOGUTIL_H
-#define IAUPDATEDIALOGUTIL_H
-
-
-//  INCLUDES
-#include <e32base.h>
-
-
-//FORWARD DECLARATIONS
-class MIAUpdateNode;
-
-
-/**
-* TIAUpdateTextLinkObserver
-* 
-* Observer interface function for observing text link.
-*/
-class MIAUpdateTextLinkObserver
-    {
-    public:
-        virtual void TextLinkL( TInt aLinkId ) = 0;
-    };
-
-
-/**
-* TIAUpdateDialogParam
-*
-* This class is used as general dialog parameter type.
-*/
-class TIAUpdateDialogParam
-	{
-    public:
-		TInt iCountSuccessfull;
-		TInt iCountCancelled;
-		TInt iCountFailed;
-		TInt iShowCloseAllText;
-		TInt iResourceId;
-		MIAUpdateNode* iNode;
-		MIAUpdateTextLinkObserver* iLinkObserver;
-		
-    public:
-    	TIAUpdateDialogParam();
-		
-	};
-
-
-
-
-/**
-* IAUpdateDialogUtil
-* 
-* IAUpdateDialogUtil contains general dialog utilities.
-*/
-class IAUpdateDialogUtil
-	{
-    public:
-		static void ShowMessageQueryL( const TDesC& aTitle, const TDesC& aText) ;
-		static void ShowMessageQueryL( const TDesC& aTitle, TInt aResource );
-		
-        static void ShowInformationQueryL( const TDesC& aText );
-        static void ShowInformationQueryL( TInt aResource );
-        
-        static TInt ShowConfirmationQueryL( const TDesC& aText, TInt aSoftkeyResourceId );
-        static TInt ShowConfirmationQueryL( TInt aResource, TInt aSoftkeyResourceId );
-        
-        static void Panic( TInt aReason );
-	};
-
-
-
-
-
-#endif      // IAUPDATEDIALOGUTIL_H
-            
-// End of File
--- a/iaupdate/IAD/ui/inc/iaupdatedocument.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 the header file of the CIAUpdateDocument
-*                class 
-*
-*/
-
-
-#ifndef __IAUPDATE_DOCUMENT_H__
-#define __IAUPDATE_DOCUMENT_H__
-
-// INCLUDES
-#include <AknDoc.h>
-
-// FORWARD DECLARATIONS
-class CIAUpdateAppUi;
-class CEikApplication;
-
-
-// CLASS DECLARATION
-/**
-*  CIAUpdateDocument is the Document part of the AVKON
-*  application framework for the IAUpdate example application
-*
-*/
-
-class CIAUpdateDocument : public CAknDocument
-    {
-public:
-
-    /**
-    * Construct a CIAUpdateDocument for the AVKON application aApp 
-    * using two phase construction, and return a pointer to the created object
-    * @param aApp Application creating this document
-    * @return A pointer to the created instance of CIAUpdateDocument
-    */
-    static CIAUpdateDocument* NewL( CEikApplication& aApp );
-
-    /**
-    * Construct a CIAUpdateDocument for the AVKON application aApp 
-    * using two phase construction, and return a pointer to the created object
-    * @param aApp Application creating this document
-    * @return A pointer to the created instance of CIAUpdateDocument
-    */
-    static CIAUpdateDocument* NewLC( CEikApplication& aApp );
-
-    /**
-    * Destructor
-    */
-    ~CIAUpdateDocument();
-
-public: // from CAknDocument
-    /**
-    *  Create a CIAUpdateAppUi object and return a pointer to it
-    * @return a pointer to the created instance of the AppUi created
-    */
-    CEikAppUi* CreateAppUiL();
-
-private:
-
-    /**
-    * Perform the second phase construction of a CIAUpdateDocument object
-    */
-    void ConstructL();
-
-    /**
-    * Perform the first phase of two phase construction
-    @param aApp Application creating this document
-    */
-    CIAUpdateDocument( CEikApplication& aApp );
-
-    };
-
-
-#endif // __IAUPDATE_DOCUMENT_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/inc/iaupdateengine.h	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,244 @@
+/*
+* 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 file contains the header file of the IAUpdateEngine
+*                class 
+*
+*/
+
+#ifndef IAUPDATEENGINE_H_
+#define IAUPDATEENGINE_H_
+
+#include <QObject>
+
+#include "iaupdateuidefines.h"
+#include "iaupdateuicontrollerobserver.h"
+#include "iaupdatenode.h"
+
+class IAUpdateServiceProvider;
+class CIAUpdateUiController;
+class CIAUpdateParameters;
+class CIAUpdateGlobalLockHandler;
+class MIAUpdateNode;
+class MIAUpdateFwNode;
+class CEikonEnv;
+class RCmManagerExt;
+class CIdle;
+
+class IAUpdateEngine : public QObject,
+                       public MIAUpdateUiControllerObserver
+    {
+    Q_OBJECT
+
+public:
+    IAUpdateEngine(QObject *parent = 0);
+    virtual ~IAUpdateEngine();
+    
+    void StartedByLauncherL( TBool aRefreshFromNetworkDenied );
+     
+     /**
+      * When the update check operation is started through
+      * the API, the session directs the requests for the UI. UI will
+      * handle the operation and inform the observer when the operation is
+      * completed.
+      * @param aFilterParams These parameters are used when update items
+      * are filtered for the UI list.
+      */
+     void CheckUpdatesRequestL( int wgid, CIAUpdateParameters* aFilterParams );
+
+     /**
+      * When the show update operation is started through
+      * the API, the session directs the requests for the UI. UI will
+      * hanle the operation and inform the observer when the operation is
+      * completed.
+      * @param aFilterParams These parameters are used when update items
+      * are filtered for the UI list.
+      */
+     void ShowUpdatesRequestL( int wgid, CIAUpdateParameters* aFilterParams );
+     
+              
+     
+     /** 
+      * When the update operation is started through
+      * the API, the session directs the requests for the UI. UI will
+      * hanle the operation and inform the observer when the operation is
+      * completed.
+      * @param aUid  Uid of the caller of the request
+      */
+     void ShowUpdateQueryRequestL( int wgid, TUint aUid );
+          
+     /**
+      * Set this application visible/unvisible
+      * @param aVisible If EFalse application is put background and is hidden in FSW 
+      */
+      void SetVisibleL( TBool aVisible );
+      
+      /**
+      * Set window group id of client application 
+      *
+      * @param aWgId Window group id
+      */
+      void SetClientWgId( TInt aWgId );
+          
+      /**
+      * Is client application in backround
+      *
+      * @param True value if client application is in background
+      */
+      TInt ClientInBackgroundL() const;
+    
+      //void refresh(int error);
+signals:
+    void toMainView();
+    
+    /**
+    * Refreshes main view 
+    * @param aError  Error code
+    */              
+    void refresh(const RPointerArray<MIAUpdateNode>& nodes,
+                 const RPointerArray<MIAUpdateFwNode>& fwNodes,
+                 int error);
+    
+    void toHistoryView();
+
+public slots:    
+    void handleAllClientsClosed();    
+  
+
+private: // From MIAUpdateUiControllerObserver   
+    /**
+    * Called when async engine start-up is completed
+    *
+    * @param aError Error code
+    */
+    void StartupComplete( TInt aError ); 
+    
+    /**
+    * Leaving method, called as trapped in StartupComplete
+    */
+    void StartupCompleteL(); 
+ 
+    
+    /**
+    * Handles leave error. 
+    *
+    * @param aError Error code
+    */      
+    void HandleLeaveErrorL( TInt aError );
+    
+    /**
+    * Handles leave error withot leaving
+    *
+    * @param aError Error code
+    */      
+    void HandleLeaveErrorWithoutLeave( TInt aError );
+            
+    /**
+    * Called when async update list refresh is completed
+    *
+    * @param aError Error code
+    */
+    void RefreshCompleteL( TBool aWithViewActivation, TInt aError );
+    
+    /**
+    * Called when async updating is completed
+    *
+    * @param aError Error code
+    */     
+    void UpdateCompleteL( TInt aError );
+    
+private:  //new methods
+
+    /**
+    * Informs an observer that its async request is completed 
+    *
+    * @param aError  Error code 
+    */ 
+    void InformRequestObserver( TInt aError );
+    
+    /**
+     * Sets the default connection method used for network access.
+     * Connection can be set as an accesspoint or as a snap for example.
+     *
+     * @param aTotalSilent Set to ETrue if want silent connection
+     *
+     * @note Not stored persistently. A client needs to set this 
+     * again every time it creates the controller.
+     *
+     * @note Leaves with KErrNotFound if connection method was not
+     * set in the repocitory.
+     */
+    void SetDefaultConnectionMethodL( TBool aTotalSilent );   
+    
+     /**
+     * Choose a usable IAP from all SNAPs
+     *
+     * @param aCmManagerExt handle of connection manager
+     */  
+    TUint32 GetBestIAPInAllSNAPsL( RCmManagerExt& aCmManagerExt  );
+        
+     /**
+     * Choose a usable IAP from Internet SNAP
+     *
+     * @param aCmManagerExt handle of connection manager
+     */
+    TUint32 GetBestIAPInInternetSNAPL( RCmManagerExt& aCmManagerExt  );
+
+     /**
+     * Choose the best IAP under the given SNAP
+     *
+     * @param aCmManagerExt handle of connection manager
+     * @param aSNAP SNAP ID
+     */  
+     TUint32 GetBestIAPInThisSNAPL( RCmManagerExt& aCmManagerExt, TUint32 aSNAP = 0);
+     
+     /**
+     * Shows update query dialog (now/later) 
+     */ 
+     void ShowUpdateQueryL();
+
+     void HideApplicationInFSWL( TBool aHide ) const;
+     
+     /**
+     * CIdle callback function, that shows update query dialog
+     * To be used because a client to be informed immediately that its 
+     * async request is issued. Waiting dialog cannot be shown before responding to a client  
+     *
+     * @param aPtr  Pointer to this instance
+     */
+     static TInt UpdateQueryCallbackL( TAny* aPtr );
+         
+     
+    
+public: //temp
+//private:
+    IAUpdateServiceProvider *mServiceProvider;
+    
+private:
+    CIAUpdateUiController* iController;
+    CIAUpdateGlobalLockHandler* iGlobalLockHandler;
+    CEikonEnv* iEikEnv; //not owned
+    CIdle* iIdle;
+    
+    IAUpdateUiDefines::TIAUpdateUiRequestType iRequestType;
+    TBool iUpdateNow;
+    RArray<TUint32> iDestIdArray;
+    TBool iRequestIssued;
+    TBool iStartedFromApplication;
+    TUint iUpdatequeryUid;
+    TInt iWgId;
+  
+    
+    };
+
+#endif /* IAUPDATEENGINE_H_ */
--- a/iaupdate/IAD/ui/inc/iaupdatefwdetailsdialog.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2008 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 the header file of the CIAUpdateDetailsDialog
-*
-*/
-
-
-
-#ifndef IAUPDATEFWDETAILSDIALOG_H
-#define IAUPDATEFWDETAILSDIALOG_H
-
-
-//  INCLUDES
-#include <e32base.h>
-
-//FORWARD
-class MIAUpdateFwNode;
-
-/*
-* CIAUpdateFwDetailsDialog
-*
-* CIAUpdateFwDetailsDialog is used for displaying update details.
-*/
-class CIAUpdateFwDetailsDialog : public CBase
-    {
-	public:
-	
-	    /**
-        * Launches dialog.
-        * @param aFwNode present FW node.
-        * @return Completion code.
-        */
-		static TBool ShowDialogL( MIAUpdateFwNode* aFwNode );
-		
-	public:// Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-		static CIAUpdateFwDetailsDialog* NewL( MIAUpdateFwNode* aFwNode );
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CIAUpdateFwDetailsDialog();
-    
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CIAUpdateFwDetailsDialog( MIAUpdateFwNode* aFwNode );
-	
-        /**
-        * By default Symbian OS constructor is private.
-        */
-        void ConstructL();
-        
-    private:
-        void ConstructTextL();
-        TInt BufferSize();
-        HBufC* FileSizeTextLC( TInt aFileSize );
-        TBool ShowDialogL();
-        
-    private:
-        
-        MIAUpdateFwNode* iFwNode;
-        HBufC* iBuf;
-  
-    };
-#endif      // IAUPDATEDETAILSDIALOG_H
-            
-// End of File
--- a/iaupdate/IAD/ui/inc/iaupdatehistorycontainer.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* Copyright (c) 2008 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 the header file of the CIAUpdateHistoryContainer
-*                class 
-*
-*/
-
-
-
-#ifndef IA_UPDATE_HISTORY_CONTAINER_H
-#define IA_UPDATE_HISTORY_CONTAINER_H
-
-#include <coecntrl.h>
-
-class CAknDoubleGraphicStyleListBox;
-class MIAUpdateHistory;
-class MIAUpdateHistoryItem;
-
-
-/*! 
-  @class CIAUpdateHistoryContainer
-  
-  @discussion 
-  */
-class CIAUpdateHistoryContainer : public CCoeControl
-    {
-    
-public:
-
-    /*!
-      @function NewL
-       
-      @discussion Create a CIAUpdateHistoryContainer object, which will draw itself to aRect
-      @param aRect the rectangle this view will be drawn to
-      @result a pointer to the created instance of CIAUpdateHistoryContainer
-      */
-    static CIAUpdateHistoryContainer* NewL( const TRect& aRect );
-
-    /*!
-      @function NewLC
-       
-      @discussion Create a CIAUpdateHistoryContainer object, which will draw itself to aRect
-      @param aRect the rectangle this view will be drawn to
-      @result a pointer to the created instance of CIAUpdateHistoryContainer
-      */
-    static CIAUpdateHistoryContainer* NewLC( const TRect& aRect );
-
-
-    /*!
-      @function ~CIAUpdateHistoryContainer
-      
-      @discussion Destroy the object and release all memory objects
-      */
-     virtual ~CIAUpdateHistoryContainer();
-
-
-    /*!
-     * @function RefreshL
-     *
-     * @discussion Populate list box with the given nodes.
-     * @param aHistory
-     */
-    void RefreshL( MIAUpdateHistory& aHistory );       
-
-
-private:  // from CCoeControl
-
-    /*!
-     * @function OfferKeyEventL
-     *
-     * @discussion Handle key events by forwarding them to the list box.
-     * @param aKeyEvent The key event.
-     * @param aType The event type.
-     * @result Indicates whether or not the key event was used by this control. 
-     */
-    TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
-
-     /*!
-      * @see CCoeControl::SizeChanged
-      */
-     void SizeChanged();
-
-     /*!
-      * @see CCoeControl::CountComponentControls
-      */
-     TInt CountComponentControls() const;
-
-     /*!
-      *  @see CCoeControl::ComponentControl
-      */
-     CCoeControl* ComponentControl( TInt aIndex ) const;
-     
-     /**
-     * Handles a resource relative event
-     *
-     * @param aType Event type
-     */
-     void HandleResourceChange( TInt aType );
-  
-
-private:
-
-    /*!
-      @function ConstructL
-      
-      @discussion  Perform the second phase construction of a CIAUpdateHistoryContainer object
-      @param aRect the rectangle this view will be drawn to
-      */
-    void ConstructL(const TRect& aRect);
-
-    /*!
-      @function CIAUpdateHistoryContainer
-      
-      @discussion Perform the first phase of two phase construction 
-      */
-    CIAUpdateHistoryContainer();
-
-
-    // Creates the state description string.
-    HBufC* NodeStateDescriptionLC( const MIAUpdateHistoryItem& aItem );
-    
-
-private: // Data
-
-    CDesCArray* iItemTextArray;
-    CAknDoubleGraphicStyleListBox* iListBox;
-
-    };
-
-
-#endif // IA_UPDATE_HISTORY_CONTAINER_H
--- a/iaupdate/IAD/ui/inc/iaupdatehistoryview.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdatehistoryview.h	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -11,120 +11,21 @@
 *
 * Contributors:
 *
-* Description:   This file contains the header file of the CIAUpdateHistoryView
+* Description:   This file contains the header file of the IAUpdateHistoryView
 *                class 
 *
 */
 
-
-
-#ifndef IA_UPDATE_HISTORY_VIEW_H
-#define IA_UPDATE_HISTORY_VIEW_H
-
-#include <aknview.h> 
-
-class CIAUpdateHistoryContainer;
-class MIAUpdateHistory;
-
-
-/*! 
-  @class CIAUpdateHistoryView
-  
-  @discussion An instance of the Application View object for the IAUpdate 
-  example application
-  */
-class CIAUpdateHistoryView : public CAknView
-    {
+#ifndef IAUPDATEHISTORYVIEW_H_
+#define IAUPDATEHISTORYVIEW_H_
 
-public:
-    
-    /*!
-      @function NewL
-  
-      @discussion Create a CIAUpdateHistoryView object, which will draw itself to aRect
-      @result a pointer to the created instance of CIAUpdateHistoryView
-    */
-    static CIAUpdateHistoryView* NewL( MIAUpdateHistory& aHistory );
-
-    /*!
-      @function NewLC
-   
-      @discussion Create a CIAUpdateHistoryView object, which will draw itself to aRect
-      @result a pointer to the created instance of CIAUpdateHistoryView
-    */
-    static CIAUpdateHistoryView* NewLC( MIAUpdateHistory& aHistory );
-
-
-    /*!
-      @function ~CIAUpdateHistoryView
-      
-      @discussion Destroy the object and release all memory objects
-    */
-    virtual ~CIAUpdateHistoryView();
-
-
-    void RefreshL();       
-
-
-private:  // from CAknView
+#include <HbView.h>
 
-    /*!
-      @see CAknView::Id
-    */
-    virtual TUid Id() const;
-
-
-    /*!
-      @see CAknView::HandleCommandL
-    */
-    virtual void HandleCommandL( TInt aCommand );
-    
-    
-    /*!
-      @see CAknView::DoActivateL
-    */
-    virtual void DoActivateL( const TVwsViewId &aPrevViewId, 
-                              TUid aCustomMessageId, 
-                              const TDesC8 &aCustomMessage);
-    
-    /*!
-      @see CAknView::DoDeactivate
-    */
-    virtual void DoDeactivate();
-
-                        
-private: // Methods
-
-    /*!
-      @function CIAUpdateHistoryView
-      
-      @discussion Perform the first phase of two phase construction 
-    */
-    CIAUpdateHistoryView( MIAUpdateHistory& aHistory );
-
-    
-    /*!
-      @function ConstructL
-      
-      @discussion  Perform the second phase construction of a CIAUpdateHistoryView object
-    */
-    virtual void ConstructL();
-    
-    // Gives the history object that is used to show the history in the view.
-    MIAUpdateHistory& History() const; 
-
-    // Updates the status pane texts.
-    void UpdateStatusPaneL();
-
-    
-private: // Data
-
-    // Contains the item history info
-    MIAUpdateHistory& iHistory;      
-    
-    // Handles the content of the view.
-    CIAUpdateHistoryContainer* iContainer;
-
+class IAUpdateHistoryView : public HbView
+    {
+public:
+    IAUpdateHistoryView();
+    virtual ~IAUpdateHistoryView();
     };
 
-#endif // IA_UPDATE_HISTORY_VIEW_H
+#endif /* IAUPDATEHISTORYVIEW_H_ */
--- a/iaupdate/IAD/ui/inc/iaupdatemaincontainer.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 the header file of the CIAUpdateMainContainer class 
-*
-*/
-
-
-
-#ifndef IAUPDATEMAINCONTAINER_H
-#define IAUPDATEMAINCONTAINER_H
-
-//INCLUDES
-#include <coecntrl.h> // CCoeControl
-
-// FORWARD DECLARATIONS
-class CAknDoubleGraphicStyleListBox;
-class MIAUpdateContainerObserver;
-
-class MIAUpdateNode;
-class MIAUpdateAnyNode;
-
-// CLASS DECLARATION
-/**
-* This class represents the container of main view of IAUpdate
-*
-*/
-class CIAUpdateMainContainer :  
-    public CCoeControl,    
-    public MEikListBoxObserver
-    {
-public:
-     
-    /**
-    * Symbian two phased constructor.
-    * @param aRect the rectangle this view will be drawn to
-    * @return Instance of the created server object.
-    */
-    static CIAUpdateMainContainer* NewL( const TRect& aRect, 
-                                         MIAUpdateContainerObserver& aObserver );
-    
-    /**
-    * Symbian two phased constructor. Created object is pushed to clenaup stack
-    * @param aRect the rectangle this view will be drawn to
-    * @return Instance of the created server object.
-    */
-    static CIAUpdateMainContainer* NewLC( const TRect& aRect, 
-                                          MIAUpdateContainerObserver& aObserver );
-    /**
-    * Destructor
-    */
-    ~CIAUpdateMainContainer();
-    
-    /**
-    * Handles Mark/Unmark
-    * @param aCommand Mark or unmark commannd
-    */
-    void HandleMarkCommandL( TInt aCommand );
-    
-    /**
-    * Resfresh the list
-    * @param aNodes List of nodes
-    * @param aError Error code
-    */
-    void RefreshL( const RPointerArray<MIAUpdateAnyNode>& aNodes,
-                   TInt aError );       
-    
-    /**
-    * Returns node that's highlighted in a list
-    * @param aNodes List of nodes
-    * @return Current (highlighted) node
-    */    
-    MIAUpdateAnyNode* GetCurrentNode( const RPointerArray<MIAUpdateAnyNode>& aNodes );
-    
-    /**
-    * Set selected items to list  
-    * @param aIndices List of indices
-    */    
-    void SetSelectedIndicesL( const RArray<TInt>& aIndices );
-    
-    
-    /**
-     * Clean all the selection
-     */ 
-    void CleanAllSelection();
-
-    /**
-    * Set selected items to list  
-    * @param aListBox   List box
-    * @param aEventType Event type
-    */  
-    void HandleListBoxEventL(
-                  CEikListBox*  aListBox,
-                  TListBoxEvent aEventType );
-    
-private:  // from CCoeControl
-
-    /**
-    * Handle key events by forwarding them to the list box.
-    * @param aKeyEvent The key event.
-    * @param aType The event type.
-    * @result Indicates whether or not the key event was consumed by this control. 
-    */
-   TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
-
-    /**
-    * Called when size is changed by framework.
-    * Set current size to listbox
-    */
-    void SizeChanged();
-
-    /**
-    * Count of components.
-    * @return Count of child components
-    */
-    TInt CountComponentControls() const;
-
-    /**
-    * Component control
-    * @param aIndex  Index numer of child component.
-    * @return Pointer to a component
-    */
-    CCoeControl* ComponentControl( TInt aIndex ) const;
-      
-    /**
-    * Get the help context for this control.
-    *
-    * @param aContext Help context
-    */
-    void GetHelpContext( TCoeHelpContext& aContext ) const;
-        
-    /**
-    * Handles a resource relative event
-    *
-    * @param aType Event type
-    */
-    void HandleResourceChange( TInt aType );
-    
-    
-    
-private:
-    
-    /** 
-    * Constuctor 
-    * @param aRect Rectangular this view will be drawn to
-    */
-    void ConstructL (const TRect& aRect );
-    
-    /** 
-    * C++ constuctor 
-    * @param aObserver Observer of the container
-    */
-    CIAUpdateMainContainer( MIAUpdateContainerObserver& aObserver );
-            
-    /** 
-    * Update Middle soft key label text (Mark/Unmark) 
-    */
-    void UpdateMSKTextL();
-    
-    void CreateIconL( CFbsBitmap*& aBitmap,
-                      CFbsBitmap*& aMask,
-                      const TDesC& aFileName,
-                      TInt aBitmapId,
-                      TInt aMaskId );
-        
-
-private: // Data
-
-    MIAUpdateContainerObserver& iObserver;
-    CDesCArray* iItemTextArray;
-    CAknDoubleGraphicStyleListBox* iListBox; 
-    };
-
-#endif // IAUPDATEMAINCONTAINER_H
-
-// End of File
--- a/iaupdate/IAD/ui/inc/iaupdatemainview.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdatemainview.h	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -11,251 +11,55 @@
 *
 * Contributors:
 *
-* Description:   This file contains the header file of the CIAUpdateMainView class 
+* Description:   This file contains the header file of the IAUpdateMainView
+*                class 
 *
 */
 
+#ifndef IAUPDATEMAINVIEW_H_
+#define IAUPDATEMAINVIEW_H_
+
+#include <HbView.h>
+#include <QItemSelection> 
+
+#include "iaupdatenode.h"
+#include "iaupdatefwnode.h"
+#include "iaupdatebasenode.h"
 
 
-#ifndef IAUPDATEMAINVIEW_H
-#define IAUPDATEMAINVIEW_H
-
-// INCLUDES
-#include <aknview.h> 
-#include <akntoolbarobserver.h> 
-#include "iaupdatecontainerobserver.h"
-
-// FORWARD DECLARATIONS
-class CAknNavigationControlContainer;
-class CAknNavigationDecorator;
-class CAknToolbar;
-class CIAUpdateMainContainer;
-class CIAUpdateFWUpdateHandler;
-
-class MIAUpdateAnyNode;
-class MIAUpdateNode;
-class MIAUpdateFwNode;
-
-// CLASS DECLARATION
-/**
-* This class represents the main view of IAUpdate
-*
-*/
-class CIAUpdateMainView : public CAknView, 
-                          public MAknToolbarObserver, 
-                          public MIAUpdateContainerObserver
-    {
-public:
-    /**
-    * Symbian two phased constructor.
-    * @return Instance of the created server object.
-    */
-    static CIAUpdateMainView* NewL(const TRect& aRect );
-
-    /**
-    * Symbian two phased constructor.
-    * @return Instance of the created server object.
-    */
-    static CIAUpdateMainView* NewLC(const TRect& aRect );
-
-    /**
-    * Destructor
-    */
-    ~CIAUpdateMainView();
-    
-    /**
-    * Refresh the list
-    * @param aNodes  Array of nodes 
-    * @param aError  Error code
-    */    
-    void RefreshL( const RPointerArray<MIAUpdateNode>& aNodes,
-                   const RPointerArray<MIAUpdateFwNode>& aFwNodes,
-                   TInt aError );       
-            
-    /**
-    * Returns node that's highlighted in a list
-    * @return Current (highlighted) node
-    */     
-    MIAUpdateAnyNode* GetCurrentNode();
-    
-    /**
-    * Returns node that's selected (marked) in a list
-    * Can be used only when it's known that only one node is selected (marked)
-    * @return selected (marked) node
-    */  
-    MIAUpdateAnyNode* GetSelectedNode();
-    
-    
-private:  // from CAknView
-    
-    /**
-    * Returns views id, intended for overriding by sub classes.
-    * @return id for this view.
-    */
-    TUid Id() const;
-    
-    /** 
-    * Command handling function intended for overriding by sub classes. 
-    * Default implementation is empty.  
-    * @param aCommand ID of the command to respond to. 
-    */
-    void HandleCommandL( TInt aCommand );
-    
-    /**
-    * Dynamic menu initiation
-    * Called by framework before menu is shown.
-    * @param aResourceId Menu resource id.
-	* @param aMenuPane Pointer to the menu.
-    */ 
-    void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+class HbListWidget;
+//class HbListView;
 
 
-    /** 
-    * Handles a view activation and passes the message of type 
-    * @c aCustomMessageId. This function is intended for overriding by 
-    * sub classes. This function is called by @c AknViewActivatedL().
-    * Views should not launch waiting or modal notes or dialogs in
-    * @c DoActivateL.
-    * @param aPrevViewId Specifies the view previously active.
-    * @param aCustomMessageId Specifies the message type.
-    * @param aCustomMessage The activation message.
-    */
-    void  DoActivateL ( const TVwsViewId& aPrevViewId, 
-                        TUid aCustomMessageId, 
-                        const TDesC8& aCustomMessage );
-
-    /** 
-    * View deactivation function intended for overriding by sub classes. 
-    * This function is called by @c AknViewDeactivated().
-    */
-    void DoDeactivate();
- 
-private: // from MAknToolbarObserver 
-    
-    /**
-    * Should be used to set the properties of some toolbar components 
-    * before it is drawn.
-    * @param aResourceId The resource ID for particular toolbar
-    * @param aToolbar The toolbar object pointer
-    */
-    void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar );
-            
-    /**
-    * Handles toolbar events for a certain toolbar item.
-    * @param aCommand The command ID of some toolbar item.
-    */
-    void OfferToolbarEventL( TInt aCommand );
-    
-private: // from MIAUpdateContainerObserver   
- 
-    /**
-    * Mark list item
-    * @param aMark True if marking, False if unmarking
-    * @param aIndex  Index of the item
-    * @return False value if marking/unmarking cancelled when dependencies/dependants not found
-    */ 
-    TBool MarkListItemL( TBool aMark, TInt aIndex );
-  
-    /**
-    * Set text label to middle soft key
-    * @param aVisible   True value when MSK text is visible
-    * @param aSelected  True value when list item is selected( marked)
-    */
-    void SetMiddleSKTextL( TBool aVisible, TBool aSelected );
-    
-private: // constructors
-     
-    /** 
-    * Constuctor 
-    * @param aRect Rectangular of the view
-    */
-    void ConstructL(const TRect& aRect);
-
-    /** 
-    * C++ constuctor 
-    */
-    CIAUpdateMainView();
-
-private: // new methods    
-    /**
-    * Get selected (marked) nodes in the list
-    * @param aSelectedNodes Array of nodes 
-    */  
-    void GetSelectedNodesL( RPointerArray<MIAUpdateAnyNode>& aSelectedNodes ) const;
+class IAUpdateMainView : public HbView
+{
+    Q_OBJECT 
     
-    /**
-      * Get mandatory nodes in the list
-      * @param aMandNodes Array of nodes 
-      */  
-    void GetMandatoryNodesL( RPointerArray<MIAUpdateAnyNode>& aMandNodes ) const;  
-    /**
-    * Pass selected indices to the container 
-    */ 
-    void SetSelectedIndicesL(); 
-    
-    /**
-    * Get index of a node 
-    *
-    * @param aNode Node
-    * @return Index of the node
-    */  
-    TInt NodeIndex( const MIAUpdateAnyNode& aNode ) const; 
-    
-    /**
-    * Updates the status pane text
-    */ 
-    void UpdateStatusPaneL();
-    
-    /**
-    * Updates selection information in navi pane 
-    */ 
-    void UpdateSelectionInfoInNaviPaneL();
-    
-    /**
-    * Removes selection info in  navi pane
-    */                                      
-    void RemoveSelectionInfoInNaviPane();
+public:
+    IAUpdateMainView();
+    virtual ~IAUpdateMainView();
+        
+    void refresh( const RPointerArray<MIAUpdateNode>& nodes,
+                      const RPointerArray<MIAUpdateFwNode>& fwNodes,
+                      int error );
+public slots:
+    void handleStartUpdate();
+ 
+    void handleSettings();
+ 
+    void handleDisclaimer();
     
-    /**
-    * Shows dependencies found dialog
-    *
-    * @param aText Text shown in a dialog
-    * @return True value if marking/unmarking accepted 
-    */ 
-    TBool ShowDependenciesFoundDialogL( TDesC& aText ) const;
+    void handleSelectionChanged(QItemSelection);
     
-    /**
-    * Count of selected (marked) items 
-    *
-    * @return Count of selected items 
-    */                     
-    TInt CountOfSelectedItems() const;
+private:
     
-    void ShowUpdateCannotOmitDialogL() const;
-    
-private: // Data
 
-    CAknNavigationControlContainer* iNaviPane; //not owned
     
-    CAknNavigationDecorator* iDecorator;
-        
-    CIAUpdateMainContainer* iContainer;
-    
-    RPointerArray<MIAUpdateAnyNode> iAllNodes;
-    
-    TBool iShowStatusDialogAgain;
-    
-    TInt iRefreshError;
-    
-    TInt iLastCommandId;
-    
-    CIAUpdateFWUpdateHandler* iFwUpdateHandler;
-    
-    TBool iIsDMSupported;
-    
-    };
+private:
+    //HbListView *mListView;
+    HbListWidget *mListView;
+    RPointerArray<MIAUpdateAnyNode> mAllNodes;
 
+};
 
-#endif // IAUPDATEMAINVIEW_H
-
-// End of File
+#endif /* IAUPDATEMAINVIEW_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/inc/iaupdatemainwindow.h	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* 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 file contains the header file of the IAUpdateMainWindow
+*                class 
+*
+*/
+
+#ifndef IAUPDATEMAINWINDOW_H_
+#define IAUPDATEMAINWINDOW_H_
+
+#include <qobject>
+#include <hbmainwindow.h>
+
+// Forward declarations
+class IAUpdateMainView;
+class IAUpdateHistoryView;
+class HbDocumentLoader;
+class MIAUpdateNode;
+class MIAUpdateFwNode;
+class IAUpdateServiceProvider;  //temp
+
+class IAUpdateMainWindow : public HbMainWindow
+    {
+    Q_OBJECT
+    
+public:
+    IAUpdateMainWindow();
+    virtual ~IAUpdateMainWindow();
+
+public slots:
+    void toMainView();
+    void refreshMainView(const RPointerArray<MIAUpdateNode>& nodes,
+                         const RPointerArray<MIAUpdateFwNode>& fwNodes,
+                         int error);
+    void toHistoryView();
+
+private:
+    void addMainView();
+    void addHistoryView();
+    
+private:
+    IAUpdateMainView *mMainView;
+    IAUpdateHistoryView *mHistoryView;
+    
+    };
+
+#endif /* IAUPDATEMAINWINDOW */
--- a/iaupdate/IAD/ui/inc/iaupdatenavipanehandler.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 of CIAUpdateNaviPaneHandler class
-*
-*/
-
-
-
-#ifndef IAUPDATENAVIPANEHANDLER_H
-#define IAUPDATENAVIPANEHANDLER_H
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <aknnavide.h>
-
-//FORWARD DECLARATIONS
-class CEikStatusPane;
-
-
-/**
-* CIAUpdateNaviPaneHandler
-* 
-* This class is used for changing navipane title.
-*/
-class CIAUpdateNaviPaneHandler : public CBase
-	{
-    public:
-        /**
-        * Destructor.
-        */
-		virtual ~CIAUpdateNaviPaneHandler();
-
-        /**
-        * C++ default constructor.
-        */
-		CIAUpdateNaviPaneHandler(CEikStatusPane* aStatusPane);
-
-	public:
-
-		/**
-		* Sets navi pane title.
-		* @param aTitle.
-		* @return None.
-		*/
-		void SetNaviPaneTitleL(const TDesC& aTitle);
-		
-
-	private:
-		// status pane
-		CEikStatusPane* iStatusPane;
-	
-	    // navi Pane
-	    CAknNavigationControlContainer* iNaviPane;
-        
-        // navi decorator
-        CAknNavigationDecorator* iNaviDecorator;
-        
-        // has Navidecorator been pushed into navi pane
-        TBool iNavidecoratorPushed;
-        
-        // has navi pane been pushed into navigation pane's object stack
-        TBool iNavipanePushed;
-	};
-#endif      // IAUPDATENAVIPANEHANDLER_H
-            
-// End of File
--- a/iaupdate/IAD/ui/inc/iaupdateprogressdialog.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2008 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 the header file of the CIAUpdateProgressDialog class.
-*
-*/
-
-
-
-#ifndef IAUPDATEPROGRESSDIALOG_H
-#define IAUPDATEPROGRESSDIALOG_H
-
-// INCLUDES
-#include <AknWaitDialog.h>
-
-
-// FORWARD DECLARATIONS
-class MIAUpdateWaitDialogObserver;
-
-// CLASS DECLARATION
-
-/**
-* Wait dialog for IA Update client
-*/
-class CIAUpdateProgressDialog : public CAknProgressDialog
-    {
-
-    public: // Constructors and destructor
-
-        /**
-        * Constructor
-        */
-        CIAUpdateProgressDialog( CEikDialog** aSelfPtr, TBool aVisibilityDelayOff );
-
-        virtual ~CIAUpdateProgressDialog();
-
-    public:
-        
-        /**
-        * From CEikDialog, respond to softkey inputs.
-        * @para aButtonId, type of pressed Button or Softkey
-        * @return TBool, ETrue if exit the dialog, otherwise EFalse.
-        */
-        TBool OkToExitL( TInt aButtonId );
-
-    public:  // New functions
-        void SetCallback( MIAUpdateWaitDialogObserver* aCallback );  
-        
-        /**
-        * Set final value for the progress bar in progress dialog.        
-        * @param aValue - Final value of the progress bar.
-        */
-        void SetProgressDialogFinalValueL( TInt aValue );
-
-        /**
-        * Increments the progress bar in progress dialog.
-        * @param aValue - Value to be set as the total progress.
-        */
-        void UpdateProgressDialogValueL( TInt aValue );      
-
-    private: //data
-
-        MIAUpdateWaitDialogObserver* iCallback;   
-        TInt iMaxProgress;     
-    };
-
-
-#endif // IAUPDATEPROGRESSDIALOG_H
-
-// End of file
--- a/iaupdate/IAD/ui/inc/iaupdaterefreshhandler.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdaterefreshhandler.h	Mon May 03 12:38:03 2010 +0300
@@ -23,6 +23,7 @@
 // INCLUDES
 #include <e32base.h>
 #include <eikenv.h>
+#include <e32property.h>
 
 // FORWARD DECLARATIONS
 class MIAUpdateRefreshObserver;
--- a/iaupdate/IAD/ui/inc/iaupdateserver.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 the header file of the CIAUpdateServer class 
-*
-*/
-
-
-
-#ifndef IAUPDATESERVER_H
-#define IAUPDATESERVER_H
-
-//  INCLUDES
-#include <AknServerApp.h>
-
-
-// FORWARD DECLARATIONS
-class MRequestCallback;
-
-// CLASS DECLARATION
-
-/**
-* This class represents the IAUpdate server.
-*
-* @since 3.2
-*/
-class CIAUpdateServer : public CAknAppServer
-    {
-    public:  // Constructors and destructor
-  
-        /**
-        * Constructor.
-        * @return Instance of the created server object.
-        */  
-        static CIAUpdateServer* NewL();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CIAUpdateServer();      
-        
-    
-    public: // Functions from base classes
-
-        /**
-        * From CApaAppServiceBase, Service creation function.
-        * @since 3.2
-        */
-        CApaAppServiceBase* CreateServiceL( TUid aServiceType ) const;
-               
-        
-        void HandleAllClientsClosed();
-        
-        
-    private:
-
-        /**
-        * Constructor.
-        */
-        CIAUpdateServer();
-
-        /**
-        * 2nd phase constructor.
-        * @param aServerName - Name of the server
-        */
-        void ConstructL();
-        
-
-    };
-
-#endif      // IAUPDATESERVER_H
-            
-// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/inc/iaupdateserviceprovider.h	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,118 @@
+/*
+* 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 file contains the header file of the IAUpdateServiceProvider class 
+*
+*/
+
+
+
+#ifndef IAUPDATESERVICEPROVIDER_H
+#define IAUPDATESERVICEPROVIDER_H
+
+#include <QtCore/qmetaobject.h>
+#include <xqserviceprovider.h>
+
+class CIAUpdateParameters;
+class CIAUpdateResult;
+class IAUpdateEngine;
+
+class IAUpdateServiceProvider : public XQServiceProvider
+{
+    Q_OBJECT
+    
+    public:
+    
+    enum RequestType
+        {
+        /**
+        * No operation is going on.
+        */ 
+        NoOperation,       
+                
+        /**
+        * Update check has been requested.
+        */
+        CheckUpdates,
+
+        /**
+        * Show Update operation has been requested.
+        */
+        ShowUpdates,     
+                
+        /**
+        * Update query has been requested.
+        */
+        UpdateQuery,
+        /**
+        * Bring to foreground has been requested.
+        */
+        BroughtToForeground
+        };
+
+    
+    IAUpdateServiceProvider(IAUpdateEngine& engine);
+    ~IAUpdateServiceProvider();
+    
+    public slots:
+    void startedByLauncher(bool refreshFromNetworkDenied);
+    void checkUpdates(QString stringWgId, 
+                      QString stringUid,  
+                      QString searchCriteria, 
+                      QString commandLineExecutable,
+                      QString commandLineArguments,
+                      QString stringShowProgress,
+                      QString stringImportance,
+                      QString stringType,
+                      QString stringRefresh);
+    void showUpdates(QString stringWgId, 
+                     QString stringUid,  
+                     QString searchCriteria, 
+                     QString commandLineExecutable,
+                     QString commandLineArguments,
+                     QString stringShowProgress,
+                     QString stringImportance,
+                     QString stringType,
+                     QString stringRefresh);
+
+    void updateQuery(QString stringWgId);
+    
+    private:
+    
+    void SetParams(CIAUpdateParameters& params,
+                   QString& stringUid,  
+                   QString& searchCriteria, 
+                   QString& commandLineExecutable,
+                   QString& commandLineArguments,
+                   QString& stringShowProgress,
+                   QString& stringImportance,
+                   QString& stringType,
+                   QString& stringRefresh) const; 
+    
+    public:  //temp
+    
+    void completeLauncherLaunch(int error);
+    void completeCheckUpdates(int countOfAvailableUpdates, int error);
+    void completeShowUpdates(const CIAUpdateResult* updateResult, int error);
+    void completeUpdateQuery(bool updateNow, int error);
+    
+    private:
+    
+    IAUpdateEngine* mEngine; //not owned
+    int mAsyncReqId;
+    RequestType mCurrentRequest;
+};
+
+#endif      // IAUPDATESERVICEPROVIDER_H
+            
+// End of File
--- a/iaupdate/IAD/ui/inc/iaupdatesession.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 the header file of the CIAUpdateSession class 
-*
-*/
-
-
-
-#ifndef IAUPDATESESSION_H
-#define IAUPDATESESSION_H
-
-//  INCLUDES
-#include <AknServerApp.h>
-
-#include "iaupdaterequestobserver.h"
-
-// FORWARD DECLARATIONS
-class CIAUpdateServer;
-class RMessage2;
-class CEikonEnv;
-
-// CLASS DECLARATION
-
-/**
-* This class represents the main server session.
-*
-*/
-class CIAUpdateSession : public CAknAppServiceBase,
-                         public MIAUpdateRequestObserver
-    {
-    public:  // Constructors and destructor
-     
-        /**
-        * C++ default constructor.
-        */
-        CIAUpdateSession();
-
-        /**
-        * Destructor.
-        */
-        virtual ~CIAUpdateSession();
-
-    public: // From CAknAppServiceBase
-
-        /**
-        * Handles the received message.
-        * The method simply calls HandleRequestL under trap harness. 
-        * @param aMessage - Reference to the message that contains the request
-        */
-        void ServiceL( const RMessage2& aMessage );
-
-        /**
-        * Called back by the server framework if this 
-        * session's RunL function returns an error.
-        * @param aMessage - Reference to the message that contains the request
-        * @param aError - Error code.
-        */
-        void ServiceError( const RMessage2& aMessage, TInt aError );
-
-        /**
-        * Completes construction of this server-side 
-        * client session object.
-        */
-        void CreateL(); 
-
-
-    public: // from MIAUpdateRequestObserver
-    
-        /**
-         * @see MIAUpdateRequestObserver::RequestCompleted
-         */
-        void RequestCompleted( CIAUpdateResult* aResult, 
-                               TInt aCountOfAvailableUpdates,
-                               TBool aUpdateNow,            
-                               TInt aError );
-
-
-    private:
-
-        /**
-        * Returns reference of the server.
-        * @return Reference of the server.
-        */
-        CIAUpdateServer& Server();
-
-        /**
-        * Handles the request.
-        * @param aMessage - Reference to the message that contains the request
-        */
-        void HandleRequestL( const RMessage2& aMessage );
-
-
-    private: // From CApaAppServiceBase
-
-        /**
-        * Virtual framework function that is called 
-        * on receipt of a message from the client. This allows the service 
-        * implementation to define a security policy for messages from the client. 
-        * @param aMessage - Reference to the message that contains the request
-        */
-        CPolicyServer::TCustomResult SecurityCheckL( const RMessage2& aMsg, 
-                                                     TInt& aAction, 
-                                                     TSecurityInfo& aMissing );        
-
-    private:    // Data
-
-        RMessage2* iMessage;
-        
-        CEikonEnv* iEikEnv; //not owned
-        
-                   
-    };
-
-
-#endif      // IAUPDATESESSION_H  
-            
-// End of File
--- a/iaupdate/IAD/ui/inc/iaupdatesettingdialog.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-/*
-* Copyright (c) 2007-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 of CIAUpdateSettingDialog class
-*
-*/
-
-
-
-
-#ifndef IAUPDATESETTINGDIALOG_H
-#define IAUPDATESETTINGDIALOG_H
-
-
-//  INCLUDES
-#include "iaupdatedialogutil.h"
-
-#include <e32base.h>
-#include <AknDialog.h>
-#include <aknsettingitemlist.h>
-
-
-// FORWARD DECLARATIONS
-class CAknSettingItemList;
-class CIAUpdateSettingItemList;
-class CIAUpdateAccessPointHandler;
-class CIAUpdateStatusPaneHandler;
-
-
-// CLASS DECLARATION
-
-/**
-* CIAUpdateSettingDialog
-*
-* CIAUpdateSettingDialog is used for editing IA Update settings.
-*/
-class CIAUpdateSettingDialog : public CAknDialog, public MEikListBoxObserver
-    {
-    public:
-    enum TAttributeKeys
-        {
-        EAccessPoint = 0,
-        EAutoUpdateCheck
-        };
-    
-	public:
-	
-	    /**
-        * Launches dialog.
-        * @param aParam Class that contains dialog parameters.
-        * @return Completion code.
-        */
-		static TBool ShowDialogL();
-		
-		
-	public:// Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-		static CIAUpdateSettingDialog* NewL();
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CIAUpdateSettingDialog();
-    
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CIAUpdateSettingDialog();
-	
-        /**
-        * By default Symbian OS constructor is private.
-        */
-        void ConstructL();
-
-	private:
-	    SEikControlInfo CreateCustomControlL( TInt aControlType );
-	    
-        /**
-        * From MEikListBoxObserver, called by framework.
-        * @param aListBox.
-        * @param aEventType.
-		* @return None
-        */
-		void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-
-        /**
-        * From the base class.
-		* Called by framework before the dialog is shown.
-        * @param None
-		* @return None
-        */
-        void PreLayoutDynInitL();
-
-        /**
-        * From the base class.
-		* Called by framework before exiting the dialog.
-        * @param aButtonId Button id.
-		* @return ETrue to exit\ EFalse to not to exit.
-        */
-        TBool OkToExitL(TInt aButtonId);
-
-        /**
-        * From the base class.
-		* Called by framework for key event handling.
-        * @param aKeyEvent.
-		* @param aType.
-		* @return Return code.
-        */
-		TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
-
-        /**
-        * From the base class.
-		* Called by framework when dialog is activated.
-        * @param None.
-		* @return None.
-        */
-		void ActivateL();
-		
-		/**
-		* Method to get context sensitive help topic.
-        * @param aContext Help topic to open.
-		* @return None.
-        */
-		void GetHelpContext(TCoeHelpContext& aContext) const;
-
-		/**
-        * From the base class.
-		* Called by framework before menu is shown.
-        * @param aResourceId Menu resource id.
-		* @param aMenuPane Pointer to the menu.
-        * @return None.
-        */
-		void DynInitMenuPaneL(TInt aResourceID, CEikMenuPane* aMenuPane);
-
-		/**
-		* From the base class.
-		* Handles menu events.
-		* @param  aCommandId Command id.
-		* @return None.
-		*/
-		void ProcessCommandL(TInt aCommandId);
-		
-		/**
-		* From base class.
-		* Called when UI layout changes. 
-		* @param aType.
-    	* @return None.
-		*/
-        void HandleResourceChange(TInt aType);
-
-
-    private:
-		/**
-		* Save settings to CR.
-		*/
-		void SaveSettingsL();
-
-		/**
-		* Read settings from CR.
-		*/
-        void ReadSettingsL();
-     
-	private:
-		/**
-        * Opens setting editor.
-        */
-		void EditItemL();
-
-		/**
-        * Set setting item visibility (normal/readonly/hidden).
-        * @param None.
-		* @return None.
-        */
-		void SetVisibility();
-		
-        /**
-        * Set all settings to read-only state.
-        * @param None.
-		* @return None.
-        */
-		void SetAllReadOnly();
-		
-
-	private:
-		CIAUpdateSettingItemList* iList;
-
-		// for title and icon handling
-		CIAUpdateStatusPaneHandler* iStatusPaneHandler;
-
-		// dialog edit mode
-		TInt iEditMode;
-
-    };
-
-
-/**
-* CIAUpdateSettingItemList
-*
-* Customized setting item list.
-*/
-class CIAUpdateSettingItemList : public CAknSettingItemList
-    {
-    public:
-        TInt Attribute( TInt aKey );
-        void CheckSettings();
-        
-        
-    public:  // from CAknSettingItemList
-        /**
-        * Load settings.
-        */
-        void LoadSettingsL();
-        
-    	/**
-    	* Launches the setting page for the current item by calling EditItemL on it
-    	* @param aIndex	- current item's (Visible) index in the list
-    	* @param aCalledFromMenu- ignored in most classes; may alter the behaviour
-    	* of the setting page
-    	*/
-    	void EditItemL( TInt aIndex, TBool aCalledFromMenu );
-
-        /**
-        * Create setting item.
-        * @param aSettingId Setting id.
-        * @return Setting item.
-        */
-        CAknSettingItem* CreateSettingItemL( TInt aSettingId );
-
-	private:
-	    TInt iAccessPoint;
-        TInt iAutoUpdateCheck;
-        };
-
-
-class CIAUpdateAccessPointSettingItem : public CAknSettingItem
-	{
-	public:
-        static CIAUpdateAccessPointSettingItem* 
-        CIAUpdateAccessPointSettingItem::NewL( TInt aSettingId, TInt& aAccessPointId );
-	    ~CIAUpdateAccessPointSettingItem();
-	private:
-	    CIAUpdateAccessPointSettingItem ( TInt aSettingId, TInt& aAccessPointId );
-	    void ConstructL();
-	    
-
-	public:	// from CAknSettingItem
-		void EditItemL( TBool aCalledFromMenu );
-		const TDesC& SettingTextL();
-	
-	private:
-	    TBool EditAccessPointItemL();
-
-    private:
-        HBufC* iSettingText;
-        
-        TInt& iAccessPointId;
-        
-   		// for access point selection
-		CIAUpdateAccessPointHandler* iApHandler;
-	};
-
-
-
-#endif      // IAUPDATESETTINGDIALOG_H
-            
-// End of File
--- a/iaupdate/IAD/ui/inc/iaupdatestatusdialog.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2008 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 of CIAUpdateStatusDialog
-*
-*/
-
-
-
-#ifndef IAUPDATESTATUSDIALOG_H
-#define IAUPDATESTATUSDIALOG_H
-
-
-//  INCLUDES
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class TIAUpdateDialogParam;
-class MIAUpdateTextLinkObserver;
-
-
-
-
-/**
-* CIAUpdateStatusDialog
-*
-* CIAUpdateStatusDialog is used for displaying status details.
-*/
-class CIAUpdateStatusDialog : public CBase
-    {
-	public:
-	
-	    /**
-        * Launches dialog.
-        * @param aParam Class that contains dialog parameters.
-        * @return Completion code.
-        */
-		static TInt ShowDialogL( TIAUpdateDialogParam* aParam );
-		
-	public:// Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-		static CIAUpdateStatusDialog* NewL( TIAUpdateDialogParam* aParam );
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CIAUpdateStatusDialog();
-    
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CIAUpdateStatusDialog( TIAUpdateDialogParam* aParam );
-	
-        /**
-        * By default Symbian OS constructor is private.
-        */
-        void ConstructL();
-        
-    private:
-        void ConstructTextL();
-        TInt ShowDialogL();
-        void HandleLinkL();
-        
-    private:
-        // callback function in message query
-        static TInt HandleLink( TAny* aPtr );
-        
-    private:
-        TIAUpdateDialogParam* iParam;
-        HBufC* iBuf;
-        MIAUpdateTextLinkObserver* iObserver;
-    };
-
-
-#endif      // IAUPDATESTATUSDIALOG_H
-            
-// End of File
--- a/iaupdate/IAD/ui/inc/iaupdatestatuspanehandler.h	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 of CIAUpdateStatusPaneHandler class
-*
-*/
-
-
-
-#ifndef IAUPDATESTATUSPANEHANDLER_H
-#define IAUPDATESTATUSPANEHANDLER_H
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <aknappui.h>
-
-// FORWARD DECLARATIONS
-class CIAUpdateNaviPaneHandler;
-
-
-
-/**
-* CIAUpdateStatusPaneHandler
-* 
-* This class is used for changing dialog title and image.
-*/
-class CIAUpdateStatusPaneHandler : public CBase
-	{
-    public:
-        /**
-        * Two-phased constructor.
-        */
-		static CIAUpdateStatusPaneHandler* NewL(CAknAppUi* aAppUi);
-
-        /**
-        * Destructor.
-        */
-		virtual ~CIAUpdateStatusPaneHandler();
-
-    private:
-        /**
-        * By default Symbian OS constructor is private.
-        */
-		void ConstructL();
-
-        /**
-        * C++ default constructor.
-        */
-		CIAUpdateStatusPaneHandler(CAknAppUi* aAppUi);
-
-	public:
-		/**
-		* Stores original title so it can be restored when dialog closes.
-		* @param  None.
-		* @return None.
-		*/
-        void StoreOriginalTitleL();
-
-		/**
-		* Restores original title.
-		* @param  None.
-		* @return None.
-		*/
-		void RestoreOriginalTitleL();
-
-		/**
-		* Sets dialog title.
-		* @param  aText.
-		* @return None.
-		*/
-		void SetTitleL(const TDesC& aText);
-
-		/**
-		* Sets dialog title.
-		* @param  aResourceId.
-		* @return None.
-		*/
-		void SetTitleL(TInt aResourceId);
-
-	public:
-		/**
-		* Sets dialog title.
-		* @param aAppUi.
-		* @param aText.
-		* @return Return code.
-		*/
-		static TBool SetTitleL(CAknAppUi* aAppUi, const TDesC& aText);
-
-		/**
-		* Gets dialog title.
-		* @param aAppUi.
-		* @param aText.
-		* @return Return code.
-		*/
-		static TBool GetTitleL(CAknAppUi* aAppUi, HBufC*& aText);
-		
-		/**
-		* Sets navi pane title.
-		* @param aTitle.
-		* @return None.
-		*/
-		void SetNaviPaneTitleL(const TDesC& aTitle);
-		
-	private:
-		// access to app ui
-		CAknAppUi* iAppUi;
-
-		// original status pane title
-		HBufC* iOriginalTitle;
-		
-		// is original status pane title stored
-		TBool iOriginalTitleStored;
-
-		// original context pane image
-		CEikImage* iOriginalImage;
-		
-   	    CIAUpdateNaviPaneHandler* iNaviPaneHandler;
-	};
-
-
-
-
-#endif      // IAUPDATESTATUSPANEHANDLER_H
-            
-// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/inc/iaupdatetools.h	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2007-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 file contains the header file of the IAUpdateTools functions
+*
+*/
+
+
+
+#ifndef IA_UPDATE_TOOLS_H
+#define IA_UPDATE_TOOLS_H
+
+#include <e32base.h>
+#include <e32cmn.h>
+
+class RReadStream;
+class RWriteStream;
+
+
+/**
+ * IAUpdateTools provides general tool functions
+ *
+ * @since S60 v3.2
+ */
+namespace IAUpdateTools
+    {
+
+    /**
+     * @param aTarget The old pointer data will be deleted and the pointer will point to the new data 
+     * that will contain externalization of the CIAUpdateParameters object.
+     * @param aSource CIAUpdateParameters object that will be externalized to a descriptor.
+     * @exception Leaves with system wide error code.
+     */
+    void ExternalizeParametersL( HBufC8*& aTarget,
+                                 const CIAUpdateParameters& aSource );
+
+    /**
+     * Internalizes CIAUpdateParameters from the source descriptor data.
+     *
+     * @param aTarget CIAUpdateParameters object that will be internalized.
+     * @param aSource Data that is used to internalize CIAUpdateParameters object.
+     * @exception Leaves with system wide error code.
+     */
+    void InternalizeParametersL( CIAUpdateParameters& aTarget, 
+                                 const TDesC8& aSource );
+
+
+    /**
+     * Externalizes the descriptor to the stream with length information
+     *
+     * @param aDes Descriptor to externalize
+     * @param aStream Target stream
+     * @exception Leaves with system wide error code.
+     */
+    void ExternalizeDesL( const TDesC& aDes, 
+                          RWriteStream& aStream );
+
+    /**
+     * Internalizes a descriptor written with ExternalizeDesL() from the stream
+     *
+     * @param Target descriptor pointer. Old descriptor is deleted if the read is 
+     * successful.
+     * @param aStream Source stream
+     * @return Length of the read data
+     * @exception Leaves with system wide error code. 
+     */
+    TInt InternalizeDesL( HBufC*& aDes, 
+                          RReadStream& aStream );
+
+
+    /**
+     * @see ExternalizeDesL
+     */
+    void ExternalizeDes8L( const TDesC8& aDes, 
+                           RWriteStream& aStream );
+
+    /**
+     * @see InternalizeDesL
+     */
+    TInt InternalizeDes8L( HBufC8*& aDes, 
+                           RReadStream& aStream );
+
+    }
+
+#endif // IA_UPDATE_TOOLS_H
--- a/iaupdate/IAD/ui/inc/iaupdateuicontroller.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdateuicontroller.h	Mon May 03 12:38:03 2010 +0300
@@ -47,7 +47,11 @@
 class MIAUpdateUiControllerObserver;
 class MIAUpdateHistory;
 class MIAUpdateFwNode;
+class IAUpdateWaitDialog;
+
+class QString;
 class CIAUpdateNodeId;
+class CEikonEnv;
 
 
 // CLASS DECLARATION
@@ -320,11 +324,9 @@
 private: // From MIAUpdateWaitDialogObserver    
     
     /**
-     * This is called when the dialog is about to be closed.
-     * @param aButtonId - Id of the button, which was used to cancel the dialog.
-     * @return ETrue, if it's ok to close the dialog, EFalse otherwise.
+     * This is called when the dialog is  closed.
      */
-    TBool HandleDialogExitL( TInt aButtonId );   
+     void HandleWaitDialogCancel();   
     
 
 private: // From MIAUpdateRefreshObserver   
@@ -426,7 +428,7 @@
      * @param aDisplayString       A string to be displayed
      * @param aVisibilityDelayOff  ETrue if visibility delay is off
      */                  
-    void ShowWaitDialogL( const TDesC& aDisplayString, 
+    void ShowWaitDialogL( const QString& aDisplayString, 
                           TBool aVisibilityDelayOff ); 
     
     /**
@@ -555,7 +557,7 @@
     
     RPointerArray<MIAUpdateNode> iServicePackNodes;
  
-    CIAUpdateWaitDialog* iWaitDialog;
+    IAUpdateWaitDialog *mWaitDialog;
     
     CIAUpdateProgressDialog* iProgressDialog;
     
--- a/iaupdate/IAD/ui/inc/iaupdatewaitdialog.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdatewaitdialog.h	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:   This file contains the header file of the CIAUpdateWaitDialog class.
+* Description:   This file contains the header file of the IAUpdateWaitDialog class.
 *
 */
 
@@ -21,10 +21,13 @@
 #define IAUPDATEWAITDIALOG_H
 
 // INCLUDES
-#include <AknWaitDialog.h>
+#include <QObject>
+
+#include "iaupdatewaitdialog.h"
 
 
 // FORWARD DECLARATIONS
+class HbProgressDialog;
 class MIAUpdateWaitDialogObserver;
 
 // CLASS DECLARATION
@@ -32,34 +35,36 @@
 /**
 * Wait dialog for IA Update client
 */
-class CIAUpdateWaitDialog : public CAknWaitDialog
-    {
+class IAUpdateWaitDialog : public QObject
+{
+    Q_OBJECT
 
-    public: // Constructors and destructor
+public: // Constructors and destructor
 
-        /**
-        * Constructor
-        */
-        CIAUpdateWaitDialog( CEikDialog** aSelfPtr, TBool aVisibilityDelayOff );
+    /**
+    * Constructor
+    */
+    IAUpdateWaitDialog();
 
-        virtual ~CIAUpdateWaitDialog();
+    ~IAUpdateWaitDialog();
 
-    public:
+public:  // New functions
+    
+    int showDialog(const QString& text);
         
-        /**
-        * From CEikDialog, respond to softkey inputs.
-        * @para aButtonId, type of pressed Button or Softkey
-        * @return TBool, ETrue if exit the dialog, otherwise EFalse.
-        */
-        TBool OkToExitL( TInt aButtonId );
+    void SetCallback(MIAUpdateWaitDialogObserver* callback );  
+    
+    void close();
+    
+public slots:
 
-    public:  // New functions
-        void SetCallback( MIAUpdateWaitDialogObserver* aCallback );        
+    void dialogCancelled();
 
-    private: //data
-
-        MIAUpdateWaitDialogObserver* iCallback;        
-    };
+private: //data
+    
+    HbProgressDialog *mWaitDialog;
+    MIAUpdateWaitDialogObserver *mCallback;        
+};
 
 
 #endif // IAUPDATEWAITDIALOG_H
--- a/iaupdate/IAD/ui/inc/iaupdatewaitdialogobserver.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdatewaitdialogobserver.h	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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"
@@ -35,12 +35,10 @@
     {
     public:
         
-        /**
-        * This is called when the dialog is about to be closed.
-        * @param aButtonId - Id of the button, which was used to cancel the dialog.
-        * @return ETrue, if it's ok to close the dialog, EFalse otherwise.
-        */
-        virtual TBool HandleDialogExitL( TInt aButtonId ) = 0;    
+    /**
+    * This is called when the dialog is cancelled
+    */
+    virtual void HandleWaitDialogCancel() = 0;    
     };
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/service_conf.xml	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<service>
+  <name>com.nokia.services.swupdate</name>
+  <filepath>No path</filepath>
+  <description>SWUpdate service</description>
+  <interface>
+     <name>swupdate_interface</name>
+     <version>1.0</version>
+     <description>Interface which may do something</description>
+   </interface>
+</service>
\ No newline at end of file
--- a/iaupdate/IAD/ui/src/iaupdateaccesspointhandler.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 "iaupdateaccesspointhandler.h"
-#include "iaupdatedebug.h"
-#include <iaupdate.rsg>
-
-#include <featmgr.h>
-#include <StringLoader.h>
-// access point selection
-#include <cmapplicationsettingsui.h>
-#include <cmconnectionmethoddef.h>
-#include <cmdestination.h>
-
-
-
- 
-
-/******************************************************************************
- * class CIAUpdateAccessPointHandler
- ******************************************************************************/
- 
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointHandler::NewLC
-//
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateAccessPointHandler* CIAUpdateAccessPointHandler::NewL()
-    {
-    CIAUpdateAccessPointHandler* self = new( ELeave ) CIAUpdateAccessPointHandler();
-	CleanupStack::PushL(self);
-	self->ConstructL();
-	CleanupStack::Pop(self);
-
-	return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Destructor
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateAccessPointHandler::~CIAUpdateAccessPointHandler()
-	{
-	delete iCmUi;
-	iCmManager.Close();
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointHandler::CIAUpdateAccessPointHandler
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateAccessPointHandler::CIAUpdateAccessPointHandler()
-	{
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointHandler::ConstructL
-//
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateAccessPointHandler::ConstructL()
-    {
-    iCmManager.OpenL();
-    iCmUi = CCmApplicationSettingsUi::NewL();
-
-	iIdAppCsdSupport = EFalse;
-	FeatureManager::InitializeLibL();
-	if ( FeatureManager::FeatureSupported( KFeatureIdAppCsdSupport ) )
-	    {
-	    iIdAppCsdSupport = ETrue;
-	    }
-	FeatureManager::UnInitializeLib();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointHandler::ShowApSelectDialogL
-//
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateAccessPointHandler::ShowApSelectDialogL( TInt& aItemUid, HBufC*& aItemName )
-	{
-    TBearerFilterArray filterArray;
-    TCmSettingSelection selection;
-    selection.iId = aItemUid;
-    selection.iResult = CMManager::EDestination;
-    
-    TBool ret = iCmUi->RunApplicationSettingsL( 
-        selection,
-        CMManager::EShowDestinations | CMManager::EShowDefaultConnection, 
-        filterArray );
-    filterArray.Close();
-	
-	if ( ret )
-		{
-		aItemUid = selection.iId;
-		if ( selection.iResult == CMManager::EDefaultConnection )
-		    {
-			GetDefaultConnectionLabelL( aItemName );
-			}
-	    else
-	        {
-	        GetApNameL( aItemUid, aItemName );	
-	        }
-		return EDialogSelect;
-		}
-    else
-    	{
-    	return EDialogCancel;
-    	}
-	}
-
-	
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointHandler::GetApNameL
-//
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateAccessPointHandler::GetApNameL( TInt aItemUid, HBufC*& aItemName )
-	{
-	if ( aItemUid == KErrNotFound || aItemUid == 0 )
-		{
-		aItemName = KNullDesC().AllocL();
-		return KErrNotFound;
-		}
-
-    RCmDestination dest = iCmManager.DestinationL( aItemUid );
-    CleanupClosePushL( dest );
-    HBufC* temp = dest.NameLC();    
-    CleanupStack::Pop( temp );
-	CleanupStack::PopAndDestroy( &dest ); 
-	aItemName = temp;
-
-	TInt ret = KErrNone;
-	if ( aItemName->Length() == 0 ) 
-		{
-		ret = KErrNotFound;
-		}
-    
-	return ret;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointHandler::GetDefaultConnectionLabelL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateAccessPointHandler::GetDefaultConnectionLabelL( HBufC*& aLabelText )
-    {
-    aLabelText = StringLoader::LoadLC( R_IAUPDATE_DEFAULT_CONNECTION );    
-    CleanupStack::Pop( aLabelText );
-    }
-
-    
-//  End of File  
--- a/iaupdate/IAD/ui/src/iaupdateagreement.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateagreement.cpp	Mon May 03 12:38:03 2010 +0300
@@ -18,18 +18,16 @@
 
 
 //INCLUDES
+#include <hbaction.h>
+#include <hbmessagebox.h>
+#include <hbtextitem.h>
+#include <centralrepository.h>
 
 #include "iaupdateagreement.h"
 #include "iaupdatefirsttimeinfo.h"
-#include "iaupdatedialogutil.h"
 #include "iaupdate.hrh"
 #include "iaupdateprivatecrkeys.h"
 
-#include <avkon.rsg>
-#include <iaupdate.rsg>
-#include <aknmessagequerydialog.h>      // CAknMessageQueryDialog
-#include <StringLoader.h>
-#include <AknUtils.h>
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -104,16 +102,22 @@
         User::LeaveIfError( cenrep->Get( KIAUpdateAutoUpdateCheck, 
                                          autoUpdateCheckValue ) );
         CleanupStack::PopAndDestroy( cenrep );
+        autoUpdateCheckValue = EIAUpdateSettingValueDisable; //temp to test dialog
         if ( autoUpdateCheckValue == EIAUpdateSettingValueDisableWhenRoaming ||
              autoUpdateCheckValue ==  EIAUpdateSettingValueEnable  ) 
             {
             accepted = ETrue;
             firstTimeInfo->SetAgreementAcceptedL();
             }
-        else if ( ShowDialogL( R_IAUPDATE_SOFTKEYS_ACCEPT_DECLINE__ACCEPT ) == EAknSoftkeyYes )
+        else  
             {
-     	    accepted = ETrue;
-     	    firstTimeInfo->SetAgreementAcceptedL();
+     	    HbAction *primaryAction = new HbAction("Accept");
+     	    HbAction *secondaryAction = new HbAction("Decline");
+     	    if ( ShowDialogL( primaryAction, secondaryAction ) == primaryAction)
+     	        {
+     	        accepted = ETrue;
+     	        firstTimeInfo->SetAgreementAcceptedL();
+                }
             }
         }
     CleanupStack::PopAndDestroy( firstTimeInfo );
@@ -127,7 +131,9 @@
 //
 void CIAUpdateAgreement::ShowAgreementL()
     {
-    ShowDialogL( R_AVKON_SOFTKEYS_OK_EMPTY );	
+    HbAction *primaryAction = new HbAction("OK");
+    ShowDialogL( primaryAction, NULL );	
+    delete primaryAction;
     }
 
 // ---------------------------------------------------------------------------
@@ -148,9 +154,32 @@
 // 
 // ---------------------------------------------------------------------------
 //
-TInt CIAUpdateAgreement::ShowDialogL( TInt aCbaResourceId )
+HbAction* CIAUpdateAgreement::ShowDialogL( HbAction *primaryAction, HbAction *secondaryAction )
     {
-    HBufC* text_1 = StringLoader::LoadLC( R_IAUPDATE_AGREEMENT_DIALOG_TEXT_1 );
+    HbDialog agreementDialog;
+    HbTextItem *headingText = new HbTextItem(&agreementDialog);
+    headingText->setFontSpec(HbFontSpec(HbFontSpec::Title));
+    headingText->setText("Disclaimer");
+    agreementDialog.setHeadingWidget(headingText);
+    
+   
+    HbTextItem *text = new HbTextItem(&agreementDialog);
+    text->setFontSpec(HbFontSpec(HbFontSpec::PrimarySmall));
+    text->setText("This application allows you to download and use applications and services provided by Nokia or third parties. Service Terms and Privacy Policy will apply. Nokia will not assume any liability or responsibility for the availability or third party applications or services. Before using the third party application or service, read the applicable terms of use.\n\nUse of this application involves transmission of data. Contact your network service provider for information about data transmission charges.\n\n(c) 2007-2010 Nokia. All rights reserved.");
+    agreementDialog.setContentWidget(text);
+    
+    agreementDialog.setPrimaryAction(primaryAction);
+    
+    if ( secondaryAction )
+        {
+        agreementDialog.setSecondaryAction(secondaryAction);
+        }
+    agreementDialog.setTimeout(HbPopup::NoTimeout);
+    
+    return agreementDialog.exec(); 
+    }        
+    
+    /*HBufC* text_1 = StringLoader::LoadLC( R_IAUPDATE_AGREEMENT_DIALOG_TEXT_1 );
     HBufC* text_2 = StringLoader::LoadLC( R_IAUPDATE_AGREEMENT_DIALOG_TEXT_2 );
     HBufC* text_3 = StringLoader::LoadLC( R_IAUPDATE_AGREEMENT_DIALOG_TEXT_3 );
     HBufC* text_4 = StringLoader::LoadLC( R_IAUPDATE_AGREEMENT_DIALOG_TEXT_4 );
@@ -164,7 +193,7 @@
     CleanupStack::PushL( numberArray );
     numberArray->AppendL( 2007 ); 
     numberArray->AppendL( 2009 );
-    HBufC* text_copyright = StringLoader::LoadLC( R_IAUPDATE_AGREEMENT_DIALOG_COPYRIGHT, *numberArray );
+    //HBufC* text_copyright = StringLoader::LoadLC( R_IAUPDATE_AGREEMENT_DIALOG_COPYRIGHT, *numberArray );
     TPtr ptr = text_copyright->Des();
     AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr );
     
@@ -214,7 +243,8 @@
 
 	TInt ret = dlg->RunLD();
 	
-    return ret;
-    }
+    return ret;*/
+    //return KErrNone;
+
     
 // End of File  
--- a/iaupdate/IAD/ui/src/iaupdateapplication.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateapplication.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 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,65 +11,27 @@
 *
 * Contributors:
 *
-* Description:   This module contains the implementation of CIAUpdateApplication
+* Description:   This module contains the implementation of IAUpdateApplication 
 *                class member functions.
 *
 */
 
-
-
-#include <eikstart.h>
-#include "iaupdatedocument.h"
 #include "iaupdateapplication.h"
-#include "iaupdateserver.h"
-
+#include "iaupdatemainwindow.h"
+#include "iaupdateengine.h"
 
-// ---------------------------------------------------------
-// CAppMngrApp::CreateDocumentL()
-// Creates CIAUpdateDocumentt object
-// ---------------------------------------------------------
-//
-CApaDocument* CIAUpdateApplication::CreateDocumentL()
-    {  
-    // Create an IAUpdate document, and return a pointer to it
-    CApaDocument* document = CIAUpdateDocument::NewL(*this);
-    return document;
+IAUpdateApplication::IAUpdateApplication(  int argc, char* argv[] ) :
+    HbApplication( argc, argv ),
+    mEngine (new IAUpdateEngine),
+    mMainWindow (new IAUpdateMainWindow())
+    {
+    
+    // Connect view change signals to the view change slots
+    connect(&(*mEngine), SIGNAL(toMainView()), &(*mMainWindow), SLOT(toMainView()));
+    connect(&(*mEngine), SIGNAL(refresh(const RPointerArray<MIAUpdateNode>&, const RPointerArray<MIAUpdateFwNode>&,int)),
+            &(*mMainWindow), SLOT(refreshMainView(const RPointerArray<MIAUpdateNode>&, const RPointerArray<MIAUpdateFwNode>&,int)));
     }
 
-
-// ---------------------------------------------------------
-// CIAUpdateApplication::AppDllUid
-// Returns application UID
-// ---------------------------------------------------------
-//
-TUid CIAUpdateApplication::AppDllUid() const
-    {
-    // Return the UID for the IAUpdate application
-    return KUidIAUpdateApp;
-    }
-
-// ---------------------------------------------------------
-// CIAUpdateApplication::NewAppServerL
-// Cretaes an instance of applicayion server class
-// ---------------------------------------------------------
-//
-void CIAUpdateApplication::NewAppServerL( CApaAppServer*& aAppServer )
+IAUpdateApplication::~IAUpdateApplication()
     {
-    aAppServer = CIAUpdateServer::NewL();    
     }
-    
-	
-// ================= OTHER EXPORTED FUNCTIONS ==============
-//
-// Create an application, and return a pointer to it
-LOCAL_C CApaApplication* NewApplication()
-    {
-    return new CIAUpdateApplication;
-    }
-
-GLDEF_C TInt E32Main()
-    {
-    return EikStart::RunApplication(NewApplication);
-    }
-
-// End of File  
--- a/iaupdate/IAD/ui/src/iaupdateappui.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1625 +0,0 @@
-/*
-* Copyright (c) 2007-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 module contains the implementation of CIAUpdateAppUi class 
-*                member functions.
-*
-*/
-
-
-
-// INCLUDES
-#include <avkon.hrh>
-#include <StringLoader.h> 
-#include <iaupdate.rsg>
-#include <centralrepository.h>
-#include <apgwgnam.h>
-#include <f32file.h>
-#include <ErrorUI.h>
-#include <starterclient.h>
-#include <iaupdateresult.h>
-#include <iaupdateparameters.h>
-
-#include <cmmanagerext.h>
-#include <cmconnectionmethodext.h>
-#include <cmconnectionmethoddef.h>
-#include <cmpluginpacketdatadef.h>
-#include <cmdestinationext.h>
-#include <cmmanagerdef.h>
-#include <rconnmon.h>
-
-#include <hlplch.h>                   
-          
-
-#include "iaupdateappui.h"
-#include "iaupdatemainview.h"
-#include "iaupdatehistoryview.h"
-#include "iaupdate.hrh"
-#include "iaupdatenode.h"
-#include "iaupdatefwnode.h"
-#include "iaupdatebasenode.h"
-#include "iaupdateuicontroller.h"
-#include "iaupdaterequestobserver.h"
-#include "iaupdateserver.h"
-#include "iaupdatestatusdialog.h"
-#include "iaupdatedetailsdialog.h"
-#include "iaupdatefwdetailsdialog.h"
-#include "iaupdatesettingdialog.h"
-#include "iaupdateprivatecrkeys.h"
-#include "iaupdatestarter.h"
-#include "iaupdateuiconfigdata.h"
-#include "iaupdateagreement.h"
-#include "iaupdateautomaticcheck.h"
-#include "iaupdatequeryhistory.h"
-#include "iaupdatedialogutil.h"
-#include "iaupdategloballockhandler.h"
-#include "iaupdatenodefilter.h"
-#include "iaupdateuitimer.h"
-#include "iaupdatedebug.h"
-
-
-const TUint KSWInstSvrUid = 0x101F875A;
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateAppUi::ConstructL()
-    {    
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ConstructL() begin");
-     
-    TInt ownWgId = iEikonEnv->RootWin().Identifier();
-    RArray<RWsSession::TWindowGroupChainInfo> wgList;
-    iEikonEnv->WsSession().WindowGroupList( &wgList );
-    TBool chained = EFalse;
-    for ( TInt i = 0; i < wgList.Count() && !chained ; i++ )
-        {
-        if ( wgList[i].iId == ownWgId && wgList[i].iParentId > 0 )
-            {
-            chained = ETrue;
-            }
-        }
-    wgList.Reset();
-    if ( chained )
-        {
-        BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
-        }
-    else
-        {
-        iEikonEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront );
-        BaseConstructL( EAknEnableSkin | EAknEnableMSK );
-        StatusPane()->MakeVisible( EFalse );
-        }
-    
-    iController = CIAUpdateUiController::NewL( *this ); 
-        
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ConstructL() end");   
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::CIAUpdateAppUi
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateAppUi::CIAUpdateAppUi(): iIsDMSet( EFalse ), iUiRefreshAllowed( ETrue )                              
-    { 
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::CIAUpdateAppUi()");   
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::~CIAUpdateAppUi
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CIAUpdateAppUi::~CIAUpdateAppUi()
-    {    
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::~CIAUpdateAppUi() begin");
-    
-    delete iGlobalLockHandler;
-    iDestIdArray.Reset();
-	delete iController;
-	delete iIdle;
-	delete iIdleAutCheck;
-	delete iForegroundTimer;
-	delete iBackgroundTimer;
-	delete iDialogParam;
-		        
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::~CIAUpdateAppUi() end");
-    }        
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::StartedByLauncherL
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateAppUi::StartedByLauncherL( MIAUpdateRequestObserver& aObserver, 
-                                         TBool aRefreshFromNetworkDenied )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::StartedByLauncherL() begin");
-    iRequestObserver = &aObserver;
-    iRequestType = IAUpdateUiDefines::ENoRequest;
-    iController->SetRequestType( iRequestType );
-    SetVisibleL( ETrue );
-    CIAUpdateParameters* params = iController->ParamsReadAndRemoveFileL();
-    iController->CheckUpdatesDeferredL( params, aRefreshFromNetworkDenied );
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::StartedByLauncherL() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::CheckUpdatesRequestL
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateAppUi::CheckUpdatesRequestL( MIAUpdateRequestObserver& aObserver,
-                                           CIAUpdateParameters* aFilterParams )
-                                           
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::CheckUpdatesRequestL() begin");
-    iStartedFromApplication  = ETrue;
-    CleanupStack::PushL( aFilterParams );
-    if ( iWgId > 0 )
-        {
-        HideApplicationInFSWL( ETrue );
-        }
-    CleanupStack::Pop( aFilterParams );
-    
-    if ( !aFilterParams->ShowProgress() )
-        {
-        iEikonEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront );	
-        }
-           
-    iRequestObserver = &aObserver;
-    iRequestType = IAUpdateUiDefines::ECheckUpdates; 
-    iController->SetRequestType( iRequestType );
-    
-    iController->CheckUpdatesDeferredL( aFilterParams, EFalse );
-    
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::CheckUpdatesRequestL() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::ShowUpdatesRequestL
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateAppUi::ShowUpdatesRequestL( MIAUpdateRequestObserver& aObserver,
-                                          CIAUpdateParameters* aFilterParams )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowUpdatesRequestL() begin"); 
-    delete iBackgroundTimer;
-    iBackgroundTimer = NULL;
-    iStartedFromApplication  = ETrue;
-    CleanupStack::PushL( aFilterParams );
-    if ( iWgId > 0 )
-        {
-        HideApplicationInFSWL( ETrue );
-        }
-   
-    StatusPane()->MakeVisible( ETrue );
-    iEikonEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );
-    
-    iRequestObserver = &aObserver;
-    iRequestType = IAUpdateUiDefines::EShowUpdates;
-    iController->SetRequestType( iRequestType );
-     
-
-    if ( !iMainView )
-        {
-    	iMainView  = CIAUpdateMainView::NewL( ClientRect() ); 
-    	AddViewL( iMainView );
-        }
-    
-      
-    // by pushing object to cleanup stack its destructor is called if leave happens
-    // so global lock issued by this instance can be released in destructor of CIAUpdateGlobalLockHandler
-    CIAUpdateGlobalLockHandler* globalLockHandler = CIAUpdateGlobalLockHandler::NewLC();
-    if ( !globalLockHandler->InUseByAnotherInstanceL() )
-        {
-        globalLockHandler->SetToInUseForAnotherInstancesL( ETrue );
-        CleanupStack::Pop( globalLockHandler );
-        CleanupStack::Pop( aFilterParams );
-        CleanupStack::PushL( globalLockHandler );
-        iController->CheckUpdatesDeferredL( aFilterParams, EFalse );
-        CleanupStack::Pop( globalLockHandler );	
-        delete iGlobalLockHandler;
-        iGlobalLockHandler = globalLockHandler;
-        //now possible deletion of iGlobalLockHandler in leave situation is handled
-        //in HandleLeaveErrorL() and HandleLeaveErrorWithoutLeave methods. 
-        }
-    else
-        {
-        CleanupStack::PopAndDestroy( globalLockHandler );
-        CleanupStack::PopAndDestroy( aFilterParams );
-        // locked by another IAD instance, nothing else to do than just complete client's request.	
-        InformRequestObserver( KErrNone );
-        }  
-  	
-
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowUpdatesRequestL() end"); 
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::ShowUpdateQueryRequestL
-// 
-// -----------------------------------------------------------------------------
-//     
-void CIAUpdateAppUi::ShowUpdateQueryRequestL( MIAUpdateRequestObserver& aObserver, 
-                                              TUint aUid )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowUpdateQueryRequestL begin");
-    iStartedFromApplication  = ETrue;
-    iUpdatequeryUid = aUid;
-    iUpdateNow = EFalse;
-    if ( iWgId > 0 )
-        {
-        HideApplicationInFSWL( ETrue );
-        }
-    
-    iRequestObserver = &aObserver;
-    iRequestType = IAUpdateUiDefines::EUpdateQuery;
-    
-    
-    delete iIdle;
-    iIdle = NULL;
-	iIdle = CIdle::NewL( CActive::EPriorityIdle ); 
-    iIdle->Start( TCallBack( UpdateQueryCallbackL, this ) ); 
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowUpdateQueryRequestL end")
-    }
-    
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::HandleObserverRemoval
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateAppUi::HandleObserverRemoval()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleObserverRemoval() begin");
-	iRequestObserver = NULL;
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleObserverRemoval() end");
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::TextLinkL
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateAppUi::TextLinkL( TInt /*aLinkId*/ )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::TextLinkL() begin");
-    TRAPD( err, HandleTextLinkL() );
-    if ( err != KErrNone )
-        {
-    	HandleLeaveErrorL( err );
-        }
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::TextLinkL() end");
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::HandleCommandL
-// 
-// -----------------------------------------------------------------------------
-//         
-void CIAUpdateAppUi::HandleCommandL( TInt aCommand )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleCommandL() begin");   
-    IAUPDATE_TRACE_1("[IAUPDATE] command id: %d", aCommand );
-
-    switch(aCommand)
-        {
-        case EIAUpdateCmdStartUpdate:
-            {
-            IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleCommandL() EIAUpdateCmdStartUpdate");
-    
-
-            // by pushing object to cleanup stack it's destructor is called if leave happens
-            // so global lock issued by this instance can be released in destructor of CIAUpdateGlobalLockHandler
-            CIAUpdateGlobalLockHandler* globalLockHandler = CIAUpdateGlobalLockHandler::NewLC();
-            if ( !globalLockHandler->InUseByAnotherInstanceL() )
-                {
-            	globalLockHandler->SetToInUseForAnotherInstancesL( ETrue );
-            	// No need to be totally silent since the updating is started
-            	// by user.
-            	SetDefaultConnectionMethodL( EFalse );
-            	iController->StartUpdateL();
-            	CleanupStack::Pop( globalLockHandler );	
-            	delete iGlobalLockHandler;
-            	iGlobalLockHandler = globalLockHandler;
-            	//now possible deletion of iGlobalLockHandler in leave situation is handled
-            	//in HandleLeaveErrorL() and HandleLeaveErrorWithoutLeave methods. 
-                }
-            else
-                {
-                CleanupStack::PopAndDestroy( globalLockHandler ); 	
-                }
-            break;	
-            } 
-            
-       	case EIAUpdateCmdSettings:
-       	    {
-       	    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleCommandL() EIAUpdateCmdSettings");
-            CIAUpdateSettingDialog::ShowDialogL();
-            break;	
-       	    } 
-       	    
-       	case EIAUpdateCmdUpdateDetails:
-       	     {
-       	     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleCommandL() EIAUpdateCmdUpdateDetails");
-       	            
-       	     if ( iMainView->GetCurrentNode()->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal )
-       	         {
-       	         TIAUpdateDialogParam param;
-       	         param.iNode = static_cast<MIAUpdateNode*>( iMainView->GetCurrentNode() );
-       	         CIAUpdateDetailsDialog::ShowDialogL( &param );
-       	         }
-       	            
-       	     if (iMainView->GetCurrentNode()->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
-       	         {
-       	         //this is changed because of the new requirement: when both NSU and FOTA available, only show FOTA in details
-       	  
-       	         MIAUpdateFwNode* node = static_cast<MIAUpdateFwNode*>( iMainView->GetCurrentNode() );
-       	         CIAUpdateFwDetailsDialog::ShowDialogL( node );
-       	         }
-
-       	      break;      
-       	      }
-       	    
-        case EIAUpdateCmdMarkedUpdateDetails:
-            {
-            IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleCommandL() EIAUpdateCmdUpdateDetails");
-            
-            if ( iMainView->GetSelectedNode()->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal )
-                {
-                TIAUpdateDialogParam param;
-                param.iNode = static_cast<MIAUpdateNode*>( iMainView->GetSelectedNode() );
-                CIAUpdateDetailsDialog::ShowDialogL( &param );
-                }
-            
-            if (iMainView->GetSelectedNode()->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
-                {
-                //this is changed because of the new requirement: when both NSU and FOTA available, only show FOTA in details
-  
-                MIAUpdateFwNode* node = static_cast<MIAUpdateFwNode*>( iMainView->GetSelectedNode() );
-                CIAUpdateFwDetailsDialog::ShowDialogL( node );
-                }
-
-            break;		
-            }
-       	    
-                
-        // History view
-        case EIAUpdateCmdUpdateHistory:
-            {
-            IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleCommandL() EIAUpdateCmdUpdateHistory");
-            if ( !iHistoryView )
-                {
-                iHistoryView = 
-                    CIAUpdateHistoryView::NewL( iController->HistoryL() );
-                AddViewL( iHistoryView );
-                }
-            ActivateLocalViewL( TUid::Uid( EIAUpdateHistoryViewId ) );
-            break;	
-            }
-        
-        case EIAUpdateCmdDisclaimer:
-            {
-            IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleCommandL() EIAUpdateCmdDisclaimer");
-            CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC();
-            agreement->ShowAgreementL();
-            CleanupStack::PopAndDestroy( agreement);
-            break;	
-            }
-            
-        case EAknCmdHelp:
-            {
-            IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleCommandL() EAknCmdHelp");
-            HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(), AppHelpContextL() );
-            break;
-            }
-                      
-        case EEikCmdExit:
-        case EAknCmdExit:
-        case EAknSoftkeyExit:
-            {
-            IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleCommandL() Exit");
-            if (iController )
-                {
-                iController->CancelOperation();
-                if ( iController->Starter() )
-                	 {
-                	 iController->Starter()->BringToForegroundL();
-                	 }
-                }
-            if ( iRequestObserver )
-                {
-   	            InformRequestObserver( KErrCancel );
-                }
-            Exit();	
-            break;
-            }
-            
-        case EIAUpdateCmdHistoryViewExit:
-            IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleCommandL() EIAUpdateCmdHistoryViewExit");
-            ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
-            break;
-
-        default:
-            {
-            break;
-            }
-        }
-       
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleCommandL() end")    
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateppUi::HandleWsEventL
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateAppUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleWsEventL() begin");   
-    CAknViewAppUi::HandleWsEventL( aEvent, aDestination );
-  	if ( aEvent.Type() == EEventWindowGroupListChanged )
-	    {
-        IAUPDATE_TRACE("[IAUPDATE] Window group list changed"); 
-          
-		RWindowGroup owngroup;
-		TInt ownWgId = iEikonEnv->RootWin().Identifier();
-  		TApaTaskList tasklist( iEikonEnv->WsSession() );   
-        
-        TApaTask task = tasklist.FindApp( TUid::Uid( KSWInstSvrUid ) );
-        
-        if ( task.Exists() )
-            {
-            IAUPDATE_TRACE("[IAUPDATE] Installer task exists");
-            
-            TInt instUiWgId = task.WgId();
-            TInt ownPosition = KErrNotFound;
-            TInt instUiPosition = KErrNotFound;
-            CArrayFixFlat<TInt>*  wgArray = new(ELeave)CArrayFixFlat<TInt>(10);  
-            CleanupStack::PushL( wgArray );
-            User::LeaveIfError( iEikonEnv->WsSession().WindowGroupList( 0, wgArray ) );   
-            for ( TInt i = 0; i < wgArray->Count(); i++ )
-                {
-                if ( wgArray->At(i) == ownWgId )
-                    {
-                    IAUPDATE_TRACE_1("[IAUPDATE] ownPosition: %d", i);
-                	ownPosition = i;
-                    }
-                else if ( wgArray->At(i) == instUiWgId )
-                    {
-                    IAUPDATE_TRACE_1("[IAUPDATE] instUiPosition: %d", i);
-                	instUiPosition = i;
-                    }
-                }
-            CleanupStack::PopAndDestroy( wgArray );
-          	if ( ownPosition == 0 && iInstUiOnTop )
-                {
-                // IAD is now topmost. In the case Installer UI was previously on the top of IAD 
-                // bring Installer UI foreground 
-                IAUPDATE_TRACE("[IAUPDATE] instUi to foreground");
-            	task.BringToForeground();
-            	iInstUiOnTop = EFalse;
-                }
-            else
-                {
-                if ( instUiPosition < ownPosition  && 
-                    instUiPosition != KErrNotFound && 
-                    ownPosition != KErrNotFound )
-        	        {
-        	        // Installer UI is on the top of IAD, i.e. it's showing FILETEXT dialog 
-                    IAUPDATE_TRACE("[IAUPDATE] instUi is on top of IAD");
-        		    iInstUiOnTop = ETrue;
-        	        }
-        	    else
-        	        {
-                    IAUPDATE_TRACE("[IAUPDATE] iInstUiOnTop false");
-        	        iInstUiOnTop = EFalse;	
-        	        }
-                }    
-            }
-        else
-            {
-            IAUPDATE_TRACE("[IAUPDATE] No task. iInstUiOnTop false.");
-            iInstUiOnTop = EFalse;	
-            }
-        }
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleWsEventL() end");           
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::StartupComplete
-// 
-// -----------------------------------------------------------------------------
-//    
-void CIAUpdateAppUi::StartupComplete( TInt aError )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::StartupComplete() begin"); 
-    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError);
-    
-    if( aError != KErrNone ) 
-        {  
-        HandleLeaveErrorWithoutLeave( aError );
-        }
-    else
-        {
-        TRAPD( err, StartupCompleteL() );
-        if( err != KErrNone ) 
-           {  
-           HandleLeaveErrorWithoutLeave( err );
-           }
-        }
- 
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::StartupComplete() end");    
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::StartupCompleteL
-// 
-// -----------------------------------------------------------------------------
-//    
-void CIAUpdateAppUi::StartupCompleteL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::StartupCompleteL() begin"); 
-    
-    delete iGlobalLockHandler;
-    iGlobalLockHandler = NULL;
-    iGlobalLockHandler = CIAUpdateGlobalLockHandler::NewL();
-    if ( !iGlobalLockHandler->InUseByAnotherInstanceL() )
-        {
-        TBool totalSilent( EFalse );
-        if ( iRequestType == IAUpdateUiDefines::ECheckUpdates )
-            {
-            if ( iController->Filter() )
-                {
-                if ( iController->Filter()->FilterParams() )
-                    {
-                    if ( iController->Filter()->FilterParams()->Refresh() )
-                        {
-                        //from bgchecker, make it silent
-                        totalSilent = ETrue;
-                        }
-                    }
-                }
-            }
-        SetDefaultConnectionMethodL( totalSilent );
-        iGlobalLockHandler->SetToInUseForAnotherInstancesL( ETrue );
-        iController->StartRefreshL();  
-        }
-    else
-        {
-        RefreshCompleteL( ETrue, KErrServerBusy );
-        }    
- 
-       
-    
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::StartupCompleteL() end");    
-    }
-    
- 
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::HandleLeaveErrorL
-// 
-// -----------------------------------------------------------------------------
-//        
-void CIAUpdateAppUi::HandleLeaveErrorL( TInt aError )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleLeaveErrorL() begin");
-    //removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
-    delete iGlobalLockHandler;
-    iGlobalLockHandler = NULL;
-    // client request is completed before leave in case of leave error
-    if ( aError != KErrNone ) 
-        { 	
-    	InformRequestObserver( aError );
-    	User::Leave( aError );
-        }
-    
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleLeaveErrorL() end");
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::HandleLeaveErrorWithoutLeave
-// 
-// -----------------------------------------------------------------------------
-//  
-void CIAUpdateAppUi::HandleLeaveErrorWithoutLeave( TInt aError )
-    {
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleLeaveErrorWithoutLeave() begin");
-	//removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
-    delete iGlobalLockHandler;
-    iGlobalLockHandler = NULL;
-	if ( aError != KErrNone ) 
-        {
-    	InformRequestObserver( aError );
-        }
-    if ( aError == KErrDiskFull )
-        {
-        TRAP_IGNORE( ShowGlobalErrorNoteL( aError ) );
-        }
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleLeaveErrorWithoutLeave end");
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::RefreshCompleteL
-// 
-// -----------------------------------------------------------------------------
-//      
-void CIAUpdateAppUi::RefreshCompleteL( TBool aWithViewActivation, TInt aError )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::RefreshCompleteL() begin");
-    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError );
-    //removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
-    delete iGlobalLockHandler;
-    iGlobalLockHandler = NULL;   
-   
-    if ( iRequestType == IAUpdateUiDefines::ECheckUpdates )
-        {
-  	    InformRequestObserver( aError );
-        }
-    else 
-        {    
-        RefreshL( aError );   
-        if ( aWithViewActivation)
-            {
-        	ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
-            }
- 
-        // By calling CIdle possible waiting dialog can be closed before
-        // automatic check where a new dialog may be launched
-        delete iIdleAutCheck;
-        iIdleAutCheck = NULL;
-        iIdleAutCheck = CIdle::NewL( CActive::EPriorityIdle ); 
-        iIdleAutCheck->Start( TCallBack( AutomaticCheckCallbackL, this ) );
-        } 
- 
-  
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::RefreshCompleteL() end");        
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::UpdateCompleteL
-// 
-// -----------------------------------------------------------------------------
-//     
-void CIAUpdateAppUi::UpdateCompleteL( TInt aError )    
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::UpdateCompleteL begin");
-    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError );
-    //removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
-    delete iGlobalLockHandler;
-    iGlobalLockHandler = NULL;  
-    if ( iRequestType != IAUpdateUiDefines::ENoRequest )
-        {
-        InformRequestObserver( aError );
-        }
-    
-    RefreshL( KErrNone ); 
-      
-    ShowStatusDialogDeferredL();
-                
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::UpdateCompleteL end");
-    }
-
-   
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::ShowStatusDialogL
-// 
-// -----------------------------------------------------------------------------
-//   
-void CIAUpdateAppUi::ShowStatusDialogL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowStatusDialogL() begin");
- 
-     
-    if ( !iDialogParam )
-        {
-        iDialogParam = new( ELeave ) TIAUpdateDialogParam;
-        }
-    
-    if ( !iShowStatusDialogAgain )
-        {
-        TIAUpdateResultsInfo resultsInfo( iController->ResultsInfo() );
-        iDialogParam->iCountCancelled = resultsInfo.iCountCancelled;
-        iDialogParam->iCountFailed = resultsInfo.iCountFailed;
-        iDialogParam->iCountSuccessfull = resultsInfo.iCountSuccessfull;
-        iDialogParam->iShowCloseAllText = resultsInfo.iFileInUseError;
-        iRebootAfterInstall = resultsInfo.iRebootAfterInstall;
-        iDialogParam->iLinkObserver = this;
-        }
-         
-    iShowStatusDialogAgain = EFalse;
-    iUiRefreshAllowed = ETrue;
-    TInt ret = CIAUpdateStatusDialog::ShowDialogL( iDialogParam );
-    if ( ret == EAknSoftkeyOk && iRebootAfterInstall )
-        {
-        TInt rebootRet = IAUpdateDialogUtil::ShowConfirmationQueryL( 
-                                           R_IAUPDATE_PHONE_RESTART_QUERY, 
-                                           R_AVKON_SOFTKEYS_OK_CANCEL__OK );
-        if ( rebootRet == EAknSoftkeyOk )
-            {
-            RStarterSession startersession;
-            if( startersession.Connect() == KErrNone )
-                {
-                startersession.Reset( RStarterSession::EUnknownReset );
-                startersession.Close();
-                return;
-                }
-            }
-        }
-    if ( ret == EAknSoftkeyOk && 
-         iStartedFromApplication && 
-         iDialogParam->iCountCancelled == 0 &&
-         iDialogParam->iCountFailed == 0 )
-        {
-    	HandleCommandL( EEikCmdExit );
-        }
-    
-    IAUPDATE_TRACE_1("[IAUPDATE] nodes count: %d", iController->Nodes().Count() );
-    IAUPDATE_TRACE_1("[IAUPDATE] fw nodes: %d", iController->FwNodes().Count() );
-    //exit from result view if there are no update left
-    if ( ret == EAknSoftkeyOk && (iController->Nodes().Count() == 0) && (iController->FwNodes().Count() == 0) )
-        {
-        HandleCommandL( EEikCmdExit );
-        }
-    
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowStatusDialogL() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::ShowStatusDialogDeferredL
-// 
-// -----------------------------------------------------------------------------
-//       
-void CIAUpdateAppUi::ShowStatusDialogDeferredL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowStatusDialogDeferredL() begin");
-    delete iIdle;
-    iIdle = NULL;
-	iIdle = CIdle::NewL( CActive::EPriorityIdle ); 
-    iIdle->Start( TCallBack( ShowStatusDialogCallbackL, this ) ); 
-    iUiRefreshAllowed = EFalse;
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowStatusDialogDeferredL() end");
-    }
- 
-
-
-                       
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::RefreshL
-// 
-// -----------------------------------------------------------------------------
-//  
-void CIAUpdateAppUi::RefreshL( TInt aError ) 
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::RefreshL() begin");
-    IAUPDATE_TRACE_1("[IAUPDATE] Error code: %d", aError );
-    iMainView->RefreshL( iController->Nodes(), iController->FwNodes(), aError );                    
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::RefreshL() end");
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::InformRequestObserver
-// 
-// -----------------------------------------------------------------------------
-//      
-void CIAUpdateAppUi::InformRequestObserver( TInt aError )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::InformRequestObserver() begin");
-        
-    if ( iRequestObserver )
-        {
-        if ( iController->ClosingAllowedByClient() )
-            {
-            if ( iRequestType != IAUpdateUiDefines::ENoRequest )
-                {
-                if ( iRequestType == IAUpdateUiDefines::EUpdateQuery && iUpdateNow )
-                    {
-                    if ( !iBackgroundTimer )
-                        {
-                        iBackgroundTimer = CIAUpdateUITimer::NewL( *this, CIAUpdateUITimer::EBackgroundDelay );
-                        }
-                    if ( !iBackgroundTimer->IsActive() )
-                        {
-                        iBackgroundTimer->After( 500000 );
-                        }
-                    }
-                else
-                    {
-                    iEikonEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront );
-                    }
-                }
-            }
-        CIAUpdateResult* details( NULL );
-        TRAPD( error, details = CIAUpdateResult::NewL() )
-        if ( details )
-            {
-            TIAUpdateResultsInfo resultsInfo(
-                iController->ResultsInfo() );
-            IAUPDATE_TRACE_3("[IAUPDATE] succeed: %d failed: %d  cancelled: %d", 
-                              resultsInfo.iCountSuccessfull, 
-                              resultsInfo.iCountFailed, 
-                              resultsInfo.iCountCancelled );
-            IAUPDATE_TRACE_2("[IAUPDATE] update now: %d available updates: %d", 
-                              iUpdateNow, iController->CountOfAvailableUpdates() );
-            details->SetSuccessCount( resultsInfo.iCountSuccessfull );
-            details->SetFailCount( resultsInfo.iCountFailed );
-            details->SetCancelCount( resultsInfo.iCountCancelled );    
-            
-            // Ownership of details is transferred here.
-            iRequestObserver->RequestCompleted( details, 
-                                                iController->CountOfAvailableUpdates(), 
-                                                iUpdateNow, 
-                                                aError );
-            details = NULL;        
-            }
-        else
-            {
-            iRequestObserver->RequestCompleted( details, 
-                                                iController->CountOfAvailableUpdates(),
-                                                iUpdateNow, 
-                                                error );            
-            }
-        iRequestObserver = NULL;
-        }
-        
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::InformRequestObserver() end");
-    }
-
-
-// ---------------------------------------------------------------------------
-// CIAUpdateAppUi::SetDefaultConnectionMethodL
-// Sets the connection method for the update network connection.
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateAppUi::SetDefaultConnectionMethodL(TBool aTotalSilent )
-    {
-    if ( aTotalSilent )
-        {
-        // from back ground checker, choose the IAP to make the internet access silent
-        IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::SetDefaultConnectionMethodL() begin");
-
-           TUint32 connectionMethodId( 0 );
-           TInt connMethodId( 0 );
-
-           // Let's first check whether cenrep contains SNAP id other than zero
-           CRepository* cenrep( CRepository::NewLC( KCRUidIAUpdateSettings ) );
-           User::LeaveIfError(  
-               cenrep->Get( KIAUpdateAccessPoint, connMethodId ) );
-           CleanupStack::PopAndDestroy( cenrep ); 
-           cenrep = NULL;
-
-           RCmManagerExt cmManagerExt;
-           cmManagerExt.OpenL();
-           CleanupClosePushL( cmManagerExt );
-           
-           if ( connMethodId == -1 )
-               {
-               IAUPDATE_TRACE("[IAUPDATE] user chooses default connection, use IAP logic");
-               
-               //check what is the default connection by users     
-               
-               TCmDefConnValue DCSetting;
-               cmManagerExt.ReadDefConnL( DCSetting );
-              
-               
-               switch ( DCSetting.iType )
-                   {
-                   case ECmDefConnAlwaysAsk:
-                   case ECmDefConnAskOnce:
-                       {
-                       //go with the best IAP under internet snap
-                       connectionMethodId = GetBestIAPInAllSNAPsL( cmManagerExt );
-                       break;
-                       }
-                   case ECmDefConnDestination:
-                       {
-                       //go with the best IAP under this snap
-                       connectionMethodId = GetBestIAPInThisSNAPL( cmManagerExt, DCSetting.iId );
-                       break;
-                       }
-                   case ECmDefConnConnectionMethod:
-                       {
-                       //go with the best IAP under this snap
-                       connectionMethodId = DCSetting.iId;
-                       break;
-                       }
-                   }
-               }
-           else if ( connMethodId == 0 )
-               {
-               //no choice from user, we go with the best IAP under Internent SNAP
-               connectionMethodId = GetBestIAPInAllSNAPsL( cmManagerExt );
-               }
-           else
-               {
-               IAUPDATE_TRACE("[IAUPDATE] use chooses a snap");
-               // It was some SNAP value
-               connectionMethodId = GetBestIAPInThisSNAPL( cmManagerExt, connMethodId );
-               }
-
-           CleanupStack::PopAndDestroy( &cmManagerExt ); 
-           
-           if ( connectionMethodId != 0 )
-               {
-               TIAUpdateConnectionMethod connectionMethod( 
-                   connectionMethodId, 
-                   TIAUpdateConnectionMethod::EConnectionMethodTypeAccessPoint );
-
-               iController->SetDefaultConnectionMethodL( connectionMethod );
-               }
-           else
-               {
-               //In the totally silent case, if no usable IAP, we complete the check update with 0 updates.
-               //the bgchecker will try again later after 1 month. 
-               //The LEAVE will be catched up later and complete the request from background checker.
-               User::LeaveIfError( KErrNotFound );
-               
-               //the following code will pop up dialog to ask from user, just for proto
-              /* connectionMethodId = 0;               
-               TIAUpdateConnectionMethod connectionMethod( 
-                   connectionMethodId, TIAUpdateConnectionMethod::EConnectionMethodTypeDefault );
-
-               iController->SetDefaultConnectionMethodL( connectionMethod );*/
-               }
-           
-
-
-           IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::SetDefaultConnectionMethodL() end");
-        }
-    else
-        {
-        // from grid, use the old logic
-        IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::SetDefaultConnectionMethodL() begin");
-                  TUint32 connectionMethodId( 0 );
-                  TInt connMethodId( 0 );
-
-                  // Set initial value to always ask
-                  TInt connectionMethodType( TIAUpdateConnectionMethod::EConnectionMethodTypeAlwaysAsk );
-                  TBool needSaving(EFalse);
-
-                  // Let's first check whether cenrep contains SNAP id other than zero
-                  CRepository* cenrep( CRepository::NewLC( KCRUidIAUpdateSettings ) );
-                  User::LeaveIfError(  
-                      cenrep->Get( KIAUpdateAccessPoint, connMethodId ) );
-                  CleanupStack::PopAndDestroy( cenrep ); 
-                  cenrep = NULL;
-                    
-                  if ( connMethodId == -1 )
-                      {
-                      IAUPDATE_TRACE("[IAUPDATE] user chooses default connection, use IAP logic");
-                                            
-                      connectionMethodId = 0;
-                      connectionMethodType = TIAUpdateConnectionMethod::EConnectionMethodTypeDefault;
-                      }
-                  else if ( connMethodId == 0 )
-                      {
-                      
-                      IAUPDATE_TRACE("[IAUPDATE] use chooses nothing, use internal IAP logic");
-                      //if nothing is set by user, use our new logic
-                      //SetDefaultConnectionMethod2L();
-                      //return;
-                      // CenRep didn't contain any SNAP id. Let's try Internet SNAP then.
-                          
-                      RCmManagerExt cmManagerExt;
-                      cmManagerExt.OpenL();
-                      CleanupClosePushL( cmManagerExt );
-                      iDestIdArray.Reset();
-                      cmManagerExt.AllDestinationsL( iDestIdArray );
-
-                      for ( TInt i = 0; i< iDestIdArray.Count(); i++ )
-                          {
-                          RCmDestinationExt dest = cmManagerExt.DestinationL( iDestIdArray[i] );
-                          CleanupClosePushL( dest );
-                           
-                          if ( dest.MetadataL( CMManager::ESnapMetadataInternet ) )
-                              {
-                              // Check whether Internet SNAP contains any IAP.
-                              if ( dest.ConnectionMethodCount() > 0 )
-                                  {
-                                  connectionMethodId = iDestIdArray[i];
-                                  needSaving = ETrue;
-                                  IAUPDATE_TRACE_1("[IAUPDATE] connectionMethodId: %d", connectionMethodId );
-                                  }
-                              CleanupStack::PopAndDestroy( &dest ); 
-                              break;
-                              }
-                               
-                          CleanupStack::PopAndDestroy( &dest ); 
-                          }
-                      iDestIdArray.Reset();
-                      CleanupStack::PopAndDestroy( &cmManagerExt ); 
-                      }
-                  else
-                      {
-                      IAUPDATE_TRACE("[IAUPDATE] use chooses a snap");
-                      // It was some SNAP value
-                      connectionMethodId = connMethodId;
-                      }
-                  
-                  if ( connectionMethodId > 0)
-                      {
-                      // We have now some valid SNAP id, either from CenRep or Internet SNAP
-                      connectionMethodType = TIAUpdateConnectionMethod::EConnectionMethodTypeDestination;
-                      // Save to cenrep if needed
-                      if ( needSaving )
-                          {
-                          cenrep = CRepository::NewLC( KCRUidIAUpdateSettings );
-                          TInt err = cenrep->StartTransaction( CRepository::EReadWriteTransaction );
-                          User::LeaveIfError( err );
-                          cenrep->CleanupCancelTransactionPushL();
-                          
-                          connMethodId = connectionMethodId;
-                          err = cenrep->Set( KIAUpdateAccessPoint, connMethodId );
-                          User::LeaveIfError( err );
-                          TUint32 ignore = KErrNone;
-                          User::LeaveIfError( cenrep->CommitTransaction( ignore ) );
-                          CleanupStack::PopAndDestroy(); // CleanupCancelTransactionPushL()
-                          CleanupStack::PopAndDestroy( cenrep );            
-                          }
-                      }
-
-                  TIAUpdateConnectionMethod connectionMethod( 
-                      connectionMethodId, 
-                      static_cast< TIAUpdateConnectionMethod::TConnectionMethodType >( connectionMethodType ) );
-
-                  iController->SetDefaultConnectionMethodL( connectionMethod );
-
-                  IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::SetDefaultConnectionMethodL() end");
-        }
-
-    }
-
-
-// ---------------------------------------------------------------------------
-// CIAUpdateAppUi::GetBestIAPInAllSNAPsL
-// Sets the best IAP from all snaps
-// ---------------------------------------------------------------------------
-//
-TUint32 CIAUpdateAppUi::GetBestIAPInAllSNAPsL( RCmManagerExt& aCmManagerExt  )
-    { 
-    //go with internet SNAP first.
-    TUint32 IAPID = 0;
-    IAPID = GetBestIAPInInternetSNAPL( aCmManagerExt );
-    
-    if ( IAPID )
-        {
-        return IAPID;
-        }
-    
-    //select IAP from rest of the SNAPs
-    iDestIdArray.Reset();
-    aCmManagerExt.AllDestinationsL( iDestIdArray );
-    
-    for ( TInt i = 0; i< iDestIdArray.Count(); i++ )
-        {
-        TUint32 SNAPID = iDestIdArray[i];                   
-        IAPID = GetBestIAPInThisSNAPL( aCmManagerExt, SNAPID );
-        if ( IAPID )
-            {
-            break;
-            }
-         }
-    iDestIdArray.Reset();
-    return IAPID;
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// CIAUpdateAppUi::GetBestIAPInInternetSNAPL
-// Sets the best IAP from internet snap
-// ---------------------------------------------------------------------------
-//
-TUint32 CIAUpdateAppUi::GetBestIAPInInternetSNAPL( RCmManagerExt& aCmManagerExt  )
-    {
-    //select IAP from Internet SNAP
-    iDestIdArray.Reset();
-    aCmManagerExt.AllDestinationsL( iDestIdArray );
-    TUint32 InternetSNAPID = 0;
-    for ( TInt i = 0; i< iDestIdArray.Count(); i++ )
-        {
-        RCmDestinationExt dest = aCmManagerExt.DestinationL( iDestIdArray[i] );
-        CleanupClosePushL( dest );
-                                     
-        if ( dest.MetadataL( CMManager::ESnapMetadataInternet ) )
-            {
-            InternetSNAPID = iDestIdArray[i];
-            CleanupStack::PopAndDestroy( &dest ); 
-            break;
-            }                     
-         CleanupStack::PopAndDestroy( &dest ); 
-         }
-    iDestIdArray.Reset();
-    
-    return GetBestIAPInThisSNAPL( aCmManagerExt, InternetSNAPID );
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// CIAUpdateAppUi::GetBestIAPInThisSNAPL
-// Sets the best IAP from the given snap
-// ---------------------------------------------------------------------------
-//
-TUint32 CIAUpdateAppUi::GetBestIAPInThisSNAPL( RCmManagerExt& aCmManagerExt, TUint32 aSNAPID  )
-    {
-    //get all usable IAPs
-    TConnMonIapInfoBuf iapInfo;
-    TRequestStatus status;
-                       
-    RConnectionMonitor connMon;
-    connMon.ConnectL();
-    CleanupClosePushL( connMon );
-    
-    connMon.GetPckgAttribute( EBearerIdAll, 0, KIapAvailability,iapInfo, status );
-    User::WaitForRequest( status );
-    User::LeaveIfError( status.Int() );
-    
-    CleanupStack::PopAndDestroy( &connMon ); 
-    
-    RCmDestinationExt dest = aCmManagerExt.DestinationL( aSNAPID );
-    CleanupClosePushL( dest );
-    
-    // Check whether the SNAP contains any IAP.
-    for  (TInt i = 0; i < dest.ConnectionMethodCount(); i++ )
-        {
-        RCmConnectionMethodExt cm =  dest.ConnectionMethodL( i );
-        CleanupClosePushL( cm );
-        
-        TUint32 iapid= cm.GetIntAttributeL( CMManager::ECmIapId );
-        
-        for ( TInt i = 0; i < iapInfo().iCount; i++ )
-            {
-            if ( iapInfo().iIap[i].iIapId == iapid )
-                {
-                CleanupStack::PopAndDestroy( 2 ); //cm & dest;
-                return iapid;
-                }
-            }    
-                                                                                 
-        CleanupStack::PopAndDestroy( &cm );
-        }
-    
-    CleanupStack::PopAndDestroy( &dest ); 
-    return 0;
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// CIAUpdateAppUi::ShowStatusDialogCallbackL
-// ---------------------------------------------------------------------------
-//
-TInt CIAUpdateAppUi::ShowStatusDialogCallbackL( TAny* aPtr )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowStatusDialogCallbackL() begin");
-    CIAUpdateAppUi* appUI= static_cast<CIAUpdateAppUi*>( aPtr ); 
-    TRAPD( err, appUI->ShowStatusDialogL() );
-    appUI->HandleLeaveErrorL( err );
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowStatusDialogCallbackL() end");
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::SetVisibleL
-// 
-// -----------------------------------------------------------------------------
-//  
-void CIAUpdateAppUi::SetVisibleL( TBool aVisible )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::SetVisibleL() begin");
-    IAUPDATE_TRACE_1("[IAUPDATE] visible: %d", aVisible );
-    if ( aVisible )
-        {
-        if ( iEikonEnv->RootWin().OrdinalPosition() != 0 || iEikonEnv->RootWin().OrdinalPriority() != ECoeWinPriorityNormal )
-            {
-            iEikonEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );
-            }
-        
-    	StatusPane()->MakeVisible( ETrue );
-        iMainView  = CIAUpdateMainView::NewL( ClientRect() ); 
-        AddViewL( iMainView );
-        ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
-        }
-    else
-        {
-        iEikonEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront );
-        StatusPane()->MakeVisible( EFalse );
-        }
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::SetVisibleL() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::Controller()
-// 
-// -----------------------------------------------------------------------------
-//      
-CIAUpdateUiController* CIAUpdateAppUi::Controller() const
-    {
-	return iController;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::PotentialCancel
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateAppUi::PotentialCancel() 
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::PotentialCancel() begin");
-    iController->DoCancelIfAllowed();
-    HandleObserverRemoval();
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::PotentialCancel() end");
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::HandleClientToForegroundL
-// 
-// -----------------------------------------------------------------------------
-//    
-void CIAUpdateAppUi::HandleClientToForegroundL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleClientToForegroundL() begin");
-    if ( !iForegroundTimer )
-        {
-        iForegroundTimer = CIAUpdateUITimer::NewL( *this, CIAUpdateUITimer::EForegroundDelay );
-        }
-    if ( !iForegroundTimer->IsActive() )
-        {
-        iForegroundTimer->After( 700000 );
-        }
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleClientToForegroundL() end");
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::HandleAllClientsClosedL
-// 
-// -----------------------------------------------------------------------------
-//    
-void CIAUpdateAppUi::HandleAllClientsClosedL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleAllClientsClosedL() begin");
-	HideApplicationInFSWL( EFalse );
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleAllClientsClosedL() end");
-    }
-    
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::ShowStatusDialogAgain
-// 
-// -----------------------------------------------------------------------------
-//  
-TBool CIAUpdateAppUi::ShowStatusDialogAgain() const
-    {
-    return iShowStatusDialogAgain;	
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::StartWGListChangeMonitoring
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateAppUi::StartWGListChangeMonitoring()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::StartWGListChangeMonitoring() begin");
-    iInstUiOnTop = EFalse;
-	iEikonEnv->RootWin().EnableGroupListChangeEvents();
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::StartWGListChangeMonitoring() end");
-    }
- 
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::StopWGListChangeMonitoring
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateAppUi::StopWGListChangeMonitoring()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::StopWGListChangeMonitoring() begin");
-	iEikonEnv->RootWin().DisableGroupListChangeEvents();
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::StopWGListChangeMonitoring() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::SetClientWgId
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateAppUi::SetClientWgId( TInt aWgId )
-    {
-	IAUPDATE_TRACE_1("[IAUPDATE] CIAUpdateAppUi::SetClientWgId() wgId %d", aWgId );
-	iWgId = aWgId;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::ClientInBackgroundL
-// 
-// -----------------------------------------------------------------------------
-// 
-TInt CIAUpdateAppUi::ClientInBackgroundL() const
-    {
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ClientInBackgroundL() begin");
-	TBool inBackground = EFalse;
-	if ( iWgId > 0 )
-	    {
-		CArrayFixFlat<TInt>*  wgArray = new( ELeave ) CArrayFixFlat<TInt>(10);  
-        CleanupStack::PushL( wgArray );
-        User::LeaveIfError( iEikonEnv->WsSession().WindowGroupList( 0, wgArray ) );  
-        TInt ownWgId = iEikonEnv->RootWin().Identifier();
-        if ( ( wgArray->At( 0 ) != ownWgId ) && ( wgArray->At( 0 ) != iWgId  ) )
-            {
-        	inBackground = ETrue;
-            }
-        CleanupStack::PopAndDestroy( wgArray );  
-	    }
-	IAUPDATE_TRACE_1("[IAUPDATE] CIAUpdateAppUi::ClientInBackgroundL() inBackground: %d", inBackground );
-    return inBackground;  
-    }
-
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::ShowUpdateQueryL
-// 
-// -----------------------------------------------------------------------------
-//    
-void CIAUpdateAppUi::ShowUpdateQueryL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowUpdateQueryL() begin");
-	CIAUpdateQueryHistory* updateQueryHistory = CIAUpdateQueryHistory::NewL();
-	// Get the delay information from the controller that has read it from
-	// the config file.
-	updateQueryHistory->SetDelay( iController->ConfigData().QueryHistoryDelayHours() );
-    CleanupStack::PushL( updateQueryHistory );
-    if ( !updateQueryHistory->IsDelayedL( iUpdatequeryUid ) )
-        {
-        if ( ClientInBackgroundL() )
-            {
-    	    iEikonEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNormal );
-            }
-        else
-            {
-            iEikonEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );	
-            }
-   	    TInt ret = IAUpdateDialogUtil::ShowConfirmationQueryL( 
-   	                                  R_IAUPDATE_PROGRAM_UPDATE, 
-	                                  R_IAUPDATE_SOFTKEYS_NOW_LATER__NOW );
-	    switch ( ret )
-	        {
-	        case EIAUpdateSoftkeyNow:
-	            IAUPDATE_TRACE("[IAUPDATE] EIAUpdateSoftkeyNow");
-	            iUpdateNow = ETrue;
-	            break;
-
-	        case EIAUpdateSoftkeyLater:
-	            IAUPDATE_TRACE("[IAUPDATE] EIAUpdateSoftkeyLater");
-	        	updateQueryHistory->SetTimeL( iUpdatequeryUid );
-	            break;
-	            
-	        default: //case of cancel (eq. End key)
-	            break;
-	        }     
-        }
-    CleanupStack::PopAndDestroy( updateQueryHistory );
-	InformRequestObserver( KErrNone );	
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ShowUpdateQueryL() end");
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::HideApplicationInFSWL
-// 
-// -----------------------------------------------------------------------------
-//  
-void CIAUpdateAppUi::HideApplicationInFSWL( TBool aHide )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HideApplicationInFSW() begin");
-    IAUPDATE_TRACE_1("[IAUPDATE] hide: %d", aHide );
-    TInt id = iEikonEnv->RootWin().Identifier();
-
-    CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC( 
-                                                    iEikonEnv->WsSession(), id );
-    
-    wgName->SetHidden( aHide );
-    wgName->SetWindowGroupName( iEikonEnv->RootWin() );    
-    CleanupStack::PopAndDestroy( wgName ); 
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HideApplicationInFSW() end");
-    }
- 
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::ShowGlobalErrorNoteL
-// 
-// -----------------------------------------------------------------------------
-//     
-void CIAUpdateAppUi::ShowGlobalErrorNoteL( TInt aError ) const
-    {
-    CErrorUI* errorUI = CErrorUI::NewLC( );     
-    errorUI->ShowGlobalErrorNoteL( aError );        
-    CleanupStack::PopAndDestroy( errorUI ); 	
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// CIAUpdateAppUi::UpdateQueryCallbackL
-// ---------------------------------------------------------------------------
-//
-TInt CIAUpdateAppUi::UpdateQueryCallbackL( TAny* aPtr )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::UpdateQueryCallbackL() begin");
-    CIAUpdateAppUi* appUI= static_cast<CIAUpdateAppUi*>( aPtr ); 
-    TRAPD( err, appUI->ShowUpdateQueryL() );
-    if ( err != KErrNone )
-        {
-    	appUI->HandleLeaveErrorL( err );
-        }
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::UpdateQueryCallbackL() end");
-    return KErrNone;
-    }    
-
-    
-// ---------------------------------------------------------------------------
-// CIAUpdateAppUi::AutomaticCheckCallbackL
-// ---------------------------------------------------------------------------
-//    
-    
-TInt CIAUpdateAppUi::AutomaticCheckCallbackL( TAny* aPtr )    
-    {
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::AutomaticCheckCallbackL() begin");
-	CIAUpdateAppUi* appUI= static_cast<CIAUpdateAppUi*>( aPtr ); 
-	
-	TInt err = KErrNone;
-	CIAUpdateAutomaticCheck* automaticCheck = NULL;
-	TRAP( err, automaticCheck = CIAUpdateAutomaticCheck::NewL() ); 
-    if ( err != KErrNone )
-        {
-    	appUI->HandleLeaveErrorL( err );
-        }
-    else
-        {
-        CleanupStack::PushL( automaticCheck );
-        TRAP( err, automaticCheck->AcceptAutomaticCheckL() );
-        if ( err != KErrNone )
-            {
-    	    appUI->HandleLeaveErrorL( err );
-            }	
-        } 
-    
-    CleanupStack::PopAndDestroy( automaticCheck );
-	
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::AutomaticCheckCallbackL() end");
-	return KErrNone;
-    }
-    
-    
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::HandleTextLinkL
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateAppUi::HandleTextLinkL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleTextLinkL() begin");
-    if ( !iHistoryView )
-        {
-        iHistoryView = CIAUpdateHistoryView::NewL( iController->HistoryL() );
-         
-        AddViewL( iHistoryView );
-        }
-    ActivateLocalViewL( TUid::Uid( EIAUpdateHistoryViewId ) );
-    iShowStatusDialogAgain = ETrue;
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::HandleTextLinkL() end");
-    }
-
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::SetDMSupport
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateAppUi::SetDMSupport( TBool aDMSupport )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::SetDMSupport begin");
-    iIsDMSupported  = aDMSupport;
-    iIsDMSet = ETrue;;
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::SetDMSupport end");
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::IsDMSupport
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CIAUpdateAppUi::IsDMSupport()
-    {
-    return iIsDMSupported;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAppUi::IsDMSupportSet
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CIAUpdateAppUi::IsDMSupportSet()
-    {
-    return iIsDMSet;
-    }
-
-TBool CIAUpdateAppUi::UiRefreshAllowed()
-    {
-    return iUiRefreshAllowed;
-    }
-
-// ---------------------------------------------------------------------------
-// CIAUpdateAppUi::ForegroundDelayComplete
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateAppUi::ForegroundDelayComplete( TInt aError )
-    {
-    IAUPDATE_TRACE_1("[IAUPDATE] CIAUpdateAppUi::ForegroundDelayComplete() begin: %d",
-                     aError);
-
-    delete iForegroundTimer;
-    iForegroundTimer = NULL;
-    
-    iEikonEnv->RootWin().SetOrdinalPosition( 0 );
-
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::ForegroundDelayComplete() end");
-    }
-
-// ---------------------------------------------------------------------------
-// CIAUpdateAppUi::BackgroundDelayComplete
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateAppUi::BackgroundDelayComplete( TInt aError )
-    {
-    IAUPDATE_TRACE_1("[IAUPDATE] CIAUpdateAppUi::BackgroundDelayComplete() begin: %d",
-                     aError);
-
-   delete iBackgroundTimer;
-    iBackgroundTimer = NULL;
-    
-    iEikonEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront );
-
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::BackgroundDelayComplete() end");
-    }
-
-// ---------------------------------------------------------------------------
-// CIAUpdateAppUi::ProcessStartDelayComplete
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateAppUi::ProcessStartDelayComplete( TInt /*aError*/ )
-    {
-    }
-    
-
-// End of File  
--- a/iaupdate/IAD/ui/src/iaupdateautomaticcheck.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateautomaticcheck.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -21,15 +21,13 @@
 //INCLUDES
 
 #include "iaupdateautomaticcheck.h"
-#include "iaupdatedialogutil.h"
 #include "iaupdatefirsttimeinfo.h"
 #include "iaupdate.hrh"
 #include "iaupdateprivatecrkeys.h"
-#include "iaupdateapplication.h"
+
 
-#include <avkon.rsg>
+
 #include <avkon.hrh>
-#include <iaupdate.rsg>
 #include <centralrepository.h> 
 
 
@@ -104,9 +102,10 @@
 	        }
 	    else
 	        {
-	        TInt ret = IAUpdateDialogUtil::ShowConfirmationQueryL( 
+	        /*TInt ret = IAUpdateDialogUtil::ShowConfirmationQueryL( 
 	                                          R_IAUPDATE_TURN_ON_AUTOUPD_CHECKS, 
-	                                          R_AVKON_SOFTKEYS_YES_NO );    
+	                                          R_AVKON_SOFTKEYS_YES_NO );*/ 
+	        TInt ret = EAknSoftkeyYes;
 	        firstTimeInfo->SetAutomaticUpdatesAskedL();
 	        if ( ret == EAknSoftkeyYes )
                 {
--- a/iaupdate/IAD/ui/src/iaupdatedetailsdialog.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +0,0 @@
-/*
-* Copyright (c) 2008-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 "iaupdatedetailsdialog.h"
-#include "iaupdatedialogutil.h"
-#include "iaupdatebasenode.h"
-#include "iaupdatenode.h"  
-#include "iaupdatedebug.h"
-#include <iaupdate.rsg>
-
-#include <aknmessagequerydialog.h>      // CAknMessageQueryDialog
-
-#include <StringLoader.h>
-
-// CONSTANTS
-const TInt KKiloByte = 1024;
-const TInt KMegaByte = 1024 * 1024;
-const TInt KMaxShownInKiloBytes = 10 * KMegaByte;
-
-
-/*******************************************************************************
- * class CIAUpdateDetailsDialog
- *******************************************************************************/
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateDetailsDialog::ShowDialogL
-// 
-// -----------------------------------------------------------------------------
-TBool CIAUpdateDetailsDialog::ShowDialogL( TIAUpdateDialogParam* aParam )
-	{
-	CIAUpdateDetailsDialog* dialog = CIAUpdateDetailsDialog::NewL( aParam );
-	CleanupStack::PushL( dialog );
-
-	dialog->ShowDialogL();
-
-	CleanupStack::PopAndDestroy( dialog );
-    
-    return ETrue;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateDetailsDialog::NewL
-//
-// -----------------------------------------------------------------------------
-CIAUpdateDetailsDialog* CIAUpdateDetailsDialog::NewL( TIAUpdateDialogParam* aParam )
-    {
-    CIAUpdateDetailsDialog* self = new ( ELeave ) CIAUpdateDetailsDialog( aParam );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateDetailsDialog::CIAUpdateDetailsDialog
-// 
-// -----------------------------------------------------------------------------
-//
-CIAUpdateDetailsDialog::CIAUpdateDetailsDialog( TIAUpdateDialogParam* aParam )
-	{
-	iParam = aParam;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateDetailsDialog::ConstructL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateDetailsDialog::ConstructL()
-    {
-    if ( !iParam->iNode )
-        {
-    	User::Leave( KErrNotFound );
-        }
-        
-    TInt size = BufferSize();
-
- 	iBuf = HBufC::NewL( size );
-    } 
-
-
-
-// ----------------------------------------------------------------------------
-// Destructor
-//
-// ----------------------------------------------------------------------------
-//
-CIAUpdateDetailsDialog::~CIAUpdateDetailsDialog()
-    {
-    delete iBuf;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateDetailsDialog::BufferSize
-//
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateDetailsDialog::BufferSize()
-    {
-    const TInt KExtraSize = 512;
-    
-    TPtrC ptr1 = iParam->iNode->Base().Name();
-    TPtrC ptr2 = iParam->iNode->Base().Description();
-    
-    TInt len = ptr1.Length() + ptr2.Length() + KExtraSize;
-    
-    return len;
-    } 
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateDetailsDialog::ConstructTextL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateDetailsDialog::ConstructTextL()
-    {
-    _LIT(KNewLine, "\n");
-
-    TPtr ptr = iBuf->Des();
-    
-    TPtrC name =         iParam->iNode->Base().Name();
-    TPtrC description =  iParam->iNode->Base().Description();
-    TIAUpdateVersion version = iParam->iNode->Base().Version();
-    TInt contentSize =   iParam->iNode->Base().ContentSizeL();
-    
-    
-    HBufC* hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_APP_NAME );
-    ptr.Append( KOpeningBoldTag );
-    ptr.Append( *hBuf );
-    ptr.Append( KClosingBoldTag );
-    CleanupStack::PopAndDestroy( hBuf );
-    
-    ptr.Append( KNewLine );
-    ptr.Append( name );
-    ptr.Append( KNewLine );
-    ptr.Append( KNewLine );
-       
-    hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_DESCRIPTION );
-    ptr.Append( KOpeningBoldTag );
-    ptr.Append( *hBuf );
-    ptr.Append( KClosingBoldTag );
-    CleanupStack::PopAndDestroy( hBuf );
-    
-    ptr.Append( KNewLine );
-    ptr.Append( description );
-    ptr.Append( KNewLine );
-    ptr.Append( KNewLine );
-    
-    
-    if( iParam->iNode->Type() != MIAUpdateNode::EPackageTypeServicePack )
-        {
-        hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_VERSION );
-        ptr.Append( KOpeningBoldTag );
-        ptr.Append( *hBuf );
-        ptr.Append( KClosingBoldTag );
-        CleanupStack::PopAndDestroy( hBuf );
-        
-        ptr.Append( KNewLine );
-        hBuf = VersionTextLC( version );
-        ptr.Append( *hBuf );
-        ptr.Append( KNewLine );
-        ptr.Append( KNewLine );
-        CleanupStack::PopAndDestroy( hBuf );
-        }
-   
-    
-    hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_FILE_SIZE );
-    ptr.Append( KOpeningBoldTag );
-    ptr.Append( *hBuf );
-    ptr.Append( KClosingBoldTag );
-    CleanupStack::PopAndDestroy( hBuf );
-    
-    ptr.Append( KNewLine );
-    
-    hBuf = FileSizeTextLC( contentSize );
-    ptr.Append( *hBuf );
-    CleanupStack::PopAndDestroy( hBuf );
-    } 
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateDetailsDialog::ShowDialogL
-// 
-// -----------------------------------------------------------------------------
-TBool CIAUpdateDetailsDialog::ShowDialogL()
-	{
-	ConstructTextL();
-
-	HBufC* hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_TITLE );
-	IAUpdateDialogUtil::ShowMessageQueryL( *hBuf, *iBuf );
-	CleanupStack::PopAndDestroy( hBuf );
-    
-    return ETrue;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateDetailsDialog::FileSizeTextLC
-// 
-// -----------------------------------------------------------------------------
-//
-HBufC* CIAUpdateDetailsDialog::FileSizeTextLC( TInt aFileSize )
-	{
-    TInt resourceId = 0;
-	TInt size = 0;
-	
-	if ( aFileSize >= KMaxShownInKiloBytes )
-	    {
-	    resourceId = R_IAUPDATE_DETAILS_DIALOG_SIZE_MEGABYTE;
-	    size = aFileSize / KMegaByte;
-   	    if ( aFileSize % KMegaByte != 0 )
-	        {
-	        size++;
-	        }
-	    }
-	else
-	    {
-	    resourceId = R_IAUPDATE_DETAILS_DIALOG_SIZE_KILOBYTE;
-	    size = aFileSize / KKiloByte;
-   	    if ( aFileSize % KKiloByte != 0 )
-	        {
-	        size++;
-	        }	
-	    }
-	    
-	HBufC* sizeAsString = StringLoader::LoadLC( resourceId, size );
-	TPtr ptr = sizeAsString->Des();
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); 
-    return sizeAsString;
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateDetailsDialog::VersionTextLC
-// 
-// Version format is '%1N.%2N(%3N)' where
-//
-// %0N is major version number
-// %1N is minor version number
-// %2N is build number
-// -----------------------------------------------------------------------------
-//
-HBufC* CIAUpdateDetailsDialog::VersionTextLC( TIAUpdateVersion aVersion )
-    {
-    const TInt KVersionSize = 64;
-    
-    TInt major = aVersion.iMajor;
-    TInt minor = aVersion.iMinor;
-    TInt build = aVersion.iBuild;
-    
-    TBuf<KVersionSize> buf1;
-    TBuf<KVersionSize> buf2;
-    
-    HBufC* hBuf   = HBufC::NewLC( KVersionSize );
-    TPtr ptr = hBuf->Des();
-    
-    HBufC* versionFormat = 
-    StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_VERSION_FORMAT );
-   
-    // replace  %0N with major number
-    StringLoader::Format( buf1, versionFormat->Des(), 0, major );
-    
-    // replace  %1N with minor number
-    StringLoader::Format( buf2, buf1, 1, minor );
-
-    // replace  %2N with build number
-    StringLoader::Format( ptr, buf2, 2, build );
-
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr );
-    
-    CleanupStack::PopAndDestroy( versionFormat );
-    
-    return hBuf;
-    }
-
-   
-//  End of File  
--- a/iaupdate/IAD/ui/src/iaupdatedialogutil.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 "iaupdatedialogutil.h"
-#include "iaupdatedebug.h"
-#include <iaupdate.rsg>
-
-#include <aknmessagequerydialog.h>      // CAknMessageQueryDialog
-#include <aknnotewrappers.h>    // CAknInformationNote
-#include <StringLoader.h>
-
-
-/*******************************************************************************
- * class TIAUpdateDialogParam
- *******************************************************************************/
-
-
-// -------------------------------------------------------------------------------
-// TIAUpdateDialogParam::TIAUpdateDialogParam
-//
-// -------------------------------------------------------------------------------
-//
-TIAUpdateDialogParam::TIAUpdateDialogParam()
- : iCountSuccessfull( KErrNotFound ), iCountCancelled( KErrNotFound ),
-   iCountFailed( KErrNotFound ), iResourceId( KErrNotFound ), iNode( NULL ), 
-   iLinkObserver( NULL )
-    {
-    }
-
-
-/*******************************************************************************
- * class IAUpdateDialogUtil
- *******************************************************************************/
-
-
-//------------------------------------------------------------------------------
-// IAUpdateDialogUtil::ShowMessageQueryL
-//
-//------------------------------------------------------------------------------
-//
-void IAUpdateDialogUtil::ShowMessageQueryL(const TDesC& aTitle, const TDesC& aText)
-	{
-	TPtrC ptr = aText;
-	CAknMessageQueryDialog* query = CAknMessageQueryDialog::NewL( ptr );
-	query->PrepareLC( R_IAUPDATE_MESSAGE_QUERY );
-
-	if ( aTitle.Length() != 0 )
-		{
-		CAknPopupHeadingPane* headingPane = query->Heading();
-		headingPane->SetTextL( aTitle );
-		}
-	query->RunLD();
-	}
-
-
-//------------------------------------------------------------------------------
-// IAUpdateDialogUtil::ShowMessageQueryL
-//
-//------------------------------------------------------------------------------
-//
-void IAUpdateDialogUtil::ShowMessageQueryL( const TDesC& aTitle, TInt aResource )
-	{
-	HBufC* hBuf = StringLoader::LoadLC( aResource );
-	ShowMessageQueryL( aTitle, hBuf->Des() );
-	CleanupStack::PopAndDestroy( hBuf );
-	}
-
-
-//------------------------------------------------------------------------------
-// IAUpdateDialogUtil::ShowInformationQueryL
-//
-//------------------------------------------------------------------------------
-//
-void IAUpdateDialogUtil::ShowInformationQueryL(const TDesC& aText)
-	{
-	CAknQueryDialog* queryDialog = new (ELeave) CAknQueryDialog;
-	queryDialog->ExecuteLD(R_IAUPDATE_INFORMATION_QUERY, aText);
-	}
-
-
-//------------------------------------------------------------------------------
-// IAUpdateDialogUtil::ShowInformationQueryL
-//
-//------------------------------------------------------------------------------
-//
-void IAUpdateDialogUtil::ShowInformationQueryL(TInt aResource)
-	{
-	HBufC* hBuf = StringLoader::LoadLC(aResource);
-	ShowInformationQueryL( hBuf->Des() );
-	CleanupStack::PopAndDestroy( hBuf );
-	}
-
-//------------------------------------------------------------------------------
-// IAUpdateDialogUtil::ShowConfirmationQueryL
-//
-//------------------------------------------------------------------------------
-//
-TInt IAUpdateDialogUtil::ShowConfirmationQueryL( const TDesC& aText, 
-                                          TInt aSoftkeyResourceId )
-	{
-	CAknQueryDialog* queryDialog = CAknQueryDialog::NewL( 
-	                               CAknQueryDialog::EConfirmationTone );
-
-    queryDialog->PrepareLC( R_IAUPDATE_CONFIRMATION_QUERY );
-    queryDialog->SetPromptL( aText );
-    queryDialog->ButtonGroupContainer().SetCommandSetL( aSoftkeyResourceId );
-    return ( queryDialog->RunLD() );
-	}
-
-//------------------------------------------------------------------------------
-// IAUpdateDialogUtil::ShowConfirmationQueryL
-//
-//------------------------------------------------------------------------------
-//
-TInt IAUpdateDialogUtil::ShowConfirmationQueryL( TInt aResource, 
-                                          TInt aSoftkeyResourceId )
-	{
-	HBufC* hBuf = StringLoader::LoadLC( aResource) ;
-	TInt ret = ShowConfirmationQueryL( *hBuf, aSoftkeyResourceId );
-	CleanupStack::PopAndDestroy( hBuf );
-	return ret;
-	}
-
-
-
-
-// -----------------------------------------------------------------------------
-// IAUpdateDialogUtil::Panic
-//
-// -----------------------------------------------------------------------------
-//
-void IAUpdateDialogUtil::Panic( TInt aReason ) 
-    {
-	_LIT(KPanicCategory, "IAUpdateDialogUtil");
-	
-	User::Panic(KPanicCategory, aReason); 
-    }
-    
-//  End of File  
--- a/iaupdate/IAD/ui/src/iaupdatedocument.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 module contains the implementation of CIAUpdateDocument class 
-*                member functions.
-*
-*/
-
-
-//INCLUDES
-#include <e32property.h>
-#include "iaupdateappui.h"
-#include "iaupdatedocument.h"
-#include "iaupdatefwnsmlpskeys.h"
-#include "iaupdatedebug.h"
-#include "iaupdateuids.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------------------------
-// CIAUpdateDocument::NewL
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CIAUpdateDocument* CIAUpdateDocument::NewL(CEikApplication& aApp)
-    {
-    CIAUpdateDocument* self = NewLC(aApp);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CIAUpdateDocument::NewLC
-// 
-// ---------------------------------------------------------------------------
-//
-CIAUpdateDocument* CIAUpdateDocument::NewLC(CEikApplication& aApp)
-    {
-    CIAUpdateDocument* self = new (ELeave) CIAUpdateDocument(aApp);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// void CCIAUpdateDocument::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateDocument::ConstructL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateDocument::ConstructL() begin");
-    TInt err  = RProperty::Define( KPSUidNSmlDMSyncApp,
-            KFotaDLStatus,
-            RProperty::EInt); //Policies removed as FOTA to write     
-    
-    err =  RProperty::Set( KPSUidNSmlDMSyncApp,
-            KFotaDLStatus,KErrNotFound );  
-    
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateDocument::ConstructL() end");
-    }    
-
-
-// ---------------------------------------------------------------------------
-// CIAUpdateDocument::CIAUpdateDocument(CEikApplication& aApp)
-// constructor
-// ---------------------------------------------------------------------------
-//
-CIAUpdateDocument::CIAUpdateDocument(CEikApplication& aApp) : CAknDocument(aApp) 
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CIAUpdateDocument::~CIAUpdateDocument()
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CIAUpdateDocument::~CIAUpdateDocument()
-    {
-    TInt err = RProperty::Delete(KPSUidNSmlDMSyncApp, KFotaDLStatus);
-    }
-
-// ----------------------------------------------------
-// CIAUpdateDocument::CreateAppUiL()
-// constructs CIAUpdateAppUi
-// ----------------------------------------------------
-//
-CEikAppUi* CIAUpdateDocument::CreateAppUiL()
-    {
-    // Create the application user interface, and return a pointer to it,
-    // the framework takes ownership of this object
-    CEikAppUi* appUi = new (ELeave) CIAUpdateAppUi;
-    return appUi;
-    }
- 
-// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/src/iaupdateengine.cpp	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,974 @@
+/*
+* 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 module contains the implementation of IAUpdateEngine
+*                class member functions.
+*
+*/
+
+#include <qapplication.h>
+#include <hbmessagebox.h>
+#include <hbaction.h>
+#include <eikenv.h>
+#include <centralrepository.h>
+#include <cmmanagerext.h>
+#include <cmdestinationext.h>
+#include <rconnmon.h>
+#include <apgwgnam.h>
+
+#include "iaupdateengine.h"
+#include "iaupdateserviceprovider.h"
+#include "iaupdateuicontroller.h"
+#include "iaupdategloballockhandler.h"
+#include "iaupdatenodefilter.h"
+#include "iaupdateresult.h"
+#include "iaupdateprivatecrkeys.h"
+#include "iaupdateuiconfigdata.h"
+#include "iaupdatequeryhistory.h"
+#include "iaupdateparameters.h"
+#include "iaupdatedebug.h"
+
+IAUpdateEngine::IAUpdateEngine(QObject *parent)
+    : QObject(parent),
+      iController(NULL),
+      iGlobalLockHandler(NULL),
+      iIdle(NULL),
+      iUpdateNow(EFalse),
+      iRequestIssued(EFalse),
+      iStartedFromApplication(EFalse),
+      iUpdatequeryUid(0)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::IAUpdateEngine() begin");
+    iEikEnv = CEikonEnv::Static();
+    mServiceProvider = new IAUpdateServiceProvider( *this );
+    connect(mServiceProvider, SIGNAL(clientDisconnected()), this, SLOT(handleAllClientsClosed()));
+    TRAP_IGNORE( iController = CIAUpdateUiController::NewL( *this ));
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::IAUpdateEngine() end")
+}
+
+
+IAUpdateEngine::~IAUpdateEngine()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::~IAUpdateEngine() begin");
+    InformRequestObserver( KErrCancel );
+    delete iGlobalLockHandler;
+    delete iController;
+    delete mServiceProvider;    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::~IAUpdateEngine() end");
+}
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::StartedByLauncherL
+// 
+// -----------------------------------------------------------------------------
+//
+void IAUpdateEngine::StartedByLauncherL( TBool aRefreshFromNetworkDenied )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartedByLauncherL() begin");
+    iRequestIssued = ETrue;
+    iRequestType = IAUpdateUiDefines::ENoRequest;
+    iController->SetRequestType( iRequestType );
+    SetVisibleL( ETrue );
+    CIAUpdateParameters* params = iController->ParamsReadAndRemoveFileL();
+    iController->CheckUpdatesDeferredL( params, aRefreshFromNetworkDenied );
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartedByLauncherL() end");
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::CheckUpdatesRequestL
+// 
+// -----------------------------------------------------------------------------
+//
+void IAUpdateEngine::CheckUpdatesRequestL( int wgid, CIAUpdateParameters* aFilterParams )
+                                           
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::CheckUpdatesRequestL() begin");
+    SetClientWgId( wgid );
+    iRequestIssued = ETrue;
+    iStartedFromApplication  = ETrue;
+    CleanupStack::PushL( aFilterParams );
+    if ( wgid > 0 )
+        {
+        HideApplicationInFSWL( ETrue );
+        }
+    CleanupStack::Pop( aFilterParams );
+    
+    if ( !aFilterParams->ShowProgress() )
+        {
+        iEikEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront ); 
+        }
+           
+    iRequestType = IAUpdateUiDefines::ECheckUpdates; 
+    iController->SetRequestType( iRequestType );
+    
+    iController->CheckUpdatesDeferredL( aFilterParams, EFalse ); 
+    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::CheckUpdatesRequestL() end");
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::ShowUpdatesRequestL
+// 
+// -----------------------------------------------------------------------------
+// 
+void IAUpdateEngine::ShowUpdatesRequestL( int wgid, CIAUpdateParameters* aFilterParams )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdatesRequestL() begin"); 
+    SetClientWgId( wgid );
+    iRequestIssued = ETrue;
+//    delete iBackgroundTimer;
+//    iBackgroundTimer = NULL;
+    iStartedFromApplication  = ETrue;
+    CleanupStack::PushL( aFilterParams );
+    if ( wgid > 0 )
+        {
+        HideApplicationInFSWL( ETrue );
+        }
+   
+    //StatusPane()->MakeVisible( ETrue );
+    iEikEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );
+    
+    //iRequestObserver = &aObserver;
+    iRequestType = IAUpdateUiDefines::EShowUpdates;
+    iController->SetRequestType( iRequestType );
+     
+
+    //if ( !iMainView )
+    //    {
+    //    iMainView  = CIAUpdateMainView::NewL( ClientRect() ); 
+    //    AddViewL( iMainView );
+    //    }
+    
+      
+    // by pushing object to cleanup stack its destructor is called if leave happens
+    // so global lock issued by this instance can be released in destructor of CIAUpdateGlobalLockHandler
+    CIAUpdateGlobalLockHandler* globalLockHandler = CIAUpdateGlobalLockHandler::NewLC();
+    if ( !globalLockHandler->InUseByAnotherInstanceL() )
+        {
+        globalLockHandler->SetToInUseForAnotherInstancesL( ETrue );
+        CleanupStack::Pop( globalLockHandler );
+        CleanupStack::Pop( aFilterParams );
+        CleanupStack::PushL( globalLockHandler );
+        iController->CheckUpdatesDeferredL( aFilterParams, EFalse );
+        CleanupStack::Pop( globalLockHandler ); 
+        delete iGlobalLockHandler;
+        iGlobalLockHandler = globalLockHandler;
+        //now possible deletion of iGlobalLockHandler in leave situation is handled
+        //in HandleLeaveErrorL() and HandleLeaveErrorWithoutLeave methods. 
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( globalLockHandler );
+        CleanupStack::PopAndDestroy( aFilterParams );
+        // locked by another IAD instance, nothing else to do than just complete client's request.  
+        InformRequestObserver( KErrNone );
+        }  
+
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdatesRequestL() end"); 
+    }
+    
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::ShowUpdateQueryRequestL
+// 
+// -----------------------------------------------------------------------------
+//     
+void IAUpdateEngine::ShowUpdateQueryRequestL( int wgid, TUint aUid )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryRequestL begin");
+    SetClientWgId( wgid );
+    iRequestIssued = ETrue;
+    iStartedFromApplication  = ETrue;
+    iUpdatequeryUid = aUid;
+    iUpdateNow = EFalse;
+    if ( wgid > 0 )
+        {
+        HideApplicationInFSWL( ETrue );
+        }
+    
+    //iRequestObserver = &aObserver;
+    iRequestType = IAUpdateUiDefines::EUpdateQuery;
+    
+    
+    delete iIdle;
+    iIdle = NULL;
+    iIdle = CIdle::NewL( CActive::EPriorityIdle ); 
+    iIdle->Start( TCallBack( UpdateQueryCallbackL, this ) ); 
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryRequestL end")
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::SetVisibleL
+// 
+// -----------------------------------------------------------------------------
+//  
+void IAUpdateEngine::SetVisibleL( TBool aVisible )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetVisibleL() begin");
+    IAUPDATE_TRACE_1("[IAUPDATE] visible: %d", aVisible );
+    /*if ( aVisible )
+        {
+        if ( iEikonEnv->RootWin().OrdinalPosition() != 0 || iEikonEnv->RootWin().OrdinalPriority() != ECoeWinPriorityNormal )
+            {
+            iEikonEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );
+            }
+        
+        StatusPane()->MakeVisible( ETrue );
+        iMainView  = CIAUpdateMainView::NewL( ClientRect() ); 
+        AddViewL( iMainView );
+        ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
+        }
+    else
+        {
+        iEikonEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront );
+        StatusPane()->MakeVisible( EFalse );
+        }*/
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetVisibleL() end");
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::SetClientWgId
+// 
+// -----------------------------------------------------------------------------
+// 
+void IAUpdateEngine::SetClientWgId( TInt aWgId )
+    {
+    IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateEngine::SetClientWgId() wgId %d", aWgId );
+    iWgId = aWgId;
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::ClientInBackgroundL
+// 
+// -----------------------------------------------------------------------------
+// 
+TInt IAUpdateEngine::ClientInBackgroundL() const
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ClientInBackgroundL() begin");
+    TBool inBackground = EFalse;
+    if ( iWgId > 0 )
+        {
+        CArrayFixFlat<TInt>*  wgArray = new( ELeave ) CArrayFixFlat<TInt>(10);  
+        CleanupStack::PushL( wgArray );
+        User::LeaveIfError( iEikEnv->WsSession().WindowGroupList( 0, wgArray ) );  
+        TInt ownWgId = iEikEnv->RootWin().Identifier();
+        if ( ( wgArray->At( 0 ) != ownWgId ) && ( wgArray->At( 0 ) != iWgId  ) )
+            {
+            inBackground = ETrue;
+            }
+        CleanupStack::PopAndDestroy( wgArray );  
+        }
+    IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateEngine::ClientInBackgroundL() inBackground: %d", inBackground );
+    return inBackground;  
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::refresh
+// 
+// -----------------------------------------------------------------------------
+//  
+/*void IAUpdateEngine::refresh(int error) 
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::refresh() begin");
+    IAUPDATE_TRACE_1("[IAUPDATE] Error code: %d", error );
+    //iMainView->RefreshL( iController->Nodes(), iController->FwNodes(), aError );                    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::refresh() end");
+    }*/
+
+
+void IAUpdateEngine::handleAllClientsClosed()
+{
+    qApp->quit(); 
+}
+
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::StartupComplete
+// 
+// -----------------------------------------------------------------------------
+//    
+void IAUpdateEngine::StartupComplete( TInt aError )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupComplete() begin"); 
+    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError);
+    
+    if( aError != KErrNone ) 
+        {  
+        HandleLeaveErrorWithoutLeave( aError );
+        }
+    else
+        {
+        TRAPD( err, StartupCompleteL() );
+        if( err != KErrNone ) 
+           {  
+           HandleLeaveErrorWithoutLeave( err );
+           }
+        }
+ 
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupComplete() end");    
+    }
+    
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::StartupCompleteL
+// 
+// -----------------------------------------------------------------------------
+//    
+void IAUpdateEngine::StartupCompleteL()
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupCompleteL() begin"); 
+    
+    delete iGlobalLockHandler;
+    iGlobalLockHandler = NULL;
+    iGlobalLockHandler = CIAUpdateGlobalLockHandler::NewL();
+    if ( !iGlobalLockHandler->InUseByAnotherInstanceL() )
+        {
+        TBool totalSilent( EFalse );
+        if ( iRequestType == IAUpdateUiDefines::ECheckUpdates )
+            {
+            if ( iController->Filter() )
+                {
+                if ( iController->Filter()->FilterParams() )
+                    {
+                    if ( iController->Filter()->FilterParams()->Refresh() )
+                        {
+                        //from bgchecker, make it silent
+                        totalSilent = ETrue;
+                        }
+                    }
+                }
+            }
+        SetDefaultConnectionMethodL( totalSilent );
+        iGlobalLockHandler->SetToInUseForAnotherInstancesL( ETrue );
+        iController->StartRefreshL();  
+        }
+    else
+        {
+        RefreshCompleteL( ETrue, KErrServerBusy );
+        }    
+ 
+       
+    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupCompleteL() end");    
+    }
+    
+ 
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::HandleLeaveErrorL
+// 
+// -----------------------------------------------------------------------------
+//        
+void IAUpdateEngine::HandleLeaveErrorL( TInt aError )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorL() begin");
+    //removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
+    delete iGlobalLockHandler;
+    iGlobalLockHandler = NULL;
+    // client request is completed before leave in case of leave error
+    if ( aError != KErrNone ) 
+        {   
+        InformRequestObserver( aError );
+        User::Leave( aError );
+        }
+    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorL() end");
+    }
+
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::HandleLeaveErrorWithoutLeave
+// 
+// -----------------------------------------------------------------------------
+//  
+void IAUpdateEngine::HandleLeaveErrorWithoutLeave( TInt aError )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorWithoutLeave() begin");
+    //removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
+    delete iGlobalLockHandler;
+    iGlobalLockHandler = NULL;
+    if ( aError != KErrNone ) 
+        {
+        InformRequestObserver( aError );
+        }
+    if ( aError == KErrDiskFull )
+        {
+        //TRAP_IGNORE( ShowGlobalErrorNoteL( aError ) );
+        }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorWithoutLeave end");
+    }
+
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::RefreshCompleteL
+// 
+// -----------------------------------------------------------------------------
+//      
+void IAUpdateEngine::RefreshCompleteL( TBool /*aWithViewActivation*/, TInt aError )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::RefreshCompleteL() begin");
+    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError );
+    //removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
+    delete iGlobalLockHandler;
+    iGlobalLockHandler = NULL;   
+   
+    if ( iRequestType == IAUpdateUiDefines::ECheckUpdates )
+        {
+        InformRequestObserver( aError );
+        }
+    else 
+        {    
+        emit refresh( iController->Nodes(), iController->FwNodes(), aError );   
+        //if ( aWithViewActivation)
+          //  {
+          //  ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
+          //  }
+ 
+        // By calling CIdle possible waiting dialog can be closed before
+        // automatic check where a new dialog may be launched
+        //delete iIdleAutCheck;
+        //iIdleAutCheck = NULL;
+        //iIdleAutCheck = CIdle::NewL( CActive::EPriorityIdle ); 
+        //iIdleAutCheck->Start( TCallBack( AutomaticCheckCallbackL, this ) );*/
+        } 
+ 
+  
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::RefreshCompleteL() end");        
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::UpdateCompleteL
+// 
+// -----------------------------------------------------------------------------
+//     
+void IAUpdateEngine::UpdateCompleteL( TInt aError )    
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateCompleteL begin");
+    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError );
+    //removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
+    delete iGlobalLockHandler;
+    iGlobalLockHandler = NULL;  
+    if ( iRequestType != IAUpdateUiDefines::ENoRequest )
+        {
+        InformRequestObserver( aError );
+        }
+    
+    //RefreshL( KErrNone ); 
+      
+    //ShowStatusDialogDeferredL();
+                
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateCompleteL end");
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::InformRequestObserver
+// 
+// -----------------------------------------------------------------------------
+//      
+void IAUpdateEngine::InformRequestObserver( TInt aError )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::InformRequestObserver() begin");
+        
+    //if ( iRequestObserver )
+    if ( iRequestIssued )    
+        {
+        if ( iController->ClosingAllowedByClient() )
+            {
+            if ( iRequestType != IAUpdateUiDefines::ENoRequest )
+                {
+//                if ( iRequestType == IAUpdateUiDefines::EUpdateQuery && iUpdateNow )
+//                    {
+//                  if ( !iBackgroundTimer )
+//                        {
+//                        iBackgroundTimer = CIAUpdateUITimer::NewL( *this, CIAUpdateUITimer::EBackgroundDelay );
+//                        }
+//                 if ( !iBackgroundTimer->IsActive() )
+//                        {
+//                        iBackgroundTimer->After( 500000 );
+//                        }
+//                    }
+//                 else
+//                    {
+                      iEikEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront );
+//                    }
+                }
+            }
+        
+        switch ( iRequestType )
+            {
+            case IAUpdateUiDefines::ENoRequest:
+                {
+                mServiceProvider->completeLauncherLaunch( aError );
+                break;
+                }
+            case IAUpdateUiDefines::ECheckUpdates:
+                {
+                mServiceProvider->completeCheckUpdates( iController->CountOfAvailableUpdates(), aError );
+                break;
+                }
+            case IAUpdateUiDefines::EShowUpdates:
+                {
+                CIAUpdateResult* result( NULL );
+                TRAPD( error, result = CIAUpdateResult::NewL() )
+                if ( result )
+                    {
+                    TIAUpdateResultsInfo resultsInfo( iController->ResultsInfo() );
+                    IAUPDATE_TRACE_3("[IAUPDATE] IAUpdateEngine::InformRequestObserver succeed: %d failed: %d  cancelled: %d", 
+                                                  resultsInfo.iCountSuccessfull, 
+                                                  resultsInfo.iCountFailed, 
+                                                  resultsInfo.iCountCancelled );
+                    result->SetSuccessCount( resultsInfo.iCountSuccessfull );
+                    result->SetFailCount( resultsInfo.iCountFailed );
+                    result->SetCancelCount( resultsInfo.iCountCancelled );    
+                    mServiceProvider->completeShowUpdates( result, aError );
+                    // Ownership of result is transferred here.
+                    }
+                else
+                    {
+                    mServiceProvider->completeShowUpdates( NULL, error );
+                    }
+                break;
+                }
+            case IAUpdateUiDefines::EUpdateQuery:
+                {
+                mServiceProvider->completeUpdateQuery( iUpdateNow, aError );
+                break;
+                }
+            default:
+                {
+                break;
+                }
+            }
+
+        //iRequestObserver = NULL; 
+        iRequestIssued = EFalse;
+        }
+        
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::InformRequestObserver() end");
+    }
+
+
+// ---------------------------------------------------------------------------
+// IAUpdateEngine::SetDefaultConnectionMethodL
+// Sets the connection method for the update network connection.
+// ---------------------------------------------------------------------------
+//
+void IAUpdateEngine::SetDefaultConnectionMethodL( TBool aTotalSilent )
+    {
+    if ( aTotalSilent )
+        {
+        // from back ground checker, choose the IAP to make the internet access silent
+        IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() begin");
+
+           TUint32 connectionMethodId( 0 );
+           TInt connMethodId( 0 );
+
+           // Let's first check whether cenrep contains SNAP id other than zero
+           CRepository* cenrep( CRepository::NewLC( KCRUidIAUpdateSettings ) );
+           User::LeaveIfError(  
+               cenrep->Get( KIAUpdateAccessPoint, connMethodId ) );
+           CleanupStack::PopAndDestroy( cenrep ); 
+           cenrep = NULL;
+
+           RCmManagerExt cmManagerExt;
+           cmManagerExt.OpenL();
+           CleanupClosePushL( cmManagerExt );
+           
+           if ( connMethodId == -1 )
+               {
+               IAUPDATE_TRACE("[IAUPDATE] user chooses default connection, use IAP logic");
+               
+               //check what is the default connection by users     
+               
+               TCmDefConnValue DCSetting;
+               cmManagerExt.ReadDefConnL( DCSetting );
+              
+               
+               switch ( DCSetting.iType )
+                   {
+                   case ECmDefConnAlwaysAsk:
+                   case ECmDefConnAskOnce:
+                       {
+                       //go with the best IAP under internet snap
+                       connectionMethodId = GetBestIAPInAllSNAPsL( cmManagerExt );
+                       break;
+                       }
+                   case ECmDefConnDestination:
+                       {
+                       //go with the best IAP under this snap
+                       connectionMethodId = GetBestIAPInThisSNAPL( cmManagerExt, DCSetting.iId );
+                       break;
+                       }
+                   case ECmDefConnConnectionMethod:
+                       {
+                       //go with the best IAP under this snap
+                       connectionMethodId = DCSetting.iId;
+                       break;
+                       }
+                   }
+               }
+           else if ( connMethodId == 0 )
+               {
+               //no choice from user, we go with the best IAP under Internent SNAP
+               connectionMethodId = GetBestIAPInAllSNAPsL( cmManagerExt );
+               }
+           else
+               {
+               IAUPDATE_TRACE("[IAUPDATE] use chooses a snap");
+               // It was some SNAP value
+               connectionMethodId = GetBestIAPInThisSNAPL( cmManagerExt, connMethodId );
+               }
+
+           CleanupStack::PopAndDestroy( &cmManagerExt ); 
+           
+           if ( connectionMethodId != 0 )
+               {
+               TIAUpdateConnectionMethod connectionMethod( 
+                   connectionMethodId, 
+                   TIAUpdateConnectionMethod::EConnectionMethodTypeAccessPoint );
+
+               iController->SetDefaultConnectionMethodL( connectionMethod );
+               }
+           else
+               {
+               //In the totally silent case, if no usable IAP, we complete the check update with 0 updates.
+               //the bgchecker will try again later after 1 month. 
+               //The LEAVE will be catched up later and complete the request from background checker.
+               User::LeaveIfError( KErrNotFound );
+               
+               //the following code will pop up dialog to ask from user, just for proto
+              /* connectionMethodId = 0;               
+               TIAUpdateConnectionMethod connectionMethod( 
+                   connectionMethodId, TIAUpdateConnectionMethod::EConnectionMethodTypeDefault );
+
+               iController->SetDefaultConnectionMethodL( connectionMethod );*/
+               }
+           
+
+
+           IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() end");
+        }
+    else
+        {
+        // from grid, use the old logic
+        IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() begin");
+                  TUint32 connectionMethodId( 0 );
+                  TInt connMethodId( 0 );
+
+                  // Set initial value to always ask
+                  TInt connectionMethodType( TIAUpdateConnectionMethod::EConnectionMethodTypeAlwaysAsk );
+                  TBool needSaving(EFalse);
+
+                  // Let's first check whether cenrep contains SNAP id other than zero
+                  CRepository* cenrep( CRepository::NewLC( KCRUidIAUpdateSettings ) );
+                  User::LeaveIfError(  
+                      cenrep->Get( KIAUpdateAccessPoint, connMethodId ) );
+                  CleanupStack::PopAndDestroy( cenrep ); 
+                  cenrep = NULL;
+                    
+                  if ( connMethodId == -1 )
+                      {
+                      IAUPDATE_TRACE("[IAUPDATE] user chooses default connection, use IAP logic");
+                                            
+                      connectionMethodId = 0;
+                      connectionMethodType = TIAUpdateConnectionMethod::EConnectionMethodTypeDefault;
+                      }
+                  else if ( connMethodId == 0 )
+                      {
+                      
+                      IAUPDATE_TRACE("[IAUPDATE] use chooses nothing, use internal IAP logic");
+                      //if nothing is set by user, use our new logic
+                      //SetDefaultConnectionMethod2L();
+                      //return;
+                      // CenRep didn't contain any SNAP id. Let's try Internet SNAP then.
+                          
+                      RCmManagerExt cmManagerExt;
+                      cmManagerExt.OpenL();
+                      CleanupClosePushL( cmManagerExt );
+                      iDestIdArray.Reset();
+                      cmManagerExt.AllDestinationsL( iDestIdArray );
+
+                      for ( TInt i = 0; i< iDestIdArray.Count(); i++ )
+                          {
+                          RCmDestinationExt dest = cmManagerExt.DestinationL( iDestIdArray[i] );
+                          CleanupClosePushL( dest );
+                           
+                          if ( dest.MetadataL( CMManager::ESnapMetadataInternet ) )
+                              {
+                              // Check whether Internet SNAP contains any IAP.
+                              if ( dest.ConnectionMethodCount() > 0 )
+                                  {
+                                  connectionMethodId = iDestIdArray[i];
+                                  needSaving = ETrue;
+                                  IAUPDATE_TRACE_1("[IAUPDATE] connectionMethodId: %d", connectionMethodId );
+                                  }
+                              CleanupStack::PopAndDestroy( &dest ); 
+                              break;
+                              }
+                               
+                          CleanupStack::PopAndDestroy( &dest ); 
+                          }
+                      iDestIdArray.Reset();
+                      CleanupStack::PopAndDestroy( &cmManagerExt ); 
+                      }
+                  else
+                      {
+                      IAUPDATE_TRACE("[IAUPDATE] use chooses a snap");
+                      // It was some SNAP value
+                      connectionMethodId = connMethodId;
+                      }
+                  
+                  if ( connectionMethodId > 0)
+                      {
+                      // We have now some valid SNAP id, either from CenRep or Internet SNAP
+                      connectionMethodType = TIAUpdateConnectionMethod::EConnectionMethodTypeDestination;
+                      // Save to cenrep if needed
+                      if ( needSaving )
+                          {
+                          cenrep = CRepository::NewLC( KCRUidIAUpdateSettings );
+                          TInt err = cenrep->StartTransaction( CRepository::EReadWriteTransaction );
+                          User::LeaveIfError( err );
+                          cenrep->CleanupCancelTransactionPushL();
+                          
+                          connMethodId = connectionMethodId;
+                          err = cenrep->Set( KIAUpdateAccessPoint, connMethodId );
+                          User::LeaveIfError( err );
+                          TUint32 ignore = KErrNone;
+                          User::LeaveIfError( cenrep->CommitTransaction( ignore ) );
+                          CleanupStack::PopAndDestroy(); // CleanupCancelTransactionPushL()
+                          CleanupStack::PopAndDestroy( cenrep );            
+                          }
+                      }
+
+                  TIAUpdateConnectionMethod connectionMethod( 
+                      connectionMethodId, 
+                      static_cast< TIAUpdateConnectionMethod::TConnectionMethodType >( connectionMethodType ) );
+
+                  iController->SetDefaultConnectionMethodL( connectionMethod );
+
+                  IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() end");
+        }
+
+    }
+
+
+// ---------------------------------------------------------------------------
+// IAUpdateEngine::GetBestIAPInAllSNAPsL
+// Sets the best IAP from all snaps
+// ---------------------------------------------------------------------------
+//
+TUint32 IAUpdateEngine::GetBestIAPInAllSNAPsL( RCmManagerExt& aCmManagerExt  )
+    { 
+    //go with internet SNAP first.
+    TUint32 IAPID = 0;
+    IAPID = GetBestIAPInInternetSNAPL( aCmManagerExt );
+    
+    if ( IAPID )
+        {
+        return IAPID;
+        }
+    
+    //select IAP from rest of the SNAPs
+    iDestIdArray.Reset();
+    aCmManagerExt.AllDestinationsL( iDestIdArray );
+    
+    for ( TInt i = 0; i< iDestIdArray.Count(); i++ )
+        {
+        TUint32 SNAPID = iDestIdArray[i];                   
+        IAPID = GetBestIAPInThisSNAPL( aCmManagerExt, SNAPID );
+        if ( IAPID )
+            {
+            break;
+            }
+         }
+    iDestIdArray.Reset();
+    return IAPID;
+    }
+
+
+
+// ---------------------------------------------------------------------------
+// IAUpdateEngine::GetBestIAPInInternetSNAPL
+// Sets the best IAP from internet snap
+// ---------------------------------------------------------------------------
+//
+TUint32 IAUpdateEngine::GetBestIAPInInternetSNAPL( RCmManagerExt& aCmManagerExt  )
+    {
+    //select IAP from Internet SNAP
+    iDestIdArray.Reset();
+    aCmManagerExt.AllDestinationsL( iDestIdArray );
+    TUint32 InternetSNAPID = 0;
+    for ( TInt i = 0; i< iDestIdArray.Count(); i++ )
+        {
+        RCmDestinationExt dest = aCmManagerExt.DestinationL( iDestIdArray[i] );
+        CleanupClosePushL( dest );
+                                     
+        if ( dest.MetadataL( CMManager::ESnapMetadataInternet ) )
+            {
+            InternetSNAPID = iDestIdArray[i];
+            CleanupStack::PopAndDestroy( &dest ); 
+            break;
+            }                     
+         CleanupStack::PopAndDestroy( &dest ); 
+         }
+    iDestIdArray.Reset();
+    
+    return GetBestIAPInThisSNAPL( aCmManagerExt, InternetSNAPID );
+    }
+
+
+
+// ---------------------------------------------------------------------------
+// IAUpdateEngine::GetBestIAPInThisSNAPL
+// Sets the best IAP from the given snap
+// ---------------------------------------------------------------------------
+//
+TUint32 IAUpdateEngine::GetBestIAPInThisSNAPL( RCmManagerExt& aCmManagerExt, TUint32 aSNAPID  )
+    {
+    //get all usable IAPs
+    TConnMonIapInfoBuf iapInfo;
+    TRequestStatus status;
+                       
+    RConnectionMonitor connMon;
+    connMon.ConnectL();
+    CleanupClosePushL( connMon );
+    
+    connMon.GetPckgAttribute( EBearerIdAll, 0, KIapAvailability,iapInfo, status );
+    User::WaitForRequest( status );
+    User::LeaveIfError( status.Int() );
+    
+    CleanupStack::PopAndDestroy( &connMon ); 
+    
+    RCmDestinationExt dest = aCmManagerExt.DestinationL( aSNAPID );
+    CleanupClosePushL( dest );
+    
+    // Check whether the SNAP contains any IAP.
+    for  (TInt i = 0; i < dest.ConnectionMethodCount(); i++ )
+        {
+        RCmConnectionMethodExt cm =  dest.ConnectionMethodL( i );
+        CleanupClosePushL( cm );
+        
+        TUint32 iapid= cm.GetIntAttributeL( CMManager::ECmIapId );
+        
+        for ( TInt i = 0; i < iapInfo().iCount; i++ )
+            {
+            if ( iapInfo().iIap[i].iIapId == iapid )
+                {
+                CleanupStack::PopAndDestroy( 2 ); //cm & dest;
+                return iapid;
+                }
+            }    
+                                                                                 
+        CleanupStack::PopAndDestroy( &cm );
+        }
+    
+    CleanupStack::PopAndDestroy( &dest ); 
+    return 0;
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::ShowUpdateQueryL
+// 
+// -----------------------------------------------------------------------------
+//    
+void IAUpdateEngine::ShowUpdateQueryL()
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() begin");
+    CIAUpdateQueryHistory* updateQueryHistory = CIAUpdateQueryHistory::NewL();
+    // Get the delay information from the controller that has read it from
+    // the config file.
+    updateQueryHistory->SetDelay( iController->ConfigData().QueryHistoryDelayHours() );
+    CleanupStack::PushL( updateQueryHistory );
+    if ( !updateQueryHistory->IsDelayedL( iUpdatequeryUid ) )
+        {
+        if ( ClientInBackgroundL() )
+            {
+            iEikEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNormal );
+            }
+        else
+            {
+            iEikEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );    
+            }
+ 
+        HbMessageBox messageBox(HbMessageBox::MessageTypeQuestion); 
+        messageBox.setText(QString("Application update is available from Nokia. Update?"));
+        HbAction nowAction("Now");
+        HbAction laterAction("Later");
+        messageBox.setPrimaryAction(&nowAction);
+        messageBox.setSecondaryAction(&laterAction);
+        messageBox.setTimeout(HbPopup::NoTimeout);
+        messageBox.show();
+        HbAction *selectedAction = messageBox.exec();
+        
+        if (selectedAction == messageBox.primaryAction())
+            {
+            IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() Now");
+            iUpdateNow = ETrue;
+            }
+        else if (selectedAction == messageBox.secondaryAction())
+            {
+            IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() Later");
+            updateQueryHistory->SetTimeL( iUpdatequeryUid );
+            }
+        }
+    CleanupStack::PopAndDestroy( updateQueryHistory );
+    InformRequestObserver( KErrNone );  
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() end");
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::HideApplicationInFSWL
+// 
+// -----------------------------------------------------------------------------
+//  
+void IAUpdateEngine::HideApplicationInFSWL( TBool aHide ) const
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HideApplicationInFSW() begin");
+    IAUPDATE_TRACE_1("[IAUPDATE] hide: %d", aHide );
+    TInt id = iEikEnv->RootWin().Identifier();
+
+    CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC( 
+            iEikEnv->WsSession(), id );
+    
+    wgName->SetHidden( aHide );
+    wgName->SetWindowGroupName( iEikEnv->RootWin() );    
+    CleanupStack::PopAndDestroy( wgName ); 
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HideApplicationInFSW() end");
+    }
+
+// ---------------------------------------------------------------------------
+// IAUpdateEngine::UpdateQueryCallbackL
+// ---------------------------------------------------------------------------
+//
+TInt IAUpdateEngine::UpdateQueryCallbackL( TAny* aPtr )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateQueryCallbackL() begin");
+    IAUpdateEngine* engine = static_cast<IAUpdateEngine*>( aPtr ); 
+    //TRAPD( err, engine->ShowUpdateQueryL() );
+    TRAP_IGNORE( engine->ShowUpdateQueryL() );
+    //if ( err != KErrNone )
+    //    {
+    //    appUI->HandleLeaveErrorL( err );
+    //    }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateQueryCallbackL() end");
+    return KErrNone;
+    }    
+
+
+
+
+
--- a/iaupdate/IAD/ui/src/iaupdatefwdetailsdialog.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,264 +0,0 @@
-/*
-* Copyright (c) 2008-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 "iaupdatefwdetailsdialog.h"
-#include "iaupdatedialogutil.h"
-#include "iaupdatebasenode.h"
-#include "iaupdatefwnode.h"
-#include "iaupdatedebug.h"
-#include <iaupdate.rsg>
-
-#include <aknmessagequerydialog.h>      // CAknMessageQueryDialog
-
-#include <StringLoader.h>
-
-// CONSTANTS
-const TInt KKiloByte = 1024;
-const TInt KMegaByte = 1024 * 1024;
-const TInt KMaxShownInKiloBytes = 10 * KMegaByte;
-
-_LIT( KSpace, " ");
-
-
-/*******************************************************************************
- * class CIAUpdateDetailsDialog
- *******************************************************************************/
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateDetailsDialog::ShowDialogL
-// 
-// -----------------------------------------------------------------------------
-TBool CIAUpdateFwDetailsDialog::ShowDialogL( MIAUpdateFwNode* aFwNode )
-	{
-	CIAUpdateFwDetailsDialog* dialog = CIAUpdateFwDetailsDialog::NewL( aFwNode );
-	CleanupStack::PushL( dialog );
-
-	dialog->ShowDialogL();
-
-	CleanupStack::PopAndDestroy( dialog );
-    
-    return ETrue;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFwDetailsDialog::NewL
-//
-// -----------------------------------------------------------------------------
-CIAUpdateFwDetailsDialog* CIAUpdateFwDetailsDialog::NewL( MIAUpdateFwNode* aFwNode )
-    {
-    CIAUpdateFwDetailsDialog* self = new ( ELeave ) CIAUpdateFwDetailsDialog( aFwNode );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFwDetailsDialog::CIAUpdateFwDetailsDialog
-// 
-// -----------------------------------------------------------------------------
-//
-CIAUpdateFwDetailsDialog::CIAUpdateFwDetailsDialog( MIAUpdateFwNode* aFwNode )
-	{
-	iFwNode = aFwNode;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFwDetailsDialog::ConstructL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFwDetailsDialog::ConstructL()
-    {
-    TInt size = BufferSize();
- 	iBuf = HBufC::NewL( size );
-    } 
-
-
-
-// ----------------------------------------------------------------------------
-// Destructor
-//
-// ----------------------------------------------------------------------------
-//
-CIAUpdateFwDetailsDialog::~CIAUpdateFwDetailsDialog()
-    {
-    delete iBuf;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFwDetailsDialog::BufferSize
-//
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateFwDetailsDialog::BufferSize()
-    {
-    const TInt KExtraSize = 512;
-    
-    TPtrC ptr1 = iFwNode->Base().Name();
-    TPtrC ptr2 = iFwNode->Base().Description();
-    
-    TInt len = ptr1.Length() + ptr2.Length() + KExtraSize;
-    
-    return len;
-    } 
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFwDetailsDialog::ConstructTextL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFwDetailsDialog::ConstructTextL()
-    {
-    _LIT(KNewLine, "\n");
-
-    TPtr ptr = iBuf->Des();
- 
-    TInt contentSize =   iFwNode->Base().ContentSizeL();
-     
-    HBufC* hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_APP_NAME );
-    ptr.Append( KOpeningBoldTag );
-    ptr.Append( *hBuf );
-    ptr.Append( KClosingBoldTag );
-    CleanupStack::PopAndDestroy( hBuf );
-    
-    HBufC* firmwareHeader = StringLoader::LoadLC(R_IAUPDATE_MAIN_DEVICE_FW);
-    HBufC* firmwarename = HBufC::NewLC( iFwNode->Base().Name().Length() +
-                                        KSpace.iTypeLength + 
-                                        firmwareHeader->Length() );
-    firmwarename->Des() = iFwNode->Base().Name();
-    firmwarename->Des() += KSpace();
-    firmwarename->Des() += *firmwareHeader;
-     
-    ptr.Append( KNewLine );
-    ptr.Append( *firmwarename );
-    CleanupStack::PopAndDestroy( firmwarename );
-    CleanupStack::PopAndDestroy( firmwareHeader );
-    ptr.Append( KNewLine );
-    ptr.Append( KNewLine );
-  
-    
-    hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_DESCRIPTION );
-    ptr.Append( KOpeningBoldTag );
-    ptr.Append( *hBuf );
-    ptr.Append( KClosingBoldTag );
-    CleanupStack::PopAndDestroy( hBuf );
-    
-    
-    HBufC* description = StringLoader::LoadLC( R_IAUPDATE_FW_DESCRIPTION );
-    ptr.Append( KNewLine );
-    ptr.Append( *description );
-    ptr.Append( KNewLine );
-    ptr.Append( KNewLine );
-    CleanupStack::PopAndDestroy( description );
-    
-    if ( iFwNode->FwVersion1().Length() > 0 )
-        { 
-        hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_VERSION );        
-        ptr.Append( KOpeningBoldTag );
-        ptr.Append( *hBuf );
-        ptr.Append( KClosingBoldTag );
-        CleanupStack::PopAndDestroy( hBuf );
-
-        ptr.Append( KNewLine );
-        ptr.Append( iFwNode->FwVersion1() );
-        ptr.Append( KNewLine );
-        ptr.Append( KNewLine );
-        }
-    
-    
-    if( contentSize > 0 && (iFwNode->FwType() == MIAUpdateFwNode::EFotaDp2) )
-        {
-        hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_FILE_SIZE );
-        ptr.Append( KOpeningBoldTag );
-        ptr.Append( *hBuf );
-        ptr.Append( KClosingBoldTag );
-        CleanupStack::PopAndDestroy( hBuf );
-        
-        ptr.Append( KNewLine );
-        
-        hBuf = FileSizeTextLC( contentSize );
-
-        ptr.Append( *hBuf );
-        CleanupStack::PopAndDestroy( hBuf );
-        }
-   
-    } 
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFwDetailsDialog::ShowDialogL
-// 
-// -----------------------------------------------------------------------------
-TBool CIAUpdateFwDetailsDialog::ShowDialogL()
-	{
-	ConstructTextL();
-	HBufC* hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_TITLE );
-	IAUpdateDialogUtil::ShowMessageQueryL( *hBuf, *iBuf );
-	CleanupStack::PopAndDestroy( hBuf );
-    return ETrue;
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFwDetailsDialog::FileSizeTextLC
-// 
-// -----------------------------------------------------------------------------
-//
-HBufC* CIAUpdateFwDetailsDialog::FileSizeTextLC( TInt aFileSize )
-	{
-    TInt resourceId = 0;
-	TInt size = 0;
-	
-	if ( aFileSize >= KMaxShownInKiloBytes )
-	    {
-	    resourceId = R_IAUPDATE_DETAILS_DIALOG_SIZE_MEGABYTE;
-	    size = aFileSize / KMegaByte;
-   	    if ( aFileSize % KMegaByte != 0 )
-	        {
-	        size++;
-	        }
-	    }
-	else
-	    {
-	    resourceId = R_IAUPDATE_DETAILS_DIALOG_SIZE_KILOBYTE;
-	    size = aFileSize / KKiloByte;
-   	    if ( aFileSize % KKiloByte != 0 )
-	        {
-	        size++;
-	        }	
-	    }
-	    
-	HBufC* sizeAsString = StringLoader::LoadLC( resourceId, size );
-	TPtr ptr = sizeAsString->Des();
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); 
-    return sizeAsString;
-	}
-
-
-   
-//  End of File  
--- a/iaupdate/IAD/ui/src/iaupdatehistorycontainer.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,504 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 module contains the implementation of 
-*                CIAUpdateHistoryContainer class member functions.
-*
-*/
-
-
-
-
-#include <coemain.h>
-#include <aknlists.h> // For the listbox
-#include <barsread.h> // TResourceReader
-#include <avkon.mbg>
-#include <AknIconArray.h> 
-#include <gulicon.h>
-#include <AknsUtils.h>
-#include <StringLoader.h> 
-#include <e32std.h>
-#include <data_caging_path_literals.hrh>
-#include <iaupdate.rsg>
-#include <iaupdate.mbg>
-
-#include "iaupdatehistorycontainer.h"
-#include "iaupdatehistory.h"
-#include "iaupdatehistoryitem.h"
-#include "iaupdateutils.h"
-
-
-// MACROS
-_LIT(KIAUpdateIconFileName, "IAUpdate.mif");
-// Format for TTime
-// See: C++ API reference » Date and Time Handling » Using TTime 
-_LIT( KDateFormat, "%*D%*M%Y%/0%4%/1%5" );
-_LIT( KTimeFormat, "%-B%:0%J%:1%T%+B" );
-_LIT( KIconIndexFormat, "%d" );
-_LIT( KTabulator, "\t" );
-
-//CONSTANTS
-// Item list granularity
-const TInt KListGranularity( 8 );
-// There will be two images. One for error and for success.
-const TInt KListIconGranularity( 2 );
-const TInt KTimeLength( 48 );
-// Icon index length is always one because an index is either zero or one
-const TInt iconIndexLength( 1 );
-
-// -----------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateHistoryContainer* CIAUpdateHistoryContainer::NewL( const TRect& aRect )
-    {
-    CIAUpdateHistoryContainer* self = 
-        CIAUpdateHistoryContainer::NewLC( aRect );
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::NewLC
-// 
-// -----------------------------------------------------------------------------
-//
-CIAUpdateHistoryContainer* CIAUpdateHistoryContainer::NewLC( const TRect& aRect )
-    {
-    CIAUpdateHistoryContainer* self = 
-        new (ELeave) CIAUpdateHistoryContainer();
-    CleanupStack::PushL( self );
-    self->ConstructL( aRect );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::CIAUpdateHistoryContainer
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateHistoryContainer::CIAUpdateHistoryContainer() 
-: CCoeControl()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::~CIAUpdateHistoryContainer
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CIAUpdateHistoryContainer::~CIAUpdateHistoryContainer()
-    {
-    delete iListBox;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateHistoryContainer::ConstructL( const TRect& aRect )
-    {
-    // Create a window for this application view
-    CreateWindowL();
-
-    // Create list box
-    iListBox = new( ELeave ) CAknDoubleGraphicStyleListBox();
-    iListBox->SetContainerWindowL( *this );
-    
-    TResourceReader reader;
-    // Inserts reader into the cleanupstack.
-    iEikonEnv->CreateResourceReaderLC( reader, R_IAUPDATE_HISTORY_LIST );
-    iListBox->ConstructFromResourceL( reader );
-    CleanupStack::PopAndDestroy();
-
-    iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
-
-    // Setup scroll bars
-    iListBox->CreateScrollBarFrameL( ETrue );
-    iListBox->
-        ScrollBarFrame()->
-            SetScrollBarVisibilityL( 
-                CEikScrollBarFrame::EOff, 
-                CEikScrollBarFrame::EOff );    
-    // Create item text array
-    iItemTextArray = new( ELeave ) CDesCArrayFlat( KListGranularity );    
-    iListBox->Model()->SetItemTextArray( iItemTextArray );
-    // Ownership of the array is transferred.
-    iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
-        
-    HBufC* text = StringLoader::LoadLC( R_IAUPDATE_NO_UPDATES_DONE );    
-    iListBox->View()->SetListEmptyTextL( *text );
-    CleanupStack::PopAndDestroy( text );
-
-    // Create icon array
-    
-    CFbsBitmap* bitmap( NULL );
-    CFbsBitmap* mask( NULL );
-
-    CArrayPtr<CGulIcon>* iconArray = 
-        new( ELeave ) CAknIconArray( KListIconGranularity );    
-    CleanupStack::PushL( iconArray );
-    
-    HBufC* iconFilePath = HBufC::NewLC( KDC_APP_BITMAP_DIR().Length() + 
-                                        KIAUpdateIconFileName().Length() );
-    TPtr ptr = iconFilePath->Des();
-    ptr.Append( KDC_APP_BITMAP_DIR );
-    ptr.Append( KIAUpdateIconFileName );
-    
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    
-        
-    // This method puts both aBitmap and aMask in the cleanup stack.
-    AknsUtils::CreateIconLC(
-        skin,
-        KAknsIIDQgnPropCaleAccepted,
-        bitmap, 
-        mask, 
-        *iconFilePath, 
-        EMbmIaupdateQgn_prop_cale_accepted, 
-        EMbmIaupdateQgn_prop_cale_accepted_mask );
-    CGulIcon* icon = CGulIcon::NewLC();
-    icon->SetBitmap( bitmap );
-    icon->SetMask( mask );
-    icon->SetBitmapsOwnedExternally( EFalse );
-    iconArray->AppendL( icon );
-    CleanupStack::Pop( icon );
-    CleanupStack::Pop( mask );
-    CleanupStack::Pop( bitmap );
-
-    // This method puts both aBitmap and aMask in the cleanup stack.
-    AknsUtils::CreateIconLC(
-        skin,
-        KAknsIIDQgnPropSwupdFailed,
-        bitmap, 
-        mask, 
-        *iconFilePath, 
-        EMbmIaupdateQgn_prop_swupd_failed, 
-        EMbmIaupdateQgn_prop_swupd_failed_mask);
-    icon = CGulIcon::NewLC();
-    icon->SetBitmap( bitmap );
-    icon->SetMask( mask );
-    icon->SetBitmapsOwnedExternally( EFalse );
-    iconArray->AppendL( icon );
-    CleanupStack::Pop( icon );
-    CleanupStack::Pop( mask );
-    CleanupStack::Pop( bitmap );
-    
-    CleanupStack::PopAndDestroy( iconFilePath );    
-    CleanupStack::Pop( iconArray );
-    iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconArray );
-
-    // Set the windows size
-    SetRect( aRect );
-
-    // Activate the window, which makes it ready to be drawn
-    ActivateL();
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::RefreshL
-// 
-// -----------------------------------------------------------------------------
-//    
-void CIAUpdateHistoryContainer::RefreshL( MIAUpdateHistory& aHistory )
-    {
-    iItemTextArray->Reset();
-    
-    MIAUpdateHistoryItem* item( NULL ); 
-    const RPointerArray< MIAUpdateHistoryItem >& items =
-        aHistory.Items();
-    TInt iconIndex( 0 );
-    for( TInt i = 0; i < items.Count(); ++i ) 
-        {
-        item = items[i];                
-        iconIndex = 0;
-        if ( item->LastOperationErrorCode() != KErrNone
-             || item->StateL() != MIAUpdateHistoryItem::EInstalled )
-            {
-            // If there was an error in the last operation
-            // or if the node has not been installed, 
-            // then use the second icon that is for
-            // error situations.
-            iconIndex = 1;
-            }
-        HBufC* nodeStateDescription = NodeStateDescriptionLC( *item );
-        TPtr ptr = nodeStateDescription->Des();
-        AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); 
- 
-        HBufC* name = item->Name().AllocLC();
-        TBuf<iconIndexLength> iconIndexBuf;
-        iconIndexBuf.Format( KIconIndexFormat, iconIndex );
-
-        HBufC* buffer = HBufC::NewLC( iconIndexBuf.Length() +
-                                      KTabulator.iTypeLength + 
-                                      name->Length() + 
-                                      KTabulator.iTypeLength +
-                                      nodeStateDescription->Length() );  
-
-        buffer->Des() = iconIndexBuf;
-        buffer->Des() += KTabulator();
-        buffer->Des() += *name;
-        buffer->Des() += KTabulator();
-        buffer->Des() += *nodeStateDescription;        
-         
-        iItemTextArray->AppendL( *buffer );
-                 
-        CleanupStack::PopAndDestroy( buffer );
-        CleanupStack::PopAndDestroy( name );
-        CleanupStack::PopAndDestroy( nodeStateDescription );
-        }    
-    
-    if ( items.Count() > 0 )
-        {
-    	iListBox->
-        ScrollBarFrame()->
-            SetScrollBarVisibilityL( 
-                CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto ); 
-        }
-    else
-        {
-        iListBox->
-        ScrollBarFrame()->
-            SetScrollBarVisibilityL( 
-                CEikScrollBarFrame::EOff,CEikScrollBarFrame::EOff );	
-        }     
-    iListBox->HandleItemAdditionL();        
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::OfferKeyEventL
-// 
-// -----------------------------------------------------------------------------
-//
-TKeyResponse CIAUpdateHistoryContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                                        TEventCode aType )
-    {
-    TKeyResponse response = EKeyWasNotConsumed;    
-
-    if( aType == EEventKey )
-        {
-        switch( aKeyEvent.iCode )
-            {
-            // Up and down arrow actions are delegated to the listbox
-            case EKeyUpArrow:
-            case EKeyDownArrow:
-                response = iListBox->OfferKeyEventL( aKeyEvent, aType );        
-                break;
-                
-            case EKeyOK:
-                // Nothing to do here
-                break;
-                
-            default:
-                // Nothing to do here
-                break;
-            }
-        }
-
-    return response;        
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::SizeChanged
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateHistoryContainer::SizeChanged()
-    {
-    iListBox->SetRect( Rect() );
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::CountComponentControls
-// 
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateHistoryContainer::CountComponentControls() const
-    {
-    return 1;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::ComponentControl
-// 
-// -----------------------------------------------------------------------------
-//
-CCoeControl* CIAUpdateHistoryContainer::ComponentControl( TInt aIndex ) const
-    {
-    CCoeControl* control( NULL );
-
-    switch( aIndex )
-        {
-        case 0:
-            control = iListBox;
-            break;
-            
-        default:
-            break;
-        }
-
-    return control;
-    }
-    
-    
-// ---------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::HandleResourceChange
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateHistoryContainer::HandleResourceChange( TInt aType )
-    {
-	CCoeControl::HandleResourceChange( aType );
-
-    if ( aType == KEikDynamicLayoutVariantSwitch ) //Handle change in layout orientation
-        {
-        TRect mainPaneRect;
-        AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
-        SetRect( mainPaneRect );
-		DrawNow();
-		}
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateHistoryContainer::NodeStateDescriptionLC
-// 
-// -----------------------------------------------------------------------------
-//
-HBufC* CIAUpdateHistoryContainer::NodeStateDescriptionLC( const MIAUpdateHistoryItem& aItem )
-    {
-    HBufC* stateDescription( NULL );
-
-    MIAUpdateHistoryItem::TIAHistoryItemState state( aItem.StateL() );
-    TInt errorCode( aItem.LastOperationErrorCode() );
-
-    HBufC* timeDes = HBufC::NewLC( KTimeLength );
-    TPtr tmpDes = timeDes->Des();
-    
-    // Get the current local time
-    TTime currentTime( 0 );
-    currentTime.HomeTime();
-
-    TTime lastOperationTime = aItem.LastOperationTime();
-    // Get the local time from the unviversal time.
-    TLocale locale;
-    lastOperationTime += locale.UniversalTimeOffset();
-    
-    if ( lastOperationTime - locale.UniversalTimeOffset() == 0 )
-        {
-        // Because the origianal universal operation time was zero, the given time
-        // is not correct. Set the time string empty. So, we will not give wrong information.
-        tmpDes.Copy( KNullDesC() );
-        }
-    else if ( currentTime.DayNoInYear() != lastOperationTime.DayNoInYear()
-         || currentTime.DaysFrom( lastOperationTime ).Int() > 0 )
-        {
-        // Day has changed.
-        // Just to be sure, other checking is done because year may have also changed.
-        lastOperationTime.FormatL( tmpDes, KDateFormat() );       
-        }
-    else
-        {
-        // Same day
-        lastOperationTime.FormatL( tmpDes, KTimeFormat() );       
-        }      
-    
-    if ( errorCode == KErrNoMemory )
-        {
-        // Last operation could not be completed because we were out of memory.
-        // Show this error text.
-        stateDescription = StringLoader::LoadLC( R_IAUPDATE_TEXT_UPDATE_NO_MEMORY,
-                                                 *timeDes ); 
-        }
-    else 
-        {
-        switch( state )
-            {
-            case MIAUpdateHistoryItem::EInstalled:
-                if ( errorCode == KErrNone )
-                    {
-                    // Because item is installed successfully, everything has gone ok.
-                    stateDescription = StringLoader::LoadLC( R_IAUPDATE_TEXT_UPDATE_SUCCESSFULL,
-                                                             *timeDes );                    
-                    }
-                else if ( errorCode == KErrCancel )
-                    {
-                    // For some reason, the state says that an item has been installed,
-                    // but the error code is cancel. In this case, trust the error code.
-                    stateDescription = StringLoader::LoadLC( R_IAUPDATE_TEXT_INSTALL_CANCELLED,
-                                                             *timeDes );
-                    }
-                else
-                    {
-                    // If everything goes ok, then the item should be installed.
-                    // So, something has gone wrong because we are here. So,
-                    // give the install failed message
-                    stateDescription = StringLoader::LoadLC( R_IAUPDATE_TEXT_INSTALL_FAILED,
-                                                             *timeDes );
-                    }                
-                break;
-
-            case MIAUpdateHistoryItem::EDownloaded:
-                if ( errorCode == KErrCancel )
-                    {
-                    // Because item has been downloaded but the error code is cancel
-                    // this means that the install has been cancelled
-                    stateDescription = StringLoader::LoadLC( R_IAUPDATE_TEXT_INSTALL_CANCELLED,
-                                                             *timeDes );
-                    }
-                else
-                    {
-                    // If everything goes ok, then the item should be installed.
-                    // So, something has gone wrong because we are here. So,
-                    // give the install failed message
-                    stateDescription = StringLoader::LoadLC( R_IAUPDATE_TEXT_INSTALL_FAILED,
-                                                             *timeDes );
-                    }
-                break;
-
-            case MIAUpdateHistoryItem::EPurchased:
-                if ( errorCode == KErrCancel )
-                    {
-                    // Because item has been purchased but the error code is cancel
-                    // this means that the download has been cancelled
-                    stateDescription = StringLoader::LoadLC( R_IAUPDATE_TEXT_DOWNLOAD_CANCELLED,
-                                                             *timeDes );
-                    }
-                else
-                    {
-                    // If everything goes ok, then the item should be installed.
-                    // So, something has gone wrong because we are here. So,
-                    // give the download failed message
-                    stateDescription = StringLoader::LoadLC( R_IAUPDATE_TEXT_DOWNLOAD_FAILED,
-                                                             *timeDes );
-                    }
-                break;
-                                
-            default:
-                // We should never come here.
-                stateDescription = KNullDesC().AllocLC();
-                break;
-            }        
-        }
-   
-    CleanupStack::Pop( stateDescription );
-    CleanupStack::PopAndDestroy( timeDes );
-    CleanupStack::PushL( stateDescription );
-         
-    return stateDescription;
-    }
-
-
--- a/iaupdate/IAD/ui/src/iaupdatehistoryview.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatehistoryview.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -11,170 +11,19 @@
 *
 * Contributors:
 *
-* Description:   This module contains the implementation of CIAUpdateHistoryView 
-*                class  member functions.
+* Description:   This module contains the implementation of IAUpdateHistoryView
+*                class member functions.
 *
 */
 
 
-
-#include <aknViewAppUi.h> 
-#include <eikmenup.h> 
-#include <eikspane.h> 
-#include <akntitle.h> 
-#include <akncontext.h>
-#include <StringLoader.h> 
-#include <iaupdate.rsg>
-
 #include "iaupdatehistoryview.h"
-#include "iaupdatehistorycontainer.h"
-#include "iaupdatehistory.h"
-#include "iaupdateappui.h"
-#include "iaupdate.hrh"
-
 
-// Standard construction sequence
-CIAUpdateHistoryView* CIAUpdateHistoryView::NewL( MIAUpdateHistory& aHistory )
-    {
-    CIAUpdateHistoryView* self = 
-        CIAUpdateHistoryView::NewLC( aHistory );
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-CIAUpdateHistoryView* CIAUpdateHistoryView::NewLC( MIAUpdateHistory& aHistory )
-    {
-    CIAUpdateHistoryView* self = 
-        new( ELeave ) CIAUpdateHistoryView( aHistory );
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-    }
-
-CIAUpdateHistoryView::CIAUpdateHistoryView( MIAUpdateHistory& aHistory ) 
-: CAknView(),
-  iHistory( aHistory )
+IAUpdateHistoryView::IAUpdateHistoryView()
     {
-	// no implementation required
-    }
-
-CIAUpdateHistoryView::~CIAUpdateHistoryView()
-    {
-    delete iContainer;
-    }
-
-void CIAUpdateHistoryView::ConstructL()
-    {
-    // Initializes the view with the given resources
-    BaseConstructL( R_IAUPDATE_HISTORY_VIEW );
-    }
-
-    
-void  CIAUpdateHistoryView::RefreshL()
-    {
-    if( !iContainer )
-        {    
-        // Create the container if it does not already exist.
-        // Also, add it to the app ui control stack 
-        iContainer = CIAUpdateHistoryContainer::NewL( ClientRect() );
-        AppUi()->AddToStackL( iContainer );
-        }
-
-    UpdateStatusPaneL();
-
-    // Container does the actual refreshing by using the current history
-    // information.
-    // Also, refresh the history first, because it may have changed since
-    // last time.
-    History().RefreshL();
-    iContainer->RefreshL( History() );
-    }
-
-    
-TUid CIAUpdateHistoryView::Id() const
-    {
-    return TUid::Uid( EIAUpdateHistoryViewId );
+    // Create the view from DocML
     }
 
-
-void CIAUpdateHistoryView::HandleCommandL( TInt aCommand )
-    {
-    switch( aCommand ) 
-        {
-        // All the exit type of softkey commands will be interpret as
-        // the exit from the history view.
-        case EAknSoftkeyBack:
-        case EAknSoftkeyExit:
-        case EAknSoftkeyClose:
-            aCommand = EIAUpdateCmdHistoryViewExit; 
-            break;
-            
-        default:
-            break;
-        }
-
-    // Let the app ui handle all the commands
-    AppUi()->HandleCommandL( aCommand );
-    }
-    
-    
-void  CIAUpdateHistoryView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, 
-                                         TUid /*aCustomMessageId*/, 
-                                         const TDesC8& /*aCustomMessage*/ )
-    {
-    // Refresh everything.
-    RefreshL();
-    }
-
-void CIAUpdateHistoryView::DoDeactivate()
+IAUpdateHistoryView::~IAUpdateHistoryView()
     {
-    if ( iContainer )
-        {
-        // Remove container from the control stack and delete
-        // the container.
-        AppUi()->RemoveFromStack( iContainer );
-        delete iContainer;
-        iContainer = NULL;
-        }
-    if ( static_cast<CIAUpdateAppUi*>(AppUi())->ShowStatusDialogAgain() )
-        {
-    	TRAP_IGNORE( static_cast<CIAUpdateAppUi*>(AppUi())->ShowStatusDialogDeferredL() );
-        }
     }
-
-
-MIAUpdateHistory& CIAUpdateHistoryView::History() const
-    {
-    return iHistory;
-    }
-
-
-void CIAUpdateHistoryView::UpdateStatusPaneL()
-    {
-    // Also update title pane text
-    // Gets a pointer to the status pane. 
-    // Notice, that the ownership is not transferred here.
-    CEikStatusPane* statusPane = 
-                 static_cast< CAknAppUi* >( AppUi() )->StatusPane();
-          
-    // Check if title pane is in current layout.
-    TBool isTitlePaneInLayout( 
-        statusPane->
-            PaneCapabilities( 
-                TUid::Uid( EEikStatusPaneUidTitle ) ).
-                    IsInCurrentLayout() );
-
-    // Change title text if title pane is in the curent layout.
-    if ( isTitlePaneInLayout )
-        {
-        // Fetch pointer to the title pane control. Notice, that the ownership is not
-        // transferred here.
-        CAknTitlePane* titlePane = 
-            static_cast< CAknTitlePane* >( statusPane->ControlL(
-                                           TUid::Uid( EEikStatusPaneUidTitle ) ) );
-        HBufC* text = StringLoader::LoadLC( R_IAUPDATE_TEXT_TITLE_PANE_HISTORY );
-        titlePane->SetTextL( *text );
-        CleanupStack::PopAndDestroy( text );        
-        }         
-    }
-    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/src/iaupdatemain.cpp	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* 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 module contains the implementation of main function
+*
+*/
+
+#include "iaupdateapplication.h"
+#include "iaupdatedebug.h"
+
+int main(int argc, char *argv[])
+{
+    IAUPDATE_TRACE("[IAUPDATE] main begin");
+    IAUpdateApplication app(argc, argv);
+    return app.exec();
+}
--- a/iaupdate/IAD/ui/src/iaupdatemaincontainer.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,762 +0,0 @@
-/*
-* Copyright (c) 2007-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 module contains the implementation of CIAUpdateMainContainer class 
-*                member functions.
-*
-*/
-
-
-
-//INCLUDES
-#include <barsread.h>
-#include <coemain.h>
-#include <aknlists.h>
-#include <badesca.h> // CDesCArray
-#include <iaupdate.rsg>
-#include <avkon.mbg>
-#include <iaupdate.mbg>
-#include <AknIconArray.h> 
-#include <gulicon.h>
-#include <StringLoader.h>
-#include <data_caging_path_literals.hrh>
-#include <e32property.h>
-#include <featmgr.h>
-
-#include "iaupdatefwnode.h"
-#include "iaupdatemaincontainer.h"
-#include "iaupdatecontainerobserver.h"
-#include "iaupdateapplication.h"
-#include "iaupdatenode.h"
-#include "iaupdatebasenode.h"
-#include "iaupdateversion.h"
-#include "iaupdatefwnsmlpskeys.h"
-
-//MACROS
-_LIT( KTabulator, "\t" );
-_LIT( KOne, "1");
-_LIT( KTwo, "2");
-_LIT( KSpace, " ");
-
-//CONSTANTS
-const TInt KKiloByte = 1024;
-const TInt KMegaByte = 1024 * 1024;
-const TInt KMaxShownInKiloBytes = 10 * KMegaByte;
-
-_LIT( KSWUPDATE_HLP_MAIN, "SWUPDATE_HLP_MAIN" ); 
-
-// MACROS
-_LIT(KIAUpdateIconFileName, "IAUpdate.mif");
-
-//CONST
-
-const TUid KFOTAUid = {0x102072C4};
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateMainContainer* CIAUpdateMainContainer::NewL( 
-                                         const TRect& aRect, 
-                                         MIAUpdateContainerObserver& aObserver )
-    {
-    CIAUpdateMainContainer* self = CIAUpdateMainContainer::NewLC(aRect,aObserver);
-    CleanupStack::Pop(self);
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::NewLC
-// 
-// -----------------------------------------------------------------------------
-//
-CIAUpdateMainContainer* CIAUpdateMainContainer::NewLC( 
-                                          const TRect& aRect, 
-                                          MIAUpdateContainerObserver& aObserver )
-    {
-    CIAUpdateMainContainer* self = new (ELeave) CIAUpdateMainContainer(aObserver);
-    CleanupStack::PushL(self);
-    self->ConstructL(aRect);
-    return self;
-    }
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::CIAUpdateMainContainer
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateMainContainer::CIAUpdateMainContainer(MIAUpdateContainerObserver& aObserver)
-    : iObserver( aObserver )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::~CIAUpdateMainContainer
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CIAUpdateMainContainer::~CIAUpdateMainContainer()
-    {
-	delete iListBox;
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateMainContainer::ConstructL(const TRect& aRect )
-    {
-    // Create a window for this application view
-    CreateWindowL();
-
-    // Create list box
-    iListBox = new (ELeave) CAknDoubleGraphicStyleListBox();
-    iListBox->SetContainerWindowL( *this );
-    
-    TResourceReader reader;
-    iEikonEnv->CreateResourceReaderLC( reader, R_IAUPDATE_UPDATES_LIST );
-    iListBox->ConstructFromResourceL( reader );
-    CleanupStack::PopAndDestroy();
-
-    iListBox->EnableStretching( EFalse );
-    iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
-
-    // Setup scroll bars
-    iListBox->CreateScrollBarFrameL( ETrue );
-    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( 
-        CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto );    
-
-    // Create item text array
-    iItemTextArray = new (ELeave) CDesCArrayFlat(2);    
-    iListBox->Model()->SetItemTextArray( iItemTextArray );
-    iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray) ;
-    
-    HBufC* text = KNullDesC().AllocLC();    
-    iListBox->View()->SetListEmptyTextL( *text );
-    CleanupStack::PopAndDestroy( text );
-   
-    // Create icon array
-    
-    CFbsBitmap* bitmap = 0;
-    CFbsBitmap* mask = 0;
-
-    CArrayPtr<CGulIcon>* iconArray = new (ELeave) CAknIconArray( 3 );    
-    CleanupStack::PushL( iconArray );
-    
-    AknIconUtils::CreateIconLC(
-        bitmap, 
-        mask, 
-        AknIconUtils::AvkonIconFileName(), 
-        EMbmAvkonQgn_prop_checkbox_on, 
-        EMbmAvkonQgn_prop_checkbox_on_mask );
-    CGulIcon* icon = CGulIcon::NewLC();
-    icon->SetBitmap( bitmap );
-    icon->SetMask( mask );
-    icon->SetBitmapsOwnedExternally( EFalse );
-    iconArray->AppendL( icon );
-    
-    CleanupStack::Pop( icon );
-    CleanupStack::Pop( mask );
-    CleanupStack::Pop( bitmap );
-
-    AknIconUtils::CreateIconLC(
-        bitmap, 
-        mask, 
-        AknIconUtils::AvkonIconFileName(), 
-        EMbmAvkonQgn_prop_checkbox_off, 
-        EMbmAvkonQgn_prop_checkbox_off_mask );
-    icon = CGulIcon::NewLC();
-    icon->SetBitmap( bitmap );
-    icon->SetMask( mask );
-    icon->SetBitmapsOwnedExternally( EFalse );
-    iconArray->AppendL( icon );
-    
-    CleanupStack::Pop( icon );
-    CleanupStack::Pop( mask );
-    CleanupStack::Pop( bitmap );
-    
-    HBufC* iconFilePath = HBufC::NewLC( KDC_APP_BITMAP_DIR().Length() + 
-                                        KIAUpdateIconFileName().Length() +2 );
-    TPtr ptr = iconFilePath->Des();
-    ptr.Append( KDC_APP_BITMAP_DIR );
-    ptr.Append( KIAUpdateIconFileName );
-          
-    TRAPD( err, CreateIconL( bitmap, 
-                             mask, 
-                             *iconFilePath, 
-                             EMbmIaupdateQgn_indi_important_add, 
-                             EMbmIaupdateQgn_indi_important_add_mask ) ); 
-    if ( err == KErrNone ) 
-        {
-        CleanupStack::PushL( bitmap );
-        CleanupStack::PushL( mask );
-        }
-    else if ( err == KErrEof )
-        {
-        // icon does not exist in Z drive. I.e IAD eclipsed over phase 1 version.
-        // So icon to be retrieved from C drive. 
-        ptr.Zero();
-    	ptr.Append( _L("C:") );
-    	ptr.Append( KDC_APP_BITMAP_DIR );
-        ptr.Append( KIAUpdateIconFileName );
-        AknIconUtils::CreateIconLC(
-                      bitmap, 
-                      mask, 
-                      *iconFilePath, 
-                      EMbmIaupdateQgn_indi_important_add, 
-                      EMbmIaupdateQgn_indi_important_add_mask );
-        }
-    else
-        {
-        User::Leave( err );	
-        }
-
-    icon = CGulIcon::NewLC();
-    icon->SetBitmap( bitmap );
-    icon->SetMask( mask );
-    icon->SetBitmapsOwnedExternally( EFalse );
-    iconArray->AppendL( icon );
-    
-    CleanupStack::Pop( icon );
-    CleanupStack::Pop( mask );
-    CleanupStack::Pop( bitmap );
-    CleanupStack::PopAndDestroy( iconFilePath );
-    
-    CleanupStack::Pop( iconArray ); 
-    iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconArray );
-
-    iListBox->SetListBoxObserver( this );
-    
-    // Set the windows size
-    SetRect( aRect );
-
-    // Activate the window, which makes it ready to be drawn
-    ActivateL();
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::HandleMarkCommandL
-// Handles Mark/Unmark commnds
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateMainContainer::HandleMarkCommandL( TInt aCommand )
-    {
-    TInt index = iListBox->CurrentItemIndex();
-       
-    TBool markingAccepted = EFalse;
-    if( !iListBox->View()->ItemIsSelected( index ) )                                                                                             
-        {
-        // aCommand is set to EAknCmdMark if current item is not selected.
-        // That's because passed command id may be wrong when using touch UI 
-        aCommand = EAknCmdMark;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
-        markingAccepted = iObserver.MarkListItemL( ETrue, index );
-        }
-    else 
-        {
-        // aCommand is set to EAknCmdUnmark if current item is selected.
-        // That's because passed command id may be wrong when using touch UI    
-        aCommand = EAknCmdUnmark;
-        markingAccepted = iObserver.MarkListItemL( EFalse, index ); 
-        }
-        
-	if ( markingAccepted )
-	    {
-        AknSelectionService::HandleMarkableListProcessCommandL( aCommand, iListBox );
-	    }
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::RefreshL
-// Refresh list
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateMainContainer::RefreshL( const RPointerArray<MIAUpdateAnyNode>& aNodes,
-                                       TInt aError )
-    {
-    iItemTextArray->Reset();
-        
-    for( TInt i = 0; i < aNodes.Count(); ++i ) 
-        {
-        MIAUpdateAnyNode* node = aNodes[i];
-        TInt sizeInBytes = node->Base().ContentSizeL();
-
-        TInt size = 0;
-        TBool shownInMegabytes = EFalse;        
-        if ( sizeInBytes >= KMaxShownInKiloBytes )
-            {
-    	    shownInMegabytes = ETrue;
-    	    size = sizeInBytes / KMegaByte;
-    	    if ( sizeInBytes % KMegaByte != 0 )
-    	        {
-    	    	size++;
-    	        }
-            }
-        else 
-            {
-    	    size = sizeInBytes / KKiloByte;
-    	    if ( sizeInBytes % KKiloByte != 0 )
-    	        {
-    	    	size++;
-    	        }  
-            }
-            
-        HBufC* importanceDescription( NULL );        
-        switch( node->Base().Importance() )
-        {        
-        case MIAUpdateBaseNode::EMandatory:
-            {
-            if ( shownInMegabytes )
-                {
-                importanceDescription = StringLoader::LoadLC(
-                                   R_IAUPDATE_DES_REQUIRED_UPDATE_MB, size );
-                }
-            else 
-                {
-                importanceDescription = StringLoader::LoadLC(
-                                   R_IAUPDATE_DES_REQUIRED_UPDATE_KB, size );   
-                }  
-            break;
-            }
-        
-        
-        case MIAUpdateBaseNode::ECritical:
-            {
-            TBool isNSU = EFalse;
-            if( node->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
-                {
-                MIAUpdateFwNode* fwnode = static_cast<MIAUpdateFwNode*>( node );          
-                if ( fwnode->FwType() == MIAUpdateFwNode::EFotiNsu )
-                    {
-                    isNSU = ETrue;
-                    }
-                }
-
-            if ( !size || isNSU )
-                {
-                //for firmware when size info is not provided by server
-                importanceDescription = StringLoader::LoadLC(
-                                                       R_IAUPDATE_DES_CRITICAL_UPDATE_NO_SIZE );
-                }
-            else
-                {
-                if ( shownInMegabytes )
-                    {
-                    importanceDescription = StringLoader::LoadLC(
-                                       R_IAUPDATE_DES_CRITICAL_UPDATE_MB, size );
-                    }
-                else 
-                    {
-                    importanceDescription = StringLoader::LoadLC(
-                                       R_IAUPDATE_DES_CRITICAL_UPDATE_KB, size );   
-                    } 
-                }
- 
-            break;
-            }
-    
-        case MIAUpdateBaseNode::ERecommended:
-            {
-            if ( shownInMegabytes )
-                {
-            	importanceDescription = StringLoader::LoadLC(
-            	                   R_IAUPDATE_DES_RECOMMENDED_UPDATE_MB, size );
-                }
-            else 
-                {
-                importanceDescription = StringLoader::LoadLC(
-            	                   R_IAUPDATE_DES_RECOMMENDED_UPDATE_KB, size );	
-                }  
-            break;
-            }
-    
-        case MIAUpdateBaseNode::ENormal:
-            {
-            if ( shownInMegabytes )
-                {
-            	importanceDescription = StringLoader::LoadLC(
-            	                   R_IAUPDATE_DES_NORMAL_UPDATE_MB, size );
-                }
-            else 
-                {
-                importanceDescription = StringLoader::LoadLC(
-            	                   R_IAUPDATE_DES_NORMAL_UPDATE_KB, size );	
-                }  
-            break;
-            }
-
-        default:
-            {
-            importanceDescription = KNullDesC().AllocLC();
-            break;
-            }
-        }
-        
-        TPtr ptr = importanceDescription->Des();
-        AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr );    
-        
-        
-        
-        if ( node->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal )  
-            {       
-            HBufC* name = node->Base().Name().AllocLC();
-            HBufC* buffer = HBufC::NewLC( KOne.iTypeLength +
-                                          KTabulator.iTypeLength + 
-                                          name->Length() + 
-                                          KTabulator.iTypeLength +
-                                          importanceDescription->Length() );
-            buffer->Des() = KOne();
-            buffer->Des() += KTabulator();
-            buffer->Des() += *name;
-            buffer->Des() += KTabulator();
-            buffer->Des() += *importanceDescription;        
-            
-            iItemTextArray->AppendL( *buffer );
-            
-            CleanupStack::PopAndDestroy( buffer );
-            CleanupStack::PopAndDestroy( name );
-            }
-        
-        if ( node->NodeType() == MIAUpdateAnyNode::ENodeTypeFw ) 
-            {
-            HBufC* firmwareHeader = StringLoader::LoadLC(R_IAUPDATE_MAIN_DEVICE_FW);
-            HBufC* firmwarename = HBufC::NewLC( node->Base().Name().Length() +
-                                                KSpace.iTypeLength + 
-                                                firmwareHeader->Length() );
-            firmwarename->Des() = node->Base().Name();
-            firmwarename->Des() += KSpace();
-            firmwarename->Des() += *firmwareHeader;
-                     
-            HBufC* buffer = HBufC::NewLC( KOne.iTypeLength +
-                                          KTabulator.iTypeLength + 
-                                          firmwarename->Length() + 
-                                          KTabulator.iTypeLength +
-                                          importanceDescription->Length() +
-                                          KTabulator.iTypeLength +
-                                          KTwo.iTypeLength );
-            buffer->Des() = KOne();
-            buffer->Des() += KTabulator();
-            buffer->Des() += *firmwarename;
-            buffer->Des() += KTabulator();
-            buffer->Des() += *importanceDescription;        
-            buffer->Des() += KTabulator();
-            buffer->Des() += KTwo();
-            
-            iItemTextArray->AppendL( *buffer );
-            CleanupStack::PopAndDestroy( buffer );
-            CleanupStack::PopAndDestroy( firmwarename );
-            CleanupStack::PopAndDestroy( firmwareHeader );
-            }
-        
-        CleanupStack::PopAndDestroy( importanceDescription );
-        }    
-    
-    if ( aNodes.Count() == 0 )
-        {
-    	HBufC* emptyText = NULL;
-        if ( aError )
-            {
-            if ( aError == KErrCancel || aError == KErrAbort )
-                {
-        	    emptyText = KNullDesC().AllocLC();
-                }
-            else
-                {
-                emptyText = StringLoader::LoadLC( R_IAUPDATE_REFRESH_FAILED );	
-                }
-    	    }
-        else
-            {
-            emptyText = StringLoader::LoadLC( R_IAUPDATE_TEXT_NO_UPDATES );	
-            }
-        
-        iListBox->View()->SetListEmptyTextL( *emptyText );
-        CleanupStack::PopAndDestroy( emptyText );
-        iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( 
-                CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff );  
-        }
-    else
-        {
-        if ( iListBox->CurrentItemIndex() == KErrNotFound )
-            {
-           	iListBox->SetCurrentItemIndex( aNodes.Count() - 1 );
-            }
-        }
-        
-    iListBox->HandleItemAdditionL();
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::GetCurrentNode
-// 
-// -----------------------------------------------------------------------------
-//
-MIAUpdateAnyNode* CIAUpdateMainContainer::GetCurrentNode( 
-                                    const RPointerArray<MIAUpdateAnyNode>& aNodes )    
-    {
-    MIAUpdateAnyNode* currentNode = NULL;
-    
-    TInt currentIndex = iListBox->CurrentItemIndex();
-    
-    if( currentIndex != -1 )
-        {
-        
-        currentNode = aNodes[currentIndex];
-        
-        }
-    return currentNode;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::SetSelectedIndicesL
-// 
-// -----------------------------------------------------------------------------
-//    
-void CIAUpdateMainContainer::SetSelectedIndicesL( 
-                            const RArray<TInt>& aIndices )
-    {    
-    CArrayFixFlat<TInt>* indexes = new(ELeave) CArrayFixFlat<TInt>( aIndices.Count() + 1 );
-    
-    CleanupStack::PushL( indexes );
-    
-    for( TInt i = 0; i < aIndices.Count(); ++i )
-        {
-        indexes->AppendL( aIndices[i] );
-        }
-        
-    iListBox->View()->SetSelectionIndexesL( indexes );
-    
-    UpdateMSKTextL();  
-    CleanupStack::PopAndDestroy( indexes );
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::CleanAllSelectionL
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateMainContainer::CleanAllSelection()
-    {
-    iListBox->View()->ClearSelection();
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::OfferKeyEventL
-// Some key events are passed to the list componenent 
-// -----------------------------------------------------------------------------
-//       
-TKeyResponse CIAUpdateMainContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
-                                                     TEventCode aType )
-    {
-    TKeyResponse response = EKeyWasNotConsumed;    
-
-
-    if( FeatureManager::FeatureSupported( KFeatureIdSyncMlDmFota ) ) //NFUI
-        {
-        if (aKeyEvent.iScanCode == EStdKeyDevice0 
-                || aKeyEvent.iScanCode == EStdKeyDevice3 
-                || aKeyEvent.iScanCode ==   EStdKeyHash )
-            {
-         
-            TBool value (EFalse);
-            TInt err = RProperty::Get( KPSUidNSmlDMSyncApp, KFotaDLStatus, value );
-            if (!err && value == 1)
-                {
-    
-                TApaTaskList taskList(CEikonEnv::Static()->WsSession());
-                TApaTask task=taskList.FindApp( KFOTAUid );
-           
-                if(task.Exists())
-                    {
-                    task.BringToForeground();
-                    }
-                return EKeyWasConsumed;
-                }
-            }
-        }
- 
-    if( aType == EEventKey )
-        {
-        switch( aKeyEvent.iCode )
-            {
-            case EKeyUpArrow:
-            case EKeyDownArrow:
-                {                    
-                response = iListBox->OfferKeyEventL(aKeyEvent, aType); 
-                UpdateMSKTextL();   
-                break;    
-                }
-            default:
-                {
-                break;
-                }
-             
-            }
-        }
-    return response;        
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::SizeChanged
-//  
-// -----------------------------------------------------------------------------
-//  
-void CIAUpdateMainContainer::SizeChanged()
-    {
-    iListBox->SetRect( Rect() );
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::CountComponentControls
-//  
-// -----------------------------------------------------------------------------
-//  
-TInt CIAUpdateMainContainer::CountComponentControls() const
-    {
-    if ( iListBox )
-        {
-    	return 1;
-        }
-    else
-        {
-        return 0;	
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::ComponentControl
-//  
-// -----------------------------------------------------------------------------
-// 
-CCoeControl* CIAUpdateMainContainer::ComponentControl( TInt aIndex ) const
-    {
-    CCoeControl* control = 0;
-
-    switch( aIndex )
-        {
-        case 0:
-            control = iListBox;
-            break;
-        default:
-            break;
-        }
-    return control;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CIAUpdateMainContainer::GetHelpContext
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateMainContainer::GetHelpContext( TCoeHelpContext& aContext ) const
-    {
-    aContext.iMajor = KUidIAUpdateApp;
-    aContext.iContext = KSWUPDATE_HLP_MAIN;    
-    }
-
-// ---------------------------------------------------------------------------
-// CIAUpdateMainContainer::HandleResourceChange
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateMainContainer::HandleResourceChange( TInt aType )
-    {
-	CCoeControl::HandleResourceChange( aType );
-
-    if ( aType == KEikDynamicLayoutVariantSwitch ) //Handle change in layout orientation
-        {
-        TRect mainPaneRect;
-        AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
-        SetRect( mainPaneRect );
-		DrawNow();
-		}
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::UpdateMSKTextL
-//  
-// -----------------------------------------------------------------------------
-//        
-void CIAUpdateMainContainer::UpdateMSKTextL()
-	{
-	TInt index = iListBox->CurrentItemIndex();
-	if (index < 0 )
-	    {
-		iObserver.SetMiddleSKTextL( EFalse, EFalse );
-	    }
-	else if ( iListBox->View()->ItemIsSelected( index ) )
-	    {
-		iObserver.SetMiddleSKTextL( ETrue, ETrue );
-	    }
-	else
-	    {
-	    iObserver.SetMiddleSKTextL( ETrue, EFalse );	
-	    }    
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::HandleListBoxEventL
-//  
-// -----------------------------------------------------------------------------
-//  
-void CIAUpdateMainContainer::HandleListBoxEventL( CEikListBox* /*aListBox*/,
-                                                  TListBoxEvent aEventType )
-    {
-
-    switch  ( aEventType )
-        {
-        case EEventItemSingleClicked:
-        case EEventEnterKeyPressed:
-            {
-            TInt index = iListBox->CurrentItemIndex();
-            if( iListBox->View()->ItemIsSelected( index ) )
-                {
-                HandleMarkCommandL( EAknCmdUnmark );
-                }
-            else
-                {
-                HandleMarkCommandL( EAknCmdMark );
-                }            
-            break;
-            }        
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainContainer::CreateIconL
-//  
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateMainContainer::CreateIconL( CFbsBitmap*& aBitmap,
-                                          CFbsBitmap*& aMask,
-                                          const TDesC& aFileName,
-                                          TInt aBitmapId,
-                                          TInt aMaskId )
-    {
-	AknIconUtils::CreateIconLC( aBitmap,
-                                aMask, 
-                                aFileName,  
-                                aBitmapId,
-                                aMaskId );
-    CleanupStack::Pop( aMask );
-    CleanupStack::Pop( aBitmap );
-    }
--- a/iaupdate/IAD/ui/src/iaupdatemainview.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatemainview.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2010 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,1019 +11,349 @@
 *
 * Contributors:
 *
-* Description:   This module contains the implementation of CIAUpdateMainView class 
-*                member functions.
+* Description:   This module contains the implementation of IAUpdateMainView
+*                class member functions.
 *
 */
 
+#include <hbaction.h>
+#include <qgraphicswidget>
+//#include <hblistview.h>
+#include <hblistwidget.h>
+#include <hblistviewitem.h>
+#include <hblistwidgetitem.h>
+#include <hbtoolbar.h>
+#include <hbmenu.h>
+#include <hbdocumentloader.h>
+#include <xqconversions.h>
 
- 
-#include <eikmenup.h>
-#include <aknViewAppUi.h> 
-#include <akntitle.h> 
-#include <aknnavi.h> // CAknNavigationControlContainer
-#include <aknnavide.h> // CAknNavigationDecorator
-#include <AknUtils.h>
-#include <aknmessagequerydialog.h>      // CAknMessageQueryDialog
-#include <akntoolbar.h> 
-#include <StringLoader.h>
-#include <featmgr.h>  
-#include <iaupdate.rsg>
-
-#include "iaupdate.hrh"
 #include "iaupdatemainview.h"
-#include "iaupdatemaincontainer.h"
-#include "iaupdatenode.h"
-#include "iaupdatefwnode.h"
-#include "iaupdatebasenode.h"
-#include "iaupdatedialogutil.h"
-#include "iaupdatestatusdialog.h"
-#include "iaupdateappui.h"
-#include "iaupdateuicontroller.h"
-#include "iaupdatedeputils.h"
+#include "iaupdateagreement.h"
+
 #include "iaupdatedebug.h"
-#include "iaupdatefwupdatehandler.h"
 
-//CONSTANTS
-const TInt KKiloByte = 1024;
-const TInt KMegaByte = 1024 * 1024;
-const TInt KMaxShownInKiloBytes = 10 * KMegaByte;
-const TInt KSelInfoArrayGranularity = 3;
-
-//MACROS
-_LIT( KSpace, " " );
-
-// ============================ MEMBER FUNCTIONS ===============================
+const int KKiloByte = 1024;
+const int KMegaByte = 1024 * 1024;
+const int KMaxShownInKiloBytes = 10 * KMegaByte;
 
 
+IAUpdateMainView::IAUpdateMainView()
+{
+    HbDocumentLoader loader;
+    bool ok = false;
+    loader.load(":/xml/iaupdate_mainview.docml", &ok);
+        
+    // Exit if the file format is invalid
+    Q_ASSERT_X(ok, "Software update", "Invalid docml file");
+    // Create the view from DocML
+    
+    //QGraphicsWidget* widget = loader.findWidget("view");
+    HbView* widget = qobject_cast<HbView*>(loader.findWidget("view"));
+    Q_ASSERT_X(widget != 0, "Software update", "View not found");
+    QString viewTitle(widget->title());
+    // Set the IAUpdateMainView view to be the widget that was loaded from the xml
+    setWidget(widget);
+    setTitle(viewTitle);
+      
+    HbToolBar *toolBar = qobject_cast< HbToolBar*>( loader.findWidget("viewToolbar") );
+    setToolBar(toolBar);
+    
+    HbMenu *menu = qobject_cast< HbMenu*>( loader.findWidget("viewMenu") );
+    setMenu(menu);
+    
+    //Get the Action objects from the docml file
+    HbAction *action = qobject_cast<HbAction*>(loader.findObject("action"));
+    HbAction *action_1 = qobject_cast<HbAction*>(loader.findObject("action_1"));
+    HbAction *action_2 = qobject_cast<HbAction*>(loader.findObject("action_2"));
+    
+    connect(action, SIGNAL(triggered()), this, SLOT(handleStartUpdate()));
+    connect(action_1, SIGNAL(triggered()), this, SLOT(handleSettings()));
+    connect(action_2, SIGNAL(triggered()), this, SLOT(handleDisclaimer()));
 
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateMainView* CIAUpdateMainView::NewL( const TRect& aRect )
-    {
-    CIAUpdateMainView* self = CIAUpdateMainView::NewLC( aRect );
-    CleanupStack::Pop(self);
-    return self;
-    }
+    //mListView = qobject_cast<HbListView*>( loader.findWidget("listView") ); 
+    mListView = qobject_cast<HbListWidget*>( loader.findWidget("listWidget") );
+    //mListView = loader.findWidget("listWidget");
+    mListView->setSelectionMode( HbAbstractItemView::MultiSelection );
+    
+    HbListViewItem *prototype = mListView->listItemPrototype();
+
+    prototype->setGraphicsSize(HbListViewItem::LargeIcon);
+    //prototype->setStretchingStyle(HbListViewItem::StretchLandscape);
+    //prototype->setSecondaryTextRowCount(1,1);
+
+    
+        
+    /*HbListWidgetItem* item = new HbListWidgetItem();
+    QStringList data;
+    data << "Test application" << "Critical";
+    item->setData(QVariant(data), Qt::DisplayRole);
+    mListWidget->addItem(item);*/
+}
+    
+IAUpdateMainView::~IAUpdateMainView()
+{
+}
 
 // -----------------------------------------------------------------------------
-// CIAUpdateMainView::NewLC
-// 
-// -----------------------------------------------------------------------------
-//
-CIAUpdateMainView* CIAUpdateMainView::NewLC( const TRect& aRect )
-    {
-    CIAUpdateMainView* self = new (ELeave) CIAUpdateMainView();
-    CleanupStack::PushL( self );
-    self->ConstructL( aRect );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::CIAUpdateMainView
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateMainView::CIAUpdateMainView()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::~CIAUpdateMainView
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CIAUpdateMainView::~CIAUpdateMainView()
-    {
-    delete iDecorator;
-    iAllNodes.Close();
-    if ( iContainer )
-        {
-    	AppUi()->RemoveFromStack( iContainer );
-    	delete iContainer;
-        }
-    delete iFwUpdateHandler;
-    }
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateMainView::ConstructL( const TRect& /*aRect*/ )
-    {
-    BaseConstructL( R_IAUPDATE_MAIN_VIEW );
-    Toolbar()->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue, ETrue );
-    Toolbar()->SetItemDimmed( EIAUpdateCmdMarkedUpdateDetails, ETrue, ETrue );
-    Toolbar()->SetItemDimmed( EIAUpdateCmdUpdateHistory, ETrue, ETrue );
-    Toolbar()->SetToolbarObserver( this ); 
-    iFwUpdateHandler = CIAUpdateFWUpdateHandler::NewL();
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::RefreshL
+// IAUpdateMainView::refresh
 // Refreshes update list
 // -----------------------------------------------------------------------------
 //    
-void CIAUpdateMainView::RefreshL( const RPointerArray<MIAUpdateNode>& aNodes,
-                                  const RPointerArray<MIAUpdateFwNode>& aFwNodes,
-                                  TInt aError  )
+void IAUpdateMainView::refresh( const RPointerArray<MIAUpdateNode>& nodes,
+                                const RPointerArray<MIAUpdateFwNode>& fwNodes,
+                                int /*error*/ )
     {   
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL begin");
-    iRefreshError = aError;    
-    iAllNodes.Reset();
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh begin");
+       
+    mAllNodes.Reset();
         
-    if ( aFwNodes.Count() > 0 )
+    if ( fwNodes.Count() > 0 )
         {
-        IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL hard code importance");
+        IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh hard code importance");
         //hardcode the importance of firmware as Critical
-        for ( TInt i = 0; i < aFwNodes.Count(); i++ )
+        for ( TInt i = 0; i < fwNodes.Count(); i++ )
              {
-             aFwNodes[i]->Base().SetImportance( MIAUpdateBaseNode::ECritical );
+             fwNodes[i]->Base().SetImportance( MIAUpdateBaseNode::ECritical );
              }
          
         //either NSU or FOTA available
-        if ( aFwNodes.Count() == 1 )
+        if ( fwNodes.Count() == 1 )
             {
-            IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL either NSU or FOTA available");
-            MIAUpdateAnyNode* node = aFwNodes[0];
-            User::LeaveIfError( iAllNodes.Append( node ) );
+            IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh either NSU or FOTA available");
+            MIAUpdateAnyNode* node = fwNodes[0];
+            mAllNodes.Append( node );
             }
         
         //both NSU and FOTA available, show only FOTA node
-        if ( aFwNodes.Count() == 2 )
+        if ( fwNodes.Count() == 2 )
             {
-            IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL both NSU and FOTA available");
-            MIAUpdateAnyNode* node1 = aFwNodes[0];
+            IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh both NSU and FOTA available");
+            MIAUpdateAnyNode* node1 = fwNodes[0];
             MIAUpdateFwNode* fwnode = static_cast<MIAUpdateFwNode*>( node1 );
             if ( fwnode->FwType() == MIAUpdateFwNode::EFotaDp2  )
                 {
-                User::LeaveIfError( iAllNodes.Append( node1 ) );
+                mAllNodes.Append( node1 );
                 }
             else
                 {
-                MIAUpdateAnyNode* node2 = aFwNodes[1];
-                User::LeaveIfError( iAllNodes.Append( node2 ) );
+                MIAUpdateAnyNode* node2 = fwNodes[1];
+                mAllNodes.Append( node2 );
                 }
             }
         }
     
    
-    for( TInt i = 0; i < aNodes.Count(); ++i ) 
+    for( int i = 0; i < nodes.Count(); ++i ) 
         {
-        MIAUpdateAnyNode* node = aNodes[i];
-        User::LeaveIfError( iAllNodes.Append( node ) );
+        MIAUpdateAnyNode* node = nodes[i];
+        mAllNodes.Append( node );
         }
         
-    if( iContainer )
-        {        
-        iContainer->RefreshL( iAllNodes, iRefreshError );  
-        SetSelectedIndicesL();     
-        DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() );
-        }    
-     Toolbar()->SetItemDimmed( EIAUpdateCmdUpdateHistory, EFalse, ETrue );
-     }
+    mListView->clear();
+    QItemSelectionModel *selectionModel = mListView->selectionModel();  
+    selectionModel->clear();
+    HbIcon icon(QString(":/icons/qgn_menu_swupdate"));
     
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::GetCurrentNode
-// 
-// -----------------------------------------------------------------------------
-//    
-MIAUpdateAnyNode* CIAUpdateMainView::GetCurrentNode()
-   {
-   if ( iContainer )
-      {
-   	  return iContainer->GetCurrentNode( iAllNodes ); 	 
-      }
-   return NULL;   
-   }
+    for( int j = 0; j < mAllNodes.Count(); ++j ) 
+        {
+        MIAUpdateAnyNode* node = mAllNodes[j];
+        int sizeInBytes = node->Base().ContentSizeL();
 
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::GetSelectedNode
-// 
-// -----------------------------------------------------------------------------
-//    
-MIAUpdateAnyNode* CIAUpdateMainView::GetSelectedNode()
-   {
-   MIAUpdateAnyNode* selectedNode = NULL;
-   for( TInt i = 0; i < iAllNodes.Count() && !selectedNode ; ++i )
-       {
-       if ( iAllNodes[i]->Base().IsSelected() )
-           {
-           selectedNode = iAllNodes[i];
-           }
-       }
-    return selectedNode;   
-   }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::Id
-// Get Uid of this view
-// -----------------------------------------------------------------------------
-//       
-TUid CIAUpdateMainView::Id() const
-    {
-    return TUid::Uid( EIAUpdateMainViewId );
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::HandleCommandL
-// 
-// -----------------------------------------------------------------------------
-// 
-void CIAUpdateMainView::HandleCommandL( TInt aCommand )
-    {
-    switch( aCommand ) 
-        {  
-        case EIAUpdateCmdStartUpdate:
+        int size = 0;
+        TBool shownInMegabytes = EFalse;        
+        if ( sizeInBytes >= KMaxShownInKiloBytes )
             {
-            RPointerArray<MIAUpdateAnyNode> selectedNodes;
-            CleanupClosePushL( selectedNodes );
-            GetSelectedNodesL( selectedNodes ); 
-            if ( selectedNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
-                {
-                //the marking logic will make sure firmware won't be marked with normal sis updates
-                //at the same time.
-                iFwUpdateHandler->FirmWareUpdatewithFOTA();
-                }
-            else
+            shownInMegabytes = ETrue;
+            size = sizeInBytes / KMegaByte;
+            if ( sizeInBytes % KMegaByte != 0 )
                 {
-                AppUi()->HandleCommandL( aCommand );
-                }
-            CleanupStack::PopAndDestroy( &selectedNodes );
-            break;    
-            }
-        case EIAUpdateCmdUpdateWithPC:
-            {
-            iFwUpdateHandler->FirmWareUpdatewithNSU();
-            break;
-            }
-        case EIAUpdateCmdSettings:
-            {
-            Toolbar()->SetToolbarVisibility( EFalse );
-            AppUi()->HandleCommandL( aCommand );
-            Toolbar()->SetToolbarVisibility( ETrue );
-            break;
-            }
-        case EAknSoftkeyMark:
-            {
-            iContainer->HandleMarkCommandL( EAknCmdMark );
-            break;	
-            }
-        case EAknSoftkeyUnmark:
-            {
-            iContainer->HandleMarkCommandL( EAknCmdUnmark );
-            break;	
-            }
-        case EAknCmdMark:        
-        case EAknCmdUnmark:
-            {
-            iContainer->HandleMarkCommandL( aCommand );
-            break;	
-            }
-        default:
-            { 
-            AppUi()->HandleCommandL( aCommand );
-            break;
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::DynInitMenuPaneL
-// Dim options which are not availble in empty list.
-// Set Mark/Unmark option
-// -----------------------------------------------------------------------------
-//    
-void CIAUpdateMainView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
-    {
-    if( aResourceId == R_IAUPDATE_MAIN_MENU ) 
-        {
-        if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
-            {
-            aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
-            }
-        RPointerArray<MIAUpdateAnyNode> selectedNodes;
-        CleanupClosePushL( selectedNodes );
-        GetSelectedNodesL( selectedNodes ); 
-                    
-        if ( selectedNodes.Count() )
-            {
-            if ( selectedNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
-                {
-                //firmware is selected
-                MIAUpdateFwNode* node = static_cast<MIAUpdateFwNode*>( selectedNodes[0] );
-            
-                if ( node->FwType() == MIAUpdateFwNode::EFotaDp2 )
-                    {
-                    aMenuPane->SetItemDimmed( EIAUpdateCmdUpdateWithPC, ETrue );
-                    }
-                    
-                if ( node->FwType() == MIAUpdateFwNode::EFotiNsu )
-                    {
-                    aMenuPane->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue );
-                    }
-                }
-            else
-                {
-                //firmware is not selected, only sis
-                aMenuPane->SetItemDimmed( EIAUpdateCmdUpdateWithPC, ETrue );
+                size++;
                 }
             }
-        else
+        else 
             {
-            aMenuPane->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue );
-            aMenuPane->SetItemDimmed( EIAUpdateCmdUpdateWithPC, ETrue );
-            }
-        CleanupStack::PopAndDestroy( &selectedNodes );
-        }
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::DoActivateL
-// Activate view
-// -----------------------------------------------------------------------------
-// 
-void  CIAUpdateMainView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, 
-                                      TUid /*aCustomMessageId*/, 
-                                      const TDesC8& /*aCustomMessage*/ )
-    {
-    UpdateStatusPaneL();
-    if( !iContainer )
-        {    
-        iContainer = CIAUpdateMainContainer::NewL( ClientRect(), *this );
-   
-        if( iAllNodes.Count() > 0 )
-            {            
-            iContainer->RefreshL( iAllNodes, iRefreshError );
+            size = sizeInBytes / KKiloByte;
+            if ( sizeInBytes % KKiloByte != 0 )
+                {
+                size++;
+                }  
             }
-  
-        SetSelectedIndicesL();  
-        DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() );
-        AppUi()->AddToStackL( iContainer ); 
-        }
-    else
-        {
-        UpdateSelectionInfoInNaviPaneL();	
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::DoDeactivate()
-// Container is deleted in deactivation
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateMainView::DoDeactivate()
-    {
-    RemoveSelectionInfoInNaviPane();
-    }
+        QString sizeString;
+        sizeString.setNum(size);        
+        QString importanceDescription;
+        switch( node->Base().Importance() )
+            {        
+            case MIAUpdateBaseNode::EMandatory:
+                {
+                importanceDescription = "Required ";
+                importanceDescription.append(sizeString);
+                if ( shownInMegabytes )
+                    {
+                    importanceDescription.append(" MB" );
+                    }
+                else 
+                    {
+                    importanceDescription.append(" kB" );
+                    }  
+                break;
+                }
+            
+            
+            case MIAUpdateBaseNode::ECritical:
+                {
+                bool isNSU = false;
+                if( node->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
+                    {
+                    MIAUpdateFwNode* fwnode = static_cast<MIAUpdateFwNode*>( node );          
+                    if ( fwnode->FwType() == MIAUpdateFwNode::EFotiNsu )
+                        {
+                        isNSU = true;
+                        }
+                    }
+                
+                importanceDescription = "Important ";
+                if ( !size || isNSU )
+                    {
+                    //for firmware when size info is not provided by server
+                    }
+                else
+                    {
+                    importanceDescription.append(sizeString);
+                    if ( shownInMegabytes )
+                        {
+                        importanceDescription.append(" MB" );
+                        }
+                    else 
+                        {
+                        importanceDescription.append(" kB" );
+                        } 
+                    }
+     
+                break;
+                }
+        
+            case MIAUpdateBaseNode::ERecommended:
+                {
+                importanceDescription = "Recommended ";
+                importanceDescription.append(sizeString);
+                if ( shownInMegabytes )
+                    {
+                    importanceDescription.append(" MB" );
+                    }
+                else 
+                    {
+                    importanceDescription.append(" kB" );
+                    }  
+                break;
+                }
+        
+            case MIAUpdateBaseNode::ENormal:
+                {
+                importanceDescription = "Optional ";
+                importanceDescription.append(sizeString);
+                if ( shownInMegabytes )
+                    {
+                     importanceDescription.append(" MB" );
+                    }
+                else 
+                    {
+                    importanceDescription.append(" kB" );
+                    }  
+                break;
+                }
 
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::DynInitToolbarL()
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateMainView::DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar )
-    {
-    if ( aResourceId == R_IAUPDATE_MAIN_TOOLBAR )
-        {
-        if ( iContainer )
-            {
-            if ( CountOfSelectedItems() > 0 )
+            default:
                 {
-                aToolbar->SetItemDimmed( EIAUpdateCmdStartUpdate, EFalse, ETrue );
-                }
-            else
-                {
-                aToolbar->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue, ETrue );
-                }
-            if ( CountOfSelectedItems() == 1 )
-                {
-                aToolbar->SetItemDimmed( EIAUpdateCmdMarkedUpdateDetails, EFalse, ETrue );
-                }
-            else
-                {
-                aToolbar->SetItemDimmed( EIAUpdateCmdMarkedUpdateDetails, ETrue, ETrue );
+                break;
                 }
             }
-        }
-    }
+            
+            //AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr );    
+            
+            HbListWidgetItem *item = new HbListWidgetItem();    
+            QString name = XQConversions::s60DescToQString(node->Base().Name());
+            if ( node->NodeType() == MIAUpdateAnyNode::ENodeTypeFw ) 
+                {
+                name.append(" DEVICE SOFTWARE");
+                }
+            item->setText(name);
+            item->setSecondaryText(importanceDescription);
+            item->setIcon(icon);
+             mListView->addItem(item); 
+ 
+            if ( node-> Base().IsSelected() )
+                {
+                int count = mListView->indexCount();
+                QModelIndex modelIndex = mListView->model()->index(count-1,0);
+                selectionModel->select(modelIndex, QItemSelectionModel::Select);
+                }
 
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::OfferToolbarEventL()
-//
-// -----------------------------------------------------------------------------
-//            
-void CIAUpdateMainView::OfferToolbarEventL( TInt aCommand )
-    {
-    if ( aCommand == EIAUpdateCmdStartUpdate )
-        {
-        RPointerArray<MIAUpdateAnyNode> selectedNodes;
-        CleanupClosePushL( selectedNodes );
-        GetSelectedNodesL( selectedNodes ); 
-        
-        if ( selectedNodes.Count() )
+               
+            
+        /*if ( nodes.Count() == 0 )
             {
-            if ( selectedNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
+            HBufC* emptyText = NULL;
+            if ( aError )
                 {
-                //firmware is selected
-                MIAUpdateFwNode* node = static_cast<MIAUpdateFwNode*>( selectedNodes[0] );
-            
-                if ( node->FwType() == MIAUpdateFwNode::EFotaDp2 )
+                if ( aError == KErrCancel || aError == KErrAbort )
                     {
-                    aCommand = EIAUpdateCmdStartUpdate;
+                    emptyText = KNullDesC().AllocLC();
                     }
-                    
-                if ( node->FwType() == MIAUpdateFwNode::EFotiNsu )
+                else
                     {
-                    aCommand = EIAUpdateCmdUpdateWithPC;
+                    emptyText = StringLoader::LoadLC( R_IAUPDATE_REFRESH_FAILED );  
                     }
                 }
             else
                 {
-                //firmware is not selected, only sis
-                aCommand = EIAUpdateCmdStartUpdate;
+                emptyText = StringLoader::LoadLC( R_IAUPDATE_TEXT_NO_UPDATES ); 
                 }
-            }
-        else
-            {
-             MIAUpdateAnyNode* currentNode = GetCurrentNode(); 
-             if ( currentNode->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
-                 {
-                 MIAUpdateFwNode* node = static_cast<MIAUpdateFwNode*>( currentNode );
-                 if ( node->FwType() == MIAUpdateFwNode::EFotiNsu )
-                     {
-                     aCommand = EIAUpdateCmdUpdateWithPC;
-                     }
-                 } 
-            }
-
-        CleanupStack::PopAndDestroy( &selectedNodes );   
-        }
-    HandleCommandL( aCommand );
-    }
-
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::MarkListItemL
-// Mark list item
-// -----------------------------------------------------------------------------
-//    
-TBool CIAUpdateMainView::MarkListItemL( TBool aMark, TInt aIndex )
-    {
-    if ( aMark )
-        {
-        //It's Mark Command
-        RPointerArray<MIAUpdateAnyNode> selectedNodes;
-        CleanupClosePushL( selectedNodes );
-        GetSelectedNodesL( selectedNodes ); 
-        
-        //There are selected items already and type are different with the current one
-        if ( selectedNodes.Count() > 0 && (iAllNodes[aIndex]->NodeType() != selectedNodes[0]->NodeType() ) )
-            {       
-            /*HBufC* msgText = StringLoader::LoadLC(R_IAUPDATE_FIRMWARE_WITH_OTHERS);
-
-            CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-       
-            dlg->ExecuteLD( R_IAUPDATE_INFORMATION_QUERY, *msgText );
             
-            CleanupStack::PopAndDestroy( msgText );*/
-            
-            //clean all of the current selection(s)
-            iContainer->CleanAllSelection();
-            
-            // firmware item and normal sis items can't be selected at the same time
-            // unmark the selected nodes.
-            for ( TInt i = 0; i < selectedNodes.Count(); i++ )
-                {                
-                TInt index = iAllNodes.Find( selectedNodes[i]);
-                iAllNodes[index]->Base().SetSelected( EFalse );
-                }
-            }
-        
-        CleanupStack::PopAndDestroy( &selectedNodes );
-        }
-    
-    //there is no selected items or the type is the same with the current one
-    
-    if ( iAllNodes[aIndex]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
-        {
-        iAllNodes[aIndex]->Base().SetSelected( aMark );       
-        
-        if ( aMark )
-            {
-            SetMiddleSKTextL( ETrue, ETrue );
+            iListBox->View()->SetListEmptyTextL( *emptyText );
+            CleanupStack::PopAndDestroy( emptyText );
+            iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( 
+                    CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff );  
             }
         else
             {
-            SetMiddleSKTextL( ETrue, EFalse );  
-            }  
-        UpdateSelectionInfoInNaviPaneL();
-        DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() );
-        return ETrue;
-        }
-    
-    if ( iAllNodes[aIndex]->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal )
-        {
-        TBool accepted = EFalse;
-        
-        if( aIndex > -1 )
-            {
-            accepted = ETrue;
-            
-            MIAUpdateNode* node = static_cast<MIAUpdateNode*>( iAllNodes[aIndex] );
-            RPointerArray<MIAUpdateAnyNode> mands;
-            RPointerArray<MIAUpdateNode> deps;
-           
-            if ( aMark )
-                {
-                CleanupClosePushL( mands );
-                CleanupClosePushL( deps );
-                IAUpdateDepUtils::GetDependenciesL( *node, iAllNodes, deps );
-                GetMandatoryNodesL( mands );
-                }
-            else
-                {
-                //mandatory item is not allowed to be unmarked
-                if ( iAllNodes[aIndex]->Base().Importance() == MIAUpdateBaseNode::EMandatory )
-                    {
-                    //show dialog  
-                    ShowUpdateCannotOmitDialogL();
-                    return EFalse;
-                    }
-                
-                CleanupClosePushL( deps );
-                IAUpdateDepUtils::GetDependantsL( *node, iAllNodes, deps );  
-                // item is not allowed to be unmarked if its dependant is mandatory
-                TBool mandatoryDependantFound = EFalse;
-                for( TInt i = 0; i < deps.Count() && !mandatoryDependantFound; i++ )
-                     {
-                     if ( deps[i]->Base().Importance() == MIAUpdateBaseNode::EMandatory )
-                         {
-                         mandatoryDependantFound = ETrue;
-                         }
-                     }
-                if ( mandatoryDependantFound )
-                    {
-                    ShowUpdateCannotOmitDialogL();
-                    CleanupStack::PopAndDestroy( &deps );
-                    return EFalse;
-                    }
-                }
-             
-            TInt depCount = deps.Count();
-           
-            if ( depCount > 0 )
-                {
-                HBufC* text = NULL;
-                HBufC* names = NULL;
-                MIAUpdateNode* depNode = NULL;
-                HBufC* separator = NULL;
-                
-                if ( depCount > 1 )
-                    {                                 
-                    separator = StringLoader::LoadLC( R_IAUPDATE_SEPARATOR );
-                    }
-                
-                names = HBufC::NewLC( 0 );
-                       
-                for( TInt i = 0; i < depCount; i++ )  
-                    {
-                    depNode = deps[i];
-                    HBufC* temp = NULL;
-                    if ( separator )
-                        {
-                        temp = names->ReAllocL( names->Length() + 
-                                                depNode->Base().Name().Length() +
-                                                separator->Length() +
-                                                KSpace.iTypeLength );
-                        }
-                    else
-                        {
-                        temp = names->ReAllocL( names->Length() + 
-                                                depNode->Base().Name().Length() +
-                                                KSpace.iTypeLength );
-                        }
-                   
-                    CleanupStack::Pop( names );
-                    names = temp; 
-                    CleanupStack::PushL( names ); 
-                    
-                    if (  i > 0 )
-                        {
-                        names->Des() += *separator;
-                        names->Des() += KSpace; 
-                        }
-                    names->Des() += depNode->Base().Name();
-                    }
-                
-                TInt resourceId = 0;    
-                if ( aMark )
-                    {
-                    if ( depCount > 1 ) 
-                        {
-                        resourceId = R_IAUPDATE_DEPENDENCY_MARK_MANY;
-                        } 
-                    else
-                        {
-                        resourceId = R_IAUPDATE_DEPENDENCY_MARK_ONE;    
-                        }
-                    }
-                else
-                    {
-                    if ( depCount > 1 ) 
-                        {
-                        resourceId = R_IAUPDATE_DEPENDENCY_UNMARK_MANY;
-                        } 
-                    else
-                        {
-                        resourceId = R_IAUPDATE_DEPENDENCY_UNMARK_ONE;  
-                        }   
-                    }
-                text = StringLoader::LoadLC( resourceId, *names );
-                
-                if ( aMark && iAllNodes[aIndex]->Base().Importance() == MIAUpdateBaseNode::EMandatory )
-                    {
-                    // depencencies of mandatory update are also selected without showing dialog
-                    accepted = ETrue;
-                    }
-                else
-                    {
-                    accepted = ShowDependenciesFoundDialogL( *text );
-                    }
-                CleanupStack::PopAndDestroy( text );
-                CleanupStack::PopAndDestroy( names );
-                
-                if ( separator )
-                    {
-                    CleanupStack::PopAndDestroy( separator );
-                    }
-                }
-            
-            if ( accepted )
+            if ( iListBox->CurrentItemIndex() == KErrNotFound )
                 {
-                for( TInt j = 0; j < depCount; j++ )
-                    {
-                    TInt depNodeInd = iAllNodes.Find( deps[j] );
-                    iAllNodes[depNodeInd]->Base().SetSelected( aMark );
-                    }
-                CleanupStack::PopAndDestroy( &deps );
-                
-                TInt nodeInd = iAllNodes.Find( node );
-                iAllNodes[nodeInd]->Base().SetSelected( aMark );
-                }
-            else
-                {
-                //user rejects the dependency dialog
-                CleanupStack::PopAndDestroy( &deps );
-                if ( aMark )
-                    {
-                    CleanupStack::PopAndDestroy( &mands );
-                    }
-                return EFalse;
+                iListBox->SetCurrentItemIndex( aNodes.Count() - 1 );
                 }
-                
-            //mark all of the mandatory items
-            TInt mandCount = mands.Count();
-            if ( mandCount > 0 && aMark )
-                {
-                for( TInt j = 0; j < mandCount; j++ )
-                    {
-                    TInt mandNodeInd = iAllNodes.Find( mands[j] );
-                    iAllNodes[mandNodeInd]->Base().SetSelected( aMark );
-                    if ( iAllNodes[mandNodeInd]->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal )
-                        {
-                        // mark also all dependencies of a mandatory item
-                        MIAUpdateNode* dependencyNode = static_cast<MIAUpdateNode*>( iAllNodes[mandNodeInd] );
-                        RPointerArray<MIAUpdateNode> dependencies;
-                        CleanupClosePushL( dependencies );
-                        IAUpdateDepUtils::GetDependenciesL( *dependencyNode, iAllNodes, dependencies );
-                        for( TInt k = 0; k < dependencies.Count(); k++ )
-                            {
-                            TInt depNodeInd = iAllNodes.Find( dependencies[k] );
-                            iAllNodes[depNodeInd]->Base().SetSelected( ETrue );
-                            }
-                        CleanupStack::PopAndDestroy( &dependencies );
-                        }
-                    }
-                }
-            if ( aMark )
-                {
-                CleanupStack::PopAndDestroy( &mands );
-                }
+            }*/
             
-            if ( depCount > 0 || mandCount > 0 )
-                {
-                SetSelectedIndicesL();
-                }
-            else
-                {
-                UpdateSelectionInfoInNaviPaneL();   
-                }
-               
-            if ( aMark )
-                {
-                SetMiddleSKTextL( ETrue, ETrue );
-                }
-            else
-                {
-                SetMiddleSKTextL( ETrue, EFalse );  
-                }        
-            }  
-        DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() );
-        return ETrue;
+        //iListBox->HandleItemAdditionL();
         }
-    return EFalse;
-    }
+     connect(selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
+                    this, SLOT(handleSelectionChanged(QItemSelection)));     
     
-    
-   
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::SetMiddleSKTextL
-// Middle soft key label to be set 
-// -----------------------------------------------------------------------------
-//    
-void CIAUpdateMainView::SetMiddleSKTextL( TBool aVisible, TBool aSelected )
-    {
-	CEikButtonGroupContainer* cbaGroup = Cba();
-	if ( cbaGroup )
-        {
-        cbaGroup->RemoveCommandFromStack( CEikButtonGroupContainer::EMiddleSoftkeyPosition, iLastCommandId );
-        if ( aVisible )
-            {
-        	HBufC* middleSKText = NULL;
-    	    if ( aSelected )
-        	    {
-        	    middleSKText = StringLoader::LoadLC( R_IAUPDATE_MSK_UNMARK );
-                TPtr mskPtr = middleSKText->Des();
-    	        cbaGroup->AddCommandToStackL(  
-    	                    CEikButtonGroupContainer::EMiddleSoftkeyPosition, 
-    	                    EAknSoftkeyUnmark, 
-    	                    mskPtr );
-    	        iLastCommandId = EAknSoftkeyUnmark;            
-                }
-            else
-                {
-                middleSKText = StringLoader::LoadLC( R_IAUPDATE_MSK_MARK );
-        	    TPtr mskPtr = middleSKText->Des();
-    	        cbaGroup->AddCommandToStackL( 
-    	                  CEikButtonGroupContainer::EMiddleSoftkeyPosition, 
-    	                  EAknSoftkeyMark, 
-    	                  mskPtr );
-    	        iLastCommandId = EAknSoftkeyMark;
-        	    }
-        	CleanupStack::PopAndDestroy( middleSKText );
-            }
-        }
-    }
+     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh end");
+     }
 
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::GetSelectedNodesL
-// Get selected (marked) nodes
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateMainView::GetSelectedNodesL( RPointerArray<MIAUpdateAnyNode>& aSelectedNodes ) const
-    {
-    for( TInt i = 0; i < iAllNodes.Count(); ++i )
-        {
-        if ( iAllNodes[i]->Base().IsSelected() )
-            {
-        	User::LeaveIfError( aSelectedNodes.Append( iAllNodes[i] ) );
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::GetMandatoryItemsL
-// Get selected (marked) nodes
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateMainView::GetMandatoryNodesL( RPointerArray<MIAUpdateAnyNode>& aMandNodes ) const
-    {
-    for( TInt i = 0; i < iAllNodes.Count(); ++i )
-        {
-        if ( iAllNodes[i]->Base().Importance() == MIAUpdateBaseNode::EMandatory )
-            {
-            User::LeaveIfError( aMandNodes.Append( iAllNodes[i] ) );
-            }
-        }
-    }
 
 
 
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::SetSelectedIndicesL
-// Indices of selected items are passed to container 
-// -----------------------------------------------------------------------------
-//  
-void CIAUpdateMainView::SetSelectedIndicesL()
-    {
-    RArray<TInt> indices;
-        
-    CleanupClosePushL( indices );
-
-    for( TInt i = 0; i < iAllNodes.Count(); ++i )
-        {
-    	if ( iAllNodes[i]->Base().IsSelected() )
-    	    {
-    		User::LeaveIfError( indices.Append( i ) );
-    	    }
-        }
-        
-    iContainer->SetSelectedIndicesL( indices );
-    UpdateSelectionInfoInNaviPaneL();
- 
-    CleanupStack::PopAndDestroy( &indices );
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::NodeIndex
-// Get index of node 
-// -----------------------------------------------------------------------------
-//  
-TInt CIAUpdateMainView::NodeIndex( const MIAUpdateAnyNode& aNode ) const
-    {
-    TInt result = -1;
-    
-    for( TInt i = 0; i < iAllNodes.Count(); ++i )
-        {
-        if( &aNode == iAllNodes[i] )
-            {
-            result = i;
-            break;
-            }
-        }
-    return result;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::UpdateStatusPaneL
-// Update title in status pane
-// -----------------------------------------------------------------------------
-// 
-    
-void CIAUpdateMainView::UpdateStatusPaneL()
-    {
-    CAknTitlePane* titlePane = 
-            static_cast< CAknTitlePane* >( StatusPane()->ControlL(
-                                           TUid::Uid( EEikStatusPaneUidTitle ) ) );
-    HBufC* text = StringLoader::LoadLC( R_IAUPDATE_TEXT_TITLE_MAIN_VIEW );
-    titlePane->SetTextL( *text );
-    CleanupStack::PopAndDestroy( text );        
-    }
+void IAUpdateMainView::handleStartUpdate()
+{
+     
+}
 
 
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::UpdateSelectionInfoInNaviPaneL
-// Update selection information in status pane
-// -----------------------------------------------------------------------------
-// 
-//
-void CIAUpdateMainView::UpdateSelectionInfoInNaviPaneL()
-    {
-    RemoveSelectionInfoInNaviPane();
-    
-    if ( iAllNodes.Count() > 0 )
-        {
-        //show empty navi pane when firmware is selected but no size info or it is NSU
-        if ( (iAllNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw) && iAllNodes[0]->Base().IsSelected() )
-            {
-            MIAUpdateFwNode* fwnode = static_cast<MIAUpdateFwNode*>( iAllNodes[0] );
-            if ( (iAllNodes[0]->Base().ContentSizeL() == 0) || (fwnode->FwType() == MIAUpdateFwNode::EFotiNsu)  )
-                {
-                return;
-                }
-            }
-        
-        if ( !iNaviPane )
-            {
-    	    iNaviPane = static_cast<CAknNavigationControlContainer*>
-               ( StatusPane()->ControlL( TUid::Uid(EEikStatusPaneUidNavi ) ) );
-            }
-        TInt selectedSizeInBytes = 0;
-        for( TInt i = 0; i < iAllNodes.Count(); ++i )
-            {
-            if ( iAllNodes[i]->Base().IsSelected() )
-                {
-            	selectedSizeInBytes += iAllNodes[i]->Base().ContentSizeL();
-                }
-            }
-                
-        
-        TInt resourceId = 0;
-        TInt selectedSize;
-        if ( selectedSizeInBytes >= KMaxShownInKiloBytes )
-            {
-    	    resourceId = R_IAUPDATE_NAVIPANE_MEGABYTE;
-    	    selectedSize = selectedSizeInBytes / KMegaByte;
-    	    if ( selectedSizeInBytes % KMegaByte != 0 )
-    	        {
-    	    	selectedSize++;
-    	        }
-            }
-        else 
-            {
-    	    resourceId = R_IAUPDATE_NAVIPANE_KILOBYTE;
-    	    selectedSize = selectedSizeInBytes / KKiloByte;
-    	    if ( selectedSizeInBytes % KKiloByte != 0 )
-    	        {
-    	    	selectedSize++;
-    	        }
-            }
-     
-        CArrayFix<TInt>* numberArray = 
-                 new ( ELeave ) CArrayFixFlat<TInt>( KSelInfoArrayGranularity );
-        CleanupStack::PushL( numberArray );
-        numberArray->AppendL( CountOfSelectedItems() ); 
-        numberArray->AppendL( iAllNodes.Count() );
-        numberArray->AppendL( selectedSize );
-    
-        HBufC* selectionInfo = StringLoader::LoadLC( resourceId, 
-                                                     *numberArray );
-        TPtr ptr = selectionInfo->Des();
-        AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); 
-            
-        iDecorator = iNaviPane->CreateNavigationLabelL( *selectionInfo );
+void IAUpdateMainView::handleSettings()
+{
+}
 
-        iNaviPane->PushL( *iDecorator );
-        
-        CleanupStack::PopAndDestroy( selectionInfo ); 
-        CleanupStack::PopAndDestroy( numberArray );	
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::RemoveSelectionInfoInNaviPane
-// Remove existing selection info (created by main view) from navi pane
-// -----------------------------------------------------------------------------
-// 
+void IAUpdateMainView::handleDisclaimer()
+{
+    CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC();
+    agreement->ShowAgreementL();
+    CleanupStack::PopAndDestroy( agreement);
+}
 
-void CIAUpdateMainView::RemoveSelectionInfoInNaviPane()
-    {
-    if ( iNaviPane && iDecorator )
-        {
-    	iNaviPane->Pop( iDecorator );
-    	delete iDecorator;
-    	iDecorator = NULL;
-        }
-    }
- 
-// -----------------------------------------------------------------------------
-// CIAUpdateMainView::ShowDependenciesFoundDialogL
-// 
-// -----------------------------------------------------------------------------
-//  
-TBool CIAUpdateMainView::ShowDependenciesFoundDialogL( TDesC& aText ) const
-    {
-	CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( aText );
-    dlg->PrepareLC( R_IAUPDATE_MESSAGE_QUERY );
-    CAknPopupHeadingPane* headingPane = dlg->Heading();
-    HBufC* title = StringLoader::LoadLC( R_IAUPDATE_DEPENDENCY_TITLE );
-    headingPane->SetTextL( *title );
-    CleanupStack::PopAndDestroy( title );
-  
-    dlg->ButtonGroupContainer().SetCommandSetL( 
-                                  R_IAUPDATE_SOFTKEYS_CONTINUE_CANCEL__CONTINUE );
+void IAUpdateMainView::handleSelectionChanged(QItemSelection)
+{
 
-    return( dlg->RunLD() == EAknSoftkeyOk );
-    }
-    
-// ---------------------------------------------------------------------------
-// CIAUpdateMainView::CountOfSelectedItems
-// 
-// ---------------------------------------------------------------------------
-//     
-TInt CIAUpdateMainView::CountOfSelectedItems() const
-    {
-    TInt countOfSelectedItems = 0; 
-    for( TInt i = 0; i < iAllNodes.Count(); ++i )
-        {
-        if ( iAllNodes[i]->Base().IsSelected() )
-            {
-        	countOfSelectedItems++;
-            }
-        }
-    return countOfSelectedItems;   	
-    }
+}
 
-// ---------------------------------------------------------------------------
-// CIAUpdateMainView::ShowUpdateCannotOmitDialogL
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateMainView::ShowUpdateCannotOmitDialogL() const
-    {
-    HBufC* msgText = StringLoader::LoadLC( R_IAUPDATE_CANNOT_OMIT );
-    CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-    dlg->ExecuteLD( R_IAUPDATE_INFORMATION_QUERY, *msgText  );         
-    CleanupStack::PopAndDestroy( msgText );
-    }
-    
-// End of File
-    
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/src/iaupdatemainwindow.cpp	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* 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 module contains the implementation of IAUpdateMainWindow 
+*                class member functions.
+*
+*/
+
+#include <hbdocumentloader.h>
+
+#include "iaupdatemainwindow.h"
+#include "iaupdateengine.h"
+#include "iaupdatemainview.h"
+#include "iaupdatehistoryview.h"
+
+
+// ViewManager Constructor
+IAUpdateMainWindow::IAUpdateMainWindow()
+{
+    // Add the views to the main window
+    //addHistoryView();
+    addMainView();
+    // show the main window (which will display the last view that was added)
+    show();   //temp
+}
+
+// Destructor
+IAUpdateMainWindow::~IAUpdateMainWindow()
+{
+}
+
+// Methods to add views to the main window
+void IAUpdateMainWindow::addMainView()
+{
+    mMainView = new IAUpdateMainView();
+    addView(mMainView);
+}
+
+void IAUpdateMainWindow::addHistoryView()
+{
+    mHistoryView = new IAUpdateHistoryView();
+    addView(mHistoryView);
+}
+
+
+// Slots to handle view change
+void IAUpdateMainWindow::toMainView()
+{
+    setCurrentView(mMainView);
+}
+
+void IAUpdateMainWindow::refreshMainView(const RPointerArray<MIAUpdateNode>& nodes,
+                                         const RPointerArray<MIAUpdateFwNode>& fwNodes,
+                                         int error)
+{
+    mMainView->refresh(nodes,fwNodes,error);  
+    show(); 
+} 
+
+
+void IAUpdateMainWindow::toHistoryView()
+{
+    setCurrentView(mHistoryView);
+}
+
+
+
--- a/iaupdate/IAD/ui/src/iaupdatenavipanehandler.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 "iaupdatenavipanehandler.h"
-#include "iaupdatedebug.h"
-#include <aknnavilabel.h>
-#include <eikspane.h>
-#include <avkon.hrh>
-
-/*******************************************************************************
- * class CIAUpdateNaviPaneHandler
- *******************************************************************************/
-
-
-// -----------------------------------------------------------------------------
-// Destructor
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateNaviPaneHandler::~CIAUpdateNaviPaneHandler()
-    {
-   	if (iNaviDecorator)
-		{
-		if (iNaviPane && iNavidecoratorPushed)
-			{
-			iNaviPane->Pop(iNaviDecorator);
-			}
-	
-		delete iNaviDecorator;
-		}
-		
-	if (iNaviPane && iNavipanePushed)
-		{
-		iNaviPane->Pop(); // restore previous navi pane
-		}
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateNaviPaneHandler::CIAUpdateNaviPaneHandler
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateNaviPaneHandler::CIAUpdateNaviPaneHandler(CEikStatusPane* aStatusPane) 
-    : iStatusPane(aStatusPane)
-	{
-	iNavidecoratorPushed = EFalse;
-	iNavipanePushed = EFalse;
-	
-	if (iStatusPane)
-		{
-		TRAP_IGNORE( 
-		 iNaviPane = (CAknNavigationControlContainer*)iStatusPane->ControlL( 
-		                                 TUid::Uid(EEikStatusPaneUidNavi) ) );
-		}
-	}
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateNaviPaneHandler::SetNaviPaneTitleL
-// 
-// ----------------------------------------------------------------------------
-//
-void CIAUpdateNaviPaneHandler::SetNaviPaneTitleL(const TDesC& aTitle)
-	{
-	if (!iStatusPane || !iNaviPane)
-		{
-		return;
-		}
-
-    if (iNaviDecorator)
-        {
-        CAknNaviLabel* naviLabel = static_cast<CAknNaviLabel*>(iNaviDecorator->DecoratedControl());
-        if (naviLabel)
-        	{
-        	naviLabel->SetTextL(aTitle);
-        	iNaviDecorator->DrawDeferred();
-        	}
-        }
-     else
-    	{
-    	iNaviDecorator = iNaviPane->CreateNavigationLabelL(aTitle);
-    	iNaviPane->PushL(*iNaviDecorator); // activate navi label in navi pane
-    	iNavidecoratorPushed = ETrue;
-    	}
-	}
-
-
-    
-//  End of File  
--- a/iaupdate/IAD/ui/src/iaupdateprogressdialog.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
-* Copyright (c) 2008 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 the implementation of CIAUpdateProgressDialog
-*                class member functions.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <eikprogi.h>
-
-#include "iaupdateprogressdialog.h"
-#include "iaupdatewaitdialogobserver.h"
-
-
-
-// ========================= MEMBER FUNCTIONS ================================
-
-// -----------------------------------------------------------------------------
-// CIAUpdateProgressDialog::CIAUpdateProgressDialog
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateProgressDialog::CIAUpdateProgressDialog( CEikDialog** aSelfPtr, 
-                                                  TBool aVisibilityDelayOff )
-    :CAknProgressDialog( aSelfPtr, aVisibilityDelayOff )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateProgressDialog::~CIAUpdateProgressDialog
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CIAUpdateProgressDialog::~CIAUpdateProgressDialog()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CIAUpdateProgressDialog::OkToExitL()
-// called by framework when the Softkey is pressed. 
-// On cancel either stop installation or exit 
-// ---------------------------------------------------------------------------
-//
-TBool CIAUpdateProgressDialog::OkToExitL( TInt aButtonId )
-    {
-    TBool result( ETrue );
-    
-    if ( iCallback )
-        {
-        result = iCallback->HandleDialogExitL( aButtonId );
-        }
-
-    return result;
-    }
-
-// ---------------------------------------------------------------------------
-// CIAUpdateProgressDialog::SetCallback
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateProgressDialog::SetCallback( MIAUpdateWaitDialogObserver* aCallback )
-    {
-    iCallback = aCallback;
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateProgressDialog::SetProgressDialogFinalValueL
-// Set final value for the progress bar in progress dialog.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateProgressDialog::SetProgressDialogFinalValueL( TInt aValue )
-    {
-    if ( aValue != iMaxProgress )
-        {
-    	CEikProgressInfo* progressInfo = GetProgressInfoL();
-        progressInfo->SetFinalValue( aValue );
-        iMaxProgress = aValue;
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateProgressDialog::UpdateProgressDialogValueL
-// Increments the progress bar in progress dialog.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateProgressDialog::UpdateProgressDialogValueL( TInt aValue )
-    {
-    CEikProgressInfo* progressInfo = GetProgressInfoL();
-    progressInfo->SetAndDraw( aValue );
-    }
-
-// End of File
--- a/iaupdate/IAD/ui/src/iaupdatequeryhistory.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatequeryhistory.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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"
@@ -21,7 +21,6 @@
 
 #include "iaupdatequeryhistory.h"
 #include "iaupdatedebug.h"
-#include "iaupdatedialogutil.h"
 
 #include <bautils.h>  // bafl.lib 
 #include <s32file.h>  // estor.lib
--- a/iaupdate/IAD/ui/src/iaupdateroaminghandler.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateroaminghandler.cpp	Mon May 03 12:38:03 2010 +0300
@@ -20,16 +20,13 @@
 
 //INCLUDES
 #include <centralrepository.h>
-#include <avkon.hrh>
-#include <avkon.rsg>
-#include <iaupdate.rsg>
 
 #include "iaupdateroaminghandler.h"
 #include "iaupdateroaminghandlerobserver.h"
 #include "iaupdatenetworkregistration.h"
 #include "iaupdateprivatecrkeys.h"
-#include "iaupdatedialogutil.h"
-#include "iaupdate.hrh"
+
+
 
 // ================= MEMBER FUNCTIONS =======================
 
--- a/iaupdate/IAD/ui/src/iaupdateserver.cpp	Fri Apr 16 15:05:20 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:   This module contains the implementation of CIAUpdateServer class 
-*                member functions.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <coemain.h>
-
-#include "iaupdateserver.h"
-#include "iaupdatesession.h"
-#include "iaupdateappui.h"
-#include "iaupdateuicontroller.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CIAUpdateServer::CIAUpdateServer
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateServer::CIAUpdateServer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateServer::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateServer::ConstructL()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateServer::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateServer* CIAUpdateServer::NewL()
-    {
-    CIAUpdateServer* self = new (ELeave) CIAUpdateServer();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );    
-    return self;
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateServer::~CIAUpdateServer
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CIAUpdateServer::~CIAUpdateServer()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateServer::CreateServiceL
-// Service creation function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-// 
-CApaAppServiceBase* CIAUpdateServer::CreateServiceL( TUid /*aServiceType*/ ) const
-    {
-   	return new (ELeave) CIAUpdateSession();	
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateServer::HandleAllClientsClosed
-// All clients are closed. 
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateServer::HandleAllClientsClosed()
-    {
-    TBool closingAllowed = ETrue;
-    CIAUpdateAppUi* appUi = 
-        static_cast<CIAUpdateAppUi*>( CEikonEnv::Static()->EikAppUi() );   
-    if ( appUi )
-        {
-    	if ( appUi->Controller() )
-    	    {
-    		closingAllowed = appUi->Controller()->ClosingAllowedByClient();
-    	    }
-        }
-    if ( closingAllowed ) 
-        {
-    	CAknAppServer::HandleAllClientsClosed();
-        }
-    else
-        {
-        if ( appUi )
-            {
-    	    TRAP_IGNORE( appUi->HandleAllClientsClosedL() );
-            }	
-        }
-    }
-    
-
-	
-//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/src/iaupdateserviceprovider.cpp	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,212 @@
+/*
+* 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 module contains the implementation of IAUpdateServiceProvider class 
+*                member functions.
+*
+*/
+
+#include <iaupdateparameters.h>
+#include <iaupdateresult.h>
+#include "iaupdateserviceprovider.h"
+#include "iaupdateengine.h"
+#include "iaupdatedebug.h"
+
+const TSecureId KSIDBackgroundChecker = 0x200211f4;
+
+
+IAUpdateServiceProvider::IAUpdateServiceProvider(IAUpdateEngine& engine)
+: XQServiceProvider( QString("com.nokia.services.swupdate.swupdate_interface")),
+  mEngine(&engine),
+  mCurrentRequest(NoOperation)
+    
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::IAUpdateServiceProvider() begin");
+    publishAll();
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::IAUpdateServiceProvider() end");
+}
+
+IAUpdateServiceProvider::~IAUpdateServiceProvider()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::~IAUpdateServiceProvider()");
+}
+
+void IAUpdateServiceProvider::startedByLauncher(bool refreshFromNetworkDenied)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::startedByLauncher() begin");
+    mAsyncReqId = setCurrentRequestAsync();
+    mEngine->StartedByLauncherL(refreshFromNetworkDenied);
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::startedByLauncher() end");
+}
+
+void IAUpdateServiceProvider::checkUpdates(QString stringWgId, 
+                                           QString stringUid,  
+                                           QString searchCriteria, 
+                                           QString commandLineExecutable,
+                                           QString commandLineArguments,
+                                           QString stringShowProgress,
+                                           QString stringImportance,
+                                           QString stringType,
+                                           QString stringRefresh)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::checkUpdates() begin");
+    mAsyncReqId = setCurrentRequestAsync();
+    mCurrentRequest = CheckUpdates;
+    CIAUpdateParameters* params = NULL;
+    TRAP_IGNORE(params = CIAUpdateParameters::NewL());
+    if (params)
+    {
+        SetParams(*params, 
+                  stringUid,
+                  searchCriteria,
+                  commandLineExecutable,
+                  commandLineArguments,
+                  stringShowProgress,
+                  stringImportance,
+                  stringType,
+                  stringRefresh);
+  
+        if ( requestInfo().clientSecureId() != KSIDBackgroundChecker )      
+        {
+            // other processes than backroundchecker are not allowed to cause refresh from network 
+            params->SetRefresh( EFalse );
+        }
+    mEngine->CheckUpdatesRequestL(stringWgId.toInt(),params);
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::checkUpdates() end");
+    }
+    
+}
+
+void IAUpdateServiceProvider::showUpdates(QString stringWgId, 
+                                          QString stringUid,  
+                                          QString searchCriteria, 
+                                          QString commandLineExecutable,
+                                          QString commandLineArguments,
+                                          QString stringShowProgress,
+                                          QString stringImportance,
+                                          QString stringType,
+                                          QString stringRefresh)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::showUpdates() begin");
+    mAsyncReqId = setCurrentRequestAsync();
+    mCurrentRequest = ShowUpdates;
+    CIAUpdateParameters* params = NULL;
+    TRAP_IGNORE(params = CIAUpdateParameters::NewL());
+    if (params)
+    {
+        SetParams(*params, 
+                  stringUid,
+                  searchCriteria,
+                  commandLineExecutable,
+                  commandLineArguments,
+                  stringShowProgress,
+                  stringImportance,
+                  stringType,
+                  stringRefresh);
+    } 
+    mEngine->ShowUpdatesRequestL(stringWgId.toInt(),params);
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::showUpdates() end");
+}
+
+
+
+void IAUpdateServiceProvider::updateQuery(QString stringWgId)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::updateQuery() begin");
+    mAsyncReqId = setCurrentRequestAsync();
+    mCurrentRequest = UpdateQuery;
+    mEngine->ShowUpdateQueryRequestL( stringWgId.toInt(), requestInfo().clientSecureId() );        
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::updateQuery() end");
+}
+
+
+
+void IAUpdateServiceProvider::completeLauncherLaunch(int error)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::completeLauncherLaunch() begin");
+    completeRequest(mAsyncReqId, QVariant(error));    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::completeLauncherLaunch() end");
+}
+
+void IAUpdateServiceProvider::completeCheckUpdates(int countOfAvailableUpdates, int error)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::completeCheckUpdates() begin");
+    QList<QVariant> resultList;
+    resultList.append(QVariant(error));
+    resultList.append(QVariant(countOfAvailableUpdates));
+    completeRequest(mAsyncReqId, QVariant(resultList));
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::completeCheckUpdates() end");
+}
+
+void IAUpdateServiceProvider::completeShowUpdates(const CIAUpdateResult* updateResult, int error)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::completeShowUpdates() begin");
+    QList<QVariant> resultList;
+    resultList.append(QVariant(error));
+    if (updateResult)
+    {    
+        resultList.append(QVariant(updateResult->SuccessCount()));
+        resultList.append(QVariant(updateResult->FailCount()));
+        resultList.append(QVariant(updateResult->CancelCount()));
+        delete updateResult;
+    }    
+    else
+    {
+        resultList.append(QVariant(0));
+        resultList.append(QVariant(0));
+        resultList.append(QVariant(0));
+    }
+    completeRequest(mAsyncReqId, QVariant(resultList));
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::completeShowUpdates() end");
+}
+
+void IAUpdateServiceProvider::completeUpdateQuery(bool updateNow, int error)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::completeUpdateQuery() begin");
+    QList<QVariant> resultList;
+    resultList.append(QVariant(error));
+    resultList.append(QVariant(updateNow));
+    completeRequest(mAsyncReqId, QVariant(resultList));
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::completeUpdateQuery() end");
+}
+
+
+void IAUpdateServiceProvider::SetParams(CIAUpdateParameters& params,
+                                        QString& stringUid,  
+                                        QString& searchCriteria, 
+                                        QString& commandLineExecutable,
+                                        QString& commandLineArguments,
+                                        QString& stringShowProgress,
+                                        QString& stringImportance,
+                                        QString& stringType,
+                                        QString& stringRefresh) const
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::SetParams() begin");
+    params.SetUid(TUid::Uid(stringUid.toInt()));
+    TPtrC ptr(reinterpret_cast<const TText*>(searchCriteria.constData()));
+    params.SetSearchCriteriaL(ptr);
+    ptr.Set(reinterpret_cast<const TText*>(commandLineExecutable.constData()));
+    params.SetCommandLineExecutableL(ptr);
+    ptr.Set(reinterpret_cast<const TText*>(commandLineArguments.constData()));
+    HBufC8* arguments8 = HBufC8::NewL(ptr.Length());
+    TPtr8 ptr8(arguments8->Des());
+    ptr8.Copy(ptr);
+    params.SetCommandLineArgumentsL(ptr8);
+    params.SetShowProgress(stringShowProgress.toInt());
+    params.SetImportance(stringImportance.toUInt());
+    params.SetType(stringType.toUInt());
+    params.SetRefresh(stringRefresh.toInt());
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateServiceProvider::SetParams() end");
+}
+
+
--- a/iaupdate/IAD/ui/src/iaupdatesession.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,398 +0,0 @@
-/*
-* Copyright (c) 2007-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 module contains the implementation of CIAUpdateSession class 
-*                member functions.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <w32std.h>
-#include <apgtask.h>
-#include <iaupdateparameters.h>
-#include <iaupdateresult.h>
-
-#include "iaupdatesession.h"
-#include "iaupdateserver.h"
-
-// Parameters are transmitted from the client side to the server
-#include "iaupdatetools.h"
-#include "iaupdateclientdefines.h"
-#include "iaupdateappui.h"
-#include "iaupdatelauncheruids.h"
-#include "iaupdatedebug.h"
-
-// CONSTANTS
-const TSecureId KSIDBackgroundChecker = 0x200211f4;
-const TSecureId KSIDLauncher = KIAUpdateLauncherUid;
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSession::CIAUpdateSession
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateSession::CIAUpdateSession()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::CIAUpdateSession()");
-    iEikEnv = CEikonEnv::Static();
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateSession::CIAUpdateSession
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateSession::~CIAUpdateSession()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::~CIAUpdateSession() begin");    
-    CIAUpdateAppUi* appUi = 
-        static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
-    if ( appUi ) 
-        {
-    	appUi->HandleObserverRemoval();
-        }
-    delete iMessage;
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::~CIAUpdateSession() end");  
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSession::ServiceL
-// Handles the received message.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSession::ServiceL( const RMessage2& aMessage )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::ServiceL() begin");
-    // Dispatch the message in trap harness.
-    TRAPD( result, HandleRequestL( aMessage ) );
-    // If HandleRequest Left, the message has to be completed
-    // here. Otherwise, the RequestCompleted callback will be called
-    // when the operations finishes
-    if ( result != KErrNone )   
-        {
-        IAUPDATE_TRACE_1("[IAUPDATE] HandleRequestL leave with error: %d", result );
-        aMessage.Complete( result );
-        } 
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::ServiceL() end");
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSession::ServiceError
-// Called back by the server framework if this sessions RunL function returns an
-// error.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSession::ServiceError( const RMessage2& aMessage, TInt aError )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::ServiceError() begin");
-    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError );
-    // A bad descriptor error implies a badly programmed client, so panic it;
-    // otherwise use the default handling (report the error to the client)
-    if ( aError == KErrBadDescriptor )
-        {
-        //PanicClient( aMessage, ECIAUpdatePanicBadDescriptor );
-        }
-    CAknAppServiceBase::ServiceError( aMessage, aError );   
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::ServiceError() end");
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSession::CreateL
-// Completes construction of this server-side client session object.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSession::CreateL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::CreateL() begin");
-    CAknAppServiceBase::CreateL();   
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::CreateL() end");
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSession::RequestCompleted
-// @see MIAUpdateRequestObserver::RequestCompleted
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSession::RequestCompleted( CIAUpdateResult* aResult, 
-                                         TInt aCountOfAvailableUpdates,  
-                                         TBool aUpdateNow, 
-                                         TInt aError )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::RequestCompleted() begin");
-    IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError );
-
-    if ( !iMessage ) //be sure that there is still message to complete
-        {
-        IAUPDATE_TRACE("[IAUPDATE] No message to complete");
-        IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::RequestCompleted() end");
-        return;
-        }
-
-    IAUpdateClientDefines::TIAUpdateServerFunctions functionId =
-        static_cast<IAUpdateClientDefines::TIAUpdateServerFunctions>( iMessage->Function() );
- 
-    TInt error( KErrNone );       
-
-    switch( functionId )
-        {
-        case IAUpdateClientDefines::EIAUpdateServerCheckUpdates:
-            {
-            TPckg<TInt> availableUpdates( aCountOfAvailableUpdates ); 
-            TPtr8 ptr1( availableUpdates );
-            TRAP( error, iMessage->WriteL( 1, ptr1 ) );
-            break;	
-            }
-             
-        case IAUpdateClientDefines:: EIAUpdateServerShowUpdateQuery:
-            {
-            TPckg<TInt> updateNow( aUpdateNow ); 
-            TPtr8 ptr1( updateNow );
-            TRAP( error, iMessage->WriteL( 1, ptr1 ) );
-            break;	
-            }
-
-        case IAUpdateClientDefines::EIAUpdateServerShowUpdates:
-            {
-            TPckg<TInt> successCount( aResult->SuccessCount() ); 
-            TPtr8 ptr1( successCount ); 
-  
-            TPckg<TInt> failCount( aResult->FailCount() );
-            TPtr8 ptr2( failCount );
-         	
-            TPckg<TInt> cancelCount( aResult->CancelCount() );
-            TPtr8 ptr3( cancelCount );
-    
-            TRAP( error,
-                  iMessage->WriteL( 1, ptr1 );
-                  iMessage->WriteL( 2, ptr2 );
-                  iMessage->WriteL( 3, ptr3 ); );            
-            break;	
-            }
-        case IAUpdateClientDefines::EIAUpdateServerStartedByLauncher:
-            break;    
-        default:
-            // We should never come here.
-            break;
-        }            
-
-    if ( error == KErrNone )
-        {
-        // Writing of the data in to the message went ok.
-        // So, nothing to inform about that.
-        // Insert possible error code of the update operation.
-        error = aError;
-        }
-
-    delete aResult;
-    aResult = NULL;
-
-    iMessage->Complete( error );
-    delete iMessage;
-    iMessage = NULL;
-                
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::RequestCompleted() end");
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSession::Server
-// Returns reference to the server.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-CIAUpdateServer& CIAUpdateSession::Server()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::Server()");
-    return *static_cast<CIAUpdateServer*>( const_cast<CServer2*>
-                                         ( CSession2::Server() ) );
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSession::HandleRequestL
-// Handles the request.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSession::HandleRequestL( const RMessage2& aMessage )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::HandleRequestL() begin");    
-    
-    CIAUpdateAppUi* appUi = 
-        static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );     
-    // First value is the function number
-    IAUpdateClientDefines::TIAUpdateServerFunctions functionId =
-        static_cast<IAUpdateClientDefines::TIAUpdateServerFunctions>( aMessage.Function() );
-    IAUPDATE_TRACE_1("[IAUPDATE] function id: %d", functionId );
-      
-    if ( functionId == IAUpdateClientDefines::EIAUpdateServerCancel )  
-        {
-        appUi->PotentialCancel();
-        if ( iMessage ) //complete possible ongoing request
-            {
-        	iMessage->Complete( KErrCancel );
-        	delete iMessage;
-        	iMessage = NULL;  
-            }
-        // Because cancel is sent synchronously from the client side,
-        // aMessage is different than the iMessage for other operation
-        // that is currently going on asynchronously.
-        // So, RequestCompleted above closed that connection.
-        // Now, inform the caller of the cancel operation
-        // that cancellation was success.
-        aMessage.Complete( KErrNone );
-        IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::HandleRequestL() end");
-    	return;
-        }
-    
-    if ( functionId == IAUpdateClientDefines::EIAUpdateServerToForeground )  
-        {
-        appUi->HandleClientToForegroundL();
-        aMessage.Complete( KErrNone );
-        IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::HandleRequestL() end");
-        return;
-        }
-    
-    if ( functionId == IAUpdateClientDefines::EIAUpdateServerSendWgId )  
-        {
-        TPckgBuf<TInt> wgIdPkg( 0 );
-        aMessage.ReadL( 0, wgIdPkg ); 
-        TInt wgId = wgIdPkg(); 
-        appUi->SetClientWgId( wgId );
-        aMessage.Complete( KErrNone );
-        IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::HandleRequestL() end");
-        return;
-        }
-    
-        
-    if ( iMessage )
-        {
-        // This session is used in a wrong way because the
-        // old operation has not been completed before new one is
-        // started.
-        User::Leave( KErrInUse );
-        }
-        
-    iMessage = new( ELeave ) RMessage2( aMessage );
-    if ( functionId == IAUpdateClientDefines::EIAUpdateServerStartedByLauncher )
-        {
-        TPckgBuf<TBool> refreshFromNetworkDeniedPkg( 0 );
-        aMessage.ReadL( 0, refreshFromNetworkDeniedPkg ); 
-        TBool refreshFromNetworkDenied = refreshFromNetworkDeniedPkg(); 
-    	appUi->StartedByLauncherL( *this, refreshFromNetworkDenied );
-        }
-    else if ( functionId == IAUpdateClientDefines::EIAUpdateServerShowUpdateQuery )  
-        {
-        // Handle the update query dialog request
-        TUint id = aMessage.SecureId().iId;
-    	appUi->ShowUpdateQueryRequestL( *this, id ); 
-        }
-    else
-        {
-        // Handle update operation related requests.
-        HBufC8* data = NULL;
-        data = HBufC8::NewLC( aMessage.GetDesLength( 0 ) );
-        TPtr8 ptr( data->Des() );            
-        aMessage.ReadL( 0, ptr );
-    
-        CIAUpdateParameters* params( CIAUpdateParameters::NewLC() );
-        IAUpdateTools::InternalizeParametersL( *params, *data );
-        // Do not destroy, because ownership of params is transferred
-        // below.
-        CleanupStack::Pop( params );
-        CleanupStack::PopAndDestroy( data );
-        
-        if ( aMessage.SecureId() != KSIDBackgroundChecker )      
-            {
-            // other processes than backroundchecker are not allowed to cause refresh from network 
-            params->SetRefresh( EFalse );
-            }
-        switch( functionId )
-            {
-            case IAUpdateClientDefines::EIAUpdateServerCheckUpdates:
-                appUi->CheckUpdatesRequestL( *this, params );
-                break;
-
-            case IAUpdateClientDefines::EIAUpdateServerShowUpdates:
-                appUi->ShowUpdatesRequestL( *this, params );
-                break;
-                    
-            default:
-            // We should never come here
-                delete params;
-                params = NULL;
-                break;
-            }    
-        }
-     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::HandleRequestL() end"); 
-     }    
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSession::SecurityCheckL
-// Virtual framework function that is called on receipt of a message from the
-// client. This allows the service implementation to define a security policy
-// for messages from the client.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-CPolicyServer::TCustomResult CIAUpdateSession::SecurityCheckL( const RMessage2& aMsg,
-                                                             TInt& /*aAction*/,
-                                                             TSecurityInfo& /*aMissing*/ )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::SecurityCheckL() begin");
-    
-    CPolicyServer::TCustomResult result = CPolicyServer::EFail; 
-    switch ( aMsg.Function() )
-        {
-        case IAUpdateClientDefines::EIAUpdateServerStartedByLauncher:
-            if ( aMsg.SecureId() == KSIDLauncher )  
-                {
-                result = CPolicyServer::EPass;
-                }
-            break;
-        case IAUpdateClientDefines::EIAUpdateServerCheckUpdates:
-        case IAUpdateClientDefines::EIAUpdateServerShowUpdates:
-        // no capability check is needed because SID is checked later
-        // that means that only bacgkroundchecker is allowed to initiate network refresh
-            
-        case IAUpdateClientDefines::EIAUpdateServerShowUpdateQuery:
-        case IAUpdateClientDefines::EIAUpdateServerCancel:
-        case IAUpdateClientDefines::EIAUpdateServerToForeground:
-        case IAUpdateClientDefines::EIAUpdateServerSendWgId:
-        // No capabilities needed
-            result = CPolicyServer::EPass;
-            break;
-
-        default:
-            // Not recognized message
-            result = CPolicyServer::EFail;
-        }
-    IAUPDATE_TRACE_1("[IAUPDATE] result: %d", result );
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSession::SecurityCheckL() end");
-    return result; 
-    }
-
-
-//  End of File  
--- a/iaupdate/IAD/ui/src/iaupdatesettingdialog.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,705 +0,0 @@
-/*
-* Copyright (c) 2007-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 "iaupdatesettingdialog.h"
-#include "iaupdateaccesspointhandler.h"  
-#include "iaupdatestatuspanehandler.h"
-#include "iaupdateapplication.h"
-#include "iaupdate.hrh"
-#include "iaupdateprivatecrkeys.h"
-#include "iaupdatedebug.h"
-#include <iaupdate.rsg>
-
-#include <centralrepository.h>
-#include <featmgr.h> 
-#include <hlplch.h>
-
-
-_LIT( KSWUPDATE_HLP_SETTINGS, "SWUPDATE_HLP_SETTINGS" ); 
-
-
-
-
-// cenrep in emulator:
-// copy 2000F85A.txt to '\epoc32\release\winscw\udeb\Z\private\10202be9\'
-// delete 2000F85A.txt from 'epoc32\winscw\c\private\10202be9\persists'
-//
-// cenrep in hardware:
-// copy 2000F85A.txt to '\epoc32\data\Z\private\10202be9'
-//
-
-
-
-/******************************************************************************
- * class CIAUpdateSettingDialog
- ******************************************************************************/
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingDialog::ShowDialogL
-// 
-// -----------------------------------------------------------------------------
-TBool CIAUpdateSettingDialog::ShowDialogL()
-	{
-	//__UHEAP_MARK;
-	
-	CIAUpdateSettingDialog* dialog = CIAUpdateSettingDialog::NewL();
-
-	TBool ret = dialog->ExecuteLD( R_IAUPDATE_SETTING_DIALOG );
-
-   	//__UHEAP_MARKEND;
-   	
-    return ret;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingDialog::NewL
-//
-// -----------------------------------------------------------------------------
-CIAUpdateSettingDialog* CIAUpdateSettingDialog::NewL()
-    {
-    CIAUpdateSettingDialog* self = new ( ELeave ) CIAUpdateSettingDialog();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingDialog::CIAUpdateSettingDialog
-// 
-// -----------------------------------------------------------------------------
-//
-CIAUpdateSettingDialog::CIAUpdateSettingDialog()
-	{
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingDialog::ConstructL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSettingDialog::ConstructL()
-    {
- 	CAknDialog::ConstructL( R_IAUPDATE_SETTING_DIALOG_MENU );
-    
-    // get previous title so it can be restored
-	iStatusPaneHandler = CIAUpdateStatusPaneHandler::NewL( iAvkonAppUi );
-	iStatusPaneHandler->StoreOriginalTitleL();
-    } 
-
-
-// ----------------------------------------------------------------------------
-// Destructor
-//
-// ----------------------------------------------------------------------------
-//
-CIAUpdateSettingDialog::~CIAUpdateSettingDialog()
-    {
-	delete iStatusPaneHandler;
-	
-    if (iAvkonAppUi)
-    	{
-    	iAvkonAppUi->RemoveFromStack( this );
-    	}
-    }
-
-
-// ---------------------------------------------------------
-// CIAUpdateSettingDialog::CreateCustomControlL
-// ---------------------------------------------------------
-//
-SEikControlInfo CIAUpdateSettingDialog::CreateCustomControlL( TInt aControlType )
-    {
-    SEikControlInfo controlInfo;
-    controlInfo.iControl = NULL;
-    controlInfo.iTrailerTextId = 0;
-    controlInfo.iFlags = 0;
-    
-    switch ( aControlType )
-        {
-        case EAknCtLastControlId:
-            {
-            controlInfo.iControl = new (ELeave) CIAUpdateSettingItemList();
-            break;
-            }
-
-        default:
-            {
-            break;
-            }
-        }
-    return controlInfo;
-    }
-
-
-//------------------------------------------------------------------------------
-// CIAUpdateSettingDialog::ActivateL
-//
-// Called by system when dialog is activated.
-//------------------------------------------------------------------------------
-//
-void CIAUpdateSettingDialog::ActivateL()
-	{
-    CAknDialog::ActivateL();
-
-	// this cannot be in ConstructL which is executed before dialog is launched
-	iAvkonAppUi->AddToStackL(this);
-    }
-
-
-//------------------------------------------------------------------------------
-// CIAUpdateSettingDialog::GetHelpContext
-//
-//------------------------------------------------------------------------------
-//
-void CIAUpdateSettingDialog::GetHelpContext( TCoeHelpContext& aContext ) const
-	{
-	aContext.iMajor = KUidIAUpdateApp;
-    aContext.iContext = KSWUPDATE_HLP_SETTINGS;        
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingDialog::HandleListBoxEventL
-// 
-// -----------------------------------------------------------------------------
-void CIAUpdateSettingDialog::HandleListBoxEventL( CEikListBox* /*aListBox*/,
-                                                  TListBoxEvent /*aEventType*/ )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingDialog::PreLayoutDynInitL
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSettingDialog::PreLayoutDynInitL()
-    {
-    iList = (CIAUpdateSettingItemList*) ControlOrNull ( EIAUpdateSettingDialogList );
-    
-    iList->LoadSettingsL(); // from CAknSettingItemList
-    
-	iStatusPaneHandler->SetTitleL( R_IAUPDATE_SETTING_DIALOG_TITLE );
-	iStatusPaneHandler->SetNaviPaneTitleL(KNullDesC);
-    }
-
-
-//------------------------------------------------------------------------------
-// CIAUpdateSettingDialog::DynInitMenuPaneL
-//
-// Called by system before menu is shown.
-//------------------------------------------------------------------------------
-//
-void CIAUpdateSettingDialog::DynInitMenuPaneL(TInt aResourceID, CEikMenuPane* aMenuPane )
-	{
-    if( aResourceID == R_IAUPDATE_SETTING_DIALOG_MENU_PANE ) 
-        {
-        if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
-            {
-            aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
-            }
-        }
-    }
-
-
-//------------------------------------------------------------------------------
-// CIAUpdateSettingDialog::ProcessCommandL
-//
-// Handle commands from menu.
-//------------------------------------------------------------------------------
-//
-void CIAUpdateSettingDialog::ProcessCommandL(TInt aCommandId)
-	{
-    if ( MenuShowing() ) 
-        {
-        HideMenu();
-        }
-
-
-	switch ( aCommandId )
-		{
-		case EAknCmdHelp:
-			{
-			HlpLauncher::LaunchHelpApplicationL( 
-			                     iEikonEnv->WsSession(), 
-			                     iEikonEnv->EikAppUi()->AppHelpContextL() );
-		    break;
-			}
- 
-		case EAknCmdOpen:
-			{
-			EditItemL();
-			break;
-			}
-		    
-        case EAknCmdExit:
-        case EEikCmdExit:
-			{
-			// close dialog and exit calling application
-			iAvkonAppUi->ProcessCommandL( EAknCmdExit );
-			break;
-			}
-
-		default:			
-		    break;
-		}
-	}
-
-
-//------------------------------------------------------------------------------
-// CIAUpdateSettingDialog::OkToExitL
-//
-//------------------------------------------------------------------------------
-//
-TBool CIAUpdateSettingDialog::OkToExitL(TInt aButtonId)
-	{
-	if ( aButtonId == EEikBidCancel )
-		{
-		TRAP_IGNORE( SaveSettingsL() );  //potential leave trapped 
-		                                 //because IAD is not closed if SaveSettingsL() leaves 
-		return ETrue; // close dialog
-		}
-
-	if ( aButtonId == EAknSoftkeyOpen )
-		{
-		EditItemL();
-
-		return EFalse; // leave dialog open
-		}
-
-	if ( aButtonId == EAknSoftkeyBack )
-        {
-		SaveSettingsL();
-		
-		return ETrue; // close dialog
-		}
-
-	return CAknDialog::OkToExitL(aButtonId);
-	}
-
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateSettingDialog::OfferKeyEventL
-// 
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CIAUpdateSettingDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
-	{
-	if (aType == EEventKey)
-		{
-		switch (aKeyEvent.iCode)
-			{
-			case EKeyEscape:  // framework calls this when dialog must shut down
-				{
-				return CAknDialog::OfferKeyEventL(aKeyEvent, aType);
-        		}
-			case EKeyUpArrow:
-			case EKeyDownArrow:
-			    {
-    		    break;
-			    }
-            default:
-				{
-			    break;
-				}
-			}
-		}
-
-	return CAknDialog::OfferKeyEventL( aKeyEvent, aType);
-	}
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateSettingDialog::HandleResourceChange
-// 
-// ----------------------------------------------------------------------------
-//
-void CIAUpdateSettingDialog::HandleResourceChange(TInt aType)
-    {   
-    if (aType == KEikDynamicLayoutVariantSwitch) //Handle change in layout orientation
-        {
-        TRect mainPaneRect;
-        AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
-        SetRect( mainPaneRect );
-    
-        iList->HandleResourceChange( aType );
-    
-        CCoeControl::HandleResourceChange( aType );
-		DrawDeferred();
-	    return;
-		}
-		
-    if ( aType == KAknsMessageSkinChange )
-        {
-        }
-		
-    CCoeControl::HandleResourceChange( aType );
-    }
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateSettingDialog::EditItemL
-// 
-// ----------------------------------------------------------------------------
-//
-void CIAUpdateSettingDialog::EditItemL()
-	{
-	TInt currentIndex = iList->ListBox()->CurrentItemIndex();
-	TBool calledFromMenu = ETrue;
-	
-	iList->EditItemL( currentIndex, calledFromMenu );
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingDialog::SetVisibility
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSettingDialog::SetVisibility()
-	{
-	}
-
-
-// -----------------------------------------------------------------------------
-// CAspContentDialog::SetAllReadOnly
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSettingDialog::SetAllReadOnly()
-	{
-	}
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateSettingDialog::SaveSettingsL
-// 
-// ----------------------------------------------------------------------------
-//
-void CIAUpdateSettingDialog::SaveSettingsL()
-	{
-    iList->StoreSettingsL();  // from CAknSettingItemList
-    
-    CRepository* cenrep = CRepository::NewLC( KCRUidIAUpdateSettings );
-    TInt err = cenrep->StartTransaction( CRepository::EReadWriteTransaction );
-    User::LeaveIfError( err );
-    cenrep->CleanupCancelTransactionPushL();
-
-    
-    TInt num = iList->Attribute( EAccessPoint );
-    if ( num == 0 )
-        {
-        // O means default destination. Let's save it as -1 so that we know later on 
-        // whether cenrep really contained the default or just nothing.
-        num = -1;
-        }
-    err = cenrep->Set( KIAUpdateAccessPoint, num );
-    User::LeaveIfError( err );
-
-    num = iList->Attribute( EAutoUpdateCheck );
-    err = cenrep->Set( KIAUpdateAutoUpdateCheck, num );
-    User::LeaveIfError( err );
-           
-    TUint32 ignore = KErrNone;
-    User::LeaveIfError( cenrep->CommitTransaction( ignore ) );
-    CleanupStack::PopAndDestroy(); // CleanupCancelTransactionPushL()
-    CleanupStack::PopAndDestroy( cenrep );
-	}
-	
-	
-
-
-
-/******************************************************************************
- * class CIAUpdateSettingItemList
- ******************************************************************************/
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingItemList::CreateSettingItemL
-// 
-// -----------------------------------------------------------------------------
-//
-CAknSettingItem* CIAUpdateSettingItemList::CreateSettingItemL( TInt aSettingId )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSettingItemList::CreateSettingItemL begin");
-    CRepository* cenrep = CRepository::NewLC( KCRUidIAUpdateSettings );
-    CAknSettingItem* item = NULL;
-    
-    switch ( aSettingId )
-        {
-        case EIAUpdateSettingAccessPoint:
-            {
-            User::LeaveIfError( cenrep->Get( KIAUpdateAccessPoint, iAccessPoint ) );
-            IAUPDATE_TRACE_1("[IAUPDATE] CIAUpdateSettingItemList::CreateSettingItemL iAccessPoint: %d", iAccessPoint);
-            if ( iAccessPoint == -1 )
-                {
-                // -1 was just our private representation in cenrep of the default destination  
-                // Let's handle it as it was 0
-                iAccessPoint = 0;
-                }
-            item = CIAUpdateAccessPointSettingItem::NewL( aSettingId, iAccessPoint );
-            break;
-            }
-
-        case EIAUpdateSettingAutoUpdateCheck:
-            {
-            User::LeaveIfError( cenrep->Get( KIAUpdateAutoUpdateCheck, iAutoUpdateCheck ) );
-            item = new (ELeave) CAknEnumeratedTextPopupSettingItem
-                               ( aSettingId, iAutoUpdateCheck );
-            break;
-            }
-
-        default:
-            {
-            item = new (ELeave) CAknSettingItem( aSettingId );
-            break;
-            }
-        }
-    CleanupStack::PopAndDestroy( cenrep ); 
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateSettingItemList::CreateSettingItemL end");
-    return item;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingItemList::LoadSettingsL
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSettingItemList::LoadSettingsL()
-    {
-    CAknSettingItemList::LoadSettingsL();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingItemList::EditItemL
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSettingItemList::EditItemL( TInt aIndex, TBool aCalledFromMenu )
-    {
-    CAknSettingItemList::EditItemL( aIndex, aCalledFromMenu );
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingItemList::SetAttribute
-// 
-// -----------------------------------------------------------------------------
-//
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingItemList::Attribute
-// 
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateSettingItemList::Attribute( TInt aKey )
-    {
-    TInt ret = KErrNotFound;
-    
-    switch ( aKey )
-        {
-        case CIAUpdateSettingDialog::EAccessPoint:
-            {
-            ret = iAccessPoint;
-            break;
-            }
-        case CIAUpdateSettingDialog::EAutoUpdateCheck:
-            {
-            ret = iAutoUpdateCheck;
-            break;
-            }
-        default:
-            {
-            IAUpdateDialogUtil::Panic( KErrNotSupported );
-            break;
-            }
-        }
-        
-    return ret;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateSettingItemList::CheckSettings
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateSettingItemList::CheckSettings()
-    {
-    if ( iAutoUpdateCheck != EIAUpdateSettingValueDisable &&
-         iAutoUpdateCheck != EIAUpdateSettingValueDisableWhenRoaming &&
-         iAutoUpdateCheck != EIAUpdateSettingValueEnable )
-        {
-        iAutoUpdateCheck = EIAUpdateSettingValueEnable;
-        }
-    }
-
-
-
-/******************************************************************************
- * class CIAUpdateAccessPointSettingItem
- ******************************************************************************/
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointSettingItem::NewL
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateAccessPointSettingItem* CIAUpdateAccessPointSettingItem::NewL(
-                   TInt aSettingId, TInt& aAccessPointId )
-    {
-    CIAUpdateAccessPointSettingItem* item = 
-    new (ELeave) CIAUpdateAccessPointSettingItem( aSettingId, aAccessPointId );
-    CleanupStack::PushL(item);
-    item->ConstructL();
-    CleanupStack::Pop(item);
-    return item;
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointSettingItem::CIAUpdateAccessPointSettingItem
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateAccessPointSettingItem::CIAUpdateAccessPointSettingItem( 
-                                 TInt aSettingId, TInt& aAccessPointId )
-:   CAknSettingItem( aSettingId ), 
-    iAccessPointId ( aAccessPointId )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointSettingItem::~CIAUpdateAccessPointSettingItem
-// 
-// -----------------------------------------------------------------------------
-//
-CIAUpdateAccessPointSettingItem::~CIAUpdateAccessPointSettingItem()
-    {
-    delete iSettingText;
-    delete iApHandler;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointSettingItem::ConstructL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateAccessPointSettingItem::ConstructL()
-    {
-    iApHandler = CIAUpdateAccessPointHandler::NewL();
-     
-    if ( iAccessPointId == 0 )
-        {
-    	iApHandler->GetDefaultConnectionLabelL( iSettingText );
-        }
-    else
-        {
-        TRAPD( err, iApHandler->GetApNameL( iAccessPointId, iSettingText ) );
-        if ( err == KErrNotFound )
-            { // destination stored by IAD may be removed
-            iAccessPointId = 0;
-            iApHandler->GetDefaultConnectionLabelL( iSettingText );
-            }
-        else
-            {
-            User::LeaveIfError( err );
-            }
-        }
-    } 
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointSettingItem::EditItemL
-// 
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateAccessPointSettingItem::EditItemL( TBool /*aCalledFromMenu*/ )
-    {
-    EditAccessPointItemL();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateAccessPointSettingItem::SettingTextL
-// 
-// -----------------------------------------------------------------------------
-//
-const TDesC& CIAUpdateAccessPointSettingItem::SettingTextL()
-    {
-    if ( !iSettingText )
-        {
-    	return CAknSettingItem::SettingTextL();
-        }
-    else if ( iSettingText->Length() == 0 )
-        {
-        return CAknSettingItem::SettingTextL();
-        }
-        
-    return *iSettingText;
-    }
-
-
-//------------------------------------------------------------------------------
-// CIAUpdateAccessPointSettingItem::EditAccessPointItemL
-//
-//------------------------------------------------------------------------------
-//	
-TBool CIAUpdateAccessPointSettingItem::EditAccessPointItemL()
-    {
-	TInt itemUid = iAccessPointId;
-	
-	TInt ret = KErrNone;
-	
-	delete iSettingText;
-	iSettingText = NULL;
-	TRAPD( err, ret = iApHandler->ShowApSelectDialogL( itemUid, iSettingText ) );
-	
-	if ( err != KErrNone )
-	    {
-	    iAccessPointId = KErrNotFound;
-	    UpdateListBoxTextL(); // from CAknSettingItem
-	    return EFalse;
-	    }
-	
-	if ( ret == CIAUpdateAccessPointHandler::EDialogSelect )
-		{
-		iAccessPointId = itemUid;
- 	    UpdateListBoxTextL(); // from CAknSettingItem
-	    return ETrue;
-		}
-		
-	return EFalse;
-    }
-
-	
-//  End of File  
--- a/iaupdate/IAD/ui/src/iaupdatestatusdialog.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,278 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 "iaupdatestatusdialog.h"
-#include "iaupdatedialogutil.h"
-#include "iaupdatedebug.h"
-
-#include <iaupdate.rsg>
-#include <aknmessagequerydialog.h>      // CAknMessageQueryDialog
-#include <StringLoader.h>
-#include <AknUtils.h>
-
-
-
-/*******************************************************************************
- * class CIAUpdateStatusDialog
- *******************************************************************************/
-
-/*
-A message query can contain a link text which can be highlighted and opened.
-When a query is opened and it has a link text in the beginning (visible without
-scrolling the query) the link is not highlighted. When a link becomes visible by
-scrolling the query, the link is highlighted.
-There can be multiple link texts in the query. It is highly recommended, not to
-use more than 3 link texts in one query.
-A link text can open for example a help view or another message query.
-The default softkeys are:
-SK1 OK text.softkey.ok
-
-SK1 changes to View text.softkey.view when a link text is highlighted.
-SK2 does not have a default text.
-*/
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateStatusDialog::ShowDialogL
-// 
-// -----------------------------------------------------------------------------
-TInt CIAUpdateStatusDialog::ShowDialogL( TIAUpdateDialogParam* aParam )
-	{
-	CIAUpdateStatusDialog* dialog = CIAUpdateStatusDialog::NewL( aParam );
-	CleanupStack::PushL( dialog );
-
-	TInt ret = dialog->ShowDialogL();
-
-	CleanupStack::PopAndDestroy( dialog );
-    
-    return ret;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateStatusDialog::NewL
-//
-// -----------------------------------------------------------------------------
-CIAUpdateStatusDialog* CIAUpdateStatusDialog::NewL( TIAUpdateDialogParam* aParam )
-    {
-    CIAUpdateStatusDialog* self = new ( ELeave ) CIAUpdateStatusDialog( aParam );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateStatusDialog::CIAUpdateStatusDialog
-// 
-// -----------------------------------------------------------------------------
-//
-CIAUpdateStatusDialog::CIAUpdateStatusDialog( TIAUpdateDialogParam* aParam )
-	{
-	iParam = aParam;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateStatusDialog::ConstructL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateStatusDialog::ConstructL()
-    {
-    } 
-
-
-// ----------------------------------------------------------------------------
-// Destructor
-//
-// ----------------------------------------------------------------------------
-//
-CIAUpdateStatusDialog::~CIAUpdateStatusDialog()
-    {
-    delete iBuf;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateStatusDialog::ConstructTextL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateStatusDialog::ConstructTextL()
-    {
-    _LIT(KNewLine, "\n");
-    
-    const TInt KBufSize = 1024;
-
-    delete iBuf;
-    iBuf = NULL;
-    iBuf = HBufC::NewL( KBufSize );
-    TPtr ptr = iBuf->Des();
-    
-    HBufC* hBuf = NULL;
-
-    
-    if ( iParam->iCountSuccessfull == 0 && iParam->iCountCancelled == 0 &&
-         iParam->iCountFailed == 0 )
-        {
-        hBuf = StringLoader::LoadLC( 
-        R_IAUPDATE_STATUS_DIALOG_SUCCESSFUL, iParam->iCountSuccessfull );
-        
-        ptr.Append( *hBuf );
-        ptr.Append( KNewLine );
-        CleanupStack::PopAndDestroy( hBuf );
-
-        hBuf = StringLoader::LoadLC( R_IAUPDATE_STATUS_DIALOG_TEXT_LINK );
-        ptr.Append( KOpeningLinkTag );
-        ptr.Append( *hBuf );
-        ptr.Append( KClosingLinkTag );
-        CleanupStack::PopAndDestroy( hBuf );
-        return;
-        }
-    
-    
-        
-    if ( iParam->iCountSuccessfull != 0 )
-        {
-        if ( iParam->iCountSuccessfull == 1 )
-            {
-            hBuf = StringLoader::LoadLC( R_IAUPDATE_STATUS_DIALOG_SUCCESSFUL_ONE );
-            }
-        else
-            {
-            hBuf = StringLoader::LoadLC( 
-            R_IAUPDATE_STATUS_DIALOG_SUCCESSFUL, iParam->iCountSuccessfull );
-            }
-        ptr.Append( *hBuf );
-        ptr.Append( KNewLine );
-        CleanupStack::PopAndDestroy( hBuf );
-        }
-    
-    if ( iParam->iCountCancelled != 0 )
-        {
-        if ( iParam->iCountCancelled == 1 )
-            {
-            hBuf = StringLoader::LoadLC( R_IAUPDATE_STATUS_DIALOG_CANCELLED_ONE );
-            }
-        else
-            {
-            hBuf = StringLoader::LoadLC( 
-            R_IAUPDATE_STATUS_DIALOG_CANCELLED, iParam->iCountCancelled  );
-            }
-        ptr.Append( *hBuf );
-        ptr.Append( KNewLine );
-        CleanupStack::PopAndDestroy( hBuf );
-        }
-
-    if ( iParam->iCountFailed != 0 )
-        {
-        if ( iParam->iCountFailed == 1 )
-            {
-            hBuf = StringLoader::LoadLC( R_IAUPDATE_STATUS_DIALOG_FAILED_ONE );
-            }
-        else
-            {
-            hBuf = StringLoader::LoadLC( 
-            R_IAUPDATE_STATUS_DIALOG_FAILED, iParam->iCountFailed );
-            }
-    
-        ptr.Append( *hBuf );
-        ptr.Append( KNewLine );
-        CleanupStack::PopAndDestroy( hBuf );
-        }
-    
-    if ( iParam->iShowCloseAllText )
-        {
-    	hBuf = StringLoader::LoadLC( R_IAUPDATE_CLOSE_ALL );
-    	ptr.Append( *hBuf );
-    	ptr.Append( KNewLine );
-        CleanupStack::PopAndDestroy( hBuf );
-        }
-
-
-    hBuf = StringLoader::LoadLC( R_IAUPDATE_STATUS_DIALOG_TEXT_LINK );
-    ptr.Append( KOpeningLinkTag );
-    ptr.Append( *hBuf );
-    ptr.Append( KClosingLinkTag );
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); 
-    CleanupStack::PopAndDestroy( hBuf );
-    } 
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateStatusDialog::ShowDialogL
-// 
-// -----------------------------------------------------------------------------
-TInt CIAUpdateStatusDialog::ShowDialogL()
-	{
-	ConstructTextL();
-	
-	CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( *iBuf );
-	dlg->PrepareLC( R_IAUPDATE_MESSAGE_QUERY );
-
-	HBufC* title = StringLoader::LoadLC( R_IAUPDATE_STATUS_DIALOG_TITLE );
-	CAknPopupHeadingPane* headingPane = dlg->Heading();
-	headingPane->SetTextL( *title );
-	CleanupStack::PopAndDestroy( title );
-
-	TCallBack LinkCallback( HandleLink, this );
-	dlg->SetLink( LinkCallback );
-	
-	return ( dlg->RunLD() );
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateStatusDialog::HandleLink
-//
-// Used as a callback function in message query.
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateStatusDialog::HandleLink( TAny* aPtr )
-    {
-    TInt err = KErrNone;
-        
-    CIAUpdateStatusDialog* self = static_cast<CIAUpdateStatusDialog*>(aPtr);
-    
-    TRAP( err, self->HandleLinkL() );
-    return err;    
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateStatusDialog::HandleLink
-//
-// Used as a callback function in message query.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateStatusDialog::HandleLinkL()
-    {
-    if ( iParam->iLinkObserver )
-        {
-        iParam->iLinkObserver->TextLinkL( 0 );
-        }
-    }
-
-    
-//  End of File  
--- a/iaupdate/IAD/ui/src/iaupdatestatuspanehandler.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
-* Copyright (c) 2007-2008 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 "iaupdatestatuspanehandler.h"
-#include "iaupdatenavipanehandler.h"
-#include "iaupdatedebug.h"
-#include "iaupdatedialogutil.h"
-
-#include <akntitle.h>           // CAknTitlePane
-#include <StringLoader.h>
-
-
-/*******************************************************************************
- * class CIAUpdateStatusPaneHandler
- *******************************************************************************/
-
-// -----------------------------------------------------------------------------
-// CIAUpdateStatusPaneHandler::NewL
-//
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CIAUpdateStatusPaneHandler* CIAUpdateStatusPaneHandler::NewL( CAknAppUi* aAppUi )
-    {
-    CIAUpdateStatusPaneHandler* self = new (ELeave) CIAUpdateStatusPaneHandler( aAppUi );
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	CleanupStack::Pop( self );
-	return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// Destructor
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateStatusPaneHandler::~CIAUpdateStatusPaneHandler()
-    {
-	TRAP_IGNORE( RestoreOriginalTitleL() );
-	
-	delete iNaviPaneHandler;
-	delete iOriginalTitle;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateStatusPaneHandler::ConstructL
-//
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateStatusPaneHandler::ConstructL()
-    {
-    iNaviPaneHandler = new (ELeave) CIAUpdateNaviPaneHandler( iAppUi->StatusPane() );
-    iOriginalTitle = KNullDesC().AllocL();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateStatusPaneHandler::CIAUpdateStatusPaneHandler
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateStatusPaneHandler::CIAUpdateStatusPaneHandler( CAknAppUi* aAppUi ) : iAppUi(aAppUi )
-	{
-	iOriginalTitleStored = EFalse;
-	}
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateStatusPaneHandler::GetTitleL
-// 
-// ----------------------------------------------------------------------------
-//
-TBool CIAUpdateStatusPaneHandler::GetTitleL( CAknAppUi* aAppUi, HBufC*& aTitle )
-	{
-	aTitle = NULL;
-
-	CEikStatusPane* statusPane = aAppUi->StatusPane();
-    if (statusPane && statusPane->PaneCapabilities( 
-                            TUid::Uid( EEikStatusPaneUidTitle ) ).IsPresent() )
-		{
-        CAknTitlePane* titlePane = static_cast<CAknTitlePane*>
-            ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-        if ( titlePane->Text() ) 
-			{
-		    aTitle = titlePane->Text()->AllocL();
-			return ETrue;
-    		}
-		}
-
-	return EFalse;
-	}
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateStatusPaneHandler::SetTitleL
-// 
-// ----------------------------------------------------------------------------
-//
-TBool CIAUpdateStatusPaneHandler::SetTitleL( CAknAppUi* aAppUi, const TDesC& aTitle )
-	{
-	CEikStatusPane* statusPane = aAppUi->StatusPane();
-    if ( statusPane && statusPane->PaneCapabilities( 
-                              TUid::Uid( EEikStatusPaneUidTitle ) ).IsPresent() )
-		{
-        CAknTitlePane* titlePane = static_cast<CAknTitlePane*>
-            ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-        if ( titlePane->Text() ) 
-			{
-	   		titlePane->SetTextL( aTitle );
-			return ETrue;
-			}
-		}
-	return EFalse;
-	}
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateStatusPaneHandler::SetNaviPaneTitleL
-// 
-// ----------------------------------------------------------------------------
-//
-void CIAUpdateStatusPaneHandler::SetNaviPaneTitleL( const TDesC& aTitle )
-	{
-	iNaviPaneHandler->SetNaviPaneTitleL( aTitle );
-	}
-
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateStatusPaneHandler::StoreOriginalTitleL
-// 
-// ----------------------------------------------------------------------------
-//
-void CIAUpdateStatusPaneHandler::StoreOriginalTitleL()
-	{
-	delete iOriginalTitle;
-	iOriginalTitle = NULL;
-	TBool ret = GetTitleL( iAppUi, iOriginalTitle );
-	if ( !iOriginalTitle )
-	    {
-		iOriginalTitle = KNullDesC().AllocL();
-	    }
-	if ( ret )
-		{
-		iOriginalTitleStored = ETrue;
-		}
-	}
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateStatusPaneHandler::RestoreOriginalTitleL
-// 
-// ----------------------------------------------------------------------------
-//
-void CIAUpdateStatusPaneHandler::RestoreOriginalTitleL()
-	{
-	if ( iOriginalTitleStored )
-		{
-		SetTitleL( iAppUi, *iOriginalTitle );
-		}
-	}
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateStatusPaneHandler::SetTitleL
-// 
-// ----------------------------------------------------------------------------
-//
-void CIAUpdateStatusPaneHandler::SetTitleL( const TDesC& aText )
-	{
-	if ( iOriginalTitleStored )
-		{
-		SetTitleL( iAppUi, aText );
-		}
-	}
-
-
-// ----------------------------------------------------------------------------
-// CIAUpdateStatusPaneHandler::SetTitleL
-// 
-// ----------------------------------------------------------------------------
-//
-void CIAUpdateStatusPaneHandler::SetTitleL( TInt aResourceId )
-	{
-	HBufC* hBuf = StringLoader::LoadLC( aResourceId );
-	SetTitleL( hBuf->Des() );
-	CleanupStack::PopAndDestroy( hBuf );
-	}
-
-    
-//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/src/iaupdatetools.cpp	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,252 @@
+/*
+* Copyright (c) 2007-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 module contains the implementation of IAUpdateTools functions
+*
+*/
+
+
+
+
+
+
+#include <s32mem.h>
+#include <iaupdateparameters.h>
+
+#include "iaupdatetools.h"
+#include "iaupdatedebug.h"
+
+// -----------------------------------------------------------------------------
+// IAUpdateTools::ExternalizeParametersL
+// 
+// -----------------------------------------------------------------------------
+// 
+void IAUpdateTools::ExternalizeParametersL( HBufC8*& aTarget,
+                                            const CIAUpdateParameters& aSource )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateTools::ExternalizeParametersL begin");
+    // Notice!
+    // If you make changes here. Also, remember to make corresponding
+    // changes to the InternalizeParametersL
+
+    // The size of the buffer will contain:
+    // - 1 TInt for UIDs,
+    // - 1 TBool for ShowProgress boolean
+    // - 1 TUint for importance
+    // - 1 TUint for type
+    // - 1 TBool for Refresh boolean
+    
+    // - 3 TInt for descriptor lengths
+    // --> bytes for 5 + 3 = 8 TInt values are needed 
+    //     (sizeof( TInt ) * KNumberOfTInts)
+    // - 3 descriptor TDesC texts
+    const TInt KNumberOfTInts( 8 );
+
+    // Notice, that because descriptor texts that are included
+    // here are TDesC, their Size-information has to be used
+    // instead of Length.
+    HBufC8* tmp = 
+        HBufC8::NewLC( sizeof( TInt ) * KNumberOfTInts
+                       + aSource.SearchCriteria().Size()
+                       + aSource.CommandLineExecutable().Size()
+                       + aSource.CommandLineArguments().Size() );
+
+    // Create stream that uses the buffer created above.
+    // By using the stream, the values are easier to insert into the buffer.
+    TPtr8 ptr( tmp->Des() );    
+    RDesWriteStream stream( ptr );
+    CleanupClosePushL( stream );
+
+    // These are integers for uids
+    IAUPDATE_TRACE_1("[IAUPDATE] uid: %x", aSource.Uid().iUid );
+    stream.WriteInt32L( aSource.Uid().iUid );
+
+    // These are length and data pairs for descriptors
+    IAUPDATE_TRACE_1("[IAUPDATE] search criteria: %S", &aSource.SearchCriteria() );
+    ExternalizeDesL( aSource.SearchCriteria(), stream );
+    IAUPDATE_TRACE_1("[IAUPDATE] command line executable: %S", &aSource.CommandLineExecutable() );
+    ExternalizeDesL( aSource.CommandLineExecutable(), stream );
+#ifdef _DEBUG
+    HBufC* temp = HBufC::NewL( aSource.CommandLineArguments().Length() );
+    temp->Des().Copy( aSource.CommandLineArguments()) ;
+    IAUPDATE_TRACE_1("[IAUPDATE] command line arguments: %S", temp );
+    delete temp;
+#endif //_DEBUG
+    ExternalizeDes8L( aSource.CommandLineArguments(), stream );
+    
+    // Boolean for ShowProgress
+    stream.WriteInt32L( aSource.ShowProgress() );
+    
+    // TUint for importance
+    stream.WriteInt32L( aSource.Importance() );
+    
+    // TUint for type
+    stream.WriteInt32L( aSource.Type() );
+    
+    // Boolean for Refresh
+    stream.WriteInt32L( aSource.Refresh() );
+
+    // Stream is not needed anymore
+    CleanupStack::PopAndDestroy( &stream );
+
+    // Remove tmp from the stack but do not delete it because it will be
+    // assigned to the aTarget below.
+    CleanupStack::Pop( tmp );
+    
+    // Replace aTarget with new value
+    delete aTarget;
+    aTarget = tmp;
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateTools::ExternalizeParametersL end");
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateTools::InternalizeParametersL
+// 
+// -----------------------------------------------------------------------------
+// 
+void IAUpdateTools::InternalizeParametersL( CIAUpdateParameters& aTarget, 
+                                            const TDesC8& aSource )
+    {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateTools::InternalizeParametersL begin");
+    // Notice!
+    // If you make changes here. Also, remember to make corresponding
+    // changes to the ExternalizeParametersL
+
+    // InternalizeDesL function will set values into this tmp descriptor.
+    HBufC* tmp( NULL );
+    
+    // Create stream that uses the given buffer.
+    RDesReadStream stream( aSource );
+    CleanupClosePushL( stream );
+
+    aTarget.SetUid( TUid::Uid( stream.ReadInt32L() ) );
+    IAUPDATE_TRACE_1("[IAUPDATE] uid: %x", aTarget.Uid().iUid );
+    
+    InternalizeDesL( tmp, stream );
+    CleanupStack::PushL( tmp );
+    aTarget.SetSearchCriteriaL( *tmp );
+    IAUPDATE_TRACE_1("[IAUPDATE] search criteria: %S", tmp );
+    CleanupStack::PopAndDestroy( tmp );
+    tmp = NULL;
+        
+    InternalizeDesL( tmp, stream );
+    CleanupStack::PushL( tmp );
+    aTarget.SetCommandLineExecutableL( *tmp );
+    IAUPDATE_TRACE_1("[IAUPDATE] command line executable: %S", tmp );
+    CleanupStack::PopAndDestroy( tmp );
+    tmp = NULL;
+
+    HBufC8* tmp8( NULL );        
+    InternalizeDes8L( tmp8, stream );
+    CleanupStack::PushL( tmp8 );
+    aTarget.SetCommandLineArgumentsL( *tmp8 );
+#ifdef _DEBUG
+    tmp = HBufC::NewL( tmp8->Length() );
+    tmp->Des().Copy( *tmp8 ) ;
+    IAUPDATE_TRACE_1("[IAUPDATE] command line arguments: %S", tmp );
+    delete tmp;
+    tmp = NULL;
+#endif //_DEBUG
+    CleanupStack::PopAndDestroy( tmp8 );
+    tmp8 = NULL;
+    
+    aTarget.SetShowProgress( stream.ReadInt32L() );
+
+    // new parameters (in phase 2 IAD) do not always exist. Parameters may have written by old IAD in selfupdate case.
+    TRAPD( err, aTarget.SetImportance( stream.ReadInt32L() ) );
+    if ( err != KErrEof )
+        {
+        User::LeaveIfError( err );
+        aTarget.SetType( stream.ReadInt32L() );
+        aTarget.SetRefresh( stream.ReadInt32L() );
+        }
+     
+    IAUPDATE_TRACE_1("[IAUPDATE] show progress: %d", aTarget.ShowProgress() );
+    CleanupStack::PopAndDestroy( &stream );   
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateTools::InternalizeParametersL end");
+    }
+
+
+// -----------------------------------------------------------------------------
+// IAUpdateTools::ExternalizeDesL
+// 
+// -----------------------------------------------------------------------------
+// 
+void IAUpdateTools::ExternalizeDesL( const TDesC& aDes, 
+                                     RWriteStream& aStream )
+    {
+    aStream.WriteInt32L( aDes.Length() );
+    aStream.WriteL( aDes );
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateTools::InternalizeDesL
+// 
+// -----------------------------------------------------------------------------
+// 
+TInt IAUpdateTools::InternalizeDesL( HBufC*& aDes, 
+                                     RReadStream& aStream )
+    {
+    TInt length = aStream.ReadInt32L();
+    if ( length > 0 ) 
+        {
+        HBufC* target = HBufC::NewLC( length );
+        TPtr ptr( target->Des() );        
+        aStream.ReadL( ptr, length );
+        delete aDes;
+        aDes = target;
+        CleanupStack::Pop( target );
+        }
+    else
+        {
+        delete aDes;
+        aDes = KNullDesC().AllocL();
+        }
+    return length;
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateTools::ExternalizeDes8L
+// 
+// -----------------------------------------------------------------------------
+// 
+void IAUpdateTools::ExternalizeDes8L( const TDesC8& aDes, RWriteStream& aStream )
+    {
+    aStream.WriteInt32L( aDes.Length() );
+    aStream.WriteL( aDes );
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateTools::InternalizeDes8L
+// 
+// -----------------------------------------------------------------------------
+// 
+TInt IAUpdateTools::InternalizeDes8L( HBufC8*& aDes, RReadStream& aStream )
+    {
+    TInt length = aStream.ReadInt32L();
+    if ( length > 0 ) 
+        {
+        HBufC8* target = HBufC8::NewLC( length );
+        TPtr8 ptr( target->Des() );        
+        aStream.ReadL( ptr, length );
+        delete aDes;
+        aDes = target;
+        CleanupStack::Pop( target );
+        }
+    else
+        {
+        delete aDes;
+        aDes = KNullDesC8().AllocL();
+        }
+    return length;
+    }
--- a/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp	Mon May 03 12:38:03 2010 +0300
@@ -19,23 +19,19 @@
 
 
 // INCLUDES
-#include <avkon.hrh>
-#include <StringLoader.h> 
 #include <centralrepository.h>
-#include <AknUtils.h>
 #include <SWInstDefs.h>
-#include <avkon.rsg>
 #include <featurecontrol.h>
 #include <cmmanager.h>
-#include <iaupdate.rsg>
+#include <qapplication.h>
+#include <hbmessagebox.h>
+#include <hbaction.h>
+#include <hbprogressdialog.h>
 #include <iaupdateparameters.h>
 
 #include "iaupdateuicontroller.h"
 #include "iaupdateuicontrollerobserver.h"
-#include "iaupdateappui.h"
 #include "iaupdate.hrh"
-#include "iaupdatewaitdialog.h"
-#include "iaupdateprogressdialog.h"
 #include "iaupdatenode.h"
 #include "iaupdatefwnode.h"
 #include "iaupdatebasenode.h"
@@ -45,7 +41,6 @@
 #include "iaupdateprivatecrkeys.h"
 #include "iaupdatecontrollerfile.h"
 #include "iaupdateuiconfigdata.h"
-#include "iaupdatedialogutil.h"
 #include "iaupdateutils.h"
 #include "iaupdateagreement.h"
 #include "iaupdateautomaticcheck.h"
@@ -57,13 +52,13 @@
 #include "iaupdateridentifier.h"
 #include "iaupdateruids.h"
 #include "iaupdaterdefs.h"
-#include "iaupdatetools.h"
 #include "iaupdateparametersfilemanager.h"
 #include "iaupdateerrorcodes.h"
 #include "iaupdatefileconsts.h"
 #include "iaupdatefirsttimeinfo.h"
 #include "iaupdaterefreshhandler.h"
 #include "iaupdatenodeid.h"
+#include "iaupdatewaitdialog.h"
 #include "iaupdatedebug.h"
 
 
@@ -252,6 +247,7 @@
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::~CIAUpdateUiController() begin");
 
     CancelOperation();
+    delete mWaitDialog;
     delete iController;
     iNodes.Reset();
     iFwNodes.Reset();
@@ -271,8 +267,8 @@
     // ProcessFinishedL() should normally be used for dialogs but
     // here just use non-leaving delete. In normal cases, dialogs should
     // already be released in the end of the update flow before coming here.
-    delete iWaitDialog;
-    delete iProgressDialog;
+    //delete iWaitDialog;
+    //delete iProgressDialog;
         
 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::~CIAUpdateUiController() end");
     }        
@@ -356,9 +352,7 @@
        	    }
        	else
        	    {
-       	    CIAUpdateAppUi* appUi = 
-       	            static_cast< CIAUpdateAppUi* >( iEikEnv->EikAppUi() );
-            appUi->Exit();
+       	    qApp->quit();
        	    return;	
        	    }
         }
@@ -421,10 +415,12 @@
                 
     if ( !IAUpdateUtils::SpaceAvailableInInternalDrivesL( iSelectedNodesArray ) )
         {
-  	    HBufC* noteText = NULL;
-        noteText = StringLoader::LoadLC( R_IAUPDATE_INSUFFICIENT_MEMORY );
-        IAUpdateDialogUtil::ShowInformationQueryL( *noteText ); 
-        CleanupStack::PopAndDestroy( noteText );
+            HbMessageBox messageBox(HbMessageBox::MessageTypeInformation); 
+            messageBox.setText(QString("Insufficient memory. Free some memory and try again."));
+            HbAction action("OK");
+            messageBox.setPrimaryAction(&action);
+            messageBox.setTimeout(HbPopup::NoTimeout);
+            messageBox.exec();
         }
     else
         {
@@ -516,10 +512,10 @@
                     selectedNode->DownloadL( *this );
                     iState = EDownloading;
                     iClosingAllowedByClient = ETrue;
-                    ShowUpdatingDialogL( R_IAUPDATE_DOWNLOADING_NOTE,
+                    /*ShowUpdatingDialogL( R_IAUPDATE_DOWNLOADING_NOTE,
                                          selectedNode->Base().Name(),
                                          iNodeIndex + 1,
-                                         iSelectedNodesArray.Count() ); 
+                                         iSelectedNodesArray.Count() );*/ 
                     nextUpdate = EFalse;
                     }
                 else
@@ -530,13 +526,13 @@
                     selectedNode->InstallL( *this );
                     iState = EInstalling;
                     iClosingAllowedByClient = EFalse;
-                    CIAUpdateAppUi* appUi = 
+                    /*CIAUpdateAppUi* appUi = 
                         static_cast< CIAUpdateAppUi* >( iEikEnv->EikAppUi() );
                     appUi->StartWGListChangeMonitoring();
                     ShowUpdatingDialogL( R_IAUPDATE_INSTALLING_NOTE,
                                          selectedNode->Base().Name(),
                                          iNodeIndex + 1,
-                                         iSelectedNodesArray.Count() ); 
+                                         iSelectedNodesArray.Count() ); */
                     nextUpdate = EFalse;                     
                     }      
                 }
@@ -570,13 +566,13 @@
             
     aNode.InstallL( *this );
     iState = EInstalling;
-    CIAUpdateAppUi* appUi = static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
+    /*CIAUpdateAppUi* appUi = static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
     appUi->StartWGListChangeMonitoring();
     iClosingAllowedByClient = EFalse;
     ShowUpdatingDialogL( R_IAUPDATE_INSTALLING_NOTE,
                          aNode.Base().Name(),
                          iNodeIndex + 1,
-                         iSelectedNodesArray.Count()  );
+                         iSelectedNodesArray.Count()  ); */
     
 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::StartInstallL() end");
     }
@@ -612,17 +608,13 @@
                 if ( allowNetworkRefresh )
                     {
                     iEikEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );
-                    HBufC* noteText = StringLoader::LoadLC( R_IAUPDATE_REFRESHING_UPDATE_LIST );
-                    ShowWaitDialogL( *noteText, ETrue );
-                    CleanupStack::PopAndDestroy( noteText );
+                    ShowWaitDialogL( "Refreshing updates list", ETrue );
                     }
                 }
             }
         else
             {
-            HBufC* noteText = StringLoader::LoadLC( R_IAUPDATE_REFRESHING_UPDATE_LIST );
-            ShowWaitDialogL( *noteText, EFalse );
-            CleanupStack::PopAndDestroy( noteText );
+            ShowWaitDialogL( "Refreshing updates list", ETrue );
             }
         }
     
@@ -1301,8 +1293,8 @@
 
     if ( aErrorCode == IAUpdaterDefs::KIAUpdaterShutdownRequest )
         {
-        CIAUpdateAppUi* appUi = static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
-    	appUi->Exit();
+        //CIAUpdateAppUi* appUi = static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
+    	//appUi->Exit();
         }
 
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::SelfUpdaterComplete() end");
@@ -1354,15 +1346,15 @@
 // -----------------------------------------------------------------------------
 //
 void CIAUpdateUiController::DownloadProgress( MIAUpdateNode& /*aNode*/, 
-                                              TUint aProgress,
-                                              TUint aMaxProgress )
+                                              TUint /*aProgress*/,
+                                              TUint /*aMaxProgress*/ )
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::DownloadProgress() begin");  
 
     if ( iProgressDialog )
         {
-    	TRAP_IGNORE ( iProgressDialog->SetProgressDialogFinalValueL( aMaxProgress ) );
-        TRAP_IGNORE ( iProgressDialog->UpdateProgressDialogValueL( aProgress ) );
+    	//TRAP_IGNORE ( iProgressDialog->SetProgressDialogFinalValueL( aMaxProgress ) );
+        //TRAP_IGNORE ( iProgressDialog->UpdateProgressDialogValueL( aProgress ) );
         }
 
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::DownloadProgress() end");  
@@ -1418,8 +1410,8 @@
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::InstallComplete() begin");
 
     iState = EIdle;
-    CIAUpdateAppUi* appUi = static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
-    appUi->StopWGListChangeMonitoring();
+    //CIAUpdateAppUi* appUi = static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
+    //appUi->StopWGListChangeMonitoring();
     if ( aError == SwiUI::KSWInstErrFileInUse )
         {
     	iFileInUseError = ETrue;
@@ -1533,29 +1525,23 @@
 
 
 // -----------------------------------------------------------------------------
-// CIAUpdateUiController::HandleDialogExitL
-// Called when wait/progress dialog is about to be cancelled.
+// CIAUpdateUiController::HandleWaitDialogCancel
+// Called when wait dialog is cancelled.
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-TBool CIAUpdateUiController::HandleDialogExitL( TInt aButtonId )
+void CIAUpdateUiController::HandleWaitDialogCancel()
     {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleDialogExitL() begin");
-    IAUPDATE_TRACE_1("[IAUPDATE] button id: %d", aButtonId );
+    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleWaitDialogCancel() begin");
     
-    TInt ret( ETrue );
-    if ( aButtonId == EAknSoftkeyCancel )
-        {  
-        TRAPD ( err, HandleUserCancelL() );
-        if ( err != KErrNone )
-            {
-        	iObserver.HandleLeaveErrorL( err );
-            }
-        }   
+    TRAPD ( err, HandleUserCancelL() );
+    if ( err != KErrNone )
+        {
+      	iObserver.HandleLeaveErrorL( err );
+        }
 
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleDialogExitL() end");
+    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleWaitDialogCancel() end");
 
-    return ret;    
     }
 
 // -----------------------------------------------------------------------------
@@ -1573,8 +1559,8 @@
 	    }
 	else if ( iState == EIdle )
 	    {
-	    CIAUpdateAppUi* appUi = static_cast< CIAUpdateAppUi* >( iEikEnv->EikAppUi() );
-        if ( appUi->UiRefreshAllowed() )
+	    //CIAUpdateAppUi* appUi = static_cast< CIAUpdateAppUi* >( iEikEnv->EikAppUi() );
+        //if ( appUi->UiRefreshAllowed() )
 		    {
 	    	iState = EUiRefreshing;
 	        // store node identification (Id and namespace) of currently selected nodes
@@ -2095,7 +2081,7 @@
 // 
 // ---------------------------------------------------------------------------
 //
-void CIAUpdateUiController::ShowUpdatingDialogL( TInt aTextResourceId,
+void CIAUpdateUiController::ShowUpdatingDialogL( TInt /*aTextResourceId*/,
                                                  const TDesC& aName,
                                                  TInt aNumber,
                                                  TInt aTotalCount )   
@@ -2115,18 +2101,18 @@
     numberArray->AppendL( aNumber ); 
     numberArray->AppendL( aTotalCount );
     HBufC* noteText = NULL;
-    noteText = StringLoader::LoadLC( aTextResourceId, 
-                                     *stringArray, 
-                                     *numberArray );
+    //noteText = StringLoader::LoadLC( aTextResourceId, 
+    //                                 *stringArray, 
+    //                                 *numberArray );
     TPtr ptr = noteText->Des();
-    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); 
+    //AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); 
     if ( iState == EDownloading )
         {
     	ShowProgressDialogL( *noteText, ETrue );
         }
     else
         {
-        ShowWaitDialogL( *noteText, ETrue );	
+        //ShowWaitDialogL( *noteText, ETrue );	
         }
     
     CleanupStack::PopAndDestroy( noteText ); 
@@ -2142,39 +2128,48 @@
 // 
 // ---------------------------------------------------------------------------
 //
-void CIAUpdateUiController::ShowWaitDialogL( const TDesC& aDisplayString, 
-                                             TBool aVisibilityDelayOff ) 
+void CIAUpdateUiController::ShowWaitDialogL( const QString& aDisplayString, 
+                                             TBool /*aVisibilityDelayOff*/ ) 
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() begin");
-
-    if ( iWaitDialog )
+    if ( !mWaitDialog )
+        {
+        mWaitDialog = new IAUpdateWaitDialog();
+        mWaitDialog->SetCallback( this );
+        mWaitDialog->showDialog( aDisplayString );
+        }
+    
+    
+    
+    
+    /*if ( iWaitDialog )
         {
         IAUPDATE_TRACE("[IAUPDATE] Wait dialog already existed. Remove it first");
         // in some rare cases previous dialog still exists
         // it's now just deleted (not recommended way) to avoid forwarding problem(s). 
-        delete iWaitDialog;
+        //delete iWaitDialog;
         iWaitDialog = NULL;
-        }
-    iWaitDialog = 
+        }*/
+ /*   iWaitDialog = 
         new( ELeave ) CIAUpdateWaitDialog( 
             reinterpret_cast< CEikDialog** >( &iWaitDialog ),
             aVisibilityDelayOff );
                 
     iWaitDialog->SetTextL( aDisplayString );
     iWaitDialog->SetCallback( this );        
-    iWaitDialog->ExecuteLD( R_IAUPDATE_WAIT_DIALOG );
+    iWaitDialog->ExecuteLD( R_IAUPDATE_WAIT_DIALOG ); */
 
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() end");
     }
 
 
-// ---------------------------------------------------------------------------
+// --------------------------------------------------------------------------
 // CIAUpdateUiController::ShowProgressDialogL
 // 
 // ---------------------------------------------------------------------------
 //
-void CIAUpdateUiController::ShowProgressDialogL( const TDesC& aDisplayString, 
-                                                 TBool aVisibilityDelayOff ) 
+void CIAUpdateUiController::ShowProgressDialogL( const TDesC& /*aDisplayString*/, 
+                                                 TBool /*aVisibilityDelayOff*/ ) 
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() begin");
 
@@ -2183,17 +2178,17 @@
         IAUPDATE_TRACE("[IAUPDATE] Progress dialog already existed. Remove it first");
         // in some rare cases previous dialog still exists
         // it's now just deleted (not recommended way) to avoid forwarding problem(s). 
-        delete iProgressDialog;
+        //delete iProgressDialog;
         iProgressDialog = NULL;
         }
-    iProgressDialog = 
+/*    iProgressDialog = 
         new( ELeave ) CIAUpdateProgressDialog( 
             reinterpret_cast< CEikDialog** >( &iProgressDialog ),
             aVisibilityDelayOff );
                 
     iProgressDialog->SetTextL( aDisplayString );
     iProgressDialog->SetCallback( this );        
-    iProgressDialog->ExecuteLD( R_IAUPDATE_PROGRESS_DIALOG );
+    iProgressDialog->ExecuteLD( R_IAUPDATE_PROGRESS_DIALOG ); */
 
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() end");
     }
@@ -2223,15 +2218,18 @@
 void CIAUpdateUiController::RemoveWaitDialogL()
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() begin");
-
-    if ( !iCancelling )  //that's needed because AVKON  in 3.2.3 wk12, returning
+    if ( mWaitDialog )
+        {
+        mWaitDialog->close();  
+        }
+    /*if ( !iCancelling )  //that's needed because AVKON  in 3.2.3 wk12, returning
                          //EFalse in TryToExitL() causes a crash   
         {
     	if ( iWaitDialog )
             {
     	    iWaitDialog->ProcessFinishedL();
             }
-        }
+        }*/
     
 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() end");
     }
@@ -2251,7 +2249,7 @@
         {
     	if ( iProgressDialog )
             {
-    	    iProgressDialog->ProcessFinishedL();
+    	    //iProgressDialog->ProcessFinishedL();
             }
         }
     
--- a/iaupdate/IAD/ui/src/iaupdatewaitdialog.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatewaitdialog.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:   This file contains the implementation of CIAUpdateWaitDialog
+* Description:   This file contains the implementation of IAUpdateWaitDialog
 *                class member functions.
 *
 */
@@ -19,6 +19,8 @@
 
 
 // INCLUDE FILES
+#include <hbprogressdialog.h>
+
 #include "iaupdatewaitdialog.h"
 #include "iaupdatewaitdialogobserver.h"
 
@@ -27,51 +29,66 @@
 // ========================= MEMBER FUNCTIONS ================================
 
 // -----------------------------------------------------------------------------
-// CIAUpdateDialogs::CIAUpdateDialogs
-// C++ default constructor can NOT contain any code, that
-// might leave.
+// IAUpdateWaitDialog::IAUpdateWaitDialog
 // -----------------------------------------------------------------------------
 //
-CIAUpdateWaitDialog::CIAUpdateWaitDialog( CEikDialog** aSelfPtr, 
-                                TBool aVisibilityDelayOff )
-    :CAknWaitDialog( aSelfPtr, aVisibilityDelayOff )
-    {
-    }
+IAUpdateWaitDialog::IAUpdateWaitDialog() 
+{
+    mCallback = NULL;
+    mWaitDialog = NULL;
+}
 
 // -----------------------------------------------------------------------------
-// CIAUpdateDialogs::~CIAUpdateDialogs
+// IAUpdateWaitDialog::~IAUpdateWaitDialog
 // Destructor
 // -----------------------------------------------------------------------------
 //
-CIAUpdateWaitDialog::~CIAUpdateWaitDialog()
+IAUpdateWaitDialog::~IAUpdateWaitDialog()
+{
+    if (mWaitDialog)
     {
+        //mWaitDialog->close();  //TODO: is there need to close/delete progressdialog, it's selfdeleted in close()
     }
+}
 
 // ---------------------------------------------------------------------------
-// CIAUpdateWaitDialog::OkToExitL()
-// called by framework when the Softkey is pressed. 
-// On cancel either stop installation or exit 
+// IAUpdateWaitDialog::showDialog()
 // ---------------------------------------------------------------------------
 //
-TBool CIAUpdateWaitDialog::OkToExitL( TInt aButtonId )
+int IAUpdateWaitDialog::showDialog(const QString& text)
+{
+    if (!mWaitDialog)
     {
-    TBool result( ETrue );
-    
-    if ( iCallback )
-        {
-        result = iCallback->HandleDialogExitL( aButtonId );
-        }
-
-    return result;
+        mWaitDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
+        connect(mWaitDialog, SIGNAL(cancelled()), this, SLOT(dialogCancelled()));
     }
-
+    mWaitDialog->setText(text);
+    mWaitDialog->setTimeout(HbPopup::NoTimeout);
+    mWaitDialog->show();
+    return 0;
+}
 // ---------------------------------------------------------------------------
-// CIAUpdateWaitDialog::SetCallback
+// IAUpdateWaitDialog::SetCallback
 // ---------------------------------------------------------------------------
 //
-void CIAUpdateWaitDialog::SetCallback( MIAUpdateWaitDialogObserver* aCallback )
+void IAUpdateWaitDialog::SetCallback(MIAUpdateWaitDialogObserver* callback)
+{
+    mCallback = callback;
+}
+
+void IAUpdateWaitDialog::close()
+{
+    if (mWaitDialog)  
     {
-    iCallback = aCallback;
+       mWaitDialog->close();     
     }
+}
 
+void IAUpdateWaitDialog::dialogCancelled()
+{
+    if (mCallback)
+    {
+        mCallback->HandleWaitDialogCancel();        
+    }
+}
 // End of File
--- a/iaupdate/IAD/updater/group/iaupdater.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/updater/group/iaupdater.mmp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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"
@@ -56,11 +56,8 @@
 LIBRARY         apparc.lib
 LIBRARY         sisregistryclient.lib
 LIBRARY         swinstcli.lib
-LIBRARY         aknnotify.lib
-LIBRARY         bafl.lib 
 LIBRARY         estor.lib
 LIBRARY         commonengine.lib
-LIBRARY         avkon.lib
 LIBRARY         ws32.lib 
 LIBRARY         ecom.lib
 
@@ -69,20 +66,9 @@
 
 DEBUGLIBRARY    flogger.lib
 
-START RESOURCE  ../src/iaupdater.rss
-HEADER
-TARGETPATH      APP_RESOURCE_DIR
-#ifdef __S60_32__
-LANG            SC
-#else
-LANGUAGE_IDS
-#endif
-END
-
 // This is required to allow iaupdate to start the updater
 // by finding the updater EXE file name by using the UID value.
 START RESOURCE  ../src/iaupdater_reg.rss
-DEPENDS iaupdater.rsg
 TARGETPATH	    /private/10003a3f/apps
 END //RESOURCE
 
--- a/iaupdate/IAD/updater/inc/iaupdaterdialog.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/updater/inc/iaupdaterdialog.h	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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"
@@ -24,7 +24,6 @@
 #include <e32base.h>
 #include <f32file.h>
 #include <barsc.h>
-#include <AknGlobalNote.h>
 
 // FORWARD DECLARATIONS
 class MIAUpdaterCancelObserver;
@@ -117,12 +116,12 @@
 private: // data
 
     // Resource file.
-    RResourceFile iResourceFile;
+    //RResourceFile iResourceFile;
 
     // File server handle.        
     RFs& iFs;        
                    
-    CAknGlobalNote* iNote;
+    //CAknGlobalNote* iNote;
     
     // Dialog id for canceling dialog. 
     TInt iNoteId;
--- a/iaupdate/IAD/updater/src/iaupdaterdialog.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/updater/src/iaupdaterdialog.cpp	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-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"
@@ -17,14 +17,6 @@
 
 
 
-#include <AknGlobalNote.h>
-#include <avkon.rsg>
-#include <bautils.h>
-#include <data_caging_path_literals.hrh> 
-#include <iaupdater.rsg>
-#include <StringLoader.h>
-#include <AknUtils.h>   //For AknTextUtils
-
 #include "iaupdaterdialog.h"
 #include "iaupdaterdefs.h"
 #include "iaupdatercancelobserver.h"
@@ -92,7 +84,7 @@
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::ConstructL begin");
     
     // Get resource file path
-    TFileName fileName;
+    /*TFileName fileName;
     fileName.Copy( TParsePtrC( RProcess().FileName() ).Drive() );
     fileName.Append( KDC_APP_RESOURCE_DIR );
     fileName.Append( IAUpdaterDefs::KIAUpdaterResourceFile );
@@ -102,7 +94,7 @@
 
     // Open resource file
     iResourceFile.OpenL( iFs, fileName );
-    iResourceFile.ConfirmSignatureL();    
+    iResourceFile.ConfirmSignatureL(); */   
 
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::ConstructL end");
     }
@@ -116,8 +108,8 @@
 CIAUpdaterDialog::~CIAUpdaterDialog()
     {
     Cancel();
-    delete iNote;
-    iResourceFile.Close();    
+    //delete iNote;
+    //iResourceFile.Close();    
     }
 
 
@@ -126,7 +118,7 @@
 // Show global waiting note during installing.
 // -----------------------------------------------------------------------------
 // 
-void CIAUpdaterDialog::ShowWaitingNoteL( const TDesC& aName, TInt aIndex, TInt aTotalCount )
+void CIAUpdaterDialog::ShowWaitingNoteL( const TDesC& /*aName*/, TInt /*aIndex*/, TInt /*aTotalCount*/ )
 	{	
 	IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::ShowWaitingNoteL begin");
 	if ( iNoteId == 0 )
@@ -134,45 +126,45 @@
 	    IAUPDATE_TRACE("[IAUpdater] Creating global waiting note.");
 	
         // Get localiced string from resc. file. 
-        HBufC* string = ReadResourceLC( R_IAUPDATER_INSTALLING ); 
+        //HBufC* string = ReadResourceLC( R_IAUPDATER_INSTALLING ); 
                                           
-        HBufC* temp1 = HBufC::NewLC( string->Length() + aName.Length() );          
-        TPtr temp1Ptr = temp1->Des();
+        //HBufC* temp1 = HBufC::NewLC( string->Length() + aName.Length() );          
+        //TPtr temp1Ptr = temp1->Des();
         
         // Add pkg's name to string (U0).
-        StringLoader::Format( temp1Ptr, *string, 0, aName );
+        //StringLoader::Format( temp1Ptr, *string, 0, aName );
                                         
         // Increase buffer length for the number.        
-        HBufC* temp2 = 
-            HBufC::NewLC( temp1->Length() + IAUpdaterDefs::KIAUpdaterParamLen );        
-        TPtr temp2Ptr = temp2->Des();
+        //HBufC* temp2 = 
+        //    HBufC::NewLC( temp1->Length() + IAUpdaterDefs::KIAUpdaterParamLen );        
+        //TPtr temp2Ptr = temp2->Des();
          
         // Add index number to string (N1) 
-        StringLoader::Format( temp2Ptr, *temp1, 1, aIndex );
+        //StringLoader::Format( temp2Ptr, *temp1, 1, aIndex );
                         
         // Increase buffer length for the number.  
-        HBufC* finalString = 
-            HBufC::NewLC( temp2->Length() + IAUpdaterDefs::KIAUpdaterParamLen );        
-        TPtr finalPtr = finalString->Des();
+        //HBufC* finalString = 
+        //    HBufC::NewLC( temp2->Length() + IAUpdaterDefs::KIAUpdaterParamLen );        
+        //TPtr finalPtr = finalString->Des();
         
         // Add max count number to string (N2) 
-        StringLoader::Format( finalPtr, *temp2, 2, aTotalCount );
+        //StringLoader::Format( finalPtr, *temp2, 2, aTotalCount );
         
-        AknTextUtils::DisplayTextLanguageSpecificNumberConversion( finalPtr );         
-        if ( !iNote )
-            {
-        	iNote = CAknGlobalNote::NewL();   
-    	    iNote->SetSoftkeys( R_AVKON_SOFTKEYS_CANCEL );
-            }
+        //AknTextUtils::DisplayTextLanguageSpecificNumberConversion( finalPtr );         
+        //if ( !iNote )
+        //    {
+        //	iNote = CAknGlobalNote::NewL();   
+    	//    iNote->SetSoftkeys( R_AVKON_SOFTKEYS_CANCEL );
+        //    }
      	
-	    IAUPDATE_TRACE("[IAUpdater] Showing global waiting note.");
-    	iNoteId = iNote->ShowNoteL( iStatus, EAknGlobalWaitNote, *finalString );
+	//    IAUPDATE_TRACE("[IAUpdater] Showing global waiting note.");
+    	//iNoteId = iNote->ShowNoteL( iStatus, EAknGlobalWaitNote, *finalString );
     	SetActive();    	    	
      
-    	CleanupStack::PopAndDestroy( finalString );
-    	CleanupStack::PopAndDestroy( temp2 );
-    	CleanupStack::PopAndDestroy( temp1 );
-    	CleanupStack::PopAndDestroy( string );
+    	//CleanupStack::PopAndDestroy( finalString );
+    	//CleanupStack::PopAndDestroy( temp2 );
+    	//CleanupStack::PopAndDestroy( temp1 );
+    	//CleanupStack::PopAndDestroy( string );
 		}
 	IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::ShowWaitingNoteL end");
 	}
@@ -187,33 +179,18 @@
 	{
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::CancelWaitingNoteL begin");
 	
-	if ( iNoteId != 0 )
+	/*if ( iNoteId != 0 )
 		{
         IAUPDATE_TRACE("[IAUpdater] Cancel waiting note.");
 	    iNote->CancelNoteL( iNoteId );
 	    iNoteId = 0;
-		}
+		}*/
 
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::CancelWaitingNoteL end");
 	}
 
 	
-// -----------------------------------------------------------------------------	
-// CIAUpdaterDialog::LoadResourceLC
-// Read resource string.
-// -----------------------------------------------------------------------------
-// 
-HBufC* CIAUpdaterDialog::ReadResourceLC( TInt aResourceId )
-    {
-    TResourceReader reader;
-    HBufC8* buff = iResourceFile.AllocReadLC( aResourceId );    
-    reader.SetBuffer( buff );
-    HBufC* text = reader.ReadHBufCL();
-    CleanupStack::PopAndDestroy( buff );
-    CleanupStack::PushL( text );
 
-    return text;
-    }
     
     
 // ---------------------------------------------------------------------------
@@ -235,14 +212,14 @@
     {
     IAUPDATE_TRACE_1("[IAUpdater] CIAUpdaterDialog::RunL() iStatus : %d", iStatus.Int() );
     iNoteId = 0;
-    if ( iStatus.Int() == EAknSoftkeyCancel )
+    /*if ( iStatus.Int() == EAknSoftkeyCancel )
         {
     	iObserver->UserCancel();
         }
     else
         {
         iObserver->UserExit();	
-        }
+        }*/
     }
 
 // ======== GLOBAL FUNCTIONS ========
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/group/backup_registration.xml	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration version="1.0">
+    <proxy_data_manager sid = "0x10202BE9" />
+    <restore requires_reboot = "no"/>
+</backup_registration>
--- a/iaupdate/group/bld.inf	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/group/bld.inf	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:    Build information file for IA Update Client and NCD engine
+* Description:    Build information file for SWUpdate Client 
 *
 */
 
@@ -31,6 +31,13 @@
 #include "../help/group/bld.inf"
 
 PRJ_EXPORTS
+// backup registration
+backup_registration.xml        /epoc32/release/winscw/udeb/z/private/2000F85A/backup_registration.xml
+backup_registration.xml        /epoc32/release/winscw/urel/z/private/2000F85A/backup_registration.xml
+backup_registration.xml        /epoc32/data/z/private/2000F85A/backup_registration.xml
+
+// ROM sis stubs
+
 ../rom/iaupdate_stub.SIS     /epoc32/data/z/system/install/iaupdate_stub.sis
 ../rom/iaupdater_stub.SIS    /epoc32/data/z/system/install/iaupdater_stub.sis
 
--- a/iaupdate/iaupdate.pro	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/iaupdate.pro	Mon May 03 12:38:03 2010 +0300
@@ -16,6 +16,8 @@
 
 TEMPLATE = subdirs
 
-SUBDIRS += IAD\bgcindicatorplugin\bgcindicatorplugin.pro
+SUBDIRS += IAD/bgcindicatorplugin/bgcindicatorplugin.pro
+SUBDIRS += IAD/api/iaupdateapi.pro
+SUBDIRS += IAD/ui/iaupdate.pro
+SUBDIRS += IAD/launcher/iaupdatelauncher.pro
 
-
--- a/iaupdate/rom/iaupdate.iby	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/rom/iaupdate.iby	Mon May 03 12:38:03 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -24,16 +24,12 @@
 #ifdef FF_IAUPDATE
 
 S60_APP_EXE(iaupdate)
-S60_APP_BITMAP(iaupdate)
-S60_APP_AIF_ICONS(iaupdate)
-S60_UPGRADABLE_APP_REG_RSC(iaupdate)
+data=ZPRIVATE\10003a3f\import\apps\iaupdate_reg.rsc           PRIVATE\10003a3f\import\apps\iaupdate_reg.rsc
 S60_APP_EXE(iaupdater)
 S60_UPGRADABLE_APP_REG_RSC(iaupdater)
 S60_APP_EXE(iaupdatelauncher)
-S60_UPGRADABLE_APP_REG_RSC(iaupdatelauncher)
+data=ZPRIVATE\10003a3f\import\apps\iaupdatelauncher_reg.rsc   PRIVATE\10003a3f\import\apps\iaupdatelauncher_reg.rsc
 
-
-file=ABI_DIR\BUILD_DIR\iaupdatetools.dll         SHARED_LIB_DIR\iaupdatetools.dll
 file=ABI_DIR\BUILD_DIR\iaupdateapi.dll           SHARED_LIB_DIR\iaupdateapi.dll
 file=ABI_DIR\BUILD_DIR\iaupdateengine.dll        SHARED_LIB_DIR\iaupdateengine.dll
 file=ABI_DIR\BUILD_DIR\iaupdaterfiles.dll        SHARED_LIB_DIR\iaupdaterfiles.dll
Binary file iaupdate/rom/iaupdate_stub.SIS has changed
--- a/iaupdate/rom/iaupdate_stub.pkg	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/rom/iaupdate_stub.pkg	Mon May 03 12:38:03 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"
@@ -31,9 +31,10 @@
 
 ;DLLs
 ""-"z:\sys\bin\iaupdateengine.dll"
-""-"z:\sys\bin\iaupdatetools.dll"
 ""-"z:\sys\bin\iaupdateapi.dll"
 ""-"z:\sys\bin\iaupdatefwupdate.dll"
+""-"z:\sys\bin\bgcindicatorplugin.dll"
+
 
 
 ;Resources
@@ -43,9 +44,6 @@
 ""-"z:\resource\apps\iaupdatelauncher.r*"
 
 ;Icons
-""-"z:\resource\apps\iaupdate_aif.mif"
-""-"z:\resource\apps\iaupdate.mif"
-""-"z:\resource\apps\iaupdatelauncher_aif.mif"
 ""-"z:\private\200211f4\qgn_note_swupdate_notification.svg"
 
 ;Other Files
--- a/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_01.pkg	Fri Apr 16 15:05:20 2010 +0300
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_01.pkg	Mon May 03 12:38:03 2010 +0300
@@ -2,7 +2,7 @@
 ; 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 the License "Eclipse Public License v1.0"
+; 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".
 ;
--- a/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_02.pkg	Fri Apr 16 15:05:20 2010 +0300
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_02.pkg	Mon May 03 12:38:03 2010 +0300
@@ -2,7 +2,7 @@
 ; 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 the License "Eclipse Public License v1.0"
+; 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".
 ;
--- a/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_03.pkg	Fri Apr 16 15:05:20 2010 +0300
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_03.pkg	Mon May 03 12:38:03 2010 +0300
@@ -2,7 +2,7 @@
 ; 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 the License "Eclipse Public License v1.0"
+; 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".
 ;
--- a/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_04.pkg	Fri Apr 16 15:05:20 2010 +0300
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_04.pkg	Mon May 03 12:38:03 2010 +0300
@@ -2,7 +2,7 @@
 ; 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 the License "Eclipse Public License v1.0"
+; 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".
 ;
--- a/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_05.pkg	Fri Apr 16 15:05:20 2010 +0300
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_nr_option_05.pkg	Mon May 03 12:38:03 2010 +0300
@@ -2,7 +2,7 @@
 ; 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 the License "Eclipse Public License v1.0"
+; 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".
 ;
--- a/installationservices/swi/test/testexes/packages_interpretsis_testcase/pu_int_nr_option_01.pkg	Fri Apr 16 15:05:20 2010 +0300
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/pu_int_nr_option_01.pkg	Mon May 03 12:38:03 2010 +0300
@@ -2,7 +2,7 @@
 ; 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 the License "Eclipse Public License v1.0"
+; 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".
 ;
--- a/installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_01.pkg	Fri Apr 16 15:05:20 2010 +0300
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_01.pkg	Mon May 03 12:38:03 2010 +0300
@@ -2,7 +2,7 @@
 ; 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 the License "Eclipse Public License v1.0"
+; 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".
 ;
--- a/installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_04.pkg	Fri Apr 16 15:05:20 2010 +0300
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_04.pkg	Mon May 03 12:38:03 2010 +0300
@@ -2,7 +2,7 @@
 ; 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 the License "Eclipse Public License v1.0"
+; 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".
 ;
--- a/installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_06.pkg	Fri Apr 16 15:05:20 2010 +0300
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/sp_int_nr_option_06.pkg	Mon May 03 12:38:03 2010 +0300
@@ -2,7 +2,7 @@
 ; 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 the License "Eclipse Public License v1.0"
+; 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".
 ;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/switestfw/inc_private/captestframeworkserver.h	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "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: 
+*
+*/
+
+
+
+
+/**
+ @file 
+*/
+
+#ifndef __APRCAPTESTFRAMEWORK_SERVER_H__
+#define __APRCAPTESTFRAMEWORK_SERVER_H__
+#include <test/testexecuteserverbase.h>
+
+class CCapTestFrameworkServer : public CTestServer
+	{
+public:
+	static CCapTestFrameworkServer* NewL();
+	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+	RFs& Fs(){return iFs;};
+
+private:
+	RFs iFs;
+	};
+#endif	/* ndef __APRCAPTESTFRAMEWORK_SERVER_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/switestfw/inc_private/captestframeworkstep.h	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,93 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "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: 
+*
+*/
+
+
+
+
+/**
+ @file 
+*/
+#ifndef __APRCAPTESTFRAMEWORK_STEP_H__
+#define __APRCAPTESTFRAMEWORK_STEP_H__
+
+#include <test/testexecutestepbase.h>
+#include "captestframeworkserver.h"
+
+#include <captestframework/aprcaptestframework.h>
+
+
+struct TTestEnvironment
+	{
+	TTestEnvironment(const TCapabilitySet& aCaps, TUid aSid, TUid aVid, TBool aExpectPass);
+	
+	TCapabilitySet iCaps;
+	TUid iSid;
+	TUid iVid;
+	TBool iExpectPass;
+	};
+
+
+class CCapTestFrameworkStep : public CTestStep
+	{
+public:
+	enum TThoroughness 
+		{
+		EBasicChecks,			// Just test using no capabilities, and capabilities required
+		EThoroughChecks,		// Test every subset required
+		};
+	
+public:
+	CCapTestFrameworkStep(TThoroughness aThoroughness = EBasicChecks);
+	~CCapTestFrameworkStep();
+	
+	TVerdict doTestStepPreambleL();
+	TVerdict doTestStepPostambleL();
+	TVerdict doTestStepL();
+
+private:
+	void RunTestDllL(const TDesC& aDllName);
+	MCapabilityTestFactory* SetupFactoryL();
+	
+	void PrintCapabilitySet(const TCapabilitySet& aCapSet, const TDesC& aExtra=KNullDesC);
+
+	void RunTestStepL(MCapabilityTest* aTest);
+
+	void GenerateEnvironmentsL(const TCapabilitySet& aCapsNeeded, const TUid& aSidNeeded, const TUid& aVidNeeded, RArray<TTestEnvironment>& aEnvironments);
+
+	TCapabilitySet InvertCapSet(const TCapabilitySet& aCapSet);
+
+	
+	// Sets the helper up with capabilities
+	void SetupHelperL(const TTestEnvironment& aEnvironment);
+	
+	// Runs helper
+	void RunHelperL(TInt aTestNumber, TBool aShouldPass);
+
+private:
+	RFs iFs;
+	TThoroughness iThoroughness;
+	TInt iCurrentTest;
+	MCapabilityTestFactory* iFactory;
+	RLibrary iLibrary;
+	TPtrC iDllName;
+	TBool iOmitTCBCapInComplementSet; // This functionality is needed for testing components that don't have the TCB capability, for example the SIF API.
+	};
+
+_LIT(KRunBasicCapabilityChecks,"RunBasicCapabilityChecks");
+_LIT(KRunThoroughCapabilityChecks,"RunThoroughCapabilityChecks");
+
+#endif /* #ifndef __APRCAPTESTFRAMEWORK_STEP_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/switestfw/inc_private/tsecurityutils.h	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "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: 
+* Defines the test step for tsecuritytests test harness
+*
+*/
+
+
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef TSECURITYUTILS_H
+#define TSECURITYUTILS_H
+
+#include <test/testexecutestepbase.h>
+
+_LIT(KSecurityUtilsStep, "SecurityUtils");
+
+class CSecurityUtilsStep : public CTestStep
+	{
+public:	
+	TVerdict doTestStepL();
+	};
+	
+#endif /* TSECURITYUTILS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/switestfw/inc_private/tsecurityutilsserver.h	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "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: 
+* Defines the test server of the Software Component Registry test harness
+*
+*/
+
+
+
+
+/**
+ @file 
+ @internalComponent
+ @test
+*/
+
+#ifndef TSECURITYUTILSSERVER_H
+#define TSECURITYUTILSSERVER_H
+
+#include <test/testexecuteserverbase.h>
+
+class CSecurityUtilsTestServer : public CTestServer
+
+	{
+public:
+	static CSecurityUtilsTestServer* NewL();
+	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
+	};
+
+
+#endif /* TSECURITYUTILSSERVER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/switestfw/scripts/tsecurityutils.ini	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,106 @@
+[public_file_path]
+FileName=c:\a.txt
+
+[path_wildcards]
+FileName=c:\*.txt
+ExpectedTCB=True
+
+[path_relative1]
+FileName=c:\a\..\a.txt
+ExpectedTCB=True
+
+[path_relative2]
+FileName=c:\a\b\..\a.txt
+ExpectedTCB=True
+
+[private_path_no_subdir1]
+FileName=c:\private\
+ExpectedTCB=True
+
+[private_path_no_subdir2]
+FileName=c:\private\aaa
+ExpectedTCB=True
+
+[private_path_no_sid_subdir1]
+FileName=c:\private\aaa\a.txt
+ExpectedTCB=True
+
+[private_path_no_sid_subdir2]
+FileName=c:\private\aaa\
+ExpectedTCB=True
+
+[private_path_no_sid_subdir3]
+FileName=c:\private\qwertyui\
+ExpectedTCB=True
+
+[private_path_other_sid1]
+FileName=c:\private\12345679\
+ExpectedAllFiles=True
+ExpectedTCB=True
+ClientSid=12345678
+
+[private_path_other_sid2]
+FileName=c:\private\12345679\a.txt
+ExpectedAllFiles=True
+ExpectedTCB=True
+ClientSid=12345678
+
+[private_path_other_sid3]
+FileName=c:\privAte\12345679\a.txt
+ExpectedAllFiles=True
+ExpectedTCB=True
+ClientSid=12345678
+
+[private_path_other_sid_import1]
+FileName=c:\privAte\12345679\import\a.txt
+ClientSid=12345678
+
+[private_path_other_sid_import2]
+FileName=c:\privAte\12345679\iMporT\aaaaa.bbbbb
+ClientSid=12345678
+
+[private_path_my_sid1]
+FileName=c:\private\12345678\
+ClientSid=12345678
+
+[private_path_my_sid2]
+FileName=c:\private\12345678\a.txt
+ClientSid=12345678
+
+[sys_path1]
+FileName=c:\sys\
+ExpectedTCB=True
+
+[sys_path2]
+FileName=c:\sys\a.txt
+ExpectedTCB=True
+
+[sys_path3]
+FileName=c:\sYs\a.txt
+ExpectedTCB=True
+
+[resource_path1]
+FileName=c:\resource\
+ExpectedTCB=True
+
+[resource_path2]
+FileName=c:\resource\a.txt
+ExpectedTCB=True
+
+[resource_path3]
+FileName=c:\reSouRce\a.txt
+ExpectedTCB=True
+
+[empty_path1]
+FileName=c:\a.txt
+
+[empty_path2]
+FileName=c:\
+
+[malformed_path1]
+FileName=£`#/\$%
+ExpectedTCB=True
+
+[malformed_path2]
+FileName=c:::/\aqw
+ExpectedTCB=True
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/switestfw/scripts/tsecurityutils.script	Mon May 03 12:38:03 2010 +0300
@@ -0,0 +1,82 @@
+//
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "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: 
+//
+//
+
+PRINT Test SecurityUtils helper library
+
+LOAD_SUITE tsecurityutils
+
+
+//! @SYMTestCaseID 		SEC-SECURITYUTILS-0001
+//! @SYMTestCaseDesc 		Check public file path
+START_TESTCASE SEC-SECURITYUTILS-0001
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini public_file_path
+END_TESTCASE SEC-SECURITYUTILS-0001
+
+//! @SYMTestCaseID 		SEC-SECURITYUTILS-0002
+//! @SYMTestCaseDesc 		Check path with wildcards
+START_TESTCASE SEC-SECURITYUTILS-0002
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini path_wildcards
+END_TESTCASE SEC-SECURITYUTILS-0002
+
+//! @SYMTestCaseID 		SEC-SECURITYUTILS-0003
+//! @SYMTestCaseDesc 		Check relative paths
+START_TESTCASE SEC-SECURITYUTILS-0003
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini path_relative1
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini path_relative2
+END_TESTCASE SEC-SECURITYUTILS-0003
+
+//! @SYMTestCaseID 		SEC-SECURITYUTILS-0004
+//! @SYMTestCaseDesc 		Check private paths
+START_TESTCASE SEC-SECURITYUTILS-0004
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_no_subdir1
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_no_subdir2
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_no_sid_subdir1
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_no_sid_subdir2
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_no_sid_subdir3
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_other_sid1
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_other_sid2
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_other_sid3
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_other_sid_import1
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_other_sid_import2
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_my_sid1
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini private_path_my_sid2
+END_TESTCASE SEC-SECURITYUTILS-0004
+
+//! @SYMTestCaseID 		SEC-SECURITYUTILS-0005
+//! @SYMTestCaseDesc 		Check \sys and \resource paths
+START_TESTCASE SEC-SECURITYUTILS-0005
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini sys_path1
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini sys_path2
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini sys_path3
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini resource_path1
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini resource_path2
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini resource_path3
+END_TESTCASE SEC-SECURITYUTILS-0005
+
+//! @SYMTestCaseID 		SEC-SECURITYUTILS-0006
+//! @SYMTestCaseDesc 		Check empty path
+START_TESTCASE SEC-SECURITYUTILS-0006
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini empty_path1
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini empty_path2
+END_TESTCASE SEC-SECURITYUTILS-0006
+
+//! @SYMTestCaseID 		SEC-SECURITYUTILS-0007
+//! @SYMTestCaseDesc 		Check malformed path
+START_TESTCASE SEC-SECURITYUTILS-0007
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini malformed_path1
+RUN_TEST_STEP 100 tsecurityutils SecurityUtils z:\tsecurityutils\tsecurityutils.ini malformed_path2
+END_TESTCASE SEC-SECURITYUTILS-0006
\ No newline at end of file
--- a/ncdengine/debuglogger/obex/inc/btservicesearcher.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/ncdengine/debuglogger/obex/inc/btservicesearcher.h	Mon May 03 12:38:03 2010 +0300
@@ -207,9 +207,11 @@
     /*! @var iIsDeviceSelectorConnected is the device selector connected ? */
     TBool iIsDeviceSelectorConnected;
 
+#ifdef _0
     /*! @var iDeviceSelector a handle to the bluetooth device selector notifier */
     RNotifier iDeviceSelector;
-
+#endif
+    
     /*! @var iResponse the response of the device selection */
     TBTDeviceResponseParamsPckg iResponse;
 
--- a/ncdengine/debuglogger/obex/src/btservicesearcher.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/ncdengine/debuglogger/obex/src/btservicesearcher.cpp	Mon May 03 12:38:03 2010 +0300
@@ -27,11 +27,14 @@
 
 CBTServiceSearcher::~CBTServiceSearcher()
 {
+#ifdef _0
     if (iIsDeviceSelectorConnected)
 	{
         iDeviceSelector.CancelNotifier(KDeviceSelectionNotifierUid);
         iDeviceSelector.Close();
 	}
+#endif
+    
     delete iSdpSearchPattern;
     iSdpSearchPattern = NULL;
 	
@@ -46,11 +49,14 @@
 
 void CBTServiceSearcher::Cancel() {
 
+#ifdef _0
     if (iIsDeviceSelectorConnected)
 	{
         iDeviceSelector.CancelNotifier(KDeviceSelectionNotifierUid);
     
 	}
+#endif
+    
     delete iSdpSearchPattern;
     iSdpSearchPattern = NULL;
 	
@@ -66,23 +72,28 @@
 
 }
 
-void CBTServiceSearcher::SelectDeviceByDiscoveryL(TRequestStatus& aObserverRequestStatus)
+void CBTServiceSearcher::SelectDeviceByDiscoveryL(TRequestStatus& /* aObserverRequestStatus */)
     {
+    
+#ifdef _0
     if (!iIsDeviceSelectorConnected)
         {
         User::LeaveIfError(iDeviceSelector.Connect());
         iIsDeviceSelectorConnected = ETrue;
         }
+#endif
 
     //  Request a device selection 
     TBTDeviceSelectionParamsPckg selectionFilter;
     selectionFilter().SetUUID(ServiceClass());
-
+    
+#ifdef _0
     iDeviceSelector.StartNotifierAndGetResponse(
         aObserverRequestStatus, 
         KDeviceSelectionNotifierUid, 
         selectionFilter, 
         iResponse);
+#endif
     }
 
 
--- a/ncdengine/debuglogger/obex/src/objectexchangeclient.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/ncdengine/debuglogger/obex/src/objectexchangeclient.cpp	Mon May 03 12:38:03 2010 +0300
@@ -22,6 +22,8 @@
 
 #include "ObjectExchangeClient.h"
 #include "ObjectExchangeServiceSearcher.h"
+
+#include "obexconstantsinternal.h"
 #include "BTObjectExchange.pan"
 
 #include <e32svr.h>
--- a/ncdengine/engine/accesspointmanager/src/catalogsaccesspointmanagerimpl.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/ncdengine/engine/accesspointmanager/src/catalogsaccesspointmanagerimpl.cpp	Mon May 03 12:38:03 2010 +0300
@@ -537,7 +537,7 @@
 TInt CCatalogsAccessPointManager::AccessPointIdL(
     const TDesC& aNameSpace,
     const MCatalogsAccessPointManager::TAction& aAction,
-    const TUid& aClientUid,
+    const TUid& /* aClientUid */,
     TUint32& aAccessPointId ) 
     {
     DLTRACEIN((_L("Namespace: %S, Action: %d, clientUid: %d"), &aNameSpace, aAction, aClientUid.iUid));
@@ -565,7 +565,7 @@
     const TDesC& aNameSpace,
     const TDesC& aCatalogId,
     const MCatalogsAccessPointManager::TAction& aAction,
-    const TUid& aClientUid,
+    const TUid& /* aClientUid */,
     TUint32& aAccessPointId) 
     {
     DLTRACEIN((_L("Namespace: %S, CatalogId: %S, Action: %d, clientUid: %d"), &aNameSpace, &aCatalogId, aAction, aClientUid.iUid));
@@ -592,7 +592,7 @@
 TInt CCatalogsAccessPointManager::AccessPointIdL(
     const CNcdNodeIdentifier& aNodeIdentifier,
     const MCatalogsAccessPointManager::TAction& aAction,
-    const TUid& aClientUid,
+    const TUid& /* aClientUid */,
     TUint32& aAccessPointId) 
     {
     DLTRACEIN((_L("Namespace: %S, NodeId: %S, Action: %d, clientUid: %d"),
@@ -716,7 +716,7 @@
     }
             
     
-TBool CCatalogsAccessPointManager::ValidateAccessPointL( CCatalogsAccessPoint* aAccessPoint )
+TBool CCatalogsAccessPointManager::ValidateAccessPointL( CCatalogsAccessPoint* /* aAccessPoint */ )
     {
     DLTRACEIN((""));
     
@@ -778,7 +778,7 @@
     return EFalse;
     }
 
-TBool CCatalogsAccessPointManager::MatchInCommsDbL( const CCatalogsAccessPointSettings& aSettings, TUint32& aId )
+TBool CCatalogsAccessPointManager::MatchInCommsDbL( const CCatalogsAccessPointSettings& /* aSettings */, TUint32& /* aId */)
     {
     DLTRACEIN(_L("Checking comms DB for matching access point"));
     
@@ -833,7 +833,7 @@
     return EFalse;
     }
 
-void CCatalogsAccessPointManager::CreateApToCommsDBL( const CCatalogsAccessPoint& aSettings, TUint32& aId )
+void CCatalogsAccessPointManager::CreateApToCommsDBL( const CCatalogsAccessPoint& /* aSettings */, TUint32& /* aId */ )
     {
     DLTRACEIN(_L("Creating AP to comms DB"));
     
@@ -1000,7 +1000,7 @@
     iClientAccessPointData = NULL;
     }
 
-void CCatalogsAccessPointManager::RemoveApFromCommsDatabaseL( const TUint32& aId )
+void CCatalogsAccessPointManager::RemoveApFromCommsDatabaseL( const TUint32& /* aId */ )
     {
     
 #ifdef _0
@@ -1213,7 +1213,7 @@
 #endif   
     
 void CCatalogsAccessPointManager::SetApDetailL(
-    CCatalogsAccessPoint& aAp, const TDesC& aKey, const TDesC& aValue ) 
+    CCatalogsAccessPoint& /* aAp */, const TDesC& /* aKey */, const TDesC& /* aValue */ ) 
     {
     
 #ifdef _0
--- a/ncdengine/engine/accesspointmanager/src/catalogsaccesspointsettings.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/ncdengine/engine/accesspointmanager/src/catalogsaccesspointsettings.cpp	Mon May 03 12:38:03 2010 +0300
@@ -220,7 +220,7 @@
     }
 #endif
 
-void CCatalogsAccessPointSettings::ExternalizeL(RWriteStream& aStream) 
+void CCatalogsAccessPointSettings::ExternalizeL(RWriteStream& /* aStream */) 
     {
     DLTRACEIN((""));
     
@@ -274,7 +274,7 @@
     DLTRACEOUT((""));        
     }
     
-void CCatalogsAccessPointSettings::InternalizeL(RReadStream& aStream) 
+void CCatalogsAccessPointSettings::InternalizeL(RReadStream& /* aStream */) 
     {
     
 #ifdef _0
--- a/ncdengine/engine/group/bld.inf	Fri Apr 16 15:05:20 2010 +0300
+++ b/ncdengine/engine/group/bld.inf	Mon May 03 12:38:03 2010 +0300
@@ -41,12 +41,10 @@
 
 // The following path is a general export dir which is needed for ROM builds
 // (and perhaps pkg references).
-backup_registration.xml         /epoc32/data/z/private/20019119/backup_registration.xml
+backup_registration.xml         z:/private/20019119/backup_registration.xml
 
 // Config file
-config.xml                      /epoc32/release/winscw/udeb/z/private/20019119/config.xml
-config.xml                      /epoc32/data/z/private/20019119/config.xml
+config.xml                      z:/private/20019119/config.xml
 
 // Variant config file
-config_variant.xml                      /epoc32/release/winscw/udeb/z/private/20019119/config_variant.xml
-config_variant.xml                      /epoc32/data/z/private/20019119/config_variant.xml
+config_variant.xml                      z:/private/20019119/config_variant.xml
--- a/ncdengine/engine/group/catalogsdebug.mmp	Fri Apr 16 15:05:20 2010 +0300
+++ b/ncdengine/engine/group/catalogsdebug.mmp	Mon May 03 12:38:03 2010 +0300
@@ -51,7 +51,7 @@
 SOURCEPATH    ../../engine/src
 SOURCE 	      catalogsdebug.cpp
 #ifndef WINSCW
-SOURCE		  stackpointer.s
+SOURCE		  stackpointer.cia
 #endif
 
 // System include paths
--- a/ncdengine/engine/src/catalogsdebug.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/ncdengine/engine/src/catalogsdebug.cpp	Mon May 03 12:38:03 2010 +0300
@@ -49,7 +49,7 @@
 #include "e32debug.h"
 
 #ifndef __WINS__
-extern "C" TUint32 GetStackPointer();
+extern TUint32 GetStackPointer();
 #endif
 
 //#define _DDPRINT( x ) RDebug::Printf x
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ncdengine/engine/src/stackpointer.cia	Mon May 03 12:38:03 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:  
+*
+*/
+#include <e32def.h> 
+
+__NAKED__ TUint32 GetStackPointer(void)
+		{
+		asm("mov r0,sp");
+		asm("bx lr");
+		}
+
--- a/ncdengine/engine/src/stackpointer.s	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +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: 
-;
-
-
-;.text
-;.global GetStackPointer
-;
-;GetStackPointer:
-;	mov r0,r13
-;	mov pc,r14
-
-	AREA |.text|, CODE, READONLY
-	EXPORT GetStackPointer
-
-GetStackPointer
-	mov	r0,sp
-	bx lr
-	END
--- a/ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp	Mon May 03 12:38:03 2010 +0300
@@ -581,7 +581,7 @@
     
     do    
         {
-        TRAP( err, iDmgr.ConnectL( sessionId, *this, ETrue ) );
+        // TRAP( err, iDmgr.ConnectL( sessionId, *this, ETrue ) );
         if ( err != KErrNone ) 
             {
             DLERROR(("DL manager connection failed with err: %d, retry attempts left", 
@@ -607,9 +607,9 @@
     iNetworkManager = &CCatalogsHttpSessionManager::NetworkManagerL();
     iNetworkManager->AddObserverL( *this );    
     
-    iDmgr.SetIntAttribute( EDlMgrExitAction, EExitPause );
+//    iDmgr.SetIntAttribute( EDlMgrExitAction, EExitPause );
     // Restore downloads from previous sessions
-    RestoreDownloadsL();
+//    RestoreDownloadsL();
     DLTRACEOUT((""));
     }
     
--- a/ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp	Mon May 03 12:38:03 2010 +0300
@@ -561,6 +561,7 @@
     CleanupStack::PopAndDestroy( javaRegistry );
     return exists;
     */
+    return EFalse;
     
     }
 
@@ -1839,7 +1840,7 @@
     {
     DLTRACEIN((""));
         
-    TApaAppInfo info;
+/*    TApaAppInfo info;
     ConnectApaLsL();    
     User::LeaveIfError( iApaLs.GetAllApps() );
     
@@ -1867,7 +1868,8 @@
         {       
         appErr = iApaLs.GetNextApp( info );
         if ( appErr == KErrNone )
-            {            
+            {
+            DLTRACE(("After GetNextApp"));
             // App is considered a ROM app if its not found either
             // in SIS registry or midlet registry
             // Note: ROM apps can be in SIS registry also but that doesn't
@@ -1910,7 +1912,7 @@
     while( appErr == KErrNone && retryCount >= 0 );
         
     iApaLs.Close();
-    CleanupStack::PopAndDestroy( &midletUids );    
+    CleanupStack::PopAndDestroy( &midletUids );*/    
     
     DLTRACEOUT(("ROM apps: %d", iRomUids.Count() ));
     }
@@ -2145,6 +2147,9 @@
     CleanupStack::PopAndDestroy( registry );
     return midletUid;
     */
+    
+    return KNullUid;
+    
     }
 
 #endif // USE_OLD_JAVA_API
--- a/ncdengine/provider/server/inc/ncdfavoritemanagerimpl.h	Fri Apr 16 15:05:20 2010 +0300
+++ b/ncdengine/provider/server/inc/ncdfavoritemanagerimpl.h	Mon May 03 12:38:03 2010 +0300
@@ -107,9 +107,92 @@
     virtual void CounterPartLost(
         const MCatalogsSession& aSession );
     
+private:
+
+    /**
+     * CNcdClientFavorites object encapsulates the favorite identifiers of one
+     * client.
+     */
+    class CNcdClientFavorites : public CBase,
+                                public MNcdStorageDataItem
+        {
+    public:
+        static CNcdClientFavorites* NewLC( const TUid& aClientUid );
+        ~CNcdClientFavorites();
+        
+        TUid ClientUid() const;
+        void AddFavoriteL( CNcdNodeIdentifier* aNodeIdentifier );
+        void RemoveFavorite( const CNcdNodeIdentifier& aNodeIdentifier );
+        void RemoveFavorites();
+        void SetDisclaimerL(
+            const CNcdNodeIdentifier& aNodeIdentifier,
+            const CNcdNodeDisclaimer& aDisclaimer );
+        void RemoveDisclaimer( const CNcdNodeIdentifier& aNodeIdentifier );
+        CNcdNodeDisclaimer* Disclaimer(
+            const CNcdNodeIdentifier& aNodeIdentifier ) const;
+            
+        TBool HasFavorite( const CNcdNodeIdentifier& aNodeIdentifier ) const;
+        
+        const RPointerArray<CNcdNodeIdentifier>& Identifiers() const;
+        void ExternalizeIdentifiersL( RWriteStream& aStream ) const;
+                
+    public: // from MNcdStorageDataItem
+
+        /* 
+        * @see MNcdStorageDataItem::ExternalizeL
+        */
+        virtual void ExternalizeL( RWriteStream& aStream );
+
+        /* 
+        * @see MNcdStorageDataItem::InternalizeL
+        */
+        virtual void InternalizeL( RReadStream& aStream );
+        
+    protected:
+        CNcdClientFavorites( const TUid& aClientUid );
+        void CloseDisclaimers();
+        
+    private: 
+        
+        // Node identifiers.
+        RPointerArray<CNcdNodeIdentifier> iIdentifiers;
+        // Node disclaimers. A disclaimer at index 'i' is disclaimer of the node at
+        // the same index.
+        RPointerArray<CNcdNodeDisclaimer> iDisclaimers;
+        
+        // Client uid.
+        TUid iClientUid;
+        };
+        
+        
+    class CNcdTemporaryFavorites : public CBase 
+        {
+    public: // public functions
+        CNcdTemporaryFavorites( MCatalogsSession& aSession );
+        ~CNcdTemporaryFavorites();
+        
+        
+    public: // member variables
+        MCatalogsSession& iSession;
+        RPointerArray<CNcdNodeIdentifier> iFavoriteIdentifiers;
+        };
+        
+    CNcdGeneralManager& iGeneralManager;
+    
+    // Node manager.        
+    CNcdNodeManager& iNodeManager;
+    
+    // Favorite nodes of all the clients.
+    RPointerArray<CNcdClientFavorites> iFavorites;
+    
+    // Temp favorite mappings.
+    RPointerArray<CNcdTemporaryFavorites> iTempFavorites;
+    
+    // Storage manager.
+    MNcdStorageManager& iStorageManager;       
+    
 protected:
 
-    class CNcdClientFavorites;
     class CNcdTemporaryFavorites;
     
     CNcdFavoriteManager( CNcdGeneralManager& aGeneralManager );
@@ -234,89 +317,6 @@
     void DbSaveFavoritesL( CNcdClientFavorites& aFavorites );    
     
     
-private:
-
-    /**
-     * CNcdClientFavorites object encapsulates the favorite identifiers of one
-     * client.
-     */
-    class CNcdClientFavorites : public CBase,
-                                public MNcdStorageDataItem
-        {
-    public:
-        static CNcdClientFavorites* NewLC( const TUid& aClientUid );
-        ~CNcdClientFavorites();
-        
-        TUid ClientUid() const;
-        void AddFavoriteL( CNcdNodeIdentifier* aNodeIdentifier );
-        void RemoveFavorite( const CNcdNodeIdentifier& aNodeIdentifier );
-        void RemoveFavorites();
-        void SetDisclaimerL(
-            const CNcdNodeIdentifier& aNodeIdentifier,
-            const CNcdNodeDisclaimer& aDisclaimer );
-        void RemoveDisclaimer( const CNcdNodeIdentifier& aNodeIdentifier );
-        CNcdNodeDisclaimer* Disclaimer(
-            const CNcdNodeIdentifier& aNodeIdentifier ) const;
-            
-        TBool HasFavorite( const CNcdNodeIdentifier& aNodeIdentifier ) const;
-        
-        const RPointerArray<CNcdNodeIdentifier>& Identifiers() const;
-        void ExternalizeIdentifiersL( RWriteStream& aStream ) const;
-                
-    public: // from MNcdStorageDataItem
-
-        /* 
-        * @see MNcdStorageDataItem::ExternalizeL
-        */
-        virtual void ExternalizeL( RWriteStream& aStream );
-
-        /* 
-        * @see MNcdStorageDataItem::InternalizeL
-        */
-        virtual void InternalizeL( RReadStream& aStream );
-        
-    protected:
-        CNcdClientFavorites( const TUid& aClientUid );
-        void CloseDisclaimers();
-        
-    private: 
-        
-        // Node identifiers.
-        RPointerArray<CNcdNodeIdentifier> iIdentifiers;
-        // Node disclaimers. A disclaimer at index 'i' is disclaimer of the node at
-        // the same index.
-        RPointerArray<CNcdNodeDisclaimer> iDisclaimers;
-        
-        // Client uid.
-        TUid iClientUid;
-        };
-        
-        
-    class CNcdTemporaryFavorites : public CBase 
-        {
-    public: // public functions
-        CNcdTemporaryFavorites( MCatalogsSession& aSession );
-        ~CNcdTemporaryFavorites();
-        
-        
-    public: // member variables
-        MCatalogsSession& iSession;
-        RPointerArray<CNcdNodeIdentifier> iFavoriteIdentifiers;
-        };
-        
-    CNcdGeneralManager& iGeneralManager;
-    
-    // Node manager.        
-    CNcdNodeManager& iNodeManager;
-    
-    // Favorite nodes of all the clients.
-    RPointerArray<CNcdClientFavorites> iFavorites;
-    
-    // Temp favorite mappings.
-    RPointerArray<CNcdTemporaryFavorites> iTempFavorites;
-    
-    // Storage manager.
-    MNcdStorageManager& iStorageManager;       
 };
 
 #endif
--- a/secureswitools/makekeys/group/bld.inf	Fri Apr 16 15:05:20 2010 +0300
+++ b/secureswitools/makekeys/group/bld.inf	Mon May 03 12:38:03 2010 +0300
@@ -27,8 +27,6 @@
 
 PRJ_EXPORTS
 
-../group/makekeys.ipr	/epoc32/engdoc/tools/makekeys.ipr
-
 PRJ_MMPFILES
 #ifdef TOOLS
 #ifndef TOOLS2
--- a/secureswitools/makekeys/group/makekeys.ipr	Fri Apr 16 15:05:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-[purpose]
-
-Creates private/public key pair and generates certificate requests.
-Used with makesis to create digitally signed SIS files.
-
-[categories]
-development
-
-[files]
-tools\makekeys.exe
-
-[owner]
-Runtime & Tools		# MAKEKEYS
-
-[IPR]
-Copyright (c) 2000 Symbian Ltd. All rights reserved.
-
-Makekeys.exe can be freely distributed as a binary, 
-but the source code requires an export licence.
--- a/secureswitools/makekeys/group/security_makekeys.mrp	Fri Apr 16 15:05:20 2010 +0300
+++ b/secureswitools/makekeys/group/security_makekeys.mrp	Mon May 03 12:38:03 2010 +0300
@@ -20,10 +20,8 @@
 #MattD: it doesn't like 'tools rel'...
 binary	\epoc32\tools\makekeys.exe
 exports	\sf\mw\appinstall\secureswitools\makekeys\group
--export_file	\sf\mw\appinstall\secureswitools\makekeys\group\makekeys.ipr	\epoc32\engdoc\tools\makekeys.ipr
 notes_source	\component_defs\release.src
 
-
 ipr E 
 ipr T \sf\mw\appinstall\secureswitools\makekeys\tdata