19 // INCLUDES |
19 // INCLUDES |
20 #include <pevirtualengine.h> |
20 #include <pevirtualengine.h> |
21 #include <mpeengineinfo.h> |
21 #include <mpeengineinfo.h> |
22 #include <mpeclientinformation.h> |
22 #include <mpeclientinformation.h> |
23 #include <MediatorDomainUIDs.h> |
23 #include <MediatorDomainUIDs.h> |
|
24 #include <videotelcontrolmediatorapi.h> |
24 #include "cphonealerting.h" |
25 #include "cphonealerting.h" |
25 #include "mphonestatemachine.h" |
26 #include "mphonestatemachine.h" |
26 #include "tphonecmdparamboolean.h" |
27 #include "tphonecmdparamboolean.h" |
27 #include "tphonecmdparaminteger.h" |
28 #include "tphonecmdparaminteger.h" |
28 #include "tphonecmdparamcallstatedata.h" |
29 #include "tphonecmdparamcallstatedata.h" |
129 iStateMachine->SendPhoneEngineMessage( |
130 iStateMachine->SendPhoneEngineMessage( |
130 MPEPhoneModel::EPEMessageTerminateAllConnections ); |
131 MPEPhoneModel::EPEMessageTerminateAllConnections ); |
131 |
132 |
132 if ( IsNumberEntryUsedL() ) |
133 if ( IsNumberEntryUsedL() ) |
133 { |
134 { |
134 // Remove number entry from screen |
135 CloseClearNumberEntryAndLoadEffectL( ENumberEntryClose ); |
135 iViewCommandHandle->ExecuteCommandL( |
|
136 EPhoneViewRemoveNumberEntry ); |
|
137 // Do state-specific operation when number entry is cleared |
|
138 HandleNumberEntryClearedL(); |
|
139 } |
136 } |
140 if ( !TopAppIsDisplayedL() ) |
137 if ( !TopAppIsDisplayedL() ) |
141 { |
138 { |
142 // Bring app to foreground |
139 // Bring app to foreground |
143 TPhoneCmdParamInteger uidParam; |
140 TPhoneCmdParamInteger uidParam; |
172 "CPhoneAlerting::HandlePhoneEngineMessageL()"); |
169 "CPhoneAlerting::HandlePhoneEngineMessageL()"); |
173 |
170 |
174 switch ( aMessage ) |
171 switch ( aMessage ) |
175 { |
172 { |
176 case MEngineMonitor::EPEMessageConnected: |
173 case MEngineMonitor::EPEMessageConnected: |
|
174 { |
177 HandleConnectedL( aCallId ); |
175 HandleConnectedL( aCallId ); |
|
176 } |
178 break; |
177 break; |
179 |
178 |
180 case MEngineMonitor::EPEMessageDisconnecting: |
179 case MEngineMonitor::EPEMessageDisconnecting: |
|
180 { |
181 HandleDisconnectingL( aCallId ); |
181 HandleDisconnectingL( aCallId ); |
|
182 } |
182 break; |
183 break; |
183 |
184 |
184 case MEngineMonitor::EPEMessageRemoteTerminated: |
185 case MEngineMonitor::EPEMessageRemoteTerminated: |
|
186 { |
185 iViewCommandHandle->ExecuteCommandL( |
187 iViewCommandHandle->ExecuteCommandL( |
186 EPhoneViewHideNaviPaneAudioVolume ); |
188 EPhoneViewHideNaviPaneAudioVolume ); |
187 CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
189 } |
188 break; |
190 break; |
189 |
191 |
190 case MEngineMonitor::EPEMessageIncoming: |
192 case MEngineMonitor::EPEMessageIncoming: |
191 { |
193 { |
192 // If incoming message is received in alerting state, teardown of |
194 // If incoming message is received in alerting state, teardown of |
232 // |
235 // |
233 EXPORT_C void CPhoneAlerting::HandleConnectedL( TInt aCallId ) |
236 EXPORT_C void CPhoneAlerting::HandleConnectedL( TInt aCallId ) |
234 { |
237 { |
235 __LOGMETHODSTARTEND( EPhoneUIStates, |
238 __LOGMETHODSTARTEND( EPhoneUIStates, |
236 "CPhoneAlerting::HandleConnectedL()"); |
239 "CPhoneAlerting::HandleConnectedL()"); |
237 // Keep Phone in the foreground |
240 |
238 TPhoneCmdParamBoolean booleanParam; |
241 // Close menu bar, if it is displayed |
239 booleanParam.SetBoolean( EFalse ); |
242 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
240 iViewCommandHandle->ExecuteCommandL( |
|
241 EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
|
242 |
243 |
243 BeginUiUpdateLC(); |
244 BeginUiUpdateLC(); |
244 |
245 |
245 // Update the single call |
246 // Update the single call |
246 UpdateSingleActiveCallL( aCallId ); |
247 UpdateSingleActiveCallL( aCallId ); |
247 |
248 |
248 SetTouchPaneButtons( EPhoneIncallButtons ); |
249 SetTouchPaneButtons( EPhoneIncallButtons ); |
249 |
250 |
|
251 SetToolbarDimming( EFalse ); |
|
252 |
250 EndUiUpdate(); |
253 EndUiUpdate(); |
251 |
254 |
252 // Go to single state |
255 // Go to single state |
253 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
256 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
254 iStateMachine->ChangeState( EPhoneStateSingle ); |
257 iStateMachine->ChangeState( EPhoneStateSingle ); |
255 } |
258 } |
256 |
259 |
257 // ----------------------------------------------------------- |
260 // ----------------------------------------------------------- |
|
261 // CPhoneAlerting::OpenMenuBarL |
|
262 // ----------------------------------------------------------- |
|
263 // |
|
264 EXPORT_C void CPhoneAlerting::OpenMenuBarL() |
|
265 { |
|
266 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
267 "CPhoneAlerting::OpenMenuBarL()"); |
|
268 TInt resourceId; |
|
269 |
|
270 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
271 { |
|
272 resourceId = EPhoneDtmfDialerMenubar; |
|
273 } |
|
274 else if ( IsNumberEntryVisibleL() ) |
|
275 { |
|
276 resourceId = EPhoneAlertingCallMenubarWithNumberEntry; |
|
277 } |
|
278 // Use different resources for alerting data, video and cs call |
|
279 else if( IsVideoCallAlertingL() ) |
|
280 { |
|
281 resourceId = EPhoneAlertingVideoCallMenubar; |
|
282 } |
|
283 else |
|
284 { |
|
285 resourceId = EPhoneAlertingCallMenubar; |
|
286 } |
|
287 |
|
288 TPhoneCmdParamInteger integerParam; |
|
289 integerParam.SetInteger( |
|
290 CPhoneMainResourceResolver::Instance()-> |
|
291 ResolveResourceID( resourceId ) ); |
|
292 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, |
|
293 &integerParam ); |
|
294 } |
|
295 |
|
296 // ----------------------------------------------------------- |
258 // CPhoneAlerting::HandleCommandL |
297 // CPhoneAlerting::HandleCommandL |
259 // ----------------------------------------------------------- |
298 // ----------------------------------------------------------- |
260 // |
299 // |
261 EXPORT_C TBool CPhoneAlerting::HandleCommandL( TInt aCommand ) |
300 EXPORT_C TBool CPhoneAlerting::HandleCommandL( TInt aCommand ) |
262 { |
301 { |
263 __LOGMETHODSTARTEND( EPhoneUIStates, |
302 __LOGMETHODSTARTEND( EPhoneUIStates, |
264 "CPhoneAlerting::HandleCommandL()" ); |
303 "CPhoneAlerting::HandleCommandL()" ); |
265 return CPhoneGsmInCall::HandleCommandL( aCommand ); |
304 TBool commandStatus = ETrue; |
|
305 |
|
306 switch( aCommand ) |
|
307 { |
|
308 case EPhoneInCallCmdHelp: |
|
309 { |
|
310 TPtrC contextName; |
|
311 if ( IsVideoCallAlertingL() ) |
|
312 { |
|
313 contextName.Set( KINCAL_HLP_VIDEOCALL() ); |
|
314 } |
|
315 else |
|
316 { |
|
317 contextName.Set( KINCAL_HLP_CALL_HANDLING() ); |
|
318 } |
|
319 iViewCommandHandle->ExecuteCommandL( |
|
320 EPhoneViewLaunchHelpApplication, 0, contextName ); |
|
321 } |
|
322 break; |
|
323 default: |
|
324 commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
|
325 break; |
|
326 } |
|
327 return commandStatus; |
266 } |
328 } |
267 |
329 |
268 // ----------------------------------------------------------- |
330 // ----------------------------------------------------------- |
269 // CPhoneAlerting::IsVideoCallAlertingL |
331 // CPhoneAlerting::IsVideoCallAlertingL |
270 // ----------------------------------------------------------- |
332 // ----------------------------------------------------------- |