phoneapp/phoneuivoipextension/inc/cphonenewcallcmdhandler.h
changeset 0 5f000ab63145
child 50 377c906a8701
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2009 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: Handles commands related to new call.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CPHONENEWCALLCMDHANDLER_H
       
    20 #define C_CPHONENEWCALLCMDHANDLER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class MPhoneStateMachine;
       
    25 class MPhoneViewCommandHandle;
       
    26 class CPhoneStateUtilsVoip;
       
    27 
       
    28 /**
       
    29  *  Handles commands related to new Internet call.
       
    30  *
       
    31  *  @lib PhoneUIVoIPExtension.dll
       
    32  *  @since S60 v5.1
       
    33  */
       
    34 NONSHARABLE_CLASS( CPhoneNewCallCmdHandler ) : public CBase
       
    35     {
       
    36 
       
    37 public:
       
    38 
       
    39     /**
       
    40      * Two-phased constructor.
       
    41      * @param    aStateMachine       Handle to the state machine.
       
    42      * @param    aViewCommandHandle  Handle to the PhoneUIView.
       
    43      */
       
    44     static CPhoneNewCallCmdHandler* NewL( 
       
    45         MPhoneStateMachine& aStateMachine,
       
    46         MPhoneViewCommandHandle& aViewCommandHandle );
       
    47 
       
    48     /**
       
    49      * Two-phased constructor.
       
    50      * @param    aStateMachine       Handle to the state machine.
       
    51      * @param    aViewCommandHandle  Handle to the PhoneUIView.
       
    52      */
       
    53     static CPhoneNewCallCmdHandler* NewLC( 
       
    54         MPhoneStateMachine& aStateMachine,
       
    55         MPhoneViewCommandHandle& aViewCommandHandle );
       
    56     
       
    57     /**
       
    58      * Destructor.
       
    59      */
       
    60     virtual ~CPhoneNewCallCmdHandler();
       
    61 
       
    62     /**
       
    63      * Handles VoIP commands related to new call.
       
    64      * @param   aCommand    VoIP command identifier.
       
    65      */
       
    66     void HandleCommandL( TInt aCommand );
       
    67     
       
    68 private:
       
    69 
       
    70     CPhoneNewCallCmdHandler(         
       
    71         MPhoneStateMachine& aStateMachine,
       
    72         MPhoneViewCommandHandle& aViewCommandHandle );
       
    73 
       
    74     void ConstructL();
       
    75 
       
    76     /**
       
    77      * Shows new call query. 
       
    78      */
       
    79     void ShowNewCallQueryL();
       
    80      
       
    81     /**
       
    82      * Starts new call. 
       
    83      */
       
    84     void DoNewCallL();
       
    85           
       
    86     /**
       
    87      * Opens single item contact fetch.
       
    88      * @param   aFetchType  Type of the fetch.
       
    89      */
       
    90     void OpenSingleItemContactFetchL( TInt aFetchType );
       
    91 
       
    92     /**
       
    93      * Returns VoIP state utils.
       
    94      * @return VoIP state utils.
       
    95      */    
       
    96     CPhoneStateUtilsVoip& StateUtils();
       
    97     
       
    98 private: // data
       
    99 
       
   100     /**
       
   101      * Interface to the state machine.
       
   102      * Not own.
       
   103      */
       
   104     MPhoneStateMachine& iStateMachine;
       
   105     
       
   106     /**
       
   107      * Interface to the phone ui view.
       
   108      * Not own.
       
   109      */
       
   110     MPhoneViewCommandHandle& iViewCommandHandle;
       
   111     };
       
   112 
       
   113 
       
   114 #endif // C_CPHONENEWCALLCMDHANDLER_H