20 #include "cpeclientinformation.h" |
20 #include "cpeclientinformation.h" |
21 #include "cpeengineinfoimpl.h" |
21 #include "cpeengineinfoimpl.h" |
22 #include <pepanic.pan> |
22 #include <pepanic.pan> |
23 #include <telinternalpskeys.h> |
23 #include <telinternalpskeys.h> |
24 #include <cphcltdialdata.h> |
24 #include <cphcltdialdata.h> |
25 #include <PhCltTypes.h> |
25 #include <phclttypes.h> |
26 #include <talogger.h> |
26 #include <talogger.h> |
27 |
27 |
28 // ================= MEMBER FUNCTIONS ========================================== |
28 // ================= MEMBER FUNCTIONS ========================================== |
29 |
29 |
30 // ----------------------------------------------------------------------------- |
30 // ----------------------------------------------------------------------------- |
33 // might leave. |
33 // might leave. |
34 // ----------------------------------------------------------------------------- |
34 // ----------------------------------------------------------------------------- |
35 // |
35 // |
36 CPEEngineInfoImpl::CPEEngineInfoImpl() |
36 CPEEngineInfoImpl::CPEEngineInfoImpl() |
37 : iCurrentCalls( KPEMaximumNumberOfCalls ) |
37 : iCurrentCalls( KPEMaximumNumberOfCalls ) |
|
38 ,iContactId( KErrNotFound ) |
38 { |
39 { |
39 iCallCommandInfo.iPhoneNumber = KNullDesC; |
40 iCallCommandInfo.iPhoneNumber = KNullDesC; |
40 iCallCommandInfo.iCallId = 0; |
41 iCallCommandInfo.iCallId = 0; |
41 iCallCommandInfo.iKeyCode = 0; |
42 iCallCommandInfo.iKeyCode = 0; |
42 iCallCommandInfo.iAudioVolume = KPENumberInitValue; |
43 iCallCommandInfo.iAudioVolume = KPENumberInitValue; |
43 iCallCommandInfo.iAudioMute = EFalse; |
44 iCallCommandInfo.iAudioMute = EFalse; |
44 iCallCommandInfo.iDtmfString = KNullDesC; |
45 iCallCommandInfo.iDtmfString = KNullDesC; |
45 iCallCommandInfo.iCallType = EPECallTypeUninitialized; |
46 iCallCommandInfo.iCallType = EPECallTypeUninitialized; |
46 iCallCommandInfo.iServiceId = 0; |
47 iCallCommandInfo.iServiceId = 0; |
47 iCallCommandInfo.iIdRestrict = RMobileCall::EIdRestrictDefault; |
|
48 iCallCommandInfo.iEmergencyNumber = KNullDesC; |
|
49 iCallCommandInfo.iTransferToAddress = KNullDesC; |
|
50 iCallCommandInfo.iForwardToAddressIndex = ECCPErrorNotFound; |
|
51 iCallCommandInfo.iTransferDial = EFalse; |
|
52 |
|
53 iBasicInfo.iAudioOutputPreference = EPSAudioPrivate; |
48 iBasicInfo.iAudioOutputPreference = EPSAudioPrivate; |
54 iBasicInfo.iALSLine = CCCECallParameters::ECCELineTypePrimary; |
49 iBasicInfo.iALSLine = CCCECallParameters::ECCELineTypePrimary; |
55 iBasicInfo.iALSLineSupport = EFalse; |
50 iBasicInfo.iALSLineSupport = EFalse; |
56 iBasicInfo.iPhoneAudioRouteParameters.iAudioOutput = EPENotActive; |
51 iBasicInfo.iPhoneAudioRouteParameters.iAudioOutput = EPENotActive; |
57 iBasicInfo.iAudioVolume = KPEDefaultAudioVolume; |
52 iBasicInfo.iAudioVolume = KPEDefaultAudioVolume; |
60 iBasicInfo.iDtmfString = KNullDesC; |
55 iBasicInfo.iDtmfString = KNullDesC; |
61 iBasicInfo.iErrorInfo.iErrorCode = ECCPErrorNone; |
56 iBasicInfo.iErrorInfo.iErrorCode = ECCPErrorNone; |
62 iBasicInfo.iErrorInfo.iCallId = KPECallIdNotUsed; |
57 iBasicInfo.iErrorInfo.iCallId = KPECallIdNotUsed; |
63 iBasicInfo.iProfileId = ECCPErrorNotFound; |
58 iBasicInfo.iProfileId = ECCPErrorNotFound; |
64 iBasicInfo.iProfileName = KNullDesC; |
59 iBasicInfo.iProfileName = KNullDesC; |
65 iBasicInfo.iPhoneIdentityParameters.iManufacturer = KNullDesC; |
|
66 iBasicInfo.iPhoneIdentityParameters.iModel = KNullDesC; |
|
67 iBasicInfo.iPhoneIdentityParameters.iRevision = KNullDesC; |
|
68 iBasicInfo.iPhoneIdentityParameters.iSerialNumber = KNullDesC; |
|
69 iBasicInfo.iLastCallDuration = KPENumberInitValue; |
60 iBasicInfo.iLastCallDuration = KPENumberInitValue; |
70 iBasicInfo.iVMBXNumbers.iVMBXL1 = KNullDesC; |
61 iBasicInfo.iVMBXNumbers.iVMBXL1 = KNullDesC; |
71 iBasicInfo.iVMBXNumbers.iVMBXL2 = KNullDesC; |
62 iBasicInfo.iVMBXNumbers.iVMBXL2 = KNullDesC; |
72 iBasicInfo.iRingingType = EProfileRingingTypeRinging; |
63 iBasicInfo.iRingingType = EProfileRingingTypeRinging; |
73 iBasicInfo.iTextToSpeech = EFalse; |
64 iBasicInfo.iTextToSpeech = EFalse; |
74 iBasicInfo.iPhoneNumberIsServiceCode = EFalse; |
65 iBasicInfo.iPhoneNumberIsServiceCode = EFalse; |
75 iBasicInfo.iTwoDigitSupportStatus = EFalse; |
66 iBasicInfo.iTwoDigitSupportStatus = EFalse; |
76 iBasicInfo.iLifeTimeData.iHours = 0; |
67 |
77 iBasicInfo.iLifeTimeData.iMinutes = 0; |
|
78 iBasicInfo.iNetworkRegistrationStatus = ENWStatusRegistrationUnknown; |
68 iBasicInfo.iNetworkRegistrationStatus = ENWStatusRegistrationUnknown; |
|
69 |
|
70 iCallCommandInfo.iIdRestrict = RMobileCall::EIdRestrictDefault; |
|
71 iCallCommandInfo.iEmergencyNumber = KNullDesC; |
|
72 |
|
73 iCallCommandInfo.iTransferToAddress = KNullDesC; |
|
74 iCallCommandInfo.iForwardToAddressIndex = ECCPErrorNotFound; |
79 iBasicInfo.iActiveForward.iActiveType = RMobilePhone::ECFUnconditionalActive; |
75 iBasicInfo.iActiveForward.iActiveType = RMobilePhone::ECFUnconditionalActive; |
80 iBasicInfo.iActiveForward.iServiceGroup = RMobilePhone::EServiceUnspecified; |
76 iBasicInfo.iActiveForward.iServiceGroup = RMobilePhone::EServiceUnspecified; |
81 iBasicInfo.iBarringInfo.iGroupCount = KPENumberInitValue; |
77 iBasicInfo.iBarringInfo.iGroupCount = KPENumberInitValue; |
82 for( TInt i = 0; i < KPEMaxServiceGroup; i++ ) |
78 for( TInt i = 0; i < KPEMaxServiceGroup; i++ ) |
83 { |
79 { |
95 iBasicInfo.iSSCommandInfo.group = RMobilePhone::EServiceUnspecified; |
91 iBasicInfo.iSSCommandInfo.group = RMobilePhone::EServiceUnspecified; |
96 iBasicInfo.iSimState = EPESimStatusUninitialized; |
92 iBasicInfo.iSimState = EPESimStatusUninitialized; |
97 iBasicInfo.iSecureSpecified = ETrue; |
93 iBasicInfo.iSecureSpecified = ETrue; |
98 iBasicInfo.iDataPortName = KNullDesC; |
94 iBasicInfo.iDataPortName = KNullDesC; |
99 iBasicInfo.iSwitchToOngoing = EFalse; |
95 iBasicInfo.iSwitchToOngoing = EFalse; |
100 iBasicInfo.iCallBackAddress = KNullDesC; |
|
101 iConferenceCallInfo.iConferenceCallState = EPEStateConferenceIdle; |
96 iConferenceCallInfo.iConferenceCallState = EPEStateConferenceIdle; |
|
97 iBasicInfo.iOutgoingBarringActivated = EFalse; |
|
98 //TODO remove after profile information is available |
|
99 iBasicInfo.iRingingVolume = 10; |
102 } |
100 } |
103 |
101 |
104 // ----------------------------------------------------------------------------- |
102 // ----------------------------------------------------------------------------- |
105 // CPEEngineInfoImpl::NewL |
103 // CPEEngineInfoImpl::NewL |
106 // Two-phased constructor. |
104 // Two-phased constructor. |
562 { |
560 { |
563 return iBasicInfo.iKeypadVolume; |
561 return iBasicInfo.iKeypadVolume; |
564 } |
562 } |
565 |
563 |
566 // ----------------------------------------------------------------------------- |
564 // ----------------------------------------------------------------------------- |
567 // CPEEngineInfoImpl::LifeTimerData |
|
568 // Gets lifetimerdata from the TPEBasicInfo structure. |
|
569 // (other items were commented in a header). |
|
570 // ----------------------------------------------------------------------------- |
|
571 // |
|
572 const TPELifeTimeData& CPEEngineInfoImpl::LifeTimerData() const |
|
573 { |
|
574 return iBasicInfo.iLifeTimeData; |
|
575 } |
|
576 |
|
577 // ----------------------------------------------------------------------------- |
|
578 // CPEEngineInfoImpl::LoggingIndicator |
565 // CPEEngineInfoImpl::LoggingIndicator |
579 // Get logging indicator from TPECallInfo. |
566 // Get logging indicator from TPECallInfo. |
580 // (other items were commented in a header). |
567 // (other items were commented in a header). |
581 // ----------------------------------------------------------------------------- |
568 // ----------------------------------------------------------------------------- |
582 // |
569 // |
623 { |
610 { |
624 return iBasicInfo.iPersonalToneStatus; |
611 return iBasicInfo.iPersonalToneStatus; |
625 } |
612 } |
626 |
613 |
627 // ----------------------------------------------------------------------------- |
614 // ----------------------------------------------------------------------------- |
628 // CPEEngineInfoImpl::PhoneIdentityParameters |
|
629 // Gets the phone identity parameters from the TPEBasicInfo structure |
|
630 // ----------------------------------------------------------------------------- |
|
631 // |
|
632 const TPEPhoneIdentityParameters& CPEEngineInfoImpl::PhoneIdentityParameters() const |
|
633 { |
|
634 return iBasicInfo.iPhoneIdentityParameters; |
|
635 } |
|
636 |
|
637 // ----------------------------------------------------------------------------- |
|
638 // CPEEngineInfoImpl::PhoneNumber |
615 // CPEEngineInfoImpl::PhoneNumber |
639 // Return the phone number from the TPECallCommandInfo structure. |
616 // Return the phone number from the TPECallCommandInfo structure. |
640 // ----------------------------------------------------------------------------- |
617 // ----------------------------------------------------------------------------- |
641 // |
618 // |
642 const TPEPhoneNumber& CPEEngineInfoImpl::PhoneNumber() const |
619 const TPEPhoneNumber& CPEEngineInfoImpl::PhoneNumber() const |
658 // CPEEngineInfoImpl::CallOriginCommand |
635 // CPEEngineInfoImpl::CallOriginCommand |
659 // Gets call origin for next call attempt |
636 // Gets call origin for next call attempt |
660 // ----------------------------------------------------------------------------- |
637 // ----------------------------------------------------------------------------- |
661 // |
638 // |
662 const TPECallOrigin& CPEEngineInfoImpl::CallOriginCommand() const |
639 const TPECallOrigin& CPEEngineInfoImpl::CallOriginCommand() const |
663 { |
640 { |
664 return iCallCommandInfo.iCallOrigin; |
641 return iCallCommandInfo.iCallOrigin; |
665 } |
642 } |
666 |
643 |
667 // ----------------------------------------------------------------------------- |
|
668 // CPEEngineInfoImpl::SetTransferDial |
|
669 // Sets flag indicating unattended transfer dial |
|
670 // ----------------------------------------------------------------------------- |
|
671 // |
|
672 void CPEEngineInfoImpl::SetIsTransferDial( TBool aTransferDial ) |
|
673 { |
|
674 iCallCommandInfo.iTransferDial = aTransferDial; |
|
675 } |
|
676 |
|
677 // ----------------------------------------------------------------------------- |
|
678 // CPEEngineInfoImpl::IsTransferDial |
|
679 // Gets flag indicating unattended transfer dial |
|
680 // ----------------------------------------------------------------------------- |
|
681 // |
|
682 TBool CPEEngineInfoImpl::IsTransferDial() const |
|
683 { |
|
684 return iCallCommandInfo.iTransferDial; |
|
685 } |
|
686 |
|
687 // ----------------------------------------------------------------------------- |
|
688 // CPEEngineInfoImpl::SetDoCallBackRequest |
|
689 // Sets flag indicating if unattended transfer call back request is needed |
|
690 // ----------------------------------------------------------------------------- |
|
691 // |
|
692 void CPEEngineInfoImpl::SetDoCallBackRequest( TBool aDoCallBack, TInt aCallId ) |
|
693 { |
|
694 __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) ); |
|
695 iCurrentCalls[ aCallId ]->SetDoCallBackRequest( aDoCallBack ); |
|
696 } |
|
697 |
|
698 // ----------------------------------------------------------------------------- |
|
699 // CPEEngineInfoImpl::DoCallBackRequest |
|
700 // Gets flag indicating if unattended transfer call back request is needed |
|
701 // ----------------------------------------------------------------------------- |
|
702 // |
|
703 TBool CPEEngineInfoImpl::DoCallBackRequest( TInt aCallId) const |
|
704 { |
|
705 __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) ); |
|
706 return iCurrentCalls[ aCallId ]->DoCallBackRequest(); |
|
707 } |
|
708 |
|
709 // ----------------------------------------------------------------------------- |
|
710 // CPEEngineInfoImpl::SetCallBackAddress |
|
711 // Sets address used for calling back to transfer originator |
|
712 // in case when transfer call has been failed |
|
713 // ----------------------------------------------------------------------------- |
|
714 // |
|
715 void CPEEngineInfoImpl::SetCallBackAddress( const TDesC& aAddress ) |
|
716 { |
|
717 iBasicInfo.iCallBackAddress = aAddress; |
|
718 } |
|
719 |
|
720 // ----------------------------------------------------------------------------- |
|
721 // CPEEngineInfoImpl::CallBackAddress |
|
722 // Gets address used for calling back to transfer originator |
|
723 // in case when transfer call has been failed |
|
724 // ----------------------------------------------------------------------------- |
|
725 // |
|
726 const TDesC& CPEEngineInfoImpl::CallBackAddress() const |
|
727 { |
|
728 return iBasicInfo.iCallBackAddress; |
|
729 } |
|
730 |
|
731 // CPEEngineInfoImpl::ProfileId |
644 // CPEEngineInfoImpl::ProfileId |
732 // Gets the profile id from the TPEBasicInfo structure. |
645 // Gets the profile id from the TPEBasicInfo structure. |
733 // ----------------------------------------------------------------------------- |
646 // ----------------------------------------------------------------------------- |
734 // |
647 // |
735 const TInt& CPEEngineInfoImpl::ProfileId() const |
648 const TInt& CPEEngineInfoImpl::ProfileId() const |
1337 void CPEEngineInfoImpl::SetCallDuration( |
1250 void CPEEngineInfoImpl::SetCallDuration( |
1338 const TInt& aCallDuration ) |
1251 const TInt& aCallDuration ) |
1339 { |
1252 { |
1340 iBasicInfo.iLastCallDuration = aCallDuration; |
1253 iBasicInfo.iLastCallDuration = aCallDuration; |
1341 } |
1254 } |
1342 |
1255 |
1343 // ----------------------------------------------------------------------------- |
1256 // ----------------------------------------------------------------------------- |
1344 // CPEEngineInfoImpl::SetDtmfPostFix |
1257 // CPEEngineInfoImpl::SetDtmfPostFix |
1345 // Sets dtmf postfix value to TPEBasicInfo-structure |
1258 // Sets dtmf postfix value to TPEBasicInfo-structure |
1346 // ----------------------------------------------------------------------------- |
1259 // ----------------------------------------------------------------------------- |
1347 // |
1260 // |
1395 // |
1308 // |
1396 void CPEEngineInfoImpl::SetKeypadVolume( |
1309 void CPEEngineInfoImpl::SetKeypadVolume( |
1397 const TInt aKeypadVolume ) |
1310 const TInt aKeypadVolume ) |
1398 { |
1311 { |
1399 iBasicInfo.iKeypadVolume = aKeypadVolume; |
1312 iBasicInfo.iKeypadVolume = aKeypadVolume; |
1400 } |
|
1401 |
|
1402 // ----------------------------------------------------------------------------- |
|
1403 // CPEEngineInfoImpl::SetLifeTimerData |
|
1404 // Sets lifetimer data of the phone to TPELifeTimeData-structure |
|
1405 // ----------------------------------------------------------------------------- |
|
1406 // |
|
1407 void CPEEngineInfoImpl::SetLifeTimerData( |
|
1408 TCCPLifeTimeDataPckg& aPckg ) |
|
1409 { |
|
1410 iBasicInfo.iLifeTimeData.iHours = aPckg().iHours; |
|
1411 iBasicInfo.iLifeTimeData.iMinutes = aPckg().iMinutes; |
|
1412 } |
1313 } |
1413 |
1314 |
1414 // ----------------------------------------------------------------------------- |
1315 // ----------------------------------------------------------------------------- |
1415 // CPEEngineInfoImpl::SetNetworkRegistrationStatus |
1316 // CPEEngineInfoImpl::SetNetworkRegistrationStatus |
1416 // Sets network registration status to TPEBasicInfo-structure |
1317 // Sets network registration status to TPEBasicInfo-structure |
1437 { |
1338 { |
1438 iBasicInfo.iPersonalToneStatus = aPersonalToneStatus; |
1339 iBasicInfo.iPersonalToneStatus = aPersonalToneStatus; |
1439 } |
1340 } |
1440 |
1341 |
1441 // ----------------------------------------------------------------------------- |
1342 // ----------------------------------------------------------------------------- |
1442 // CPEEngineInfoImpl::SetPhoneIdentityParameters |
|
1443 // Sets phone number to TPECallCommandInfo-structure |
|
1444 // ----------------------------------------------------------------------------- |
|
1445 // |
|
1446 void CPEEngineInfoImpl::SetPhoneIdentityParameters( |
|
1447 const TPEPhoneIdentityParameters& aPhoneIdentityParameters ) |
|
1448 { |
|
1449 iBasicInfo.iPhoneIdentityParameters = aPhoneIdentityParameters; |
|
1450 } |
|
1451 |
|
1452 // ----------------------------------------------------------------------------- |
|
1453 // CPEEngineInfoImpl::SetPhoneNumberIsServiceCode |
1343 // CPEEngineInfoImpl::SetPhoneNumberIsServiceCode |
1454 // Sets phone number parsing result |
1344 // Sets phone number parsing result |
1455 // ----------------------------------------------------------------------------- |
1345 // ----------------------------------------------------------------------------- |
1456 // |
1346 // |
1457 void CPEEngineInfoImpl::SetPhoneNumberIsServiceCode( |
1347 void CPEEngineInfoImpl::SetPhoneNumberIsServiceCode( |
1464 // CPEEngineInfoImpl::SetCallOriginCommand |
1354 // CPEEngineInfoImpl::SetCallOriginCommand |
1465 // Sets call origin for the next call attempt |
1355 // Sets call origin for the next call attempt |
1466 // ----------------------------------------------------------------------------- |
1356 // ----------------------------------------------------------------------------- |
1467 // |
1357 // |
1468 void CPEEngineInfoImpl::SetCallOriginCommand( const TPECallOrigin& aOrigin ) |
1358 void CPEEngineInfoImpl::SetCallOriginCommand( const TPECallOrigin& aOrigin ) |
1469 { |
1359 { |
1470 iCallCommandInfo.iCallOrigin = aOrigin; |
1360 iCallCommandInfo.iCallOrigin = aOrigin; |
1471 } |
1361 } |
1472 |
1362 |
1473 // ----------------------------------------------------------------------------- |
1363 // ----------------------------------------------------------------------------- |
1474 // CPEEngineInfoImpl::SetProfileId |
1364 // CPEEngineInfoImpl::SetProfileId |
1475 // Sets profile id to TPEBasicInfo-structure |
1365 // Sets profile id to TPEBasicInfo-structure |
1476 // (other items were commented in a header). |
1366 // (other items were commented in a header). |
2678 } |
2568 } |
2679 } |
2569 } |
2680 return stateExists; |
2570 return stateExists; |
2681 } |
2571 } |
2682 |
2572 |
|
2573 // ----------------------------------------------------------------------------- |
|
2574 // CPEEngineInfoImpl::SetContactId |
|
2575 // ----------------------------------------------------------------------------- |
|
2576 // |
|
2577 void CPEEngineInfoImpl::SetContactId2( const TInt aContactId ) |
|
2578 { |
|
2579 TEFLOGSTRING2( KTAINT, |
|
2580 "PE CPEEngineInfo::SetContactId: aContactId: %d", aContactId ); |
|
2581 iContactId = aContactId; |
|
2582 } |
|
2583 |
|
2584 // ----------------------------------------------------------------------------- |
|
2585 // CPEEngineInfoImpl::ContactId |
|
2586 // ----------------------------------------------------------------------------- |
|
2587 // |
|
2588 TInt CPEEngineInfoImpl::ContactId2 () const |
|
2589 { |
|
2590 TEFLOGSTRING2( KTAINT, "ContactId: %d", iContactId ); |
|
2591 return iContactId; |
|
2592 } |
|
2593 |
|
2594 // ----------------------------------------------------------------------------- |
|
2595 // CPEEngineInfoImpl::SetProtocolError |
|
2596 // Sets the protocol spesific error code |
|
2597 // ----------------------------------------------------------------------------- |
|
2598 // |
|
2599 void CPEEngineInfoImpl::SetProtocolError( TInt aError, TInt aCallId ) |
|
2600 { |
|
2601 if ( 0<=aCallId && aCallId<iCurrentCalls.Count() ) |
|
2602 { |
|
2603 iCurrentCalls[ aCallId ]->SetProtocolError( aError ); |
|
2604 } |
|
2605 } |
|
2606 |
|
2607 // ----------------------------------------------------------------------------- |
|
2608 // CPEEngineInfoImpl::ProtocolError |
|
2609 // Returns the protocol spesific error code |
|
2610 // ----------------------------------------------------------------------------- |
|
2611 // |
|
2612 TInt CPEEngineInfoImpl::ProtocolError( TInt aCallId ) |
|
2613 { |
|
2614 TInt ret( KErrNotFound ); |
|
2615 |
|
2616 if ( 0<=aCallId && aCallId<iCurrentCalls.Count() ) |
|
2617 { |
|
2618 ret = iCurrentCalls[ aCallId ]->ProtocolError(); |
|
2619 } |
|
2620 |
|
2621 return ret; |
|
2622 } |
|
2623 |
|
2624 // ----------------------------------------------------------------------------- |
|
2625 // CPEEngineInfoImpl::IsOutgoingCallBarringActivated |
|
2626 // ----------------------------------------------------------------------------- |
|
2627 // |
|
2628 TBool CPEEngineInfoImpl::IsOutgoingCallBarringActivated() |
|
2629 { |
|
2630 return iBasicInfo.iOutgoingBarringActivated; |
|
2631 } |
|
2632 |
|
2633 // ----------------------------------------------------------------------------- |
|
2634 // CPEEngineInfoImpl::SetOutgoingCallBarringActivated |
|
2635 // ----------------------------------------------------------------------------- |
|
2636 // |
|
2637 void CPEEngineInfoImpl::SetOutgoingCallBarringActivated( |
|
2638 TBool aActivated ) |
|
2639 { |
|
2640 iBasicInfo.iOutgoingBarringActivated = aActivated; |
|
2641 } |
|
2642 |
2683 // End of File |
2643 // End of File |