212 // |
197 // |
213 void CPhoneConferenceAndWaitingAndCallSetup::HandleConnectingL( TInt aCallId ) |
198 void CPhoneConferenceAndWaitingAndCallSetup::HandleConnectingL( TInt aCallId ) |
214 { |
199 { |
215 __LOGMETHODSTARTEND( EPhoneUIStates, |
200 __LOGMETHODSTARTEND( EPhoneUIStates, |
216 "CPhoneConferenceAndWaitingAndCallSetup::HandleConnectingL"); |
201 "CPhoneConferenceAndWaitingAndCallSetup::HandleConnectingL"); |
217 |
|
218 BeginUiUpdateLC(); |
202 BeginUiUpdateLC(); |
219 |
|
220 UpdateRemoteInfoDataL ( aCallId ); |
203 UpdateRemoteInfoDataL ( aCallId ); |
221 |
|
222 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
204 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
223 // Re-enable global notes |
205 |
224 TPhoneCmdParamBoolean globalNotifierParam; |
206 TPhoneCmdParamBoolean globalNotifierParam; |
225 globalNotifierParam.SetBoolean( EFalse ); |
207 globalNotifierParam.SetBoolean( EFalse ); |
226 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
208 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
227 &globalNotifierParam ); |
209 &globalNotifierParam ); |
228 |
|
229 // Stop capturing keys |
|
230 CaptureKeysDuringCallNotificationL( EFalse ); |
|
231 |
210 |
232 TPhoneCmdParamCallHeaderData callHeaderParam; |
211 TPhoneCmdParamCallHeaderData callHeaderParam; |
233 callHeaderParam.SetCallState( EPEStateConnecting ); |
212 callHeaderParam.SetCallState( EPEStateConnecting ); |
234 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
213 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
235 &callHeaderParam ); |
214 &callHeaderParam ); |
236 |
215 |
237 // Remove the number entry if it isn't DTMF dialer |
216 if ( !IsNumberEntryVisibleL() ) |
238 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
|
239 { |
217 { |
240 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
218 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
241 } |
219 } |
242 |
220 |
243 EndUiUpdate(); |
221 EndUiUpdate(); |
244 |
222 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
245 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
246 } |
223 } |
247 |
224 |
248 // ----------------------------------------------------------- |
225 // ----------------------------------------------------------- |
249 // CPhoneConferenceAndWaitingAndCallSetup::HandleConnectedL |
226 // CPhoneConferenceAndWaitingAndCallSetup::HandleConnectedL |
250 // ----------------------------------------------------------- |
227 // ----------------------------------------------------------- |
251 // |
228 // |
252 void CPhoneConferenceAndWaitingAndCallSetup::HandleConnectedL( TInt aCallId ) |
229 void CPhoneConferenceAndWaitingAndCallSetup::HandleConnectedL( TInt aCallId ) |
253 { |
230 { |
254 __LOGMETHODSTARTEND( EPhoneUIStates, |
231 __LOGMETHODSTARTEND( EPhoneUIStates, |
255 "CPhoneConferenceAndWaitingAndCallSetup::HandleConnectedL"); |
232 "CPhoneConferenceAndWaitingAndCallSetup::HandleConnectedL"); |
256 |
|
257 BeginUiUpdateLC(); |
233 BeginUiUpdateLC(); |
258 |
|
259 UpdateRemoteInfoDataL ( aCallId ); |
234 UpdateRemoteInfoDataL ( aCallId ); |
260 |
235 |
261 // Show bubble |
|
262 TPhoneCmdParamCallHeaderData callHeaderParam; |
236 TPhoneCmdParamCallHeaderData callHeaderParam; |
263 callHeaderParam.SetCallState( EPEStateConnected ); |
237 callHeaderParam.SetCallState( EPEStateConnected ); |
264 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
238 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
265 &callHeaderParam ); |
239 &callHeaderParam ); |
266 |
240 |
267 // Capturing keys and number entry must be removed because some |
241 if ( !IsNumberEntryVisibleL() ) |
268 // networks jump over connecting state directly to connected state. |
|
269 CaptureKeysDuringCallNotificationL( EFalse ); |
|
270 |
|
271 // Remove the number entry if it isn't DTMF dialer |
|
272 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
|
273 { |
242 { |
274 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
243 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
275 } |
244 } |
276 |
245 |
277 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
246 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
278 EndUiUpdate(); |
247 EndUiUpdate(); |
279 |
|
280 // Go to Conference And Single And Waiting state |
|
281 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
248 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
282 iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting ); |
249 iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting ); |
283 } |
250 } |
284 |
251 |
285 // ----------------------------------------------------------- |
252 // ----------------------------------------------------------- |
286 // CPhoneConferenceAndWaitingAndCallSetup::UpdateConnectingCbaL |
253 // CPhoneConferenceAndWaitingAndCallSetup::UpdateConnectingCbaL |
287 // ----------------------------------------------------------- |
254 // ----------------------------------------------------------- |
288 // |
255 // |
289 void CPhoneConferenceAndWaitingAndCallSetup::UpdateConnectingCbaL() |
256 void CPhoneConferenceAndWaitingAndCallSetup::UpdateConnectingCbaL() |
290 { |
257 { |
291 __LOGMETHODSTARTEND(EPhoneControl, |
258 __LOGMETHODSTARTEND(EPhoneControl, |
292 "CPhoneConferenceAndCallSetup::UpdateInCallCbaL() "); |
259 "CPhoneConferenceAndCallSetup::UpdateInCallCbaL() "); |
293 |
|
294 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
260 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
295 } |
261 } |
296 |
262 |
297 // ----------------------------------------------------------- |
263 // ----------------------------------------------------------- |
298 // CPhoneConferenceAndWaitingAndCallSetup::HandleConferenceIdleL |
264 // CPhoneConferenceAndWaitingAndCallSetup::HandleConferenceIdleL |
300 // |
266 // |
301 void CPhoneConferenceAndWaitingAndCallSetup::HandleConferenceIdleL() |
267 void CPhoneConferenceAndWaitingAndCallSetup::HandleConferenceIdleL() |
302 { |
268 { |
303 __LOGMETHODSTARTEND( EPhoneUIStates, |
269 __LOGMETHODSTARTEND( EPhoneUIStates, |
304 "CPhoneConferenceAndWaitingAndCallSetup::HandleConferenceIdleL"); |
270 "CPhoneConferenceAndWaitingAndCallSetup::HandleConferenceIdleL"); |
305 |
|
306 BeginUiUpdateLC(); |
271 BeginUiUpdateLC(); |
307 |
|
308 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
272 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
309 |
|
310 if ( IsNumberEntryUsedL() ) |
273 if ( IsNumberEntryUsedL() ) |
311 { |
274 { |
312 // Show the number entry if it exists |
|
313 SetNumberEntryVisibilityL(ETrue); |
275 SetNumberEntryVisibilityL(ETrue); |
314 } |
276 } |
315 |
277 |
316 TPhoneCmdParamCallStateData callStateData; |
278 TPhoneCmdParamCallStateData callStateData; |
317 callStateData.SetCallState( EPEStateConnected ); |
279 callStateData.SetCallState( EPEStateConnected ); |
318 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, |
280 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, |
319 &callStateData ); |
281 &callStateData ); |
320 |
282 |
321 if( callStateData.CallId() > KErrNotFound ) |
283 if( callStateData.CallId() > KErrNotFound ) // No need update cba's. |
322 { |
284 { |
323 // Go to Single And Waiting And Call Setup state |
285 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
324 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
|
325 // No need update cbas |
|
326 iStateMachine->ChangeState( EPhoneStateSingleAndCallSetupAndWaiting ); |
286 iStateMachine->ChangeState( EPhoneStateSingleAndCallSetupAndWaiting ); |
327 } |
287 } |
328 else |
288 else |
329 { |
289 { |
330 callStateData.SetCallState( EPEStateHeld ); |
290 callStateData.SetCallState( EPEStateHeld ); |
331 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, |
291 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, |
332 &callStateData ); |
292 &callStateData ); |
|
293 |
333 if( callStateData.CallId() > KErrNotFound ) |
294 if( callStateData.CallId() > KErrNotFound ) |
334 { |
295 { |
335 // Go to Single And Waiting And Call Setup state |
|
336 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
296 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
337 // No need update cbas |
|
338 iStateMachine->ChangeState( EPhoneStateSingleAndCallSetupAndWaiting ); |
297 iStateMachine->ChangeState( EPhoneStateSingleAndCallSetupAndWaiting ); |
339 } |
298 } |
340 else |
299 else |
341 { |
300 { |
342 // Reset Hold flag to view |
301 // Reset Hold flag to view |
343 TPhoneCmdParamBoolean holdFlag; |
302 TPhoneCmdParamBoolean holdFlag; |
344 holdFlag.SetBoolean( EFalse ); |
303 holdFlag.SetBoolean( EFalse ); |
345 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
304 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
346 |
305 |
347 // Go to Call Setup And Waiting state |
|
348 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
306 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
349 |
|
350 // No need update cbas |
|
351 iStateMachine->ChangeState( EPhoneStateCallSetupAndWaiting ); |
307 iStateMachine->ChangeState( EPhoneStateCallSetupAndWaiting ); |
352 } |
308 } |
353 } |
309 } |
354 EndUiUpdate(); |
310 EndUiUpdate(); |
355 } |
311 } |
356 |
312 |
357 // ----------------------------------------------------------- |
313 // ----------------------------------------------------------- |
358 // CPhoneConferenceAndWaitingAndCallSetup::HandleIdleL |
314 // CPhoneConferenceAndWaitingAndCallSetup::HandleIdleL |
359 // ----------------------------------------------------------- |
315 // ----------------------------------------------------------- |
360 // |
316 // |
361 void CPhoneConferenceAndWaitingAndCallSetup::HandleIdleL( TInt aCallId ) |
317 void CPhoneConferenceAndWaitingAndCallSetup::HandleIdleL( TInt aCallId ) |
362 { |
318 { |
363 __LOGMETHODSTARTEND( EPhoneUIStates, |
319 __LOGMETHODSTARTEND( EPhoneUIStates, |
364 "CPhoneConferenceAndWaitingAndCallSetup::HandleIdleL"); |
320 "CPhoneConferenceAndWaitingAndCallSetup::HandleIdleL"); |
365 |
|
366 // Re-enable global notes |
|
367 TPhoneCmdParamBoolean globalNotifierParam; |
321 TPhoneCmdParamBoolean globalNotifierParam; |
368 globalNotifierParam.SetBoolean( EFalse ); |
322 globalNotifierParam.SetBoolean( EFalse ); |
369 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
323 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
370 &globalNotifierParam ); |
324 &globalNotifierParam ); |
371 |
325 |
372 // Stop capturing keys |
|
373 CaptureKeysDuringCallNotificationL( EFalse ); |
|
374 |
|
375 TPhoneCmdParamBoolean conferenceExistsForCallId; |
326 TPhoneCmdParamBoolean conferenceExistsForCallId; |
376 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference, |
327 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference, |
377 aCallId, &conferenceExistsForCallId ); |
328 aCallId, &conferenceExistsForCallId ); |
378 |
329 |
379 if( conferenceExistsForCallId.Boolean() ) |
330 if( conferenceExistsForCallId.Boolean() ) |
380 { |
331 { |
381 // Remove conference member from conference bubble |
332 iViewCommandHandle->ExecuteCommandL( |
382 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveFromConference, |
333 EPhoneViewRemoveFromConference, |
383 aCallId ); |
334 aCallId ); |
384 return; |
335 return; |
385 } |
336 } |
386 else |
337 else |
387 { |
338 { |
388 // Remove call |
|
389 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
339 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
390 |
340 |
391 TPhoneCmdParamBoolean conferenceBubbleExists; |
341 TPhoneCmdParamBoolean conferenceBubbleExists; |
392 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
342 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
393 &conferenceBubbleExists ); |
343 &conferenceBubbleExists ); |
394 if( !conferenceBubbleExists.Boolean() ) |
344 if( !conferenceBubbleExists.Boolean() ) |
395 { |
345 { |
396 // Idle message came for last conference member. |
346 // Idle message came for last conference member. |
397 // Don't do anything, wait for ConferenceIdle message |
347 // Don't do anything, wait for ConferenceIdle message |
398 } |
348 } |
399 else |
349 else |
400 { |
350 { |
401 BeginUiUpdateLC(); |
351 BeginUiUpdateLC(); |
402 TPhoneCmdParamCallStateData callStateData; |
352 TPhoneCmdParamCallStateData callStateData; |
403 callStateData.SetCallState( EPEStateRinging ); |
353 callStateData.SetCallState( EPEStateRinging ); |
404 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, |
354 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, |
405 &callStateData ); |
355 &callStateData ); |
406 if( callStateData.CallId() > KErrNotFound ) |
356 if( callStateData.CallId() > KErrNotFound ) |
407 { |
357 { |
408 CheckIfRestoreNEContentAfterDtmfDialer(); |
|
409 |
|
410 if ( IsNumberEntryUsedL() ) |
358 if ( IsNumberEntryUsedL() ) |
411 { |
359 { |
412 // Show the number entry if callsetup failed with number busy |
360 // Show the number entry if callsetup failed with number busy |
413 // etc reason. |
361 // etc reason. |
414 SetNumberEntryVisibilityL(ETrue); |
362 SetNumberEntryVisibilityL(ETrue); |
415 } |
363 } |
416 |
|
417 // Go to Conference And Waiting state |
|
418 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
364 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
419 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
365 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
420 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
366 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
421 } |
367 } |
422 else |
368 else |
423 { |
369 { |
424 // Go to Conference And Call Setup state |
|
425 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
370 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
426 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
371 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
427 iStateMachine->ChangeState( EPhoneStateConferenceAndCallSetup ); |
372 iStateMachine->ChangeState( EPhoneStateConferenceAndCallSetup ); |
428 } |
373 } |
429 EndUiUpdate(); |
374 EndUiUpdate(); |
430 } |
375 } |
431 } |
376 } |
432 } |
377 } |
433 |
378 |
434 // End of File |
379 // End of File |