201031_01
authorhgs
Fri, 06 Aug 2010 10:59:22 +0300
changeset 58 67f2119dc623
parent 57 0dae4436159f
child 64 48c14c385b0e
201031_01
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/sifuierrorinfo.h
appinstall_plat/sifui_api/inc/sifuierrorinfo.inl
appinstall_plat/sifui_api/inc/sifuiinstallindicatordefinitions.h
appinstall_plat/sifui_api/inc/sifuiprivate.h
appinstall_plat/sifui_api/src/sifui.cpp
appinstall_plat/sifui_api/src/sifuierrorinfo.cpp
appinstall_plat/sifui_api/src/sifuiprivate.cpp
appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialog.h
appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogcertificatedetails.h
appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogcontentwidget.h
appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogdefinitions.h
appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialoggrantcapabilities.h
appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialoggrantcapabilitiescontent.h
appinstaller/AppinstUi/sifuidevicedialogplugin/rom/sifuidevicedialogplugin.iby
appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.pro
appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.qcrml
appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialog.cpp
appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogcontentwidget.cpp
appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialoggrantcapabilities.cpp
appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialoggrantcapabilitiescontent.cpp
appinstaller/AppinstUi/sifuiinstallindicatorplugin/rom/sifuiinstallindicatorplugin.iby
appinstaller/AppinstUi/sifuiinstallindicatorplugin/sifuiinstallindicatorplugin.qcrml
appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginerrors.h
appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginuihandlerbase.h
appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginactiveimpl.cpp
appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandler.cpp
appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandlerbase.cpp
appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandlersilent.cpp
installationservices/refswinstallationplugin/inc/sifrefinstaller.iby
installationservices/refswinstallationplugin/inc/tsifrefinstaller.iby
installationservices/swi/inc/switextshell.iby
installationservices/swi/inc/tswitextshell.iby
installationservices/swi/source/sisfile/siscompressed.cpp
installationservices/swi/source/sisfile/sisdata.cpp
installationservices/swi/test/tsisfile/steps/basestep.cpp
installationservices/swiconfig/usif/scr/scr.db
installationservices/swinstallationfw/inc/sif.iby
secureswitools/swisistools/source/sisxlibrary/siscontents.cpp
secureswitools/swisistools/source/sisxlibrary/sisinfo.cpp
secureswitools/swisistools/source/sisxlibrary/utility.cpp
secureswitools/swisistools/source/sisxlibrary/utility.h
secureswitools/swisistools/test/tdumpsis/testdumpsis.pl
--- a/appinstall_plat/sifui_api/bwins/sifuiu.def	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstall_plat/sifui_api/bwins/sifuiu.def	Fri Aug 06 10:59:22 2010 +0300
@@ -11,16 +11,23 @@
 	?ExternalizeL@CSifUiCertificateInfo@@QBEXAAVRWriteStream@@@Z @ 10 NONAME ; void CSifUiCertificateInfo::ExternalizeL(class RWriteStream &) const
 	?IsCancelled@CSifUi@@QAEHXZ @ 11 NONAME ; int CSifUi::IsCancelled(void)
 	?Name@CSifUiAppInfo@@QBEABVTDesC16@@XZ @ 12 NONAME ; class TDesC16 const & CSifUiAppInfo::Name(void) const
-	?NewL@CSifUi@@SAPAV1@XZ @ 13 NONAME ; class CSifUi * CSifUi::NewL(void)
-	?NewL@CSifUiAppInfo@@SAPAV1@ABV1@@Z @ 14 NONAME ; class CSifUiAppInfo * CSifUiAppInfo::NewL(class CSifUiAppInfo const &)
-	?Version@CSifUiAppInfo@@QBEABVTVersion@@XZ @ 15 NONAME ; class TVersion const & CSifUiAppInfo::Version(void) const
-	?SetCertificateInfoL@CSifUi@@QAEXABV?$RPointerArray@VCSifUiCertificateInfo@@@@@Z @ 16 NONAME ; void CSifUi::SetCertificateInfoL(class RPointerArray<class CSifUiCertificateInfo> const &)
-	?Size@CSifUiAppInfo@@QBEHXZ @ 17 NONAME ; int CSifUiAppInfo::Size(void) const
-	?SetMemorySelectionL@CSifUi@@QAEXABV?$RArray@H@@@Z @ 18 NONAME ; void CSifUi::SetMemorySelectionL(class RArray<int> const &)
-	?NewLC@CSifUiAppInfo@@SAPAV1@ABVTDesC16@@0ABVTVersion@@HPBVCApaMaskedBitmap@@@Z @ 19 NONAME ; class CSifUiAppInfo * CSifUiAppInfo::NewLC(class TDesC16 const &, class TDesC16 const &, class TVersion const &, int, class CApaMaskedBitmap const *)
-	?Vendor@CSifUiAppInfo@@QBEABVTDesC16@@XZ @ 20 NONAME ; class TDesC16 const & CSifUiAppInfo::Vendor(void) const
-	?ShowProgressL@CSifUi@@QAEXABVCSifUiAppInfo@@HW4TInstallingPhase@1@@Z @ 21 NONAME ; void CSifUi::ShowProgressL(class CSifUiAppInfo const &, int, enum CSifUi::TInstallingPhase)
-	?SetButtonVisible@CSifUi@@QAEXW4TOptionalButton@1@H@Z @ 22 NONAME ; void CSifUi::SetButtonVisible(enum CSifUi::TOptionalButton, int)
-	?SelectedDrive@CSifUi@@QAEHAAH@Z @ 23 NONAME ; int CSifUi::SelectedDrive(int &)
-	?NewLC@CSifUi@@SAPAV1@XZ @ 24 NONAME ; class CSifUi * CSifUi::NewLC(void)
+	?NewLC@CSifUiErrorInfo@@SAPAV1@W4TErrorCategory@Usif@@HHABVTDesC16@@1@Z @ 13 NONAME ; class CSifUiErrorInfo * CSifUiErrorInfo::NewLC(enum Usif::TErrorCategory, int, int, class TDesC16 const &, class TDesC16 const &)
+	?NewL@CSifUi@@SAPAV1@XZ @ 14 NONAME ; class CSifUi * CSifUi::NewL(void)
+	?NewL@CSifUiAppInfo@@SAPAV1@ABV1@@Z @ 15 NONAME ; class CSifUiAppInfo * CSifUiAppInfo::NewL(class CSifUiAppInfo const &)
+	?Version@CSifUiAppInfo@@QBEABVTVersion@@XZ @ 16 NONAME ; class TVersion const & CSifUiAppInfo::Version(void) const
+	?NewL@CSifUiErrorInfo@@SAPAV1@W4TErrorCategory@Usif@@HHABVTDesC16@@1@Z @ 17 NONAME ; class CSifUiErrorInfo * CSifUiErrorInfo::NewL(enum Usif::TErrorCategory, int, int, class TDesC16 const &, class TDesC16 const &)
+	?SetCertificateInfoL@CSifUi@@QAEXABV?$RPointerArray@VCSifUiCertificateInfo@@@@@Z @ 18 NONAME ; void CSifUi::SetCertificateInfoL(class RPointerArray<class CSifUiCertificateInfo> const &)
+	?Size@CSifUiAppInfo@@QBEHXZ @ 19 NONAME ; int CSifUiAppInfo::Size(void) const
+	?SetMemorySelectionL@CSifUi@@QAEXABV?$RArray@H@@@Z @ 20 NONAME ; void CSifUi::SetMemorySelectionL(class RArray<int> const &)
+	?NewLC@CSifUiAppInfo@@SAPAV1@ABVTDesC16@@0ABVTVersion@@HPBVCApaMaskedBitmap@@@Z @ 21 NONAME ; class CSifUiAppInfo * CSifUiAppInfo::NewLC(class TDesC16 const &, class TDesC16 const &, class TVersion const &, int, class CApaMaskedBitmap const *)
+	?Vendor@CSifUiAppInfo@@QBEABVTDesC16@@XZ @ 22 NONAME ; class TDesC16 const & CSifUiAppInfo::Vendor(void) const
+	?ShowGrantCapabilitiesL@CSifUi@@QAEHABVTCapabilitySet@@@Z @ 23 NONAME ; int CSifUi::ShowGrantCapabilitiesL(class TCapabilitySet const &)
+	?ShowProgressL@CSifUi@@QAEXABVCSifUiAppInfo@@HW4TInstallingPhase@1@@Z @ 24 NONAME ; void CSifUi::ShowProgressL(class CSifUiAppInfo const &, int, enum CSifUi::TInstallingPhase)
+	?ShowPreparingL@CSifUi@@QAEXXZ @ 25 NONAME ; void CSifUi::ShowPreparingL(void)
+	?SetButtonVisible@CSifUi@@QAEXW4TOptionalButton@1@H@Z @ 26 NONAME ; void CSifUi::SetButtonVisible(enum CSifUi::TOptionalButton, int)
+	?ShowSingleSelectionL@CSifUi@@QAEHABVTDesC16@@ABVMDesC16Array@@AAH@Z @ 27 NONAME ; int CSifUi::ShowSingleSelectionL(class TDesC16 const &, class MDesC16Array const &, int &)
+	?ShowFailedL@CSifUi@@QAEXABVCSifUiErrorInfo@@@Z @ 28 NONAME ; void CSifUi::ShowFailedL(class CSifUiErrorInfo const &)
+	?ShowMultiSelectionL@CSifUi@@QAEHABVTDesC16@@ABVMDesC16Array@@AAV?$RArray@H@@@Z @ 29 NONAME ; int CSifUi::ShowMultiSelectionL(class TDesC16 const &, class MDesC16Array const &, class RArray<int> &)
+	?SelectedDrive@CSifUi@@QAEHAAH@Z @ 30 NONAME ; int CSifUi::SelectedDrive(int &)
+	?NewLC@CSifUi@@SAPAV1@XZ @ 31 NONAME ; class CSifUi * CSifUi::NewLC(void)
 
--- a/appinstall_plat/sifui_api/eabi/sifuiu.def	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstall_plat/sifui_api/eabi/sifuiu.def	Fri Aug 06 10:59:22 2010 +0300
@@ -2,33 +2,42 @@
 	_ZN13CSifUiAppInfo4NewLERK7TDesC16S2_RK8TVersioniPK16CApaMaskedBitmap @ 1 NONAME
 	_ZN13CSifUiAppInfo4NewLERKS_ @ 2 NONAME
 	_ZN13CSifUiAppInfo5NewLCERK7TDesC16S2_RK8TVersioniPK16CApaMaskedBitmap @ 3 NONAME
-	_ZN21CSifUiCertificateInfo4NewLERN3Swi16CCertificateInfoE @ 4 NONAME
-	_ZN21CSifUiCertificateInfo5NewLCERN3Swi16CCertificateInfoE @ 5 NONAME
-	_ZN6CSifUi11IsCancelledEv @ 6 NONAME
-	_ZN6CSifUi11ShowFailedLEiRK7TDesC16S2_ @ 7 NONAME
-	_ZN6CSifUi13SelectedDriveERi @ 8 NONAME
-	_ZN6CSifUi13ShowCompleteLEv @ 9 NONAME
-	_ZN6CSifUi13ShowProgressLERK13CSifUiAppInfoiNS_16TInstallingPhaseE @ 10 NONAME
-	_ZN6CSifUi16SetButtonVisibleENS_15TOptionalButtonEi @ 11 NONAME
-	_ZN6CSifUi17ShowConfirmationLERK13CSifUiAppInfo @ 12 NONAME
-	_ZN6CSifUi19SetCertificateInfoLERK13RPointerArrayI21CSifUiCertificateInfoE @ 13 NONAME
-	_ZN6CSifUi19SetMemorySelectionLERK6RArrayIiE @ 14 NONAME
-	_ZN6CSifUi25IncreaseProgressBarValueLEi @ 15 NONAME
-	_ZN6CSifUi4NewLEv @ 16 NONAME
-	_ZN6CSifUi5NewLCEv @ 17 NONAME
-	_ZNK13CSifUiAppInfo12ExternalizeLER12RWriteStream @ 18 NONAME
-	_ZNK13CSifUiAppInfo4NameEv @ 19 NONAME
-	_ZNK13CSifUiAppInfo4SizeEv @ 20 NONAME
-	_ZNK13CSifUiAppInfo6VendorEv @ 21 NONAME
-	_ZNK13CSifUiAppInfo7BitmapsEv @ 22 NONAME
-	_ZNK13CSifUiAppInfo7VersionEv @ 23 NONAME
-	_ZNK21CSifUiCertificateInfo12ExternalizeLER12RWriteStream @ 24 NONAME
-	_ZTI13CSifUiAppInfo @ 25 NONAME
-	_ZTI13CSifUiPrivate @ 26 NONAME
-	_ZTI21CSifUiCertificateInfo @ 27 NONAME
-	_ZTI6CSifUi @ 28 NONAME
-	_ZTV13CSifUiAppInfo @ 29 NONAME
-	_ZTV13CSifUiPrivate @ 30 NONAME
-	_ZTV21CSifUiCertificateInfo @ 31 NONAME
-	_ZTV6CSifUi @ 32 NONAME
+	_ZN15CSifUiErrorInfo4NewLEN4Usif14TErrorCategoryEiiRK7TDesC16S4_ @ 4 NONAME
+	_ZN15CSifUiErrorInfo5NewLCEN4Usif14TErrorCategoryEiiRK7TDesC16S4_ @ 5 NONAME
+	_ZN21CSifUiCertificateInfo4NewLERN3Swi16CCertificateInfoE @ 6 NONAME
+	_ZN21CSifUiCertificateInfo5NewLCERN3Swi16CCertificateInfoE @ 7 NONAME
+	_ZN6CSifUi11IsCancelledEv @ 8 NONAME
+	_ZN6CSifUi11ShowFailedLERK15CSifUiErrorInfo @ 9 NONAME
+	_ZN6CSifUi11ShowFailedLEiRK7TDesC16S2_ @ 10 NONAME
+	_ZN6CSifUi13SelectedDriveERi @ 11 NONAME
+	_ZN6CSifUi13ShowCompleteLEv @ 12 NONAME
+	_ZN6CSifUi13ShowProgressLERK13CSifUiAppInfoiNS_16TInstallingPhaseE @ 13 NONAME
+	_ZN6CSifUi14ShowPreparingLEv @ 14 NONAME
+	_ZN6CSifUi16SetButtonVisibleENS_15TOptionalButtonEi @ 15 NONAME
+	_ZN6CSifUi17ShowConfirmationLERK13CSifUiAppInfo @ 16 NONAME
+	_ZN6CSifUi19SetCertificateInfoLERK13RPointerArrayI21CSifUiCertificateInfoE @ 17 NONAME
+	_ZN6CSifUi19SetMemorySelectionLERK6RArrayIiE @ 18 NONAME
+	_ZN6CSifUi19ShowMultiSelectionLERK7TDesC16RK12MDesC16ArrayR6RArrayIiE @ 19 NONAME
+	_ZN6CSifUi20ShowSingleSelectionLERK7TDesC16RK12MDesC16ArrayRi @ 20 NONAME
+	_ZN6CSifUi22ShowGrantCapabilitiesLERK14TCapabilitySet @ 21 NONAME
+	_ZN6CSifUi25IncreaseProgressBarValueLEi @ 22 NONAME
+	_ZN6CSifUi4NewLEv @ 23 NONAME
+	_ZN6CSifUi5NewLCEv @ 24 NONAME
+	_ZNK13CSifUiAppInfo12ExternalizeLER12RWriteStream @ 25 NONAME
+	_ZNK13CSifUiAppInfo4NameEv @ 26 NONAME
+	_ZNK13CSifUiAppInfo4SizeEv @ 27 NONAME
+	_ZNK13CSifUiAppInfo6VendorEv @ 28 NONAME
+	_ZNK13CSifUiAppInfo7BitmapsEv @ 29 NONAME
+	_ZNK13CSifUiAppInfo7VersionEv @ 30 NONAME
+	_ZNK21CSifUiCertificateInfo12ExternalizeLER12RWriteStream @ 31 NONAME
+	_ZTI13CSifUiAppInfo @ 32 NONAME
+	_ZTI13CSifUiPrivate @ 33 NONAME
+	_ZTI15CSifUiErrorInfo @ 34 NONAME
+	_ZTI21CSifUiCertificateInfo @ 35 NONAME
+	_ZTI6CSifUi @ 36 NONAME
+	_ZTV13CSifUiAppInfo @ 37 NONAME
+	_ZTV13CSifUiPrivate @ 38 NONAME
+	_ZTV15CSifUiErrorInfo @ 39 NONAME
+	_ZTV21CSifUiCertificateInfo @ 40 NONAME
+	_ZTV6CSifUi @ 41 NONAME
 
--- a/appinstall_plat/sifui_api/group/bld.inf	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstall_plat/sifui_api/group/bld.inf	Fri Aug 06 10:59:22 2010 +0300
@@ -25,6 +25,9 @@
 ../inc/sifui.h                  MW_LAYER_PLATFORM_EXPORT_PATH( sifui.h )
 ../inc/sifuiappinfo.h           MW_LAYER_PLATFORM_EXPORT_PATH( sifuiappinfo.h )
 ../inc/sifuicertificateinfo.h   MW_LAYER_PLATFORM_EXPORT_PATH( sifuicertificateinfo.h )
+../inc/sifuierrorinfo.h         MW_LAYER_PLATFORM_EXPORT_PATH( sifuierrorinfo.h )
+../inc/sifuierrorinfo.inl       MW_LAYER_PLATFORM_EXPORT_PATH( sifuierrorinfo.inl )
+../inc/sifuiinstallindicatordefinitions.h MW_LAYER_PLATFORM_EXPORT_PATH( sifuiinstallindicatordefinitions.h )
 ../rom/sifui.iby                CORE_MW_LAYER_IBY_EXPORT_PATH( sifui.iby )
 
 PRJ_MMPFILES
