telephonyprotocols/pdplayer/umts/spudfsm/src/tpdpstatesettingtft.cpp
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
child 42 3adadc800673
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 // Setting TFT 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 TPdpStateSettingTFT::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
       
    30 {
       
    31 	SPUDFSMVERBOSE_FNLOG("TPdpStateSettingTFT::Input()");
       
    32 	SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
       
    33 
       
    34 	switch (aOperation)
       
    35 	{
       
    36 	case PdpFsm::ETftSet:
       
    37 		if (aFsm.iContextType != SpudMan::EMbms)
       
    38 			{
       
    39 			aFsm.ChangeStateToCreatedSecondary();
       
    40 			}
       
    41 		else
       
    42 			{
       
    43 			RPacketContext::TContextStatus 		contextStatus;
       
    44 			aFsm.Get(contextStatus);
       
    45 			if (contextStatus == RPacketContext::EStatusActive)
       
    46 				{
       
    47 				aFsm.ChangeStateToOpen();
       
    48 				}
       
    49 			else
       
    50 				{
       
    51 				aFsm.ChangeStateToCreatedMbms();
       
    52 				}
       
    53 			}
       
    54 		SpudManNotify(aFsm, KContextTFTModifiedEvent, KErrNone);
       
    55 		return KErrNone;
       
    56 	case PdpFsm::ETftSetFailed:
       
    57 		if (aFsm.iContextType != SpudMan::EMbms)
       
    58 			{
       
    59 			aFsm.ChangeStateToCreatedSecondary();
       
    60 			}
       
    61 		else
       
    62 			{
       
    63 			aFsm.ChangeStateToCreatedMbms();
       
    64 			}
       
    65 		SpudManNotify(aFsm, KContextTFTModifiedEvent, aErrorCode);
       
    66 		return KErrNone;
       
    67 	}
       
    68 	
       
    69 	// default error handling
       
    70 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
       
    71 }
       
    72 
       
    73