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 "tpdpstateopenTraces.h" |
|
28 #endif |
|
29 |
|
30 #include <etelpckt.h> |
23 #include <etelpckt.h> |
31 #include <networking/umtsnifcontrolif.h> |
24 #include <networking/umtsnifcontrolif.h> |
32 #include "tpdpstates.h" |
25 #include "tpdpstates.h" |
|
26 #include "spudfsmdebuglogger.h" |
33 #include "pdpfsmnmspace.h" |
27 #include "pdpfsmnmspace.h" |
34 #include "PDPFSM.h" |
28 #include "PDPFSM.h" |
35 #include "cpdpfsm.h" |
29 #include "cpdpfsm.h" |
36 |
30 |
37 TInt TPdpStateOpen::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode) |
31 TInt TPdpStateOpen::Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aErrorCode) |
38 { |
32 { |
39 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_1, ">>TPdpStateOpen::Input()"); |
33 SPUDFSMVERBOSE_FNLOG("TPdpStateOpen::Input()"); |
40 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_2, "aOperation : %S(%d)", *(LogOperation(aFsm, aOperation)), aOperation); |
34 SPUDFSMVERBOSE_LOG2(_L("aOperation : %S(%d)"), LogOperation(aFsm, aOperation), aOperation); |
41 |
35 |
42 switch (aOperation) |
36 switch (aOperation) |
43 { |
37 { |
44 case PdpFsm::EQoSProfileChangeNetwork: |
38 case PdpFsm::EQoSProfileChangeNetwork: |
45 // RPacketQoS::TQoSR99_R4Negotiated |
39 // RPacketQoS::TQoSR99_R4Negotiated |
46 SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone); |
40 SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone); |
47 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_3, "<<TPdpStateOpen::Input()"); |
|
48 return KErrNone; |
41 return KErrNone; |
49 case PdpFsm::EConfigGPRSChangeNetwork: |
42 case PdpFsm::EConfigGPRSChangeNetwork: |
50 // //RPacketContext::TContextConfigGPRS |
43 // //RPacketContext::TContextConfigGPRS |
51 SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone); |
44 SpudManNotify (aFsm, KContextParametersChangeEvent, KErrNone); |
52 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_4, "<<TPdpStateOpen::Input()"); |
|
53 return KErrNone; |
45 return KErrNone; |
54 case PdpFsm::EContextStatusChangeNetwork: |
46 case PdpFsm::EContextStatusChangeNetwork: |
55 if (aFsm.iContextStatus == RPacketContext::EStatusSuspended) |
47 if (aFsm.iContextStatus == RPacketContext::EStatusSuspended) |
56 { |
48 { |
57 aFsm.ChangeStateToSuspended(); |
49 aFsm.ChangeStateToSuspended(); |
65 else |
57 else |
66 { |
58 { |
67 // no change in state - the upper layer must change the state if it needs to |
59 // no change in state - the upper layer must change the state if it needs to |
68 SpudManNotify (aFsm, KContextParametersChangeEvent, aErrorCode); |
60 SpudManNotify (aFsm, KContextParametersChangeEvent, aErrorCode); |
69 } |
61 } |
70 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_5, "<<TPdpStateOpen::Input()"); |
|
71 return KErrNone; |
62 return KErrNone; |
72 case SpudMan::EContextDelete: |
63 case SpudMan::EContextDelete: |
73 aFsm.ChangeStateToClosing(); |
64 aFsm.ChangeStateToClosing(); |
74 EtelDriverInput(aFsm, EtelDriver::EContextDelete); |
65 EtelDriverInput(aFsm, EtelDriver::EContextDelete); |
75 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_6, "<<TPdpStateOpen::Input()"); |
|
76 return KErrNone; |
66 return KErrNone; |
77 case SpudMan::EContextQoSSet: |
67 case SpudMan::EContextQoSSet: |
78 aFsm.ChangeStateToChangingQoS(); |
68 aFsm.ChangeStateToChangingQoS(); |
79 EtelDriverInput(aFsm, EtelDriver::ESetQoS); |
69 EtelDriverInput(aFsm, EtelDriver::ESetQoS); |
80 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_7, "<<TPdpStateOpen::Input()"); |
|
81 return KErrNone; |
70 return KErrNone; |
82 case SpudMan::EContextModifyActive: |
71 case SpudMan::EContextModifyActive: |
83 aFsm.ChangeStateToModifingActive(); |
72 aFsm.ChangeStateToModifingActive(); |
84 EtelDriverInput(aFsm, EtelDriver::EModifyActive); |
73 EtelDriverInput(aFsm, EtelDriver::EModifyActive); |
85 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_8, "<<TPdpStateOpen::Input()"); |
|
86 return KErrNone; |
74 return KErrNone; |
87 case SpudMan::EContextTFTModify: |
75 case SpudMan::EContextTFTModify: |
88 aFsm.ChangeStateToChangingTFT(); |
76 aFsm.ChangeStateToChangingTFT(); |
89 EtelDriverInput(aFsm, EtelDriver::EChangeTft); |
77 EtelDriverInput(aFsm, EtelDriver::EChangeTft); |
90 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_9, "<<TPdpStateOpen::Input()"); |
|
91 return KErrNone; |
78 return KErrNone; |
92 case SpudMan::ESuspend: // think this is superfluous - DAN will see at review :) |
79 case SpudMan::ESuspend: // think this is superfluous - DAN will see at review :) |
93 aFsm.ChangeStateToSuspended(); |
80 aFsm.ChangeStateToSuspended(); |
94 SpudManNotify(aFsm, KContextBlockedEvent, KErrNone); |
81 SpudManNotify(aFsm, KContextBlockedEvent, KErrNone); |
95 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_10, "<<TPdpStateOpen::Input()"); |
|
96 return KErrNone; |
82 return KErrNone; |
97 case SpudMan::EMbmsSessionUpdate: |
83 case SpudMan::EMbmsSessionUpdate: |
98 EtelDriverInput(aFsm, EtelDriver::ESessionUpdate); |
84 EtelDriverInput(aFsm, EtelDriver::ESessionUpdate); |
99 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_11, "<<TPdpStateOpen::Input()"); |
|
100 return KErrNone; |
85 return KErrNone; |
101 |
86 |
102 case SpudMan::EMbmsParameterUpdate: |
87 case SpudMan::EMbmsParameterUpdate: |
103 SpudManNotify (aFsm, KContextParametersChangeEvent, aErrorCode); |
88 SpudManNotify (aFsm, KContextParametersChangeEvent, aErrorCode); |
104 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_12, "<<TPdpStateOpen::Input()"); |
|
105 return KErrNone; |
89 return KErrNone; |
106 } |
90 } |
107 |
91 |
108 // default error handling |
92 // default error handling |
109 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TPDPSTATEOPEN_INPUT_13, "<<TPdpStateOpen::Input()"); |
|
110 return TPdpState::Input(aFsm, aOperation, aErrorCode); |
93 return TPdpState::Input(aFsm, aOperation, aErrorCode); |
111 } |
94 } |
112 |
95 |
113 |
96 |