telephonyprotocols/pdplayer/umts/spudfsm/src/tpdpstateopen.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 "tpdpstateopenTraces.h"
       
    28 #endif
       
    29 
       
    30 #include <etelpckt.h>
    23 #include <etelpckt.h>
    31 #include <networking/umtsnifcontrolif.h>
    24 #include <networking/umtsnifcontrolif.h>
    32 #include "tpdpstates.h"
    25 #include "tpdpstates.h"
    33 #include "pdpfsmnmspace.h"
    26 #include "pdpfsmnmspace.h"
    34 #include "PDPFSM.h"
    27 #include "PDPFSM.h"
    35 #include "cpdpfsm.h"
    28 #include "cpdpfsm.h"
    36 
    29 
    37 TInt TPdpStateOpen::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
    30 TInt TPdpStateOpen::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
    38 {
    31 {
    39 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_1, ">>TPdpStateOpen::Input()");
       
    40 	OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_2, "aOperation : %S(%d)", *(LogOperation(aFsm, aOperation)), aOperation);
       
    41 
       
    42 	switch (aOperation)
    32 	switch (aOperation)
    43 	{
    33 	{
    44 	case PdpFsm::EQoSProfileChangeNetwork:
    34 	case PdpFsm::EQoSProfileChangeNetwork:
    45 //		RPacketQoS::TQoSR99_R4Negotiated
    35 //		RPacketQoS::TQoSR99_R4Negotiated
    46 		SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone);
    36 		SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone);
    47 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_3, "<<TPdpStateOpen::Input()");
       
    48 		return KErrNone;
    37 		return KErrNone;
    49 	case PdpFsm::EConfigGPRSChangeNetwork:
    38 	case PdpFsm::EConfigGPRSChangeNetwork:
    50 //		//RPacketContext::TContextConfigGPRS
    39 //		//RPacketContext::TContextConfigGPRS
    51 		SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone);
    40 		SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone);
    52 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_4, "<<TPdpStateOpen::Input()");
       
    53 		return KErrNone;
    41 		return KErrNone;
    54 	case PdpFsm::EContextStatusChangeNetwork:
    42 	case PdpFsm::EContextStatusChangeNetwork:
    55 		if (aFsm.iContextStatus == RPacketContext::EStatusSuspended)
    43 		if (aFsm.iContextStatus == RPacketContext::EStatusSuspended)
    56     		{
    44     		{
    57 			aFsm.ChangeStateToSuspended();
    45 			aFsm.ChangeStateToSuspended();
    65 		else
    53 		else
    66     		{
    54     		{
    67 			// no change in state - the upper layer must change the state if it needs to
    55 			// no change in state - the upper layer must change the state if it needs to
    68 			SpudManNotify (aFsm, KContextParametersChangeEvent, aErrorCode);
    56 			SpudManNotify (aFsm, KContextParametersChangeEvent, aErrorCode);
    69     		}
    57     		}
    70 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_5, "<<TPdpStateOpen::Input()");
       
    71 		return KErrNone;
    58 		return KErrNone;
    72 	case SpudMan::EContextDelete:
    59 	case SpudMan::EContextDelete:
    73 		aFsm.ChangeStateToClosing();
    60 		aFsm.ChangeStateToClosing();
    74 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
    61 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
    75 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_6, "<<TPdpStateOpen::Input()");
       
    76 		return KErrNone;
    62 		return KErrNone;
    77 	case SpudMan::EContextQoSSet:
    63 	case SpudMan::EContextQoSSet:
    78 		aFsm.ChangeStateToChangingQoS();
    64 		aFsm.ChangeStateToChangingQoS();
    79 		EtelDriverInput(aFsm, EtelDriver::ESetQoS);
    65 		EtelDriverInput(aFsm, EtelDriver::ESetQoS);
    80 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_7, "<<TPdpStateOpen::Input()");
       
    81 		return KErrNone;
    66 		return KErrNone;
    82 	case SpudMan::EContextModifyActive:
    67 	case SpudMan::EContextModifyActive:
    83 		aFsm.ChangeStateToModifingActive();
    68 		aFsm.ChangeStateToModifingActive();
    84 		EtelDriverInput(aFsm, EtelDriver::EModifyActive);
    69 		EtelDriverInput(aFsm, EtelDriver::EModifyActive);
    85 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_8, "<<TPdpStateOpen::Input()");
       
    86 		return KErrNone;
    70 		return KErrNone;
    87 	case SpudMan::EContextTFTModify:
    71 	case SpudMan::EContextTFTModify:
    88 		aFsm.ChangeStateToChangingTFT();
    72 		aFsm.ChangeStateToChangingTFT();
    89 		EtelDriverInput(aFsm, EtelDriver::EChangeTft);
    73 		EtelDriverInput(aFsm, EtelDriver::EChangeTft);
    90 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_9, "<<TPdpStateOpen::Input()");
       
    91 		return KErrNone;
    74 		return KErrNone;
    92 	case SpudMan::ESuspend: // think this is superfluous - DAN will see at review :)
    75 	case SpudMan::ESuspend: // think this is superfluous - DAN will see at review :)
    93 		aFsm.ChangeStateToSuspended();
    76 		aFsm.ChangeStateToSuspended();
    94 		SpudManNotify(aFsm, KContextBlockedEvent, KErrNone);
    77 		SpudManNotify(aFsm, KContextBlockedEvent, KErrNone);
    95 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_10, "<<TPdpStateOpen::Input()");
       
    96 		return KErrNone;
    78 		return KErrNone;
    97 	case SpudMan::EMbmsSessionUpdate:
    79 	case SpudMan::EMbmsSessionUpdate:
    98 		EtelDriverInput(aFsm, EtelDriver::ESessionUpdate);
    80 		EtelDriverInput(aFsm, EtelDriver::ESessionUpdate);
    99 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_11, "<<TPdpStateOpen::Input()");
       
   100 		return KErrNone;
    81 		return KErrNone;
   101 		
    82 		
   102 	case SpudMan::EMbmsParameterUpdate:
    83 	case SpudMan::EMbmsParameterUpdate:
   103 		SpudManNotify (aFsm, KContextParametersChangeEvent, aErrorCode);
    84 		SpudManNotify (aFsm, KContextParametersChangeEvent, aErrorCode);
   104 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_12, "<<TPdpStateOpen::Input()");
       
   105 		return KErrNone;
    85 		return KErrNone;
   106 	}
    86 	}
   107 	
    87 	
   108 	// default error handling
    88 	// default error handling
   109 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_13, "<<TPdpStateOpen::Input()");
       
   110 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
    89 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
   111 }
    90 }
   112 
    91 
   113 
    92