iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp
branchRCL_3
changeset 66 8b7f4e561641
parent 65 7333d7932ef7
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp	Tue Aug 31 15:21:33 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwupdatehandler.cpp	Wed Sep 01 12:22:02 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -15,9 +15,12 @@
 *
 */
 
-#include <e32base.h>
+
+#include <iaupdate.rsg>
+#include <StringLoader.h> 
+#include <aknmessagequerydialog.h>
+#include <aknnotewrappers.h>
 #include <DevManInternalCRKeys.h>
-#include <centralrepository.h>
 #include <e32property.h>
 
 #include "iaupdatefwupdatehandler.h"
@@ -136,7 +139,24 @@
         {
         case ENSU:
             {          
-                      
+            HBufC* text1 = StringLoader::LoadLC( R_IAUPDATE_INFO_NSU_1 );  
+            HBufC* text2 = StringLoader::LoadLC( R_IAUPDATE_INFO_NSU_2 );
+            
+            HBufC* text = HBufC::NewLC( text1->Length() +
+                                        text2->Length() );
+                
+            text->Des() += *text1;
+            text->Des() += *text2;
+
+            HBufC* heading = StringLoader::LoadLC( R_IAUPDATE_NEW_SW_TITLE );
+     
+            ShowDialogL( *text, *heading );
+            
+            CleanupStack::PopAndDestroy( heading ); //text, heading
+            CleanupStack::PopAndDestroy( text );
+            CleanupStack::PopAndDestroy( text2 );
+            CleanupStack::PopAndDestroy( text1 );
+          
             break;
             }
         case EFOTA:
@@ -155,7 +175,7 @@
                 if ( ( fotamodelstate != RFotaEngineSession::EDownloadComplete ) && ( fotamodelstate != RFotaEngineSession::EStartingUpdate ) )
                     {
 		                //if download is suspended, try to resume it.
-		                if ( fotamodelstate == RFotaEngineSession::EDownloadProgressing)
+		                if ( fotamodelstate == RFotaEngineSession::EDownloadProgressingWithResume)
 		                    {
 		                    TInt result = iFotaModel->TryResumeFwUpdDownload();
 						            FLOG_NUM( "[IAUPDATEFW] TryResumeFwUpdDownload result  = %d", result );   
@@ -210,9 +230,16 @@
 //  CIAUpdateFWUpdateHandler::ShowDialogL()
 // -----------------------------------------------------------------------------
 //
-void CIAUpdateFWUpdateHandler::ShowDialogL(TDesC& /*aText*/, TDesC& /*aHeading*/ )
+void CIAUpdateFWUpdateHandler::ShowDialogL(TDesC& aText, TDesC& aHeading )
     {  
-    
+    CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( aText );
+
+    dlg->PrepareLC( R_IAUPDATE_MESSAGE_QUERY );
+
+    CAknPopupHeadingPane* headingPane = dlg->Heading();
+    headingPane->SetTextL( aHeading );
+	    
+    TInt ret = dlg->RunLD();
     }
         
 
@@ -258,12 +285,12 @@
     if (error != KErrNone)
         {
 
-        //CAknInformationNote* queryDialog = new (ELeave) CAknInformationNote;
+        CAknInformationNote* queryDialog = new (ELeave) CAknInformationNote;
         
-        //HBufC* error = HBufC::NewL(20);
-        //          TPtr ptrerror = error->Des();
-        //          ptrerror.Copy(_L("sync problem")); 
-        //queryDialog->ExecuteLD( *error  );
+        HBufC* error = HBufC::NewL(20);
+                  TPtr ptrerror = error->Des();
+                  ptrerror.Copy(_L("sync problem")); 
+        queryDialog->ExecuteLD( *error  );
         }
     }