equal
deleted
inserted
replaced
63 #include "iaupdatequeryhistory.h" |
63 #include "iaupdatequeryhistory.h" |
64 #include "iaupdatedialogutil.h" |
64 #include "iaupdatedialogutil.h" |
65 #include "iaupdategloballockhandler.h" |
65 #include "iaupdategloballockhandler.h" |
66 #include "iaupdatenodefilter.h" |
66 #include "iaupdatenodefilter.h" |
67 #include "iaupdateuitimer.h" |
67 #include "iaupdateuitimer.h" |
|
68 #include "iaupdateagreement.h" |
68 #include "iaupdatedebug.h" |
69 #include "iaupdatedebug.h" |
69 |
70 |
70 |
71 |
71 const TUint KSWInstSvrUid = 0x101F875A; |
72 const TUint KSWInstSvrUid = 0x101F875A; |
72 |
73 |
162 // CIAUpdateAppUi::CheckUpdatesRequestL |
163 // CIAUpdateAppUi::CheckUpdatesRequestL |
163 // |
164 // |
164 // ----------------------------------------------------------------------------- |
165 // ----------------------------------------------------------------------------- |
165 // |
166 // |
166 void CIAUpdateAppUi::CheckUpdatesRequestL( MIAUpdateRequestObserver& aObserver, |
167 void CIAUpdateAppUi::CheckUpdatesRequestL( MIAUpdateRequestObserver& aObserver, |
167 CIAUpdateParameters* aFilterParams ) |
168 CIAUpdateParameters* aFilterParams, |
|
169 TBool aForcedRefresh ) |
168 |
170 |
169 { |
171 { |
170 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::CheckUpdatesRequestL() begin"); |
172 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::CheckUpdatesRequestL() begin"); |
171 iStartedFromApplication = ETrue; |
173 iStartedFromApplication = ETrue; |
172 CleanupStack::PushL( aFilterParams ); |
174 CleanupStack::PushL( aFilterParams ); |
182 } |
184 } |
183 |
185 |
184 iRequestObserver = &aObserver; |
186 iRequestObserver = &aObserver; |
185 iRequestType = IAUpdateUiDefines::ECheckUpdates; |
187 iRequestType = IAUpdateUiDefines::ECheckUpdates; |
186 iController->SetRequestType( iRequestType ); |
188 iController->SetRequestType( iRequestType ); |
187 |
189 IAUPDATE_TRACE_1("[IAUPDATE] CIAUpdateAppUi::CheckUpdatesRequestL() Forced refresh: %d", aForcedRefresh ); |
|
190 iController->SetForcedRefresh( aForcedRefresh ); |
188 iController->CheckUpdatesDeferredL( aFilterParams, EFalse ); |
191 iController->CheckUpdatesDeferredL( aFilterParams, EFalse ); |
189 |
192 |
190 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::CheckUpdatesRequestL() end"); |
193 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::CheckUpdatesRequestL() end"); |
191 } |
194 } |
192 |
195 |
591 { |
594 { |
592 if ( iController->Filter()->FilterParams() ) |
595 if ( iController->Filter()->FilterParams() ) |
593 { |
596 { |
594 if ( iController->Filter()->FilterParams()->Refresh() ) |
597 if ( iController->Filter()->FilterParams()->Refresh() ) |
595 { |
598 { |
596 //from bgchecker, make it silent |
599 if ( !iController->ForcedRefresh() ) |
597 totalSilent = ETrue; |
600 { |
|
601 //from bgchecker, make it silent |
|
602 totalSilent = ETrue; |
|
603 } |
598 } |
604 } |
599 } |
605 } |
600 } |
606 } |
601 } |
607 } |
602 SetDefaultConnectionMethodL( totalSilent ); |
608 SetDefaultConnectionMethodL( totalSilent ); |
681 RefreshL( aError ); |
687 RefreshL( aError ); |
682 if ( aWithViewActivation) |
688 if ( aWithViewActivation) |
683 { |
689 { |
684 ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) ); |
690 ActivateLocalViewL( TUid::Uid( EIAUpdateMainViewId ) ); |
685 } |
691 } |
686 |
692 CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC(); |
|
693 TBool agreementAccepted = agreement->AgreementAcceptedL(); |
|
694 if ( iController->ForcedRefresh() ) |
|
695 { |
|
696 if ( !agreementAccepted ) |
|
697 { |
|
698 agreement->SetAgreementAcceptedL(); |
|
699 } |
|
700 } |
|
701 CleanupStack::PopAndDestroy( agreement ); |
687 // By calling CIdle possible waiting dialog can be closed before |
702 // By calling CIdle possible waiting dialog can be closed before |
688 // automatic check where a new dialog may be launched |
703 // automatic check where a new dialog may be launched |
689 delete iIdleAutCheck; |
704 delete iIdleAutCheck; |
690 iIdleAutCheck = NULL; |
705 iIdleAutCheck = NULL; |
691 iIdleAutCheck = CIdle::NewL( CActive::EPriorityIdle ); |
706 iIdleAutCheck = CIdle::NewL( CActive::EPriorityIdle ); |
972 { |
987 { |
973 //In the totally silent case, if no usable IAP, we complete the check update with 0 updates. |
988 //In the totally silent case, if no usable IAP, we complete the check update with 0 updates. |
974 //the bgchecker will try again later after 1 month. |
989 //the bgchecker will try again later after 1 month. |
975 //The LEAVE will be catched up later and complete the request from background checker. |
990 //The LEAVE will be catched up later and complete the request from background checker. |
976 User::LeaveIfError( KErrNotFound ); |
991 User::LeaveIfError( KErrNotFound ); |
977 |
|
978 //the following code will pop up dialog to ask from user, just for proto |
|
979 /* connectionMethodId = 0; |
|
980 TIAUpdateConnectionMethod connectionMethod( |
|
981 connectionMethodId, TIAUpdateConnectionMethod::EConnectionMethodTypeDefault ); |
|
982 |
|
983 iController->SetDefaultConnectionMethodL( connectionMethod );*/ |
|
984 } |
992 } |
985 |
993 |
986 |
994 |
987 |
995 |
988 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::SetDefaultConnectionMethodL() end"); |
996 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateAppUi::SetDefaultConnectionMethodL() end"); |