telephonyprotocols/pdplayer/umts/spudfsm/src/tpdpstateopeningphone.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
child 73 70d75957b98f
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2004-2010 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 "tpdpstateopeningphoneTraces.h"
       
    28 #endif
       
    29 
    23 #include <networking/umtsnifcontrolif.h>
    30 #include <networking/umtsnifcontrolif.h>
    24 #include "tpdpstates.h"
    31 #include "tpdpstates.h"
    25 #include "spudfsmdebuglogger.h"
       
    26 #include "pdpfsmnmspace.h"
    32 #include "pdpfsmnmspace.h"
    27 #include "cpdpfsmfactory.h"
    33 #include "cpdpfsmfactory.h"
    28 #include "cpdpfsm.h"
    34 #include "cpdpfsm.h"
    29 #include "PDPFSM.h"
    35 #include "PDPFSM.h"
    30 
    36 
    31 TInt TPdpStateOpeningPhone::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
    37 TInt TPdpStateOpeningPhone::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
    32 {
    38 {
    33 	SPUDFSMVERBOSE_FNLOG("TPdpStateOpeningPhone::Input()");
    39 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_1, ">>TPdpStateOpeningPhone::Input()");
    34 	SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
    40 	OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_2, "aOperation : %S(%d)", *(LogOperation(aFsm, aOperation)), aOperation);
    35 
    41 
    36 	switch (aOperation)
    42 	switch (aOperation)
    37 	{
    43 	{
    38 	// ETel notifications
    44 	// ETel notifications
    39 	case PdpFsm::EPhoneOpened:
    45 	case PdpFsm::EPhoneOpened:
    40 		aFsm.ChangeStateToCreatingPrimary();
    46 		aFsm.ChangeStateToCreatingPrimary();
    41 		iPdpFsmFactory->iEtelOpened = ETrue;		
    47 		iPdpFsmFactory->iEtelOpened = ETrue;		
    42 		EtelDriverInput(aFsm, EtelDriver::ECreate1ryPdpContext);
    48 		EtelDriverInput(aFsm, EtelDriver::ECreate1ryPdpContext);
       
    49 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_3, "<<TPdpStateOpeningPhone::Input()");
    43 		return KErrNone;
    50 		return KErrNone;
    44 	case PdpFsm::EPhoneOpenedFailed:
    51 	case PdpFsm::EPhoneOpenedFailed:
    45 		aFsm.ChangeStateToInitialised();
    52 		aFsm.ChangeStateToInitialised();
    46 		iPdpFsmFactory->iEtelOpened = EFalse;		
    53 		iPdpFsmFactory->iEtelOpened = EFalse;		
    47 		SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode);
    54 		SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode);
       
    55 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_4, "<<TPdpStateOpeningPhone::Input()");
    48 		return KErrNone;
    56 		return KErrNone;
    49   case SpudMan::ECancelContextCreate:
    57   case SpudMan::ECancelContextCreate:
    50 		aFsm.ChangeStateToStopping();
    58 		aFsm.ChangeStateToStopping();
    51 		EtelDriverCancel(aFsm);
    59 		EtelDriverCancel(aFsm);
    52 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
    60 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
       
    61 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_5, "<<TPdpStateOpeningPhone::Input()");
    53 		return KErrNone;
    62 		return KErrNone;
    54 	}
    63 	}
    55 	
    64 	
    56 	// default error handling
    65 	// default error handling
       
    66 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_6, "<<TPdpStateOpeningPhone::Input()");
    57 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
    67 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
    58 }
    68 }
    59 
    69 
    60 
    70