201039_02
authorhgs
Thu, 14 Oct 2010 14:11:30 +0300
changeset 77 d1838696558c
parent 75 2d2d25361590
child 80 9dcba1ee99f7
201039_02
appinstall_plat/appmngr2runtimeapi/tsrc/group/appmngr2runtimeapitest.mmp
appinstall_plat/sifui_api/tsrc/group/sifuitest.mmp
appinstaller/AppinstUi/startuplistupdater/tsrc/mt_startuplistupdater/group/mt_startuplistupdater.mmp
iaupdate/IAD/bgcindicatorplugin/src/bgcindicator.cpp
iaupdate/IAD/engine/controller/inc/iaupdatefwnodeimpl.h
iaupdate/IAD/engine/controller/src/iaupdatefwnodeimpl.cpp
iaupdate/IAD/engine/inc/iaupdatefwnode.h
iaupdate/IAD/firmwareupdate/bwins/iaupdatefwupdateu.def
iaupdate/IAD/firmwareupdate/eabi/iaupdatefwupdateu.def
iaupdate/IAD/firmwareupdate/inc/iaupdatefwfotamodel.h
iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncappengine.h
iaupdate/IAD/firmwareupdate/inc/iaupdatefwsynchandler.h
iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncprofile.h
iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncstate.h
iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncutil.h
iaupdate/IAD/firmwareupdate/inc/iaupdatefwupdatehandler.h
iaupdate/IAD/firmwareupdate/inc/iaupdatefwupdateobserver.h
iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp
iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncappengine.cpp
iaupdate/IAD/firmwareupdate/src/iaupdatefwsynchandler.cpp
iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncprofile.cpp
iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncstate.cpp
iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncutil.cpp
iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp
iaupdate/IAD/ui/iaupdate.pro
iaupdate/IAD/ui/iaupdate.qrc
iaupdate/IAD/ui/iaupdate_mainview.docml
iaupdate/IAD/ui/iaupdateapplistitem.css
iaupdate/IAD/ui/iaupdateapplistitem.widgetml
iaupdate/IAD/ui/inc/iaupdateapplistitem.h
iaupdate/IAD/ui/inc/iaupdateapplistmodel.h
iaupdate/IAD/ui/inc/iaupdateengine.h
iaupdate/IAD/ui/inc/iaupdatemainview.h
iaupdate/IAD/ui/inc/iaupdatemainwindow.h
iaupdate/IAD/ui/inc/iaupdateuicontroller.h
iaupdate/IAD/ui/inc/iaupdateuicontrollerobserver.h
iaupdate/IAD/ui/inc/iaupdateuids.h
iaupdate/IAD/ui/inc/iaupdatewaitdialog.h
iaupdate/IAD/ui/inc/iaupdatewaitdialogobserver.h
iaupdate/IAD/ui/src/iaupdateapplication.cpp
iaupdate/IAD/ui/src/iaupdateapplistitem.cpp
iaupdate/IAD/ui/src/iaupdateapplistmodel.cpp
iaupdate/IAD/ui/src/iaupdateautomaticcheck.cpp
iaupdate/IAD/ui/src/iaupdatedialogutil.cpp
iaupdate/IAD/ui/src/iaupdateengine.cpp
iaupdate/IAD/ui/src/iaupdatemainview.cpp
iaupdate/IAD/ui/src/iaupdatemainwindow.cpp
iaupdate/IAD/ui/src/iaupdateresultsdialog.cpp
iaupdate/IAD/ui/src/iaupdatesettingdialog.cpp
iaupdate/IAD/ui/src/iaupdateuicontroller.cpp
iaupdate/IAD/ui/src/iaupdatewaitdialog.cpp
iaupdate/IAD/updater/src/iaupdaterdialog.cpp
iaupdate/IAD/updater/src/iaupdaterinstaller.cpp
iaupdate/rom/iaupdateresources.iby
installationservices/swcomponentregistry/inc/scr.h
installationservices/swcomponentregistry/test/testdb/update_db_production.xml
installationservices/swi/source/sisregistry/common/sisregistryobject.cpp
installationservices/swi/source/swis/server/installmachine.cpp
installationservices/swi/test/swicaptests/sishelperstarter.mmp
installationservices/swiconfig/usif/scr/scr.db
installationservices/swiconfig/usif/scr/update_db.dtd
installationservices/swiconfig/usif/scr/update_db_production.xml
installationservices/swiconfig/usif/siflauncher/siflauncher_reg.rss
installationservices/swinstallationfw/test/tusif/group/createsisfiles.bat
installationservices/swinstallationfw/test/tusif/scripts/data/sifcomponentinfointegration_diffuid.pkg
installationservices/swinstallationfw/test/tusif/scripts/tsifintegration.ini
installationservices/swinstallationfw/test/tusif/scripts/tsifintegration.script
installationservices/switestfw/test/autotesting/testMakesis.pl
ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp
secureswitools/swisistools/source/dbmanager/sqlite/sqlite-3.6.1.so
secureswitools/swisistools/source/interpretsislib/sisregistryobject.cpp
secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp
secureswitools/swisistools/source/xmlparser/xerces/lib/libxerces_linux.a
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/group/appmngr2runtimeapitest.mmp	Tue Sep 28 14:48:39 2010 +0300
+++ b/appinstall_plat/appmngr2runtimeapi/tsrc/group/appmngr2runtimeapitest.mmp	Thu Oct 14 14:11:30 2010 +0300
@@ -34,8 +34,8 @@
 SOURCE          appmngr2testcommand.cpp
 
 LIBRARY         euser.lib                       // Base
-LIBRARY         stiftestinterface.lib           // STIF Framework
-LIBRARY         stiftestengine.lib              // STIF Framework
+LIBRARY         StifTestInterface.lib           // STIF Framework
+LIBRARY         StifTestEngine.lib              // STIF Framework
 LIBRARY         appmngr2pluginapi.lib           // AppMngr2 Runtime API
 LIBRARY         ecom.lib                        // ECom
 LIBRARY         avkon.lib                       // CAknIconArray
--- a/appinstall_plat/sifui_api/tsrc/group/sifuitest.mmp	Tue Sep 28 14:48:39 2010 +0300
+++ b/appinstall_plat/sifui_api/tsrc/group/sifuitest.mmp	Thu Oct 14 14:11:30 2010 +0300
@@ -35,8 +35,8 @@
 LIBRARY         efsrv.lib                           // File server
 LIBRARY         ws32.lib                            // Window server
 LIBRARY         bafl.lib                            // CDesC16ArrayFlat
-LIBRARY         stiftestinterface.lib               // STIF Framework
-LIBRARY         stiftestengine.lib                  // STIF Framework
+LIBRARY         StifTestInterface.lib               // STIF Framework
+LIBRARY         StifTestEngine.lib                  // STIF Framework
 LIBRARY         sifui.lib                           // CSifUi
 LIBRARY         estor.lib                           // RBufWriteStream
 LIBRARY         uissclient.lib                      // Swi::CCertificateInfo
--- a/appinstaller/AppinstUi/startuplistupdater/tsrc/mt_startuplistupdater/group/mt_startuplistupdater.mmp	Tue Sep 28 14:48:39 2010 +0300
+++ b/appinstaller/AppinstUi/startuplistupdater/tsrc/mt_startuplistupdater/group/mt_startuplistupdater.mmp	Thu Oct 14 14:11:30 2010 +0300
@@ -32,8 +32,8 @@
 SOURCE          mt_startuplistupdaterblocks.cpp
 
 LIBRARY         euser.lib
-LIBRARY         stiftestinterface.lib
-LIBRARY         stiftestengine.lib
+LIBRARY         StifTestInterface.lib
+LIBRARY         StifTestEngine.lib
 LIBRARY         sif.lib
 LIBRARY         scrclient.lib
 LIBRARY         dscstore.lib
--- a/iaupdate/IAD/bgcindicatorplugin/src/bgcindicator.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/bgcindicatorplugin/src/bgcindicator.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -24,8 +24,8 @@
 
 #include "bgcindicator.h" 
 
-const char KTranslatorFileName[] = "swupdate";
-const char KIconName[] = "qtg_large_swupdate";
+const QString KTranslationsFileName = "swupdate";
+const QString KIconName = "qtg_large_swupdate";
 
 //----------------------------------------------------------------------
 
@@ -42,7 +42,7 @@
         mTranslator(0)
     {
   
-    HbTranslator* mTranslator = new HbTranslator(KTranslatorFileName);
+    HbTranslator* mTranslator = new HbTranslator(KTranslationsFileName);
     
     }
 
--- a/iaupdate/IAD/engine/controller/inc/iaupdatefwnodeimpl.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/engine/controller/inc/iaupdatefwnodeimpl.h	Thu Oct 14 14:11:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -147,6 +147,10 @@
     void SetContentUrlL();
         
     void SetNameL( const MNcdNodeMetadata& aMetaData );
+    
+    void SetUiState( TUIUpdateState aState );
+            
+    TUIUpdateState UiState() const;
 
 
 private: // data
@@ -167,6 +171,8 @@
 
     // Flag to inform if operation is cancelled.
     TBool iCancelling;
+    
+    TUIUpdateState iUiUpdateState;
 
     };
     
--- a/iaupdate/IAD/engine/controller/src/iaupdatefwnodeimpl.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/engine/controller/src/iaupdatefwnodeimpl.cpp	Thu Oct 14 14:11:30 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"
@@ -432,3 +432,24 @@
      
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateFwNode::SetNameL() end");
     }
+
+
+// ---------------------------------------------------------------------------
+// CIAUpdateFwNode::SetUiState()
+// 
+// ---------------------------------------------------------------------------
+//
+void CIAUpdateFwNode::SetUiState( MIAUpdateFwNode::TUIUpdateState aState )
+    {
+    iUiUpdateState = aState;
+    }
+
+// ---------------------------------------------------------------------------
+// CIAUpdateFwNode::UiState()
+// 
+// ---------------------------------------------------------------------------
+//
+MIAUpdateFwNode::TUIUpdateState CIAUpdateFwNode::UiState() const
+    {
+    return iUiUpdateState;
+    }
--- a/iaupdate/IAD/engine/inc/iaupdatefwnode.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/engine/inc/iaupdatefwnode.h	Thu Oct 14 14:11:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -61,6 +61,12 @@
 
         };
 
+    enum TUIUpdateState
+        {
+        ENormal,
+        EPreparing
+        };
+    
 
     /**
      * @return TFwUpdateType The type of this firmware update.
@@ -122,6 +128,10 @@
      * @return const TDesC& Download URL for firmware update.
      */
     virtual const TDesC& ContentUrl() const = 0;
+    
+    virtual void SetUiState( TUIUpdateState aState ) = 0;
+        
+    virtual TUIUpdateState UiState() const = 0;
 
 
 protected:
--- a/iaupdate/IAD/firmwareupdate/bwins/iaupdatefwupdateu.def	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/bwins/iaupdatefwupdateu.def	Thu Oct 14 14:11:30 2010 +0300
@@ -1,7 +1,6 @@
 EXPORTS
-	?FirmWareUpdatewithFOTA@CIAUpdateFWUpdateHandler@@QAEXXZ @ 1 NONAME ; void CIAUpdateFWUpdateHandler::FirmWareUpdatewithFOTA(void)
-	?FirmWareUpdatewithNSU@CIAUpdateFWUpdateHandler@@QAEXXZ @ 2 NONAME ; void CIAUpdateFWUpdateHandler::FirmWareUpdatewithNSU(void)
-	?IsDMSupportAvailableL@CIAUpdateFWUpdateHandler@@QAEHXZ @ 3 NONAME ; int CIAUpdateFWUpdateHandler::IsDMSupportAvailableL(void)
-	?NewL@CIAUpdateFWUpdateHandler@@SAPAV1@XZ @ 4 NONAME ; class CIAUpdateFWUpdateHandler * CIAUpdateFWUpdateHandler::NewL(void)
-	?NewLC@CIAUpdateFWUpdateHandler@@SAPAV1@XZ @ 5 NONAME ; class CIAUpdateFWUpdateHandler * CIAUpdateFWUpdateHandler::NewLC(void)
+	?NewLC@CIAUpdateFWUpdateHandler@@SAPAV1@XZ @ 1 NONAME ; class CIAUpdateFWUpdateHandler * CIAUpdateFWUpdateHandler::NewLC(void)
+	?IsDMSupportAvailableL@CIAUpdateFWUpdateHandler@@QAEHXZ @ 2 NONAME ; int CIAUpdateFWUpdateHandler::IsDMSupportAvailableL(void)
+	?NewL@CIAUpdateFWUpdateHandler@@SAPAV1@XZ @ 3 NONAME ; class CIAUpdateFWUpdateHandler * CIAUpdateFWUpdateHandler::NewL(void)
+	?FirmWareUpdatewithFOTA@CIAUpdateFWUpdateHandler@@QAEXPAVMIAUpdateFWUpdateObserver@@@Z @ 4 NONAME ; void CIAUpdateFWUpdateHandler::FirmWareUpdatewithFOTA(class MIAUpdateFWUpdateObserver *)
 
--- a/iaupdate/IAD/firmwareupdate/eabi/iaupdatefwupdateu.def	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/eabi/iaupdatefwupdateu.def	Thu Oct 14 14:11:30 2010 +0300
@@ -1,13 +1,6 @@
 EXPORTS
-	_ZN24CIAUpdateFWUpdateHandler21FirmWareUpdatewithNSUEv @ 1 NONAME
-	_ZN24CIAUpdateFWUpdateHandler21IsDMSupportAvailableLEv @ 2 NONAME
-	_ZN24CIAUpdateFWUpdateHandler22FirmWareUpdatewithFOTAEv @ 3 NONAME
-	_ZN24CIAUpdateFWUpdateHandler4NewLEv @ 4 NONAME
-	_ZN24CIAUpdateFWUpdateHandler5NewLCEv @ 5 NONAME
-	_ZTI20CIAUpdateFWFotaModel @ 6 NONAME ; #<TI>#
-	_ZTI24CIAUpdateFWSyncAppEngine @ 7 NONAME ; #<TI>#
-	_ZTI24CIAUpdateFWUpdateHandler @ 8 NONAME ; #<TI>#
-	_ZTV20CIAUpdateFWFotaModel @ 9 NONAME ; #<VT>#
-	_ZTV24CIAUpdateFWSyncAppEngine @ 10 NONAME ; #<VT>#
-	_ZTV24CIAUpdateFWUpdateHandler @ 11 NONAME ; #<VT>#
+	_ZN24CIAUpdateFWUpdateHandler21IsDMSupportAvailableLEv @ 1 NONAME
+	_ZN24CIAUpdateFWUpdateHandler22FirmWareUpdatewithFOTAEP25MIAUpdateFWUpdateObserver @ 2 NONAME
+	_ZN24CIAUpdateFWUpdateHandler4NewLEv @ 3 NONAME
+	_ZN24CIAUpdateFWUpdateHandler5NewLCEv @ 4 NONAME
 
--- a/iaupdate/IAD/firmwareupdate/inc/iaupdatefwfotamodel.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwfotamodel.h	Thu Oct 14 14:11:30 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"
@@ -23,7 +23,6 @@
 
 //  INCLUDES
 #include <fotaengine.h>
-#include <badesca.h>
 
 // FORWARD DECLARATIONS
 
@@ -32,10 +31,9 @@
 /**
 *  Functionality required by the fota user interface.
 *
-*  @lib IAUpdateFWSyncApp
-*  @since Series 60 3.1
 */
-class CIAUpdateFWFotaModel : public CBase
+
+NONSHARABLE_CLASS (CIAUpdateFWFotaModel) : public CBase
     {
     public:  // Constructors and destructor
         
@@ -77,79 +75,9 @@
         * @param aProfileId Profile identifier.
         * @return None
         */
-          void EnableFwUpdRequestL( const TInt aProfileId );
-        
-        /**
-        * Retrieves the device management profile names into a list.
-        * @since Series 60 3.1
-        * @param aItems Array into which the profile names are appended.
-        * @return None
-        */
-        void ReadProfileListL( CDesCArray* aItems,
-                               CArrayFixFlat<TInt>* aProfileIdList );
-
-        /**
-        * Returns the index of the default fota profile in the
-        * given list of identifiers.
-        * @since Series 60 3.1
-        * @param aProfileIdList List of profile identifiers.
-        * @return Index of the default fota profile in the list.
-        */
-        TInt SelectDefaultProfileFromList(
-            const CArrayFixFlat<TInt>* aProfileIdList ) const;
-
-        /**
-        * Checks that the profile identifier is included in the
-        * devie management profiles list.
-        * @since Series 60 3.1
-        * @param aProfileIdList List of profile identifiers.
-        * @return Index of the default fota profile in the list.
-        */
-        TBool VerifyProfileL( const TInt aProfileId ) const;
-        
-        /**
-        * Retrieves the list of firmware update packages known to
-        * the FOTA server component.
-        * @since Series 60 3.1
-        * @param None.
-        * @return Array that includes the package identifiers.
-        */
-        RArray< TInt > RetrieveFwUpdPkgIdListL();
-        
-        /**
-        * Checks if the FOTA server component has knowledge of firmware update
-        * packages that are in the given state. 
-        * @since Series 60 3.1
-        * @param aState Package state to be searched for.
-        * @return Identifier of the package that has the given state, or
-        *         KErrNotFound if none are found.
-        */
-         TInt FindFwUpdPkgWithStateL( RFotaEngineSession::TState aState );
-
-        /**
-        * Initiates the instalklation of a firmware update package.
-        * @since Series 60 3.1
-        * @param aPkgId Identifier of the update package.
-        * @return error code.
-        */
-         TInt InitiateFwUpdInstall( TInt aPkgId, TInt aProfileId );
-
-        /**
-        * Returns the version string of the current firmware.
-        * @since Series 60 3.1
-        * @param aVersionString The version string of the current firmware.
-        * @return Error code.
-        */
-        TInt CurrentFwVersionString( TDes& aVersionString );
-
-        /**
-        * Returns the time of the last successful firmware update.
-        * @since Series 60 3.1
-        * @param aVersionString The time of the last firmware update.
-        * @return Error code.
-        */
-        TInt LastUpdateTime( TTime& aTime );
-
+        void EnableFwUpdRequestL( const TInt aProfileId );
+       
+ 
         /**
         * Saves the current state of update packages.
         * @param None.
@@ -157,13 +85,6 @@
         */
          void MarkFwUpdChangesStartL();
 
-        /**
-        * Checks if the state of update packages has changed since the saved
-        * situation.
-        * @param None.
-        * @return True if there are differences in pcakage identifiers or states.
-        */
-         TBool FwUpdStatesChangedL();
         
          RFotaEngineSession::TState GetCurrentFwUpdState();
          
@@ -179,40 +100,13 @@
          */
          TInt TryResumeFwUpdDownload();
 
-        
-    public: // Functions from base classes
-
-        /**
-        * From ?base_class ?member_description.
-        * @since Series ?XX ?SeriesXX_version
-        * @param ?arg1 ?description
-        * @return ?description
-        */
-        //?type ?member_function( ?type ?arg1 );
-        
-    protected:  // New functions
-        
-        /**
-        * ?member_description.
-        * @since Series ?XX ?SeriesXX_version
-        * @param ?arg1 ?description
-        * @return ?description
-        */
-        //?type ?member_function( ?type ?arg1 );
-
-    protected:  // Functions from base classes
-        
-        /**
-        * From ?base_class ?member_description
-        */
-        //?type ?member_function();
 
     private:
 
         /**
         * C++ default constructor.
         */
-        CIAUpdateFWFotaModel( /*KNST CNSCDocument* aDocument*/ );
+        CIAUpdateFWFotaModel();
 
         /**
         * By default Symbian 2nd phase constructor is private.
@@ -220,27 +114,11 @@
         void ConstructL();
 
     private:    // Data
-        // Data structure used in storing the update package identifiers
-        // and states.
-        struct TFwUpdIdState
-            {
-            TInt                        iPkgId;
-            RFotaEngineSession::TState  iState;
-            };
-        
-        // Array containing a snapshot state of the update pcakage identifiers
-        // and corresponding states.
-        RArray< TFwUpdIdState > iFwUpdIdStateList;
-        
-        // Pointer to the application document instance.
-        //KNST CNSCDocument*    iDocument;
-        
-        // Is the data package download in progress.
-        TBool                   iDpDlInProgress;
-    
+
+     
         RFotaEngineSession      iFotaEngine;     
     };
 
-#endif      // CIAUpdateFWFOTAMODEL_H   
+#endif      // CIAUPDATEFWFOTAMODEL_H  
             
 // End of File
--- a/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncappengine.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncappengine.h	Thu Oct 14 14:11:30 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"
@@ -31,6 +31,7 @@
 class CIAUpdateFWSyncHandler;
 class CIAUpdateFWSyncProfile;
 class CIAUpdateFWFotaModel;
+class MIAUpdateFWUpdateObserver;
 
 
 // CLASS DECLARATION
@@ -38,7 +39,7 @@
 * CIAUpdateFWSyncAppEngine
 * Sync engine for handling synchronization and profiles.
 */
-class CIAUpdateFWSyncAppEngine : public CBase
+NONSHARABLE_CLASS (CIAUpdateFWSyncAppEngine) : public CBase
     {
     public:  // Constructors and destructor
         
@@ -54,48 +55,16 @@
 
     public: // New functions
         
-        /**
-        * Delete profile
-        * @param aProfileId Profile to be deleted.
-        * @return None
-        */
-        void DeleteProfileL( TInt aProfileId );
-
-        /**
-        * Create profile
-        * @param None.
-        * @return None
-        */
-        TInt CreateProfileL();
-
-        /**
-        * Create copy profile
-        * @param aProfileId Profile that is used for copying
-        * @return None
-        */
-        CIAUpdateFWSyncProfile* CreateCopyProfileL( TInt aProfileId );
-
+        void SetObserver( MIAUpdateFWUpdateObserver* aObserver );
+ 
         /**
         * Return current profile
         * @param None.
         * @return CIAUpdateFWSyncProfile*
         */
         CIAUpdateFWSyncProfile* Profile( );
-
-        /**
-        * Cancel synchronization
-        * @param None.
-        * @return None
-        */
-        void CancelSyncL();
-        
-        /**
-        * Return RSyncMLSession
-        * @param None.
-        * @return RSyncMLSession*
-        */
-        RSyncMLSession* Session();
-        
+         
+         
         /**
         * Open profile
         * @param aProfileId Profile id to open
@@ -121,53 +90,9 @@
                            const TInt aProfileId,
                            const TInt aConnectionBearer,
                            const TBool aUseFotaProgressNote);
-        
-        /**
-        * Start synchronization
-        * @param aProfileId Profile id to sync
-        * @param aJobId Jod id to sync
-        * @return None
-        */         
-        void SynchronizeL( TDesC& aServerName,
-                           const TInt aProfileId,
-                           const TInt aJobId,
-                           const TInt aConnectionBearer,
-                           const TBool aUseFotaProgressNote );
-        
-        /**
-        * Check if duplicate server id is found
-        * @param  aServerId Server id
-        * @param  aProfileId current profile id
-        * @return ETrue if server id found
-        */                 
-        TBool ServerIdFoundL( const TDesC& aServerId, const TInt aProfileId );
-        
-		/**
-		* Compare two descriptors
-        * @param aLeft  
-		* @param aRight  
-		* @return - Positive, if this descriptor is 
-        *                     greater than the specified descriptor.
-		*           Negative, if this descriptor is
-		*                     less than the specified descriptor.
-		*           Zero, if the content of both descriptors match
-        */
-        TInt Compare( const TDesC& aLeft, const TDesC& aRight );
-        
-        /**
-        * Sync state
-        * @param None
-        * @return ETrue if sync is running
-        */          
-        TBool SyncRunning();
-        
-        /**
-        * Utility function.
-        * @param aSyncObserver
-        * @return None
-        */
-        //void RequestSyncStatus( MIAUpdateFWSyncObserver* aSyncObserver );
-		
+ 
+   
+       		
 	void SyncCompleted( TNSmlStatus aStatus );
 
         
@@ -191,8 +116,6 @@
         CIAUpdateFWSyncProfile*     iProfile;
         // Sync handler
         CIAUpdateFWSyncHandler*     iSyncHandler;
-        // Sync Observer
-        //MIAUpdateFWSyncObserver*    iSyncObserver;
     };
 
 #endif      // CIAUpdateFWSYNCAPPENGINE_H
--- a/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsynchandler.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsynchandler.h	Thu Oct 14 14:11:30 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"
@@ -35,8 +35,8 @@
 class CIAUpdateFWActiveCaller;
 
 class CIAUpdateFWSyncAppEngine;
-class CAknWaitDialog;
 class CIAUpdateFWFotaModel;
+class MIAUpdateFWUpdateObserver;
 // CLASS DECLARATION
 
 /**
@@ -173,6 +173,9 @@
 	
 	
 	public:
+		
+		void SetUpdateObserver( MIAUpdateFWUpdateObserver* aObserver );
+		
         /**
         * Performs synchronization.
         * @param aServerName Name of the server
@@ -186,30 +189,7 @@
 		                   const TInt aProfileId,
 		                   const TInt aConnectionBearer,
                            const TBool aUseFotaProgressNote );
-		
-        /**
-        * Performs ServerInitiated synchronization.
-        * @param aServerName Name of the server
-		* @param aProfileId Profile id
-		* @param aJobId Job id.
-		* @param aConnectionBearer Bearer
-		* @param aUseFotaProgressNote Should the simplified progress note used. Only
-		*                             used when checking for firmware updates.
-        * @return None
-        */		
-		void SynchronizeL( TDesC& aServerName, 
-		                   const TInt aProfileId,
-		                   const TInt aJobId,
-		                   const TInt aConnectionBearer,
-                           const TBool aUseFotaProgressNote );
-		
-        /**
-        * Shows the progress dialog.
-		* @param None.
-        * @return None.
-        */
-        void ShowProgressDialogL();
-        
+ 
         /**            
          * Select IAP
          * @param None.
@@ -217,29 +197,7 @@
          */
         void SelectIAPL();
 
-        /**
-        * Deletes the progress dialog if it exists.
-		* @param None.
-        * @return None.
-        */
-        void HideProgressDialogL();
-        
-		/**
-        * Cancel synchronization.
-		* @param None 
-        * @return None
-        */
-		void CancelSynchronizeL();
-		
-        /**
-        * From MProgressDialogCallback. Handles the situation when the dialog
-        * is dismissed.
-        * @param aButtonId The identifier of the button, with which the dialog
-        *                  was dismissed.
-        * @return None
-        */
-        void DialogDismissedL( TInt aButtonId );
-		
+ 		
 	private:
         
         /**
@@ -288,9 +246,6 @@
 		TInt                            iSyncJobId;
 		// sync job
 		RSyncMLDevManJob                iSyncJob;
-
-        // The alternative wait dialog used in FOTA
-        CAknWaitDialog*                 iWaitDialog;
         
 		// sync handler state
 		CIAUpdateFWSyncState*               iState;
@@ -312,8 +267,8 @@
         TBool                           iServerAlertedSync;
         // Should the simpler FOTA progress not be used
         TBool                           iUseFotaProgressNote;
-        // Retry sync (authentication error)
-        TBool							iRetrySync;
+         
+        MIAUpdateFWUpdateObserver*      iObserver;
 	};
 
 #endif  // NSMLDMSYNCHANDLER_H
--- a/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncprofile.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncprofile.h	Thu Oct 14 14:11:30 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"
@@ -45,15 +45,13 @@
         * Two-phased constructor.
         * @param aParam
         */
-        static CIAUpdateFWSyncProfile* NewLC( const TInt aApplicationId,
-                                          RSyncMLSession* aSyncSession);
+        static CIAUpdateFWSyncProfile* NewLC( RSyncMLSession* aSyncSession);
 
         /**
         * Two-phased constructor.
         * @param aParam
         */
-         static CIAUpdateFWSyncProfile* NewL( const TInt aApplicationId,
-                                         RSyncMLSession* aSyncSession );
+         static CIAUpdateFWSyncProfile* NewL( RSyncMLSession* aSyncSession );
 
 	    /**
         * Destructor.
@@ -65,8 +63,7 @@
         * C++ default constructor.
         * @param aParam
         */
-	    CIAUpdateFWSyncProfile( const TInt aApplicationId,
-	                        RSyncMLSession* aSyncSession );
+	    CIAUpdateFWSyncProfile( RSyncMLSession* aSyncSession );
 
         /**
         * By default Symbian 2nd phase constructor is private.
@@ -82,19 +79,6 @@
         */
          void OpenL( TInt aProfileId, TInt aOpenMode );
         
-        /**
-		* Create profile
-        * @param None.
-		* @return Profile ID.
-        */
-         TInt CreateL();
-        
-        /**
-		* Create copy profile
-        * @param aProfileId Profile that is used for copying
-		* @return None
-        */
-         void CreateCopyL( TInt aProfileId );
         
         /**
 		* Save profile
@@ -105,12 +89,6 @@
         
 	public:
         
-        /**
-		* Set name for profile
-        * @param aText name for profile
-		* @return None
-        */
-         void SetNameL(const TDesC& aText);
         
         /**
 		* Get profile name
@@ -118,21 +96,7 @@
 		* @return None
         */
          void GetName( TDes& aText );
-        
-        /**
-		* Set creator id for the profile
-        * @param aCreatorId creator id
-		* @return None
-        */
-         void SetCreatorId(TInt aCraetorId);
-        
-        /**
-		* Get creator id
-        * @param None
-		* @return creator id
-        */
-         TInt CreatorId();
-        
+
         /**
 		* Get profile id
         * @param None
@@ -140,92 +104,18 @@
         */
          TInt ProfileId();
         
-        /**
-		* Check if delete is allowed
-        * @param None
-		* @return ETrue if allowed
-        */
-         TBool DeleteAllowed();
-        
-        /**
-		* Has profile been synced
-        * @param None
-		* @return ETrue if synced
-        */
-		 TBool IsSynced();
-        
-        /**
-		* Last sync time
-        * @param None
-		* @return Time of sync
-        */
-		 TTime LastSync();
-		
-		/**
-		* Last Success sync time
-        * @param None
-		* @return Time of sync
-        */
-		 TTime LastSuccessSync();
-
+    
+ 
     // settings that connection dialog displays
     public:
-        /**
-		* Set server id
-        * @param aText server id
-		* @return None
-        */
-         void SetServerIdL(const TDesC& aText);
-        
-        /**
-		* Get server id
-        * @param aText server id
-		* @return NOne
-        */
-         void GetServerId(TDes& aText);
-        
-        /**
-		* Get server password
-        * @param aText server password
-		* @return None
-        */
-         void GetServerPassword( TDes& aText );
-        
-        /**
-		* Set server password
-        * @param aText server password
-		* @return None
-        */
-         void SetServerPasswordL( const TDesC& aText );
-        
-        /**
-		* Get protocol version
-        * @param None
-		* @return Version
-        */
-         TInt ProtocolVersion();
-        
-        /**
-		* Set Protocol version
-        * @param aProtocolVersion protocol version
-		* @return None
-        */
-         void SetProtocolVersionL( TInt aProtocolVersion );
-        
+         
         /**
 		* Get bearer type
         * @param None
 		* @return bearer type
         */
          TInt BearerType();
-        
-        /**
-		* Set bearer type
-        * @param aId bearer type
-		* @return None
-        */
-         void SetBearerTypeL( TInt aId );
-        
+         
         /**
 		* Get accesspoint
         * @param None
@@ -239,64 +129,7 @@
 		* @return None
         */
          void SetAccessPointL(const TInt aId);
-        
-        /**
-		* Get host address
-        * @param aText host address
-        * @param aPort host port
-		* @return None
-        */
-         void GetHostAddress( TDes& aText, TInt& aPort );
-        
-        /**
-		* set host address
-        * @param aText host address
-        * @param aPort host 
-		* @return None
-        */
-         void SetHostAddressL( const TDesC& aText, const TInt aPort );
-        
-        /**
-		* Get port number 
-        * @param None
-		* @return port number
-        */
-         TInt PortNumber();
-        
-        /**
-		* Set port number
-        * @param aPortNumber port number
-		* @return None
-        */
-         void SetPortNumber( TInt aPortNumber );
-        
-        /**
-		* Get user name
-        * @param aText user name
-		* @return None
-        */
-         void GetUserName( TDes& aText );
-        
-        /**
-		* Set user name
-        * @param aText user name
-		* @return None
-        */
-         void SetUserNameL( const TDesC& aText );
-        
-        /**
-		* Get user password
-        * @param aText user password
-		* @return None
-        */
-         void GetPassword( TDes& aText );
-        
-        /**
-		* Set user password
-        * @param aText user password
-		* @return None
-        */
-         void SetPasswordL( const TDesC& aText );
+
         
         /**
 		* Set server alert state
@@ -311,80 +144,20 @@
 		* @return server alert state
         */
          TInt SASyncState();
-        
-        /**
-		* Set http used state
-        * @param aEnable ETrue if http authentication needs to be used
-		* @return None
-        */
-         void SetHttpUsedL( TBool aEnable );
-        
-        /**
-		* Check whether http authentication is used
-        * @param None
-		* @return ETrue if http authentication is used
-        */
-         TBool HttpUsedL();
-        
-        /**
-		* Get http user name
-        * @param aText user name
-		* @return None
-        */        
-         void GetHttpUserNameL( TDes& aText );
-        
-        /**
-		* Set http user name
-        * @param aText user name
-		* @return None
-        */
-         void SetHttpUserNameL( const TDesC& aText );
-        
-        /**
-		* Get http password
-        * @param aText password
-		* @return None
-        */
-         void GetHttpPasswordL( TDes& aText );
-        
-        /**
-		* Set http password
-        * @param aText password
-		* @return None
-        */
-         void SetHttpPasswordL( const TDesC& aText );
+ 
+         
  
                
     public:
        
         /**
-		* Return latest history job
-        * @param None
-		* @return CSyncMLHistoryJob*
-        */        
-         const CSyncMLHistoryJob* LatestHistoryJob();
-        
-        /**
 		* Open connection
         * @param None
 		* @return None
         */
          void OpenConnection();
         
-        /**
-		* Open history log
-        * @param None
-		* @return None
-        */
-         void OpenHistoryLog();
-
-        /**
-		* Close history log
-        * @param None
-		* @return None
-        */        
-         void CloseHistoryLog();
-
+ 
         /**
 		* Return DevMan profile
         * @param None
@@ -408,24 +181,13 @@
         */
          void GetConnectionPropertyNameL( TDes8& aText, TInt aPropertyPos );
         
-    private:
-    
-        /**
-		* Copy values from one profile to another
-        * @param aSource source profile
-		* @return None
-        */    
-        void CopyValuesL( CIAUpdateFWSyncProfile* aSource );
-
 	private:
 	    // profile id
         TInt                    iProfileId;
         // Log open
-        TBool                   iHistoryLogOpen;
+        //TBool                   iHistoryLogOpen;
         // Connection open
         TBool                   iConnectionOpen;
-        // Port number
-        TInt                    iPortNumber;
    		// needed for setting creator id
 		TInt                    iApplicationId;
 		// long buffer for string handling 
@@ -436,8 +198,6 @@
 		RSyncMLSession*         iSyncSession;
 		// sync profile
 		RSyncMLDevManProfile    iProfile;
-		// history log
-		RSyncMLHistoryLog       iHistoryLog;
 		// sync connection
 		RSyncMLConnection       iConnection;
     };
