telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstateactivatingprimary.cpp
changeset 64 b34bb05ac869
parent 56 ab72d5c1d770
equal deleted inserted replaced
56:ab72d5c1d770 64:b34bb05ac869
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Activating primary state
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file 
       
    20  @internalComponent
       
    21 */
       
    22  
       
    23 #include <networking/umtsnifcontrolif.h>
       
    24 #include "tpdpstates.h"
       
    25 #include "spudfsmdebuglogger.h"
       
    26 #include "pdpfsmnmspace.h"
       
    27 #include "cpdpfsm.h"
       
    28 #include "PDPFSM.h"
       
    29 	
       
    30 TInt TPdpStateActivatingPrimary::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
       
    31 {
       
    32 	SPUDFSMVERBOSE_FNLOG("TPdpStateActivatingPrimary::Input()");
       
    33 	SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
       
    34 
       
    35 	switch (aOperation)
       
    36 	{
       
    37 	case PdpFsm::EPdpActivated:
       
    38 		// GuQoS assumes the primary context becomes active when created, so the context status
       
    39 		// must be updated before sending the event
       
    40 		aFsm.Set(RPacketContext::EStatusActive);
       
    41 		aFsm.ChangeStateToOpen();
       
    42 		SpudManNotify (aFsm, KPrimaryContextCreated, KErrNone);
       
    43 		return KErrNone;
       
    44 	case PdpFsm::EPdpActivatedFailed:
       
    45 		SPUDFSMVERBOSE_LOG(_L("*** FAILURE ***"));
       
    46 		aFsm.ChangeStateToClosing();
       
    47 		
       
    48 		SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode);
       
    49 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
       
    50 		return KErrNone;
       
    51   case SpudMan::ECancelContextCreate:
       
    52 		aFsm.ChangeStateToStopping();
       
    53 		EtelDriverCancel(aFsm);
       
    54 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
       
    55 		return KErrNone;
       
    56 	// no default	
       
    57 	}
       
    58 
       
    59 	// default error handling
       
    60 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
       
    61 }
       
    62 
       
    63