--- a/appinstall_plat/sifui_api/group/sifui.mmp	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstall_plat/sifui_api/group/sifui.mmp	Fri Aug 06 10:59:22 2010 +0300
@@ -32,6 +32,7 @@
 SOURCE          sifuiprivate.cpp
 SOURCE          sifuicertificateinfo.cpp
 SOURCE          sifuiappinfo.cpp
+SOURCE          sifuierrorinfo.cpp
 
 USERINCLUDE     ../inc
 MW_LAYER_SYSTEMINCLUDE
--- a/appinstall_plat/sifui_api/inc/sifui.h	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstall_plat/sifui_api/inc/sifui.h	Fri Aug 06 10:59:22 2010 +0300
@@ -16,21 +16,23 @@
 */
 
 
-/********************************************************
- *                                                      *
- *   WARNING - WORK-IN-PROGRESS - THIS API MAY CHANGE   *
- *                                                      *
- ********************************************************/
+/**************************************************************
+ *                                                            *
+ *   WARNING - WORK-IN-PROGRESS - THIS API MAY STILL CHANGE   *
+ *                                                            *
+ **************************************************************/
 
 #ifndef C_SIFUI_H
 #define C_SIFUI_H
 
 #include <e32base.h>                            // CBase
+#include <bamdesca.h>                           // MDesCArray
 
 class CSifUiPrivate;
 class CApaMaskedBitmap;
 class CSifUiCertificateInfo;
 class CSifUiAppInfo;
+class CSifUiErrorInfo;
 
 namespace Swi {
     class CAppInfo;
@@ -67,27 +69,59 @@
         ~CSifUi();
 
     public:     // new functions
-        /**
-         * 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, size, version, vendor, icon)
-         * @return TBools - ETrue if user accepted the query, EFalse otherwise
-         */
-        IMPORT_C TBool ShowConfirmationL( const CSifUiAppInfo& aAppInfo );
+
+        //=================================================
+        // Preparing note method
+        //=================================================
 
         /**
-         * Defines memory selection alternatives for the main installation
-         * confirmation query displayed with ShowConfirmationL() function.
+         * Displays installation dialog with "Preparing" text and indefinite progress bar.
+         * No buttons are available. Use ShowConfirmationL() method to update the dialog
+         * content to the installation confirmation query.
+         */
+        IMPORT_C void ShowPreparingL();
+
+
+        //=================================================
+        // Install confirmation query methods
+        //=================================================
+
+        /**
+         * Defines memory selection alternatives for the ShowConfirmationL() installation
+         * confirmation query. Use SelectedDrive() method to get the selected drive number
+         * after ShowConfirmationL() call.
          * @param aDriveNumbers - options for memory selection
          */
         IMPORT_C void SetMemorySelectionL( const RArray<TInt>& aDriveNumbers );
 
         /**
+         * Defines certificate details for the ShowConfirmationL() installation
+         * confirmation query. If certificates are not set, then application is
+         * untrusted.
+         * @param aCertificates - certificate details
+         */
+        IMPORT_C void SetCertificateInfoL(
+                const RPointerArray<CSifUiCertificateInfo>& aCertificates );
+
+        /**
+         * Displays installation confirmation query and waits for user response.
+         * Returns ETrue if the user accepted the query. The next ShowProgressL() call
+         * changes the dialog content to installation progress note. And finally,
+         * ShowCompleteL() or ShowFailedL() call changes the dialog content to the
+         * complete or error note.
+         * If preparing installation note needs to be displayed before confirmation query,
+         * then call ShowPreparingL() before any other functions.
+         * 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() after ShowConfirmationL() returns.
+         * If the installation confirmation query should contain certificate details, then
+         * set the certificate details using SetCertificateInfoL() first.
+         * @param aAppInfo - application information (name, size, version, vendor, icon)
+         * @return TBools - ETrue if the user accepted the query, EFalse otherwise
+         */
+        IMPORT_C TBool ShowConfirmationL( const CSifUiAppInfo& aAppInfo );
+
+        /**
          * 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
@@ -95,13 +129,10 @@
          */
         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<CSifUiCertificateInfo>& aCertificates );
+
+        //=================================================
+        // Progress note methods
+        //=================================================
 
         /**
          * Installing phases in progress notes. Indicated in progress note title text.
@@ -113,12 +144,12 @@
         };
 
         /**
-         * 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.
+         * Displays installation progress note. Changes confirmation query content
+         * to progress note. If the progress note is already displayed, then updates
+         * the dialog content. Use IncreaseProgressBarValueL() method 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.
+         * Use ShowCompleteL() or ShowFailedL() methods to show the result.
          * @param aAppInfo - application information (name, size, version, vendor, icon)
          * @param aProgressBarFinalValue - final value of the progress bar
          * @param aPhase - defines new title text for the progress note dialog
@@ -142,15 +173,46 @@
          */
         IMPORT_C TBool IsCancelled();
 
+
+        //=================================================
+        // Final complete and error notes
+        //=================================================
+
+        /**
+         * Displays installation complete note and waits for the user to close it.
+         * Installation complete note contains "Show" button to show installed
+         * applications in application library. Use SetButtonVisible() method to
+         * hide the "Show" button when necessary.
+         */
+        IMPORT_C void ShowCompleteL();
+
+        /**
+         * Displays installation error note and waits for user to close it.
+         * Installation error note contains "Details" button to show the detailed
+         * error message (when available). Also SetButtonVisible() method can be
+         * used to hide the "Details" button if necessary.
+         * @param aErrorCategory - error category
+         * @param aErrorMessage - localized error message to be displayed
+         * @param aErrorDetails - localized error message details (if any)
+         * @param aErrorCode - error code
+         * @param aErrorCode - error code
+         */
+        IMPORT_C void ShowFailedL( const CSifUiErrorInfo& aErrorInfo );
+
+
+        //=================================================
+        // Buttons in progress/complete/error notes
+        //=================================================
+
         /**
          * Toolbar buttons in progress and complete notes that can be disabled/hidden.
          */
         enum TOptionalButton
             {
-            EHideProgressButton,
-            ECancelProgressButton,
-            EShowInAppLibButton,
-            EErrorDetailsButton
+            EHideProgressButton,        // "Hide" button in progress note
+            ECancelProgressButton,      // "Cancel" button in progress note
+            EShowInAppLibButton,        // "Show" button in complete note
+            EErrorDetailsButton         // "Details" button in error note
             };
 
         /**
@@ -163,22 +225,57 @@
          */
         IMPORT_C void SetButtonVisible( TOptionalButton aButton, TBool aIsVisible );
 
+
+        //=================================================
+        // Other query dialogs
+        //=================================================
+
         /**
-         * Displays main installation complete note. Installation complete note contains
-         * button to launch the application libaray to show the recently installed apps.
+         * Displays dialog requesting capabilities for the application being installed
+         * and waits for user response. Returns ETrue if the user granted the capabilities.
+         * Other dialogs (like progress note) are not affected.
+         * @param aCapabilities - requested user capabilities
+         * @return TBool - ETrue if the user granted the capabilities, EFalse otherwise
          */
-        IMPORT_C void ShowCompleteL();
+        IMPORT_C TBool ShowGrantCapabilitiesL( const TCapabilitySet& aCapabilities );
 
         /**
-         * 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)
+         * Displays a selection dialog with radio-buttons in a pop-up window,
+         * and waits for user response. Other displayed installation dialogs
+         * (like progress note) are not affected. Returns boolean that indicates
+         * if the user cancelled the query. Selected item index is returned in
+         * aSelectedIndex parameter (KErrNotFound if cancelled).
+         * @param aTitle - selection dialog title
+         * @param aSelectableItems - array of selectable items
+         * @param aSelectedIndex - returns selected item index
+         * @return TBool - ETrue if the user accepted the query, EFalse otherwise
          */
+        IMPORT_C TBool ShowSingleSelectionL( const TDesC& aTitle,
+            const MDesCArray& aSelectableItems, TInt& aSelectedIndex );
+
+        /**
+         * Displays a multi-selection dialog with checkboxes in a pop-up window,
+         * and waits for user response. Other displayed installation dialogs
+         * (like progress note) are not affected. Returns user selected indices,
+         * in aSelectedIndexes array (empty if cancelled).
+         * @param aTitle - multi-selection dialog title
+         * @param aSelectableItems - array of selectable items
+         * @param aSelectedIndexes - returns the selected item indices
+         * @return TBool - ETrue if the user accepted the query, EFalse otherwise
+         */
+        IMPORT_C TBool ShowMultiSelectionL( const TDesC& aTitle,
+            const MDesCArray& aSelectableItems, RArray<TInt>& aSelectedIndexes );
+
+
+        //=================================================
+        // DEPRECATED METHODS
+        //=================================================
+
+        // DEPRECATED, WILL BE REMOVED, DO NOT USE
         IMPORT_C void ShowFailedL( TInt aErrorCode, const TDesC& aErrorMessage,
             const TDesC& aErrorDetails = KNullDesC );
 
+
     private:    // new functions
         CSifUi();
         void ConstructL();
--- a/appinstall_plat/sifui_api/inc/sifuidefs.h	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstall_plat/sifui_api/inc/sifuidefs.h	Fri Aug 06 10:59:22 2010 +0300
@@ -23,10 +23,7 @@
 // in sifuidevicedialogdefinitions.h and sifuiinstallindicatorparams.h files.
 // Symbian code needs descriptor constants, as Qt code uses QString constants.
 
-// TODO: split this file into two, export install indicator parameters for Java
-
 _LIT( KSifUiDeviceDialog, "com.nokia.sifui/1.0" );