--- a/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncstate.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncstate.h	Thu Oct 14 14:11:30 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"
@@ -91,82 +91,11 @@
         * @return Synchronization phase.
         */
          TInt SyncPhase();
-
-        /**
-        * Set total sync progress.
-        * @param aCount Progress count.
-        * @return None.
-        */
-		 void SetTotalProgress(TInt aCount);
-
-        /**
-        * Get total sync progress.
-        * @param None. 
-        * @return Progress count.
-        */
-		 TInt TotalProgress();
-
-        /**
-        * Set sync progress.
-        * @param aCount Progress count.
-        * @return None.
-        */
-		 void SetProgress(TInt aCount);
-
-        /**
-        * Increase sync progress.
-        * @param None.
-        * @return None.
-        */
-         void IncreaseProgress();
-        
-        /**
-        * Get sync progress.
-        * @param None. 
-        * @return Progress count.
-        */
-		 TInt Progress();
-
-        /**
-        * Set sync content name.
-        * @param aContent Content name.
-        * @return None.
-        */
-         void SetContent(const TDesC& aContent);
-
-        /**
-        * Get sync content name.
-        * @param None. 
-        * @return Content name.
-        */
-		 const TDesC& Content();
-
-        /**
-        * Resets progress state.
-        * @param None. 
-        * @return None.
-        */
-		 void ResetProgress();
-		
-        /**
-        * Finds out whether total progress count is known.
-        * @param None. 
-        * @return ETrue if total progress count is known, EFalse otherwise.
-        */
-		 TBool ProgressKnown();
-        
+          
     private:
         // synchronization phase
 		TInt iSyncPhase;
 
-		// total number of sent/received sync items
-		TInt iTotalProgressCount;
-
-		// number of sent/received sync items
-		TInt iProgressCount;
-
-		// name of the content being synced
-		TName iSyncContent;
     };
 
 #endif  // IAUPDATEFWSYNCSTATE_H
--- a/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncutil.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwsyncutil.h	Thu Oct 14 14:11:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005 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"
@@ -70,22 +70,7 @@
         * @param aSource.
         * @return None
         */      		
-		static void StrAppend( TDes& aTarget, const TDesC& aSource );
-        
-        /**
-        * String insert tool
-        * @param aTarget.
-        * @param aSource.
-        * @return None
-        */      		
-		 static void StrInsert( TDes& aTarget, const TDesC& aSource );
-        
-        /**
-        * Convert string to int
-        * @param aText.
-        * @param aNum.
-        * @return None
-        */		
+
 		static TInt StrToInt( const TDesC& aText, TInt& aNum );
         
         /**
@@ -93,268 +78,10 @@
         * @param aText.
         * @return ETrue if empty
         */				
-		static TBool IsEmpty( const TDesC& aText );
-        
-        /**
-        * URI Parser
-        * @param aURI
-        * @param aAddress
-        * @param aPort
-        * @param aDocName
-        * @return None
-        */						
-        static void ParseURIL( const TDesC& aURI, 
-                               TDes& aAddress, 
-                               TDes& aPort, 
-                               TDes& aDocName );
-      
-        /**
-        * Returns formatted sync time
-        * @param aLastSync
-        * @return Sync time
-        */
-        static HBufC* SyncTimeLC( TTime aLastSync );
-        
-        /**
-        * Get data as text
-        * @param 
-        * @return 
-        */        
-        static void GetDateTextL( TDes& aText, TTime aDateTime );
-        
-        /**
-        * Get time as text 
-        * @param 
-        * @return 
-        */        
-		static void GetTimeTextL( TDes& aText, TTime aDateTime );
-        
-        /**
-        * Get data and time as text
-        * @param 
-        * @return 
-        */        
-		static void GetDateTimeTextL( TDes& aText, TTime aDateTime );
-        
-        /**
-        * Check if SettingEnforcement is set
-        * @param 
-        * @return Boolean
-        */        
-		static TBool SettingEnforcementStateL();
-
-        /**
-        * Check if SettingEnforcement is set (non-leaving)
-        * @param 
-        * @return Boolean
-        */        
-		static TBool SettingEnforcementState();
-
-    private:
-    
-        /**
-        * Check if sync has happened today
-        * @param atime
-        * @return Boolean
-        */    
-        static TBool IsToday( TTime aTime );
-        
-        /**
-        * Convert time to hometime
-        * @param aUniversalTime
-        * @return TTIme
-        */            
-        static TTime ConvertUniversalToHomeTime( const TTime& aUniversalTime );
 
 	};
 
-/**
-*  TStr contains descriptor operations with range checking.
-*/
-NONSHARABLE_CLASS (TStr)
-    {
-    public:
-        /**
-        * C++ default constructor.
-        */
-        TStr(const TDesC& aStr);
-       
-    public:
-        /**
-        * String manipulating tools
-        * @param aPos
-        * @param aLen
-        * @return TPtrC
-        */        
-        TPtrC Mid( TInt aPos, TInt aLen );
-        
-        /**
-        * String manipulating tools
-        * @param aPos
-        * @return TPtrC
-        */                
-        TPtrC Mid( TInt aPos );
 
-        /**
-        * String manipulating tools
-        * @param aPos
-        * @return TPtrC
-        */                
-        TPtrC Left( TInt aPos );
-        
-        /**
-        * String manipulating tools
-        * @param aPos
-        * @return TPtrC
-        */               
-        TPtrC Right( TInt aPos );
-        
-        /**
-        * String manipulating tools
-        * @param aStartPos
-        * @param aEndPos
-        * @return TPtrC
-        */               
-        TPtrC SubStr( TInt aStartPos, TInt aEndPos );
-
-        /**
-        * String manipulating tools
-        * @param aStartPos
-        * @param aEndPos
-        * @return TPtrC
-        */           
-        TPtrC SubStrEx( TInt aStartPos, TInt aEndPos );
-
-        /**
-        * String manipulating tools
-        * @return TInt
-        */           
-        TInt LastPos();
-
-        /**
-        * String manipulating tools
-        * @return TInt
-        */           
-        TInt Len();
-
-        /**
-        * String manipulating tools
-        * @param aPos
-        * @param aChar
-        * @return TBool
-        */           
-        TBool Compare( TInt aPos, TChar aChar );
-
-        /**
-        * String manipulating tools
-        * @param aStartPos
-        * @param aChar
-        * @return TInt
-        */
-        TInt Find( TInt aPos, TChar aChar );
-        
-    private:
-        // reference to descriptor
-		const TDesC& iStr;
-    };
-
-/**
-*  TURIParser is used for parsing URI.
-*/
-NONSHARABLE_CLASS (TURIParser)
-    {
-    public:
-        /**
-        * C++ default constructor.
-        */
-        TURIParser( const TDesC& aStr );
-       
-    public:
-        /**
-        * URI manipulating tools
-        * @param aText
-        * @return None
-        */    
-        void GetUriWithoutPort( TDes& aText );
-
-        /**
-        * URI manipulating tools
-        * @param aText
-        * @param aPort
-        * @return None
-        */            
-        void GetUri( TDes& aText, const TInt aPort );
-
-        /**
-        * URI manipulating tools
-        * @return TInt
-        */            
-        TInt Port();
-
-        /**
-        * URI manipulating tools
-        * @return TInt
-        */            
-        TInt DefaultPort();
-
-    private:
-        /**
-        * URI manipulating tools
-        * @return TPtrC
-        */          
-        TPtrC ParseHttp();
-
-        /**
-        * URI manipulating tools
-        * @return TPtrC
-        */              
-        TPtrC ParseAddress();
-
-        /**
-        * URI manipulating tools
-        * @return TPtrC
-        */              
-        TPtrC ParseDocument();
-
-        /**
-        * URI manipulating tools
-        * @param aPortNumber
-        * @return TInt
-        */              
-        TInt ParsePort(TInt& aPortNumber);
-
-        /**
-        * URI manipulating tools
-        * @return TPtrC
-        */              
-        TPtrC ParsePort();
-        
-     private:
-
-        /**
-        * URI manipulating tools
-        * @param aStartPos
-        * @param aEndPos
-        * @return None
-        */          
-        void GetHttpPos(TInt& aStartPos, TInt& aEndPos);
-
-        /**
-        * URI manipulating tools
-        * @return NOne
-        */             
-        void SkipHttp();
-  
-    private:
-        // reference to original URI text
-		const TDesC& iOriginalStr;
-		
-		// pointer to original URI text
-		TPtrC iPtr;
-		
-		//reference to Boolean variable which tells about Slash in URI
-		TBool iSlash;
-    };
 
 /**
 * MIAUpdateFWActiveCallerObserver
@@ -445,6 +172,6 @@
 		MIAUpdateFWActiveCallerObserver* iObserver;
     };
 
-#endif  // NSMLDMSYNCUTIL_H
+#endif  // IAUPDATEFWSYNCUTIL_H
 
 // End of File
--- a/iaupdate/IAD/firmwareupdate/inc/iaupdatefwupdatehandler.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwupdatehandler.h	Thu Oct 14 14:11:30 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"
@@ -21,11 +21,11 @@
 
 class CIAUpdateFWFotaModel;
 class CIAUpdateFWSyncAppEngine;
+class MIAUpdateFWUpdateObserver;
 
 #include <e32base.h>
 
-
-class CIAUpdateFWUpdateHandler : public CActive
+NONSHARABLE_CLASS (CIAUpdateFWUpdateHandler) : public CActive
     {
     public:
 
@@ -36,21 +36,13 @@
         virtual ~CIAUpdateFWUpdateHandler();
 
     public:
-      
-        IMPORT_C void FirmWareUpdatewithNSU();
         
-        IMPORT_C void FirmWareUpdatewithFOTA();
+        IMPORT_C void FirmWareUpdatewithFOTA( MIAUpdateFWUpdateObserver* aObserver );
         
         IMPORT_C TBool IsDMSupportAvailableL();
 
     private:
-    
-        enum TRequest
-            {
-            EFOTA =1,
-            ENSU
-            };
- 
+
         CIAUpdateFWUpdateHandler();
    
         void ConstructL();
@@ -65,9 +57,9 @@
     
     private: // data
 
-        TRequest iRequest;
         CIAUpdateFWFotaModel* iFotaModel;
-        CIAUpdateFWSyncAppEngine* iDMEngine;
+        CIAUpdateFWSyncAppEngine* iFWSyncAppEngine;
+        MIAUpdateFWUpdateObserver* iObserver;
     };
     
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/firmwareupdate/inc/iaupdatefwupdateobserver.h	Thu Oct 14 14:11:30 2010 +0300
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   This file contains the header file of the MIAUpdateFWUpdateObserver class 
+*
+*/
+
+
+
+#ifndef IAUPDATEFWUPDATEOBSERVER_H
+#define IAUPDATEFWUPDATEOBSERVER_H
+
+
+class MIAUpdateFWUpdateObserver
+    {
+public: // Observer API
+    
+    virtual void PreparingStarted() = 0;
+    
+    virtual void Prepared() = 0;
+    
+    };
+	
+#endif // IAUPDATEFWUPDATEOBSERVER_H
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -19,7 +19,6 @@
 
 
 // INCLUDE FILES
-#include <sysutil.h>
 #include <centralrepository.h>
 #include <DevManInternalCRKeys.h>
 
@@ -51,7 +50,6 @@
 CIAUpdateFWFotaModel::~CIAUpdateFWFotaModel()
     {
     FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::~CIAUpdateFWFotaModel()" );
-    //iFwUpdIdStateList.Close();
     iFotaEngine.Close();
     }
 
@@ -108,7 +106,7 @@
 //
  void CIAUpdateFWFotaModel::EnableFwUpdRequestL( const TInt aProfileId )
     {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::SetDefaultFotaProfileIdL()" );
+    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::EnableFwUpdRequestL()" );
     
     CRepository* centrep = NULL;
     TRAPD( err, centrep = CRepository::NewL( KCRUidDeviceManagementInternalKeys ) );
@@ -119,163 +117,9 @@
     centrep->Set( KDevManClientInitiatedFwUpdateId, aProfileId );
     delete centrep;
     
-    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::SetDefaultFotaProfileIdL() completed" );
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWFotaModel::ReadProfileListL
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFWFotaModel::ReadProfileListL( CDesCArray*          /*aItems*/,
-                                         CArrayFixFlat<TInt>* /*aProfileIdList*/ )
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::ReadProfileListL() - not implemented" );
-    //no implementation
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWFotaModel::SelectDefaultProfileFromList
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateFWFotaModel::SelectDefaultProfileFromList(
-    const CArrayFixFlat<TInt>* /*aProfileIdList*/ ) const
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::SelectDefaultProfileFromList() - not implemented" );
-    TInt retval( KErrNotFound );
-    return retval;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWFotaModel::VerifyProfileL
-// -----------------------------------------------------------------------------
-//
-TBool CIAUpdateFWFotaModel::VerifyProfileL( const TInt /*aProfileId*/ ) const
-    {
-    TBool retval( EFalse );
-    return retval;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWFotaModel::RetrieveFwUpdPkgIdListL
-// -----------------------------------------------------------------------------
-//
-RArray< TInt > CIAUpdateFWFotaModel::RetrieveFwUpdPkgIdListL()
-    {
-    const TInt maxNumOfProfiles = 32;
-    
-    TBuf16< maxNumOfProfiles > idListDescriptor;
-    User::LeaveIfError( iFotaEngine.GetUpdatePackageIds( idListDescriptor ) );
-    
-    RArray< TInt > idList;
-    
-    TInt count = idListDescriptor.Length();
-    for ( TInt i = 0; i < count; i++ )
-        {
-        idList.Append( idListDescriptor[ i ] );
-        }
-    
-    return idList;
+    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::CIAUpdateFWFotaModel::EnableFwUpdRequestL( completed" );
     }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWFotaModel::FindFwUpdPkgWithStateL
-// -----------------------------------------------------------------------------
-//
- TInt CIAUpdateFWFotaModel::FindFwUpdPkgWithStateL(
-    RFotaEngineSession::TState aState )
-    {
-    FTRACE( FPrint( _L(
-        "[IAUPDATEFW] CIAUpdateFWFotaModel::FindFwUpdPkgWithStateL(): aState = %d" ),
-         (TInt) aState ) );
-
-    RArray< TInt > idList = RetrieveFwUpdPkgIdListL();
-    TInt retval = KErrNotFound;
-
-    TInt count = idList.Count();
-    for ( TInt i = 0; (i < count) && (retval == KErrNotFound); i++ )
-        {
-        RFotaEngineSession::TState pkgState;
-        pkgState = iFotaEngine.GetState( idList[ i ] );
-        FTRACE( FPrint( _L(
-            "[IAUPDATEFW] CIAUpdateFWFotaModel::FindFwUpdPkgWithStateL(): profileid = %d, pkgstate = %d" ),
-             idList[i], (TInt) pkgState ) );
-        if ( pkgState == aState )
-            {
-            retval = idList[ i ];
-            }
-        }
-
-    FTRACE( FPrint( _L(
-        "[IAUPDATEFW] CIAUpdateFWFotaModel::FindFwUpdPkgWithStateL(): completed, retval = %d" ),
-         retval ) );
-    idList.Close(); 
-    
-    return retval;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWFotaModel::InitiateFwUpdInstall
-// -----------------------------------------------------------------------------
-//
- TInt CIAUpdateFWFotaModel::InitiateFwUpdInstall( TInt aPkgId, TInt aProfileId )
-    {
-    FTRACE( FPrint( _L(
-        "[IAUPDATEFW] CIAUpdateFWFotaModel::InitiateFwUpdInstall(): aPkgId = %d, aProfileId = %d" ),
-        aPkgId, aProfileId ) );
-
-    TInt retval = KErrGeneral;
-    retval = iFotaEngine.Update( aPkgId, aProfileId, KNullDesC8, KNullDesC8 );
-
-    FTRACE( FPrint( _L(
-        "[IAUPDATEFW] CIAUpdateFWFotaModel::InitiateFwUpdInstall() completed, retval = %d" ),
-        retval ) );
-    return retval;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWFotaModel::CurrentFwVersionString
-// If the software version retrieval fails, the aVersionstring is not modified.
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateFWFotaModel::CurrentFwVersionString( TDes& aVersionString )
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::CurrentFwVersionString()" );
-    TBuf< KSysUtilVersionTextLength > buf;
-
-    TInt err = SysUtil::GetSWVersion( buf );
-    if ( err == KErrNone )
-        {
-        _LIT( separator, "\n" );
-        TInt location = buf.Find( separator );
-        if ( location != KErrNotFound)
-            {
-            // Delete the separator and the text after it. We are
-            // only interested in the first section.
-            buf.Delete( location, (buf.Length() - location) );
-            }
-
-        aVersionString.Copy( buf.Left( aVersionString.MaxLength() ) );
-        }
-    FTRACE( FPrint( _L(
-        "[IAUPDATEFW] CIAUpdateFWFotaModel::CurrentFwVersionString() completed, err = %d, string = \"%S\"" ),
-        err, &aVersionString ) );
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWFotaModel::LastUpdateTime
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateFWFotaModel::LastUpdateTime( TTime& aTime )
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::LastUpdateTime()" );
-    TInt retval = iFotaEngine.LastUpdate( aTime );
-    FTRACE( FPrint( _L(
-        "[IAUPDATEFW] CIAUpdateFWFotaModel::LastUpdateTime() completed, err = %d" ),
-        retval ) );
-    return retval;
-    }
+ 
 
 // -----------------------------------------------------------------------------
 // CIAUpdateFWFotaModel::MarkFwUpdChangesStartL
@@ -286,47 +130,7 @@
     FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::MarkFwUpdChangesStartL()" );    
     }
 
-// -----------------------------------------------------------------------------
-// CIAUpdateFWFotaModel::FwUpdStatesChangedL
-// The array is reseted at the end of the execution to save memory, since at
-// the moment the information is not needed multiple times.
-// -----------------------------------------------------------------------------
-//
- TBool CIAUpdateFWFotaModel::FwUpdStatesChangedL()
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::FwUpdStatesChangedL()" );
-    
-    TBool retval = EFalse;
 
-    TInt configFlags( 0 );
-        TInt SetGenValue(0);
-        CRepository* centrep = NULL;
-        TRAPD( err, centrep = CRepository::NewL( KCRUidDeviceManagementInternalKeys ) );
-        if ( centrep )
-            {
-            centrep->Get( KDevManSessionType, configFlags );
-            
-            }
-        if ( err != KErrNone ) 
-            {
-            User::Leave( err );
-            }
-        else
-            {
-            
-            centrep->Set( KDevManSessionType, SetGenValue );
-            }      
-        if(centrep)    
-           {
-           delete centrep;
-           }
-        if ( configFlags == 1 )
-			{
-			retval = ETrue;
-			}           
-        // configFlags=2 for FOTA Package not downloaded case ,1- successful download
-    return retval;
-    }
 
 // -----------------------------------------------------------------------------
 // CIAUpdateFWFotaModel::CIAUpdateFWFotaModel
@@ -334,8 +138,7 @@
 // might leave.
 // -----------------------------------------------------------------------------
 //
-CIAUpdateFWFotaModel::CIAUpdateFWFotaModel( /*CNSCDocument* aDocument*/ ) /*:
-    iDocument( aDocument )*/
+CIAUpdateFWFotaModel::CIAUpdateFWFotaModel() 
     {
     }
 
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncappengine.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncappengine.cpp	Thu Oct 14 14:11:30 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"
@@ -88,31 +88,17 @@
 	}
 
 // ------------------------------------------------------------------------------
-// CIAUpdateFWSyncAppEngine::DeleteProfileL
+// CIAUpdateFWSyncAppEngine::SetObserver
 // ------------------------------------------------------------------------------
 //
-void CIAUpdateFWSyncAppEngine::DeleteProfileL( TInt aProfileId )
+void CIAUpdateFWSyncAppEngine::SetObserver( MIAUpdateFWUpdateObserver* aObserver )
     {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::DeleteProfileL:" );
-    
-    delete iProfile;
-    iProfile = NULL;
-    iSyncMLSession.DeleteProfileL( aProfileId );
-	}
+    if ( iSyncHandler )
+        {
+        iSyncHandler->SetUpdateObserver( aObserver );
+        }
+    }
 
-// ------------------------------------------------------------------------------
-// CIAUpdateFWSyncAppEngine::CreateProfileL
-// ------------------------------------------------------------------------------
-//
-TInt CIAUpdateFWSyncAppEngine::CreateProfileL()
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::CreateProfileL:" );
-    
-    delete iProfile;
-    iProfile = NULL;
-    iProfile = CIAUpdateFWSyncProfile::NewL( KIAUpdateUiUid, &iSyncMLSession );
-    return iProfile->CreateL();
-	}
 
 // ------------------------------------------------------------------------------
 // CIAUpdateFWSyncAppEngine::Profile
@@ -125,33 +111,6 @@
     return iProfile;
 	}
 	
-// ------------------------------------------------------------------------------
-// CIAUpdateFWSyncAppEngine::CreateCopyProfileL
-// ------------------------------------------------------------------------------
-//
-CIAUpdateFWSyncProfile* CIAUpdateFWSyncAppEngine::CreateCopyProfileL( TInt aProfileId )
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::CreateCopyProfileL:" );
-    
-    delete iProfile;
-    iProfile = NULL;
-    iProfile = CIAUpdateFWSyncProfile::NewL( KIAUpdateUiUid, &iSyncMLSession );
-    
-    iProfile->CreateCopyL( aProfileId );
-    return iProfile;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncAppEngine::Session
-// -----------------------------------------------------------------------------
-//
-RSyncMLSession* CIAUpdateFWSyncAppEngine::Session()
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::Session:" );
-	
-	return &iSyncMLSession;
-	}
-
 // -----------------------------------------------------------------------------
 // CIAUpdateFWSyncAppEngine::OpenL
 // -----------------------------------------------------------------------------
@@ -163,18 +122,18 @@
 	
     delete iProfile;
     iProfile = NULL;
-    iProfile = CIAUpdateFWSyncProfile::NewL( KIAUpdateUiUid, &iSyncMLSession );
+    iProfile = CIAUpdateFWSyncProfile::NewL( &iSyncMLSession );
    	iProfile->OpenL( aProfileId, aOpenMode );
    	return iProfile;
     }
 
 // -----------------------------------------------------------------------------
-// CIAUpdateFWSyncAppEngine::Close
+// CIAUpdateFWSyncAppEngine::CloseProfile
 // -----------------------------------------------------------------------------
 //
 void CIAUpdateFWSyncAppEngine::CloseProfile()
     {
-    FLOG(  "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::Close:" );
+    FLOG(  "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::CloseProfile:" );
 
     delete iProfile;
     iProfile = NULL;
@@ -196,118 +155,7 @@
                                 aConnectionBearer,
                                 aUseFotaProgressNote);
     }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncAppEngine::SynchronizeL
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFWSyncAppEngine::SynchronizeL( TDesC& aServerName,
-                                         TInt aProfileId,
-                                         TInt aJobId,
-                                         TInt aConnectionBearer,
-                                         const TBool aUseFotaProgressNote )
-    {
-   	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::SynchronizeL:" );
 
-    iSyncHandler->SynchronizeL( aServerName, 
-                                aProfileId, 
-                                aJobId, 
-                                aConnectionBearer,
-                                aUseFotaProgressNote );
-    }
-
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncAppEngine::ServerIdFoundL
-// -----------------------------------------------------------------------------
-//    
-TBool CIAUpdateFWSyncAppEngine::ServerIdFoundL( const TDesC& aServerId,
-                                            const TInt aProfileId )
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::ServerIdFoundL:" );
-    
-	RArray<TSmlProfileId> arr;
-    iSyncMLSession.ListProfilesL( arr, ESmlDevMan );
-    TBool ret = EFalse;
-   	CleanupClosePushL(arr);
-   	
-	for ( TInt index = 0; index < arr.Count(); index++ )
-		{
-	    TRAPD( error, OpenProfileL( arr[index], ESmlOpenRead ) );
-	    if ( error == KErrNone )
-	        {
-	        if ( aProfileId != Profile()->ProfileId() )
-	            {	        
-    	        TBuf<KNSmlMaxItemLength> buf;
-    	        Profile()->GetServerId( buf );
-    	        if ( buf.Compare( aServerId ) == 0 )
-    	            {
-    	            FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::ServerIdFoundL: Match" );
-                    ret = ETrue;
-                    CloseProfile();
-                    break;
-                    }
-	            }
-		    CloseProfile();
-	        }
-		}
-    CleanupStack::PopAndDestroy( &arr );
-    return ret;
-    }
-
-// -----------------------------------------------------------------------------
-//  CIAUpdateFWSyncAppEngine::Compare
-// -----------------------------------------------------------------------------
-//
-TInt CIAUpdateFWSyncAppEngine::Compare( const TDesC& aLeft, const TDesC& aRight )
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::Compare:" );
-	
-	// Empty Name() is always greater than non-empty Name()
-    if (aLeft.Length() == 0 && aRight.Length() == 0)
-        {
-        return 0;
-        }
-    if (aLeft.Length() == 0)
-        {
-        return 1;
-        }
-    if (aRight.Length() == 0)
-        {
-        return -1;
-        }
-
-    // None of the Name()s was empty, use TDesC::CompareC to do the comparison.
-    // This is from cntmodel.
-    TCollationMethod collateMethod;
-    // get the standard method
-	collateMethod = *Mem::CollationMethodByIndex(0);
-    // dont ignore punctuation and spaces
-	collateMethod.iFlags |= TCollationMethod::EIgnoreNone; 
-	TInt comparison( aLeft.CompareC(aRight, 3, &collateMethod) );
-	return comparison;	
-	}
-	
-// -----------------------------------------------------------------------------
-//  CIAUpdateFWSyncAppEngine::SyncRunning
-// -----------------------------------------------------------------------------
-//
-TBool CIAUpdateFWSyncAppEngine::SyncRunning()
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::SyncRunning:" );
-    
-    return iSyncHandler->SyncRunning();
-    }
-
-// -----------------------------------------------------------------------------
-//  CIAUpdateFWSyncAppEngine::CancelSyncL
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFWSyncAppEngine::CancelSyncL()
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::CancelSyncL()" );
-    iSyncHandler->CancelSynchronizeL();
-    }
 
 // -----------------------------------------------------------------------------
 //  CIAUpdateFWSyncAppEngine::SyncCompleted
