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