224 // ----------------------------------------------------------- |
224 // ----------------------------------------------------------- |
225 // |
225 // |
226 void CPhoneGsmInCall::HandleColpNoteL( TInt aCallId ) |
226 void CPhoneGsmInCall::HandleColpNoteL( TInt aCallId ) |
227 { |
227 { |
228 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneGsmInCall::HandleColpNoteL() "); |
228 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneGsmInCall::HandleColpNoteL() "); |
229 |
|
230 MPEEngineInfo* EngineInfo = CPhoneState::iStateMachine->PhoneEngineInfo(); |
229 MPEEngineInfo* EngineInfo = CPhoneState::iStateMachine->PhoneEngineInfo(); |
231 |
230 |
232 TPhoneCmdParamGlobalNote globalNoteParam; |
231 TPhoneCmdParamGlobalNote globalNoteParam; |
233 globalNoteParam.SetText( EngineInfo->RemoteColpNumber( aCallId ) ); |
232 globalNoteParam.SetText( EngineInfo->RemoteColpNumber( aCallId ) ); |
234 globalNoteParam.SetType( EPhoneNotificationDialog ); |
233 globalNoteParam.SetType( EPhoneNotificationDialog ); |
237 ResolveResourceID( EPhoneColpConnected ) ); |
236 ResolveResourceID( EPhoneColpConnected ) ); |
238 globalNoteParam.SetNotificationDialog( ETrue ); |
237 globalNoteParam.SetNotificationDialog( ETrue ); |
239 |
238 |
240 iViewCommandHandle->ExecuteCommandL( |
239 iViewCommandHandle->ExecuteCommandL( |
241 EPhoneViewShowGlobalNote, &globalNoteParam ); |
240 EPhoneViewShowGlobalNote, &globalNoteParam ); |
242 |
|
243 } |
241 } |
244 |
242 |
245 // ----------------------------------------------------------- |
243 // ----------------------------------------------------------- |
246 // CPhoneGsmInCall::BringIncomingToForegroundL() |
244 // CPhoneGsmInCall::BringIncomingToForegroundL() |
247 // ----------------------------------------------------------- |
245 // ----------------------------------------------------------- |
248 // |
246 // |
249 void CPhoneGsmInCall::BringIncomingToForegroundL() |
247 void CPhoneGsmInCall::BringIncomingToForegroundL() |
250 { |
248 { |
251 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneGsmInCall::BringIncomingToForegroundL( ) "); |
249 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneGsmInCall::BringIncomingToForegroundL( ) "); |
252 |
|
253 // Remove any phone dialogs if they are displayed |
250 // Remove any phone dialogs if they are displayed |
254 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
251 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
255 |
252 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringPhoneAppToForeground ); |
256 // Bring Phone app in the foreground |
|
257 TPhoneCmdParamInteger uidParam; |
|
258 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
259 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
|
260 &uidParam ); |
|
261 |
|
262 // Set Phone as the top application |
|
263 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
|
264 &uidParam ); |
|
265 |
253 |
266 // Disable global notes when there is an incoming call |
254 // Disable global notes when there is an incoming call |
267 TPhoneCmdParamBoolean globalNotifierParam; |
255 TPhoneCmdParamBoolean globalNotifierParam; |
268 globalNotifierParam.SetBoolean( ETrue ); |
256 globalNotifierParam.SetBoolean( ETrue ); |
269 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
257 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
271 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled, |
259 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled, |
272 &globalNotifierParam ); |
260 &globalNotifierParam ); |
273 |
261 |
274 } |
262 } |
275 |
263 |
276 // ----------------------------------------------------------- |
|
277 // CPhoneGsmInCall::AllowShowingOfWaitingCallHeaderL |
|
278 // ----------------------------------------------------------- |
|
279 // |
|
280 void CPhoneGsmInCall::AllowShowingOfWaitingCallHeaderL( |
|
281 TPhoneCmdParamBoolean& aCommandParam ) |
|
282 { |
|
283 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneGsmInCall::AllowShowingOfWaitingCallHeaderL() "); |
|
284 |
|
285 if ( aCommandParam.Boolean() && IsNumberEntryUsedL() ) |
|
286 { |
|
287 SetNumberEntryVisibilityL(EFalse); |
|
288 } |
|
289 } |
|
290 |
|
291 // ----------------------------------------------------------- |
|
292 // CPhoneGsmInCall::HandlePhoneForegroundEventL |
|
293 // ----------------------------------------------------------- |
|
294 // |
|
295 EXPORT_C void CPhoneGsmInCall::HandlePhoneForegroundEventL() |
|
296 { |
|
297 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneGsmInCall::HandlePhoneForegroundEventL( ) "); |
|
298 } |
|
299 |
|
300 // ----------------------------------------------------------- |
|
301 // CPhoneGsmInCall::HandleHoldNoteL |
|
302 // ----------------------------------------------------------- |
|
303 // |
|
304 void CPhoneGsmInCall::HandleHoldNoteL( |
|
305 TInt aCallId, TBool aHold ) |
|
306 { |
|
307 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneGsmInCall::HandleHoldNoteL( ) "); |
|
308 TBuf< KPhoneContactNameMaxLength > holdText( KNullDesC ); |
|
309 TPhoneCmdParamGlobalNote globalNoteParam; |
|
310 TInt resourceId(0); |
|
311 |
|
312 if( iStateMachine->PhoneEngineInfo()->RemoteName( aCallId ).Length() || |
|
313 iStateMachine->PhoneEngineInfo()->RemoteCompanyName( aCallId ).Length()) |
|
314 { |
|
315 TInt resource( EPhoneInformationCallActivetedCli ); |
|
316 if ( aHold ) |
|
317 { |
|
318 resource = EPhoneInformationCallOnHoldCli; |
|
319 } |
|
320 GetRemoteInfoDataL ( aCallId, holdText ); |
|
321 resourceId = CPhoneMainResourceResolver::Instance()-> |
|
322 ResolveResourceID( resource ); |
|
323 globalNoteParam.SetTextResourceId( resourceId ); |
|
324 } |
|
325 else |
|
326 { |
|
327 TInt resource( EPhoneInformationCallActiveted ); |
|
328 if ( aHold ) |
|
329 { |
|
330 resource = EPhoneInformationCallOnHoldNoCli; |
|
331 } |
|
332 resourceId = CPhoneMainResourceResolver::Instance()-> |
|
333 ResolveResourceID( resource ); |
|
334 |
|
335 HBufC* tmp = StringLoader::LoadL( resourceId, |
|
336 aCallId + 1 , CCoeEnv::Static() ); |
|
337 |
|
338 holdText = *tmp; |
|
339 delete tmp; |
|
340 tmp = NULL; |
|
341 } |
|
342 |
|
343 globalNoteParam.SetText( holdText ); |
|
344 globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
|
345 |
|
346 iViewCommandHandle->ExecuteCommandL( |
|
347 EPhoneViewShowGlobalNote, &globalNoteParam ); |
|
348 } |
|
349 |
|
350 |
|
351 // --------------------------------------------------------- |
|
352 // CPhoneGsmInCall::SetDivertIndication |
|
353 // --------------------------------------------------------- |
|
354 // |
|
355 EXPORT_C void CPhoneGsmInCall::SetDivertIndication( const TBool aDivertIndication ) |
|
356 { |
|
357 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneGsmInCall::SetDivertIndication()"); |
|
358 |
|
359 CPhoneState::SetDivertIndication( aDivertIndication ); |
|
360 |
|
361 TRAP_IGNORE( HandeDivertIndicationL() ); |
|
362 } |
|
363 |
|
364 // --------------------------------------------------------- |
|
365 // CPhoneGsmInCall::HandeDivertIndicationL |
|
366 // --------------------------------------------------------- |
|
367 // |
|
368 void CPhoneGsmInCall::HandeDivertIndicationL() |
|
369 { |
|
370 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneGsmInCall::HandeDivertIndicationL()"); |
|
371 |
|
372 TBuf< KPhoneContactNameMaxLength > remoteInfoText( KNullDesC ); |
|
373 TInt ringingCallId ( KErrNotFound ); |
|
374 |
|
375 ringingCallId = GetRingingCallL(); |
|
376 |
|
377 if( ringingCallId > KErrNotFound ) |
|
378 { |
|
379 TPhoneCmdParamCallHeaderData divertData; |
|
380 |
|
381 divertData.SetDiverted( ETrue ); |
|
382 |
|
383 GetRemoteInfoDataL( ringingCallId, remoteInfoText ); |
|
384 divertData.SetCLIText( |
|
385 remoteInfoText, |
|
386 TPhoneCmdParamCallHeaderData::ERight ); |
|
387 |
|
388 divertData.SetCiphering( |
|
389 iStateMachine->PhoneEngineInfo()->IsSecureCall( ringingCallId ) ); |
|
390 divertData.SetCipheringIndicatorAllowed( |
|
391 iStateMachine->PhoneEngineInfo()->SecureSpecified() ); |
|
392 |
|
393 iViewCommandHandle->ExecuteCommandL( |
|
394 EPhoneViewUpdateCallHeaderRemoteInfoData, ringingCallId, |
|
395 &divertData ); |
|
396 } |
|
397 } |
|
398 |
264 |
399 // End of File |
265 // End of File |