@@ -316,29 +164,8 @@
 void CIAUpdateFWSyncAppEngine::SyncCompleted( TNSmlStatus /*aStatus*/ )
     {
     FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::SyncCompleted:" );
-    
-    /*if( iSyncObserver )
-        {
-        FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::SyncCompleted: inform observer" );
-        
-        iSyncObserver->SyncComplete( aStatus );
-        }    */
     }
     
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncAppEngine::RequestSyncStatus
-// -----------------------------------------------------------------------------
-//	
-/*void CIAUpdateFWSyncAppEngine::RequestSyncStatus( 
-                                           MNSmlDMSyncObserver* aSyncObserver )
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::RequestSyncStatus:" );
-    
-    if( aSyncObserver )
-        {
-        FLOG( "[IAUPDATEFW] CIAUpdateFWSyncAppEngine::RequestSyncStatus: added observer" );
-        iSyncObserver = aSyncObserver;
-        }
-    }*/
+
 
 // End of File
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwsynchandler.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwsynchandler.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -19,14 +19,11 @@
 
 
 // INCLUDES
-#include <StringLoader.h>
 #include <e32property.h>
-#include <data_caging_path_literals.hrh>  // for resource and bitmap directories
 #include <SyncMLErr.h>      // sync error codes
 #include <DevManInternalCRKeys.h>
 #include <centralrepository.h>
 #include <rconnmon.h>
-#include <es_enum.h>
 
 #include <cmconnectionmethod.h>
 #include <cmconnectionmethoddef.h>
@@ -35,7 +32,6 @@
 #include <cmdestination.h>
 #include <cmmanagerdef.h>
 
-#include <uikon.hrh>
 
 #include "iaupdateconnectionmethod.h"
 #include "iaupdateprivatecrkeys.h"
@@ -50,6 +46,8 @@
 #include "iaupdatefwnsmlcrkeys.h"
 #include "iaupdatefwnsmlpskeys.h"
 
+#include "iaupdatefwupdateobserver.h"
+
 // -----------------------------------------------------------------------------
 // CIAUpdateFWSyncHandler::NewL
 //
@@ -79,12 +77,7 @@
 //
 CIAUpdateFWSyncHandler::~CIAUpdateFWSyncHandler()
     {
-    /*if ( iWaitDialog )
-        {
-        TRAP_IGNORE( iWaitDialog->ProcessFinishedL() );
-        iWaitDialog = NULL;
-        }*/
-    
+        
 	delete iState;
 	delete iActiveCaller;
 
@@ -124,28 +117,14 @@
 	{
 	}
 
-
 // -----------------------------------------------------------------------------
-// CIAUpdateFWSyncHandler::SynchronizeL
+// CIAUpdateFWSyncHandler::SetUpdateObserver
 // -----------------------------------------------------------------------------
 //
-void CIAUpdateFWSyncHandler::SynchronizeL( TDesC& aServerName,
-                                       const TInt aProfileId,
-                                       const TInt aJobId,
-                                       const TInt aConnectionBearer,
-                                       const TBool aUseFotaProgressNote )
-	{
-
-	iServerName = aServerName;
-	iConnectionBearer = aConnectionBearer;
-    iProfileId = aProfileId;
-    iJobId = aJobId;
-    iUseFotaProgressNote = aUseFotaProgressNote;
-    
-    iSyncJob.OpenL( Session(), iJobId );
-    iSyncJobId = iSyncJob.Identifier();
-    SynchronizeL();
-	}
+void CIAUpdateFWSyncHandler::SetUpdateObserver( MIAUpdateFWUpdateObserver* aObserver )
+    {
+    iObserver = aObserver;
+    }
 	
 // -----------------------------------------------------------------------------
 // CIAUpdateFWSyncHandler::SynchronizeL
@@ -223,8 +202,12 @@
 	FLOG("[IAUPDATE] CIAUpdateFWSyncHandler::SynchronizeL 16");
 	State()->SetSyncPhase( CIAUpdateFWSyncState::EPhaseConnecting );
 	FLOG("[IAUPDATE] CIAUpdateFWSyncHandler::SynchronizeL 17");
+
+	if ( iObserver )
+	     {
+	     iObserver->PreparingStarted();
+	     }
 	
-	TRAP( err, ShowProgressDialogL() );
 	FLOG("[IAUPDATE] CIAUpdateFWSyncHandler::SynchronizeL 18");
 	if ( err != KErrNone )
 		{
@@ -331,13 +314,11 @@
 	iSyncRunning = EFalse;
 	iSyncError = aError;
 
-    /*if ( iWaitDialog )
-        {
-        
-        iWaitDialog->ProcessFinishedL();
-        iWaitDialog = NULL;
-        }*/
-
+	if ( iObserver )
+	    {
+	    iObserver->Prepared();
+	    }
+    
 	iUseFotaProgressNote = EFalse;
     iSyncJob.Close();
     FLOG("[IAUPDATE] CIAUpdateFWSyncHandler::SynchronizeCompletedL 13");
@@ -664,73 +645,12 @@
 //
 void CIAUpdateFWSyncHandler::HandleActiveCallL()
 	{
-
-    FLOG("CIAUpdateFWSyncHandler::HandleActiveCallL 1")
-    // HandleSyncErrorL will set this to true if
-    // sync will be retried.
-    iRetrySync = EFalse;
+    FLOG("CIAUpdateFWSyncHandler::HandleActiveCallL")
 
-	if ( (iSyncError != KErrNone) && (iSyncError != KErrCancel) )
-		{
-		 FLOG("CIAUpdateFWSyncHandler::HandleActiveCallL 2")
-		TRAP_IGNORE( HandleSyncErrorL() );
-		}
-	if ( iRetrySync == EFalse )
-		{
-		 FLOG("CIAUpdateFWSyncHandler::HandleActiveCallL 3")
-	    // Inform parent that sync is done.
-	    iSyncAppEngine->SyncCompleted( ENSmlSyncComplete );		
-		 FLOG("CIAUpdateFWSyncHandler::HandleActiveCallL 4")
-		}
+    // Inform parent that sync is done.
+	iSyncAppEngine->SyncCompleted( ENSmlSyncComplete );		
 	}
 
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncHandler::HandleSyncErrorL
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFWSyncHandler::HandleSyncErrorL()
-	{
-
-	FLOG("CIAUpdateFWSyncHandler::HandleSyncErrorL 1")
-	if ( iSyncError != KDMErr )
-		{
-		FLOG("CIAUpdateFWSyncHandler::HandleSyncErrorL 2")
-		}
-
-	   FLOG("CIAUpdateFWSyncHandler::HandleSyncErrorL 4")
-	if ( ( iSyncError == SyncMLError::KErrAuthenticationFailure ) ||
-	    ( iSyncError == SyncMLError::KErrTransportAuthenticationFailure ) )
-        {
-        //we don't handle this at the moment
-        FLOG("CIAUpdateFWSyncHandler::HandleSyncErrorL 5")
-        }
-	FLOG("CIAUpdateFWSyncHandler::HandleSyncErrorL 8")
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncHandler::ShowProgressDialogL
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFWSyncHandler::ShowProgressDialogL( )
-	{
-        //iWaitDialog = new ( ELeave ) CAknWaitDialog(
-        //    ( REINTERPRET_CAST( CEikDialog**, &iWaitDialog ) ) );
-        //iWaitDialog->ExecuteLD( R_FOTA_CHECK_WAIT_NOTE );
-        //iWaitDialog->SetCallback( this );
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncHandler::HideProgressDialogL
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFWSyncHandler::HideProgressDialogL()
-    {
-    /*if ( iWaitDialog )
-        {
-        iWaitDialog->ProcessFinishedL();
-        iWaitDialog = NULL;
-        }*/
-    }
 
 // -----------------------------------------------------------------------------
 // CIAUpdateFWSyncHandler::Session
@@ -764,37 +684,5 @@
 	return iState;
 	}
 	
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncHandler::CancelSynchronizeL
-// -----------------------------------------------------------------------------
-//		
-void CIAUpdateFWSyncHandler::CancelSynchronizeL()
-    { 
-    if ( iSyncRunning )
-        {
-        iSyncJob.StopL();
-        SynchronizeCompletedL( KErrCancel );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncHandler::DialogDismissedL
-// -----------------------------------------------------------------------------
-//		
-void CIAUpdateFWSyncHandler::DialogDismissedL( TInt aButtonId )
-    {
-	if ( aButtonId == EEikBidCancel )
-		{
-
-		if ( SyncRunning() )
-			{
-
-			TRAP_IGNORE( iSyncJob.StopL() );
-		    
-		    State()->SetSyncPhase( CIAUpdateFWSyncState::EPhaseCanceling );
-			}
-		}
-    }
-
 
 // End of File
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncprofile.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncprofile.cpp	Thu Oct 14 14:11:30 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"
@@ -35,12 +35,12 @@
 // Two-phased constructor.
 // -----------------------------------------------------------------------------
 //
-CIAUpdateFWSyncProfile* CIAUpdateFWSyncProfile::NewLC( const TInt aApplicationId,
+CIAUpdateFWSyncProfile* CIAUpdateFWSyncProfile::NewLC( 
                                                RSyncMLSession* aSyncSession )
     {
     FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::NewLC()" );
     
-    CIAUpdateFWSyncProfile* self = new( ELeave ) CIAUpdateFWSyncProfile( aApplicationId,
+    CIAUpdateFWSyncProfile* self = new( ELeave ) CIAUpdateFWSyncProfile( 
                                                                  aSyncSession );
 	CleanupStack::PushL( self );
 	self->ConstructL();
@@ -53,12 +53,12 @@
 // Two-phased constructor.
 // -----------------------------------------------------------------------------
 //
- CIAUpdateFWSyncProfile* CIAUpdateFWSyncProfile::NewL( const TInt aApplicationId,
+ CIAUpdateFWSyncProfile* CIAUpdateFWSyncProfile::NewL( 
                                               RSyncMLSession* aSyncSession )
     {
     FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::NewL:" );
     
-    CIAUpdateFWSyncProfile* self = new( ELeave ) CIAUpdateFWSyncProfile( aApplicationId,
+    CIAUpdateFWSyncProfile* self = new( ELeave ) CIAUpdateFWSyncProfile( 
                                                                  aSyncSession );
 	CleanupStack::PushL( self );
 	self->ConstructL();
@@ -74,7 +74,6 @@
     {
     FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::~CIAUpdateFWSyncProfile:" );
     
-    iHistoryLog.Close();
     iConnection.Close();
     iProfile.Close();
     }
@@ -94,15 +93,13 @@
 // Constructor.
 // -----------------------------------------------------------------------------
 //
-CIAUpdateFWSyncProfile::CIAUpdateFWSyncProfile( const TInt aApplicationId,
+CIAUpdateFWSyncProfile::CIAUpdateFWSyncProfile( 
                                         RSyncMLSession* aSyncSession )
 	{
 	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::CIAUpdateFWSyncProfile:" );
 	
 	iSyncSession = aSyncSession;
-	iApplicationId = aApplicationId;
 	
-    iHistoryLogOpen = EFalse;
     iConnectionOpen = EFalse;
 	}
 
@@ -131,56 +128,7 @@
     FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::OpenL() completed" );
     }
 
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::CreateL
-// -----------------------------------------------------------------------------
-//
- TInt CIAUpdateFWSyncProfile::CreateL()
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::CreateL()" );
-    
-    iProfile.CreateL( *iSyncSession );
-    iProfile.SetCreatorId( iApplicationId );
-    iProfile.UpdateL();
-    TInt id = iProfile.Identifier();
-    iProfile.Close();
 
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::CreateL() completed" );
-    return id;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::CreateCopyL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::CreateCopyL( TInt aProfileId )
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::CreateCopyL()" );
-    
-    iProfile.CreateL( *iSyncSession );
-    iProfile.SetCreatorId( iApplicationId );
-    iProfile.UpdateL();
-    if ( !iConnectionOpen )
-		{
-    	OpenConnection();
-		}
-	if ( !iHistoryLogOpen )
-		{
-	    OpenHistoryLog();
-		}
-
-    CIAUpdateFWSyncProfile* profile = 
-                CIAUpdateFWSyncProfile::NewL( KIAUpdateUiUid, iSyncSession );
-    CleanupStack::PushL( profile );
-    profile->OpenL( aProfileId, ESmlOpenRead );
-    CopyValuesL( profile );
-    CleanupStack::PopAndDestroy( profile );
-    profile  = NULL;
-
-    iProfile.UpdateL();
-    CloseHistoryLog();
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::CreateCopyL() completed" );
-    }
 
 // -----------------------------------------------------------------------------
 // CIAUpdateFWSyncProfile::SaveL
@@ -215,39 +163,6 @@
 	}
 
 // -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetNameL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetNameL( const TDesC& aText )
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetNameL:" );
-	
-	iProfile.SetDisplayNameL( aText );
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::CreatorId
-// -----------------------------------------------------------------------------
-//
- TInt CIAUpdateFWSyncProfile::CreatorId()
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::CreatorId:" );
-	
-	return iProfile.CreatorId();
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetCreatorId
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetCreatorId( TInt aCreatorId )
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetCreatorId:" );
-	
-	iProfile.SetCreatorId( aCreatorId );
-	}
-
-// -----------------------------------------------------------------------------
 // CIAUpdateFWSyncProfile::ProfileId
 // -----------------------------------------------------------------------------
 //
@@ -261,214 +176,6 @@
     return retval;
 	}
 
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::DeleteAllowed
-// -----------------------------------------------------------------------------
-//
- TBool CIAUpdateFWSyncProfile::DeleteAllowed()
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::DeleteAllowed:" );
-	
-    return iProfile.DeleteAllowed();
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::IsSynced
-// -----------------------------------------------------------------------------
-//
- TBool CIAUpdateFWSyncProfile::IsSynced()
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::IsSynced()" );
-    
-    TBool retVal = EFalse;
-    if ( !iHistoryLogOpen )
-		{
-		FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::IsSynced(): Opening history log" );
-	    OpenHistoryLog();
-		}
-		
-    if ( iHistoryLogOpen )
-    	{
-	    FTRACE( FPrint( _L(
-	        "[IAUPDATEFW] CIAUpdateFWSyncProfile::IsSynced(): Log open! Log count = %d"),
-	                                                 iHistoryLog.Count() ) );
-    	if ( iHistoryLog.Count() > 0 )
-    	    {
-            const CSyncMLHistoryJob* job = LatestHistoryJob();
-            if ( job )
-            	{
-            	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::IsSynced(): True" );
-            	if( job->LastSuccessSyncTime() != NULL )
-                   {
-    	        retVal = ETrue;
-                   }
-            	}
-            else
-                {
-                FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::IsSynced(): False" );
-                }
-    	    }
-    	}
-    else
-        {
-        FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::IsSynced() Could not open history log!!!" );
-        }
-    CloseHistoryLog();    	
-
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::IsSynced() completed" );
-    return retVal;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::LastSync
-// -----------------------------------------------------------------------------
-//
- TTime CIAUpdateFWSyncProfile::LastSync()
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSync()" );
-
-    if ( !iHistoryLogOpen )
-		{
-		FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSync(): Opening history log" );
-	    OpenHistoryLog();
-		}
-    
-    TTime time = 0;
-    if ( iHistoryLogOpen )
-    	{
-	    FTRACE( FPrint( _L(
-	        "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSync(): Log open! Log count = %d"),
-	                                                 iHistoryLog.Count() ) );
-    	
-    	if (iHistoryLog.Count() > 0)
-    	    {
-   	        const CSyncMLHistoryJob* job = LatestHistoryJob();
-            if ( job )
-            	{
-                FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSync() timestamp" );
-            	time = job->TimeStamp();
-            	}
-    	    }
-    	}
-    else
-        {
-        FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSync() Could not open history log!!!" );
-        }
-
-    CloseHistoryLog();    	
-
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSync() completed" );
-    return time;
-    }
-
- TTime CIAUpdateFWSyncProfile::LastSuccessSync()
-{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSuccessSynctime()" );
-
-    if ( !iHistoryLogOpen )
-		{
-		FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSync(): Opening history log" );
-	    OpenHistoryLog();
-		}
-    
-    TTime time = 0;
-    if ( iHistoryLogOpen )
-    	{
-	    FTRACE( FPrint( _L(
-	        "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSync(): Log open! Log count = %d"),
-	                                                 iHistoryLog.Count() ) );
-    	
-    	if (iHistoryLog.Count() > 0)
-    	    {
-   	        const CSyncMLHistoryJob* job = LatestHistoryJob();
-   	        iProfileId=ProfileId();
-            if ( job )
-            	{
-                FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSync() timestamp" );
-            	time = job->LastSuccessSyncTime();
-            	}
-    	    }
-    	}
-    else
-        {
-        FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSync() Could not open history log!!!" );
-        }
-
-    CloseHistoryLog();    	
-
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LastSuccessSynctime() completed" );
-    return time;
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::GetServerIdL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::GetServerId( TDes& aText )
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::GetServerIdL:" );
-    
-	TUtil::StrCopy(aText, iProfile.ServerId());
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetServerIdL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetServerIdL( const TDesC& aText )
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetServerIdL:" );
-	
-	TBuf8<KBufSize256> buf;
-	TUtil::StrCopy(buf, aText);
-	iProfile.SetServerIdL(buf);
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::GetServerPassword
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::GetServerPassword(TDes& aText)
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::GetServerPassword:" );
-	
-	TUtil::StrCopy( aText, iProfile.ServerPassword() );
-	}
-	
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetServerPasswordL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetServerPasswordL(const TDesC& aText)
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetServerPasswordL:" );
-	
-	TUtil::StrCopy(iBuf8, aText);    // conver TDes to TDes8
-	iProfile.SetServerPasswordL(iBuf8);
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::ProtocolVersion
-// -----------------------------------------------------------------------------
-//
- TInt CIAUpdateFWSyncProfile::ProtocolVersion()
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::ProtocolVersion:" );
-	
-	TSmlProtocolVersion version = iProfile.ProtocolVersion();
-	return version;
-	}
-	
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetProtocolVersionL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetProtocolVersionL(TInt aProtocolVersion)
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetProtocolVersionL:" );
-	
-	iProfile.SetProtocolVersionL((TSmlProtocolVersion) aProtocolVersion);
-    }
 
 // -----------------------------------------------------------------------------
 // CIAUpdateFWSyncProfile::BearerType
@@ -495,28 +202,6 @@
 
     }
 	
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetBearerTypeL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetBearerTypeL(TInt aId)
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetBearerTypeL:" );
-
-	if ( aId == EAspBearerInternet )
-		{
-		iConnection.CreateL( Profile(), KUidNSmlMediumTypeInternet.iUid );
-		}
-	else if ( aId == EAspBearerBlueTooth )
-		{
-		iConnection.CreateL( Profile(), KUidNSmlMediumTypeBluetooth.iUid );
-    	}
-	else
-        {
-        // Set default as Internet
-        iConnection.CreateL( Profile(), KUidNSmlMediumTypeInternet.iUid );
-        }
-	}
 
 // -----------------------------------------------------------------------------
 // CIAUpdateFWSyncProfile::AccessPointL
@@ -587,113 +272,6 @@
 	}
 
 // -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::GetHostAddressL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::GetHostAddress(TDes& aText, TInt& aPort)
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::GetHostAddress:" );
-	aText = KNullDesC;
-	aPort = KDefaultHttpPort;
-	
-    if (!iConnectionOpen)	
-    	{
-      	return;
-    	}
-	
-	if (BearerType() != EAspBearerInternet)
-		{
-		TUtil::StrCopy(aText, iConnection.ServerURI()); // convert TDes8 to TDes
-		return;  // port number handling is for internet bearer only 
-		}
-	
-	TUtil::StrCopy( iBuf, iConnection.ServerURI() ); // convert TDes8 to TDes
-	
-	TURIParser parser( iBuf );
-	parser.GetUriWithoutPort( aText );
-	aPort = parser.Port();
-	if (aPort == KErrNotFound)
-		{
-		aPort = parser.DefaultPort();
-		}
-	}
-	
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetHostAddressL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetHostAddressL( const TDesC& aText, const TInt aPort )
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetHostAddressL:" );
-	
-    if (!iConnectionOpen)	
-    	{
-    	return;
-    	}
-	if (BearerType() != EAspBearerInternet)
-		{
-		// port number handling is for internet bearer only 
-		TUtil::StrCopy(iBuf, aText); 
-		}
-	else
-		{
-		TURIParser parser(aText);
-	    parser.GetUri(iBuf, aPort);
-		}
-	
-	TUtil::StrCopy( iBuf8, iBuf );
-	iConnection.SetServerURIL( iBuf8 );
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::GetUserNameL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::GetUserName(TDes& aText)
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::GetUserNameL:" );
-	
-	TUtil::StrCopy( aText, iProfile.UserName() );
-	}
-	
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetUserNameL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetUserNameL(const TDesC& aText)
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetUserNameL:" );
-	
-	TUtil::StrCopy(iBuf8, aText);  // conver TDes to TDes8
-	iProfile.SetUserNameL(iBuf8);
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::GetPasswordL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::GetPassword(TDes& aText)
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::GetPasswordL:" );
-	
-	TUtil::StrCopy( aText, iProfile.Password() );
-	}
-	
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetPasswordL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetPasswordL(const TDesC& aText)
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetPasswordL:" );
-	TUtil::StrCopy( iBuf8, aText );    // conver TDes to TDes8
-	
-	FTRACE( RDebug::Print(
-	     _L("[IAUPDATEFW] CIAUpdateFWSyncProfile::SetPasswordL iBuf8 (%S)"), &iBuf8 ) );
-	iProfile.SetPasswordL( iBuf8 );
-	}
-
-// -----------------------------------------------------------------------------
 // CIAUpdateFWSyncProfile::SASyncState
 // -----------------------------------------------------------------------------
 //
@@ -744,149 +322,9 @@
 		}
     }
 
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetHttpUsed
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetHttpUsedL(TBool aEnable)
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetHttpUsed:" );
 
-    if ( iConnectionOpen )
-    	{
-    	if ( iConnection.Identifier() == KUidNSmlMediumTypeInternet.iUid )
-		    {
-        	TBuf8<KBufSize32> key;
-        	TBuf8<KBufSize32> value;
-        	
-        	if ( aEnable )
-        		{
-        		value.Num( KHttpUsed ); 
-        		}
-        	else
-        		{
-        		value.Num( KHttpNotUsed );
-        		}
-        		
-        	GetConnectionPropertyNameL( key, EPropertyHttpUsed );
-        	iConnection.SetPropertyL( key, value );
-		    }
-    	}
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::HttpUsedL
-// -----------------------------------------------------------------------------
-//
- TBool CIAUpdateFWSyncProfile::HttpUsedL()
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::HttpUsedL:" );
-    TBool retVal = EFalse; 
-    if ( iConnectionOpen )
-    	{
-    	if ( iConnection.Identifier() == KUidNSmlMediumTypeInternet.iUid )
-		    {
-        	TBuf8<KBufSize32> key; 
-        	TBuf<KBufSize32> value;
-        	TInt intValue;
-        	
-        	GetConnectionPropertyNameL(key, EPropertyHttpUsed);
-        	TUtil::StrCopy(value, iConnection.GetPropertyL(key));
-        	
-            User::LeaveIfError( TUtil::StrToInt( value, intValue ) );
-            
-            if ( intValue == 1 )
-            	{
-                retVal = ETrue;
-                }
-		    }
-    	}
-    return retVal;
-	}
-	
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::GetHttpUsernameL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::GetHttpUserNameL( TDes& aText )
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::GetHttpUsernameL:" );
 
-	aText = KNullDesC;
-	
-    if ( iConnectionOpen )
-    	{
-    	if ( iConnection.Identifier() == KUidNSmlMediumTypeInternet.iUid )
-		    {
-        	TBuf8<KBufSize32> key; 
-        	
-        	GetConnectionPropertyNameL( key, EPropertyHttpUserName );
-        	TUtil::StrCopy( aText, iConnection.GetPropertyL( key ) );
-		    }
-    	}
-  	}
-	
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetHttpUsernameL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetHttpUserNameL( const TDesC& aText )
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetHttpUsernameL:" );
 
-    if ( iConnectionOpen )
-    	{
-    	if ( iConnection.Identifier() == KUidNSmlMediumTypeInternet.iUid )
-		    {
-		    TBuf8<KBufSize32> key;
-	
-	        GetConnectionPropertyNameL( key, EPropertyHttpUserName );
-	        TUtil::StrCopy( iBuf8, aText );  // convert TDes to TDes8
-	        iConnection.SetPropertyL( key, iBuf8 );
-		    }
-    	}
-	}
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::GetHttpPasswordL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::GetHttpPasswordL( TDes& aText )
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::GetHttpPasswordL:" );
-   	aText = KNullDesC;
-   	
-    if ( iConnectionOpen )
-    	{
-    	if ( iConnection.Identifier() == KUidNSmlMediumTypeInternet.iUid )
-		    {
-		    TBuf8<KBufSize32> key; 
-	        GetConnectionPropertyNameL( key, EPropertyHttpPassword );
-            TUtil::StrCopy( aText, iConnection.GetPropertyL( key ) );
-		    }
-    	}
-	}
-	
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::SetHttpPasswordL
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::SetHttpPasswordL( const TDesC& aText )
-	{
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::SetHttpPasswordL:" );
-
-    if ( iConnectionOpen )
-    	{
-    	if ( iConnection.Identifier() == KUidNSmlMediumTypeInternet.iUid )
-		    {
-        	TBuf8<KBufSize32> key;
-        	
-        	GetConnectionPropertyNameL( key, EPropertyHttpPassword );
-        	TUtil::StrCopy( iBuf8, aText );  // convert TDes to TDes8
-        	iConnection.SetPropertyL( key, iBuf8 );
-    	    }
-    	}
-	}
  
 // -----------------------------------------------------------------------------
 // CIAUpdateFWSyncProfile::Profile
@@ -899,100 +337,8 @@
     return iProfile;
     }
 
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::LatestHistoryJob
-// -----------------------------------------------------------------------------
-//
- const CSyncMLHistoryJob* CIAUpdateFWSyncProfile::LatestHistoryJob()
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LatestHistoryJob:" );
-    
-    if ( !iHistoryLogOpen )
-		{
-        OpenHistoryLog();
-		}
-		
-    if ( iHistoryLogOpen )
-		{
-	    TInt count = iHistoryLog.Count();
-        FTRACE( FPrint( _L(
-            "[IAUPDATEFW] CIAUpdateFWSyncProfile::LatestHistoryJob(): Log count %d"),
-            count ) );
-
-        if ( count == 0 )
-            {
-            FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LatestHistoryJob(): No history" );
-            return NULL;  // profile has no history job
-            }
-            
-        // sort array
-        iHistoryLog.SortEntries( CSyncMLHistoryEntry::ESortByTime );    
-        
-        // try to find latest sync job (start from last array entry)
-        for ( TInt index = count - 1; index >= 0; index-- )
-        	{
-        	FTRACE( FPrint( _L(
-        	    "[IAUPDATEFW] CIAUpdateFWSyncProfile::LatestHistoryJob: count %d index %d"),
-        	    count, index ) );
-            //const CSyncMLHistoryEntry& entry = iHistoryLog[index];
-            const CSyncMLHistoryEntry& entry = iHistoryLog.Entry( index );
-            
-        	FTRACE( FPrint( _L(
-        	    "[IAUPDATEFW] CIAUpdateFWSyncProfile::LatestHistoryJob: Entry type = %x"),
-        	    entry.EntryType().iUid ) );
-            
-            const CSyncMLHistoryJob* jobEntry =
-                CSyncMLHistoryJob::DynamicCast( &entry );
 
-            if ( jobEntry )
-            	{
-            	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LatestHistoryJob() completed: OK" );
-            	return jobEntry;
-            	}
-        	}
-		}
 
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::LatestHistoryJob() completed: No history found" );
-    return NULL;  // profile has no history job
-    }
-
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::OpenHistoryLog
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::OpenHistoryLog()
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::OpenHistoryLog()" );
-    
-    TInt id = ProfileId();
-   	TRAPD( err, iHistoryLog.OpenL( Session(), id ) );
-
-   	if ( err == KErrNone )
-   		{
-   		FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::OpenHistoryLog(): Opened" );
-   		iHistoryLogOpen = ETrue;
-    	}
-
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::OpenHistoryLog() completed" );
-    }
-    
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::CloseHistoryLog
-// -----------------------------------------------------------------------------
-//
- void CIAUpdateFWSyncProfile::CloseHistoryLog()
-    {
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::CloseHistoryLog()" );
-    
-   	if ( iHistoryLogOpen )
-   		{
-   		FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::CloseHistoryLog(): Closed " );
-   		iHistoryLog.Close();
-   		iHistoryLogOpen = EFalse;
-    	}
-
-    FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::CloseHistoryLog() completed" );
-    }
     
 // -----------------------------------------------------------------------------
 // CIAUpdateFWSyncProfile::OpenConnection
