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 // Opening phone 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 "cpdpfsmfactory.h" |
|
28 #include "cpdpfsm.h" |
|
29 #include "PDPFSM.h" |
|
30 |
|
31 TInt TPdpStateOpeningPhone::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode) |
|
32 { |
|
33 SPUDFSMVERBOSE_FNLOG("TPdpStateOpeningPhone::Input()"); |
|
34 SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation); |
|
35 |
|
36 switch (aOperation) |
|
37 { |
|
38 // ETel notifications |
|
39 case PdpFsm::EPhoneOpened: |
|
40 aFsm.ChangeStateToCreatingPrimary(); |
|
41 iPdpFsmFactory->iEtelOpened = ETrue; |
|
42 EtelDriverInput(aFsm, EtelDriver::ECreate1ryPdpContext); |
|
43 return KErrNone; |
|
44 case PdpFsm::EPhoneOpenedFailed: |
|
45 aFsm.ChangeStateToInitialised(); |
|
46 iPdpFsmFactory->iEtelOpened = EFalse; |
|
47 SpudManNotify (aFsm, KPrimaryContextCreated, aErrorCode); |
|
48 return KErrNone; |
|
49 case SpudMan::ECancelContextCreate: |
|
50 aFsm.ChangeStateToStopping(); |
|
51 EtelDriverCancel(aFsm); |
|
52 EtelDriverInput(aFsm, EtelDriver::EContextDelete); |
|
53 return KErrNone; |
|
54 } |
|
55 |
|
56 // default error handling |
|
57 return TPdpState::Input(aFsm, aOperation, aErrorCode); |
|
58 } |
|
59 |
|
60 |
|