telephonyprotocols/pdplayer/umts/spudfsm/src/tpdpstategettingnegqos.cpp
changeset 0 3553901f7fa8
child 19 630d2f34d719
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     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 "cpdpfsm.h"
       
    28 
       
    29 TInt TPdpStateGettingNegQoS::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
       
    30     {
       
    31 	SPUDFSMVERBOSE_FNLOG("TPdpStateGettingNegQoS::Input()");
       
    32 	SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
       
    33 
       
    34 	switch (aOperation)
       
    35 	    {
       
    36     	case SpudMan::EGetNegQoS:
       
    37     		EtelDriverInput(aFsm, EtelDriver::ENegQoSGet);
       
    38     		return KErrNone;
       
    39     		
       
    40     	case PdpFsm::EPdpNegQoSRetrieved:
       
    41     		SPUDFSMVERBOSE_LOG(_L("*** SUCCESS ***"));
       
    42     		aFsm.ChangeStateToOpen();
       
    43     		SpudManNotify(aFsm, KGetNegQoSEvent, KErrNone);
       
    44     		return KErrNone;
       
    45     		
       
    46     	case PdpFsm::EPdpNegQoSRetrievedFailed:
       
    47     		SPUDFSMVERBOSE_LOG(_L("*** FAILURE ***"));
       
    48     		// As far as everybody is concerned, the context was activated:
       
    49     		// This makes it eligible for certain events. 
       
    50     		// We have to move to Open state, so that that we can handle any operations
       
    51     		// on the activated PDP context correctly.
       
    52     		aFsm.ChangeStateToOpen(); 
       
    53     		SpudManNotify(aFsm, KGetNegQoSEvent, aErrorCode);
       
    54     		return KErrNone;
       
    55     	}
       
    56 	
       
    57 	// default error handling
       
    58 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
       
    59     }
       
    60 
       
    61 
       
    62