telephonyprotocols/pdplayer/umts/spudfsm/src/tpdpstateopeningphone.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 "tpdpstateopeningphoneTraces.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 "cpdpfsmfactory.h"
    27 #include "cpdpfsmfactory.h"
    34 #include "cpdpfsm.h"
    28 #include "cpdpfsm.h"
    35 #include "PDPFSM.h"
    29 #include "PDPFSM.h"
    36 
    30 
    37 TInt TPdpStateOpeningPhone::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
    31 TInt TPdpStateOpeningPhone::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
    38 {
    32 {
    39 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_1, ">>TPdpStateOpeningPhone::Input()");
    33 	SPUDFSMVERBOSE_FNLOG("TPdpStateOpeningPhone::Input()");
    40 	OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_2, "aOperation : %S(%d)", *(LogOperation(aFsm, aOperation)), aOperation);
    34 	SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
    41 
    35 
    42 	switch (aOperation)
    36 	switch (aOperation)
    43 	{
    37 	{
    44 	// ETel notifications
    38 	// ETel notifications
    45 	case PdpFsm::EPhoneOpened:
    39 	case PdpFsm::EPhoneOpened:
    46 		aFsm.ChangeStateToCreatingPrimary();
    40 		aFsm.ChangeStateToCreatingPrimary();
    47 		iPdpFsmFactory->iEtelOpened = ETrue;		
    41 		iPdpFsmFactory->iEtelOpened = ETrue;		
    48 		EtelDriverInput(aFsm, EtelDriver::ECreate1ryPdpContext);
    42 		EtelDriverInput(aFsm, EtelDriver::ECreate1ryPdpContext);
    49 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_3, "<<TPdpStateOpeningPhone::Input()");
       
    50 		return KErrNone;
    43 		return KErrNone;
    51 	case PdpFsm::EPhoneOpenedFailed:
    44 	case PdpFsm::EPhoneOpenedFailed:
    52 		aFsm.ChangeStateToInitialised();
    45 		aFsm.ChangeStateToInitialised();
    53 		iPdpFsmFactory->iEtelOpened = EFalse;		
    46 		iPdpFsmFactory->iEtelOpened = EFalse;		
    54 		SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode);
    47 		SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode);
    55 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_4, "<<TPdpStateOpeningPhone::Input()");
       
    56 		return KErrNone;
    48 		return KErrNone;
    57   case SpudMan::ECancelContextCreate:
    49   case SpudMan::ECancelContextCreate:
    58 		aFsm.ChangeStateToStopping();
    50 		aFsm.ChangeStateToStopping();
    59 		EtelDriverCancel(aFsm);
    51 		EtelDriverCancel(aFsm);
    60 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
    52 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
    61 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_5, "<<TPdpStateOpeningPhone::Input()");
       
    62 		return KErrNone;
    53 		return KErrNone;
    63 	}
    54 	}
    64 	
    55 	
    65 	// default error handling
    56 	// default error handling
    66 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPENINGPHONE_INPUT_6, "<<TPdpStateOpeningPhone::Input()");
       
    67 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
    57 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
    68 }
    58 }
    69 
    59 
    70 
    60