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 CPhoneConferenceAndWaiting class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include <StringLoader.h> |
|
21 #include <cpephonemodelif.h> |
|
22 #include <featmgr.h> |
|
23 #include <telephonyvariant.hrh> |
|
24 #include "cphoneconferenceandwaiting.h" |
|
25 #include "mphonestatemachine.h" |
|
26 #include "phoneviewcommanddefinitions.h" |
|
27 #include "tphonecmdparamcallheaderdata.h" |
|
28 #include "phonestatedefinitionsgsm.h" |
|
29 #include "phonelogger.h" |
|
30 #include "tphonecmdparamboolean.h" |
|
31 #include "tphonecmdparaminteger.h" |
|
32 #include "tphonecmdparamcallstatedata.h" |
|
33 #include "cphonemainresourceresolver.h" |
|
34 #include "phonerssbase.h" |
|
35 #include "tphonecmdparamglobalnote.h" |
|
36 #include "phoneui.hrh" |
|
37 #include "cphonecenrepproxy.h" |
|
38 #include "mphonestorage.h" |
|
39 |
|
40 // ================= MEMBER FUNCTIONS ======================= |
|
41 |
|
42 // C++ default constructor can NOT contain any code, that |
|
43 // might leave. |
|
44 // |
|
45 CPhoneConferenceAndWaiting::CPhoneConferenceAndWaiting( |
|
46 MPhoneStateMachine* aStateMachine, |
|
47 MPhoneViewCommandHandle* aViewCommandHandle, |
|
48 MPhoneCustomization* aPhoneCustomization ) : |
|
49 CPhoneConference( aStateMachine, aViewCommandHandle, aPhoneCustomization ) |
|
50 { |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------- |
|
54 // CPhoneConferenceAndWaiting::~CPhoneConferenceAndWaiting() |
|
55 // Destructor |
|
56 // (other items were commented in a header). |
|
57 // ----------------------------------------------------------- |
|
58 // |
|
59 CPhoneConferenceAndWaiting::~CPhoneConferenceAndWaiting() |
|
60 { |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------- |
|
64 // CPhoneConferenceAndWaiting::ConstructL() |
|
65 // Constructor |
|
66 // (other items were commented in a header). |
|
67 // ----------------------------------------------------------- |
|
68 // |
|
69 void CPhoneConferenceAndWaiting::ConstructL() |
|
70 { |
|
71 CPhoneConference::ConstructL(); |
|
72 |
|
73 // Fetch ringing call's id from view |
|
74 TPhoneCmdParamCallStateData callStateData; |
|
75 callStateData.SetCallState( EPEStateRinging ); |
|
76 iViewCommandHandle->HandleCommandL( |
|
77 EPhoneViewGetCallIdByState, &callStateData ); |
|
78 iRingingCallId = callStateData.CallId(); |
|
79 } |
|
80 |
|
81 // ----------------------------------------------------------- |
|
82 // CPhoneConferenceAndWaiting::NewL() |
|
83 // Constructor |
|
84 // (other items were commented in a header). |
|
85 // ----------------------------------------------------------- |
|
86 // |
|
87 CPhoneConferenceAndWaiting* CPhoneConferenceAndWaiting::NewL( |
|
88 MPhoneStateMachine* aStateMachine, |
|
89 MPhoneViewCommandHandle* aViewCommandHandle, |
|
90 MPhoneCustomization* aPhoneCustomization ) |
|
91 { |
|
92 CPhoneConferenceAndWaiting* self = new( ELeave ) CPhoneConferenceAndWaiting( |
|
93 aStateMachine, aViewCommandHandle, aPhoneCustomization ); |
|
94 |
|
95 CleanupStack::PushL( self ); |
|
96 self->ConstructL(); |
|
97 CleanupStack::Pop( self ); |
|
98 |
|
99 return self; |
|
100 } |
|
101 |
|
102 // ----------------------------------------------------------- |
|
103 // CPhoneConferenceAndWaiting::HandlePhoneEngineMessageL |
|
104 // ----------------------------------------------------------- |
|
105 // |
|
106 void CPhoneConferenceAndWaiting::HandlePhoneEngineMessageL( |
|
107 const TInt aMessage, |
|
108 TInt aCallId ) |
|
109 { |
|
110 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandlePhoneEngineMessageL()"); |
|
111 switch ( aMessage ) |
|
112 { |
|
113 case MEngineMonitor::EPEMessageIdle: |
|
114 HandleIdleL( aCallId ); |
|
115 break; |
|
116 |
|
117 case MEngineMonitor::EPEMessageConnected: |
|
118 HandleConnectedL( aCallId ); |
|
119 break; |
|
120 |
|
121 case MEngineMonitor::EPEMessageDialing: |
|
122 HandleDiallingL( aCallId ); |
|
123 break; |
|
124 |
|
125 case MEngineMonitor::EPEMessageConferenceIdle: |
|
126 HandleConferenceIdleL(); |
|
127 break; |
|
128 |
|
129 case MEngineMonitor::EPEMessageWentOneToOne: |
|
130 HandleWentOneToOneL( aCallId ); |
|
131 break; |
|
132 |
|
133 case MEngineMonitor::EPEMessageHeldConference: |
|
134 case MEngineMonitor::EPEMessageConnectedConference: |
|
135 { |
|
136 TPhoneCmdParamInteger callIdParam; |
|
137 iViewCommandHandle->ExecuteCommandL( |
|
138 EPhoneViewGetExpandedBubbleCallId, &callIdParam ); |
|
139 |
|
140 CPhoneConference::HandlePhoneEngineMessageL( aMessage, |
|
141 aCallId ); |
|
142 |
|
143 if ( KConferenceCallId == callIdParam.Integer() ) |
|
144 { |
|
145 iViewCommandHandle->ExecuteCommand(EPhoneSetConferenceExpanded); |
|
146 } |
|
147 } |
|
148 break; |
|
149 |
|
150 default: |
|
151 CPhoneConference::HandlePhoneEngineMessageL( aMessage, |
|
152 aCallId ); |
|
153 break; |
|
154 } |
|
155 } |
|
156 |
|
157 // -------------------------------------------------------------- |
|
158 // CPhoneConferenceAndWaiting::HandleKeyMessageL |
|
159 // -------------------------------------------------------------- |
|
160 // |
|
161 void CPhoneConferenceAndWaiting::HandleKeyMessageL( |
|
162 TPhoneKeyEventMessages aMessage, |
|
163 TKeyCode aCode ) |
|
164 { |
|
165 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleKeyMessageL()"); |
|
166 switch ( aCode ) |
|
167 { |
|
168 // send-key |
|
169 case EKeyYes: |
|
170 if( IsNumberEntryVisibleL() ) |
|
171 { |
|
172 CallFromNumberEntryL(); |
|
173 } |
|
174 else |
|
175 { |
|
176 // Number entry is below incoming call bubble so |
|
177 // answer the call |
|
178 iStateMachine->SendPhoneEngineMessage( |
|
179 MPEPhoneModel::EPEMessageAnswer ); |
|
180 } |
|
181 break; |
|
182 |
|
183 default: |
|
184 // do base operation |
|
185 CPhoneConference::HandleKeyMessageL( aMessage, aCode ); |
|
186 break; |
|
187 } |
|
188 } |
|
189 |
|
190 // ----------------------------------------------------------- |
|
191 // CPhoneConferenceAndWaiting::HandleKeyEventL |
|
192 // ----------------------------------------------------------- |
|
193 // |
|
194 void CPhoneConferenceAndWaiting::HandleKeyEventL( |
|
195 const TKeyEvent& aKeyEvent, |
|
196 TEventCode /*aEventCode*/ ) |
|
197 { |
|
198 if( EKeyDeviceF == aKeyEvent.iCode ) |
|
199 { |
|
200 __PHONELOG( EBasic, EPhoneUIStates, |
|
201 "CPhoneConferenceAndWaiting::HandleKeyMessageL-deviceF" ); |
|
202 HandleHoldSwitchL(); |
|
203 } |
|
204 } |
|
205 |
|
206 // ----------------------------------------------------------- |
|
207 // CPhoneConferenceAndWaiting::OpenMenuBarL |
|
208 // ----------------------------------------------------------- |
|
209 // |
|
210 void CPhoneConferenceAndWaiting::OpenMenuBarL() |
|
211 { |
|
212 __LOGMETHODSTARTEND(EPhoneUIStates, |
|
213 "CPhoneConferenceAndWaiting::OpenMenuBarL()"); |
|
214 |
|
215 TInt resourceId( EPhoneConfAndCallWaitingMenubar ); |
|
216 |
|
217 if( IsNumberEntryVisibleL() ) |
|
218 { |
|
219 resourceId = EPhoneConfAndCallWaitingMenubarWithNumberEntry; |
|
220 } |
|
221 else if ( IsConferenceBubbleInSelectionMode() ) |
|
222 { |
|
223 resourceId = EPhoneConfCallParticipantsMenubar; |
|
224 } |
|
225 |
|
226 TPhoneCmdParamInteger integerParam; |
|
227 integerParam.SetInteger( |
|
228 CPhoneMainResourceResolver::Instance()-> |
|
229 ResolveResourceID( resourceId ) ); |
|
230 |
|
231 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, |
|
232 &integerParam ); |
|
233 } |
|
234 |
|
235 // ----------------------------------------------------------- |
|
236 // CPhoneConferenceAndWaiting::HandleConnectedL |
|
237 // ----------------------------------------------------------- |
|
238 // |
|
239 void CPhoneConferenceAndWaiting::HandleConnectedL( TInt aCallId ) |
|
240 { |
|
241 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConnectedL()"); |
|
242 TPhoneCmdParamCallStateData callStateData; |
|
243 |
|
244 if ( iRingingCallId == KErrNotFound ) |
|
245 { |
|
246 // Fetch ringing call's id from view |
|
247 TPhoneCmdParamCallStateData callStateData; |
|
248 callStateData.SetCallState( EPEStateRinging ); |
|
249 iViewCommandHandle->HandleCommandL( |
|
250 EPhoneViewGetCallIdByState, &callStateData ); |
|
251 iRingingCallId = callStateData.CallId(); |
|
252 } |
|
253 |
|
254 if ( iRingingCallId == aCallId ) |
|
255 { |
|
256 // not a member of conference call |
|
257 MakeStateTransitionToConferenceAndSingleL( aCallId ); |
|
258 } |
|
259 else |
|
260 { |
|
261 // member of conference call which is on hold |
|
262 TPhoneCmdParamCallHeaderData callHeaderParam; |
|
263 callHeaderParam.SetCallState( EPEStateConnected ); |
|
264 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
|
265 &callHeaderParam ); |
|
266 } |
|
267 } |
|
268 |
|
269 // ----------------------------------------------------------- |
|
270 // CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL |
|
271 // ----------------------------------------------------------- |
|
272 // |
|
273 void CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL( TInt aCallId ) |
|
274 { |
|
275 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL()"); |
|
276 |
|
277 if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) |
|
278 && iStateMachine->PhoneStorage()->IsScreenLocked() ) |
|
279 { |
|
280 EnableCallUIL(); |
|
281 } |
|
282 |
|
283 // Reset blocked keys list |
|
284 iStateMachine->PhoneStorage()->ResetBlockedKeysList(); |
|
285 |
|
286 // Effect is shown when dialer exist. |
|
287 TBool effectStarted ( EFalse ); |
|
288 if ( !NeedToSendToBackgroundL() ) |
|
289 { |
|
290 BeginTransEffectLC( ENumberEntryOpen ); |
|
291 effectStarted = ETrue; |
|
292 } |
|
293 |
|
294 BeginUiUpdateLC(); |
|
295 |
|
296 UpdateRemoteInfoDataL ( aCallId ); |
|
297 |
|
298 if ( IsConferenceBubbleInSelectionMode() ) |
|
299 { |
|
300 CloseSelectionListL(); |
|
301 } |
|
302 |
|
303 // Show bubble |
|
304 TPhoneCmdParamCallHeaderData callHeaderParam; |
|
305 callHeaderParam.SetCallState( EPEStateConnected ); |
|
306 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
|
307 &callHeaderParam ); |
|
308 |
|
309 |
|
310 if ( IsNumberEntryUsedL() ) |
|
311 { |
|
312 if ( NeedToSendToBackgroundL() ) |
|
313 { |
|
314 // Return phone to the background if send to background is needed. |
|
315 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
|
316 |
|
317 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
318 } |
|
319 else |
|
320 { |
|
321 // Show the number entry if it exists. |
|
322 SetNumberEntryVisibilityL(ETrue); |
|
323 } |
|
324 } |
|
325 else |
|
326 { |
|
327 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
|
328 // If numberentry is not open just check NeedToSendToBackgroundL and |
|
329 // sendbackround if needed. |
|
330 } |
|
331 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
|
332 SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate ); |
|
333 |
|
334 EndUiUpdate(); |
|
335 if( effectStarted ) |
|
336 { |
|
337 EndTransEffect(); |
|
338 } |
|
339 // CBA updates in above if-else conditions |
|
340 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
|
341 } |
|
342 |
|
343 // ----------------------------------------------------------- |
|
344 // CPhoneConferenceAndWaiting::HandleIdleL |
|
345 // ----------------------------------------------------------- |
|
346 // |
|
347 void CPhoneConferenceAndWaiting::HandleIdleL( TInt aCallId ) |
|
348 { |
|
349 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleIdleL()"); |
|
350 |
|
351 if ( iRingingCallId == KErrNotFound ) |
|
352 { |
|
353 // Fetch ringing call's id from view |
|
354 TPhoneCmdParamCallStateData callStateData; |
|
355 callStateData.SetCallState( EPEStateRinging ); |
|
356 iViewCommandHandle->HandleCommandL( |
|
357 EPhoneViewGetCallIdByState, &callStateData ); |
|
358 iRingingCallId = callStateData.CallId(); |
|
359 } |
|
360 |
|
361 if( iRingingCallId == aCallId ) |
|
362 { |
|
363 // Effect is shown when dialer exist. |
|
364 TBool effectStarted ( EFalse ); |
|
365 if ( !NeedToSendToBackgroundL() ) |
|
366 { |
|
367 BeginTransEffectLC( ENumberEntryOpen ); |
|
368 effectStarted = ETrue; |
|
369 } |
|
370 |
|
371 BeginUiUpdateLC(); |
|
372 |
|
373 // Idle message came for waiting call |
|
374 // Close menu bar, if it is displayed |
|
375 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
376 |
|
377 // Remove call |
|
378 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
|
379 |
|
380 if ( IsNumberEntryUsedL() ) |
|
381 { |
|
382 if ( NeedToSendToBackgroundL() ) |
|
383 { |
|
384 // Return phone to the background if send to background is needed. |
|
385 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
|
386 |
|
387 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
|
388 |
|
389 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
390 } |
|
391 else |
|
392 { |
|
393 // Show the number entry if it exists. |
|
394 SetNumberEntryVisibilityL(ETrue); |
|
395 } |
|
396 } |
|
397 else |
|
398 { |
|
399 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
400 // If numberentry is not open just check NeedToSendToBackgroundL and |
|
401 // sendbackround if needed. |
|
402 if ( NeedToSendToBackgroundL() ) |
|
403 { |
|
404 // Return phone to the background if send to background is needed. |
|
405 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
|
406 } |
|
407 } |
|
408 |
|
409 if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) |
|
410 && iStateMachine->PhoneStorage()->IsScreenLocked() ) |
|
411 { |
|
412 EnableCallUIL(); |
|
413 } |
|
414 |
|
415 // Reset blocked keys list |
|
416 iStateMachine->PhoneStorage()->ResetBlockedKeysList(); |
|
417 |
|
418 if ( iViewCommandHandle->HandleCommandL( EPhoneViewIsConferenceInExpandedMode ) |
|
419 == EPhoneViewResponseSuccess ) |
|
420 { |
|
421 SetTouchPaneButtons( EPhoneParticipantListButtons ); |
|
422 } |
|
423 else |
|
424 { |
|
425 SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
426 } |
|
427 EndUiUpdate(); |
|
428 if ( effectStarted ) |
|
429 { |
|
430 EndTransEffect(); |
|
431 } |
|
432 |
|
433 // Go to conference state |
|
434 // CBA updates in above if-else conditions |
|
435 iStateMachine->ChangeState( EPhoneStateConference ); |
|
436 } |
|
437 else |
|
438 { |
|
439 // Idle message came for conference member |
|
440 CPhoneConference::HandleIdleL( aCallId ); |
|
441 |
|
442 TPhoneCmdParamBoolean conferenceBubbleExists; |
|
443 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
|
444 &conferenceBubbleExists ); |
|
445 |
|
446 if( !conferenceBubbleExists.Boolean() ) |
|
447 { |
|
448 HandleConferenceIdleL(); |
|
449 } |
|
450 } |
|
451 } |
|
452 |
|
453 // ----------------------------------------------------------- |
|
454 // CPhoneConferenceAndWaiting::HandleConferenceIdleL |
|
455 // ----------------------------------------------------------- |
|
456 // |
|
457 void CPhoneConferenceAndWaiting::HandleConferenceIdleL() |
|
458 { |
|
459 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConferenceIdleL()"); |
|
460 |
|
461 BeginTransEffectLC( ENumberEntryOpen ); |
|
462 BeginUiUpdateLC(); |
|
463 |
|
464 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
|
465 |
|
466 TPhoneCmdParamInteger activeCallCount; |
|
467 iViewCommandHandle->ExecuteCommandL( |
|
468 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
|
469 |
|
470 // Close menu bar, if it is displayed |
|
471 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
472 |
|
473 switch( activeCallCount.Integer() ) |
|
474 { |
|
475 case ENoActiveCalls: |
|
476 // Go to incoming state |
|
477 { |
|
478 // Display ringing bubble |
|
479 TPhoneCmdParamCallHeaderData callHeaderParam; |
|
480 callHeaderParam.SetCallState( EPEStateRinging ); |
|
481 |
|
482 // Set Hold flag to view |
|
483 TPhoneCmdParamBoolean holdFlag; |
|
484 holdFlag.SetBoolean( EFalse ); |
|
485 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
486 |
|
487 // Bring up callhandling view |
|
488 BringIncomingToForegroundL(); |
|
489 |
|
490 SetCallHeaderTextsForCallComingInL( iRingingCallId, EFalse, &callHeaderParam ); |
|
491 |
|
492 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, |
|
493 iRingingCallId ,&callHeaderParam ); |
|
494 iCbaManager->UpdateIncomingCbaL( iRingingCallId ); |
|
495 UpdateSilenceButtonDimming(); |
|
496 |
|
497 // Hide number entry if visible |
|
498 if ( IsNumberEntryVisibleL() ) |
|
499 { |
|
500 SetNumberEntryVisibilityL(EFalse); |
|
501 } |
|
502 |
|
503 // Check if HW Keys or Call UI should be disabled |
|
504 CheckDisableHWKeysAndCallUIL(); |
|
505 |
|
506 SetTouchPaneButtons( EPhoneIncomingCallButtons ); |
|
507 SetTouchPaneButtonEnabled( EPhoneCallComingCmdSilent ); |
|
508 SetRingingTonePlaybackL( iRingingCallId ); |
|
509 SetToolbarDimming( ETrue ); |
|
510 SetBackButtonActive(EFalse); |
|
511 iStateMachine->ChangeState( EPhoneStateIncoming ); |
|
512 break; |
|
513 } |
|
514 |
|
515 case EOneActiveCall: |
|
516 if ( IsNumberEntryUsedL() ) |
|
517 { |
|
518 // Show the number entry if it exists |
|
519 SetNumberEntryVisibilityL(ETrue); |
|
520 } |
|
521 // Go to waiting in single state |
|
522 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
523 |
|
524 // Check if HW Keys or Call UI should be disabled |
|
525 CheckDisableHWKeysAndCallUIL(); |
|
526 |
|
527 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
528 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
|
529 break; |
|
530 |
|
531 case ETwoActiveCalls: |
|
532 if ( IsNumberEntryUsedL() ) |
|
533 { |
|
534 // Show the number entry if it exists |
|
535 SetNumberEntryVisibilityL(ETrue); |
|
536 } |
|
537 // Go to two singles and waiting state |
|
538 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
539 |
|
540 // Check if HW Keys or Call UI should be disabled |
|
541 CheckDisableHWKeysAndCallUIL(); |
|
542 |
|
543 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
544 |
|
545 iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
|
546 break; |
|
547 default: |
|
548 // Too many active calls to handle reliable state change now. |
|
549 // Waiting for all conference member idles |
|
550 // This case may happen when 'End all calls' because conferenceIdle may |
|
551 // come earlier than idle for conference member |
|
552 break; |
|
553 } |
|
554 EndUiUpdate(); |
|
555 EndTransEffect(); |
|
556 } |
|
557 |
|
558 // ----------------------------------------------------------- |
|
559 // CPhoneConferenceAndWaiting::UpdateInCallCbaL |
|
560 // ----------------------------------------------------------- |
|
561 // |
|
562 void CPhoneConferenceAndWaiting::UpdateInCallCbaL() |
|
563 { |
|
564 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::UpdateInCallCbaL() "); |
|
565 UpdateCbaL ( EPhoneCallHandlingCallWaitingCBA ); |
|
566 } |
|
567 |
|
568 // ----------------------------------------------------------- |
|
569 // CPhoneConferenceAndWaiting::HandleDiallingL |
|
570 // ----------------------------------------------------------- |
|
571 // |
|
572 void CPhoneConferenceAndWaiting::HandleDiallingL( TInt aCallId ) |
|
573 { |
|
574 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
575 "CPhoneConferenceAndWaiting::HandleDiallingL()"); |
|
576 |
|
577 BeginTransEffectLC( ENumberEntryClose ); |
|
578 BeginUiUpdateLC(); |
|
579 // Hide number entry if it exists |
|
580 SetNumberEntryVisibilityL(EFalse); |
|
581 |
|
582 // Display call setup |
|
583 DisplayCallSetupL( aCallId ); |
|
584 |
|
585 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
|
586 |
|
587 EndUiUpdate(); |
|
588 EndTransEffect(); |
|
589 |
|
590 // Update conference and waiting and call setup softkeys |
|
591 UpdateCbaL( EPhoneCallHandlingCallSetupCBA ); |
|
592 |
|
593 // Go to conference and waiting and call setup state |
|
594 iStateMachine->ChangeState( EPhoneStateConferenceAndWaitingAndCallSetup ); |
|
595 } |
|
596 |
|
597 // ----------------------------------------------------------- |
|
598 // CPhoneConferenceAndWaiting::HandleWentOneToOneL |
|
599 // ----------------------------------------------------------- |
|
600 // |
|
601 void CPhoneConferenceAndWaiting::HandleWentOneToOneL( TInt aCallId ) |
|
602 { |
|
603 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
604 "CPhoneConferenceAndWaiting::HandleWentOneToOneL()"); |
|
605 |
|
606 BeginUiUpdateLC(); |
|
607 |
|
608 // Update conference bubble |
|
609 iViewCommandHandle->ExecuteCommandL( |
|
610 EPhoneViewPrivateFromConference, aCallId ); |
|
611 |
|
612 if ( iRingingCallId == KErrNotFound ) |
|
613 { |
|
614 // Fetch ringing call's id from view |
|
615 TPhoneCmdParamCallStateData callStateData; |
|
616 callStateData.SetCallState( EPEStateRinging ); |
|
617 iViewCommandHandle->HandleCommandL( |
|
618 EPhoneViewGetCallIdByState, &callStateData ); |
|
619 iRingingCallId = callStateData.CallId(); |
|
620 } |
|
621 |
|
622 TPhoneCmdParamBoolean conferenceBubbleExists; |
|
623 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
|
624 &conferenceBubbleExists ); |
|
625 if( conferenceBubbleExists.Boolean() && |
|
626 ( iRingingCallId != KErrNotFound ) ) |
|
627 { |
|
628 // Set touch controls |
|
629 SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer ); |
|
630 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
631 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
632 // Go to Conference And Single And Waiting state |
|
633 iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting ); |
|
634 } |
|
635 |
|
636 EndUiUpdate(); |
|
637 } |
|
638 |
|
639 // ----------------------------------------------------------- |
|
640 // CPhoneConferenceAndWaiting::HandleCommandL |
|
641 // ----------------------------------------------------------- |
|
642 // |
|
643 TBool CPhoneConferenceAndWaiting::HandleCommandL( TInt aCommand ) |
|
644 { |
|
645 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
646 "CPhoneConferenceAndWaiting::HandleCommandL() "); |
|
647 TBool commandStatus = ETrue; |
|
648 |
|
649 switch( aCommand ) |
|
650 { |
|
651 case EPhoneCmdUpdateUiControls: |
|
652 UpdateUiControlsL(); |
|
653 break; |
|
654 |
|
655 default: |
|
656 commandStatus = CPhoneConference::HandleCommandL( aCommand ); |
|
657 break; |
|
658 } |
|
659 |
|
660 return commandStatus; |
|
661 } |
|
662 |
|
663 // ----------------------------------------------------------- |
|
664 // CPhoneConferenceAndWaiting::UpdateUiControlsL |
|
665 // ----------------------------------------------------------- |
|
666 // |
|
667 void CPhoneConferenceAndWaiting::UpdateUiControlsL() |
|
668 { |
|
669 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::UpdateUiControlsL( ) "); |
|
670 iViewCommandHandle->ExecuteCommand(EPhoneSetConferenceExpanded); |
|
671 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
672 } |
|
673 |
|
674 // End of File |
|