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