phoneengine/phonemodel/inc/cpemessagehandler.h
branchGCC_SURGE
changeset 51 f39ed5e045e0
parent 30 ebdbd102c78a
parent 46 bc5a64e5bc3c
equal deleted inserted replaced
40:bab96b7ed1a4 51:f39ed5e045e0
    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 #include "mpecallcontrolif.h" 
    31 #include "mpekeysequencerecognitionif.h"
       
    32 
    31 
    33 // CONSTANTS
    32 // CONSTANTS
    34 const TInt KModeNormal = 0;  // Normal System mode  
    33 const TInt KModeNormal = 0;  // Normal System mode  
    35 const TInt KModeFligth = 1;  // Flight mode 
    34 const TInt KModeFligth = 1;  // Flight mode 
    36 const TInt KModePDA    = 2;  // PDA mode 
    35 const TInt KModePDA    = 2;  // PDA mode 
    37 
    36 
    38 // Valid characters in an dialing string
    37 // Valid characters in an dialing string
    39 _LIT( KPEClientValidChars, "+0123456789*#pwPW" );
    38 _LIT( KPEClientValidChars, "+0123456789*#pwPW" );
    40 _LIT( KPEValidDTMFChars, "0123456789*#pwPW" );
    39 _LIT( KPEValidDTMFChars, "0123456789*#pwPW" );
    41 _LIT( KPEValidDTMFStringStopChars, "+pPwW" );
    40 _LIT( KPEValidDTMFStringStopChars, "+pPwW" );
    42 
       
    43 // DTMF Speed dial substitution
       
    44 _LIT( KPEValidSpeedDialChars, "23456789" );
       
    45 const TInt KPEDtmfSpeedDialSubstitutionsMax = 2; // prevent infinite loop.
       
    46 const TInt KPESpeedDialIndexMin = 2;
       
    47 const TInt KPESpeedDialIndexMax = 9;
       
    48 
       
    49 // DTMF parsing status for Speed dial location
       
    50 enum TPESpeedDialSubstituionStatus
       
    51     {
       
    52     EPEDtmfSpeedDialOk,
       
    53     EPEDtmfSpeedDialPromptUser,
       
    54     EPEDtmfSpeedDialNotAssigned,
       
    55     EPEDtmfSpeedDialInvalidSpeedDial
       
    56     };
       
    57 
    41 
    58 // 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
    59 _LIT( KPECharsThatCanBeDelete, "\"/ ().-" );
    43 _LIT( KPECharsThatCanBeDelete, "\"/ ().-" );
    60 
    44 
    61 // MACROS
    45 // MACROS
   107 *  @since S60_5.0
    91 *  @since S60_5.0
   108 */
    92 */
   109 NONSHARABLE_CLASS( CPEMessageHandler ) 
    93 NONSHARABLE_CLASS( CPEMessageHandler ) 
   110     : 
    94     : 
   111         public CBase, 
    95         public CBase, 
   112         public MPECallControlIF,
    96         public MPECallControlIF
   113         public MPEKeySequenceRecognitionIF
       
   114     {
    97     {
   115     public:  // Destructor
    98     public:  // Destructor
   116 
    99 
   117         /**
   100         /**
   118         * Two-phased constructor.
   101         * Two-phased constructor.
   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.
   508         * @return possible error code from the ServiceHandling subsystem
   479         * @return possible error code from the ServiceHandling subsystem
   509         */
   480         */
   510         TInt HandleServiceEnabled();
   481         TInt HandleServiceEnabled();
   511         
   482         
   512         /**
   483         /**
   513          * Handles remote party information changed         
   484          * Handles remote party information changed   
       
   485          * @param aCallId is the identification number of the call.               
   514          * @since Series60_5.2         
   486          * @since Series60_5.2         
   515          */
   487          */
   516         void HandleRemotePartyInfoChanged( );
   488         void HandleRemotePartyInfoChanged( const TInt aCallId );
   517 
   489 
   518         /**
   490         /**
   519         * Handles swap message from the phone application 
   491         * Handles swap message from the phone application 
   520         * @return possible error code from the CallHandling subsystem.
   492         * @return possible error code from the CallHandling subsystem.
   521         */
   493         */
   597         * Handle disable service
   569         * Handle disable service
   598         */     
   570         */     
   599         void HandleDisableService();
   571         void HandleDisableService();
   600 
   572 
   601         /**
   573         /**
       
   574         * Adds SIM rejected MO CS call to logs. 
       
   575         * @param aCallId is the identification number of the call.   
       
   576         * @return KErrNone if succesfull
       
   577         */
       
   578         TInt AddSIMRejectedMoCsCallToLog( const TInt aCallId );
       
   579 
       
   580         /**
   602         * Handle dial service call
   581         * Handle dial service call
   603         */ 
   582         */ 
   604         TInt HandleDialServiceCall(
   583         TInt HandleDialServiceCall(
   605             const TBool aClientCall );
   584             const TBool aClientCall );
   606     
   585         
   607     public: // from MPEKeySequenceRecognitionIF
   586         /**
   608         /**
   587         * Returns a boolean to indicate whether network connection 
   609          * Executes provided key sequence if recognized.
   588         * is allowed or not.  
   610          */ 
   589         * @return Return a True or False. 
   611         TBool ExecuteKeySequenceL(const TDesC16 &aSequence);
   590         */
       
   591         TBool IsNetworkConnectionAllowed() const;
   612     
   592     
   613     private: // New functions
   593     private: // New functions
   614         
   594         
   615         /**
   595         /**
   616         * C++ default constructor.
   596         * C++ default constructor.
   653         * @return TBool.
   633         * @return TBool.
   654         */
   634         */
   655         TBool AutomaticAnswer( const TInt aCallId ) const;
   635         TBool AutomaticAnswer( const TInt aCallId ) const;
   656 
   636 
   657         /**
   637         /**
   658         * Returns a boolean to indicate whether emergency call is allowed or not.  
       
   659         * @return Return a True or False. 
       
   660         */
       
   661         TBool IsEmergencyAllowed() const;
       
   662 
       
   663         /**
       
   664         * Handle Client Call Data.
   638         * Handle Client Call Data.
   665         * @return Return possible error.
   639         * @return Return possible error.
   666         */
   640         */
   667         void HandleClientCallData();
   641         void HandleClientCallData();
   668 
   642 
   772         /**
   746         /**
   773         * Handles dial message from phone application or phone client.
   747         * Handles dial message from phone application or phone client.
   774         * @param aClientCall, Informs is the current call client originated or not.
   748         * @param aClientCall, Informs is the current call client originated or not.
   775         * @return Return possible error code.
   749         * @return Return possible error code.
   776         */
   750         */
   777         TInt HandleDialCallL( const TBool aClientCall );      
   751         TInt HandleDialCallL( const TBool aClientCall );
       
   752 
       
   753         /**
       
   754         * Reset CCCECallParameters to prevent of use a previous callīs parameters
       
   755         */
       
   756         void ResetClientCallData();
   778 
   757 
   779         /**
   758         /**
   780         * Checks if there are any connected video calls
   759         * Checks if there are any connected video calls
   781         * @return   EFalse: no active video call,
   760         * @return   EFalse: no active video call,
   782         *           ETrue: active video call
   761         *           ETrue: active video call