telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstategettingnegqos.cpp
author hgs
Mon, 28 Jun 2010 17:02:18 +0100
changeset 45 28dbf5a297f4
parent 44 8b72faa1200f
permissions -rw-r--r--
201024_05
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     2
// All rights reserved.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     3
// This component and the accompanying materials are made available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     5
// which accompanies this distribution, and is available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     7
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     8
// Initial Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    10
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    11
// Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    12
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    13
// Description:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    14
// Retrieving Negotiated QoS state
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    15
// 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    16
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    17
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    18
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    19
 @file 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    20
 @internalComponent
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    21
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    22
 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    23
#include <networking/umtsnifcontrolif.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    24
#include "tpdpstates.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    25
#include "spudfsmdebuglogger.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    26
#include "pdpfsmnmspace.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    27
#include "MPdpFsmInterface.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    28
#include "cpdpfsm.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    29
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    30
TInt TPdpStateGettingNegQoS::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    31
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    32
	SPUDFSMVERBOSE_FNLOG("TPdpStateGettingNegQoS::Input()");
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    33
	SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    34
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    35
	switch (aOperation)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    36
	    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    37
    	case SpudMan::EGetNegQoS:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    38
    		EtelDriverInput(aFsm, EtelDriver::ENegQoSGet);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    39
    		return KErrNone;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    40
    		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    41
    	case PdpFsm::EPdpNegQoSRetrieved:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    42
    		SPUDFSMVERBOSE_LOG(_L("*** SUCCESS ***"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    43
    		aFsm.ChangeStateToOpen();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    44
    		SpudManNotify(aFsm, KGetNegQoSEvent, KErrNone);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    45
    		return KErrNone;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    46
    		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    47
    	case PdpFsm::EPdpNegQoSRetrievedFailed:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    48
    		SPUDFSMVERBOSE_LOG(_L("*** FAILURE ***"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    49
    		// As far as everybody is concerned, the context was activated:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    50
    		// This makes it eligible for certain events. 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    51
    		// We have to move to Open state, so that that we can handle any operations
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    52
    		// on the activated PDP context correctly.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    53
    		aFsm.ChangeStateToOpen(); 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    54
    		SpudManNotify(aFsm, KGetNegQoSEvent, aErrorCode);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    55
    		return KErrNone;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    56
    	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    57
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    58
	// default error handling
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    59
	return TPdpState::Input(aFsm, aOperation, aErrorCode);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    60
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    61
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    62
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    63