-_LIT( KSifUiInstallIndicatorType, "com.nokia.sifui.indi/1.0" );
 
 enum TSifUiDeviceDialogType
     {
@@ -58,7 +55,7 @@
 _LIT( KSifUiApplicationSize, "size" );              // integer
 _LIT( KSifUiApplicationDetails, "details" );        // descriptor array
 _LIT( KSifUiMemorySelection, "mem" );               // descriptor (comma separated drive letters)
-_LIT( KSifUiCertificates, "cert" );                 // binary
+_LIT( KSifUiCertificates, "cert" );                 // binary (CSifUiCertificateInfo)
 
 // Variant map keys for "progress note" dialog parameters
 _LIT( KSifUiProgressNoteText, "txt" );              // string
@@ -73,15 +70,14 @@
 _LIT( KSifUiErrorNoteIsDetailsButtonHidden, "errdtlbtn" );      // boolean
 
 // Variant map keys for "error" dialog parameters
-_LIT( KSifUiErrorCode, "err" );                     // integer
-_LIT( KSifUiErrorMessage, "msg" );                  // string
-_LIT( KSifUiErrorDetails, "det" );                  // string
+_LIT( KSifUiErrorCategory, "errcat" );              // enum Usif::TErrorCategory
+_LIT( KSifUiErrorCode, "errcode" );                 // integer
+_LIT( KSifUiErrorCodeExtended, "errext" );          // integer
+_LIT( KSifUiErrorMessage, "errmsg" );               // string
+_LIT( KSifUiErrorDetails, "errdet" );               // string
 
-// Variant map keys for "install indicator" parameters
-_LIT( KSifUiInstallIndicatorAppName, "name" );      // string
-_LIT( KSifUiInstallIndicatorPhase, "phase" );       // int CSifUi::TInstallingPhase
-_LIT( KSifUiInstallIndicatorProgress, "prog" );     // int (0..100), shown as percentage
-_LIT( KSifUiInstallIndicatorIcon, "icon" );         // TODO: TBD
+// Variant map keys for "grant capabilities" dialog parameters
+_LIT( KSifUiGrantCapabilities, "grcap" );           // binary (TCapabilitySet)
 
 #endif  // SIFUIDEFS_H
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstall_plat/sifui_api/inc/sifuierrorinfo.h	Fri Aug 06 10:59:22 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* 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:  CSifUiErrorInfo for installation error details
+*
+*/
+
+#ifndef C_SIFUIERRORINFO_H
+#define C_SIFUIERRORINFO_H
+
+#include <e32base.h>                            // CBase
+#include <usif/usiferror.h>                     // Usif::TErrorCategory
+
+
+/**
+ * CSifUiErrorInfo is a container class for installation error details.
+ *
+ * @lib sifui.lib
+ * @since 10.1
+ */
+class CSifUiErrorInfo : public CBase
+    {
+    public:     // constructors and destructor
+        /**
+         * Creates new CSifUiErrorInfo object and pushes it to cleanup stack.
+         * @param aErrorCategory - error category
+         * @param aErrorCode - error code
+         * @param aExtendedErrorCode - extended error code
+         * @param aErrorMessage - error message
+         * @param aErrorMessageDetails - detailed error message
+         * @returns CSifUiErrorInfo* -- new CSifUiErrorInfo object
+         */
+        IMPORT_C static CSifUiErrorInfo* NewLC( Usif::TErrorCategory aErrorCategory,
+                TInt aErrorCode, TInt aExtendedErrorCode,
+                const TDesC& aErrorMessage, const TDesC& aErrorMessageDetails );
+
+        /**
+         * Creates new CSifUiErrorInfo object.
+         * @param aErrorCategory - error category
+         * @param aErrorCode - error code
+         * @param aExtendedErrorCode - extended error code
+         * @param aErrorMessage - error message
+         * @param aErrorMessageDetails - detailed error message
+         * @returns CSifUiErrorInfo* -- new CSifUiErrorInfo object
+         */
+        IMPORT_C static CSifUiErrorInfo* NewL( Usif::TErrorCategory aErrorCategory,
+                TInt aErrorCode, TInt aExtendedErrorCode,
+                const TDesC& aErrorMessage, const TDesC& aErrorMessageDetails );
+
+        /**
+         * Destructor.
+         */
+        ~CSifUiErrorInfo();
+
+    public:     // new functions
+
+        /**
+         * Error category.
+         * @returns Usif::TErrorCategory - error category
+         */
+        inline Usif::TErrorCategory ErrorCategory() const;
+
+        /**
+         * Error code.
+         * @returns TInt - error code
+         */
+        inline TInt ErrorCode() const;
+
+        /**
+         * Extended error code.
+         * @returns TInt - extended error code
+         */
+        inline TInt ExtendedErrorCode() const;
+
+        /**
+         * Error message.
+         * @returns const TDesC& - error message
+         */
+        inline const TDesC& ErrorMessage() const;
+
+        /**
+         * Error message details.
+         * @returns const TDesC& - additional error message details
+         */
+        inline const TDesC& ErrorMessageDetails() const;
+
+    private:    // new functions
+        CSifUiErrorInfo();
+        void ConstructL( Usif::TErrorCategory aErrorCategory,
+                TInt aErrorCode, TInt aExtendedErrorCode,
+                const TDesC& aErrorMessage, const TDesC& aErrorMessageDetails );
+
+    private:    // data
+        Usif::TErrorCategory iErrorCategory;
+        TInt iErrorCode;
+        TInt iExtendedErrorCode;
+        HBufC* iErrorMessage;
+        HBufC* iErrorMessageDetails;
+    };
+
+
+#include "sifuierrorinfo.inl"
+
+#endif  // C_SIFUIERRORINFO_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstall_plat/sifui_api/inc/sifuierrorinfo.inl	Fri Aug 06 10:59:22 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* 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:  CSifUiErrorInfo for installation error details
+*
+*/
+
+// ---------------------------------------------------------------------------
+// CSifUiErrorInfo::ErrorCategory()
+// ---------------------------------------------------------------------------
+//
+inline Usif::TErrorCategory CSifUiErrorInfo::ErrorCategory() const
+    {
+    return iErrorCategory;
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiErrorInfo::ErrorCode()
+// ---------------------------------------------------------------------------
+//
+inline TInt CSifUiErrorInfo::ErrorCode() const
+    {
+    return iErrorCode;
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiErrorInfo::ExtendedErrorCode()
+// ---------------------------------------------------------------------------
+//
+inline TInt CSifUiErrorInfo::ExtendedErrorCode() const
+    {
+    return iExtendedErrorCode;
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiErrorInfo::ErrorMessage()
+// ---------------------------------------------------------------------------
+//
+inline const TDesC& CSifUiErrorInfo::ErrorMessage() const
+    {
+    if( iErrorMessage )
+        {
+        return *iErrorMessage;
+        }
+    return KNullDesC;
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiErrorInfo::ErrorMessageDetails()
+// ---------------------------------------------------------------------------
+//
+inline const TDesC& CSifUiErrorInfo::ErrorMessageDetails() const
+    {
+    if( iErrorMessageDetails )
+        {
+        return *iErrorMessageDetails;
+        }
+    return KNullDesC;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstall_plat/sifui_api/inc/sifuiinstallindicatordefinitions.h	Fri Aug 06 10:59:22 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* 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:  Variant map key names for SW install progress notifications
+*               in status menu (universal indicator plugin).
+*/
+
+#ifndef SIFUIINSTALLINDICATORDEFINITIONS_H
+#define SIFUIINSTALLINDICATORDEFINITIONS_H
+
+// Indicator type string for CHbIndicatorSymbian::Activate():
+_LIT( KSifUiInstallIndicatorType, "com.nokia.sifui.indi/1.0" );
+
+// Parameter names for variant map:
+_LIT( KSifUiInstallIndicatorAppName, "name" );      // string
+_LIT( KSifUiInstallIndicatorPhase, "phase" );       // int CSifUi::TInstallingPhase
+_LIT( KSifUiInstallIndicatorProgress, "prog" );     // int (0..100), shown as percentage
+
+// CHbIndicatorSymbian::Activate() takes one CHbSymbianVariant parameter. Use
+// CHbSymbianVariant::EVariantMap type and the above parameter names to pass
+// application name, installing phase, and progress bar value to notification
+// dialog. Usually it is necessary to pass all these details when opening the
+// notification dialog. Later, notification dialog details can be updated by
+// calling CHbIndicatorSymbian::Activate() again. If only application name
+// should be updated, then also CHbSymbianVariant::EDes type can be used.
+// And if only progress bar value should be updated, then also
+// CHbSymbianVariant::EInt type can be used.
+
+#endif  // SIFUIINSTALLINDICATORDEFINITIONS_H
+
--- a/appinstall_plat/sifui_api/inc/sifuiprivate.h	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstall_plat/sifui_api/inc/sifuiprivate.h	Fri Aug 06 10:59:22 2010 +0300
@@ -46,18 +46,23 @@
         ~CSifUiPrivate();
 
     public:     // new functions
-        TBool ShowConfirmationL( const CSifUiAppInfo& aAppInfo );
+        void ShowPreparingL();
         void SetMemorySelectionL( const RArray<TInt>& aDriveNumbers );
+        void SetCertificateInfoL( const RPointerArray<CSifUiCertificateInfo>& aCertificates );
+        TBool ShowConfirmationL( const CSifUiAppInfo& aAppInfo );
         TInt SelectedDrive( TInt& aDriveNumber );
-        void SetCertificateInfoL( const RPointerArray<CSifUiCertificateInfo>& aCertificates );
         void ShowProgressL( const CSifUiAppInfo& aAppInfo, TInt aProgressBarFinalValue,
                 CSifUi::TInstallingPhase aPhase );
         void IncreaseProgressBarValueL( TInt aIncrement );
         TBool IsCancelled();
+        void ShowCompleteL();
+        void ShowFailedL( const CSifUiErrorInfo& aErrorInfo );
         void SetButtonVisible( CSifUi::TOptionalButton aButton, TBool aIsVisible );
-        void ShowCompleteL();
-        void ShowFailedL( TInt aErrorCode, const TDesC& aErrorMessage,
-                const TDesC& aErrorDetails );
+        TBool ShowGrantCapabilitiesL( const TCapabilitySet& aCapabilities );
+        TBool ShowSingleSelectionL( const TDesC& aTitle, const MDesCArray& aSelectableItems,
+            TInt& aSelectedIndex );
+        TBool ShowMultiSelectionL( const TDesC& aTitle, const MDesCArray& aSelectableItems,
+            RArray<TInt>& aSelectedIndexes );
 
     protected:  // from CActive
         void DoCancel();
@@ -78,6 +83,7 @@
         void ChangeNoteTypeL( TInt aType );
         void AddParamL( const TDesC& aKey, TInt aValue );
         void AddParamL( const TDesC& aKey, const TDesC& aValue );
+        void AddParamBinaryL( const TDesC& aKey, const CBufBase& aBinary );
         void AddParamListL( const TDesC& aKey, const MDesCArray& aList );
         void AddParamsAppInfoL( const CSifUiAppInfo& aAppInfo );
         void AddParamsCertificatesL();
--- a/appinstall_plat/sifui_api/src/sifui.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstall_plat/sifui_api/src/sifui.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -17,6 +17,7 @@
 
 #include "sifui.h"                              // CSifUi
 #include "sifuiprivate.h"                       // CSifUiPrivate
+#include "sifuierrorinfo.h"                     // CSifUiErrorInfo
 
 
 // ======== MEMBER FUNCTIONS ========
@@ -54,12 +55,12 @@
     }
 
 // ---------------------------------------------------------------------------
-// CSifUi::ShowConfirmationL()
+// CSifUi::ShowPreparingL()
 // ---------------------------------------------------------------------------
 //
-EXPORT_C TBool CSifUi::ShowConfirmationL( const CSifUiAppInfo& aAppInfo )
+EXPORT_C void CSifUi::ShowPreparingL()
     {
-    return iPrivate->ShowConfirmationL( aAppInfo );
+    iPrivate->ShowPreparingL();
     }
 
 // ---------------------------------------------------------------------------
@@ -72,15 +73,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// CSifUi::SelectedDrive()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CSifUi::SelectedDrive( TInt& aDriveNumber )
-    {
-    return iPrivate->SelectedDrive( aDriveNumber );
-    }
-
-// ---------------------------------------------------------------------------
 // CSifUi::SetCertificateInfoL()
 // ---------------------------------------------------------------------------
 //
@@ -91,6 +83,24 @@
     }
 
 // ---------------------------------------------------------------------------
+// CSifUi::ShowConfirmationL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CSifUi::ShowConfirmationL( const CSifUiAppInfo& aAppInfo )
+    {
+    return iPrivate->ShowConfirmationL( aAppInfo );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUi::SelectedDrive()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CSifUi::SelectedDrive( TInt& aDriveNumber )
+    {
+    return iPrivate->SelectedDrive( aDriveNumber );
+    }
+
+// ---------------------------------------------------------------------------
 // CSifUi::ShowProgressL()
 // ---------------------------------------------------------------------------
 //
@@ -119,15 +129,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// CSifUi::SetButtonVisible()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CSifUi::SetButtonVisible( TOptionalButton aButton, TBool aIsVisible )
-    {
-    iPrivate->SetButtonVisible( aButton, aIsVisible );
-    }
-
-// ---------------------------------------------------------------------------
 // CSifUi::ShowCompleteL()
 // ---------------------------------------------------------------------------
 //
@@ -140,10 +141,62 @@
 // CSifUi::ShowFailedL()
 // ---------------------------------------------------------------------------
 //
+EXPORT_C void CSifUi::ShowFailedL( const CSifUiErrorInfo& aErrorInfo )
+    {
+    iPrivate->ShowFailedL( aErrorInfo );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUi::SetButtonVisible()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CSifUi::SetButtonVisible( TOptionalButton aButton, TBool aIsVisible )
+    {
+    iPrivate->SetButtonVisible( aButton, aIsVisible );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUi::ShowGrantCapabilitiesL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CSifUi::ShowGrantCapabilitiesL( const TCapabilitySet& aCapabilities )
+    {
+    return iPrivate->ShowGrantCapabilitiesL( aCapabilities );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUi::ShowSingleSelectionL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CSifUi::ShowSingleSelectionL( const TDesC& aTitle,
+            const MDesCArray& aSelectableItems, TInt& aSelectedIndex )
+    {
+    return iPrivate->ShowSingleSelectionL( aTitle, aSelectableItems, aSelectedIndex );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUi::ShowMultiSelectionL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CSifUi::ShowMultiSelectionL( const TDesC& aTitle,
+            const MDesCArray& aSelectableItems, RArray<TInt>& aSelectedIndexes )
+    {
+    return iPrivate->ShowMultiSelectionL( aTitle, aSelectableItems, aSelectedIndexes );
+    }
+
+
+// ---------------------------------------------------------------------------
+// CSifUi::ShowFailedL()
+// ---------------------------------------------------------------------------
+//
+// TODO: This function is deprecated, remove it completely.
 EXPORT_C void CSifUi::ShowFailedL( TInt aErrorCode, const TDesC& aErrorMessage,
         const TDesC& aErrorDetails )
     {
-    iPrivate->ShowFailedL( aErrorCode, aErrorMessage, aErrorDetails );
+    CSifUiErrorInfo* errorInfo = CSifUiErrorInfo::NewLC( Usif::EUnknown, aErrorCode,
+            0, aErrorMessage, aErrorDetails );
+    iPrivate->ShowFailedL( *errorInfo );
+    CleanupStack::PopAndDestroy( errorInfo );
     }
 
 // ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstall_plat/sifui_api/src/sifuierrorinfo.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CSifUiErrorInfo for installation error details
+*
+*/
+
+#include "sifuierrorinfo.h"         // CSifUiErrorInfo
+
+
+// ---------------------------------------------------------------------------
+// CSifUiErrorInfo::NewLC()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CSifUiErrorInfo* CSifUiErrorInfo::NewLC( Usif::TErrorCategory aErrorCategory,
+        TInt aErrorCode, TInt aExtendedErrorCode, const TDesC& aErrorMessage,
+        const TDesC& aErrorMessageDetails )
+    {
+    CSifUiErrorInfo* self = new (ELeave) CSifUiErrorInfo;
+    CleanupStack::PushL( self );
+    self->ConstructL( aErrorCategory, aErrorCode, aExtendedErrorCode,
+            aErrorMessage, aErrorMessageDetails );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiErrorInfo::NewL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CSifUiErrorInfo* CSifUiErrorInfo::NewL( Usif::TErrorCategory aErrorCategory,
+        TInt aErrorCode, TInt aExtendedErrorCode, const TDesC& aErrorMessage,
+        const TDesC& aErrorMessageDetails )
+    {
+    CSifUiErrorInfo* self = CSifUiErrorInfo::NewLC( aErrorCategory, aErrorCode,
+            aExtendedErrorCode, aErrorMessage, aErrorMessageDetails );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiErrorInfo::~CSifUiErrorInfo()
+// ---------------------------------------------------------------------------
+//
+CSifUiErrorInfo::~CSifUiErrorInfo()
+    {
+    delete iErrorMessage;
+    delete iErrorMessageDetails;
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiErrorInfo::CSifUiErrorInfo()
+// ---------------------------------------------------------------------------
+//
+CSifUiErrorInfo::CSifUiErrorInfo()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiErrorInfo::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiErrorInfo::ConstructL( Usif::TErrorCategory aErrorCategory,
+        TInt aErrorCode, TInt aExtendedErrorCode, const TDesC& aErrorMessage,
+        const TDesC& aErrorMessageDetails )
+    {
+    iErrorCategory = aErrorCategory;
+    iErrorCode = aErrorCode;
+    iExtendedErrorCode = aExtendedErrorCode;
+    iErrorMessage = aErrorMessage.AllocL();
+    iErrorMessageDetails = aErrorMessageDetails.AllocL();
+    }
+
--- a/appinstall_plat/sifui_api/src/sifuiprivate.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstall_plat/sifui_api/src/sifuiprivate.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -18,6 +18,8 @@
 #include "sifuiprivate.h"                       // CSifUiPrivate
 #include "sifuicertificateinfo.h"               // CSifUiCertificateInfo
 #include "sifuiappinfo.h"                       // CSifUiAppInfo
+#include "sifuierrorinfo.h"                     // CSifUiErrorInfo
+#include "sifuiinstallindicatordefinitions.h"   // indicator type label and parameter names
 #include <hb/hbcore/hbsymbianvariant.h>         // CHbSymbianVariantMap
 #include <hb/hbwidgets/hbdevicenotificationdialogsymbian.h> // CHbDeviceNotificationDialogSymbian
 #include <apgicnfl.h>                           // CApaMaskedBitmap
@@ -25,7 +27,7 @@
 #include <e32property.h>                        // RProperty
 
 const TInt KDriveLettersLen = 32;
-const TInt KCertificateBufferGranularity = 1024;
+const TInt KBufferGranularity = 1024;
 const TInt KProgFull = 100;                     // 100%
 
 const TUid KInstallIndicatorCategory = { 0x20022FC5 };
@@ -33,6 +35,19 @@
 
 _LIT( KSifUiDefaultApplicationIcon, "qtg_large_application" );
 
+// TODO: replace with proper logging
+#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);
+#define FLOG_3(x,y,z,v) RDebug::Print(x, y, z, v);
+#else
+#define FLOG(x)
+#define FLOG_1(x,y)
+#define FLOG_2(x,y,z)
+#define FLOG_3(x,y,z,v)
+#endif
+
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -42,6 +57,8 @@
 //
 CSifUiPrivate* CSifUiPrivate::NewL()
     {
+    FLOG( _L("CSifUiPrivate::NewL") );
+
     CSifUiPrivate* self = new( ELeave ) CSifUiPrivate();
     CleanupStack::PushL( self );
     self->ConstructL();
@@ -55,6 +72,8 @@
 //
 CSifUiPrivate::~CSifUiPrivate()
     {
+    FLOG( _L("CSifUiPrivate::~CSifUiPrivate") );
+
     Cancel();
     delete iWait;
     delete iDeviceDialog;
@@ -66,22 +85,12 @@
     }
 
 // ---------------------------------------------------------------------------
-// CSifUiPrivate::ShowConfirmationL()
+// CSifUiPrivate::ShowPreparingL()
 // ---------------------------------------------------------------------------
 //
-TBool CSifUiPrivate::ShowConfirmationL( const CSifUiAppInfo& aAppInfo )
+void CSifUiPrivate::ShowPreparingL()
     {
-    ChangeNoteTypeL( ESifUiConfirmationQuery );
-
-    AddParamsAppInfoL( aAppInfo );
-    if( iSelectableDrives )
-        {
-        AddParamL( KSifUiMemorySelection, *iSelectableDrives );
-        }
-    AddParamsCertificatesL();
-
-    UpdateDialogAndWaitForResponseL();
-    return( iDialogReturnValue == KErrNone );
+    // TODO: implement
     }
 
 // ---------------------------------------------------------------------------
@@ -90,6 +99,8 @@
 //
 void CSifUiPrivate::SetMemorySelectionL( const RArray<TInt>& aDriveNumbers )
     {
+    FLOG( _L("CSifUiPrivate::SetMemorySelectionL") );
+
     if( iSelectableDrives )
         {
         delete iSelectableDrives;
@@ -105,6 +116,8 @@
             {
             TChar driveLetter;
             TInt err = RFs::DriveToChar( aDriveNumbers[ index ], driveLetter );
+            FLOG_3( _L("CSifUiPrivate::SetMemorySelectionL, index %d, drive %d, err %d"),
+                    index, aDriveNumbers[ index ], err );
             if( !err )
                 {
                 driveList.Append( driveLetter );
@@ -113,19 +126,7 @@
             }
         iSelectableDrives = driveList.AllocL();
         }
-    }
-
-// ---------------------------------------------------------------------------
-// CSifUiPrivate::SelectedDrive()
-// ---------------------------------------------------------------------------
-//
-TInt CSifUiPrivate::SelectedDrive( TInt& aDriveNumber )
-    {
-    if( iSelectedDriveSet )
-        {
-        return RFs::CharToDrive( iSelectedDrive, aDriveNumber );
-        }
-    return KErrNotFound;
+    FLOG_1( _L("CSifUiPrivate::SetMemorySelectionL, iSelectableDrives=%S"), iSelectableDrives );
     }
 
 // ---------------------------------------------------------------------------
@@ -135,6 +136,8 @@
 void CSifUiPrivate::SetCertificateInfoL(
         const RPointerArray<CSifUiCertificateInfo>& aCertificates )
     {
+    FLOG( _L("CSifUiPrivate::SetCertificateInfoL") );
+
     if( iCertificateBuffer )
         {
         delete iCertificateBuffer;
@@ -142,7 +145,7 @@
         }
     if( aCertificates.Count() )
         {
-        iCertificateBuffer = CBufFlat::NewL( KCertificateBufferGranularity );
+        iCertificateBuffer = CBufFlat::NewL( KBufferGranularity );
         RBufWriteStream writeStream( *iCertificateBuffer );
         CleanupClosePushL( writeStream );
 
@@ -158,12 +161,53 @@
     }
 
 // ---------------------------------------------------------------------------
+// CSifUiPrivate::ShowConfirmationL()
+// ---------------------------------------------------------------------------
+//
+TBool CSifUiPrivate::ShowConfirmationL( const CSifUiAppInfo& aAppInfo )
+    {
+    FLOG( _L("CSifUiPrivate::ShowConfirmationL") );
+
+    ChangeNoteTypeL( ESifUiConfirmationQuery );
+
+    AddParamsAppInfoL( aAppInfo );
+    if( iSelectableDrives )
+        {
+        AddParamL( KSifUiMemorySelection, *iSelectableDrives );
+        }
+    AddParamsCertificatesL();
+
+    UpdateDialogAndWaitForResponseL();
+    return( iDialogReturnValue == KErrNone );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::SelectedDrive()
+// ---------------------------------------------------------------------------
+//
+TInt CSifUiPrivate::SelectedDrive( TInt& aDriveNumber )
+    {
+    FLOG( _L("CSifUiPrivate::SelectedDrive") );
+
+    if( iSelectedDriveSet )
+        {
+        TInt err = RFs::CharToDrive( iSelectedDrive, aDriveNumber );
+        FLOG_2( _L("CSifUiPrivate::SelectedDrive, aDriveNumber=%d, err=%d"), aDriveNumber, err );
+        return err;
+        }
+    FLOG( _L("CSifUiPrivate::SelectedDrive, KErrNotFound") );
+    return KErrNotFound;
+    }
+
+// ---------------------------------------------------------------------------
 // CSifUiPrivate::ShowProgressL()
 // ---------------------------------------------------------------------------
 //
 void CSifUiPrivate::ShowProgressL( const CSifUiAppInfo& aAppInfo,
         TInt aProgressBarFinalValue, CSifUi::TInstallingPhase aPhase )
     {
+    FLOG( _L("CSifUiPrivate::ShowProgressL") );
+
     ChangeNoteTypeL( ESifUiProgressNote );
 
     AddParamsAppInfoL( aAppInfo );
@@ -182,6 +226,8 @@
 //
 void CSifUiPrivate::IncreaseProgressBarValueL( TInt aNewValue )
     {
+    FLOG_1( _L("CSifUiPrivate::IncreaseProgressBarValueL, aNewValue=%d"), aNewValue );
+
     ChangeNoteTypeL( ESifUiProgressNote );
 
     AddParamL( KSifUiProgressNoteValue, aNewValue );
@@ -201,11 +247,48 @@
     }
 
 // ---------------------------------------------------------------------------
+// CSifUiPrivate::ShowCompleteL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::ShowCompleteL()
+    {
+    FLOG( _L("CSifUiPrivate::ShowCompleteL") );
+
+    ChangeNoteTypeL( ESifUiCompleteNote );
+
+    AddParamsHiddenButtonsL();
+
+    CompleteDialogOrIndicatorAndWaitForResponseL( KErrNone );
+    }
+
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::ShowFailedL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::ShowFailedL( const CSifUiErrorInfo& aErrorInfo )
+    {
+    FLOG_1( _L("CSifUiPrivate::ShowFailedL, aErrorCode=%d"), aErrorInfo.ErrorCode() );
+
+    ChangeNoteTypeL( ESifUiErrorNote );
+
+    AddParamL( KSifUiErrorCategory, aErrorInfo.ErrorCategory() );
+    AddParamL( KSifUiErrorCode, aErrorInfo.ErrorCode() );
+    AddParamL( KSifUiErrorCodeExtended, aErrorInfo.ExtendedErrorCode() );
+    AddParamL( KSifUiErrorMessage, aErrorInfo.ErrorMessage() );
+    AddParamL( KSifUiErrorDetails, aErrorInfo.ErrorMessageDetails() );
+    AddParamsHiddenButtonsL();
+
+    CompleteDialogOrIndicatorAndWaitForResponseL( aErrorInfo.ErrorCode() );
+    }
+
+// ---------------------------------------------------------------------------
 // CSifUiPrivate::SetButtonVisible()
 // ---------------------------------------------------------------------------
 //
 void CSifUiPrivate::SetButtonVisible( CSifUi::TOptionalButton aButton, TBool aIsVisible )
     {
+    FLOG( _L("CSifUiPrivate::SetButtonVisible") );
+
     switch( aButton )
         {
         case CSifUi::EHideProgressButton:
@@ -226,35 +309,50 @@
     }
 
 // ---------------------------------------------------------------------------
-// CSifUiPrivate::ShowCompleteL()
+// CSifUiPrivate::ShowGrantCapabilitiesL()
 // ---------------------------------------------------------------------------
 //
-void CSifUiPrivate::ShowCompleteL()
+TBool CSifUiPrivate::ShowGrantCapabilitiesL( const TCapabilitySet& aCapabilities )
     {
-    ChangeNoteTypeL( ESifUiCompleteNote );
+    CBufFlat* buffer = CBufFlat::NewL( KBufferGranularity );
+    CleanupStack::PushL( buffer );
 
-    AddParamsHiddenButtonsL();
+    RBufWriteStream writeStream( *buffer );
+    CleanupClosePushL( writeStream );
+    TPckg<TCapabilitySet> capabilitySetPackage( aCapabilities );
+    writeStream.WriteL( capabilitySetPackage );
+    writeStream.CommitL();
+    CleanupStack::PopAndDestroy( &writeStream );
 
-    CompleteDialogOrIndicatorAndWaitForResponseL( KErrNone );
+    AddParamBinaryL( KSifUiGrantCapabilities, *buffer );
+    UpdateDialogAndWaitForResponseL();
+
+    CleanupStack::PopAndDestroy( buffer );
+    return( iDialogReturnValue == KErrNone );
     }
 
 // ---------------------------------------------------------------------------
-// CSifUiPrivate::ShowFailedL()
+// CSifUiPrivate::ShowSingleSelectionL()
 // ---------------------------------------------------------------------------
 //
-void CSifUiPrivate::ShowFailedL( TInt aErrorCode, const TDesC& aErrorMessage,
-        const TDesC& aErrorDetails )
+TBool CSifUiPrivate::ShowSingleSelectionL( const TDesC& /*aTitle*/,
+        const MDesCArray& /*aSelectableItems*/, TInt& aSelectedIndex )
     {
-    ChangeNoteTypeL( ESifUiErrorNote );
+    // TODO: implement
+    aSelectedIndex = 0;
+    return ETrue;
+    }
 
-    AddParamL( KSifUiErrorCode, aErrorCode );
-    AddParamL( KSifUiErrorMessage, aErrorMessage );
-    if( aErrorDetails != KNullDesC )
-        {
-        AddParamL( KSifUiErrorDetails, aErrorDetails );
-        }
-
-    CompleteDialogOrIndicatorAndWaitForResponseL( aErrorCode );
+// ---------------------------------------------------------------------------
+// CSifUiPrivate::ShowMultiSelectionL()
+// ---------------------------------------------------------------------------
+//
+TBool CSifUiPrivate::ShowMultiSelectionL( const TDesC& /*aTitle*/,
+        const MDesCArray& /*aSelectableItems*/, RArray<TInt>& aSelectedIndexes )
+    {
+    // TODO: implement
+    aSelectedIndexes.Reset();
+    return ETrue;
     }
 
 // ---------------------------------------------------------------------------
@@ -263,6 +361,8 @@
 //
 void CSifUiPrivate::DoCancel()
     {
+    FLOG( _L("CSifUiPrivate::DoCancel") );
+
     if( iWait && iWait->IsStarted() && iWait->CanStopNow() )
         {
         iWaitCompletionCode = KErrCancel;
@@ -276,6 +376,8 @@
 //
 void CSifUiPrivate::RunL()
     {
+    FLOG_1( _L("CSifUiPrivate::RunL, iStatus.Int()=%d"), iStatus.Int() );
+
     if( iWait )
         {
         iWait->AsyncStop();
@@ -288,11 +390,14 @@
 //
 void CSifUiPrivate::DataReceived( CHbSymbianVariantMap& aData )
     {
+    FLOG( _L("CSifUiPrivate::DataReceived") );
+
     const CHbSymbianVariant* selectedDriveVariant = aData.Get( KSifUiSelectedMemory );
     if( selectedDriveVariant )
         {
         iSelectedDrive = *( selectedDriveVariant->Value<TChar>() );
         iSelectedDriveSet = ETrue;
+        FLOG_1( _L("CSifUiPrivate::DataReceived, iSelectedDrive=%d"), (TUint)iSelectedDrive );
         }
 
     const CHbSymbianVariant* variant = aData.Get( KSifUiQueryReturnValue );
@@ -334,6 +439,8 @@
 //
 void CSifUiPrivate::DeviceDialogClosed( TInt aCompletionCode )
     {
+    FLOG_1( _L("CSifUiPrivate::DeviceDialogClosed, aCompletionCode=%d"), aCompletionCode );
+
     iIsDisplayingDialog = EFalse;
     WaitedResponseReceived( aCompletionCode );
     }
@@ -345,6 +452,8 @@
 void CSifUiPrivate::IndicatorUserActivated( const TDesC& aType,
         CHbSymbianVariantMap& /*aData*/ )
     {
+    FLOG( _L("CSifUiPrivate::IndicatorUserActivated") );
+
     if( aType == KSifUiInstallIndicatorType )
         {
         CloseInstallIndicator();
@@ -445,6 +554,20 @@
     }
 
 // ---------------------------------------------------------------------------
+// CSifUiPrivate::AddParamBinaryL()
+// ---------------------------------------------------------------------------
+//
+void CSifUiPrivate::AddParamBinaryL( const TDesC& aKey, const CBufBase& aBinary )
+    {
+    CHbSymbianVariant* variant = NULL;
+    const TPtrC8 ptr( const_cast<CBufBase&>( aBinary ).Ptr( 0 ).Ptr(), aBinary.Size() );
+    variant = CHbSymbianVariant::NewL( &ptr, CHbSymbianVariant::EBinary );
+    CleanupStack::PushL( variant );
+    User::LeaveIfError( VariantMapL()->Add( aKey, variant ) );
+    CleanupStack::Pop( variant );
+    }
+
+// ---------------------------------------------------------------------------
 // CSifUiPrivate::AddParamsAppInfoL()
 // ---------------------------------------------------------------------------
 //
@@ -452,9 +575,13 @@
     {
     AddParamL( KSifUiApplicationName, aAppInfo.Name() );
     const TVersion& version( aAppInfo.Version() );
-    if( version.iBuild || version.iMajor || version.iMinor )
+    if( version.iMajor || version.iMinor )
         {
-        AddParamL( KSifUiApplicationVersion, version.Name() );
+        TVersionName versionName;
+        versionName.AppendNum( version.iMajor );
+        versionName.Append( TChar('.') );
+        versionName.AppendNum( version.iMinor );
+        AddParamL( KSifUiApplicationVersion, versionName );
         }
     if( aAppInfo.Vendor().Length() )
         {
@@ -485,13 +612,7 @@
     {
     if( iCertificateBuffer )
         {
-        const TPtrC8 dataPtr( iCertificateBuffer->Ptr( 0 ).Ptr(),
-                iCertificateBuffer->Size() );
-        CHbSymbianVariant* certificates = CHbSymbianVariant::NewL( &dataPtr,
-                CHbSymbianVariant::EBinary );
-        CleanupStack::PushL( certificates );
-        User::LeaveIfError( VariantMapL()->Add( KSifUiCertificates, certificates ) );
-        CleanupStack::Pop( certificates );
+        AddParamBinaryL( KSifUiCertificates, *iCertificateBuffer );
         }
     }
 
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialog.h	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialog.h	Fri Aug 06 10:59:22 2010 +0300
@@ -66,8 +66,9 @@
     bool constructDialog(const QVariantMap &parameters);
     bool updateFromParameters(const QVariantMap &parameters);
     void updateButtons(const QVariantMap &parameters);
+    void prepareForErrorDetails(const QVariantMap &parameters);
+    bool displayAdditionalQuery(const QVariantMap &parameters);
     void sendResult(SifUiDeviceDialogReturnValue value);
-    void monitorIndicatorActivity();
 
 private slots:
     void handleAccepted();
@@ -76,6 +77,8 @@
     void handleHidePressed();
     void handleShowInstalled();
     void handleErrorDetails();
+    void handleCapabilitiesGranted();
+    void handleCapabilitiesDenied();
 
 private:
     Q_DISABLE_COPY(SifUiDialog)
@@ -87,7 +90,9 @@
     SifUiDeviceDialogType mDialogType;
     SifUiDialogTitleWidget *mTitle;
     SifUiDialogContentWidget *mContent;
-    int mInstallError;
+    QString mErrorDetails;
+    int mErrorCode;
+    int mExtendedErrorCode;
     HbAction *mPrimaryAction;
     HbAction *mSecondaryAction;
     QVariantMap mResultMap;
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogcertificatedetails.h	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogcertificatedetails.h	Fri Aug 06 10:59:22 2010 +0300
@@ -51,4 +51,4 @@
     const QList<SifUiDialogCertificateInfo*> &mCertificates;
 };
 
-#endif // SIFUICERTIFICSIFUIDIALOGCERTIFICATEDETAILS_HATES_H
+#endif // SIFUIDIALOGCERTIFICATEDETAILS_H
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogcontentwidget.h	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogcontentwidget.h	Fri Aug 06 10:59:22 2010 +0300
@@ -20,6 +20,7 @@
 
 #include <hbwidget.h>
 #include <sifuidialogdefinitions.h>
+#include <qmobilityglobal.h>            // QTM namespace macros
 
 class HbLabel;
 class QGraphicsLinearLayout;
@@ -28,6 +29,11 @@
 class HbProgressBar;
 class CFbsBitmap;
 
+QTM_BEGIN_NAMESPACE
+class QValueSpacePublisher;
+class QValueSpaceSubscriber;
+QTM_END_NAMESPACE
+
 
 class SifUiDialogContentWidget : public HbWidget
 {
@@ -40,6 +46,7 @@
     void constructFromParameters(const QVariantMap &parameters);
     void updateFromParameters(const QVariantMap &parameters);
     void changeType(SifUiDeviceDialogType type);
+    QString applicationName() const;
 
 signals:
     void memorySelectionChanged(const QChar &driveLetter);
@@ -60,6 +67,8 @@
     bool updateMemorySelection(const QVariantMap &parameters);
     bool updateProgressBar(const QVariantMap &parameters);
     bool updateErrorText(const QVariantMap &parameters);
+    void saveSelectedDriveAsDefault(const QChar& drive);
+    QChar readDefaultSelectedDrive();
 
 private:    // data
     HbLabel *mAppIcon;
@@ -74,6 +83,8 @@
     HbLabel *mErrorText;
     CFbsBitmap *mBitmap;
     CFbsBitmap *mMask;
+    QTM_PREPEND_NAMESPACE(QValueSpacePublisher) *mPublisher;
+    QTM_PREPEND_NAMESPACE(QValueSpaceSubscriber) *mSubscriber;
 };
 
 #endif // SIFUIDIALOGCONTENTWIDGET_H
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogdefinitions.h	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialogdefinitions.h	Fri Aug 06 10:59:22 2010 +0300
@@ -72,9 +72,14 @@
 const QString KSifUiErrorNoteIsDetailsButtonHidden = "errdtlbtn";   // boolean
 
 // Variant map keys for "error" dialog parameters
-const QString KSifUiErrorCode = "err";                  // integer
-const QString KSifUiErrorMessage = "msg";               // string
-const QString KSifUiErrorDetails = "det";               // string
+const QString KSifUiErrorCategory = "errcat";           // enum Usif::TErrorCategory
+const QString KSifUiErrorCode = "errcode";              // integer
+const QString KSifUiErrorCodeExtended = "errext";       // integer
+const QString KSifUiErrorMessage = "errmsg";            // string
+const QString KSifUiErrorDetails = "errdet";            // string
+
+// Variant map keys for "grant capabilities" dialog parameters
+const QString KSifUiGrantCapabilities = "grcap";        // binary (TCapabilitySet)
 
 #endif // SIFUIDIALOGDEFINITIONS_H
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialoggrantcapabilities.h	Fri Aug 06 10:59:22 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Grant capabilities dialog in SifUi
+*
+*/
+
+#ifndef SIFUIDIALOGGRANTCAPABILITIES_H
+#define SIFUIDIALOGGRANTCAPABILITIES_H
+
+#include <HbDialog>
+
+
+/**
+ * SifUi dialog requesting the user to grant capabilities
+ * for the application being installed.
+ */
+class SifUiDialogGrantCapabilities : public HbDialog
+{
+    Q_OBJECT
+
+public:     // constructor and destructor
+    SifUiDialogGrantCapabilities(const QString& applicationName,
+        const QVariant &capabilities, QGraphicsItem *parent = 0);
+    virtual ~SifUiDialogGrantCapabilities();
+
+signals:
+    void accepted();
+    void rejected();
+
+private slots:
+    void handleAccepted();
+    void handleRejected();
+};
+
+#endif // SIFUIDIALOGGRANTCAPABILITIES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/inc/sifuidialoggrantcapabilitiescontent.h	Fri Aug 06 10:59:22 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* 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: Content widget for grant capabilities dialog in SifUi
+*
+*/
+
+#ifndef SIFUIDIALOGGRANTCAPABILITIESCONTENT_H
+#define SIFUIDIALOGGRANTCAPABILITIESCONTENT_H
+
+#include <HbWidget>
+
+
+/**
+ * Content widget for SifUiDialogGrantCapabilities dialog.
+ */
+class SifUiDialogGrantCapabilitiesContent : public HbWidget
+{
+    Q_OBJECT
+
+public:     // constructor and destructor
+    SifUiDialogGrantCapabilitiesContent(const QString& applicationName,
+        const QVariant &capabilities, QGraphicsItem *parent = 0);
+    virtual ~SifUiDialogGrantCapabilitiesContent();
+
+signals:
+    void accepted();
+    void rejected();
+
+private slots:
+    void viewDetails();
+
+private:    // new functions
+    void setCapabilities(const QVariant &capabilities);
+#ifdef Q_OS_SYMBIAN
+    void setCapabilitiesSymbianL( const TDesC8& aBuf );
+    QString capabilityName( const TCapability aCapability );
+#endif
+
+private:    // data
+    QStringList mCapabilities;
+    bool mIsCapabilitiesValid;
+};
+
+#endif // SIFUIDIALOGGRANTCAPABILITIESCONTENT_H
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/rom/sifuidevicedialogplugin.iby	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/rom/sifuidevicedialogplugin.iby	Fri Aug 06 10:59:22 2010 +0300
@@ -20,5 +20,6 @@
 
 file=ABI_DIR\UREL\sifuidevicedialogplugin.dll SHARED_LIB_DIR\sifuidevicedialogplugin.dll UNPAGED
 data=DATAZ_\pluginstub\sifuidevicedialogplugin.qtplugin \resource\plugins\devicedialogs\sifuidevicedialogplugin.qtplugin
+data=DATAZ_\resource\qt\crml\sifuidevicedialogplugin.qcrml \resource\qt\crml\sifuidevicedialogplugin.qcrml
 
 #endif  // SIFUIDEVICEDIALOGPLUGIN_IBY
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.pro	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.pro	Fri Aug 06 10:59:22 2010 +0300
@@ -32,14 +32,18 @@
     inc/sifuidialogtitlewidget.h \
     inc/sifuidialogcontentwidget.h \
     inc/sifuidialogcertificateinfo.h \
-    inc/sifuidialogcertificatedetails.h
+    inc/sifuidialogcertificatedetails.h \
+    inc/sifuidialoggrantcapabilities.h \
+    inc/sifuidialoggrantcapabilitiescontent.h
 
 SOURCES += src/sifuidevicedialogplugin.cpp \
     src/sifuidialog.cpp \
     src/sifuidialogtitlewidget.cpp \
     src/sifuidialogcontentwidget.cpp \
     src/sifuidialogcertificateinfo.cpp \
-    src/sifuidialogcertificatedetails.cpp
+    src/sifuidialogcertificatedetails.cpp \
+    src/sifuidialoggrantcapabilities.cpp \
+    src/sifuidialoggrantcapabilitiescontent.cpp
 
 symbian: {
     TARGET.EPOCALLOWDLLDATA = 1
@@ -52,6 +56,10 @@
     pluginstub.path = /resource/plugins/devicedialogs
     DEPLOYMENT += pluginstub
 
+    crmlFiles.sources = sifuidevicedialogplugin.qcrml
+    crmlFiles.path = /resource/qt/crml
+    DEPLOYMENT += crmlFiles
+
     LIBS += -lfbscli -lPlatformEnv -lestor
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/sifuidevicedialogplugin.qcrml	Fri Aug 06 10:59:22 2010 +0300
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<repository target="RProperty" uidValue="0x20022FC5">
+    <key ref="/KCRUIDSifUiDefaults/KCRUIDSifUiDefaultDrive" int="0x2002C3AC"/>
+</repository>
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialog.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialog.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -15,9 +15,10 @@
 *
 */
 
-#include "sifuidialog.h"
-#include "sifuidialogtitlewidget.h"
-#include "sifuidialogcontentwidget.h"
+#include "sifuidialog.h"                    // SifUiDialog
+#include "sifuidialogtitlewidget.h"         // SifUiDialogTitleWidget
+#include "sifuidialogcontentwidget.h"       // SifUiDialogContentWidget
+#include "sifuidialoggrantcapabilities.h"   // SifUiDialogGrantCapabilities
 #include "sifuiinstallindicatorparams.h"
 #include <QFile>
 #include <hblabel.h>
@@ -44,7 +45,8 @@
 SifUiDialog::SifUiDialog(const QVariantMap &parameters) : HbDialog(),
     mCommonTranslator(0), mSifUITranslator(0), mLastDialogError(KErrNone),
     mShowEventReceived(false), mDialogType(SifUiUnspecifiedDialog),
-    mTitle(0), mContent(0), mPrimaryAction(0), mSecondaryAction(0),
+    mTitle(0), mContent(0), mErrorDetails(), mErrorCode(KErrNone),
+    mExtendedErrorCode(KErrNone), mPrimaryAction(0), mSecondaryAction(0),
     mResultMap(), mIndicator(0), mSubscriber(0)
 {
     mCommonTranslator = new HbTranslator(KTranslationsPath, KCommonTranslationsFile);
@@ -200,24 +202,20 @@
 bool SifUiDialog::updateFromParameters(const QVariantMap &parameters)
 {
     SifUiDeviceDialogType prevDialogType = mDialogType;
-    mDialogType = dialogType(parameters);
-    if (mTitle)
-        {
-        mTitle->updateFromParameters(parameters);
-        }
-    if (mContent)
-        {
-        mContent->updateFromParameters(parameters);
+    if (!displayAdditionalQuery(parameters)) {
+        mDialogType = dialogType(parameters);
+        if (mTitle)
+            {
+            mTitle->updateFromParameters(parameters);
+            }
+        if (mContent)
+            {
+            mContent->updateFromParameters(parameters);
+            }
+        if (prevDialogType != mDialogType) {
+            updateButtons(parameters);
         }
-    if (prevDialogType != mDialogType) {
-        updateButtons(parameters);
-    }
-    if (parameters.contains(KSifUiErrorCode)) {
-        bool ok = false;
-        int errorCode = parameters.value(KSifUiErrorCode).toInt(&ok);
-        if (ok) {
-            mInstallError = errorCode;
-        }
+        prepareForErrorDetails(parameters);
     }
     return true;
 }
@@ -300,6 +298,49 @@
 }
 
 // ----------------------------------------------------------------------------
+// SifUiDialog::prepareForErrorDetails()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialog::prepareForErrorDetails(const QVariantMap &parameters)
+{
+    if (parameters.contains(KSifUiErrorDetails)) {
+        mErrorDetails = parameters.value(KSifUiErrorDetails).toString();
+    }
+    if (parameters.contains(KSifUiErrorCode)) {
+        bool ok = false;
+        int errorCode = parameters.value(KSifUiErrorCode).toInt(&ok);
+        if (ok) {
+            mErrorCode = errorCode;
+        }
+    }
+    if (parameters.contains(KSifUiErrorCodeExtended)) {
+        bool ok = false;
+        int errorCode = parameters.value(KSifUiErrorCodeExtended).toInt(&ok);
+        if (ok) {
+            mExtendedErrorCode = errorCode;
+        }
+    }
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialog::displayAdditionalQuery()
+// ----------------------------------------------------------------------------
+//
+bool SifUiDialog::displayAdditionalQuery(const QVariantMap &parameters)
+{
+    if (parameters.contains(KSifUiGrantCapabilities)) {
+        SifUiDialogGrantCapabilities *dlg = new SifUiDialogGrantCapabilities(
+            mContent->applicationName(), parameters.value(KSifUiGrantCapabilities));
+        connect(dlg, SIGNAL(accepted()), this, SLOT(handleCapabilitiesGranted()));
+        connect(dlg, SIGNAL(declined()), this, SLOT(handleCapabilitiesDenied()));
+        dlg->setAttribute(Qt::WA_DeleteOnClose, true);
+        dlg->open();
+        return true;
+    }
+    return false;
+}
+
+// ----------------------------------------------------------------------------
 // SifUiDialog::sendResult()
 // ----------------------------------------------------------------------------
 //
@@ -363,12 +404,7 @@
         bool result = request->send();
         if (result) {
             closeDeviceDialog(false);
-        } else {
-            // TODO: proper error handling
-            int error = request->lastError();
-            QString messageText = tr("Unable to open AppLib. Error %1").arg(error);
-            HbMessageBox::warning(messageText);
-        }
+        } // else error silently ignored
         delete request;
     }
 
@@ -381,13 +417,33 @@
 //
 void SifUiDialog::handleErrorDetails()
 {
-    // TODO: show proper error details dialog
-    QString messageText;
-    messageText = tr("Error code %1").arg(mInstallError);
+    QString messageText = mErrorDetails;
 
     if (QFile::exists(KSwiErrorsFile)) {
-        messageText.append(KSwiErrorFormat.arg(mInstallError));
+        messageText.append(KSwiErrorFormat.arg(mErrorCode));
+        if (mExtendedErrorCode) {
+            messageText.append(KSwiErrorFormat.arg(mExtendedErrorCode));
+        }
     }
+
     HbMessageBox::warning(messageText);
 }
 
+// ----------------------------------------------------------------------------
+// SifUiDialog::handleCapabilitiesGranted()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialog::handleCapabilitiesGranted()
+{
+    sendResult(SifUiContinue);
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialog::handleCapabilitiesDenied()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialog::handleCapabilitiesDenied()
+{
+    sendResult(SifUiCancel);
+}
+
--- a/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogcontentwidget.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialogcontentwidget.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -24,12 +24,15 @@
 #include <hbprogressbar.h>
 #include <QPixmap>
 #include <qsysteminfo.h>                    // QSystemStorageInfo
-QTM_USE_NAMESPACE
+#include <qvaluespacepublisher.h>           // QValueSpacePublisher
+#include <qvaluespacesubscriber.h>          // QValueSpaceSubscriber
 #if defined(Q_OS_SYMBIAN)
 #include <driveinfo.h>                      // DriveInfo
 #include <fbs.h>                            // CFbsBitmap
 #endif  // Q_OS_SYMBIAN
 
+QTM_USE_NAMESPACE
+
 const char KSifUiDefaultApplicationIcon[] = "qtg_large_application";
 const char KSifUiErrorIcon[] = "qtg_large_warning";
 
@@ -46,6 +49,23 @@
     EOtherDrive
 };
 
+const char KInitialDefaultDrive = 'C';
+
+// Path and value name for QValueSpacePublisher/QValueSpaceSubscriber.
+const QString KSifUiCenRepPath = "/KCRUIDSifUiDefaults";
+const QString KSifUiCenRepDefaultDrive = "KCRUIDSifUiDefaultDrive";
+
+// TODO: replace with proper logging
+#ifdef _DEBUG
+#define FLOG1(x)        qDebug() << (x)
+#define FLOG2(x,y)      qDebug() << (x) << (y)
+#define FLOG3(x,y,z)    qDebug() << (x) << (y) << (z)
+#else
+#define FLOG1(x)
+#define FLOG2(x,y)
+#define FLOG3(x,y,z)
+#endif
+
 
 // ======== LOCAL FUNCTIONS ========
 
@@ -105,7 +125,7 @@
         mAppIcon(0), mAppName(0), mAppSize(0),
         mMainLayout(0), mAppDetailsLayout(0), mStackedWidget(0),
         mMemorySelection(0), mProgressBar(0), mErrorText(0),
-        mBitmap(0), mMask(0)
+        mBitmap(0), mMask(0), mPublisher(0), mSubscriber(0)
 {
 }
 
@@ -125,6 +145,8 @@
 //
 void SifUiDialogContentWidget::constructFromParameters(const QVariantMap &parameters)
 {
+    FLOG1("SifUiDialogContentWidget::constructFromParameters");
+
     Q_ASSERT(mMainLayout == 0);
     mMainLayout = new QGraphicsLinearLayout(Qt::Vertical);
 
@@ -158,8 +180,6 @@
 
     Q_ASSERT(mMemorySelection == 0);
     mMemorySelection = new HbComboBox;
-    connect(mMemorySelection, SIGNAL(currentIndexChanged(int)),
-            this, SLOT(handleMemorySelectionChange(int)));
     mStackedWidget->addWidget(mMemorySelection);
 
     Q_ASSERT(mProgressBar == 0);
@@ -187,6 +207,8 @@
 //
 void SifUiDialogContentWidget::updateFromParameters(const QVariantMap &parameters)
 {
+    FLOG1("SifUiDialogContentWidget::updateFromParameters");
+
     // Application icon
     updateAppIcon(parameters);
 
@@ -232,6 +254,8 @@
 //
 void SifUiDialogContentWidget::changeType(SifUiDeviceDialogType type)
 {
+    FLOG2("SifUiDialogContentWidget::changeType", type);
+
     switch (type) {
         case SifUiConfirmationQuery:
             mStackedWidget->setCurrentWidget(mMemorySelection);
@@ -250,15 +274,27 @@
 }
 
 // ----------------------------------------------------------------------------
+// SifUiDialogContentWidget::applicationName()
+// ----------------------------------------------------------------------------
+//
+QString SifUiDialogContentWidget::applicationName() const
+{
+    if (mAppName) {
+        return mAppName->plainText();
+    }
+    return QString();
+}
+
+// ----------------------------------------------------------------------------
 // SifUiDialogContentWidget::handleMemorySelectionChange()
 // ----------------------------------------------------------------------------
 //
 void SifUiDialogContentWidget::handleMemorySelectionChange(int selectedIndex)
 {
-    QChar selectedDrive = mDriveLetterList[selectedIndex][0];
+    FLOG2("SifUiDialogContentWidget::handleMemorySelectionChange", selectedIndex);
 
-    // TODO: save selected drive to cenrep
-
+    QChar selectedDrive = mDriveLetterList[selectedIndex][0];
+    saveSelectedDriveAsDefault( selectedDrive );
     emit memorySelectionChanged( selectedDrive );
 }
 
@@ -277,7 +313,9 @@
             //: confirmation query. %1 is the application name and %2 is the version number.
             //: Version number consist of major, minor, and build numbers.
             //: For example: "Chess (v 1.01(123))".
-            appName = hbTrId("txt_installer_list_appname_version").arg(nameParam, versionParam);
+            // TODO: use hbTrId when arg() starts to work with limited length arguments like "%[99]1"
+            //appName = hbTrId("txt_installer_list_appname_version").arg(nameParam, versionParam);
+            appName = QString("%1 (v %2)").arg(nameParam, versionParam);
         } else {
             appName = nameParam;
         }
@@ -293,8 +331,9 @@
 {
     QString appSize = "";
     if (parameters.contains(KSifUiApplicationSize)) {
-        uint size = parameters.value(KSifUiApplicationSize).toUInt();
-        if (size > 0) {
+        bool ok = false;
+        uint size = parameters.value(KSifUiApplicationSize).toUInt(&ok);
+        if (ok) {
             if (size > KSifUiMega) {
                 //: Application size in SW install confirmation query, %1 is in megabytes
                 appSize = hbTrId("txt_installer_list_appsize_mb").arg(size/KSifUiMega);
@@ -374,6 +413,7 @@
 {
     Q_ASSERT(mAppIcon != 0);
 
+    // TODO: proper icon handling
     if (parameters.contains(KSifUiDialogType) &&
         (parameters.value(KSifUiDialogType).toInt() == SifUiErrorNote)) {
         mAppIcon->setIcon(HbIcon(KSifUiErrorIcon));
@@ -432,13 +472,18 @@
         QString drives = parameters.value(KSifUiMemorySelection).toString();
         mDriveLetterList = drives.split(",");
 
+        QChar defaultDrive = readDefaultSelectedDrive();
+        int defaultDriveIndex = 0;
+
         QStringList driveList;
         QSystemStorageInfo info;
         QStringList volumeList = info.logicalDrives();
         foreach (QString volume, volumeList) {
             if (mDriveLetterList.contains(volume)) {
                 qlonglong size = info.availableDiskSpace(volume);
-                switch (driveName(volume[0])) {
+
+                QChar driveLetter(volume[0]);
+                switch (driveName(driveLetter)) {
                 case EPhoneMemory:
                     if (size > KSifUiMega) {
                         //: Drive name for internal phone memory with megabytes of free space.
@@ -522,14 +567,25 @@
                     }
                     break;
                 }
+
+                if (driveLetter == defaultDrive) {
+                    defaultDriveIndex = driveList.count() - 1;
+                }
             }
         }
 
+        disconnect(mMemorySelection, SIGNAL(currentIndexChanged(int)),
+            this, SLOT(handleMemorySelectionChange(int)));
         mMemorySelection->setItems(driveList);
+        if (defaultDriveIndex) {
+            FLOG2("SifUiDialogContentWidget::updateMemorySelection, setCurrentIndex",
+                defaultDriveIndex);
+            mMemorySelection->setCurrentIndex(defaultDriveIndex);
+        }
+        connect(mMemorySelection, SIGNAL(currentIndexChanged(int)),
+            this, SLOT(handleMemorySelectionChange(int)));
         mStackedWidget->setCurrentWidget(mMemorySelection);
 
-        // TODO: set selected item, read the default from cenrep
-
         return true;
     }
     return false;
@@ -548,9 +604,12 @@
     }
     if (parameters.contains(KSifUiProgressNoteValue)) {
         int newValue = mProgressBar->progressValue();
-        newValue += parameters.value(KSifUiProgressNoteValue).toInt();
-        mProgressBar->setProgressValue(newValue);
-        progressBarChanged = true;
+        bool ok = false;
+        newValue += parameters.value(KSifUiProgressNoteValue).toInt(&ok);
+        if (ok) {
+            mProgressBar->setProgressValue(newValue);
+            progressBarChanged = true;
+        }
     }
     if (progressBarChanged) {
         mStackedWidget->setCurrentWidget(mProgressBar);
@@ -564,16 +623,9 @@
 //
 bool SifUiDialogContentWidget::updateErrorText(const QVariantMap &parameters)
 {
-    if (parameters.contains(KSifUiErrorCode)) {
-        // TODO: proper error texts
-        bool ok = false;
-        int errorCode = parameters.value(KSifUiErrorCode).toInt(&ok);
-        QString errorText;
-        if (ok) {
-            errorText = tr("Error %1").arg(errorCode);
-        } else {
-            errorText = tr("No error code.");
-        }
+    // TODO: move default error messages (category based) here
+    if (parameters.contains(KSifUiErrorMessage)) {
+        QString errorText = parameters.value(KSifUiErrorMessage).toString();
         mErrorText->setPlainText(errorText);
         mStackedWidget->setCurrentWidget(mErrorText);
         return true;
@@ -581,5 +633,45 @@
     return false;
 }
 
+// ----------------------------------------------------------------------------
+// SifUiDialogContentWidget::saveSelectedDriveAsDefault()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialogContentWidget::saveSelectedDriveAsDefault(const QChar& drive)
+{
+    if (drive != readDefaultSelectedDrive()) {
+        if (!mPublisher) {
+            mPublisher = new QValueSpacePublisher(KSifUiCenRepPath, this);
+        }
+        FLOG2("SifUiDialogContentWidget::saveSelectedDriveAsDefault", drive);
+        // QValueSpacePublisher supports integer and byte array types in Symbian
+        int asciiValue = drive.toAscii();
+        mPublisher->setValue(KSifUiCenRepDefaultDrive, asciiValue);
+        mPublisher->sync();
+    }
+}
 
+// ----------------------------------------------------------------------------
+// SifUiDialogContentWidget::readDefaultSelectedDrive()
+// ----------------------------------------------------------------------------
+//
+QChar SifUiDialogContentWidget::readDefaultSelectedDrive()
+{
+    QChar selectedDrive = KInitialDefaultDrive;
 
+    if (!mSubscriber) {
+        mSubscriber = new QValueSpaceSubscriber(KSifUiCenRepPath, this);
+    }
+    QVariant variant = mSubscriber->value(KSifUiCenRepDefaultDrive);
+    if (variant.isValid() && !variant.isNull()) {
+        bool ok = false;
+        int asciiValue = variant.toInt(&ok);
+        if (ok) {
+            selectedDrive = QChar(asciiValue);
+        }
+    }
+
+    FLOG2("SifUiDialogContentWidget::readDefaultSelectedDrive", selectedDrive);
+    return selectedDrive;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialoggrantcapabilities.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Grant capabilities dialog in SifUi
+*
+*/
+
+#include <sifuidialoggrantcapabilities.h>   // SifUiDialogGrantCapabilities
+#include <sifuidialoggrantcapabilitiescontent.h> // SifUiDialogGrantCapabilitiesContent
+#include <HbLabel>
+
+
+// ----------------------------------------------------------------------------
+// SifUiDialogGrantCapabilities::SifUiDialogGrantCapabilities()
+// ----------------------------------------------------------------------------
+//
+SifUiDialogGrantCapabilities::SifUiDialogGrantCapabilities(const QString& applicationName,
+    const QVariant &capabilities, QGraphicsItem *parent) : HbDialog(parent)
+{
+    setTimeout(HbPopup::NoTimeout);
+    setDismissPolicy(HbPopup::NoDismiss);
+    setModal(true);
+
+    // TODO: localized UI string needed
+    //HbLabel *title = new HbLabel(hbTrId("txt_permissions_needed"));
+    HbLabel *title = new HbLabel(QString("Permissions needed"));
+    setHeadingWidget(title);
+
+    SifUiDialogGrantCapabilitiesContent *content =
+        new SifUiDialogGrantCapabilitiesContent(applicationName, capabilities);
+    connect(content, SIGNAL(accepted()), this, SLOT(handleAccepted()));
+    connect(content, SIGNAL(rejected()), this, SLOT(handleRejected()));
+    setContentWidget(content);
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialogGrantCapabilities::~SifUiDialogGrantCapabilities()
+// ----------------------------------------------------------------------------
+//
+SifUiDialogGrantCapabilities::~SifUiDialogGrantCapabilities()
+{
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialogGrantCapabilities::handleAccepted()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialogGrantCapabilities::handleAccepted()
+{
+    emit accepted();
+    close();
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialogGrantCapabilities::handleRejected()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialogGrantCapabilities::handleRejected()
+{
+    emit rejected();
+    close();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialoggrantcapabilitiescontent.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -0,0 +1,246 @@
+/*
+* 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: Grant capabilities dialog in SifUi
+*
+*/
+
+#include <sifuidialoggrantcapabilitiescontent.h> // SifUiDialogGrantCapabilitiesContent
+#include <QGraphicsLinearLayout>
+#include <HbLabel>
+#include <HbPushButton>
+#include <HbScrollArea>
+#include <HbAction>
+#include <HbDialog>
+#ifdef Q_OS_SYMBIAN
+#include <s32mem.h>                     // TMemBuf
+#endif // Q_OS_SYMBIAN
+
+const QString KDetailsTextHtmlBeginList = "<html>%1<ul>";
+const QString KDetailsTextHtmlListItem = "<li>%1</li>";
+const QString KDetailsTextHtmlEndList = "</ul></html>";
+
+
+// ----------------------------------------------------------------------------
+// SifUiDialogGrantCapabilitiesContent::~SifUiDialogGrantCapabilitiesContent()
+// ----------------------------------------------------------------------------
+//
+SifUiDialogGrantCapabilitiesContent::SifUiDialogGrantCapabilitiesContent(
+    const QString& applicationName, const QVariant &capabilities, QGraphicsItem *parent)
+    : HbWidget(parent), mCapabilities(), mIsCapabilitiesValid(false)
+{
+    QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
+
+    HbLabel *label = new HbLabel();
+    //TODO: localized UI string needed
+    //label->setPlainText(hbTrId("txt_").arg(applicationName));
+    label->setPlainText(tr("Application \"%1\" uses capabilities it is not signed for.")
+        .arg(applicationName));
+    label->setTextWrapping(Hb::TextWordWrap);
+    layout->addItem(label);
+    layout->addStretch();
+
+    //TODO: localized UI string needed
+    //HbPushButton *details = new HbPushButton(hbTrId("txt_"));
+    HbPushButton *details = new HbPushButton(tr("View details"));
+    connect(details, SIGNAL(clicked()), this, SLOT(viewDetails()));
+    layout->addItem(details);
+    layout->addStretch();
+
+    HbPushButton *accept = new HbPushButton;
+    //TODO: localized UI string needed
+    //accept->setText(hbTrId("txt_"));
+    accept->setText(tr("I trust the app"));
+    //TODO: localized UI string needed
+    //accept->setAdditionalText(hbTrId("txt_"));
+    accept->setAdditionalText(tr("Grant all permissions"));
+    connect(accept, SIGNAL(clicked()), this, SIGNAL(accepted()));
+    layout->addItem(accept);
+
+    HbPushButton *deny = new HbPushButton;
+    //TODO: localized UI string needed
+    //deny->setText(hbTrId("txt_"));
+    deny->setText(tr("I do not trust"));
+    //TODO: localized UI string needed
+    //deny->setAdditionalText(hbTrId("txt_"));
+    deny->setAdditionalText(tr("Cancel installation"));
+    connect(deny, SIGNAL(clicked()), this, SIGNAL(rejected()));
+    layout->addItem(deny);
+
+    setLayout(layout);
+    setCapabilities(capabilities);
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialogGrantCapabilitiesContent::~SifUiDialogGrantCapabilitiesContent()
+// ----------------------------------------------------------------------------
+//
+SifUiDialogGrantCapabilitiesContent::~SifUiDialogGrantCapabilitiesContent()
+{
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialogGrantCapabilitiesContent::viewDetails()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialogGrantCapabilitiesContent::viewDetails()
+{
+    HbDialog *detailsDialog= new HbDialog();
+    detailsDialog->setAttribute(Qt::WA_DeleteOnClose, true);
+    detailsDialog->setTimeout(HbPopup::NoTimeout);
+    detailsDialog->setDismissPolicy(HbDialog::NoDismiss);
+    detailsDialog->setModal(true);
+
+    // TODO: localised UI string needed
+    QString detailsTitle = tr("Permission details");
+    detailsDialog->setHeadingWidget(new HbLabel(detailsTitle));
+
+    HbScrollArea *scrollArea = new HbScrollArea(this);
+
+    // TODO: localized UI string needed
+    QString detailsText = KDetailsTextHtmlBeginList.arg("The application has requested permissions to:");
+    QStringListIterator capaIter(mCapabilities);
+    while (capaIter.hasNext()) {
+        detailsText.append(KDetailsTextHtmlListItem.arg(capaIter.next()));
+    }
+    detailsText.append(KDetailsTextHtmlEndList);
+
+    HbLabel *detailsTextLabel = new HbLabel;
+    detailsTextLabel->setHtml(detailsText);
+    detailsTextLabel->setTextWrapping(Hb::TextWordWrap);
+
+    scrollArea->setContentWidget(detailsTextLabel);
+    scrollArea->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAsNeeded);
+    detailsDialog->setContentWidget(scrollArea);
+
+    HbAction *closeAction = new HbAction(hbTrId("txt_common_button_ok"));
+    detailsDialog->addAction(closeAction);
+
+    detailsDialog->show();
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialogGrantCapabilitiesContent::setCapabilities()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialogGrantCapabilitiesContent::setCapabilities(const QVariant &capabilities)
+{
+#ifdef Q_OS_SYMBIAN
+    QByteArray byteArray = capabilities.toByteArray();
+    const TPtrC8 ptr(reinterpret_cast<const TText8*>(byteArray.constData()), byteArray.length());
+    QT_TRAP_THROWING(setCapabilitiesSymbianL(ptr));
+#endif  // Q_OS_SYMBIAN
+
+    if (!mIsCapabilitiesValid) {
+        emit rejected();
+    }
+}
+
+#ifdef Q_OS_SYMBIAN
+// ----------------------------------------------------------------------------
+// SifUiDialogGrantCapabilitiesContent::setCapabilitiesSymbianL()
+// ----------------------------------------------------------------------------
+//
+void SifUiDialogGrantCapabilitiesContent::setCapabilitiesSymbianL( const TDesC8& aBuf )
+{
+    TMemBuf buf;
+    TUint8* ptr = const_cast<TUint8*>(aBuf.Ptr());
+    buf.Set(ptr, ptr + aBuf.Size(), MStreamBuf::ERead);
+    RReadStream readStream(&buf);
+    CleanupClosePushL(readStream);
+    TCapabilitySet capabilitySet;
+    TPckg<TCapabilitySet> capabilitySetPackage( capabilitySet );
+    readStream.ReadL(capabilitySetPackage);
+    CleanupStack::PopAndDestroy(&readStream);
+
+    mIsCapabilitiesValid = true;
+    for( TInt i = 0; i < ECapability_HardLimit && mIsCapabilitiesValid; i++ ) {
+        const TCapability capability( static_cast<TCapability>(i) );
+        if( capabilitySet.HasCapability(capability) ) {
+            QT_TRYCATCH_LEAVING( mCapabilities.append(capabilityName(capability)) );
+        }
+    }
+}
+
+// ----------------------------------------------------------------------------
+// SifUiDialogGrantCapabilitiesContent::capabilityName()
+// ----------------------------------------------------------------------------
+//
+QString SifUiDialogGrantCapabilitiesContent::capabilityName( const TCapability aCapability )
+{
+    QString name;
+
+    switch( aCapability ) {
+    case ECapabilityPowerMgmt:
+        // TODO: is this user-grantable?
+        name = tr("ECapabilityPowerMgmt");
+        break;
+    case ECapabilityReadDeviceData:
+        // TODO: is this user-grantable?
+        name = tr("ECapabilityReadDeviceData");
+        break;
+    case ECapabilityWriteDeviceData:
+        // TODO: is this user-grantable?
+        name = tr("ECapabilityWriteDeviceData");
+        break;
+    case ECapabilityTrustedUI:
+        // TODO: is this user-grantable?
+        name = tr("ECapabilityTrustedUI");
+        break;
+    case ECapabilityProtServ:
+        // TODO: is this user-grantable?
+        name = tr("ECapabilityProtServ");
+        break;
+    case ECapabilitySwEvent:
+        // TODO: is this user-grantable?
+        name = tr("ECapabilitySwEvent");
+        break;
+    case ECapabilityNetworkServices:
+        // TODO: localized UI string needed
+        name = tr("Make network connections or phone calls");
+        break;
+    case ECapabilityLocalServices:
+        // TODO: localized UI string needed
+        name = tr("Connect using local connectivity");
+        break;
+    case ECapabilityReadUserData:
+        // TODO: localized UI string needed
+        name = tr("Read user's personal data");
+        break;
+    case ECapabilityWriteUserData:
+        // TODO: localized UI string needed
+        name = tr("Modify user's personal data");
+        break;
+    case ECapabilityLocation:
+        // TODO: localized UI string needed
+        name = tr("Access the location information");
+        break;
+    case ECapabilitySurroundingsDD:
+        // TODO: is this user-grantable?
+        name = tr("ECapabilitySurroundingsDD");
+        break;
+    case ECapabilityUserEnvironment:
+        // TODO: localized UI string needed
+        name = tr("Access user environment");
+        break;
+
+    // Other capabilities are not user-grantable
+    default:
+        mIsCapabilitiesValid = false;
+        break;
+    }
+
+    return name;
+}
+#endif  // Q_OS_SYMBIAN
+
--- a/appinstaller/AppinstUi/sifuiinstallindicatorplugin/rom/sifuiinstallindicatorplugin.iby	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sifuiinstallindicatorplugin/rom/sifuiinstallindicatorplugin.iby	Fri Aug 06 10:59:22 2010 +0300
@@ -19,8 +19,8 @@
 #define SIFUIINSTALLINDICATORPLUGIN_IBY
 
 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\data\z\resource\qt\crml\sifuiinstallindicatorplugin.qcrml \resource\qt\crml\sifuiinstallindicatorplugin.qcrml
+data=DATAZ_\resource\plugins\indicators\sifuiinstallindicatorplugin.qtplugin \resource\plugins\indicators\sifuiinstallindicatorplugin.qtplugin
+data=DATAZ_\resource\qt\crml\sifuiinstallindicatorplugin.qcrml \resource\qt\crml\sifuiinstallindicatorplugin.qcrml
 
 #endif  // SIFUIINSTALLINDICATORPLUGIN_IBY
 
--- a/appinstaller/AppinstUi/sifuiinstallindicatorplugin/sifuiinstallindicatorplugin.qcrml	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sifuiinstallindicatorplugin/sifuiinstallindicatorplugin.qcrml	Fri Aug 06 10:59:22 2010 +0300
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <repository target="RProperty" uidValue="0x20022FC5">
-<key int="0x2002E690" ref="/SifUiInstallIndicator/Status"></key>
+    <key ref="/SifUiInstallIndicator/Status" int="0x2002E690"/>
 </repository>
--- a/appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginerrors.h	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginerrors.h	Fri Aug 06 10:59:22 2010 +0300
@@ -20,10 +20,16 @@
 
 enum TSisxSifPluginErrors
     {
-    ETrustedUICapabilityRequired = 1,       // TrustedUI capability required
-    ENeedsAllowUntrustedParameter = 2,      // AllowUntrusted parameter needed
-    ENeedsGrantCapabilitiesParameter = 3,   // GrantCapabilities parameter needed
-    EAllFilesCapabilityRequired = 4         // AllFiles capability required
+    ESifUiTrustedUICapabilityRequired = 1,      // TrustedUI capability required.
+    ESifUIAllFilesCapabilityRequired = 2,       // AllFiles capability required.
+    ESifUiNeedsAllowUntrustedParameter = 3,     // Cannot install untrusted package without AllowUntrusted parameter.
+    ESifUiNeedsPackageInfoParameter = 4,        // Cannot install package displaying infos without PackageInfo parameter.
+    ESifUiNeedsAllowAppBreakDependencyParameter = 5, // Uninstall breaks dependencies. Cannot uninstall without AllowAppBreakDependency parameter.
+    ESifUiNeedsAllowAppShutdownParameter = 6,   // Application is running. Cannot uninstall without AllowAppShutdown parameter.
+    ESifUiNeedsAllowIncompatibleParameter = 7,  // Cannot install incompatible package without AllowIncompatible parameter.
+    ESifUiNeedsAllowOverwriteParameter = 8,     // Cannot overwrite existing file which is not part of any package without AllowOverwrite parameter.
+    ESifUiNeedsGrantCapabilitiesParameter = 9,  // Cannot install package requesting user capabilities without GrantCapabilities parameter.
+    ESifUiCannotOverwriteFile = 99              // Cannot overwrite file
     };
 
 #endif // SISXSIFPLUGINERRORS_H
--- a/appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginuihandlerbase.h	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginuihandlerbase.h	Fri Aug 06 10:59:22 2010 +0300
@@ -60,9 +60,12 @@
         void PublishCompletionL();
 
     protected:  // new functions
-        void SetDisplayErrorL( Swi::TErrorDialog aType, const TDesC& aParam );
+        void SetErrorL( TInt aErrorCode, TInt aExtErrorCode );
+        void SetErrorL( TInt aErrorCode, TInt aExtErrorCode, const TDesC& aErrMsgDetails );
+        void SetErrorSwiErrorL( Swi::TErrorDialog aType, const TDesC& aParam );
         void SetOcspErrorL( Swi::TRevocationDialogMessage aMessage );
         TBool ShowQuestionL( const TDesC& aText ) const;
+        void ShowQuestionWithContinueL( const TDesC& aText ) const;
 
     protected:	// data
         RFs& iFs;
@@ -70,7 +73,7 @@
         TInt iMaxInstalledSize;
         TBool iIsDriveSelectionRequired;
         CSisxSifPluginInstallParams* iInstallParams;
-        
+
         // members for publishing operation progress
         CPublishSifOperationInfo* iPublishSifOperationInfo;
         TSifOperationPhase iOperationPhase;
--- a/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginactiveimpl.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginactiveimpl.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -351,7 +351,7 @@
 	if( !aSecurityContext.HasCapability( ECapabilityTrustedUI ) )
 		{
 		FLOG( _L( "CSisxSifPluginActiveImpl::Uninstall, missing ECapabilityTrustedUI") );
-		iErrorHandler->SetExtendedErrorCode( ETrustedUICapabilityRequired );
+		iErrorHandler->SetExtendedErrorCode( ESifUiTrustedUICapabilityRequired );
 		CompleteClientRequest( KErrPermissionDenied );
 		return;
 		}
@@ -594,7 +594,7 @@
         if( !aSecurityContext.HasCapability( ECapabilityTrustedUI ) )
             {
             FLOG( _L("CSisxSifPluginActiveImpl::Install, missing ECapabilityTrustedUI") );
-            iErrorHandler->SetExtendedErrorCode( ETrustedUICapabilityRequired );
+            iErrorHandler->SetExtendedErrorCode( ESifUiTrustedUICapabilityRequired );
             CompleteClientRequest( KErrPermissionDenied );
             return;
             }
@@ -639,7 +639,7 @@
     GetComponentAndUidL( aComponentId, *entry, uid );
     iUiHandler->PublishStartL( *entry );
     CleanupStack::PopAndDestroy( entry );
-    
+
     iAsyncLauncher->UninstallL( *iUiHandler, uid, iStatus );
 
     iOperation = EUninstall;
@@ -705,7 +705,7 @@
         iErrorHandler->FillOutputParamsL( *iOutputParams );
         }
     iUiHandler->PublishCompletionL();
-    
+
     if( aError != KErrNone && aError != KErrCancel )
         {
         iUiHandler->DisplayFailedL( *iErrorHandler );
@@ -772,7 +772,7 @@
         CComponentEntry& aEntry, TUid& aUid ) const
     {
     FLOG_1( _L("CSisxSifPluginActiveImpl::GetComponentAndUidL, component %d"), aComponentId );
-    
+
     RSoftwareComponentRegistry scrSession;
     User::LeaveIfError( scrSession.Connect() );
     CleanupClosePushL( scrSession );
@@ -780,10 +780,10 @@
     if( scrSession.GetComponentL( aComponentId, aEntry ) )
         {
         FLOG( _L("CSisxSifPluginActiveImpl::GetComponentAndUidL, entry found") );
-        
+
         CPropertyEntry* propertyEntry = scrSession.GetComponentPropertyL( aComponentId, KCompUid );
         CleanupStack::PushL( propertyEntry );
-        
+
         CIntPropertyEntry* intPropertyEntry = dynamic_cast< CIntPropertyEntry* >( propertyEntry );
         if( !intPropertyEntry )
             {
@@ -791,7 +791,7 @@
             User::Leave( KErrNotFound );
             }
         aUid = TUid::Uid( intPropertyEntry->IntValue() );
-        
+
         CleanupStack::PopAndDestroy( propertyEntry );
         }
     else
@@ -1023,7 +1023,7 @@
 void CSisxSifPluginActiveImpl::FillDeviceSupportedLanguagesL()
     {
     FLOG( _L("CSisxSifPluginActiveImpl::FillDeviceSupportedLanguagesL, begin") );
-    
+
     CArrayFixFlat<TInt>* installedLanguages = NULL;
     TInt err = SysLangUtil::GetInstalledLanguages( installedLanguages, &iFs );
     CleanupStack::PushL( installedLanguages );
@@ -1039,7 +1039,7 @@
             }
         }
     CleanupStack::PopAndDestroy( installedLanguages );
-    
+
     FLOG( _L("CSisxSifPluginActiveImpl::FillDeviceSupportedLanguagesL, end") );
     }
 
--- a/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandler.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandler.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -23,6 +23,7 @@
 #include <sifui.h>                      // CSifUi
 #include <sifuiappinfo.h>               // CSifUiAppInfo
 #include <sifuicertificateinfo.h>       // CSifUiCertificateInfo
+#include <sifuierrorinfo.h>             // CSifUiErrorInfo
 #include <bautils.h>                    // BaflUtils
 #include <driveinfo.h>                  // DriveInfo
 #include <featmgr.h>                    // FeatureManager
@@ -78,11 +79,32 @@
 // ---------------------------------------------------------------------------
 //
 TBool CSisxSifPluginUiHandler::DisplayTextL( const Swi::CAppInfo& /*aAppInfo*/,
-        Swi::TFileTextOption /*aOption*/, const TDesC& /*aText*/ )
+        Swi::TFileTextOption aOption, const TDesC& aText )
     {
     FLOG( _L("CSisxSifPluginUiHandler::DisplayTextL") );
+    TBool okToContinue = EFalse;
 
-    return ETrue;
+    switch( aOption )
+        {
+        case Swi::EInstFileTextOptionContinue:
+            ShowQuestionWithContinueL( aText );
+            okToContinue = ETrue;
+            break;
+        case Swi::EInstFileTextOptionSkipOneIfNo:
+            okToContinue = ShowQuestionL( aText );
+            break;
+        case Swi::EInstFileTextOptionAbortIfNo:
+        case Swi::EInstFileTextOptionExitIfNo:
+            okToContinue = ShowQuestionL( aText );
+            break;
+        case Swi::EInstFileTextOptionForceAbort:
+            ShowQuestionWithContinueL( aText );
+            break;
+        default:
+            break;
+        }
+
+    return okToContinue;
     }
 
 // ---------------------------------------------------------------------------
@@ -93,19 +115,24 @@
         Swi::TErrorDialog aType, const TDesC& aParam )
     {
     FLOG( _L("CSisxSifPluginUiHandler::DisplayErrorL") );
-    SetDisplayErrorL( aType, aParam );
+    SetErrorSwiErrorL( aType, aParam );
     }
 
 // ---------------------------------------------------------------------------
-// CSisxSifPluginUiHandler::
+// CSisxSifPluginUiHandler::DisplayDependencyBreakL()
 // ---------------------------------------------------------------------------
 //
 TBool CSisxSifPluginUiHandler::DisplayDependencyBreakL( const Swi::CAppInfo& /*aAppInfo*/,
         const RPointerArray<TDesC>& /*aComponents*/ )
     {
     FLOG( _L("CSisxSifPluginUiHandler::DisplayDependencyBreakL") );
+    TBool okToContinue = EFalse;
 
-    return ETrue;
+    // TODO: localized UI string needed
+    _LIT( KText, "Removal may stop other applications working. Continue?" );
+    okToContinue = ShowQuestionL( KText );
+
+    return okToContinue;
     }
 
 // ---------------------------------------------------------------------------
@@ -116,8 +143,7 @@
         const RPointerArray<TDesC>& /*aAppNames*/ )
     {
     FLOG( _L("CSisxSifPluginUiHandler::DisplayApplicationsInUseL") );
-
-    return ETrue;
+    return ETrue;   // silently accepted
     }
 
 // ---------------------------------------------------------------------------
@@ -128,23 +154,30 @@
         Swi::TQuestionDialog aQuestion, const TDesC& /*aDes*/ )
     {
     FLOG( _L("CSisxSifPluginUiHandler::DisplayQuestionL") );
+    TBool okToContinue = EFalse;
 
-    TBool result = ETrue;
     switch( aQuestion )
         {
         case Swi::EQuestionIncompatible:
             if( !iQuestionIncompatibleDisplayed )
                 {
-                // TODO: show dialog
+                _LIT( KText, "Application not compatible with phone. Continue anyway?" );
+                okToContinue = ShowQuestionL( KText );
                 iQuestionIncompatibleDisplayed = ETrue;
                 }
+            else
+                {
+                okToContinue = ETrue;   // already accepted once
+                }
             break;
+
         case Swi::EQuestionOverwriteFile:
         default:
-            // silently accepted
+            okToContinue = ETrue;   // silently accepted
             break;
         }
-    return result;
+
+    return okToContinue;
     }
 
 // ---------------------------------------------------------------------------
@@ -166,11 +199,14 @@
 // ---------------------------------------------------------------------------
 //
 TBool CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL( const Swi::CAppInfo& /*aAppInfo*/,
-        const TCapabilitySet& /*aCapabilitySet*/ )
+        const TCapabilitySet& aCapabilitySet )
     {
     FLOG( _L("CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL") );
+    TBool okToContinue = EFalse;
 
-    return ETrue;
+    okToContinue = iSifUi->ShowGrantCapabilitiesL( aCapabilitySet );
+
+    return okToContinue;
     }
 
 // ---------------------------------------------------------------------------
@@ -469,8 +505,11 @@
     {
     FLOG_1( _L("CSisxSifPluginUiHandler::DisplayFailedL, error code %d"), aError.ErrorCode() );
 
-    // TODO: add error details
-    iSifUi->ShowFailedL( aError.ErrorCode(), aError.ErrorMessage() );
+    CSifUiErrorInfo* errorInfo = CSifUiErrorInfo::NewLC( aError.ErrorCategory(),
+        aError.ErrorCode(), aError.ExtendedErrorCode(), aError.ErrorMessage(),
+        aError.ErrorMessageDetails() );
+    iSifUi->ShowFailedL( *errorInfo );
+    CleanupStack::PopAndDestroy( errorInfo );
     }
 
 // ---------------------------------------------------------------------------
--- a/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandlerbase.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandlerbase.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -127,7 +127,7 @@
 
     CSifOperationStartData* data = CSifOperationStartData::NewLC( *iGlobalComponentId,
             aRootNode.ComponentName(), appNames, appIcons, aRootNode.MaxInstalledSize(),
-            KNullDesC, KNullDesC, aRootNode.SoftwareTypeName() );
+            KNullDesC, KNullDesC, aRootNode.SoftwareTypeName(), iOperationPhase );
 
     if( !iPublishSifOperationInfo )
         {
@@ -158,7 +158,7 @@
 
     CSifOperationStartData* data = CSifOperationStartData::NewLC( *iGlobalComponentId,
             aEntry.Name(), appNames, appIcons, aEntry.ComponentSize(),
-            KNullDesC, KNullDesC, aEntry.SoftwareType() );
+            KNullDesC, KNullDesC, aEntry.SoftwareType(), iOperationPhase );
 
     if( !iPublishSifOperationInfo )
         {
@@ -197,14 +197,92 @@
     }
 
 // ---------------------------------------------------------------------------
-// CSisxSifPluginUiHandlerBase::SetDisplayErrorL()
+// CSisxSifPluginUiHandlerBase::SetErrorL()
 // ---------------------------------------------------------------------------
 //
-void CSisxSifPluginUiHandlerBase::SetDisplayErrorL( Swi::TErrorDialog aType, const TDesC& aParam )
+void CSisxSifPluginUiHandlerBase::SetErrorL( TInt aErrorCode, TInt aExtErrorCode )
     {
-    iErrorHandler.SetExtendedErrorCode( aType );
+    iErrorHandler.SetErrorCode( aErrorCode );
+    iErrorHandler.SetExtendedErrorCode( aExtErrorCode );
 
+    // TODO: localized UI strings needed
+    switch( iErrorHandler.ErrorCategory() )
+        {
+        case ELowMemory:
+            // txt_error_info_there_is_not_enough_memory_currentl
+            iErrorHandler.SetErrorMessage( _L("There is not enough memory currently.") );
+            break;
+        case ELowDiskSpace:
+            // txt_error_info_there_is_not_enough_space_currently
+            iErrorHandler.SetErrorMessage( _L("There is not enough space currently in this drive.") );
+            break;
+        case ENetworkUnavailable:
+            // txt_error_info_network_is_unavailable_currently
+            iErrorHandler.SetErrorMessage( _L("Network  is unavailable currently.") );
+            break;
+        case EInstallerBusy:
+            // txt_error_info_installer_is_busy_currently
+            iErrorHandler.SetErrorMessage( _L("Installer is busy currently.") );
+            break;
+        case ECorruptedPackage:
+            // txt_error_info_installation_package_is_corrupted
+            iErrorHandler.SetErrorMessage( _L("Installation package is corrupted. You may want to try again.") );
+            break;
+        case EApplicationNotCompatible:
+            // txt_error_info_application_is_not_compatible_with
+            iErrorHandler.SetErrorMessage( _L("Application is not compatible with this device.") );
+            break;
+        case ESecurityError:
+            // txt_error_info_there_is_a_security_issue_with_this
+            iErrorHandler.SetErrorMessage( _L("There is a security issue with this application.") );
+            break;
+        case EUnexpectedError:
+        case EUnknown:
+            // txt_error_info_an_unexpected_error_occurred
+            iErrorHandler.SetErrorMessage( _L("An unexpected error occurred.") );
+            break;
+        case EUserCancelled:
+            if( iOperationPhase == EInstalling )
+                {
+                // txt_error_info_application_not_installed
+                iErrorHandler.SetErrorMessage( _L("Application not installed.") );
+                }
+            else
+                {
+                // txt_error_info_application_not_deleted
+                iErrorHandler.SetErrorMessage( _L("Application not deleted. ") );
+                }
+            break;
+        case EUninstallationBlocked:
+            // txt_error_info_application_cannot_be_deleted
+            iErrorHandler.SetErrorMessage( _L("Application cannot be deleted.") );
+            break;
+        case ENone:
+        default:
+            break;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerBase::SetErrorL()
+// ---------------------------------------------------------------------------
+//
+void CSisxSifPluginUiHandlerBase::SetErrorL( TInt aErrorCode, TInt aExtErrorCode,
+    const TDesC& aErrMsgDetails )
+    {
+    SetErrorL( aErrorCode, aExtErrorCode );
+    iErrorHandler.SetErrorMessageDetails( aErrMsgDetails );
+    }
+
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerBase::SetErrorSwiErrorL()
+// ---------------------------------------------------------------------------
+//
+void CSisxSifPluginUiHandlerBase::SetErrorSwiErrorL( Swi::TErrorDialog aType,
+        const TDesC& /*aParam*/ )
+    {
     // TODO: localised detailed error messages
+    // TODO: append aParam when message supports parameters
     TBuf<512> details;
     switch( aType )
         {
@@ -242,7 +320,8 @@
             details.Copy(_L("EUiInsufficientSpaceOnDrive"));
             break;
         case Swi::EUiCapabilitiesCannotBeGranted:
-            details.Copy(_L("EUiCapabilitiesCannotBeGranted"));
+            // aParam contains list of capability names
+            details.Copy(_L("Cannot grant capabilities requested by the application."));
             break;
         case Swi::EUiUnknownFile:
             details.Copy(_L("EUiUnknownFile"));
@@ -278,11 +357,7 @@
             break;
         }
 
-    if( aParam.Length() )
-        {
-        details.Append( _L("\n") );
-        details.Append( aParam );
-        }
+    SetErrorL( KErrGeneral, aType, details );
     }
 
 // ---------------------------------------------------------------------------
@@ -353,4 +428,24 @@
     return questionAccepted;
     }
 
+// ---------------------------------------------------------------------------
+// CSisxSifPluginUiHandlerBase::ShowQuestionWithContinueL()
+// ---------------------------------------------------------------------------
+//
+void CSisxSifPluginUiHandlerBase::ShowQuestionWithContinueL( const TDesC& aText ) const
+    {
+    CHbDeviceMessageBoxSymbian *note = NULL;
+    note = CHbDeviceMessageBoxSymbian::NewL( CHbDeviceMessageBoxSymbian::EQuestion );
+    CleanupStack::PushL( note );
 
+    note->SetTextL( aText );
+    note->SetTimeout( 0 );
+    note->SetButton( CHbDeviceMessageBoxSymbian::EAcceptButton, EFalse );
+    note->SetButton( CHbDeviceMessageBoxSymbian::ERejectButton, ETrue );
+    // TODO: localized UI string needed
+    note->SetButtonTextL( CHbDeviceMessageBoxSymbian::ERejectButton, _L("Continue") );
+    (void)note->ExecL();
+
+    CleanupStack::PopAndDestroy( note );
+    }
+
--- a/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandlersilent.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandlersilent.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -20,6 +20,7 @@
 #include "sisxsifpluginerrorhandler.h"      // CSisxSifPluginErrorHandler
 #include "sisxsifplugin.pan"                // Panic codes
 #include "sisxsifcleanuputils.h"            // CleanupResetAndDestroyPushL
+#include "sisxsifpluginerrors.h"            // Error codes
 
 using namespace Usif;
 
@@ -54,9 +55,10 @@
 // ---------------------------------------------------------------------------
 //
 TBool CSisxSifPluginUiHandlerSilent::DisplayTextL( const Swi::CAppInfo& /*aAppInfo*/,
-        Swi::TFileTextOption /*aOption*/, const TDesC& /*aText*/ )
+        Swi::TFileTextOption aOption, const TDesC& aText )
     {
 	TBool okToContinue = EFalse;
+
 	if( iInstallParams )
 		{
 		switch( iInstallParams->PackageInfo() )
@@ -65,13 +67,33 @@
 				okToContinue = ETrue;
 				break;
 			case EUserConfirm:
-				// TODO: EPolicyUserConfirm
+			    switch( aOption )
+			        {
+			        case Swi::EInstFileTextOptionContinue:
+			            ShowQuestionWithContinueL( aText );
+                        okToContinue = ETrue;
+			            break;
+			        case Swi::EInstFileTextOptionSkipOneIfNo:
+			            okToContinue = ShowQuestionL( aText );
+			            break;
+			        case Swi::EInstFileTextOptionAbortIfNo:
+			        case Swi::EInstFileTextOptionExitIfNo:
+			            okToContinue = ShowQuestionL( aText );
+			            break;
+			        case Swi::EInstFileTextOptionForceAbort:
+			            ShowQuestionWithContinueL( aText );
+			            break;
+			        default:
+			            break;
+			        }
 				break;
 			case ENotAllowed:
 			default:
+		        SetErrorL( KErrPermissionDenied, ESifUiNeedsPackageInfoParameter, aText );
 				break;
 			}
 		}
+
     return okToContinue;
     }
 
@@ -82,7 +104,7 @@
 void CSisxSifPluginUiHandlerSilent::DisplayErrorL( const Swi::CAppInfo& /*aAppInfo*/,
         Swi::TErrorDialog aType, const TDesC& aParam )
     {
-    SetDisplayErrorL( aType, aParam );
+    SetErrorSwiErrorL( aType, aParam );
     }
 
 // ---------------------------------------------------------------------------
@@ -93,6 +115,7 @@
         const RPointerArray<TDesC>& /*aComponents*/ )
     {
 	TBool okToContinue = EFalse;
+
 	if( iInstallParams )
 		{
 		switch( iInstallParams->AllowAppBreakDependency() )
@@ -103,9 +126,11 @@
 			case EUserConfirm:
 			case ENotAllowed:
 			default:
+			    SetErrorL( KErrPermissionDenied, ESifUiNeedsAllowAppBreakDependencyParameter );
 				break;
 			}
 		}
+
     return okToContinue;
     }
 
@@ -117,6 +142,7 @@
         const RPointerArray<TDesC>& /*aAppNames*/ )
     {
 	TBool okToContinue = EFalse;
+
 	if( iInstallParams )
 		{
 		switch( iInstallParams->AllowAppShutdown() )
@@ -127,9 +153,11 @@
 			case EUserConfirm:
 			case ENotAllowed:
 			default:
+			    SetErrorL( KErrPermissionDenied, ESifUiNeedsAllowAppShutdownParameter );
 				break;
 			}
 		}
+
     return okToContinue;
     }
 
@@ -138,9 +166,10 @@
 // ---------------------------------------------------------------------------
 //
 TBool CSisxSifPluginUiHandlerSilent::DisplayQuestionL( const Swi::CAppInfo& /*aAppInfo*/,
-        Swi::TQuestionDialog aQuestion, const TDesC& /*aDes*/ )
+        Swi::TQuestionDialog aQuestion, const TDesC& aDes )
     {
 	TBool okToContinue = EFalse;
+
     switch( aQuestion )
         {
         case Swi::EQuestionIncompatible:
@@ -157,6 +186,10 @@
 						break;
 					}
         		}
+        	if( !okToContinue )
+        	    {
+                SetErrorL( KErrPermissionDenied, ESifUiNeedsAllowIncompatibleParameter, aDes );
+        	    }
             break;
 
         case Swi::EQuestionOverwriteFile:
@@ -173,11 +206,17 @@
 						break;
 					}
         		}
+        	if( !okToContinue )
+        	    {
+                SetErrorL( KErrPermissionDenied, ESifUiNeedsAllowOverwriteParameter, aDes );
+                }
         	break;
 
         default:
+            SetErrorL( KErrNotSupported, KErrNotSupported, aDes );
             break;
         }
+
     return okToContinue;
     }
 
@@ -201,6 +240,7 @@
         const TCapabilitySet& /*aCapabilitySet*/ )
     {
 	TBool okToContinue = EFalse;
+
 	if( iInstallParams )
 		{
 		switch( iInstallParams->GrantCapabilities() )
@@ -211,9 +251,11 @@
 			case EUserConfirm:
 			case ENotAllowed:
 			default:
+			    SetErrorL( KErrPermissionDenied, ESifUiNeedsGrantCapabilitiesParameter );
 				break;
 			}
 		}
+
     return okToContinue;
     }
 
@@ -478,9 +520,12 @@
 // ---------------------------------------------------------------------------
 //
 void CSisxSifPluginUiHandlerSilent::DisplayCannotOverwriteFileL( const Swi::CAppInfo& /*aAppInfo*/,
-        const Swi::CAppInfo& /*aInstalledAppInfo*/, const TDesC& /*aFileName*/ )
+        const Swi::CAppInfo& /*aInstalledAppInfo*/, const TDesC& aFileName )
     {
-	// TODO: error handling
+    // TODO: localized UI string needed: "The package tries to overwrite file '%1' it does not own."
+	TName detailsString;
+	detailsString.Format( _L("The package tries to overwrite file '%S' it does not own."), &aFileName );
+    SetErrorL( KErrPermissionDenied, ESifUiCannotOverwriteFile, detailsString );
     }
 
 // ---------------------------------------------------------------------------
@@ -492,6 +537,7 @@
         TVersion /*aWantedVersionTo*/, TVersion /*aInstalledVersion*/ )
     {
 	TBool okToContinue = EFalse;
+
 	if( iInstallParams )
 		{
 		switch( iInstallParams->AllowAppBreakDependency() )
@@ -505,6 +551,12 @@
 				break;
 			}
 		}
+
+	if( !okToContinue )
+	    {
+        SetErrorL( KErrSifMissingDependencies, 0, KNullDesC );
+	    }
+
     return okToContinue;
     }
 
--- a/installationservices/refswinstallationplugin/inc/sifrefinstaller.iby	Mon Jul 26 18:52:42 2010 +0300
+++ b/installationservices/refswinstallationplugin/inc/sifrefinstaller.iby	Fri Aug 06 10:59:22 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 the License "Eclipse Public License v1.0"
@@ -19,7 +19,7 @@
 #ifndef SIFREFINSTALLER_IBY
 #define SIFREFINSTALLER_IBY
 
-define ZDRIVE \epoc32\data\Z
+define ZDRIVE EPOCROOT##epoc32\data\Z
 
 REM SIF Reference Installer
 
--- a/installationservices/refswinstallationplugin/inc/tsifrefinstaller.iby	Mon Jul 26 18:52:42 2010 +0300
+++ b/installationservices/refswinstallationplugin/inc/tsifrefinstaller.iby	Fri Aug 06 10:59:22 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 the License "Eclipse Public License v1.0"
@@ -21,10 +21,7 @@
 
 REM Tests for SIF Reference Installer
 
-define ZDRIVE \epoc32\data\Z
-
-data=ZDRIVE\tusif\tsifrefinstaller\tsifrefinstaller.ini						\tusif\tsifrefinstaller\tsifrefinstaller.ini
-data=ZDRIVE\tusif\tsifrefinstaller\tsifrefinstaller.script					\tusif\tsifrefinstaller\tsifrefinstaller.script
+define ZDRIVE EPOCROOT##epoc32\data\Z
 
 data=ZDRIVE\tusif\tsifrefinstaller\data\base.sifrefbinpkg					\tusif\tsifrefinstaller\data\base.sifrefbinpkg
 data=ZDRIVE\tusif\tsifrefinstaller\data\base3.sifrefbinpkg					\tusif\tsifrefinstaller\data\base3.sifrefbinpkg
--- a/installationservices/swi/inc/switextshell.iby	Mon Jul 26 18:52:42 2010 +0300
+++ b/installationservices/swi/inc/switextshell.iby	Fri Aug 06 10:59:22 2010 +0300
@@ -19,7 +19,7 @@
 #ifndef SWITEXTSHELL
 #define SWITEXTSHELL
 
-define ROMDRIVE \epoc32\data\Z
+define ROMDRIVE EPOCROOT##epoc32\data\Z
 
 // SWI configuration - already in textshell ROM
 #include <swiconfig.iby>
@@ -63,6 +63,7 @@
 data=ROMDRIVE\resource\swicertstore.dat		\resource\swicertstore.dat  attrib=r
 #endif
 
+#ifndef __SWI_IBY__  
 // Core SWI code
 file=ABI_DIR\BUILD_DIR\installserver.exe			sys\bin\installserver.exe
 file=ABI_DIR\BUILD_DIR\sishelper_tshell.dll			sys\bin\sishelper.dll
@@ -115,7 +116,7 @@
 file=ABI_DIR\BUILD_DIR\swiobserver.exe 				sys\bin\swiobserver.exe
 #endif
 
-
+#endif //__SWI_IBY__
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 	//Universal Software Install Framework production
 	#include "scr.iby" // Software Component Registry
--- a/installationservices/swi/inc/tswitextshell.iby	Mon Jul 26 18:52:42 2010 +0300
+++ b/installationservices/swi/inc/tswitextshell.iby	Fri Aug 06 10:59:22 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 the License "Eclipse Public License v1.0"
@@ -45,7 +45,7 @@
 #include "ezlib.iby"
 #include "openenv.iby"
 
-define ZDRIVE \epoc32\winscw\c
+define ZDRIVE EPOCROOT##epoc32\winscw\c
 
 // This the file which used to redirect the request from cam-ocsptest01 to ban-ocsptest01
 data = ZDRIVE\autohardware\hosts		     \hosts
@@ -288,8 +288,8 @@
 data = \epoc32\winscw\c\tswi\tsis\data\certstore\cacerts.dat \tswi\tsis\data\certstore\cacerts.dat
 data = \epoc32\winscw\c\tswi\tsis\data\certstore\certclients.dat \tswi\tsis\data\certstore\certclients.dat
 
-#include "thindump.iby"
-#include "sntpclient.iby"
+//#include "thindump.iby"
+//#include "sntpclient.iby"
 #include <insock.iby>
 #include <centralrepository.iby>
 
@@ -309,24 +309,33 @@
 #include "sqlite3.iby"
 
 file=ABI_DIR\BUILD_DIR\SDPCodec.dll SHARED_LIB_DIR\SDPCodec.dll
-
+#ifndef __TLS_IBY__
 file=ABI_DIR\DEBUG_DIR\securesocket.DLL	System\Libs\securesocket.DLL
+#endif //__TLS_IBY__
 
+#ifndef __IPSEC_IBY__
 file=ABI_DIR\DEBUG_DIR\ipsecpolapi.dll		System\Libs\ipsecpolapi.dll
 file=ABI_DIR\DEBUG_DIR\lib_pfkey.dll		System\Libs\lib_pfkey.dll
+#endif  // __IPSEC_IBY__
 #include "etext.iby"
 
-file=ABI_DIR\DEBUG_DIR\eikcore.dll		System\Libs\EikCore.dll
+//file=ABI_DIR\DEBUG_DIR\eikcore.dll		System\Libs\EikCore.dll
 
-file=ABI_DIR\BUILD_DIR\clock.dll 		System\Libs\Clock.dll
-file=ABI_DIR\BUILD_DIR\EIKSRVC.DLL				System\Libs\EIKSRVC.DLL
-file=ABI_DIR\BUILD_DIR\UIKLAF.DLL				System\Libs\UIKLAF.DLL
-file=ABI_DIR\BUILD_DIR\eikcoctl.dll 			System\Libs\EikCoctl.dll
-file=ABI_DIR\BUILD_DIR\exparser.dll		        System\Libs\exparser.dll
-file=ABI_DIR\BUILD_DIR\form.dll 		System\Libs\Form.dll
+//file=ABI_DIR\BUILD_DIR\clock.dll 		System\Libs\Clock.dll
+//file=ABI_DIR\BUILD_DIR\EIKSRVC.DLL				System\Libs\EIKSRVC.DLL
+//file=ABI_DIR\BUILD_DIR\UIKLAF.DLL				System\Libs\UIKLAF.DLL
+//file=ABI_DIR\BUILD_DIR\eikcoctl.dll 			System\Libs\EikCoctl.dll
+//file=ABI_DIR\BUILD_DIR\exparser.dll		        System\Libs\exparser.dll   temp comment as not found in DFS build 
+//file=ABI_DIR\BUILD_DIR\form.dll 		System\Libs\Form.dll
 #include "fepbase.iby"
-file=ABI_DIR\BUILD_DIR\tagma.dll 		System\Libs\Tagma.dll
+//file=ABI_DIR\BUILD_DIR\tagma.dll 		System\Libs\Tagma.dll
 //file=ABI_DIR\BUILD_DIR\tzclient.dll		System\Libs\tzclient.dll
 
+// to avoide dependency error in DFS build 
+#ifndef __HBLIB_IBY__ 
+file=ABI_DIR\BUILD_DIR\HbCore.dll SHARED_LIB_DIR\HbCore.dll
+#endif  // __HBLIB_IBY__ 
+
+
 
 #endif //TSWITEXTSHELL
--- a/installationservices/swi/source/sisfile/siscompressed.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/installationservices/swi/source/sisfile/siscompressed.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -53,12 +53,21 @@
 void CCompressed::ConstructL(TInt64& aBytesRead, TReadTypeBehaviour aTypeReadBehaviour)
 	{	
 	CField::ConstructL(iDataProvider, EFieldTypeCompressed, aBytesRead, aTypeReadBehaviour);	
+	// Get the current offset
 	User::LeaveIfError(iDataProvider.Seek(ESeekCurrent, iOffset));
+	TInt64 fieldOffset = 0;
+
+#ifdef SIS_CRC_CHECK_ENABLED
 
 	// Calculate CRC of header and field data
-	TInt64 fieldOffset = iOffset - HeaderSize();
+	fieldOffset = iOffset - HeaderSize();
 	User::LeaveIfError(iDataProvider.Seek(ESeekStart, fieldOffset));
 	CField::CalculateCrcL(iDataProvider, HeaderSize() + Length() + PaddingSize(), iCrc );
+#else
+	fieldOffset = iOffset + Length() + PaddingSize();
+	User::LeaveIfError(iDataProvider.Seek(ESeekStart, fieldOffset));
+#endif
+
 	aBytesRead += Length() + PaddingSize();
 	}
 
--- a/installationservices/swi/source/sisfile/sisdata.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/installationservices/swi/source/sisfile/sisdata.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -62,10 +62,16 @@
 	User::LeaveIfError(iDataProvider.Seek(ESeekCurrent, iOffset));
 	ReadMemberArrayL(iDataProvider, iDataUnits, EFieldTypeDataUnit, arrayBytes, EReadType);
 
+	TInt64 fieldOffset = 0;
+#ifdef SIS_CRC_CHECK_ENABLED
 	// Calculate CRC of header and field data by reading the entire header and field
-	TInt64 fieldOffset = iOffset - HeaderSize();
+	fieldOffset = iOffset - HeaderSize();
 	User::LeaveIfError(iDataProvider.Seek(ESeekStart, fieldOffset));
 	CField::CalculateCrcL(iDataProvider, HeaderSize() + Length() + PaddingSize(), iCrc );
+#else
+	fieldOffset = iOffset + Length() + PaddingSize();
+    User::LeaveIfError(iDataProvider.Seek(ESeekStart, fieldOffset));
+#endif
 	aBytesRead += Length() + PaddingSize();
 	}
 
--- a/installationservices/swi/test/tsisfile/steps/basestep.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/installationservices/swi/test/tsisfile/steps/basestep.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -141,6 +141,7 @@
 				SetTestStepResult(err);		
 				User::Leave(err);
 				}
+#ifdef SIS_CRC_CHECK_ENABLED			
 			TRAP(err, contents->CheckCrcL());
 			if (err == KErrCorrupt)
 				{
@@ -148,10 +149,11 @@
 				SetTestStepResult(err);		
 				User::Leave(err);
 				}
+#endif  			
 			CleanupStack::Pop(contents);	
-			return contents;								
-			}
+			return contents;	
 			
+			}		
 	CController* CParserTestStep::GetControllerL(CContents& contents, TBool aUseInPlaceParse)
 		{
 		TRAPD(err, iControllerData = contents.ReadControllerL());
Binary file installationservices/swiconfig/usif/scr/scr.db has changed
--- a/installationservices/swinstallationfw/inc/sif.iby	Mon Jul 26 18:52:42 2010 +0300
+++ b/installationservices/swinstallationfw/inc/sif.iby	Fri Aug 06 10:59:22 2010 +0300
@@ -19,7 +19,7 @@
 #ifndef SIF_IBY
 #define SIF_IBY
 
-define ZDRIVE \epoc32\data\Z
+define ZDRIVE EPOCROOT##epoc32\data\Z
 
 #include "siflauncherconfig.iby"
 
--- a/secureswitools/swisistools/source/sisxlibrary/siscontents.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/siscontents.cpp	Fri Aug 06 10:59:22 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 the License "Eclipse Public License v1.0"
@@ -67,7 +67,11 @@
 bool CSISContents::IsSisFile(const std::wstring& aFileName)
 	{
 	TSISStream input;
+	#ifdef __TOOLS2_LINUX__
 	std::wstring fileName = FixPathDelimiters(aFileName);
+	#else
+	std::wstring fileName = aFileName;
+	#endif
 	HANDLE file = ::MakeSISOpenFile(fileName.c_str(),GENERIC_READ,OPEN_EXISTING);
 	CSISException::ThrowIf ((INVALID_HANDLE_VALUE == file), 
 							CSISException::EFileProblem, std::wstring (L"cannot open ") + fileName);
@@ -99,7 +103,11 @@
 void CSISContents::Load (const std::wstring& aFileName, TUint64* size)
 	{
 	TSISStream input;
+	#ifdef __TOOLS2_LINUX__
 	std::wstring fileName = FixPathDelimiters(aFileName);
+	#else
+	std::wstring fileName = aFileName;
+	#endif
 	HANDLE file = ::MakeSISOpenFile(fileName.c_str(),GENERIC_READ,OPEN_EXISTING);
 	if (INVALID_HANDLE_VALUE == file)
 		{
--- a/secureswitools/swisistools/source/sisxlibrary/sisinfo.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/sisinfo.cpp	Fri Aug 06 10:59:22 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 the License "Eclipse Public License v1.0"
@@ -178,6 +178,10 @@
 		{
 		aStream << L", SH";
 		}
+    if (iInstallFlags & EInstFlagNonRemovable)
+        {
+        aStream << L", NR";
+        }
 	#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 	if (iInstallFlags & EInstFlagHide)
 		{
--- a/secureswitools/swisistools/source/sisxlibrary/utility.cpp	Mon Jul 26 18:52:42 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/utility.cpp	Fri Aug 06 10:59:22 2010 +0300
@@ -380,7 +380,14 @@
     int len = 0;
 	while(len = FirstInvalidDirSeparatorSize(ret, idx))
         {
-		ret.replace( idx, len, KSisDirectorySeparator );
+		if(idx == 0 && len == 2)
+			{
+			ret.replace( idx, len, KSisInitialNetworkPathSlashes );
+			}
+		else
+			{
+			ret.replace( idx, len, KSisDirectorySeparator );
+			}
         }
     return ret.c_str();
     }
--- a/secureswitools/swisistools/source/sisxlibrary/utility.h	Mon Jul 26 18:52:42 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/utility.h	Fri Aug 06 10:59:22 2010 +0300
@@ -38,6 +38,7 @@
 
 // Constants
 const std::wstring KSisDirectorySeparator( L"/" );
+const std::wstring KSisInitialNetworkPathSlashes( L"//" );
 
 typedef struct {
 	wchar_t*		iName;
--- a/secureswitools/swisistools/test/tdumpsis/testdumpsis.pl	Mon Jul 26 18:52:42 2010 +0300
+++ b/secureswitools/swisistools/test/tdumpsis/testdumpsis.pl	Fri Aug 06 10:59:22 2010 +0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -345,6 +345,22 @@
 %s
 ;
 ";
+
+#
+# Template string to generate PKG file for TestNRFlag.
+#
+$PkgFileWithNRflag = "	
+; File to verify NR flag is dumped correctly.
+;
+;Languages
+&EN
+;
+#{\"TestPacakge\"}, (0x80000077), 1, 0, 0, TYPE=SA, RU, NR
+;
+%{\"Vendor\"}
+:\"Vendor\"
+";
+
 #
 # Do test for each elements of TestItems array
 #
@@ -535,6 +551,9 @@
 SatisfyCoverage();
 
 VerifyErroneousCommandLineArg();
+
+TestNRFlag();
+
 #
 # Display the result
 #
@@ -1481,3 +1500,52 @@
 	unlink $TestLogFile;
 	}
 
+sub TestNRFlag
+	{
+	$TestNRflagsis = "test_nr_flag.sis";
+	$TestNRflagLog = "test_nr_flag.Log";
+	$TestNRflagpkg = "test_nr_flag.pkg";
+	$DumpsisGenPkgPath = "\/test_nr_flag";
+	$ExpectedStringInDumpedPackage = "NR";
+	WriteLog("Test if the NR flag, in the original package file, is present in the dumped package file \n");
+
+	CreateFile('test_nr_flag.pkg', $PkgFileWithNRflag);
+	# Create a sis file
+	my $result = system("/epoc32/tools/MAKESIS -v $TestNRflagpkg $TestNRflagsis > $TestNRflagLog ");
+	
+	# Execute DumpSIS on the created sis file.
+	my $result1 = system("/epoc32/tools/DUMPSIS $TestNRflagsis > $TestNRflagLog");
+	
+	use Cwd;
+	$dir = cwd;
+	chdir $dir.$DumpsisGenPkgPath;
+	open($pkgcontent,$TestNRflagpkg);
+	foreach (<$pkgcontent>) 
+	{
+		$_ =~ tr/\000//d;
+		if ($_ =~ m/$ExpectedStringInDumpedPackage/) 
+		{
+			$result2 = 1;
+		}
+	}
+	close($pkgcontent);
+
+	chdir $dir;
+	$NumberOfTests++;
+	if ($result == 0 && $result1 == 0 && $result2 == 1) 
+		{
+		$NumberOfPassed++;
+		WriteLog("Passed\n\n");
+		}
+	else 
+		{
+		$NumberOfFailed++;
+		WriteLog("Failed\n\n");
+		}
+		
+	unlink $TestNRflagpkg;
+	unlink $TestNRflagsis;
+	unlink $TestNRflagLog;
+	use File::Path;
+	rmtree "$dir$DumpsisGenPkgPath";
+	}
\ No newline at end of file