telephonyprotocols/umtsgprsscpr/spudfsm/src/tpdpstatecreatingSecondary.cpp
author hgs
Thu, 29 Jul 2010 12:12:57 +0100
changeset 56 ab72d5c1d770
parent 44 8b72faa1200f
permissions -rw-r--r--
201029_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
// Creating secondary context 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 "PDPFSM.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 TPdpStateCreatingSecondary::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("TPdpStateCreatingSecondary::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 PdpFsm::E2ryPdpContextCreated:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    38
		aFsm.ChangeStateToCreatedSecondary();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    39
		SpudManNotify(aFsm, KSecondaryContextCreated, KErrNone);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    40
		return KErrNone;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    41
	case PdpFsm::E2ryPdpContextCreatedFailed:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    42
		iErrorCode = aErrorCode;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    43
		EtelDriverInput(aFsm, EtelDriver::EContextDelete);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    44
		return KErrNone;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    45
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    46
	case PdpFsm::EContextDeletedFailed:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    47
		SPUDFSMVERBOSE_LOG(_L("**** DELETE FAILURE ****"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    48
		// fall through
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    49
	case PdpFsm::EContextDeleted:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    50
		aFsm.ChangeStateToInitialised();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    51
		SpudManNotify(aFsm, KSecondaryContextCreated, iErrorCode);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    52
		iErrorCode = KErrNone;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    53
		return KErrNone;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    54
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    55
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    56
	// default error handling
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    57
	return TPdpState::Input(aFsm, aOperation, aErrorCode);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    58
}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    59