39 const TUint8 KDashChar( 0x23 ); |
42 const TUint8 KDashChar( 0x23 ); |
40 const TUint8 KDTMFChar( 0x70 ); |
43 const TUint8 KDTMFChar( 0x70 ); |
41 const TUint8 KWildChar( 0x77 ); |
44 const TUint8 KWildChar( 0x77 ); |
42 const TUint8 KExpansionChar( 0x2E ); |
45 const TUint8 KExpansionChar( 0x2E ); |
43 |
46 |
44 /** Maximum name length. */ |
|
45 const TInt KSatMaximumNameLength = 50; |
|
46 |
|
47 /** Maximum phone number length same as used by phone. */ |
|
48 const TInt KSatMaximumPhoneNumberLength = 100; |
|
49 |
|
50 /** The subaddress length, see ITU-T I.330 and 3GPP TS 11.14. */ |
|
51 const TInt KSatSubAddressLength = 21; |
|
52 |
|
53 /** The maximum bearer length. The bearer capabilities as |
|
54 defined in GSM 04.08. */ |
|
55 const TInt KSatBearerLength = 14; |
|
56 |
|
57 |
|
58 _LIT( KFixedSimEmergencyNumber, "112" ); |
47 _LIT( KFixedSimEmergencyNumber, "112" ); |
|
48 _LIT8( KContentType, "*" ); |
|
49 // 3GPP TS 24.008 |
|
50 const TInt KMaximumPhoneNumberLength( 80 ); |
59 |
51 |
60 // ======== MEMBER FUNCTIONS ======== |
52 // ======== MEMBER FUNCTIONS ======== |
61 |
53 |
62 // ----------------------------------------------------------------------------- |
54 // ----------------------------------------------------------------------------- |
63 // Two-phased constructor. |
55 // Two-phased constructor. |
519 |
518 |
520 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::UiLaunchFailed exiting" ) |
519 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::UiLaunchFailed exiting" ) |
521 } |
520 } |
522 |
521 |
523 // ----------------------------------------------------------------------------- |
522 // ----------------------------------------------------------------------------- |
524 // CSetUpCallHandler::SetupCallRequestComplete |
523 // From class MAiwNotifyCallback. |
525 // (other items were commented in a header). |
524 // Called when dial request is completed. |
526 // ----------------------------------------------------------------------------- |
525 // ----------------------------------------------------------------------------- |
527 // |
526 // |
528 void CSetUpCallHandler::SetupCallRequestComplete( TInt aErrCode ) |
527 TInt CSetUpCallHandler::HandleNotifyL( |
529 { |
528 const TInt aCmdId, |
530 LOG( SIMPLE, |
529 const TInt aEventId, |
531 "SETUPCALL: CSetUpCallHandler::SetupCallRequestComplete calling" ) |
530 CAiwGenericParamList& aEventParamList, |
532 |
531 const CAiwGenericParamList& /*aInParamList*/ ) |
533 LOG2( NORMAL, |
532 { |
534 "SETUPCALL: CSetUpCallHandler::SetupCallRequestComplete aErrCode %d", |
533 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleNotifyL calling" ) |
535 aErrCode ) |
534 |
536 |
535 if ( KAiwCmdCall == aCmdId ) |
537 if( !iEmergencyCall ) |
536 { |
538 { |
537 LOG2( SIMPLE, |
539 CompleteSetupCallWithStatus( aErrCode ); |
538 "SETUPCALL: CSetUpCallHandler::HandleNotifyL event: %d", aEventId ) |
|
539 switch ( aEventId ) |
|
540 { |
|
541 case KAiwEventError: |
|
542 case KAiwEventCompleted: |
|
543 case EGenericParamError: // This is due CCaUiPlugin behaviour. |
|
544 // Also overlaps event KAiwEventStarted. |
|
545 { |
|
546 LOG( SIMPLE, |
|
547 "SETUPCALL: CSetUpCallHandler::HandleNotifyL SetupCall \ |
|
548 Completed" ) |
|
549 |
|
550 // Fetch completion status. |
|
551 TInt index( 0 ); |
|
552 const TAiwGenericParam* param = aEventParamList.FindFirst( |
|
553 index, EGenericParamError ); |
|
554 |
|
555 if ( param ) |
|
556 { |
|
557 LOG( SIMPLE, |
|
558 "SETUPCALL: CSetUpCallHandler::HandleNotifyL param true" ) |
|
559 |
|
560 // Converts error number to symbian-formatted before |
|
561 // calling CompleteSetupCallWithStatus. |
|
562 TInt error = TccpErrorToSymbianError( |
|
563 param->Value().AsTInt32() ); |
|
564 CompleteSetupCallWithStatus( error ); |
|
565 } |
|
566 else |
|
567 { |
|
568 CompleteSetupCall( RSat::KSuccess ); |
|
569 } |
|
570 } |
|
571 break; |
|
572 |
|
573 case KAiwEventCanceled: |
|
574 case KAiwEventStopped: |
|
575 case KAiwEventQueryExit: |
|
576 { |
|
577 LOG( SIMPLE, |
|
578 "SETUPCALL: CSetUpCallHandler::HandleNotifyL SetupCall \ |
|
579 cancelled" ) |
|
580 |
|
581 CompleteSetupCallWithStatus( KErrAbort ); |
|
582 } |
|
583 break; |
|
584 |
|
585 case KAiwEventOutParamCheck: |
|
586 case KAiwEventInParamCheck: |
|
587 { |
|
588 LOG( SIMPLE, |
|
589 "SETUPCALL: CSetUpCallHandler::HandleNotifyL SetupCall param \ |
|
590 fail" ) |
|
591 |
|
592 CompleteSetupCall( RSat::KCmdDataNotUnderstood ); |
|
593 } |
|
594 break; |
|
595 |
|
596 default: |
|
597 { |
|
598 LOG( SIMPLE, |
|
599 "SETUPCALL: CSetUpCallHandler::HandleNotifyL Unknown event \ |
|
600 id" ) |
|
601 } |
|
602 break; |
|
603 |
|
604 } |
|
605 } |
|
606 |
|
607 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleNotifyL exiting" ) |
|
608 return KErrNone; |
|
609 } |
|
610 |
|
611 // ----------------------------------------------------------------------------- |
|
612 // From class MAiwNotifyCallback. |
|
613 // Called when dial request is completed. |
|
614 // ----------------------------------------------------------------------------- |
|
615 // |
|
616 void CSetUpCallHandler::HandleEmergencyDialL( const TInt aStatus ) |
|
617 { |
|
618 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL calling" ) |
|
619 |
|
620 iEmergencyCall = EFalse; |
|
621 |
|
622 if ( KErrNone == aStatus ) |
|
623 { |
|
624 // Set result |
|
625 CompleteSetupCall( RSat::KSuccess ); |
540 } |
626 } |
541 else |
627 else |
542 { |
628 { |
543 iEmergencyCall = EFalse; |
629 CompleteSetupCall( |
544 |
630 RSat::KNetworkUnableToProcessCmd, |
545 if ( KErrNone == aErrCode ) |
631 RSat::KNoSpecificMeProblem ); |
546 { |
632 |
547 // Set result |
633 LOG( SIMPLE, |
548 CompleteSetupCall( RSat::KSuccess ); |
634 "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL Network unable \ |
549 } |
635 to process this" ) |
550 else |
636 } |
551 { |
637 |
552 // The emergency call implementation |
638 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL exiting" ) |
553 // before S60 SAT migration from AIW to EtelMM |
|
554 // According current information, no requirement for this. |
|
555 // We don't return extended network error. |
|
556 CompleteSetupCall( |
|
557 RSat::KNetworkUnableToProcessCmd, |
|
558 RSat::KNoSpecificMeProblem ); |
|
559 |
|
560 LOG( SIMPLE, |
|
561 "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL Network unable \ |
|
562 to process this" ) |
|
563 } |
|
564 } |
|
565 LOG2( NORMAL, |
|
566 "SETUPCALL: CSetUpCallHandler::SetupCallRequestComplete exiting %d", aErrCode ) |
|
567 } |
639 } |
568 |
640 |
569 // ----------------------------------------------------------------------------- |
641 // ----------------------------------------------------------------------------- |
570 // C++ default constructor can NOT contain any code, that |
642 // C++ default constructor can NOT contain any code, that |
571 // might leave. |
643 // might leave. |
595 // |
667 // |
596 void CSetUpCallHandler::ConstructL() |
668 void CSetUpCallHandler::ConstructL() |
597 { |
669 { |
598 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::ConstructL calling" ) |
670 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::ConstructL calling" ) |
599 |
671 |
600 |
|
601 iRequestHandler = CSetupCallRequestHandler::NewL( iUtils->MultiModeApi(), |
|
602 this ); |
|
603 // Create request handler. This is same that LaunchBrowser uses, so this |
672 // Create request handler. This is same that LaunchBrowser uses, so this |
604 // is needed also in HandleCommand - function. |
673 // is needed also in HandleCommand - function. |
605 iUtils->RegisterServiceRequestL( |
674 iUtils->RegisterServiceRequestL( |
606 ESatSProactiveQuery, |
675 ESatSProactiveQuery, |
607 ESatSProactiveQueryResponse, |
676 ESatSProactiveQueryResponse, |
608 this ); |
677 this ); |
609 |
678 |
610 iUtils->RegisterL( this, MSatUtils::ECallControlExecuting ); |
679 iUtils->RegisterL( this, MSatUtils::ECallControlExecuting ); |
611 iUtils->RegisterL( this, MSatUtils::ECallControlDone ); |
680 iUtils->RegisterL( this, MSatUtils::ECallControlDone ); |
612 |
681 |
|
682 // Create service handler for normal call setup. |
|
683 iServiceHandler = CAiwServiceHandler::NewL(); |
|
684 |
|
685 // Create dynamic resource to attach service handler. |
|
686 RCriteriaArray interest; |
|
687 CAiwCriteriaItem* item = CAiwCriteriaItem::NewLC( |
|
688 KAiwCmdCall, |
|
689 KAiwCmdCall, |
|
690 KContentType ); |
|
691 |
|
692 TUid serviceClassBase; |
|
693 serviceClassBase.iUid = KAiwClassBase; |
|
694 item->SetServiceClass( serviceClassBase ); |
|
695 |
|
696 interest.AppendL( item ); |
|
697 |
|
698 // Attach to call service. |
|
699 iServiceHandler->AttachL( interest ); |
|
700 |
|
701 CleanupStack::PopAndDestroy( item ); |
|
702 |
613 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::ConstructL exiting" ) |
703 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::ConstructL exiting" ) |
614 } |
704 } |
615 |
705 |
616 // ----------------------------------------------------------------------------- |
706 // ----------------------------------------------------------------------------- |
617 // Performs the request to dial |
707 // Performs the request to dial |
618 // ----------------------------------------------------------------------------- |
708 // ----------------------------------------------------------------------------- |
619 // |
709 // |
620 void CSetUpCallHandler::DoSetupCall( CSetupCallRequestHandler& aHandler ) |
710 void CSetUpCallHandler::DoSetupCallL() |
621 { |
711 { |
622 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL calling" ) |
712 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL calling" ) |
623 |
713 |
624 if( CheckSetupCallParam() ) |
714 RSat::TSetUpCallType callType( iSetUpCallData.iType ); |
625 { |
715 |
626 |
716 TDes& telNumber( iSetUpCallData.iAddress.iTelNumber ); |
627 RSat::TSetUpCallType callType( iSetUpCallData.iType ); |
717 CheckNumber( telNumber ); |
628 |
718 |
629 TDes& telNumber( iSetUpCallData.iAddress.iTelNumber ); |
719 // 80 is max length in SAT calls, AIW max length is 100 |
630 CheckNumber( telNumber ); |
720 if ( telNumber.Length() > KMaximumPhoneNumberLength ) |
631 |
721 { |
632 RMobileCall::TMobileCallParamsV7 dialParams; |
722 LOG( SIMPLE, |
633 RMobileCall::TMobileCallParamsV7Pckg package( dialParams ); |
723 "SETUPCALL: CSetUpCallHandler::DoSetupCallL telNumber too long" ) |
634 |
724 User::Leave( KErrArgument ); |
635 //Redail has been removed from MCL, no redail support. |
725 } |
636 dialParams.iAutoRedial = EFalse; |
726 |
637 dialParams.iBearerMode = RMobileCall::EMulticallNewBearer; |
727 TBuf< AIWDialDataExt::KMaximumNameLength > name; |
638 dialParams.iCallParamOrigin = RMobileCall::EOriginatorSIM; |
728 if ( RSat::EAlphaIdProvided == |
639 dialParams.iSubAddress = iSetUpCallData.iSubAddress; |
729 iSetUpCallData.iAlphaIdCallSetUpPhase.iStatus ) |
640 dialParams.iBearerCap1 = iSetUpCallData.iCapabilityConfigParams; |
730 { |
641 |
731 LOG( SIMPLE, |
642 dialParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode; |
732 "SETUPCALL: CSetUpCallHandler::DoSetupCallL EAlphaIdProvided" ) |
643 |
733 name = iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId; |
644 dialParams.iIconId.iQualifier = RMobileCall::ENoIconId; |
|
645 |
|
646 |
|
647 dialParams.iAlphaId = iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId; |
|
648 LOG2( NORMAL, |
|
649 "SETUPCALL: CSetUpCallHandler::DoSetupCallL id:%S", |
|
650 &dialParams.iAlphaId ) |
|
651 |
|
652 LOG2( NORMAL, |
|
653 "SETUPCALL: CSetUpCallHandler::DoSetupCallL number:%S", |
|
654 &iSetUpCallData.iAddress.iTelNumber ) |
|
655 |
|
656 TBool terminateOtherCall( EFalse ); |
|
657 // check if we need to disconnect other calls |
|
658 if ( ( RSat::EDisconnectOtherCalls == callType ) || |
|
659 ( RSat::EDisconnectOtherCallsWithRedial == callType ) ) |
|
660 { |
|
661 LOG( SIMPLE, |
|
662 "SETUPCALL: CSetUpCallHandler::DoSetupCallL end other call" ) |
|
663 terminateOtherCall = ETrue ; |
|
664 } |
|
665 |
|
666 aHandler.DialNumber( package, iSetUpCallData.iAddress.iTelNumber, |
|
667 terminateOtherCall, iUtils->CreateAsyncToSyncHelper() ); |
|
668 } |
734 } |
669 else |
735 else |
670 { |
736 { |
671 CompleteSetupCallWithStatus( KErrArgument ); |
737 LOG( SIMPLE, |
672 } |
738 "SETUPCALL: CSetUpCallHandler::DoSetupCallL set AlphaId" ) |
673 |
739 name = iUtils->SatAppName(); |
|
740 } |
|
741 |
|
742 // Make the phone call parameters. |
|
743 CAiwInternalDialData* dialData = CAiwInternalDialData::NewLC(); |
|
744 |
|
745 dialData->SetCallType( CAiwDialData::EAIWVoice ); |
|
746 dialData->SetWindowGroup( AIWDialData::KAiwGoToIdle ); |
|
747 // coverity static analysis tool generates a false finding here |
|
748 // eliminating that |
|
749 // coverity[use_after_free] |
|
750 dialData->SetPhoneNumberL( telNumber ); |
|
751 dialData->SetSATCall( ETrue ); |
|
752 dialData->SetShowNumber( EFalse ); |
|
753 // coverity static analysis tool generates a false finding here |
|
754 // eliminating that |
|
755 // coverity[use_after_free] |
|
756 dialData->SetNameL( name ); |
|
757 dialData->SetAllowMatch( EFalse ); |
|
758 // Remove the redial mechanism from S60 5.x. |
|
759 dialData->SetRedial( AIWDialDataExt::KAIWRedialOff ); |
|
760 |
|
761 // check if we need to disconnect other calls |
|
762 if ( ( RSat::EDisconnectOtherCalls == callType ) || |
|
763 ( RSat::EDisconnectOtherCallsWithRedial == callType ) ) |
|
764 { |
|
765 LOG( SIMPLE, |
|
766 "SETUPCALL: CSetUpCallHandler::DoSetupCallL end other call" ) |
|
767 dialData->SetEndOtherCalls( ETrue ); |
|
768 } |
|
769 |
|
770 if ( AIWInternalDialData::KAiwBearerLength >= |
|
771 iSetUpCallData.iCapabilityConfigParams.Length() ) |
|
772 { |
|
773 LOG( NORMAL, |
|
774 "SETUPCALL: CSetUpCallHandler::DoSetupCallL SetBearerL" ) |
|
775 // coverity static analysis tool generates a false finding here |
|
776 // eliminating that |
|
777 // coverity[use_after_free] |
|
778 dialData->SetBearerL( iSetUpCallData.iCapabilityConfigParams ); |
|
779 } |
|
780 |
|
781 if ( AIWInternalDialData::KAiwSubAddressLength >= |
|
782 iSetUpCallData.iSubAddress.Length() ) |
|
783 { |
|
784 LOG( NORMAL, |
|
785 "SETUPCALL: CSetUpCallHandler::DoSetupCallL SetSubAddressL" ) |
|
786 // coverity static analysis tool generates a false finding here |
|
787 // eliminating that |
|
788 // coverity[use_after_free] |
|
789 dialData->SetSubAddressL( iSetUpCallData.iSubAddress ); |
|
790 } |
|
791 |
|
792 CAiwGenericParamList& paramList = iServiceHandler->InParamListL(); |
|
793 // coverity static analysis tool generates a false finding here |
|
794 // eliminating that |
|
795 // coverity[use_after_free] |
|
796 dialData->FillInParamListL( paramList ); |
|
797 |
|
798 iServiceHandler->ExecuteServiceCmdL( |
|
799 KAiwCmdCall, |
|
800 paramList, |
|
801 iServiceHandler->OutParamListL(), |
|
802 0, |
|
803 this ); |
|
804 |
|
805 CleanupStack::PopAndDestroy( dialData ); |
|
806 |
674 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL exiting" ) |
807 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL exiting" ) |
675 } |
808 } |
676 |
809 |
677 // ----------------------------------------------------------------------------- |
810 // ----------------------------------------------------------------------------- |
678 // Return terminal response filled according to dial result. |
811 // Return terminal response filled according to dial result. |
934 LOG( SIMPLE, |
1065 LOG( SIMPLE, |
935 "SETUPCALL: CSetUpCallHandler::CheckNumber KExpansionChar" ) |
1066 "SETUPCALL: CSetUpCallHandler::CheckNumber KExpansionChar" ) |
936 aNumber[i] = KExpansionChar; |
1067 aNumber[i] = KExpansionChar; |
937 } |
1068 } |
938 } |
1069 } |
939 |
|
940 LOG2( SIMPLE, |
1070 LOG2( SIMPLE, |
941 "SETUPCALL: CSetUpCallHandler::CheckNumber length of aNumber: %d", |
1071 "SETUPCALL: CSetUpCallHandler::CheckNumber length of aNumber: %d", |
942 aNumber.Length() ) |
1072 aNumber.Length() ) |
943 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckNumber exiting" ) |
1073 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckNumber exiting" ) |
944 } |
1074 } |
945 |
1075 |
946 // ----------------------------------------------------------------------------- |
1076 // ----------------------------------------------------------------------------- |
|
1077 // Converts a TCCP error to the corresponding symbian error. |
|
1078 // ----------------------------------------------------------------------------- |
|
1079 // |
|
1080 TInt CSetUpCallHandler::TccpErrorToSymbianError( const TInt aTccpError ) const |
|
1081 { |
|
1082 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError \ |
|
1083 calling" ) |
|
1084 |
|
1085 // Error to be returned after mapped from aTccpError; |
|
1086 // Initialized with default value KErrAccessDenied. |
|
1087 TInt retValue( KErrAccessDenied ); |
|
1088 |
|
1089 // Convert TCCP Error to Symbian Error in the switch braces. |
|
1090 switch ( aTccpError ) |
|
1091 { |
|
1092 case ECCPErrorNone: |
|
1093 case ECCPErrorNotFound: |
|
1094 case ECCPErrorGeneral: |
|
1095 case ECCPErrorCancel: |
|
1096 case ECCPErrorNoMemory: |
|
1097 case ECCPErrorNotSupported: |
|
1098 case ECCPErrorAlreadyInUse: |
|
1099 case ECCPErrorNotReady: |
|
1100 { |
|
1101 retValue = aTccpError; |
|
1102 break; |
|
1103 } |
|
1104 |
|
1105 case ECCPErrorCCCallRejected: |
|
1106 { |
|
1107 retValue = KErrGsmCCCallRejected; |
|
1108 break; |
|
1109 } |
|
1110 |
|
1111 case ECCPRequestFailure: |
|
1112 { |
|
1113 retValue = KErrGsmMMCongestion; |
|
1114 break; |
|
1115 } |
|
1116 |
|
1117 case ECCPErrorCCBearerCapabilityNotAuthorised: |
|
1118 case ECCPErrorBadRequest: |
|
1119 { |
|
1120 retValue = KErrGsmCCBearerCapabilityNotAuthorised; |
|
1121 break; |
|
1122 } |
|
1123 |
|
1124 case ECCPErrorAccessDenied: |
|
1125 { |
|
1126 retValue = KErrAccessDenied; |
|
1127 break; |
|
1128 } |
|
1129 |
|
1130 //The following are KErrGsmCallControlBase group. |
|
1131 case ECCPErrorNotReached: |
|
1132 { |
|
1133 retValue = KErrGsmCCUnassignedNumber; |
|
1134 break; |
|
1135 } |
|
1136 |
|
1137 case ECCPErrorBusy: |
|
1138 { |
|
1139 retValue = KErrGsmCCUserBusy; |
|
1140 break; |
|
1141 } |
|
1142 |
|
1143 case ECCPErrorMovedPermanently: |
|
1144 { |
|
1145 retValue = KErrGsmCCNumberChanged; |
|
1146 break; |
|
1147 } |
|
1148 |
|
1149 case ECCPErrorInvalidURI: |
|
1150 { |
|
1151 retValue = KErrGsmCCInvalidNumberFormat; |
|
1152 break; |
|
1153 } |
|
1154 |
|
1155 case ECCPErrorNetworkOutOfOrder: |
|
1156 { |
|
1157 retValue = KErrGsmCCNetworkOutOfOrder; |
|
1158 break; |
|
1159 } |
|
1160 |
|
1161 case ECCPErrorCCNoRouteToDestination: |
|
1162 { |
|
1163 retValue = KErrGsmCCNoRouteToDestination; |
|
1164 break; |
|
1165 } |
|
1166 |
|
1167 case ECCPErrorCCDestinationOutOfOrder: |
|
1168 { |
|
1169 retValue = KErrGsmCCDestinationOutOfOrder; |
|
1170 break; |
|
1171 } |
|
1172 |
|
1173 case ECCPErrorCCResourceNotAvailable: |
|
1174 { |
|
1175 retValue = KErrGsmCCResourceNotAvailable; |
|
1176 break; |
|
1177 } |
|
1178 |
|
1179 |
|
1180 case ECCPErrorCCInvalidTransitNetworkSelection: |
|
1181 { |
|
1182 retValue = KErrGsmCCInvalidTransitNetworkSelection; |
|
1183 break; |
|
1184 } |
|
1185 |
|
1186 case ECCPErrorCCIncompatibleDestination: |
|
1187 { |
|
1188 retValue = KErrGsmCCIncompatibleDestination; |
|
1189 break; |
|
1190 } |
|
1191 |
|
1192 case ECCPErrorCCIncompatibleMessageInCallState: |
|
1193 { |
|
1194 retValue = KErrGsmCCIncompatibleMessageInCallState; |
|
1195 break; |
|
1196 } |
|
1197 |
|
1198 case ECCPErrorCCIncompatibleMessageInProtocolState: |
|
1199 { |
|
1200 retValue = KErrGsmCCIncompatibleMessageInProtocolState; |
|
1201 break; |
|
1202 } |
|
1203 |
|
1204 case ECCPErrorCCNormalCallClearing: |
|
1205 { |
|
1206 retValue = KErrGsmCCNormalCallClearing; |
|
1207 break; |
|
1208 } |
|
1209 |
|
1210 case ECCPErrorCCUserAlertingNoAnswer: |
|
1211 { |
|
1212 retValue = KErrGsmCCUserAlertingNoAnswer; |
|
1213 break; |
|
1214 } |
|
1215 |
|
1216 case ECCPErrorCCUserNotResponding: |
|
1217 { |
|
1218 retValue = KErrGsmCCUserNotResponding; |
|
1219 break; |
|
1220 } |
|
1221 |
|
1222 case ECCPErrorCCPreemption: |
|
1223 { |
|
1224 retValue = KErrGsmCCPreemption; |
|
1225 break; |
|
1226 } |
|
1227 |
|
1228 case ECCPErrorCCFacilityRejected: |
|
1229 { |
|
1230 retValue = KErrGsmCCFacilityRejected; |
|
1231 break; |
|
1232 } |
|
1233 |
|
1234 case ECCPErrorCCResponseToStatusEnquiry: |
|
1235 { |
|
1236 retValue = KErrGsmCCResponseToStatusEnquiry; |
|
1237 break; |
|
1238 } |
|
1239 |
|
1240 case ECCPErrorCCInvalidMandatoryInformation: |
|
1241 { |
|
1242 retValue = KErrGsmCCInvalidMandatoryInformation; |
|
1243 break; |
|
1244 } |
|
1245 |
|
1246 case ECCPErrorCCNonExistentMessageType: |
|
1247 { |
|
1248 retValue = KErrGsmCCNonExistentMessageType; |
|
1249 break; |
|
1250 } |
|
1251 |
|
1252 case ECCPErrorCCNonExistentInformationElement: |
|
1253 { |
|
1254 retValue = KErrGsmCCNonExistentInformationElement; |
|
1255 break; |
|
1256 } |
|
1257 |
|
1258 case ECCPErrorCCNoChannelAvailable: |
|
1259 { |
|
1260 retValue = KErrGsmCCNoChannelAvailable; |
|
1261 break; |
|
1262 } |
|
1263 |
|
1264 case ECCPErrorCCRequestedFacilityNotSubscribed: |
|
1265 { |
|
1266 retValue = KErrGsmCCRequestedFacilityNotSubscribed; |
|
1267 break; |
|
1268 } |
|
1269 |
|
1270 case ECCPErrorCCIncomingCallsBarredInCug: |
|
1271 { |
|
1272 retValue = KErrGsmCCIncomingCallsBarredInCug; |
|
1273 break; |
|
1274 } |
|
1275 |
|
1276 case ECCPErrorUserNotInCug: |
|
1277 { |
|
1278 retValue = KErrGsmCCUserNotInCug; |
|
1279 break; |
|
1280 } |
|
1281 |
|
1282 case ECCPErrorCCRecoveryOnTimerExpiry: |
|
1283 { |
|
1284 retValue = KErrGsmCCRecoveryOnTimerExpiry; |
|
1285 break; |
|
1286 } |
|
1287 |
|
1288 case ECCPErrorCCBearerCapabilityNotCurrentlyAvailable: |
|
1289 { |
|
1290 retValue = KErrGsmCCBearerCapabilityNotCurrentlyAvailable; |
|
1291 break; |
|
1292 } |
|
1293 |
|
1294 case ECCPErrorCCServiceNotAvailable: |
|
1295 { |
|
1296 retValue = KErrGsmCCServiceNotAvailable; |
|
1297 break; |
|
1298 } |
|
1299 |
|
1300 case ECCPErrorCCBearerServiceNotImplemented: |
|
1301 { |
|
1302 retValue = KErrGsmCCBearerServiceNotImplemented; |
|
1303 break; |
|
1304 } |
|
1305 |
|
1306 case ECCPErrorCCOnlyRestrictedDigitalInformationBCAvailable: |
|
1307 { |
|
1308 retValue = KErrGsmCCOnlyRestrictedDigitalInformationBCAvailable; |
|
1309 break; |
|
1310 } |
|
1311 |
|
1312 case ECCPErrorCCServiceNotImplemented: |
|
1313 { |
|
1314 retValue = KErrGsmCCServiceNotImplemented; |
|
1315 break; |
|
1316 } |
|
1317 |
|
1318 case ECCPErrorCCUnspecifiedInterworkingError: |
|
1319 { |
|
1320 retValue = KErrGsmCCUnspecifiedInterworkingError; |
|
1321 break; |
|
1322 } |
|
1323 |
|
1324 case ECCPErrorSatControl: |
|
1325 { |
|
1326 retValue = KErrSatControl; |
|
1327 break; |
|
1328 } |
|
1329 |
|
1330 default: |
|
1331 { |
|
1332 retValue = KErrAccessDenied; |
|
1333 break; |
|
1334 } |
|
1335 } |
|
1336 |
|
1337 LOG2( SIMPLE, |
|
1338 "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError TCCP error:%d", |
|
1339 aTccpError) |
|
1340 LOG2( SIMPLE, |
|
1341 "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError \ |
|
1342 mapped Symbian Error:%d", retValue) |
|
1343 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError \ |
|
1344 exiting" ) |
|
1345 |
|
1346 return retValue; |
|
1347 } |
|
1348 |
|
1349 // ----------------------------------------------------------------------------- |
947 // Create emergency call |
1350 // Create emergency call |
948 // ----------------------------------------------------------------------------- |
1351 // ----------------------------------------------------------------------------- |
949 // |
1352 // |
950 void CSetUpCallHandler::CreateEmergencyCall( |
1353 void CSetUpCallHandler::CreateEmergencyCallL() |
951 CSetupCallRequestHandler& aHandler ) |
1354 { |
952 { |
1355 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCallL calling" ) |
953 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCall calling" ) |
|
954 |
|
955 aHandler.DialEmergencyCall( iSetUpCallData.iAddress.iTelNumber ); |
|
956 |
1356 |
957 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCall exiting" ) |
1357 if( !iEmergencyCallApi ) |
958 } |
1358 { |
959 |
1359 // Create service handler for emergency call setup.. |
960 // ----------------------------------------------------------------------------- |
1360 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCallL\ |
961 // check setup call param. |
1361 create emergency call handler" ) |
962 // ----------------------------------------------------------------------------- |
1362 iEmergencyCallApi = CPhCltEmergencyCall::NewL( this ); |
963 // |
1363 } |
964 TBool CSetUpCallHandler::CheckSetupCallParam() |
|
965 { |
|
966 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam calling" ) |
|
967 |
|
968 TBool valid( ETrue ); |
|
969 if ( iSetUpCallData.iAddress.iTelNumber.Length() |
|
970 > KSatMaximumPhoneNumberLength ) |
|
971 { |
|
972 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam num" ) |
|
973 valid = EFalse; |
|
974 } |
|
975 else if ( iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId.Length() |
|
976 > KSatMaximumNameLength ) |
|
977 { |
|
978 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam name" ) |
|
979 valid = EFalse; |
|
980 } |
|
981 else if ( iSetUpCallData.iSubAddress.Length() > KSatSubAddressLength ) |
|
982 { |
|
983 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam sub" ) |
|
984 valid = EFalse; |
|
985 } |
|
986 else if ( iSetUpCallData.iCapabilityConfigParams.Length() |
|
987 > KSatBearerLength ) |
|
988 { |
|
989 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam bear" ) |
|
990 valid = EFalse; |
|
991 } |
|
992 LOG2( SIMPLE, |
|
993 "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam exiting %d", valid ) |
|
994 |
1364 |
995 return valid; |
1365 iEmergencyCallApi->DialEmergencyCallL( |
996 } |
1366 iSetUpCallData.iAddress.iTelNumber ); |
|
1367 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCallL exiting" ) |
|
1368 } |
|
1369 |
997 // End Of File |
1370 // End Of File |