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