phoneapp/phoneuistates/inc/cphonesingleandwaiting.h
changeset 37 ba76fc04e6c2
child 50 377c906a8701
child 51 f39ed5e045e0
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     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 *     Single And Waiting state implementation.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPHONESINGLEANDWAITING_H
       
    21 #define CPHONESINGLEANDWAITING_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "cphonegsmincall.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 
       
    28 // CLASS DECLARATION
       
    29 /**
       
    30 *  Incoming call at single state implementation.
       
    31 */
       
    32 class CPhoneSingleAndWaiting : public CPhoneGsmInCall
       
    33     {
       
    34     public:  
       
    35 
       
    36         /**
       
    37         * Destructor.
       
    38         */
       
    39         virtual ~CPhoneSingleAndWaiting();
       
    40         
       
    41         /**
       
    42         * Creates the Single And Waiting state class
       
    43         * @param aStateMachine: a container of state objects
       
    44         * @param aViewCommandHandle: handle to the PhoneUIView
       
    45         * @return an instance of class CPhoneStateIncoming
       
    46         */
       
    47         static CPhoneSingleAndWaiting* NewL( 
       
    48             MPhoneStateMachine* aStateMachine, 
       
    49             MPhoneViewCommandHandle* aViewCommandHandle,
       
    50             MPhoneCustomization* aPhoneCustomization );
       
    51 
       
    52         /**
       
    53         * A message handling function for Phone Engine messages
       
    54         * @param aMessage Message from Phone Engine
       
    55         * @param aCallId Call id the message concerns
       
    56         */
       
    57         virtual void HandlePhoneEngineMessageL(
       
    58             const TInt aMessage, 
       
    59             TInt aCallId );     
       
    60         
       
    61         /**
       
    62         * Handles user selected UI commands.
       
    63         * @param aCommand - selected command
       
    64         */    
       
    65         TBool HandleCommandL( TInt aCommand );  
       
    66             
       
    67     protected:
       
    68 
       
    69         /**
       
    70         * By default constructor is private.
       
    71         */
       
    72         CPhoneSingleAndWaiting( 
       
    73             MPhoneStateMachine* aStateMachine, 
       
    74             MPhoneViewCommandHandle* aViewCommandHandle,
       
    75             MPhoneCustomization* aPhoneCustomization );
       
    76             
       
    77         /**
       
    78         * HandleError
       
    79         * Implements error handling framework
       
    80         * @param aErrorInfo: the error info
       
    81         */
       
    82         IMPORT_C virtual void HandleErrorL( 
       
    83             const TPEErrorInfo& aErrorInfo );    
       
    84         
       
    85         /**
       
    86         * ConstructL()
       
    87         */
       
    88         virtual void ConstructL();
       
    89         
       
    90         /**
       
    91         * Handles key messages.
       
    92         * @param aMessage - key event message
       
    93         * @param aScanCode - standard Symbian scan code
       
    94         */
       
    95         virtual void HandleKeyMessageL(
       
    96             TPhoneKeyEventMessages aMessage,
       
    97             TKeyCode aCode );
       
    98 
       
    99         virtual void HandleKeyEventL( 
       
   100             const TKeyEvent& aKeyEvent,
       
   101             TEventCode aEventCode );
       
   102         
       
   103         /**
       
   104         * Opens menu bar.
       
   105         */    
       
   106         virtual void OpenMenuBarL();
       
   107         
       
   108         /**
       
   109         * Sets correct in call CBAs.
       
   110         */
       
   111         virtual void UpdateInCallCbaL();
       
   112         
       
   113             
       
   114      private:
       
   115      
       
   116         /**
       
   117         * Unholds the call.
       
   118         * @param aCallId - call id to unhold
       
   119         */
       
   120         void HandleUnholdL( TInt aCallId );
       
   121      
       
   122         /**
       
   123         * Performs a state transition to Two Singles.
       
   124         * @param aCallId - call id that got connected
       
   125         */
       
   126         void MakeStateTransitionToTwoSinglesL( TInt aCallId );
       
   127         
       
   128         /**
       
   129         * Handles received idle message from Phone Engine.
       
   130         * @param aCallId - call id that received the event
       
   131         */
       
   132         void HandleIdleL( TInt aCallId );
       
   133         
       
   134         /**
       
   135         * Handles received held message from Phone Engine.
       
   136         * @param aCallId - call id that received the event
       
   137         */ 
       
   138         void HandleHeldL( TInt aCallId );
       
   139         
       
   140         /**
       
   141         * Handles received connected message from Phone Engine.
       
   142         * @param aCallId - call id that received the event
       
   143         */ 
       
   144         void HandleConnectedL( TInt aCallId );
       
   145         
       
   146         /**
       
   147         * Fetches phone number from new call quoery and dials that number.
       
   148         */ 
       
   149         void CallFromNewCallQueryL();
       
   150         
       
   151         /**
       
   152         * Handles received dialing message from Phone Engine.
       
   153         * @param aCallId - call id that received the event
       
   154         */ 
       
   155         void HandleDiallingL( TInt aCallId );
       
   156         
       
   157         /**
       
   158         * Sets up all call setup to display.
       
   159         * @param aCallId - call id to set up
       
   160         */ 
       
   161         void DisplayCallSetupL( TInt aCallId );
       
   162         
       
   163         /**
       
   164         *  Handles received EPEMessageDisconnecting message from Phone Engine.
       
   165         * @param aCallId: the call id of the call
       
   166         */
       
   167         void HandleDisconnectingL( TInt aCallId );
       
   168 
       
   169         /**
       
   170         *  Handles received EPhoneCmdUpdateUiControls command.
       
   171         */
       
   172         void UpdateUiControlsL();
       
   173         
       
   174     private: //Data
       
   175             
       
   176         // Store single call id
       
   177         TInt iSingleCallId;
       
   178                            
       
   179     };
       
   180 
       
   181 #endif // CPHONESINGLEANDWAITING_H
       
   182 
       
   183 // End of File