telephonyprotocols/pdplayer/umts/spudfsm/src/tpdpstateactivatingprimary.cpp
branchRCL_3
changeset 20 07a122eea281
parent 19 630d2f34d719
equal deleted inserted replaced
19:630d2f34d719 20:07a122eea281
     1 // Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    18 /**
    18 /**
    19  @file 
    19  @file 
    20  @internalComponent
    20  @internalComponent
    21 */
    21 */
    22  
    22  
    23 
       
    24 
       
    25 #include "OstTraceDefinitions.h"
       
    26 #ifdef OST_TRACE_COMPILER_IN_USE
       
    27 #include "tpdpstateactivatingprimaryTraces.h"
       
    28 #endif
       
    29 
       
    30 #include <networking/umtsnifcontrolif.h>
    23 #include <networking/umtsnifcontrolif.h>
    31 #include "tpdpstates.h"
    24 #include "tpdpstates.h"
       
    25 #include "spudfsmdebuglogger.h"
    32 #include "pdpfsmnmspace.h"
    26 #include "pdpfsmnmspace.h"
    33 #include "cpdpfsm.h"
    27 #include "cpdpfsm.h"
    34 #include "PDPFSM.h"
    28 #include "PDPFSM.h"
    35 	
    29 	
    36 TInt TPdpStateActivatingPrimary::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
    30 TInt TPdpStateActivatingPrimary::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
    37 {
    31 {
    38 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEACTIVATINGPRIMARY_INPUT_1, ">>TPdpStateActivatingPrimary::Input()");
    32 	SPUDFSMVERBOSE_FNLOG("TPdpStateActivatingPrimary::Input()");
    39 	OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEACTIVATINGPRIMARY_INPUT_2, "aOperation : %S(%d)", *LogOperation(aFsm, aOperation), aOperation);
    33 	SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
    40 
    34 
    41 	switch (aOperation)
    35 	switch (aOperation)
    42 	{
    36 	{
    43 	case PdpFsm::EPdpActivated:
    37 	case PdpFsm::EPdpActivated:
    44 		// GuQoS assumes the primary context becomes active when created, so the context status
    38 		// GuQoS assumes the primary context becomes active when created, so the context status
    45 		// must be updated before sending the event
    39 		// must be updated before sending the event
    46 		aFsm.Set(RPacketContext::EStatusActive);
    40 		aFsm.Set(RPacketContext::EStatusActive);
    47 		aFsm.ChangeStateToOpen();
    41 		aFsm.ChangeStateToOpen();
    48 		SpudManNotify (aFsm, KPrimaryContextCreated, KErrNone);
    42 		SpudManNotify (aFsm, KPrimaryContextCreated, KErrNone);
    49 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEACTIVATINGPRIMARY_INPUT_3, "<<TPdpStateActivatingPrimary::Input()");
       
    50 		return KErrNone;
    43 		return KErrNone;
    51 	case PdpFsm::EPdpActivatedFailed:
    44 	case PdpFsm::EPdpActivatedFailed:
    52 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEACTIVATINGPRIMARY_INPUT_4, "*** FAILURE ***");
    45 		SPUDFSMVERBOSE_LOG(_L("*** FAILURE ***"));
    53 		aFsm.ChangeStateToClosing();
    46 		aFsm.ChangeStateToClosing();
    54 		
    47 		
    55 		SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode);
    48 		SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode);
    56 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
    49 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
    57 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEACTIVATINGPRIMARY_INPUT_5, "<<TPdpStateActivatingPrimary::Input()");
       
    58 		return KErrNone;
    50 		return KErrNone;
    59   case SpudMan::ECancelContextCreate:
    51   case SpudMan::ECancelContextCreate:
    60 		aFsm.ChangeStateToStopping();
    52 		aFsm.ChangeStateToStopping();
    61 		EtelDriverCancel(aFsm);
    53 		EtelDriverCancel(aFsm);
    62 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
    54 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
    63 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEACTIVATINGPRIMARY_INPUT_6, "<<TPdpStateActivatingPrimary::Input()");
       
    64 		return KErrNone;
    55 		return KErrNone;
    65 	// no default	
    56 	// no default	
    66 	}
    57 	}
    67 
    58 
    68 	// default error handling
    59 	// default error handling
    69 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEACTIVATINGPRIMARY_INPUT_7, "<<TPdpStateActivatingPrimary::Input()");
       
    70 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
    60 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
    71 }
    61 }
    72 
    62 
    73 
    63