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> |
|
25 #include "cphonealerting.h" |
24 #include "cphonealerting.h" |
26 #include "mphonestatemachine.h" |
25 #include "mphonestatemachine.h" |
27 #include "tphonecmdparamboolean.h" |
26 #include "tphonecmdparamboolean.h" |
28 #include "tphonecmdparaminteger.h" |
27 #include "tphonecmdparaminteger.h" |
29 #include "tphonecmdparamcallstatedata.h" |
28 #include "tphonecmdparamcallstatedata.h" |
130 iStateMachine->SendPhoneEngineMessage( |
129 iStateMachine->SendPhoneEngineMessage( |
131 MPEPhoneModel::EPEMessageTerminateAllConnections ); |
130 MPEPhoneModel::EPEMessageTerminateAllConnections ); |
132 |
131 |
133 if ( IsNumberEntryUsedL() ) |
132 if ( IsNumberEntryUsedL() ) |
134 { |
133 { |
135 CloseClearNumberEntryAndLoadEffectL( ENumberEntryClose ); |
134 // Remove number entry from screen |
|
135 iViewCommandHandle->ExecuteCommandL( |
|
136 EPhoneViewRemoveNumberEntry ); |
|
137 // Do state-specific operation when number entry is cleared |
|
138 HandleNumberEntryClearedL(); |
136 } |
139 } |
137 if ( !TopAppIsDisplayedL() ) |
140 if ( !TopAppIsDisplayedL() ) |
138 { |
141 { |
139 // Bring app to foreground |
142 // Bring app to foreground |
140 TPhoneCmdParamInteger uidParam; |
143 TPhoneCmdParamInteger uidParam; |
169 "CPhoneAlerting::HandlePhoneEngineMessageL()"); |
172 "CPhoneAlerting::HandlePhoneEngineMessageL()"); |
170 |
173 |
171 switch ( aMessage ) |
174 switch ( aMessage ) |
172 { |
175 { |
173 case MEngineMonitor::EPEMessageConnected: |
176 case MEngineMonitor::EPEMessageConnected: |
174 { |
|
175 HandleConnectedL( aCallId ); |
177 HandleConnectedL( aCallId ); |
176 } |
|
177 break; |
178 break; |
178 |
179 |
179 case MEngineMonitor::EPEMessageDisconnecting: |
180 case MEngineMonitor::EPEMessageDisconnecting: |
180 { |
|
181 HandleDisconnectingL( aCallId ); |
181 HandleDisconnectingL( aCallId ); |
182 } |
|
183 break; |
182 break; |
184 |
183 |
185 case MEngineMonitor::EPEMessageRemoteTerminated: |
184 case MEngineMonitor::EPEMessageRemoteTerminated: |
186 { |
|
187 iViewCommandHandle->ExecuteCommandL( |
185 iViewCommandHandle->ExecuteCommandL( |
188 EPhoneViewHideNaviPaneAudioVolume ); |
186 EPhoneViewHideNaviPaneAudioVolume ); |
189 } |
187 CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
190 break; |
188 break; |
191 |
189 |
192 case MEngineMonitor::EPEMessageIncoming: |
190 case MEngineMonitor::EPEMessageIncoming: |
193 { |
191 { |
194 // If incoming message is received in alerting state, teardown of |
192 // If incoming message is received in alerting state, teardown of |
235 // |
232 // |
236 EXPORT_C void CPhoneAlerting::HandleConnectedL( TInt aCallId ) |
233 EXPORT_C void CPhoneAlerting::HandleConnectedL( TInt aCallId ) |
237 { |
234 { |
238 __LOGMETHODSTARTEND( EPhoneUIStates, |
235 __LOGMETHODSTARTEND( EPhoneUIStates, |
239 "CPhoneAlerting::HandleConnectedL()"); |
236 "CPhoneAlerting::HandleConnectedL()"); |
240 |
237 // Keep Phone in the foreground |
241 // Close menu bar, if it is displayed |
238 TPhoneCmdParamBoolean booleanParam; |
242 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
239 booleanParam.SetBoolean( EFalse ); |
|
240 iViewCommandHandle->ExecuteCommandL( |
|
241 EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
243 |
242 |
244 BeginUiUpdateLC(); |
243 BeginUiUpdateLC(); |
245 |
244 |
246 // Update the single call |
245 // Update the single call |
247 UpdateSingleActiveCallL( aCallId ); |
246 UpdateSingleActiveCallL( aCallId ); |
248 |
247 |
249 SetTouchPaneButtons( EPhoneIncallButtons ); |
248 SetTouchPaneButtons( EPhoneIncallButtons ); |
250 |
249 |
251 SetToolbarDimming( EFalse ); |
|
252 |
|
253 EndUiUpdate(); |
250 EndUiUpdate(); |
254 |
251 |
255 // Go to single state |
252 // Go to single state |
256 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
253 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
257 iStateMachine->ChangeState( EPhoneStateSingle ); |
254 iStateMachine->ChangeState( EPhoneStateSingle ); |
258 } |
255 } |
259 |
256 |
260 // ----------------------------------------------------------- |
257 // ----------------------------------------------------------- |
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 // ----------------------------------------------------------- |
|
297 // CPhoneAlerting::HandleCommandL |
258 // CPhoneAlerting::HandleCommandL |
298 // ----------------------------------------------------------- |
259 // ----------------------------------------------------------- |
299 // |
260 // |
300 EXPORT_C TBool CPhoneAlerting::HandleCommandL( TInt aCommand ) |
261 EXPORT_C TBool CPhoneAlerting::HandleCommandL( TInt aCommand ) |
301 { |
262 { |
302 __LOGMETHODSTARTEND( EPhoneUIStates, |
263 __LOGMETHODSTARTEND( EPhoneUIStates, |
303 "CPhoneAlerting::HandleCommandL()" ); |
264 "CPhoneAlerting::HandleCommandL()" ); |
304 TBool commandStatus = ETrue; |
265 return CPhoneGsmInCall::HandleCommandL( aCommand ); |
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; |
|
328 } |
266 } |
329 |
267 |
330 // ----------------------------------------------------------- |
268 // ----------------------------------------------------------- |
331 // CPhoneAlerting::IsVideoCallAlertingL |
269 // CPhoneAlerting::IsVideoCallAlertingL |
332 // ----------------------------------------------------------- |
270 // ----------------------------------------------------------- |