48 #include <bldvariant.hrh> |
48 #include <bldvariant.hrh> |
49 #include <ccpdefs.h> |
49 #include <ccpdefs.h> |
50 #include <coreapplicationuisdomainpskeys.h> |
50 #include <coreapplicationuisdomainpskeys.h> |
51 #include <cpeclientinformation.h> |
51 #include <cpeclientinformation.h> |
52 #include <cpegsmaudiodata.h> |
52 #include <cpegsmaudiodata.h> |
53 #include <CPhoneGsmHandlerContainer.h> |
53 #include <cphonegsmhandlercontainer.h> |
54 #include <CPhoneGsmOptionContainerBase.h> |
54 #include <cphonegsmoptioncontainerbase.h> |
55 #include <CPhoneGsmParserBase.h> |
55 #include <cphonegsmparserbase.h> |
56 #include <CPhoneGsmParserResult.h> |
56 #include <cphonegsmparserresult.h> |
57 #include <featmgr.h> |
57 #include <featmgr.h> |
58 #include <mccecall.h> |
58 #include <mccecall.h> |
59 #include <mpeaudiodata.h> |
59 #include <mpeaudiodata.h> |
60 #include <mpecallhandling.h> |
60 #include <mpecallhandling.h> |
61 #include <mpecontacthandling.h> |
61 #include <mpecontacthandling.h> |
62 #include <mpedatastore.h> |
62 #include <mpedatastore.h> |
63 #include <mpeloghandling.h> |
63 #include <mpeloghandling.h> |
64 #include <pathinfo.h> |
64 #include <pathinfo.h> |
65 #include <pepanic.pan> |
65 #include <pepanic.pan> |
66 #include <PhCltTypes.h> |
66 #include <phclttypes.h> |
67 #include <PhoneGsmParser.h> |
67 #include <phonegsmparser.h> |
68 #include <ProfileEngineDomainConstants.h> |
68 #include <ProfileEngineDomainConstants.h> |
69 #include <talogger.h> |
69 #include <talogger.h> |
70 #include <w32std.h> |
70 #include <w32std.h> |
71 |
71 |
72 // EXTERNAL DATA STRUCTURES |
72 // EXTERNAL DATA STRUCTURES |
402 } |
401 } |
403 return errorCode; |
402 return errorCode; |
404 } |
403 } |
405 |
404 |
406 // ----------------------------------------------------------------------------- |
405 // ----------------------------------------------------------------------------- |
407 // CPEMessageHandler::HandleReleaseConference |
|
408 // Handles release message from phone application |
|
409 // Method calls HangUp method from the CallHandling subsystem. |
|
410 // ----------------------------------------------------------------------------- |
|
411 // |
|
412 TInt CPEMessageHandler::HandleReleaseConference() |
|
413 { |
|
414 |
|
415 return iCallHandling.ReleaseConference(); |
|
416 |
|
417 } |
|
418 |
|
419 // ----------------------------------------------------------------------------- |
|
420 // CPEMessageHandler::HandleSendDtmf |
406 // CPEMessageHandler::HandleSendDtmf |
421 // Handles send dtmf message from phone application |
407 // Handles send dtmf message from phone application |
422 // Method fetches dtmf string from the CPEEngineInfo class and then |
408 // Method fetches dtmf string from the CPEEngineInfo class and then |
423 // Method parses the DTMF string and then take action properly: |
409 // Method parses the DTMF string and then take action properly: |
424 // hard pause: triggers sending MEngineMonitor::EPEMessageStoppedDTMF |
410 // hard pause: triggers sending MEngineMonitor::EPEMessageStoppedDTMF |
545 CPEMessageHandler* self = static_cast<CPEMessageHandler*>(aAny); |
525 CPEMessageHandler* self = static_cast<CPEMessageHandler*>(aAny); |
546 |
526 |
547 delete self->iAsyncCallBack; |
527 delete self->iAsyncCallBack; |
548 self->iAsyncCallBack = NULL; |
528 self->iAsyncCallBack = NULL; |
549 return self->HandleSendDtmf(); |
529 return self->HandleSendDtmf(); |
550 } |
|
551 |
|
552 // ----------------------------------------------------------------------------- |
|
553 // CPEMessageHandler::HandlePlusSignInDtmf |
|
554 // Handles plus (+) sign in a DTMF string. |
|
555 // ----------------------------------------------------------------------------- |
|
556 // |
|
557 void CPEMessageHandler::HandlePlusSignInDtmf(const TPEDtmfString& aDtmfString ) |
|
558 { |
|
559 TEFLOGSTRING2( KTAMESINT, "PE CPEMessageHandler::HandlePlusSignInDtmf(), aDtmfString: %S", &aDtmfString ); |
|
560 |
|
561 // Find the SD index after the plus sign |
|
562 TPtrC validManualDTMFChars( KPEValidSpeedDialChars ); |
|
563 TInt index = ECCPErrorNotFound; |
|
564 for ( index = 1 ; index < aDtmfString.Length() ; index++ ) |
|
565 { |
|
566 if ( validManualDTMFChars.Locate( aDtmfString[index] ) == ECCPErrorNotFound ) |
|
567 { |
|
568 TEFLOGSTRING( KTAMESINT, "PE CPEMessageHandler::HandlePlusSignInDtmf(), Not Found" ); |
|
569 break; |
|
570 } |
|
571 } |
|
572 TPESpeedDialSubstituionStatus sdStatus = EPEDtmfSpeedDialOk; |
|
573 |
|
574 // Empty string after the plus sign |
|
575 if ( index == 1 ) |
|
576 { |
|
577 if ( aDtmfString.Length() > 1 ) |
|
578 { |
|
579 // pw+ after the plus sign. |
|
580 sdStatus = EPEDtmfSpeedDialInvalidSpeedDial; |
|
581 } |
|
582 else |
|
583 { |
|
584 // string ended with the plus sign. |
|
585 sdStatus = EPEDtmfSpeedDialPromptUser; |
|
586 } |
|
587 // Clear DTMF string. |
|
588 iDataStore.SetDtmfString( KNullDesC() ); |
|
589 } |
|
590 // Else if the SD location ends the DTMF string, move the index to the |
|
591 // last character instead of one over. |
|
592 else if ( index == aDtmfString.Length() ) |
|
593 { |
|
594 index--; |
|
595 } |
|
596 |
|
597 // Check that the index is valid |
|
598 TInt sdIndex = ECCPErrorNotFound; |
|
599 if ( sdStatus == EPEDtmfSpeedDialOk ) |
|
600 { |
|
601 TLex lexer( aDtmfString.Mid( 1, index ) ); |
|
602 // convert it to a number |
|
603 if ( lexer.Val(sdIndex) == ECCPErrorNone ) |
|
604 { |
|
605 // Is it out of range |
|
606 if ( sdIndex < KPESpeedDialIndexMin || |
|
607 sdIndex > KPESpeedDialIndexMax ) |
|
608 { |
|
609 sdStatus = EPEDtmfSpeedDialInvalidSpeedDial; |
|
610 } |
|
611 } |
|
612 else |
|
613 { |
|
614 sdStatus = EPEDtmfSpeedDialInvalidSpeedDial; |
|
615 } |
|
616 } |
|
617 |
|
618 // Fetch the SD location |
|
619 TPEPhoneNumber speedDialLocationString; |
|
620 if ( sdStatus == EPEDtmfSpeedDialOk ) |
|
621 { |
|
622 TEFLOGSTRING2( KTAMESINT, "PE CPEMessageHandler::HandlePlusSignInDtmf(), SD location %i", sdIndex ); |
|
623 if ( iContactHandling.GetSpeedDialLocation( |
|
624 sdIndex, speedDialLocationString ) == ECCPErrorNone ) |
|
625 { |
|
626 // Is content found |
|
627 if ( speedDialLocationString.Length() == 0) |
|
628 { |
|
629 sdStatus = EPEDtmfSpeedDialNotAssigned; |
|
630 } |
|
631 else if ( speedDialLocationString[0] == KPEDtmfPlusChar) |
|
632 { |
|
633 // plus char must be removed from dtmf string before sending |
|
634 RemovePlusPrefix( speedDialLocationString ); |
|
635 } |
|
636 } |
|
637 else |
|
638 { |
|
639 sdStatus = EPEDtmfSpeedDialInvalidSpeedDial; |
|
640 } |
|
641 } |
|
642 |
|
643 // Now interpret the sdStatus to the next action |
|
644 switch ( sdStatus ) |
|
645 { |
|
646 case EPEDtmfSpeedDialOk: |
|
647 { |
|
648 TEFLOGSTRING2( KTAMESINT, "PE CPEMessageHandler::HandlePlusSignInDtmf(), SD result: %S", &speedDialLocationString ); |
|
649 // Take the SD location string and use that as new DTMF string |
|
650 iDataStore.SetDtmfStringCommand( speedDialLocationString ); |
|
651 |
|
652 // Do recursion asyncronously |
|
653 TCallBack callBack( CallBackHandleSendDtmf, this ); |
|
654 delete iAsyncCallBack; |
|
655 iAsyncCallBack = NULL; |
|
656 // Function does not allow to leave. |
|
657 iAsyncCallBack = new CAsyncCallBack( callBack, CActive::EPriorityStandard ); |
|
658 if ( iAsyncCallBack ) |
|
659 { |
|
660 iAsyncCallBack->CallBack(); |
|
661 } |
|
662 else |
|
663 { |
|
664 iModel.SendMessage( MEngineMonitor::EPEMessageDTMFSendingAborted ); |
|
665 } |
|
666 } |
|
667 break; |
|
668 case EPEDtmfSpeedDialPromptUser: |
|
669 // Speed dial location not given. |
|
670 iDataStore.SetDtmfString( KNullDesC() ); |
|
671 iModel.SendMessage( MEngineMonitor::EPEMessagePromptSpeedDial ); |
|
672 break; |
|
673 case EPEDtmfSpeedDialNotAssigned: |
|
674 // Speed dial location valid but not assigned |
|
675 iDataStore.SetDtmfString( KNullDesC() ); |
|
676 iDataStore.SetDtmfStringCommand( KNullDesC() ); |
|
677 iModel.SendMessage( MEngineMonitor::EPEMessageDTMFSendingAborted); |
|
678 iModel.SendMessage( MEngineMonitor::EPEMessageSpeedDialNotAssigned ); |
|
679 break; |
|
680 case EPEDtmfSpeedDialInvalidSpeedDial: |
|
681 // Speed dial location invalid |
|
682 iDataStore.SetDtmfString( KNullDesC() ); |
|
683 iDataStore.SetDtmfStringCommand( KNullDesC() ); |
|
684 iModel.SendMessage( MEngineMonitor::EPEMessageDTMFSendingAborted); |
|
685 iModel.SendMessage( MEngineMonitor::EPEMessageInvalidSpeedDial ); |
|
686 break; |
|
687 default: |
|
688 Panic( EPEPanicInvalidState ); |
|
689 break; |
|
690 } // end switch |
|
691 } |
530 } |
692 |
531 |
693 // ----------------------------------------------------------------------------- |
532 // ----------------------------------------------------------------------------- |
694 // CPEMessageHandler::CheckPrefix |
533 // CPEMessageHandler::CheckPrefix |
695 // Checks the status of phone number prefix change setting |
534 // Checks the status of phone number prefix change setting |
1094 "PE: CPEMessageHandler::RemoveInvalidChars, Parsed string = %S", |
933 "PE: CPEMessageHandler::RemoveInvalidChars, Parsed string = %S", |
1095 &aString); |
934 &aString); |
1096 return returnValue; |
935 return returnValue; |
1097 } |
936 } |
1098 |
937 |
1099 |
|
1100 // ----------------------------------------------------------------------------- |
|
1101 // CPEMessageHandler::HandleGetLifeTimerData |
|
1102 // Reads lifetimerdata from custom api and stores it to engine info |
|
1103 // ----------------------------------------------------------------------------- |
|
1104 // |
|
1105 TInt CPEMessageHandler::HandleGetLifeTimerData() const |
|
1106 { |
|
1107 TCCPLifeTimeData lifeTimeData; |
|
1108 TCCPLifeTimeDataPckg pckg( lifeTimeData ); |
|
1109 |
|
1110 if ( iCallHandling.GetLifeTime( pckg ) ) |
|
1111 { |
|
1112 TEFLOGSTRING2( |
|
1113 KTAGENERAL, |
|
1114 "PE: CPEMessageHandler::HandleGetLifeTimerData, iHours = %d", |
|
1115 lifeTimeData.iHours); |
|
1116 TEFLOGSTRING2( |
|
1117 KTAGENERAL, |
|
1118 "PE: CPEMessageHandler::HandleGetLifeTimerData, iMinutes = %d", |
|
1119 lifeTimeData.iMinutes); |
|
1120 |
|
1121 iDataStore.SetLifeTimerData( pckg ); |
|
1122 } |
|
1123 |
|
1124 return ECCPErrorNone; |
|
1125 } |
|
1126 |
|
1127 // ----------------------------------------------------------------------------- |
938 // ----------------------------------------------------------------------------- |
1128 // CPEMessageHandler::CallbackSendMessageStoppedDTMF |
939 // CPEMessageHandler::CallbackSendMessageStoppedDTMF |
1129 // ----------------------------------------------------------------------------- |
940 // ----------------------------------------------------------------------------- |
1130 // |
941 // |
1131 TInt CPEMessageHandler::CallbackSendMessageStoppedDTMF( TAny* aAny ) |
942 TInt CPEMessageHandler::CallbackSendMessageStoppedDTMF( TAny* aAny ) |
1388 if ( iCallInfo->iEmergency || aCallId == KPEEmergencyCallId ) |
1196 if ( iCallInfo->iEmergency || aCallId == KPEEmergencyCallId ) |
1389 { |
1197 { |
1390 iDataStore.SetRemotePhoneNumberType( EPEEmergencyNumber, aCallId ); |
1198 iDataStore.SetRemotePhoneNumberType( EPEEmergencyNumber, aCallId ); |
1391 } |
1199 } |
1392 else if( iDataStore.CallDirection( aCallId ) != RMobileCall::EMobileOriginated ) |
1200 else if( iDataStore.CallDirection( aCallId ) != RMobileCall::EMobileOriginated ) |
1393 { |
1201 { |
1394 switch( tempIdentity ) |
1202 switch( tempIdentity ) |
1395 { |
1203 { |
1396 case RMobileCall::ERemoteIdentitySuppressed: |
1204 case RMobileCall::ERemoteIdentitySuppressed: |
1397 { |
1205 { |
1398 // It is neccessary to perform an additional check for available |
1206 // It is neccessary to perform an additional check for available |
1399 // remote party phone number to comply with Italian operator |
1207 // remote party phone number to comply with Italian operator |
1400 // requirement: "If CLIR is active but network still provides |
1208 // requirement: "If CLIR is active but network still provides |
1401 // the device with a phone number, it should not be blocked |
1209 // the device with a phone number, it should not be blocked |
1402 // but passed to a client when requested." |
1210 // but passed to a client when requested." |
1403 if( iDataStore.RemotePhoneNumber( aCallId ).Length() == 0 ) |
1211 if( iDataStore.RemotePhoneNumber( aCallId ).Length() == 0 ) |
1404 { |
1212 { |
1405 HideIdentification( EPEPrivateNumber, aCallId ); |
1213 HideIdentification( EPEPrivateNumber, aCallId ); |
1406 } |
1214 } |
1407 else |
1215 else |
1408 { |
1216 { |
1409 // Align remote identity with remote phone number availability. |
1217 // Align remote identity with remote phone number availability. |
1410 iDataStore.SetRemoteIdentity( RMobileCall::ERemoteIdentityAvailable, aCallId ); |
1218 iDataStore.SetRemoteIdentity( RMobileCall::ERemoteIdentityAvailable, aCallId ); |
1411 } |
1219 } |
1412 break; |
1220 break; |
1413 } |
1221 } |
1414 case RMobileCall::ERemoteIdentityAvailableNoCliRejectedByUser: |
1222 case RMobileCall::ERemoteIdentityAvailableNoCliRejectedByUser: |
1415 { |
1223 { |
1416 HideIdentification( EPEPrivateNumber, aCallId ); |
1224 HideIdentification( EPEPrivateNumber, aCallId ); |
1417 break; |
1225 break; |
1418 } |
1226 } |
1419 case RMobileCall::ERemoteIdentityUnknown: |
1227 case RMobileCall::ERemoteIdentityUnknown: |
1420 case RMobileCall::ERemoteIdentityAvailableNoCliInteractionWithOtherService: |
1228 case RMobileCall::ERemoteIdentityAvailableNoCliInteractionWithOtherService: |
1421 case RMobileCall::ERemoteIdentityUnavailableNoCliInteractionWithOtherService: |
1229 case RMobileCall::ERemoteIdentityUnavailableNoCliInteractionWithOtherService: |
1422 case RMobileCall::ERemoteIdentityAvailableNoCliCoinOrPayphone: |
1230 case RMobileCall::ERemoteIdentityAvailableNoCliCoinOrPayphone: |
1423 case RMobileCall::ERemoteIdentityUnavailableNoCliCoinOrPayphone: |
1231 case RMobileCall::ERemoteIdentityUnavailableNoCliCoinOrPayphone: |
1424 case RMobileCall::ERemoteIdentityAvailableNoCliUnavailable: |
1232 case RMobileCall::ERemoteIdentityAvailableNoCliUnavailable: |
1425 { |
1233 { |
1426 HideIdentification( EPEUnknownNumber, aCallId ); |
1234 HideIdentification( EPEUnknownNumber, aCallId ); |
1427 break; |
1235 break; |
1428 } |
1236 } |
1429 case RMobileCall::ERemoteIdentityAvailable: |
1237 case RMobileCall::ERemoteIdentityAvailable: |
1430 default: |
1238 default: |
1431 { |
1239 { |
1432 TEFLOGSTRING( KTAINT, |
1240 TEFLOGSTRING( KTAINT, |
1433 "PE CPEMessageHandler::CheckAndHideIdentity, CLI available" ); |
1241 "PE CPEMessageHandler::CheckAndHideIdentity, CLI available" ); |
1434 break; |
1242 break; |
1435 } |
1243 } |
1436 } |
1244 } |
1437 } |
1245 } |
1438 } |
1246 } |
1439 |
1247 |
1440 // ----------------------------------------------------------------------------- |
1248 // ----------------------------------------------------------------------------- |
1441 // CPEMessageHandler::FindCallInfo |
1249 // CPEMessageHandler::FindCallInfo |
1442 // Return callInfo from Etel/TSY. |
1250 // Return callInfo from Etel/TSY. |
1443 // ----------------------------------------------------------------------------- |
1251 // ----------------------------------------------------------------------------- |
1735 } |
1543 } |
1736 else |
1544 else |
1737 { |
1545 { |
1738 |
1546 |
1739 dtmfString = iDataStore.DtmfPostFix( aCallId ); |
1547 dtmfString = iDataStore.DtmfPostFix( aCallId ); |
1740 |
1548 |
1741 if ( dtmfString.Length() > 0 ) |
1549 if ( dtmfString.Length() > 0 ) |
1742 { |
1550 { |
1743 iDataStore.SetDtmfStringCommand( dtmfString ); |
1551 iDataStore.SetDtmfStringCommand( dtmfString ); |
1744 errorCode = HandleSendDtmf(); |
1552 errorCode = HandleSendDtmf(); |
1745 } |
1553 } |
1746 } |
1554 } |
1747 // Reset unattended transfer callback flag |
1555 |
1748 iDataStore.SetDoCallBackRequest( EFalse, aCallId ); |
|
1749 |
|
1750 iDataStore.SetErrorCode( errorCode ); |
1556 iDataStore.SetErrorCode( errorCode ); |
1751 } |
1557 } |
1752 } |
1558 } |
1753 // For Sat call ( normal or emergency ) |
1559 // For Sat call ( normal or emergency ) |
1754 iClientServices->CallRequestMonitor()->SendRespond( ECCPErrorNone ); |
1560 iClientServices->CallRequestMonitor()->SendRespond( ECCPErrorNone ); |
1755 |
|
1756 |
|
1757 |
1561 |
1758 // Reset Phonenumber from engine info, this is necessary so that call number |
1562 // Reset Phonenumber from engine info, this is necessary so that call number |
1759 // logging works OK (see CPEMessageHandler::SetPhoneNumberForCallLogging). |
1563 // logging works OK (see CPEMessageHandler::SetPhoneNumberForCallLogging). |
1760 iDataStore.SetPhoneNumber( KNullDesC() ); |
1564 iDataStore.SetPhoneNumber( KNullDesC() ); |
1761 |
1565 |
1867 |
1671 |
1868 if ( aClientCall ) |
1672 if ( aClientCall ) |
1869 { |
1673 { |
1870 HandleClientCallData(); |
1674 HandleClientCallData(); |
1871 } |
1675 } |
1872 else |
1676 else |
1873 { |
1677 { |
1874 ResetClientCallData(); |
1678 iDataStore.SetCallOriginCommand(EPECallOriginPhone); |
|
1679 ResetClientCallData(); |
1875 } |
1680 } |
1876 |
1681 |
1877 //Get number of calls |
1682 //Get number of calls |
1878 numberOfCalls = iCallHandling.GetNumberOfCalls(); |
1683 numberOfCalls = iCallHandling.GetNumberOfCalls(); |
1879 |
1684 |
1880 // Check the phone number for prefix change and change the prefix if needed |
1685 // Check the phone number for prefix change and change the prefix if needed |
1881 CheckPrefix(); |
1686 CheckPrefix(); |
1882 |
1687 |
1883 if( iSwitchToVidCalReconFlag ) |
1688 phoneNumber = iDataStore.PhoneNumber(); |
1884 { |
1689 |
1885 phoneNumber = iDataStore.SwitchToNumberCommand(); |
|
1886 // Clear flag to match the previous set operation in HandleSwitchToVideoOrVoice() function. |
|
1887 iSwitchToVidCalReconFlag = EFalse; |
|
1888 } |
|
1889 else |
|
1890 { |
|
1891 phoneNumber = iDataStore.PhoneNumber(); |
|
1892 } |
|
1893 |
|
1894 __ASSERT_ALWAYS( !( phoneNumber == KNullDesC ), User::Leave( ECCPErrorInvalidPhoneNumber )); |
1690 __ASSERT_ALWAYS( !( phoneNumber == KNullDesC ), User::Leave( ECCPErrorInvalidPhoneNumber )); |
1895 |
1691 |
1896 // Number parser operations |
1692 // Number parser operations |
1897 iOptions->SetOptionStatus( KPhoneOptionSend, ETrue ); |
1693 iOptions->SetOptionStatus( KPhoneOptionSend, ETrue ); |
1898 iOptions->SetOptionStatus( KPhoneOptionInCall, numberOfCalls > 0 ); |
1694 iOptions->SetOptionStatus( KPhoneOptionInCall, numberOfCalls > 0 ); |
2054 "PE CPEMessageHandler::HandleIncomingCallL: Calling iGsmAudioData->PlayInbandTone() for call waiting tone"); |
1845 "PE CPEMessageHandler::HandleIncomingCallL: Calling iGsmAudioData->PlayInbandTone() for call waiting tone"); |
2055 iDataStore.SetInbandTone( ECCPCallWaiting ); |
1846 iDataStore.SetInbandTone( ECCPCallWaiting ); |
2056 iGsmAudioData.PlayInbandTone(); |
1847 iGsmAudioData.PlayInbandTone(); |
2057 iWaitingCallId = aCallId; |
1848 iWaitingCallId = aCallId; |
2058 } |
1849 } |
2059 else if( numberOfCalls == 1 ) |
1850 |
2060 { |
|
2061 // Check volume levels - zero level needs to be reset to default value |
|
2062 iGsmAudioData.SetDefaultVolume(); |
|
2063 } |
|
2064 if( AutomaticAnswer( aCallId ) ) |
1851 if( AutomaticAnswer( aCallId ) ) |
2065 { |
1852 { |
2066 TEFLOGSTRING( KTAINT, |
1853 TEFLOGSTRING( KTAINT, |
2067 "PE CPEMessageHandler::HandleIncomingCallL: iAutomaticAnswerTimer->StartTimer"); |
1854 "PE CPEMessageHandler::HandleIncomingCallL: iAutomaticAnswerTimer->StartTimer"); |
2068 iAutomaticAnswerTimer->StartTimer( KPEAutomaticAnswerTimeOut, MEngineMonitor::EPEMessageAnswer, aCallId ); |
1855 iAutomaticAnswerTimer->StartTimer( KPEAutomaticAnswerTimeOut, MEngineMonitor::EPEMessageAnswer, aCallId ); |
2084 { |
1871 { |
2085 TEFLOGSTRING( KTAINT, "PE CPEMessageHandler::HandleDisconnecting" ); |
1872 TEFLOGSTRING( KTAINT, "PE CPEMessageHandler::HandleDisconnecting" ); |
2086 |
1873 |
2087 iAutomaticAnswerTimer->Cancel(); |
1874 iAutomaticAnswerTimer->Cancel(); |
2088 |
1875 |
2089 // Prevent playing inband tone when phone is in silent mode and |
1876 TEFLOGSTRING( KTAMESOUT, |
2090 // audio output is not defined (call is not connected). |
|
2091 if ( ( iDataStore.RingingType() != EProfileRingingTypeSilent ) || |
|
2092 ( iDataStore.AudioOutput() != EPENotActive ) ) |
|
2093 { |
|
2094 TEFLOGSTRING( KTAMESOUT, |
|
2095 "PE CPEMessageHandler::HandleDisconnecting > iGsmAudioData.PlayInbandTone()"); |
1877 "PE CPEMessageHandler::HandleDisconnecting > iGsmAudioData.PlayInbandTone()"); |
2096 iGsmAudioData.PlayInbandTone(); |
1878 iGsmAudioData.PlayInbandTone(); |
2097 } |
1879 |
2098 |
|
2099 return ECCPErrorNone; |
1880 return ECCPErrorNone; |
2100 } |
1881 } |
2101 |
1882 |
2102 // ----------------------------------------------------------------------------- |
1883 // ----------------------------------------------------------------------------- |
2103 // CPEMessageHandler::HandleDisconnectingWithInband |
1884 // CPEMessageHandler::HandleDisconnectingWithInband |
2626 // ----------------------------------------------------------------------------- |
2402 // ----------------------------------------------------------------------------- |
2627 // CPEMessageHandler::IsEmergencyAllowed() |
2403 // CPEMessageHandler::IsEmergencyAllowed() |
2628 // Checks if emergency call is allowed. |
2404 // Checks if emergency call is allowed. |
2629 // ----------------------------------------------------------------------------- |
2405 // ----------------------------------------------------------------------------- |
2630 // |
2406 // |
2631 TBool CPEMessageHandler::IsEmergencyAllowed() const |
2407 TBool CPEMessageHandler::IsNetworkConnectionAllowed() const |
2632 { |
2408 { |
2633 TBool networkConnectionAllowed( EFalse ); |
2409 TBool networkConnectionAllowed( EFalse ); |
2634 //It is safe to ignore error code here: a default value of EFalse is used if the get fails |
2410 //It is safe to ignore error code here: a default value of EFalse is used if the get fails |
2635 iExternalDataHandler.Get( EPENetworkConnectionAllowedSetting, networkConnectionAllowed ); |
2411 iExternalDataHandler.Get( EPENetworkConnectionAllowedSetting, networkConnectionAllowed ); |
2636 return networkConnectionAllowed; |
2412 return networkConnectionAllowed; |
2898 { |
2671 { |
2899 return iCallHandling.ReplaceActive(); |
2672 return iCallHandling.ReplaceActive(); |
2900 } |
2673 } |
2901 |
2674 |
2902 // ----------------------------------------------------------------------------- |
2675 // ----------------------------------------------------------------------------- |
|
2676 // CPEMessageHandler::CheckIfPhoneIsLockedL |
|
2677 // ----------------------------------------------------------------------------- |
|
2678 // |
|
2679 void CPEMessageHandler::CheckIfPhoneIsLockedL() |
|
2680 { |
|
2681 // Check if phone is locked |
|
2682 TInt keyLockStatus( EAutolockStatusUninitialized ); |
|
2683 TInt err = RProperty::Get( KPSUidCoreApplicationUIs, KCoreAppUIsAutolockStatus, keyLockStatus ); |
|
2684 const TBool phoneIsLocked = ( keyLockStatus > EAutolockOff ); |
|
2685 |
|
2686 if ( phoneIsLocked && err == KErrNone ) |
|
2687 { |
|
2688 // New call is not possible if device lock is on |
|
2689 TEFLOGSTRING2( KTAERROR, |
|
2690 "PE CPEMessageHandler::CheckIfPhoneIsLockedL, keyLockStatus : %d", keyLockStatus ); |
|
2691 User::Leave( ECCPErrorAuthenticationFailed ); |
|
2692 } |
|
2693 } |
|
2694 |
|
2695 // ----------------------------------------------------------------------------- |
2903 // CPEMessageHandler::IsActiveVideo |
2696 // CPEMessageHandler::IsActiveVideo |
2904 // Checks if there are any connected video calls |
2697 // Checks if there are any connected video calls |
2905 // ----------------------------------------------------------------------------- |
2698 // ----------------------------------------------------------------------------- |
2906 // |
2699 // |
2907 TBool CPEMessageHandler::IsActiveVideo() |
2700 TBool CPEMessageHandler::IsActiveVideo() |