telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstateactivatingsecondary.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 // Activating secondary context 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 TPdpStateActivatingSecondary::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
       
    30 {
       
    31 	SPUDFSMVERBOSE_FNLOG("TPdpStateActivatingSecondary::Input()");
       
    32 	SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
       
    33 
       
    34 	switch (aOperation)
       
    35 	{
       
    36 	case PdpFsm::EPdpActivated:
       
    37 		// When a secondary context is activated, the context status must be updated before sending the activated event
       
    38 		// Normally this change in status is updated by a notify context status change event
       
    39 		aFsm.Set(RPacketContext::EStatusActive);
       
    40 		aFsm.ChangeStateToGettingNegQoS();  // Context was activated, but we don't necessarily have negotiated QoS yet; 
       
    41                        					    // a TSY might wait for a successfull activation to report it to Etel. 
       
    42 		SpudManNotify (aFsm, KContextActivateEvent, KErrNone);
       
    43 		return KErrNone;
       
    44 	case PdpFsm::EPdpActivatedFailed:
       
    45 		SPUDFSMVERBOSE_LOG(_L("*** FAILURE ***"));
       
    46 		aFsm.ChangeStateToCreatedSecondary();
       
    47 		SpudManNotify (aFsm, KContextActivateEvent, aErrorCode);
       
    48 		return KErrNone;
       
    49 	// no default
       
    50 	}
       
    51 
       
    52 	// default error handling
       
    53 	return TPdpState::Input(aFsm, aOperation, aErrorCode);
       
    54 }
       
    55 
       
    56