phoneapp/phoneuivoipextension/inc/cphonestateidlevoip.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2007 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 *     VoIP-specific idle state implementation.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPHONESTATEIDLEVOIP_H
       
    21 #define CPHONESTATEIDLEVOIP_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <settingsinternalcrkeys.h>
       
    25 #include "cphoneidle.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MPhoneStateMachine;
       
    29 class MPhoneViewCommandHandle;
       
    30 class MPhoneCustomization;
       
    31 class CPhoneStateUtilsVoip;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35 *  VoIP-specific idle state
       
    36 */
       
    37 NONSHARABLE_CLASS( CPhoneStateIdleVoIP ): public CPhoneIdle
       
    38     {
       
    39     public:  
       
    40 
       
    41         /**
       
    42         * Destructor.
       
    43         */
       
    44         virtual ~CPhoneStateIdleVoIP();
       
    45 
       
    46         /**
       
    47         * Creates the VoIP-specific Idle state class
       
    48         * @param    aStateMachine       A container of state objects.
       
    49         * @param    aViewCommandHandle  Handle to the PhoneUIView.
       
    50         * @param    aCustomization      Handle to the phone customization.
       
    51         * @return   An instance of class CPhoneStateIdleVoIP.
       
    52         */
       
    53         static CPhoneStateIdleVoIP* NewL( 
       
    54             MPhoneStateMachine& aStateMachine, 
       
    55             MPhoneViewCommandHandle& aViewCommandHandle, 
       
    56             MPhoneCustomization& aCustomization );
       
    57 
       
    58         /**
       
    59         * A message handling function for Phone Engine messages
       
    60         * @param aMessage Message from Phone Engine
       
    61         * @param aCallId Call id the message concerns
       
    62         */
       
    63         void HandlePhoneEngineMessageL(
       
    64             const TInt aMessage, 
       
    65             TInt aCallId );  
       
    66 
       
    67         /**
       
    68         * Handles commands.
       
    69         * @param aCommand It is the code of the command to be handled.
       
    70         * @returns boolean value was the command handled by the state 
       
    71         *          (ETrue) or not (EFalse)
       
    72         */
       
    73         TBool HandleCommandL( TInt aCommand );
       
    74             
       
    75     protected:
       
    76 
       
    77         /**
       
    78         * By default EPOC constructor is private.
       
    79         */
       
    80         CPhoneStateIdleVoIP( 
       
    81             MPhoneStateMachine& aStateMachine, 
       
    82             MPhoneViewCommandHandle& aViewCommandHandle, 
       
    83             MPhoneCustomization& aCustomization );
       
    84         
       
    85         /**
       
    86         * ConstructL()
       
    87         */
       
    88         virtual void ConstructL();
       
    89 
       
    90         /**
       
    91          * Handles send command. 
       
    92          */
       
    93         void HandleSendCommandL();
       
    94         
       
    95         /**
       
    96         * Dial the specified number. 
       
    97         */
       
    98         void DialL( const TDesC& aNumber, 
       
    99             TPhoneNumberType aNumberType,
       
   100             TDialInitiationMethod aDialMethod );
       
   101 
       
   102         /**
       
   103         * A message handling function for EPEMessageDialling
       
   104         * @param aCallId: the call id of the call
       
   105         */
       
   106         void HandleDialingL( TInt aCallId );
       
   107         
       
   108         TBool IsEmergencyNumber( const TDesC& sString );
       
   109 
       
   110     private:
       
   111 
       
   112         /**
       
   113          * Returns VoIP state utils.
       
   114          * @return VoIP state utils.
       
   115          */
       
   116         CPhoneStateUtilsVoip& StateUtils();
       
   117     };
       
   118 
       
   119 #endif // CPHONESTATEIDLEVOIP_H
       
   120 
       
   121 // End of File