20 #ifndef CPEMESSAGEHANDLER_H |
20 #ifndef CPEMESSAGEHANDLER_H |
21 #define CPEMESSAGEHANDLER_H |
21 #define CPEMESSAGEHANDLER_H |
22 |
22 |
23 // INCLUDES |
23 // INCLUDES |
24 #include <pevirtualengine.h> |
24 #include <pevirtualengine.h> |
25 #include "DosSvrServices.h" |
25 #include <DosSvrServices.h> |
26 #include <CPhCltCommandHandler.h> |
26 #include <cphcltcommandhandler.h> |
27 #include <cphcltdialdata.h> |
27 #include <cphcltdialdata.h> |
28 |
28 |
29 #include "mpecallhandling.h" |
29 #include "mpecallhandling.h" |
|
30 #include "mpecallcontrolif.h" |
30 |
31 |
31 // CONSTANTS |
32 // CONSTANTS |
32 const TInt KModeNormal = 0; // Normal System mode |
33 const TInt KModeNormal = 0; // Normal System mode |
33 const TInt KModeFligth = 1; // Flight mode |
34 const TInt KModeFligth = 1; // Flight mode |
34 const TInt KModePDA = 2; // PDA mode |
35 const TInt KModePDA = 2; // PDA mode |
35 |
36 |
36 // Valid characters in an dialing string |
37 // Valid characters in an dialing string |
37 _LIT( KPEClientValidChars, "+0123456789*#pwPW" ); |
38 _LIT( KPEClientValidChars, "+0123456789*#pwPW" ); |
38 _LIT( KPEValidDTMFChars, "0123456789*#pwPW" ); |
39 _LIT( KPEValidDTMFChars, "0123456789*#pwPW" ); |
39 _LIT( KPEValidDTMFStringStopChars, "+pPwW" ); |
40 _LIT( KPEValidDTMFStringStopChars, "+pPwW" ); |
40 |
|
41 // DTMF Speed dial substitution |
|
42 _LIT( KPEValidSpeedDialChars, "23456789" ); |
|
43 const TInt KPEDtmfSpeedDialSubstitutionsMax = 2; // prevent infinite loop. |
|
44 const TInt KPESpeedDialIndexMin = 2; |
|
45 const TInt KPESpeedDialIndexMax = 9; |
|
46 |
|
47 // DTMF parsing status for Speed dial location |
|
48 enum TPESpeedDialSubstituionStatus |
|
49 { |
|
50 EPEDtmfSpeedDialOk, |
|
51 EPEDtmfSpeedDialPromptUser, |
|
52 EPEDtmfSpeedDialNotAssigned, |
|
53 EPEDtmfSpeedDialInvalidSpeedDial |
|
54 }; |
|
55 |
41 |
56 // Invalid characters in an dialing string, these chars can be removed from dial string |
42 // Invalid characters in an dialing string, these chars can be removed from dial string |
57 _LIT( KPECharsThatCanBeDelete, "\"/ ().-" ); |
43 _LIT( KPECharsThatCanBeDelete, "\"/ ().-" ); |
58 |
44 |
59 // MACROS |
45 // MACROS |
165 * Handles release message from phone application |
154 * Handles release message from phone application |
166 * @param aAutoResumeOption if options for autoresume. |
155 * @param aAutoResumeOption if options for autoresume. |
167 * @return Return possible error code. |
156 * @return Return possible error code. |
168 */ |
157 */ |
169 TInt HandleReleaseCall( TPEHangUpOptions aAutoResumeOption = ETPEHangUpDefault ); |
158 TInt HandleReleaseCall( TPEHangUpOptions aAutoResumeOption = ETPEHangUpDefault ); |
170 |
159 |
171 /** |
|
172 * Handles release message from application |
|
173 * @return Return possible error code. |
|
174 */ |
|
175 TInt HandleReleaseConference(); |
|
176 |
|
177 /** |
160 /** |
178 * Handles send dtmf message from phone application |
161 * Handles send dtmf message from phone application |
179 * @return possible error code from the CallHandling subsystem. |
162 * @return possible error code from the CallHandling subsystem. |
180 */ |
163 */ |
181 TInt HandleSendDtmf(); |
164 TInt HandleSendDtmf(); |
251 TBool RemoveInvalidChars( TDes& aString, |
234 TBool RemoveInvalidChars( TDes& aString, |
252 const TDesC& aValidChars, |
235 const TDesC& aValidChars, |
253 const TBool aCheckForDelete ) const; |
236 const TBool aCheckForDelete ) const; |
254 |
237 |
255 /** |
238 /** |
256 * Handles lifetimer data from customa api -> engineinfo. |
|
257 * @return TInt possible error code.. |
|
258 */ |
|
259 TInt HandleGetLifeTimerData() const; |
|
260 |
|
261 /** |
|
262 * Handles EPEMessageDTMFSent message from call handling subsystem |
239 * Handles EPEMessageDTMFSent message from call handling subsystem |
263 * @param ECCPErrorNone or KPEDontSendMessage |
240 * @param ECCPErrorNone or KPEDontSendMessage |
264 */ |
241 */ |
265 TInt HandleDtmfSent(); |
242 TInt HandleDtmfSent(); |
266 |
243 |
280 * function. |
257 * function. |
281 * @param aAny Pointer to 'this' object. |
258 * @param aAny Pointer to 'this' object. |
282 * @return error code. |
259 * @return error code. |
283 */ |
260 */ |
284 static TInt CallBackHandleSendDtmf( TAny* aAny ); |
261 static TInt CallBackHandleSendDtmf( TAny* aAny ); |
285 |
|
286 /** |
|
287 * Handles plus (+) sign in a DTMF string. |
|
288 * @param aDtmfString Current DTMF string to process. |
|
289 */ |
|
290 void HandlePlusSignInDtmf( const TPEDtmfString& aDtmfString ); |
|
291 |
262 |
292 /** |
263 /** |
293 * Called asyncronously from callback. |
264 * Called asyncronously from callback. |
294 * @param aAny Pointer to 'this' object. |
265 * @param aAny Pointer to 'this' object. |
295 * @return error code. |
266 * @return error code. |
570 * @return Possible error code |
541 * @return Possible error code |
571 */ |
542 */ |
572 TInt HandleReplaceActive(); |
543 TInt HandleReplaceActive(); |
573 |
544 |
574 /** |
545 /** |
|
546 * Check if phone is locked, if locked leave with ECCPErrorAuthenticationFailed error. |
|
547 */ |
|
548 void CheckIfPhoneIsLockedL(); |
|
549 |
|
550 /** |
575 * Handles unattended transfer request response. |
551 * Handles unattended transfer request response. |
576 * @param aAcceptRequest ETrue to accept, EFalse to reject request. |
552 * @param aAcceptRequest ETrue to accept, EFalse to reject request. |
577 */ |
553 */ |
578 TInt HandleUnattendedTransferRequestResponse( TBool aAcceptRequest ); |
554 TInt HandleUnattendedTransferRequestResponse( TBool aAcceptRequest ); |
579 |
555 |
591 |
567 |
592 /** |
568 /** |
593 * Handle disable service |
569 * Handle disable service |
594 */ |
570 */ |
595 void HandleDisableService(); |
571 void HandleDisableService(); |
596 |
572 |
597 /** |
573 /** |
598 * Adds SIM rejected MO CS call to logs. |
574 * Adds SIM rejected MO CS call to logs. |
599 * @param aCallId is the identification number of the call. |
575 * @param aCallId is the identification number of the call. |
600 * @return KErrNone if succesfull |
576 * @return KErrNone if succesfull |
601 */ |
577 */ |
602 TInt AddSIMRejectedMoCsCallToLog( const TInt aCallId ); |
578 TInt AddSIMRejectedMoCsCallToLog( const TInt aCallId ); |
603 |
579 |
|
580 /** |
|
581 * Handle dial service call |
|
582 */ |
|
583 TInt HandleDialServiceCall( |
|
584 const TBool aClientCall ); |
|
585 |
|
586 /** |
|
587 * Returns a boolean to indicate whether network connection |
|
588 * is allowed or not. |
|
589 * @return Return a True or False. |
|
590 */ |
|
591 TBool IsNetworkConnectionAllowed() const; |
|
592 |
604 private: // New functions |
593 private: // New functions |
605 |
594 |
606 /** |
595 /** |
607 * C++ default constructor. |
596 * C++ default constructor. |
608 */ |
597 */ |
644 * @return TBool. |
633 * @return TBool. |
645 */ |
634 */ |
646 TBool AutomaticAnswer( const TInt aCallId ) const; |
635 TBool AutomaticAnswer( const TInt aCallId ) const; |
647 |
636 |
648 /** |
637 /** |
649 * Returns a boolean to indicate whether emergency call is allowed or not. |
|
650 * @return Return a True or False. |
|
651 */ |
|
652 TBool IsEmergencyAllowed() const; |
|
653 |
|
654 /** |
|
655 * Handle Client Call Data. |
638 * Handle Client Call Data. |
656 * @return Return possible error. |
639 * @return Return possible error. |
657 */ |
640 */ |
658 void HandleClientCallData(); |
641 void HandleClientCallData(); |
659 |
642 |
763 /** |
746 /** |
764 * Handles dial message from phone application or phone client. |
747 * Handles dial message from phone application or phone client. |
765 * @param aClientCall, Informs is the current call client originated or not. |
748 * @param aClientCall, Informs is the current call client originated or not. |
766 * @return Return possible error code. |
749 * @return Return possible error code. |
767 */ |
750 */ |
768 TInt HandleDialCallL( const TBool aClientCall ); |
751 TInt HandleDialCallL( const TBool aClientCall ); |
769 |
752 |
770 /** |
753 /** |
771 * Reset CCCECallParameters to prevent of use a previous callīs parameters |
754 * Reset CCCECallParameters to prevent of use a previous callīs parameters |
772 */ |
755 */ |
773 void ResetClientCallData(); |
756 void ResetClientCallData(); |
834 TTime iTime; |
817 TTime iTime; |
835 //Current emergency call state. |
818 //Current emergency call state. |
836 TBool iEmergencyCallActive; |
819 TBool iEmergencyCallActive; |
837 // |
820 // |
838 TBool iBtaaDisconnected; |
821 TBool iBtaaDisconnected; |
839 // Flag to associate switch to vid/voice call operation and video call's reconnect operation. |
|
840 // Use to fetch the right SwitchToNumber. |
|
841 TBool iSwitchToVidCalReconFlag; |
|
842 //Client Information, member variable because emergency call from phone client |
822 //Client Information, member variable because emergency call from phone client |
843 //is not allowed to allocate memory. |
823 //is not allowed to allocate memory. |
844 CPEClientInformation* iClientInformation; |
824 CPEClientInformation* iClientInformation; |
845 // Dial Data |
825 // Dial Data |
846 CPhCltDialData* iClientDialData; |
826 CPhCltDialData* iClientDialData; |
847 // Instances will contain the results of the parsing |
827 // Instances will contain the results of the parsing |
848 CPhoneGsmParserResult* iResult; |
828 CPhoneGsmParserResult* iResult; |
849 // Handles emergency number from the parser. |
829 // Handles emergency number from the parser. |
850 // Not owned |
830 // Not owned |
851 CPEParserEmergencyNumberHandler* iEmergencyNumberHandler; |
831 CPEParserEmergencyNumberHandler* iEmergencyNumberHandler; |