@@ -1067,55 +413,5 @@
 	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::GetConnectionPropertyNameL() completed" );
 	}
 
-// -----------------------------------------------------------------------------
-// CIAUpdateFWSyncProfile::CopyValuesL
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFWSyncProfile::CopyValuesL( CIAUpdateFWSyncProfile* aSource )
-    {
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::CopyValuesL()" );
-
-    TBuf<KBufSize256> buf;
-    TInt num = 0;
-    
-    num = aSource->ProtocolVersion();
-    SetProtocolVersionL( num );
-    if ( num == 1 )
-    	{
-    	aSource->GetServerId( buf );
-    	SetServerIdL( buf );
-    	}
-    	
-    num = aSource->BearerType();
-    SetBearerTypeL( num );
-    
-     num = aSource->AccessPointL();
-    SetAccessPointL( num );
-    
-    aSource->GetHostAddress( buf, num );
-    SetHostAddressL( buf, num );
-     
-    aSource->GetUserName( buf );
-    SetUserNameL(buf);
-     
-    aSource->GetPassword( buf );
-    SetPasswordL( buf );
-    
-    num = aSource->SASyncState();
-    SetSASyncStateL( num );
-    
-    if ( aSource->BearerType() == EAspBearerInternet)
-    	{
-    	num = aSource->HttpUsedL();
-    	SetHttpUsedL(num);
-    	
-    	aSource->GetHttpUserNameL(buf);
-    	SetHttpUserNameL(buf);
-    	
-    	aSource->GetHttpPasswordL(buf);
-    	SetHttpPasswordL(buf);
-    	}
-	FLOG( "[IAUPDATEFW] CIAUpdateFWSyncProfile::CopyValuesL() completed" );
-    }
     
 // End of File
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncstate.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncstate.cpp	Thu Oct 14 14:11:30 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"
@@ -105,104 +105,4 @@
 	}
 
 
-// -----------------------------------------------------------------------------
-// SetProgress
-//
-// -----------------------------------------------------------------------------
-//
-  void CIAUpdateFWSyncState::SetProgress(TInt aCount)
-	{
-	iProgressCount = aCount;
-	}
 
-// -----------------------------------------------------------------------------
-// IncreaseProgress
-//
-// -----------------------------------------------------------------------------
-//
-  void CIAUpdateFWSyncState::IncreaseProgress()
-	{
-	if (iProgressCount < iTotalProgressCount)
-		{
-		iProgressCount++;
-		}
-	}
-
-// -----------------------------------------------------------------------------
-// Progress
-//
-// -----------------------------------------------------------------------------
-//
-  TInt CIAUpdateFWSyncState::Progress()
-	{
-	return iProgressCount;
-	}
-
-// -----------------------------------------------------------------------------
-// SetTotalProgress
-//
-// -----------------------------------------------------------------------------
-//
-  void CIAUpdateFWSyncState::SetTotalProgress(TInt aCount)
-	{
-	iTotalProgressCount = aCount;
-	}
-
-// -----------------------------------------------------------------------------
-// TotalProgress
-//
-// -----------------------------------------------------------------------------
-//
-  TInt CIAUpdateFWSyncState::TotalProgress()
-	{
-	return iTotalProgressCount;
-	}
-
-// -----------------------------------------------------------------------------
-// SetContent
-//
-// -----------------------------------------------------------------------------
-//
-  void CIAUpdateFWSyncState::SetContent(const TDesC& aContent)
-	{
-	TUtil::StrCopy(iSyncContent, aContent);
-	}
-
-// -----------------------------------------------------------------------------
-// Content
-//
-// -----------------------------------------------------------------------------
-//
-  const TDesC& CIAUpdateFWSyncState::Content()
-	{
-	return iSyncContent;
-	}
-
-// -----------------------------------------------------------------------------
-// ResetProgress
-//
-// -----------------------------------------------------------------------------
-//
-  void CIAUpdateFWSyncState::ResetProgress()
-	{
-	iProgressCount = 0;
-	iTotalProgressCount = 0;
-	iSyncContent = KNullDesC;
-	}
-
-// -----------------------------------------------------------------------------
-// ProgressKnown
-//
-// -----------------------------------------------------------------------------
-//
-  TBool CIAUpdateFWSyncState::ProgressKnown()
-	{
-	if (iTotalProgressCount == -1 )
-		{
-		return EFalse;
-		}
-
-	return ETrue;
-	}
-
-
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncutil.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncutil.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -73,35 +73,6 @@
 	aTarget.Copy( aSource.Left( aTarget.MaxLength() ) );
     }
 
-// ----------------------------------------------------------------------------
-// StrAppend
-// ----------------------------------------------------------------------------
-//
-void TUtil::StrAppend( TDes& aTarget, const TDesC& aSource )
-    {
-    if ( aSource.Length() == 0 )
-    	{
-    	return;
-    	}
-    TInt free = aTarget.MaxLength() - aTarget.Length();
-	if ( aSource.Length() <= free )
-		{
-		aTarget.Append( aSource );
-		}
-    }
-
-// ----------------------------------------------------------------------------
-// StrInsert
-// ----------------------------------------------------------------------------
-//
-  void TUtil::StrInsert( TDes& aTarget, const TDesC& aSource )
-    {
-	TInt free = aTarget.MaxLength() - aTarget.Length();
-	if (aSource.Length() <= free)
-		{
-		aTarget.Insert(0, aSource);
-		}
-    }
 
 // ----------------------------------------------------------------------------
 // StrToInt
@@ -114,587 +85,9 @@
 	return err;
 	}
 
-//
-//-----------------------------------------------------------------------------
-// IsEmpty
-// Function returns ETrue if string only contains white space
-// or has no characters.
-//-----------------------------------------------------------------------------
-//
-TBool TUtil::IsEmpty( const TDesC& aText )
-	{
-	TInt len = aText.Length();
-	for ( TInt index=0; index < len; index++ )
-		{
-		TChar character = aText[index];
-		if ( !character.IsSpace() )
-			{
-			return EFalse;
-			}
-		}
-	return ETrue;
-	}
-
-// -----------------------------------------------------------------------------
-// SyncTimeLC
-// -----------------------------------------------------------------------------
-//
-HBufC* TUtil::SyncTimeLC( TTime aLastSync )
-	{
-	FLOG( "[OMADM] TUtil::SyncTimeLC" );
-	
-	TTime homeTime = ConvertUniversalToHomeTime( aLastSync );
-	
-	HBufC* hBuf = HBufC::NewLC( KBufSize255 );
-	TPtr ptr = hBuf->Des();
-
-	if ( IsToday( homeTime ) )
-		{
-		FLOG( "[OMADM] TUtil::SyncTimeLC time" );
-		
-		TBuf<KBufSize> timeFormat;
-		/*HBufC* buf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
-		TUtil::StrCopy( timeFormat, *buf );
-		CleanupStack::PopAndDestroy( buf );
-		homeTime.FormatL( ptr, timeFormat );*/
-		
-		FLOG( "[OMADM] TUtil::SyncTimeLC time done" );
-		}
-	else
-		{
-		FLOG( "[OMADM] TUtil::SyncTimeLC date" );
-		
-		TBuf<KBufSize> dateFormat;
-        /*HBufC* buf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO );
-        TUtil::StrCopy( dateFormat, *buf );
-        CleanupStack::PopAndDestroy( buf );
-		homeTime.FormatL(ptr, dateFormat);*/
-		
-		FLOG( "[OMADM] TUtil::SyncTimeLC date done" );
-		}
-    FLOG( "[OMADM] TUtil::SyncTimeLC Done" );
-	return hBuf;
-	}
-
-// -----------------------------------------------------------------------------
-// ConvertUniversalToHomeTime
-// -----------------------------------------------------------------------------
-//
-TTime TUtil::ConvertUniversalToHomeTime( const TTime& aUniversalTime )
-    {
-    TTime time( aUniversalTime );   // time stores UTC time.
-
-    TLocale locale;
-    TTimeIntervalSeconds universalTimeOffset( locale.UniversalTimeOffset() );
-    
-    // Add locale's universal time offset to universal time.
-    time += universalTimeOffset;    // time stores Local Time.
-
-    // If home daylight saving in effect, add one hour offset.
-    if ( locale.QueryHomeHasDaylightSavingOn() )
-        {
-        TTimeIntervalHours daylightSaving(1);
-        time += daylightSaving;
-        }
-
-    return time;
-    }
-
-// -----------------------------------------------------------------------------
-// IsToDay
-// -----------------------------------------------------------------------------
-//
-TBool TUtil::IsToday(TTime aTime)
-	{
-	FLOG( "[OMADM] TUtil::IsToday" );
-	
-	TTime now;
-	now.HomeTime();
-	TInt day1 = now.DayNoInYear();
-	TInt day2 = aTime.DayNoInYear();
-	TTimeIntervalDays daysBetween = now.DaysFrom( aTime );
-	
-	if ( day1 != day2 )
-		{
-		FLOG( "[OMADM] TUtil::IsToday False 1" );
-		return EFalse;
-		}
-		
-	if ( daysBetween.Int() > 0 )
-		{
-		FLOG( "[OMADM] TUtil::IsToday False 2" );
-		return EFalse;
-		}
-
-    FLOG( "[OMADM] TUtil::IsToday True" );
-	return ETrue; 
-	}
-
-
-// -----------------------------------------------------------------------------
-// TUtil::GetDateTextL
-// -----------------------------------------------------------------------------
-//
-void TUtil::GetDateTextL(TDes& /*aText*/, TTime aDateTime)
-	{
-	TTime homeTime = ConvertUniversalToHomeTime( aDateTime );
-	//HBufC* hBuf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO );
-    //homeTime.FormatL( aText, *hBuf );
-    //CleanupStack::PopAndDestroy( hBuf );
-	}
-
-
-// -----------------------------------------------------------------------------
-// TUtil::GetTimeTextL
-// -----------------------------------------------------------------------------
-//
-void TUtil::GetTimeTextL( TDes& /*aText*/, TTime aDateTime )
-	{
-	TTime homeTime = ConvertUniversalToHomeTime( aDateTime );
-	//HBufC* hBuf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
-    //homeTime.FormatL( aText, *hBuf );
-    //CleanupStack::PopAndDestroy( hBuf );
-	}
-
-
-// -----------------------------------------------------------------------------
-// TUtil::GetDateTimeTextL
-// -----------------------------------------------------------------------------
-//
-void TUtil::GetDateTimeTextL( TDes& aText, TTime aDateTime )
-	{
-	TDateTime dt = aDateTime.DateTime();
-	aText.Format(_L("%02d.%02d.%04d %02d:%02d:%02d"), dt.Day()+1,
-	                                                  dt.Month()+1,
-	                                                  dt.Year(),
-	                                                  dt.Hour(),
-	                                                  dt.Minute(),
-	                                                  dt.Second() );
-	}
 
 
-/*****************************************************************************
- * class TURIParser
- *****************************************************************************/
 
-// ----------------------------------------------------------------------------
-// Constructor
-// ----------------------------------------------------------------------------
-//
-TURIParser::TURIParser( const TDesC& aStr ) : iOriginalStr( aStr )
-    {
-    SkipHttp();
-    }
-
-// ----------------------------------------------------------------------------
-// GetUriWithoutPort
-// URI format: "http://serveraddress/documentname/"
-// ----------------------------------------------------------------------------
-//
-void TURIParser::GetUriWithoutPort( TDes& aText )
-	{
-	aText = KNullDesC;
-	TPtrC http = ParseHttp();
-	TPtrC address = ParseAddress();
-	TPtrC document = ParseDocument();
-	TUtil::StrAppend( aText, http );
-	TUtil::StrAppend( aText, address );
-	
-	if (document.Length() > 0)
-		{
-		TUtil::StrAppend( aText, KSlash );
-		TUtil::StrAppend( aText, document );
-		}
-	else if ( iSlash )
-		{
-		TUtil::StrAppend( aText, KSlash );
-		}
-	}
-	
-// ----------------------------------------------------------------------------
-// GetURI
-// URI format: "http://serveraddress:port/documentname/"
-// ----------------------------------------------------------------------------
-//
-void TURIParser::GetUri( TDes& aText, const TInt aPort )
-	{
-	aText = KNullDesC;
-	TPtrC http = ParseHttp();
-	TPtrC address = ParseAddress();
-	TPtrC document = ParseDocument();
-	TUtil::StrAppend( aText, http );
-	TUtil::StrAppend( aText, address );
-	
-	TBuf<KBufSize32> buf;
-	buf.Num( aPort );
-	TUtil::StrAppend( aText, KColon );
-	TUtil::StrAppend( aText, buf );
-	
-	if ( document.Length() > 0 )
-		{
-		TUtil::StrAppend( aText, KSlash );
-		TUtil::StrAppend( aText, document );
-		}
-	else if ( iSlash )
-		{
-		TUtil::StrAppend( aText, KSlash );
-		}
-	}
-
-// ----------------------------------------------------------------------------
-// Port
-// ----------------------------------------------------------------------------
-//
-TInt TURIParser::Port()
-	{
-	TInt port = KErrNotFound;
-	
-	TInt err = ParsePort( port );
-	if ( err != KErrNone )
-		{
-		return KErrNotFound;
-		}
-	return port;
-	}
-
-// ----------------------------------------------------------------------------
-// DefaultPort
-// 
-// ----------------------------------------------------------------------------
-//
-TInt TURIParser::DefaultPort()
-	{
-	TInt pos = iOriginalStr.FindF( KHttpsHeader );
-	if ( pos != KErrNotFound )
-		{
-		return KDefaultHttpsPort;
-		}
-	return KDefaultHttpPort;
-	}
-
-// ----------------------------------------------------------------------------
-// SkipHttp
-// Set pointer to the end of "http://".
-// ----------------------------------------------------------------------------
-//
-void TURIParser::SkipHttp()
-	{
-    TInt start = KErrNotFound;
-    TInt end   = KErrNotFound;
-    TStr str(iOriginalStr);
-    
-    GetHttpPos( start, end );
-    
-    if ( start != KErrNotFound )
-    	{
-    	iPtr.Set( str.Right( end + 1 ) );
-    	}
-    else
-    	{
-    	iPtr.Set( str.Right(0) );
-    	}
-	}
-
-// ----------------------------------------------------------------------------
-// ParseHttp
-// 
-// ----------------------------------------------------------------------------
-//
-TPtrC TURIParser::ParseHttp()
-	{
-    TInt start = KErrNotFound;
-    TInt end   = KErrNotFound;
-    
-    GetHttpPos(start, end);
-    
-    if (start == KErrNotFound)
-    	{
-    	return TPtrC();
-    	}
-    
-   	TStr str(iOriginalStr);
-    return str.SubStr(start, end);
-	}
-
-// ----------------------------------------------------------------------------
-// GetHttpPos 
-// ----------------------------------------------------------------------------
-//
-void TURIParser::GetHttpPos( TInt& aStartPos, TInt& aEndPos )
-	{
-	aEndPos = KErrNotFound;
-	
-	aStartPos = iOriginalStr.FindF( KHttpHeader );
-	if ( aStartPos != KErrNotFound )
-		{
-		aEndPos = aStartPos + KHttpHeader().Length() - 1;
-		return;
-		}
-	
-	aStartPos = iOriginalStr.FindF( KHttpsHeader );
-	if ( aStartPos != KErrNotFound )
-		{
-		aEndPos = aStartPos + KHttpsHeader().Length() - 1;
-		return;
-		}
-	}
-
-// ----------------------------------------------------------------------------
-// ParseAddress
-// ----------------------------------------------------------------------------
-TPtrC TURIParser::ParseAddress()
-	{
-	const TChar KSlash('/');
-	const TChar KColon(':');
-	TStr str( iPtr );
-    TInt firstSlash = str.Find( 0, KSlash );
-	TInt firstcolon = str.Find( 0, KColon );
-	TBool portFound = EFalse;
-	iSlash = EFalse;
-	if ( firstSlash != KErrNotFound ) 
-	    {
-		 iSlash = ETrue;
-	    }
-	if (firstcolon != KErrNotFound)
-		{
-		if ( firstSlash == KErrNotFound )
-			{
-			portFound = ETrue;
-			}
-		else if ( firstcolon < firstSlash )
-			{
-			portFound = ETrue;
-			}
-		}
-    
-	if ( portFound )
-		{
-		// address is text before first colon
-		return str.Left( firstcolon - 1 );
-		}
-	else if (firstSlash != KErrNotFound)
-		{
-		// address is text before first slash
-		return str.Left( firstSlash - 1 );
-		}
-	else
-		{
-		// address is all text
-		return str.Right( 0 );
-		}
-	}
-
-// ----------------------------------------------------------------------------
-// ParseDocument
-// ----------------------------------------------------------------------------
-TPtrC TURIParser::ParseDocument()
-	{
-	const TChar KSlash('/');
-	
-	TStr str(iPtr);
-    TInt firstSlash = str.Find( 0, KSlash );
-    
-	if ( firstSlash != KErrNotFound )
-		{
-		// document is all text after first slash
-		return str.Right( firstSlash + 1 );
-		}
-	return TPtrC();
-	}
-	
-// ----------------------------------------------------------------------------
-// ParsePort
-// ----------------------------------------------------------------------------
-// 
-TInt TURIParser::ParsePort( TInt& aNumber )
-	{
-	TPtrC port = ParsePort();
-	if ( port.Length() == 0 )
-		{
-		return KErrNotFound;
-		}
-	return TUtil::StrToInt( port, aNumber );
-	}
-
-// ----------------------------------------------------------------------------
-// ParsePort
-// ----------------------------------------------------------------------------
-// 
-TPtrC TURIParser::ParsePort()
-	{
-	const TChar KSlash('/');
-	const TChar KColon(':');
-	
-	TStr str(iPtr);
-    TInt firstSlash = str.Find( 0, KSlash );
-	TInt firstColon = str.Find( 0, KColon );
-    
-	if ( firstSlash != KErrNotFound )
-		{
-		if ( firstColon != KErrNotFound && firstColon < firstSlash )
-			{
-		    // port number is text between colon and slash 
-		    return str.SubStrEx( firstColon, firstSlash );
-			}
-		}
-	else 
-		{
-		if ( firstColon != KErrNotFound )
-			{
-		    // port number is all text after colon 
-		    return str.Right(firstColon+1);
-			}
-		}
-	return TPtrC();
-	}
-
-/*****************************************************************************
- * class TStr
- *****************************************************************************/
-
-// ----------------------------------------------------------------------------
-// TStr::TStr
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ----------------------------------------------------------------------------
-//
-TStr::TStr( const TDesC& aStr ) : iStr( aStr )
-    {
-    }
-
-// ----------------------------------------------------------------------------
-// TStr::Mid
-// ----------------------------------------------------------------------------
-//
-TPtrC TStr::Mid( TInt aPos )
-    {
-	if ( ( aPos < 0 ) || ( aPos >= iStr.Length() ) )
-	    {
-		return TPtrC();  // return empty descriptor
-	    }
-	return iStr.Mid( aPos );
-    }
-
-// ----------------------------------------------------------------------------
-// TStr::Mid
-// ----------------------------------------------------------------------------
-//
-TPtrC TStr::Mid( TInt aPos, TInt aLen )
-    {
-	TInt len = iStr.Length();
-	if ( ( aPos < 0 ) || ( aPos >= len ) )
-	    {
-		return TPtrC();
-	    }
-	if ( ( aLen <= 0 ) || ( aPos + aLen > len ) )
-	    {
-		return TPtrC();
-	    }
-
-	return iStr.Mid( aPos, aLen );
-    }
-
-// ----------------------------------------------------------------------------
-// TStr::Right
-// ----------------------------------------------------------------------------
-//
-TPtrC TStr::Right( TInt aPos )
-    {
-	return Mid( aPos );
-    }
-
-// ----------------------------------------------------------------------------
-// TStr::Left
-// ----------------------------------------------------------------------------
-//
-TPtrC TStr::Left( TInt aPos )
-    {
-	TInt len = iStr.Length();
-
-	if ( ( aPos < 0 ) || ( len == 0 ) )
-	    {
-		return TPtrC();
-	    }
-
-	TInt pos = len;
-	if ( ( aPos + 1 ) < len )
-	    {
-		pos = aPos + 1;
-	    }
-
-	return iStr.Left( pos );
-    }
-
-// ----------------------------------------------------------------------------
-// TStr::SubStr
-// ----------------------------------------------------------------------------
-//
-TPtrC TStr::SubStr( TInt aStartPos, TInt aEndPos )
-    {
-	return Mid( aStartPos, aEndPos - aStartPos + 1 );
-    }
-
-// ----------------------------------------------------------------------------
-// TStr::SubStrEx
-// ----------------------------------------------------------------------------
-//
-TPtrC TStr::SubStrEx( TInt aStartPos, TInt aEndPos )
-    {
-	return Mid( aStartPos + 1, aEndPos - aStartPos - 1 );
-    }
-
-// ----------------------------------------------------------------------------
-// TStr::LastPos
-// ----------------------------------------------------------------------------
-//
-TInt TStr::LastPos()
-    {
-	return iStr.Length() - 1;
-    }
-
-// ----------------------------------------------------------------------------
-// TStr::Len
-// ----------------------------------------------------------------------------
-//
-TInt TStr::Len()
-    {
-    return iStr.Length();
-    }
-
-// ----------------------------------------------------------------------------
-// TStr::Compare
-// ----------------------------------------------------------------------------
-//
-TBool TStr::Compare( TInt aPos, TChar aChar )
-    {
-	TInt len = iStr.Length();
-	if ( ( aPos < 0) || ( aPos >= len ) )
-	    {
-		return EFalse;
-	    }
-	TChar ch = iStr[aPos];
-	if ( ch == aChar )
-	    {
-		return ETrue;
-	    }
-	return EFalse;
-    }
-
-// ----------------------------------------------------------------------------
-// TStr::Find
-// ----------------------------------------------------------------------------
-//
-TInt TStr::Find(TInt aPos, TChar aChar)
-    {
-	TInt len = iStr.Length();
-	if ( (aPos < 0) || (aPos >= len) )
-	    {
-		return KErrNotFound;
-	    }
-	    
-	TPtrC ptr(iStr.Mid(aPos)); // move to possition aPos
-	return ptr.Locate(aChar);
-    }
 
 //*****************************************************************************
 //* class CIAUpdateFWActiveCaller
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -63,25 +63,11 @@
     {
     TInt err = RProperty::Delete(KPSUidNSmlDMSyncApp,KNSmlCurrentFotaUpdateAppName);
     delete iFotaModel;
-    delete iDMEngine;
+    delete iFWSyncAppEngine;
     }
 
 
 // -----------------------------------------------------------------------------
-//  CIAUpdateFWUpdateHandler::FirmWareUpdatewithNSU()
-// -----------------------------------------------------------------------------
-//      
-EXPORT_C void CIAUpdateFWUpdateHandler::FirmWareUpdatewithNSU()
-    {  
-    iRequest = ENSU;
-    iStatus = KRequestPending;
-    TRequestStatus* status = &iStatus;
-
-    SetActive();
-    User::RequestComplete( status, KErrNone );
-    }
-
-// -----------------------------------------------------------------------------
 //  CIAUpdateFWUpdateHandler::IsDMSupportAvailableL()
 // -----------------------------------------------------------------------------
 //
@@ -94,9 +80,9 @@
 //  CIAUpdateFWUpdateHandler::FirmWareUpdatewithFOTA()
 // -----------------------------------------------------------------------------
 //
-EXPORT_C void CIAUpdateFWUpdateHandler::FirmWareUpdatewithFOTA()
+EXPORT_C void CIAUpdateFWUpdateHandler::FirmWareUpdatewithFOTA( MIAUpdateFWUpdateObserver* aObserver )
     {
-    iRequest = EFOTA;
+    iObserver = aObserver;
     iStatus = KRequestPending;
     TRequestStatus* status = &iStatus;
 
@@ -122,7 +108,7 @@
 void CIAUpdateFWUpdateHandler::ConstructL()
     {
     iFotaModel = CIAUpdateFWFotaModel::NewL();    
-    iDMEngine = CIAUpdateFWSyncAppEngine::NewL( iFotaModel );
+    iFWSyncAppEngine = CIAUpdateFWSyncAppEngine::NewL( iFotaModel );
     }
 
 
@@ -132,70 +118,57 @@
 //
 void CIAUpdateFWUpdateHandler::RunL()
     {
-    switch ( iRequest )
-        {
-        case ENSU:
-            {          
-                      
-            break;
-            }
-        case EFOTA:
-            {
-            //check whether FOTA engine is available at the moment
-            TBool isDmActive = EFalse;
+    //check whether FOTA engine is available at the moment
+    TBool isDmActive = EFalse;
 
-            TInt fotamodelstate = iFotaModel->GetCurrentFwUpdState();
+    TInt fotamodelstate = iFotaModel->GetCurrentFwUpdState();
             
-            FLOG_NUM( "[IAUPDATEFW] fota status = %d", fotamodelstate );   
+    FLOG_NUM( "[IAUPDATEFW] fota status = %d", fotamodelstate );   
             
-            if ( fotamodelstate != RFotaEngineSession::EIdle )
-                { 
-                //if status is downloadcomplete or startingupdate
-                //still allow user to continue
-                if ( ( fotamodelstate != RFotaEngineSession::EDownloadComplete ) && ( fotamodelstate != RFotaEngineSession::EStartingUpdate ) )
-                    {
-		                //if download is suspended, try to resume it.
-		                if ( fotamodelstate == RFotaEngineSession::EDownloadProgressing)
-		                    {
-		                    TInt result = iFotaModel->TryResumeFwUpdDownload();
-						            FLOG_NUM( "[IAUPDATEFW] TryResumeFwUpdDownload result  = %d", result );   
-		                    }
-                    //anyway, DM is in use
-                    isDmActive = ETrue;
-                    }
-                }
-                     
-            if ( isDmActive )
+    if ( fotamodelstate != RFotaEngineSession::EIdle )
+        { 
+        //if status is downloadcomplete or startingupdate
+        //still allow user to continue
+        if ( ( fotamodelstate != RFotaEngineSession::EDownloadComplete ) && ( fotamodelstate != RFotaEngineSession::EStartingUpdate ) )
+            {
+            //if download is suspended, try to resume it.
+            if ( fotamodelstate == RFotaEngineSession::EDownloadProgressing)
                 {
-                FLOG( "[IAUPDATEFW] CIAUpdateFWUpdateHandler::RunL DM is activated" );   
-                return;
-                }
-            
-            TInt profileId( KErrNotFound );
-                 
-            profileId = iFotaModel->DefaultFotaProfileIdL();
-            
-            if (KErrNotFound != profileId)          
-                {               
-                // Define the key KNSmlCurrentFotaUpdateAppName
-                TInt err = RProperty::Define( KPSUidNSmlDMSyncApp,
-                                              KNSmlCurrentFotaUpdateAppName,
-                                              RProperty::EInt);
-                
-                RProperty::Set(KPSUidNSmlDMSyncApp,KNSmlCurrentFotaUpdateAppName,1 );
-                
-                iFotaModel->EnableFwUpdRequestL( profileId );
-                StartSyncL( profileId, EFalse );
-                }
-            else
-                {               
-                FLOG( "[IAUPDATEFW] CIAUpdateFWUpdateHandler::RunL no DM profile available!" );                      
-                }            
-            }  
-            break;
+	            TInt result = iFotaModel->TryResumeFwUpdDownload();
+	            FLOG_NUM( "[IAUPDATEFW] TryResumeFwUpdDownload result  = %d", result );   
+		        }
+            //anyway, DM is in use
+            isDmActive = ETrue;
             }
         }
-
+                
+    if ( isDmActive )
+        {
+        FLOG( "[IAUPDATEFW] CIAUpdateFWUpdateHandler::RunL DM is activated" );   
+        return;
+        }
+            
+    TInt profileId( KErrNotFound );
+                 
+    profileId = iFotaModel->DefaultFotaProfileIdL();
+            
+    if (KErrNotFound != profileId)          
+        {               
+        // Define the key KNSmlCurrentFotaUpdateAppName
+        TInt err = RProperty::Define( KPSUidNSmlDMSyncApp,
+                                      KNSmlCurrentFotaUpdateAppName,
+                                      RProperty::EInt);
+                
+        RProperty::Set(KPSUidNSmlDMSyncApp,KNSmlCurrentFotaUpdateAppName,1 );
+                
+        iFotaModel->EnableFwUpdRequestL( profileId );
+        StartSyncL( profileId, EFalse );
+        }
+    else
+        {               
+        FLOG( "[IAUPDATEFW] CIAUpdateFWUpdateHandler::RunL no DM profile available!" );                      
+        }            
+    }  
 
 // -----------------------------------------------------------------------------
 //  CIAUpdateFWUpdateHandler::DoCancel()
@@ -205,16 +178,7 @@
     {
     }
 
-
-// -----------------------------------------------------------------------------
-//  CIAUpdateFWUpdateHandler::ShowDialogL()
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateFWUpdateHandler::ShowDialogL(TDesC& /*aText*/, TDesC& /*aHeading*/ )
-    {  
-    
-    }
-        
+       
 
 // -----------------------------------------------------------------------------
 //  CIAUpdateFWUpdateHandler::StartSyncL()
@@ -225,7 +189,7 @@
     const TBool aUseFotaProgressNote ) // = EFalse
     {
     CIAUpdateFWSyncProfile* profile = 
-                iDMEngine->OpenProfileL( aProfileId, ESmlOpenReadWrite );
+            iFWSyncAppEngine->OpenProfileL( aProfileId, ESmlOpenReadWrite );
 
     TInt connectionBearer = profile->BearerType();
     
@@ -248,23 +212,12 @@
         profile->SaveL(); 
         }
              
