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