Revision: 201025
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 14:23:31 +0300
changeset 53 ae54820ef82c
parent 52 92f864ef0288
child 54 100b6c869078
child 60 245df5276b97
Revision: 201025 Kit: 2010127
appinstall.pro
iaupdate/IAD/api/iaupdateapi.pro
iaupdate/IAD/backgroundchecker/group/bld.inf
iaupdate/IAD/backgroundchecker/group/iaupdatebg.mmp
iaupdate/IAD/backgroundchecker/inc/iaupdatebgfirsttimehandler.h
iaupdate/IAD/backgroundchecker/inc/iaupdatebginternalfilehandler.h
iaupdate/IAD/backgroundchecker/inc/iaupdatebgrefreshtimer.h
iaupdate/IAD/backgroundchecker/inc/iaupdatebgsoftnotification.h
iaupdate/IAD/backgroundchecker/src/iaupdatebgfirsttimehandler.cpp
iaupdate/IAD/backgroundchecker/src/iaupdatebginternalfilehandler.cpp
iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp
iaupdate/IAD/backgroundchecker/src/iaupdatebgsoftnotification.cpp
iaupdate/IAD/bgcindicatorplugin/inc/bgcindicator.h
iaupdate/IAD/bgcindicatorplugin/inc/bgcindicatorplugin.h
iaupdate/IAD/bgcindicatorplugin/resources/message.svg
iaupdate/IAD/bgcindicatorplugin/rom/bgcindicatorplugin.iby
iaupdate/IAD/bgcindicatorplugin/src/bgcindicator.cpp
iaupdate/IAD/engine/controller/src/iaupdateinstalloperation.cpp
iaupdate/IAD/engine/controller/src/iaupdateloader.cpp
iaupdate/IAD/engine/controller/src/iaupdateutils.cpp
iaupdate/IAD/engine/group/iaupdateengine.mmp
iaupdate/IAD/engine/inc/iaupdateutils.h
iaupdate/IAD/firmwareupdate/inc/iaupdatefwfotamodel.h
iaupdate/IAD/firmwareupdate/inc/iaupdatefwsynchandler.h
iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp
iaupdate/IAD/firmwareupdate/src/iaupdatefwsynchandler.cpp
iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp
iaupdate/IAD/ui/iaupdate.pro
iaupdate/IAD/ui/iaupdate_mainview.docml
iaupdate/IAD/ui/inc/iaupdatedeputils.h
iaupdate/IAD/ui/inc/iaupdateengine.h
iaupdate/IAD/ui/inc/iaupdatefirsttimedatefile.h
iaupdate/IAD/ui/inc/iaupdatefirsttimeinfo.h
iaupdate/IAD/ui/inc/iaupdatemainview.h
iaupdate/IAD/ui/src/iaupdateapplication.cpp
iaupdate/IAD/ui/src/iaupdatedeputils.cpp
iaupdate/IAD/ui/src/iaupdateengine.cpp
iaupdate/IAD/ui/src/iaupdatefirsttimedatefile.cpp
iaupdate/IAD/ui/src/iaupdatefirsttimeinfo.cpp
iaupdate/IAD/ui/src/iaupdatemainview.cpp
iaupdate/IAD/ui/src/iaupdatenodefilter.cpp
iaupdate/IAD/ui/src/iaupdatesettingdialog.cpp
iaupdate/IAD/ui/src/iaupdateuicontroller.cpp
iaupdate/IAD/updater/group/iaupdater.mmp
iaupdate/IAD/updater/inc/iaupdaterdialog.h
iaupdate/IAD/updater/inc/iaupdatersilentlauncher.h
iaupdate/IAD/updater/src/iaupdaterdialog.cpp
iaupdate/IAD/updater/src/iaupdatermngr.cpp
iaupdate/IAD/updater/src/iaupdatersilentlauncher.cpp
installationservices/swi/bwins/sisregistryclient_v2U.def
installationservices/swi/bwins/sisregistryclient_v2_legacyU.def
installationservices/swi/eabi/sisregistryclient_v2U.def
installationservices/swi/eabi/sisregistryclient_v2_legacyU.def
installationservices/swi/inc/sisregistrywritablesession.h
installationservices/swi/source/backuprestore/backupsession.cpp
installationservices/swi/source/sisregistry/client/sisregistrywritablesession.cpp
installationservices/swi/source/sisregistry/common/sisregistryclientserver.h
installationservices/swi/source/sisregistry/server/scrhelperutil.cpp
installationservices/swi/source/sisregistry/server/sisregistryserversession.cpp
installationservices/swi/source/sisregistry/server/sisregistryserversession.h
installationservices/swi/source/swis/server/siscontentprovider.cpp
installationservices/swi/test/swicaptests/registrycaptest.cpp
installationservices/swi/test/swicaptests/scripts/swicaptests.ini
installationservices/swi/test/swicaptests/scripts/swicaptests.script
installationservices/swiconfig/swi/swipolicy.ini
installationservices/swidevicetools/source/swiconsole/src/ciohandler.cpp
installationservices/swidevicetools/source/swiconsole/src/cpreferencehandler.cpp
installationservices/swidevicetools/source/swiconsole/src/cpreferences.cpp
installationservices/swinstallationfw/inc/sifnotification.h
installationservices/swinstallationfw/source/sifcommon.cpp
installationservices/switestfw/test/autotesting/apr_bld.inf
installationservices/switestfw/test/autotesting/test_spec_apr_9.5.txt
ncdengine/engine/engine.pri
ncdengine/engine/engine.pro
ncdengine/engine/group/bld.inf
ncdengine/engine/group/ncddevicemgmt.mmp
ncdengine/engine/transport/inc/catalogshttpdownload.h
ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h
ncdengine/engine/transport/src/catalogshttpdownload.cpp
ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp
ncdengine/inc/ncdnodeinstall.h
ncdengine/ncdengine.pro
ncdengine/provider/client/inc/ncdnodeinstallproxy.h
ncdengine/provider/client/inc/ncdoperationmanagerproxy.h
ncdengine/provider/client/inc/ncdsilentinstalloperationproxy.h
ncdengine/provider/client/src/ncdnodeinstallproxy.cpp
ncdengine/provider/client/src/ncdoperationmanagerproxy.cpp
ncdengine/provider/client/src/ncdsilentinstalloperationproxy.cpp
ncdengine/provider/deviceinteraction/inc/ncdinstallationservice.h
ncdengine/provider/deviceinteraction/inc/ncdinstallationserviceimpl.h
ncdengine/provider/deviceinteraction/inc/ncdsilentinstallactiveobserver.h
ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp
ncdengine/provider/deviceinteraction/src/ncdsilentinstallactiveobserver.cpp
secureswitools/makekeys/group/bld.inf
secureswitools/makekeys/group/makekeys.mmp
secureswitools/makekeys/src/MAKEKEYS.CPP
secureswitools/makekeys/src/MAKEKEYS.H
secureswitools/swianalysistoolkit/group/bld.inf
secureswitools/swianalysistoolkit/group/dumpchainvaliditytool.mmp
secureswitools/swianalysistoolkit/group/dumpinstallfilestatustool.mmp
secureswitools/swianalysistoolkit/group/dumpswicertstoretool.mmp
secureswitools/swianalysistoolkit/source/chainvalidityandinstallfilestatustools/common/certificatechain.cpp
secureswitools/swianalysistoolkit/source/chainvalidityandinstallfilestatustools/dumpinstallfilestatustool/dumpinstallfilestatustool.cpp
secureswitools/swianalysistoolkit/source/chainvalidityandinstallfilestatustools/dumpinstallfilestatustool/options.cpp
secureswitools/swianalysistoolkit/source/common/streamreader.cpp
secureswitools/swianalysistoolkit/source/dumpswicertstoretool/pfsdump.cpp
secureswitools/swianalysistoolkit/source/dumpswicertstoretool/swicertstoremetadata.cpp
--- a/appinstall.pro	Wed Jun 23 18:20:02 2010 +0300
+++ b/appinstall.pro	Tue Jul 06 14:23:31 2010 +0300
@@ -17,5 +17,6 @@
 TEMPLATE = subdirs
 
 SUBDIRS += appinstaller/appinstaller.pro \
-           iaupdate/iaupdate.pro
+           iaupdate/iaupdate.pro \
+           ncdengine/ncdengine.pro
 
--- a/iaupdate/IAD/api/iaupdateapi.pro	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/api/iaupdateapi.pro	Tue Jul 06 14:23:31 2010 +0300
@@ -23,6 +23,14 @@
     TARGET.CAPABILITY = CAP_GENERAL_DLL
     TARGET.EPOCALLOWDLLDATA=1
     MMP_RULES += "OPTION ARMCC --export_all_vtbl"
+
+    defBlock = \      
+    "$${LITERAL_HASH}if defined(EABI)" \
+    "DEFFILE  ../eabi/iaupdateapi.def" \
+    "$${LITERAL_HASH}else" \
+    "DEFFILE  ../bwins/iaupdateapi.def" \
+    "$${LITERAL_HASH}endif"
+     MMP_RULES += defBlock
 } 
 
 DEPENDPATH += .
--- a/iaupdate/IAD/backgroundchecker/group/bld.inf	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/group/bld.inf	Tue Jul 06 14:23:31 2010 +0300
@@ -22,13 +22,8 @@
 PRJ_PLATFORMS
 DEFAULT
 
-
 PRJ_EXPORTS
 
-/epoc32/s60/icons/qgn_note_swupdate_notification.svg   /epoc32/release/winscw/udeb/z/private/200211f4/qgn_note_swupdate_notification.svg
-/epoc32/s60/icons/qgn_note_swupdate_notification.svg   /epoc32/release/winscw/urel/z/private/200211f4/qgn_note_swupdate_notification.svg
-/epoc32/s60/icons/qgn_note_swupdate_notification.svg   /epoc32/data/z/private/200211f4/qgn_note_swupdate_notification.svg
-
 PRJ_MMPFILES
 ./iaupdatebg.mmp
 
--- a/iaupdate/IAD/backgroundchecker/group/iaupdatebg.mmp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/group/iaupdatebg.mmp	Tue Jul 06 14:23:31 2010 +0300
@@ -41,14 +41,13 @@
 SOURCEPATH          ../src
 SOURCE              iaupdatebgmain.cpp
 SOURCE              iaupdatebgrefreshtimer.cpp
-SOURCE              iaupdatebgremindertimer.cpp
+//SOURCE              iaupdatebgremindertimer.cpp
 SOURCE              iaupdatebgcontrollerfile.cpp
 SOURCE              iaupdatebgfirsttimehandler.cpp
 SOURCE              iaupdatebginternalfilehandler.cpp
 SOURCE              iaupdatebgsoftnotification.cpp
 
 
-
 LIBRARY             euser.lib 
 LIBRARY             centralrepository.lib 
 LIBRARY             iaupdateapi.lib 
@@ -66,9 +65,8 @@
 LIBRARY             sysversioninfo.lib
 LIBRARY             FeatMgr.lib
 
-// HLa
-LIBRARY     hbcore.lib
-LIBRARY     hbwidgets.lib
+LIBRARY             hbcore.lib
+LIBRARY             hbwidgets.lib
 
 DEBUGLIBRARY 	    flogger.lib
 
--- a/iaupdate/IAD/backgroundchecker/inc/iaupdatebgfirsttimehandler.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/inc/iaupdatebgfirsttimehandler.h	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -61,12 +61,7 @@
     * Set Nokia agreement as accepted by an user
     */
     void SetAgreementAcceptedL();
-    
-    /**
-    * Set Nokia agreement as asked (prompted) to an user
-    */
-    void SetAgreementAskedL();
-        
+          
     /**
     * Set automatic update checks as asked (prompted) to an user
     */
@@ -79,13 +74,7 @@
     */
     TBool AgreementAcceptedL();
     
-    /**
-    * Is Nokia agreement of Application Update already asked 
-    *
-    * @return True value if agreement already asked 
-    */
-    TBool AgreementAskedL();
-    
+       
     /**
     * Is activation for automatic update cheks from network already asked 
     *
@@ -121,8 +110,6 @@
     
     TBool iAgreementAccepted;
     
-    TBool iAgreementAsked;
-    
     TBool iAutomaticUpdateChecksAsked;   
    
     };
--- a/iaupdate/IAD/backgroundchecker/inc/iaupdatebginternalfilehandler.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/inc/iaupdatebginternalfilehandler.h	Tue Jul 06 14:23:31 2010 +0300
@@ -52,22 +52,10 @@
 
     void SetLastTimeShowNewFeatureDialog( TInt64 aTime );
 
-    //void SetCurrentRefreshTime();
-
     TBool UserRejectNewFeatureDialog() const;
     
     void SetUserRejectNewFeatureDialog( TBool aUserDecision );
     
-    TBool ReminderOn();
-    
-    void SetReminder( TBool aOn );
-    
-    TTime NextRemindTime();
-    
-    void SetNextRemindTime( TTime aNextRemindTime );
-    
-    void SetNextRemindTime( TInt64 aNextRemindTime );
-    
     void SetMode( TIAUpdateBGMode aMode );
     
     TIAUpdateBGMode Mode();
@@ -113,14 +101,9 @@
 
     // Time when the content was refreshed.
     TTime iLastTimeShowNewFeatureDialog;
-
     
     TBool iUserRejectNewFeatureDialog;
     
-    TTime iNextRemindTime;
-    
-    TBool iIsReminderOn;
-    
     TIAUpdateBGMode iMode;
     
     HBufC* iFwVersion;
--- a/iaupdate/IAD/backgroundchecker/inc/iaupdatebgrefreshtimer.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/inc/iaupdatebgrefreshtimer.h	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -26,7 +26,8 @@
 #include <iaupdateobserver.h>
 #include <barsc.h>
 
-#include "iaupdatebgremindertimer.h"
+
+#include "iaupdatebginternalfilehandler.h"
 #include "iaupdatebgcontrollerfile.h"
 #include "iaupdatebgsoftnotification.h"
 #include "iaupdatebgcheckermode.h"
@@ -34,7 +35,6 @@
 // FORWARD DECLARATIONS
 class CIAUpdate;
 class CIAUpdateParameters;
-// class CAknSoftNotifier;
 class CInternalFileHandler;
 class CIdleObserver;
 
@@ -49,8 +49,7 @@
 class CIAUpdateBGTimer : public CTimer, 
                  public MIAUpdateObserver, 
                  public MCenRepNotifyHandlerCallback, 
-                 public MIAUpdateBGSoftNotificationCallBack, 
-                 public MIAUpdateBGReminderTimerCallBack
+                 public MIAUpdateBGSoftNotificationCallBack 
             
     {
     public:
@@ -121,9 +120,7 @@
         TTimeIntervalMinutes TimeIntervalFromNextShowOfNewFeatureDialogL();
         
         TBool IsAgreementAcceptedL();
-        
-        TBool IsAskedAlreadyL();
-        
+       
         void HandlerFirstTimeL();
         
         TTime GetLastTimeShowNewFeatureDialogL();
@@ -134,14 +131,6 @@
  
         TInt SetUserDecisionL( TBool aDecision );
         
-        TBool ReminderOnL();
-
-        TInt SetReminderL( TBool aOn );
-        
-        TTime NextRemindTimeL();
-
-        TInt SetNextRemindTimeL( TTime aTime );
-        
         TIAUpdateBGMode ModeL();
 
         TInt SetModeL( TIAUpdateBGMode aMode );
@@ -150,12 +139,8 @@
 
         TInt SetRetryTimesL( TInt aRetry );
           
-        // HBufC* ReadResourceLC( TInt aResourceId );
-        
         void StartIaupdateL() const;
         
-        // void LaunchSoftNotificationL( const TInt& aResourceId, const TInt& SK1, const TInt& SK2 );
-        
         void LaunchNotificationL( const int aNrOfUpdates );
         
         TBool IsAutoUpdateDisabledL();
@@ -170,18 +155,8 @@
         
         void DoSoftNotificationCallBackL( TBool aIsAccepted );
         
-        void DoReminderTimerCallBackL();
-        
         void StartUpdatesCheckingL();    
         
-        // HBufC8* LoadFileLC(const TDesC& aFile);
-        
-        TInt GetPrivatePathL( TFileName& aPath );
-        
-        TInt SetSessionPrivatePathL( RFs& aFs, const TDesC& aPath ) const;
-        
-        void SetPrivateDriveL( RFs& aFs, const TDesC& aFileName ) const;
-        
         TBool IAUpdateEnabledL() const;
         
         void Shutdown();
@@ -190,7 +165,6 @@
         // Data       
         CIAUpdate* iUpdate; 
         CIAUpdateParameters* iParameters; 
-        CIAUpdateBGReminderTimer* iReminderTimer;
         CRepository* iIAUpdateCRSession; 
         CCenRepNotifyHandler* iNotifyHandler; 
         TInt iRuns;
@@ -199,8 +173,6 @@
         CIAUpdateBGInternalFileHandler* iInternalFile;
         TIAUpdateBGMode iMode;
         CIAUpdateBGSoftNotification* iSoftNotification;
-        // RResourceFile iResourceFile;
-        RFs iFs;
     };        
 
 #endif //IAUPDATEBGREFRESHTIMER_H
--- a/iaupdate/IAD/backgroundchecker/inc/iaupdatebgsoftnotification.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/inc/iaupdatebgsoftnotification.h	Tue Jul 06 14:23:31 2010 +0300
@@ -61,22 +61,16 @@
         
          /**
           * Shows notification and  indicator. 
-          *
-          * @param aNrOfUpdates number of updates
           */
          void ShowNotificationL();
          
          /**
           * Shows indicator. 
-          *
-          * @param aMode indicator mode (EFirstTimeMode / ENormalMode)
           */
          void ShowIndicatorL();
          
          /**
           * Removes indicator. 
-          *
-          * @param aNrOfUpdates number of updates
           */
          void RemoveIndicatorL();
 
@@ -87,13 +81,6 @@
          * @param aText  text for soft notification
          */
         void SetTextL( const TDesC& aTitle, const TDesC& aText ); 
-
-        /**
-        * Set an image path for a soft notification.
-        *
-        * @param aImage image path for soft notification
-        */
-        void SetImagePathL( const TDesC& aImage );
         
         /**
         * Set number of updates a soft notification.
@@ -152,39 +139,28 @@
         /**
          * Get indicator enablation state
          *
-         * @return aEnabled ETrue-enabled, EFalse-disabled
+         * @return ETrue-enabled, EFalse-disabled
          */ 
         TBool IsIndicatorEnabled();
         
-        /**
-         * Set number of updates
-         *
-         * @param aNrOfUpdates number of updates 
-         */ 
-        // void SetNrOfUpdates( const int aNrOfUpdates );
-        
-        /**
-         * Get number of updates
-         *
-         * @return  number of updates 
-         */ 
         int GetNrOfUpdates();
         
     private:  // Data
         // Note title
         HBufC* iTitle; 
+        
         // Note text
         HBufC* iText; 
-        /// Image data byte array
-        HBufC8* iImageData;
+        
         // Notification callback
         MIAUpdateBGSoftNotificationCallBack* iCallback;
-        // Image path
-        HBufC* iImagePath;
+        
         // Number of updates
         int iNrOfUpdates;
+        
         // Indictor activation state
         TBool iActivateIndicator;
+        
         //Notification dialog
         CHbDeviceNotificationDialogSymbian* iNotificationDialog;
 
--- a/iaupdate/IAD/backgroundchecker/src/iaupdatebgfirsttimehandler.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/src/iaupdatebgfirsttimehandler.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -98,19 +98,7 @@
     iAgreementAccepted = ETrue;
     WriteDataL();
     }
-    
-// ---------------------------------------------------------------------------
-// CIAUpdateBGFirstTimeHandler::SetAgreementAskedL
-// Set Nokia agreement as asked (prompted) to an user
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateBGFirstTimeHandler::SetAgreementAskedL()
-    {
-    ReadDataL();
-    iAgreementAsked = ETrue;
-    WriteDataL();
-    }
-        
+       
 // ---------------------------------------------------------------------------
 // CIAUpdateBGFirstTimeHandler::SetAutomaticUpdatesAskedL
 // Set automatic update checks as prompted to an use
@@ -136,17 +124,6 @@
 
 
 // ---------------------------------------------------------------------------
-// CIAUpdateBGFirstTimeHandler::AgreementAskedL
-// Is Nokia agreement of Application Update already asked 
-// ---------------------------------------------------------------------------
-//
-TBool CIAUpdateBGFirstTimeHandler::AgreementAskedL()
-    {
-    ReadDataL();
-    return iAgreementAsked;
-    }
-
-// ---------------------------------------------------------------------------
 // CIAUpdateBGFirstTimeHandler::AutomaticUpdateChecksAskedL
 // Is activation for automatic update cheks from network already asked 
 // ---------------------------------------------------------------------------
@@ -170,7 +147,6 @@
     if ( err == KErrNotFound )
     	{
     	iAgreementAccepted = EFalse;
-	    iAgreementAsked = EFalse;
 	    iAutomaticUpdateChecksAsked = EFalse; 
     	}
     else
@@ -216,7 +192,6 @@
 void CIAUpdateBGFirstTimeHandler::InternalizeL( RReadStream& aStream )
 	{
 	iAgreementAccepted = aStream.ReadInt32L();
-	iAgreementAsked = aStream.ReadInt32L();
 	iAutomaticUpdateChecksAsked = aStream.ReadInt32L();
 	}
 
@@ -229,7 +204,6 @@
 void CIAUpdateBGFirstTimeHandler::ExternalizeL( RWriteStream& aStream )
 	{
 	aStream.WriteInt32L( iAgreementAccepted );
-	aStream.WriteInt32L( iAgreementAsked );	
 	aStream.WriteInt32L( iAutomaticUpdateChecksAsked );
 	}
     
--- a/iaupdate/IAD/backgroundchecker/src/iaupdatebginternalfilehandler.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/src/iaupdatebginternalfilehandler.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -15,9 +15,6 @@
 *
 */
 
-
-
-
 #include <bautils.h>
 #include <s32file.h>
 #include <sysversioninfo.h>
@@ -67,7 +64,7 @@
 //
 CIAUpdateBGInternalFileHandler::CIAUpdateBGInternalFileHandler()
     : iLastTimeShowNewFeatureDialog( 0 ), iUserRejectNewFeatureDialog( EFalse ), 
-      iNextRemindTime(0), iIsReminderOn( EFalse ), iMode( EFirstTimeMode ), iFwVersion( NULL ), 
+      iMode( EFirstTimeMode ), iFwVersion( NULL ), 
       iSNID(0), iRetryTimes(0)
     {
     }
@@ -215,62 +212,6 @@
     iUserRejectNewFeatureDialog = aUserDecision;
     }
 
-
-// -----------------------------------------------------------------------------
-// CIAUpdateBGInternalFileHandler::ReminderOn
-//
-// -----------------------------------------------------------------------------
-//
-TBool CIAUpdateBGInternalFileHandler::ReminderOn()
-    {
-    return iIsReminderOn;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateBGInternalFileHandler::SetReminder
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateBGInternalFileHandler::SetReminder( TBool aOn )
-    {
-    iIsReminderOn = aOn;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateBGInternalFileHandler::NextRemindTime
-//
-// -----------------------------------------------------------------------------
-//
-TTime CIAUpdateBGInternalFileHandler::NextRemindTime()
-    {
-    return iNextRemindTime;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateBGInternalFileHandler::SetNextRemindTime
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateBGInternalFileHandler::SetNextRemindTime( TTime aNextRemindTime )
-    {
-    iNextRemindTime = aNextRemindTime;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateBGInternalFileHandler::SetNextRemindTime
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateBGInternalFileHandler::SetNextRemindTime( TInt64 aNextRemindTime )
-    {
-    iNextRemindTime = aNextRemindTime;
-    }
-
-
 // -----------------------------------------------------------------------------
 // CIAUpdateBGInternalFileHandler::SetMode
 //
@@ -382,6 +323,7 @@
     // Static casting is safe to do here because enum and TInt are the same.
     SetUserRejectNewFeatureDialog( static_cast< TBool >( userDecision ) );
     
+    /*
     TInt64 nextRemindTime( 0 );
     aStream >> nextRemindTime;
     SetNextRemindTime( nextRemindTime );
@@ -389,6 +331,7 @@
     TInt remindOn( aStream.ReadUint8L() );
     // Static casting is safe to do here because enum and TInt are the same.
     SetReminder( static_cast< TBool >( remindOn ) );
+    */
     
     TInt mode( aStream.ReadUint8L() );
     SetMode( static_cast<TIAUpdateBGMode> (mode) );
@@ -424,11 +367,13 @@
     TInt userDecision ( UserRejectNewFeatureDialog() );
     aStream.WriteUint8L( userDecision );
     
+    /*
     TInt64 nextRemindTime( NextRemindTime().Int64() ); 
     aStream << nextRemindTime;
     
     TInt remindOn ( ReminderOn() );
     aStream.WriteUint8L( remindOn );
+    */
     
     TInt mode( Mode() );
     aStream.WriteUint8L( mode );
--- a/iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -25,10 +25,6 @@
 #include <apgwgnam.h>
 #include <apgcli.h>
 #include <apacmdln.h>
-// #include <avkon.hrh>
-//#include <StringLoader.h> 
-//#include <iaupdate.rsg>
-//#include <data_caging_path_literals.hrh>
 #include <bautils.h>
 #include <apgtask.h>
 #include <sysversioninfo.h>  //sysversioninfo
@@ -46,13 +42,9 @@
 
 //MACROS
 _LIT8( KRefreshFromNetworkDenied, "1" );
-// _LIT(KIAUpdateResourceFile, "iaupdate.rsc");
 _LIT(KIAUpdateLauncherExe, "iaupdatelauncher.exe" );
-_LIT(KImageFile, "qgn_note_swupdate_notification.svg");
 _LIT8( KFirstTimeCase, "0" );
 
-
-
 //CONSTANTS
 const TUint KIADUpdateLauncherUid( 0x2001FE2F );
 
@@ -77,7 +69,6 @@
     CTimer::ConstructL();
     CActiveScheduler::Add( this );
   
-    iReminderTimer = CIAUpdateBGReminderTimer::NewL( this );
     iUpdate = NULL;
     iParameters = NULL;
     
@@ -88,28 +79,18 @@
     
     iInternalFile = CIAUpdateBGInternalFileHandler::NewL();
     
-    iSoftNotification = CIAUpdateBGSoftNotification::NewL( this ); //, iInternalFile );
-    // HLa: iSoftNotification->StartObservingIfNeededL();
-    
-    // Get resource file path
-    /* HLa
-    TFileName fileName;
-    fileName.Copy(TParsePtrC(RProcess().FileName()).Drive());
-    fileName.Append(KDC_APP_RESOURCE_DIR);
-    fileName.Append(KIAUpdateResourceFile);
-    */
+    iSoftNotification = CIAUpdateBGSoftNotification::NewL( this ); 
     
-    User::LeaveIfError(iFs.Connect());
-
-    // Get language of resource file        
-    //BaflUtils::NearestLanguageFile( iFs, fileName );
-
-    // Open resource file
-    //iResourceFile.OpenL( iFs, fileName );
-    //iResourceFile.ConfirmSignatureL();    
+    // loc: initialize localisation text loader
+    /*
+    TBool res = HbTextResolverSymbian::Init(KLocFile, KLocFilePath);
+    if ( res != KErrNone )
+        {
+        // nothing to do
+        }
+    */
     }
     
-    
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::~CIAUpdateBGTimer()
 // ----------------------------------------------------------
@@ -118,7 +99,6 @@
     Cancel();
     delete iUpdate; 
     delete iParameters;
-    delete iReminderTimer;
 
     if ( iNotifyHandler ) 
         {
@@ -131,11 +111,8 @@
     delete iInternalFile;
     delete iSoftNotification;
     
-    // iResourceFile.Close();
-    iFs.Close();
     }
 
-
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::StartProcessL()
 // ----------------------------------------------------------
@@ -145,27 +122,20 @@
         
     iMode = ModeL();
     
-    //HLa
-    TBool test1 = IsAgreementAcceptedL();
-    TBool test2 = ReminderOnL();
-    
-    int test = 0;
     switch ( iMode )
         {
         case EFirstTimeMode:
-         
-        // while not released keep in sleep mode
-        //int test = 1;
-        if ( test == 0 )
             {
-            ListenAutoUpdateSettingsL();
-            iMode = ESleepMode;
-            SetModeL( iMode );
-            return;
-            }
+            // while not released keep in sleep mode
+            int test = 0;
+            if ( test == 0 )
+                {
+                ListenAutoUpdateSettingsL();
+                iMode = ESleepMode;
+                SetModeL( iMode );
+                return;
+                }
         
-        //case EFirstTimeRemindMode:    
-            {
             if ( IsFirstTimeDialogDisabledL() )
                 {
                 //this should only happen in testing
@@ -193,9 +163,6 @@
                         
             FLOG("[bgchecker] StartProcessL EFirstTimeMode");
             
-            
-
-
             //Wait for some days before activate the first time mode
             TTimeIntervalMinutes timetowait =
                     TimeIntervalFromNextShowOfNewFeatureDialogL();
@@ -239,17 +206,10 @@
                                                   
             break;
             }
-/*
+
         case EFirstTimeMode2:
             {
-            FLOG("[bgchecker] StartProcessL EFirstTimeMode2");
-            RunL();
-            break;
-            }
-*/
-        case EFirstTimeMode2:
-            {
-            FLOG("[bgchecker] StartProcessL EFirstTimeMode 3");
+            FLOG("[bgchecker] StartProcessL EFirstTimeMode 2");
             //if user accepted the disclaimer already and reboot the phone, 
             //this mode could go to network immediately after boot
             //We put one min delay here to wait for network ready.
@@ -294,6 +254,10 @@
         case ENormalMode:
         case ERetryMode:
             {
+            
+            // Check if indicator should be shown
+            
+            
             StartUpdatesCheckingL();
             break;
             }
@@ -321,19 +285,6 @@
 
 
 // ----------------------------------------------------------
-// CIAUpdateBGTimer::IsAskedAlreadyL()
-// ----------------------------------------------------------
-TBool CIAUpdateBGTimer::IsAskedAlreadyL()
-    {
-    CIAUpdateBGFirstTimeHandler* fthandler  = CIAUpdateBGFirstTimeHandler::NewL();
-    CleanupStack::PushL( fthandler );
-    TBool result = fthandler->AgreementAskedL();
-    CleanupStack::PopAndDestroy( fthandler );
-    return result;
-    }
-
-
-// ----------------------------------------------------------
 // CIAUpdateBGTimer::StartUpdatesCheckingL()
 // ----------------------------------------------------------
 void CIAUpdateBGTimer::StartUpdatesCheckingL()  
@@ -369,38 +320,7 @@
             FLOG_NUM( "Start checking update after %d minutes", timetowait.Int());
             StartL( timetowait );
             
-            //start reminder timer also if user choose later before reboot
-            //check the value from private folder
-             
-            
-              if ( ReminderOnL() )
-                  {
-                  TTime currenttime;
-                  currenttime.UniversalTime();
-                  
-                  FTIME( currenttime );
-                  
-                  TTime nextremindtime = NextRemindTimeL();
-                  
-                  FTIME( nextremindtime );
-                  
-                  TTimeIntervalMinutes timetogo;
-                  nextremindtime.MinutesFrom( currenttime, timetogo );
-                  
-                  FLOG_NUM("time to go = %d", timetogo.Int() );
-                  
-                  if ( timetogo.Int() <= 0 )
-                      {
-                      //pop up the reminder directly
-                      ReminderTimerCallBack();
-                      }
-                  else
-                      {
-                      iReminderTimer->StartReminderTimerL( timetogo );
-                      }
-                  }
-                  
-            }
+         }
     }
 
 
@@ -527,48 +447,6 @@
 
 
 // ----------------------------------------------------------
-// CIAUpdateBGTimer::NextRemindTimeL()
-// ----------------------------------------------------------
-TTime CIAUpdateBGTimer::NextRemindTimeL()
-    {
-    iInternalFile->ReadControllerDataL();
-    return iInternalFile->NextRemindTime();
-    }
-
-
-// ----------------------------------------------------------
-// CIAUpdateBGTimer::SetNextRemindTimeL()
-// ----------------------------------------------------------
-TInt CIAUpdateBGTimer::SetNextRemindTimeL( TTime aTime )
-    {
-    iInternalFile->SetNextRemindTime( aTime );
-    TRAPD( err,iInternalFile->WriteControllerDataL() );
-    return err;
-    }
-
-
-// ----------------------------------------------------------
-// CIAUpdateBGTimer::ReminderOnL()
-// ----------------------------------------------------------
-TBool CIAUpdateBGTimer::ReminderOnL()
-    {
-    iInternalFile->ReadControllerDataL(); 
-    return iInternalFile->ReminderOn();
-    }
-
-
-// ----------------------------------------------------------
-// CIAUpdateBGTimer::SetReminderL()
-// ----------------------------------------------------------
-TInt CIAUpdateBGTimer::SetReminderL( TBool aOn )
-    {
-    iInternalFile->SetReminder( aOn );
-    TRAPD( err,iInternalFile->WriteControllerDataL() );
-    return err;
-    }
-
-
-// ----------------------------------------------------------
 // CIAUpdateBGTimer::ModeL()
 // ----------------------------------------------------------
 TIAUpdateBGMode CIAUpdateBGTimer::ModeL()
@@ -625,17 +503,6 @@
 void CIAUpdateBGTimer::DoUpdatesCheckingL( const TBool& aUpdateFromServer )
     {   
     FLOG( "DoUpdatesCheckingL update");
-    //turn off the reminder, user will decide whether to turn if on or off
-    //The user's decision will be checked in soft notification callback function
-    
-    
-    if ( ReminderOnL())
-        {
-        FLOG( "Do CheckUpdates 3");
-        iReminderTimer->CancelReminderTimerL();
-        SetReminderL( EFalse );
-        }
-    
     
     if( !iUpdate )
         {
@@ -740,8 +607,6 @@
             FLOG( "CheckUpdatesComplete 4");
     
             LaunchNotificationL( aAvailableUpdates );
-            //LaunchSoftNotificationL(R_IAUPDATE_UPDATE_AVAILABLE,
-            //            R_TEXT_SOFTKEY_SHOW, R_TEXT_SOFTKEY_LATER );
             }
 
             FLOG( "CheckUpdatesComplete 5");
@@ -788,19 +653,6 @@
                 StartL( interval );
                 SetLastRefreshTime();
                 }
-            else
-                {
-                //don't show soft notification and restart the timer.
-                TTimeIntervalMinutes oneweek( UpdateAvailableReminderIntervalInMinutesL() );   
-                TTime currenttime;
-                currenttime.UniversalTime();
-                TTime nextRemindTime = currenttime + oneweek;
-
-                SetReminderL( ETrue );
-                SetNextRemindTimeL( nextRemindTime );
-                                       
-                iReminderTimer->StartReminderTimerL( oneweek );
-                }
             //clear the retry time
             SetRetryTimesL( 0 ); 
             }
@@ -945,7 +797,6 @@
             break;
             
         case EFirstTimeMode:
-        //case EFirstTimeRemindMode:
             {
             FLOG("[bgchecker] runl EFirstTimeMode");
             
@@ -970,18 +821,10 @@
                 }
             }
             break;
-        /*
+
         case EFirstTimeMode2:
             {
-            FLOG("[bgchecker] runl EFirstTimeMode2");
-            LaunchNotificationL( 1 );
-            //LaunchSoftNotificationL(R_IAUPDATE_REMIND_LATER, R_TEXT_SOFTKEY_YES, R_TEXT_SOFTKEY_NO );
-            }
-            break;
-        */
-        case EFirstTimeMode2:
-            {
-            FLOG("[bgchecker] runl EFirstTimeMode3");                 
+            FLOG("[bgchecker] runl EFirstTimeMode2");                 
             //disclaimer is not accepted  
            
             if ( !IsAgreementAcceptedL()  )
@@ -1012,146 +855,6 @@
        
     }
 
-/*
-// ----------------------------------------------------------
-// CIAUpdateBGTimer::RunL()
-// ----------------------------------------------------------
-void CIAUpdateBGTimer::RunL()
-    {
-    FLOG("[bgchecker]RunL() ");
-    if ( !IAUpdateEnabledL() )
-        {
-        Shutdown();
-        return;
-        }
-    User::LeaveIfError( iStatus.Int() );
-    //Check the mode again, in case the mode is changed while waiting.
-    iMode = ModeL();
-    
-    switch ( iMode )
-        {
-        case ENormalMode:
-        case ERetryMode:
-            {     
-            FLOG("[bgchecker]RunL() ENormalMode");                                    
-            //roaming case is checked in IAUpdate server side
-            if ( IsAutoUpdateDisabledL() )
-                {
-                ListenAutoUpdateSettingsL();
-                
-                iMode = ESleepMode;
-                SetModeL( iMode );
-                
-                //the program is waked up when automatic checking is changed by user.
-                //cenrep call back will be used.
-                return;
-                }                        
-            
-            FLOG("[bgchecker]RunL() ENormalMode 1");
-            
-            if(iRuns == 0)
-                {
-                FLOG("[bgchecker]RunL() ENormalMode 2");
-                // if user did the refresh from server while waiting, restart the timer.
-                // the last refresh time is read from the private file of IAUpdate server.
-                TTimeIntervalMinutes timetowait =
-                        TimeIntervalFromNextRefreshL();
-
-                if (timetowait.Int() <= 0 )
-                    {
-                    DoUpdatesCheckingL( ETrue );
-                    }
-                else
-                    {
-                    StartL( timetowait );
-                    }
-                FLOG("[bgchecker]RunL() ENormalMode 3");
-                }
-            else
-                {
-                FLOG("[bgchecker]RunL() ENormalMode 4");
-                TTimeIntervalMinutes timetowait = TimeIntervalFromNextRefreshL();
-                   
-                   if ( timetowait.Int() <= 0 )
-                       {
-                       StartL( StartNow );
-                       }
-                   else
-                       {
-                       StartL( timetowait );
-                       }
-                   FLOG("[bgchecker]RunL() ENormalMode 5");
-                 }        
-            }
-            break;
-            
-        case EFirstTimeMode:
-        case EFirstTimeRemindMode:
-            {
-            FLOG("[bgchecker] runl EFirstTimeMode");
-            
-            if ( iRuns == 0 )
-                {
-                FLOG("[bgchecker] runl run = 0");
-                HandlerFirstTimeL();
-                }
-            else
-                {
-                FLOG("[bgchecker] runl still wait");
-                TTimeIntervalMinutes timetowait = TimeIntervalFromNextShowOfNewFeatureDialogL();
-                                   
-                if ( timetowait.Int() <= 0 )
-                    {
-                    StartL( StartNow );
-                    }
-                 else
-                    {
-                    StartL( timetowait );
-                    } 
-                }
-            }
-            break;
-
-        case EFirstTimeMode2:
-            {
-            FLOG("[bgchecker] runl EFirstTimeMode2");
-            LaunchNotificationL( 1 );
-            //LaunchSoftNotificationL(R_IAUPDATE_REMIND_LATER, R_TEXT_SOFTKEY_YES, R_TEXT_SOFTKEY_NO );
-            }
-            break;
-
-        case EFirstTimeMode3:
-            {
-            FLOG("[bgchecker] runl EFirstTimeMode3");                 
-            //disclaimer is not accepted  
-           
-            if ( !IsAgreementAcceptedL()  )
-                {
-                FLOG("[bgchecker] runl EFirstTimeMode reject disclaimer");
-                //user accepte the new feature dialog but user reject sthe disclaimer
-                //in sleep mode now
-                iMode = ESleepMode;
-                SetModeL( iMode );
-                //subscribe to cenrep key for automatic checking for wake up from sleep mode
-                ListenAutoUpdateSettingsL(); 
-                }
-            else
-                {
-                FLOG("[bgchecker] runl EFirstTimeMode go to normal mode");
-                //Set to Normal mode
-                //check autochecksetting in Runl later
-                iMode = ENormalMode;
-                SetModeL( iMode );
-                StartL( StartNow );
-                }
-            }
-            break;
-            
-        default:
-            break;
-        };
-       
-    }*/
 
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::HandlerFirstTimeL()
@@ -1178,8 +881,6 @@
         //this is first time mode
         FLOG("[bgchecker]HandlerFirstTimeL 3 ");
         LaunchNotificationL( 0 );
-        // LaunchSoftNotificationL( R_IAUPDATE_FEATURES_AVAILABLE,
-        //            R_TEXT_SOFTKEY_OK, R_TEXT_SOFTKEY_CANCEL );
         }
     }
 
@@ -1446,12 +1147,6 @@
         FLOG(" current mode is FirstTimeMode ");
         interval = FirstTimeDialogDelayInMinutesL();
         }
-    /*
-    else if ( ModeL() == EFirstTimeRemindMode )
-        {
-        FLOG(" current mode is FirstTimeRemindMode");
-        interval = FirstTimeDialogReminderIntervalInMinutesL();
-        }*/
     else
         {
         //nothing
@@ -1485,7 +1180,6 @@
       switch ( iMode )
           {
           case EFirstTimeMode:
-          // case EFirstTimeRemindMode:     
                  {
                  
                  FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode");
@@ -1499,12 +1193,6 @@
                      //subscribe to cenrep key for automatic checking for wake up from sleep mode
                      ListenAutoUpdateSettingsL();
                      
-                     /*
-                     FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode not accepted");
-                     iMode = EFirstTimeMode2;
-                     SetModeL( iMode );
-                     StartL( StartNow );
-                     */
                      }
                  else
                      {
@@ -1524,60 +1212,13 @@
                  break;
                  }
                  
-                 
-          /*       
-          case EFirstTimeMode2:  // reminder 
-              {
-              FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode2 ");
-              if ( aIsAccepted ) // reminder accepted ?
-                  {
-                  FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode2, accepted");
-                  //user wants to be reminder so remind in 4 weeks
-                  //set to first time remind mode
-                  iMode = EFirstTimeRemindMode;
-                  SetModeL( iMode );
-                  TTimeIntervalMinutes fourweeks( FirstTimeDialogReminderIntervalInMinutesL() );            
-                  TTime currenttime;
-                  currenttime.UniversalTime();
-                        
-                  //save the next show new feature dialog time
-                  //in case use switch off the device and restarted.      
-                  User::LeaveIfError( SetLastTimeShowNewFeatureDialogL( currenttime ) );
-                        
-                  StartL( fourweeks );
-                  return;
-                  }
-              else
-                  {
-                  FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode2, not accepted");
-                  //in sleep mode now
-                  iMode = ESleepMode;
-                  SetModeL( iMode );
-                  
-                  //subscribe to cenrep key for automatic checking for wake up from sleep mode
-                  ListenAutoUpdateSettingsL(); 
-                  }
-              break;
-              }
-          */    
           case ENormalMode:
               {
               FLOG("[bgchecker] SoftNotificationCallBack ENormalMode");
               if ( !aIsAccepted )
                   {
                   FLOG("[bgchecker] SoftNotificationCallBack ENormalMode not accpeted");
-                  //user wants to be reminded later
-                  TTimeIntervalMinutes oneweek( UpdateAvailableReminderIntervalInMinutesL() );   
-                  TTime currenttime;
-                  currenttime.UniversalTime();
-                  TTime nextRemindTime = currenttime + oneweek;
-
-                  SetReminderL( ETrue );
-                  SetNextRemindTimeL( nextRemindTime );
                   
-                  iReminderTimer->StartReminderTimerL( oneweek );
-                  
-                  //the reminder call back function will be called when reminder timer expires.
                   }
               else
                   {
@@ -1599,127 +1240,6 @@
           }
     }
 
-/*
-// ----------------------------------------------------------
-// CIAUpdateBGTimer::DoSoftNotificationCallBackL()
-// ----------------------------------------------------------
-void CIAUpdateBGTimer::DoSoftNotificationCallBackL( TBool aIsAccepted )
-    {
-    FLOG("[bgchecker] SoftNotificationCallBack");
-    if ( !IAUpdateEnabledL() )
-        {
-        Shutdown();
-        return;
-        }
-    iMode = ModeL(); 
-    
-      switch ( iMode )
-          {
-          case EFirstTimeMode:
-          case EFirstTimeRemindMode:     
-                 {
-                 
-                 FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode");
-                 if ( !aIsAccepted )
-                     {
-                     FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode not accepted");
-                     iMode = EFirstTimeMode2;
-                     SetModeL( iMode );
-                     StartL( StartNow );
-                     }
-                 else
-                     {
-                     FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMod accepeted");
-                     StartIaupdateL();
-                     //iaupdate is launched
-                     //check the disclaimer acceptance and automatic checking setting in 10mins
-
-                     StartL( KDelayForUserToAcceptDisclaimer );
-                     iMode = EFirstTimeMode3;     
-                     SetModeL( iMode );
-
-                     
-                     //Still in first time mode, 
-                     //check user's setting and disclamier after 10mins.
-                     }
-                 break;
-                 }
-                 
-                 
-                 
-          case EFirstTimeMode2:  // reminder 
-              {
-              FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode2 ");
-              if ( aIsAccepted ) // reminder accepted ?
-                  {
-                  FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode2, accepted");
-                  //user wants to be reminder so remind in 4 weeks
-                  //set to first time remind mode
-                  iMode = EFirstTimeRemindMode;
-                  SetModeL( iMode );
-                  TTimeIntervalMinutes fourweeks( FirstTimeDialogReminderIntervalInMinutesL() );            
-                  TTime currenttime;
-                  currenttime.UniversalTime();
-                        
-                  //save the next show new feature dialog time
-                  //in case use switch off the device and restarted.      
-                  User::LeaveIfError( SetLastTimeShowNewFeatureDialogL( currenttime ) );
-                        
-                  StartL( fourweeks );
-                  return;
-                  }
-              else
-                  {
-                  FLOG("[bgchecker] SoftNotificationCallBack EFirstTimeMode2, not accepted");
-                  //in sleep mode now
-                  iMode = ESleepMode;
-                  SetModeL( iMode );
-                  
-                  //subscribe to cenrep key for automatic checking for wake up from sleep mode
-                  ListenAutoUpdateSettingsL(); 
-                  }
-              break;
-              }
-              
-          case ENormalMode:
-              {
-              FLOG("[bgchecker] SoftNotificationCallBack ENormalMode");
-              if ( !aIsAccepted )
-                  {
-                  FLOG("[bgchecker] SoftNotificationCallBack ENormalMode not accpeted");
-                  //user wants to be reminded later
-                  TTimeIntervalMinutes oneweek( UpdateAvailableReminderIntervalInMinutesL() );   
-                  TTime currenttime;
-                  currenttime.UniversalTime();
-                  TTime nextRemindTime = currenttime + oneweek;
-
-                  SetReminderL( ETrue );
-                  SetNextRemindTimeL( nextRemindTime );
-                  
-                  iReminderTimer->StartReminderTimerL( oneweek );
-                  
-                  //the reminder call back function will be called when reminder timer expires.
-                  }
-              else
-                  {
-                  //accepted, launch iad
-                  StartIaupdateL();
-                  }
-              break;
-              }
-
-          case ESleepMode:
-              {
-              FLOG("[bgchecker] SoftNotificationCallBack ESleepMode");
-              //donothing
-              break;
-              }
-
-          default:
-              break;
-          }
-    } */
-
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::SoftNotificationCallBack()
 // ----------------------------------------------------------
@@ -1737,58 +1257,6 @@
     return iMode;
     }
 
-
-
-// ----------------------------------------------------------
-// CIAUpdateBGTimer::DoReminderTimerCallBack()
-// ----------------------------------------------------------
-void CIAUpdateBGTimer::DoReminderTimerCallBackL()
-    {
-    FLOG("[bgchecker] ReminderTimerCallBack begin");
-    if ( !IAUpdateEnabledL() )
-        {
-        Shutdown();
-        return;
-        }
-    //Check the automatic update setting, if it has been disabled, 
-    //then go to sleep mode.   
-    if ( IsAutoUpdateDisabledL() )
-        {
-        FLOG("[bgchecker] ReminderTimerCallBack autoupdate is disabled, switch to sleep mode");
-        ListenAutoUpdateSettingsL();
-        iMode = ESleepMode;
-        SetModeL( iMode );
-        return;
-        } 
-    
-    TTimeIntervalMinutes timetowait = TimeIntervalFromNextRefreshL();
-    
-    if ( timetowait.Int() <= KRefreshTimerReminderTimerGap )
-        {
-        FLOG("[bgchecker] ReminderTimerCallBack refresh is about to come in one day. We don't show reminder then");
-        return;
-        }
-    
-    //if reminder is still on which means the BGTimer is not expired 
-    //and checkupdate() is not called yet, then go ahead to call DoupdatesChecking
-    //this is to avoid DoUpdateChecking being called at the same time.
-        
-    if ( ReminderOnL() )
-        {
-        FLOG("[bgchecker] ReminderTimerCallBack Reminder is still ON");
-        DoUpdatesCheckingL( EFalse );
-        }
-    FLOG("[bgchecker] ReminderTimerCallBack end");
-    }
-
-// ----------------------------------------------------------
-// CIAUpdateBGTimer::ReminderTimerCallBack()
-// ----------------------------------------------------------
-void CIAUpdateBGTimer::ReminderTimerCallBack()
-    {
-    TRAP_IGNORE( DoReminderTimerCallBackL() );
-    }
-   
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::LaunchNotificationL( const int aNrOfUpdates )
 // ----------------------------------------------------------
@@ -1874,7 +1342,6 @@
     // HBufC* secondText3 = HbTextResolverSymbian::LoadL(KTextSecond);
     // CleanupStack::PushL( titleText );
     
-    //TBuf<256> iconPath;
     
     TBuf<128> titleText;
     TBuf<128> secondText;
@@ -1893,6 +1360,7 @@
     secondText.Append(KSecondText);
             
     // icon
+    /* HLa-->
     if ( iMode == ENormalMode )
         {
         TFileName path;
@@ -1906,7 +1374,7 @@
             //CleanupStack::PopAndDestroy( image );
             }
         }
-    
+    */
     // loc: set image path
     // iSoftNotification->SetImagePathL( KIcon );
   
@@ -1922,211 +1390,10 @@
     iSoftNotification->SetNrOfUpdates( aNrOfUpdates );
    
     iSoftNotification->ShowNotificationL();
-    FLOG("[bgchecker] LaunchSoftNotificationL 1");
-    // CleanupStack::PopAndDestroy( 3 ); //text, sk1, sk2
+    FLOG("[bgchecker] LaunchNotificationL 1");
     
     return;
     }
-// ----------------------------------------------------------
-// CIAUpdateBGTimer::LaunchSoftNotificationL()
-// ----------------------------------------------------------
-/* HLa
-void CIAUpdateBGTimer::LaunchSoftNotificationL( const TInt& aResourceId, const TInt& SK1, const TInt& SK2 )
-    {     
-    iInternalFile->ReadControllerDataL(); 
-    TInt snid = iInternalFile->SoftNotificationID();
-    if ( snid ) 
-        {
-        //there is a soft notification buffered, remove it
-        iSoftNotification->RemoveSoftNotificationL( snid );
-        }
-    
-    FLOG("[bgchecker] LaunchSoftNotificationL ");
-    HBufC* text = ReadResourceLC( aResourceId );    
-    HBufC* sk1 = ReadResourceLC( SK1 );    
-    HBufC* sk2 = ReadResourceLC( SK2 );  
-    
-        
-    iMode = ModeL();
-    
-    if ( iMode == ENormalMode )
-        {
-        TFileName path;
-        TInt err = GetPrivatePathL( path ); 
-        
-        if ( err == KErrNone )
-            {
-            HBufC8* image = LoadFileLC( path );   
-            iSoftNotification->SetImageL( *image );
-            //iSoftNotification->SetImagePathL( *image );
-            CleanupStack::PopAndDestroy( image );
-            }
-        }
-  
-    
-    iSoftNotification->SetTextL( *text, *text );
-   
-    iSoftNotification->ShowSoftNotificationL();
-    FLOG("[bgchecker] LaunchSoftNotificationL 1");
-    CleanupStack::PopAndDestroy( 3 ); //text, sk1, sk2
-    }
-*/
-
-
-// ----------------------------------------------------------
-// CIAUpdateBGTimer::GetPrivatePathL()
-// ----------------------------------------------------------
-TInt CIAUpdateBGTimer::GetPrivatePathL( TFileName& aPath )
-    {
-    RFs fsSession;  
-    User::LeaveIfError( fsSession.Connect() );
-    CleanupClosePushL( fsSession );
-
-    // This will set the correct drive and private path 
-    // for the file server session. 
-    TInt err = KErrNone;
-    TRAP( err, SetPrivateDriveL( fsSession, KImageFile ) );
-    
-    if ( err != KErrNone )
-        {
-        CleanupStack::PopAndDestroy( &fsSession ); 
-        return err;
-        }
-   
-    err = fsSession.SessionPath( aPath );
-    aPath.Append( KImageFile );
-    
-    CleanupStack::PopAndDestroy( &fsSession ); 
-    return err;
-    }
-
-/*
-// ----------------------------------------------------------
-// CIAUpdateBGTimer::LoadFileLC()
-// ----------------------------------------------------------
- HBufC8* CIAUpdateBGTimer::LoadFileLC(const TDesC& aFile)
-     {
-     RFs fs;
-    User::LeaveIfError( fs.Connect() );
-    CleanupClosePushL( fs );
-    RFile file;
-    User::LeaveIfError(file.Open(fs, aFile, EFileRead));
-    CleanupClosePushL(file);
-    TInt size;
-    User::LeaveIfError(file.Size(size));
-    HBufC8* imagebuf = HBufC8::NewL(size);
-    TPtr8 imageptr(imagebuf->Des());
-    file.Read(imageptr);
-    CleanupStack::PopAndDestroy( &file ); 
-    CleanupStack::PopAndDestroy( &fs ); 
-    CleanupDeletePushL(imagebuf);
-    return imagebuf;
-     } 
-*/
- 
- // ----------------------------------------------------------
- // CIAUpdateBGTimer::SetPrivateDriveL()
- // ----------------------------------------------------------
- void CIAUpdateBGTimer::SetPrivateDriveL( 
-     RFs& aFs,
-     const TDesC& aFileName ) const
-     {
-     // First try to find the file from the private directory
-     // of the drive where the process exists.
-     RProcess process;
-
-     // Set the session private path according to 
-     // the process file name drive.
-     TInt driveNum( 
-         SetSessionPrivatePathL( aFs, process.FileName() ) );
-
-     // Get the session path that was set above.
-     TFileName sessionPath;
-     User::LeaveIfError( aFs.SessionPath( sessionPath ) );
-
-     // Use the file finder to check if the file actually exists 
-     // in the given drive path. If it does not, the file finder 
-     // will automatically check from other drives. So, here we 
-     // should always find the file if any exists.
-     TFindFile finder( aFs );
-     User::LeaveIfError( finder.FindByDir( aFileName, sessionPath ) );
-
-     // The drive may have changed if the file was not found from
-     // the first suggested drive. So, be sure to have the correct
-     // private path.
-     driveNum = SetSessionPrivatePathL( aFs, finder.File() );
-
-     // Use the drive info to check if the drive is ROM drive.
-     // We prefer non ROM drives. But, accept ROM if nothing else is
-     // available.
-     TDriveInfo info;
-     User::LeaveIfError( aFs.Drive( info, driveNum ) );
-     TBool isRomDrive( info.iDriveAtt & KDriveAttRom );
-     if ( !isRomDrive )
-         {
-         // The current file is not in ROM drive so use that.
-         return;
-         }
-
-     // Because previous finding was ROM file, try to find a non ROM file.
-     TInt findErrorCode( finder.Find() );
-     if ( findErrorCode == KErrNotFound )
-         {
-         // Because no new file is found, use the current settings.
-         return;
-         }
-     User::LeaveIfError( findErrorCode );
-
-     // Update the session path for the correct file.
-     SetSessionPrivatePathL( aFs, finder.File() );
-     }
-
-
- // ----------------------------------------------------------
- // CIAUpdateBGTimer::SetSessionPrivatePathL()
- // ----------------------------------------------------------
- TInt CIAUpdateBGTimer::SetSessionPrivatePathL( 
-     RFs& aFs,
-     const TDesC& aPath ) const
-     {                      
-     // Use the parser to get the drive information from the path.
-     TParsePtrC parser( aPath );
-
-     if ( !parser.DrivePresent() )
-         {
-         User::Leave( KErrArgument );
-         }
-
-     // Drive check was passed above.
-     // So, drive information is safe to use.
-     const TDesC& drive( parser.Drive() );
-     const TChar driveChar( drive[ 0 ] );
-     TInt driveNum( EDriveA );
-     User::LeaveIfError( 
-         RFs::CharToDrive( driveChar, driveNum ) );
-
-     // Set the file drive to be file session private path drive.
-     User::LeaveIfError( aFs.SetSessionToPrivate( driveNum ) );
-
-     return driveNum;
-     }
-
- 
-// ----------------------------------------------------------
-// CIAUpdateBGTimer::ReadResourceLC()
-// ----------------------------------------------------------
- /* HLa
-HBufC* CIAUpdateBGTimer::ReadResourceLC( TInt aResourceId )
-    {
-    TResourceReader reader;
-    HBufC8* buff = iResourceFile.AllocReadLC( aResourceId );
-    reader.SetBuffer( buff );
-    HBufC* text = reader.ReadHBufCL();
-    CleanupStack::PopAndDestroy( buff );
-    CleanupStack::PushL( text );
-    return text;
-    } */
-
 
 // ----------------------------------------------------------
 // CIAUpdateBGTimer::IsAutoUpdateDisabledL()
@@ -2255,8 +1522,8 @@
     delete iUpdate; 
     iUpdate = NULL;
     
-    delete iReminderTimer;
-    iReminderTimer = NULL;
+    //delete iReminderTimer;
+    //iReminderTimer = NULL;
     
     if ( iNotifyHandler ) 
         {
@@ -2267,7 +1534,6 @@
     
     if ( iSoftNotification )
         {
-        // TRAP_IGNORE( iSoftNotification->RemoveSoftNotificationL( iSoftNotification->Id() ) );    
         delete iSoftNotification;
         iSoftNotification = NULL;
         }
@@ -2276,9 +1542,4 @@
         
     FLOG("[bgchecker] Shutdown() end");
     }
-
-
-
 // End of file
-
-
--- a/iaupdate/IAD/backgroundchecker/src/iaupdatebgsoftnotification.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/backgroundchecker/src/iaupdatebgsoftnotification.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -103,28 +103,19 @@
 
     delete iTitle;
     delete iText;
-
-    delete iImagePath;
     
     delete iNotificationDialog;
 
     }
    
 // -----------------------------------------------------------------------------
-// CIAUpdateBGSoftNotification::ShowSoftNotificationL
+// CIAUpdateBGSoftNotification::ShowNotificationL
 // Displays notification
 // -----------------------------------------------------------------------------
 //
 void CIAUpdateBGSoftNotification::ShowNotificationL()
     {
     
-    /*
-    _LIT( KIcon, "C:\\qgn_note_swupdate_notification.svg" );
-    _LIT( KFirstTimeText, "Check for updates ?" );
-    _LIT( KNormalText, "Check for updates ?" );
-    _LIT( KTextRow2, "Tap to view" );
-    */
-    
     FLOG("[bgchecker] ShowNotificationL");
     
     // crete dialog, id does not exist already
@@ -133,11 +124,6 @@
         iNotificationDialog = CHbDeviceNotificationDialogSymbian::NewL( this );
         }
     
-    //CleanupStack::PushL( notificationDialog ); // --> memberiin - delete closessa/activaatiossa/destructorissa
-                                                           //    + leave kiinni + tuhoaminen
-    // save number of updates
-    //SetNrOfUpdates ( aNrOfUpdates );
-    
     // enable indicator showing
     SetIndicatorEnabled( ETrue );
 
@@ -170,7 +156,7 @@
         CHbSymbianVariant::EInt );
     CleanupStack::PushL( varValue );
     // Temporary removal 
-    // ind->Activate( KIndicatorTypeBgc, varValue );
+    ind->Activate( KIndicatorTypeBgc, varValue );
     CleanupStack::PopAndDestroy( varValue );
     CleanupStack::PopAndDestroy( ind );
     
@@ -191,7 +177,7 @@
     CHbIndicatorSymbian *ind = CHbIndicatorSymbian::NewL();
     CleanupStack::PushL( ind );
     // Temporary removal 
-    // ind->Deactivate( KIndicatorTypeBgc ); 
+    ind->Deactivate( KIndicatorTypeBgc ); 
     CleanupStack::PopAndDestroy(ind);
     
     return;
@@ -216,19 +202,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CIAUpdateBGSoftNotification::SetImagePathL
-// Sets an image path for a soft notification
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateBGSoftNotification::SetImagePathL( const TDesC& aImage )
-    {
-    HBufC* txt = aImage.AllocL();
-    delete iImagePath;
-    iImagePath = txt;
-    return;
-    }
-
-// -----------------------------------------------------------------------------
 // CIAUpdateBGSoftNotification::SetNrOfUpdates
 // Sets an image path for a soft notification
 // -----------------------------------------------------------------------------
@@ -280,11 +253,6 @@
         iNotificationDialog->SetTextL(iText->Des());
         }
     
-    if ( iImagePath )
-        {
-        iNotificationDialog->SetIconNameL(iImagePath->Des());
-        }
-    
     // set wrapping, timeout and touch 
     iNotificationDialog->SetTitleTextWrapping(
             CHbDeviceNotificationDialogSymbian::TextWordWrap);
@@ -311,16 +279,6 @@
     return iActivateIndicator;
     
     }
-// ----------------------------------------------------------
-// CIAUpdateBGSoftNotification::SetNrOfUpdates( TIAUpdateBGMode aNrOfUpdates )
-// ----------------------------------------------------------
-/*
-void CIAUpdateBGSoftNotification::SetNrOfUpdates( const int aNrOfUpdates )
-    {
-    
-    iNrOfUpdates = aNrOfUpdates;
-    
-    }*/
 
 // ----------------------------------------------------------
 // CIAUpdateBGSoftNotification::GetNrOfUpdates()
--- a/iaupdate/IAD/bgcindicatorplugin/inc/bgcindicator.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/bgcindicatorplugin/inc/bgcindicator.h	Tue Jul 06 14:23:31 2010 +0300
@@ -11,7 +11,7 @@
  *
  * Contributors:
  *
- * Description: Message Indicator class
+ * Description: Backgroundchecker Indicator class
  *
  */
 
@@ -57,12 +57,8 @@
     
 private: 
     /**
-     * Prepares the display name from stream.
-     * @param dataStream data stream. 
+     * Start the iaupdate client
      */
-    //void prepareDisplayName(QDataStream& dataStream);
-    
-    //HLa
     void StartIaupdateL() const;
     
 private:
--- a/iaupdate/IAD/bgcindicatorplugin/inc/bgcindicatorplugin.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/bgcindicatorplugin/inc/bgcindicatorplugin.h	Tue Jul 06 14:23:31 2010 +0300
@@ -11,7 +11,7 @@
  *
  * Contributors:
  *
- * Description: Message Indicator Plugin Class 
+ * Description: Backgroundchecker Indicator Plugin Class 
  *
  */
 
@@ -26,8 +26,8 @@
 #include <hbindicatorinterface.h>
 
 /**
- * Message indicator plugin class. 
- * Main class of message indicator plugin. 
+ * Backgroundchecker indicator plugin class. 
+ * Main class of backgroundchecker indicator plugin. 
  */
 class BgcIndicatorPlugin : public QObject, public HbIndicatorPluginInterface
 {
--- a/iaupdate/IAD/bgcindicatorplugin/resources/message.svg	Wed Jun 23 18:20:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="tiny" height="40px" version="1.1" viewBox="0 0 30 40" width="30px" x="0px" y="0px">
-<g>
-<path d="M27.458,17.31l-0.81-0.416l0.81-0.418c0.624-0.317,0.62-1.024,0.405-1.392l-0.881-1.512   c-0.251-0.43-0.877-0.683-1.406-0.336l-0.748,0.484l0.051-0.892c0.025-0.453-0.309-1.056-0.998-1.056h-1.764   c-0.57,0-1.031,0.48-0.998,1.056l0.051,0.892l-0.748-0.484c-0.402-0.263-1.08-0.22-1.406,0.336l-0.879,1.512   c-0.219,0.376-0.126,0.735-0.049,0.916H6C4.346,16,3,17.345,3,19v12c0,1.621,1.293,2.944,2.901,2.997v2.695   c0,1.407,1.723,2.251,2.869,1.029l3.063-3.723h11.165C24.654,33.999,26,32.653,26,31V20.706c0.185,0.031,0.699-0.003,0.982-0.487   l0.881-1.516C28.278,17.989,27.701,17.435,27.458,17.31z" fill-opacity="0.2" stroke-opacity="0.2"/>
-<path d="M27,15.588l-0.882-1.512c0,1.023-6.239,1.58-6.239,0L19,15.588l7.118,4.126L27,18.199l-2.536-1.305   L27,15.588z" fill-opacity="0.5" stroke-opacity="0.5"/>
-<path d="M4,26.718V31c0,1.101,0.9,2,2,2h0.901v3.692c0,0.517,0.646,0.86,1.098,0.394L11.362,33H23c1.1,0,2-0.899,2-2   v-4.282c0-0.004-0.001-0.007-0.001-0.011L4,26.718z" fill-opacity="0.5" stroke-opacity="0.5"/>
-<linearGradient gradientTransform="matrix(1 0 0 1 -1530 0)" gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="1544.5" x2="1544.5" y1="13.4609" y2="38.8497">
-<stop offset="0" style="stop-color:#FFE23D"/>
-<stop offset="0.2239" style="stop-color:#FAD337"/>
-<stop offset="0.6537" style="stop-color:#EFAB26"/>
-<stop offset="1" style="stop-color:#E48717"/>
-</linearGradient>
-<path d="M23,16H6c-1.1,0-2,0.9-2,2v12c0,1.101,0.9,2,2,2h0.901v3.692c0,0.438,0.599,0.907,1.098,0.394   L11.362,32H23c1.1,0,2-0.899,2-2V18C25,16.9,24.1,16,23,16z" fill="url(#SVGID_1_)"/>
-<rect fill="#A55B11" height="1" width="10" x="9.5" y="20.5"/>
-<rect fill="#A55B11" height="1" width="10" x="9.5" y="23.5"/>
-<rect fill="#A55B11" height="1" width="6.25" x="9.5" y="26.5"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="14.7773" x2="14.7773" y1="17" y2="32.9845">
-<stop offset="0" style="stop-color:#FFE23D"/>
-<stop offset="0.2239" style="stop-color:#FAD337"/>
-<stop offset="0.6537" style="stop-color:#EFAB26"/>
-<stop offset="1" style="stop-color:#E48717"/>
-</linearGradient>
-<path d="M25,18c0-0.572-0.243-1.089-0.631-1.454l-0.706,0.705C23.869,17.435,24,17.702,24,18   v11.999c0,0.554-0.5,1.002-1,1.002H10.891l-2.989,3.627v-3.627H6c-0.263,0-0.499-0.107-0.678-0.274   c0.009,0.009,0.013,0.021,0.022,0.03l-0.79,0.616C4.92,31.757,5.432,32,6,32h0.901v3.692c0.005,0.61,0.755,0.782,1.098,0.394   L11.362,32H23c1.172,0,2-0.947,2-2V18z" fill="url(#SVGID_2_)" fill-opacity="0.2" stroke-opacity="0.2"/>
-<path d="M7.901,34.628v-3.627l-1,0.999v3.692c0,0.262,0.164,0.494,0.411,0.583L7.901,34.628z" fill="#FFFFFF" fill-opacity="0.2" stroke-opacity="0.2"/>
-<path d="M5.345,30.757c-0.212-0.184-0.347-0.455-0.347-0.758V18c0-0.552,0.449-1.001,1.002-1.001h17   c0.254,0,0.457,0.069,0.663,0.252l0.706-0.705C24.011,16.208,23.528,16,23,16H6c-1.1,0-2,0.9-2,2v12   c0,0.532,0.211,1.017,0.552,1.376L5.345,30.757z" fill="#FFFFFF" fill-opacity="0.4" stroke-opacity="0.4"/>
-<path d="M7.901,31.001H6c-0.263,0-0.499-0.107-0.678-0.274c0.009,0.009,0.013,0.021,0.022,0.03l-0.79,0.616   C4.92,31.757,5.432,32,6,32h0.901L7.901,31.001z" fill-opacity="0.2" stroke-opacity="0.2"/>
-<path d="M25,18c0-0.572-0.243-1.089-0.631-1.454l-0.706,0.705C23.869,17.435,24,17.702,24,18v11.999   c0,0.585-0.562,1.002-1,1.002H10.891l-2.989,3.627l-0.589,1.647c0.067,0.024,0.422,0.105,0.687-0.189L11.362,32H23   c0.984,0,2-0.775,2-2V18z" fill-opacity="0.2" stroke-opacity="0.2"/>
-<path d="M25,16.619L24.25,16h-5.518c0.014,0.009,1.713,0.894,1.713,0.894l-1.675,0.86   c-0.317,0.205-0.271,0.577-0.204,0.694l0.879,1.515c0.352,0.402,0.623,0.224,0.705,0.171l1.574-1.017l-0.105,1.856   c0.021,0.438,0.361,0.527,0.498,0.527h1.764c0.4,0,0.508-0.391,0.498-0.527l-0.104-1.856L25,19.587V16.619z" fill-opacity="0.3" stroke-opacity="0.3"/>
-<polygon fill="#EA2227" points="27,17.199 26.118,18.714 23.722,17.162 23.881,20 22.117,20 22.277,17.162 19.879,18.714    19,17.199 21.537,15.895 19,14.588 19.879,13.076 22.277,14.625 22.117,11.771 23.881,11.771 23.722,14.625 26.118,13.076    27,14.588 24.464,15.895  "/>
-<rect fill="none" height="40" width="30"/>
-</g>
-</svg>
--- a/iaupdate/IAD/bgcindicatorplugin/rom/bgcindicatorplugin.iby	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/bgcindicatorplugin/rom/bgcindicatorplugin.iby	Tue Jul 06 14:23:31 2010 +0300
@@ -20,5 +20,4 @@
 REM DLL
 file=ABI_DIR\UREL\bgcindicatorplugin.dll               SHARED_LIB_DIR\bgcindicatorplugin.dll UNPAGED
 data=\epoc32\data\z\resource\plugins\indicators\bgcindicatorplugin.qtplugin   \resource\plugins\indicators\bgcindicatorplugin.qtplugin
-data=\epoc32\s60\icons\qgn_note_swupdate_notification.svg   \resource\iaupdate\qgn_note_swupdate_notification.svg
 #endif
\ No newline at end of file
--- a/iaupdate/IAD/bgcindicatorplugin/src/bgcindicator.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/bgcindicatorplugin/src/bgcindicator.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -131,9 +131,7 @@
     case DecorationNameRole:
     case MonoDecorationNameRole:
         {
-        // QString iconName("z:/resource/messaging/message.svg");
-        // HbIcon iconName1 ("c:/qgn_note_swupdate_notification.svg");
-        QString iconName("z:/resource/iaupdate/qgn_note_swupdate_notification.svg");
+        QString iconName("");
         return iconName;
         }
     default: 
--- a/iaupdate/IAD/engine/controller/src/iaupdateinstalloperation.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/engine/controller/src/iaupdateinstalloperation.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -205,8 +205,10 @@
         {
         // Install interface was available.
         // So, start installing with silent install operation.
-        SwiUI::TInstallOptions options(
-            IAUpdateUtils::SilentInstallOptionsL( Node() ) );
+        // Get silent install parameters 
+        Usif::COpaqueNamedParams * options = Usif::COpaqueNamedParams::NewLC();
+
+        IAUpdateUtils::UsifSilentInstallOptionsL ( options );
         
         operation = install->SilentInstallL( *this, options );
 
@@ -216,7 +218,7 @@
             IAUPDATE_TRACE("[IAUPDATE] ERROR Could not create the operation.");
             User::Leave( KErrGeneral );
             }
-        
+        CleanupStack::Pop( options );
         CleanupStack::PopAndDestroy( install );
         }
     else
--- a/iaupdate/IAD/engine/controller/src/iaupdateloader.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/engine/controller/src/iaupdateloader.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -504,18 +504,20 @@
         IAUPDATE_TRACE_1("[IAUPDATE] Container child: %d", i);
 
         MNcdNode* node( aParentContainer.ChildL( i ) );
-        CleanupReleasePushL( *node );
-
-        MNcdNodeContainer* container(
-            node->QueryInterfaceLC< MNcdNodeContainer >() );
-        if ( container )
+        if ( node )
             {
-            IAUPDATE_TRACE("[IAUPDATE] Container child had container interface");
-            LoadContainerL( *container );
-            CleanupStack::PopAndDestroy( container );                
+            CleanupReleasePushL( *node );
+
+            MNcdNodeContainer* container(
+            node->QueryInterfaceLC< MNcdNodeContainer >() );
+            if ( container )
+                {
+                IAUPDATE_TRACE("[IAUPDATE] Container child had container interface");
+                LoadContainerL( *container );
+                CleanupStack::PopAndDestroy( container );                
+                }
+            CleanupStack::PopAndDestroy( node );
             }
-
-        CleanupStack::PopAndDestroy( node );
         }
 
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLoader::LoadChildContainersL() end");
@@ -636,55 +638,55 @@
     for ( TInt i = 0; i < childCount; ++i )
         {
         MNcdNode* node( aContainer.ChildL( i ) );
-        CleanupReleasePushL( *node );
+        if ( node )
+            {
+            CleanupReleasePushL( *node );
 
-        MNcdNodeContainer* container( 
-            node->QueryInterfaceLC< MNcdNodeContainer >() );
-        if ( container )
-            {
-            IAUPDATE_TRACE_1("[IAUPDATE] Container child: %d had container interface", i);
-
-            switch ( aPreviousOperationType )
+            MNcdNodeContainer* container( 
+               node->QueryInterfaceLC< MNcdNodeContainer >() );
+            if ( container )
                 {
-                case TIAUpdateOperationInfo::ELoadRoot:
-                    IAUPDATE_TRACE("[IAUPDATE] Load children of the root child");
-                    // When root is loaded, also its children are loaded
-                    // and they have now their child count. So, no need to
-                    // reload children of the root. Load their children
-                    // directly now.
-                    LoadChildrenL( *container );
-                    break;
-                    
-                case TIAUpdateOperationInfo::ELoadChildren:
-                    IAUPDATE_TRACE("[IAUPDATE] Load children of a container");
-                    // Notice, that now we need to first load the child count
-                    // for the child containers. So, even if children were 
-                    // already updated by LoadChildrenL, a new request for
-                    // containers needs . Otherwise, the child count 
-                    // will not be up-to-date. When the child containers are 
-                    // loaded, the flow will continue to load the children.
-                    LoadContainerL( *container );
-                    break;
+                IAUPDATE_TRACE_1("[IAUPDATE] Container child: %d had container interface", i);
+                switch ( aPreviousOperationType )
+                    {
+                    case TIAUpdateOperationInfo::ELoadRoot:
+                        IAUPDATE_TRACE("[IAUPDATE] Load children of the root child");
+                        // When root is loaded, also its children are loaded
+                        // and they have now their child count. So, no need to
+                        // reload children of the root. Load their children
+                        // directly now.
+                        LoadChildrenL( *container );
+                        break;
+                            
+                    case TIAUpdateOperationInfo::ELoadChildren:
+                        IAUPDATE_TRACE("[IAUPDATE] Load children of a container");
+                        // Notice, that now we need to first load the child count
+                        // for the child containers. So, even if children were 
+                        // already updated by LoadChildrenL, a new request for
+                        // containers needs . Otherwise, the child count 
+                        // will not be up-to-date. When the child containers are 
+                        // loaded, the flow will continue to load the children.
+                        LoadContainerL( *container );
+                        break;
 
-                case TIAUpdateOperationInfo::ELoadAllChildren:
-                    IAUPDATE_TRACE("[IAUPDATE] Load all children of a container");
-                    // Notice, here we will try to skip the loading of the child
-                    // count of the container. So, all the children are tried to
-                    // be loaded directly even if the child count may not be
-                    // up-to-date.
-                    LoadAllChildrenL( *container );
-                    break;
-                    
-                default:
-                    IAUPDATE_TRACE("[IAUPDATE] ERROR: Wrong operation type");
-                    User::Leave( KErrArgument );
-                    break;
+                    case TIAUpdateOperationInfo::ELoadAllChildren:
+                        IAUPDATE_TRACE("[IAUPDATE] Load all children of a container");
+                        // Notice, here we will try to skip the loading of the child
+                        // count of the container. So, all the children are tried to
+                        // be loaded directly even if the child count may not be
+                        // up-to-date.
+                        LoadAllChildrenL( *container );
+                        break;
+                            
+                    default:
+                        IAUPDATE_TRACE("[IAUPDATE] ERROR: Wrong operation type");
+                        User::Leave( KErrArgument );
+                        break;
+                    }
+                CleanupStack::PopAndDestroy( container );                
                 }
-
-            CleanupStack::PopAndDestroy( container );                
+            CleanupStack::PopAndDestroy( node );
             }
-
-        CleanupStack::PopAndDestroy( node );
         }
 
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateLoader::LoadChildrenOfChildrenL() end");
--- a/iaupdate/IAD/engine/controller/src/iaupdateutils.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/engine/controller/src/iaupdateutils.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -509,124 +509,55 @@
 // 
 // ---------------------------------------------------------------------------
 
-EXPORT_C void  IAUpdateUtils::UsifSilentInstallOptionsL( 
+void  IAUpdateUtils::UsifSilentInstallOptionsL( 
         Usif::COpaqueNamedParams * aOptions )
     {
 
     aOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue );
 
     // Upgrades are allowed 
-    aOptions->AddIntL( Usif::KSifInParam_AllowUpgrade, ETrue );
+    aOptions->AddIntL( Usif::KSifInParam_AllowUpgrade, Usif::EAllowed );
     
     // Install all if optional packets exist.
-    aOptions->AddIntL( Usif::KSifInParam_InstallOptionalItems, ETrue );
+    aOptions->AddIntL( Usif::KSifInParam_InstallOptionalItems, Usif::EAllowed );
     
     // Prevent online cert revocation check.
-    aOptions->AddIntL( Usif::KSifInParam_PerformOCSP, EFalse );
+    aOptions->AddIntL( Usif::KSifInParam_PerformOCSP, Usif::ENotAllowed );
     
     // See iOCSP setting above
-    aOptions->AddIntL( Usif::KSifInParam_IgnoreOCSPWarnings, ETrue );
+    aOptions->AddIntL( Usif::KSifInParam_IgnoreOCSPWarnings, Usif::EAllowed );
     
     // Do not allow installation of uncertified packages.
-    aOptions->AddIntL( Usif::KSifInParam_AllowUntrusted, EFalse );
+    aOptions->AddIntL( Usif::KSifInParam_AllowUntrusted, Usif::ENotAllowed );
     
     // If filetexts are included in SIS package, show them.
-    aOptions->AddIntL( Usif::KSifInParam_PackageInfo, ETrue );
+    aOptions->AddIntL( Usif::KSifInParam_PackageInfo, Usif::EAllowed );
     
     // Automatically grant user capabilities.
     // See also KSifInParam_AllowUntrusted above.
-    aOptions->AddIntL( Usif::KSifInParam_GrantCapabilities, EFalse );
+    aOptions->AddIntL( Usif::KSifInParam_GrantCapabilities, Usif::EAllowed );
     
     // Open application will be closed.
-    aOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, ETrue );
+    aOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, Usif::EAllowed );
     
     // Files can be overwritten.
-    aOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, ETrue );
+    aOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, Usif::EAllowed  );
+    
+    // Incompatible allowed
+    aOptions->AddIntL( Usif::KSifInParam_AllowIncompatible, Usif::EAllowed  );
     
     // This only affects Java applications.
-    aOptions->AddIntL( Usif::KSifInParam_AllowDownload, ETrue );
+    aOptions->AddIntL( Usif::KSifInParam_AllowDownload, Usif::EAllowed  );
     
     // Where to save.
-    aOptions->AddIntL( Usif::KSifInParam_Drive, EDriveC );
+    //aOptions->AddIntL( Usif::KSifInParam_Drive, EDriveC );
     
     // Choose the phone language.
     TLanguage lang = User::Language();
-    // aOptions->AddIntL( Usif::KSifInParam_Languages, lang ); // User::Language() );
+    //aOptions->AddIntL( Usif::KSifInParam_Languages, lang ); // User::Language() );
     
     //aOptions->AddIntL( Usif::KSifInParam_Drive, IAUpdateUtils::DriveToInstallL( aUid, aSize ) );
     }
-// ---------------------------------------------------------------------------
-// IAUpdateUtils::SilentInstallOptionsL
-// 
-// ---------------------------------------------------------------------------
-//
-SwiUI::TInstallOptions IAUpdateUtils::SilentInstallOptionsL(
-    const CIAUpdateBaseNode& aNode )
-    {
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateUtils::SilentInstallOptionsL() begin");
-    SwiUI::TInstallOptions options;
-
-    // Upgrades are allowed        
-    options.iUpgrade = SwiUI::EPolicyAllowed;
-
-    // Install all if optional packets exist.
-    options.iOptionalItems = SwiUI::EPolicyAllowed;
-
-    // Prevent online cert revocation check.
-    options.iOCSP = SwiUI::EPolicyNotAllowed;
-    
-    // See iOCSP setting above
-    options.iIgnoreOCSPWarnings = SwiUI::EPolicyAllowed;
-
-    // Do not allow installation of uncertified packages.
-    options.iUntrusted = SwiUI::EPolicyNotAllowed;
-
-    // If filetexts are included in SIS package. Then, show them.
-    options.iPackageInfo = SwiUI::EPolicyUserConfirm;
-    
-    // Automatically grant user capabilities.
-    // See also iUntrusted above.
-    options.iCapabilities = SwiUI::EPolicyAllowed;
-
-    // Open application will be closed.
-    options.iKillApp = SwiUI::EPolicyAllowed;
-    
-    // Files can be overwritten.
-    options.iOverwrite = SwiUI::EPolicyAllowed;
-    
-    // This only affects Java applications.
-    options.iDownload = SwiUI::EPolicyAllowed;
-    
-    // Where to save.
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateUtils::SilentInstallOptionsL() before DriveToInstallL");
-    TDriveUnit driveUnit;
-    if ( aNode.Mime().Compare( IAUpdateProtocolConsts::KMimeWidget ) == 0 )
-        {
-        driveUnit = IAUpdateUtils::DriveToInstallWidgetL( aNode.Identifier() );
-        }
-    else
-        {
-        driveUnit = IAUpdateUtils::DriveToInstallL( aNode.Uid(), aNode.OwnContentSizeL() );
-        }
-     IAUPDATE_TRACE("[IAUPDATE] IAUpdateUtils::SilentInstallOptionsL() after DriveToInstallL");
-    
-    TDriveName driveName = driveUnit.Name();
-    IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateUtils::SilentInstallOptionsL() driveName: %S", &driveName );
-    options.iDrive = driveName[0];
-    
-    // Choose the phone language.
-    options.iLang = User::Language();
-    
-    // If language is asked, then use the current phone language.
-    options.iUsePhoneLang = ETrue;
-    
-    // Does not affect SISX. This is for Java.
-    options.iUpgradeData = SwiUI::EPolicyAllowed;
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateUtils::SilentInstallOptionsL() end");
-    return options;
-    }
-
-
 // -----------------------------------------------------------------------------
 // IAUpdateUtils::InstalledDriveL
 // 
--- a/iaupdate/IAD/engine/group/iaupdateengine.mmp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/engine/group/iaupdateengine.mmp	Tue Jul 06 14:23:31 2010 +0300
@@ -114,7 +114,7 @@
 LIBRARY         platformenv.lib
 LIBRARY         platformver.lib     // System version info
 LIBRARY         etel3rdparty.lib
-LIBRARY         swinstcli.lib
+//LIBRARY         swinstcli.lib
 LIBRARY         apmime.lib
 LIBRARY         ecom.lib            // For the NCD Engine ECOM session closing.
 LIBRARY         sysversioninfo.lib
--- a/iaupdate/IAD/engine/inc/iaupdateutils.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/engine/inc/iaupdateutils.h	Tue Jul 06 14:23:31 2010 +0300
@@ -135,7 +135,7 @@
  * 
  * @param aOptions  Silent install options
  */
-IMPORT_C void  UsifSilentInstallOptionsL( Usif::COpaqueNamedParams * aOptions );
+void  UsifSilentInstallOptionsL( Usif::COpaqueNamedParams * aOptions );
 
 /**
  * Finds drive where a package is currently installed
--- a/iaupdate/IAD/firmwareupdate/inc/iaupdatefwfotamodel.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwfotamodel.h	Tue Jul 06 14:23:31 2010 +0300
@@ -23,6 +23,7 @@
 
 //  INCLUDES
 #include <fotaengine.h>
+#include <badesca.h>
 
 // FORWARD DECLARATIONS
 
@@ -51,16 +52,6 @@
     public: // New functions
         
         /**
-        * Retrieves the human readable name of the profile.
-        * @since Series 60 3.1
-        * @param aProfileId Profile identifier
-        * @param aProfileId Human readable name of the profile, or KNullDesC if not found.
-        * @return None
-        */
-        void GetProfileNameL( const TInt aProfileId,
-                                    HBufC* aProfileName ) const;
-
-        /**
         * Retrieves the default fota profile identifier from
         * the central repository.
         * @since Series 60 3.1
--- a/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsynchandler.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsynchandler.h	Tue Jul 06 14:23:31 2010 +0300
@@ -23,7 +23,7 @@
 // INCLUDES
 #include <e32base.h>
 #include <SyncMLObservers.h>
-#include <cmmanagerext.h>
+#include <cmmanager.h>
 
 #include "iaupdatefwsyncutil.h"
 #include "iaupdatefwsyncprofile.h"
@@ -272,8 +272,8 @@
     private:
         
         TUint32 SelectConnectionMethodL();
-        TUint32 GetBestIAPInInternetSNAPL( RCmManagerExt& aCmManagerExt  );
-        TUint32 GetBestIAPInThisSNAPL( RCmManagerExt& aCmManagerExt, TUint32 aSNAPID  );
+        TUint32 GetBestIAPInInternetSNAPL( RCmManager& aCmManager );
+        TUint32 GetBestIAPInThisSNAPL( RCmManager& aCmManager, TUint32 aSNAPID  );
 
     private:
 		// session with sync server
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -57,37 +57,6 @@
 
 
 // -----------------------------------------------------------------------------
-// CIAUpdateFWFotaModel::GetProfileName
-// Changes aProfileName to KNullDesC if the profile identifier is
-// not found.
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFWFotaModel::GetProfileNameL( const TInt   aProfileId,
-                                              HBufC* aProfileName ) const
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::GetProfileNameL() - not implemented" );
-
-/*KNST
-    TInt index( 0 );
-    aProfileName->Des().Copy( KNullDesC );
-    
-    iDocument->RefreshProfileListL( ETrue ); // Include hidden profile
-    CArrayFixFlat<TNSmlDMProfileItem>* profileList = iDocument->ProfileList( index );
-    
-    for ( index = 0; index < profileList->Count(); index++ )
-        {
-        if ( ( *profileList )[index].iProfileId == aProfileId )
-            {
-            aProfileName->Des().Copy( ( *profileList )[index].iProfileName );
-            }
-        }
-*/
-    FTRACE( FPrint( _L(
-        "[IAUPDATEFW] CIAUpdateFWFotaModel::GetProfileNameL(): aProfileId = %d, ProfileName = \"%S\"" ),
-         aProfileId, aProfileName ) );
-    }
-
-// -----------------------------------------------------------------------------
 // CIAUpdateFWFotaModel::DefaultFotaProfileIdL
 // -----------------------------------------------------------------------------
 //
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwsynchandler.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwsynchandler.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -28,13 +28,15 @@
 #include <rconnmon.h>
 #include <es_enum.h>
 
-#include <cmconnectionmethodext.h>
+#include <cmconnectionmethod.h>
 #include <cmconnectionmethoddef.h>
 #include <cmpluginpacketdatadef.h>
 
-#include <cmdestinationext.h>
+#include <cmdestination.h>
 #include <cmmanagerdef.h>
 
+#include <uikon.hrh>
+
 #include "iaupdateconnectionmethod.h"
 #include "iaupdateprivatecrkeys.h"
 #include "iaupdatefwfotamodel.h"
@@ -424,16 +426,16 @@
     CleanupStack::PopAndDestroy( cenrep ); 
     cenrep = NULL;
 
-    RCmManagerExt cmManagerExt;
-    cmManagerExt.OpenL();
-    CleanupClosePushL( cmManagerExt );
+    RCmManager cmManager;
+    cmManager.OpenL();
+    CleanupClosePushL( cmManager );
     
     if ( connMethodId == -1 )
         {
         //check what is the default connection by users     
         
         TCmDefConnValue DCSetting;
-        cmManagerExt.ReadDefConnL( DCSetting );
+        cmManager.ReadDefConnL( DCSetting );
        
         
         switch ( DCSetting.iType )
@@ -442,13 +444,13 @@
             case ECmDefConnAskOnce:
                 {
                 //go with the best IAP under internet snap
-                connectionMethodId = GetBestIAPInInternetSNAPL( cmManagerExt );
+                connectionMethodId = GetBestIAPInInternetSNAPL( cmManager );
                 break;
                 }
             case ECmDefConnDestination:
                 {
                 //go with the best IAP under this snap
-                connectionMethodId = GetBestIAPInThisSNAPL( cmManagerExt, DCSetting.iId );
+                connectionMethodId = GetBestIAPInThisSNAPL( cmManager, DCSetting.iId );
                 break;
                 }
             case ECmDefConnConnectionMethod:
@@ -462,16 +464,16 @@
     else if ( connMethodId == 0 )
         {
         //no choice from user, we go with the best IAP under Internent SNAP
-        connectionMethodId = GetBestIAPInInternetSNAPL( cmManagerExt );
+        connectionMethodId = GetBestIAPInInternetSNAPL( cmManager );
         }
     else
         {
 
         // It was some SNAP value
-        connectionMethodId = GetBestIAPInThisSNAPL( cmManagerExt, connMethodId );
+        connectionMethodId = GetBestIAPInThisSNAPL( cmManager, connMethodId );
         }
 
-    CleanupStack::PopAndDestroy( &cmManagerExt ); 
+    CleanupStack::PopAndDestroy( &cmManager ); 
     
     return connectionMethodId;
               
@@ -482,15 +484,15 @@
 // CIAUpdateFWSyncHandler::GetBestIAPInInternetSNAPL
 // -----------------------------------------------------------------------------
 //
-TUint32 CIAUpdateFWSyncHandler::GetBestIAPInInternetSNAPL( RCmManagerExt& aCmManagerExt  )
+TUint32 CIAUpdateFWSyncHandler::GetBestIAPInInternetSNAPL( RCmManager& aCmManager )
     {
     //select IAP from Internet SNAP
     RArray<TUint32> destIdArray;
-    aCmManagerExt.AllDestinationsL( destIdArray );
+    aCmManager.AllDestinationsL( destIdArray );
     TUint32 InternetSNAPID = 0;
     for ( TInt i = 0; i< destIdArray.Count(); i++ )
         {
-        RCmDestinationExt dest = aCmManagerExt.DestinationL( destIdArray[i] );
+        RCmDestination dest = aCmManager.DestinationL( destIdArray[i] );
         CleanupClosePushL( dest );
                                      
         if ( dest.MetadataL( CMManager::ESnapMetadataInternet ) )
@@ -503,7 +505,7 @@
          }
     destIdArray.Reset();
     
-    return GetBestIAPInThisSNAPL( aCmManagerExt, InternetSNAPID );
+    return GetBestIAPInThisSNAPL( aCmManager, InternetSNAPID );
     }
 
 
@@ -512,7 +514,7 @@
 // CIAUpdateFWSyncHandler::GetBestIAPInThisSNAPL
 // -----------------------------------------------------------------------------
 //
-TUint32 CIAUpdateFWSyncHandler::GetBestIAPInThisSNAPL( RCmManagerExt& aCmManagerExt, TUint32 aSNAPID  )
+TUint32 CIAUpdateFWSyncHandler::GetBestIAPInThisSNAPL( RCmManager& aCmManager, TUint32 aSNAPID  )
     {
     //get all usable IAPs
     TConnMonIapInfoBuf iapInfo;
@@ -528,13 +530,13 @@
     
     CleanupStack::PopAndDestroy( &connMon ); 
     
-    RCmDestinationExt dest = aCmManagerExt.DestinationL( aSNAPID );
+    RCmDestination dest = aCmManager.DestinationL( aSNAPID );
     CleanupClosePushL( dest );
     
     // Check whether the SNAP contains any IAP.
     for  (TInt i = 0; i < dest.ConnectionMethodCount(); i++ )
         {
-        RCmConnectionMethodExt cm =  dest.ConnectionMethodL( i );
+        RCmConnectionMethod cm =  dest.ConnectionMethodL( i );
         CleanupClosePushL( cm );
         
         TUint32 iapid= cm.GetIntAttributeL( CMManager::ECmIapId );
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -136,24 +136,7 @@
         {
         case ENSU:
             {          
-            /*HBufC* text1 = StringLoader::LoadLC( R_IAUPDATE_INFO_NSU_1 );  
-            HBufC* text2 = StringLoader::LoadLC( R_IAUPDATE_INFO_NSU_2 );
-            
-            HBufC* text = HBufC::NewLC( text1->Length() +
-                                        text2->Length() );
-                
-            text->Des() += *text1;
-            text->Des() += *text2;
-
-            HBufC* heading = StringLoader::LoadLC( R_IAUPDATE_NEW_SW_TITLE );
-     
-            ShowDialogL( *text, *heading );
-            
-            CleanupStack::PopAndDestroy( heading ); //text, heading
-            CleanupStack::PopAndDestroy( text );
-            CleanupStack::PopAndDestroy( text2 );
-            CleanupStack::PopAndDestroy( text1 );*/
-          
+                      
             break;
             }
         case EFOTA:
@@ -172,7 +155,7 @@
                 if ( ( fotamodelstate != RFotaEngineSession::EDownloadComplete ) && ( fotamodelstate != RFotaEngineSession::EStartingUpdate ) )
                     {
 		                //if download is suspended, try to resume it.
-		                if ( fotamodelstate == RFotaEngineSession::EDownloadProgressingWithResume)
+		                if ( fotamodelstate == RFotaEngineSession::EDownloadProgressing)
 		                    {
 		                    TInt result = iFotaModel->TryResumeFwUpdDownload();
 						            FLOG_NUM( "[IAUPDATEFW] TryResumeFwUpdDownload result  = %d", result );   
@@ -229,14 +212,7 @@
 //
 void CIAUpdateFWUpdateHandler::ShowDialogL(TDesC& /*aText*/, TDesC& /*aHeading*/ )
     {  
-    //CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( aText );
-
-    //dlg->PrepareLC( R_IAUPDATE_MESSAGE_QUERY );
-
-    //CAknPopupHeadingPane* headingPane = dlg->Heading();
-    //headingPane->SetTextL( aHeading );
-	    
-    //TInt ret = dlg->RunLD();
+    
     }
         
 
--- a/iaupdate/IAD/ui/iaupdate.pro	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/iaupdate.pro	Tue Jul 06 14:23:31 2010 +0300
@@ -49,7 +49,6 @@
     iaupdateagreement.cpp \
     iaupdateautomaticcheck.cpp \
     iaupdatedeputils.cpp \ 
-    iaupdatefirsttimedatefile.cpp \
     iaupdatefirsttimeinfo.cpp \
     iaupdategloballockhandler.cpp \
     iaupdateinstallationlistener.cpp \
@@ -82,7 +81,6 @@
     iaupdateautomaticcheck.h \
     iaupdatedeputils.h \
     iaupdatefileconsts.h \
-    iaupdatefirsttimedatefile.h \
     iaupdatefirsttimeinfo.h \
     iaupdategloballockhandler.h \
     iaupdateinstallationlistener.h \
--- a/iaupdate/IAD/ui/iaupdate_mainview.docml	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/iaupdate_mainview.docml	Tue Jul 06 14:23:31 2010 +0300
@@ -15,8 +15,8 @@
                 <sizehint height="16.41791091514448un" type="PREFERRED" width="38.80597125397785un"/>
             </widget>
             <zvalue value="0.0"/>
-            <layout type="grid">
-                <griditem column="0" itemname="listWidget" row="0"/>
+            <layout orientation="Vertical" type="linear">
+                 <linearitem itemname="listWidget"/>
             </layout>
         </widget>
         <widget name="viewMenu" role="HbView:menu" type="HbMenu">
--- a/iaupdate/IAD/ui/inc/iaupdatedeputils.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdatedeputils.h	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -25,7 +25,6 @@
 
 // FORWARD DECLARATIONS
 class MIAUpdateNode;
-class MIAUpdateAnyNode;
 
 // CLASS DECLARATION
 /**
@@ -43,7 +42,7 @@
     * @param aDependencyNodes List of dependencies (to be marked). 
     */ 
     static void GetDependenciesL( const MIAUpdateNode& aNode, 
-                                  const RPointerArray<MIAUpdateAnyNode>& aAllNodes, 
+                                  const RPointerArray<MIAUpdateNode>& aAllNodes, 
                                   RPointerArray<MIAUpdateNode>& aDependencyNodes );
      
     /**
@@ -54,7 +53,7 @@
     * @param aDependencyNodes List of dependendants (to be unmarked). 
     */
     static void GetDependantsL( const MIAUpdateNode& aNode, 
-                                const RPointerArray<MIAUpdateAnyNode>& aAllNodes, 
+                                const RPointerArray<MIAUpdateNode>& aAllNodes, 
                                 RPointerArray<MIAUpdateNode>& aDependantNodes );
     
     };
--- a/iaupdate/IAD/ui/inc/iaupdateengine.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdateengine.h	Tue Jul 06 14:23:31 2010 +0300
@@ -34,7 +34,7 @@
 class MIAUpdateNode;
 class MIAUpdateFwNode;
 class CEikonEnv;
-class RCmManagerExt;
+class RCmManager;
 class CIdle;
 class HbAction;
 class IAUpdateResultsDialog;
@@ -206,24 +206,24 @@
      /**
      * Choose a usable IAP from all SNAPs
      *
-     * @param aCmManagerExt handle of connection manager
+     * @param aCmManager handle of connection manager
      */  
-    uint GetBestIAPInAllSNAPsL( RCmManagerExt& aCmManagerExt  );
+    uint GetBestIAPInAllSNAPsL( RCmManager& aCmManager );
         
      /**
      * Choose a usable IAP from Internet SNAP
      *
-     * @param aCmManagerExt handle of connection manager
+     * @param aCmManager handle of connection manager
      */
-    uint GetBestIAPInInternetSNAPL( RCmManagerExt& aCmManagerExt  );
+    uint GetBestIAPInInternetSNAPL( RCmManager& aCmManager );
 
      /**
      * Choose the best IAP under the given SNAP
      *
-     * @param aCmManagerExt handle of connection manager
+     * @param aCmManager handle of connection manager
      * @param aSNAP SNAP ID
      */  
-     uint GetBestIAPInThisSNAPL( RCmManagerExt& aCmManagerExt, uint aSNAP = 0);
+     uint GetBestIAPInThisSNAPL( RCmManager& aCmManager, uint aSNAP = 0);
      
      /**
      * Shows update query dialog (now/later) 
--- a/iaupdate/IAD/ui/inc/iaupdatefirsttimedatefile.h	Wed Jun 23 18:20:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   Header file of CIAUpdateFirstTimeDateFile class
-*
-*/
-
-
-
-
-
-
-#ifndef IA_UPDATE_FIRSTTIMEDATE_FILE_H
-#define IA_UPDATE_FIRSTTIMEDATE_FILE_H
-
-#include <e32std.h>
-#include <s32strm.h>
-#include <e32cmn.h>
-#include <f32file.h>
-#include <e32const.h>
-
-
-/**
- *
- */
-class CIAUpdateFirstTimeDateFile : public CBase
-    {
-
-public:
-
-    static CIAUpdateFirstTimeDateFile* NewL( const TDesC& aFile );
-
-    static CIAUpdateFirstTimeDateFile* NewLC( const TDesC& aFile );
-    
-    
-    ~CIAUpdateFirstTimeDateFile();
-
-
-    TBool ReadDataL();
-
-    void WriteDataL();
-    
-    const TTime& FirstTime() const;
-    
-    void SetCurrentFirstTime();
-     
-
-private:
-
-    // Prevent these if not implemented
-    CIAUpdateFirstTimeDateFile( const CIAUpdateFirstTimeDateFile& aObject );
-    CIAUpdateFirstTimeDateFile& operator =( const CIAUpdateFirstTimeDateFile& aObject );
-
-
-    CIAUpdateFirstTimeDateFile();
-    
-    virtual void ConstructL( const TDesC& aFile );
-
-
-    void InternalizeL( RReadStream& aStream );
-
-    void ExternalizeL( RWriteStream& aStream );
-
-
-private: // data
-
-	// file server session
-	RFs iFsSession;
-	
-	// file path
-	TFileName iPath;
-
-
-    // Time when IAD started first time
-    TTime iFirstTime;
-
-    };
-		
-#endif // IA_UPDATE_FIRSTTIMEDATE_FILE_H
-
--- a/iaupdate/IAD/ui/inc/iaupdatefirsttimeinfo.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdatefirsttimeinfo.h	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -62,22 +62,12 @@
     * Set Nokia agreement as accepted by an user
     */
     void SetAgreementAcceptedL();
-    
-    /**
-    * Set Nokia agreement as asked (prompted) to an user
-    */
-    void SetAgreementAskedL();
-        
+          
     /**
     * Set automatic update checks as asked (prompted) to an user
     */
     void SetAutomaticUpdatesAskedL();
-    
-    /**
-    * Time stamp of first check updates form application is stored
-    */
-    void SetFirstTimeIfNotSetL();
-    
+            
     /**
     * Is Nokia agreement of Application Update accepted by an user
     *
@@ -86,27 +76,13 @@
     TBool AgreementAcceptedL();
     
     /**
-    * Is Nokia agreement of Application Update already asked 
-    *
-    * @return True value if agreement already asked 
-    */
-    TBool AgreementAskedL();
-    
-    /**
     * Is activation for automatic update cheks from network already asked 
     *
     * @return True value if agreement already asked 
     */
     TBool AutomaticUpdateChecksAskedL();  
         
-    /**
-    * There is a delay (eg. 2 weeks) after first check updates request from an application
-    * when update check is not performed. This method checks is update check delayed. 
-    *
-    * @return True value if agreement accepted 
-    */
-    TBool FirstTimeDelayL();
-
+ 
 private:
 
     /**
@@ -135,8 +111,6 @@
 	
 	TBool iAgreementAccepted;
 	
-	TBool iAgreementAsked;
-	
 	TBool iAutomaticUpdateChecksAsked;   
    
     };
--- a/iaupdate/IAD/ui/inc/iaupdatemainview.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdatemainview.h	Tue Jul 06 14:23:31 2010 +0300
@@ -30,6 +30,8 @@
 class HbListWidget;
 class HbAction;
 class HbAbstractViewItem;
+class HbGroupBox;
+class HbDataForm;
 class IAUpdateEngine;
 class IAUpdateDialogUtil;
 class TIAUpdateVersion;
@@ -56,27 +58,38 @@
  
     void handleDisclaimer();
     
-    void handleDetails( HbAbstractViewItem *, const QPointF & );
+    void handleDetails(HbAbstractViewItem *, const QPointF &);
+    
+    void handleFotaDetails(HbAbstractViewItem *, const QPointF &); 
     
     void handleSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
     
+    void handleFwSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
+    
     void dialogFinished(HbAction* action);
     
 private:
     
-    void getSelectedNodes(RPointerArray<MIAUpdateAnyNode> &selectedNodes) const;
+    bool fotaSelected() const;
     void markListItem(bool mark, int index);
-    bool getMandatoryNodes(RPointerArray<MIAUpdateAnyNode> &mandNodes) const;
+    void markFotaItem(bool mark);
+    bool getMandatoryNodes(RPointerArray<MIAUpdateNode> &mandNodes) const;
     void showUpdateCannotOmitDialog(); 
     void showDependenciesFoundDialog(QString &text);
     void updateSelectionsToNodeArray(MIAUpdateNode &node, bool mark);
     void updateSelectionsToList();
-    MIAUpdateAnyNode* getNode(int index) const;
+    MIAUpdateNode* getApplicationNode(int index) const;
     void showDetails(MIAUpdateAnyNode& node);
     void constructDetailsText(MIAUpdateAnyNode &node, QString &text);
     void versionText(const TIAUpdateVersion &version, QString &versionText);
     void fileSizeText(int fileSize, QString &text);
     void setImportance(MIAUpdateAnyNode *node, QString &importanceDescription);
+    void removeCurrentContentLayout();
+    void refreshFirmwareUpdates(const RPointerArray<MIAUpdateFwNode> &fwNodes);
+    void refreshFotaUpdate(MIAUpdateFwNode& fwNode);
+    void refreshNsuUpdate();
+    void refreshApplicationUpdates(const RPointerArray<MIAUpdateNode> &nodes);
+    void updateSelectionInfoInDock();
     
 private:
     enum DialogState
@@ -89,13 +102,21 @@
      
     IAUpdateEngine *mEngine;
     IAUpdateDialogUtil *mDialogUtil;
+    HbWidget *mContent;
     HbListWidget *mListView;
-    RPointerArray<MIAUpdateAnyNode> mAllNodes;
+    HbListWidget *mFwListView;
+    HbGroupBox *mApplicationUpdatesGroupBox;
+    HbGroupBox *mFwNSUGroupBox;
+    HbDataForm *mContentDataForm;
+    HbGroupBox *mSelections;
+    RPointerArray<MIAUpdateNode> mNodes;
+    RPointerArray<MIAUpdateFwNode> mFwNodes;
     DialogState mDialogState; 
     HbAction *mPrimaryAction;
     MIAUpdateNode *mNode; 
     bool mMark;
     bool mSelectionUpdate;
+    bool mSelectionConnect;
 
 };
 
--- a/iaupdate/IAD/ui/src/iaupdateapplication.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateapplication.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -43,5 +43,6 @@
     }
 
 IAUpdateApplication::~IAUpdateApplication()
-    {
-    }
+{
+    delete mEngine;    
+}
--- a/iaupdate/IAD/ui/src/iaupdatedeputils.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatedeputils.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -21,7 +21,6 @@
 // INCLUDES
 #include "iaupdatedeputils.h"
 #include "iaupdatebasenode.h"
-#include "iaupdateanynode.h"
 #include "iaupdatenode.h"
 
 
@@ -31,7 +30,7 @@
 // ---------------------------------------------------------------------------
 //
 void IAUpdateDepUtils::GetDependenciesL( const MIAUpdateNode& aNode,
-                                         const RPointerArray<MIAUpdateAnyNode>& aAllNodes,  
+                                         const RPointerArray<MIAUpdateNode>& aAllNodes,  
                                          RPointerArray<MIAUpdateNode>& aDependencyNodes ) 
     {
     RPointerArray<MIAUpdateNode> dependencies;
@@ -81,7 +80,7 @@
 // ---------------------------------------------------------------------------
 //    
 void IAUpdateDepUtils::GetDependantsL( const MIAUpdateNode& aNode, 
-                                       const RPointerArray<MIAUpdateAnyNode>& aAllNodes,  
+                                       const RPointerArray<MIAUpdateNode>& aAllNodes,  
                                        RPointerArray<MIAUpdateNode>& aDependantNodes ) 
     {
     RPointerArray<MIAUpdateNode> dependants;
--- a/iaupdate/IAD/ui/src/iaupdateengine.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateengine.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1,28 +1,28 @@
 /*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This module contains the implementation of IAUpdateEngine
-*                class member functions.
-*
-*/
+ * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:   This module contains the implementation of IAUpdateEngine
+ *                class member functions.
+ *
+ */
 
 #include <qapplication.h>
 #include <hbmessagebox.h>
 #include <hbaction.h>
 #include <eikenv.h>
 #include <centralrepository.h>
-#include <cmmanagerext.h>
-#include <cmdestinationext.h>
+#include <cmmanager.h>
+#include <cmdestination.h>
 #include <rconnmon.h>
 #include <apgwgnam.h>
 #include <starterclient.h>
@@ -43,10 +43,9 @@
 #include "iaupdateresultsdialog.h"
 #include "iaupdatedebug.h"
 
-
-IAUpdateEngine::IAUpdateEngine(QObject *parent)
-     : QObject(parent)
-{
+IAUpdateEngine::IAUpdateEngine(QObject *parent) :
+    QObject(parent)
+    {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::IAUpdateEngine() begin");
     iController = NULL;
     iFwUpdateHandler = NULL;
@@ -64,17 +63,17 @@
     mDialogState = NoDialog;
     mResultsDialog = NULL;
     mServiceProvider = NULL;
-    mServiceProvider = new IAUpdateServiceProvider( *this );
-    connect(mServiceProvider, SIGNAL(clientDisconnected()), this, SLOT(handleAllClientsClosed()));
+    mServiceProvider = new IAUpdateServiceProvider(*this);
+    connect(mServiceProvider, SIGNAL(clientDisconnected()), this,
+            SLOT(handleAllClientsClosed()));
     TRAP_IGNORE( iController = CIAUpdateUiController::NewL( *this ));
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::IAUpdateEngine() end");
-}
-
+    }
 
 IAUpdateEngine::~IAUpdateEngine()
-{
+    {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::~IAUpdateEngine() begin");
-    InformRequestObserver( KErrCancel );
+    InformRequestObserver(KErrCancel);
     if (iIdle)
         {
         delete iIdle;
@@ -87,40 +86,39 @@
         {
         delete iGlobalLockHandler;
         }
-    if ( iAutomaticCheck )
+    if (iAutomaticCheck)
         {
         delete iAutomaticCheck;
         }
-    if ( iController )
+    if (iController)
         {
         delete iController;
         }
-    if ( iFwUpdateHandler )
+    if (iFwUpdateHandler)
         {
         delete iFwUpdateHandler;
         }
-    if ( mServiceProvider )
+    if (mServiceProvider)
         {
         delete mServiceProvider;
         }
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::~IAUpdateEngine() end");
-}
+    }
 
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::StartedByLauncherL
 // 
 // -----------------------------------------------------------------------------
 //
-void IAUpdateEngine::StartedByLauncherL( bool aRefreshFromNetworkDenied )
+void IAUpdateEngine::StartedByLauncherL(bool aRefreshFromNetworkDenied)
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartedByLauncherL() begin");
     mRequestIssued = true;
     mRequestType = IAUpdateUiDefines::ENoRequest;
-    iController->SetRequestType( mRequestType );
-    SetVisibleL( true );
+    iController->SetRequestType(mRequestType);
+    SetVisibleL(true);
     CIAUpdateParameters* params = iController->ParamsReadAndRemoveFileL();
-    iController->CheckUpdatesDeferredL( params, aRefreshFromNetworkDenied );
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartedByLauncherL() end");
+    iController->CheckUpdatesDeferredL(params, aRefreshFromNetworkDenied);
     }
 
 // -----------------------------------------------------------------------------
@@ -128,33 +126,32 @@
 // 
 // -----------------------------------------------------------------------------
 //
-void IAUpdateEngine::CheckUpdatesRequestL( int wgid, 
-                                           CIAUpdateParameters* aFilterParams,
-                                           bool aForcedRefresh )
-                                           
+void IAUpdateEngine::CheckUpdatesRequestL(int wgid,
+        CIAUpdateParameters* aFilterParams, bool aForcedRefresh)
+
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::CheckUpdatesRequestL() begin");
-    SetClientWgId( wgid );
+    SetClientWgId(wgid);
     mRequestIssued = true;
-    mStartedFromApplication  = true;
-    CleanupStack::PushL( aFilterParams );
-    if ( wgid > 0 )
+    mStartedFromApplication = true;
+    CleanupStack::PushL(aFilterParams);
+    if (wgid > 0)
         {
-        HideApplicationInFSWL( true );
+        HideApplicationInFSWL(true);
         }
-    CleanupStack::Pop( aFilterParams );
-    
-    if ( !aFilterParams->ShowProgress() )
+    CleanupStack::Pop(aFilterParams);
+
+    if (!aFilterParams->ShowProgress())
         {
-        iEikEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront ); 
+        iEikEnv->RootWin().SetOrdinalPosition(-1, ECoeWinPriorityNeverAtFront);
         }
-           
-    mRequestType = IAUpdateUiDefines::ECheckUpdates; 
-    iController->SetRequestType( mRequestType );
-    iController->SetForcedRefresh( aForcedRefresh );
-    
-    iController->CheckUpdatesDeferredL( aFilterParams, false ); 
-    
+
+    mRequestType = IAUpdateUiDefines::ECheckUpdates;
+    iController->SetRequestType(mRequestType);
+    iController->SetForcedRefresh(aForcedRefresh);
+
+    iController->CheckUpdatesDeferredL(aFilterParams, false);
+
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::CheckUpdatesRequestL() end");
     }
 
@@ -163,46 +160,47 @@
 // 
 // -----------------------------------------------------------------------------
 // 
-void IAUpdateEngine::ShowUpdatesRequestL( int wgid, CIAUpdateParameters* aFilterParams )
+void IAUpdateEngine::ShowUpdatesRequestL(int wgid,
+        CIAUpdateParameters* aFilterParams)
     {
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdatesRequestL() begin"); 
-    SetClientWgId( wgid );
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdatesRequestL() begin");
+    SetClientWgId(wgid);
     mRequestIssued = true;
-//    delete iBackgroundTimer;
-//    iBackgroundTimer = NULL;
-    mStartedFromApplication  = true;
-    CleanupStack::PushL( aFilterParams );
-    if ( wgid > 0 )
+    //    delete iBackgroundTimer;
+    //    iBackgroundTimer = NULL;
+    mStartedFromApplication = true;
+    CleanupStack::PushL(aFilterParams);
+    if (wgid > 0)
         {
-        HideApplicationInFSWL( true );
+        HideApplicationInFSWL(true);
         }
-   
+
     //StatusPane()->MakeVisible( true );
-    iEikEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );
-    
+    iEikEnv->RootWin().SetOrdinalPosition(0, ECoeWinPriorityNormal);
+
     //iRequestObserver = &aObserver;
     mRequestType = IAUpdateUiDefines::EShowUpdates;
-    iController->SetRequestType( mRequestType );
-     
+    iController->SetRequestType(mRequestType);
 
     //if ( !iMainView )
     //    {
     //    iMainView  = CIAUpdateMainView::NewL( ClientRect() ); 
     //    AddViewL( iMainView );
     //    }
-    
-      
+
+
     // by pushing object to cleanup stack its destructor is called if leave happens
     // so global lock issued by this instance can be released in destructor of CIAUpdateGlobalLockHandler
-    CIAUpdateGlobalLockHandler* globalLockHandler = CIAUpdateGlobalLockHandler::NewLC();
-    if ( !globalLockHandler->InUseByAnotherInstanceL() )
+    CIAUpdateGlobalLockHandler* globalLockHandler =
+            CIAUpdateGlobalLockHandler::NewLC();
+    if (!globalLockHandler->InUseByAnotherInstanceL())
         {
-        globalLockHandler->SetToInUseForAnotherInstancesL( true );
-        CleanupStack::Pop( globalLockHandler );
-        CleanupStack::Pop( aFilterParams );
-        CleanupStack::PushL( globalLockHandler );
-        iController->CheckUpdatesDeferredL( aFilterParams, false );
-        CleanupStack::Pop( globalLockHandler ); 
+        globalLockHandler->SetToInUseForAnotherInstancesL(true);
+        CleanupStack::Pop(globalLockHandler);
+        CleanupStack::Pop(aFilterParams);
+        CleanupStack::PushL(globalLockHandler);
+        iController->CheckUpdatesDeferredL(aFilterParams, false);
+        CleanupStack::Pop(globalLockHandler);
         delete iGlobalLockHandler;
         iGlobalLockHandler = globalLockHandler;
         //now possible deletion of iGlobalLockHandler in leave situation is handled
@@ -210,40 +208,38 @@
         }
     else
         {
-        CleanupStack::PopAndDestroy( globalLockHandler );
-        CleanupStack::PopAndDestroy( aFilterParams );
+        CleanupStack::PopAndDestroy(globalLockHandler);
+        CleanupStack::PopAndDestroy(aFilterParams);
         // locked by another IAD instance, nothing else to do than just complete client's request.  
-        InformRequestObserver( KErrNone );
-        }  
+        InformRequestObserver(KErrNone);
+        }
 
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdatesRequestL() end"); 
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdatesRequestL() end");
     }
-    
 
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::ShowUpdateQueryRequestL
 // 
 // -----------------------------------------------------------------------------
 //     
-void IAUpdateEngine::ShowUpdateQueryRequestL( int wgid, uint aUid )
+void IAUpdateEngine::ShowUpdateQueryRequestL(int wgid, uint aUid)
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryRequestL begin");
-    SetClientWgId( wgid );
+    SetClientWgId(wgid);
     mRequestIssued = true;
-    mStartedFromApplication  = true;
+    mStartedFromApplication = true;
     mUpdatequeryUid = aUid;
     mUpdateNow = false;
-    if ( wgid > 0 )
+    if (wgid > 0)
         {
-        HideApplicationInFSWL( true );
+        HideApplicationInFSWL(true);
         }
     mRequestType = IAUpdateUiDefines::EUpdateQuery;
-    
-    
+
     delete iIdle;
     iIdle = NULL;
-    iIdle = CIdle::NewL( CActive::EPriorityIdle ); 
-    iIdle->Start( TCallBack( UpdateQueryCallbackL, this ) ); 
+    iIdle = CIdle::NewL(CActive::EPriorityIdle);
+    iIdle->Start(TCallBack(UpdateQueryCallbackL, this));
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryRequestL end")
     }
 
@@ -252,16 +248,16 @@
 // 
 // -----------------------------------------------------------------------------
 //
-void IAUpdateEngine::StartUpdate( bool aFirmwareUpdate )
+void IAUpdateEngine::StartUpdate(bool aFirmwareUpdate)
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartUpdate() begin");
-    if ( aFirmwareUpdate )
+    if (aFirmwareUpdate)
         {
-        if ( !iFwUpdateHandler )
+        if (!iFwUpdateHandler)
             {
             TRAP_IGNORE( CIAUpdateFWUpdateHandler::NewL() );
             }
-        if ( iFwUpdateHandler )
+        if (iFwUpdateHandler)
             {
             iFwUpdateHandler->FirmWareUpdatewithFOTA();
             }
@@ -270,15 +266,16 @@
         {
         // by pushing object to cleanup stack it's destructor is called if leave happens
         // so global lock issued by this instance can be released in destructor of CIAUpdateGlobalLockHandler
-        CIAUpdateGlobalLockHandler* globalLockHandler = CIAUpdateGlobalLockHandler::NewLC();
-        if ( !globalLockHandler->InUseByAnotherInstanceL() )
+        CIAUpdateGlobalLockHandler* globalLockHandler =
+                CIAUpdateGlobalLockHandler::NewLC();
+        if (!globalLockHandler->InUseByAnotherInstanceL())
             {
-            globalLockHandler->SetToInUseForAnotherInstancesL( true );
+            globalLockHandler->SetToInUseForAnotherInstancesL(true);
             // No need to be totally silent since the updating is started
             // by user.
-            SetDefaultConnectionMethodL( false );
+            SetDefaultConnectionMethodL(false);
             iController->StartUpdateL();
-            CleanupStack::Pop( globalLockHandler ); 
+            CleanupStack::Pop(globalLockHandler);
             delete iGlobalLockHandler;
             iGlobalLockHandler = globalLockHandler;
             //now possible deletion of iGlobalLockHandler in leave situation is handled
@@ -286,39 +283,38 @@
             }
         else
             {
-            CleanupStack::PopAndDestroy( globalLockHandler );   
+            CleanupStack::PopAndDestroy(globalLockHandler);
             }
         }
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartUpdate() end");
     }
 
-
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::SetVisibleL
 // 
 // -----------------------------------------------------------------------------
 //  
-void IAUpdateEngine::SetVisibleL( bool aVisible )
+void IAUpdateEngine::SetVisibleL(bool /*aVisible*/)
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetVisibleL() begin");
-    IAUPDATE_TRACE_1("[IAUPDATE] visible: %d", aVisible );
+    //IAUPDATE_TRACE_1("[IAUPDATE] visible: %d", aVisible );
     /*if ( aVisible )
-        {
-        if ( iEikonEnv->RootWin().OrdinalPosition() != 0 || iEikonEnv->RootWin().OrdinalPriority() != ECoeWinPriorityNormal )
-            {
-            iEikonEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );
-            }
-        
-        StatusPane()->MakeVisible( ETrue );
-        iMainView  = CIAUpdateMainView::NewL( ClientRect() ); 
-        AddViewL( iMainView );
-        ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
-        }
-    else
-        {
-        iEikonEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront );
-        StatusPane()->MakeVisible( EFalse );
-        }*/
+     {
+     if ( iEikonEnv->RootWin().OrdinalPosition() != 0 || iEikonEnv->RootWin().OrdinalPriority() != ECoeWinPriorityNormal )
+     {
+     iEikonEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );
+     }
+     
+     StatusPane()->MakeVisible( ETrue );
+     iMainView  = CIAUpdateMainView::NewL( ClientRect() ); 
+     AddViewL( iMainView );
+     ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
+     }
+     else
+     {
+     iEikonEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront );
+     StatusPane()->MakeVisible( EFalse );
+     }*/
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetVisibleL() end");
     }
 
@@ -327,7 +323,7 @@
 // 
 // -----------------------------------------------------------------------------
 // 
-void IAUpdateEngine::SetClientWgId( int aWgId )
+void IAUpdateEngine::SetClientWgId(int aWgId)
     {
     IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateEngine::SetClientWgId() wgId %d", aWgId );
     mWgId = aWgId;
@@ -342,33 +338,31 @@
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ClientInBackgroundL() begin");
     bool inBackground = false;
-    if ( mWgId > 0 )
+    if (mWgId > 0)
         {
-        CArrayFixFlat<int>*  wgArray = new( ELeave ) CArrayFixFlat<int>(10);  
-        CleanupStack::PushL( wgArray );
-        User::LeaveIfError( iEikEnv->WsSession().WindowGroupList( 0, wgArray ) );  
+        CArrayFixFlat<int>* wgArray = new (ELeave) CArrayFixFlat<int> (10);
+        CleanupStack::PushL(wgArray);
+        User::LeaveIfError(iEikEnv->WsSession().WindowGroupList(0, wgArray));
         int ownWgId = iEikEnv->RootWin().Identifier();
-        if ( ( wgArray->At( 0 ) != ownWgId ) && ( wgArray->At( 0 ) != mWgId  ) )
+        if ((wgArray->At(0) != ownWgId) && (wgArray->At(0) != mWgId))
             {
             inBackground = true;
             }
-        CleanupStack::PopAndDestroy( wgArray );  
+        CleanupStack::PopAndDestroy(wgArray);
         }
     IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateEngine::ClientInBackgroundL() inBackground: %d", inBackground );
-    return inBackground;  
+    return inBackground;
     }
 
-
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::handleAllClientsClosed()
 // 
 // -----------------------------------------------------------------------------
 //
 void IAUpdateEngine::handleAllClientsClosed()
-{
-    qApp->quit(); 
-}
-
+    {
+    qApp->quit();
+    }
 
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::dialogFinished
@@ -379,12 +373,12 @@
     {
     DialogState dialogState = mDialogState;
     mDialogState = NoDialog;
-    
-    switch ( dialogState )
+
+    switch (dialogState)
         {
         case Results:
             mUiRefreshAllowed = true;
-            if ( iController->ResultsInfo().iRebootAfterInstall )
+            if (iController->ResultsInfo().iRebootAfterInstall)
                 {
                 ShowRebootDialogL();
                 }
@@ -397,13 +391,13 @@
                     }
                 }
             break;
-        case RebootQuery:    
-            if (action == mPrimaryAction )
+        case RebootQuery:
+            if (action == mPrimaryAction)
                 {
                 RStarterSession startersession;
-                if( startersession.Connect() == KErrNone )
+                if (startersession.Connect() == KErrNone)
                     {
-                    startersession.Reset( RStarterSession::EUnknownReset );
+                    startersession.Reset(RStarterSession::EUnknownReset);
                     startersession.Close();
                     }
                 }
@@ -416,7 +410,7 @@
                     }
                 }
             break;
-        case ShowUpdateQuery:    
+        case ShowUpdateQuery:
             if (action == mPrimaryAction)
                 {
                 IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::dialogFinished() Now");
@@ -425,46 +419,45 @@
             else if (action == mSecondaryAction)
                 {
                 IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::dialogFinished() Later");
-                CIAUpdateQueryHistory* updateQueryHistory = CIAUpdateQueryHistory::NewL();
-                CleanupStack::PushL( updateQueryHistory );
-                updateQueryHistory->SetTimeL( mUpdatequeryUid );
-                CleanupStack::PopAndDestroy( updateQueryHistory );
+                CIAUpdateQueryHistory* updateQueryHistory =
+                        CIAUpdateQueryHistory::NewL();
+                CleanupStack::PushL(updateQueryHistory);
+                updateQueryHistory->SetTimeL(mUpdatequeryUid);
+                CleanupStack::PopAndDestroy(updateQueryHistory);
                 }
-            InformRequestObserver( KErrNone );
+            InformRequestObserver(KErrNone);
             break;
-        default: 
+        default:
             break;
         }
     }
 
-
-
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::StartupComplete
 // 
 // -----------------------------------------------------------------------------
 //    
-void IAUpdateEngine::StartupComplete( TInt aError )
+void IAUpdateEngine::StartupComplete(TInt aError)
     {
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupComplete() begin"); 
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupComplete() begin");
     IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError);
-    
-    if( aError != KErrNone ) 
-        {  
-        HandleLeaveErrorWithoutLeave( aError );
+
+    if (aError != KErrNone)
+        {
+        HandleLeaveErrorWithoutLeave(aError);
         }
     else
         {
         TRAPD( err, StartupCompleteL() );
-        if( err != KErrNone ) 
-           {  
-           HandleLeaveErrorWithoutLeave( err );
-           }
+        if (err != KErrNone)
+            {
+            HandleLeaveErrorWithoutLeave(err);
+            }
         }
- 
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupComplete() end");    
+
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupComplete() end");
     }
-    
+
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::StartupCompleteL
 // 
@@ -472,23 +465,23 @@
 //    
 void IAUpdateEngine::StartupCompleteL()
     {
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupCompleteL() begin"); 
-    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupCompleteL() begin");
+
     delete iGlobalLockHandler;
     iGlobalLockHandler = NULL;
     iGlobalLockHandler = CIAUpdateGlobalLockHandler::NewL();
-    if ( !iGlobalLockHandler->InUseByAnotherInstanceL() )
+    if (!iGlobalLockHandler->InUseByAnotherInstanceL())
         {
         bool totalSilent(false);
-        if ( mRequestType == IAUpdateUiDefines::ECheckUpdates )
+        if (mRequestType == IAUpdateUiDefines::ECheckUpdates)
             {
-            if ( iController->Filter() )
+            if (iController->Filter())
                 {
-                if ( iController->Filter()->FilterParams() )
+                if (iController->Filter()->FilterParams())
                     {
-                    if ( iController->Filter()->FilterParams()->Refresh() )
+                    if (iController->Filter()->FilterParams()->Refresh())
                         {
-                        if ( !iController->ForcedRefresh() )
+                        if (!iController->ForcedRefresh())
                             {
                             //from bgchecker, make it silent
                             totalSilent = true;
@@ -497,66 +490,61 @@
                     }
                 }
             }
-        SetDefaultConnectionMethodL( totalSilent );
+        SetDefaultConnectionMethodL(totalSilent);
         iGlobalLockHandler->SetToInUseForAnotherInstancesL(true);
-        iController->StartRefreshL();  
+        iController->StartRefreshL();
         }
     else
         {
-        RefreshCompleteL( true, KErrServerBusy );
-        }    
- 
-       
-    
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupCompleteL() end");    
+        RefreshCompleteL(true, KErrServerBusy);
+        }
+
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupCompleteL() end");
     }
 
- 
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::HandleLeaveErrorL
 // 
 // -----------------------------------------------------------------------------
 //        
-void IAUpdateEngine::HandleLeaveErrorL( TInt aError )
+void IAUpdateEngine::HandleLeaveErrorL(TInt aError)
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorL() begin");
     //removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
     delete iGlobalLockHandler;
     iGlobalLockHandler = NULL;
     // client request is completed before leave in case of leave error
-    if ( aError != KErrNone ) 
-        {   
-        InformRequestObserver( aError );
-        User::Leave( aError );
+    if (aError != KErrNone)
+        {
+        InformRequestObserver(aError);
+        User::Leave(aError);
         }
-    
+
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorL() end");
     }
 
-
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::HandleLeaveErrorWithoutLeave
 // 
 // -----------------------------------------------------------------------------
 //  
-void IAUpdateEngine::HandleLeaveErrorWithoutLeave( TInt aError )
+void IAUpdateEngine::HandleLeaveErrorWithoutLeave(TInt aError)
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorWithoutLeave() begin");
     //removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
     delete iGlobalLockHandler;
     iGlobalLockHandler = NULL;
-    if ( aError != KErrNone ) 
+    if (aError != KErrNone)
         {
-        InformRequestObserver( aError );
+        InformRequestObserver(aError);
         }
-    if ( aError == KErrDiskFull )
+    if (aError == KErrDiskFull)
         {
         //TRAP_IGNORE( ShowGlobalErrorNoteL( aError ) );
         }
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HandleLeaveErrorWithoutLeave end");
     }
 
-
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::RefreshUI
 // 
@@ -564,83 +552,77 @@
 // 
 void IAUpdateEngine::RefreshUI()
     {
-    emit refresh( iController->Nodes(), iController->FwNodes(), KErrNone );
+    emit refresh(iController->Nodes(), iController->FwNodes(), KErrNone);
     }
 
-
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::RefreshCompleteL
 // 
 // -----------------------------------------------------------------------------
 //      
-void IAUpdateEngine::RefreshCompleteL( TBool /*aWithViewActivation*/, TInt aError )
+void IAUpdateEngine::RefreshCompleteL(TBool /*aWithViewActivation*/,
+        TInt aError)
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::RefreshCompleteL() begin");
     IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError );
     //removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
     delete iGlobalLockHandler;
-    iGlobalLockHandler = NULL;   
-   
-    if ( mRequestType == IAUpdateUiDefines::ECheckUpdates )
+    iGlobalLockHandler = NULL;
+
+    if (mRequestType == IAUpdateUiDefines::ECheckUpdates)
         {
-        InformRequestObserver( aError );
+        InformRequestObserver(aError);
         }
-    else 
-        {    
-        emit refresh( iController->Nodes(), iController->FwNodes(), aError );   
+    else
+        {
+        emit refresh(iController->Nodes(), iController->FwNodes(), aError);
         //if ( aWithViewActivation)
-          //  {
-          //  ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
-          //  }
+        //  {
+        //  ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
+        //  }
         CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC();
         bool agreementAccepted = agreement->AgreementAcceptedL();
-        if ( iController->ForcedRefresh() )    
+        if (iController->ForcedRefresh())
             {
-            if ( !agreementAccepted )
+            if (!agreementAccepted)
                 {
                 agreement->SetAgreementAcceptedL();
                 }
             }
-        CleanupStack::PopAndDestroy( agreement );
+        CleanupStack::PopAndDestroy(agreement);
         // By calling CIdle possible waiting dialog can be closed before
         // automatic check where a new dialog may be launched
         delete iIdleAutCheck;
         iIdleAutCheck = NULL;
-        iIdleAutCheck = CIdle::NewL( CActive::EPriorityIdle ); 
-        iIdleAutCheck->Start( TCallBack( AutomaticCheckCallbackL, this ) );
-        } 
- 
-  
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::RefreshCompleteL() end");        
+        iIdleAutCheck = CIdle::NewL(CActive::EPriorityIdle);
+        iIdleAutCheck->Start(TCallBack(AutomaticCheckCallbackL, this));
+        }
+
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::RefreshCompleteL() end");
     }
 
-
-
-
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::UpdateCompleteL
 // 
 // -----------------------------------------------------------------------------
 //     
-void IAUpdateEngine::UpdateCompleteL( TInt aError )    
+void IAUpdateEngine::UpdateCompleteL(TInt aError)
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateCompleteL begin");
     IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError );
     //removal of iGlobalLockHandler releases possible global operation lock to other IAD instances
     delete iGlobalLockHandler;
-    iGlobalLockHandler = NULL;  
-    if ( mRequestType != IAUpdateUiDefines::ENoRequest )
+    iGlobalLockHandler = NULL;
+    if (mRequestType != IAUpdateUiDefines::ENoRequest)
         {
-        InformRequestObserver( aError );
+        InformRequestObserver(aError);
         }
-             
+
     ShowResultsDialogL();
-                
+
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateCompleteL end");
     }
 
-
-
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::ShowResultsDialogL
 // 
@@ -648,16 +630,17 @@
 //   
 void IAUpdateEngine::ShowResultsDialogL()
     {
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowResultsDialogL() begin"); 
-                
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowResultsDialogL() begin");
+
     mUiRefreshAllowed = false;
     mResultsDialog = new IAUpdateResultsDialog(this);
-    mResultsDialog->showResults(iController->ResultsInfo(),this,SLOT(dialogFinished(HbAction*)));
+    mResultsDialog->showResults(iController->ResultsInfo(), this,
+            SLOT(dialogFinished(HbAction*)));
     mDialogState = Results;
-    
+
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowResultsDialogL() end");
     }
-    
+
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::ShowRebootDialogL
 // 
@@ -666,14 +649,15 @@
 void IAUpdateEngine::ShowRebootDialogL()
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowRebootDialogL() begin");
-    
-    HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
+
+    HbMessageBox *messageBox = new HbMessageBox(
+            HbMessageBox::MessageTypeQuestion);
     messageBox->setText(QString("Phone restart needed. Restart now?"));
     int actionCount = messageBox->actions().count();
-    for (int i=actionCount-1; i >= 0; i--)
-    { 
+    for (int i = actionCount - 1; i >= 0; i--)
+        {
         messageBox->removeAction(messageBox->actions().at(i));
-    }
+        }
     mPrimaryAction = NULL;
     mPrimaryAction = new HbAction("Ok");
     HbAction *secondaryAction = NULL;
@@ -685,87 +669,85 @@
     messageBox->setAttribute(Qt::WA_DeleteOnClose);
     messageBox->open(this, SLOT(dialogFinished(HbAction*)));
     mDialogState = RebootQuery;
-    
+
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowRebootDialogL() end");
     }
 
-
-
-
-
-
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::InformRequestObserver
 // 
 // -----------------------------------------------------------------------------
 //      
-void IAUpdateEngine::InformRequestObserver( int aError )
+void IAUpdateEngine::InformRequestObserver(int aError)
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::InformRequestObserver() begin");
-        
+
     //if ( iRequestObserver )
-    if ( mRequestIssued )    
+    if (mRequestIssued)
         {
-        if ( iController->ClosingAllowedByClient() )
+        if (iController->ClosingAllowedByClient())
             {
-            if ( mRequestType != IAUpdateUiDefines::ENoRequest )
+            if (mRequestType != IAUpdateUiDefines::ENoRequest)
                 {
-//                if ( iRequestType == IAUpdateUiDefines::EUpdateQuery && iUpdateNow )
-//                    {
-//                  if ( !iBackgroundTimer )
-//                        {
-//                        iBackgroundTimer = CIAUpdateUITimer::NewL( *this, CIAUpdateUITimer::EBackgroundDelay );
-//                        }
-//                 if ( !iBackgroundTimer->IsActive() )
-//                        {
-//                        iBackgroundTimer->After( 500000 );
-//                        }
-//                    }
-//                 else
-//                    {
-                      iEikEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront );
-//                    }
+                //                if ( iRequestType == IAUpdateUiDefines::EUpdateQuery && iUpdateNow )
+                //                    {
+                //                  if ( !iBackgroundTimer )
+                //                        {
+                //                        iBackgroundTimer = CIAUpdateUITimer::NewL( *this, CIAUpdateUITimer::EBackgroundDelay );
+                //                        }
+                //                 if ( !iBackgroundTimer->IsActive() )
+                //                        {
+                //                        iBackgroundTimer->After( 500000 );
+                //                        }
+                //                    }
+                //                 else
+                //                    {
+                iEikEnv->RootWin().SetOrdinalPosition(-1,
+                        ECoeWinPriorityNeverAtFront);
+                //                    }
                 }
             }
-        
-        switch ( mRequestType )
+
+        switch (mRequestType)
             {
             case IAUpdateUiDefines::ENoRequest:
                 {
-                mServiceProvider->completeLauncherLaunch( aError );
+                mServiceProvider->completeLauncherLaunch(aError);
                 break;
                 }
             case IAUpdateUiDefines::ECheckUpdates:
                 {
-                mServiceProvider->completeCheckUpdates( iController->CountOfAvailableUpdates(), aError );
+                mServiceProvider->completeCheckUpdates(
+                        iController->CountOfAvailableUpdates(), aError);
                 break;
                 }
             case IAUpdateUiDefines::EShowUpdates:
                 {
-                CIAUpdateResult* result( NULL );
+                CIAUpdateResult* result(NULL);
                 TRAPD( error, result = CIAUpdateResult::NewL() )
-                if ( result )
+                if (result)
                     {
-                    TIAUpdateResultsInfo resultsInfo( iController->ResultsInfo() );
-                    IAUPDATE_TRACE_3("[IAUPDATE] IAUpdateEngine::InformRequestObserver succeed: %d failed: %d  cancelled: %d", 
-                                                  resultsInfo.iCountSuccessfull, 
-                                                  resultsInfo.iCountFailed, 
-                                                  resultsInfo.iCountCancelled );
-                    result->SetSuccessCount( resultsInfo.iCountSuccessfull );
-                    result->SetFailCount( resultsInfo.iCountFailed );
-                    result->SetCancelCount( resultsInfo.iCountCancelled );    
-                    mServiceProvider->completeShowUpdates( result, aError );
+                    TIAUpdateResultsInfo resultsInfo(
+                            iController->ResultsInfo());
+                    IAUPDATE_TRACE_3("[IAUPDATE] IAUpdateEngine::InformRequestObserver succeed: %d failed: %d  cancelled: %d",
+                            resultsInfo.iCountSuccessfull,
+                            resultsInfo.iCountFailed,
+                            resultsInfo.iCountCancelled );
+                    result->SetSuccessCount(resultsInfo.iCountSuccessfull);
+                    result->SetFailCount(resultsInfo.iCountFailed);
+                    result->SetCancelCount(resultsInfo.iCountCancelled);
+                    mServiceProvider->completeShowUpdates(result, aError);
                     // Ownership of result is transferred here.
                     }
                 else
                     {
-                    mServiceProvider->completeShowUpdates( NULL, error );
+                    mServiceProvider->completeShowUpdates(NULL, error);
                     }
                 break;
                 }
             case IAUpdateUiDefines::EUpdateQuery:
                 {
-                mServiceProvider->completeUpdateQuery( mUpdateNow, aError );
+                mServiceProvider->completeUpdateQuery(mUpdateNow, aError);
                 break;
                 }
             default:
@@ -776,59 +758,58 @@
 
         mRequestIssued = false;
         }
-        
+
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::InformRequestObserver() end");
     }
 
-
 // ---------------------------------------------------------------------------
 // IAUpdateEngine::SetDefaultConnectionMethodL
 // Sets the connection method for the update network connection.
 // ---------------------------------------------------------------------------
 //
-void IAUpdateEngine::SetDefaultConnectionMethodL( bool aTotalSilent )
+void IAUpdateEngine::SetDefaultConnectionMethodL(bool aTotalSilent)
     {
-    if ( aTotalSilent )
+    if (aTotalSilent)
         {
         // from back ground checker, choose the IAP to make the internet access silent
         IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() begin");
 
-        uint connectionMethodId( 0 );
-        int connMethodId( 0 );
+        uint connectionMethodId(0);
+        int connMethodId(0);
 
         // Let's first check whether cenrep contains SNAP id other than zero
-        CRepository* cenrep( CRepository::NewLC( KCRUidIAUpdateSettings ) );
-        User::LeaveIfError(  
-               cenrep->Get( KIAUpdateAccessPoint, connMethodId ) );
-        CleanupStack::PopAndDestroy( cenrep ); 
+        CRepository* cenrep(CRepository::NewLC(KCRUidIAUpdateSettings));
+        User::LeaveIfError(cenrep->Get(KIAUpdateAccessPoint, connMethodId));
+        CleanupStack::PopAndDestroy(cenrep);
         cenrep = NULL;
 
-        RCmManagerExt cmManagerExt;
-        cmManagerExt.OpenL();
-        CleanupClosePushL( cmManagerExt );
-           
-        if ( connMethodId == -1 )
+        RCmManager cmManager;
+        cmManager.OpenL();
+        CleanupClosePushL(cmManager);
+
+        if (connMethodId == -1)
             {
             IAUPDATE_TRACE("[IAUPDATE] user chooses default connection, use IAP logic");
-               
+
             //check what is the default connection by users     
-               
+
             TCmDefConnValue DCSetting;
-            cmManagerExt.ReadDefConnL( DCSetting );
-               
-            switch ( DCSetting.iType )
+            cmManager.ReadDefConnL(DCSetting);
+
+            switch (DCSetting.iType)
                 {
                 case ECmDefConnAlwaysAsk:
                 case ECmDefConnAskOnce:
                     {
                     //go with the best IAP under internet snap
-                    connectionMethodId = GetBestIAPInAllSNAPsL( cmManagerExt );
+                    connectionMethodId = GetBestIAPInAllSNAPsL(cmManager);
                     break;
                     }
                 case ECmDefConnDestination:
                     {
                     //go with the best IAP under this snap
-                    connectionMethodId = GetBestIAPInThisSNAPL( cmManagerExt, DCSetting.iId );
+                    connectionMethodId = GetBestIAPInThisSNAPL(cmManager,
+                            DCSetting.iId);
                     break;
                     }
                 case ECmDefConnConnectionMethod:
@@ -839,34 +820,36 @@
                     }
                 }
             }
-        else if ( connMethodId == 0 )
+        else if (connMethodId == 0)
             {
             //no choice from user, we go with the best IAP under Internent SNAP
-            connectionMethodId = GetBestIAPInAllSNAPsL( cmManagerExt );
+            connectionMethodId = GetBestIAPInAllSNAPsL(cmManager);
             }
         else
             {
             IAUPDATE_TRACE("[IAUPDATE] use chooses a snap");
             // It was some SNAP value
-            connectionMethodId = GetBestIAPInThisSNAPL( cmManagerExt, connMethodId );
+            connectionMethodId = GetBestIAPInThisSNAPL(cmManager,
+                    connMethodId);
             }
 
-        CleanupStack::PopAndDestroy( &cmManagerExt ); 
-           
-        if ( connectionMethodId != 0 )
+        CleanupStack::PopAndDestroy(&cmManager);
+
+        if (connectionMethodId != 0)
             {
-            TIAUpdateConnectionMethod connectionMethod( 
-                   connectionMethodId, 
-                   TIAUpdateConnectionMethod::EConnectionMethodTypeAccessPoint );
+            TIAUpdateConnectionMethod
+                    connectionMethod(
+                            connectionMethodId,
+                            TIAUpdateConnectionMethod::EConnectionMethodTypeAccessPoint);
 
-            iController->SetDefaultConnectionMethodL( connectionMethod );
+            iController->SetDefaultConnectionMethodL(connectionMethod);
             }
         else
             {
             //In the totally silent case, if no usable IAP, we complete the check update with 0 updates.
             //the bgchecker will try again later after 1 month. 
             //The LEAVE will be catched up later and complete the request from background checker.
-            User::LeaveIfError( KErrNotFound );
+            User::LeaveIfError(KErrNotFound);
             }
         IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() end");
         }
@@ -874,63 +857,64 @@
         {
         // from grid, use the old logic
         IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() begin");
-        uint connectionMethodId( 0 );
-        int connMethodId( 0 );
+        uint connectionMethodId(0);
+        int connMethodId(0);
 
         // Set initial value to always ask
-        int connectionMethodType( TIAUpdateConnectionMethod::EConnectionMethodTypeAlwaysAsk );
+        int connectionMethodType(
+                TIAUpdateConnectionMethod::EConnectionMethodTypeAlwaysAsk);
         bool needSaving(false);
 
         // Let's first check whether cenrep contains SNAP id other than zero
-        CRepository* cenrep( CRepository::NewLC( KCRUidIAUpdateSettings ) );
-        User::LeaveIfError(  
-                      cenrep->Get( KIAUpdateAccessPoint, connMethodId ) );
-        CleanupStack::PopAndDestroy( cenrep ); 
+        CRepository* cenrep(CRepository::NewLC(KCRUidIAUpdateSettings));
+        User::LeaveIfError(cenrep->Get(KIAUpdateAccessPoint, connMethodId));
+        CleanupStack::PopAndDestroy(cenrep);
         cenrep = NULL;
-                    
-        if ( connMethodId == -1 )
+
+        if (connMethodId == -1)
             {
             IAUPDATE_TRACE("[IAUPDATE] user chooses default connection, use IAP logic");
-                                            
+
             connectionMethodId = 0;
-            connectionMethodType = TIAUpdateConnectionMethod::EConnectionMethodTypeDefault;
+            connectionMethodType
+                    = TIAUpdateConnectionMethod::EConnectionMethodTypeDefault;
             }
-        else if ( connMethodId == 0 )
+        else if (connMethodId == 0)
             {
             IAUPDATE_TRACE("[IAUPDATE] use chooses nothing, use internal IAP logic");
             //if nothing is set by user, use our new logic
             //SetDefaultConnectionMethod2L();
             //return;
             // CenRep didn't contain any SNAP id. Let's try Internet SNAP then.
-                          
-            RCmManagerExt cmManagerExt;
-            cmManagerExt.OpenL();
-            CleanupClosePushL( cmManagerExt );
+
+            RCmManager cmManager;
+            cmManager.OpenL();
+            CleanupClosePushL(cmManager);
             iDestIdArray.Reset();
-            cmManagerExt.AllDestinationsL( iDestIdArray );
+            cmManager.AllDestinationsL(iDestIdArray);
 
-            for ( int i = 0; i< iDestIdArray.Count(); i++ )
+            for (int i = 0; i < iDestIdArray.Count(); i++)
                 {
-                RCmDestinationExt dest = cmManagerExt.DestinationL( iDestIdArray[i] );
-                CleanupClosePushL( dest );
-                           
-                if ( dest.MetadataL( CMManager::ESnapMetadataInternet ) )
+                RCmDestination dest = cmManager.DestinationL(iDestIdArray[i]);
+                CleanupClosePushL(dest);
+
+                if (dest.MetadataL(CMManager::ESnapMetadataInternet))
                     {
                     // Check whether Internet SNAP contains any IAP.
-                    if ( dest.ConnectionMethodCount() > 0 )
+                    if (dest.ConnectionMethodCount() > 0)
                         {
                         connectionMethodId = iDestIdArray[i];
                         needSaving = true;
                         IAUPDATE_TRACE_1("[IAUPDATE] connectionMethodId: %d", connectionMethodId );
                         }
-                    CleanupStack::PopAndDestroy( &dest ); 
+                    CleanupStack::PopAndDestroy(&dest);
                     break;
                     }
-                             
-                CleanupStack::PopAndDestroy( &dest ); 
+
+                CleanupStack::PopAndDestroy(&dest);
                 }
             iDestIdArray.Reset();
-            CleanupStack::PopAndDestroy( &cmManagerExt ); 
+            CleanupStack::PopAndDestroy(&cmManager);
             }
         else
             {
@@ -938,151 +922,151 @@
             // It was some SNAP value
             connectionMethodId = connMethodId;
             }
-                  
-        if ( connectionMethodId > 0)
+
+        if (connectionMethodId > 0)
             {
             // We have now some valid SNAP id, either from CenRep or Internet SNAP
-            connectionMethodType = TIAUpdateConnectionMethod::EConnectionMethodTypeDestination;
+            connectionMethodType
+                    = TIAUpdateConnectionMethod::EConnectionMethodTypeDestination;
             // Save to cenrep if needed
-            if ( needSaving )
+            if (needSaving)
                 {
-                cenrep = CRepository::NewLC( KCRUidIAUpdateSettings );
-                int err = cenrep->StartTransaction( CRepository::EReadWriteTransaction );
-                User::LeaveIfError( err );
+                cenrep = CRepository::NewLC(KCRUidIAUpdateSettings);
+                int err = cenrep->StartTransaction(
+                        CRepository::EReadWriteTransaction);
+                User::LeaveIfError(err);
                 cenrep->CleanupCancelTransactionPushL();
-                          
-                 connMethodId = connectionMethodId;
-                 err = cenrep->Set( KIAUpdateAccessPoint, connMethodId );
-                 User::LeaveIfError( err );
-                 TUint32 ignore = KErrNone;
-                 User::LeaveIfError( cenrep->CommitTransaction( ignore ) );
-                 CleanupStack::PopAndDestroy(); // CleanupCancelTransactionPushL()
-                 CleanupStack::PopAndDestroy( cenrep );            
-                 }
+
+                connMethodId = connectionMethodId;
+                err = cenrep->Set(KIAUpdateAccessPoint, connMethodId);
+                User::LeaveIfError(err);
+                TUint32 ignore = KErrNone;
+                User::LeaveIfError(cenrep->CommitTransaction(ignore));
+                CleanupStack::PopAndDestroy(); // CleanupCancelTransactionPushL()
+                CleanupStack::PopAndDestroy(cenrep);
+                }
             }
 
-        TIAUpdateConnectionMethod connectionMethod( 
-                      connectionMethodId, 
-                      static_cast< TIAUpdateConnectionMethod::TConnectionMethodType >( connectionMethodType ) );
+        TIAUpdateConnectionMethod
+                connectionMethod(
+                        connectionMethodId,
+                        static_cast<TIAUpdateConnectionMethod::TConnectionMethodType> (connectionMethodType));
 
-        iController->SetDefaultConnectionMethodL( connectionMethod );
+        iController->SetDefaultConnectionMethodL(connectionMethod);
 
         IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::SetDefaultConnectionMethodL() end");
         }
     }
 
-
 // ---------------------------------------------------------------------------
 // IAUpdateEngine::GetBestIAPInAllSNAPsL
 // Sets the best IAP from all snaps
 // ---------------------------------------------------------------------------
 //
-uint IAUpdateEngine::GetBestIAPInAllSNAPsL( RCmManagerExt& aCmManagerExt  )
-    { 
+uint IAUpdateEngine::GetBestIAPInAllSNAPsL(RCmManager& aCmManager)
+    {
     //go with internet SNAP first.
     uint IAPID = 0;
-    IAPID = GetBestIAPInInternetSNAPL( aCmManagerExt );
-    
-    if ( IAPID )
+    IAPID = GetBestIAPInInternetSNAPL(aCmManager);
+
+    if (IAPID)
         {
         return IAPID;
         }
-    
+
     //select IAP from rest of the SNAPs
     iDestIdArray.Reset();
-    aCmManagerExt.AllDestinationsL( iDestIdArray );
-    
-    for ( int i = 0; i< iDestIdArray.Count(); i++ )
+    aCmManager.AllDestinationsL(iDestIdArray);
+
+    for (int i = 0; i < iDestIdArray.Count(); i++)
         {
-        uint SNAPID = iDestIdArray[i];                   
-        IAPID = GetBestIAPInThisSNAPL( aCmManagerExt, SNAPID );
-        if ( IAPID )
+        uint SNAPID = iDestIdArray[i];
+        IAPID = GetBestIAPInThisSNAPL(aCmManager, SNAPID);
+        if (IAPID)
             {
             break;
             }
-         }
+        }
     iDestIdArray.Reset();
     return IAPID;
     }
 
-
-
 // ---------------------------------------------------------------------------
 // IAUpdateEngine::GetBestIAPInInternetSNAPL
 // Sets the best IAP from internet snap
 // ---------------------------------------------------------------------------
 //
-uint IAUpdateEngine::GetBestIAPInInternetSNAPL( RCmManagerExt& aCmManagerExt  )
+uint IAUpdateEngine::GetBestIAPInInternetSNAPL(RCmManager& aCmManager)
     {
     //select IAP from Internet SNAP
     iDestIdArray.Reset();
-    aCmManagerExt.AllDestinationsL( iDestIdArray );
+    aCmManager.AllDestinationsL(iDestIdArray);
     uint InternetSNAPID = 0;
-    for ( int i = 0; i< iDestIdArray.Count(); i++ )
+    for (int i = 0; i < iDestIdArray.Count(); i++)
         {
-        RCmDestinationExt dest = aCmManagerExt.DestinationL( iDestIdArray[i] );
-        CleanupClosePushL( dest );
-                                     
-        if ( dest.MetadataL( CMManager::ESnapMetadataInternet ) )
+        RCmDestination dest = aCmManager.DestinationL(iDestIdArray[i]);
+        CleanupClosePushL(dest);
+
+        if (dest.MetadataL(CMManager::ESnapMetadataInternet))
             {
             InternetSNAPID = iDestIdArray[i];
-            CleanupStack::PopAndDestroy( &dest ); 
+            CleanupStack::PopAndDestroy(&dest);
             break;
-            }                     
-         CleanupStack::PopAndDestroy( &dest ); 
-         }
+            }
+        CleanupStack::PopAndDestroy(&dest);
+        }
     iDestIdArray.Reset();
-    
-    return GetBestIAPInThisSNAPL( aCmManagerExt, InternetSNAPID );
+
+    return GetBestIAPInThisSNAPL(aCmManager, InternetSNAPID);
     }
 
-
-
 // ---------------------------------------------------------------------------
 // IAUpdateEngine::GetBestIAPInThisSNAPL
 // Sets the best IAP from the given snap
 // ---------------------------------------------------------------------------
 //
-uint IAUpdateEngine::GetBestIAPInThisSNAPL( RCmManagerExt& aCmManagerExt, uint aSNAPID  )
+uint IAUpdateEngine::GetBestIAPInThisSNAPL(RCmManager& aCmManager,
+        uint aSNAPID)
     {
     //get all usable IAPs
     TConnMonIapInfoBuf iapInfo;
     TRequestStatus status;
-                       
+
     RConnectionMonitor connMon;
     connMon.ConnectL();
-    CleanupClosePushL( connMon );
-    
-    connMon.GetPckgAttribute( EBearerIdAll, 0, KIapAvailability,iapInfo, status );
-    User::WaitForRequest( status );
-    User::LeaveIfError( status.Int() );
-    
-    CleanupStack::PopAndDestroy( &connMon ); 
-    
-    RCmDestinationExt dest = aCmManagerExt.DestinationL( aSNAPID );
-    CleanupClosePushL( dest );
-    
+    CleanupClosePushL(connMon);
+
+    connMon.GetPckgAttribute(EBearerIdAll, 0, KIapAvailability, iapInfo,
+            status);
+    User::WaitForRequest(status);
+    User::LeaveIfError(status.Int());
+
+    CleanupStack::PopAndDestroy(&connMon);
+
+    RCmDestination dest = aCmManager.DestinationL(aSNAPID);
+    CleanupClosePushL(dest);
+
     // Check whether the SNAP contains any IAP.
-    for  (int i = 0; i < dest.ConnectionMethodCount(); i++ )
+    for (int i = 0; i < dest.ConnectionMethodCount(); i++)
         {
-        RCmConnectionMethodExt cm =  dest.ConnectionMethodL( i );
-        CleanupClosePushL( cm );
-        
-        uint iapid= cm.GetIntAttributeL( CMManager::ECmIapId );
-        
-        for ( int i = 0; i < iapInfo().iCount; i++ )
+        RCmConnectionMethod cm = dest.ConnectionMethodL(i);
+        CleanupClosePushL(cm);
+
+        uint iapid = cm.GetIntAttributeL(CMManager::ECmIapId);
+
+        for (int i = 0; i < iapInfo().iCount; i++)
             {
-            if ( iapInfo().iIap[i].iIapId == iapid )
+            if (iapInfo().iIap[i].iIapId == iapid)
                 {
-                CleanupStack::PopAndDestroy( 2 ); //cm & dest;
+                CleanupStack::PopAndDestroy(2); //cm & dest;
                 return iapid;
                 }
-            }    
-                                                                                 
-        CleanupStack::PopAndDestroy( &cm );
+            }
+
+        CleanupStack::PopAndDestroy(&cm);
         }
-    
-    CleanupStack::PopAndDestroy( &dest ); 
+
+    CleanupStack::PopAndDestroy(&dest);
     return 0;
     }
 
@@ -1097,28 +1081,31 @@
     CIAUpdateQueryHistory* updateQueryHistory = CIAUpdateQueryHistory::NewL();
     // Get the delay information from the controller that has read it from
     // the config file.
-    updateQueryHistory->SetDelay( iController->ConfigData().QueryHistoryDelayHours() );
-    CleanupStack::PushL( updateQueryHistory );
-    bool isDelayed( updateQueryHistory->IsDelayedL( mUpdatequeryUid ) );
-    CleanupStack::PopAndDestroy( updateQueryHistory );
-    if ( !isDelayed )
+    updateQueryHistory->SetDelay(
+            iController->ConfigData().QueryHistoryDelayHours());
+    CleanupStack::PushL(updateQueryHistory);
+    bool isDelayed(updateQueryHistory->IsDelayedL(mUpdatequeryUid));
+    CleanupStack::PopAndDestroy(updateQueryHistory);
+    if (!isDelayed)
         {
-        if ( ClientInBackgroundL() )
+        if (ClientInBackgroundL())
             {
-            iEikEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNormal );
+            iEikEnv->RootWin().SetOrdinalPosition(-1, ECoeWinPriorityNormal);
             }
         else
             {
-            iEikEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );    
+            iEikEnv->RootWin().SetOrdinalPosition(0, ECoeWinPriorityNormal);
             }
- 
-        HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion); 
-        messageBox->setText(QString("Application update is available from Nokia. Update?"));
+
+        HbMessageBox *messageBox = new HbMessageBox(
+                HbMessageBox::MessageTypeQuestion);
+        messageBox->setText(QString(
+                "Application update is available from Nokia. Update?"));
         int actionCount = messageBox->actions().count();
-        for (int i=actionCount-1; i >= 0; i--)
-        { 
+        for (int i = actionCount - 1; i >= 0; i--)
+            {
             messageBox->removeAction(messageBox->actions().at(i));
-        }
+            }
         mPrimaryAction = NULL;
         mPrimaryAction = new HbAction("Now");
         mSecondaryAction = NULL;
@@ -1132,31 +1119,29 @@
         }
     else
         {
-        InformRequestObserver( KErrNone );
+        InformRequestObserver(KErrNone);
         }
-   
+
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() end");
     }
 
-
-
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::HideApplicationInFSWL
 // 
 // -----------------------------------------------------------------------------
 //  
-void IAUpdateEngine::HideApplicationInFSWL( bool aHide ) const
+void IAUpdateEngine::HideApplicationInFSWL(bool aHide) const
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HideApplicationInFSW() begin");
     IAUPDATE_TRACE_1("[IAUPDATE] hide: %d", aHide );
     int id = iEikEnv->RootWin().Identifier();
 
-    CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC( 
-            iEikEnv->WsSession(), id );
-    
-    wgName->SetHidden( aHide );
-    wgName->SetWindowGroupName( iEikEnv->RootWin() );    
-    CleanupStack::PopAndDestroy( wgName ); 
+    CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC(
+            iEikEnv->WsSession(), id);
+
+    wgName->SetHidden(aHide);
+    wgName->SetWindowGroupName(iEikEnv->RootWin());
+    CleanupStack::PopAndDestroy(wgName);
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HideApplicationInFSW() end");
     }
 
@@ -1164,10 +1149,10 @@
 // IAUpdateEngine::UpdateQueryCallbackL
 // ---------------------------------------------------------------------------
 //
-TInt IAUpdateEngine::UpdateQueryCallbackL( TAny* aPtr )
+TInt IAUpdateEngine::UpdateQueryCallbackL(TAny* aPtr)
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateQueryCallbackL() begin");
-    IAUpdateEngine* engine = static_cast<IAUpdateEngine*>( aPtr ); 
+    IAUpdateEngine* engine = static_cast<IAUpdateEngine*> (aPtr);
     //TRAPD( err, engine->ShowUpdateQueryL() );
     TRAP_IGNORE( engine->ShowUpdateQueryL() );
     //if ( err != KErrNone )
@@ -1176,36 +1161,36 @@
     //    }
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateQueryCallbackL() end");
     return KErrNone;
-    }    
+    }
 
 // ---------------------------------------------------------------------------
 // IAUpdateEngine::AutomaticCheckCallbackL
 // ---------------------------------------------------------------------------
 //    
-    
-TInt IAUpdateEngine::AutomaticCheckCallbackL( TAny* aPtr )    
+
+TInt IAUpdateEngine::AutomaticCheckCallbackL(TAny* aPtr)
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::AutomaticCheckCallbackL() begin");
-    IAUpdateEngine* engine= static_cast<IAUpdateEngine*>( aPtr ); 
-    
+    IAUpdateEngine* engine = static_cast<IAUpdateEngine*> (aPtr);
+
     int err = KErrNone;
-    if ( !engine->iAutomaticCheck )
+    if (!engine->iAutomaticCheck)
         {
-        TRAP( err, engine->iAutomaticCheck = CIAUpdateAutomaticCheck::NewL() ); 
+        TRAP( err, engine->iAutomaticCheck = CIAUpdateAutomaticCheck::NewL() );
         }
-    if ( err != KErrNone )
+    if (err != KErrNone)
         {
-        engine->HandleLeaveErrorL( err );
+        engine->HandleLeaveErrorL(err);
         }
     else
         {
         TRAP( err, engine->iAutomaticCheck->AcceptAutomaticCheckL() );
-        if ( err != KErrNone )
+        if (err != KErrNone)
             {
-            engine->HandleLeaveErrorL( err );
-            }   
-        } 
-  
+            engine->HandleLeaveErrorL(err);
+            }
+        }
+
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::AutomaticCheckCallbackL() end");
     return KErrNone;
     }
@@ -1218,20 +1203,21 @@
     {
     //exit from result view if there are no update left
     bool toBeClosed = false;
-    if ( iController->Nodes().Count() == 0 && iController->FwNodes().Count() == 0 )
-        {
-        toBeClosed = true; 
-        }
-    else if ( mStartedFromApplication && 
-        iController->ResultsInfo().iCountCancelled == 0 &&
-        iController->ResultsInfo().iCountFailed == 0 )
+    if (iController->Nodes().Count() == 0 && iController->FwNodes().Count()
+            == 0)
         {
         toBeClosed = true;
         }
-    if ( toBeClosed )
+    else if (mStartedFromApplication
+            && iController->ResultsInfo().iCountCancelled == 0
+            && iController->ResultsInfo().iCountFailed == 0)
+        {
+        toBeClosed = true;
+        }
+    if (toBeClosed)
         {
         qApp->quit();
         }
     return toBeClosed;
     }
-            
+
--- a/iaupdate/IAD/ui/src/iaupdatefirsttimedatefile.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This module contains the implementation of CIAUpdateFirstTimeDateFile 
-*                class  member functions.
-*
-*/
-
-
-
-
-#include <bautils.h>
-#include <s32file.h>
-#include <sysutil.h>
-
-#include "iaupdatefirsttimedatefile.h"
-
-
-const TInt KDrive( EDriveC );
-const TInt KSizeOfFile( 8 );
-    
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFirstTimeDateFile::NewL
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateFirstTimeDateFile* CIAUpdateFirstTimeDateFile::NewL( 
-    const TDesC& aFile )
-    {
-    CIAUpdateFirstTimeDateFile* self =
-        CIAUpdateFirstTimeDateFile::NewLC( aFile );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFirstTimeDateFile::NewLC
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateFirstTimeDateFile* CIAUpdateFirstTimeDateFile::NewLC( 
-    const TDesC& aFile )
-    {
-    CIAUpdateFirstTimeDateFile* self =
-        new( ELeave) CIAUpdateFirstTimeDateFile();
-    CleanupStack::PushL( self );
-    self->ConstructL( aFile );
-    return self;    
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFirstTimeDateFile::CIAUpdateFirstTimeDateFile
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateFirstTimeDateFile::CIAUpdateFirstTimeDateFile()
-: CBase(),
-  iFirstTime( 0 )
-    {
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFirstTimeDateFile::ConstructL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFirstTimeDateFile::ConstructL( const TDesC& aFile )
-    {
-    User::LeaveIfError( iFsSession.Connect() );
-    User::LeaveIfError( 
-        iFsSession.SetSessionToPrivate( KDrive ) );
-    
-    User::LeaveIfError( iFsSession.SessionPath( iPath ) );
-    BaflUtils::EnsurePathExistsL( iFsSession, iPath );
-    iPath.Append( aFile );
-    
-    // Read data from the file if the file exists.
-    // Otherwise, let default values remain.
-    ReadDataL(); 
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFirstTimeDateFile::~CIAUpdateFirstTimeDateFile
-//
-// -----------------------------------------------------------------------------
-//
-CIAUpdateFirstTimeDateFile::~CIAUpdateFirstTimeDateFile()
-    {
-    iFsSession.Close();
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFirstTimeDateFile::ReadDataL
-//
-// -----------------------------------------------------------------------------
-//
-TBool CIAUpdateFirstTimeDateFile::ReadDataL()
-	{
-	RFile file;
-    TInt err = file.Open( iFsSession, iPath, EFileRead|EFileShareAny );
-    if ( err == KErrNotFound )
-    	{
-    	// File did not exist. 
-    	// So, nothing to do here anymore.
-    	return EFalse;
-    	}
-    User::LeaveIfError( err );
-    	
-    CleanupClosePushL( file );
-    
-    RFileReadStream stream( file, 0 );
-    CleanupClosePushL( stream );
-
-    InternalizeL( stream );
-
-    CleanupStack::PopAndDestroy( &stream );
-    CleanupStack::PopAndDestroy( &file );
-
-    return ETrue;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFirstTimeDateFile::WriteDataL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFirstTimeDateFile::WriteDataL()
-	{
-	TDriveUnit driveUnit( KDrive );
-	if ( SysUtil::DiskSpaceBelowCriticalLevelL( 
-	        &iFsSession, KSizeOfFile, driveUnit ) )
-	    {
-		User::Leave( KErrDiskFull );
-	    }
-	
-	RFile file;
-    User::LeaveIfError( 
-        file.Replace( iFsSession, iPath, EFileWrite|EFileShareAny ) );
-    CleanupClosePushL( file );
-    
-    RFileWriteStream stream( file, 0 );
-    CleanupClosePushL( stream );
-
-    ExternalizeL( stream );
-    
-    stream.CommitL();
-    
-    CleanupStack::PopAndDestroy( &stream );
-    CleanupStack::PopAndDestroy( &file );
-	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFirstTimeDateFile::FirstTime
-//
-// -----------------------------------------------------------------------------
-//
-const TTime& CIAUpdateFirstTimeDateFile::FirstTime() const
-    {
-    return iFirstTime;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFirstTimeDateFile::SetCurrentFirstTime
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFirstTimeDateFile::SetCurrentFirstTime()
-    {
-    TTime universalTime;
-    universalTime.UniversalTime();
-    iFirstTime = universalTime;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFirstTimeDateFile::InternalizeL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFirstTimeDateFile::InternalizeL( RReadStream& aStream )
-	{
-	// If you make changes here, 
-	// remember to update ExternalizeL accordingly!!!
-
-	TInt64 firstTime( 0 );
-	aStream >> firstTime;
-    iFirstTime = firstTime;
- 	}
-
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFirstTimeDateFile::ExternalizeL
-//
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFirstTimeDateFile::ExternalizeL( RWriteStream& aStream )
-	{
-	// If you make changes here, 
-	// remember to update InternalizeL accordingly!!!
-
-	TInt64 firstTime( FirstTime().Int64() );
-	aStream << firstTime;
-	}
--- a/iaupdate/IAD/ui/src/iaupdatefirsttimeinfo.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatefirsttimeinfo.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -20,7 +20,6 @@
 
 //INCLUDES
 #include "iaupdatefirsttimeinfo.h"
-#include "iaupdatefirsttimedatefile.h"
 
 #include <bautils.h>  // bafl.lib 
 #include <s32file.h>  // estor.lib
@@ -108,19 +107,8 @@
     iAgreementAccepted = ETrue;
     WriteDataL();
     }
-    
-// ---------------------------------------------------------------------------
-// CIAUpdateFirstTimeInfo::SetAgreementAskedL
-// Set Nokia agreement as asked (prompted) to an user
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateFirstTimeInfo::SetAgreementAskedL()
-    {
-    ReadDataL();
-    iAgreementAsked = ETrue;
-    WriteDataL();
-    }
-        
+  
+       
 // ---------------------------------------------------------------------------
 // CIAUpdateFirstTimeInfo::SetAutomaticUpdatesAskedL
 // Set automatic update checks as prompted to an use
@@ -132,26 +120,6 @@
 	iAutomaticUpdateChecksAsked = ETrue;
     WriteDataL();
     }
-    
-// ---------------------------------------------------------------------------
-// CIAUpdateFirstTimeInfo::SetFirstTimeIfNotSetL
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateFirstTimeInfo::SetFirstTimeIfNotSetL()
-    {
-	if ( !AutomaticUpdateChecksAskedL() )
-	    {
-		CIAUpdateFirstTimeDateFile* firstTimeDateFile = 
-		      CIAUpdateFirstTimeDateFile::NewLC( KIAUpdateFirstTimeDateFile );
-		if ( firstTimeDateFile->FirstTime().Int64() == 0 )
-		    {
-			firstTimeDateFile->SetCurrentFirstTime();
-			firstTimeDateFile->WriteDataL();
-		    }
-		CleanupStack::PopAndDestroy( firstTimeDateFile );   
-	    }
-    }
 
 // ---------------------------------------------------------------------------
 // CIAUpdateFirstTimeInfo::AgreementAcceptedL
@@ -164,18 +132,6 @@
     return iAgreementAccepted;
     }
 
-
-// ---------------------------------------------------------------------------
-// CIAUpdateFirstTimeInfo::AgreementAskedL
-// Is Nokia agreement of Application Update already asked 
-// ---------------------------------------------------------------------------
-//
-TBool CIAUpdateFirstTimeInfo::AgreementAskedL()
-    {
-	ReadDataL();
-	return iAgreementAsked;
-    }
-
 // ---------------------------------------------------------------------------
 // CIAUpdateFirstTimeInfo::AutomaticUpdateChecksAskedL
 // Is activation for automatic update cheks from network already asked 
@@ -187,37 +143,6 @@
     return iAutomaticUpdateChecksAsked;
     }
 
-// ---------------------------------------------------------------------------
-// CIAUpdateFirstTimeInfo::FirstTimeDelayL
-// 
-// ---------------------------------------------------------------------------
-//    
-TBool CIAUpdateFirstTimeInfo::FirstTimeDelayL()
-    {
-    TBool firstTimeDelay = EFalse;
-    if ( !AutomaticUpdateChecksAskedL() )
-	    {
-		CIAUpdateFirstTimeDateFile* firstTimeDateFile = 
-		      CIAUpdateFirstTimeDateFile::NewL( KIAUpdateFirstTimeDateFile );
-    
-        TTime firstTime( firstTimeDateFile->FirstTime() );
-  
-        delete firstTimeDateFile;
-  
-        TTime expireTime( firstTime );
-
-        expireTime += KFirstTimeDelayInDays;
-    
-        TTime universalTime;
-        universalTime.UniversalTime();
-
-        if ( universalTime < expireTime && universalTime >= firstTime )
-            {
-        	firstTimeDelay = ETrue;
-            }
-	    }
-    return firstTimeDelay;	
-    }
 
 // -----------------------------------------------------------------------------
 // CIAUpdateFirstTimeInfo::ReadDataL
@@ -231,7 +156,6 @@
     if ( err == KErrNotFound )
     	{
     	iAgreementAccepted = EFalse;
-	    iAgreementAsked = EFalse;
 	    iAutomaticUpdateChecksAsked = EFalse; 
     	}
     else
@@ -282,7 +206,6 @@
 void CIAUpdateFirstTimeInfo::InternalizeL( RReadStream& aStream )
 	{
 	iAgreementAccepted = aStream.ReadInt32L();
-	iAgreementAsked = aStream.ReadInt32L();
 	iAutomaticUpdateChecksAsked = aStream.ReadInt32L();
 	}
 
@@ -295,7 +218,6 @@
 void CIAUpdateFirstTimeInfo::ExternalizeL( RWriteStream& aStream )
 	{
 	aStream.WriteInt32L( iAgreementAccepted );
-	aStream.WriteInt32L( iAgreementAsked );	
 	aStream.WriteInt32L( iAutomaticUpdateChecksAsked );
 	}
     
--- a/iaupdate/IAD/ui/src/iaupdatemainview.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatemainview.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -17,8 +17,12 @@
 */
 
 #include <hbaction.h>
-#include <QgraphicsWidget>
+#include <QGraphicsWidget>
+#include <QGraphicsLayout>
+#include <QGraphicsLayoutItem>
+#include <QGraphicsLinearLayout>
 
+#include <hbdockwidget.h>
 #include <hblistwidget.h>
 #include <hblistviewitem.h>
 #include <hblistwidgetitem.h>
@@ -28,6 +32,8 @@
 #include <xqconversions.h>
 #include <hbmessagebox.h>
 #include <hblabel.h>
+#include <hbgroupbox.h>
+#include <hbdataform.h>
 
 #include "iaupdatemainview.h"
 #include "iaupdateengine.h"
@@ -48,11 +54,17 @@
 IAUpdateMainView::IAUpdateMainView(IAUpdateEngine *engine):
 mEngine(engine)        
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::IAUpdateMainView() begin");
+    mFwListView = NULL;
+    mApplicationUpdatesGroupBox = NULL;;
+    mFwNSUGroupBox = NULL;
+    mContentDataForm = NULL;
     mDialogUtil = NULL;
     mDialogState = NoDialog;
     mPrimaryAction = NULL;
     mNode = NULL;
     mSelectionUpdate = false;
+    mSelectionConnect = false;
     
     HbDocumentLoader loader;
     bool ok = false;
@@ -62,15 +74,15 @@
     Q_ASSERT_X(ok, "Software update", "Invalid docml file");
     // Create the view from DocML
     
-    HbView* widget = qobject_cast<HbView*>(loader.findWidget("view"));
-    Q_ASSERT_X(widget != 0, "Software update", "View not found");
-    QString viewTitle(widget->title());
+    HbView* loadedWidget = qobject_cast<HbView*>(loader.findWidget("view"));
+    Q_ASSERT_X(loadedWidget != 0, "Software update", "View not found");
+    QString viewTitle(loadedWidget->title());
     // Set the IAUpdateMainView view to be the widget that was loaded from the xml
-    setWidget(widget);
+    setWidget(loadedWidget);
     setTitle(viewTitle);
       
     HbToolBar *toolBar = qobject_cast< HbToolBar*>( loader.findWidget("viewToolbar") );
-    setToolBar(toolBar);
+    //setToolBar(toolBar);
     
     HbMenu *menu = qobject_cast< HbMenu*>( loader.findWidget("viewMenu") );
     setMenu(menu);
@@ -83,21 +95,45 @@
     connect(action, SIGNAL(triggered()), this, SLOT(handleStartUpdate()));
     connect(action_1, SIGNAL(triggered()), this, SLOT(handleSettings()));
     connect(action_2, SIGNAL(triggered()), this, SLOT(handleDisclaimer()));
-
+        
+    mContent = qobject_cast< HbWidget*>( loader.findWidget("content") );
+           
     mListView = qobject_cast<HbListWidget*>( loader.findWidget("listWidget") );
     mListView->setSelectionMode( HbAbstractItemView::MultiSelection );
     
     connect( mListView, SIGNAL( longPressed( HbAbstractViewItem *, const QPointF & ) ),
             this, SLOT( handleDetails( HbAbstractViewItem *, const QPointF & ) ) ); 
-    
+        
     HbListViewItem *prototype = mListView->listItemPrototype();
 
     prototype->setGraphicsSize(HbListViewItem::LargeIcon);
+    
+    HbDockWidget *dock = new HbDockWidget(this);
+    HbWidget *dockContainer = new HbWidget(dock);
+    QGraphicsLinearLayout *dockLayout = new QGraphicsLinearLayout(dockContainer);
+    dockLayout->setOrientation(Qt::Vertical);
+    dockContainer->setLayout(dockLayout);
+    
+    mSelections = new HbGroupBox(dockContainer);
+    mSelections->setHeading("Selected 0/0 (0 kB)");
+    
+    dockLayout->addItem( mSelections);
+    
+    dockLayout->addItem(toolBar);
+    
+    dock->setWidget(dockContainer);
+    
+    setDockWidget(dock);
 
+
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::IAUpdateMainView() end");
 }
     
 IAUpdateMainView::~IAUpdateMainView()
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::~IAUpdateMainView() begin");
+    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::~IAUpdateMainView() end");
 }
 
 // -----------------------------------------------------------------------------
@@ -105,130 +141,40 @@
 // Refreshes update list
 // -----------------------------------------------------------------------------
 //    
-void IAUpdateMainView::refresh( const RPointerArray<MIAUpdateNode> &nodes,
-                                const RPointerArray<MIAUpdateFwNode> &fwNodes,
-                                int /*error*/ )
+void IAUpdateMainView::refresh(const RPointerArray<MIAUpdateNode> &nodes,
+                               const RPointerArray<MIAUpdateFwNode> &fwNodes,
+                               int error)
 {   
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh begin");
-       
-    mAllNodes.Reset();
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh() begin");
+    removeCurrentContentLayout();
         
-    if (fwNodes.Count() > 0)
-    {
-        IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh hard code importance");
-        //hardcode the importance of firmware as Critical
-        for (int i = 0; i < fwNodes.Count(); i++)
-        {
-            fwNodes[i]->Base().SetImportance(MIAUpdateBaseNode::ECritical);
-        }
-         
-        //either NSU or FOTA available
-        if (fwNodes.Count() == 1)
-        {
-            IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh either NSU or FOTA available");
-            MIAUpdateAnyNode *node = fwNodes[0];
-            mAllNodes.Append(node);
-        }
-        
-        //both NSU and FOTA available, show only FOTA node
-        if (fwNodes.Count() == 2)
+    refreshFirmwareUpdates(fwNodes);
+    
+    refreshApplicationUpdates(nodes);
+    
+    if (nodes.Count() == 0 && fwNodes.Count() == 0 && 
+        error != KErrCancel && error != KErrAbort)
+    {    
+        if (!mContentDataForm)
         {
-            IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh both NSU and FOTA available");
-            MIAUpdateAnyNode *node1 = fwNodes[0];
-            MIAUpdateFwNode *fwnode = static_cast<MIAUpdateFwNode*>(node1);
-            if (fwnode->FwType() == MIAUpdateFwNode::EFotaDp2)
-            {
-                mAllNodes.Append(node1);
-            }
-            else
-            {
-                MIAUpdateAnyNode* node2 = fwNodes[1];
-                mAllNodes.Append(node2);
-            }
+            mContentDataForm  = new HbDataForm(mContent); 
         }
-    }
-    
-   
-    for(int i = 0; i < nodes.Count(); ++i) 
-    {
-        MIAUpdateAnyNode *node = nodes[i];
-        mAllNodes.Append(node);
-    }
+        QGraphicsLinearLayout *linearLayout = (QGraphicsLinearLayout*) mContent->layout();
+        linearLayout->addItem(mContentDataForm);
+        QString formText;
         
-    mListView->clear();
-    QItemSelectionModel *selectionModel = mListView->selectionModel();  
-    selectionModel->clear();
-    HbIcon icon(QString(":/icons/qgn_menu_swupdate"));
-    
-    for(int j = 0; j < mAllNodes.Count(); ++j) 
-    {
-        MIAUpdateAnyNode *node = mAllNodes[j];
-           
-        QString importanceDescription;
-        MIAUpdateNode::TUIUpdateState uiState = MIAUpdateNode::ENormal;
-        if (node->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal)
+        if (error == KErrNone)
         {
-            MIAUpdateNode *updateNode = static_cast<MIAUpdateNode*>(node);
-            uiState = updateNode->UiState();
-        }
-        if (uiState == MIAUpdateNode::ENormal)
-        {
-            setImportance(node, importanceDescription);
+            formText = QString("Applications are up to date");
         }
         else
         {
-            if(uiState == MIAUpdateNode::EUpdated)
-            {
-                importanceDescription = "Updated";
-            }
-            else if(uiState == MIAUpdateNode::EFailed)
-            {
-                importanceDescription = "Failed";
-            }
-            else if(uiState == MIAUpdateNode::EDownloaded)
-            {
-                importanceDescription = "Downloaded";
-            }
+            formText = QString("Refreshing failed. Try again later.");
         }
-        
-        
-             
-        HbListWidgetItem *item = new HbListWidgetItem();    
-        QString name;
-        if (node->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal)
-        {  
-            MIAUpdateNode *updateNode = static_cast<MIAUpdateNode*>(node);
-            if (updateNode->UiState() == MIAUpdateNode::EDownloading)
-            {
-                name = QString("Downloading ");
-            }
-            else if (updateNode->UiState() == MIAUpdateNode::EInstalling)
-            {
-                name = QString("Installing ");
-            }
-        }
-        name.append(XQConversions::s60DescToQString(node->Base().Name()));
-        if (node->NodeType() == MIAUpdateAnyNode::ENodeTypeFw) 
-        {
-            name.append(" DEVICE SOFTWARE");
-        }
-        item->setText(name);
-        item->setSecondaryText(importanceDescription);
-        item->setIcon(icon);
-        mListView->addItem(item); 
- 
-        if (node->Base().IsSelected())
-        {
-            int count = mListView->count();
-            QModelIndex modelIndex = mListView->model()->index(count-1,0);
-            selectionModel->select(modelIndex, QItemSelectionModel::Select);
-        }
-
+        mContentDataForm->setDescription(formText);
     }
-    connect(selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
-                    this, SLOT(handleSelectionChanged(QItemSelection,QItemSelection)));     
-    
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh end");
+    updateSelectionInfoInDock();  
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh() end");
 }
 
 
@@ -237,31 +183,21 @@
 void IAUpdateMainView::handleStartUpdate()
 {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleStartUpdate() begin");
-    bool firmwareUpdate = false; 
-    RPointerArray<MIAUpdateAnyNode> selectedNodes;
-    getSelectedNodes(selectedNodes);
-    if (selectedNodes.Count() > 0)
-        {
-        if ( selectedNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
-            {
-            //the marking logic will make sure firmware won't be marked with normal sis updates
-            //at the same time.
-            firmwareUpdate = true;
-            }
-        }
-    selectedNodes.Close();
-    mEngine->StartUpdate(firmwareUpdate);
+    mEngine->StartUpdate(fotaSelected());
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleStartUpdate() end");
 }
 
 
 void IAUpdateMainView::handleSettings()
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleSettings() begin");
     emit toSettingView();
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleSettings() end");
 }
 
 void IAUpdateMainView::handleDisclaimer()
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleDisclaimer() begin");
     if (!mDialogUtil)
     {
         mDialogUtil = new IAUpdateDialogUtil(this);
@@ -271,22 +207,38 @@
         HbAction *primaryAction = new HbAction("OK");
         mDialogUtil->showAgreement(primaryAction);
     }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleDisclaimer() end");
 }
 
-void IAUpdateMainView::handleDetails( HbAbstractViewItem * item, const QPointF & )
+void IAUpdateMainView::handleDetails(HbAbstractViewItem * item, const QPointF &)
 {
- 
-    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleDetails() begin");
     int ind = item->modelIndex().row();
-    if (getNode(ind) != NULL)
+    if (getApplicationNode(ind) != NULL)
     {    
-        showDetails(*getNode(ind));
+        showDetails(*getApplicationNode(ind));
     }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleDetails() end");
+}
+
+void IAUpdateMainView::handleFotaDetails(HbAbstractViewItem *, const QPointF &)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleFotaDetails begin");
+    //only one FOTA item in a list, just use it
+    for (int i = 0; i < mFwNodes.Count(); i++)
+    {
+        if (mFwNodes[i]->FwType() == MIAUpdateFwNode::EFotaDp2)
+        {
+            showDetails(*mFwNodes[i]);
+        }
+    }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleFotaDetails end");
 }
 
 
 void IAUpdateMainView::handleSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleSelectionChanged begin");
     if (!mSelectionUpdate)
     {
         bool changedItemFound = false; 
@@ -306,11 +258,38 @@
             }
         }
     }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleSelectionChanged end");
+}
+
+void IAUpdateMainView::handleFwSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleFwSelectionChanged begin");
+    if (!mSelectionUpdate)
+    {
+        bool changedItemFound = false; 
+        QModelIndexList indexList = selected.indexes();
+        for (int i = 0; !changedItemFound && i < indexList.count(); ++i)
+        {    
+            changedItemFound = true;
+            markFotaItem(true);
+        }
+        if (!changedItemFound)
+        {
+            indexList = deselected.indexes();
+            for (int i = 0; !changedItemFound && i < indexList.count(); ++i)
+            {    
+                changedItemFound = true;
+                markFotaItem(false);
+            }
+        }
+    }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleFwSelectionChanged end");
 }
 
 
 void IAUpdateMainView::dialogFinished(HbAction *action)
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::dialogFinished begin");
     DialogState dialogState = mDialogState;
     mDialogState = NoDialog;
     
@@ -322,6 +301,7 @@
                 updateSelectionsToNodeArray(*mNode,mMark);
             }
             updateSelectionsToList();
+            updateSelectionInfoInDock();
             break;
         case CannotOmit:    
             break;
@@ -330,225 +310,264 @@
         default: 
             break;
     }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::dialogFinished end");
+}
+
+bool IAUpdateMainView::fotaSelected() const
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::fotaSelected() begin");
+    bool selected = false;
+    for (int i = 0; i < mFwNodes.Count() && !selected; ++i)
+    {
+        if ( mFwNodes[i]->FwType() == MIAUpdateFwNode::EFotaDp2 && mFwNodes[i]->Base().IsSelected() )
+        {    
+            selected = true;
+        }
+    }
+    if (selected)
+        {
+        IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::fotaSelected() Fota item is selected");
+        }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::fotaSelected() end");
+    return selected;
 }
 
 
-void IAUpdateMainView::getSelectedNodes(RPointerArray<MIAUpdateAnyNode> &selectedNodes) const
-{
-    for (int i = 0; i < mAllNodes.Count(); ++i)
-    {
-        if (mAllNodes[i]->Base().IsSelected())
-        {
-            selectedNodes.Append(mAllNodes[i]);
-        }
-    }
-}
 
 void IAUpdateMainView::markListItem(bool mark, int index)
 {
+    IAUPDATE_TRACE_2("[IAUPDATE] IAUpdateMainView::markListItem() begin mark: %d index %d", mark, index);
     if (mark)
     {
         //It's Mark Command
-        RPointerArray<MIAUpdateAnyNode> selectedNodes;
-        getSelectedNodes(selectedNodes); 
+        if (fotaSelected())
+        {    
+            //FOTA item is selected, unmark FOTA item
+            //FOTA item and application update items can't be selected at the same time 
+            markFotaItem(false);
+        }    
+    }
+       
+    bool accepted = false;
         
-        //There are selected items already and type are different with the current one
-        if (selectedNodes.Count() > 0 && (mAllNodes[index]->NodeType() != selectedNodes[0]->NodeType()))
-        {       
-            // firmware item and normal sis items can't be selected at the same time
-            // unmark the selected nodes.
-            for (int i = 0; i < selectedNodes.Count(); i++)
-            {                
-                int index = mAllNodes.Find(selectedNodes[i]);
-                mAllNodes[index]->Base().SetSelected(false);
+    if(index > -1)
+    {
+        accepted = true;
+        MIAUpdateNode* node = mNodes[index];
+        RPointerArray<MIAUpdateNode> mands;
+        RPointerArray<MIAUpdateNode> deps;
+           
+        if (mark)
+        {
+            TRAPD(err,IAUpdateDepUtils::GetDependenciesL(*node, mNodes, deps));
+            if (err != KErrNone)
+            {
+                deps.Close();
+                updateSelectionsToList();
+                IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::markListItem() return end");
+                return;
+            }
+            if (!getMandatoryNodes(mands))
+                {
+                // error when creating mandatory node list
+                mands.Close();
+                updateSelectionsToList();
+                IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::markListItem() return end");
+                return;
+                }
+        }
+        else
+        {
+            //mandatory item is not allowed to be unmarked
+            if (mNodes[index]->Base().Importance() == MIAUpdateBaseNode::EMandatory)
+            {
+                //show dialog  
+                showUpdateCannotOmitDialog();
+                updateSelectionsToList();
+                IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::markListItem() return end");
+                return;
+            }
+            TRAPD(err,IAUpdateDepUtils::GetDependantsL(*node, mNodes, deps));  
+            if (err != KErrNone)
+            {
+                deps.Close();
+                updateSelectionsToList();
+                IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::markListItem() return end");
+                return;
+            }
+            // item is not allowed to be unmarked if its dependant is mandatory
+            bool mandatoryDependantFound = false;
+            for(int i = 0; i < deps.Count() && !mandatoryDependantFound; i++)
+            {
+                if (deps[i]->Base().Importance() == MIAUpdateBaseNode::EMandatory)
+                {
+                    mandatoryDependantFound = true;
+                }
+            }
+            if (mandatoryDependantFound)
+            {
+                showUpdateCannotOmitDialog();
+                deps.Close();
+                updateSelectionsToList();
+                IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::markListItem() return end");
+                return;
             }
         }
-        selectedNodes.Close();
-    }
-    
-    //there is no selected items or the type is the same with the current one
-    
-    if (mAllNodes[index]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
-    {
-        mAllNodes[index]->Base().SetSelected(mark);   
-        updateSelectionsToList();
-        return;
-    }
-    
-    if (mAllNodes[index]->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal )
-    {
-        bool accepted = false;
-        
-        if(index > -1)
+             
+        int depCount = deps.Count();
+           
+        if (depCount > 0)
         {
-            accepted = true;
-            
-            MIAUpdateNode* node = static_cast<MIAUpdateNode*>(mAllNodes[index]);
-            RPointerArray<MIAUpdateAnyNode> mands;
-            RPointerArray<MIAUpdateNode> deps;
-           
+            QString text;
+            QString names;
+            MIAUpdateNode* depNode = NULL;
+            QString separator(",");
+                       
+            for(int i = 0; i < depCount; i++)  
+            {
+                depNode = deps[i];
+                if (i > 0)
+                {
+                    names.append(separator);
+                    names.append(QString(" "));
+                }
+                names.append(XQConversions::s60DescToQString(depNode->Base().Name()));
+            }
+
             if (mark)
             {
-                TRAPD(err,IAUpdateDepUtils::GetDependenciesL(*node, mAllNodes, deps));
-                if (err != KErrNone)
+                if (depCount > 1) 
                 {
-                    deps.Close();
-                    updateSelectionsToList();
-                    return;
+                    text.append("This update needs also updates "); 
+                    text.append(names);
+                    text.append(" for working");
+                } 
+                else
+                {
+                    text.append("This update needs also \""); 
+                    text.append(names);
+                    text.append("\" for working");
+                    }
                 }
-                if (!getMandatoryNodes(mands))
+            else
+            {
+                if (depCount > 1) 
+                {
+                    text.append("Updates "); 
+                    text.append(names);
+                    text.append(" need this update for working");
+                } 
+                else
                 {
-                    // error when creating mandatory node list
-                    mands.Close();
-                    updateSelectionsToList();
-                    return;
-                }
+                    text.append("Update \""); 
+                    text.append(names);
+                    text.append("\" needs this update for working");
+                }   
+            }
+                
+            if (mark && mNodes[index]->Base().Importance() == MIAUpdateBaseNode::EMandatory)
+            {
+                // depencencies of mandatory update are also selected without showing dialog
+                accepted = true;
             }
             else
             {
-                //mandatory item is not allowed to be unmarked
-                if (mAllNodes[index]->Base().Importance() == MIAUpdateBaseNode::EMandatory)
-                {
-                    //show dialog  
-                    showUpdateCannotOmitDialog();
-                    updateSelectionsToList();
-                    return;
-                }
-                
-                //CleanupClosePushL( deps );
-                TRAPD(err,IAUpdateDepUtils::GetDependantsL(*node, mAllNodes, deps));  
-                if (err != KErrNone)
-                {
-                    deps.Close();
-                    updateSelectionsToList();
-                    return;
-                }
-                // item is not allowed to be unmarked if its dependant is mandatory
-                bool mandatoryDependantFound = false;
-                for(int i = 0; i < deps.Count() && !mandatoryDependantFound; i++)
-                {
-                    if (deps[i]->Base().Importance() == MIAUpdateBaseNode::EMandatory)
-                    {
-                        mandatoryDependantFound = true;
-                    }
-                }
-                if (mandatoryDependantFound)
-                {
-                    showUpdateCannotOmitDialog();
-                    deps.Close();
-                    updateSelectionsToList();
-                    return;
-                }
-            }
-             
-            int depCount = deps.Count();
-           
-            if (depCount > 0)
-            {
-                QString text;
-                QString names;
-                MIAUpdateNode* depNode = NULL;
-                QString separator(",");
-                       
-                for(int i = 0; i < depCount; i++)  
-                {
-                    depNode = deps[i];
-                    if (i > 0)
-                    {
-                        names.append(separator);
-                        names.append(QString(" "));
-                    }
-                    names.append(XQConversions::s60DescToQString(depNode->Base().Name()));
-                }
-                
-
-                if (mark)
-                {
-                    if (depCount > 1) 
-                    {
-                        text.append("This update needs also updates "); 
-                        text.append(names);
-                        text.append(" for working");
-                        //resourceId = R_IAUPDATE_DEPENDENCY_MARK_MANY;
-                    } 
-                    else
-                    {
-                        text.append("This update needs also \""); 
-                        text.append(names);
-                        text.append("\" for working");
-                        //resourceId = R_IAUPDATE_DEPENDENCY_MARK_ONE;    
-                    }
-                }
-                else
-                {
-                    if (depCount > 1) 
-                    {
-                        text.append("Updates "); 
-                        text.append(names);
-                        text.append(" need this update for working");
-                        //resourceId = R_IAUPDATE_DEPENDENCY_UNMARK_MANY;
-                    } 
-                    else
-                    {
-                        text.append("Update \""); 
-                        text.append(names);
-                        text.append("\" needs this update for working");
-                        //resourceId = R_IAUPDATE_DEPENDENCY_UNMARK_ONE;  
-                    }   
-                }
-                
-                if (mark && mAllNodes[index]->Base().Importance() == MIAUpdateBaseNode::EMandatory)
-                {
-                    // depencencies of mandatory update are also selected without showing dialog
-                    accepted = true;
-                }
-                else
-                {
-                    mNode = node;
-                    mMark = mark;
-                    showDependenciesFoundDialog(text);
-                    return;
-                }
-            }
-            if (accepted)
-            {    
-                updateSelectionsToNodeArray(*node, mark);   
+                mNode = node;
+                mMark = mark;
+                accepted = false;
+                showDependenciesFoundDialog(text);
             }
         }
-        
+        if (accepted)
+        {    
+            updateSelectionsToNodeArray(*node, mark);   
+        }
     }
-    updateSelectionsToList();
+    if (accepted)
+    {    
+        updateSelectionsToList();
+        updateSelectionInfoInDock();
+    }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::markListItem() end");
 }       
-    
+
+
+void IAUpdateMainView::markFotaItem(bool mark)
+{
+    IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateMainView::markFotaItem() begin mark: %d", mark);
+    if (mark)
+    {
+        //It's Mark Command
+                
+        //if some of application update item(s) are selected, unmark them
+        //FOTA item and application update items can't be selected at the same time 
+        bool deselected = false;
+        for (int i = 0; i < mNodes.Count(); ++i)
+        {
+            if (mNodes[i]->Base().IsSelected())
+            {
+                mNodes[i]->Base().SetSelected(false);
+            }
+        } 
+        if (deselected)
+        {    
+            // umnmarked items to be updated also to UI
+            updateSelectionsToList();
+        }    
+    }
+    for (int j = 0; j < mFwNodes.Count(); ++j)
+    {    
+        if (mFwNodes[j]->FwType() == MIAUpdateFwNode::EFotaDp2)
+        {
+            mFwNodes[j]->Base().SetSelected(mark);
+            if (mark)
+            {
+                mFwListView->selectionModel()->select(mFwListView->model()->index(0,0),QItemSelectionModel::Select);
+            }
+            else
+            {
+                mFwListView->selectionModel()->select(mFwListView->model()->index(0,0),QItemSelectionModel::Deselect);
+            }
+        }
+    }
+    updateSelectionInfoInDock();
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::markFotaItem() end");
+}
+
+
+
+
+
 void IAUpdateMainView::updateSelectionsToNodeArray(MIAUpdateNode &node, bool mark)   
-{    
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::updateSelectionsToNodeArray() begin");
     RPointerArray<MIAUpdateNode> deps;  
     TInt err = KErrNone;
     if (mark)
     {
-        TRAP(err,IAUpdateDepUtils::GetDependenciesL(node, mAllNodes, deps));
+        TRAP(err,IAUpdateDepUtils::GetDependenciesL(node, mNodes, deps));
     }
     else
     {
-        TRAP(err,IAUpdateDepUtils::GetDependantsL(node, mAllNodes, deps)); 
+        TRAP(err,IAUpdateDepUtils::GetDependantsL(node, mNodes, deps)); 
     }
     if (err  == KErrNone )
     {    
         int depCount = deps.Count(); 
         for(int i = 0; i < depCount; i++)
         {
-            int depNodeInd = mAllNodes.Find(deps[i]);
-            mAllNodes[depNodeInd]->Base().SetSelected(mark);
+            int depNodeInd = mNodes.Find(deps[i]);
+            mNodes[depNodeInd]->Base().SetSelected(mark);
         }
         deps.Close();
-        int nodeInd = mAllNodes.Find(&node);
-        mAllNodes[nodeInd]->Base().SetSelected(mark);
+        int nodeInd = mNodes.Find(&node);
+        mNodes[nodeInd]->Base().SetSelected(mark);
     }                
     
     //mark all of the mandatory items
     if ( mark )
     {    
-        RPointerArray<MIAUpdateAnyNode> mands;    
+        RPointerArray<MIAUpdateNode> mands;    
         if (getMandatoryNodes(mands))
         {
             int mandCount = mands.Count();
@@ -556,14 +575,14 @@
             {
                 for(int i = 0; i < mandCount; i++)
                 {
-                    int mandNodeInd = mAllNodes.Find(mands[i]);
-                    mAllNodes[mandNodeInd]->Base().SetSelected(mark);
-                    if (mAllNodes[mandNodeInd]->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal)
+                    int mandNodeInd = mNodes.Find(mands[i]);
+                    mNodes[mandNodeInd]->Base().SetSelected(mark);
+                    if (mNodes[mandNodeInd]->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal)
                     {
                         // mark also all dependencies of a mandatory item
-                        MIAUpdateNode* dependencyNode = static_cast<MIAUpdateNode*>(mAllNodes[mandNodeInd]);
+                        MIAUpdateNode* dependencyNode = mNodes[mandNodeInd];
                         RPointerArray<MIAUpdateNode> dependencies;
-                        TRAPD(err,IAUpdateDepUtils::GetDependenciesL(*dependencyNode, mAllNodes, dependencies));
+                        TRAPD(err,IAUpdateDepUtils::GetDependenciesL(*dependencyNode, mNodes, dependencies));
                         if (err)
                         {
                             dependencies.Close(); 
@@ -572,8 +591,8 @@
                         }
                         for(int j = 0; j < dependencies.Count(); j++)
                         {
-                            int depNodeInd = mAllNodes.Find(dependencies[j]);
-                            mAllNodes[depNodeInd]->Base().SetSelected(true);
+                            int depNodeInd = mNodes.Find(dependencies[j]);
+                            mNodes[depNodeInd]->Base().SetSelected(true);
                         }
                         dependencies.Close();
                     }
@@ -581,28 +600,32 @@
             }
         }
         mands.Close();
-    }  
+    }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::updateSelectionsToNodeArray() end");
 }
 
 
-bool IAUpdateMainView::getMandatoryNodes(RPointerArray<MIAUpdateAnyNode> &mandNodes) const
+bool IAUpdateMainView::getMandatoryNodes(RPointerArray<MIAUpdateNode> &mandNodes) const
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::getMandatoryNodes() begin");
     bool ret = true;
-    for(int i = 0; i < mAllNodes.Count(); ++i)
+    for(int i = 0; i < mNodes.Count(); ++i)
     {
-        if (mAllNodes[i]->Base().Importance() == MIAUpdateBaseNode::EMandatory)
+        if (mNodes[i]->Base().Importance() == MIAUpdateBaseNode::EMandatory)
         {
-            if (mandNodes.Append(mAllNodes[i]) != KErrNone)
+            if (mandNodes.Append(mNodes[i]) != KErrNone)
             {
                 ret = false; 
             }
         }
     }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::getMandatoryNodes() end");
     return ret;
 }
 
 void IAUpdateMainView::showUpdateCannotOmitDialog()
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::showUpdateCannotOmitDialog() begin");
     HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
     messageBox->setText(QString("This required update cannot be omitted"));
     int actionCount = messageBox->actions().count();
@@ -617,10 +640,12 @@
     messageBox->setAttribute(Qt::WA_DeleteOnClose);
     mDialogState = CannotOmit;
     messageBox->open(this, SLOT(dialogFinished(HbAction*)));
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::showUpdateCannotOmitDialog() end");
 }
 
 void IAUpdateMainView::showDependenciesFoundDialog(QString &text)
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::showDependenciesFoundDialog() begin");
     HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
     HbLabel *label = new HbLabel(messageBox);
     label->setHtml(QString("Depencencies"));
@@ -643,17 +668,19 @@
     messageBox->setAttribute(Qt::WA_DeleteOnClose);
     mDialogState = Dependencies;
     messageBox->open(this, SLOT(dialogFinished(HbAction*)));
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::showDependenciesFoundDialog() end");
 }
 
 void IAUpdateMainView::updateSelectionsToList()
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::updateSelectionsToList() begin");
     mSelectionUpdate = true;
-    for(int i = 0; i < mAllNodes.Count(); ++i)
+    for(int i = 0; i < mNodes.Count(); ++i)
     {
-        if ( mAllNodes[i]->Base().IsSelected() != mListView->selectionModel()->isSelected(mListView->model()->index(i,0)))
+        if ( mNodes[i]->Base().IsSelected() != mListView->selectionModel()->isSelected(mListView->model()->index(i,0)))
         {    
             QItemSelectionModel::SelectionFlag selectionFlag;
-            if ( mAllNodes[i]->Base().IsSelected())
+            if ( mNodes[i]->Base().IsSelected())
             {
                 selectionFlag = QItemSelectionModel::Select;
             }
@@ -665,22 +692,26 @@
         }
     }
     mSelectionUpdate = false;
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::updateSelectionsToList() end");
 }
 
 
-MIAUpdateAnyNode* IAUpdateMainView::getNode(int index) const
+MIAUpdateNode* IAUpdateMainView::getApplicationNode(int index) const
 {
-    MIAUpdateAnyNode *currentNode = NULL;
+    IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateMainView::getApplicationNode() begin index: %d", index);
+    MIAUpdateNode *currentNode = NULL;
      
-    if (index >= 0 && index < mAllNodes.Count())
+    if (index >= 0 && index < mNodes.Count())
     {
-        currentNode = mAllNodes[index];
+        currentNode = mNodes[index];
     }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::getApplicationNode() end");
     return currentNode;
 }
                 
 void IAUpdateMainView::showDetails(MIAUpdateAnyNode& node)
 {  
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::showDetails() begin");
     HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
     HbLabel *label = new HbLabel(messageBox);
     label->setHtml(QString("Details"));
@@ -694,13 +725,14 @@
     messageBox->setTimeout(HbPopup::NoTimeout);
     messageBox->setAttribute(Qt::WA_DeleteOnClose);
     mDialogState = Details;
-    messageBox->open(this, SLOT(dialogFinished(HbAction*)));                
+    messageBox->open(this, SLOT(dialogFinished(HbAction*)));    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::showDetails() end");
 }                
         
 
 void IAUpdateMainView::constructDetailsText(MIAUpdateAnyNode &node, QString &text)
 {
-    
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::constructDetailsText() begin");
     text.append(QString("Name:"));
     text.append(QString("<br />"));
     QString name = XQConversions::s60DescToQString(node.Base().Name());
@@ -763,10 +795,12 @@
         fileSizeText(contentSize, textFileSize);
         text.append(textFileSize);
     }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::constructDetailsText() end");
 }
 
 void IAUpdateMainView::versionText(const TIAUpdateVersion &version, QString &versionText)
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::versionText() begin");
     QString stringMajor;
     stringMajor.setNum(version.iMajor);
     versionText.append(stringMajor);
@@ -779,10 +813,12 @@
     stringBuild.setNum(version.iBuild);
     versionText.append(stringBuild);
     versionText.append(QString(")"));
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::versionText() end");
 }
 
 void IAUpdateMainView::fileSizeText(int fileSize, QString &text)
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::fileSizeText() begin");
     int size = 0;
     QString stringUnit;
     
@@ -806,10 +842,12 @@
         }
     text.setNum(size);
     text.append(stringUnit); 
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::fileSizeText() end");
 }
 
 void IAUpdateMainView::setImportance(MIAUpdateAnyNode *node, QString &importanceDescription)
 {
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::setImportance() begin");
     int sizeInBytes = node->Base().ContentSizeL();
     int size = 0;
     bool shownInMegabytes = false;        
@@ -915,5 +953,232 @@
             break;
         }
     }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::setImportance() end");
 }    
 
+void IAUpdateMainView::removeCurrentContentLayout()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::removeCurrentContentLayout() begin");
+    int itemCount = mContent->layout()->count();
+    for (int i = 0; i < itemCount; i++)    
+    {
+        mContent->layout()->removeAt(i);
+    }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::removeCurrentContentLayout() end");    
+}
+
+void IAUpdateMainView::refreshFirmwareUpdates(const RPointerArray<MIAUpdateFwNode> &fwNodes)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshFirmwareUpdates() begin");
+    mFwNodes.Reset();
+            
+    for (int i = 0; i < fwNodes.Count(); i++)
+    {
+        MIAUpdateFwNode *fwnode = (fwNodes[i]);
+        mFwNodes.Append(fwnode);
+        fwnode->Base().SetImportance(MIAUpdateBaseNode::ECritical);
+        if (fwnode->FwType() == MIAUpdateFwNode::EFotaDp2)
+        {
+            refreshFotaUpdate(*fwnode );
+        }
+        else if (fwNodes.Count() == 1 && fwnode->FwType() == MIAUpdateFwNode::EFotiNsu)
+        {
+            refreshNsuUpdate();
+        }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshFirmwareUpdates() end");    
+    }    
+}
+
+void IAUpdateMainView::refreshFotaUpdate(MIAUpdateFwNode& fwNode)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshFotaUpdate() begin");
+    if (!mFwListView)
+    {
+        mFwListView  = new HbListWidget(mContent);
+        mFwListView->setSelectionMode( HbAbstractItemView::MultiSelection );
+        connect( mFwListView, SIGNAL( longPressed( HbAbstractViewItem *, const QPointF & ) ),
+        this, SLOT( handleFotaDetails( HbAbstractViewItem *, const QPointF & ) ) ); 
+        mFwListView->listItemPrototype()->setGraphicsSize(HbListViewItem::LargeIcon);   
+        mFwListView->listItemPrototype()->setStretchingStyle(HbListViewItem::NoStretching);
+        connect(mFwListView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
+        this, SLOT(handleFwSelectionChanged(QItemSelection,QItemSelection)));     
+    }
+    QGraphicsLinearLayout *linearLayout = (QGraphicsLinearLayout*) mContent->layout();
+    linearLayout->addItem(mFwListView);
+    mFwListView->clear();
+    QItemSelectionModel *selectionModel = mFwListView->selectionModel();  
+    selectionModel->clear();
+    HbListWidgetItem *fwItem = new HbListWidgetItem();
+    QString name(XQConversions::s60DescToQString(fwNode.Base().Name()));
+    name.append(" DEVICE SOFTWARE");
+    fwItem->setText(name);
+    QString importanceDescription;
+    setImportance(&fwNode, importanceDescription);
+    fwItem->setSecondaryText(importanceDescription);
+    HbIcon icon(QString(":/icons/qgn_menu_swupdate"));
+    fwItem->setIcon(icon);
+    if (fwNode.Base().IsSelected())
+    {
+        QModelIndex modelIndex = mFwListView->model()->index(0,0);
+        selectionModel->select(modelIndex, QItemSelectionModel::Select);
+    }
+    mFwListView->addItem(fwItem); 
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshFotaUpdate() end");
+}
+
+void IAUpdateMainView::refreshNsuUpdate()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshNsuUpdate() begin");
+    if (!mFwNSUGroupBox)
+    {
+        mFwNSUGroupBox = new HbGroupBox(mContent);
+        mFwNSUGroupBox->setHeading("Device software available");
+        HbDataForm *dataForm  = new HbDataForm(mFwNSUGroupBox); 
+        mFwNSUGroupBox->setContentWidget(dataForm);
+        dataForm->setDescription("Use your PC to update the device software ([version %L]) from address www.nokia.com/softwareupdate");
+    }
+    QGraphicsLinearLayout *linearLayout = (QGraphicsLinearLayout*) mContent->layout();
+    linearLayout->addItem(mFwNSUGroupBox);
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshNsuUpdate() end");
+}
+
+void IAUpdateMainView::refreshApplicationUpdates(const RPointerArray<MIAUpdateNode> &nodes)
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshApplicationUpdates() begin");
+    if (nodes.Count() > 0)
+    {
+        if (!mApplicationUpdatesGroupBox)
+        {
+            mApplicationUpdatesGroupBox = new HbGroupBox(mContent);
+            mApplicationUpdatesGroupBox->setHeading("Application updates");
+        }
+        QGraphicsLinearLayout *linearLayout = (QGraphicsLinearLayout*) mContent->layout();
+        linearLayout->addItem(mApplicationUpdatesGroupBox);
+        linearLayout->addItem(mListView);
+    }
+    mListView->clear();
+    QItemSelectionModel *selectionModel = mListView->selectionModel();  
+    selectionModel->clear();
+    HbIcon icon(QString(":/icons/qgn_menu_swupdate"));
+    mNodes.Reset();
+    for(int i = 0; i < nodes.Count(); ++i) 
+    {
+        MIAUpdateNode *node = nodes[i];
+        mNodes.Append(node);
+        QString importanceDescription;
+        MIAUpdateNode::TUIUpdateState uiState = node->UiState();
+        if (uiState == MIAUpdateNode::ENormal)
+        {
+            setImportance(node, importanceDescription);
+        }
+        else if (uiState == MIAUpdateNode::EUpdated)
+        {
+            importanceDescription = "Updated";
+        }
+        else if (uiState == MIAUpdateNode::EFailed)
+        {
+            importanceDescription = "Failed";
+        }
+        else if (uiState == MIAUpdateNode::EDownloaded)
+        {
+            importanceDescription = "Downloaded";
+        }
+        HbListWidgetItem *item = new HbListWidgetItem();    
+        QString name;
+        if (uiState == MIAUpdateNode::EDownloading)
+        {
+            name = QString("Downloading ");
+        }
+        else if (uiState == MIAUpdateNode::EInstalling)
+        {
+            name = QString("Installing ");
+        }
+        name.append(XQConversions::s60DescToQString(node->Base().Name()));
+        item->setText(name);
+        item->setSecondaryText(importanceDescription);
+        item->setIcon(icon);
+        mListView->addItem(item); 
+         
+        if (node->Base().IsSelected())
+        {
+            int count = mListView->count();
+            QModelIndex modelIndex = mListView->model()->index(count-1,0);
+            selectionModel->select(modelIndex, QItemSelectionModel::Select);
+        }
+    }
+    if (!mSelectionConnect)
+    {    
+        mSelectionConnect = connect(selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
+                        this, SLOT(handleSelectionChanged(QItemSelection,QItemSelection)));     
+    }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshApplicationUpdates() end");
+}
+
+void IAUpdateMainView::updateSelectionInfoInDock()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::updateSelectionInfoInDock() begin");
+    int countOfSelectedItems = 0;
+    int countOfAllItems = 0;
+    int selectedSizeInBytes = 0;
+    for (int i = 0; i < mFwNodes.Count(); ++i)
+    {
+        if (mFwNodes[i]->FwType() == MIAUpdateFwNode::EFotaDp2)
+        {
+            countOfAllItems++;
+            if (mFwNodes[i]->Base().IsSelected())
+            {
+                countOfSelectedItems++;
+                selectedSizeInBytes += mFwNodes[i]->Base().ContentSizeL();
+            }
+        }
+    } 
+    countOfAllItems += mNodes.Count();
+    for (int j = 0; j < mNodes.Count(); ++j)
+    {    
+        if (mNodes[j]->Base().IsSelected())
+        {
+            countOfSelectedItems++;
+            selectedSizeInBytes += mNodes[j]->Base().ContentSizeL();
+        }
+    }    
+    
+    int selectedSize = 0;
+    QString unit;
+    if (selectedSizeInBytes >= KMaxShownInKiloBytes)
+    {
+        unit = "MB";
+        selectedSize = selectedSizeInBytes / KMegaByte;
+        if (selectedSizeInBytes % KMegaByte != 0)
+        {
+            selectedSize++;
+        }
+    }
+    else 
+    {
+        unit = "kB";
+        selectedSize = selectedSizeInBytes / KKiloByte;
+        if (selectedSizeInBytes % KKiloByte != 0)
+        {
+            selectedSize++;
+        }
+    }
+    QString selectionString; 
+    selectionString.append("Selected ");
+    QString numText;
+    numText.setNum(countOfSelectedItems);
+    selectionString.append(numText);
+    selectionString.append("/");
+    numText.setNum(countOfAllItems);
+    selectionString.append(numText);
+    if (selectedSize > 0)
+    {
+        selectionString.append(" (");
+        numText.setNum(selectedSize);
+        selectionString.append(numText);
+        selectionString.append(" ");
+        selectionString.append(unit);
+        selectionString.append(")");
+    }
+    mSelections->setHeading(selectionString);
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::updateSelectionInfoInDock() end");
+}
--- a/iaupdate/IAD/ui/src/iaupdatenodefilter.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatenodefilter.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -213,7 +213,14 @@
                     {
                     for ( TInt i = 0; i < aFwNodes.Count(); ++i )   
                         {
-                        aFwNodes[i]->Base().SetSelected( ETrue );
+                        if ( aFwNodes[i]->FwType() == MIAUpdateFwNode::EFotiNsu )
+                            {
+                            aFwNodes[i]->Base().SetSelected( EFalse ); 
+                            }
+                        else
+                            {
+                            aFwNodes[i]->Base().SetSelected( ETrue );
+                            }
                         }
                     for ( TInt i = 0; i < aNodes.Count(); ++i )   
                         {
@@ -232,7 +239,14 @@
                 {
                 for ( TInt i = 0; i < aFwNodes.Count(); ++i )   
                     {
-                    aFwNodes[i]->Base().SetSelected( ETrue );
+                    if ( aFwNodes[i]->FwType() == MIAUpdateFwNode::EFotiNsu )
+                        {
+                        aFwNodes[i]->Base().SetSelected( EFalse ); 
+                        }
+                    else
+                        {
+                        aFwNodes[i]->Base().SetSelected( ETrue );
+                        }
                     }
                 for ( TInt i = 0; i < aNodes.Count(); ++i )   
                     {
@@ -401,16 +415,9 @@
     RPointerArray<MIAUpdateNode> deps;
     CleanupClosePushL( deps );
     
-    RPointerArray<MIAUpdateAnyNode> allNodes;
-    CleanupClosePushL( allNodes );
-    for( TInt i = 0; i < aAllNodes.Count(); ++i ) 
-        {
-        MIAUpdateAnyNode* node = aAllNodes[i];
-        User::LeaveIfError( allNodes.Append( node ) );
-        }
-    
-    IAUpdateDepUtils::GetDependenciesL( aNode, allNodes, deps );    
-    CleanupStack::PopAndDestroy( &allNodes );
+        
+    IAUpdateDepUtils::GetDependenciesL( aNode, aAllNodes, deps );    
+
     TInt depCount = deps.Count();
     for( TInt i = 0; i < depCount; i++ )
         {
--- a/iaupdate/IAD/ui/src/iaupdatesettingdialog.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatesettingdialog.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -26,8 +26,13 @@
 
 #include "iaupdatesettingdialog.h"
 #include "iaupdateprivatecrkeys.h"
+#include "iaupdate.hrh"
 
 
+const TInt KAutoUpdateOn( 0 );
+const TInt KAutoUpdateOff( 1 );
+const TInt KAutoUpdateOnInHomeNetwork( 2 );
+
 /*
 Constructor. It creates a formwidget on the view. 
 */
@@ -190,7 +195,24 @@
     
     // Set auto update check
     value = mAutoUpdateItem->contentWidgetData(QString("currentIndex")).toInt();
+    
+    // Convert ist index index to setting value
+    switch ( value )
+         {
+         case KAutoUpdateOn:
+             value = EIAUpdateSettingValueDisableWhenRoaming;
+             break;
+         case KAutoUpdateOff:
+             value = EIAUpdateSettingValueDisable;
+             break;
+         case KAutoUpdateOnInHomeNetwork:
+             value = EIAUpdateSettingValueEnable;
+             break;
+         default: 
+             break;
+         }
     err = cenrep->Set( KIAUpdateAutoUpdateCheck, value ); 
+    
     User::LeaveIfError( err );
     
     TUint32 ignore = KErrNone;
@@ -238,6 +260,23 @@
     // set auto update value
     int value = 0;
     User::LeaveIfError( cenrep->Get( KIAUpdateAutoUpdateCheck, value ) );
+    
+    // map cenrep value to index
+    switch ( value )
+         {
+         case EIAUpdateSettingValueEnable:
+             value = KAutoUpdateOn; // On 
+             break;
+         case EIAUpdateSettingValueDisable:
+             value = KAutoUpdateOff; // Off
+             break;
+         case EIAUpdateSettingValueDisableWhenRoaming:
+             value = KAutoUpdateOnInHomeNetwork; // On in home network
+             break;
+         default: 
+             break;
+         }
+    
     mAutoUpdateItem->setContentWidgetData("currentIndex", value);
     
    
--- a/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1644,10 +1644,10 @@
                 CleanupStack::Pop( nodeId );
                 
                 }
-
-            if ( iFwNodes.Count() > 0 )
+            
+	    	for ( TInt j = 0; j < iFwNodes.Count(); ++j )
                 {
-                MIAUpdateFwNode* fwNode( iFwNodes[ 0 ] );
+                MIAUpdateFwNode* fwNode( iFwNodes[ j ] );
                 CIAUpdateNodeId* nodeId = CIAUpdateNodeId::NewLC();
                 nodeId->SetIdL( fwNode->Base().MetaId() );
                 nodeId->SetNamespaceL( fwNode->Base().MetaNamespace() );
@@ -2043,9 +2043,12 @@
         // completion or timer will call the callback later. But, that callback
         // will be ignored in CIAUpdateUiController::ServerReportSent because
         // iState is already then changed from ESendingReport to something else. 
-        const TInt KServerReportMaxWaitTime( 10000000 );
-        iController->FinishedUpdatesL( ETrue, KServerReportMaxWaitTime );
-        iState = ESendingReport;
+        
+        //const TInt KServerReportMaxWaitTime( 10000000 );         //Commented TEMP 
+        //iController->FinishedUpdatesL( ETrue, KServerReportMaxWaitTime ); //Commented TEMP
+        //iState = ESendingReport;  //Commented temporarily
+        EndUpdateFlowL( KErrNone );  //TEMP
+        return;                      //TEMP  
         }
 
     // When reports are sent, EndUpdateFlowL is called via the callback functions
--- a/iaupdate/IAD/updater/group/iaupdater.mmp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/updater/group/iaupdater.mmp	Tue Jul 06 14:23:31 2010 +0300
@@ -34,6 +34,10 @@
 
 MW_LAYER_SYSTEMINCLUDE
 
+SYSTEMINCLUDE     /epoc32/include/mw/hb
+SYSTEMINCLUDE     /epoc32/include/mw/hb/hbcore 
+SYSTEMINCLUDE     /epoc32/include/mw/hb/hbwidgets
+
 USERINCLUDE     ../inc
 USERINCLUDE     ../updaterfiles/inc
 USERINCLUDE     ../../loc
@@ -55,12 +59,15 @@
 LIBRARY         apmime.lib
 LIBRARY         apparc.lib
 LIBRARY         sisregistryclient.lib
-LIBRARY         swinstcli.lib
 LIBRARY         estor.lib
 LIBRARY         commonengine.lib
 LIBRARY         ws32.lib 
 LIBRARY         ecom.lib
 
+LIBRARY         sif.lib
+LIBRARY         hbcore.lib
+LIBRARY         hbwidgets.lib
+
 // Updater files dll
 LIBRARY         iaupdaterfiles.lib
 
--- a/iaupdate/IAD/updater/inc/iaupdaterdialog.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/updater/inc/iaupdaterdialog.h	Tue Jul 06 14:23:31 2010 +0300
@@ -25,30 +25,26 @@
 #include <f32file.h>
 #include <barsc.h>
 
+#include <hbdeviceprogressdialogsymbian.h>
+
 // FORWARD DECLARATIONS
 class MIAUpdaterCancelObserver;
-
 /**
 * Class for showing the global note dialog when installing self update.
-* 
-*  @code   
-*  @endcode
-*  @lib 
-*  @since S60 
 */
-class CIAUpdaterDialog : public CActive
+class CIAUpdaterDialog : public CBase,
+                         public MHbDeviceProgressDialogObserver
     {
 public:  
         
     /**
      * Two-phased constructor.
      */
-    static CIAUpdaterDialog* NewL( RFs& aFs, MIAUpdaterCancelObserver& aObserver ); 
-
+    static CIAUpdaterDialog* NewL( MIAUpdaterCancelObserver& aObserver );
     /**
      * Two-phased constructor.
      */
-    static CIAUpdaterDialog* NewLC( RFs& aFs, MIAUpdaterCancelObserver& aObserver );
+    static CIAUpdaterDialog* NewLC( MIAUpdaterCancelObserver& aObserver );
 
             
     /**
@@ -73,60 +69,59 @@
      */
     void CancelWaitingNoteL();
 
+    /**
+     * From base class MHbDeviceProgressDialogObserver
+     */
+    void ProgressDialogCancelled(
+        const CHbDeviceProgressDialogSymbian* aProgressDialog);
+    
+    /**
+    * From base class MHbDeviceProgressDialogObserver
+    */
+    void ProgressDialogClosed(
+         const CHbDeviceProgressDialogSymbian* aProgressDialog);
+
+
 
 private:
 
     /**
      * Constructor.
      */  
-    CIAUpdaterDialog( RFs& aFs, MIAUpdaterCancelObserver& aObserver );
+    CIAUpdaterDialog( MIAUpdaterCancelObserver& aObserver );
      
     /**
      * 2nd phase constructor.
      */
     void ConstructL();
 
-
-    /**
-     * Read resource string.
-     * @since 
-     * @param aResourceId Id of the resource.
-     * @return Resource buffer.
-     */
-    HBufC* ReadResourceLC( TInt aResourceId );    
-        
-private: // from CActive
-
+    
     /**
-     * Cancels async request 
-     * @see CActive::DoCancel
-     *
+     * Destroy wait note.
      */
-    void DoCancel();
-
-    /**
-     * When the server side has finished operation, the CActive object will
-     * be informed about it, and as a result RunL will be called. This function
-     * well inform the observer that the operation has been completed.
-     * @see CActive::RunL
-     *
-     */
-    void RunL();
+    void CIAUpdaterDialog::DestroyGlobalWaitNote();
+    
 
 private: // data
 
-    // Resource file.
-    //RResourceFile iResourceFile;
-
-    // File server handle.        
-    RFs& iFs;        
-                   
-    //CAknGlobalNote* iNote;
+    /**
+     * Not owned, install observer.
+     */
+    MIAUpdaterCancelObserver* iObserver; 
+    /**
+    * Own, Global wait note.
+    */
+    CHbDeviceProgressDialogSymbian* iGlobalWaitNote;
     
-    // Dialog id for canceling dialog. 
-    TInt iNoteId;
-        
-    MIAUpdaterCancelObserver* iObserver; //not owned
+    /**
+    * Own, resouce of global note.
+    */
+    HBufC* iGlobalResource;
+    
+    /**
+     * Check Load Success .ts file successfully or not
+     */
+    TBool iIsResolverSuccess;
         
     };
 
--- a/iaupdate/IAD/updater/inc/iaupdatersilentlauncher.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/updater/inc/iaupdatersilentlauncher.h	Tue Jul 06 14:23:31 2010 +0300
@@ -24,14 +24,12 @@
 #include <f32file.h>
 #include <SWInstApi.h>
 
+#include <usif/sif/sif.h>
+
 
 /**
  * Class that handles the launching of silent installation.
  *
- *  @code   
- *  @endcode
- *  @lib 
- *  @since S60 
  */ 
 class CIAUpdaterSilentLauncher : public CBase
     {
@@ -81,13 +79,13 @@
      * @return SwiUI::TInstallOptions Options that are used for
      * silent installation.
      */
-    SwiUI::TInstallOptions SilentInstallOptionsL() const;
+    void  UsifSilentInstallOptionsL( Usif::COpaqueNamedParams * aOptions );
 
 private: //  Data
-        
-    SwiUI::RSWInstSilentLauncher iLauncher;   
     
-    SwiUI::TInstallOptionsPckg iOptionsPckg;   
+    Usif::RSoftwareInstall iLauncher;
+    Usif::COpaqueNamedParams* iOptionsPckg; 
+    Usif::COpaqueNamedParams* iResults;
 
     RFs& iFs;        
     
--- a/iaupdate/IAD/updater/src/iaupdaterdialog.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/updater/src/iaupdaterdialog.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -22,6 +22,12 @@
 #include "iaupdatercancelobserver.h"
 #include "iaupdatedebug.h"
 
+#include <hbtextresolversymbian.h>
+
+
+_LIT(KFilename, "iaupdate.ts");
+_LIT(KPath, "z://data");
+_LIT(KInstalling, "txt_software_info_installing_1"); 
 
 // ======== LOCAL FUNCTIONS ========
 
@@ -33,26 +39,23 @@
 // C++ default constructor 
 // -----------------------------------------------------------------------------
 //
-CIAUpdaterDialog::CIAUpdaterDialog( RFs& aFs, 
-                                    MIAUpdaterCancelObserver& aObserver )
-: CActive( CActive::EPriorityStandard ),
-  iFs( aFs ),
-  iObserver ( &aObserver ) 
+CIAUpdaterDialog::CIAUpdaterDialog( MIAUpdaterCancelObserver& aObserver )
+: iObserver ( &aObserver ) 
     {
-    CActiveScheduler::Add( this );
+
     }
 
 
+
 // -----------------------------------------------------------------------------
 // CIAUpdaterDialog::NewL
 // Two-phased constructor.
 // -----------------------------------------------------------------------------
 //
-CIAUpdaterDialog* CIAUpdaterDialog::NewL( RFs& aFs, 
-                                          MIAUpdaterCancelObserver& aObserver )
+CIAUpdaterDialog* CIAUpdaterDialog::NewL( MIAUpdaterCancelObserver& aObserver )
     {
     CIAUpdaterDialog* self =
-        CIAUpdaterDialog::NewLC( aFs, aObserver );
+        CIAUpdaterDialog::NewLC( aObserver );
     CleanupStack::Pop( self );
     return self;    
     }
@@ -63,11 +66,10 @@
 // Two-phased constructor.
 // -----------------------------------------------------------------------------
 //
-CIAUpdaterDialog* CIAUpdaterDialog::NewLC( RFs& aFs, 
-                                           MIAUpdaterCancelObserver& aObserver )
+CIAUpdaterDialog* CIAUpdaterDialog::NewLC( MIAUpdaterCancelObserver& aObserver )
     {
     CIAUpdaterDialog* self = 
-        new( ELeave ) CIAUpdaterDialog( aFs, aObserver );
+        new( ELeave ) CIAUpdaterDialog( aObserver );
     CleanupStack::PushL( self );
     self->ConstructL();
     return self;    
@@ -84,18 +86,8 @@
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::ConstructL begin");
     
     // Get resource file path
-    /*TFileName fileName;
-    fileName.Copy( TParsePtrC( RProcess().FileName() ).Drive() );
-    fileName.Append( KDC_APP_RESOURCE_DIR );
-    fileName.Append( IAUpdaterDefs::KIAUpdaterResourceFile );
+    iIsResolverSuccess = HbTextResolverSymbian::Init(KFilename, KPath);
     
-    // Get language of resource file        
-    BaflUtils::NearestLanguageFile( iFs, fileName );
-
-    // Open resource file
-    iResourceFile.OpenL( iFs, fileName );
-    iResourceFile.ConfirmSignatureL(); */   
-
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::ConstructL end");
     }
 
@@ -107,9 +99,7 @@
 //
 CIAUpdaterDialog::~CIAUpdaterDialog()
     {
-    Cancel();
-    //delete iNote;
-    //iResourceFile.Close();    
+    DestroyGlobalWaitNote();
     }
 
 
@@ -118,54 +108,30 @@
 // Show global waiting note during installing.
 // -----------------------------------------------------------------------------
 // 
-void CIAUpdaterDialog::ShowWaitingNoteL( const TDesC& /*aName*/, TInt /*aIndex*/, TInt /*aTotalCount*/ )
+void CIAUpdaterDialog::ShowWaitingNoteL( const TDesC& aName, TInt /*aIndex*/, TInt /*aTotalCount*/ )
 	{	
 	IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::ShowWaitingNoteL begin");
-	if ( iNoteId == 0 )
-		{ 		                             
-	    IAUPDATE_TRACE("[IAUpdater] Creating global waiting note.");
 	
-        // Get localiced string from resc. file. 
-        //HBufC* string = ReadResourceLC( R_IAUPDATER_INSTALLING ); 
-                                          
-        //HBufC* temp1 = HBufC::NewLC( string->Length() + aName.Length() );          
-        //TPtr temp1Ptr = temp1->Des();
-        
-        // Add pkg's name to string (U0).
-        //StringLoader::Format( temp1Ptr, *string, 0, aName );
-                                        
-        // Increase buffer length for the number.        
-        //HBufC* temp2 = 
-        //    HBufC::NewLC( temp1->Length() + IAUpdaterDefs::KIAUpdaterParamLen );        
-        //TPtr temp2Ptr = temp2->Des();
-         
-        // Add index number to string (N1) 
-        //StringLoader::Format( temp2Ptr, *temp1, 1, aIndex );
-                        
-        // Increase buffer length for the number.  
-        //HBufC* finalString = 
-        //    HBufC::NewLC( temp2->Length() + IAUpdaterDefs::KIAUpdaterParamLen );        
-        //TPtr finalPtr = finalString->Des();
-        
-        // Add max count number to string (N2) 
-        //StringLoader::Format( finalPtr, *temp2, 2, aTotalCount );
-        
-        //AknTextUtils::DisplayTextLanguageSpecificNumberConversion( finalPtr );         
-        //if ( !iNote )
-        //    {
-        //	iNote = CAknGlobalNote::NewL();   
-    	//    iNote->SetSoftkeys( R_AVKON_SOFTKEYS_CANCEL );
-        //    }
-     	
-	//    IAUPDATE_TRACE("[IAUpdater] Showing global waiting note.");
-    	//iNoteId = iNote->ShowNoteL( iStatus, EAknGlobalWaitNote, *finalString );
-    	SetActive();    	    	
-     
-    	//CleanupStack::PopAndDestroy( finalString );
-    	//CleanupStack::PopAndDestroy( temp2 );
-    	//CleanupStack::PopAndDestroy( temp1 );
-    	//CleanupStack::PopAndDestroy( string );
-		}
+	DestroyGlobalWaitNote();
+    
+    iGlobalWaitNote = CHbDeviceProgressDialogSymbian::NewL(
+            CHbDeviceProgressDialogSymbian::EWaitDialog );
+    
+    // loc: Load string 
+    iGlobalResource = HbTextResolverSymbian::LoadL( KInstalling, aName );
+    if ( iGlobalResource )
+        iGlobalWaitNote->SetTextL( iGlobalResource->Des() );
+
+    // Icon ?
+    //iGlobalWaitNote->SetIconNameL(const TDesC& aIconName);
+    
+    // Button ?
+    iGlobalWaitNote->SetButton(ETrue);
+    
+    iGlobalWaitNote->SetObserver( this );
+    iGlobalWaitNote->SetAutoClose(EFalse);
+    iGlobalWaitNote->ShowL();
+    
 	IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::ShowWaitingNoteL end");
 	}
 
@@ -178,50 +144,39 @@
 void CIAUpdaterDialog::CancelWaitingNoteL()
 	{
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::CancelWaitingNoteL begin");
-	
-	/*if ( iNoteId != 0 )
-		{
-        IAUPDATE_TRACE("[IAUpdater] Cancel waiting note.");
-	    iNote->CancelNoteL( iNoteId );
-	    iNoteId = 0;
-		}*/
-
+    
+    DestroyGlobalWaitNote();
+    
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::CancelWaitingNoteL end");
 	}
 
-	
-
+void CIAUpdaterDialog::ProgressDialogCancelled(
+    const CHbDeviceProgressDialogSymbian* /*aProgressDialog*/ )
+    {
     
+    iObserver->UserCancel();
     
-// ---------------------------------------------------------------------------
-// CIAUpdaterDialog:::DoCancel
-// 
-// ---------------------------------------------------------------------------
-// 
-void CIAUpdaterDialog::DoCancel()
+    }
+
+void CIAUpdaterDialog::ProgressDialogClosed(
+    const CHbDeviceProgressDialogSymbian* /*aProgressDialog*/ )
     {
-    TRAP_IGNORE( CancelWaitingNoteL() );
+    
     }
 
-// ---------------------------------------------------------------------------
-// CIAUpdateNetworkRegistration::RunL()
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdaterDialog::RunL()
+// -----------------------------------------------------------------------------
+// CIAUpdaterDialog::DestroyGlobalWaitNote
+// -----------------------------------------------------------------------------
+void CIAUpdaterDialog::DestroyGlobalWaitNote()
     {
-    IAUPDATE_TRACE_1("[IAUpdater] CIAUpdaterDialog::RunL() iStatus : %d", iStatus.Int() );
-    iNoteId = 0;
-    /*if ( iStatus.Int() == EAknSoftkeyCancel )
+    if ( iGlobalWaitNote )
         {
-    	iObserver->UserCancel();
+        iGlobalWaitNote->Close();
+        delete iGlobalWaitNote;
+        iGlobalWaitNote = NULL;
+        delete iGlobalResource;
+        iGlobalResource = NULL;
         }
-    else
-        {
-        iObserver->UserExit();	
-        }*/
     }
-
-// ======== GLOBAL FUNCTIONS ========
-
+    
 //  EOF  
--- a/iaupdate/IAD/updater/src/iaupdatermngr.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/updater/src/iaupdatermngr.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -166,7 +166,8 @@
     TBool showing( EFalse );
     User::LeaveIfError( iFs.Connect() );
     User::LeaveIfError( iWsSession.Connect( iFs ) );
-    CIAUpdaterDialog* dialogs( CIAUpdaterDialog::NewLC( iFs, *this ) );
+    //CIAUpdaterDialog* dialogs( CIAUpdaterDialog::NewLC( iFs, *this ) );
+    CIAUpdaterDialog* dialogs( CIAUpdaterDialog::NewLC( *this ) );
     if ( count > 0 )
         {
         TInt nameIndex( 0 );
--- a/iaupdate/IAD/updater/src/iaupdatersilentlauncher.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/iaupdate/IAD/updater/src/iaupdatersilentlauncher.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -43,7 +43,12 @@
 //
 void CIAUpdaterSilentLauncher::ConstructL()
     {
-    iOptionsPckg = SilentInstallOptionsL();
+    
+    iOptionsPckg = Usif::COpaqueNamedParams::NewL();
+    iResults = Usif::COpaqueNamedParams::NewL();
+    
+    UsifSilentInstallOptionsL( iOptionsPckg );    
+
     }
 
 // -----------------------------------------------------------------------------
@@ -68,6 +73,10 @@
 CIAUpdaterSilentLauncher::~CIAUpdaterSilentLauncher()
     {
     iLauncher.Close();
+    
+    delete iOptionsPckg;
+    delete iResults;
+    
     }
 
 // -----------------------------------------------------------------------------
@@ -88,7 +97,7 @@
 
     // Launch the installation   
     IAUPDATE_TRACE("[IAUpdater] Launch silent install");                    
-    iLauncher.SilentInstall( aStatus, aFile, iOptionsPckg );    
+    iLauncher.Install( aFile, *iOptionsPckg, *iResults, aStatus );
 
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterSilentLauncher::InstallL() end"); 
     }
@@ -102,71 +111,64 @@
     {
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterSilentLauncher::Cancel() begin");       
 
-    iLauncher.CancelAsyncRequest( SwiUI::ERequestSilentInstall );   
+    iLauncher.CancelOperation();
 
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterSilentLauncher::Cancel() end"); 
     }
 
-
 // ---------------------------------------------------------------------------
-// CIAUpdaterSilentLauncher::SilentInstallOptionsL
+// IAUpdateUtils::UsifSilentInstallOptionsL
 // 
 // ---------------------------------------------------------------------------
-//
-SwiUI::TInstallOptions CIAUpdaterSilentLauncher::SilentInstallOptionsL() const
+
+void  CIAUpdaterSilentLauncher::UsifSilentInstallOptionsL( 
+        Usif::COpaqueNamedParams * aOptions )
     {
-    IAUPDATE_TRACE("[IAUpdater] CIAUpdaterSilentLauncher::SilentInstallOptionsL() begin"); 
-    
-    SwiUI::TInstallOptions options;
+
+    aOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue );
 
-    // Upgrades are allowed        
-    options.iUpgrade = SwiUI::EPolicyAllowed;
-
+    // Upgrades are allowed 
+    aOptions->AddIntL( Usif::KSifInParam_AllowUpgrade, Usif::EAllowed );
+    
     // Install all if optional packets exist.
-    options.iOptionalItems = SwiUI::EPolicyAllowed;
-
+    aOptions->AddIntL( Usif::KSifInParam_InstallOptionalItems, Usif::EAllowed );
+    
     // Prevent online cert revocation check.
-    options.iOCSP = SwiUI::EPolicyNotAllowed;
+    aOptions->AddIntL( Usif::KSifInParam_PerformOCSP, Usif::ENotAllowed );
     
     // See iOCSP setting above
-    options.iIgnoreOCSPWarnings = SwiUI::EPolicyAllowed;
-
+    aOptions->AddIntL( Usif::KSifInParam_IgnoreOCSPWarnings, Usif::EAllowed );
+    
     // Do not allow installation of uncertified packages.
-    options.iUntrusted = SwiUI::EPolicyNotAllowed;
-
-    // If filetexts are included in SIS package. Then, show them.
-    options.iPackageInfo = SwiUI::EPolicyUserConfirm;
+    aOptions->AddIntL( Usif::KSifInParam_AllowUntrusted, Usif::ENotAllowed );
+    
+    // If filetexts are included in SIS package, show them.
+    aOptions->AddIntL( Usif::KSifInParam_PackageInfo, Usif::EAllowed );
     
     // Automatically grant user capabilities.
-    // See also iUntrusted above.
-    options.iCapabilities = SwiUI::EPolicyAllowed;
-
+    // See also KSifInParam_AllowUntrusted above.
+    aOptions->AddIntL( Usif::KSifInParam_GrantCapabilities, Usif::EAllowed );
+    
     // Open application will be closed.
-    options.iKillApp = SwiUI::EPolicyAllowed;
+    aOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, Usif::EAllowed );
     
     // Files can be overwritten.
-    options.iOverwrite = SwiUI::EPolicyAllowed;
+    aOptions->AddIntL( Usif::KSifInParam_AllowOverwrite, Usif::EAllowed  );
+    
+    // Incompatible allowed
+    aOptions->AddIntL( Usif::KSifInParam_AllowIncompatible, Usif::EAllowed  );
     
     // This only affects Java applications.
-    options.iDownload = SwiUI::EPolicyAllowed;
-
-    // Notice! Here we use always the same drive for the IAD.
-    // So, this will not change automatically according to the disk spaces 
-    // and when new memory cards are inserted into the phone.    
-    options.iDrive = IAUpdaterDefs::KIAUpdaterDrive;
+    aOptions->AddIntL( Usif::KSifInParam_AllowDownload, Usif::EAllowed  );
+    
+    // Where to save.
+    //aOptions->AddIntL( Usif::KSifInParam_Drive, EDriveC );
     
     // Choose the phone language.
-    options.iLang = User::Language();
-    
-    // If language is asked, then use the current phone language.
-    options.iUsePhoneLang = ETrue;
+    TLanguage lang = User::Language();
+    //aOptions->AddIntL( Usif::KSifInParam_Languages, lang ); // User::Language() );
     
-    // Does not affect SISX. This is for Java.
-    options.iUpgradeData = SwiUI::EPolicyAllowed;
-
-    IAUPDATE_TRACE("[IAUpdater] CIAUpdaterSilentLauncher::SilentInstallOptionsL() end"); 
-    
-    return options;
+    //aOptions->AddIntL( Usif::KSifInParam_Drive, IAUpdateUtils::DriveToInstallL( aUid, aSize ) );
     }
 
 
--- a/installationservices/swi/bwins/sisregistryclient_v2U.def	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/bwins/sisregistryclient_v2U.def	Tue Jul 06 14:23:31 2010 +0300
@@ -197,4 +197,5 @@
 	?GetAppUidsForComponentL@RSisRegistrySession@Swi@@QAEXAAHAAV?$RArray@VTUid@@@@@Z @ 196 NONAME ; void Swi::RSisRegistrySession::GetAppUidsForComponentL(int &, class RArray<class TUid> &)
 	?GetComponentIdForPackageL@RSisRegistrySession@Swi@@QBEHABVTDesC16@@0@Z @ 197 NONAME ; int Swi::RSisRegistrySession::GetComponentIdForPackageL(class TDesC16 const &, class TDesC16 const &) const
 	?AddEntryL@RSisRegistryWritableSession@Swi@@QAEXABVCApplicationRegistrationData@Usif@@ABVCSisRegistryPackage@2@@Z @ 198 NONAME ; void Swi::RSisRegistryWritableSession::AddEntryL(class Usif::CApplicationRegistrationData const &, class Swi::CSisRegistryPackage const &)
+	?SetComponentPresenceL@RSisRegistryWritableSession@Swi@@QAEXHH@Z @ 199 NONAME ; void Swi::RSisRegistryWritableSession::SetComponentPresenceL(int, int)
 
--- a/installationservices/swi/bwins/sisregistryclient_v2_legacyU.def	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/bwins/sisregistryclient_v2_legacyU.def	Tue Jul 06 14:23:31 2010 +0300
@@ -192,4 +192,10 @@
 	?GetEquivalentLanguagesL@RSisRegistryHelper@Swi@@QAEXW4TLanguage@@AAV?$RArray@W4TLanguage@@@@@Z @ 191 NONAME ; void Swi::RSisRegistryHelper::GetEquivalentLanguagesL(enum TLanguage, class RArray<enum TLanguage> &)
 	?GetMatchingSupportedLanguagesL@RSisRegistryWritableEntry@Swi@@QAEXAAV?$RArray@W4TLanguage@@@@@Z @ 192 NONAME ; void Swi::RSisRegistryWritableEntry::GetMatchingSupportedLanguagesL(class RArray<enum TLanguage> &)
 	?RegistryFilesL@RSisRegistryEntry@Swi@@QAEXAAV?$RPointerArray@VHBufC16@@@@@Z @ 193 NONAME ; void Swi::RSisRegistryEntry::RegistryFilesL(class RPointerArray<class HBufC16> &)
+	?GetComponentIdsForUidL@RSisRegistrySession@Swi@@QAEXAAVTUid@@AAV?$RArray@H@@@Z @ 194 NONAME ABSENT ; void Swi::RSisRegistrySession::GetComponentIdsForUidL(class TUid &, class RArray<int> &)
+	?UpdateEntryL@RSisRegistryWritableSession@Swi@@QAEXABVCApplication@2@ABVCApplicationRegistrationData@Usif@@ABVCSisRegistryPackage@2@@Z @ 195 NONAME ABSENT ; void Swi::RSisRegistryWritableSession::UpdateEntryL(class Swi::CApplication const &, class Usif::CApplicationRegistrationData const &, class Swi::CSisRegistryPackage const &)
+	?GetAppUidsForComponentL@RSisRegistrySession@Swi@@QAEXAAHAAV?$RArray@VTUid@@@@@Z @ 196 NONAME ABSENT ; void Swi::RSisRegistrySession::GetAppUidsForComponentL(int &, class RArray<class TUid> &)
+	?GetComponentIdForPackageL@RSisRegistrySession@Swi@@QBEHABVTDesC16@@0@Z @ 197 NONAME ABSENT ; int Swi::RSisRegistrySession::GetComponentIdForPackageL(class TDesC16 const &, class TDesC16 const &) const
+	?AddEntryL@RSisRegistryWritableSession@Swi@@QAEXABVCApplicationRegistrationData@Usif@@ABVCSisRegistryPackage@2@@Z @ 198 NONAME ABSENT ; void Swi::RSisRegistryWritableSession::AddEntryL(class Usif::CApplicationRegistrationData const &, class Swi::CSisRegistryPackage const &)
+	?SetComponentPresenceL@RSisRegistryWritableSession@Swi@@QAEXHH@Z @ 199 NONAME ABSENT ; void Swi::RSisRegistryWritableSession::SetComponentPresenceL(int, int)
 
--- a/installationservices/swi/eabi/sisregistryclient_v2U.def	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/eabi/sisregistryclient_v2U.def	Tue Jul 06 14:23:31 2010 +0300
@@ -220,4 +220,5 @@
 	_ZN3Swi27RSisRegistryWritableSession12UpdateEntryLERKNS_12CApplicationERKN4Usif28CApplicationRegistrationDataERKNS_19CSisRegistryPackageE @ 219 NONAME
 	_ZN3Swi27RSisRegistryWritableSession9AddEntryLERKN4Usif28CApplicationRegistrationDataERKNS_19CSisRegistryPackageE @ 220 NONAME
 	_ZNK3Swi19RSisRegistrySession25GetComponentIdForPackageLERK7TDesC16S3_ @ 221 NONAME
+	_ZN3Swi27RSisRegistryWritableSession21SetComponentPresenceLEii @ 222 NONAME
 
--- a/installationservices/swi/eabi/sisregistryclient_v2_legacyU.def	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/eabi/sisregistryclient_v2_legacyU.def	Tue Jul 06 14:23:31 2010 +0300
@@ -215,4 +215,10 @@
 	_ZN3Swi18RSisRegistryHelperC2Ev @ 214 NONAME
 	_ZN3Swi25RSisRegistryWritableEntry30GetMatchingSupportedLanguagesLER6RArrayI9TLanguageE @ 215 NONAME
 	_ZN3Swi17RSisRegistryEntry14RegistryFilesLER13RPointerArrayI7HBufC16E @ 216 NONAME
+	_ZN3Swi19RSisRegistrySession22GetComponentIdsForUidLER4TUidR6RArrayIiE @ 217 NONAME ABSENT
+	_ZN3Swi19RSisRegistrySession23GetAppUidsForComponentLERiR6RArrayI4TUidE @ 218 NONAME ABSENT
+	_ZN3Swi27RSisRegistryWritableSession12UpdateEntryLERKNS_12CApplicationERKN4Usif28CApplicationRegistrationDataERKNS_19CSisRegistryPackageE @ 219 NONAME ABSENT
+	_ZN3Swi27RSisRegistryWritableSession9AddEntryLERKN4Usif28CApplicationRegistrationDataERKNS_19CSisRegistryPackageE @ 220 NONAME ABSENT
+	_ZNK3Swi19RSisRegistrySession25GetComponentIdForPackageLERK7TDesC16S3_ @ 221 NONAME ABSENT
+	_ZN3Swi27RSisRegistryWritableSession21SetComponentPresenceLEii @ 222 NONAME ABSENT
 
--- a/installationservices/swi/inc/sisregistrywritablesession.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/inc/sisregistrywritablesession.h	Tue Jul 06 14:23:31 2010 +0300
@@ -180,6 +180,18 @@
 	*
 	*/
 	IMPORT_C void DeactivateComponentL(TComponentId aComponentId);
+	
+	/**
+    * Sets the component presence property for a given component id (If a package contains files 
+    * installed to a removable media, the package is considered as not fully present if the same
+    * media is not present. This property will be used to filter out applications, that are not
+    * fully present, from being diaplayed in the AppLib Menu.).
+    *
+    * @param aComponentId       Identifies a installed component
+    * @param aState             True, if the component is fully present, else False.
+    *
+    */
+	IMPORT_C void SetComponentPresenceL(TComponentId aComponentId, TBool aState);
 
 	/**
 	 * Adds a registry entry representing a package containing a Layered Execution Environment
--- a/installationservices/swi/source/backuprestore/backupsession.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/source/backuprestore/backupsession.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -216,7 +216,7 @@
 
 			// Appending ELangNone at the end as marker for the end of the language IDs
 			// as we also append the language ID's from other Augmentations
-			matchingSupportedLanguagesArray.Append(ELangNone);
+			matchingSupportedLanguagesArray.AppendL(ELangNone);
 
 			CleanupStack::PopAndDestroy(2, &augmentation);
 			}
--- a/installationservices/swi/source/sisregistry/client/sisregistrywritablesession.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/source/sisregistry/client/sisregistrywritablesession.cpp	Tue Jul 06 14:23:31 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"
@@ -395,4 +395,11 @@
 	TInt returnCode = SendReceive(ESetComponentState, TIpcArgs(&packageComponentId, &packageState));
 	User::LeaveIfError(returnCode);
 	}
+
+EXPORT_C void RSisRegistryWritableSession::SetComponentPresenceL(TComponentId aComponentId, TBool aState)
+    {
+    TPckgC<TComponentId> componentId(aComponentId);
+    TPckgC<TBool> componentPresence(aState);   
+    User::LeaveIfError(SendReceive(ESetComponentPresence, TIpcArgs(&componentId, &componentPresence)));
+    }
 #endif
--- a/installationservices/swi/source/sisregistry/common/sisregistryclientserver.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/source/sisregistry/common/sisregistryclientserver.h	Tue Jul 06 14:23:31 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"
@@ -74,6 +74,8 @@
 	EAddDrive,
 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 	ERemoveDrive,
+#else
+	ESetComponentPresence,
 #endif
 
 	// all clients
--- a/installationservices/swi/source/sisregistry/server/scrhelperutil.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server/scrhelperutil.cpp	Tue Jul 06 14:23:31 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"
@@ -423,7 +423,7 @@
 		TPtrC fileTargetPtr(fileTarget);
 		if (filenamesArray.SpecificFindInOrder(fileTargetPtr, descriptorsComparator, EArrayFindMode_First) != KErrNotFound)
 			continue; // Skip duplicates
-		filenamesArray.InsertInOrder(fileTargetPtr, descriptorsComparator);
+		filenamesArray.InsertInOrderL(fileTargetPtr, descriptorsComparator);
 		
 		if (IsWildcardFile(fileTarget))
 			{
--- a/installationservices/swi/source/sisregistry/server/sisregistryserversession.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server/sisregistryserversession.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -483,7 +483,10 @@
  		break;	
 	case ESetComponentState:
  		SetComponentStateL(aMessage);
- 		break;	
+ 		break;
+	case ESetComponentPresence:
+	    SetComponentPresenceL(aMessage);
+	    break;
 	case EIsFileRegistered:
  		IsFileRegisteredL(aMessage);
  		break;			
@@ -1061,6 +1064,41 @@
 	CleanupStack::PopAndDestroy();
 	}
 
+TInt CSisRegistrySession::GetStubFilesL(const TDesC& aFileName, RPointerArray<HBufC>& aFileNames)
+    {
+    // Read the ROM stub controller
+    CFileSisDataProvider* fileProvider = CFileSisDataProvider::NewLC(iFs, aFileName);
+    Swi::Sis::CController* stubController = NULL;
+    TRAPD(errCode, stubController = Swi::Sis::CController::NewL(*fileProvider));
+    if (errCode != KErrNone)
+        {
+        // Ignore the broken stub file under the ROM stub directory.
+        DEBUG_PRINTF2(_L8("Sis Registry Server - Failed to read the stub controller. Error code %d."), errCode);
+        CleanupStack::PopAndDestroy(fileProvider);
+        return errCode;
+        }
+    CleanupStack::PushL(stubController);
+    const RPointerArray<Sis::CFileDescription>& depArray = stubController->InstallBlock().FileDescriptions();
+    // Get as many number of files as possible that can be accomodate in client allocated buffer.
+    TInt totalDepArrayCount = depArray.Count();
+    // Populate the files in to a temporary array.
+    for(TInt fileCount = 0; fileCount < totalDepArrayCount; ++fileCount )
+        {
+        // Only create a TPtrC when we know we have space available
+        HBufC* fileName = depArray[fileCount]->Target().Data().AllocL();
+        // Adding drive letter of rom if not mentioned in stub sis file
+        TPtr a=fileName->Des();
+        if (a[0] == '!')
+            a[0] = 'z';                        
+                                       
+		CleanupStack::PushL(fileName);
+		aFileNames.AppendL(fileName);
+		CleanupStack::Pop(fileName);
+		}
+    CleanupStack::PopAndDestroy(2, fileProvider);
+    return KErrNone;
+    }
+
 TInt CSisRegistrySession::GetStubFileInfoL(TUid aUid, TStubExtractionMode aMode, TInt aStartingFileNo, TInt& aFileCount, RPointerArray<HBufC>& aFileNames)
     {
     TBool stubNotFound(ETrue);
@@ -1488,6 +1526,16 @@
 	aMessage.Complete(KErrNone);
 	}
 
+void CSisRegistrySession::SetComponentPresenceL(const RMessage2& aMessage)
+    {
+    TPckgBuf<Usif::TComponentId> componentId;
+    TPckgBuf<TBool> componentPresence;
+    aMessage.ReadL(EIpcArgument0, componentId, 0);
+    aMessage.ReadL(EIpcArgument1, componentPresence, 0);
+    iScrSession.SetIsComponentPresentL(componentId(), componentPresence());
+    aMessage.Complete(KErrNone);
+    }
+
 // Helper methods
 
 TBool CSisRegistrySession::IsRegisteredL(const TUid& aUid)
@@ -1547,6 +1595,13 @@
 	return ScrHelperUtil::IsUidAndNamePresentL(iScrSession, aUid, aPackageName);
 	}
 
+
+void CSisRegistrySession::RemoveEntryL(const TComponentId aCompId)
+    {
+    iScrSession.DeleteApplicationEntriesL(aCompId);
+    iScrSession.DeleteComponentL(aCompId);
+    }
+
 void CSisRegistrySession::RemoveEntryL(const CSisRegistryPackage& aPackage)
 	{
 	DEBUG_PRINTF4(_L("Sis Registry Server - Removing the entry from Software Component Registry of package : UID: 0x%08x, Name: %S, Vendor: %S ."),
@@ -1561,8 +1616,8 @@
 			aPackage.Uid().iUid, &aPackage.Name(), &aPackage.Vendor());
 		User::Leave(KErrNotFound);
 		}
-	iScrSession.DeleteApplicationEntriesL(compId);
-	iScrSession.DeleteComponentL(compId);
+	
+	RemoveEntryL(compId);
 	}
 
 void CSisRegistrySession::RemoveCleanupInfrastructureL(const CSisRegistryObject& aObject, RStsSession& aStsSession)
@@ -1744,14 +1799,11 @@
 	return compId;
 	}
 	
-void CSisRegistrySession::AddAppsFromStubL(TComponentId aCompId, TUid aUid)
+void CSisRegistrySession::AddAppsFromStubL(TComponentId aCompId, const TDesC& aFileName)
     {
-    TInt startingFileNo = 0;
-    TInt fileCount = 0;
     RPointerArray<HBufC> romFiles;
     CleanupResetAndDestroy<RPointerArray<HBufC> >::PushL(romFiles);
-    TInt ret = GetStubFileInfoL(aUid, EGetFiles, startingFileNo, fileCount, romFiles);
-
+    TInt ret = GetStubFilesL(aFileName, romFiles);
     RPointerArray<HBufC> apparcRegFiles;
     CleanupResetAndDestroy<RPointerArray<HBufC> >::PushL(apparcRegFiles);
        
@@ -2552,16 +2604,9 @@
             // If the component being removed has registered software types, unregister them now.
             // This operation deletes MIME types mapping from AppArc and therefore is not transactional.
             UnregisterSoftwareTypesL(compId);
-
-            CSisRegistryObject* object = CSisRegistryObject::NewLC();
-            ScrHelperUtil::GetComponentL(iScrSession, compId, *object);
+                
+            RemoveEntryL(compId);           
 
-            DEBUG_PRINTF4(_L("Sis Registry Server - Removing package registry entry for UID: %08x, Name: %S, Vendor %S."),
-                object->Uid().iUid, &(object->Name()), &(object->Vendor()));
-                
-            RemoveEntryL(*object);           
-
-            CleanupStack::PopAndDestroy();
             overwriteRegEntry = ETrue;
 	        }
 	    }
@@ -2571,7 +2616,7 @@
 		{
 		// update cache or just call refresh
 		TComponentId compId = AddEntryL(*object, Usif::EScrCompHidden); // EScrCompHidden is supplied not to create any log for the ROM controller on the SCR side.
-		AddAppsFromStubL(compId, object->Uid());
+		AddAppsFromStubL(compId, aFileName);
 		
 		// store a copy of the controller
 		HBufC* name = SisRegistryUtil::BuildControllerFileNameLC(object->Uid(), object->Index(),
--- a/installationservices/swi/source/sisregistry/server/sisregistryserversession.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/source/sisregistry/server/sisregistryserversession.h	Tue Jul 06 14:23:31 2010 +0300
@@ -161,12 +161,14 @@
 
 	//sets a particular component's state to the requested value
 	void SetComponentStateL(const RMessage2& aMessage);
+	void SetComponentPresenceL(const RMessage2& aMessage);
 
 	// Helper methods
 	TBool IsRegisteredL(const TUid& aUid);
 	TBool IsRegisteredL(const CHashContainer& aHashContainer);
 	TBool IsRegisteredL(const TUid& aUid, const TDesC& aPackageName);
 
+	void RemoveEntryL(const Usif::TComponentId aCompId);
 	void RemoveEntryL(const CSisRegistryPackage& aPackage);
 	void RemoveCleanupInfrastructureL(const CSisRegistryObject& aObject, Usif::RStsSession& aStsSession);
 	TBool RemoveControllerL(const CSisRegistryObject& aObject, Usif::RStsSession& aStsSession, TInt aDrive);
@@ -174,7 +176,7 @@
 	TUint FixedDrivesL() const;
 	Usif::TComponentId AddRegistryEntryL(CSisRegistryObject& aObject, Usif::RStsSession& aStsSession, const TDesC8& aController, Usif::TScrComponentOperationType aOpType);
 	Usif::TComponentId AddEntryL(CSisRegistryObject& aObject, Usif::TScrComponentOperationType aOpType);
-	void AddAppsFromStubL(Usif::TComponentId aCompId, TUid aUid);
+	void AddAppsFromStubL(Usif::TComponentId aCompId, const TDesC& aFileName);
 	void AddControllerL(const CSisRegistryObject& aObject, Usif::RStsSession& aStsSession, const TDesC8& aBuffer, const TInt aDrive);
 	void AddCleanupInfrastructureL(CSisRegistryObject& aObject, Usif::RStsSession& aStsSession, const TDesC8& aControllerBuffer);
 	TUint CreateSubsessionHandleL(const TUid& aPackageUid);
@@ -202,6 +204,7 @@
 	TBool IsFirmwareUpdatedL();	 
 	void  UpdateRecentFWVersionL(); 
 	TInt GetStubFileInfoL(TUid aUid, TStubExtractionMode aMode, TInt aStartingFileNo, TInt& aFileCount, RPointerArray<HBufC>& aFileNames);
+	TInt GetStubFilesL(const TDesC& aFileName, RPointerArray<HBufC>& aFileNames);
 
 private:
     friend class CSisRevocationManager;
--- a/installationservices/swi/source/swis/server/siscontentprovider.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/source/swis/server/siscontentprovider.cpp	Tue Jul 06 14:23:31 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"
@@ -202,7 +202,7 @@
 	for (TInt option = 0; option < options.Count(); option++)
 		{
 		const RPointerArray<CString>& names = options[option].Names();
-		ret.Append(&names[aLanguageIndex]->Data());
+		ret.AppendL(&names[aLanguageIndex]->Data());
 		}
 
 	CleanupStack::Pop(&ret);
--- a/installationservices/swi/test/swicaptests/registrycaptest.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/test/swicaptests/registrycaptest.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -492,6 +492,19 @@
 
 	TRAP(err, session.RecoverL());
 	CheckFailL(err, _L("RecoverL"));
+	
+#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
+	TRAP(err, session.SetComponentPresenceL(1, EFalse));
+	CheckFailL(err, _L("SetComponentPresenceL"));
+	
+	// Negative tests
+	//TRAP(err, session.SetComponentPresenceL(1234, EFalse));
+	//CheckFailL(err, _L("SetComponentPresenceL Negative 1"));
+    //TRAP(err, session.SetComponentPresenceL(0, EFalse));
+    //CheckFailL(err, _L("SetComponentPresenceL Negative 2"));    
+    //TRAP(err, session.SetComponentPresenceL(-1, EFalse));
+    //CheckFailL(err, _L("SetComponentPresenceL Negative 3"));
+#endif
 
 	CleanupStack::PopAndDestroy(&session);
 	}
--- a/installationservices/swi/test/swicaptests/scripts/swicaptests.ini	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/test/swicaptests/scripts/swicaptests.ini	Tue Jul 06 14:23:31 2010 +0300
@@ -1,2 +1,14 @@
 [swicaptests]
 DllName=swicaptests.dll
+
+[simple]
+sis=z:\tswi\tsis\data\simple.sis
+script=z:\tswi\tuiscriptadaptors\scripts\simple.xml
+numexist=1
+exist0=C:\Documents\InstTest\file1.txt
+
+[u_simple]
+uid=80000001
+script=z:\tswi\tuiscriptadaptors\scripts\uninstall.xml
+numnonexist=1
+nonexist0=C:\Documents\InstTest\file1.txt
--- a/installationservices/swi/test/swicaptests/scripts/swicaptests.script	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swi/test/swicaptests/scripts/swicaptests.script	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of the License "Eclipse Public License v1.0"
@@ -18,7 +18,8 @@
 PRINT Run all SWIS capability tests
 
 LOAD_SUITE aprcaptestframework
-
+LOAD_SUITE tuiscriptadaptors
+LOAD_SUITE tscr // To delete the SCR DB
 
 //! @SYMTestCaseID 		API-SEC-SWI-CapTests-I-0001
 //! @SYMTestCaseDesc 		Runs the whole suite of test cases for SWI interfaces. Both negtive and positive tests are included
@@ -28,13 +29,21 @@
 //! @SYMTestExpectedResults 	KErrPermissionDenied received on calls which should fail
 //! @SYMDevelopedForRelease 	Yankee
 
-
 START_TESTCASE API-SEC-SWI-CapTests-I-0001
 
 RUN_UTILS MkDir c:\tswi\
 RUN_UTILS MkDir c:\tswi\swicaptests
 RUN_UTILS MkDir c:\tswi\swicaptests\data
 RUN_UTILS CopyFile z:\tswi\swicaptests\data\testdoc.txt c:\tswi\swicaptests\data\testdoc.txt
+
+// Delete the existing DB and install a test pacakage (so that ComponentId of 1 is valid)
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\swicaptests\scripts\swicaptests.ini simple
+
 RUN_TEST_STEP 100 aprcaptestframework RunThoroughCapabilityChecks z:\tswi\swicaptests\scripts\swicaptests.ini swicaptests
 
+// Uninstall the test pacakage and delete the DB so that it does not interfere with remaining tests
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\swicaptests\scripts\swicaptests.ini u_simple
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+
 END_TESTCASE API-SEC-SWI-CapTests-I-0001
--- a/installationservices/swiconfig/swi/swipolicy.ini	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swiconfig/swi/swipolicy.ini	Tue Jul 06 14:23:31 2010 +0300
@@ -12,8 +12,12 @@
 UserCapabilities = NetworkServices LocalServices ReadUserData WriteUserData Location UserEnvironment 
 AllowPackagePropagate = true
 ApplicationShutdownTimeoutSeconds = 10
-RunWaitTimeoutSeconds = 180
-DeletePreinstalledFilesOnUninstall = false
+RunWaitTimeoutSeconds = 600
+DeletePreinstalledFilesOnUninstall = true
 MaxNumOfLogEntries =  5
 RemoveOnlyWithLastDependent = true
 AllowOverwriteOnRestore = false
+SISCompatibleIfNoTargetDevices = false
+AllowRunOnInstallUninstall = false
+AlternativeCodeSigningOID = 1.3.6.1.4.1.94.1.49.1.2.2.1 1.3.6.1.4.1.94.1.49.1.2.2.5
+PhoneTsyName = phonetsy
\ No newline at end of file
--- a/installationservices/swidevicetools/source/swiconsole/src/ciohandler.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swidevicetools/source/swiconsole/src/ciohandler.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-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"
@@ -433,11 +433,11 @@
 
 		if(aAllowDuplicates)
 			{
-			aIntArr.Append(number);
+			aIntArr.AppendL(number);
 			}
 		else
 			{
-			aIntArr.InsertInOrder(number);
+			aIntArr.InsertInOrderL(number);
 			}
 			
 		string.Delete(0, pos);
--- a/installationservices/swidevicetools/source/swiconsole/src/cpreferencehandler.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swidevicetools/source/swiconsole/src/cpreferencehandler.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-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,7 @@
 	{
 	CPreferences* preferences = CPreferences::NewL();
 	// Ownership transfered to iPreferenceList
-	iPreferenceList.Append(preferences);
+	iPreferenceList.AppendL(preferences);
 	return preferences;
 	}
 
--- a/installationservices/swidevicetools/source/swiconsole/src/cpreferences.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swidevicetools/source/swiconsole/src/cpreferences.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-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"
@@ -104,14 +104,14 @@
 	{
 	HBufC* ptr = aPackageName.AllocL();
 	// Ownership transfered to the list
-	iPackageNameList.Append(ptr);
+	iPackageNameList.AppendL(ptr);
 	}
 
 void CPreferences::AddVendorNameL(const TDesC& aVendorName)
 	{
 	HBufC* ptr = aVendorName.AllocL();
 	// Ownership transfered to the list
-	iVendorNameList.Append(ptr);
+	iVendorNameList.AppendL(ptr);
 	}
 
 TBool CPreferences::IsPackageNamePresent(const TDesC& aPackageName) const
--- a/installationservices/swinstallationfw/inc/sifnotification.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swinstallationfw/inc/sifnotification.h	Tue Jul 06 14:23:31 2010 +0300
@@ -462,7 +462,6 @@
         @param  aHandler A handle to the implementation of the MSifOperationsHandler class.      
                                         
         @return A pointer to the newly allocated CSifOperationsNotifier object, if creation is successful.
-                The pointer is also put onto the cleanup stack. 
      */         
     IMPORT_C static CSifOperationsNotifier* NewL(MSifOperationsHandler& aHandler);
     
--- a/installationservices/swinstallationfw/source/sifcommon.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/swinstallationfw/source/sifcommon.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1005,6 +1005,7 @@
 
 void CStringItem::ExternalizeL(RWriteStream& aStream) const
     {
+	CItemBase::ExternalizeL(aStream);
     aStream << *iString;
     }
 
--- a/installationservices/switestfw/test/autotesting/apr_bld.inf	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/switestfw/test/autotesting/apr_bld.inf	Tue Jul 06 14:23:31 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"
@@ -47,12 +47,9 @@
 
 #include "mw/appinstall/installationservices/swi/group/bld.inf"
 #include "mw/appinstall/installationservices/swidevicetools/group/bld.inf"
-#include "mw/appinstall/secureswitools/swianalysistoolkit/group/bld.inf"
-
-
 
 #endif //TOOLS2
 
-// Only the SISTOOLS (makesis/signsis) and certapp build with TOOLS2
 #include "mw/appinstall/secureswitools/swisistools/group/bld.inf"
-
+#include "mw/appinstall/secureswitools/swianalysistoolkit/group/bld.inf"
+#include "mw/appinstall/secureswitools/makekeys/group/bld.inf"
\ No newline at end of file
--- a/installationservices/switestfw/test/autotesting/test_spec_apr_9.5.txt	Wed Jun 23 18:20:02 2010 +0300
+++ b/installationservices/switestfw/test/autotesting/test_spec_apr_9.5.txt	Tue Jul 06 14:23:31 2010 +0300
@@ -349,10 +349,10 @@
 PERL, \dumpchainvalidity_test.txt,,\epoc32\winscw\c\tswi\tchainvalidity\testChainValidity.pl, 300, UDEB,,
 # DUMPINSTALLFILESTATUS test
 PERL, \dumpinstallstatus_test.txt,,\epoc32\winscw\c\tswi\tinstallfilestatus\testInstallStatus.pl, 300, UDEB,,
+# DUMPSWICERTSTORE test
+PERL, \dumpswicertstore_test.txt,,\epoc32\winscw\c\tswi\tdumpcertstore\testswiCertstore.pl, 600, UDEB,\epoc32\winscw\c\tswi\tdumpcertstore\predumpcertstoretest.bat, \epoc32\winscw\c\tswi\tdumpcertstore\postdumpcertstoretest.bat
 
 [SwiTools95Only]
-# DUMPSWICERTSTORE test
-PERL, \dumpswicertstore_test.txt,,\epoc32\winscw\c\tswi\tdumpcertstore\testswiCertstore.pl, 600, UDEB,\epoc32\winscw\c\tswi\tdumpcertstore\predumpcertstoretest.bat, \epoc32\winscw\c\tswi\tdumpcertstore\postdumpcertstoretest.bat
 # DUMPSWIREGISTRY test
 PERL, \dumpregistry_test.txt,,\epoc32\winscw\c\tswi\tdumpregistry\testregistry.pl, 300, UDEB,,
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ncdengine/engine/engine.pri	Tue Jul 06 14:23:31 2010 +0300
@@ -0,0 +1,280 @@
+
+#
+# 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: 
+#
+
+
+# Input
+HEADERS +=./transport/inc/catalogshttpdownload.h \
+					./transport/inc/catalogshttpdownloadmanagerimpl.h \
+
+SOURCES += ./src/catalogsbasemessageimpl.cpp \
+./src/catalogsclientserverserver.cpp \
+./src/catalogsclientserverserversession.cpp \
+./src/catalogsincompletemessage.cpp \
+./src/catalogsserverengine.cpp \
+./src/catalogsutils.cpp \
+./src/catalogskeyvaluepair.cpp \
+./src/catalogscontextimpl.cpp \
+./src/catalogsbigdes.cpp \
+./src/catalogsinterfacebase.cpp \
+./src/catalogsinterfaceidentifier.cpp \
+./src/catalogsstringmanager.cpp \
+./src/catalogsshutdownoperation.cpp \
+./transport/src/catalogstransportimpl.cpp \
+./transport/src/catalogshttpconfigimpl.cpp \
+./transport/src/catalogshttpheadersimpl.cpp \
+./transport/src/catalogshttpsessionimpl.cpp \
+./transport/src/catalogshttpdownloadmanagerimpl.cpp \
+./transport/src/catalogshttpdownload.cpp \
+./transport/src/catalogshttptransaction.cpp \
+./transport/src/catalogshttptransactionmanagerimpl.cpp \
+./transport/src/catalogshttpstack.cpp \
+./transport/src/catalogshttpsessionmanagerimpl.cpp \
+./transport/src/catalogshttpconnectioncreator.cpp \
+./transport/src/catalogshttpconnectionmanager.cpp \
+./transport/src/catalogssmssessionimpl.cpp \
+./transport/src/catalogssmsoperationimpl.cpp \
+./transport/src/catalogssmssender.cpp \
+./transport/src/catalogssmsutils.cpp \
+./transport/src/catalogsnetworkmanager.cpp \
+./transport/src/catalogsconnectioneventsink.cpp \
+./transport/src/catalogshttprequestparser.cpp \
+./transport/src/catalogshttprequestadapter.cpp \
+./transport/src/catalogshttpresponsecomposer.cpp \
+./transport/src/catalogshttputils.cpp \
+./transport/src/catalogsconnection.cpp \
+./accesspointmanager/src/catalogsaccesspointmanagerimpl.cpp \
+./accesspointmanager/src/catalogsaccesspoint.cpp \
+./accesspointmanager/src/catalogsaccesspointsettings.cpp\
+./accesspointmanager/src/catalogsaccesspointmap.cpp \
+./accesspointmanager/src/catalogsclientaccesspointdata.cpp \
+./accesspointmanager/src/catalogsremoveaccesspointshutdownoperation.cpp \
+../provider/server/src/ncdcommunicable.cpp \
+../provider/server/src/ncdproviderimpl.cpp \
+../provider/server/src/ncdnodemanager.cpp \
+../provider/server/src/ncdnodedbmanager.cpp \
+../provider/server/src/ncdoperationmanager.cpp \
+../provider/server/src/ncdnodeimpl.cpp \
+../provider/server/src/ncdnodefolder.cpp \
+../provider/server/src/ncdparentoftransparentnode.cpp \
+../provider/server/src/ncdnodetransparentfolder.cpp \
+../provider/server/src/ncdnodeitem.cpp \
+../provider/server/src/ncdrootnode.cpp \
+../provider/server/src/ncdnodemetadataimpl.cpp \
+../provider/server/src/ncdnodeitemmetadata.cpp \
+../provider/server/src/ncdnodefoldermetadata.cpp \
+../provider/server/src/ncdnodedisclaimer.cpp \
+../provider/server/src/ncdnodeiconimpl.cpp \
+../provider/server/src/ncdnodescreenshotimpl.cpp \
+../provider/server/src/ncdnodeskinimpl.cpp \
+../provider/server/src/ncdnodelink.cpp \
+../provider/server/src/ncdnodeitemlink.cpp \
+../provider/server/src/ncdnodefolderlink.cpp \
+../provider/server/src/ncdnodeidentifier.cpp \
+../provider/server/src/ncdnodeuserdataimpl.cpp \
+../provider/server/src/ncdnodedownloadimpl.cpp \
+../provider/server/src/ncdnodeupgradeimpl.cpp \
+../provider/server/src/ncdnodedependencyimpl.cpp \
+../provider/server/src/ncdnodecachecleaner.cpp \
+../provider/server/src/ncdnodecachecleanermanager.cpp \
+../provider/server/src/ncdnodefactory.cpp \
+../provider/server/src/ncdnodeidentifiereditor.cpp \
+../provider/server/src/ncddbmaxsizemap.cpp \
+../provider/server/src/ncdbaseoperation.cpp \
+../provider/server/src/ncdloadnodeoperationimpl.cpp \
+../provider/server/src/ncdloadrootnodeoperationimpl.cpp \
+../provider/server/src/ncdsendableprogress.cpp \
+../provider/server/src/ncdconfigurationmanagerimpl.cpp \
+../provider/server/src/ncdpurchaseoperationimpl.cpp \
+../provider/server/src/ncdpurchaseoptionimpl.cpp \
+../provider/server/src/ncdserversubscription.cpp \
+../provider/server/src/ncdserverpartofsubscription.cpp \
+../provider/server/src/ncdserverupgrade.cpp \
+../provider/server/src/ncdserversubscribablecontent.cpp \
+../provider/server/src/ncdnodeinstallimpl.cpp \
+../provider/server/src/ncdinstalloperationimpl.cpp \
+../provider/server/src/ncdnodecontentinfoimpl.cpp \
+../provider/server/src/ncdnodeuricontentimpl.cpp \
+../provider/server/src/ncdinstallinfo.cpp \
+../provider/server/src/ncdfileinfo.cpp \
+../provider/server/src/ncdsubscriptionmanagerimpl.cpp \
+../provider/server/src/ncdclientssubscriptions.cpp \
+../provider/server/src/ncdsubscriptiongroup.cpp \
+../provider/server/src/ncdsubscriptionimpl.cpp \
+../provider/server/src/ncdsubscriptionoperationimpl.cpp \
+../provider/server/src/ncdsubscriptionssourceidentifier.cpp \
+../provider/server/src/ncdrightsobjectoperationimpl.cpp \
+../provider/server/src/ncdnodepreviewimpl.cpp \
+../provider/server/src/ncdserveraddress.cpp \
+../provider/server/src/ncdsearchoperationimpl.cpp \
+../provider/server/src/ncdsearchnodeitem.cpp \
+../provider/server/src/ncdsearchnodefolder.cpp \
+../provider/server/src/ncdsearchnodebundle.cpp \
+../provider/server/src/ncdbundlefolder.cpp \
+../provider/server/src/ncdpreviewmanager.cpp \
+../provider/server/src/ncdchildentity.cpp \
+../provider/server/src/ncdchildentitymap.cpp \
+../provider/server/src/ncdsearchrootnode.cpp \
+../provider/server/src/ncdproviderutils.cpp \
+../provider/server/src/ncdserverdetailsimpl.cpp \
+../provider/server/src/ncdcontentdescriptor.cpp \
+../provider/server/src/ncdsubscriptiondatacompleter.cpp \
+../provider/server/src/ncdnodesupplier.cpp \
+../provider/server/src/ncdnodesupplierlink.cpp \
+../provider/server/src/ncddownloadinfo.cpp \
+../provider/server/src/ncdextendedinstallinfo.cpp \
+../provider/server/src/ncdloadbundlenodeoperationimpl.cpp \
+../provider/server/src/ncddependencyinfo.cpp \
+../provider/server/src/ncdfavoritemanagerimpl.cpp \
+../provider/server/src/ncdreportmanager.cpp \
+../provider/server/src/ncdreport.cpp \
+../provider/server/src/ncdreportdownload.cpp \
+../provider/server/src/ncdreportomadownload.cpp \
+../provider/server/src/ncdreportinstall.cpp \
+../provider/server/src/ncdnodeseeninfo.cpp \
+../provider/server/src/ncdnodeseenimpl.cpp \
+../provider/server/src/ncdnodeseenfolderimpl.cpp \
+../provider/server/src/ncdnodeidentifierutils.cpp \
+../provider/server/src/ncdpurchasehistoryutils.cpp \
+../provider/server/src/ncdcreateaccesspointoperationimpl.cpp \
+../provider/server/src/ncdsendhttprequestoperationimpl.cpp \
+../provider/server/src/ncdhttputils.cpp \
+../provider/server/src/ncdserverreportoperationimpl.cpp \
+../provider/server/src/ncdserverreportmanagerimpl.cpp \
+../provider/server/src/ncdprovidermanager.cpp \
+../provider/server/src/ncdgeneralmanager.cpp \
+../provider/server/src/ncddownloadoperationimpl.cpp \
+../provider/server/src/ncdbasedownloadhandler.cpp \
+../provider/server/src/ncdskindownloadhandler.cpp \
+../provider/server/src/ncdfilestoragefilehandler.cpp \
+../provider/server/src/ncddatabasefilehandler.cpp \
+../provider/server/src/ncdicondownloadhandler.cpp \
+../provider/server/src/ncdfiledownloadhandler.cpp \
+../provider/server/src/ncdpreviewdownloadhandler.cpp \
+../provider/server/src/ncdscreenshotdownloadhandler.cpp \
+../provider/server/src/ncdcontentdownloadoperation.cpp \
+../provider/server/src/ncddownloadsuboperation.cpp \
+../provider/server/src/ncddescriptordownloadsuboperation.cpp \
+../provider/server/src/ncdconfigurationparser.cpp \
+../provider/server/src/ncdengineconfigurationimpl.cpp \
+../provider/client/src/ncdqueryimpl.cpp \
+../provider/client/src/ncdqueryitemimpl.cpp \
+../provider/client/src/ncdquerytextitemimpl.cpp \
+../provider/client/src/ncdquerynumericitemimpl.cpp \
+../provider/client/src/ncdqueryselectionitemimpl.cpp \
+../provider/client/src/ncdquerypincodeitemimpl.cpp \
+../provider/client/src/ncdqueryoptionimpl.cpp \
+../provider/client/src/ncdexpirednode.cpp \
+../provider/client/src/ncdlocalizerutils.cpp \
+../provider/storage/src/ncdstoragemanagerimpl.cpp \
+../provider/storage/src/ncdstorageimpl.cpp \
+../provider/storage/src/ncdstorageclientimpl.cpp \
+../provider/storage/src/ncddbstoragemanager.cpp \
+../provider/storage/src/ncdstoragefiledataitem.cpp \
+../provider/storage/src/ncdfilestorageimpl.cpp \
+../provider/storage/src/ncdstoragebase.cpp \
+../provider/storage/src/ncddatabasestorageimpl.cpp \
+../provider/storage/src/ncdstoragedescriptordataitem.cpp \
+../provider/protocol/src/ncdparserimpl.cpp \
+../provider/protocol/src/ncdparserfactory.cpp \
+../provider/protocol/src/ncdprotocoldefaultobserverimpl.cpp \
+../provider/protocol/src/ncd_pp_iconimpl.cpp \
+../provider/protocol/src/ncd_pp_skinimpl.cpp \
+../provider/protocol/src/ncd_parser_pp_response.cpp \
+../provider/protocol/src/ncd_parser_pp_entityref.cpp \
+../provider/protocol/src/ncd_parser_pp_embeddeddata.cpp \
+../provider/protocol/src/ncd_parser_pp_datablocks.cpp \
+../provider/protocol/src/ncd_parser_pp_purchaseoption.cpp \
+../provider/protocol/src/ncd_parser_pp_dataentity.cpp \
+../provider/protocol/src/ncd_parser_pp_dataentitycontent.cpp \
+../provider/protocol/src/ncd_parser_pp_entitydependency.cpp \
+../provider/protocol/src/ncd_parser_pp_download.cpp \
+../provider/protocol/src/ncd_parser_pp_rights.cpp \
+../provider/protocol/src/ncd_parser_pp_information.cpp \
+../provider/protocol/src/ncd_parser_pp_messages.cpp \
+../provider/protocol/src/ncd_parser_pp_moreinfo.cpp \
+../provider/protocol/src/ncd_parser_pp_purchase.cpp \
+../provider/protocol/src/ncd_parser_pp_purchaseinformation.cpp \
+../provider/protocol/src/ncd_parser_pp_purchaseprocessed.cpp \
+../provider/protocol/src/ncd_parser_pp_purchaseentity.cpp \
+../provider/protocol/src/ncd_parser_pp_payment.cpp \
+../provider/protocol/src/ncd_parser_pp_expiredcacheddata.cpp \
+../provider/protocol/src/ncd_parser_pp_subscriptionreport.cpp \
+../provider/protocol/src/ncd_parser_pp_subscription.cpp \
+../provider/protocol/src/ncd_parser_pp_subscriptiondetails.cpp \
+../provider/protocol/src/ncd_parser_cp_actionrequest.cpp \
+../provider/protocol/src/ncd_parser_cp_response.cpp \
+../provider/protocol/src/ncd_parser_cp_capabilities.cpp \
+../provider/protocol/src/ncd_parser_cp_clientconfiguration.cpp \
+../provider/protocol/src/ncd_parser_cp_cookie.cpp \
+../provider/protocol/src/ncd_parser_cp_detail.cpp \
+../provider/protocol/src/ncd_parser_cp_details.cpp \
+../provider/protocol/src/ncd_parser_cp_error.cpp \
+../provider/protocol/src/ncd_parser_cp_query.cpp \
+../provider/protocol/src/ncd_parser_cp_queryelement.cpp \
+../provider/protocol/src/ncd_parser_cp_serverdetails.cpp \
+../provider/protocol/src/ncd_pp_folderrefimpl.cpp \
+../provider/protocol/src/ncd_pp_itemrefimpl.cpp \
+../provider/protocol/src/ncd_pp_datablockimpl.cpp \
+../provider/protocol/src/ncd_pp_dataentityimpl.cpp \
+../provider/protocol/src/ncd_pp_dataentitycontentimpl.cpp \
+../provider/protocol/src/ncd_pp_entitydependencyimpl.cpp \
+../provider/protocol/src/ncd_pp_embeddeddataimpl.cpp \
+../provider/protocol/src/ncd_pp_expiredcacheddataimpl.cpp \
+../provider/protocol/src/ncd_pp_informationimpl.cpp \
+../provider/protocol/src/ncd_pp_purchaseoptionimpl.cpp \
+../provider/protocol/src/ncd_pp_subscriptionimpl.cpp \
+../provider/protocol/src/ncd_pp_subscriptiondetailsimpl.cpp \
+../provider/protocol/src/ncd_pp_downloadimpl.cpp \
+../provider/protocol/src/ncd_pp_descriptorimpl.cpp \
+../provider/protocol/src/ncd_pp_rightsimpl.cpp \
+../provider/protocol/src/ncd_pp_purchaseimpl.cpp \
+../provider/protocol/src/ncd_pp_purchaseinformationimpl.cpp \
+../provider/protocol/src/ncd_pp_purchaseprocessedimpl.cpp \
+../provider/protocol/src/ncd_pp_purchaseentityimpl.cpp \
+../provider/protocol/src/ncd_pp_paymentimpl.cpp \
+../provider/protocol/src/ncd_pp_smsdetailsimpl.cpp \
+../provider/protocol/src/ncd_cp_actionrequestimpl.cpp \
+../provider/protocol/src/ncd_cp_clientconfigurationimpl.cpp \
+../provider/protocol/src/ncd_cp_cookieimpl.cpp \
+../provider/protocol/src/ncd_cp_detailimpl.cpp \
+../provider/protocol/src/ncd_cp_errorimpl.cpp \
+../provider/protocol/src/ncd_pp_errorimpl.cpp \
+../provider/protocol/src/ncd_cp_queryimpl.cpp \
+../provider/protocol/src/ncd_cp_queryelementimpl.cpp \
+../provider/protocol/src/ncd_cp_queryoptionimpl.cpp \
+../provider/protocol/src/ncd_cp_queryresponseimpl.cpp \
+../provider/protocol/src/ncd_cp_serverdetailsimpl.cpp \
+../provider/protocol/src/ncdsubparser.cpp \ 
+../provider/protocol/src/ncdtoplevelparser.cpp \
+../provider/protocol/src/ncdunknownparser.cpp \
+../provider/protocol/src/ncdprotocolutils.cpp \
+../provider/protocol/src/ncdparserobserverbundleimpl.cpp \
+../provider/protocol/src/ncdprotocolimpl.cpp \
+../provider/protocol/src/ncdsessionhandler.cpp \
+../provider/protocol/src/ncdstring.cpp \
+../provider/protocol/src/ncdrequestgenerator.cpp \
+../provider/protocol/src/ncdrequestbase.cpp \
+../provider/protocol/src/ncdrequestbrowsesearch.cpp \
+../provider/protocol/src/ncdrequestconfiguration.cpp \
+../provider/protocol/src/ncdrequestconfigurationdata.cpp \
+../provider/protocol/src/ncdrequestpurchase.cpp \
+../provider/protocol/src/ncdrequestmanagesubscriptions.cpp \
+../provider/protocol/src/ncdrequestinstallation.cpp \
+../provider/purchasehistory/src/ncdpurchasehistorydbimpl.cpp \
+../provider/src/ncdkeyvaluemap.cpp \
+../provider/src/ncdpurchasedetails.cpp \
+../provider/src/ncddelay.cpp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ncdengine/engine/engine.pro	Tue Jul 06 14:23:31 2010 +0300
@@ -0,0 +1,58 @@
+
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors: 
+#
+# Description: 
+#
+
+include ( engine.pri )
+
+IncludeBlock = \
+	"$${LITERAL_HASH}include <data_caging_paths.hrh>" \
+	"$${LITERAL_HASH}include <platform_paths.hrh>"  \
+	"$${LITERAL_HASH}include <../inc/catalogsuids.h>" \
+	"$${LITERAL_HASH}include <./inc/build_config.mmpi>" 
+
+
+TEMPLATE = app
+TARGET = ncdserver_20019119
+CONFIG += qt
+ 
+symbian: { 
+	TARGET.CAPABILITY = CAP_APPLICATION 
+	TARGET.VID = VID_DEFAULT
+	TARGET.UID3 = 0x20019119
+	TARGET.EPOCALLOWDLLDATA = 1
+	INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+	INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+	INCLUDEPATH +=   ../provider/inc 
+	INCLUDEPATH +=   ../provider/server/inc 
+	INCLUDEPATH +=   ../provider/client/inc
+	INCLUDEPATH +=   ../provider/storage/inc
+	INCLUDEPATH +=   ../provider/protocol/inc
+	INCLUDEPATH +=   ../provider/deviceinteraction/inc
+	INCLUDEPATH +=   ../provider/purchasehistory/inc
+	
+	INCLUDEPATH +=   ../inc
+	INCLUDEPATH +=   ../engine/inc
+	INCLUDEPATH +=   ../engine/transport/inc
+	INCLUDEPATH +=   ../engine/accesspointmanager/inc
+	INCLUDEPATH += /epoc32/include/platform/mw/cwrt
+	INCLUDEPATH += /epoc32/include/ecom
+
+	LIBS += -lcommonui -lWrtDownloadMgr -lapmime -lcmmanager -lecom -lapengine -lmsgs -lsmcm -lgsmu -linetprotutil 
+	LIBS += -lhttpfiltercommon -lecom -lhttp -lesock -lcommdb -lsysutil -lhash -lestlib -lestor -lbafl -lplatformenv
+	LIBS += -lXmlEngineUtils  -lXmlEngineDOM -lXmlEngine -lXmlInterface -lxmlframework  -lcharconv -ledbms -lefsrv
+  LIBS += -lncdutils_20019119 -lncddevicemgmt_20019119
+}
--- a/ncdengine/engine/group/bld.inf	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/engine/group/bld.inf	Tue Jul 06 14:23:31 2010 +0300
@@ -20,7 +20,7 @@
 catalogsdebug.mmp
 ncdutils.mmp
 ncddevicemgmt.mmp
-catalogsserver.mmp
+//catalogsserver.mmp
 catalogsengine.mmp
 catalogsproxy.mmp
 catalogsundertaker.mmp
--- a/ncdengine/engine/group/ncddevicemgmt.mmp	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/engine/group/ncddevicemgmt.mmp	Tue Jul 06 14:23:31 2010 +0300
@@ -86,7 +86,7 @@
 LIBRARY         avkon.lib
 LIBRARY         etel3rdparty.lib 
 LIBRARY         apgrfx.lib
-LIBRARY         swinstcli.lib           // Silent install
+//LIBRARY         swinstcli.lib           // Silent install
 LIBRARY         sif.lib // SIF installer
 LIBRARY         scrclient.lib  //Registry client
 //LIBRARY         widgetregistryclient.lib // Widget Registry
--- a/ncdengine/engine/transport/inc/catalogshttpdownload.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/engine/transport/inc/catalogshttpdownload.h	Tue Jul 06 14:23:31 2010 +0300
@@ -20,7 +20,8 @@
 #define C_CATALOGSHTTPDOWNLOAD_H
 
 #include <DownloadMgrClient.h>
-
+#include <download.h>
+#include <downloadevent.h>
 #include <s32file.h>
 
 #include "catalogshttpoperation.h"
@@ -33,7 +34,8 @@
 class CCatalogsHttpHeaders;
 class CCatalogsKeyValuePair;
 class CCatalogsHttpDownloadManager;
-
+class CCatalogsHttpQTDownload;
+using namespace WRT;
 /**
 * HTTP file download implementation
 *
@@ -77,7 +79,7 @@
     */
     static CCatalogsHttpDownload* NewLC( 
         CCatalogsHttpDownloadManager& aOwner, 
-        RHttpDownload* aDownload,
+        Download* aDownload,
         const CCatalogsHttpConfig& aConfig );
 
 
@@ -238,7 +240,8 @@
      */
     TInt StatusCode() const;        
     
-    
+    TDownloadDeleteState GetStatusState();
+    Download* GetDownload();
     /**
      * Not supported
      * @see MCatalogsHttpOperation::StatusText()
@@ -282,7 +285,9 @@
         
     TBool HandleHttpError( MCatalogsHttpOperation& aOperation, 
         TCatalogsHttpError aError );
-            
+
+     void HandledownloadEventL(DownloadEvent& aEvent);   
+              
 public:     
 
     /**
@@ -321,7 +326,7 @@
     */
     CCatalogsHttpDownload( 
         CCatalogsHttpDownloadManager& aOwner, 
-        RHttpDownload* aDownload );
+        Download* aDownload );
     
     /**
     * 2nd phase constructor
@@ -509,13 +514,14 @@
 
     CCatalogsHttpDownloadManager& iOwner;
     TCatalogsTransportOperationId iId;  // Operation id
-    RHttpDownload* iDownload;           // Platform download
+    Download* iDownload;           // Platform download
     CCatalogsHttpConfig* iConfig;       // Configuration
     MCatalogsHttpObserver* iObserver;   // Observer        
     TCatalogsHttpEvent iState;          // State of the download
     HBufC8* iUri;                       // Current URI
     HBufC8* iEncodedUri;                // Current URI as encoded
     CCatalogsHttpHeaders* iResponseHeaders; // Headers from HTTP response
+    CCatalogsHttpQTDownload* iQTDownload;
     
     // added request headers not supported by DL man
     HBufC8* iAddedRequestHeaders;       
@@ -555,7 +561,7 @@
     // For managing async pause with dlmgr.
     TBool iPausePending;
     TBool iQueuedResume;
-    
+    TDownloadDeleteState iStatus;
 protected:
 
     // Grant access to UpdateContentType
@@ -563,4 +569,18 @@
     
     };
 
+class  CCatalogsHttpQTDownload: public QObject
+	{
+		 Q_OBJECT
+		 	public:
+		 		CCatalogsHttpQTDownload(CCatalogsHttpDownload* aHttpDownload,Download* aDownload);
+	    public slots:
+    	void downloadEvent(WRT::DownloadEvent*);
+    	void downloadError(WRT::Error);
+	    public:
+	    	CCatalogsHttpDownload* iCatalogsHttpDownload;
+	    	Download* iDownload;           // Platform download
+	};
+	
+	
 #endif // C_CATALOGSHTTPDOWNLOAD_H
--- a/ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h	Tue Jul 06 14:23:31 2010 +0300
@@ -24,9 +24,12 @@
 #include "catalogstransportoperationid.h"
 #include "catalogshttpsession.h"    // RCatalogsHttpOperationArray
 #include "catalogshttpsessionmanager.h"
+
 #include "catalogsconnectionmethod.h"
 #include "catalogsaccesspointobserver.h"
-
+#include <download.h>
+#include <downloadmanager.h>
+#include <QObject>
 class MCatalogsHttpConfig;
 class CCatalogsHttpConfig;
 class CCatalogsHttpDownload;
@@ -38,16 +41,22 @@
 class CCatalogsHttpSession;
 class CCatalogsConnection;
 class CCatalogsNetworkManager;
+class CCatalogsHttpQTDownloadManager;
+using namespace WRT;
+
+const TInt KNCDEngineAppID = 0X2002E685;
+
 
 /**
  * HTTP file download manager
  *
  */
 class CCatalogsHttpDownloadManager :       
+
     public CActive, 
-    public MHttpDownloadMgrObserver,
     public MCatalogsAccessPointObserver  
     {
+  
     public: // Constructors and destructor
     
         /**
@@ -69,7 +78,7 @@
         * Destructor
         */
         virtual ~CCatalogsHttpDownloadManager();
-        
+         
     public: // New methods
     
 	    /**
@@ -159,7 +168,7 @@
 
         void AddRef();
 
-
+		DownloadManager* GetDownloadManager();
         TInt Release();    
         
         void SetConnectionMethodL( 
@@ -202,15 +211,9 @@
         
         TInt NewDownloadId();
         
-        RHttpDownload& CreatePlatformDownloadL( const TDesC8& aUrl );
-    
-    public: // From MHttpDownloadMngrObserver
-     
-        /**
-        * Handles events from Download manager 
-        */
-        virtual void HandleDMgrEventL( RHttpDownload& aDownload,
-			THttpDownloadEvent aEvent );    
+       WRT::Download& CreatePlatformDownloadL( const TDesC8& aUrl );
+      void downloadMgrEventRecieved(WRT::DownloadEvent* dlmEvent);
+
 
 
     public: // from MCatalogsAccessPointObserver
@@ -316,8 +319,7 @@
          * Deletes downloads that have not been paused by the user
          */
         void DeleteHangingDownloads();
-        
-        
+
     private:
     
         MCatalogsHttpSessionManager& iManager;
@@ -326,8 +328,9 @@
         CCatalogsHttpConnectionManager& iConnectionManager;
         CCatalogsNetworkManager* iNetworkManager; // Not owned
         TInt32 iSessionId;
-        RHttpDownloadMgr iDmgr;
-        
+        DownloadManager *iDmgr;
+        CCatalogsHttpQTDownloadManager* iQTmgr;
+        WRT::Download* iDownload;           // Platform download
         // All downloads except those that are in Restored
         RCatalogsHttpOperationArray iDownloads;
         RCatalogsHttpOperationArray iRestoredDownloads;
@@ -344,4 +347,18 @@
         TInt iCurrentDlId; // id of the last created download
     };
 
-#endif // C_CATALOGSHTTPDOWNLOADMANAGER_H
+
+
+class  CCatalogsHttpQTDownloadManager: public QObject
+	{
+		 Q_OBJECT
+		 	public:
+		 		CCatalogsHttpQTDownloadManager(CCatalogsHttpDownloadManager* aDownloadManager,DownloadManager* aDmgr);
+	    public slots:
+    	void downloadMgrEventRecieved(WRT::DownloadEvent*);
+	    public:
+	    	CCatalogsHttpDownloadManager* iDownloadManager;
+	    	DownloadManager* iDmgr ;
+	};
+	
+	#endif // C_CATALOGSHTTPDOWNLOADMANAGER_H
\ No newline at end of file
--- a/ncdengine/engine/transport/src/catalogshttpdownload.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/engine/transport/src/catalogshttpdownload.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -23,7 +23,10 @@
 #include <DocumentHandler.h>
 #include <apmstd.h> // TDataType
 #include <escapeutils.h>
+#include <downloadmanager.h>
 
+
+#include <QtGlobal>
 #include "catalogshttpdownloadmanagerimpl.h"
 #include "catalogshttpobserver.h"
 #include "catalogshttpconfigimpl.h"
@@ -95,7 +98,7 @@
 //	
 CCatalogsHttpDownload* CCatalogsHttpDownload::NewLC( 
     CCatalogsHttpDownloadManager& aOwner, 
-    RHttpDownload* aDownload,
+    Download* aDownload,
     const CCatalogsHttpConfig& aConfig )
     {
     CCatalogsHttpDownload* self = new( ELeave ) CCatalogsHttpDownload( 
@@ -140,7 +143,7 @@
         else 
             {
             DLTRACE(( "Deleting download" ));
-            iDownload->Delete();                        
+             iOwner.GetDownloadManager()->removeOne(iDownload);                      
             
             if ( iState.iOperationState != ECatalogsHttpOpCompleted ) 
                 {
@@ -244,8 +247,8 @@
         {
         iObserver = NULL;
         TInt32 state = 0;
-        iDownload->GetIntAttribute( EDlAttrState, state );
-        
+
+         state = (Download::State)iDownload->attribute(State).toInt();
         if ( IsOneOf( 
                 static_cast<THttpDownloadState>( state ), 
                 EHttpDlCreated,
@@ -473,7 +476,14 @@
         TInt err = KErrNone;
         if ( iDownload ) 
             {
-            err = iDownload->Pause();
+					    try
+							{
+							iDownload->pause();
+							}
+			        catch(const std::exception& exception)
+			        	{
+							 err = qt_symbian_exception2Error(exception);
+			        	}
             }
         
         DLTRACE(("Pause err: %d", err ));
@@ -680,7 +690,8 @@
     // client-server communication with the Download manager server
     if ( iDownload && iContentSize <= 0 ) 
         {                
-        iDownload->GetIntAttribute( EDlAttrLength, iContentSize );    
+    
+        int  downloadbytes   =  iDownload->attribute(DownloadedSize).toInt();
         DLTRACE(("Content size from download: %i", iContentSize ));
         }
     return iContentSize;
@@ -706,7 +717,8 @@
     TBool pausable = ETrue;
     if ( iDownload ) 
         {        
-        iDownload->GetBoolAttribute( EDlAttrPausable, pausable );
+
+        pausable=iDownload->attribute(Pausable).toBool();
         }
     return pausable;
     }
@@ -839,7 +851,88 @@
     return KErrNone;
     }
 
+void CCatalogsHttpDownload::HandledownloadEventL(DownloadEvent& aEvent)
+{
+	
+	switch(aEvent.type())
+	{
+		
+		case DownloadEvent::Started:
+		
+			break;
+		
+		case DownloadEvent::Failed:
+			{
+		      TInt32 errorId = -1;
+            SetTransferring( EFalse );
+            errorId = iDownload->attribute(LastError).toInt();
+            if ( ( errorId == ConnectionFailed || 
+                   errorId == TransactionFailed )) 
+                {
+                DLTRACE(("Try to reconnect"));
+                iReconnectWhenFail = EFalse;
+                iDownload->start();
+                break;
+                }
+            else if ( errorId == ContentExpired ||
+                      errorId == PartialContentModified )
+                {
+                DLTRACE(("Content has changed, reset and restart"));
+                iReconnectWhenFail = EFalse;
+                iDownload->cancel();
+                iDownload->start();
+                break;
+                }
+ 
+			}
+			break;
+		
+		case DownloadEvent::Cancelled:
+		
+			break;
+		case DownloadEvent::ContentTypeChanged:
+			
+			break;
+		case DownloadEvent::HeadersReceived:
+			{
+					// Read the response headers from platform DL manager
+			UpdateResponseHeadersL();		
+			UpdateContentType();
+		  }
+			break;
+		
+		case DownloadEvent::NetworkLoss:
+			
+		  break;
+		  
+		case DownloadEvent::Completed:
+			  {            
+            // move/rename temp file as the target file
+            TRAPD( err, MoveFileL() );
+            
+            // DLMAIN-546, delete DL manager's download before starting
+            // the next one so that downloads don't jam, again
+            if ( iDownload ) 
+                {   
+                	iTransferredSize = iDownload->attribute(DownloadedSize).toInt();             
+         
+                    
+                DLTRACE(("Deleting download"));                
+                DeletePlatformDownload();                
+                }
 
+	     }
+			break;
+			
+		case DownloadEvent::InProgress:
+		
+		  break;
+		  
+	  default:
+            {
+            }		  
+	};
+}
 // ---------------------------------------------------------------------------
 // Handles events from the transaction
 // ---------------------------------------------------------------------------
@@ -1025,20 +1118,20 @@
     
 	TInt32 statusCode = -1;
 	
-	iDownload->GetIntAttribute( EDlAttrStatusCode, statusCode );
-	DLINFO( ("Response status: %i", statusCode ) );
+	 statusCode  = (Download::State)iDownload->attribute(WRT::State).toInt(); 
+	 DLINFO( ("Response status: %i", statusCode ) );
 
 #ifdef CATALOGS_BUILD_CONFIG_DEBUG    
     TInt32 errorId = 0;
+		errorId=iDownload->attribute(LastError).toInt();
 
-	iDownload->GetIntAttribute( EDlAttrErrorId, errorId );
 	DLINFO( ("Error id: %i", errorId ) );
 	    
 #endif
 
     TInt32 globalErrorId = 0;    
-	iDownload->GetIntAttribute( 
-	    EDlAttrGlobalErrorId, globalErrorId );
+   globalErrorId= iDownload->attribute(LastError).toInt();
+
 	DLINFO( ("Global error id: %i", globalErrorId ) );
 	
 
@@ -1085,7 +1178,7 @@
                 {
                 DLTRACE(("Try to reconnect"));
                 iReconnectWhenFail = EFalse;
-                iDownload->Start();                
+                iDownload->start();                
                 break;
                 }
             
@@ -1143,9 +1236,9 @@
             // DLMAIN-546, delete DL manager's download before starting
             // the next one so that downloads don't jam, again
             if ( iDownload ) 
-                {                
-                iDownload->GetIntAttribute( 
-                    EDlAttrDownloadedSize, iTransferredSize );   
+                {   
+                	iTransferredSize = iDownload->attribute(DownloadedSize).toInt();             
+         
                     
                 DLTRACE(("Deleting download"));                
                 DeletePlatformDownload();                
@@ -1179,7 +1272,8 @@
             DLTRACE(( "Download failed" ));
             TInt32 errorId = -1;
             SetTransferring( EFalse );
-        	iDownload->GetIntAttribute( EDlAttrErrorId, errorId );
+            errorId = iDownload->attribute(LastError).toInt();
+        
         	DLINFO( ("Error id: %i", errorId ) );
 
         	DLINFO( ("Global error id: %i", globalErrorId ) );
@@ -1190,7 +1284,7 @@
                 {
                 DLTRACE(("Try to reconnect"));
                 iReconnectWhenFail = EFalse;
-                iDownload->Start();
+                iDownload->start();
                 break;
                 }
             else if ( errorId == EContentExpired ||
@@ -1198,8 +1292,8 @@
                 {
                 DLTRACE(("Content has changed, reset and restart"));
                 iReconnectWhenFail = EFalse;
-                iDownload->Reset();
-                iDownload->Start();
+                iDownload->cancel();
+                iDownload->start();
                 break;
                 }
             
@@ -1388,8 +1482,7 @@
 		    if ( !iPaused ) 
 		        {		  
                 TInt32 globalErrorId = 0;
-            	iDownload->GetIntAttribute( 
-            	    EDlAttrGlobalErrorId, globalErrorId );
+            	    globalErrorId = iDownload->attribute(LastError).toInt();
             	DLINFO( ("Global error id: %i", globalErrorId ) );
 
                 if ( globalErrorId == KErrCancel ) 
@@ -1495,7 +1588,8 @@
 		    iReconnectCount = KReconnectAttempts;
 
 		    TInt32 size = 0;
-	        iDownload->GetIntAttribute( EDlAttrDownloadedSize, size );   
+		     size = iDownload->attribute(DownloadedSize).toInt();
+
 	        DLTRACE(("Transferred size from download: %i", size));
 
 	        if ( size != iTransferredSize ) 
@@ -1636,7 +1730,7 @@
 //	
 CCatalogsHttpDownload::CCatalogsHttpDownload( 
     CCatalogsHttpDownloadManager& aOwner, 
-    RHttpDownload* aDownload ) :
+    Download* aDownload ) :
     iOwner( aOwner ), 
     iDownload( aDownload ), 
     iState( ECatalogsHttpOpCreated, ECatalogsHttpNone ),
@@ -1659,7 +1753,8 @@
         {        
         // id part will be updated from disk
         iId = TCatalogsTransportOperationId( iOwner.SessionId(), KErrNotFound );
-
+				iQTDownload = new CCatalogsHttpQTDownload(this,iDownload);
+				 
         UpdateSecondaryIdL();
         
         User::LeaveIfError( SetDeleteState( EDownloadCanBeDeleted ) );
@@ -1700,8 +1795,11 @@
         {
         // Download always exists when this is called so no need to check
         DLTRACE(("Updating the content type"));
-        iDownload->GetStringAttribute( EDlAttrContentType,
-            iContentType );
+        QString contentType;
+        contentType= iDownload->attribute(WRT::ContentType).toString();
+        	TBuf<KMaxContentTypeLength>  ContentType(contentType.utf16());
+        	iContentType.Copy(ContentType);
+   
         }
     DLTRACEOUT(("Content-type: %S", &iContentType ));
     }
@@ -1821,9 +1919,16 @@
     RBuf8 buf;
     CleanupClosePushL( buf );
     buf.CreateL( KMaxUrlLength );
-    
-    User::LeaveIfError( iDownload->GetStringAttribute( EDlAttrCurrentUrl,
-        buf ) );
+    QString string;
+	try
+	{
+    string = iDownload->attribute(SourceUrl).toString();
+	}
+    catch(const std::exception& exception)
+    	{
+			 qt_symbian_exception2LeaveL(exception);
+    	}
+
     
     // DL manager has the encoded URI
     AssignDesL( iEncodedUri, buf );
@@ -1867,8 +1972,8 @@
             }
         else 
             {
-            User::LeaveIfError( iDownload->SetStringAttribute(
-                predefined, headers[i]->Value() ) );
+/*            User::LeaveIfError( iDownload->SetStringAttribute(
+                predefined, headers[i]->Value() ) );*/
             }
         }
 
@@ -1877,8 +1982,8 @@
     if ( iAddedRequestHeaders ) 
         {
         DLTRACE(( "added request headers: %S", iAddedRequestHeaders ));
-        User::LeaveIfError( iDownload->SetStringAttribute(
-            EDlAttrRequestHeaderAddon, *iAddedRequestHeaders ) );
+     /*   User::LeaveIfError( iDownload->SetStringAttribute(
+            EDlAttrRequestHeaderAddon, *iAddedRequestHeaders ) );*/
         delete iAddedRequestHeaders;
         iAddedRequestHeaders = NULL;
         }    
@@ -2254,10 +2359,17 @@
             InitializeDownloadL();
             }
         });
-    
+   
     if ( err == KErrNone ) 
         {
-        err = iDownload->Start();
+						 try
+							{
+							iDownload->start();
+							}
+			        catch(const std::exception& exception)
+			        	{
+							 qt_symbian_exception2LeaveL(exception);
+			        	}
         }
     return err;
     }
@@ -2471,13 +2583,17 @@
     TInt err = KErrNone;
     if ( iDownload ) 
         {    
-        err = iDownload->SetIntAttribute( EDlAttrUserData, aStatus );
+
+        iStatus = aStatus;
         }
     
     return err;
     }
 
-
+CCatalogsHttpDownload::TDownloadDeleteState CCatalogsHttpDownload::GetStatusState()
+	{
+		return iStatus;
+	}
 // ---------------------------------------------------------------------------
 // Gets delete status and download id from the platform download
 // ---------------------------------------------------------------------------
@@ -2491,7 +2607,8 @@
     TInt err = KErrNotReady;
     if ( iDownload ) 
         {
-        err = iDownload->GetIntAttribute( EDlAttrUserData, data );
+
+        err = iStatus;
         DLTRACE(("Data: %d", data));
         aStatus = static_cast<TDownloadDeleteState>( data );
         }
@@ -2572,8 +2689,14 @@
                 
         // Check if the download has been set progressive
         TBool progressive = EFalse;
-        User::LeaveIfError( iDownload->GetBoolAttribute( 
-            EDlAttrProgressive, progressive ) );
+		try
+		{
+		         progressive =iDownload->attribute(Progressive).toBool(); 
+		}
+        catch(const std::exception& exception)
+        	{
+				 qt_symbian_exception2LeaveL(exception);
+        	}  
 
         
         // We want to have progressive downloads because then DL manager uses
@@ -2591,18 +2714,30 @@
              !iFileIsSet ) 
             {
             DLTRACE(("Setting download as progressive"));
-            User::LeaveIfError( iDownload->SetBoolAttribute( 
-                EDlAttrProgressive, ETrue ) );
-            }
+						try
+						{
+						   iDownload->setAttribute(Progressive,ETrue);
+						}
+						catch(const std::exception& exception)
+						{
+							qt_symbian_exception2LeaveL(exception);
+						}  
+						}
         
         // Doesn't pause the download after content type has been received
-        User::LeaveIfError( iDownload->SetBoolAttribute( 
-            EDlAttrNoContentTypeCheck, ETrue ) );
+					try
+					{
+						iDownload->setAttribute(Progressive,ETrue);
+					}
+					catch(const std::exception& exception)
+					{
+						qt_symbian_exception2LeaveL(exception);
+					}  
 
         if ( !iFileIsSet )
             {
             DLTRACE(("Setting filehandle to download"));
-            User::LeaveIfError( iDownload->SetFileHandleAttribute( file ) );
+           // User::LeaveIfError( iDownload->SetFileHandleAttribute( file ) );
             iFileIsSet = ETrue;                        
             }
 
@@ -2610,7 +2745,10 @@
         }        
     }
 
-
+Download* CCatalogsHttpDownload::GetDownload()
+{
+	return iDownload;
+}
 // ---------------------------------------------------------------------------
 // Delete platform download and reset secondary id
 // ---------------------------------------------------------------------------
@@ -2619,7 +2757,7 @@
     {
     if ( iDownload )
         {
-        iDownload->Delete();
+        iOwner.GetDownloadManager()->removeOne(iDownload);
         iDownload = NULL;
         iId.SetSecondaryId( KErrNotFound );
         }
@@ -2633,8 +2771,7 @@
 void CCatalogsHttpDownload::UpdateSecondaryIdL()
     {
     TInt32 secondaryId = KErrNotFound;
-    User::LeaveIfError( 
-        iDownload->GetIntAttribute( EDlAttrId, secondaryId ) );
+    secondaryId = iDownload->id();
     iId.SetSecondaryId( secondaryId );    
     }
 
@@ -2675,3 +2812,19 @@
        aName.Append( aExt );
        }
     }
+    
+CCatalogsHttpQTDownload::CCatalogsHttpQTDownload(CCatalogsHttpDownload* aHttpDownload,Download* aDownload)
+	{
+		iCatalogsHttpDownload = aHttpDownload;
+		iDownload = aDownload;
+		connect(iDownload, SIGNAL(downloadEvent(DownloadManagerEvent*)), this,SLOT(downloadEvent(DownloadEvent*)));
+	}
+	
+void CCatalogsHttpQTDownload::downloadEvent(WRT::DownloadEvent* aEvent)
+	{
+		iCatalogsHttpDownload->HandledownloadEventL(*aEvent);
+	}
+void CCatalogsHttpQTDownload::downloadError(WRT::Error)
+	{
+		//iCatalogsHttpDownload->HandledownloadEventL(*aEvent);
+	}
\ No newline at end of file
--- a/ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -32,7 +32,10 @@
 #include "catalogsconnection.h"
 
 #include "catalogsdebug.h"
-
+#include <QString.h>
+#include <QVector.h>
+#include <QList.h>
+#include <downloadevent.h>
 // ======== MEMBER FUNCTIONS ========
 
 // ---------------------------------------------------------------------------
@@ -59,6 +62,7 @@
             
     DLTRACE(("constructor ok"));
     CleanupStack::PushL( self );
+   
     self->ConstructL( aCleanup );
     CleanupStack::Pop( self );
     return self;
@@ -102,15 +106,17 @@
         iNetworkManager->RemoveObserver( *this );
         }
 
-    if ( iDmgr.Handle() ) 
+
+    if ( iDmgr ) 
         {
         DLTRACE(("We were connected to DL manager"));
         DeleteHangingDownloads();
         }
-        
+      
     // Close download manager session    
-    iDmgr.Close();
+    iDmgr->removeAll();
     
+   
     delete iDefaultConfig;
     iManager.Release();
     
@@ -124,24 +130,20 @@
     {
     DLTRACEIN((""));
     // This pauses all downloads in addition to disconnecting
-    iDmgr.Disconnect();
-    const CDownloadArray& downloads( iDmgr.CurrentDownloads() );
-
-    TInt count = downloads.Count();
-    while( count-- )
-        {                         
-        RHttpDownload& dl = *( downloads[ count ] );
-        TInt32 deleteStatus = 0;
-        dl.GetIntAttribute( EDlAttrUserData, deleteStatus );
-        DLTRACE(("DeleteStatus: %d", deleteStatus ));
-        
-        if ( deleteStatus == CCatalogsHttpDownload::EDownloadCanBeDeleted ) 
+ 	iDmgr->pauseAll(); 
+   TInt count = iDownloads.Count();
+    for ( TInt i = 0; i < count; ++i )
+        {
+         TInt32 deleteStatus = 0;
+         deleteStatus = dynamic_cast<CCatalogsHttpDownload*>(iDownloads[i])->GetStatusState();
+       
+         if ( deleteStatus == CCatalogsHttpDownload::EDownloadCanBeDeleted ) 
             {
             DLTRACE(("Deleting download"));
-            dl.Delete();
+            iDmgr->removeOne(dynamic_cast<CCatalogsHttpDownload*>(iDownloads[i])->GetDownload());
             }
+        }        
         
-        }
     }
 
 // ---------------------------------------------------------------------------
@@ -172,16 +174,18 @@
     {
     DLTRACEIN((""));
     // Create a new download
+   	QString Url =	QString::fromRawData( reinterpret_cast<const QChar*>(aUrl.Ptr()),aUrl.Length());
+    iDownload = iDmgr->createDownload( Url );
+    
     CCatalogsHttpDownload* dl = CCatalogsHttpDownload::NewLC( 
         *this,
         //download,
-        NULL,
+        iDownload,
         *iDefaultConfig );
     
     dl->SetUriL( aUrl );
     dl->SetFileServerSession( iFs );
-    
-    // If the given observer != NULL, set it as the observer for the download
+        // If the given observer != NULL, set it as the observer for the download
     if ( aObserver ) 
         {        
         dl->Config().SetObserver( aObserver );        
@@ -207,6 +211,7 @@
     TInt count = iDownloads.Count();
     for ( TInt i = 0; i < count; ++i )
         {
+        	
         if ( iDownloads[i]->OperationId() == aId ) 
             {
             return iDownloads[i];
@@ -396,12 +401,19 @@
     DLTRACEIN((""));
     if ( aMethod != iCurrentAp )
         {
+		try
+		{
         DLTRACE( ( "Set AP, type: %d, id: %u, apn: %d", 
             aMethod.iType, aMethod.iId, aMethod.iApnId ));
-        User::LeaveIfError( iDmgr.Disconnect() );    
-        User::LeaveIfError( iDmgr.SetIntAttribute( EDlMgrIap, aMethod.iApnId ) );
+		 iDmgr->pauseAll(); 
+		 
         iCurrentAp = aMethod;
         DLTRACE(("AP set"));
+		}
+		 catch(const std::exception& exception)
+		 {
+		 qt_symbian_exception2LeaveL(exception);
+		 }
         }    
     }
 
@@ -460,40 +472,23 @@
     {
     return iSessionId;
     }
-    
-    
+
 // ---------------------------------------------------------------------------
 // Handles download manager events
 // ---------------------------------------------------------------------------
-//
-void CCatalogsHttpDownloadManager::HandleDMgrEventL( RHttpDownload& aDownload,
-	THttpDownloadEvent aEvent )
-    {
-    DLTRACEIN(( "Dl state: %i, pr: %i, DL: %x", aEvent.iDownloadState, 
-        aEvent.iProgressState, &aDownload ));
-        
-    TDownloadEvent event( aDownload, aEvent );
+//    
+ void CCatalogsHttpDownloadManager::downloadMgrEventRecieved(WRT::DownloadEvent* dlmEvent)
+  {
+  	
+  	switch(dlmEvent ->type())
+		{
+ 
+    default:
+    	break;
+		};
 
-    if ( IsOneOf( aEvent.iDownloadState, EHttpDlDeleted, EHttpDlDeleting ) )
-        {
-        DLTRACEOUT(("Download was deleted"))
-        RemoveUnhandledEvents( event );
-        }
-    // Handle everything but Download name change events
-    else if ( aEvent.iProgressState != EHttpProgDlNameChanged )     
-        {        
-        DLTRACE(("Adding event to queue"));        
-        
-        if ( aEvent.iProgressState == EHttpProgResponseBodyReceived ) 
-            {
-            // Filter unhandled progress events from the queue
-            RemoveUnhandledProgressEvents( event );
-            }
-        
-        iEventQueue.AppendL( event );    
-        ContinueEventHandling();    
-        }
-    }
+  	
+  }  
 
 
 // ---------------------------------------------------------------------------
@@ -507,8 +502,19 @@
     DLTRACEIN((""));
     if ( aEvent == ECatalogsAccessPointClosed ) 
         {
+		try
+		{
         DLTRACE(("Disconnecting download manager"));
-        User::LeaveIfError( iDmgr.Disconnect() );
+
+		iDmgr->pauseAll();
+	}
+
+ 		catch(const std::exception& exception) 
+               { 
+               qt_symbian_exception2LeaveL(exception); 
+               } 
+            
+
         }
     }
 
@@ -556,6 +562,11 @@
     
     // shared so that RFiles can be given to Download manager
     User::LeaveIfError( iFs.ShareProtected() ); 
+   	
+   	QString DmgrUid(QString::number(KNCDEngineAppID));
+    iDmgr =  new DownloadManager(DmgrUid);
+    iDmgr->initialize();
+    iQTmgr = new CCatalogsHttpQTDownloadManager(this,iDmgr);
     
     TUid sessionId( TUid::Uid( iSessionId ) );
     if ( aCleanup ) 
@@ -581,7 +592,6 @@
     
     do    
         {
-        // TRAP( err, iDmgr.ConnectL( sessionId, *this, ETrue ) );
         if ( err != KErrNone ) 
             {
             DLERROR(("DL manager connection failed with err: %d, retry attempts left", 
@@ -607,13 +617,17 @@
     iNetworkManager = &CCatalogsHttpSessionManager::NetworkManagerL();
     iNetworkManager->AddObserverL( *this );    
     
-//    iDmgr.SetIntAttribute( EDlMgrExitAction, EExitPause );
     // Restore downloads from previous sessions
 //    RestoreDownloadsL();
+ 
     DLTRACEOUT((""));
+
     }
     
-
+DownloadManager* CCatalogsHttpDownloadManager::GetDownloadManager()
+{
+	return iDmgr;
+}
 // ---------------------------------------------------------------------------
 // Restore downloads from previous session
 // ---------------------------------------------------------------------------
@@ -621,17 +635,19 @@
 void CCatalogsHttpDownloadManager::RestoreDownloadsL()
     {
     DLTRACEIN((""));
-    const CDownloadArray& downloads = iDmgr.CurrentDownloads();    
     
     TBuf8<KMaxUrlLength> url;
-    TBuf<KMaxPath> filename;
+    
     
+    QList<WRT::Download*> downloads = iDmgr->currentDownloads();
+
+
     // Go through downloads, create wrappers for DL manager downloads and
     // add them to HttpDownloadManager
-    for ( TInt i = 0; i < downloads.Count(); ++i ) 
+    for ( TInt i = 0; i < downloads.size(); ++i ) 
         {                 
         DLTRACE(( "Restoring dl %i", i ));
-        RHttpDownload* dlPtr = downloads[i];
+        WRT::Download *dlPtr = downloads[i];
 
         // Create the download and push it to cleanup stack
         CCatalogsHttpDownload* dl = CCatalogsHttpDownload::NewLC( *this,
@@ -639,8 +655,9 @@
 
         // set file server session
         dl->SetFileServerSession( iFs );
-        
-        dlPtr->GetStringAttribute( EDlAttrDestFilename, filename );
+       
+         QString name   =  dlPtr->attribute(FileName).toString();
+         TBuf<KMaxPath> filename(name.utf16());
 
         // Separate the filename from the path
         TParsePtrC parser( filename );
@@ -683,7 +700,7 @@
     DASSERT( aDownload );
     
     TInt32 id = 0;
-    aDownload->GetIntAttribute( EDlAttrId, id );    
+    //aDownload->GetIntAttribute( EDlAttrId, id );    
             
     TInt count = aArray.Count();
     for ( TInt i = 0; i < count; ++i )
@@ -954,8 +971,23 @@
     }
 
 
-RHttpDownload& CCatalogsHttpDownloadManager::CreatePlatformDownloadL( 
+Download& CCatalogsHttpDownloadManager::CreatePlatformDownloadL( 
     const TDesC8& aUrl )
     {
-    return iDmgr.CreateDownloadL( aUrl );
+    
+   	QString myString=	QString::fromRawData( reinterpret_cast<const QChar*>(aUrl.Ptr()),aUrl.Length());
+
+    return *(iDmgr->createDownload( myString ));
     }
+    
+CCatalogsHttpQTDownloadManager::CCatalogsHttpQTDownloadManager(CCatalogsHttpDownloadManager* aDownloadManager,DownloadManager* aDmgr)
+	{
+		iDownloadManager = aDownloadManager;
+		iDmgr = aDmgr;
+		connect(iDmgr, SIGNAL(downloadManagerEvent(WRT::DownloadManagerEvent*)), this,SLOT(downloadMgrEventRecieved(WRT::DownloadEvent*)));
+	}
+	
+void CCatalogsHttpQTDownloadManager::downloadMgrEventRecieved(WRT::DownloadEvent* aEvent)
+	{
+		iDownloadManager->downloadMgrEventRecieved(aEvent);
+	}
\ No newline at end of file
--- a/ncdengine/inc/ncdnodeinstall.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/inc/ncdnodeinstall.h	Tue Jul 06 14:23:31 2010 +0300
@@ -32,18 +32,12 @@
 class MDesCArray;
 class MNcdInstalledContent;
 
-// Forward declaration for SwiUI::TInstallOptions
-// SwiUI namespace contains install options 
-// that are used for the silent install.
-// #include <SWInstDefs.h> 
-// is required when SwiUI::TInstallOptions is created 
-// in the implementation code.
-namespace SwiUI
+// Forward declaration for Usif::TInstallOptions
+namespace Usif
     {
-    class TInstallOptions;    
+    class COpaqueNamedParams;    
     }
 
-
 /**
  *  Provides functions that can be used to install the node object.
  *  Before installing, the data should have been downloaded using
@@ -83,7 +77,6 @@
      */
     virtual MNcdInstallOperation* InstallL( MNcdInstallOperationObserver& aObserver ) = 0;
 
-
     /**
      * Starts the silent installing operation of the node object.
      * Because installation is silent, normal installation query dialogs are not shown.
@@ -96,7 +89,7 @@
      * function of the operation should be called when operation is not needed anymore.
      * 
      * @note Requires TrustedUI capabilities
-     * @note Only SIS packages and Java archives are installed silently, other content
+     * @note Only SIS packages and Java archives and widgets are installed silently, other content
      * is installed exactly like with InstallL
      * 
      * @param aObserver Observer for the operation.
@@ -109,9 +102,9 @@
      * Leaves with KNcdErrorParallelOperationNotAllowed if a parallel client is running
      *  an operation for the same metadata. See MNcdOperation for full explanation.
      */
-    virtual MNcdInstallOperation* SilentInstallL( MNcdInstallOperationObserver& aObserver,
-                                                  const SwiUI::TInstallOptions& aInstallOptions ) = 0;
-
+    virtual MNcdInstallOperation* SilentInstallL( 
+                MNcdInstallOperationObserver& aObserver,
+                Usif::COpaqueNamedParams* aInstallOptions ) = 0;
 
     /**
      * Checks if the item content has already been installed and is currently present in the
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ncdengine/ncdengine.pro	Tue Jul 06 14:23:31 2010 +0300
@@ -0,0 +1,19 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+TEMPLATE = subdirs
+
+SUBDIRS += engine/engine.pro 
--- a/ncdengine/provider/client/inc/ncdnodeinstallproxy.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/provider/client/inc/ncdnodeinstallproxy.h	Tue Jul 06 14:23:31 2010 +0300
@@ -125,14 +125,12 @@
      */ 
     MNcdInstallOperation* InstallL( MNcdInstallOperationObserver& aObserver );
 
-
     /**
      * @see MNcdNodeInstall::SilentInstallL()
      */ 
-    MNcdInstallOperation* SilentInstallL( MNcdInstallOperationObserver& aObserver,
-                                          const SwiUI::TInstallOptions& aInstallOptions );
-    
-
+    MNcdInstallOperation* SilentInstallL( 
+                MNcdInstallOperationObserver& aObserver,
+                Usif::COpaqueNamedParams* aInstallOptions );
     /**
      * @see MNcdNodeInstall::IsInstalledL()
      */ 
--- a/ncdengine/provider/client/inc/ncdoperationmanagerproxy.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/provider/client/inc/ncdoperationmanagerproxy.h	Tue Jul 06 14:23:31 2010 +0300
@@ -63,10 +63,10 @@
 
 
 // Forward declaration for silent install
-// SwiUI::TInstallOptions
-namespace SwiUI
+// Usif::TInstallOptions
+namespace Usif
     {
-    class TInstallOptions;    
+    class COpaqueNamedParams;    
     }
 
 /**
@@ -230,7 +230,7 @@
     virtual CNcdSilentInstallOperationProxy* CreateSilentInstallOperationL(
         CNcdNodeProxy& aNode, 
         MNcdInstallOperationObserver* aObserverconst,
-        const SwiUI::TInstallOptions& aInstallOptions );
+        Usif::COpaqueNamedParams* aInstallOptions );
     
     
     /**
--- a/ncdengine/provider/client/inc/ncdsilentinstalloperationproxy.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/provider/client/inc/ncdsilentinstalloperationproxy.h	Tue Jul 06 14:23:31 2010 +0300
@@ -22,7 +22,7 @@
 #include <e32cmn.h>
 
 // For silent install options and options package
-#include <SWInstDefs.h>
+#include <usif/sif/sifcommon.h>
 
 #include "ncdinstalloperationproxy.h"
 
@@ -51,7 +51,7 @@
                         CNcdNodeManagerProxy* aNodeManager,
                         MNcdInstallOperationObserver* aObserver,
                         MNcdInstallationService& aInstallationService,
-                        const SwiUI::TInstallOptions& aInstallOptions );
+                        Usif::COpaqueNamedParams* aInstallOptions );
 
 
 protected: // CActive
@@ -70,7 +70,7 @@
      * @see NewLC
      */
     CNcdSilentInstallOperationProxy( MNcdInstallationService& aInstallationService,
-                                     const SwiUI::TInstallOptions& aInstallOptions );
+                                     Usif::COpaqueNamedParams* aInstallOptions );
     
     virtual ~CNcdSilentInstallOperationProxy();
 
@@ -99,10 +99,10 @@
     virtual void UseInstallServiceL( const CNcdFileInfo& aFile );
     
     /**
-     * @return const SwiUI::TInstallOptionsPckg& Contains the install options 
+     * @return const Usif::COpaqueNamedParams* Contains the install options 
      * for silent install in a data buffer.
      */
-    const SwiUI::TInstallOptionsPckg& SilentInstallOptionsPackage() const;
+    const Usif::COpaqueNamedParams* SilentInstallOptions() const;
     
     
 private: // new methods
@@ -114,8 +114,9 @@
 
 private: // data
 
+    
     // This will contain the install options for silent install in a data buffer.
-    SwiUI::TInstallOptionsPckg iInstallOptionsPackage;
+    Usif::COpaqueNamedParams* iInstallOptions;
 
     };
 
--- a/ncdengine/provider/client/src/ncdnodeinstallproxy.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/provider/client/src/ncdnodeinstallproxy.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -202,14 +202,13 @@
     return op;
     }
 
-
 // ---------------------------------------------------------------------------
 // Creates an install operation
 // ---------------------------------------------------------------------------
 //
 MNcdInstallOperation* CNcdNodeInstallProxy::SilentInstallL( 
     MNcdInstallOperationObserver& aObserver,
-    const SwiUI::TInstallOptions& aInstallOptions )
+    Usif::COpaqueNamedParams* aInstallOptions )
     {
     DLTRACEIN((""));
 
@@ -219,9 +218,12 @@
     // observer.
     // Notice that TrustedUI capabilites are checked when silent install operation is
     // created in the server side.
+    
     CNcdInstallOperationProxy* op = 
         Metadata().Node().OperationManager().CreateSilentInstallOperationL(
         Metadata().Node(), this, aInstallOptions );
+    
+    
     iOperationObserver = &aObserver;
        
     DLTRACEOUT((""));    
--- a/ncdengine/provider/client/src/ncdoperationmanagerproxy.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/provider/client/src/ncdoperationmanagerproxy.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -442,7 +442,7 @@
 CNcdSilentInstallOperationProxy* CNcdOperationManagerProxy::CreateSilentInstallOperationL(
     CNcdNodeProxy& aNode,
     MNcdInstallOperationObserver* aObserver,
-    const SwiUI::TInstallOptions& aInstallOptions )
+    Usif::COpaqueNamedParams* aInstallOptions )
     {
    DLTRACEIN((""));
 
--- a/ncdengine/provider/client/src/ncdsilentinstalloperationproxy.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/provider/client/src/ncdsilentinstalloperationproxy.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -39,7 +39,7 @@
     CNcdNodeManagerProxy* aNodeManager,
     MNcdInstallOperationObserver* aObserver,
     MNcdInstallationService& aInstallationService,
-    const SwiUI::TInstallOptions& aInstallOptions )
+    Usif::COpaqueNamedParams* aInstallOptions )
     {
     CNcdSilentInstallOperationProxy* self =
         new( ELeave ) CNcdSilentInstallOperationProxy( aInstallationService, 
@@ -59,15 +59,14 @@
 //
 CNcdSilentInstallOperationProxy::CNcdSilentInstallOperationProxy( 
     MNcdInstallationService& aInstallationService,
-    const SwiUI::TInstallOptions& aInstallOptions )
+    /*const*/ Usif::COpaqueNamedParams* aInstallOptions )
 : CNcdInstallOperationProxy( aInstallationService )
     {
     // Copy all the install options into the buffer that will be used
     // when silent installation is delegated to the installer.
-    iInstallOptionsPackage = aInstallOptions;
+    iInstallOptions = aInstallOptions;
     }
 
-
 // ---------------------------------------------------------------------------
 // Destructor
 // ---------------------------------------------------------------------------
@@ -190,7 +189,7 @@
                 iFileHandle, 
                 aFile.MimeType(), 
                 aFile.Purpose(), 
-                SilentInstallOptionsPackage() );
+                SilentInstallOptions() ); 
             break;
             }
         
@@ -201,7 +200,7 @@
                 iFileHandle, 
                 aFile.MimeType(), 
                 aFile.Data(),
-                SilentInstallOptionsPackage() );             
+                SilentInstallOptions() );             
             break;
             }            
 
@@ -212,7 +211,7 @@
             {
             Installer().SilentInstallWidgetL(
                     iFileHandle, 
-                    SilentInstallOptionsPackage() );
+                    SilentInstallOptions() );
    
             break;
             }
@@ -227,9 +226,8 @@
     DLTRACEOUT((""));   
     }
 
-
-const SwiUI::TInstallOptionsPckg& CNcdSilentInstallOperationProxy::SilentInstallOptionsPackage() const
+const Usif::COpaqueNamedParams* CNcdSilentInstallOperationProxy::SilentInstallOptions() const
     {
     DLTRACEIN((""));
-    return iInstallOptionsPackage;
+    return iInstallOptions;
     }
--- a/ncdengine/provider/deviceinteraction/inc/ncdinstallationservice.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/provider/deviceinteraction/inc/ncdinstallationservice.h	Tue Jul 06 14:23:31 2010 +0300
@@ -22,7 +22,8 @@
 // SwiUI namespace contains install options 
 // and install options package definitions
 // that are used for the silent install.
-#include <SWInstDefs.h>
+//#include <SWInstDefs.h>
+#include <usif/sif/sifcommon.h>
 
 #include "ncditempurpose.h"
 
@@ -124,7 +125,7 @@
     virtual void SilentInstallL( RFile& aFile,
                                  const TDesC& aMimeType,
                                  const TNcdItemPurpose& aPurpose ,
-                                 const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg ) = 0;
+                                 const Usif::COpaqueNamedParams* aInstallOptionsPckg ) = 0;
 
 
     /**
@@ -134,13 +135,13 @@
     virtual void SilentInstallJavaL( RFile& aFile,
                                      const TDesC& aMimeType,
                                      const TDesC8& aDescriptorData,
-                                     const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg ) = 0;
+                                     const Usif::COpaqueNamedParams* aInstallOptionsPckg ) = 0;
     
     /*
      * Use SWI API to install widget silently. 
      */     
     virtual void SilentInstallWidgetL(RFile& aFile,
-                                      const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg ) = 0;
+                                      const Usif::COpaqueNamedParams* aInstallOptionsPckg ) = 0;
 
     /**
      * Cancels the silent installation if it is going on.
--- a/ncdengine/provider/deviceinteraction/inc/ncdinstallationserviceimpl.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/provider/deviceinteraction/inc/ncdinstallationserviceimpl.h	Tue Jul 06 14:23:31 2010 +0300
@@ -26,8 +26,6 @@
 #include <swi/sisregistryentry.h>
 #include <apgcli.h>
 #include <centralrepository.h>
-#include <SWInstApi.h>
-//#include <WidgetRegistryClient.h>
 #include <usif/sif/sif.h>
 #include <usif/scr/scr.h>
 
@@ -123,7 +121,7 @@
     void SilentInstallL( RFile& aFile,
                          const TDesC& aMimeType,
                          const TNcdItemPurpose& aPurpose,
-                         const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg );
+                         const Usif::COpaqueNamedParams* aInstallOptionsPckg );
     
     /**
      * @see MNcdInstallationService::SilentInstallJavaL
@@ -131,13 +129,13 @@
     void SilentInstallJavaL( RFile& aFile,
                              const TDesC& aMimeType,
                              const TDesC8& aDescriptorData,
-                             const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg );
+                             const Usif::COpaqueNamedParams* aInstallOptionsPckg );
     
     /**
      * @see MNcdInstallationService::SilentInstallWidgetJavaL
      */
     void SilentInstallWidgetL( RFile& aFile,
-                               const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg );
+                               const Usif::COpaqueNamedParams* aInstallOptionsPckg );
     
     /**
      * @see MNcdInstallationService::MNcdCancelSilentInstall
@@ -295,7 +293,7 @@
     void InstallL( RFile& aFile,
                    const TDesC& aMimeType,
                    const TNcdItemPurpose& aPurpose,
-                   const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg );
+                   const Usif::COpaqueNamedParams* aSilentInstallOptions );
 
     /**
      * @see MNcdInstallationService::InstallJavaL
@@ -306,12 +304,12 @@
     void InstallJavaL( RFile& aFile,
                        const TDesC& aMimeType,
                        const TDesC8& aDescriptorData,
-                       const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg );
+                       const Usif::COpaqueNamedParams* aSilentInstallOptions );
 
     
     void InstallWidgetL( 
         RFile& aFile,
-        const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg );
+        const Usif::COpaqueNamedParams* aSilentInstallOptions );
         
 
     // Sets correct values for member variables after installation has finished
@@ -448,15 +446,14 @@
     
     CNcdActiveOperationObserver* iInstallStatusObserver;
 
-    SwiUI::RSWInstLauncher iInstaller;
-        
+    //SwiUI::RSWInstLauncher iInstaller;
+    Usif::RSoftwareInstall iInstaller;
+    Usif::COpaqueNamedParams* iArguments; 
+    Usif::COpaqueNamedParams* iResults;
+    
     // ROM application UIDS
     RArray<TUid> iRomUids; 
     
-    // needed for cancelling install correctly
-    SwiUI::TServerRequest iCancelCode;  
-    
-    
     //RWidgetRegistryClientSession iWidgetRegistry; 
     Usif::RSoftwareComponentRegistry iScrSession;
     
--- a/ncdengine/provider/deviceinteraction/inc/ncdsilentinstallactiveobserver.h	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/provider/deviceinteraction/inc/ncdsilentinstallactiveobserver.h	Tue Jul 06 14:23:31 2010 +0300
@@ -23,7 +23,9 @@
 #include <e32base.h>
 #include <f32file.h>
 // For silent install
-#include <SWInstApi.h> 
+#include <usif/sif/sif.h>
+
+
 
 class MNcdAsyncSilentInstallObserver;
 
@@ -68,20 +70,20 @@
      * Sets this object active for observing a silent install operation.
      * 
      * @param aFileName Installation file name.
-     * @param aSilentInstallOptionsPckg Silent installation options.
+     * @param aSilentInstallOptions Silent installation options.
      */
     void StartToObserveL( const TDesC& aFileName,
-                          const SwiUI::TInstallOptionsPckg& aSilentInstallOptionsPckg );
+                          const Usif::COpaqueNamedParams* aSilentInstallOptions );
 
 
     /**
      * Sets this object active for observing a silent install operation.
      * 
      * @param aFile Installation file handle.
-     * @param aSilentInstallOptionsPckg Silent installation options.
+     * @param aSilentInstallOptions Silent installation options.
      */
     void StartToObserveL( RFile& aFile,
-                          const SwiUI::TInstallOptionsPckg& aSilentInstallOptionsPckg );
+                          const Usif::COpaqueNamedParams* aSilentInstallOptions );
 
 
     /**
@@ -147,8 +149,7 @@
      * that handles the installation operations that this
      * class object observes. Ownerhsip is not transferred.
      */
-    SwiUI::RSWInstSilentLauncher& SilentLauncher();
-
+    Usif::RSoftwareInstall& SilentLauncher();
 
     /**
      * Converts the given error code if necessary.
@@ -176,10 +177,11 @@
 
     // The silent launcher handles the install operations that
     // this class object observes. 
-    SwiUI::RSWInstSilentLauncher iSilentLauncher;
+    // SwiUI::RSWInstSilentLauncher iSilentLauncher;
+    Usif::RSoftwareInstall iInstaller;
+    Usif::COpaqueNamedParams* iResults;
+    Usif::COpaqueNamedParams* iArguments;
     
-    SwiUI::TServerRequest iCancelCode;
-
 };
 
 #endif // NCD_SILENT_INSTALL_ACTIVE_OBSERVER_H
--- a/ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -45,7 +45,7 @@
 
 const TUint KFileOpenFlags = EFileShareReadersOrWriters;
 
-const TInt KWidgetBundleIdLength = KMaxFileName + 1; 
+//const TInt KWidgetBundleIdLength = KMaxFileName + 1; 
 
 // ======== CALLBACK FUNCTION ========
  
@@ -108,6 +108,11 @@
     delete iJadFileName;
     delete iRecognizedMime;
     
+    delete iResults;
+    delete iArguments;
+    
+    iApaLs.Close();
+    
     
     if( iThemes )
         {
@@ -138,6 +143,10 @@
 void CNcdInstallationService::ConstructL()
     {
     DLTRACEIN((""));
+    
+    iResults = 0;
+    iArguments = 0;
+    
     iDocHandler = CDocumentHandler::NewL();
     iDocHandler->SetExitObserver( this );
     
@@ -224,7 +233,7 @@
 void CNcdInstallationService::SilentInstallL( RFile& aFile,
                                         const TDesC& aMimeType,
                                         const TNcdItemPurpose& aPurpose,
-                                        const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg )
+                                        const Usif::COpaqueNamedParams* aInstallOptionsPckg )
     {
     DLTRACEIN((""));
 
@@ -234,7 +243,7 @@
         iSilentInstallActiveObserver = CNcdSilentInstallActiveObserver::NewL( *this );        
         }
 
-    InstallL( aFile, aMimeType, aPurpose, &aInstallOptionsPckg );
+    InstallL( aFile, aMimeType, aPurpose, aInstallOptionsPckg );
 
     DLTRACEOUT(("")); 
     }
@@ -247,7 +256,7 @@
 void CNcdInstallationService::SilentInstallJavaL( RFile& aFile,
                                             const TDesC& aMimeType,
                                             const TDesC8& aDescriptorData,
-                                            const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg )
+                                            const Usif::COpaqueNamedParams* aInstallOptionsPckg )
     {
     DLTRACEIN((""));
 
@@ -257,7 +266,7 @@
         iSilentInstallActiveObserver = CNcdSilentInstallActiveObserver::NewL( *this );        
         }
 
-    InstallJavaL( aFile, aMimeType, aDescriptorData, &aInstallOptionsPckg );
+    InstallJavaL( aFile, aMimeType, aDescriptorData, aInstallOptionsPckg );
 
     DLTRACEOUT((""));
     }
@@ -267,7 +276,7 @@
 // ---------------------------------------------------------------------------
 //
 void CNcdInstallationService::SilentInstallWidgetL( RFile& aFile,
-                                                    const SwiUI::TInstallOptionsPckg& aInstallOptionsPckg )
+                                                    const Usif::COpaqueNamedParams* aInstallOptionsPckg )
     {
     DLTRACEIN((""));
     
@@ -277,7 +286,7 @@
         iSilentInstallActiveObserver = CNcdSilentInstallActiveObserver::NewL( *this );        
         }
 
-    InstallWidgetL( aFile, &aInstallOptionsPckg );
+    InstallWidgetL( aFile, aInstallOptionsPckg );
     
     DLTRACEOUT((""));
     }
@@ -891,7 +900,7 @@
     
     iInstaller.Close();
     
-    if ( aError == SwiUI::KSWInstErrUserCancel ) 
+    if ( aError == KErrCancel ) 
         {
         DLTRACE(("User cancelled, converting error to KErrAbort" ) );
         aError = KErrAbort;        
@@ -1280,7 +1289,7 @@
 void CNcdInstallationService::InstallL( RFile& aFile,
                                         const TDesC& aMimeType,
                                         const TNcdItemPurpose& aPurpose,
-                                        const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg )
+                                        const Usif::COpaqueNamedParams* aSilentInstallOptions )
     {
     DLTRACEIN(( _L("iBusy=%d, MIME: %S"),iBusy, &aMimeType ));    
     DASSERT( iObserver );
@@ -1326,7 +1335,7 @@
             aFile, 
             *iRecognizedMime, 
             KNullDesC8, 
-            aSilentInstallOptionsPckg );
+            aSilentInstallOptions );
         return;
         }
     else if ( MatchWidget( aFile, aMimeType ) )
@@ -1334,7 +1343,7 @@
         DLTRACE(("Widget"));
         InstallWidgetL( 
             aFile,
-            aSilentInstallOptionsPckg );
+            aSilentInstallOptions );
         return;
         }
     
@@ -1376,13 +1385,25 @@
         // Start application installation.
         DLINFO(( "Calling doc handler Open" ));
 
-        if ( !aSilentInstallOptionsPckg )
+        if ( !aSilentInstallOptions )
             {
             DLINFO(("Normal install"));
             InitializeInstallerL();
-            iCancelCode = SwiUI::ERequestInstallHandle;
+            //iCancelCode = SwiUI::ERequestInstallHandle;
             
-            iInstaller.Install( iInstallStatusObserver->iStatus, aFile );
+            if ( !iArguments )
+                {
+                iArguments = Usif::COpaqueNamedParams::NewL();
+                }
+            if ( !iResults )
+               {
+               iResults = Usif::COpaqueNamedParams::NewL();
+               }
+            
+            iArguments->AddIntL( Usif::KSifInParam_InstallSilently, EFalse );
+            
+            iInstaller.Install( aFile, *iArguments, *iResults, iInstallStatusObserver->iStatus ); 
+            //iInstaller.Install( iInstallStatusObserver->iStatus, aFile );
             iInstallStatusObserver->StartToObserve();            
             }
         else
@@ -1392,7 +1413,7 @@
             // of the silent install and it will forward the information for the callback
             // function of this class object.
             iSilentInstallActiveObserver->StartToObserveL( aFile,
-                                                           *aSilentInstallOptionsPckg );
+                                                           aSilentInstallOptions );
             }
             
         iBusy = ETrue;
@@ -1463,7 +1484,7 @@
 void CNcdInstallationService::InstallJavaL( RFile& aFile,
                                             const TDesC& /*aMimeType*/,
                                             const TDesC8& aDescriptorData,
-                                            const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg )
+                                            const Usif::COpaqueNamedParams* aSilentInstallOptions )
     {
     DLTRACEIN((_L("iBusy=%d, descriptor=%d"),iBusy, aDescriptorData.Length() ));
     DASSERT( iObserver );
@@ -1498,7 +1519,7 @@
     iInstallType = EJavaInstall;
     TDataType dataType;    
             
-    if ( aSilentInstallOptionsPckg == NULL )
+    if ( aSilentInstallOptions == NULL )
         {
         DLINFO(("Normal install"));
         InitializeInstallerL();
@@ -1506,15 +1527,40 @@
             {
             DLTRACE(("Installing JAD+JAR"));
             // JAD+JAR install
-            iCancelCode = SwiUI::ERequestInstall;
-            iInstaller.Install( iInstallStatusObserver->iStatus, *iJadFileName );
+            //iCancelCode = SwiUI::ERequestInstall;
+            if ( !iArguments )
+                {
+                iArguments = Usif::COpaqueNamedParams::NewL();
+                }
+            if ( !iResults )
+                {
+                iResults = Usif::COpaqueNamedParams::NewL();
+                }
+             
+             iArguments->AddIntL( Usif::KSifInParam_InstallSilently, EFalse );
+                        
+            iInstaller.Install( *iJadFileName, *iArguments, *iResults, iInstallStatusObserver->iStatus ); 
+            //iInstaller.Install( iInstallStatusObserver->iStatus, *iJadFileName );
             }
         else
             {
             DLTRACE(("Installing JAR"));
             // JAR install
-            iCancelCode = SwiUI::ERequestInstallHandle;
-            iInstaller.Install( iInstallStatusObserver->iStatus, aFile );
+            //iCancelCode = SwiUI::ERequestInstallHandle;
+            if ( !iArguments )
+                {
+                iArguments = Usif::COpaqueNamedParams::NewL();
+                }
+            if ( !iResults )
+               {
+               iResults = Usif::COpaqueNamedParams::NewL();
+               }
+            
+             iArguments->AddIntL( Usif::KSifInParam_InstallSilently, EFalse );
+             
+             iInstaller.Install( aFile, *iArguments, *iResults, iInstallStatusObserver->iStatus ); 
+            
+            //iInstaller.Install( iInstallStatusObserver->iStatus, aFile );
             }
         
         iInstallStatusObserver->StartToObserve();
@@ -1530,7 +1576,7 @@
             // of the silent install and it will forward the information for the callback
             // function of this class object.
             iSilentInstallActiveObserver->StartToObserveL( *iJadFileName,
-                                                           *aSilentInstallOptionsPckg );
+                                                           aSilentInstallOptions );
             }
         else
             {
@@ -1540,7 +1586,7 @@
             // of the silent install and it will forward the information for the callback
             // function of this class object.
             iSilentInstallActiveObserver->StartToObserveL( aFile,
-                                                           *aSilentInstallOptionsPckg );
+                                                           aSilentInstallOptions );
             }        
         }
 
@@ -1556,7 +1602,7 @@
 //
 void CNcdInstallationService::InstallWidgetL( 
     RFile& aFile,
-    const SwiUI::TInstallOptionsPckg* aSilentInstallOptionsPckg )
+    const Usif::COpaqueNamedParams* aSilentInstallOptions )
     {
     DLTRACEIN((""));    
     
@@ -1570,13 +1616,24 @@
     // Start application installation.
     DLINFO(( "Calling doc handler Open" ));
 
-    if ( !aSilentInstallOptionsPckg )
+    if ( !aSilentInstallOptions )
         {
         DLINFO(("Normal install"));
         InitializeInstallerL();
-        iCancelCode = SwiUI::ERequestInstallHandle;
-        
-        iInstaller.Install( iInstallStatusObserver->iStatus, aFile );
+        //iCancelCode = SwiUI::ERequestInstallHandle;
+        if ( !iArguments )
+            {
+            iArguments = Usif::COpaqueNamedParams::NewL();
+            }
+        if ( !iResults )
+           {
+           iResults = Usif::COpaqueNamedParams::NewL();
+           }
+                    
+        iArguments->AddIntL( Usif::KSifInParam_InstallSilently, EFalse );
+        iInstaller.Install(aFile, *iArguments, *iResults, iInstallStatusObserver->iStatus  );
+         
+        //iInstaller.Install( iInstallStatusObserver->iStatus, aFile );
         iInstallStatusObserver->StartToObserve();            
         }
     else
@@ -1586,7 +1643,7 @@
         // of the silent install and it will forward the information for the callback
         // function of this class object.
         iSilentInstallActiveObserver->StartToObserveL( aFile,
-                                                       *aSilentInstallOptionsPckg );
+                                                       aSilentInstallOptions );
         }
         
     iBusy = ETrue;
@@ -1603,10 +1660,13 @@
     DeletePtr( iInstallStatusObserver );
     iInstallStatusObserver = CNcdActiveOperationObserver::NewL( *this );
     
+    User::LeaveIfError( iInstaller.Connect() );
+    /*
     if ( !iInstaller.Handle() ) 
         {
         User::LeaveIfError( iInstaller.Connect() );
         }
+    */
     }
     
 
@@ -1617,11 +1677,13 @@
 void CNcdInstallationService::CancelInstall()
     {
     DLTRACEIN((""));
-    if ( iInstallStatusObserver &&
-         iInstaller.Handle() ) 
+    //if ( iInstallStatusObserver &&
+    //     iInstaller.Handle() ) 
+    if ( iInstallStatusObserver )
         {
         DLTRACE(("Cancelling installation"));
-        iInstaller.CancelAsyncRequest( iCancelCode );
+        iInstaller.CancelOperation();
+        //iInstaller.CancelAsyncRequest( iCancelCode );
         }
     
     DeletePtr( iInstallStatusObserver );
@@ -1920,7 +1982,7 @@
 TUid CNcdInstallationService::InstalledMidletUidL()
     {
 
-    Usif::COpaqueNamedParams* iResults = 0; // to be removed
+    //Usif::COpaqueNamedParams* iResults = 0; // to be removed
     
     RArray<TUid> appUids;
     TUid midletUid = KNullUid;
--- a/ncdengine/provider/deviceinteraction/src/ncdsilentinstallactiveobserver.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/ncdengine/provider/deviceinteraction/src/ncdsilentinstallactiveobserver.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -19,6 +19,8 @@
 #include "ncdsilentinstallactiveobserver.h"
 #include "ncdasyncsilentinstallobserver.h"
 
+#include <usif/scr/scr.h>
+
 
 CNcdSilentInstallActiveObserver* CNcdSilentInstallActiveObserver::NewL( MNcdAsyncSilentInstallObserver& aObserver )
     {
@@ -49,6 +51,9 @@
 
 void CNcdSilentInstallActiveObserver::ConstructL()
     {
+    
+    iResults = 0;
+    
     CActiveScheduler::Add( this );
     }
 
@@ -60,6 +65,9 @@
     // cancel install operation and closes the silent installer. 
     // If no operation is going on, the installer is already closed. 
     // So, no need to close the silent launcher here separately.
+    
+    delete (iResults);
+
     CancelAsyncOperation();
     }
 
@@ -72,12 +80,37 @@
     // Notice, that we do not call the callback functions of the observer here
     // because we suppose that the observer has started the cancel operation itself
     // or the caller will inform the observer itself.
-    SilentLauncher().CancelAsyncRequest( iCancelCode );
+    
+    SilentLauncher().CancelOperation();
     }
 
 
 void CNcdSilentInstallActiveObserver::StartToObserveL( const TDesC& aFileName,
-                                                       const SwiUI::TInstallOptionsPckg& aSilentInstallOptionsPckg )
+                                                       const Usif::COpaqueNamedParams* aSilentInstallOptions )
+    {
+    // For silent installation
+    // Notice that if the user does not have TrustedUI capabilities
+    // then this will given KErrPermissionDenied.
+    // Connect to the launcher here just before it is needed, 
+    // because the launcher will be shown in the application list.
+    // So, it would not be nice to connect in the ConstructL and to show
+    // the icon in the list all the time.
+    // User::LeaveIfError( SilentLauncher().Connect() );
+    User::LeaveIfError( SilentLauncher().Connect() );
+    
+    if (!iResults)
+        {
+        iResults = Usif::COpaqueNamedParams::NewL();
+        }
+    
+    iInstaller.Install( aFileName, *aSilentInstallOptions, *iResults, iStatus ); 
+        
+
+    }
+
+
+void CNcdSilentInstallActiveObserver::StartToObserveL( RFile& aFile,
+                                                       const Usif::COpaqueNamedParams* aSilentInstallOptions )
     {
     // For silent installation
     // Notice that if the user does not have TrustedUI capabilities
@@ -86,34 +119,73 @@
     // because the launcher will be shown in the application list.
     // So, it would not be nice to connect in the ConstructL and to show
     // the icon in the list all the time.
+
     User::LeaveIfError( SilentLauncher().Connect() );
     
-    iCancelCode = SwiUI::ERequestSilentInstall;
-    SilentLauncher().SilentInstall( iStatus,
-                                    aFileName,
-                                    aSilentInstallOptionsPckg );
+    if (!iResults)
+        {
+        iResults = Usif::COpaqueNamedParams::NewL();
+        }
+    /*
+    if (iResults)
+        {
+        delete (iResults);
+        iResults = 0;
+        }
+   iResults = Usif::COpaqueNamedParams::NewL();
 
-    SetActive();
-    }
-
+    if (iArguments)
+        {
+        delete (iArguments);
+        iArguments = 0;
+        }
+    iArguments = Usif::COpaqueNamedParams::NewL();
 
-void CNcdSilentInstallActiveObserver::StartToObserveL( RFile& aFile,
-                                                       const SwiUI::TInstallOptionsPckg& aSilentInstallOptionsPckg )
-    {
-    // For silent installation
-    // Notice that if the user does not have TrustedUI capabilities
-    // then this will given KErrPermissionDenied.
-    // Connect to the launcher here just before it is needed, 
-    // because the launcher will be shown in the application list.
-    // So, it would not be nice to connect in the ConstructL and to show
-    // the icon in the list all the time.
-    User::LeaveIfError( SilentLauncher().Connect() );
+    // Silent installation request
+    
+    TBool iSet = ETrue;
+    
+    enum TSifPolicy
+        {
+        EAllowed        = 0,
+        ENotAllowed     = 1,
+        EUserConfirm    = 2
+        };
     
-    iCancelCode = SwiUI::ERequestSilentInstallHandle;
-    SilentLauncher().SilentInstall( iStatus,
-                                    aFile,
-                                    aSilentInstallOptionsPckg );
-
+    if (iSet)
+       iArguments->AddIntL( Usif::KSifInParam_InstallSilently, ETrue );
+    else
+        iArguments->AddIntL( Usif::KSifInParam_InstallSilently, EFalse ); 
+    if (iSet)
+        iArguments->AddIntL( Usif::KSifInParam_PerformOCSP, Usif::ENotAllowed );  
+    if (iSet)
+        iArguments->AddIntL( Usif::KSifInParam_AllowUpgrade, Usif::EAllowed );
+    if (iSet)
+        iArguments->AddIntL( Usif::KSifInParam_AllowUntrusted, Usif::ENotAllowed );
+    if (iSet)
+        iArguments->AddIntL( Usif::KSifInParam_GrantCapabilities, Usif::ENotAllowed );
+    if (iSet)
+        iArguments->AddIntL( Usif::KSifInParam_InstallOptionalItems, Usif::EAllowed );
+    if (iSet)
+        iArguments->AddIntL( Usif::KSifInParam_IgnoreOCSPWarnings, Usif::EAllowed );   
+    //iArguments->AddIntL( Usif::KSifInParam_PackageInfo, ETrue );
+    if (iSet)
+        iArguments->AddIntL( Usif::KSifInParam_AllowAppShutdown, Usif::EAllowed );
+    if (iSet)
+       iArguments->AddIntL( Usif::KSifInParam_AllowDownload, Usif::EAllowed );
+    if (iSet)
+       iArguments->AddIntL( Usif::KSifInParam_AllowOverwrite, Usif::EAllowed );
+    
+    
+    //iArguments->AddIntL(Usif::KSifInParam_InstallSilently, 1);
+    //iArguments->AddIntL( Usif::KSifInParam_DisplayPackageInfo, ETrue );     
+    
+    iInstaller.Install(aFile, *iArguments, *iResults, iStatus); 
+    */
+    
+    iInstaller.Install( aFile, *aSilentInstallOptions, *iResults, iStatus ); 
+    
+    
     SetActive();
     }
 
@@ -140,6 +212,15 @@
     // Close the installer. 
     // The launcher is shown in the application list.
     // So, it would not be nice to leave it there after operation is completed.
+    
+   
+    TInt ErrCategory = 0;
+    TInt ErrCode = 0;
+    TInt ExtendedErrCode =0;
+    
+    TBool ret = iResults->GetIntByNameL(Usif::KSifOutParam_ErrCategory, ErrCategory);
+    ret = iResults->GetIntByNameL(Usif::KSifOutParam_ErrCode, ErrCode);
+    ret = iResults->GetIntByNameL(Usif::KSifOutParam_ExtendedErrCode, ExtendedErrCode);
     SilentLauncher().Close();
 
     TInt errorCode( ConvertErrorCode( iStatus.Int() ) );
@@ -154,15 +235,16 @@
     return iObserver;
     }
 
-
-SwiUI::RSWInstSilentLauncher& CNcdSilentInstallActiveObserver::SilentLauncher()
+Usif::RSoftwareInstall& CNcdSilentInstallActiveObserver::SilentLauncher()
     {
-    return iSilentLauncher;
+    // return iSilentLauncher;
+    return iInstaller;
     }
 
 
 TInt CNcdSilentInstallActiveObserver::ConvertErrorCode( TInt aErrorCode )
     {
+    /*
     switch ( aErrorCode )
         {
         case SwiUI::KSWInstErrUserCancel:
@@ -181,7 +263,8 @@
             // Nothing to do here.
             break;
         }
-
+    */
+    
     return aErrorCode;
     }
 
--- a/secureswitools/makekeys/group/bld.inf	Wed Jun 23 18:20:02 2010 +0300
+++ b/secureswitools/makekeys/group/bld.inf	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 1999-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"
@@ -23,19 +23,14 @@
 */
 
 PRJ_PLATFORMS
-TOOLS
+TOOLS2
 
 PRJ_EXPORTS
 
 PRJ_MMPFILES
-#ifdef TOOLS
-#ifndef TOOLS2
-#ifdef MSVCDOTNET
-makefile ../src/makekeys.net.fil
-#else //!MSVCDOTNET
-makefile ../src/makekeys.fil
-#endif // MSVCDOTNET
-#endif // TOOLS2
-#endif // TOOLS
 
-PRJ_TESTMMPFILES
+#ifdef TOOLS2
+#ifndef TOOLS2_LINUX
+makekeys.mmp
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/makekeys/group/makekeys.mmp	Tue Jul 06 14:23:31 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This mmp file is used to replace calling makefile directly.
+*
+*/
+
+
+TARGET			makekeys.exe
+TARGETTYPE		exe
+
+
+USERINCLUDE 		../../swisistools/source/makesis
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+SYSTEMINCLUDE 		../../openssllib/import/inc
+
+
+SOURCEPATH 		../src
+SOURCE			CertificateGenerator.cpp
+SOURCE			CertificateRequestGenerator.cpp
+SOURCE			DSAKeyGenerator.cpp
+SOURCE			KeyGenerator.cpp	
+SOURCE			MAKEKEYS.CPP
+SOURCE			PARSECMD.CPP
+SOURCE			RSAKeyGenerator.cpp
+SOURCE			UTILS.CPP
+
+
+#ifndef TOOLS2_LINUX
+	MACRO			_UNICODE _CONSOLE _STLP_THREADS _WIN32 UNICODE 
+#else
+	MACRO			_UNICODE _CONSOLE UNICODE 
+#endif
+
+STATICLIBRARY			eay32 
+
+OPTION				GCC -w
+OPTION				GCC -fno-stack-check
+OPTION				GCC -fpermissive
--- a/secureswitools/makekeys/src/MAKEKEYS.CPP	Wed Jun 23 18:20:02 2010 +0300
+++ b/secureswitools/makekeys/src/MAKEKEYS.CPP	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 1997-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"
@@ -56,7 +56,7 @@
 :m_fVerbose(FALSE)
 	{ ; }
 
-int CMakeKeys::Run(const int argc, const _TCHAR *argv[], const _TCHAR *envp[])
+int CMakeKeys::Run(const int argc, const _TCHAR *argv[])
 // Inputs   : argc, argv, envp - The command line passed to the process
 	{	
 	BOOL bValid = TRUE;
@@ -117,6 +117,7 @@
 
 			OUT << _T("Warning: the private key should be encrypted with the -password option") << endl;
 			OUT << _T("Do you want to use a password (y/n)? ");
+			OUT.flush();
 
 			cin >> Warn;
 
@@ -166,6 +167,7 @@
 
 				OUT << _T("Warning: the private key should be encrypted with the -password option") << endl;
 				OUT << _T("Do you want to use a password (y/n)? ");
+				OUT.flush();
 
 				cin >> Warn;
 
@@ -296,9 +298,13 @@
 	// main function - constructs a CMakeKeys object and calls it's run method
 	extern "C"
 		{
-		int _tmain(int argc, const _TCHAR *argv[], const _TCHAR *envp[])
+		int main(int argc, const char *argv[], const char *envp[])
 			{
+			// MingW doesn't support _tmain(),
+			// so using GetCommandLineW() to get wide args.
+			wchar_t** argvW = CommandLineToArgvW( GetCommandLineW(), &argc);
+			
 			CMakeKeys app;
-			return app.Run(argc, argv, envp);
+			return app.Run(argc, argvW);
 			}
 		}
--- a/secureswitools/makekeys/src/MAKEKEYS.H	Wed Jun 23 18:20:02 2010 +0300
+++ b/secureswitools/makekeys/src/MAKEKEYS.H	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 1997-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,7 +53,7 @@
 	public:
 		CMakeKeys();
 		
-		int  Run(const int argc, const _TCHAR *argv[], const _TCHAR *envp[]);
+		int  Run(const int argc, const _TCHAR *argv[]);
 			
 	public: 
 		CKeyGenerator* m_KeyGen;
--- a/secureswitools/swianalysistoolkit/group/bld.inf	Wed Jun 23 18:20:02 2010 +0300
+++ b/secureswitools/swianalysistoolkit/group/bld.inf	Tue Jul 06 14:23:31 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"
@@ -22,27 +22,24 @@
 */
 
 PRJ_PLATFORMS
-DEFAULT TOOLS
-TOOLS2
+DEFAULT TOOLS2
+TOOLS
 
 PRJ_MMPFILES
 
-#ifdef TOOLS 
-#ifndef TOOLS2
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-makefile ../source/chainvalidityandinstallfilestatustools/dumpchainvaliditytool/dumpchainvaliditytool.fil
-#else
-makefile ../source/chainvalidityandinstallfilestatustools/dumpchainvaliditytool/dumpchainvaliditytool2.fil
+#ifdef TOOLS2
+#ifndef TOOLS2_LINUX
+dumpchainvaliditytool.mmp
+dumpinstallfilestatustool.mmp
+dumpswicertstoretool.mmp
+#endif
 #endif
 
-makefile ../source/chainvalidityandinstallfilestatustools/dumpinstallfilestatustool/dumpinstallfilestatustool.fil
-makefile ../source/dumpswicertstoretool/dumpswicertstoretool.fil
 
 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK 
+#ifdef TOOLS
 makefile ../source/dumpswiregistrytool/dumpswiregistrytool.fil
 #endif
-
-#endif
 #endif
 
 
@@ -186,7 +183,7 @@
 ../test/tdumpregistry/dumpregistry-output/a0000206.out /epoc32/winscw/c/tswi/tdumpregistry/dumpregistry-output/a0000206.out
 ../test/tdumpregistry/dumpregistry-output/a0000206.tmp /epoc32/winscw/c/tswi/tdumpregistry/dumpregistry-output/a0000206.tmp
 ../test/tdumpregistry/testregistry.pl /epoc32/winscw/c/tswi/tdumpregistry/testregistry.pl
-
+#endif
 
 // tdumpcertstore
 ../test/tdumpcertstore/certstore.bat /epoc32/winscw/c/tswi/tdumpcertstore/certstore.bat
@@ -220,5 +217,4 @@
 ../test/tdumpcertstore/predumpcertstoretest.bat /epoc32/winscw/c/tswi/tdumpcertstore/predumpcertstoretest.bat
 ../test/tdumpcertstore/postdumpcertstoretest.bat /epoc32/winscw/c/tswi/tdumpcertstore/postdumpcertstoretest.bat
 ../test/tdumpcertstore/testswicertstore.pl /epoc32/winscw/c/tswi/tdumpcertstore/testswicertstore.pl
-#endif
 // End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swianalysistoolkit/group/dumpchainvaliditytool.mmp	Tue Jul 06 14:23:31 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This mmp file is used to replace calling makefile directly.
+*
+*/
+
+
+TARGET			dumpchainvaliditytool.exe
+TARGETTYPE		exe
+
+
+USERINCLUDE 			../source/chainvalidityandinstallfilestatustools/dumpchainvaliditytool
+USERINCLUDE 			../source/chainvalidityandinstallfilestatustools/common
+USERINCLUDE 			../source/common
+USERINCLUDE 			../../swisistools/source/makesis
+USERINCLUDE 			../../swisistools/source/common
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+SYSTEMINCLUDE 			../../openssllib/import/inc 
+
+SOURCEPATH			../source/chainvalidityandinstallfilestatustools
+
+SOURCE				./dumpchainvaliditytool/dumpchainvalidity.cpp
+SOURCE				./dumpchainvaliditytool/options.cpp
+SOURCE				./common/certificatechain.cpp
+SOURCE				./common/dumpchainvaliditytool.cpp
+SOURCE				./common/launchprocess.cpp
+SOURCE				./common/siscertificatechain.cpp
+SOURCE				./common/swicertstore.cpp
+SOURCE				../common/osinterface.cpp
+
+#ifndef TOOLS2_LINUX
+	MACRO			_UNICODE _CONSOLE _STLP_THREADS _WIN32 GENERATE_ERRORS DUMPCHAINVALIDITYTOOL //UNICODE
+#else
+	MACRO			_UNICODE _CONSOLE UNICODE GENERATE_ERRORS DUMPCHAINVALIDITYTOOL	
+#endif
+
+STATICLIBRARY			eay32 
+STATICLIBRARY			shlwapi 
+
+OPTION				GCC -w
+OPTION				GCC -fno-stack-check
+OPTION				GCC -fpermissive
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swianalysistoolkit/group/dumpinstallfilestatustool.mmp	Tue Jul 06 14:23:31 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This mmp file is used to replace calling makefile directly.
+*
+*/
+
+
+TARGET			dumpinstallfilestatustool.exe
+TARGETTYPE		exe
+
+
+USERINCLUDE 			../source/chainvalidityandinstallfilestatustools/dumpinstallfilestatustool
+USERINCLUDE 			../source/chainvalidityandinstallfilestatustools/common
+USERINCLUDE 			../source/common
+USERINCLUDE 			../../swisistools/source/makesis
+USERINCLUDE 			../../swisistools/source/common
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+SYSTEMINCLUDE 			../../openssllib/import/inc 
+
+SOURCEPATH			../source/chainvalidityandinstallfilestatustools
+
+SOURCE				./dumpinstallfilestatustool/dumpinstallfilestatustool.cpp
+SOURCE				./dumpinstallfilestatustool/sisfiledata.cpp
+SOURCE				./dumpinstallfilestatustool/options.cpp
+SOURCE				./common/certificatechain.cpp
+SOURCE				./common/dumpchainvaliditytool.cpp
+SOURCE				./common/launchprocess.cpp
+SOURCE				./common/siscertificatechain.cpp
+SOURCE				./common/swicertstore.cpp
+SOURCE				../common/osinterface.cpp
+
+#ifndef TOOLS2_LINUX
+	MACRO			_UNICODE _CONSOLE _STLP_THREADS _WIN32 GENERATE_ERRORS DUMPINSTALLFILESTATUSTOOL //UNICODE
+#else
+	MACRO			_UNICODE _CONSOLE UNICODE GENERATE_ERRORS DUMPINSTALLFILESTATUSTOOL	
+#endif
+
+STATICLIBRARY			eay32 
+STATICLIBRARY			shlwapi 
+
+OPTION				GCC -w
+OPTION				GCC -fno-stack-check
+OPTION				GCC -fpermissive
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swianalysistoolkit/group/dumpswicertstoretool.mmp	Tue Jul 06 14:23:31 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* This mmp file is used to replace calling makefile directly.
+*
+*/
+
+
+TARGET			dumpswicertstoretool.exe
+TARGETTYPE		exe
+
+USERINCLUDE 		../source/dumpswicertstoretool
+USERINCLUDE 		../source/common
+USERINCLUDE 		../source/common/utf8
+USERINCLUDE 		../../swisistools/source/makesis
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+SYSTEMINCLUDE 		../../openssllib/import/inc
+
+
+SOURCEPATH 		../source/common/utf8
+SOURCE			utf8.cpp
+
+SOURCEPATH 		../source/common
+SOURCE			osinterface.cpp  
+SOURCE			ucmp.cpp 
+SOURCE			streamreader.cpp
+
+SOURCEPATH		../source/dumpswicertstoretool
+
+SOURCE			certificate.cpp 
+SOURCE			datalocator.cpp 
+SOURCE			options.cpp  
+SOURCE			pfsdump.cpp 
+SOURCE			dumpswicertstoretool.cpp  
+SOURCE			swicertstoremetadata.cpp
+
+
+#ifndef TOOLS2_LINUX
+	MACRO			_UNICODE _CONSOLE _STLP_THREADS _WIN32 _MBCS DUMPSWICERTSTORETOOL	
+#else
+	MACRO			_UNICODE _CONSOLE UNICODE DUMPSWICERTSTORETOOL
+	STATICLIBRARY		crypto 
+#endif
+
+STATICLIBRARY			eay32 
+STATICLIBRARY			shlwapi 
+
+OPTION				GCC -w
+OPTION				GCC -fno-stack-check
+OPTION				GCC -fpermissive
--- a/secureswitools/swianalysistoolkit/source/chainvalidityandinstallfilestatustools/common/certificatechain.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/secureswitools/swianalysistoolkit/source/chainvalidityandinstallfilestatustools/common/certificatechain.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -450,7 +450,7 @@
 						capabilities.append("Unknown"+capability);
 						}
 				
-					iDevCapabilities += pow(2,capability);
+					iDevCapabilities += pow((double)2,capability);
 					}
 				capability++;
 				}
@@ -540,7 +540,7 @@
 				buf[j] = *(buffer++);
 				}
 
-			deviceId.append(buf);
+			deviceId.assign(buf,(KDeviceIdLength-2));
 			deviceId.append("\n");
 			}
 		}
--- a/secureswitools/swianalysistoolkit/source/chainvalidityandinstallfilestatustools/dumpinstallfilestatustool/dumpinstallfilestatustool.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/secureswitools/swianalysistoolkit/source/chainvalidityandinstallfilestatustools/dumpinstallfilestatustool/dumpinstallfilestatustool.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -15,7 +15,7 @@
 *
 */
 
-
+#include <memory>
 #include "dumpinstallfilestatustool.h"
 #include "osinterface.h"
 #ifdef _MSC_VER
--- a/secureswitools/swianalysistoolkit/source/chainvalidityandinstallfilestatustools/dumpinstallfilestatustool/options.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/secureswitools/swianalysistoolkit/source/chainvalidityandinstallfilestatustools/dumpinstallfilestatustool/options.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -263,7 +263,7 @@
 				{
 					if(capabilities.compare(listOfCapabilities[i])==0)
 					{
-					userCaps += pow(2,i);
+					userCaps += pow((double)2,i);
 					}
 				}
 			}
--- a/secureswitools/swianalysistoolkit/source/common/streamreader.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/secureswitools/swianalysistoolkit/source/common/streamreader.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -225,7 +225,7 @@
 	// This memory will be freed by the caller of this function
 	char *ptrUtf8 = new char[targetLength + 1];
 	
-	UTF16* sourceStart = static_cast<UTF16*>(aSource);
+	UTF16* sourceStart = reinterpret_cast<UTF16*>(aSource);
 	UTF16* sourceEnd = sourceStart + aSrcLength; 
 	UTF8* targetStart = reinterpret_cast<UTF8*>(ptrUtf8);
 	UTF8* targetEnd;
--- a/secureswitools/swianalysistoolkit/source/dumpswicertstoretool/pfsdump.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/secureswitools/swianalysistoolkit/source/dumpswicertstoretool/pfsdump.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -206,7 +206,8 @@
 Stream StoreFile::RootStream()
 	{
 	Toc::Head const& head=iToc.Header();
-	return FindStream(head.Root());
+	Handle hndl = static_cast<Handle>(head.Root());
+	return FindStream(hndl);
 	}
 
 Stream StoreFile::FindStream(Handle& aHandle)
--- a/secureswitools/swianalysistoolkit/source/dumpswicertstoretool/swicertstoremetadata.cpp	Wed Jun 23 18:20:02 2010 +0300
+++ b/secureswitools/swianalysistoolkit/source/dumpswicertstoretool/swicertstoremetadata.cpp	Tue Jul 06 14:23:31 2010 +0300
@@ -143,7 +143,7 @@
    				capability.append("Unknown"+unknownIndex);
    				unknownIndex++;
    				}
-  			cap += pow(2,j);
+  			cap += pow((double)2,j);
    			}
    		else
    			{