-    iDMEngine->CloseProfile();      
-
-    TRAPD( error, iDMEngine->SynchronizeL( serverName, 
-                                           aProfileId, 
-                                           connectionBearer,
-                                           aUseFotaProgressNote ) );
-
-    if (error != KErrNone)
-        {
-
-        //CAknInformationNote* queryDialog = new (ELeave) CAknInformationNote;
-        
-        //HBufC* error = HBufC::NewL(20);
-        //          TPtr ptrerror = error->Des();
-        //          ptrerror.Copy(_L("sync problem")); 
-        //queryDialog->ExecuteLD( *error  );
-        }
+    iFWSyncAppEngine->CloseProfile();    
+    iFWSyncAppEngine->SetObserver( iObserver );
+    TRAP_IGNORE( iFWSyncAppEngine->SynchronizeL( serverName, 
+                                                 aProfileId, 
+                                                 connectionBearer,
+                                                 aUseFotaProgressNote ) );
     }
 
 //EOF
--- a/iaupdate/IAD/ui/iaupdate.pro	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/iaupdate.pro	Thu Oct 14 14:11:30 2010 +0300
@@ -24,6 +24,7 @@
     TARGET.CAPABILITY = CAP_APPLICATION TrustedUI PowerMgmt
     rssrules = "hidden = KAppIsHidden;"
     RSS_RULES += rssrules
+    SKINICON = qtg_large_swupdate
     TRANSLATIONS = swupdate.ts
 }
 
@@ -63,12 +64,13 @@
     iaupdateuicontroller.cpp \
     iaupdateuitimer.cpp \
     iaupdateserviceprovider.cpp \
-    iaupdatewaitdialog.cpp \
     iaupdatenodeid.cpp \
     iaupdatetools.cpp \
     iaupdatesettingdialog.cpp \
     iaupdateresultsdialog.cpp \
-    iaupdatedialogutil.cpp
+    iaupdatedialogutil.cpp \
+    iaupdateapplistmodel.cpp \
+    iaupdateapplistitem.cpp
 
     
 
@@ -76,8 +78,6 @@
     iaupdatemainwindow.h \
     iaupdatemainview.h \
     iaupdateengine.h \
-    iaupdatewaitdialog.h \
-    iaupdatewaitdialogobserver.h \
     iaupdateagreement.h \
     iaupdateautomaticcheck.h \
     iaupdatedeputils.h \
@@ -109,7 +109,9 @@
     iaupdatetools.h \
     iaupdatesettingdialog.h \
     iaupdateresultsdialog.h \ 
-    iaupdatedialogutil.h
+    iaupdatedialogutil.h \
+    iaupdateapplistmodel.h \
+    iaupdateapplistitem.h
 
 
 LIBS += -lbafl
--- a/iaupdate/IAD/ui/iaupdate.qrc	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/iaupdate.qrc	Thu Oct 14 14:11:30 2010 +0300
@@ -3,4 +3,8 @@
     <qresource prefix="/xml">
         <file>iaupdate_mainview.docml</file>
     </qresource>
+    <qresource prefix="/layout">
+        <file>iaupdateapplistitem.css</file>
+        <file>iaupdateapplistitem.widgetml</file>
+    </qresource>
 </RCC>
--- a/iaupdate/IAD/ui/iaupdate_mainview.docml	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/iaupdate_mainview.docml	Thu Oct 14 14:11:30 2010 +0300
@@ -1,33 +1,42 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<hbdocument version="0.4">
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.2">
     <object name="action" type="HbAction">
-        <string name="text" value="Start update"/>
+        <string locid="txt_software_button_update" name="text" value="Update"/>
     </object>
     <object name="action_1" type="HbAction">
-        <string name="text" value="Settings"/>
+        <string locid="txt_software_opt_settings" name="text" value="Settings"/>
     </object>
     <object name="action_2" type="HbAction">
-        <string name="text" value="Disclaimer"/>
+        <string locid="txt_software_opt_disclaimer" name="text" value="Disclaimer"/>
+    </object>
+    <object name="action_3" type="HbAction">
+        <string locid="txt_common_opt_cancel" name="text" value="Cancel"/>
+    </object>
+    <object name="action_4" type="HbAction">
+        <string locid="txt_software_opt_cancel_update" name="text" value="Cancel update"/>
     </object>
     <widget name="view" type="HbView">
         <widget name="content" role="HbView:widget" type="HbWidget">
             <widget name="listWidget" type="HbListWidget">
-                <sizehint height="16.41791091514448un" type="PREFERRED" width="38.80597125397785un"/>
+                <sizehint height="16.41791un" type="PREFERRED" width="38.80597un"/>
             </widget>
-            <zvalue value="0.0"/>
+            <real name="z" value="0"/>
             <layout orientation="Vertical" type="linear">
-                 <linearitem itemname="listWidget"/>
+                <linearitem itemname="listWidget"/>
             </layout>
         </widget>
         <widget name="viewMenu" role="HbView:menu" type="HbMenu">
-            <ref object="action" role="HbMenu:addAction"/>
-            <ref object="action_1" role="HbMenu:addAction"/>
-            <ref object="action_2" role="HbMenu:addAction"/>
+            <ref object="action_1" role="HbWidget:addAction"/>
+            <ref object="action_2" role="HbWidget:addAction"/>
+            <ref object="action_3" role="HbWidget:addAction"/>
+            <ref object="action_4" role="HbWidget:addAction"/>
         </widget>
         <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
-            <ref object="action" role="HbToolBar:addAction"/>
+            <ref object="action" role="HbWidget:addAction"/>
         </widget>
-        <string name="title" value="Software update"/>
+        <string locid="txt_software_title_software_update" name="title" value="Software update"/>
     </widget>
-    <metadata display="QHD portrait" unit="un"/>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
 </hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/iaupdateapplistitem.css	Thu Oct 14 14:11:30 2010 +0300
@@ -0,0 +1,8 @@
+
+IAUpdateAppListItem[layoutName="default"][progress] {
+	layout:iaupdate_progress;
+}
+
+IAUpdateAppListItem::progress {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/iaupdateapplistitem.widgetml	Thu Oct 14 14:11:30 2010 +0300
@@ -0,0 +1,29 @@
+<hbwidget version="0.1" type="listviewitem">
+  <layout name="iaupdate_progress" type="mesh">
+    <meshitem src="selection-icon" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)" />
+    <meshitem src="selection-icon" srcEdge="CENTERV" dst="text-1" dstEdge="CENTERV" />
+      
+    <meshitem src="icon-1" srcEdge="LEFT" dst="selection-icon" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-left)" />
+    <meshitem src="icon-1" srcEdge="TOP" dst="text-1" dstEdge="TOP" />
+      
+    <meshitem src="text-1" srcEdge="LEFT" dst="icon-1" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />
+    <meshitem src="text-1" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-top)"/>
+    <meshitem src="text-1" srcEdge="RIGHT" dst="icon-2" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
+    <meshitem src="text-1" srcEdge="BOTTOM" dst="progress" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" />
+      
+    <meshitem src="progress" srcEdge="LEFT" dst="text-1" dstEdge="LEFT" />
+    <meshitem src="progress" srcEdge="RIGHT" dst="text-3" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
+    <meshitem src="progress" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-bottom)" />
+      
+    <meshitem src="icon-2" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" />
+    <meshitem src="icon-2" srcEdge="CENTERV" dst="text-1" dstEdge="CENTERV" />
+      
+    <meshitem src="text-3" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" />
+    <meshitem src="text-3" srcEdge="BOTTOM" dst="progress" dstEdge="BOTTOM" spacing="0.0un" />
+      
+    <meshitem src="multiselection-toucharea" srcEdge="CENTERH" dst="selection-icon" dstEdge="CENTERH" />
+    <meshitem src="multiselection-toucharea" srcEdge="TOP" dst="" dstEdge="TOP" />
+    <meshitem src="multiselection-toucharea" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+  </layout>
+
+</hbwidget>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/inc/iaupdateapplistitem.h	Thu Oct 14 14:11:30 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   This file contains the header file of the IAUpdateAppListItem
+*                class 
+*
+*/
+
+#ifndef IAUPDATEAPPLISTITEM_H_
+#define IAUPDATEAPPLISTITEM_H_
+
+
+#include <hblistviewitem.h>
+class HbProgressBar;
+
+class IAUpdateAppListItem : public HbListViewItem
+{
+    Q_OBJECT
+   
+public:
+    IAUpdateAppListItem(QGraphicsItem * parent = 0);
+    ~IAUpdateAppListItem();
+    
+    HbAbstractViewItem * createItem();
+    
+    void updateChildItems();
+    
+    void polish(HbStyleParameters& params);
+
+private:
+    HbProgressBar* mProgressBar;
+    bool mIsProgress;
+    bool mSecondaryTextVisible;
+};
+
+#endif /* IAUPDATEAPPLISTITEM_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/inc/iaupdateapplistmodel.h	Thu Oct 14 14:11:30 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   This file contains the header file of the IAUpdateAppListModel
+*                class 
+*
+*/
+
+#ifndef IAUPDATEAPPLISTMODEL_H_
+#define IAUPDATEAPPLISTMODEL_H_
+
+
+#include <QAbstractListModel>
+#include <QObject>
+
+#include "iaupdatenode.h"
+class MIAUpdateFwNode;
+
+class IAUpdateAppListModel : public QAbstractListModel
+{
+    Q_OBJECT 
+    
+public:
+    
+    enum ItemRole
+    {
+        ProgressRole = Qt::UserRole + 1,
+        ProgressValueRole
+    };
+    
+    IAUpdateAppListModel();
+    QVariant data (const QModelIndex &index, int role = Qt::DisplayRole ) const;
+    int  rowCount (const QModelIndex &parent=QModelIndex()) const;
+    void setNodeArray(const RPointerArray<MIAUpdateNode> &nodes);   
+    //void setFwNodeArray(const RPointerArray<MIAUpdateFwNode> &fwNodes);
+    void setFwNode(MIAUpdateFwNode *fwNode);
+    void refresh();
+    void refreshProgress();
+    
+private: 
+    bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
+    void setImportance(MIAUpdateAnyNode *node, QString &importanceDescription) const;
+   
+private:
+    RPointerArray<MIAUpdateNode> mNodes;
+    //RPointerArray<MIAUpdateFwNode> mFwNodes;
+    MIAUpdateFwNode *mFwNode;
+    
+    int mRefreshedCount;
+};
+
+#endif /* IAUPDATEAPPLISTMODEL_H_ */
--- a/iaupdate/IAD/ui/inc/iaupdateengine.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdateengine.h	Thu Oct 14 14:11:30 2010 +0300
@@ -24,6 +24,7 @@
 #include "iaupdateuidefines.h"
 #include "iaupdateuicontrollerobserver.h"
 #include "iaupdatenode.h"
+#include "iaupdatefwupdateobserver.h"
 
 class IAUpdateServiceProvider;
 class CIAUpdateUiController;
@@ -40,7 +41,8 @@
 class IAUpdateResultsDialog;
 
 class IAUpdateEngine : public QObject,
-                       public MIAUpdateUiControllerObserver
+                       public MIAUpdateUiControllerObserver,
+                       public MIAUpdateFWUpdateObserver
     {
     Q_OBJECT
 
@@ -104,7 +106,9 @@
       * @param True value if client application is in background
       */
       bool ClientInBackgroundL() const;
-    
+  
+     CIAUpdateUiController* Controller() const;
+ 
 signals:
     void toMainView();
     
@@ -116,6 +120,12 @@
                  const RPointerArray<MIAUpdateFwNode>& fwNodes,
                  int error);
     
+    void refreshProgress();
+    
+    void setUpdatesRefreshing(bool refreshingUpdates);
+    
+    void updateCompleted();
+    
 
 public slots:    
     void handleAllClientsClosed();    
@@ -157,6 +167,15 @@
     * @param aError Error code
     */
     void RefreshUI();
+    
+    /**
+    Called when UI to be redrawn during update process
+    *
+    * @param aError Error code
+    */
+    void RefreshUIProgress();
+    
+    void SetUpdatesRefreshing( TBool aRefreshing );
             
     /**
     * Called when async update list refresh is completed
@@ -172,6 +191,12 @@
     */     
     void UpdateCompleteL( TInt aError );
     
+private: // From MIAUpdateFWUpdateObserver     
+    
+    void PreparingStarted();
+    
+    void Prepared();
+    
 private:  //new methods
 
     /**
--- a/iaupdate/IAD/ui/inc/iaupdatemainview.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdatemainview.h	Thu Oct 14 14:11:30 2010 +0300
@@ -27,7 +27,8 @@
 #include "iaupdatebasenode.h"
 
 
-class HbListWidget;
+//class HbListWidget;
+class HbListView;
 class HbAction;
 class HbAbstractViewItem;
 class HbGroupBox;
@@ -36,6 +37,8 @@
 class IAUpdateDialogUtil;
 class TIAUpdateVersion;
 class HbTranslator;
+class HbIconItem;
+class HbLabel;
 
 
 class IAUpdateMainView : public HbView
@@ -49,6 +52,11 @@
     void refresh(const RPointerArray<MIAUpdateNode> &nodes,
                  const RPointerArray<MIAUpdateFwNode> &fwNodes,
                  int error);
+    void refreshProgress();
+    void startRefreshingAnimation();
+    void stopRefreshingAnimation();
+    void updateCompleted();
+    
 signals:
     void toSettingView();
     
@@ -59,6 +67,10 @@
  
     void handleDisclaimer();
     
+    void handleCancelRefresh();
+    
+    void handleCancelUpdate();
+    
     void handleDetails(HbAbstractViewItem *, const QPointF &);
     
     void handleFotaDetails(HbAbstractViewItem *, const QPointF &); 
@@ -84,13 +96,13 @@
     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 refreshNsuUpdate(MIAUpdateFwNode& fwNode);
     void refreshApplicationUpdates(const RPointerArray<MIAUpdateNode> &nodes);
     void updateSelectionInfoInDock();
+    int countOfSelections() const;
     
 private:
     enum DialogState
@@ -104,8 +116,10 @@
     IAUpdateEngine *mEngine;
     IAUpdateDialogUtil *mDialogUtil;
     HbWidget *mContent;
-    HbListWidget *mListView;
-    HbListWidget *mFwListView;
+    //HbListWidget *mListView;
+    HbListView *mListView;
+    //HbListWidget *mFwListView;
+    HbListView *mFwListView;
     HbGroupBox *mApplicationUpdatesGroupBox;
     HbGroupBox *mFwNSUGroupBox;
     HbDataForm *mContentDataForm;
@@ -118,7 +132,15 @@
     bool mMark;
     bool mSelectionUpdate;
     bool mSelectionConnect;
+    bool mUpdating;
     HbTranslator *mTranslator;
+    HbIconItem *mAnimationIconItem;
+    HbLabel *mLabel;
+    HbAction *mActionStartUpdate;
+    HbAction *mActionSettings;
+    HbAction *mActionDisclaimer;
+    HbAction *mActionCancelRefresh;
+    HbAction *mActionCancelUpdate;
 
 };
 
--- a/iaupdate/IAD/ui/inc/iaupdatemainwindow.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdatemainwindow.h	Thu Oct 14 14:11:30 2010 +0300
@@ -46,6 +46,9 @@
     void refreshMainView(const RPointerArray<MIAUpdateNode>& nodes,
                          const RPointerArray<MIAUpdateFwNode>& fwNodes,
                          int error);
+    void refreshMainViewProgress();
+    void setRefreshingAnimation(bool animation);
+    void updateCompleted();
     void toSettingView();
 
 private:
--- a/iaupdate/IAD/ui/inc/iaupdateuicontroller.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdateuicontroller.h	Thu Oct 14 14:11:30 2010 +0300
@@ -27,7 +27,6 @@
 #include "iaupdatecontroller.h"
 #include "iaupdatecontrollerobserver.h"
 #include "iaupdatenodeobserver.h"
-#include "iaupdatewaitdialogobserver.h"
 #include "iaupdatedialogobserver.h"
 #include "iaupdatestarterobserver.h"
 #include "iaupdateroaminghandlerobserver.h"
@@ -37,8 +36,6 @@
 #include "iaupdateanynode.h"
 
 // FORWARD DECLARATIONS
-class CIAUpdateWaitDialog;
-class CIAUpdateProgressDialog;
 class CIAUpdateNodeFilter;
 class CIAUpdateStarter;
 class CIAUpdateControllerFile;
@@ -48,7 +45,6 @@
 class MIAUpdateUiControllerObserver;
 class MIAUpdateHistory;
 class MIAUpdateFwNode;
-class IAUpdateWaitDialog;
 class IAUpdateDialogUtil;
 
 class QString;
@@ -66,7 +62,6 @@
     public CBase, 
     public MIAUpdateControllerObserver,
     public MIAUpdateNodeObserver,
-    public MIAUpdateWaitDialogObserver,
     public MIAUpdateStarterObserver,
     public MIAUpdateRoamingHandlerObserver,
     public MIAUpdateRefreshObserver,
@@ -161,6 +156,12 @@
         IAUpdateUiDefines::TIAUpdateUiRequestType aRequestType );
 
     /**
+    * Handles user cancel
+    */    
+    void HandleUserCancelL();
+    
+    
+    /**
      * Cancel ongoing async operation
      **/
     void CancelOperation();
@@ -333,14 +334,7 @@
       * Called when roaming handler is prepared
       */
      void RoamingHandlerPrepared();
-  
-        
-private: // From MIAUpdateWaitDialogObserver    
-    
-    /**
-     * This is called when the dialog is  closed.
-     */
-     void HandleWaitDialogCancel();   
+ 
      
 private: // From IAUpdateDialogObserver     
          
@@ -428,55 +422,7 @@
      * @param aPtr Pointer to this instance
      */
     static TInt CheckUpdatesDeferredCallbackL( TAny* aPtr );
-                       
-    /**
-     * Shows waiting/progress dialog during update process.
-     *
-     * @param aTextResourceId Resource id of text (Downloading or Installing)
-     * @param aName           Name of update
-     * @param aNumber         Counter of current update
-     * @param aTotalCount     Total count of updates to be updated
-     */                   
-    void ShowUpdatingDialogL( TInt aTextResourceId,
-                              const TDesC& aName,
-                              TInt aNumber,
-                              TInt aTotalCount );  
-     
-    /**
-     * Shows waiting dialog during update process.
-     *
-     * @param aDisplayString       A string to be displayed
-     * @param aVisibilityDelayOff  ETrue if visibility delay is off
-     */                  
-    void ShowWaitDialogL( const QString& aDisplayString, 
-                          TBool aVisibilityDelayOff ); 
-    
-    /**
-     * Shows progress dialog during update process.
-     *
-     * @param aDisplayString       A string to be displayed
-     * @param aVisibilityDelayOff  ETrue if visibility delay is off
-     */  
-    void ShowProgressDialogL( const TDesC& aDisplayString, 
-                              TBool aVisibilityDelayOff ); 
-    
-    /**
-     * Removes all possible existing update flow dialogs.
-     * This method is a general way to handle removal of 
-     * wait or progress dialogs.
-     */
-    void RemoveUpdatingDialogsL();
-    
-    /**
-     * Removes waiting dialog.
-     */ 
-    void RemoveWaitDialogL();
-    
-    /**
-     * Removes progress dialog.
-     */ 
-    void RemoveProgressDialogL();
-    
+            
     /**
      * Checks if refreshing of update list allowed from a network
      * @return ETrue if network refresh allowed
@@ -520,12 +466,7 @@
      * @param aErrorCode Error code that self updater has failed with.
      */
     void UpdateFailedSelfUpdaterInfoToPurchaseHistoryL( TInt aErrorCode );
-    
-   /**
-     * Handles user cancel
-     */    
-    void HandleUserCancelL();
-
+  
     /**
      * @return TBool ETrue if IAD has been started right after
      * the self update. In other words, self update related data
@@ -586,11 +527,7 @@
     RPointerArray<MIAUpdateNode> iServicePackNodes;
     
     IAUpdateDialogUtil *mDialogUtil;  
- 
-    IAUpdateWaitDialog *mWaitDialog;
-    
-    CIAUpdateProgressDialog* iProgressDialog;
-    
+            
     CIAUpdateStarter* iStarter;
     
     CIAUpdateRoamingHandler* iRoamingHandler;
--- a/iaupdate/IAD/ui/inc/iaupdateuicontrollerobserver.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdateuicontrollerobserver.h	Thu Oct 14 14:11:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -56,6 +56,15 @@
     virtual void RefreshUI() = 0;
     
     /**
+     Called when UI to be redrawn during update process
+     *
+     * @param aError Error code
+     */
+    virtual void RefreshUIProgress() = 0;
+    
+    virtual void SetUpdatesRefreshing( TBool aRefreshing ) = 0;
+    
+    /**
     * Called when async update list refresh is completed
     *
     * @param aError Error code
--- a/iaupdate/IAD/ui/inc/iaupdateuids.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/inc/iaupdateuids.h	Thu Oct 14 14:11:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
--- a/iaupdate/IAD/ui/inc/iaupdatewaitdialog.h	Tue Sep 28 14:48:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This file contains the header file of the IAUpdateWaitDialog class.
-*
-*/
-
-
-
-#ifndef IAUPDATEWAITDIALOG_H
-#define IAUPDATEWAITDIALOG_H
-
-// INCLUDES
-#include <QObject>
-
-#include "iaupdatewaitdialog.h"
-
-
-// FORWARD DECLARATIONS
-class HbProgressDialog;
-class MIAUpdateWaitDialogObserver;
-
-// CLASS DECLARATION
-
-/**
-* Wait dialog for IA Update client
-*/
-class IAUpdateWaitDialog : public QObject
-{
-    Q_OBJECT
-
-public: // Constructors and destructor
-
-    /**
-    * Constructor
-    */
-    IAUpdateWaitDialog();
-
-    ~IAUpdateWaitDialog();
-
-public:  // New functions
-    
-    int showDialog(const QString& text);
-        
-    void SetCallback(MIAUpdateWaitDialogObserver* callback );  
-    
-    void close();
-    
-public slots:
-
-    void dialogCancelled();
-
-private: //data
-    
-    HbProgressDialog *mWaitDialog;
-    MIAUpdateWaitDialogObserver *mCallback;        
-};
-
-
-#endif // IAUPDATEWAITDIALOG_H
-
-// End of file
--- a/iaupdate/IAD/ui/inc/iaupdatewaitdialogobserver.h	Tue Sep 28 14:48:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This file contains the header file of the 
-*                MIAUpdateWaitDialogObserver class.
-*
-*/
-
-
-
-#ifndef IAUPDATE_WAITDIALOG_OBSERVER_H
-#define IAUPDATE_WAITDIALOG_OBSERVER_H
-
-//  INCLUDES
-#include <e32base.h>
-
-
-//  CLASS DECLARATIONS
-
-/**
-* A callback interface for handling common non modal dialog cancellation.
-* 
-*/
-class MIAUpdateWaitDialogObserver
-    {
-    public:
-        
-    /**
-    * This is called when the dialog is cancelled
-    */
-    virtual void HandleWaitDialogCancel() = 0;    
-    };
-
-
-#endif // IAUPDATE_WAITDIALOG_OBSERVER_H
-            
-// End of File
--- a/iaupdate/IAD/ui/src/iaupdateapplication.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateapplication.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -40,6 +40,12 @@
     connect(&(*mainView), SIGNAL(toSettingView()), &(*mMainWindow), SLOT(toSettingView()));
     connect(&(*mEngine), SIGNAL(refresh(const RPointerArray<MIAUpdateNode>&, const RPointerArray<MIAUpdateFwNode>&,int)),
             &(*mMainWindow), SLOT(refreshMainView(const RPointerArray<MIAUpdateNode>&, const RPointerArray<MIAUpdateFwNode>&,int)));
+    connect(&(*mEngine), SIGNAL(refreshProgress()),
+            &(*mMainWindow), SLOT(refreshMainViewProgress()));
+    connect(&(*mEngine), SIGNAL(setUpdatesRefreshing(bool)),
+            &(*mMainWindow), SLOT(setRefreshingAnimation(bool)));
+    connect(&(*mEngine), SIGNAL(updateCompleted()),
+            &(*mMainWindow), SLOT(updateCompleted()));
     }
 
 IAUpdateApplication::~IAUpdateApplication()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/src/iaupdateapplistitem.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -0,0 +1,109 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   This module contains the implementation of IAUpdateAppListItem
+*                class member functions.
+*
+*/
+#include <HbProgressBar>
+
+#include "iaupdateapplistitem.h"
+#include "iaupdateapplistmodel.h"
+#include "iaupdatedebug.h"
+
+IAUpdateAppListItem::IAUpdateAppListItem(QGraphicsItem * parent) :
+  HbListViewItem(parent)
+{
+    mProgressBar = NULL;   
+    mIsProgress = false;
+    mSecondaryTextVisible = true;
+}
+
+IAUpdateAppListItem::~IAUpdateAppListItem() 
+{
+}
+
+HbAbstractViewItem * IAUpdateAppListItem::createItem()
+{
+    return new IAUpdateAppListItem(*this);
+}
+
+
+void IAUpdateAppListItem::updateChildItems()
+{
+    HbListViewItem::updateChildItems();
+    
+    mIsProgress = modelIndex().data(IAUpdateAppListModel::ProgressRole).toBool();
+    if (mIsProgress)
+    {  // progress state
+        if (mSecondaryTextVisible)
+            {
+            foreach (QGraphicsItem * item, childItems()) 
+                {
+                    if (HbStyle::itemName(item) == "text-2")     
+                    {
+                        item->setVisible(false);
+                        mSecondaryTextVisible = false;
+                        break;
+                    }
+                }
+            }
+        if (!mProgressBar)
+        {
+            mProgressBar = new HbProgressBar(this);
+            mProgressBar->setRange(0, 100);
+            HbStyle::setItemName(mProgressBar, "progress");
+        }
+        if (!mProgressBar->isVisible())
+        {
+            HbStyle::setItemName(mProgressBar, "progress");
+            mProgressBar->setVisible(true);
+        }
+        QList<QVariant> list = modelIndex().data(IAUpdateAppListModel::ProgressValueRole).toList();
+        int value = list.at(0).toInt();
+        int total = list.at(1).toInt();
+        mProgressBar->setRange(0,total);
+        mProgressBar->setProgressValue(value);
+    }
+    else
+    {  //normal state
+        if (mProgressBar)
+        {
+            if (mProgressBar->isVisible()) 
+            { 
+                HbStyle::setItemName(mProgressBar, "");
+                mProgressBar->setVisible(false);
+            }    
+            if (!mSecondaryTextVisible)
+            {    
+                foreach (QGraphicsItem * item, childItems()) 
+                {
+                    if (HbStyle::itemName(item) == "text-2") 
+                    {
+                        item->setVisible(true);
+                        mSecondaryTextVisible = true;
+                        break;
+                    }
+                }    
+            }
+        }
+    }
+}
+
+
+void IAUpdateAppListItem::polish(HbStyleParameters& params)
+{       
+    HbListViewItem::setProperty("progress", mIsProgress);
+    HbListViewItem::polish(params);   
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/ui/src/iaupdateapplistmodel.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -0,0 +1,297 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   This module contains the implementation of IAUpdateAppListModel
+*                class member functions.
+*
+*/
+
+#include <QStringList>
+#include <hbtranslator.h>
+#include <xqconversions.h>
+
+#include "iaupdateapplistmodel.h"
+#include "iaupdatefwnode.h"
+#include "iaupdatebasenode.h"
+#include "iaupdatedebug.h"
+
+
+const int KKiloByte = 1024;
+const int KMegaByte = 1024 * 1024;
+const int KMaxShownInKiloBytes = 10 * KMegaByte;
+
+IAUpdateAppListModel::IAUpdateAppListModel() :
+QAbstractListModel()
+{
+    mRefreshedCount = 0;
+    mFwNode = NULL;    
+}
+
+
+QVariant IAUpdateAppListModel::data(const QModelIndex &index, int role) const
+{
+    if (index.row() < rowCount())
+    {    
+        if (role == Qt::DisplayRole) 
+        {
+            QString name;
+            QString importanceDescription;
+            if (mFwNode)
+            {
+                MIAUpdateFwNode::TUIUpdateState fwUiState = mFwNode->UiState();
+                if (fwUiState == MIAUpdateFwNode::EPreparing)
+                {
+                    name = QString("Preparing ");
+                }
+                else
+                {
+                    name = XQConversions::s60DescToQString(mFwNode->Base().Name());
+                    name.append(" DEVICE SOFTWARE");
+                }
+                setImportance(mFwNode,importanceDescription);
+            }
+            else
+            {     
+                MIAUpdateNode *node = mNodes[index.row()];
+     
+                MIAUpdateNode::TUIUpdateState uiState = node->UiState();
+   
+            
+                if (uiState == MIAUpdateNode::EDownloading)
+                {
+                    name = QString("Downloading ");
+                }
+                else if (uiState == MIAUpdateNode::EInstalling)
+                {
+                    name = QString("Installing ");
+                }
+                name.append(XQConversions::s60DescToQString(node->Base().Name()));
+                        
+            
+                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";
+                }
+            }            
+            QStringList stringList;
+            stringList << name << importanceDescription;
+            return stringList;
+        }
+        else if (role == ProgressRole)
+        {
+            if (mFwNode)
+            {
+                return (mFwNode->UiState() == MIAUpdateFwNode::EPreparing);
+            }
+            else
+            {    
+                return (mNodes[index.row()]->UiState() == MIAUpdateNode::EDownloading || 
+                        mNodes[index.row()]->UiState() == MIAUpdateNode::EInstalling);
+            }
+        }
+        else if (role == ProgressValueRole)
+        {
+            QList<QVariant> list;
+            if (mFwNode)
+            {
+                list << 0 << 0;   
+            }
+            else
+            {    
+                list << mNodes[index.row()]->Progress() << mNodes[index.row()]->Total();
+            }
+            return list;
+        }
+    }    
+    return QVariant();
+}
+
+
+int IAUpdateAppListModel::rowCount(const QModelIndex &parent) const
+{
+    Q_UNUSED(parent)
+    int nodeCount = mNodes.Count();
+    if (nodeCount == 0 && mFwNode)
+    {
+        nodeCount = 1;
+    }        
+    return nodeCount;
+}
+
+void IAUpdateAppListModel::setNodeArray(const RPointerArray<MIAUpdateNode> &nodes)
+{
+    mNodes = nodes;    
+}
+
+
+
+void IAUpdateAppListModel::setFwNode(MIAUpdateFwNode *fwNode)
+{
+    mFwNode = fwNode;
+}
+
+bool IAUpdateAppListModel::removeRows(int row, int count, const QModelIndex &parent)
+{
+    int lastRow = row + count - 1;
+       
+    for (int i = lastRow; i >= row; --i) 
+    {
+        beginRemoveRows(parent, i, i);
+        endRemoveRows();
+    }
+    return true;
+}
+
+void IAUpdateAppListModel::refresh()
+{
+    if (!mFwNode)
+    {
+        if (mRefreshedCount > mNodes.Count())
+        {
+            removeRows(mNodes.Count(), mRefreshedCount - mNodes.Count());   
+        }
+    }
+    emit dataChanged(index(0,0),index(rowCount() -1, 0));
+    mRefreshedCount = mNodes.Count();
+}
+
+void IAUpdateAppListModel::refreshProgress()
+{
+    emit layoutChanged();
+    emit dataChanged(index(0,0), index(0,0));    
+}
+
+
+void IAUpdateAppListModel::setImportance(MIAUpdateAnyNode *node, QString &importanceDescription) const
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateAppListModel::setImportance() begin");
+    int sizeInBytes = node->Base().ContentSizeL();
+    int size = 0;
+    bool shownInMegabytes = false;        
+    if (sizeInBytes >= KMaxShownInKiloBytes)
+    {
+        shownInMegabytes = true;
+        size = sizeInBytes / KMegaByte;
+        if (sizeInBytes % KMegaByte != 0)
+        {
+           size++;
+        }
+    }
+    else 
+    {
+        size = sizeInBytes / KKiloByte;
+        if (sizeInBytes % KKiloByte != 0)
+        {
+            size++;
+        }  
+    }
+    QString sizeString;
+    sizeString.setNum(size);     
+    switch(node->Base().Importance())
+    {        
+        case MIAUpdateBaseNode::EMandatory:
+        {
+            if (shownInMegabytes)
+            {
+                importanceDescription = 
+                    hbTrId("txt_software_dblist_update_1_val_required_mb").arg(size);
+            }
+            else 
+            {
+                importanceDescription = 
+                    hbTrId("txt_software_dblist_update_1_val_required_kb").arg(size);
+            }  
+            break;
+        }
+                
+        case MIAUpdateBaseNode::ECritical:
+        {
+            bool isNSU = false;
+            if(node->NodeType() == MIAUpdateAnyNode::ENodeTypeFw)
+            {
+                MIAUpdateFwNode *fwnode = static_cast<MIAUpdateFwNode*>(node);          
+                if (fwnode->FwType() == MIAUpdateFwNode::EFotiNsu)
+                {
+                   isNSU = true;
+                }
+            }
+            if (!size || isNSU)
+            {
+                //for firmware when size info is not provided by server
+            }
+            else
+            {
+                if (shownInMegabytes)
+                {
+                    
+                    importanceDescription = 
+                       hbTrId("txt_software_dblist_update_1_val_important_mb").arg(size);
+                }
+                else 
+                {
+                    importanceDescription =
+                        hbTrId("txt_software_dblist_update_1_val_important_kb").arg(size);
+                } 
+            }
+            break;
+        }
+            
+        case MIAUpdateBaseNode::ERecommended:
+        {
+            if (shownInMegabytes)
+            {
+                importanceDescription = 
+                    hbTrId("txt_software_dblist_update_1_val_recommended_mb").arg(size);
+            }
+            else 
+            {
+                importanceDescription = 
+                   hbTrId("txt_software_dblist_update_1_val_recommended_kb").arg(size);
+            }  
+            break;
+        }
+            
+        case MIAUpdateBaseNode::ENormal:
+        {
+            if (shownInMegabytes)
+            {
+                importanceDescription = 
+                   hbTrId("txt_software_dblist_update_1_val_optional_mb").arg(size);
+            }
+            else 
+            {
+                importanceDescription = 
+                    hbTrId("txt_software_dblist_update_1_val_optional_kb").arg(size);
+            }  
+            break;
+        }
+
+        default:
+        {
+            break;
+        }
+    }
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::setImportance() end");
+}    
--- a/iaupdate/IAD/ui/src/iaupdateautomaticcheck.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateautomaticcheck.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -111,10 +111,14 @@
 	        if ( mDialogUtil )
 	            {
 	            mPrimaryAction = NULL;
-	            mPrimaryAction = new HbAction("Yes");
+	            mPrimaryAction = new HbAction(hbTrId("txt_common_button_yes"));
 	            HbAction *secondaryAction = NULL;
-	            secondaryAction = new HbAction("No");
-	            mDialogUtil->showQuestion(QString("Turn on setting for Automatic update checks?"), mPrimaryAction, secondaryAction);
+	            secondaryAction = new HbAction(hbTrId("txt_common_button_no"));
+	            mDialogUtil->showQuestion(
+	                hbTrId("txt_software_info_allow_automatic_update_checks"),
+	                mPrimaryAction,
+	                secondaryAction);
+	                
 	            }
  	        }
 	    }
