iaupdate/IAD/ui/src/iaupdateengine.cpp
changeset 33 8110bf1194d1
parent 29 26b6f0522fd8
child 42 d17dc5398051
equal deleted inserted replaced
29:26b6f0522fd8 33:8110bf1194d1
    23 #include <centralrepository.h>
    23 #include <centralrepository.h>
    24 #include <cmmanagerext.h>
    24 #include <cmmanagerext.h>
    25 #include <cmdestinationext.h>
    25 #include <cmdestinationext.h>
    26 #include <rconnmon.h>
    26 #include <rconnmon.h>
    27 #include <apgwgnam.h>
    27 #include <apgwgnam.h>
       
    28 #include <starterclient.h>
    28 
    29 
    29 #include "iaupdateengine.h"
    30 #include "iaupdateengine.h"
    30 #include "iaupdateserviceprovider.h"
    31 #include "iaupdateserviceprovider.h"
    31 #include "iaupdateuicontroller.h"
    32 #include "iaupdateuicontroller.h"
       
    33 #include "iaupdatefwupdatehandler.h"
    32 #include "iaupdategloballockhandler.h"
    34 #include "iaupdategloballockhandler.h"
    33 #include "iaupdatenodefilter.h"
    35 #include "iaupdatenodefilter.h"
    34 #include "iaupdateresult.h"
    36 #include "iaupdateresult.h"
    35 #include "iaupdateprivatecrkeys.h"
    37 #include "iaupdateprivatecrkeys.h"
    36 #include "iaupdateuiconfigdata.h"
    38 #include "iaupdateuiconfigdata.h"
    37 #include "iaupdatequeryhistory.h"
    39 #include "iaupdatequeryhistory.h"
    38 #include "iaupdateparameters.h"
    40 #include "iaupdateparameters.h"
       
    41 #include "iaupdateagreement.h"
       
    42 #include "iaupdateautomaticcheck.h"
       
    43 #include "iaupdateresultsdialog.h"
    39 #include "iaupdatedebug.h"
    44 #include "iaupdatedebug.h"
    40 
    45 
       
    46 
    41 IAUpdateEngine::IAUpdateEngine(QObject *parent)
    47 IAUpdateEngine::IAUpdateEngine(QObject *parent)
    42     : QObject(parent),
    48      : QObject(parent),
    43       iController(NULL),
    49       iController(NULL),
       
    50       iFwUpdateHandler(NULL),
    44       iGlobalLockHandler(NULL),
    51       iGlobalLockHandler(NULL),
    45       iIdle(NULL),
    52       iIdle(NULL),
       
    53       iIdleAutCheck(NULL),
    46       iUpdateNow(EFalse),
    54       iUpdateNow(EFalse),
    47       iRequestIssued(EFalse),
    55       iRequestIssued(EFalse),
    48       iStartedFromApplication(EFalse),
    56       iStartedFromApplication(EFalse),
       
    57       iUiRefreshAllowed(ETrue),
    49       iUpdatequeryUid(0)
    58       iUpdatequeryUid(0)
    50 {
    59 {
    51     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::IAUpdateEngine() begin");
    60     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::IAUpdateEngine() begin");
    52     iEikEnv = CEikonEnv::Static();
    61     iEikEnv = CEikonEnv::Static();
       
    62     mServiceProvider = NULL;
    53     mServiceProvider = new IAUpdateServiceProvider( *this );
    63     mServiceProvider = new IAUpdateServiceProvider( *this );
    54     connect(mServiceProvider, SIGNAL(clientDisconnected()), this, SLOT(handleAllClientsClosed()));
    64     connect(mServiceProvider, SIGNAL(clientDisconnected()), this, SLOT(handleAllClientsClosed()));
    55     TRAP_IGNORE( iController = CIAUpdateUiController::NewL( *this ));
    65     TRAP_IGNORE( iController = CIAUpdateUiController::NewL( *this ));
    56     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::IAUpdateEngine() end")
    66     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::IAUpdateEngine() end");
    57 }
    67 }
    58 
    68 
    59 
    69 
    60 IAUpdateEngine::~IAUpdateEngine()
    70 IAUpdateEngine::~IAUpdateEngine()
    61 {
    71 {
    62     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::~IAUpdateEngine() begin");
    72     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::~IAUpdateEngine() begin");
    63     InformRequestObserver( KErrCancel );
    73     InformRequestObserver( KErrCancel );
    64     delete iGlobalLockHandler;
    74     if (iIdle)
    65     delete iController;
    75         {
    66     delete mServiceProvider;    
    76         delete iIdle;
       
    77         }
       
    78     if (iIdleAutCheck)
       
    79         {
       
    80         delete iIdleAutCheck;
       
    81         }
       
    82     if (iGlobalLockHandler)
       
    83         {
       
    84         delete iGlobalLockHandler;
       
    85         }
       
    86     if ( iController )
       
    87         {
       
    88         delete iController;
       
    89         }
       
    90     if ( iFwUpdateHandler )
       
    91         {
       
    92         delete iFwUpdateHandler;
       
    93         }
       
    94     if ( mServiceProvider )
       
    95         {
       
    96         delete mServiceProvider;
       
    97         }
    67     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::~IAUpdateEngine() end");
    98     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::~IAUpdateEngine() end");
    68 }
    99 }
    69 
   100 
    70 // -----------------------------------------------------------------------------
   101 // -----------------------------------------------------------------------------
    71 // IAUpdateEngine::StartedByLauncherL
   102 // IAUpdateEngine::StartedByLauncherL
    87 // -----------------------------------------------------------------------------
   118 // -----------------------------------------------------------------------------
    88 // IAUpdateEngine::CheckUpdatesRequestL
   119 // IAUpdateEngine::CheckUpdatesRequestL
    89 // 
   120 // 
    90 // -----------------------------------------------------------------------------
   121 // -----------------------------------------------------------------------------
    91 //
   122 //
    92 void IAUpdateEngine::CheckUpdatesRequestL( int wgid, CIAUpdateParameters* aFilterParams )
   123 void IAUpdateEngine::CheckUpdatesRequestL( int wgid, 
       
   124                                            CIAUpdateParameters* aFilterParams,
       
   125                                            TBool aForcedRefresh )
    93                                            
   126                                            
    94     {
   127     {
    95     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::CheckUpdatesRequestL() begin");
   128     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::CheckUpdatesRequestL() begin");
    96     SetClientWgId( wgid );
   129     SetClientWgId( wgid );
    97     iRequestIssued = ETrue;
   130     iRequestIssued = ETrue;
   108         iEikEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront ); 
   141         iEikEnv->RootWin().SetOrdinalPosition( -1, ECoeWinPriorityNeverAtFront ); 
   109         }
   142         }
   110            
   143            
   111     iRequestType = IAUpdateUiDefines::ECheckUpdates; 
   144     iRequestType = IAUpdateUiDefines::ECheckUpdates; 
   112     iController->SetRequestType( iRequestType );
   145     iController->SetRequestType( iRequestType );
       
   146     iController->SetForcedRefresh( aForcedRefresh );
   113     
   147     
   114     iController->CheckUpdatesDeferredL( aFilterParams, EFalse ); 
   148     iController->CheckUpdatesDeferredL( aFilterParams, EFalse ); 
   115     
   149     
   116     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::CheckUpdatesRequestL() end");
   150     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::CheckUpdatesRequestL() end");
   117     }
   151     }
   206     iIdle->Start( TCallBack( UpdateQueryCallbackL, this ) ); 
   240     iIdle->Start( TCallBack( UpdateQueryCallbackL, this ) ); 
   207     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryRequestL end")
   241     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryRequestL end")
   208     }
   242     }
   209 
   243 
   210 // -----------------------------------------------------------------------------
   244 // -----------------------------------------------------------------------------
       
   245 // IAUpdateEngine::StartUpdate
       
   246 // 
       
   247 // -----------------------------------------------------------------------------
       
   248 //
       
   249 void IAUpdateEngine::StartUpdate( TBool aFirmwareUpdate )
       
   250     {
       
   251     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartUpdate() begin");
       
   252     if ( aFirmwareUpdate )
       
   253         {
       
   254         if ( !iFwUpdateHandler )
       
   255             {
       
   256             TRAP_IGNORE( CIAUpdateFWUpdateHandler::NewL() );
       
   257             }
       
   258         if ( iFwUpdateHandler )
       
   259             {
       
   260             iFwUpdateHandler->FirmWareUpdatewithFOTA();
       
   261             }
       
   262         }
       
   263     else
       
   264         {
       
   265         // by pushing object to cleanup stack it's destructor is called if leave happens
       
   266         // so global lock issued by this instance can be released in destructor of CIAUpdateGlobalLockHandler
       
   267         CIAUpdateGlobalLockHandler* globalLockHandler = CIAUpdateGlobalLockHandler::NewLC();
       
   268         if ( !globalLockHandler->InUseByAnotherInstanceL() )
       
   269             {
       
   270             globalLockHandler->SetToInUseForAnotherInstancesL( ETrue );
       
   271             // No need to be totally silent since the updating is started
       
   272             // by user.
       
   273             SetDefaultConnectionMethodL( EFalse );
       
   274             iController->StartUpdateL();
       
   275             CleanupStack::Pop( globalLockHandler ); 
       
   276             delete iGlobalLockHandler;
       
   277             iGlobalLockHandler = globalLockHandler;
       
   278             //now possible deletion of iGlobalLockHandler in leave situation is handled
       
   279             //in HandleLeaveErrorL() and HandleLeaveErrorWithoutLeave methods. 
       
   280             }
       
   281         else
       
   282             {
       
   283             CleanupStack::PopAndDestroy( globalLockHandler );   
       
   284             }
       
   285         }
       
   286     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartUpdate() end");
       
   287     }
       
   288 
       
   289 
       
   290 // -----------------------------------------------------------------------------
   211 // IAUpdateEngine::SetVisibleL
   291 // IAUpdateEngine::SetVisibleL
   212 // 
   292 // 
   213 // -----------------------------------------------------------------------------
   293 // -----------------------------------------------------------------------------
   214 //  
   294 //  
   215 void IAUpdateEngine::SetVisibleL( TBool aVisible )
   295 void IAUpdateEngine::SetVisibleL( TBool aVisible )
   271     IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateEngine::ClientInBackgroundL() inBackground: %d", inBackground );
   351     IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateEngine::ClientInBackgroundL() inBackground: %d", inBackground );
   272     return inBackground;  
   352     return inBackground;  
   273     }
   353     }
   274 
   354 
   275 
   355 
   276 
   356 // -----------------------------------------------------------------------------
   277 // -----------------------------------------------------------------------------
   357 // IAUpdateEngine::handleAllClientsClosed()
   278 // IAUpdateEngine::refresh
   358 // 
   279 // 
   359 // -----------------------------------------------------------------------------
   280 // -----------------------------------------------------------------------------
   360 //
   281 //  
       
   282 /*void IAUpdateEngine::refresh(int error) 
       
   283     {
       
   284     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::refresh() begin");
       
   285     IAUPDATE_TRACE_1("[IAUPDATE] Error code: %d", error );
       
   286     //iMainView->RefreshL( iController->Nodes(), iController->FwNodes(), aError );                    
       
   287     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::refresh() end");
       
   288     }*/
       
   289 
       
   290 
       
   291 void IAUpdateEngine::handleAllClientsClosed()
   361 void IAUpdateEngine::handleAllClientsClosed()
   292 {
   362 {
   293     qApp->quit(); 
   363     qApp->quit(); 
   294 }
   364 }
   295 
   365 
   341                 {
   411                 {
   342                 if ( iController->Filter()->FilterParams() )
   412                 if ( iController->Filter()->FilterParams() )
   343                     {
   413                     {
   344                     if ( iController->Filter()->FilterParams()->Refresh() )
   414                     if ( iController->Filter()->FilterParams()->Refresh() )
   345                         {
   415                         {
   346                         //from bgchecker, make it silent
   416                         if ( !iController->ForcedRefresh() )
   347                         totalSilent = ETrue;
   417                             {
       
   418                             //from bgchecker, make it silent
       
   419                             totalSilent = ETrue;
       
   420                             }
   348                         }
   421                         }
   349                     }
   422                     }
   350                 }
   423                 }
   351             }
   424             }
   352         SetDefaultConnectionMethodL( totalSilent );
   425         SetDefaultConnectionMethodL( totalSilent );
   360  
   433  
   361        
   434        
   362     
   435     
   363     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupCompleteL() end");    
   436     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::StartupCompleteL() end");    
   364     }
   437     }
   365     
   438 
   366  
   439  
   367 // -----------------------------------------------------------------------------
   440 // -----------------------------------------------------------------------------
   368 // IAUpdateEngine::HandleLeaveErrorL
   441 // IAUpdateEngine::HandleLeaveErrorL
   369 // 
   442 // 
   370 // -----------------------------------------------------------------------------
   443 // -----------------------------------------------------------------------------
   431         emit refresh( iController->Nodes(), iController->FwNodes(), aError );   
   504         emit refresh( iController->Nodes(), iController->FwNodes(), aError );   
   432         //if ( aWithViewActivation)
   505         //if ( aWithViewActivation)
   433           //  {
   506           //  {
   434           //  ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
   507           //  ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) );
   435           //  }
   508           //  }
   436  
   509         CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC();
       
   510         TBool agreementAccepted = agreement->AgreementAcceptedL();
       
   511         if ( iController->ForcedRefresh() )    
       
   512             {
       
   513             if ( !agreementAccepted )
       
   514                 {
       
   515                 agreement->SetAgreementAcceptedL();
       
   516                 }
       
   517             }
       
   518         CleanupStack::PopAndDestroy( agreement );
   437         // By calling CIdle possible waiting dialog can be closed before
   519         // By calling CIdle possible waiting dialog can be closed before
   438         // automatic check where a new dialog may be launched
   520         // automatic check where a new dialog may be launched
   439         //delete iIdleAutCheck;
   521         delete iIdleAutCheck;
   440         //iIdleAutCheck = NULL;
   522         iIdleAutCheck = NULL;
   441         //iIdleAutCheck = CIdle::NewL( CActive::EPriorityIdle ); 
   523         iIdleAutCheck = CIdle::NewL( CActive::EPriorityIdle ); 
   442         //iIdleAutCheck->Start( TCallBack( AutomaticCheckCallbackL, this ) );*/
   524         iIdleAutCheck->Start( TCallBack( AutomaticCheckCallbackL, this ) );
   443         } 
   525         } 
   444  
   526  
   445   
   527   
   446     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::RefreshCompleteL() end");        
   528     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::RefreshCompleteL() end");        
   447     }
   529     }
       
   530 
       
   531 
       
   532 
   448 
   533 
   449 // -----------------------------------------------------------------------------
   534 // -----------------------------------------------------------------------------
   450 // IAUpdateEngine::UpdateCompleteL
   535 // IAUpdateEngine::UpdateCompleteL
   451 // 
   536 // 
   452 // -----------------------------------------------------------------------------
   537 // -----------------------------------------------------------------------------
   461     if ( iRequestType != IAUpdateUiDefines::ENoRequest )
   546     if ( iRequestType != IAUpdateUiDefines::ENoRequest )
   462         {
   547         {
   463         InformRequestObserver( aError );
   548         InformRequestObserver( aError );
   464         }
   549         }
   465     
   550     
   466     //RefreshL( KErrNone ); 
   551     emit refresh( iController->Nodes(), iController->FwNodes(), KErrNone );
   467       
   552          
   468     //ShowStatusDialogDeferredL();
   553     ShowResultsDialogDeferredL();
   469                 
   554                 
   470     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateCompleteL end");
   555     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateCompleteL end");
   471     }
   556     }
       
   557 
       
   558 
       
   559 
       
   560 // -----------------------------------------------------------------------------
       
   561 // IAUpdateEngine::ShowResultsDialogL
       
   562 // 
       
   563 // -----------------------------------------------------------------------------
       
   564 //   
       
   565 void IAUpdateEngine::ShowResultsDialogL()
       
   566     {
       
   567     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowResultsDialogL() begin");
       
   568                 
       
   569     iUiRefreshAllowed = ETrue;
       
   570     IAUpdateResultsDialog resultsDialog;
       
   571     resultsDialog.showResults(iController->ResultsInfo());
       
   572     
       
   573     //TODO: How to recognise when application is closing 
       
   574     if ( iController->ResultsInfo().iRebootAfterInstall )
       
   575         {
       
   576         HbMessageBox messageBox(HbMessageBox::MessageTypeQuestion); 
       
   577         messageBox.setText(QString("Phone restart needed. Restart now?"));
       
   578         HbAction okAction("Ok");
       
   579         HbAction cancelAction("Cancel");
       
   580         messageBox.setPrimaryAction(&okAction);
       
   581         messageBox.setSecondaryAction(&cancelAction);
       
   582         messageBox.setTimeout(HbPopup::NoTimeout);
       
   583         messageBox.show();
       
   584         /*HbAction *selectedAction = messageBox.exec();
       
   585         if (selectedAction == messageBox.primaryAction())
       
   586             {
       
   587             RStarterSession startersession;
       
   588             if( startersession.Connect() == KErrNone )
       
   589                 {
       
   590                 startersession.Reset( RStarterSession::EUnknownReset );
       
   591                 startersession.Close();
       
   592                 return;
       
   593                 }
       
   594             }*/
       
   595         }
       
   596     if ( iStartedFromApplication && 
       
   597         iController->ResultsInfo().iCountCancelled == 0 &&
       
   598         iController->ResultsInfo().iCountFailed == 0 )
       
   599         {
       
   600         qApp->quit();
       
   601         }
       
   602     
       
   603     IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateEngine::ShowResultsDialogL() nodes count: %d", iController->Nodes().Count() );
       
   604     IAUPDATE_TRACE_1("[IAUPDATE] IAUpdateEngine::ShowResultsDialogL() fw nodes: %d", iController->FwNodes().Count() );
       
   605     //exit from result view if there are no update left
       
   606     if ( iController->Nodes().Count() == 0 && iController->FwNodes().Count() == 0 )
       
   607         {
       
   608         qApp->quit();
       
   609         }
       
   610     
       
   611     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowResultsDialogL() end");
       
   612     }
       
   613 
       
   614 // -----------------------------------------------------------------------------
       
   615 // IAUpdateEngin::ShowResultsDialogDeferredL
       
   616 // 
       
   617 // -----------------------------------------------------------------------------
       
   618 //       
       
   619 void IAUpdateEngine::ShowResultsDialogDeferredL()
       
   620     {
       
   621     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowResultsDialogDeferredL() begin");
       
   622     delete iIdle;
       
   623     iIdle = NULL;
       
   624     iIdle = CIdle::NewL( CActive::EPriorityIdle ); 
       
   625     iIdle->Start( TCallBack( ShowResultsDialogCallbackL, this ) ); 
       
   626     iUiRefreshAllowed = EFalse;
       
   627     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowResultsDialogDeferredL() end");
       
   628     }
       
   629  
       
   630 
       
   631 
       
   632 
       
   633 
       
   634 
   472 
   635 
   473 
   636 
   474 
   637 
   475 // -----------------------------------------------------------------------------
   638 // -----------------------------------------------------------------------------
   476 // IAUpdateEngine::InformRequestObserver
   639 // IAUpdateEngine::InformRequestObserver
   908         HbAction laterAction("Later");
  1071         HbAction laterAction("Later");
   909         messageBox.setPrimaryAction(&nowAction);
  1072         messageBox.setPrimaryAction(&nowAction);
   910         messageBox.setSecondaryAction(&laterAction);
  1073         messageBox.setSecondaryAction(&laterAction);
   911         messageBox.setTimeout(HbPopup::NoTimeout);
  1074         messageBox.setTimeout(HbPopup::NoTimeout);
   912         messageBox.show();
  1075         messageBox.show();
   913         HbAction *selectedAction = messageBox.exec();
  1076         iUpdateNow = ETrue;
       
  1077         //HbAction *selectedAction = messageBox.exec();
   914         
  1078         
   915         if (selectedAction == messageBox.primaryAction())
  1079         /*if (selectedAction == messageBox.primaryAction())
   916             {
  1080             {
   917             IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() Now");
  1081             IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() Now");
   918             iUpdateNow = ETrue;
  1082             iUpdateNow = ETrue;
   919             }
  1083             }
   920         else if (selectedAction == messageBox.secondaryAction())
  1084         else if (selectedAction == messageBox.secondaryAction())
   921             {
  1085             {
   922             IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() Later");
  1086             IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() Later");
   923             updateQueryHistory->SetTimeL( iUpdatequeryUid );
  1087             updateQueryHistory->SetTimeL( iUpdatequeryUid );
   924             }
  1088             }*/
   925         }
  1089         }
   926     CleanupStack::PopAndDestroy( updateQueryHistory );
  1090     CleanupStack::PopAndDestroy( updateQueryHistory );
   927     InformRequestObserver( KErrNone );  
  1091     InformRequestObserver( KErrNone );  
   928     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() end");
  1092     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowUpdateQueryL() end");
   929     }
  1093     }
   947     wgName->SetHidden( aHide );
  1111     wgName->SetHidden( aHide );
   948     wgName->SetWindowGroupName( iEikEnv->RootWin() );    
  1112     wgName->SetWindowGroupName( iEikEnv->RootWin() );    
   949     CleanupStack::PopAndDestroy( wgName ); 
  1113     CleanupStack::PopAndDestroy( wgName ); 
   950     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HideApplicationInFSW() end");
  1114     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::HideApplicationInFSW() end");
   951     }
  1115     }
       
  1116 
       
  1117 // ---------------------------------------------------------------------------
       
  1118 // IAUpdateEngine::ShowResultsDialogCallbackL
       
  1119 // ---------------------------------------------------------------------------
       
  1120 //
       
  1121 TInt IAUpdateEngine::ShowResultsDialogCallbackL( TAny* aPtr )
       
  1122     {
       
  1123     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowResultsDialogCallbackL() begin");
       
  1124     IAUpdateEngine* engine = static_cast<IAUpdateEngine*>( aPtr );
       
  1125     //TRAPD( err, engine->ShowResultsDialogL() );
       
  1126     TRAP_IGNORE( engine->ShowResultsDialogL() );
       
  1127     //appUI->HandleLeaveErrorL( err );
       
  1128     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::ShowResultsDialogCallbackL() end");
       
  1129     return KErrNone;
       
  1130     }
       
  1131 
   952 
  1132 
   953 // ---------------------------------------------------------------------------
  1133 // ---------------------------------------------------------------------------
   954 // IAUpdateEngine::UpdateQueryCallbackL
  1134 // IAUpdateEngine::UpdateQueryCallbackL
   955 // ---------------------------------------------------------------------------
  1135 // ---------------------------------------------------------------------------
   956 //
  1136 //
   966     //    }
  1146     //    }
   967     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateQueryCallbackL() end");
  1147     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::UpdateQueryCallbackL() end");
   968     return KErrNone;
  1148     return KErrNone;
   969     }    
  1149     }    
   970 
  1150 
   971 
  1151 // ---------------------------------------------------------------------------
   972 
  1152 // IAUpdateEngine::AutomaticCheckCallbackL
   973 
  1153 // ---------------------------------------------------------------------------
   974 
  1154 //    
       
  1155     
       
  1156 TInt IAUpdateEngine::AutomaticCheckCallbackL( TAny* aPtr )    
       
  1157     {
       
  1158     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::AutomaticCheckCallbackL() begin");
       
  1159     IAUpdateEngine* engine= static_cast<IAUpdateEngine*>( aPtr ); 
       
  1160     
       
  1161     TInt err = KErrNone;
       
  1162     CIAUpdateAutomaticCheck* automaticCheck = NULL;
       
  1163     TRAP( err, automaticCheck = CIAUpdateAutomaticCheck::NewL() ); 
       
  1164     if ( err != KErrNone )
       
  1165         {
       
  1166         engine->HandleLeaveErrorL( err );
       
  1167         }
       
  1168     else
       
  1169         {
       
  1170         CleanupStack::PushL( automaticCheck );
       
  1171         TRAP( err, automaticCheck->AcceptAutomaticCheckL() );
       
  1172         if ( err != KErrNone )
       
  1173             {
       
  1174             engine->HandleLeaveErrorL( err );
       
  1175             }   
       
  1176         } 
       
  1177     
       
  1178     CleanupStack::PopAndDestroy( automaticCheck );
       
  1179     
       
  1180     IAUPDATE_TRACE("[IAUPDATE] IAUpdateEngine::AutomaticCheckCallbackL() end");
       
  1181     return KErrNone;
       
  1182     }
       
  1183 
       
  1184 
       
  1185