iaupdate/IAD/ui/src/iaupdateuicontroller.cpp
branchRCL_3
changeset 66 8b7f4e561641
parent 65 7333d7932ef7
equal deleted inserted replaced
65:7333d7932ef7 66:8b7f4e561641
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 
    20 
    21 // INCLUDES
    21 // INCLUDES
       
    22 #include <avkon.hrh>
       
    23 #include <StringLoader.h> 
    22 #include <centralrepository.h>
    24 #include <centralrepository.h>
       
    25 #include <AknUtils.h>
    23 #include <SWInstDefs.h>
    26 #include <SWInstDefs.h>
       
    27 #include <avkon.rsg>
    24 #include <featurecontrol.h>
    28 #include <featurecontrol.h>
    25 #include <cmmanager.h>
    29 #include <cmmanager.h>
    26 #include <qapplication.h>
    30 #include <iaupdate.rsg>
    27 #include <hbaction.h>
       
    28 #include <hbprogressdialog.h>
       
    29 #include <iaupdateparameters.h>
    31 #include <iaupdateparameters.h>
    30 
    32 
    31 #include "iaupdateuicontroller.h"
    33 #include "iaupdateuicontroller.h"
    32 #include "iaupdateuicontrollerobserver.h"
    34 #include "iaupdateuicontrollerobserver.h"
       
    35 #include "iaupdateappui.h"
    33 #include "iaupdate.hrh"
    36 #include "iaupdate.hrh"
       
    37 #include "iaupdatewaitdialog.h"
       
    38 #include "iaupdateprogressdialog.h"
    34 #include "iaupdatenode.h"
    39 #include "iaupdatenode.h"
    35 #include "iaupdatefwnode.h"
    40 #include "iaupdatefwnode.h"
    36 #include "iaupdatebasenode.h"
    41 #include "iaupdatebasenode.h"
    37 #include "iaupdatenodefilter.h"
    42 #include "iaupdatenodefilter.h"
    38 #include "iaupdatefactory.h"
    43 #include "iaupdatefactory.h"
    39 #include "iaupdatestarter.h"
    44 #include "iaupdatestarter.h"
    40 #include "iaupdateprivatecrkeys.h"
    45 #include "iaupdateprivatecrkeys.h"
    41 #include "iaupdatecontrollerfile.h"
    46 #include "iaupdatecontrollerfile.h"
    42 #include "iaupdateuiconfigdata.h"
    47 #include "iaupdateuiconfigdata.h"
       
    48 #include "iaupdatedialogutil.h"
    43 #include "iaupdateutils.h"
    49 #include "iaupdateutils.h"
    44 #include "iaupdateagreement.h"
    50 #include "iaupdateagreement.h"
    45 #include "iaupdateautomaticcheck.h"
    51 #include "iaupdateautomaticcheck.h"
    46 #include "iaupdateroaminghandler.h"
    52 #include "iaupdateroaminghandler.h"
    47 #include "iaupdatependingnodesfile.h"
    53 #include "iaupdatependingnodesfile.h"
    49 #include "iaupdaterresultsfile.h"
    55 #include "iaupdaterresultsfile.h"
    50 #include "iaupdaterresult.h"
    56 #include "iaupdaterresult.h"
    51 #include "iaupdateridentifier.h"
    57 #include "iaupdateridentifier.h"
    52 #include "iaupdateruids.h"
    58 #include "iaupdateruids.h"
    53 #include "iaupdaterdefs.h"
    59 #include "iaupdaterdefs.h"
       
    60 #include "iaupdatetools.h"
    54 #include "iaupdateparametersfilemanager.h"
    61 #include "iaupdateparametersfilemanager.h"
    55 #include "iaupdateerrorcodes.h"
    62 #include "iaupdateerrorcodes.h"
    56 #include "iaupdatefileconsts.h"
    63 #include "iaupdatefileconsts.h"
    57 #include "iaupdatefirsttimeinfo.h"
    64 #include "iaupdatefirsttimeinfo.h"
    58 #include "iaupdaterefreshhandler.h"
    65 #include "iaupdaterefreshhandler.h"
    59 #include "iaupdatenodeid.h"
    66 #include "iaupdatenodeid.h"
    60 #include "iaupdatewaitdialog.h"
       
    61 #include "iaupdatedialogutil.h"
       
    62 #include "iaupdatedebug.h"
    67 #include "iaupdatedebug.h"
    63 
    68 
    64 
    69 
    65 // cenrep in emulator:
    70 // cenrep in emulator:
    66 // copy 2000F85A.txt to '\epoc32\release\winscw\udeb\Z\private\10202be9\'
    71 // copy 2000F85A.txt to '\epoc32\release\winscw\udeb\Z\private\10202be9\'
   245 CIAUpdateUiController::~CIAUpdateUiController()
   250 CIAUpdateUiController::~CIAUpdateUiController()
   246     {    
   251     {    
   247     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::~CIAUpdateUiController() begin");
   252     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::~CIAUpdateUiController() begin");
   248 
   253 
   249     CancelOperation();
   254     CancelOperation();
   250     delete mWaitDialog;
       
   251     delete iController;
   255     delete iController;
   252     iNodes.Reset();
   256     iNodes.Reset();
   253     iFwNodes.Reset();
   257     iFwNodes.Reset();
   254     iSelectedNodesArray.Reset();
   258     iSelectedNodesArray.Reset();
   255     iServicePackNodes.Reset();
   259     iServicePackNodes.Reset();
   260     delete iStarter;
   264     delete iStarter;
   261     delete iConfigData;
   265     delete iConfigData;
   262     delete iRoamingHandler;
   266     delete iRoamingHandler;
   263     delete iParams;
   267     delete iParams;
   264     delete iRefreshHandler;
   268     delete iRefreshHandler;
   265     delete mDialogUtil;
       
   266 
   269 
   267     // If dialogs have not been released yet, release them now.
   270     // If dialogs have not been released yet, release them now.
   268     // ProcessFinishedL() should normally be used for dialogs but
   271     // ProcessFinishedL() should normally be used for dialogs but
   269     // here just use non-leaving delete. In normal cases, dialogs should
   272     // here just use non-leaving delete. In normal cases, dialogs should
   270     // already be released in the end of the update flow before coming here.
   273     // already be released in the end of the update flow before coming here.
   271     //delete iWaitDialog;
   274     delete iWaitDialog;
   272     //delete iProgressDialog;
   275     delete iProgressDialog;
   273         
   276         
   274 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::~CIAUpdateUiController() end");
   277 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::~CIAUpdateUiController() end");
   275     }        
   278     }        
   276 
   279 
   277 
   280 
   308 // ---------------------------------------------------------------------------
   311 // ---------------------------------------------------------------------------
   309 //
   312 //
   310 void CIAUpdateUiController::CheckUpdatesL()
   313 void CIAUpdateUiController::CheckUpdatesL()
   311     {
   314     {
   312     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::CheckUpdatesL() begin");
   315     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::CheckUpdatesL() begin");
   313     
   316 
   314     iCountOfAvailableUpdates = 0;
   317     iCountOfAvailableUpdates = 0;
   315     
   318     
   316     if ( iParams )
   319     if ( iParams )
   317         {
   320         {
   318     	iFilter->SetFilterParams( iParams ); //iParams ownership is changed
   321     	iFilter->SetFilterParams( iParams ); //iParams ownership is changed
   319     	iParams = NULL;
   322     	iParams = NULL;
   320         }
   323         }
   321      
   324      
   322     TBool agreementAccepted( EFalse );
   325     TBool agreementAccepted( EFalse ); 
   323     if ( !ForcedRefresh() )
   326     if ( !ForcedRefresh() )
   324         {
   327         {
   325         CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC();
   328         CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC();
   326         agreementAccepted = agreement->AgreementAcceptedL();
   329         agreementAccepted = agreement->AgreementAcceptedL();
   327         if ( ( !agreementAccepted )&& ( iRequestType != IAUpdateUiDefines::ECheckUpdates ) )
   330         if ( ( !agreementAccepted )&& ( iRequestType != IAUpdateUiDefines::ECheckUpdates ) )
   329             // agreement (disclaimer) dialog is not prompted when CheckUpdates is called
   332             // agreement (disclaimer) dialog is not prompted when CheckUpdates is called
   330             //
   333             //
   331             // Refresh from network is allowed when first time case 
   334             // Refresh from network is allowed when first time case 
   332             iRefreshFromNetworkDenied = EFalse;
   335             iRefreshFromNetworkDenied = EFalse;
   333             agreementAccepted = agreement->AcceptAgreementL();  
   336             agreementAccepted = agreement->AcceptAgreementL();  
   334             if (!agreementAccepted)
       
   335                 {
       
   336                 if ( !mDialogUtil )
       
   337                     {
       
   338                     mDialogUtil = new IAUpdateDialogUtil(NULL, this);
       
   339                     }
       
   340                 if ( mDialogUtil )
       
   341                     {
       
   342                     mPrimaryAction = NULL;
       
   343                     //mPrimaryAction = new HbAction(hbTrId("txt_software_button_accept"));
       
   344 					mPrimaryAction = new HbAction("Accept");
       
   345                     HbAction *secondaryAction = NULL;
       
   346                     //secondaryAction = new HbAction(hbTrId("txt_software_button_decline"));
       
   347 					secondaryAction = new HbAction("Decline");
       
   348                     mDialogUtil->showAgreement(mPrimaryAction,secondaryAction);
       
   349                     iDialogState = EAgreement;
       
   350                     }
       
   351                 }
       
   352             }
   337             }
   353         CleanupStack::PopAndDestroy( agreement );
   338         CleanupStack::PopAndDestroy( agreement );
   354         }
   339         }
   355     if ( iDialogState != EAgreement )
   340   	             
   356         {
       
   357         AgreementHandledL();
       
   358         }
       
   359     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::CheckUpdatesL() end");
       
   360     return;
       
   361     }
       
   362 
       
   363 // ---------------------------------------------------------------------------
       
   364 // CIAUpdateUiController:: AgreementHandledL
       
   365 // Updates the update item list.
       
   366 // ---------------------------------------------------------------------------
       
   367 //
       
   368 void CIAUpdateUiController::AgreementHandledL()
       
   369     {
       
   370     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::AgreementHandledL() begin");
       
   371     TBool agreementAccepted( EFalse );
       
   372     CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC();
       
   373     agreementAccepted = agreement->AgreementAcceptedL();
       
   374     CleanupStack::PopAndDestroy( agreement );        
       
   375     if ( !agreementAccepted && !ForcedRefresh() )
   341     if ( !agreementAccepted && !ForcedRefresh() )
   376         {
   342         {
   377         if ( iRequestType == IAUpdateUiDefines::ECheckUpdates )
   343         if ( iRequestType == IAUpdateUiDefines::ECheckUpdates )
   378             {
   344             {
   379             CIAUpdateAutomaticCheck* automaticCheck = CIAUpdateAutomaticCheck::NewLC();
   345             CIAUpdateAutomaticCheck* automaticCheck = CIAUpdateAutomaticCheck::NewLC();
   390        	    iObserver.UpdateCompleteL( KErrNone ); 
   356        	    iObserver.UpdateCompleteL( KErrNone ); 
   391        	    return;
   357        	    return;
   392        	    }
   358        	    }
   393        	else
   359        	else
   394        	    {
   360        	    {
   395        	    qApp->quit();
   361        	    CIAUpdateAppUi* appUi = 
       
   362        	            static_cast< CIAUpdateAppUi* >( iEikEnv->EikAppUi() );
       
   363             appUi->Exit();
   396        	    return;	
   364        	    return;	
   397        	    }
   365        	    }
   398         }
   366         }
   399     if ( iRequestType == IAUpdateUiDefines::ECheckUpdates && 
   367     if ( iRequestType == IAUpdateUiDefines::ECheckUpdates && 
   400          AllowNetworkRefreshL() && 
   368          AllowNetworkRefreshL() && 
   431             // and new startup should not be called. Also, leave in that case.
   399             // and new startup should not be called. Also, leave in that case.
   432             User::LeaveIfError( ret );	
   400             User::LeaveIfError( ret );	
   433             }	
   401             }	
   434         }
   402         }
   435 
   403 
   436     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::AgreementHandledL() end");
   404     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::CheckUpdatesL() end");
   437     }
   405     }
   438 
   406 
   439 
   407 
   440 // ---------------------------------------------------------------------------
   408 // ---------------------------------------------------------------------------
   441 // CIAUpdateUiController::StartUpdateL
   409 // CIAUpdateUiController::StartUpdateL
   453 
   421 
   454     CreateSelectedNodesArrayL();
   422     CreateSelectedNodesArrayL();
   455                 
   423                 
   456     if ( !IAUpdateUtils::SpaceAvailableInInternalDrivesL( iSelectedNodesArray ) )
   424     if ( !IAUpdateUtils::SpaceAvailableInInternalDrivesL( iSelectedNodesArray ) )
   457         {
   425         {
   458         if ( !mDialogUtil )
   426   	    HBufC* noteText = NULL;
   459             {
   427         noteText = StringLoader::LoadLC( R_IAUPDATE_INSUFFICIENT_MEMORY );
   460             mDialogUtil = new IAUpdateDialogUtil(NULL, this);
   428         IAUpdateDialogUtil::ShowInformationQueryL( *noteText ); 
   461             }
   429         CleanupStack::PopAndDestroy( noteText );
   462         if ( mDialogUtil )
       
   463             {
       
   464             mPrimaryAction = NULL;
       
   465             mPrimaryAction = new HbAction(hbTrId("txt_common_button_ok"));
       
   466             //mDialogUtil->showInformation(hbTrId("txt_software_info_insufficient_memory_free_some_m"), mPrimaryAction);
       
   467 			mDialogUtil->showInformation(QString("Insufficient memory. Free some memory and try again."), mPrimaryAction);
       
   468             iDialogState = EInsufficientMemory;
       
   469             }
       
   470         }
   430         }
   471     else
   431     else
   472         {
   432         {
   473         if ( !IsStartedByLauncher() )
   433         if ( !IsStartedByLauncher() )
   474             {
   434             {
   483             }
   443             }
   484         // Inform the controller that we are now starting updates. This way the
   444         // Inform the controller that we are now starting updates. This way the
   485         // controller can handle situations as a whole and not as one item at the
   445         // controller can handle situations as a whole and not as one item at the
   486         // time.
   446         // time.
   487         iController->StartingUpdatesL();
   447         iController->StartingUpdatesL();
   488         
   448             
   489         //Store current node list before update
       
   490         iFilter->StoreNodeListL( iNodes );
       
   491         
       
   492         iFilter->SortSelectedNodesFirstL( iSelectedNodesArray, iNodes );
       
   493                     
       
   494         iFileInUseError = EFalse;
   449         iFileInUseError = EFalse;
   495         // Set the node index to -1 because ContinueUpdateL increases it by one
   450         // Set the node index to -1 because ContinueUpdateL increases it by one
   496         // in the beginning of the function. So, we can use the ContinueUpdateL
   451         // in the beginning of the function. So, we can use the ContinueUpdateL
   497         // also in here.
   452         // also in here.
   498         iNodeIndex = -1;
   453         iNodeIndex = -1;
   552             MIAUpdateNode* selectedNode = iSelectedNodesArray[ iNodeIndex ];
   507             MIAUpdateNode* selectedNode = iSelectedNodesArray[ iNodeIndex ];
   553 
   508 
   554             // Only update items that have not been installed yet.
   509             // Only update items that have not been installed yet.
   555             if ( !selectedNode->IsInstalled() )
   510             if ( !selectedNode->IsInstalled() )
   556                 {
   511                 {
   557                 IAUPDATE_TRACE("[IAUPDATE] Item not installed yet"); 
   512                 IAUPDATE_TRACE("[IAUPDATE] Item not installed yet");    
   558                 iFilter->SortThisNodeFirstL( selectedNode, iNodes );
       
   559                 if ( !selectedNode->IsDownloaded() )
   513                 if ( !selectedNode->IsDownloaded() )
   560                     {
   514                     {
   561                     // Because content has not been downloaded or installed yet,
   515                     // Because content has not been downloaded or installed yet,
   562                     // it needs to be downloaded before it can be installed.
   516                     // it needs to be downloaded before it can be installed.
   563                     IAUPDATE_TRACE("[IAUPDATE] Download");
   517                     IAUPDATE_TRACE("[IAUPDATE] Download");
   564                     selectedNode->DownloadL( *this );
   518                     selectedNode->DownloadL( *this );
   565                     iState = EDownloading;
   519                     iState = EDownloading;
   566                     iClosingAllowedByClient = ETrue;
   520                     iClosingAllowedByClient = ETrue;
   567                     selectedNode->SetUiState( MIAUpdateNode::EDownloading );
   521                     ShowUpdatingDialogL( R_IAUPDATE_DOWNLOADING_NOTE,
   568                     iObserver.RefreshUI();
   522                                          selectedNode->Base().Name(),
       
   523                                          iNodeIndex + 1,
       
   524                                          iSelectedNodesArray.Count() ); 
   569                     nextUpdate = EFalse;
   525                     nextUpdate = EFalse;
   570                     }
   526                     }
   571                 else
   527                 else
   572                     {
   528                     {
   573                     // Because content has been downloaded but not installed yet,
   529                     // Because content has been downloaded but not installed yet,
   574                     // it needs to be installed now.
   530                     // it needs to be installed now.
   575                     IAUPDATE_TRACE("[IAUPDATE] Install");
   531                     IAUPDATE_TRACE("[IAUPDATE] Install");
   576                     selectedNode->InstallL( *this );
   532                     selectedNode->InstallL( *this );
   577                     iState = EInstalling;
   533                     iState = EInstalling;
   578                     iClosingAllowedByClient = EFalse;
   534                     iClosingAllowedByClient = EFalse;
   579                     selectedNode->SetUiState( MIAUpdateNode::EInstalling );
   535                     CIAUpdateAppUi* appUi = 
   580                     iObserver.RefreshUI();
   536                         static_cast< CIAUpdateAppUi* >( iEikEnv->EikAppUi() );
       
   537                     appUi->StartWGListChangeMonitoring();
       
   538                     ShowUpdatingDialogL( R_IAUPDATE_INSTALLING_NOTE,
       
   539                                          selectedNode->Base().Name(),
       
   540                                          iNodeIndex + 1,
       
   541                                          iSelectedNodesArray.Count() ); 
   581                     nextUpdate = EFalse;                     
   542                     nextUpdate = EFalse;                     
   582                     }      
   543                     }      
   583                 }
   544                 }
   584             }
   545             }
   585         else
   546         else
   609         aNode.GetDependenciesL( iServicePackNodes, ETrue );
   570         aNode.GetDependenciesL( iServicePackNodes, ETrue );
   610         }
   571         }
   611             
   572             
   612     aNode.InstallL( *this );
   573     aNode.InstallL( *this );
   613     iState = EInstalling;
   574     iState = EInstalling;
   614     aNode.SetUiState( MIAUpdateNode::EInstalling );
   575     CIAUpdateAppUi* appUi = static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
   615     iObserver.RefreshUI();
   576     appUi->StartWGListChangeMonitoring();
   616         
   577     iClosingAllowedByClient = EFalse;
       
   578     ShowUpdatingDialogL( R_IAUPDATE_INSTALLING_NOTE,
       
   579                          aNode.Base().Name(),
       
   580                          iNodeIndex + 1,
       
   581                          iSelectedNodesArray.Count()  );
       
   582     
   617 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::StartInstallL() end");
   583 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::StartInstallL() end");
   618     }
   584     }
   619 
   585 
   620     
   586     
   621 // ---------------------------------------------------------------------------
   587 // ---------------------------------------------------------------------------
   646                 {
   612                 {
   647                 // to avoid flickering IAD is brought to foreground only when wait dialog is really shown
   613                 // to avoid flickering IAD is brought to foreground only when wait dialog is really shown
   648                 if ( allowNetworkRefresh )
   614                 if ( allowNetworkRefresh )
   649                     {
   615                     {
   650                     iEikEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );
   616                     iEikEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal );
   651                     ShowWaitDialogL( "Refreshing updates list", ETrue );
   617                     HBufC* noteText = StringLoader::LoadLC( R_IAUPDATE_REFRESHING_UPDATE_LIST );
       
   618                     ShowWaitDialogL( *noteText, ETrue );
       
   619                     CleanupStack::PopAndDestroy( noteText );
   652                     }
   620                     }
   653                 }
   621                 }
   654             }
   622             }
   655         else
   623         else
   656             {
   624             {
   657             ShowWaitDialogL( "Refreshing updates list", ETrue );
   625             HBufC* noteText = StringLoader::LoadLC( R_IAUPDATE_REFRESHING_UPDATE_LIST );
       
   626             ShowWaitDialogL( *noteText, EFalse );
       
   627             CleanupStack::PopAndDestroy( noteText );
   658             }
   628             }
   659         }
   629         }
   660     
   630     
   661        
   631        
   662 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::StartRefreshL() end");
   632 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::StartRefreshL() end");
  1331             }
  1301             }
  1332         }
  1302         }
  1333 
  1303 
  1334     if ( aErrorCode == IAUpdaterDefs::KIAUpdaterShutdownRequest )
  1304     if ( aErrorCode == IAUpdaterDefs::KIAUpdaterShutdownRequest )
  1335         {
  1305         {
  1336         //CIAUpdateAppUi* appUi = static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
  1306         CIAUpdateAppUi* appUi = static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
  1337     	//appUi->Exit();
  1307     	appUi->Exit();
  1338         }
  1308         }
  1339 
  1309 
  1340     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::SelfUpdaterComplete() end");
  1310     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::SelfUpdaterComplete() end");
  1341     }
  1311     }
  1342 
  1312 
  1384 // CIAUpdateUiController::DownloadProgress
  1354 // CIAUpdateUiController::DownloadProgress
  1385 // 
  1355 // 
  1386 // -----------------------------------------------------------------------------
  1356 // -----------------------------------------------------------------------------
  1387 //
  1357 //
  1388 void CIAUpdateUiController::DownloadProgress( MIAUpdateNode& /*aNode*/, 
  1358 void CIAUpdateUiController::DownloadProgress( MIAUpdateNode& /*aNode*/, 
  1389                                               TUint /*aProgress*/,
  1359                                               TUint aProgress,
  1390                                               TUint /*aMaxProgress*/ )
  1360                                               TUint aMaxProgress )
  1391     {
  1361     {
  1392     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::DownloadProgress() begin");  
  1362     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::DownloadProgress() begin");  
  1393 
  1363 
  1394     if ( iProgressDialog )
  1364     if ( iProgressDialog )
  1395         {
  1365         {
  1396     	//TRAP_IGNORE ( iProgressDialog->SetProgressDialogFinalValueL( aMaxProgress ) );
  1366     	TRAP_IGNORE ( iProgressDialog->SetProgressDialogFinalValueL( aMaxProgress ) );
  1397         //TRAP_IGNORE ( iProgressDialog->UpdateProgressDialogValueL( aProgress ) );
  1367         TRAP_IGNORE ( iProgressDialog->UpdateProgressDialogValueL( aProgress ) );
  1398         }
  1368         }
  1399 
  1369 
  1400     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::DownloadProgress() end");  
  1370     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::DownloadProgress() end");  
  1401     }                            
  1371     }                            
  1402 
  1372 
  1448                                              TInt aError )  
  1418                                              TInt aError )  
  1449     {
  1419     {
  1450     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::InstallComplete() begin");
  1420     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::InstallComplete() begin");
  1451 
  1421 
  1452     iState = EIdle;
  1422     iState = EIdle;
  1453     //CIAUpdateAppUi* appUi = static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
  1423     CIAUpdateAppUi* appUi = static_cast<CIAUpdateAppUi*>( iEikEnv->EikAppUi() );
  1454     //appUi->StopWGListChangeMonitoring();
  1424     appUi->StopWGListChangeMonitoring();
  1455     if ( aError == SwiUI::KSWInstErrFileInUse )
  1425     if ( aError == SwiUI::KSWInstErrFileInUse )
  1456         {
  1426         {
  1457     	iFileInUseError = ETrue;
  1427     	iFileInUseError = ETrue;
  1458         }
  1428         }
  1459     
  1429     
  1563     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RoamingHandlerPrepared() end");
  1533     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RoamingHandlerPrepared() end");
  1564     }
  1534     }
  1565 
  1535 
  1566 
  1536 
  1567 // -----------------------------------------------------------------------------
  1537 // -----------------------------------------------------------------------------
  1568 // CIAUpdateUiController::HandleWaitDialogCancel
  1538 // CIAUpdateUiController::HandleDialogExitL
  1569 // Called when wait dialog is cancelled.
  1539 // Called when wait/progress dialog is about to be cancelled.
  1570 // (other items were commented in a header).
  1540 // (other items were commented in a header).
  1571 // -----------------------------------------------------------------------------
  1541 // -----------------------------------------------------------------------------
  1572 //
  1542 //
  1573 void CIAUpdateUiController::HandleWaitDialogCancel()
  1543 TBool CIAUpdateUiController::HandleDialogExitL( TInt aButtonId )
  1574     {
  1544     {
  1575     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleWaitDialogCancel() begin");
  1545     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleDialogExitL() begin");
  1576     
  1546     IAUPDATE_TRACE_1("[IAUPDATE] button id: %d", aButtonId );
  1577     TRAPD ( err, HandleUserCancelL() );
  1547     
  1578     if ( err != KErrNone )
  1548     TInt ret( ETrue );
  1579         {
  1549     if ( aButtonId == EAknSoftkeyCancel )
  1580       	iObserver.HandleLeaveErrorL( err );
  1550         {  
  1581         }
  1551         TRAPD ( err, HandleUserCancelL() );
  1582 
  1552         if ( err != KErrNone )
  1583     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleWaitDialogCancel() end");
  1553             {
  1584 
  1554         	iObserver.HandleLeaveErrorL( err );
  1585     }
  1555             }
  1586 
  1556         }   
  1587 // -----------------------------------------------------------------------------
  1557 
  1588 // CIAUpdateUiController::dialogFinished
  1558     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleDialogExitL() end");
  1589 // Called when dialog is finished.
  1559 
  1590 // -----------------------------------------------------------------------------
  1560     return ret;    
  1591 //
       
  1592 void CIAUpdateUiController::dialogFinished(HbAction *action)
       
  1593     {
       
  1594     TDialogState dialogState = iDialogState;
       
  1595     iDialogState = ENoDialog;
       
  1596     
       
  1597     switch ( dialogState )
       
  1598         {
       
  1599         case EAgreement:
       
  1600             if ( action == mPrimaryAction )
       
  1601                  {
       
  1602                 CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC();
       
  1603                 agreement->SetAgreementAcceptedL();
       
  1604 
       
  1605                 CleanupStack::PopAndDestroy(agreement);
       
  1606                 }
       
  1607             AgreementHandledL();        
       
  1608             break;
       
  1609         case EInsufficientMemory:    
       
  1610             break;
       
  1611         default: 
       
  1612             break;
       
  1613         }
       
  1614     }
  1561     }
  1615 
  1562 
  1616 // -----------------------------------------------------------------------------
  1563 // -----------------------------------------------------------------------------
  1617 // CIAUpdateUiController::HandleUiRefreshL
  1564 // CIAUpdateUiController::HandleUiRefreshL
  1618 // 
  1565 // 
  1626 	    {
  1573 	    {
  1627 	    iRefreshed = EFalse;
  1574 	    iRefreshed = EFalse;
  1628 	    }
  1575 	    }
  1629 	else if ( iState == EIdle )
  1576 	else if ( iState == EIdle )
  1630 	    {
  1577 	    {
  1631 	    //CIAUpdateAppUi* appUi = static_cast< CIAUpdateAppUi* >( iEikEnv->EikAppUi() );
  1578 	    CIAUpdateAppUi* appUi = static_cast< CIAUpdateAppUi* >( iEikEnv->EikAppUi() );
  1632         //if ( appUi->UiRefreshAllowed() )
  1579         if ( appUi->UiRefreshAllowed() )
  1633 		    {
  1580 		    {
  1634 	    	iState = EUiRefreshing;
  1581 	    	iState = EUiRefreshing;
  1635 	        // store node identification (Id and namespace) of currently selected nodes
  1582 	        // store node identification (Id and namespace) of currently selected nodes
  1636 	        // to restore selections after refresh
  1583 	        // to restore selections after refresh
  1637 	        iPreviousSelections.Reset();
  1584 	        iPreviousSelections.Reset();
  1645                 nodeId->SetSelected( node->Base().IsSelected() );
  1592                 nodeId->SetSelected( node->Base().IsSelected() );
  1646                 iPreviousSelections.AppendL( nodeId );
  1593                 iPreviousSelections.AppendL( nodeId );
  1647                 CleanupStack::Pop( nodeId );
  1594                 CleanupStack::Pop( nodeId );
  1648                 
  1595                 
  1649                 }
  1596                 }
  1650             
  1597 
  1651 	    	for ( TInt j = 0; j < iFwNodes.Count(); ++j )
  1598             if ( iFwNodes.Count() > 0 )
  1652                 {
  1599                 {
  1653                 MIAUpdateFwNode* fwNode( iFwNodes[ j ] );
  1600                 MIAUpdateFwNode* fwNode( iFwNodes[ 0 ] );
  1654                 CIAUpdateNodeId* nodeId = CIAUpdateNodeId::NewLC();
  1601                 CIAUpdateNodeId* nodeId = CIAUpdateNodeId::NewLC();
  1655                 nodeId->SetIdL( fwNode->Base().MetaId() );
  1602                 nodeId->SetIdL( fwNode->Base().MetaId() );
  1656                 nodeId->SetNamespaceL( fwNode->Base().MetaNamespace() );
  1603                 nodeId->SetNamespaceL( fwNode->Base().MetaNamespace() );
  1657                 nodeId->SetNodeType( MIAUpdateAnyNode::ENodeTypeFw );
  1604                 nodeId->SetNodeType( MIAUpdateAnyNode::ENodeTypeFw );
  1658                 nodeId->SetSelected( fwNode->Base().IsSelected() );
  1605                 nodeId->SetSelected( fwNode->Base().IsSelected() );
  1931                                               TInt aError )    
  1878                                               TInt aError )    
  1932     {
  1879     {
  1933     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::InstallCompleteL() begin");
  1880     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::InstallCompleteL() begin");
  1934     IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError );
  1881     IAUPDATE_TRACE_1("[IAUPDATE] error code: %d", aError );
  1935 
  1882 
  1936     if ( aError == KErrNone )
  1883     // In release mode, we do not need the aError info, because
  1937         {
  1884     // success counters are counted by using the last operation error info
  1938         aNode.SetUiState( MIAUpdateNode::EUpdated );   
  1885     // when counter info is asked. In debug mode the error code is logged above.
  1939         iObserver.RefreshUI();
  1886     (void)aError;
  1940         }
       
  1941     else
       
  1942         {
       
  1943         aNode.SetUiState( MIAUpdateNode::EFailed );
       
  1944         iObserver.RefreshUI();
       
  1945         }
       
  1946     
  1887     
  1947     // pass UID of installed package to starter
  1888     // pass UID of installed package to starter
  1948     if ( iStarter )
  1889     if ( iStarter )
  1949         {
  1890         {
  1950     	if ( aNode.Type() == MIAUpdateNode::EPackageTypeServicePack )
  1891     	if ( aNode.Type() == MIAUpdateNode::EPackageTypeServicePack )
  1985     {
  1926     {
  1986     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::UpdateCompleteL() begin");
  1927     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::UpdateCompleteL() begin");
  1987 
  1928 
  1988     iState = EIdle;
  1929     iState = EIdle;
  1989     iClosingAllowedByClient = EFalse;
  1930     iClosingAllowedByClient = EFalse;
  1990        
  1931 
       
  1932     // Remove installed nodes from the node array.
       
  1933 	for ( TInt i = iNodes.Count() - 1; i >= 0; --i ) 
       
  1934         {   
       
  1935         MIAUpdateNode* node = iNodes[ i ];
       
  1936         if ( node->IsInstalled() ) 
       
  1937             {
       
  1938             iNodes.Remove( i );
       
  1939             }
       
  1940         }
       
  1941     
  1991     TInt error( aError );
  1942     TInt error( aError );
  1992     TBool selfUpdaterStarted( EFalse );
  1943     TBool selfUpdaterStarted( EFalse );
  1993 
  1944 
  1994     if ( error == KErrNone )
  1945     if ( error == KErrNone )
  1995         {
  1946         {
  2044         // Notice, that in case of cancellations there would not be any need
  1995         // Notice, that in case of cancellations there would not be any need
  2045         // for timer. But just use it as in normal cases. Then, server report
  1996         // for timer. But just use it as in normal cases. Then, server report
  2046         // completion or timer will call the callback later. But, that callback
  1997         // completion or timer will call the callback later. But, that callback
  2047         // will be ignored in CIAUpdateUiController::ServerReportSent because
  1998         // will be ignored in CIAUpdateUiController::ServerReportSent because
  2048         // iState is already then changed from ESendingReport to something else. 
  1999         // iState is already then changed from ESendingReport to something else. 
  2049         
  2000         const TInt KServerReportMaxWaitTime( 10000000 );
  2050         //const TInt KServerReportMaxWaitTime( 10000000 );         //Commented TEMP 
  2001         iController->FinishedUpdatesL( ETrue, KServerReportMaxWaitTime );
  2051         //iController->FinishedUpdatesL( ETrue, KServerReportMaxWaitTime ); //Commented TEMP
  2002         iState = ESendingReport;
  2052         //iState = ESendingReport;  //Commented temporarily
       
  2053         EndUpdateFlowL( KErrNone );  //TEMP
       
  2054         return;                      //TEMP  
       
  2055         }
  2003         }
  2056 
  2004 
  2057     // When reports are sent, EndUpdateFlowL is called via the callback functions
  2005     // When reports are sent, EndUpdateFlowL is called via the callback functions
  2058     // and the update flow will be finished there. But, if we come here when cancel
  2006     // and the update flow will be finished there. But, if we come here when cancel
  2059     // is pressed, then call EndUpdateFlowL directly because then we do not wait
  2007     // is pressed, then call EndUpdateFlowL directly because then we do not wait
  2147 // ---------------------------------------------------------------------------
  2095 // ---------------------------------------------------------------------------
  2148 // CIAUpdateUiController::ShowUpdatingDialogL
  2096 // CIAUpdateUiController::ShowUpdatingDialogL
  2149 // 
  2097 // 
  2150 // ---------------------------------------------------------------------------
  2098 // ---------------------------------------------------------------------------
  2151 //
  2099 //
  2152 /*
       
  2153 void CIAUpdateUiController::ShowUpdatingDialogL( TInt aTextResourceId,
  2100 void CIAUpdateUiController::ShowUpdatingDialogL( TInt aTextResourceId,
  2154                                                  const TDesC& aName,
  2101                                                  const TDesC& aName,
  2155                                                  TInt aNumber,
  2102                                                  TInt aNumber,
  2156                                                  TInt aTotalCount )   
  2103                                                  TInt aTotalCount )   
  2157                                                     
  2104                                                     
  2168     CArrayFix<TInt>* numberArray = new( ELeave ) CArrayFixFlat<TInt>( 2 );
  2115     CArrayFix<TInt>* numberArray = new( ELeave ) CArrayFixFlat<TInt>( 2 );
  2169     CleanupStack::PushL( numberArray );
  2116     CleanupStack::PushL( numberArray );
  2170     numberArray->AppendL( aNumber ); 
  2117     numberArray->AppendL( aNumber ); 
  2171     numberArray->AppendL( aTotalCount );
  2118     numberArray->AppendL( aTotalCount );
  2172     HBufC* noteText = NULL;
  2119     HBufC* noteText = NULL;
  2173     //noteText = StringLoader::LoadLC( aTextResourceId, 
  2120     noteText = StringLoader::LoadLC( aTextResourceId, 
  2174     //                                 *stringArray, 
  2121                                      *stringArray, 
  2175     //                                 *numberArray );
  2122                                      *numberArray );
  2176     TPtr ptr = noteText->Des();
  2123     TPtr ptr = noteText->Des();
  2177     //AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); 
  2124     AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); 
  2178     if ( iState == EDownloading )
  2125     if ( iState == EDownloading )
  2179         {
  2126         {
  2180     	ShowProgressDialogL( *noteText, ETrue );
  2127     	ShowProgressDialogL( *noteText, ETrue );
  2181         }
  2128         }
  2182     else
  2129     else
  2183         {
  2130         {
  2184         //ShowWaitDialogL( *noteText, ETrue );	
  2131         ShowWaitDialogL( *noteText, ETrue );	
  2185         }
  2132         }
  2186     
  2133     
  2187     CleanupStack::PopAndDestroy( noteText ); 
  2134     CleanupStack::PopAndDestroy( noteText ); 
  2188     CleanupStack::PopAndDestroy( numberArray );
  2135     CleanupStack::PopAndDestroy( numberArray );
  2189     CleanupStack::PopAndDestroy( stringArray );
  2136     CleanupStack::PopAndDestroy( stringArray );
  2190 
  2137 
  2191     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowUpdatingDialogL() end");
  2138     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowUpdatingDialogL() end");
  2192     }*/
  2139     }
  2193  
  2140  
  2194 
  2141 
  2195 // ---------------------------------------------------------------------------
  2142 // ---------------------------------------------------------------------------
  2196 // CIAUpdateUiController::ShowWaitDialogL
  2143 // CIAUpdateUiController::ShowWaitDialogL
  2197 // 
  2144 // 
  2198 // ---------------------------------------------------------------------------
  2145 // ---------------------------------------------------------------------------
  2199 //
  2146 //
  2200 void CIAUpdateUiController::ShowWaitDialogL( const QString& aDisplayString, 
  2147 void CIAUpdateUiController::ShowWaitDialogL( const TDesC& aDisplayString, 
  2201                                              TBool /*aVisibilityDelayOff*/ ) 
  2148                                              TBool aVisibilityDelayOff ) 
  2202     {
  2149     {
  2203     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() begin");
  2150     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() begin");
  2204     if ( !mWaitDialog )
  2151 
  2205         {
  2152     if ( iWaitDialog )
  2206         mWaitDialog = new IAUpdateWaitDialog();
       
  2207         mWaitDialog->SetCallback( this );
       
  2208         mWaitDialog->showDialog( aDisplayString );
       
  2209         }
       
  2210     
       
  2211     
       
  2212     
       
  2213     
       
  2214     /*if ( iWaitDialog )
       
  2215         {
  2153         {
  2216         IAUPDATE_TRACE("[IAUPDATE] Wait dialog already existed. Remove it first");
  2154         IAUPDATE_TRACE("[IAUPDATE] Wait dialog already existed. Remove it first");
  2217         // in some rare cases previous dialog still exists
  2155         // in some rare cases previous dialog still exists
  2218         // it's now just deleted (not recommended way) to avoid forwarding problem(s). 
  2156         // it's now just deleted (not recommended way) to avoid forwarding problem(s). 
  2219         //delete iWaitDialog;
  2157         delete iWaitDialog;
  2220         iWaitDialog = NULL;
  2158         iWaitDialog = NULL;
  2221         }*/
  2159         }
  2222  /*   iWaitDialog = 
  2160     iWaitDialog = 
  2223         new( ELeave ) CIAUpdateWaitDialog( 
  2161         new( ELeave ) CIAUpdateWaitDialog( 
  2224             reinterpret_cast< CEikDialog** >( &iWaitDialog ),
  2162             reinterpret_cast< CEikDialog** >( &iWaitDialog ),
  2225             aVisibilityDelayOff );
  2163             aVisibilityDelayOff );
  2226                 
  2164                 
  2227     iWaitDialog->SetTextL( aDisplayString );
  2165     iWaitDialog->SetTextL( aDisplayString );
  2228     iWaitDialog->SetCallback( this );        
  2166     iWaitDialog->SetCallback( this );        
  2229     iWaitDialog->ExecuteLD( R_IAUPDATE_WAIT_DIALOG ); */
  2167     iWaitDialog->ExecuteLD( R_IAUPDATE_WAIT_DIALOG );
  2230 
  2168 
  2231     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() end");
  2169     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() end");
  2232     }
  2170     }
  2233 
  2171 
  2234 
  2172 
  2235 // --------------------------------------------------------------------------
  2173 // ---------------------------------------------------------------------------
  2236 // CIAUpdateUiController::ShowProgressDialogL
  2174 // CIAUpdateUiController::ShowProgressDialogL
  2237 // 
  2175 // 
  2238 // ---------------------------------------------------------------------------
  2176 // ---------------------------------------------------------------------------
  2239 //
  2177 //
  2240 void CIAUpdateUiController::ShowProgressDialogL( const TDesC& /*aDisplayString*/, 
  2178 void CIAUpdateUiController::ShowProgressDialogL( const TDesC& aDisplayString, 
  2241                                                  TBool /*aVisibilityDelayOff*/ ) 
  2179                                                  TBool aVisibilityDelayOff ) 
  2242     {
  2180     {
  2243     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() begin");
  2181     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() begin");
  2244 
  2182 
  2245     if ( iProgressDialog )
  2183     if ( iProgressDialog )
  2246         {
  2184         {
  2247         IAUPDATE_TRACE("[IAUPDATE] Progress dialog already existed. Remove it first");
  2185         IAUPDATE_TRACE("[IAUPDATE] Progress dialog already existed. Remove it first");
  2248         // in some rare cases previous dialog still exists
  2186         // in some rare cases previous dialog still exists
  2249         // it's now just deleted (not recommended way) to avoid forwarding problem(s). 
  2187         // it's now just deleted (not recommended way) to avoid forwarding problem(s). 
  2250         //delete iProgressDialog;
  2188         delete iProgressDialog;
  2251         iProgressDialog = NULL;
  2189         iProgressDialog = NULL;
  2252         }
  2190         }
  2253 /*    iProgressDialog = 
  2191     iProgressDialog = 
  2254         new( ELeave ) CIAUpdateProgressDialog( 
  2192         new( ELeave ) CIAUpdateProgressDialog( 
  2255             reinterpret_cast< CEikDialog** >( &iProgressDialog ),
  2193             reinterpret_cast< CEikDialog** >( &iProgressDialog ),
  2256             aVisibilityDelayOff );
  2194             aVisibilityDelayOff );
  2257                 
  2195                 
  2258     iProgressDialog->SetTextL( aDisplayString );
  2196     iProgressDialog->SetTextL( aDisplayString );
  2259     iProgressDialog->SetCallback( this );        
  2197     iProgressDialog->SetCallback( this );        
  2260     iProgressDialog->ExecuteLD( R_IAUPDATE_PROGRESS_DIALOG ); */
  2198     iProgressDialog->ExecuteLD( R_IAUPDATE_PROGRESS_DIALOG );
  2261 
  2199 
  2262     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() end");
  2200     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() end");
  2263     }
  2201     }
  2264 
  2202 
  2265 
  2203 
  2285 // ---------------------------------------------------------------------------
  2223 // ---------------------------------------------------------------------------
  2286 //
  2224 //
  2287 void CIAUpdateUiController::RemoveWaitDialogL()
  2225 void CIAUpdateUiController::RemoveWaitDialogL()
  2288     {
  2226     {
  2289     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() begin");
  2227     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() begin");
  2290     if ( mWaitDialog )
       
  2291         {
       
  2292         mWaitDialog->close();  
       
  2293         }
       
  2294     /*if ( !iCancelling )  //that's needed because AVKON  in 3.2.3 wk12, returning
       
  2295                          //EFalse in TryToExitL() causes a crash   
       
  2296         {
       
  2297     	if ( iWaitDialog )
       
  2298             {
       
  2299     	    iWaitDialog->ProcessFinishedL();
       
  2300             }
       
  2301         }*/
       
  2302     
       
  2303 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() end");
       
  2304     }
       
  2305 
       
  2306 
       
  2307 // ---------------------------------------------------------------------------
       
  2308 // CIAUpdateUiController::RemoveProgressDialogL
       
  2309 // 
       
  2310 // ---------------------------------------------------------------------------
       
  2311 //
       
  2312 void CIAUpdateUiController::RemoveProgressDialogL()
       
  2313     {
       
  2314     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveProgressDialogL() begin");
       
  2315 
  2228 
  2316     if ( !iCancelling )  //that's needed because AVKON  in 3.2.3 wk12, returning
  2229     if ( !iCancelling )  //that's needed because AVKON  in 3.2.3 wk12, returning
  2317                          //EFalse in TryToExitL() causes a crash   
  2230                          //EFalse in TryToExitL() causes a crash   
  2318         {
  2231         {
       
  2232     	if ( iWaitDialog )
       
  2233             {
       
  2234     	    iWaitDialog->ProcessFinishedL();
       
  2235             }
       
  2236         }
       
  2237     
       
  2238 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() end");
       
  2239     }
       
  2240 
       
  2241 
       
  2242 // ---------------------------------------------------------------------------
       
  2243 // CIAUpdateUiController::RemoveProgressDialogL
       
  2244 // 
       
  2245 // ---------------------------------------------------------------------------
       
  2246 //
       
  2247 void CIAUpdateUiController::RemoveProgressDialogL()
       
  2248     {
       
  2249     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveProgressDialogL() begin");
       
  2250 
       
  2251     if ( !iCancelling )  //that's needed because AVKON  in 3.2.3 wk12, returning
       
  2252                          //EFalse in TryToExitL() causes a crash   
       
  2253         {
  2319     	if ( iProgressDialog )
  2254     	if ( iProgressDialog )
  2320             {
  2255             {
  2321     	    //iProgressDialog->ProcessFinishedL();
  2256     	    iProgressDialog->ProcessFinishedL();
  2322             }
  2257             }
  2323         }
  2258         }
  2324     
  2259     
  2325 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveProgressDialogL() end");
  2260 	IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveProgressDialogL() end");
  2326     }
  2261     }
  2720     {
  2655     {
  2721     iForcedRefresh = aForcedRefresh;
  2656     iForcedRefresh = aForcedRefresh;
  2722     }
  2657     }
  2723 
  2658 
  2724 // ---------------------------------------------------------------------------
  2659 // ---------------------------------------------------------------------------
  2725 // CIAUpdateUiController::RefreshNodeList
       
  2726 // 
       
  2727 // ---------------------------------------------------------------------------
       
  2728 //
       
  2729 void CIAUpdateUiController::RefreshNodeList()
       
  2730     {
       
  2731     // Restore list after update, that nodes are shown in original sequence
       
  2732     iFilter->RestoreNodeListL( iNodes );
       
  2733     // Remove installed nodes from the node array.
       
  2734     // Set temp UI state to normal for remaining nodes 
       
  2735     for ( TInt i = iNodes.Count() - 1; i >= 0; --i ) 
       
  2736         {   
       
  2737         MIAUpdateNode* node = iNodes[ i ];
       
  2738         if ( node->IsInstalled() ) 
       
  2739             {
       
  2740             iNodes.Remove( i );
       
  2741             }
       
  2742         else
       
  2743             {
       
  2744             node->SetUiState( MIAUpdateNode::ENormal );        
       
  2745             }
       
  2746         }
       
  2747     }
       
  2748 
       
  2749 
       
  2750 // ---------------------------------------------------------------------------
       
  2751 // CIAUpdateUiController::ParamsWriteFileL
  2660 // CIAUpdateUiController::ParamsWriteFileL
  2752 // 
  2661 // 
  2753 // ---------------------------------------------------------------------------
  2662 // ---------------------------------------------------------------------------
  2754 //  
  2663 //  
  2755 void CIAUpdateUiController::ParamsWriteFileL()
  2664 void CIAUpdateUiController::ParamsWriteFileL()