phoneapp/phoneuicontrol/inc/cphonestatecallsetup.h
changeset 0 5f000ab63145
child 50 377c906a8701
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *     Call setup state implementation.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPHONESTATECALLSETUP
       
    21 #define CPHONESTATECALLSETUP
       
    22 
       
    23 // INCLUDES
       
    24 #include "cphonestate.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CPhoneDtmfWaitCharTimer;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 /**
       
    31 *  Call setup state
       
    32 */
       
    33 class CPhoneStateCallSetup : public CPhoneState
       
    34     {
       
    35     public:  
       
    36 
       
    37         /**
       
    38         * Destructor.
       
    39         */
       
    40         IMPORT_C virtual ~CPhoneStateCallSetup();
       
    41 
       
    42         /**
       
    43         * Creates the Call Setup state class
       
    44         * @param aStateMachine: a state machine
       
    45         * @param aViewCommandHandle: handle to the PhoneUIView
       
    46         * @return an instance of class CPhoneStateCallSetup
       
    47         */
       
    48         static CPhoneStateCallSetup* NewL( 
       
    49             MPhoneStateMachine* aStateMachine, 
       
    50             MPhoneViewCommandHandle* aViewCommandHandle,
       
    51             MPhoneCustomization* aCustomization );
       
    52 
       
    53         IMPORT_C virtual void HandleKeyEventL(
       
    54             const TKeyEvent& aKeyEvent,
       
    55             TEventCode aEventCode );
       
    56 
       
    57         IMPORT_C virtual void HandleKeyMessageL(
       
    58             TPhoneKeyEventMessages aMessage,
       
    59             TKeyCode aCode );
       
    60 
       
    61         /**
       
    62         * A message handling function for Phone Engine messages
       
    63         * @param aMessage Message from Phone Engine
       
    64         * @param aCallId Call id the message concerns
       
    65         */
       
    66         IMPORT_C virtual void HandlePhoneEngineMessageL(
       
    67             const TInt aMessage, 
       
    68             TInt aCallId );       
       
    69         
       
    70         /**
       
    71         * Handles commands.
       
    72         * @param aCommand It is the code of the command to be handled.
       
    73         * @returns boolean value was the command handled by the state 
       
    74         *          (ETrue) or not (EFalse)
       
    75         */
       
    76         IMPORT_C virtual TBool HandleCommandL( TInt aCommand );
       
    77         
       
    78     protected:
       
    79 
       
    80         /** 
       
    81         * Handle state-specific behaviour when number entry is cleared
       
    82         */ 
       
    83         IMPORT_C virtual void HandleNumberEntryClearedL();
       
    84         
       
    85         /**
       
    86         * By default EPOC constructor is private.
       
    87         */
       
    88         IMPORT_C CPhoneStateCallSetup( 
       
    89             MPhoneStateMachine* aStateMachine, 
       
    90             MPhoneViewCommandHandle* aViewCommandHandle,
       
    91             MPhoneCustomization* aPhoneCustomization );
       
    92         
       
    93         /**
       
    94         * ConstructL()
       
    95         */
       
    96         IMPORT_C virtual void ConstructL();
       
    97         
       
    98         /**
       
    99         * Upadated CBAs CallSetup case
       
   100         */
       
   101         IMPORT_C virtual void UpdateInCallCbaL();
       
   102          
       
   103         /**
       
   104         * Upadated CBAs
       
   105         */
       
   106         IMPORT_C virtual void UpdateCbaL( TInt aResource );    
       
   107         
       
   108         /**
       
   109         * Open menu bar
       
   110         */
       
   111         IMPORT_C virtual void OpenMenuBarL();
       
   112         
       
   113         
       
   114         // Prevents to open number entry dialog during call setup phase
       
   115         IMPORT_C virtual void HandleCreateNumberEntryL ( const TKeyEvent& aKeyEvent,
       
   116                 TEventCode aEventCode );
       
   117                 
       
   118     private:
       
   119 
       
   120         /**
       
   121         * A message handling function for EPEMessageHandleConnected
       
   122         * @param aCallId: the call id of the call
       
   123         */
       
   124         void HandleConnectedL( TInt aCallId );
       
   125 
       
   126         /**
       
   127         * A message handling function for EPEMessageIdle
       
   128         * @param aCallId: the call id of the call
       
   129         */
       
   130         void HandleIdleL( TInt aCallId );
       
   131 
       
   132         /**
       
   133         * A message handling function for message EPEMessageRemoteTerminated
       
   134         */
       
   135         void HandleRemoteTerminatedL( TInt aCallId );
       
   136         
       
   137         /**
       
   138         * Handle EPEMessageAudioOutputChanged
       
   139         */
       
   140         void HandleAudioOutputChangedL();
       
   141      
       
   142         /**
       
   143         * Handle EPEMessageSendingDTMF
       
   144         */
       
   145         void HandleSendingDTMFL();
       
   146         
       
   147         /**
       
   148         * Handle EPEMessageStoppedDTMF
       
   149         */
       
   150         void HandleStoppedDTMFL();
       
   151 
       
   152         /**
       
   153         * Handles EPEMessageDTMFSent
       
   154         *         EPEMessageDTMFSendingAborted
       
   155         */
       
   156         void CancelDTMFSendingL();
       
   157         
       
   158         /**
       
   159         * Sends DTMF sequence to Phone Engine
       
   160         */
       
   161         void SendDtmfL();
       
   162         
       
   163         /**
       
   164         * Sends Key specific DTMF to Phone Engine
       
   165         */
       
   166         void PlayKeySpecificDTMF( const TUint aCode );
       
   167              
       
   168     private:
       
   169                 
       
   170         /**
       
   171         * Special timer for preventing recursive calls
       
   172         * which would otherwise occur with multiple
       
   173         * wait characters in a DTMF string.
       
   174         */
       
   175         CPhoneDtmfWaitCharTimer* iDtmfWaitCharTimer;
       
   176          
       
   177     };
       
   178 
       
   179 #endif // CPHONESTATECALLSETUP
       
   180 
       
   181 // End of File