--- a/iaupdate/IAD/ui/src/iaupdatedialogutil.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatedialogutil.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -17,6 +17,7 @@
 */
 #include <hblabel.h>
 #include <hbmessagebox.h>
+#include <hbstringutil.h>
 
 #include "iaupdatedialogutil.h"
 #include "iaupdatedialogobserver.h"
@@ -84,11 +85,16 @@
 {
     HbMessageBox *agreementDialog = new HbMessageBox(HbMessageBox::MessageTypeQuestion); 
     HbLabel *label = new HbLabel(agreementDialog);
-    label->setHtml(QString("Disclaimer"));
+    label->setHtml(hbTrId("txt_software_title_disclaimer"));
     agreementDialog->setHeadingWidget(label);
     agreementDialog->setIconVisible(false);
-    agreementDialog->setText("This application allows you to download and use applications and services provided by Nokia or third parties. Service Terms and Privacy Policy will apply. Nokia will not assume any liability or responsibility for the availability or third party applications or services. Before using the third party application or service, read the applicable terms of use.<br /><br />Use of this application involves transmission of data. Contact your network service provider for information about data transmission charges.<br /><br />(c) 2007-2010 Nokia. All rights reserved.");
-
+    agreementDialog->setText(hbTrId("txt_software_info_this_application_allows_you_to_d").arg(2007).arg(2010));
+    // TODO: when textmap contains %1, change to:
+    /*
+    agreementDialog->
+        setText(hbTrId("txt_software_info_this_application_allows_you_to_d").
+                arg(HbStringUtil::convertDigits("2007")).arg(HbStringUtil::convertDigits("2007")));
+    */
     int actionCount = agreementDialog->actions().count();
     for (int i=actionCount-1; i >= 0; i--)
     { 
--- a/iaupdate/IAD/ui/src/iaupdateengine.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateengine.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -74,6 +74,11 @@
     {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::~IAUpdateEngine() begin");
     InformRequestObserver(KErrCancel);
+    if (iController)
+        {
+        delete iController;
+        }
+    
     if (iIdle)
         {
         delete iIdle;
@@ -90,10 +95,7 @@
         {
         delete iAutomaticCheck;
         }
-    if (iController)
-        {
-        delete iController;
-        }
+    
     if (iFwUpdateHandler)
         {
         delete iFwUpdateHandler;
@@ -255,11 +257,11 @@
         {
         if (!iFwUpdateHandler)
             {
-            TRAP_IGNORE( CIAUpdateFWUpdateHandler::NewL() );
+            TRAP_IGNORE(CIAUpdateFWUpdateHandler::NewL());
             }
         if (iFwUpdateHandler)
             {
-            iFwUpdateHandler->FirmWareUpdatewithFOTA();
+            iFwUpdateHandler->FirmWareUpdatewithFOTA(this);
             }
         }
     else
@@ -289,6 +291,7 @@
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartUpdate() end");
     }
 
+
 // -----------------------------------------------------------------------------
 // IAUpdateEngine::SetVisibleL
 // 
@@ -355,6 +358,20 @@
     }
 
 // -----------------------------------------------------------------------------
+// IAUpdateEngine::Controller()
+// 
+// -----------------------------------------------------------------------------
+//      
+CIAUpdateUiController* IAUpdateEngine::Controller() const
+    {
+    return iController;
+    }
+
+
+
+
+
+// -----------------------------------------------------------------------------
 // IAUpdateEngine::handleAllClientsClosed()
 // 
 // -----------------------------------------------------------------------------
@@ -556,6 +573,26 @@
     }
 
 // -----------------------------------------------------------------------------
+// IAUpdateEngine::RefreshUIProgress
+// 
+// -----------------------------------------------------------------------------
+//
+void IAUpdateEngine::RefreshUIProgress()
+    {
+    emit refreshProgress();
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::SetUpdatesRefreshing
+// 
+// -----------------------------------------------------------------------------
+//
+void IAUpdateEngine::SetUpdatesRefreshing( TBool aRefreshing )
+    {
+    emit setUpdatesRefreshing(aRefreshing);
+    }
+
+// -----------------------------------------------------------------------------
 // IAUpdateEngine::RefreshCompleteL
 // 
 // -----------------------------------------------------------------------------
@@ -576,11 +613,6 @@
     else
         {
         emit refresh(iController->Nodes(), iController->FwNodes(), aError);
-        
-        // inform bgchecker to clear indicator menu
-        User::LeaveIfError( 
-                RProperty::Set(KPSUidBgc, KIAUpdateBGNotifyIndicatorRemove, 0) );
-        
         //if ( aWithViewActivation)
         //  {
         //  ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
@@ -623,12 +655,33 @@
         InformRequestObserver(aError);
         }
 
+    emit updateCompleted();
     ShowResultsDialogL();
 
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateCompleteL end");
     }
 
 // -----------------------------------------------------------------------------
+// IAUpdateEngine::PreparingStarted
+// 
+// -----------------------------------------------------------------------------
+//
+void IAUpdateEngine::PreparingStarted()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// IAUpdateEngine::Prepared
+// 
+// -----------------------------------------------------------------------------
+//
+void IAUpdateEngine::Prepared()
+    {
+    emit updateCompleted();
+    }
+
+// -----------------------------------------------------------------------------
 // IAUpdateEngine::ShowResultsDialogL
 // 
 // -----------------------------------------------------------------------------
@@ -657,16 +710,17 @@
 
     HbMessageBox *messageBox = new HbMessageBox(
             HbMessageBox::MessageTypeQuestion);
-    messageBox->setText(QString("Phone restart needed. Restart now?"));
+    messageBox->setText
+        (hbTrId("txt_software_info_device_restart_is_needed_restar"));
     int actionCount = messageBox->actions().count();
     for (int i = actionCount - 1; i >= 0; i--)
         {
         messageBox->removeAction(messageBox->actions().at(i));
         }
     mPrimaryAction = NULL;
-    mPrimaryAction = new HbAction("Ok");
+    mPrimaryAction = new HbAction(hbTrId("txt_common_button_ok"));
     HbAction *secondaryAction = NULL;
-    secondaryAction = new HbAction("Cancel");
+    secondaryAction = new HbAction(hbTrId("txt_common_button_cancel"));
 
     messageBox->addAction(mPrimaryAction);
     messageBox->addAction(secondaryAction);
--- a/iaupdate/IAD/ui/src/iaupdatemainview.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatemainview.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -21,9 +21,10 @@
 #include <QGraphicsLayout>
 #include <QGraphicsLayoutItem>
 #include <QGraphicsLinearLayout>
+#include <QSizeF>
 
 #include <hbdockwidget.h>
-#include <hblistwidget.h>
+#include <HbListView>
 #include <hblistviewitem.h>
 #include <hblistwidgetitem.h>
 #include <hbtoolbar.h>
@@ -33,8 +34,14 @@
 #include <hbmessagebox.h>
 #include <hblabel.h>
 #include <hbgroupbox.h>
-#include <hbdataform.h>
+#include <HbDataForm>
+#include <HbLabel>
 #include <hbtranslator.h>
+#include <HbStyleLoader>
+#include <HbIconItem>
+#include <HbIconAnimationManager>
+#include <HbIconAnimator>
+#include <hbparameterlengthlimiter.h>
 
 #include "iaupdatemainview.h"
 #include "iaupdateengine.h"
@@ -42,6 +49,9 @@
 #include "iaupdatedeputils.h"
 #include "iaupdatedialogutil.h"
 #include "iaupdateversion.h"
+#include "iaupdateapplistmodel.h"
+#include "iaupdateapplistitem.h"
+#include "iaupdateuicontroller.h"
 
 #include "iaupdatedebug.h"
 
@@ -53,6 +63,9 @@
 const QString KTranslationsPath = "/resource/qt/translations/";
 const QString KTranslationsFile = "swupdate";
 
+const QString ANIMATION_ICON("qtg_anim_loading");
+const QString ANIMATION_FILE("qtg_anim_loading.axml");
+
 
 IAUpdateMainView::IAUpdateMainView(IAUpdateEngine *engine):
 mEngine(engine)        
@@ -69,9 +82,13 @@
     mSelectionUpdate = false;
     mSelectionConnect = false;
     mTranslator = NULL;
+    mAnimationIconItem = NULL;
+    mLabel = NULL;
+    mMark = false;
+    mUpdating = false;
         
-    //mTranslator = new HbTranslator(KTranslationsPath, KTranslationsFile);
-    
+    mTranslator = new HbTranslator(KTranslationsPath, KTranslationsFile);
+        
     HbDocumentLoader loader;
     bool ok = false;
     loader.load(":/xml/iaupdate_mainview.docml", &ok);
@@ -94,25 +111,45 @@
     setMenu(menu);
     
     //Get the Action objects from the docml file
-    HbAction *action = qobject_cast<HbAction*>(loader.findObject("action"));
-    HbAction *action_1 = qobject_cast<HbAction*>(loader.findObject("action_1"));
-    HbAction *action_2 = qobject_cast<HbAction*>(loader.findObject("action_2"));
+    mActionStartUpdate = qobject_cast<HbAction*>(loader.findObject("action"));
+    mActionSettings = qobject_cast<HbAction*>(loader.findObject("action_1"));
+    mActionDisclaimer = qobject_cast<HbAction*>(loader.findObject("action_2"));
+    mActionCancelRefresh = qobject_cast<HbAction*>(loader.findObject("action_3"));
+    mActionCancelUpdate = qobject_cast<HbAction*>(loader.findObject("action_4"));
+    
     
-    connect(action, SIGNAL(triggered()), this, SLOT(handleStartUpdate()));
-    connect(action_1, SIGNAL(triggered()), this, SLOT(handleSettings()));
-    connect(action_2, SIGNAL(triggered()), this, SLOT(handleDisclaimer()));
+    connect(mActionStartUpdate, SIGNAL(triggered()), this, SLOT(handleStartUpdate()));
+    connect(mActionSettings, SIGNAL(triggered()), this, SLOT(handleSettings()));
+    connect(mActionDisclaimer, SIGNAL(triggered()), this, SLOT(handleDisclaimer()));
+    connect(mActionCancelRefresh, SIGNAL(triggered()), this, SLOT(handleCancelRefresh()));
+    connect(mActionCancelUpdate, SIGNAL(triggered()), this, SLOT(handleCancelUpdate()));
+    
+    mActionStartUpdate->setDisabled(true);
+    
+    mActionCancelRefresh->setVisible(false);
+    mActionCancelUpdate->setVisible(false);
         
     mContent = qobject_cast< HbWidget*>( loader.findWidget("content") );
            
-    mListView = qobject_cast<HbListWidget*>( loader.findWidget("listWidget") );
-    mListView->setSelectionMode( HbAbstractItemView::MultiSelection );
+    //mListView = qobject_cast<HbListView*>( loader.findWidget("listWidget") );
+    mListView = new HbListView(mContent);
+    mListView->setSelectionMode(HbAbstractItemView::MultiSelection);
+    
+    //mListView->setLayoutName("iaupdate_progress");
+    HbStyleLoader::registerFilePath(":/layout/");
     
     connect( mListView, SIGNAL( longPressed( HbAbstractViewItem *, const QPointF & ) ),
             this, SLOT( handleDetails( HbAbstractViewItem *, const QPointF & ) ) ); 
-        
-    HbListViewItem *prototype = mListView->listItemPrototype();
-
+    
+    IAUpdateAppListModel *model = new IAUpdateAppListModel();
+    
+    //HbListViewItem *prototype = mListView->listItemPrototype();
+    
+    HbListViewItem *prototype = new IAUpdateAppListItem(mListView);
     prototype->setGraphicsSize(HbListViewItem::LargeIcon);
+    prototype->setStretchingStyle(HbListViewItem::NoStretching); 
+            
+    mListView->setModel(model, prototype);
     
     HbDockWidget *dock = new HbDockWidget(this);
     HbWidget *dockContainer = new HbWidget(dock);
@@ -121,11 +158,12 @@
     dockContainer->setLayout(dockLayout);
     
     mSelections = new HbGroupBox(dockContainer);
-    mSelections->setHeading("Selected 0/0 (0 kB)");
-    //QString selectedString = QString(hbTrId("txt_software_subhead_selected_1l_2l_3l_kb")).arg(0).arg(0).arg(0);
-    //mSelections->setHeading(selectedString);                                            
+
+    QString selectedString = 
+        QString(hbTrId("txt_software_subhead_selected_1l_2l_3l_kb")).arg(0).arg(0).arg(0);
+    mSelections->setHeading(selectedString); 
     
-    dockLayout->addItem( mSelections);
+    dockLayout->addItem(mSelections);
     
     dockLayout->addItem(toolBar);
     
@@ -140,7 +178,7 @@
 IAUpdateMainView::~IAUpdateMainView()
 {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::~IAUpdateMainView() begin");
-    //delete mTranslator;
+    delete mTranslator;
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::~IAUpdateMainView() end");
 }
 
@@ -167,31 +205,124 @@
         {
             mContentDataForm  = new HbDataForm(mContent); 
         }
+        else
+        {
+            mContentDataForm->setVisible(true);
+        }
         QGraphicsLinearLayout *linearLayout = (QGraphicsLinearLayout*) mContent->layout();
         linearLayout->addItem(mContentDataForm);
         QString formText;
         
         if (error == KErrNone)
         {
-            formText = QString("Applications are up to date");
-            //formText = hbTrId("txt_software_formlabel_applications_are_up_to_date");
+             formText = 
+                hbTrId("txt_software_formlabel_applications_are_up_to_date");
         }
         else
         {
-            formText = QString("Refreshing failed. Try again later.");
+            formText = 
+                hbTrId("txt_software_formlabel_refreshing_failed_try_agai");
         }
         mContentDataForm->setDescription(formText);
     }
-    updateSelectionInfoInDock();  
+    updateSelectionInfoInDock(); 
+    
+    if (!mUpdating)
+    {    
+        mActionStartUpdate->setEnabled(countOfSelections() > 0);
+    } 
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refresh() end");
 }
 
+void IAUpdateMainView::refreshProgress()
+{ 
+    IAUpdateAppListModel *model = NULL;
+    model = (IAUpdateAppListModel*)  mListView->model();
+    if (model)
+    {
+        model->refreshProgress();    
+    }
+}
 
+void IAUpdateMainView::startRefreshingAnimation()
+{
+    removeCurrentContentLayout();
+     
+    mActionDisclaimer->setVisible(false);
+    mActionSettings->setVisible(false);
+    mActionCancelRefresh->setVisible(true);
+   
+    
+    if (!mLabel)
+    {    
+        mLabel = new HbLabel(mContent);
+    }
+    else
+    {    
+        mLabel->setVisible(true);
+    }
+        
+    QString formText;
+    formText = hbTrId("txt_software_formlabel_refreshing_updates_list");
+    mLabel->setPlainText(formText);
+    mLabel->setAlignment(Qt::AlignHCenter);
+          
+     
+    QGraphicsLinearLayout *linearLayout = (QGraphicsLinearLayout*) mContent->layout();
+    linearLayout->addStretch();
+    linearLayout->addItem(mLabel);
+    
+    
+    if (!mAnimationIconItem)
+    {    
+        mAnimationIconItem = new HbIconItem(ANIMATION_ICON,mContent);
+    }
+    else
+    {
+        mAnimationIconItem->setVisible(true);
+    }
+    mAnimationIconItem->setAlignment(Qt::AlignHCenter );
+    linearLayout->addItem(mAnimationIconItem);
+    linearLayout->addStretch();
+        
+    HbIconAnimationManager::global()->addDefinitionFile(ANIMATION_FILE);
+    
+    mAnimationIconItem->animator().startAnimation();
+}
+    
+void IAUpdateMainView::stopRefreshingAnimation()
+{
+    mActionDisclaimer->setVisible(true);
+    mActionSettings->setVisible(true);
+    mActionCancelRefresh->setVisible(false);
 
+    mAnimationIconItem->animator().stopAnimation();
+}    
+
+void IAUpdateMainView::updateCompleted()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::updateCompleted() begin");  
+    mUpdating = false;
+    mActionStartUpdate->setEnabled(countOfSelections() > 0);
+    mActionDisclaimer->setVisible(true);
+    mActionSettings->setVisible(true);
+    mActionCancelUpdate->setVisible(false);
+    connect( mListView, SIGNAL( longPressed( HbAbstractViewItem *, const QPointF & ) ),
+            this, SLOT( handleDetails( HbAbstractViewItem *, const QPointF & ) ) ); 
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::updateCompleted() end"); 
+}
 
 void IAUpdateMainView::handleStartUpdate()
 {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleStartUpdate() begin");
+
+    mActionStartUpdate->setEnabled(false);
+    mActionDisclaimer->setVisible(false);
+    mActionSettings->setVisible(false);
+    mActionCancelUpdate->setVisible(true);
+    disconnect( mListView, SIGNAL( longPressed( HbAbstractViewItem *, const QPointF & ) ),
+                this, SLOT( handleDetails( HbAbstractViewItem *, const QPointF & ) ) ); 
+    mUpdating = true;
     mEngine->StartUpdate(fotaSelected());
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleStartUpdate() end");
 }
@@ -207,6 +338,8 @@
 void IAUpdateMainView::handleDisclaimer()
 {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleDisclaimer() begin");
+    int counter = mListView->model()->rowCount();
+       
     if (!mDialogUtil)
     {
         mDialogUtil = new IAUpdateDialogUtil(this);
@@ -219,6 +352,22 @@
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleDisclaimer() end");
 }
 
+void IAUpdateMainView::handleCancelRefresh()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleCancelRefresh() begin");
+    mEngine->Controller()->HandleUserCancelL();
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleCancelRefresh() end");
+}
+
+void IAUpdateMainView::handleCancelUpdate()
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleCancelUpdate() begin");
+    mEngine->Controller()->HandleUserCancelL();
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleCancelUpdate() end");
+}
+
+
+
 void IAUpdateMainView::handleDetails(HbAbstractViewItem * item, const QPointF &)
 {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::handleDetails() begin");
@@ -311,6 +460,7 @@
             }
             updateSelectionsToList();
             updateSelectionInfoInDock();
+            mActionStartUpdate->setEnabled(countOfSelections() > 0);
             break;
         case CannotOmit:    
             break;
@@ -447,30 +597,25 @@
             {
                 if (depCount > 1) 
                 {
-                    text.append("This update needs also updates "); 
-                    text.append(names);
-                    text.append(" for working");
+                    text.append(hbTrId("txt_software_info_selected_update_also_needs_updat").arg(names));
                 } 
                 else
                 {
-                    text.append("This update needs also \""); 
-                    text.append(names);
-                    text.append("\" for working");
-                    }
+                    text.append(hbTrId("txt_software_info_selected_update_also_needs_1").arg(names));
+                    
                 }
+            }
             else
             {
                 if (depCount > 1) 
                 {
-                    text.append("Updates "); 
-                    text.append(names);
-                    text.append(" need this update for working");
+                    HbParameterLengthLimiter limiter(hbTrId("txt_software_info_updates_1_needs_deselected_upd"));  
+                    text.append(limiter.arg("names")); 
                 } 
                 else
                 {
-                    text.append("Update \""); 
-                    text.append(names);
-                    text.append("\" needs this update for working");
+                    HbParameterLengthLimiter limiter(hbTrId("txt_software_info_update_1_needs_deselected_upd"));  
+                    text.append(limiter.arg("names")); 
                 }   
             }
                 
@@ -496,6 +641,10 @@
     {    
         updateSelectionsToList();
         updateSelectionInfoInDock();
+        if (!mUpdating)
+        {    
+            mActionStartUpdate->setEnabled(countOfSelections() > 0);
+        }    
     }
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::markListItem() end");
 }       
@@ -516,6 +665,7 @@
             if (mNodes[i]->Base().IsSelected())
             {
                 mNodes[i]->Base().SetSelected(false);
+                deselected = true;
             }
         } 
         if (deselected)
@@ -540,6 +690,7 @@
         }
     }
     updateSelectionInfoInDock();
+    mActionStartUpdate->setEnabled(countOfSelections() > 0);
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::markFotaItem() end");
 }
 
