1 // Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
18 /** |
18 /** |
19 @file |
19 @file |
20 @internalComponent |
20 @internalComponent |
21 */ |
21 */ |
22 |
22 |
23 |
|
24 |
|
25 #include "OstTraceDefinitions.h" |
|
26 #ifdef OST_TRACE_COMPILER_IN_USE |
|
27 #include "tpdpstateinitialisedTraces.h" |
|
28 #endif |
|
29 |
|
30 #include <networking/umtsnifcontrolif.h> |
23 #include <networking/umtsnifcontrolif.h> |
31 #include "tpdpstates.h" |
24 #include "tpdpstates.h" |
|
25 #include "spudfsmdebuglogger.h" |
32 #include "pdpfsmnmspace.h" |
26 #include "pdpfsmnmspace.h" |
33 #include "cpdpfsm.h" |
27 #include "cpdpfsm.h" |
34 #include "cpdpfsmfactory.h" |
28 #include "cpdpfsmfactory.h" |
35 #include "eteldrivernmspace.h" |
29 #include "eteldrivernmspace.h" |
36 using namespace SpudMan; |
30 using namespace SpudMan; |
37 |
31 |
38 TInt TPdpStateInitialised::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode) |
32 TInt TPdpStateInitialised::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode) |
39 { |
33 { |
40 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_1, ">>TPdpStateInitialised::Input()"); |
34 SPUDFSMVERBOSE_FNLOG("TPdpStateInitialised::Input()"); |
41 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_2, "aOperation : %S(%d)", *(LogOperation(aFsm, aOperation)), aOperation); |
35 SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation); |
42 |
36 |
43 switch (aOperation) |
37 switch (aOperation) |
44 { |
38 { |
45 case SpudMan::ECreatePrimaryPDPContext: |
39 case SpudMan::ECreatePrimaryPDPContext: |
46 aFsm.iContextType = SpudMan::EPrimary; |
40 aFsm.iContextType = SpudMan::EPrimary; |
54 else // just create the primary |
48 else // just create the primary |
55 { |
49 { |
56 aFsm.ChangeStateToCreatingPrimary(); |
50 aFsm.ChangeStateToCreatingPrimary(); |
57 EtelDriverInput (aFsm, EtelDriver::ECreate1ryPdpContext); |
51 EtelDriverInput (aFsm, EtelDriver::ECreate1ryPdpContext); |
58 } |
52 } |
59 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_3, "<<TPdpStateInitialised::Input()"); |
53 |
60 return KErrNone; |
54 return KErrNone; |
61 case SpudMan::ECreateSecondaryPDPContext: |
55 case SpudMan::ECreateSecondaryPDPContext: |
62 aFsm.ChangeStateToCreatingSecondary(); |
56 aFsm.ChangeStateToCreatingSecondary(); |
63 |
57 |
64 aFsm.iContextType = SpudMan::ESecondary; |
58 aFsm.iContextType = SpudMan::ESecondary; |
65 |
59 |
66 EtelDriverInput (aFsm, EtelDriver::ECreate2ryPdpContext); |
60 EtelDriverInput (aFsm, EtelDriver::ECreate2ryPdpContext); |
67 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_4, "<<TPdpStateInitialised::Input()"); |
61 |
68 return KErrNone; |
62 return KErrNone; |
69 |
63 |
70 |
64 |
71 case SpudMan::ECreateMbmsPDPContext: |
65 case SpudMan::ECreateMbmsPDPContext: |
72 aFsm.ChangeStateToCreatingMbms(); |
66 aFsm.ChangeStateToCreatingMbms(); |
73 aFsm.iContextType = SpudMan::EMbms; |
67 aFsm.iContextType = SpudMan::EMbms; |
74 EtelDriverInput (aFsm, EtelDriver::ECreateMbmsPdpContext); |
68 EtelDriverInput (aFsm, EtelDriver::ECreateMbmsPdpContext); |
75 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_5, "<<TPdpStateInitialised::Input()"); |
|
76 return KErrNone; |
69 return KErrNone; |
77 |
70 |
78 // these stop the default actions which aren't of value in the Initialised state, although we |
71 // these stop the default actions which aren't of value in the Initialised state, although we |
79 // do not expect to see these here. |
72 // do not expect to see these here. |
80 case PdpFsm::EContextDeleted: |
73 case PdpFsm::EContextDeleted: |
81 return KErrNone; |
74 return KErrNone; |
82 case PdpFsm::EContextStatusChangeNetwork: |
75 case PdpFsm::EContextStatusChangeNetwork: |
83 if (aFsm.iContextStatus == RPacketContext::EStatusDeleted) |
76 if (aFsm.iContextStatus == RPacketContext::EStatusDeleted) |
84 { |
77 { |
85 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_6, "<<TPdpStateInitialised::Input()"); |
78 return KErrNone; |
86 return KErrNone; |
|
87 } |
79 } |
88 break; |
80 break; |
89 } |
81 } |
90 |
82 |
91 // default error handling |
83 // default error handling |
92 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEINITIALISED_INPUT_7, "<<TPdpStateInitialised::Input()"); |
|
93 return TPdpState::Input(aFsm, aOperation, aErrorCode); |
84 return TPdpState::Input(aFsm, aOperation, aErrorCode); |
94 |
85 |
95 } |
86 } |
96 |
87 |
97 |
88 |