telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstategettingnegqos.cpp
changeset 68 d0d9cc530d21
parent 62 8ef833fbf5aa
child 75 f45cd1ad4667
equal deleted inserted replaced
62:8ef833fbf5aa 68:d0d9cc530d21
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Retrieving Negotiated QoS state
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file 
       
    20  @internalComponent
       
    21 */
       
    22  
       
    23 #include <networking/umtsnifcontrolif.h>
       
    24 #include "tpdpstates.h"
       
    25 #include "spudfsmdebuglogger.h"
       
    26 #include "pdpfsmnmspace.h"
       
    27 #include "MPdpFsmInterface.h"
       
    28 #include "cpdpfsm.h"
       
    29 
       
    30 TInt TPdpStateGettingNegQoS::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
       
    31     {
       
    32 	SPUDFSMVERBOSE_FNLOG("TPdpStateGettingNegQoS::Input()");
       
    33 	SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
       
    34 
       
    35 	switch (aOperation)
       
    36 	    {
       
    37     	case SpudMan::EGetNegQoS:
       
    38     		EtelDriverInput(aFsm, EtelDriver::ENegQoSGet);
       
    39     		return KErrNone;
       
    40     		
       
    41     	case PdpFsm::EPdpNegQoSRetrieved:
       
    42     		SPUDFSMVERBOSE_LOG(_L("*** SUCCESS ***"));
       
    43     		aFsm.ChangeStateToOpen();
       
    44     		SpudManNotify(aFsm, KGetNegQoSEvent, KErrNone);
       
    45     		return KErrNone;
       
    46     		
       
    47     	case PdpFsm::EPdpNegQoSRetrievedFailed:
       
    48     		SPUDFSMVERBOSE_LOG(_L("*** FAILURE ***"));
       
    49     		// As far as everybody is concerned, the context was activated:
       
    50     		// This makes it eligible for certain events. 
       
    51     		// We have to move to Open state, so that that we can handle any operations
       
    52     		// on the activated PDP context correctly.
       
    53     		aFsm.ChangeStateToOpen(); 
       
    54     		SpudManNotify(aFsm, KGetNegQoSEvent, aErrorCode);
       
    55     		return KErrNone;
       
    56     	}
       
    57 	
       
    58 	// default error handling
       
    59 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
       
    60     }
       
    61 
       
    62 
       
    63