@@ -636,14 +787,14 @@
 {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::showUpdateCannotOmitDialog() begin");
     HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
-    messageBox->setText(QString("This required update cannot be omitted"));
+    messageBox->setText(hbTrId("txt_software_info_this_required_update_cannot_be_o"));
     int actionCount = messageBox->actions().count();
     for (int i=actionCount-1; i >= 0; i--)
     { 
         messageBox->removeAction(messageBox->actions().at(i));
     }
     HbAction *okAction = NULL;
-    okAction = new HbAction("Ok");
+    okAction = new HbAction(hbTrId("txt_common_button_ok"));
     messageBox->addAction(okAction);
     messageBox->setTimeout(HbPopup::StandardTimeout);
     messageBox->setAttribute(Qt::WA_DeleteOnClose);
@@ -657,7 +808,7 @@
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::showDependenciesFoundDialog() begin");
     HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
     HbLabel *label = new HbLabel(messageBox);
-    label->setHtml(QString("Depencencies"));
+    label->setHtml(hbTrId("txt_software_title_dependencies"));
     messageBox->setHeadingWidget(label);
     //messageBox->setIconVisible(false);
         
@@ -670,7 +821,7 @@
     mPrimaryAction = NULL;
     mPrimaryAction = new HbAction("Continue");
     HbAction *secondaryAction = NULL;
-    secondaryAction = new HbAction("Cancel");
+    secondaryAction = new HbAction(hbTrId("txt_common_button_cancel"));
     messageBox->addAction(mPrimaryAction);
     messageBox->addAction(secondaryAction);
     messageBox->setTimeout(HbPopup::NoTimeout);
@@ -742,24 +893,28 @@
 void IAUpdateMainView::constructDetailsText(MIAUpdateAnyNode &node, QString &text)
 {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::constructDetailsText() begin");
-    text.append(QString("Name:"));
+    text.append(hbTrId("txt_software_dialog_name"));
     text.append(QString("<br />"));
-    QString name = XQConversions::s60DescToQString(node.Base().Name());
-    text.append(name);
     if (node.NodeType() == MIAUpdateAnyNode::ENodeTypeFw)
     {    
-        name.append(QString(" Device software"));
+        text.append(hbTrId("txt_software_dblist_device_software ")); // TODO: wrong layout
+    }
+    else
+    {
+        QString name = XQConversions::s60DescToQString(node.Base().Name());
+        text.append(name);
     }
         
     text.append(QString("<br />"));
     text.append(QString("<br />"));
     
-    text.append(QString("Description:"));
+    text.append(hbTrId("txt_software_dialog_description"));
     text.append(QString("<br />"));
     QString description;
     if (node.NodeType() == MIAUpdateAnyNode::ENodeTypeFw)
     {
-        description = QString("This update improves your device performance and brings you latest features.");
+        description = 
+            hbTrId("txt_software_info_this_update_improves_your_device");
     }
     else
     {    
@@ -775,7 +930,7 @@
         MIAUpdateNode *iaupdateNode = static_cast<MIAUpdateNode*> (&node);
         if (iaupdateNode->Type()!= MIAUpdateNode::EPackageTypeServicePack)
         {
-            text.append(QString("Version:"));
+            text.append(hbTrId("txt_software_dialog_version"));
             text.append(QString("<br />"));
             QString textVersion;
             versionText(node.Base().Version(), textVersion);
@@ -787,7 +942,7 @@
     if (node.NodeType() == MIAUpdateAnyNode::ENodeTypeFw)
     {    
         MIAUpdateFwNode *fwNode = static_cast<MIAUpdateFwNode*> (&node);
-        text.append(QString("Version:"));
+        text.append(hbTrId("txt_software_dialog_version"));
         text.append(QString("<br />"));
         QString textVersion = XQConversions::s60DescToQString(fwNode->FwVersion1());
         text.append(textVersion);
@@ -798,7 +953,7 @@
     int contentSize = node.Base().ContentSizeL();
     if (contentSize > 0)
     {
-        text.append(QString("Size:"));
+        text.append(hbTrId("txt_software_dialog_size"));
         text.append(QString("<br />"));
         QString textFileSize;
         fileSizeText(contentSize, textFileSize);
@@ -810,18 +965,8 @@
 void IAUpdateMainView::versionText(const TIAUpdateVersion &version, QString &versionText)
 {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::versionText() begin");
-    QString stringMajor;
-    stringMajor.setNum(version.iMajor);
-    versionText.append(stringMajor);
-    versionText.append(QString("."));
-    QString stringMinor;
-    stringMinor.setNum(version.iMinor);
-    versionText.append(stringMinor);
-    versionText.append(QString("("));
-    QString stringBuild;
-    stringBuild.setNum(version.iBuild);
-    versionText.append(stringBuild);
-    versionText.append(QString(")"));
+    versionText.append
+        (hbTrId("txt_software_info_version_1l_2l_3l").arg(version.iMajor).arg(version.iMinor).arg(version.iBuild));
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::versionText() end");
 }
 
@@ -829,141 +974,29 @@
 {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::fileSizeText() begin");
     int size = 0;
-    QString stringUnit;
     
     if (fileSize >= KMaxShownInKiloBytes )
         {
-        stringUnit.append(" MB");
         size = fileSize / KMegaByte;
         if ( fileSize % KMegaByte != 0 )
             {
             size++;
             }
+        text.append(hbTrId("txt_software_dialog_l_kb").arg(size));
         }
     else
         {
-        stringUnit.append(" kB");
         size = fileSize / KKiloByte;
         if ( fileSize % KKiloByte != 0 )
             {
             size++;
-            }   
+            } 
+        text.append(hbTrId("txt_software_dialog_l_mb").arg(size));
         }
-    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;        
-    if (sizeInBytes >= KMaxShownInKiloBytes)
-    {
-        shownInMegabytes = true;
-        size = sizeInBytes / KMegaByte;
-        if (sizeInBytes % KMegaByte != 0)
-        {
-           size++;
-        }
-    }
-    else 
-    {
-        size = sizeInBytes / KKiloByte;
-        if (sizeInBytes % KKiloByte != 0)
-        {
-            size++;
-        }  
-    }
-    QString sizeString;
-    sizeString.setNum(size);     
-    switch(node->Base().Importance())
-    {        
-        case MIAUpdateBaseNode::EMandatory:
-        {
-            importanceDescription = "Required ";
-            importanceDescription.append(sizeString);
-            if (shownInMegabytes)
-            {
-                importanceDescription.append(" MB" );
-            }
-            else 
-            {
-                importanceDescription.append(" kB" );
-            }  
-            break;
-        }
-                
-        case MIAUpdateBaseNode::ECritical:
-        {
-            bool isNSU = false;
-            if(node->NodeType() == MIAUpdateAnyNode::ENodeTypeFw)
-            {
-                MIAUpdateFwNode *fwnode = static_cast<MIAUpdateFwNode*>(node);          
-                if (fwnode->FwType() == MIAUpdateFwNode::EFotiNsu)
-                {
-                   isNSU = true;
-                }
-            }
-            importanceDescription = "Important ";
-            if (!size || isNSU)
-            {
-                //for firmware when size info is not provided by server
-            }
-            else
-            {
-                importanceDescription.append(sizeString);
-                if (shownInMegabytes)
-                {
-                    importanceDescription.append(" MB" );
-                }
-                else 
-                {
-                    importanceDescription.append(" kB" );
-                } 
-            }
-            break;
-        }
-            
-        case MIAUpdateBaseNode::ERecommended:
-        {
-            importanceDescription = "Recommended ";
-            importanceDescription.append(sizeString);
-            if (shownInMegabytes)
-            {
-                importanceDescription.append(" MB" );
-            }
-            else 
-            {
-                importanceDescription.append(" kB" );
-            }  
-            break;
-        }
-            
-        case MIAUpdateBaseNode::ENormal:
-        {
-            importanceDescription = "Optional ";
-            importanceDescription.append(sizeString);
-            if (shownInMegabytes)
-            {
-                importanceDescription.append(" MB" );
-            }
-            else 
-            {
-                importanceDescription.append(" kB" );
-            }  
-            break;
-        }
-
-        default:
-        {
-            break;
-        }
-    }
-    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::setImportance() end");
-}    
 
 void IAUpdateMainView::removeCurrentContentLayout()
 {
@@ -973,6 +1006,19 @@
     {
         mContent->layout()->removeAt(i);
     }
+    if (mContentDataForm)
+    {
+        mContentDataForm->setVisible(false);
+    }
+    if (mLabel)
+    {
+        mLabel->setVisible(false);
+    }
+    if (mAnimationIconItem)
+    {   
+        delete mAnimationIconItem;
+        mAnimationIconItem = NULL;
+    }
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::removeCurrentContentLayout() end");    
 }
 
@@ -992,7 +1038,7 @@
         }
         else if (fwNodes.Count() == 1 && fwnode->FwType() == MIAUpdateFwNode::EFotiNsu)
         {
-            refreshNsuUpdate();
+        refreshNsuUpdate(*fwnode);
         }
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshFirmwareUpdates() end");    
     }    
@@ -1003,10 +1049,17 @@
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshFotaUpdate() begin");
     if (!mFwListView)
     {
-        mFwListView  = new HbListWidget(mContent);
+        mFwListView  = new HbListView(mContent);
         mFwListView->setSelectionMode( HbAbstractItemView::MultiSelection );
         connect( mFwListView, SIGNAL( longPressed( HbAbstractViewItem *, const QPointF & ) ),
         this, SLOT( handleFotaDetails( HbAbstractViewItem *, const QPointF & ) ) ); 
+        
+        IAUpdateAppListModel *model = new IAUpdateAppListModel();
+        HbListViewItem *prototype = new IAUpdateAppListItem(mListView);
+        prototype->setGraphicsSize(HbListViewItem::LargeIcon);
+        prototype->setStretchingStyle(HbListViewItem::NoStretching);            
+        mListView->setModel(model, prototype);
+         
         mFwListView->listItemPrototype()->setGraphicsSize(HbListViewItem::LargeIcon);   
         mFwListView->listItemPrototype()->setStretchingStyle(HbListViewItem::NoStretching);
         connect(mFwListView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
@@ -1014,37 +1067,34 @@
     }
     QGraphicsLinearLayout *linearLayout = (QGraphicsLinearLayout*) mContent->layout();
     linearLayout->addItem(mFwListView);
-    mFwListView->clear();
+    IAUpdateAppListModel *model = (IAUpdateAppListModel*)  mListView->model();
     QItemSelectionModel *selectionModel = mFwListView->selectionModel();  
+    mSelectionUpdate = true;
     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);
+    mSelectionUpdate = false;
+    model->setFwNode(&fwNode);
+ 
     if (fwNode.Base().IsSelected())
     {
         QModelIndex modelIndex = mFwListView->model()->index(0,0);
         selectionModel->select(modelIndex, QItemSelectionModel::Select);
     }
-    mFwListView->addItem(fwItem); 
+    model->refresh();
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshFotaUpdate() end");
 }
 
-void IAUpdateMainView::refreshNsuUpdate()
+void IAUpdateMainView::refreshNsuUpdate(MIAUpdateFwNode& fwNode)
 {
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshNsuUpdate() begin");
     if (!mFwNSUGroupBox)
     {
         mFwNSUGroupBox = new HbGroupBox(mContent);
-        mFwNSUGroupBox->setHeading("Device software available");
+        mFwNSUGroupBox->setHeading(hbTrId("txt_software_subhead_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");
+        QString textVersion = XQConversions::s60DescToQString(fwNode.FwVersion1());
+        dataForm->setDescription
+            (hbTrId("txt_software_info_please_use_your_pc_to_update_the").arg(textVersion));
     }
     QGraphicsLinearLayout *linearLayout = (QGraphicsLinearLayout*) mContent->layout();
     linearLayout->addItem(mFwNSUGroupBox);
@@ -1059,59 +1109,32 @@
         if (!mApplicationUpdatesGroupBox)
         {
             mApplicationUpdatesGroupBox = new HbGroupBox(mContent);
-            mApplicationUpdatesGroupBox->setHeading("Application updates");
+            mApplicationUpdatesGroupBox->setHeading(hbTrId("txt_software_subhead_application_updates"));
         }
         QGraphicsLinearLayout *linearLayout = (QGraphicsLinearLayout*) mContent->layout();
         linearLayout->addItem(mApplicationUpdatesGroupBox);
         linearLayout->addItem(mListView);
     }
-    mListView->clear();
+    IAUpdateAppListModel *model = (IAUpdateAppListModel*)  mListView->model();
     QItemSelectionModel *selectionModel = mListView->selectionModel();  
+    mSelectionUpdate = true;
     selectionModel->clear();
-    HbIcon icon(QString(":/icons/qgn_menu_swupdate"));
+    mSelectionUpdate = false;
+    
+    //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)
+    }
+    model->setNodeArray(mNodes);
+    for(int j = 0; j < mNodes.Count(); ++j) 
+    {
+        if (mNodes[j]->Base().IsSelected())
         {
-            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);
+            QModelIndex modelIndex = mListView->model()->index(j,0);
             selectionModel->select(modelIndex, QItemSelectionModel::Select);
         }
     }
@@ -1120,6 +1143,8 @@
         mSelectionConnect = connect(selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
                         this, SLOT(handleSelectionChanged(QItemSelection,QItemSelection)));     
     }
+    model->refresh();
+
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::refreshApplicationUpdates() end");
 }
 
@@ -1191,3 +1216,28 @@
     mSelections->setHeading(selectionString);
     IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::updateSelectionInfoInDock() end");
 }
+
+int IAUpdateMainView::countOfSelections() const
+{
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::countOfSelections() begin");
+    int countOfSelectedItems = 0;
+    for (int i = 0; i < mFwNodes.Count(); ++i)
+    {
+        if (mFwNodes[i]->FwType() == MIAUpdateFwNode::EFotaDp2)
+        {
+            if (mFwNodes[i]->Base().IsSelected())
+            {
+                countOfSelectedItems++;
+            }
+        }
+    } 
+    for (int j = 0; j < mNodes.Count(); ++j)
+    {    
+        if (mNodes[j]->Base().IsSelected())
+        {
+            countOfSelectedItems++;
+        }
+    } 
+    IAUPDATE_TRACE("[IAUPDATE] IAUpdateMainView::countOfSelections() end");
+    return countOfSelectedItems;
+}    
--- a/iaupdate/IAD/ui/src/iaupdatemainwindow.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatemainwindow.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -73,8 +73,27 @@
     show(); 
 } 
 
+void IAUpdateMainWindow::refreshMainViewProgress()
+{
+    mMainView->refreshProgress();
+}
 
+void IAUpdateMainWindow::setRefreshingAnimation(bool animation)
+{
+    if (animation)
+    {
+        mMainView->startRefreshingAnimation();
+    }
+    else
+    {
+        mMainView->stopRefreshingAnimation();    
+    }
+}
 
+void IAUpdateMainWindow::updateCompleted()
+{
+    mMainView->updateCompleted();    
+}
 
 IAUpdateMainView* IAUpdateMainWindow::GetMainView()
 {
--- a/iaupdate/IAD/ui/src/iaupdateresultsdialog.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateresultsdialog.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -42,7 +42,7 @@
     HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
     
     HbLabel *label = new HbLabel(messageBox);
-    label->setHtml(QString("Update results"));
+    label->setHtml(hbTrId("txt_software_title_update_results"));
     messageBox->setHeadingWidget(label);
     
     messageBox->setIconVisible(false);
@@ -66,59 +66,26 @@
     if (param.iCountSuccessfull == 0 && param.iCountCancelled == 0 &&
         param.iCountFailed == 0)
     {
-        QString stringCount;
-        stringCount.setNum(param.iCountSuccessfull);    
-        buf.append(stringCount);
-        buf.append(" updates successful");
+        buf.append(hbTrId("txt_software_info_ln_updates_successful", param.iCountSuccessfull));
         buf.append("<br />");
         return;
     } 
   
     if (param.iCountSuccessfull != 0)
     {
-        QString stringCount;
-        stringCount.setNum(param.iCountSuccessfull);    
-        buf.append(stringCount);
-        if (param.iCountSuccessfull == 1)
-        {
-            buf.append(" application updated"); 
-        }
-        else
-        {
-            buf.append(" applications updated"); 
-        }
+        buf.append(hbTrId("txt_software_info_ln_updates_successful", param.iCountSuccessfull));
         buf.append("<br />");
     }
     
     if (param.iCountCancelled != 0)
     {
-        QString stringCount;
-        stringCount.setNum(param.iCountCancelled);    
-        buf.append(stringCount);
-        if (param.iCountCancelled == 1)
-        {
-            buf.append(" update cancelled");
-        }
-        else
-        {
-            buf.append(" updates cancelled");
-        }
+        buf.append(hbTrId("txt_software_info_ln_updates_cancelled", param.iCountCancelled));
         buf.append("<br />");
     }
 
     if (param.iCountFailed != 0)
     {
-        QString stringCount;
-        stringCount.setNum(param.iCountFailed);    
-        buf.append(stringCount);
-        if (param.iCountFailed == 1)
-        {
-            buf.append(" update failed");
-        }
-        else
-        {
-            buf.append(" updates failed");
-        }
+        buf.append(hbTrId("txt_software_info_ln_updates_failed", param.iCountFailed));
         buf.append("<br />");
     }
     
--- a/iaupdate/IAD/ui/src/iaupdatesettingdialog.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatesettingdialog.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -200,13 +200,13 @@
     switch ( value )
          {
          case KAutoUpdateOn:
-             value = EIAUpdateSettingValueDisableWhenRoaming;
+             value = EIAUpdateSettingValueEnable;
              break;
          case KAutoUpdateOff:
              value = EIAUpdateSettingValueDisable;
              break;
          case KAutoUpdateOnInHomeNetwork:
-             value = EIAUpdateSettingValueEnable;
+             value = EIAUpdateSettingValueDisableWhenRoaming; 
              break;
          default: 
              break;
@@ -321,33 +321,26 @@
 void CIAUpdateSettingDialog::initializeView()
     {
     
-    setTitle("Software update"); 
-    //setTitle(hbTrId("txt_software_title_software_update")); 
+    setTitle(hbTrId("txt_software_title_software_update")); 
     
-    mSettingsForm->setHeading("Settings"); 
-    //mSettingsForm->setHeading(hbTrId("txt_software_subhead_settings"));
+    mSettingsForm->setHeading(hbTrId("txt_software_subhead_settings"));
     
     //create a model class
     HbDataFormModel *mModel = new HbDataFormModel();
 
     // add Destination item
     mDestinationItem = mModel->appendDataFormItem(
-        HbDataFormModelItem::ToggleValueItem, QString("Network connection"));
-        //HbDataFormModelItem::ToggleValueItem, hbTrId("txt_software_formlabel_network_connection"));
+        HbDataFormModelItem::ToggleValueItem, hbTrId("txt_software_formlabel_network_connection"));
 
     // add auto update item
     mAutoUpdateItem = mModel->appendDataFormItem(
-       HbDataFormModelItem::ComboBoxItem, QString("Auto-check for updates"));
-       //HbDataFormModelItem::ComboBoxItem, hbTrId("txt_software_setlabel_autocheck_for_updates"));
+       HbDataFormModelItem::ComboBoxItem, hbTrId("txt_software_setlabel_autocheck_for_updates"));
     
     // auto update selection values
     QStringList list;
-    list.insert(0, QString("On"));
-    //list.insert(0, hbTrId("txt_software_setlabel_val_on"));
-    list.append(QString("Off")); 
-    //list.append(hbTrId("txt_software_setlabel_val_off"));
-    list.append(QString("On in home network"));
-    //list.append(hbTrId("txt_software_setlabel_val_on_in_home_network"));
+    list.insert(0, hbTrId("txt_software_setlabel_val_on"));
+    list.append(hbTrId("txt_software_setlabel_val_off"));
+    list.append(hbTrId("txt_software_setlabel_val_on_in_home_network"));
     
     mAutoUpdateItem->setContentWidgetData("items", list);
 
--- a/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -56,7 +56,6 @@
 #include "iaupdatefirsttimeinfo.h"
 #include "iaupdaterefreshhandler.h"
 #include "iaupdatenodeid.h"
-#include "iaupdatewaitdialog.h"
 #include "iaupdatedialogutil.h"
 #include "iaupdatedebug.h"
 
@@ -246,8 +245,6 @@
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::~CIAUpdateUiController() begin");
 
     CancelOperation();
-    delete mWaitDialog;
-    delete iController;
     iNodes.Reset();
     iFwNodes.Reset();
     iSelectedNodesArray.Reset();
@@ -262,14 +259,7 @@
     delete iParams;
     delete iRefreshHandler;
     delete mDialogUtil;
-
-    // If dialogs have not been released yet, release them now.
-    // ProcessFinishedL() should normally be used for dialogs but
-    // here just use non-leaving delete. In normal cases, dialogs should
-    // already be released in the end of the update flow before coming here.
-    //delete iWaitDialog;
-    //delete iProgressDialog;
-        
+            
 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::~CIAUpdateUiController() end");
     }        
 
@@ -339,11 +329,9 @@
                 if ( mDialogUtil )
                     {
                     mPrimaryAction = NULL;
-                    //mPrimaryAction = new HbAction(hbTrId("txt_software_button_accept"));
-					mPrimaryAction = new HbAction("Accept");
+                    mPrimaryAction = new HbAction(hbTrId("txt_software_button_accept"));
                     HbAction *secondaryAction = NULL;
-                    //secondaryAction = new HbAction(hbTrId("txt_software_button_decline"));
-					secondaryAction = new HbAction("Decline");
+                    secondaryAction = new HbAction(hbTrId("txt_software_button_decline"));
                     mDialogUtil->showAgreement(mPrimaryAction,secondaryAction);
                     iDialogState = EAgreement;
                     }
@@ -462,8 +450,8 @@
             {
             mPrimaryAction = NULL;
             mPrimaryAction = new HbAction(hbTrId("txt_common_button_ok"));
-            //mDialogUtil->showInformation(hbTrId("txt_software_info_insufficient_memory_free_some_m"), mPrimaryAction);
-			mDialogUtil->showInformation(QString("Insufficient memory. Free some memory and try again."), mPrimaryAction);
+            mDialogUtil->showInformation
+               (hbTrId("txt_software_info_insufficient_memory_free_some_m"), mPrimaryAction);
             iDialogState = EInsufficientMemory;
             }
         }
@@ -647,13 +635,13 @@
                 if ( allowNetworkRefresh )
                     {
                     iEikEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );
-                    ShowWaitDialogL( "Refreshing updates list", ETrue );
+                    iObserver.SetUpdatesRefreshing( ETrue );
                     }
                 }
             }
         else
             {
-            ShowWaitDialogL( "Refreshing updates list", ETrue );
+            iObserver.SetUpdatesRefreshing( ETrue );
             }
         }
     
@@ -1211,15 +1199,8 @@
                 ContinueUpdateL( ETrue );                
                 }
             }
-        else
-            {
-            IAUPDATE_TRACE("[IAUPDATE] Self update closed with red key. Handle dialogs.");
-            // Because shutdown was requested, we do not continue the update flow.
-            // A updating dialog may still show. So, release it here.
-            RemoveUpdatingDialogsL();
-            }
 
-        // Self updater provided some data that was handeld above.
+        // Self updater provided some data that was handled above.
         restarted = ETrue;
         }
 
@@ -1260,11 +1241,8 @@
     else
         {
         iState = EIdle;
-        TRAP ( completionError, RemoveWaitDialogL() );
-        if ( completionError == KErrNone )
-            {
-    	    TRAP( completionError, RefreshCompleteL( aNodes, aError ) );
-            }	
+        iObserver.SetUpdatesRefreshing( EFalse );
+   	    TRAP( completionError, RefreshCompleteL( aNodes, aError ) );
         }
     if ( completionError == KErrNone )
         {
@@ -1384,18 +1362,19 @@
 // 
 // -----------------------------------------------------------------------------
 //
-void CIAUpdateUiController::DownloadProgress( MIAUpdateNode& /*aNode*/, 
-                                              TUint /*aProgress*/,
-                                              TUint /*aMaxProgress*/ )
+void CIAUpdateUiController::DownloadProgress( MIAUpdateNode& aNode, 
+                                              TUint aProgress,
+                                              TUint aMaxProgress )
     {
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::DownloadProgress() begin");  
 
-    if ( iProgressDialog )
+    if (aNode.UiState() == MIAUpdateNode::EDownloading)
         {
-    	//TRAP_IGNORE ( iProgressDialog->SetProgressDialogFinalValueL( aMaxProgress ) );
-        //TRAP_IGNORE ( iProgressDialog->UpdateProgressDialogValueL( aProgress ) );
+        aNode.SetProgress( aProgress );
+        aNode.SetTotal( aMaxProgress );
+        iObserver.RefreshUIProgress();
         }
-
+    
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::DownloadProgress() end");  
     }                            
 
@@ -1411,13 +1390,14 @@
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::DownloadComplete() begin");
 
     iState = EIdle;
+    aNode.SetProgress( 0 );
+    aNode.SetTotal( 0 );
 	TRAPD ( completionError, DownloadCompleteL( aNode, aError ) );
     if ( completionError != KErrNone )
         {
         // If we came here, DownloadCompleteL function may have left
         // before dialog was removed. So, try one more time to remove it here
         // before informing the observer.
-        TRAP_IGNORE( RemoveUpdatingDialogsL() );
         iObserver.HandleLeaveErrorWithoutLeave( completionError );
         }
 
@@ -1459,10 +1439,6 @@
 	TRAPD ( completionError, InstallCompleteL( aNode, aError ) );
     if ( completionError != KErrNone )
         {
-        // If we came here, InstallCompleteL function may have left
-        // before dialog was removed. So, try one more time to remove it here
-        // before informing the observer.
-        TRAP_IGNORE( RemoveUpdatingDialogsL() );
         iObserver.HandleLeaveErrorWithoutLeave( completionError );
         }
 
@@ -1531,8 +1507,6 @@
     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::StartExecutableCompletedL() begin"); 
 
     // Before informing the observer, close the possible existing dialog.
-    RemoveUpdatingDialogsL();
-    
     // Possible error is not passed to a client. Typically client is already closed. 
     // Even in the case when client's request is still ongoing, it's disinformation to return
     // error from failed executable start. 
@@ -1564,26 +1538,6 @@
 
 
 // -----------------------------------------------------------------------------
-// CIAUpdateUiController::HandleWaitDialogCancel
-// Called when wait dialog is cancelled.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CIAUpdateUiController::HandleWaitDialogCancel()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleWaitDialogCancel() begin");
-    
-    TRAPD ( err, HandleUserCancelL() );
-    if ( err != KErrNone )
-        {
-      	iObserver.HandleLeaveErrorL( err );
-        }
-
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleWaitDialogCancel() end");
-
-    }
-
-// -----------------------------------------------------------------------------
 // CIAUpdateUiController::dialogFinished
 // Called when dialog is finished.
 // -----------------------------------------------------------------------------
@@ -2143,187 +2097,9 @@
     }
 
 
-// ---------------------------------------------------------------------------
-// CIAUpdateUiController::ShowUpdatingDialogL
-// 
-// ---------------------------------------------------------------------------
-//
-/*
-void CIAUpdateUiController::ShowUpdatingDialogL( TInt aTextResourceId,
-                                                 const TDesC& aName,
-                                                 TInt aNumber,
-                                                 TInt aTotalCount )   
-                                                    
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowUpdatingDialogL() begin");
 
-    // Before trying ot create a new dialog,
-    // remove possible existing dialog.
-    RemoveUpdatingDialogsL();
-
-    CDesCArray* stringArray = new( ELeave ) CDesCArrayFlat( 1 );
-    CleanupStack::PushL( stringArray );
-    stringArray->AppendL( aName );
-    CArrayFix<TInt>* numberArray = new( ELeave ) CArrayFixFlat<TInt>( 2 );
-    CleanupStack::PushL( numberArray );
-    numberArray->AppendL( aNumber ); 
-    numberArray->AppendL( aTotalCount );
-    HBufC* noteText = NULL;
-    //noteText = StringLoader::LoadLC( aTextResourceId, 
-    //                                 *stringArray, 
-    //                                 *numberArray );
-    TPtr ptr = noteText->Des();
-    //AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); 
-    if ( iState == EDownloading )
-        {
-    	ShowProgressDialogL( *noteText, ETrue );
-        }
-    else
-        {
-        //ShowWaitDialogL( *noteText, ETrue );	
-        }
-    
-    CleanupStack::PopAndDestroy( noteText ); 
-    CleanupStack::PopAndDestroy( numberArray );
-    CleanupStack::PopAndDestroy( stringArray );
-
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowUpdatingDialogL() end");
-    }*/
  
 
-// ---------------------------------------------------------------------------
-// CIAUpdateUiController::ShowWaitDialogL
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateUiController::ShowWaitDialogL( const QString& aDisplayString, 
-                                             TBool /*aVisibilityDelayOff*/ ) 
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() begin");
-    if ( !mWaitDialog )
-        {
-        mWaitDialog = new IAUpdateWaitDialog();
-        mWaitDialog->SetCallback( this );
-        mWaitDialog->showDialog( aDisplayString );
-        }
-    
-    
-    
-    
-    /*if ( iWaitDialog )
-        {
-        IAUPDATE_TRACE("[IAUPDATE] Wait dialog already existed. Remove it first");
-        // in some rare cases previous dialog still exists
-        // it's now just deleted (not recommended way) to avoid forwarding problem(s). 
-        //delete iWaitDialog;
-        iWaitDialog = NULL;
-        }*/
- /*   iWaitDialog = 
-        new( ELeave ) CIAUpdateWaitDialog( 
-            reinterpret_cast< CEikDialog** >( &iWaitDialog ),
-            aVisibilityDelayOff );
-                
-    iWaitDialog->SetTextL( aDisplayString );
-    iWaitDialog->SetCallback( this );        
-    iWaitDialog->ExecuteLD( R_IAUPDATE_WAIT_DIALOG ); */
-
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() end");
-    }
-
-
-// --------------------------------------------------------------------------
-// CIAUpdateUiController::ShowProgressDialogL
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateUiController::ShowProgressDialogL( const TDesC& /*aDisplayString*/, 
-                                                 TBool /*aVisibilityDelayOff*/ ) 
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() begin");
-
-    if ( iProgressDialog )
-        {
-        IAUPDATE_TRACE("[IAUPDATE] Progress dialog already existed. Remove it first");
-        // in some rare cases previous dialog still exists
-        // it's now just deleted (not recommended way) to avoid forwarding problem(s). 
-        //delete iProgressDialog;
-        iProgressDialog = NULL;
-        }
-/*    iProgressDialog = 
-        new( ELeave ) CIAUpdateProgressDialog( 
-            reinterpret_cast< CEikDialog** >( &iProgressDialog ),
-            aVisibilityDelayOff );
-                
-    iProgressDialog->SetTextL( aDisplayString );
-    iProgressDialog->SetCallback( this );        
-    iProgressDialog->ExecuteLD( R_IAUPDATE_PROGRESS_DIALOG ); */
-
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() end");
-    }
-
-
-// ---------------------------------------------------------------------------
-// CIAUpdateUiController::RemoveUpdatingDialogsL
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateUiController::RemoveUpdatingDialogsL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveUpdatingDialogsL() begin");
-    
-    RemoveWaitDialogL();
-    RemoveProgressDialogL();
-
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveUpdatingDialogsL() end");
-    }
-
-
-// ---------------------------------------------------------------------------
-// CIAUpdateUiController::RemoveWaitDialogL
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateUiController::RemoveWaitDialogL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() begin");
-    if ( mWaitDialog )
-        {
-        mWaitDialog->close();  
-        }
-    /*if ( !iCancelling )  //that's needed because AVKON  in 3.2.3 wk12, returning
-                         //EFalse in TryToExitL() causes a crash   
-        {
-    	if ( iWaitDialog )
-            {
-    	    iWaitDialog->ProcessFinishedL();
-            }
-        }*/
-    
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() end");
-    }
-
-
-// ---------------------------------------------------------------------------
-// CIAUpdateUiController::RemoveProgressDialogL
-// 
-// ---------------------------------------------------------------------------
-//
-void CIAUpdateUiController::RemoveProgressDialogL()
-    {
-    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveProgressDialogL() begin");
-
-    if ( !iCancelling )  //that's needed because AVKON  in 3.2.3 wk12, returning
-                         //EFalse in TryToExitL() causes a crash   
-        {
-    	if ( iProgressDialog )
-            {
-    	    //iProgressDialog->ProcessFinishedL();
-            }
-        }
-    
-	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveProgressDialogL() end");
-    }
-
 
 // ---------------------------------------------------------------------------
 // CIAUpdateUiController::AllowNetworkRefreshL
--- a/iaupdate/IAD/ui/src/iaupdatewaitdialog.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   This file contains the implementation of IAUpdateWaitDialog
-*                class member functions.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <hbprogressdialog.h>
-
-#include "iaupdatewaitdialog.h"
-#include "iaupdatewaitdialogobserver.h"
-
-
-
-// ========================= MEMBER FUNCTIONS ================================
-
-// -----------------------------------------------------------------------------
-// IAUpdateWaitDialog::IAUpdateWaitDialog
-// -----------------------------------------------------------------------------
-//
-IAUpdateWaitDialog::IAUpdateWaitDialog() 
-{
-    mCallback = NULL;
-    mWaitDialog = NULL;
-}
-
-// -----------------------------------------------------------------------------
-// IAUpdateWaitDialog::~IAUpdateWaitDialog
-// Destructor
-// -----------------------------------------------------------------------------
-//
-IAUpdateWaitDialog::~IAUpdateWaitDialog()
-{
-    if (mWaitDialog)
-    {
-        //mWaitDialog->close();  //TODO: is there need to close/delete progressdialog, it's selfdeleted in close()
-    }
-}
-
-// ---------------------------------------------------------------------------
-// IAUpdateWaitDialog::showDialog()
-// ---------------------------------------------------------------------------
-//
-int IAUpdateWaitDialog::showDialog(const QString& text)
-{
-    if (!mWaitDialog)
-    {
-        mWaitDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
-        connect(mWaitDialog, SIGNAL(cancelled()), this, SLOT(dialogCancelled()));
-    }
-    mWaitDialog->setText(text);
-    mWaitDialog->setTimeout(HbPopup::NoTimeout);
-    mWaitDialog->show();
-    return 0;
-}
-// ---------------------------------------------------------------------------
-// IAUpdateWaitDialog::SetCallback
-// ---------------------------------------------------------------------------
-//
-void IAUpdateWaitDialog::SetCallback(MIAUpdateWaitDialogObserver* callback)
-{
-    mCallback = callback;
-}
-
-void IAUpdateWaitDialog::close()
-{
-    if (mWaitDialog)  
-    {
-       mWaitDialog->close();     
-    }
-}
-
-void IAUpdateWaitDialog::dialogCancelled()
-{
-    if (mCallback)
-    {
-        mCallback->HandleWaitDialogCancel();        
-    }
-}
-// End of File
--- a/iaupdate/IAD/updater/src/iaupdaterdialog.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/updater/src/iaupdaterdialog.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -25,9 +25,13 @@
 #include <hbtextresolversymbian.h>
 
 
