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" |
|
31 |
30 |
32 // CONSTANTS |
31 // CONSTANTS |
33 const TInt KModeNormal = 0; // Normal System mode |
32 const TInt KModeNormal = 0; // Normal System mode |
34 const TInt KModeFligth = 1; // Flight mode |
33 const TInt KModeFligth = 1; // Flight mode |
35 const TInt KModePDA = 2; // PDA mode |
34 const TInt KModePDA = 2; // PDA mode |
36 |
35 |
37 // Valid characters in an dialing string |
36 // Valid characters in an dialing string |
38 _LIT( KPEClientValidChars, "+0123456789*#pwPW" ); |
37 _LIT( KPEClientValidChars, "+0123456789*#pwPW" ); |
39 _LIT( KPEValidDTMFChars, "0123456789*#pwPW" ); |
38 _LIT( KPEValidDTMFChars, "0123456789*#pwPW" ); |
40 _LIT( KPEValidDTMFStringStopChars, "+pPwW" ); |
39 _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 }; |
41 |
55 |
42 // Invalid characters in an dialing string, these chars can be removed from dial string |
56 // Invalid characters in an dialing string, these chars can be removed from dial string |
43 _LIT( KPECharsThatCanBeDelete, "\"/ ().-" ); |
57 _LIT( KPECharsThatCanBeDelete, "\"/ ().-" ); |
44 |
58 |
45 // MACROS |
59 // MACROS |
154 * Handles release message from phone application |
165 * Handles release message from phone application |
155 * @param aAutoResumeOption if options for autoresume. |
166 * @param aAutoResumeOption if options for autoresume. |
156 * @return Return possible error code. |
167 * @return Return possible error code. |
157 */ |
168 */ |
158 TInt HandleReleaseCall( TPEHangUpOptions aAutoResumeOption = ETPEHangUpDefault ); |
169 TInt HandleReleaseCall( TPEHangUpOptions aAutoResumeOption = ETPEHangUpDefault ); |
159 |
170 |
|
171 /** |
|
172 * Handles release message from application |
|
173 * @return Return possible error code. |
|
174 */ |
|
175 TInt HandleReleaseConference(); |
|
176 |
160 /** |
177 /** |
161 * Handles send dtmf message from phone application |
178 * Handles send dtmf message from phone application |
162 * @return possible error code from the CallHandling subsystem. |
179 * @return possible error code from the CallHandling subsystem. |
163 */ |
180 */ |
164 TInt HandleSendDtmf(); |
181 TInt HandleSendDtmf(); |
234 TBool RemoveInvalidChars( TDes& aString, |
251 TBool RemoveInvalidChars( TDes& aString, |
235 const TDesC& aValidChars, |
252 const TDesC& aValidChars, |
236 const TBool aCheckForDelete ) const; |
253 const TBool aCheckForDelete ) const; |
237 |
254 |
238 /** |
255 /** |
|
256 * Handles lifetimer data from customa api -> engineinfo. |
|
257 * @return TInt possible error code.. |
|
258 */ |
|
259 TInt HandleGetLifeTimerData() const; |
|
260 |
|
261 /** |
239 * Handles EPEMessageDTMFSent message from call handling subsystem |
262 * Handles EPEMessageDTMFSent message from call handling subsystem |
240 * @param ECCPErrorNone or KPEDontSendMessage |
263 * @param ECCPErrorNone or KPEDontSendMessage |
241 */ |
264 */ |
242 TInt HandleDtmfSent(); |
265 TInt HandleDtmfSent(); |
243 |
266 |
257 * function. |
280 * function. |
258 * @param aAny Pointer to 'this' object. |
281 * @param aAny Pointer to 'this' object. |
259 * @return error code. |
282 * @return error code. |
260 */ |
283 */ |
261 static TInt CallBackHandleSendDtmf( TAny* aAny ); |
284 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 ); |
262 |
291 |
263 /** |
292 /** |
264 * Called asyncronously from callback. |
293 * Called asyncronously from callback. |
265 * @param aAny Pointer to 'this' object. |
294 * @param aAny Pointer to 'this' object. |
266 * @return error code. |
295 * @return error code. |
541 * @return Possible error code |
570 * @return Possible error code |
542 */ |
571 */ |
543 TInt HandleReplaceActive(); |
572 TInt HandleReplaceActive(); |
544 |
573 |
545 /** |
574 /** |
546 * Check if phone is locked, if locked leave with ECCPErrorAuthenticationFailed error. |
|
547 */ |
|
548 void CheckIfPhoneIsLockedL(); |
|
549 |
|
550 /** |
|
551 * Handles unattended transfer request response. |
575 * Handles unattended transfer request response. |
552 * @param aAcceptRequest ETrue to accept, EFalse to reject request. |
576 * @param aAcceptRequest ETrue to accept, EFalse to reject request. |
553 */ |
577 */ |
554 TInt HandleUnattendedTransferRequestResponse( TBool aAcceptRequest ); |
578 TInt HandleUnattendedTransferRequestResponse( TBool aAcceptRequest ); |
555 |
579 |
567 |
591 |
568 /** |
592 /** |
569 * Handle disable service |
593 * Handle disable service |
570 */ |
594 */ |
571 void HandleDisableService(); |
595 void HandleDisableService(); |
572 |
596 |
573 /** |
597 /** |
574 * Adds SIM rejected MO CS call to logs. |
598 * Adds SIM rejected MO CS call to logs. |
575 * @param aCallId is the identification number of the call. |
599 * @param aCallId is the identification number of the call. |
576 * @return KErrNone if succesfull |
600 * @return KErrNone if succesfull |
577 */ |
601 */ |
578 TInt AddSIMRejectedMoCsCallToLog( const TInt aCallId ); |
602 TInt AddSIMRejectedMoCsCallToLog( const TInt aCallId ); |
579 |
603 |
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 |
|
593 private: // New functions |
604 private: // New functions |
594 |
605 |
595 /** |
606 /** |
596 * C++ default constructor. |
607 * C++ default constructor. |
597 */ |
608 */ |
633 * @return TBool. |
644 * @return TBool. |
634 */ |
645 */ |
635 TBool AutomaticAnswer( const TInt aCallId ) const; |
646 TBool AutomaticAnswer( const TInt aCallId ) const; |
636 |
647 |
637 /** |
648 /** |
|
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 /** |
638 * Handle Client Call Data. |
655 * Handle Client Call Data. |
639 * @return Return possible error. |
656 * @return Return possible error. |
640 */ |
657 */ |
641 void HandleClientCallData(); |
658 void HandleClientCallData(); |
642 |
659 |
746 /** |
763 /** |
747 * Handles dial message from phone application or phone client. |
764 * Handles dial message from phone application or phone client. |
748 * @param aClientCall, Informs is the current call client originated or not. |
765 * @param aClientCall, Informs is the current call client originated or not. |
749 * @return Return possible error code. |
766 * @return Return possible error code. |
750 */ |
767 */ |
751 TInt HandleDialCallL( const TBool aClientCall ); |
768 TInt HandleDialCallL( const TBool aClientCall ); |
752 |
769 |
753 /** |
770 /** |
754 * Reset CCCECallParameters to prevent of use a previous callīs parameters |
771 * Reset CCCECallParameters to prevent of use a previous callīs parameters |
755 */ |
772 */ |
756 void ResetClientCallData(); |
773 void ResetClientCallData(); |
817 TTime iTime; |
834 TTime iTime; |
818 //Current emergency call state. |
835 //Current emergency call state. |
819 TBool iEmergencyCallActive; |
836 TBool iEmergencyCallActive; |
820 // |
837 // |
821 TBool iBtaaDisconnected; |
838 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; |
822 //Client Information, member variable because emergency call from phone client |
842 //Client Information, member variable because emergency call from phone client |
823 //is not allowed to allocate memory. |
843 //is not allowed to allocate memory. |
824 CPEClientInformation* iClientInformation; |
844 CPEClientInformation* iClientInformation; |
825 // Dial Data |
845 // Dial Data |
826 CPhCltDialData* iClientDialData; |
846 CPhCltDialData* iClientDialData; |
827 // Instances will contain the results of the parsing |
847 // Instances will contain the results of the parsing |
828 CPhoneGsmParserResult* iResult; |
848 CPhoneGsmParserResult* iResult; |
829 // Handles emergency number from the parser. |
849 // Handles emergency number from the parser. |
830 // Not owned |
850 // Not owned |
831 CPEParserEmergencyNumberHandler* iEmergencyNumberHandler; |
851 CPEParserEmergencyNumberHandler* iEmergencyNumberHandler; |