50 // (other items were commented in a header). |
50 // (other items were commented in a header). |
51 // ----------------------------------------------------------- |
51 // ----------------------------------------------------------- |
52 // |
52 // |
53 CPhoneConferenceAndCallSetup::~CPhoneConferenceAndCallSetup() |
53 CPhoneConferenceAndCallSetup::~CPhoneConferenceAndCallSetup() |
54 { |
54 { |
|
55 // Need to check iViewCommandHandle validity here to not |
|
56 // trigger a high/can panic error in a Codescanner run. |
|
57 // coverity[var_compare_op] |
|
58 if ( iViewCommandHandle ) |
|
59 { |
|
60 TPhoneCmdParamBoolean dtmfSendFlag; |
|
61 dtmfSendFlag.SetBoolean( EFalse ); |
|
62 TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, |
|
63 &dtmfSendFlag ) ); |
|
64 } |
55 } |
65 } |
56 |
66 |
57 // ----------------------------------------------------------- |
67 // ----------------------------------------------------------- |
58 // CPhoneConferenceAndCallSetup::ConstructL() |
68 // CPhoneConferenceAndCallSetup::ConstructL() |
59 // Constructor |
69 // Constructor |
97 { |
107 { |
98 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::HandlePhoneEngineMessageL()"); |
108 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::HandlePhoneEngineMessageL()"); |
99 switch ( aMessage ) |
109 switch ( aMessage ) |
100 { |
110 { |
101 case MEngineMonitor::EPEMessageConnecting: |
111 case MEngineMonitor::EPEMessageConnecting: |
|
112 { |
102 iAlerting = ETrue; |
113 iAlerting = ETrue; |
103 HandleConnectingL( aCallId ); |
114 HandleConnectingL( aCallId ); |
|
115 } |
104 break; |
116 break; |
105 |
117 |
106 case MEngineMonitor::EPEMessageConnected: |
118 case MEngineMonitor::EPEMessageConnected: |
|
119 { |
107 HandleConnectedL( aCallId ); |
120 HandleConnectedL( aCallId ); |
|
121 } |
108 break; |
122 break; |
109 |
123 |
110 case MEngineMonitor::EPEMessageIdle: |
124 case MEngineMonitor::EPEMessageIdle: |
|
125 { |
111 HandleIdleL( aCallId ); |
126 HandleIdleL( aCallId ); |
|
127 } |
112 break; |
128 break; |
113 |
129 |
114 case MEngineMonitor::EPEMessageConferenceIdle: |
130 case MEngineMonitor::EPEMessageConferenceIdle: |
|
131 { |
115 HandleConferenceIdleL(); |
132 HandleConferenceIdleL(); |
|
133 } |
116 break; |
134 break; |
117 |
135 |
118 default: |
136 default: |
|
137 { |
119 CPhoneConference::HandlePhoneEngineMessageL( aMessage, |
138 CPhoneConference::HandlePhoneEngineMessageL( aMessage, |
120 aCallId ); |
139 aCallId ); |
|
140 } |
121 break; |
141 break; |
122 } |
142 } |
123 } |
143 } |
124 |
144 |
125 // ----------------------------------------------------------- |
145 // ----------------------------------------------------------- |
176 // do base operation |
197 // do base operation |
177 CPhoneConference::HandleKeyMessageL( aMessage, aCode ); |
198 CPhoneConference::HandleKeyMessageL( aMessage, aCode ); |
178 break; |
199 break; |
179 } |
200 } |
180 } |
201 } |
|
202 // ----------------------------------------------------------- |
|
203 // CPhoneConferenceAndCallSetup::OpenMenuBarL |
|
204 // ----------------------------------------------------------- |
|
205 // |
|
206 void CPhoneConferenceAndCallSetup::OpenMenuBarL() |
|
207 { |
|
208 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::OpenMenuBarL()"); |
|
209 TInt resourceId; |
|
210 |
|
211 // Set specific flag to view so that DTMF menu item available |
|
212 TPhoneCmdParamBoolean dtmfSendFlag; |
|
213 dtmfSendFlag.SetBoolean( ETrue ); |
|
214 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, |
|
215 &dtmfSendFlag ); |
|
216 |
|
217 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
218 { |
|
219 resourceId = EPhoneDtmfDialerMenubar; |
|
220 } |
|
221 else if ( IsNumberEntryVisibleL() ) |
|
222 { |
|
223 resourceId = EPhoneAlertingAndConfHeldCallMenuBarWithNumberEntry; |
|
224 } |
|
225 else if ( IsConferenceBubbleInSelectionMode() ) |
|
226 { |
|
227 resourceId = EPhoneConfCallParticipantsDropMenubar; |
|
228 } |
|
229 else |
|
230 { |
|
231 resourceId = EPhoneAlertingAndConfHeldCallMenuBar; |
|
232 } |
|
233 |
|
234 TPhoneCmdParamInteger integerParam; |
|
235 integerParam.SetInteger( |
|
236 CPhoneMainResourceResolver::Instance()-> |
|
237 ResolveResourceID( resourceId ) ); |
|
238 |
|
239 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, |
|
240 &integerParam ); |
|
241 } |
181 |
242 |
182 // ----------------------------------------------------------- |
243 // ----------------------------------------------------------- |
183 // CPhoneConferenceAndCallSetup::HandleConnectingL |
244 // CPhoneConferenceAndCallSetup::HandleConnectingL |
184 // ----------------------------------------------------------- |
245 // ----------------------------------------------------------- |
185 // |
246 // |
201 |
262 |
202 // Stop capturing keys |
263 // Stop capturing keys |
203 CaptureKeysDuringCallNotificationL( EFalse ); |
264 CaptureKeysDuringCallNotificationL( EFalse ); |
204 |
265 |
205 // Remove the number entry if it isn't DTMF dialer |
266 // Remove the number entry if it isn't DTMF dialer |
206 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
267 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() || ! IsDTMFEditorVisibleL() ) |
207 { |
268 { |
208 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
269 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
209 } |
270 } |
210 |
271 |
211 // Set Hold flag to view EFalse that IHF is on RSK not unhold |
272 // Set Hold flag to view EFalse that IHF is on RSK not unhold |
230 // |
291 // |
231 void CPhoneConferenceAndCallSetup::HandleConnectedL( TInt aCallId ) |
292 void CPhoneConferenceAndCallSetup::HandleConnectedL( TInt aCallId ) |
232 { |
293 { |
233 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::HandleConnectedL()"); |
294 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::HandleConnectedL()"); |
234 |
295 |
235 // Keep Phone in the foreground |
296 // Close menu bar, if it is displayed |
236 TPhoneCmdParamBoolean booleanParam; |
297 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
237 booleanParam.SetBoolean( EFalse ); |
298 |
238 iViewCommandHandle->ExecuteCommandL( |
|
239 EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
|
240 |
|
241 BeginUiUpdateLC(); |
299 BeginUiUpdateLC(); |
242 |
300 |
243 // Show bubble |
301 // Show bubble |
244 TPhoneCmdParamCallHeaderData callHeaderParam; |
302 TPhoneCmdParamCallHeaderData callHeaderParam; |
245 callHeaderParam.SetCallState( EPEStateConnected ); |
303 callHeaderParam.SetCallState( EPEStateConnected ); |
249 // Capturing keys and number entry must be removed because some |
307 // Capturing keys and number entry must be removed because some |
250 // networks jump over connecting state directly to connected state. |
308 // networks jump over connecting state directly to connected state. |
251 CaptureKeysDuringCallNotificationL( EFalse ); |
309 CaptureKeysDuringCallNotificationL( EFalse ); |
252 |
310 |
253 // Remove the number entry if it isn't DTMF dialer |
311 // Remove the number entry if it isn't DTMF dialer |
254 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
312 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() || ! IsDTMFEditorVisibleL() ) |
255 { |
313 { |
256 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
314 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
257 } |
315 } |
258 |
316 |
259 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
317 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
|
318 SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate ); |
260 EndUiUpdate(); |
319 EndUiUpdate(); |
261 |
320 |
262 UpdateCbaL ( EPhoneCallHandlingNewCallSwapCBA ); |
321 UpdateCbaL ( EPhoneCallHandlingNewCallSwapCBA ); |
263 |
322 |
264 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
323 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
279 &globalNotifierParam ); |
338 &globalNotifierParam ); |
280 |
339 |
281 // Stop capturing keys |
340 // Stop capturing keys |
282 CaptureKeysDuringCallNotificationL( EFalse ); |
341 CaptureKeysDuringCallNotificationL( EFalse ); |
283 |
342 |
|
343 // Close menu bar, if it is displayed |
|
344 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
345 |
284 TPhoneCmdParamBoolean conferenceExistsForCallId; |
346 TPhoneCmdParamBoolean conferenceExistsForCallId; |
285 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference, |
347 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference, |
286 aCallId, &conferenceExistsForCallId ); |
348 aCallId, &conferenceExistsForCallId ); |
287 |
349 |
288 if( conferenceExistsForCallId.Boolean() ) |
350 if( conferenceExistsForCallId.Boolean() ) |
289 { |
351 { |
290 // Remove 'Conference on hold' global note |
352 // Remove 'Conference on hold' global note |
291 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
353 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
292 |
354 |
293 // Remove conference member from conference bubble |
355 // Remove conference member from conference bubble |
294 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveFromConference, |
356 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveFromConference, |
295 aCallId ); |
357 aCallId ); |
296 |
358 |
310 { |
372 { |
311 iStateMachine->ChangeState( EPhoneStateAlertingInSingle ); |
373 iStateMachine->ChangeState( EPhoneStateAlertingInSingle ); |
312 } |
374 } |
313 else |
375 else |
314 { |
376 { |
315 iStateMachine->ChangeState( EPhoneStateCallSetupInSingle ); |
377 iStateMachine->ChangeState( EPhoneStateCallSetupInSingle ); |
316 } |
378 } |
317 } |
379 } |
318 } |
380 } |
319 else |
381 else |
320 { |
382 { |
321 // Remove outgoing call |
383 // Remove outgoing call |
|
384 BeginTransEffectLC( ENumberEntryOpen ); |
322 BeginUiUpdateLC(); |
385 BeginUiUpdateLC(); |
323 |
|
324 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
386 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
325 |
|
326 CheckIfRestoreNEContentAfterDtmfDialer(); |
387 CheckIfRestoreNEContentAfterDtmfDialer(); |
327 |
|
328 if ( IsNumberEntryUsedL() ) |
388 if ( IsNumberEntryUsedL() ) |
329 { |
389 { |
330 // Show the number entry if it exists |
390 // Show the number entry if it exists |
331 SetNumberEntryVisibilityL(ETrue); |
391 SetNumberEntryVisibilityL(ETrue); |
332 } |
392 } |
333 |
393 |
334 SetTouchPaneButtons( EPhoneConferenceButtons ); |
394 SetTouchPaneButtons( EPhoneConferenceButtons ); |
335 EndUiUpdate(); |
395 EndUiUpdate(); |
336 |
396 EndTransEffect(); |
337 // Go to conference state |
|
338 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
397 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
339 iStateMachine->ChangeState( EPhoneStateConference ); |
398 iStateMachine->ChangeState( EPhoneStateConference ); |
340 } |
399 } |
341 |
400 } |
342 } |
|
343 |
|
344 |
401 |
345 // ----------------------------------------------------------- |
402 // ----------------------------------------------------------- |
346 // CPhoneConferenceAndCallSetup::UpdateInCallCbaL |
403 // CPhoneConferenceAndCallSetup::UpdateInCallCbaL |
347 // ----------------------------------------------------------- |
404 // ----------------------------------------------------------- |
348 // |
405 // |