author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 18 Aug 2010 09:48:26 +0300 | |
changeset 56 | 5bcb308bd24d |
parent 46 | bc5a64e5bc3c |
child 65 | 2a5d4ab426d3 |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2005-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 CPhoneSingleAndCallSetupAndWaiting class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
// INCLUDES |
|
20 |
#include <eikmenub.h> |
|
21 |
#include <eikenv.h> |
|
22 |
#include <StringLoader.h> |
|
23 |
#include <pevirtualengine.h> |
|
24 |
#include <cpephonemodelif.h> |
|
25 |
#include "cphonesingleandcallsetupandwaiting.h" |
|
26 |
#include "mphonestatemachine.h" |
|
27 |
#include "phoneviewcommanddefinitions.h" |
|
28 |
#include "phoneui.hrh" |
|
29 |
#include "cphonemainresourceresolver.h" |
|
30 |
#include "phonerssbase.h" |
|
31 |
#include "cphonestateincall.h" |
|
32 |
#include "tphonecmdparaminteger.h" |
|
33 |
#include "tphonecmdparamboolean.h" |
|
34 |
#include "tphonecmdparamstring.h" |
|
35 |
#include "tphonecmdparamcallheaderdata.h" |
|
36 |
#include "tphonecmdparamglobalnote.h" |
|
37 |
#include "tphonecmdparamcallstatedata.h" |
|
38 |
#include "phonestatedefinitionsgsm.h" |
|
39 |
#include "phonelogger.h" |
|
40 |
||
41 |
enum TTerminatedCall |
|
42 |
{ |
|
43 |
ENull = 0, |
|
44 |
EHold, |
|
45 |
ERinging, |
|
46 |
EAlerting |
|
47 |
}; |
|
48 |
||
49 |
// ================= MEMBER FUNCTIONS ======================= |
|
50 |
||
51 |
// C++ default constructor can NOT contain any code, that |
|
52 |
// might leave. |
|
53 |
// |
|
54 |
CPhoneSingleAndCallSetupAndWaiting::CPhoneSingleAndCallSetupAndWaiting( |
|
55 |
MPhoneStateMachine* aStateMachine, |
|
56 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
57 |
MPhoneCustomization* aPhoneCustomization ) : |
|
58 |
CPhoneGsmInCall( aStateMachine, aViewCommandHandle, aPhoneCustomization ) |
|
59 |
{ |
|
60 |
} |
|
61 |
||
62 |
// ----------------------------------------------------------- |
|
63 |
// CPhoneSingleAndCallSetupAndWaiting::~CPhoneSingleAndCallSetupAndWaiting() |
|
64 |
// Destructor |
|
65 |
// (other items were commented in a header). |
|
66 |
// ----------------------------------------------------------- |
|
67 |
// |
|
68 |
CPhoneSingleAndCallSetupAndWaiting::~CPhoneSingleAndCallSetupAndWaiting() |
|
69 |
{ |
|
70 |
} |
|
71 |
||
72 |
// ----------------------------------------------------------- |
|
73 |
// CPhoneSingleAndCallSetupAndWaiting::ConstructL() |
|
74 |
// Constructor |
|
75 |
// (other items were commented in a header). |
|
76 |
// ----------------------------------------------------------- |
|
77 |
// |
|
78 |
void CPhoneSingleAndCallSetupAndWaiting::ConstructL() |
|
79 |
{ |
|
80 |
CPhoneGsmInCall::ConstructL(); |
|
81 |
||
82 |
TPhoneCmdParamCallStateData callStateData; |
|
83 |
callStateData.SetCallState( EPEStateRinging ); |
|
84 |
iViewCommandHandle->HandleCommandL( |
|
85 |
EPhoneViewGetCallIdByState, &callStateData ); |
|
86 |
iWaitingCallId = callStateData.CallId(); |
|
87 |
} |
|
88 |
||
89 |
// ----------------------------------------------------------- |
|
90 |
// CPhoneSingleAndCallSetupAndWaiting::NewL() |
|
91 |
// Constructor |
|
92 |
// (other items were commented in a header). |
|
93 |
// ----------------------------------------------------------- |
|
94 |
// |
|
95 |
CPhoneSingleAndCallSetupAndWaiting* CPhoneSingleAndCallSetupAndWaiting::NewL( |
|
96 |
MPhoneStateMachine* aStateMachine, |
|
97 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
98 |
MPhoneCustomization* aPhoneCustomization ) |
|
99 |
{ |
|
100 |
CPhoneSingleAndCallSetupAndWaiting* self = new( ELeave ) CPhoneSingleAndCallSetupAndWaiting( |
|
101 |
aStateMachine, aViewCommandHandle, aPhoneCustomization ); |
|
102 |
||
103 |
CleanupStack::PushL( self ); |
|
104 |
self->ConstructL(); |
|
105 |
CleanupStack::Pop( self ); |
|
106 |
||
107 |
return self; |
|
108 |
} |
|
109 |
||
110 |
// -------------------------------------------------------------- |
|
111 |
// CPhoneSingleAndCallSetupAndWaiting::HandleKeyMessageL |
|
112 |
// -------------------------------------------------------------- |
|
113 |
// |
|
114 |
void CPhoneSingleAndCallSetupAndWaiting::HandleKeyMessageL( |
|
115 |
TPhoneKeyEventMessages aMessage, |
|
116 |
TKeyCode aCode ) |
|
117 |
{ |
|
118 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::HandleKeyMessageL() "); |
|
119 |
switch ( aCode ) |
|
120 |
{ |
|
121 |
// send-key |
|
122 |
case EKeyYes: |
|
123 |
if( IsNumberEntryVisibleL() ) |
|
124 |
{ |
|
125 |
CPhoneState::CallFromNumberEntryL(); |
|
126 |
} |
|
127 |
else |
|
128 |
{ |
|
129 |
// Number entry is behind waiting call bubble |
|
130 |
// We can't answer to waiting call in this state |
|
131 |
// so display Not allowed -note. |
|
132 |
CPhoneState::SendGlobalErrorNoteL( |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
133 |
EPhoneNoteTextNotAllowed, ETrue ); |
37 | 134 |
} |
135 |
break; |
|
136 |
||
137 |
// end-key |
|
138 |
case EKeyNo: |
|
139 |
if ( aMessage == EPhoneKeyLongPress ) |
|
140 |
{ |
|
141 |
// Close all connections |
|
142 |
iStateMachine->SendPhoneEngineMessage( |
|
143 |
MPEPhoneModel::EPEMessageTerminateAllConnections ); |
|
144 |
||
145 |
if ( IsNumberEntryContentStored() ) |
|
146 |
{ |
|
147 |
ClearNumberEntryContentCache(); |
|
148 |
} |
|
149 |
||
150 |
if ( CPhoneState::IsNumberEntryUsedL() ) |
|
151 |
{ |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
152 |
// Remove number entry from screen |
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
153 |
iViewCommandHandle->ExecuteCommandL( |
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
154 |
EPhoneViewRemoveNumberEntry ); |
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
155 |
// Do state-specific operation when number entry is cleared |
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
156 |
HandleNumberEntryClearedL(); |
37 | 157 |
} |
158 |
if ( !TopAppIsDisplayedL() ) |
|
159 |
{ |
|
160 |
// Bring app to foreground |
|
161 |
TPhoneCmdParamInteger uidParam; |
|
162 |
uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
163 |
iViewCommandHandle->ExecuteCommandL( |
|
164 |
EPhoneViewBringAppToForeground, &uidParam ); |
|
165 |
} |
|
166 |
} |
|
167 |
else |
|
168 |
{ |
|
169 |
// handle end key |
|
170 |
DisconnectOutgoingCallL(); |
|
171 |
} |
|
172 |
break; |
|
173 |
||
174 |
default: |
|
175 |
// do base operation |
|
176 |
CPhoneGsmInCall::HandleKeyMessageL( aMessage, aCode ); |
|
177 |
break; |
|
178 |
} |
|
179 |
} |
|
180 |
||
181 |
// ----------------------------------------------------------- |
|
182 |
// CPhoneSingleAndCallSetupAndWaiting::HandlePhoneEngineMessageL |
|
183 |
// ----------------------------------------------------------- |
|
184 |
// |
|
185 |
void CPhoneSingleAndCallSetupAndWaiting::HandlePhoneEngineMessageL( |
|
186 |
const TInt aMessage, |
|
187 |
TInt aCallId ) |
|
188 |
{ |
|
189 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::HandlePhoneEngineMessageL() "); |
|
190 |
switch ( aMessage ) |
|
191 |
{ |
|
192 |
case MEngineMonitor::EPEMessageConnecting: |
|
193 |
iAlerting = ETrue; |
|
194 |
HandleConnectingL( aCallId ); |
|
195 |
break; |
|
196 |
||
197 |
case MEngineMonitor::EPEMessageConnected: |
|
198 |
HandleConnectedL( aCallId ); |
|
199 |
break; |
|
200 |
||
201 |
case MEngineMonitor::EPEMessageIdle: |
|
202 |
HandleIdleL( aCallId ); |
|
203 |
break; |
|
204 |
||
205 |
case MEngineMonitor::EPEMessageRemoteBusy: |
|
206 |
// If call setup failed then stop capturing keys. |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
207 |
CaptureKeysDuringCallNotificationL( EFalse ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
208 |
CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
209 |
break; |
37 | 210 |
default: |
211 |
CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
212 |
break; |
|
213 |
} |
|
214 |
} |
|
215 |
||
216 |
||
217 |
// ----------------------------------------------------------- |
|
218 |
// CPhoneSingleAndCallSetupAndWaiting:HandleCommandL |
|
219 |
// ----------------------------------------------------------- |
|
220 |
// |
|
221 |
TBool CPhoneSingleAndCallSetupAndWaiting::HandleCommandL( TInt aCommand ) |
|
222 |
{ |
|
223 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::HandleCommandL() "); |
|
224 |
TBool commandStatus = ETrue; |
|
225 |
||
226 |
switch( aCommand ) |
|
227 |
{ |
|
228 |
// 'End active call' from menu |
|
229 |
case EPhoneInCallCmdEndThisActiveCall: |
|
230 |
DisconnectOutgoingCallL(); |
|
231 |
break; |
|
232 |
||
233 |
// 'End all calls' from menu |
|
234 |
case EPhoneInCallCmdEndAllCalls: |
|
235 |
iStateMachine->SendPhoneEngineMessage( |
|
236 |
MPEPhoneModel::EPEMessageReleaseAll ); |
|
237 |
break; |
|
238 |
||
239 |
case EPhoneDtmfDialerCancel: |
|
240 |
{ |
|
241 |
} |
|
242 |
break; |
|
243 |
||
244 |
default: |
|
245 |
commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
|
246 |
break; |
|
247 |
} |
|
248 |
||
249 |
return commandStatus; |
|
250 |
} |
|
251 |
||
252 |
// ----------------------------------------------------------- |
|
253 |
// CPhoneSingleAndCallSetupAndWaiting:HandleIdleL |
|
254 |
// ----------------------------------------------------------- |
|
255 |
// |
|
256 |
void CPhoneSingleAndCallSetupAndWaiting::HandleIdleL( TInt aCallId ) |
|
257 |
{ |
|
258 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::HandleIdleL() "); |
|
259 |
// Fetch call ids for hold, ringing and alerting bubbles |
|
260 |
TInt holdCallId; |
|
261 |
TInt ringingCallId; |
|
262 |
TInt alertingCallId; |
|
263 |
TPhoneViewResponseId heldResponse; |
|
264 |
TPhoneViewResponseId ringingResponse; |
|
265 |
TPhoneViewResponseId alertingResponse; |
|
266 |
TPhoneCmdParamCallStateData callStateData; |
|
267 |
||
268 |
// Remove call |
|
269 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
|
270 |
||
271 |
callStateData.SetCallState( EPEStateHeld ); |
|
272 |
heldResponse = iViewCommandHandle->HandleCommandL( |
|
273 |
EPhoneViewGetCallIdByState, &callStateData ); |
|
274 |
holdCallId = callStateData.CallId(); |
|
275 |
||
276 |
callStateData.SetCallState( EPEStateRinging ); |
|
277 |
ringingResponse = iViewCommandHandle->HandleCommandL( |
|
278 |
EPhoneViewGetCallIdByState, &callStateData ); |
|
279 |
ringingCallId = callStateData.CallId(); |
|
280 |
||
281 |
callStateData.SetCallState( EPEStateConnecting ); |
|
282 |
alertingResponse = iViewCommandHandle->HandleCommandL( |
|
283 |
EPhoneViewGetCallIdByState, &callStateData ); |
|
284 |
alertingCallId = callStateData.CallId(); |
|
285 |
||
286 |
if( heldResponse != EPhoneViewResponseSuccess || |
|
287 |
ringingResponse != EPhoneViewResponseSuccess || |
|
288 |
alertingResponse != EPhoneViewResponseSuccess ) |
|
289 |
{ |
|
290 |
// Some or all call id fetches were unsuccesfull. |
|
291 |
// Terminate all connections and return to idle state. |
|
292 |
||
293 |
// TBD: Kill all bubbles here |
|
294 |
||
295 |
iStateMachine->SendPhoneEngineMessage( |
|
296 |
MPEPhoneModel::EPEMessageTerminateAllConnections ); |
|
297 |
||
298 |
CPhoneGsmInCall::HandleIdleL( aCallId ); |
|
299 |
return; |
|
300 |
} |
|
301 |
||
302 |
// Find out which call was terminated |
|
303 |
TTerminatedCall terminatedCall = ENull; |
|
304 |
if( holdCallId < 0 ) |
|
305 |
{ |
|
306 |
terminatedCall = EHold; |
|
307 |
} |
|
308 |
else if( ringingCallId < 0 ) |
|
309 |
{ |
|
310 |
terminatedCall = ERinging; |
|
311 |
} |
|
312 |
else if( alertingCallId < 0 ) |
|
313 |
{ |
|
314 |
terminatedCall = EAlerting; |
|
315 |
} |
|
316 |
||
317 |
switch( terminatedCall ) |
|
318 |
{ |
|
319 |
case EHold: |
|
320 |
// Idle message came for hold call |
|
321 |
StateChangeToCallSetupAndWaitingL( aCallId ); |
|
322 |
break; |
|
323 |
||
324 |
case ERinging: |
|
325 |
// Idle message came for ringing call |
|
326 |
StateChangeToSingleAndAlertingL( aCallId ); |
|
327 |
break; |
|
328 |
||
329 |
case EAlerting: |
|
330 |
// Idle message came for alerting call |
|
331 |
StateChangeToSingleAndWaitingL( aCallId ); |
|
332 |
break; |
|
333 |
||
334 |
default: |
|
335 |
break; |
|
336 |
} |
|
337 |
||
338 |
} |
|
339 |
||
340 |
// ----------------------------------------------------------- |
|
341 |
// CPhoneSingleAndCallSetupAndWaiting:HandleConnectingL |
|
342 |
// ----------------------------------------------------------- |
|
343 |
// |
|
344 |
void CPhoneSingleAndCallSetupAndWaiting::HandleConnectingL( TInt aCallId ) |
|
345 |
{ |
|
346 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::HandleConnectingL() "); |
|
347 |
||
348 |
// Remove the number entry if it isn't DTMF dialer |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
349 |
if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
37 | 350 |
{ |
351 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
352 |
} |
|
353 |
||
354 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
|
355 |
||
356 |
// Re-enable global notes |
|
357 |
TPhoneCmdParamBoolean globalNotifierParam; |
|
358 |
globalNotifierParam.SetBoolean( EFalse ); |
|
359 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
360 |
&globalNotifierParam ); |
|
361 |
||
362 |
BeginUiUpdateLC(); |
|
363 |
||
364 |
// Update bubble content |
|
365 |
UpdateRemoteInfoDataL( aCallId ); |
|
366 |
||
367 |
// Update bubble type |
|
368 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
369 |
callHeaderParam.SetCallState( EPEStateConnecting ); |
|
370 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
|
371 |
&callHeaderParam ); |
|
372 |
||
373 |
EndUiUpdate(); |
|
374 |
||
375 |
// Set call waiting cba |
|
376 |
UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
377 |
||
378 |
// Stop key Capture when the phone is connecting |
|
379 |
CaptureKeysDuringCallNotificationL( EFalse ); |
|
380 |
} |
|
381 |
||
382 |
// ----------------------------------------------------------- |
|
383 |
// CPhoneSingleAndCallSetupAndWaiting::HandleConnectedL |
|
384 |
// ----------------------------------------------------------- |
|
385 |
// |
|
386 |
void CPhoneSingleAndCallSetupAndWaiting::HandleConnectedL( TInt aCallId ) |
|
387 |
{ |
|
388 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
389 |
"CPhoneSingleAndCallSetupAndWaiting::HandleConnectedL()"); |
|
390 |
// Keep Phone in the foreground |
|
391 |
TPhoneCmdParamBoolean booleanParam; |
|
392 |
booleanParam.SetBoolean( EFalse ); |
|
393 |
iViewCommandHandle->ExecuteCommandL( |
|
394 |
EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
|
395 |
||
396 |
// Show bubble |
|
397 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
398 |
callHeaderParam.SetCallState( EPEStateConnected ); |
|
399 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
|
400 |
&callHeaderParam ); |
|
401 |
||
402 |
// Capturing keys and number entry must be removed because some |
|
403 |
// networks jump over connecting state directly to connected state. |
|
404 |
CaptureKeysDuringCallNotificationL( EFalse ); |
|
405 |
||
406 |
// Remove the number entry if it isn't DTMF dialer |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
407 |
if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
37 | 408 |
{ |
409 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
410 |
} |
|
411 |
||
412 |
if ( aCallId != iWaitingCallId ) |
|
413 |
{ |
|
414 |
// Alerting call is connected |
|
415 |
StateChangeToTwoSinglesAndWaitingL( aCallId ); |
|
416 |
} |
|
417 |
else |
|
418 |
{ |
|
419 |
// Waiting call is connected while alerting call is disconnecting |
|
420 |
// (manual control sequence '1' + Send). |
|
421 |
StateChangeToTwoSinglesL( aCallId ); |
|
422 |
} |
|
423 |
} |
|
424 |
||
425 |
// ----------------------------------------------------------- |
|
426 |
// CPhoneSingleAndCallSetupAndWaiting:StateChangeToCallSetupAndWaitingL |
|
427 |
// ----------------------------------------------------------- |
|
428 |
// |
|
429 |
void CPhoneSingleAndCallSetupAndWaiting::StateChangeToCallSetupAndWaitingL( TInt aCallId ) |
|
430 |
{ |
|
431 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::StateChangeToCallSetupAndWaitingL() "); |
|
432 |
// Remove call |
|
433 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
|
434 |
||
435 |
// Reset Hold flag to view |
|
436 |
TPhoneCmdParamBoolean holdFlag; |
|
437 |
holdFlag.SetBoolean( EFalse ); |
|
438 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
439 |
||
440 |
BeginUiUpdateLC(); |
|
441 |
||
442 |
SetTouchPaneButtons( EPhoneCallSetupButtons ); |
|
443 |
SetToolbarButtonLoudspeakerEnabled(); |
|
444 |
||
445 |
EndUiUpdate(); |
|
446 |
||
447 |
// Go to Call Setup And Waiting state |
|
448 |
// No need to update cbas |
|
449 |
iStateMachine->ChangeState( EPhoneStateCallSetupAndWaiting ); |
|
450 |
} |
|
451 |
||
452 |
// ----------------------------------------------------------- |
|
453 |
// CPhoneSingleAndCallSetupAndWaiting:StateChangeToSingleAndWaitingL |
|
454 |
// ----------------------------------------------------------- |
|
455 |
// |
|
456 |
void CPhoneSingleAndCallSetupAndWaiting::StateChangeToSingleAndWaitingL( TInt aCallId ) |
|
457 |
{ |
|
458 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::StateChangeToSingleAndWaitingL() "); |
|
459 |
// Remove call |
|
460 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
|
461 |
||
462 |
CheckIfRestoreNEContentAfterDtmfDialer(); |
|
463 |
||
464 |
if ( CPhoneState::IsNumberEntryUsedL() ) |
|
465 |
{ |
|
466 |
// Show number entry |
|
467 |
TPhoneCmdParamBoolean booleanParam; |
|
468 |
booleanParam.SetBoolean( ETrue ); |
|
469 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetNumberEntryVisible, &booleanParam ); |
|
470 |
} |
|
471 |
||
472 |
// Set Hold flag to view |
|
473 |
TPhoneCmdParamBoolean holdFlag; |
|
474 |
holdFlag.SetBoolean( ETrue ); |
|
475 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
476 |
||
477 |
BeginUiUpdateLC(); |
|
478 |
||
479 |
SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
480 |
||
481 |
EndUiUpdate(); |
|
482 |
// Go to Single And Waiting state |
|
483 |
UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
484 |
iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
|
485 |
} |
|
486 |
||
487 |
// ----------------------------------------------------------- |
|
488 |
// CPhoneSingleAndCallSetupAndWaiting:StateChangeToSingleAndAlertingL |
|
489 |
// ----------------------------------------------------------- |
|
490 |
// |
|
491 |
void CPhoneSingleAndCallSetupAndWaiting::StateChangeToSingleAndAlertingL( TInt aCallId ) |
|
492 |
{ |
|
493 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::StateChangeToSingleAndAlertingL() "); |
|
494 |
// Remove call |
|
495 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
|
496 |
||
497 |
// Remove the number entry if it isn't DTMF dialer |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
498 |
if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
37 | 499 |
{ |
500 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
501 |
} |
|
502 |
||
503 |
// Set Hold flag to view EFalse that dtmf menu item not delete |
|
504 |
TPhoneCmdParamBoolean holdFlag; |
|
505 |
holdFlag.SetBoolean( EFalse ); |
|
506 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
507 |
||
508 |
BeginUiUpdateLC(); |
|
509 |
||
510 |
SetTouchPaneButtons( EPhoneCallSetupButtons ); |
|
511 |
||
512 |
EndUiUpdate(); |
|
513 |
// Go to Single And Alerting state |
|
514 |
UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
515 |
iStateMachine->ChangeState( EPhoneStateAlertingInSingle ); |
|
516 |
} |
|
517 |
||
518 |
// ----------------------------------------------------------- |
|
519 |
// CPhoneSingleAndCallSetupAndWaiting::StateChangeToTwoSinglesL |
|
520 |
// ----------------------------------------------------------- |
|
521 |
// |
|
522 |
void CPhoneSingleAndCallSetupAndWaiting::StateChangeToTwoSinglesL( TInt /*aCallId*/ ) |
|
523 |
{ |
|
524 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
525 |
"CPhoneSingleAndCallSetupAndWaiting::StateChangeToTwoSinglesL()"); |
|
526 |
||
527 |
BeginUiUpdateLC(); |
|
528 |
||
529 |
SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
|
530 |
||
531 |
EndUiUpdate(); |
|
532 |
||
533 |
// Go to two singles state |
|
534 |
UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
|
535 |
iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
|
536 |
} |
|
537 |
||
538 |
// ----------------------------------------------------------- |
|
539 |
// CPhoneSingleAndCallSetupAndWaiting::StateChangeToTwoSinglesAndWaitingL |
|
540 |
// ----------------------------------------------------------- |
|
541 |
// |
|
542 |
void CPhoneSingleAndCallSetupAndWaiting::StateChangeToTwoSinglesAndWaitingL( TInt /*aCallId*/ ) |
|
543 |
{ |
|
544 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
545 |
"CPhoneSingleAndCallSetupAndWaiting::StateChangeToTwoSinglesAndWaitingL()"); |
|
546 |
||
547 |
BeginUiUpdateLC(); |
|
548 |
||
549 |
SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
550 |
||
551 |
EndUiUpdate(); |
|
552 |
||
553 |
// Go to two singles state and waiting |
|
554 |
UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
555 |
iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
|
556 |
} |
|
557 |
||
558 |
// ----------------------------------------------------------- |
|
559 |
// CPhoneSingleAndCallSetupAndWaiting::UpdateInCallCbaL |
|
560 |
// ----------------------------------------------------------- |
|
561 |
// |
|
562 |
void CPhoneSingleAndCallSetupAndWaiting::UpdateInCallCbaL() |
|
563 |
{ |
|
564 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
565 |
"CPhoneSingleAndCallSetupAndWaiting::UpdateInCallCbaL() "); |
|
566 |
||
567 |
if ( iAlerting ) |
|
568 |
{ |
|
569 |
UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
570 |
} |
|
571 |
else |
|
572 |
{ |
|
573 |
UpdateCbaL( EPhoneCallHandlingCallSetupCBA ); |
|
574 |
} |
|
575 |
} |
|
576 |
||
577 |
||
578 |
||
579 |
// End of File |