multimediacommsengine/mmcesrv/mmceserver/src/mcenatstatecreateofferrequested.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2008 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 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "mcenatstatecreateofferrequested.h"
       
    21 #include "mcenatevents.h"
       
    22 #include "mcenatactions.h"
       
    23 #include "mcesipsession.h"
       
    24 #include "mcesrvlogs.h"
       
    25 
       
    26 // -----------------------------------------------------------------------------
       
    27 // CMceNatStateCreateOfferRequested::CMceNatStateCreateOfferRequested
       
    28 // -----------------------------------------------------------------------------
       
    29 //
       
    30 CMceNatStateCreateOfferRequested::CMceNatStateCreateOfferRequested()
       
    31 	{
       
    32 	}
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // CMceNatStateCreateOfferRequested::~CMceNatStateCreateOfferRequested
       
    36 // -----------------------------------------------------------------------------
       
    37 //
       
    38 CMceNatStateCreateOfferRequested::~CMceNatStateCreateOfferRequested()
       
    39 	{
       
    40 	}
       
    41 
       
    42 // -----------------------------------------------------------------------------
       
    43 // CMceNatStateCreateOfferRequested::Accept
       
    44 // EMceNatUpdated and EMceNatInitialized can be received in any order.
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 TBool
       
    48 CMceNatStateCreateOfferRequested::Accept( TMceNatStateTransitionEvent& aEvent )
       
    49     {    
       
    50     return aEvent.NatCode() == EMceNatInitialized ||
       
    51     	   aEvent.NatCode() == EMceNatUpdated;
       
    52     }
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // CMceNatStateCreateOfferRequested::EntryL
       
    56 // -----------------------------------------------------------------------------
       
    57 //
       
    58 void CMceNatStateCreateOfferRequested::EntryL(
       
    59 	TMceNatStateTransitionEvent& aEvent )
       
    60 	{
       
    61 	aEvent.ParamStatus() = KMceAsync;
       
    62 	}
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 // CMceNatStateCreateOfferRequested::ExitL
       
    66 // EMceNatUpdated and EMceNatInitialized can be received in any order
       
    67 // -----------------------------------------------------------------------------
       
    68 //
       
    69 void
       
    70 CMceNatStateCreateOfferRequested::ExitL( TMceNatStateTransitionEvent& aEvent )
       
    71 	{
       
    72 	MCESRV_DEBUG( "*** CMceNatStateCreateOfferRequested::ExitL, Entry" );
       
    73 
       
    74 	aEvent.NatActions().StateChangedL( aEvent, KMceNatStateIdle );
       
    75 
       
    76 	if ( CMceCsSubSession::EInSession != aEvent.Session().Type() )
       
    77 		{
       
    78 		aEvent.NatActions().ResumeNatUpdated();
       
    79 		}
       
    80 
       
    81 	MCESRV_DEBUG( "*** CMceNatStateCreateOfferRequested::ExitL, Exit" );
       
    82 	}