phoneapp/phoneuicontrol/inc/cphonestateidle.h
branchRCL_3
changeset 25 5266b1f337bd
parent 24 41a7f70b3818
equal deleted inserted replaced
24:41a7f70b3818 25:5266b1f337bd
    20 #ifndef CPHONESTATEIDLE
    20 #ifndef CPHONESTATEIDLE
    21 #define CPHONESTATEIDLE
    21 #define CPHONESTATEIDLE
    22 
    22 
    23 // INCLUDES
    23 // INCLUDES
    24 #include "cphonestate.h"
    24 #include "cphonestate.h"
       
    25 #include "tphonecmdparamspeeddial.h"
    25 
    26 
    26 // FORWARD DECLARATIONS
    27 // FORWARD DECLARATIONS
    27 
    28 
    28 // CLASS DECLARATION
    29 // CLASS DECLARATION
    29 
    30 
    43         EDialMethodMenuSelection    = 1,
    44         EDialMethodMenuSelection    = 1,
    44         /** Dial is initiated by send command. */
    45         /** Dial is initiated by send command. */
    45         EDialMethodSendCommand      = 2,
    46         EDialMethodSendCommand      = 2,
    46         /** Dial is initiated by one key dialing. */
    47         /** Dial is initiated by one key dialing. */
    47         EDialMethodOneKeyDialing    = 3
    48         EDialMethodOneKeyDialing    = 3
    48 
       
    49         };
       
    50     
       
    51     /**
       
    52     * Phone number types
       
    53     *
       
    54     * EPhoneNumberTypeNotFound - phone number's type was not found
       
    55     * EPhoneNumberTypeCS - CS call can be made to the phone number
       
    56     * EPhoneNumberTypeVideo - video call can be made to the phone number
       
    57     * EPhoneNumberTypeVoip - VoIP call can be made to the address.
       
    58     */
       
    59     enum TPhoneNumberType
       
    60         {
       
    61         EPhoneNumberTypeNotFound = -1,
       
    62         EPhoneNumberTypeCS = 0,
       
    63         EPhoneNumberTypeVideo,
       
    64         EPhoneNumberTypeVoip
       
    65         };
    49         };
    66     
    50     
    67         /**
    51         /**
    68         * Destructor.
    52         * Destructor.
    69         */
    53         */
    93         * @param aMessage Message from Phone Engine
    77         * @param aMessage Message from Phone Engine
    94         * @param aCallId Call id the message concerns
    78         * @param aCallId Call id the message concerns
    95         */
    79         */
    96         IMPORT_C virtual void HandlePhoneEngineMessageL(
    80         IMPORT_C virtual void HandlePhoneEngineMessageL(
    97             const TInt aMessage, 
    81             const TInt aMessage, 
    98             TInt aCallId );       
    82             TInt aCallId );
    99             
    83             
   100         IMPORT_C virtual TBool HandleCommandL( TInt aCommand );
    84         IMPORT_C virtual TBool HandleCommandL( TInt aCommand );
   101         
    85         
   102         IMPORT_C virtual TBool ProcessCommandL( TInt aCommand );
    86         IMPORT_C virtual TBool ProcessCommandL( TInt aCommand );
   103 
    87 
   113 
    97 
   114         /**
    98         /**
   115         * Indicates when the Phone app has lost focus.
    99         * Indicates when the Phone app has lost focus.
   116         */
   100         */
   117         IMPORT_C virtual void HandlePhoneFocusLostEventL();
   101         IMPORT_C virtual void HandlePhoneFocusLostEventL();
   118 
   102         
       
   103         /**
       
   104         * This function is called from displaycallsetup and 
       
   105         * the purpose is to do state specific things for callsetup.
       
   106         */
       
   107         IMPORT_C virtual void DoStateSpecificCallSetUpDefinitionsL();
       
   108 		
       
   109 		/**
       
   110         * HandleError
       
   111         * Implements error handling framework
       
   112         * @param aErrorInfo: the error info
       
   113         */
       
   114         IMPORT_C virtual void HandleErrorL( 
       
   115                 const TPEErrorInfo& aErrorInfo );
   119     protected:
   116     protected:
   120 
   117 
   121         /** 
   118         /** 
   122         * Handle state-specific behaviour when number entry is cleared
   119         * Handle state-specific behaviour when number entry is cleared
   123         */ 
   120         */ 
   132         * @param aCallid call id
   129         * @param aCallid call id
   133         */
   130         */
   134         IMPORT_C void DisplayIncomingCallL( TInt aCallId );
   131         IMPORT_C void DisplayIncomingCallL( TInt aCallId );
   135 
   132 
   136         /**
   133         /**
   137         * Display Call Setup
       
   138         * @param aCallid call id
       
   139         */
       
   140         IMPORT_C void DisplayCallSetupL( TInt aCallId );
       
   141 
       
   142         /**
       
   143         * By default EPOC constructor is private.
   134         * By default EPOC constructor is private.
   144         */
   135         */
   145         IMPORT_C CPhoneStateIdle( 
   136         IMPORT_C CPhoneStateIdle( 
   146             MPhoneStateMachine* aStateMachine, 
   137             MPhoneStateMachine* aStateMachine, 
   147             MPhoneViewCommandHandle* aViewCommandHandle,
   138             MPhoneViewCommandHandle* aViewCommandHandle,
   185         * @param aCallId: the call id of the call
   176         * @param aCallId: the call id of the call
   186         */
   177         */
   187         IMPORT_C virtual void HandleDialingL( TInt aCallId );
   178         IMPORT_C virtual void HandleDialingL( TInt aCallId );
   188 
   179 
   189         /**
   180         /**
       
   181         * This is called when Speed Dial dialog is cancelled or user didn't give
       
   182         * a valid number.
       
   183         * @param aDigit: entered digit
       
   184         */
       
   185         IMPORT_C void SpeedDialCanceledL( const TUint& aDigit );
       
   186         
       
   187         /**
       
   188         * Handle long key press of a number.
       
   189         */
       
   190         IMPORT_C void HandleNumberLongKeyPressL();
       
   191         
       
   192         /**
       
   193         * Tests whether given number is speed dial number.
       
   194         * @param    aNumber    A number to test.
       
   195         * @return   ETrue if given number is speed dial number.
       
   196         */
       
   197         IMPORT_C TBool IsSpeedDialNumber( const TDesC& aNumber ) const;
       
   198         
       
   199         /**
       
   200         * Handles speed dialing.
       
   201         * @param aDigit             Entered digit.
       
   202         * @param aDialMethod        Dial initiation method.
       
   203         */
       
   204         IMPORT_C void SpeedDialL( const TUint& aDigit, 
       
   205             TDialInitiationMethod aDialMethod );
       
   206 
       
   207         /**
   190         * Handles send command.
   208         * Handles send command.
   191         */
   209         */
   192         IMPORT_C virtual void HandleSendCommandL();
   210         IMPORT_C virtual void HandleSendCommandL();
   193         
   211         
       
   212     protected:
       
   213         
       
   214         /**
       
   215         * Sets iCallInitialized value.
       
   216         */
       
   217         void SetCallInitialized( TBool aValue );
       
   218          
       
   219         /**
       
   220         * Gets iCallInitialized value.
       
   221         */
       
   222         TBool IsCallInitialized();
       
   223         
       
   224         /**
       
   225         * Removes NE and sets idle to background, for more detailed
       
   226         * information check comments from implementation.
       
   227         */
       
   228         void RemoveNumberEntryAndSetIdleToBackgroundIfNeededL();
       
   229         
   194     private: // New functions
   230     private: // New functions
   195 
   231         
   196         /**
   232         /**
   197         * A message handling function for EPEMessageIncoming
   233         * A message handling function for EPEMessageIncoming
   198         * @param aCallId: the call id of the call
   234         * @param aCallId: the call id of the call
   199         */
   235         */
   200         void HandleIncomingL( TInt aCallId );
   236         void HandleIncomingL( TInt aCallId );
   208         /**
   244         /**
   209         * A message handling function for EPEMessageIdle
   245         * A message handling function for EPEMessageIdle
   210         * @param aCallId: the call id of the call
   246         * @param aCallId: the call id of the call
   211         */
   247         */
   212         void HandleIdleL( TInt aCallId );
   248         void HandleIdleL( TInt aCallId );
       
   249 
       
   250         /**
       
   251         * Launches application.
       
   252         */
       
   253         void LaunchApplicationL();
   213 
   254 
   214         /**
   255         /**
   215         * Send Exit command
   256         * Send Exit command
   216         */
   257         */
   217         void SendExitCommandL();
   258         void SendExitCommandL();
   239         * @param none.
   280         * @param none.
   240         * @return ETrue if ongoing.
   281         * @return ETrue if ongoing.
   241         */
   282         */
   242         TBool RestoreOngoing();
   283         TBool RestoreOngoing();
   243         
   284         
   244 
   285         /**
   245         void HandleVoiceCallCommandL();
   286         * Handles back command. 
       
   287         */
       
   288         void HandleBackCommandL();
       
   289 
       
   290         /**
       
   291          * Checks for application launching configurations from 
       
   292          * central repository.
       
   293          * @param aCode key code.
       
   294          * @return ETrue if configuration found.
       
   295          */        
       
   296          TBool CheckAppLaunchingL( const TKeyCode aCode );
       
   297 
       
   298          /**
       
   299           * Returns phone number for specified speed dial location.
       
   300           * @param  aDigit Speed dial digit.
       
   301           * @param  aDigit On return contains speed dial parameters.
       
   302           * @return Phone number
       
   303           */   
       
   304          HBufC* NumberForSpeedDialLocationL( const TUint& aDigit,
       
   305              TPhoneCmdParamSpeedDial& aSpeedDialParam ) const;
       
   306 
       
   307          void HandleVoiceCallCommandL( TBool aSendKey );
       
   308 
       
   309          /**
       
   310           * Returns options menu id when number entry is visible.
       
   311           * If easydialing is in focus, id is asked from it.
       
   312           * @return Menu resource id.
       
   313           */   
       
   314          TInt GetNumberAcqMenuIdL();
       
   315          
       
   316          /**
       
   317           * Changes state to aState and resets iBubbleInitialized
       
   318           * value to false.
       
   319           */
       
   320          void ChangeTo( TInt aState );
   246          
   321          
   247     private:
   322     private:
   248     
   323         
   249         // Owned profile engine
   324          // True if call initiliazed.
   250         MProfileEngine* iEngine;
   325          TBool iCallInitialized;
   251         // indicates that incomming call is arrived.
       
   252         TBool iIncommingCall;
       
   253   
       
   254     };
   326     };
   255 
   327 
   256 #endif // CPHONESTATEIDLE
   328 #endif // CPHONESTATEIDLE
   257 
   329 
   258 // End of File
   330 // End of File