|
1 /* |
|
2 * Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of CPEParserSSCallHandler class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "cpemanualcallcontrolhandler.h" |
|
21 #include "cpemessagehandler.h" |
|
22 #include "cpeparsersscallhandler.h" |
|
23 #include "mpephonemodelinternal.h" |
|
24 #include <etel.h> |
|
25 #include <etelmm.h> |
|
26 #include <gsmerror.h> |
|
27 #include <mcceconferencecallobserver.h> |
|
28 #include <mpedatastore.h> |
|
29 #include <talogger.h> |
|
30 |
|
31 |
|
32 // EXTERNAL DATA STRUCTURES |
|
33 // None. |
|
34 |
|
35 // EXTERNAL FUNCTION PROTOTYPES |
|
36 // None. |
|
37 |
|
38 // CONSTANTS |
|
39 // None. |
|
40 |
|
41 // MACROS |
|
42 // None. |
|
43 |
|
44 // LOCAL CONSTANTS AND MACROS |
|
45 // None. |
|
46 |
|
47 // MODULE DATA STRUCTURES |
|
48 // None. |
|
49 |
|
50 // LOCAL FUNCTION PROTOTYPES |
|
51 // None. |
|
52 |
|
53 // FORWARD DECLARATIONS |
|
54 // None. |
|
55 |
|
56 // ============================= LOCAL FUNCTIONS =============================== |
|
57 // None. |
|
58 |
|
59 |
|
60 // ============================ MEMBER FUNCTIONS =============================== |
|
61 |
|
62 // ----------------------------------------------------------------------------- |
|
63 // CPEParserSSCallHandler::CPEParserSSCallHandler |
|
64 // C++ default constructor can NOT contain any code, that |
|
65 // might leave. |
|
66 // ----------------------------------------------------------------------------- |
|
67 // |
|
68 CPEParserSSCallHandler::CPEParserSSCallHandler |
|
69 ( |
|
70 CPEMessageHandler& aOwner, // Reference to owner of this object. |
|
71 MPEPhoneModelInternal& aModel, |
|
72 CPEManualCallControlHandler& aManualCallControlHandler |
|
73 ) : iOwner( aOwner ), |
|
74 iModel( aModel ), |
|
75 iManualCallControlHandler( aManualCallControlHandler ) |
|
76 { |
|
77 } |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // CPEParserSSCallHandler::~CPEParserSSCallHandler |
|
81 // Destructor. |
|
82 // ----------------------------------------------------------------------------- |
|
83 // |
|
84 CPEParserSSCallHandler::~CPEParserSSCallHandler |
|
85 ( |
|
86 // None. |
|
87 ) |
|
88 { |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CPEParserSSCallHandler::ProcessEndCall |
|
93 // End or reject a call. Activate entering string "0" + SEND |
|
94 // If there is waiting call reject it. |
|
95 // If there is not waiting call but tere is held call then end held call. |
|
96 // If there is no waiting or held call then set error code ECCPErrorNotAllowed. |
|
97 // ----------------------------------------------------------------------------- |
|
98 // |
|
99 void CPEParserSSCallHandler::ProcessEndOrRejectL |
|
100 ( |
|
101 // None. |
|
102 ) |
|
103 { |
|
104 TEFLOGSTRING( KTAINT, |
|
105 "PE CPEParserSSCallHandler::ProcessEndOrRejectL: Start" ); |
|
106 |
|
107 iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
108 |
|
109 TInt errorCode = iManualCallControlHandler.HandleChldZero(); |
|
110 iOwner.SetGsmParserErrorCode( errorCode ); |
|
111 |
|
112 iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
113 |
|
114 TEFLOGSTRING( KTAINT, |
|
115 "PE CPEParserSSCallHandler::ProcessEndOrRejectL: Stop" ); |
|
116 } |
|
117 |
|
118 // ----------------------------------------------------------------------------- |
|
119 // CPEParserSSCallHandler::ProcessEndAndAccept |
|
120 // Ends a call and accepts another. Activate entering string "1" + SEND |
|
121 // 1. Check if conference call or voice call is active and release it. |
|
122 // 2. If there is waiting call then answer waiting call. |
|
123 // 3. If there is no waiting and if there is held call then resume held call. |
|
124 // ----------------------------------------------------------------------------- |
|
125 // |
|
126 void CPEParserSSCallHandler::ProcessEndAndAcceptL |
|
127 ( |
|
128 // None. |
|
129 ) |
|
130 { |
|
131 TEFLOGSTRING( KTAINT, |
|
132 "PE CPEParserSSCallHandler::ProcessEndAndAcceptL: Start" ); |
|
133 TInt error( ECCPErrorNotAllowed ); |
|
134 |
|
135 iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
136 |
|
137 error = iManualCallControlHandler.HandleChldOne(); |
|
138 iOwner.SetGsmParserErrorCode( error ); |
|
139 |
|
140 iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
141 |
|
142 TEFLOGSTRING( KTAINT, |
|
143 "PE CPEParserSSCallHandler::ProcessEndAndAcceptL: Stop" ); |
|
144 } |
|
145 |
|
146 // ----------------------------------------------------------------------------- |
|
147 // CPEParserSSCallHandler::ProcessEndCall |
|
148 // End specific active call. Activate entering string "1x" + SEND |
|
149 // ----------------------------------------------------------------------------- |
|
150 // |
|
151 void CPEParserSSCallHandler::ProcessEndCallL |
|
152 ( |
|
153 TInt aCallNo // The number of the call. |
|
154 ) |
|
155 { |
|
156 TEFLOGSTRING( KTAINT,"PE CPEParserSSCallHandler::ProcessEndCallL: Start" ); |
|
157 TInt errorCode( ECCPErrorNotAllowed ); |
|
158 |
|
159 iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
160 |
|
161 TRAP( errorCode, iManualCallControlHandler.HandleChldOneXL( aCallNo ) ); |
|
162 iOwner.SetGsmParserErrorCode( errorCode ); |
|
163 |
|
164 iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
165 |
|
166 TEFLOGSTRING( KTAINT,"PE CPEParserSSCallHandler::ProcessEndCallL: Stop" ); |
|
167 } |
|
168 |
|
169 // ----------------------------------------------------------------------------- |
|
170 // CPEParserSSCallHandler::ProcessSwap |
|
171 // Swaps active and held calls. Activate entering string "2" + SEND. |
|
172 // ----------------------------------------------------------------------------- |
|
173 // |
|
174 void CPEParserSSCallHandler::ProcessSwapL |
|
175 ( |
|
176 // None. |
|
177 ) |
|
178 { |
|
179 TEFLOGSTRING( KTAINT, "PE CPEParserSSCallHandler::ProcessSwapL: Start" ); |
|
180 TInt errorCode( ECCPErrorNotAllowed ); |
|
181 |
|
182 iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
183 |
|
184 errorCode = iManualCallControlHandler.HandleChldTwo(); |
|
185 iOwner.SetGsmParserErrorCode( errorCode ); |
|
186 |
|
187 iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
188 |
|
189 TEFLOGSTRING( KTAINT, "PE: CPEParserSSCallHandler::ProcessSwapL: End" ); |
|
190 } |
|
191 |
|
192 // ----------------------------------------------------------------------------- |
|
193 // CPEParserSSCallHandler::ProcessEndCall |
|
194 // Hold all active calls except specific call. Activate entering string "2x" + SEND. |
|
195 // ----------------------------------------------------------------------------- |
|
196 // |
|
197 void CPEParserSSCallHandler::ProcessHoldAllCallsExceptL |
|
198 ( |
|
199 TInt aCallNo // The number of the call. |
|
200 ) |
|
201 { |
|
202 TEFLOGSTRING( KTAINT, |
|
203 "PE CPEParserSSCallHandler::ProcessHoldAllCallsExceptL: Start" ); |
|
204 TInt errorCode( ECCPErrorNotAllowed ); |
|
205 |
|
206 iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
207 |
|
208 TRAP( errorCode, iManualCallControlHandler.HandleChldTwoXL( aCallNo ) ); |
|
209 iOwner.SetGsmParserErrorCode( errorCode ); |
|
210 |
|
211 iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
212 |
|
213 TEFLOGSTRING( KTAINT, |
|
214 "PE CPEParserSSCallHandler::ProcessHoldAllCallsExceptL: Stop" ); |
|
215 } |
|
216 |
|
217 // ----------------------------------------------------------------------------- |
|
218 // CPEParserSSCallHandler::ProcessJoinL |
|
219 // Build conference call or add new member to conference call. |
|
220 // Activate entering string "3" + SEND. |
|
221 // 1. If there is no conference call then join two calls to conference. |
|
222 // 2. If there is active conference call and held call then add member |
|
223 // (held call) to conference call. |
|
224 // 3. If there is held conference call and active call then add member |
|
225 // (active call) to conference call. |
|
226 // ----------------------------------------------------------------------------- |
|
227 // |
|
228 void CPEParserSSCallHandler::ProcessJoinL |
|
229 ( |
|
230 // None. |
|
231 ) |
|
232 { |
|
233 TEFLOGSTRING( KTAINT, "PE CPEParserSSCallHandler::ProcessJoinL: Start" ); |
|
234 TInt errorCode( ECCPErrorNotAllowed ); |
|
235 |
|
236 iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
237 |
|
238 errorCode = iManualCallControlHandler.HandleChldThree(); |
|
239 iOwner.SetGsmParserErrorCode( errorCode ); |
|
240 |
|
241 iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
242 |
|
243 TEFLOGSTRING( KTAINT, "PE CPEParserSSCallHandler::ProcessJoinL: Stop" ); |
|
244 } |
|
245 |
|
246 // ----------------------------------------------------------------------------- |
|
247 // CPEParserSSCallHandler::ProcessEndCall |
|
248 // Perform explicit call transfer. Activate entering string "4" + SEND. |
|
249 // ----------------------------------------------------------------------------- |
|
250 // |
|
251 void CPEParserSSCallHandler::ProcessExplicitCallTransferL |
|
252 ( |
|
253 // None. |
|
254 ) |
|
255 { |
|
256 TEFLOGSTRING( KTAINT, |
|
257 "PE CPEParserSSCallHandler::ProcessExplicitCallTransferL: Start" ); |
|
258 |
|
259 iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
260 |
|
261 TInt errorCode = iManualCallControlHandler.HandleChldFour(); |
|
262 iOwner.SetGsmParserErrorCode( errorCode ); |
|
263 |
|
264 iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
265 |
|
266 TEFLOGSTRING( KTAINT, |
|
267 "PE CPEParserSSCallHandler::ProcessExplicitCallTransferL: Stop" ); |
|
268 } |
|
269 |
|
270 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
271 // None. |
|
272 |
|
273 // End of File |