telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatestopping.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 // Stopping 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 "PDPFSM.h"
       
    28 #include "cpdpfsm.h"
       
    29 
       
    30 TInt TPdpStateStopping::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
       
    31 {
       
    32 	SPUDFSMVERBOSE_FNLOG("TPdpStateStopping::Input()");
       
    33 	SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
       
    34 
       
    35 	switch (aOperation)
       
    36 	{
       
    37 	case PdpFsm::EContextDeleted:
       
    38 		aFsm.ChangeStateToInitialised();
       
    39 		SpudManNotify (aFsm, KPrimaryContextCreated, KErrGeneral);
       
    40 		return KErrNone;			
       
    41 	case PdpFsm::EContextDeletedFailed:
       
    42 		// There isn't any corrective action that can be taken here. 
       
    43 		SPUDFSMVERBOSE_LOG(_L("**** DELETE FAILURE ****"));
       
    44 		SPUDFSM_LOG(_L("*** DELETE FAILURE ***"));
       
    45 		aFsm.ChangeStateToInitialised();
       
    46 		EtelDriverCancel (aFsm);
       
    47 		SpudManNotify (aFsm, KPrimaryContextCreated, KErrNone);
       
    48 		return KErrNone;
       
    49 	case SpudMan::EContextDelete:
       
    50 		// already doing this and don't want default action
       
    51 		return KErrInUse;
       
    52 	}
       
    53 
       
    54 	// default error handling
       
    55 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
       
    56 }
       
    57 
       
    58