17 */ |
17 */ |
18 |
18 |
19 |
19 |
20 // Include Files |
20 // Include Files |
21 #include <etelmm.h> |
21 #include <etelmm.h> |
22 #include <rsssettings.h> |
22 #include <RSSSettings.h> |
23 #include "mpsetrequestobs.h" |
23 #include "MPsetRequestObs.h" |
24 #include "psetcallbarring.h" |
24 #include "PsetCallBarring.h" |
25 #include "psettelephony.h" |
25 #include "PsetTelephony.h" |
26 #include "psetpanic.h" |
26 #include "PSetPanic.h" |
27 #include "psetconstants.h" |
27 #include "PsetConstants.h" |
28 #include "psetutility.h" |
28 #include "PSetUtility.h" |
29 #include "phonesettingslogger.h" |
29 #include "PhoneSettingsLogger.h" |
30 |
30 |
31 // CONSTANTS |
31 // CONSTANTS |
32 _LIT( KPSNameOfClass, "CPsetCallBarring" ); |
32 _LIT( KPSNameOfClass, "CPsetCallBarring" ); |
33 |
33 |
34 // MEMBER FUNCTIONS |
34 // MEMBER FUNCTIONS |
189 iChangeSetting = aBarring; |
189 iChangeSetting = aBarring; |
190 |
190 |
191 __PHSLOGSTRING1("[PHS] SetBarringL: Password: %S", &aBarring.iPassword); |
191 __PHSLOGSTRING1("[PHS] SetBarringL: Password: %S", &aBarring.iPassword); |
192 __PHSLOGSTRING1("[PHS] SetBarringL: Settings: %d", aBarring.iSetting); |
192 __PHSLOGSTRING1("[PHS] SetBarringL: Settings: %d", aBarring.iSetting); |
193 |
193 |
194 ValidateBsc( aBsc ); |
194 ValidateBsc( aBsc ); |
195 |
195 |
196 if ( aBsc == EAltTele ) |
196 if ( aBsc == EAltTele ) |
197 { |
197 { |
198 iBarringParameters.iServiceGroup = PSetUtility::VerifyAltLineUseL(); |
198 iBarringParameters.iServiceGroup = PSetUtility::VerifyAltLineUseL(); |
199 } |
199 } |
200 |
200 |
201 iBarringParameters.iPassword = aBarring.iPassword; |
201 iBarringParameters.iPassword = aBarring.iPassword; |
202 iBarringParameters.iAction = SetBarringAction( aBarring.iSetting ); |
202 iBarringParameters.iAction = SetBarringAction( aBarring.iSetting ); |
203 iBarringParameters.iServiceGroup = PSetUtility::ChangeToEtelInternal( aBsc ); |
203 iBarringParameters.iServiceGroup = PSetUtility::ChangeToEtelInternal( aBsc ); |
204 |
204 |
205 __PHSLOGSTRING1("[PHS] SetBarringL: Program: %d", aBarring.iType); |
205 __PHSLOGSTRING1("[PHS] SetBarringL: Program: %d", aBarring.iType); |
206 |
206 |
207 // Start to request barring change. |
207 // Start to request barring change. |
208 iPhone.SetCallBarringStatus( |
208 iPhone.SetCallBarringStatus( |
209 iStatus, |
209 iStatus, |
256 // This needs to be done first, since notes must be cleared from screen |
256 // This needs to be done first, since notes must be cleared from screen |
257 // even though request is not active. |
257 // even though request is not active. |
258 iObserver->SetEngineContact( this ); |
258 iObserver->SetEngineContact( this ); |
259 // Does not leave |
259 // Does not leave |
260 TRAPD( err, iObserver->HandleCBRequestingL( EFalse, ETrue ) ); |
260 TRAPD( err, iObserver->HandleCBRequestingL( EFalse, ETrue ) ); |
261 |
261 |
262 if ( !IsActive() || err != KErrNone ) |
262 if ( !IsActive() || err != KErrNone ) |
263 { |
263 { |
264 return KErrGeneral; |
264 return KErrGeneral; |
265 } |
265 } |
266 |
266 |
553 * Series 60 ETel API |
553 * Series 60 ETel API |
554 *****************************************************/ |
554 *****************************************************/ |
555 RMobilePhone::TMobilePhoneCBInfoEntryV1 cbInfo; |
555 RMobilePhone::TMobilePhoneCBInfoEntryV1 cbInfo; |
556 TInt entries = cbStatusList->Enumerate(); |
556 TInt entries = cbStatusList->Enumerate(); |
557 __PHSLOGSTRING1("[PHS] HandleInquiryResultL: Entry count: %d", entries); |
557 __PHSLOGSTRING1("[PHS] HandleInquiryResultL: Entry count: %d", entries); |
558 TInt i(0); |
558 TInt i(0); |
559 TInt cbArray(0); |
559 TInt cbArray(0); |
560 // If alternate line in use then only als line service information is shown. |
560 // If alternate line in use then only als line service information is shown. |
561 if ( iAls == ESSSettingsAlsAlternate ) |
561 if ( iAls == ESSSettingsAlsAlternate ) |
562 { |
562 { |
563 while ( entries > i ) |
563 while ( entries > i ) |
564 { |
564 { |
565 cbInfo = cbStatusList->GetEntryL( i ); |
565 cbInfo = cbStatusList->GetEntryL( i ); |
566 |
566 |
567 if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup == RMobilePhone::EAuxVoiceService ) |
567 if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup == RMobilePhone::EAuxVoiceService ) |
568 { |
568 { |
569 __PHSLOGSTRING1("[PHS] ALS: iServiceGroup: %d", cbInfo.iServiceGroup); |
569 __PHSLOGSTRING1("[PHS] ALS: iServiceGroup: %d", cbInfo.iServiceGroup); |
570 status = EBarringStatusActive; |
570 status = EBarringStatusActive; |
571 arrayOfBsc[cbArray] = static_cast <TUint8> |
571 arrayOfBsc[cbArray] = static_cast <TUint8> |
572 ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) ); |
572 ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) ); |
573 cbArray++; |
573 cbArray++; |
574 } |
574 } |
575 i++; |
575 i++; |
576 } |
576 } |
577 } |
577 } |
578 else // All other services than alternate line service is allowed to show when primary line is active. |
578 else // All other services than alternate line service is allowed to show when primary line is active. |
579 { |
579 { |
580 while ( entries > i ) |
580 while ( entries > i ) |
581 { |
581 { |
582 cbInfo = cbStatusList->GetEntryL( i ); |
582 cbInfo = cbStatusList->GetEntryL( i ); |
583 |
583 |
584 if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup != RMobilePhone::EAuxVoiceService ) |
584 if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup != RMobilePhone::EAuxVoiceService ) |
585 { |
585 { |
586 __PHSLOGSTRING1("[PHS] iServiceGroup: %d", cbInfo.iServiceGroup); |
586 __PHSLOGSTRING1("[PHS] iServiceGroup: %d", cbInfo.iServiceGroup); |
587 status = EBarringStatusActive; |
587 status = EBarringStatusActive; |
588 arrayOfBsc[cbArray] = static_cast <TUint8> |
588 arrayOfBsc[cbArray] = static_cast <TUint8> |
589 ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) ); |
589 ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) ); |
590 cbArray++; |
590 cbArray++; |
591 } |
591 } |
592 i++; |
592 i++; |
593 } |
593 } |
594 } |
594 } |
595 |
595 |
596 arrayOfBsc[cbArray] = KPSetUnusedValue; |
596 arrayOfBsc[cbArray] = KPSetUnusedValue; |
597 CleanupStack::PopAndDestroy( cbStatusList ); |
597 CleanupStack::PopAndDestroy( cbStatusList ); |
598 iObserver->HandleBarringModeStatusL( arrayOfBsc, status ); |
598 iObserver->HandleBarringModeStatusL( arrayOfBsc, status ); |
599 __PHSLOGSTRING("[PHS] <--CPsetCallBarring::HandleInquiryResultL"); |
599 __PHSLOGSTRING("[PHS] <--CPsetCallBarring::HandleInquiryResultL"); |
600 } |
600 } |