telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstateclosing.cpp
changeset 64 b34bb05ac869
parent 56 ab72d5c1d770
equal deleted inserted replaced
56:ab72d5c1d770 64:b34bb05ac869
     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 // Closing 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 TPdpStateClosing::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
       
    31 {
       
    32 	SPUDFSMVERBOSE_FNLOG("TPdpStateClosing::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, KContextDeleteEvent, KErrNone);
       
    40 		return KErrNone;			
       
    41 	case PdpFsm::EContextDeletedFailed:
       
    42 		// There isn't any corrective action that can be taken here. 
       
    43 		// It is assumed when this context is used again, there will be a failure 
       
    44 		// or a failure elsewhere down the line that will correct the situation, ultimately
       
    45 		// involving the user. FSM and ETelDriver are not in a position to take any corrective action.
       
    46 		SPUDFSMVERBOSE_LOG(_L("**** DELETE FAILURE ****"));
       
    47 		aFsm.ChangeStateToInitialised();
       
    48 		SpudManNotify (aFsm, KContextDeleteEvent, aErrorCode);
       
    49 		return KErrNone;			
       
    50 	case SpudMan::EContextDelete:
       
    51 		// already doing this and don't want default action
       
    52 		return KErrInUse;
       
    53 	}
       
    54 
       
    55 	// default error handling
       
    56 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
       
    57 }
       
    58 
       
    59