618 SetCallerImage( |
607 SetCallerImage( |
619 aCallId, |
608 aCallId, |
620 aCallHeaderData ); |
609 aCallHeaderData ); |
621 } |
610 } |
622 |
611 |
623 // --------------------------------------------------------------------------- |
612 |
624 // TPhoneCallHeaderParam::IsCallPrivateOrPayPhone |
|
625 // --------------------------------------------------------------------------- |
|
626 // |
|
627 TBool TPhoneCallHeaderParam::IsCallPrivateOrPayPhone( const TInt aCallId, TDes& aData ) const |
|
628 { |
|
629 __LOGMETHODSTARTEND( EPhoneControl, "TPhoneCallHeaderParam::IsCallPrivateOrPayPhone() "); |
|
630 __ASSERT_DEBUG( iStateMachine.PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
|
631 TBool ret( EFalse ); |
|
632 const RMobileCall::TMobileCallRemoteIdentityStatus identity = iStateMachine.PhoneEngineInfo()->RemoteIdentity( aCallId ); |
|
633 if ( ( iStateMachine.PhoneEngineInfo()->RemotePhoneNumberType( aCallId ) == EPEPrivateNumber ) || |
|
634 identity == RMobileCall::ERemoteIdentityUnavailableNoCliCoinOrPayphone || |
|
635 identity == RMobileCall::ERemoteIdentityAvailableNoCliCoinOrPayphone ) |
|
636 { |
|
637 SetIdentitySpecificCallHeaderData( aCallId, aData ); |
|
638 ret = ETrue; |
|
639 } |
|
640 |
|
641 __PHONELOG1( EBasic, EPhoneControl, "TPhoneCallHeaderParam::IsCallPrivateOrPayPhone() - returns = %d ", ret); |
|
642 return ret; |
|
643 } |
|
644 |
613 |
645 // --------------------------------------------------------------------------- |
614 // --------------------------------------------------------------------------- |
646 // TPhoneCallHeaderParam::GetRemoteInfoDataL |
615 // TPhoneCallHeaderParam::GetRemoteInfoDataL |
647 // --------------------------------------------------------------------------- |
616 // --------------------------------------------------------------------------- |
648 // |
617 // |
649 void TPhoneCallHeaderParam::GetRemoteInfoDataL( |
618 TBool TPhoneCallHeaderParam::GetRemoteInfoDataL( |
650 const TInt aCallId, |
619 const TInt aCallId, |
651 TDes& aData ) const |
620 TDes& aData ) const |
652 { |
621 { |
653 __LOGMETHODSTARTEND( EPhoneControl, "TPhoneCallHeaderParam::GetRemoteInfoDataL() "); |
622 __LOGMETHODSTARTEND( EPhoneControl, "TPhoneCallHeaderParam::GetRemoteInfoDataL() "); |
654 __PHONELOG1( EBasic, EPhoneControl, "TPhoneCallHeaderParam::GetRemoteInfoDataL() - call id =%d ", aCallId); |
623 __PHONELOG1( EBasic, EPhoneControl, "TPhoneCallHeaderParam::GetRemoteInfoDataL() - call id =%d ", aCallId); |
655 __ASSERT_DEBUG( iStateMachine.PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
624 __ASSERT_DEBUG( iStateMachine.PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
|
625 |
|
626 TBool secondaryCli(EFalse); |
|
627 |
656 if ( aCallId == KEmergencyCallId ) |
628 if ( aCallId == KEmergencyCallId ) |
657 { |
629 { |
658 // Set emergency label text |
630 // Set emergency label text |
659 iManagerUtility.LoadResource( aData, EPhoneEmergencyCallHeader ); |
631 iManagerUtility.LoadResource( aData, EPhoneEmergencyCallHeader ); |
660 } |
632 } |
661 else |
633 else |
662 { |
634 { |
|
635 const RMobileCall::TMobileCallRemoteIdentityStatus identity = iStateMachine.PhoneEngineInfo()->RemoteIdentity( aCallId ); |
663 // Note next if-statements are in priority order so be careful if you change order |
636 // Note next if-statements are in priority order so be careful if you change order |
664 // or add new if-statements. |
637 // or add new if-statements. |
665 if ( iStateMachine.PhoneEngineInfo()->RemoteName( aCallId ).Length() ) |
638 if ( iStateMachine.PhoneEngineInfo()->RemoteName( aCallId ).Length() ) |
666 { |
639 { |
667 // Display the contact name if it is available |
640 // Display the contact name if it is available |
668 aData.Copy( iStateMachine.PhoneEngineInfo()->RemoteName( aCallId ) ); |
641 aData.Copy( iStateMachine.PhoneEngineInfo()->RemoteName( aCallId ) ); |
|
642 secondaryCli = ETrue; |
669 } |
643 } |
670 else if ( iStateMachine.PhoneEngineInfo()->RemotePartyName( aCallId ).Length() ) |
644 else if ( iStateMachine.PhoneEngineInfo()->RemotePartyName( aCallId ).Length() ) |
671 { |
645 { |
672 // Display the CNAP or UUS info if it is available. |
646 // Display the CNAP or UUS info if it is available. |
673 aData.Copy( iStateMachine.PhoneEngineInfo()->RemotePartyName( aCallId ) ); |
647 aData.Copy( iStateMachine.PhoneEngineInfo()->RemotePartyName( aCallId ) ); |
|
648 secondaryCli = ETrue; |
674 } |
649 } |
675 else if ( iStateMachine.PhoneEngineInfo()->RemoteCompanyName( aCallId ).Length() ) |
650 else if ( iStateMachine.PhoneEngineInfo()->RemoteCompanyName( aCallId ).Length() ) |
676 { |
651 { |
677 // Display the company name if it is available |
652 // Display the company name if it is available |
678 aData.Copy( iStateMachine.PhoneEngineInfo()->RemoteCompanyName( aCallId ) ); |
653 aData.Copy( iStateMachine.PhoneEngineInfo()->RemoteCompanyName( aCallId ) ); |
679 } |
654 } |
680 else if ( iStateMachine.PhoneEngineInfo()->CallState( aCallId ) == EPEStateRinging ) |
655 else if ( iStateMachine.PhoneEngineInfo()->CallDirection( aCallId ) == RMobileCall::EMobileTerminated ) |
681 { |
656 { |
682 SetIdentitySpecificCallHeaderData( aCallId, aData ); |
657 if ( EPEPrivateNumber == iStateMachine.PhoneEngineInfo()->RemotePhoneNumberType( aCallId ) ) |
683 } |
658 { |
684 else |
659 if ( EPECallTypeVoIP == CallHeaderType() ) |
685 { |
660 { |
686 if ( ( iStateMachine.PhoneEngineInfo()->CallState( aCallId ) != EPEStateDialing ) && |
661 iManagerUtility.LoadResource( aData, iManagerUtility.Customization()->CustomizeCallHeaderText() ); |
687 ( iStateMachine.PhoneEngineInfo()->CallState( aCallId ) != EPEStateRinging ) && |
662 } |
688 ( iStateMachine.PhoneEngineInfo()->CallState( aCallId ) != EPEStateAnswering ) ) |
663 else |
689 { |
664 { |
690 iManagerUtility.GetInCallNumberTextL( aCallId, aData ); |
665 // private number |
691 } |
666 iManagerUtility.LoadResource( aData, EPhoneCLIWithheld ); |
692 } |
667 } |
693 } |
668 } |
694 } |
669 else if ( identity == RMobileCall::ERemoteIdentityUnavailableNoCliCoinOrPayphone || |
695 |
670 identity == RMobileCall::ERemoteIdentityAvailableNoCliCoinOrPayphone ) |
696 // --------------------------------------------------------------------------- |
671 { |
697 // TPhoneCallHeaderParam::SetIdentitySpecificCallHeaderData |
672 __PHONELOG( EBasic, EPhoneControl, "GetRemoteInfoDataL br2.5: payphone" ); |
698 // --------------------------------------------------------------------------- |
673 // Display "Payphone". |
699 // |
674 iManagerUtility.LoadResource( aData, EPhoneCLIPayphone ); |
700 void TPhoneCallHeaderParam::SetIdentitySpecificCallHeaderData( const TInt aCallId, TDes& aData ) const |
675 } |
701 { |
676 else if ( identity == RMobileCall::ERemoteIdentityUnknown ) |
702 __LOGMETHODSTARTEND( EPhoneControl, "TPhoneCallHeaderParam::SetIdentitySpecificCallHeaderData() ") |
677 { |
703 __ASSERT_DEBUG( iStateMachine.PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
678 __PHONELOG( EBasic, EPhoneControl, "GetRemoteInfoDataL br2.6: unknown number" ); |
704 |
679 // Display "Unknown Number". |
705 const RMobileCall::TMobileCallRemoteIdentityStatus identity = iStateMachine.PhoneEngineInfo()->RemoteIdentity( aCallId ); |
680 iManagerUtility.LoadResource( aData, EPhoneCallCLIUnknown ); |
706 const TPEPhoneNumberIdType idType = iStateMachine.PhoneEngineInfo()->RemotePhoneNumberType( aCallId ); |
681 } |
707 |
682 } |
708 __PHONELOG1( EBasic, EPhoneControl, "TPhoneCallHeaderParam::SetIdentitySpecificCallHeaderData() - RemoteIdentity: %d ", |
683 else if ( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ).Length() ) |
709 identity ) |
684 { |
710 __PHONELOG1( EBasic, EPhoneControl, "TPhoneCallHeaderParam::SetIdentitySpecificCallHeaderData() - idType: %d ", |
685 // Display the number if it is available |
711 idType ) |
686 aData.Copy( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ) ); |
712 // If ringing call is emergency call then do not set identity specific info to call header |
687 } |
713 // because emergency call header doesnt contain identity specific information. |
688 } |
714 if ( aCallId == KEmergencyCallId ) |
689 return secondaryCli; |
715 { |
690 } |
716 // do nothing. |
691 |
717 } |
|
718 else if ( idType == EPEPrivateNumber ) |
|
719 { |
|
720 // If call header has customized items and callheadertype is voip |
|
721 // then load customized text. |
|
722 if ( ( iManagerUtility.Customization() ) && ( CallHeaderType() == EPECallTypeVoIP ) ) |
|
723 { |
|
724 // Display private address |
|
725 iManagerUtility.LoadResource( aData, iManagerUtility.Customization()->CustomizeCallHeaderText() ); |
|
726 } |
|
727 else |
|
728 { |
|
729 // Display "private number". |
|
730 iManagerUtility.LoadResource( aData, EPhoneCLIWithheld ); |
|
731 } |
|
732 } |
|
733 else if( ( identity == RMobileCall::ERemoteIdentityUnavailableNoCliCoinOrPayphone ) || |
|
734 ( identity == RMobileCall::ERemoteIdentityAvailableNoCliCoinOrPayphone ) ) |
|
735 { |
|
736 // Display "Payphone". |
|
737 iManagerUtility.LoadResource( aData, EPhoneCLIPayphone ); |
|
738 } |
|
739 else if ( identity == RMobileCall::ERemoteIdentityUnknown ) |
|
740 { |
|
741 // Display "Call". |
|
742 iManagerUtility.LoadResource( aData, EPhoneCall ); |
|
743 } |
|
744 } |
|
745 |
|