telephonyprotocols/pdplayer/umts/spudfsm/src/tpdpstateinitialised.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 "tpdpstateinitialisedTraces.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 "cpdpfsm.h"
    33 #include "cpdpfsm.h"
    28 #include "cpdpfsmfactory.h"
    34 #include "cpdpfsmfactory.h"
    29 #include "eteldrivernmspace.h"
    35 #include "eteldrivernmspace.h"
    30 using namespace SpudMan;
    36 using namespace SpudMan;
    31 
    37 
    32 TInt TPdpStateInitialised::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
    38 TInt TPdpStateInitialised::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
    33 {
    39 {
    34 	SPUDFSMVERBOSE_FNLOG("TPdpStateInitialised::Input()");
    40 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_1, ">>TPdpStateInitialised::Input()");
    35 	SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
    41 	OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_2, "aOperation : %S(%d)", *(LogOperation(aFsm, aOperation)), aOperation);
    36 
    42 
    37 	switch (aOperation)
    43 	switch (aOperation)
    38 	{
    44 	{
    39 	case SpudMan::ECreatePrimaryPDPContext:
    45 	case SpudMan::ECreatePrimaryPDPContext:
    40 		aFsm.iContextType = SpudMan::EPrimary;
    46 		aFsm.iContextType = SpudMan::EPrimary;
    48 		else // just create the primary
    54 		else // just create the primary
    49 			{
    55 			{
    50 			aFsm.ChangeStateToCreatingPrimary();
    56 			aFsm.ChangeStateToCreatingPrimary();
    51 			EtelDriverInput (aFsm, EtelDriver::ECreate1ryPdpContext);
    57 			EtelDriverInput (aFsm, EtelDriver::ECreate1ryPdpContext);
    52 			}
    58 			}
    53 	
    59 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_3, "<<TPdpStateInitialised::Input()");
    54 		return KErrNone;
    60 		return KErrNone;
    55 	case SpudMan::ECreateSecondaryPDPContext:
    61 	case SpudMan::ECreateSecondaryPDPContext:
    56 		aFsm.ChangeStateToCreatingSecondary();
    62 		aFsm.ChangeStateToCreatingSecondary();
    57 
    63 
    58 		aFsm.iContextType = SpudMan::ESecondary;
    64 		aFsm.iContextType = SpudMan::ESecondary;
    59 
    65 
    60 		EtelDriverInput (aFsm, EtelDriver::ECreate2ryPdpContext);
    66 		EtelDriverInput (aFsm, EtelDriver::ECreate2ryPdpContext);
    61 	
    67 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_4, "<<TPdpStateInitialised::Input()");
    62 		return KErrNone;
    68 		return KErrNone;
    63 		
    69 		
    64 		
    70 		
    65 	case SpudMan::ECreateMbmsPDPContext:
    71 	case SpudMan::ECreateMbmsPDPContext:
    66 		aFsm.ChangeStateToCreatingMbms();
    72 		aFsm.ChangeStateToCreatingMbms();
    67 		aFsm.iContextType = SpudMan::EMbms;
    73 		aFsm.iContextType = SpudMan::EMbms;
    68 		EtelDriverInput (aFsm, EtelDriver::ECreateMbmsPdpContext);
    74 		EtelDriverInput (aFsm, EtelDriver::ECreateMbmsPdpContext);
       
    75 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_5, "<<TPdpStateInitialised::Input()");
    69 		return KErrNone;
    76 		return KErrNone;
    70 		
    77 		
    71 	// these stop the default actions which aren't of value in the Initialised state, although we 
    78 	// these stop the default actions which aren't of value in the Initialised state, although we 
    72 	// do not expect to see these here.
    79 	// do not expect to see these here.
    73 	case PdpFsm::EContextDeleted:
    80 	case PdpFsm::EContextDeleted:
    74 		return KErrNone;
    81 		return KErrNone;
    75 	case PdpFsm::EContextStatusChangeNetwork:
    82 	case PdpFsm::EContextStatusChangeNetwork:
    76 		if (aFsm.iContextStatus == RPacketContext::EStatusDeleted)
    83 		if (aFsm.iContextStatus == RPacketContext::EStatusDeleted)
    77 		{
    84 		{
    78 			return KErrNone;
    85 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_6, "<<TPdpStateInitialised::Input()");
       
    86 		return KErrNone;
    79 		}
    87 		}
    80 		break;
    88 		break;
    81 	}
    89 	}
    82 
    90 
    83 	// default error handling
    91 	// default error handling
       
    92 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_7, "<<TPdpStateInitialised::Input()");
    84 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
    93 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
    85 
    94 
    86 }
    95 }
    87 
    96 
    88 
    97