telephonyprotocols/pdplayer/umts/spudfsm/src/tpdpstate.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".
    20 /**
    20 /**
    21  @file 
    21  @file 
    22  @internalComponent
    22  @internalComponent
    23 */
    23 */
    24  
    24  
       
    25 
       
    26 
       
    27 #include "OstTraceDefinitions.h"
       
    28 #ifdef OST_TRACE_COMPILER_IN_USE
       
    29 #include "tpdpstateTraces.h"
       
    30 #endif
       
    31 
    25 #include <networking/umtsnifcontrolif.h>
    32 #include <networking/umtsnifcontrolif.h>
    26 #include "cpdpfsmfactory.h"
    33 #include "cpdpfsmfactory.h"
    27 #include "tpdpstate.h"
    34 #include "tpdpstate.h"
    28 #include "spudfsmdebuglogger.h"
       
    29 #include "pdpfsmnmspace.h"
    35 #include "pdpfsmnmspace.h"
    30 #include "reteldriverinput.h"
    36 #include "reteldriverinput.h"
    31 #include "PDPFSM.h"
    37 #include "PDPFSM.h"
    32 
    38 
    33 // Literals for TPdpState::LogOperation
    39 // Literals for TPdpState::LogOperation
    86 _LIT(KSpudMan_EGetNegQoS, "SpudMan::EGetNegQoS");
    92 _LIT(KSpudMan_EGetNegQoS, "SpudMan::EGetNegQoS");
    87 _LIT(KUnknown, "Unknown");
    93 _LIT(KUnknown, "Unknown");
    88 
    94 
    89 
    95 
    90 TPdpState::TPdpState()
    96 TPdpState::TPdpState()
    91 #ifdef _DEBUG
    97 #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_DEBUG)
    92 	: iName()
    98 	: iName()
    93 #endif		
    99 #endif		
    94 {
   100 {
    95 	SPUDFSMVERBOSE_FNLOG("TPdpState::TPdpState()");
   101 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATE_CTOR_1, ">>TPdpState::TPdpState()");
       
   102 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATE_CTOR_2, "<<TPdpState::TPdpState()");
    96 }
   103 }
    97 
   104 
    98 TInt TPdpState::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt /*aErrorCode*/)
   105 TInt TPdpState::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt /*aErrorCode*/)
    99 {
   106 {
   100 	SPUDFSMVERBOSE_FNLOG("TPdpState::Input()");
   107 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATE_INPUT_1, ">>TPdpState::Input()");
   101 	SPUDFSMVERBOSE_LOG1(_L("aOperation : %d"), aOperation);
   108 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATE_INPUT_2, "aOperation : %d", aOperation);
   102 
   109 
   103 	if (aOperation == PdpFsm::EContextDeleted || aOperation == SpudMan::EContextDelete ||
   110 	if (aOperation == PdpFsm::EContextDeleted || aOperation == SpudMan::EContextDelete ||
   104 		(aOperation == PdpFsm::EContextStatusChangeNetwork && aFsm.iContextStatus == RPacketContext::EStatusDeleted))
   111 		(aOperation == PdpFsm::EContextStatusChangeNetwork && aFsm.iContextStatus == RPacketContext::EStatusDeleted))
   105 	{
   112 	{
   106 		aFsm.ChangeStateToClosing();
   113 		aFsm.ChangeStateToClosing();
   107 		EtelDriverCancel (aFsm);
   114 		EtelDriverCancel (aFsm);
   108 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
   115 		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
   109 		return KErrNone;
   116 		return KErrNone;
   110 	}
   117 	}
   111 
   118 
   112 	SPUDFSMVERBOSE_LOG1(_L("!!! Unhandled Operation (%S)!!!"), LogOperation (aFsm, aOperation));
   119 	OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATE_INPUT_3, "!!! Unhandled Operation (%S)!!!", *(LogOperation (aFsm, aOperation)));
       
   120 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATE_INPUT_4, "<<TPdpState::Input()");
   113 	return KErrGeneral;
   121 	return KErrGeneral;
   114 }
   122 }
   115 
   123 
   116 void TPdpState::EtelDriverInput (CPdpFsm& aFsm, EtelDriver::TEtelInput aOperation)
   124 void TPdpState::EtelDriverInput (CPdpFsm& aFsm, EtelDriver::TEtelInput aOperation)
   117 {
   125 {
   118 	SPUDFSMVERBOSE_LOG1(_L("EtelDriverInput : %d"), aOperation);
   126 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATE_ETELDRIVERINPUT_1, "EtelDriverInput : %d", aOperation);
   119 	aFsm.EtelInput (aOperation);
   127 	aFsm.EtelInput (aOperation);
   120 }
   128 }
   121 
   129 
   122 void TPdpState::EtelDriverCancel (CPdpFsm& aFsm)
   130 void TPdpState::EtelDriverCancel (CPdpFsm& aFsm)
   123 {
   131 {
   124 	SPUDFSMVERBOSE_LOG(_L("EtelDriverCancel"));
   132 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATE_ETELDRIVERCANCEL_1, "EtelDriverCancel");
   125 	aFsm.EtelCancel();
   133 	aFsm.EtelCancel();
   126 }
   134 }
   127 
   135 
   128 void TPdpState::SpudManNotify (CPdpFsm& aFsm, TInt aNotification, TInt aParam)
   136 void TPdpState::SpudManNotify (CPdpFsm& aFsm, TInt aNotification, TInt aParam)
   129 {
   137 {
   130 	SPUDFSMVERBOSE_LOG1(_L("SpudManNotify : %d"), aNotification);
   138 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATE_SPUDMANNOTIFY_1, "SpudManNotify : %d", aNotification);
   131 	aFsm.SpudInput (aNotification, aParam);
   139 	aFsm.SpudInput (aNotification, aParam);
   132 }
   140 }
   133 
   141 
   134 const TDesC * TPdpState::LogOperation (CPdpFsm& aFsm, TInt aOperation)
   142 const TDesC * TPdpState::LogOperation (CPdpFsm& aFsm, TInt aOperation)
   135 {
   143 {