phoneapp/phoneuivoipextension/src/cphonestatecallsetupvoip.cpp
changeset 36 2eacb6118286
parent 30 ebdbd102c78a
child 37 ba76fc04e6c2
equal deleted inserted replaced
30:ebdbd102c78a 36:2eacb6118286
     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: Implementation of CPhoneStateCallSetupVoIP class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDES
       
    20 #include <mpeengineinfo.h>
       
    21 
       
    22 #include "cphonestatecallsetupvoip.h"
       
    23 #include "phonelogger.h"
       
    24 #include "mphonestatemachine.h"
       
    25 
       
    26 // ================= MEMBER FUNCTIONS =======================
       
    27 
       
    28 // C++ default constructor can NOT contain any code, that
       
    29 // might leave.
       
    30 //
       
    31 CPhoneStateCallSetupVoIP::CPhoneStateCallSetupVoIP( 
       
    32     MPhoneStateMachine& aStateMachine, 
       
    33     MPhoneViewCommandHandle& aViewCommandHandle,
       
    34     MPhoneCustomization& aPhoneCustomization ) : 
       
    35     CPhoneCallSetup( &aStateMachine, &aViewCommandHandle, &aPhoneCustomization )
       
    36     {
       
    37     }
       
    38 
       
    39 // -----------------------------------------------------------
       
    40 // CPhoneStateCallSetupVoIP::~CPhoneStateCallSetupVoIP()
       
    41 // Destructor
       
    42 // (other items were commented in a header).
       
    43 // -----------------------------------------------------------
       
    44 
       
    45 CPhoneStateCallSetupVoIP::~CPhoneStateCallSetupVoIP()
       
    46     {
       
    47     }
       
    48 
       
    49 // -----------------------------------------------------------
       
    50 // CPhoneStateCallSetupVoIP::ConstructL()
       
    51 // Constructor
       
    52 // (other items were commented in a header).
       
    53 // -----------------------------------------------------------
       
    54 //
       
    55 void CPhoneStateCallSetupVoIP::ConstructL()
       
    56     {
       
    57     __LOGMETHODSTARTEND( PhoneUIVoIPExtension, "CPhoneStateCallSetupVoIP::ConstructL()");
       
    58     CPhoneCallSetup::ConstructL();
       
    59     }
       
    60 
       
    61 // -----------------------------------------------------------
       
    62 // CPhoneStateCallSetupVoIP::NewL()
       
    63 // Constructor
       
    64 // (other items were commented in a header).
       
    65 // -----------------------------------------------------------
       
    66 //
       
    67 CPhoneStateCallSetupVoIP* CPhoneStateCallSetupVoIP::NewL( 
       
    68     MPhoneStateMachine& aStateMachine, 
       
    69     MPhoneViewCommandHandle& aViewCommandHandle,
       
    70     MPhoneCustomization& aPhoneCustomization )
       
    71     {
       
    72     CPhoneStateCallSetupVoIP* self = new (ELeave) 
       
    73         CPhoneStateCallSetupVoIP( aStateMachine, aViewCommandHandle, aPhoneCustomization );
       
    74     
       
    75     CleanupStack::PushL( self );
       
    76     self->ConstructL();
       
    77     CleanupStack::Pop( self );
       
    78     
       
    79     return self;
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------
       
    83 // CPhoneStateCallSetupVoIP::HandlePhoneEngineMessageL
       
    84 // -----------------------------------------------------------
       
    85 //
       
    86 void CPhoneStateCallSetupVoIP::HandlePhoneEngineMessageL( 
       
    87     const TInt aMessage, 
       
    88     TInt aCallId )
       
    89     {
       
    90     __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
       
    91         "CPhoneStateCallSetupVoIP::HandlePhoneEngineMessageL() ");
       
    92     switch ( aMessage )
       
    93         {
       
    94         case MEngineMonitor::EPEMessageConnecting:
       
    95             HandleConnectingL( aCallId );
       
    96             break;
       
    97         
       
    98         default:
       
    99             CPhoneCallSetup::HandlePhoneEngineMessageL( 
       
   100                 aMessage, aCallId );
       
   101             break;
       
   102         }
       
   103     }
       
   104 
       
   105 // -----------------------------------------------------------
       
   106 // CPhoneStateCallSetupVoIP::HandleConnectingL
       
   107 // -----------------------------------------------------------
       
   108 //
       
   109 void CPhoneStateCallSetupVoIP::HandleConnectingL( TInt aCallId )
       
   110     {
       
   111     __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
       
   112         "CPhoneStateCallSetupVoIP::HandleConnectingL() ");
       
   113 
       
   114     if( iStateMachine->PhoneEngineInfo()->CallType( aCallId ) == EPECallTypeVoIP )
       
   115         {
       
   116         SetCallHeaderType( EPECallTypeVoIP );   
       
   117         }
       
   118         
       
   119     CPhoneCallSetup::HandleConnectingL( aCallId );      
       
   120     }
       
   121 
       
   122 // End of File