-_LIT(KFilename, "iaupdate.ts");
-_LIT(KPath, "z://data");
+// translator
+_LIT(KPath, "z:/resource/qt/translations/"); 
+_LIT(KFileName, "swupdate_");
+
+// notification text and icon
 _LIT(KInstalling, "txt_software_info_installing_1"); 
+_LIT( KIconName, "qtg_large_swupdate" );
 
 // ======== LOCAL FUNCTIONS ========
 
@@ -86,7 +90,7 @@
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::ConstructL begin");
     
     // Get resource file path
-    iIsResolverSuccess = HbTextResolverSymbian::Init(KFilename, KPath);
+    iIsResolverSuccess = HbTextResolverSymbian::Init(KFileName, KPath);
     
     IAUPDATE_TRACE("[IAUpdater] CIAUpdaterDialog::ConstructL end");
     }
@@ -119,11 +123,10 @@
     
     // loc: Load string 
     iGlobalResource = HbTextResolverSymbian::LoadL( KInstalling, aName );
-    if ( iGlobalResource )
-        iGlobalWaitNote->SetTextL( iGlobalResource->Des() );
+    iGlobalWaitNote->SetTextL( iGlobalResource->Des() );
 
-    // Icon ?
-    //iGlobalWaitNote->SetIconNameL(const TDesC& aIconName);
+    // Icon 
+    iGlobalWaitNote->SetIconNameL( KIconName );
     
     // Button ?
     iGlobalWaitNote->SetButton(ETrue);
--- a/iaupdate/IAD/updater/src/iaupdaterinstaller.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/IAD/updater/src/iaupdaterinstaller.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -268,10 +268,10 @@
                 SetActive();                        
                 break;                        
                 }                
-            else if ( (errCategory == Usif::ESecurityError && 
-                iInstallErr == KErrNone) ||
-                (iStatus.Int() != KErrNone && 
-                 iStatus.Int() != errCategory == Usif::ESecurityError) )
+            else if ( ( errCategory == Usif::ESecurityError && 
+                        iInstallErr == KErrNone) ||
+                      ( iStatus.Int() != KErrNone && 
+                        errCategory != Usif::ESecurityError ) )
                 {
                 IAUPDATE_TRACE("[IAUpdater] RunL() Ins. err or sec. failure"); 
                 
--- a/iaupdate/rom/iaupdateresources.iby	Tue Sep 28 14:48:39 2010 +0300
+++ b/iaupdate/rom/iaupdateresources.iby	Thu Oct 14 14:11:30 2010 +0300
@@ -22,6 +22,9 @@
 
 #include <bldvariant.hrh>
 
+#include <data_caging_paths_for_iby.hrh>
+data=DATAZ_\QT_TRANSLATIONS_DIR\swupdate.qm      QT_TRANSLATIONS_DIR\swupdate.qm
+
 #ifdef FF_IAUPDATE
 S60_APP_RESOURCE(iaupdate)
 S60_APP_RESOURCE(iaupdatelauncher)
--- a/installationservices/swcomponentregistry/inc/scr.h	Tue Sep 28 14:48:39 2010 +0300
+++ b/installationservices/swcomponentregistry/inc/scr.h	Thu Oct 14 14:11:30 2010 +0300
@@ -580,9 +580,9 @@
 						   and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale.
 						   If a particular language is provided, then the names are searched for this particular language
 						   and its downgraded languages. If there is no name and vendor with the provided language, then the function leaves with KErrScrUnsupportedLocale.
-		    @return aEntry A pointer to the component entry object for the given global component id. 
+		    @return aEntry A pointer to the component entry object for the given global component id. If the GlobalIdName couldn't be found, then NULL is returned.
 		    
-		    @leave KErrScrUnsupportedLocale The component requested with the global id couldn't be found for the specified locale.
+		    @leave KErrScrUnsupportedLocale The component requested with the global id couldn't be found for the specified locale.                                            
 		    @leave System-wide error codes.
 		 */
 		IMPORT_C CComponentEntry* GetComponentL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName, TLanguage aLocale=KUnspecifiedLocale) const;
@@ -1354,9 +1354,9 @@
 		    @see CAppViewData 
             @leave A system-wide error code.		    
 		**/
-
+		
 		 IMPORT_C void GetAppViewsL(RPointerArray<CAppViewData>& aAppViewInfoArray) const;
-
+		 
 	private:
 		void CheckSubSessionHandleL() const;     //Checks for Valid SubSessionHandle
 		TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const;
Binary file installationservices/swcomponentregistry/test/testdb/update_db_production.xml has changed
--- a/installationservices/swi/source/sisregistry/common/sisregistryobject.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/installationservices/swi/source/sisregistry/common/sisregistryobject.cpp	Thu Oct 14 14:11:30 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"
@@ -924,7 +924,11 @@
 			    TUid sid = iFileDescriptions[j]->Sid();
 				if(sid != KNullUid)
 					{
-					iSids.Remove(iSids.Find(sid));
+                    TInt index = iSids.Find(sid);
+                    if (KErrNotFound != index)
+                        {
+                        iSids.Remove(index);
+                        }
 					}
 				delete iFileDescriptions[j];
 			    iFileDescriptions.Remove(j);
--- a/installationservices/swi/source/swis/server/installmachine.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/installationservices/swi/source/swis/server/installmachine.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -1931,8 +1931,8 @@
 		{
 		Usif::CComponentEntry* componentEntry = NULL;
 		// Get the component entry using the global Id and the software type.
-		TRAPD(err, componentEntry = scrSession.GetComponentL(*(aNativeComponentInfo->iGlobalComponentId), Usif::KSoftwareTypeNative));
-		if (err == KErrNone)
+		componentEntry = scrSession.GetComponentL(*(aNativeComponentInfo->iGlobalComponentId), Usif::KSoftwareTypeNative);		
+		if (NULL != componentEntry)
 			{			
 			aNativeComponentInfo->iComponentId = componentEntry->ComponentId();
 			aNativeComponentInfo->iScomoState = static_cast<Usif::TScomoState>(componentEntry->ScomoState());
@@ -2068,7 +2068,7 @@
 		Usif::CComponentEntry* componentEntry = NULL;
 		HBufC* globalId = FormatGlobalIdLC(controllerInfo.Uid().Uid(), componentName, EInstInstallation);
 		componentEntry = aScrSession.GetComponentL(*globalId, Usif::KSoftwareTypeNative);
-		if (componentEntry != NULL)		
+		if (NULL != componentEntry)		
 			{
 			aNativeComponentInfo->iInstallStatus = Usif::ENewComponent;
 			}
@@ -2098,7 +2098,7 @@
 		stream.Open(*tempBuffer);
 		CleanupClosePushL(stream);		
 	
-		// Externalise the component info in to the stream		
+		// Externalise the component info in to the stream
 		TRAP(err, iInstallMachine.iNativeComponentInfo->ExternalizeL(stream));
 		if (err == KErrOverflow)
 			{
--- a/installationservices/swi/test/swicaptests/sishelperstarter.mmp	Tue Sep 28 14:48:39 2010 +0300
+++ b/installationservices/swi/test/swicaptests/sishelperstarter.mmp	Thu Oct 14 14:11:30 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"
@@ -84,7 +84,7 @@
 LIBRARY sisregistryclient.lib
 LIBRARY sisxfile.lib
 LIBRARY siscontroller.lib
-LIBRARY ImageConversion.lib
+LIBRARY imageconversion.lib
 LIBRARY securitymanager.lib
 LIBRARY cafdataprovider.lib
 LIBRARY swidataprovider.lib
Binary file installationservices/swiconfig/usif/scr/scr.db has changed
Binary file installationservices/swiconfig/usif/scr/update_db.dtd has changed
Binary file installationservices/swiconfig/usif/scr/update_db_production.xml has changed
--- a/installationservices/swiconfig/usif/siflauncher/siflauncher_reg.rss	Tue Sep 28 14:48:39 2010 +0300
+++ b/installationservices/swiconfig/usif/siflauncher/siflauncher_reg.rss	Thu Oct 14 14:11:30 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"
@@ -28,7 +28,7 @@
 	app_file="siflauncher";
 	localisable_resource_file="\\resource\\apps\\siflauncher_loc";
 
-	hidden=KAppNotHidden; 
+	hidden=KAppIsHidden; 
 	embeddability=KAppNotEmbeddable;
 	newfile=KAppDoesNotSupportNewFile;
 	datatype_list=
--- a/installationservices/swinstallationfw/test/tusif/group/createsisfiles.bat	Tue Sep 28 14:48:39 2010 +0300
+++ b/installationservices/swinstallationfw/test/tusif/group/createsisfiles.bat	Thu Oct 14 14:11:30 2010 +0300
@@ -53,6 +53,7 @@
 set UPGRADEWITHDRIVEDIALOG=sifintegrationtestupgradewithdrivedialog
 set EMBEDDEDINNERWITHUPGRADE=embeddedinnerwithupgrade
 set EMBEDDEDINNERWITHUPGRADEOUTERASBASEWITHDRIVEDIALOG=embeddedinnerwithupgradeouterasbasewithdrivedialog
+set COMPONENTINFOINTEGRATIONDIFFUID=sifcomponentinfointegration_diffuid
 set DUMMYTEXT=dummy
 
 set CREATESISCMD=createsis create -pass usif
@@ -82,6 +83,7 @@
 if not exist %DATADIR%\%UPGRADEWITHDRIVEDIALOG%.sis goto generate_sis_files
 if not exist %DATADIR%\%EMBEDDEDINNERWITHUPGRADE%.sis goto generate_sis_files
 if not exist %DATADIR%\%EMBEDDEDINNERWITHUPGRADEOUTERASBASEWITHDRIVEDIALOG%.sis goto generate_sis_files
+if not exist %DATADIR%\%COMPONENTINFOINTEGRATIONDIFFUID%.sis goto generate_sis_files
 goto:eof
 
 :generate_sis_files
@@ -118,6 +120,8 @@
 move %COMPONENTINFOINTEGRATIONSP%.sis %BUILDDIR%
 call %CREATESISEXISTINGCERTCMD% %EMPTYNAMEANDVENDOR%.pkg
 move %EMPTYNAMEANDVENDOR%.sis %BUILDDIR%
+call %CREATESISEXISTINGCERTCMD% %COMPONENTINFOINTEGRATIONDIFFUID%.pkg
+move %COMPONENTINFOINTEGRATIONDIFFUID%.sis %BUILDDIR%
 
 rem construct the embedded ackages inner to outer.
 call %CREATESISEXISTINGCERTCMD% %EMBEDDEDINNERBASE2%.pkg
@@ -181,6 +185,7 @@
 copy /y %UPGRADEWITHDRIVEDIALOG%.sis %DATADIR%\%UPGRADEWITHDRIVEDIALOG%.sis
 copy /y %EMBEDDEDINNERWITHUPGRADE%.sis %DATADIR%\%EMBEDDEDINNERWITHUPGRADE%.sis
 copy /y %EMBEDDEDINNERWITHUPGRADEOUTERASBASEWITHDRIVEDIALOG%.sis %DATADIR%\%EMBEDDEDINNERWITHUPGRADEOUTERASBASEWITHDRIVEDIALOG%.sis
+copy /y %COMPONENTINFOINTEGRATIONDIFFUID%.sis %DATADIR%\%COMPONENTINFOINTEGRATIONDIFFUID%.sis
 ) else (
 mkdir %ARMV5DATADIR%
 copy /y %BASE%.sis %ARMV5DATADIR%\%BASE%.sis
@@ -205,6 +210,7 @@
 copy /y %UPGRADEWITHDRIVEDIALOG%.sis %DATADIR%\%UPGRADEWITHDRIVEDIALOG%.sis
 copy /y %EMBEDDEDINNERWITHUPGRADE%.sis %DATADIR%\%EMBEDDEDINNERWITHUPGRADE%.sis
 copy /y %EMBEDDEDINNERWITHUPGRADEOUTERASBASEWITHDRIVEDIALOG%.sis %DATADIR%\%EMBEDDEDINNERWITHUPGRADEOUTERASBASEWITHDRIVEDIALOG%.sis
+copy /y %COMPONENTINFOINTEGRATIONDIFFUID%.sis %DATADIR%\%COMPONENTINFOINTEGRATIONDIFFUID%.sis
 )
 
 popd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swinstallationfw/test/tusif/scripts/data/sifcomponentinfointegration_diffuid.pkg	Thu Oct 14 14:11:30 2010 +0300
@@ -0,0 +1,29 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of 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:
+;
+;Languages
+&EN
+
+;Header
+#{"Sif Component Info Integration Test"}, (0x80545946), 1, 0, 0, TYPE=SA
+
+; Language-specific vendor names
+%{"Security Team"}
+
+; Unique, global vendor name
+:"Security Team"
+
+;Use a text file - using an executable file can break tests, as we compare installed size and executable's size can change easily
+"dummy.txt"-"c:\dummy.txt", FF
--- a/installationservices/swinstallationfw/test/tusif/scripts/tsifintegration.ini	Tue Sep 28 14:48:39 2010 +0300
+++ b/installationservices/swinstallationfw/test/tusif/scripts/tsifintegration.ini	Thu Oct 14 14:11:30 2010 +0300
@@ -513,6 +513,24 @@
 root.driveSelectionRequired=False
 root.noOfApps=0
 
+[GetCompInfoForSifComponentInfoIntegration_DiffUid]
+packageFile=z:\tusif\tsif\data\sifcomponentinfointegration_diffuid.sis
+operationByFileHandle=True
+root.softwareTypeName=native
+root.componentName=Sif Component Info Integration Test
+root.componentVersion=1.0.0
+root.componentVendor=Security Team
+root.scomoState=1
+root.installStatus=2
+root.componentId=1
+root.globalComponentId=80545946
+root.authenticity=1
+root.userGrantableCapsBitMask=0
+root.maxInstalledSize=165
+root.hasExecutable=False
+root.driveSelectionRequired=False
+root.noOfApps=0
+
 [InstallComponentInfoIntegByFileName]
 packageFile=z:\tusif\tsif\data\sifcomponentinfointegration.sis
 operationByFileHandle=False
--- a/installationservices/swinstallationfw/test/tusif/scripts/tsifintegration.script	Tue Sep 28 14:48:39 2010 +0300
+++ b/installationservices/swinstallationfw/test/tusif/scripts/tsifintegration.script	Thu Oct 14 14:11:30 2010 +0300
@@ -706,6 +706,21 @@
 
 END_TESTCASE API-SEC-USIF-tsifintegration-0050
 
+RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file
+
+// Get the component information, when the some component was already installed on the device,
+// for this component having same pkg name, vendor name but diff UID 
+//! @SYMTestCaseID 		API-SEC-USIF-tsifintegration-0051
+//! @SYMTestStatus 		3. Released
+
+START_TESTCASE API-SEC-USIF-tsifintegration-0051
+
+RUN_TEST_STEP 100 tUsifSuite SifInstallStep            z:\tusif\tsifintegration\tsifintegration.ini InstallComponentInfoIntegByFileName
+RUN_TEST_STEP 100 tUsifSuite SifGetComponentInfoStep   z:\tusif\tsifintegration\tsifintegration.ini GetCompInfoForSifComponentInfoIntegration_DiffUid
+RUN_TEST_STEP 100 tUsifSuite SifUninstallStep          z:\tusif\tsifintegration\tsifintegration.ini UninstallComponentInfoInteg
+
+END_TESTCASE API-SEC-USIF-tsifintegration-0051
+
 // Wait 3 seconds in order to let the SIF server shutdown itself
 DELAY 3000
 
--- a/installationservices/switestfw/test/autotesting/testMakesis.pl	Tue Sep 28 14:48:39 2010 +0300
+++ b/installationservices/switestfw/test/autotesting/testMakesis.pl	Thu Oct 14 14:11:30 2010 +0300
@@ -1,4 +1,5 @@
-#
+#!/usr/bin/perl
+#
 # Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -15,9 +16,18 @@
 # Perl script that creates PKG files and test MAKESIS tools with different ranges
 #
 
-$logFile = "/epoc32/winscw/c/makesis_test.txt";
-$makesisExeLocation = "/epoc32/tools/makesis";
-$dumpsisExeLocation = "/epoc32/tools/dumpsis";
+if ($^O =~ /^LINUX$/i)
+{
+	$logFile = "$ENV{EPOCROOT}/epoc32/winscw/c/makesis_test.txt";
+	$makesisExeLocation = "makesis";
+	$dumpsisExeLocation = "dumpsis";
+}
+else
+{
+	$logFile = "/epoc32/winscw/c/makesis_test.txt";
+	$makesisExeLocation = "/epoc32/tools/makesis";
+	$dumpsisExeLocation = "/epoc32/tools/dumpsis";
+}
 
 sub GetTmpFilesCount()
 {
@@ -304,7 +314,14 @@
 	$testembeddingsis = "testembedding.sis";
 	$testembeddedpkg = "testembedded.pkg";
 	$testembeddedsis = "testembedded.sis";
-	$sisFileToEmbed = "/epoc32/winscw/c/";
+	if ($^O =~ /^LINUX$/i)
+		{
+		$sisFileToEmbed = "$ENV{EPOCROOT}/epoc32/winscw/c/";
+		}
+	else
+		{
+		$sisFileToEmbed = "/epoc32/winscw/c/";
+		}
 	$outputFile = $sisFileToEmbed.$testembeddingsis;
 	$testEmbedLog = "testembedded.log";
 
@@ -457,7 +474,7 @@
 	$testembeddingsis = "testembedding.sis";
 	$testembeddedpkg = "testembedded.pkg";
 	$testembeddedsis = "testembedded.sis";
-	$sisFileToEmbed = "\\\\epoc32\\\\winscw\\\\c\\\\";
+	$sisFileToEmbed = "$ENV{EPOCROOT}/epoc32/winscw/c/";
 	$outputFile = $sisFileToEmbed.$testembeddingsis;
 	$testEmbedLog = "testembedded.log";
 
@@ -621,7 +638,7 @@
 
 	$NumberOfTests++;
 
-	my $file = "/epoc32/winscw/c/tswi/passed.txt";
+	my $file = "$ENV{EPOCROOT}/epoc32/winscw/c/tswi/passed.txt";
 	
 	WriteLog("Test for DEF091942 - makesis can not handle package files names written with japanese symbols\n");
 	
@@ -654,7 +671,72 @@
 	unlink("$pkgfile.pkg");
 }
 
-
+# Linux Test
+# Test code for  RC DEF577103 
+# Test case generates a SIS. Recreate the SIS file and checks the file access permissions. 
+# Make the SIS file readonly & then recreate the SIS file and checks the file access permissions. 
+ 
+sub TestLRCDEF577103{
+
+	$pkgfile = "/tmp/file.pkg";
+	$sisfile = "/tmp/file.sis";
+	$logfile = "/tmp/file.log";
+
+	$NumberOfTests++;
+
+	my $file = "$ENV{EPOCROOT}/epoc32/winscw/c/tswi/passed.txt";
+	
+	WriteLog("Test for RC DEF577103 - File access permission changes after makesis on an existing SIS file\n");
+	
+	# Generate test PKG file contents.
+	$PkgFile = sprintf( $PkgLanguageFileTemp); 
+	# Create PKG file
+	CreateFile($pkgfile, $PkgFile);
+
+	# Do MAKESIS
+	my $result = system("$makesisExeLocation $pkgfile $sisfile > $logfile");
+	
+	# Do MAKESIS (Re-create)
+	my $result1 = system("$makesisExeLocation $pkgfile $sisfile > $logfile");
+	
+	use File::stat;
+	$sb = stat($sisfile);
+	my $mode = $sb->mode & 07777;
+	
+	$logMsg = sprintf "Expected mode:%04o\n", $mode;
+	WriteLog( $logMsg);
+
+	# Make the SIS file readonly
+	chmod(0444, "$sisfile");
+	$sb = stat($sisfile);
+	my $mode1 = $sb->mode & 07777;
+	
+	$logMsg = sprintf "Read-only mode :%04o\n", $mode1;
+	WriteLog( $logMsg);
+	
+	# Do MAKESIS (Re-create)
+	my $result2 = system("$makesisExeLocation $pkgfile $sisfile > $logfile");
+	
+	$sb = stat($sisfile);
+	my $mode2 = $sb->mode & 07777;
+	
+	$logMsg = sprintf "Expected code:%5d   result Code:%5d  mode : %04o\n", $expectedResult, $?, $mode2;
+	WriteLog( $logMsg);
+	
+	#mode = 0664 if executed by user else mode = 0644 if executed by root depending upon umask
+	if( $? == $expectedResult && $result == 0 && $result1 == 0 && $result2 == 0 && $mode == 0664 && $mode1 == 0444 && $mode2 == 0664) {
+		$NumberOfPassed++;
+		WriteLog("Passed\n\n");
+	}
+	else {
+		$NumberOfFailed++;
+		WriteLog("Failed\n\n");
+	}	
+	
+	unlink("$pkgfile");
+	unlink("$sisfile");
+	unlink("$logfile");
+}
  
 #
 # New test code for DEF091780 - Makesis have problems parsing IF-ENDIF block
@@ -1046,7 +1128,7 @@
 #
 sub TestLDEF090912 {
 
-	my $path = "/epoc32/winscw/c/tswi";
+	my $path = "$ENV{EPOCROOT}/epoc32/winscw/c/tswi";
 	my $ucs2 = "$path/ナソト.txt";
 	my $pkgfile = "$path/ucs2jpn";
 	my $expectedResult = 0;
@@ -1545,10 +1627,17 @@
 	my $OutputData = "Processing $pkgFile...\n$DEF111264ExpectedOutput$trailingData";
 	
 	CreateFile($ExpectedLogFile ,$OutputData);
-
+	my $result = 0;
 	# Create a sis file
-	my $result = system("/epoc32/tools/makesis -s $pkgFile  $sisFile > $LogFile");
-
+	if ($^O =~ /^LINUX$/i)
+		{
+		$result = system("$ENV{EPOCROOT}/epoc32/tools/makesis -s $pkgFile  $sisFile > $LogFile");
+		}
+	else
+		{
+		$result = system("/epoc32/tools/makesis -s $pkgFile  $sisFile > $LogFile");
+		}
+	
 	use File::Compare;
 	my $result1;
 	
@@ -1604,8 +1693,7 @@
 	CreateFile($pkgEmbeddedFile, $PkgFile);	
 
 	# Create SIS file for the embedded package of type = PA.
-	my $result = system("/epoc32/tools/makesis $pkgEmbeddedFile $sisEmbeddedFile > $LogFile");
-
+	my $result = system("makesis $pkgEmbeddedFile $sisEmbeddedFile > $LogFile");
 	# Generate test PKG file contents for embedding pkg file.
 	$PkgFile = sprintf( $EmbeddingPApkgFile, "-1,-1,-1"); 
 	
@@ -1613,7 +1701,7 @@
 	CreateFile($pkgFile , $PkgFile);	
 	
 	# Create SIS file for the embedding package of type = SA.
-	my $result1 = system("/epoc32/tools/makesis $pkgFile $sisFile > $LogFile");
+	my $result1 = system("makesis $pkgFile $sisFile > $LogFile");
 	
 	my $OutputData = "Processing $pkgFile...\n$DEF113349ExpectedOutput";
 	
@@ -1728,7 +1816,7 @@
 	CreateFile($pkgEmbeddedFile, $PkgFile);	
 
 	# Create SIS file for the embedded package.
-	my $result = system("/epoc32/tools/makesis $pkgEmbeddedFile $sisEmbeddedFile > $LogFile");
+	my $result = system("makesis $pkgEmbeddedFile $sisEmbeddedFile > $LogFile");
 
 	# Generate test PKG file contents for embedding pkg file.
 	$PkgFile = sprintf( $PkgFileInterpretsisVersionTemplate, "-1,-1,-1"); 
@@ -1737,7 +1825,7 @@
 	CreateFile($pkgFile , $PkgFile);	
 	
 	# Create SIS file for the embedding package of type = SA.
-	my $result1 = system("/epoc32/tools/makesis -c $pkgFile $sisFile > $LogFile");
+	my $result1 = system("makesis -c $pkgFile $sisFile > $LogFile");
 	
 	# Create expected log file
 	my $trailingData = "Created  $sisFile.";
@@ -1782,8 +1870,15 @@
 # New test code for DEF145101 - MakeSIS cannot handle package files that contain large (>1000) language codes.
 # 
 sub TestDEF145101 {
-
-	my $path = "/epoc32/winscw/c/tswi";
+	my $path;
+	if ($^O =~ /^LINUX$/i)
+		{
+		$path = "$ENV{EPOCROOT}/epoc32/winscw/c/tswi";
+		}
+	else
+		{
+		$path = "/epoc32/winscw/c/tswi";
+		}
 	my $pkgfile = "$path/largelanguagecodes";
 	my $expectedResult = 0;
 
@@ -3021,6 +3116,11 @@
 
 TestLDEF104895();
 
+#
+# Test for RC DEF577103
+#
+TestLRCDEF577103();
+
 }
 
 
--- a/ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -495,9 +495,9 @@
         }
          
     Usif::CComponentEntry* entry = Usif::CComponentEntry::NewLC();
-    TRAPD(err, iScrSession.GetComponentL(compId, *entry));
+    TRAPD(err, retVal = iScrSession.GetComponentL(compId, *entry));
     
-    if ( err == KErrNotFound )
+    if ( err == KErrNotFound || !retVal )
         {
         retVal = EFalse;
         }
@@ -1962,14 +1962,17 @@
         // Get widget
         Usif::TComponentId compId = widgetComponentIdList[i];
         Usif::CComponentEntry* entry = Usif::CComponentEntry::NewLC();
-        iScrSession.GetComponentL(compId, *entry);
+        TBool retVal = iScrSession.GetComponentL(compId, *entry);
         
-        // Fill id & version
-        tempInfo->iUid.iUid= compId;
-        *(tempInfo->iVersion) = entry->Version();
+        if ( retVal )
+            {
+            // Fill id & version
+            tempInfo->iUid.iUid= compId;
+            *(tempInfo->iVersion) = entry->Version();
         
-        // Append to arrayt
-        aWidgets.AppendL( tempInfo );
+            // Append to arrayt
+            aWidgets.AppendL( tempInfo );
+            }
         
         CleanupStack::PopAndDestroy(entry);
         CleanupStack::Pop( tempInfo );
@@ -2115,7 +2118,7 @@
     // Get entry 
     Usif::TComponentId compId = aUid.iUid;
     Usif::CComponentEntry* entry = Usif::CComponentEntry::NewLC();
-    TRAPD(err, iScrSession.GetComponentL(compId, *entry));
+    TRAPD(err, retVal = iScrSession.GetComponentL(compId, *entry));
     
     if ( err == KErrNotFound || !retVal )
         {
Binary file secureswitools/swisistools/source/dbmanager/sqlite/sqlite-3.6.1.so has changed
--- a/secureswitools/swisistools/source/interpretsislib/sisregistryobject.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/sisregistryobject.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -124,11 +124,12 @@
 {
 	for( InstallableFiles::const_iterator curr = aFiles.begin(); curr != aFiles.end(); ++curr )
 	{	
-		InstallableFile* installableFile= *curr;	
+		InstallableFile* installableFile= *curr;
+		TUint32 sid = ((installableFile->IsExe())?(installableFile->Sid()):0);
 		#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
-		FileDescription* f = new FileDescription(*installableFile->FileDescription() , installableFile->Sid(), aTargetDrive, installableFile->GetTarget());
+		FileDescription* f = new FileDescription(*installableFile->FileDescription() , sid, aTargetDrive, installableFile->GetTarget());
 		#else
-		FileDescription* f = new FileDescription(*installableFile->FileDescription() , installableFile->Sid(), aTargetDrive, installableFile->GetTarget(),installableFile->GetLocalTarget());
+		FileDescription* f = new FileDescription(*installableFile->FileDescription() , sid, aTargetDrive, installableFile->GetTarget(),installableFile->GetLocalTarget());
 		#endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 		iFileDescriptions.push_back(f);
 	}
@@ -733,7 +734,7 @@
 	for(InstallableFiles::const_iterator curr = aFiles.begin(); curr != aFiles.end(); ++curr )
 	{	
 		InstallableFile* installableFile= *curr;
-		TUint32 sid = installableFile->Sid();
+		TUint32 sid = ((installableFile->IsExe())?(installableFile->Sid()):0);
 		#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 		FileDescription* f = new FileDescription(*installableFile->FileDescription() , sid, iSelectedDrive, installableFile->GetTarget(),installableFile->GetLocalTarget());
 		#else
@@ -758,7 +759,7 @@
 	for(InstallableFiles::const_iterator curr = aFiles.begin(); curr != aFiles.end(); ++curr )
 	{	
 		InstallableFile* installableFile= *curr;
-		TUint32 sid = installableFile->Sid();
+		TUint32 sid = ((installableFile->IsExe())?(installableFile->Sid()):0);
 		#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 		FileDescription f = FileDescription(*installableFile->FileDescription(), sid,
 											iSelectedDrive, installableFile->GetTarget(),installableFile->GetLocalTarget());
--- a/secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp	Tue Sep 28 14:48:39 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp	Thu Oct 14 14:11:30 2010 +0300
@@ -300,7 +300,14 @@
 		}
 	else if(creation == CREATE_ALWAYS) 
 		{
-		fd = creat(filename, 0664);
+		fd = creat(filename, 0666);
+		//Set access right depending on umask after 
+		//re-creating (file already exists) the file.
+		mode_t oldMask,mode;
+		oldMask = umask(0002);
+		umask(oldMask);
+		mode = ((0666) & (~oldMask));
+		chmod(filename, mode);
 		}
 	else 
 		{
@@ -394,10 +401,10 @@
 	 return ret;
 	 }
 	 if(mode == _S_IWRITE || mode == _S_IWRITE | _S_IREAD)
-		chmod(tmp,S_IWUSR);
+		chmod(tmp,0666);
 	 else 
 		if(mode == _S_IREAD)
-		  chmod(tmp,S_IRUSR);   
+		  chmod(tmp,0444);   
 	 
 	ret = mbstowcs(const_cast<wchar_t*>(filename),tmp,sizeof(tmp));
 	
Binary file secureswitools/swisistools/source/xmlparser/xerces/lib/libxerces_linux.a has changed