|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of CPhoneStateInCall class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include <featmgr.h> |
|
21 #include <StringLoader.h> |
|
22 #include <PSVariables.h> |
|
23 #include <hwrmdomainpskeys.h> |
|
24 #include <UikonInternalPSKeys.h> |
|
25 #include <mpeengineinfo.h> |
|
26 #include <videotelcontrolmediatorapi.h> |
|
27 #include <MediatorDomainUIDs.h> |
|
28 #include <bldvariant.hrh> |
|
29 |
|
30 #include "cphonestateincall.h" |
|
31 #include "tphonecmdparamboolean.h" |
|
32 #include "tphonecmdparaminteger.h" |
|
33 #include "tphonecmdparamstring.h" |
|
34 #include "tphonecmdparamnote.h" |
|
35 #include "tphonecmdparamquery.h" |
|
36 #include "tphonecmdparamsingleitemfetch.h" |
|
37 #include "tphonecmdparamcallstatedata.h" |
|
38 #include "tphonecmdparamsfidata.h" |
|
39 #include "mphonestatemachine.h" |
|
40 #include "phonestatedefinitions.h" |
|
41 #include "phoneviewcommanddefinitions.h" |
|
42 #include "phoneui.hrh" |
|
43 #include "phonerssbase.h" |
|
44 #include "cphonemainresourceresolver.h" |
|
45 #include "phonelogger.h" |
|
46 #include "phoneui.pan" |
|
47 #include "cphonepubsubproxy.h" |
|
48 #include "cphonedtmfwaitchartimer.h" |
|
49 #include "tphonecmdparamcallheaderdata.h" |
|
50 #include "cphonemediatorfactory.h" |
|
51 #include "cphonemediatorsender.h" |
|
52 #include "cphoneterminateallconnectionscommand.h" |
|
53 #include "mphonecustomization.h" |
|
54 |
|
55 // ================= MEMBER FUNCTIONS ======================= |
|
56 |
|
57 // C++ default constructor can NOT contain any code, that |
|
58 // might leave. |
|
59 // |
|
60 EXPORT_C CPhoneStateInCall::CPhoneStateInCall( |
|
61 MPhoneStateMachine* aStateMachine, |
|
62 MPhoneViewCommandHandle* aViewCommandHandle, |
|
63 MPhoneCustomization* aCustomization ) : |
|
64 CPhoneState( aStateMachine, aViewCommandHandle, aCustomization ), |
|
65 iDtmfWaitCharTimer( NULL ) |
|
66 { |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------- |
|
70 // CPhoneStateInCall::~CPhoneStateInCall() |
|
71 // Destructor |
|
72 // (other items were commented in a header). |
|
73 // ----------------------------------------------------------- |
|
74 // |
|
75 EXPORT_C CPhoneStateInCall::~CPhoneStateInCall() |
|
76 { |
|
77 if( iDtmfWaitCharTimer ) |
|
78 { |
|
79 delete iDtmfWaitCharTimer; |
|
80 } |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------- |
|
84 // CPhoneStateInCall::ConstructL() |
|
85 // Constructor |
|
86 // (other items were commented in a header). |
|
87 // ----------------------------------------------------------- |
|
88 // |
|
89 EXPORT_C void CPhoneStateInCall::ConstructL() |
|
90 { |
|
91 __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), |
|
92 Panic( EPhoneCtrlInvariant ) ); |
|
93 CPhoneState::BaseConstructL(); |
|
94 // Enable the volume display |
|
95 iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNaviPaneAudioVolume ); |
|
96 } |
|
97 |
|
98 // ----------------------------------------------------------- |
|
99 // CPhoneStateInCall::NewL() |
|
100 // Constructor |
|
101 // (other items were commented in a header). |
|
102 // ----------------------------------------------------------- |
|
103 // |
|
104 CPhoneStateInCall* CPhoneStateInCall::NewL( |
|
105 MPhoneStateMachine* aStateMachine, |
|
106 MPhoneViewCommandHandle* aViewCommandHandle, |
|
107 MPhoneCustomization* aPhoneCustomization ) |
|
108 { |
|
109 CPhoneStateInCall* self = new (ELeave) CPhoneStateInCall( |
|
110 aStateMachine, aViewCommandHandle, aPhoneCustomization ); |
|
111 |
|
112 CleanupStack::PushL( self ); |
|
113 self->ConstructL(); |
|
114 CleanupStack::Pop( self ); |
|
115 |
|
116 return self; |
|
117 } |
|
118 |
|
119 // ----------------------------------------------------------- |
|
120 // CPhoneStateInCall::HandleKeyMessageL |
|
121 // ----------------------------------------------------------- |
|
122 // |
|
123 EXPORT_C void CPhoneStateInCall::HandleKeyMessageL( |
|
124 TPhoneKeyEventMessages aMessage, |
|
125 TKeyCode aCode ) |
|
126 { |
|
127 __LOGMETHODSTARTEND(EPhoneControl, |
|
128 "CPhoneStateInCall::HandleKeyMessageL()" ); |
|
129 switch ( aCode ) |
|
130 { |
|
131 // end-key |
|
132 case EKeyNo: |
|
133 HandleEndKeyPressL( aMessage ); |
|
134 break; |
|
135 |
|
136 // Voice key |
|
137 case EKeyDevice6: |
|
138 HandleVoiceKeyPressL( aMessage ); |
|
139 break; |
|
140 |
|
141 #ifdef RD_INTELLIGENT_TEXT_INPUT |
|
142 case EKeyEnter: |
|
143 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
144 { |
|
145 SendDtmfL(); |
|
146 } |
|
147 else if ( IsNumberEntryVisibleL() ) |
|
148 { |
|
149 HandleCommandL( EPhoneCmdOptions ); |
|
150 } |
|
151 break; |
|
152 #endif |
|
153 |
|
154 default: |
|
155 break; |
|
156 } |
|
157 } |
|
158 |
|
159 // ----------------------------------------------------------- |
|
160 // CPhoneStateInCall::HandleNumberEntryClearedL() |
|
161 // ----------------------------------------------------------- |
|
162 // |
|
163 EXPORT_C void CPhoneStateInCall::HandleNumberEntryClearedL() |
|
164 { |
|
165 __LOGMETHODSTARTEND(EPhoneControl, |
|
166 "CPhoneStateInCall::HandleNumberEntryClearedL()" ); |
|
167 // Update single call CBA when number entry is cleared |
|
168 UpdateInCallCbaL(); |
|
169 } |
|
170 |
|
171 // ----------------------------------------------------------- |
|
172 // CPhoneStateInCall::HandlePhoneEngineMessageL |
|
173 // ----------------------------------------------------------- |
|
174 // |
|
175 EXPORT_C void CPhoneStateInCall::HandlePhoneEngineMessageL( |
|
176 const TInt aMessage, |
|
177 TInt aCallId ) |
|
178 { |
|
179 __LOGMETHODSTARTEND(EPhoneControl, |
|
180 "CPhoneStateInCall::HandlePhoneEngineMessageL()" ); |
|
181 switch ( aMessage ) |
|
182 { |
|
183 case MEngineMonitor::EPEMessageIdle: |
|
184 HandleIdleL( aCallId ); |
|
185 break; |
|
186 |
|
187 case MEngineMonitor::EPEMessageAudioMuteChanged: |
|
188 HandleAudioMuteChangedL(); |
|
189 break; |
|
190 |
|
191 case MEngineMonitor::EPEMessageAudioOutputChanged: |
|
192 HandleAudioOutputChangedL(); |
|
193 break; |
|
194 |
|
195 case MEngineMonitor::EPEMessageSendingDTMF: |
|
196 case MEngineMonitor::EPEMessageContinuingDTMFSending: |
|
197 HandleSendingDTMFL(); |
|
198 break; |
|
199 |
|
200 case MEngineMonitor::EPEMessageStoppedDTMF: |
|
201 HandleStoppedDTMFL(); |
|
202 break; |
|
203 |
|
204 case MEngineMonitor::EPEMessageSentDTMF: |
|
205 case MEngineMonitor::EPEMessageDTMFSendingAborted: |
|
206 CancelDTMFSendingL(); |
|
207 break; |
|
208 |
|
209 case MEngineMonitor::EPEMessagePromptSpeedDial: |
|
210 HandleDTMFPromptSpeedDialL(); |
|
211 break; |
|
212 |
|
213 case MEngineMonitor::EPEMessageSpeedDialNotAssigned: |
|
214 CPhoneState::SendGlobalErrorNoteL( |
|
215 EPhoneDtmfSpeedDialNotAssigned ); |
|
216 break; |
|
217 |
|
218 case MEngineMonitor::EPEMessageInvalidSpeedDial: |
|
219 CPhoneState::SendGlobalErrorNoteL( EPhoneDtmfInvalidSpeedDial ); |
|
220 break; |
|
221 |
|
222 case MEngineMonitor::EPEMessageAudioVolumeChanged: |
|
223 HandleAudioVolumeChangedL(); |
|
224 break; |
|
225 |
|
226 case MEngineMonitor::EPEMessageDisconnecting: |
|
227 CancelDTMFSendingL(); |
|
228 if ( !CPhoneState::IsAnyConnectedCalls() ) |
|
229 { |
|
230 CloseDtmfQueryL(); |
|
231 } |
|
232 CPhoneState::HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
233 break; |
|
234 |
|
235 case MEngineMonitor::EPEMessageInValidEmergencyNumber: |
|
236 SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed ); |
|
237 break; |
|
238 |
|
239 case MEngineMonitor::EPEMessageValidEmergencyNumber: |
|
240 DialVoiceCallL(); |
|
241 break; |
|
242 |
|
243 case MEngineMonitor::EPEMessageRemotePartyInfoChanged: |
|
244 // If there is a waiting call then update header and label |
|
245 // else forward message to CPhoneState. |
|
246 if ( IsWaitingCallL( aCallId ) ) |
|
247 { |
|
248 // Update remote info data and label. |
|
249 UpdateRemoteInfoDataAndLabelL( aCallId, UpdateCallHeaderInfoL( aCallId ) ); |
|
250 } |
|
251 else |
|
252 { |
|
253 CPhoneState::HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
254 } |
|
255 break; |
|
256 |
|
257 default: |
|
258 CPhoneState::HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
259 break; |
|
260 } |
|
261 } |
|
262 |
|
263 // ----------------------------------------------------------- |
|
264 // CPhoneStateInCall::UpdateRemoteInfoDataAndLabelL |
|
265 // ----------------------------------------------------------- |
|
266 // |
|
267 void CPhoneStateInCall::UpdateRemoteInfoDataAndLabelL( |
|
268 TInt aCallId, |
|
269 TPhoneCmdParamCallHeaderData aCallHeaderParam ) |
|
270 { |
|
271 __LOGMETHODSTARTEND(EPhoneControl, |
|
272 "CPhoneStateInCall::UpdateRemoteInfoDataAndLabelL ()" ); |
|
273 // Update the remote info data in the call header |
|
274 iViewCommandHandle->ExecuteCommandL( |
|
275 EPhoneViewUpdateCallHeaderRemoteInfoDataAndLabel, |
|
276 aCallId, |
|
277 &aCallHeaderParam ); |
|
278 } |
|
279 |
|
280 // ----------------------------------------------------------- |
|
281 // CPhoneStateInCall::HandleIdleL |
|
282 // ----------------------------------------------------------- |
|
283 // |
|
284 EXPORT_C void CPhoneStateInCall::HandleIdleL( TInt aCallId ) |
|
285 { |
|
286 __LOGMETHODSTARTEND(EPhoneControl, |
|
287 "CPhoneStateInCall::HandleIdleL()" ); |
|
288 __ASSERT_DEBUG( aCallId >= 0, Panic( EPhoneCtrlParameterNotInitialized ) ); |
|
289 // Remove call |
|
290 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
|
291 |
|
292 //Make sure that toolbar is not shown |
|
293 iViewCommandHandle->ExecuteCommandL( EPhoneViewHideToolbar ); |
|
294 BeginTransEffectLC( ENumberEntryOpen ); |
|
295 BeginUiUpdateLC(); |
|
296 SetDefaultFlagsL(); |
|
297 if ( IsNumberEntryUsedL() ) |
|
298 { |
|
299 // Show the number entry if it exists and update cba's. |
|
300 SetNumberEntryVisibilityL( ETrue ); |
|
301 |
|
302 // Close dtmf dialer when call is disconnected. |
|
303 if ( IsDTMFEditorVisibleL() ) |
|
304 { |
|
305 CloseDTMFEditorL(); |
|
306 |
|
307 // Display idle screen and update CBA's |
|
308 DisplayIdleScreenL(); |
|
309 } |
|
310 else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() ) |
|
311 { |
|
312 CloseCustomizedDialerL(); |
|
313 // Display idle screen and update CBA's |
|
314 DisplayIdleScreenL(); |
|
315 } |
|
316 } |
|
317 else |
|
318 { |
|
319 // Close menu bar, if it is displayed |
|
320 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
321 |
|
322 if ( !TopAppIsDisplayedL() || IsAutoLockOn() ) |
|
323 { |
|
324 // Continue displaying current app but set up the |
|
325 // idle screen in the background |
|
326 SetupIdleScreenInBackgroundL(); |
|
327 } |
|
328 else |
|
329 { |
|
330 // Display idle screen and update CBAs |
|
331 DisplayIdleScreenL(); |
|
332 } |
|
333 } |
|
334 |
|
335 DeleteTouchPaneButtons(); |
|
336 EndUiUpdate(); |
|
337 EndTransEffect(); |
|
338 // Display call termination note, if necessary |
|
339 DisplayCallTerminationNoteL(); |
|
340 |
|
341 // Go to idle state |
|
342 iStateMachine->ChangeState( EPhoneStateIdle ); |
|
343 } |
|
344 |
|
345 // ----------------------------------------------------------- |
|
346 // CPhoneStateInCall::UpdateInCallCbaL |
|
347 // ----------------------------------------------------------- |
|
348 // |
|
349 EXPORT_C void CPhoneStateInCall::UpdateInCallCbaL() |
|
350 { |
|
351 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateInCall::UpdateInCallCbaL() "); |
|
352 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
353 } |
|
354 |
|
355 // ----------------------------------------------------------- |
|
356 // CPhoneStateInCall::UpdateCbaL |
|
357 // ----------------------------------------------------------- |
|
358 // |
|
359 EXPORT_C void CPhoneStateInCall::UpdateCbaL( TInt aResource ) |
|
360 { |
|
361 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateInCall::UpdateCbaL() "); |
|
362 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
363 { |
|
364 iCbaManager->SetCbaL( EPhoneDtmfDialerCBA ); |
|
365 } |
|
366 else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() ) |
|
367 { |
|
368 iCbaManager->SetCbaL( CustomizedDialerCbaResourceIdL() ); |
|
369 } |
|
370 else |
|
371 { |
|
372 iCbaManager->UpdateCbaL( aResource ); |
|
373 } |
|
374 } |
|
375 |
|
376 // ----------------------------------------------------------- |
|
377 // CPhoneStateInCall::HandleAudioMuteChangedL |
|
378 // ----------------------------------------------------------- |
|
379 // |
|
380 void CPhoneStateInCall::HandleAudioMuteChangedL() |
|
381 { |
|
382 __LOGMETHODSTARTEND(EPhoneControl, |
|
383 "CPhoneStateInCall::HandleAudioMuteChangedL()" ); |
|
384 CPhoneState::HandleAudioMuteChangedL(); |
|
385 |
|
386 // Update the single call CBA only if the number entry is not |
|
387 // used |
|
388 if ( !IsNumberEntryUsedL() ) |
|
389 { |
|
390 // Go to current state implementation |
|
391 UpdateInCallCbaL(); |
|
392 } |
|
393 } |
|
394 |
|
395 // ----------------------------------------------------------- |
|
396 // CPhoneStateInCall::HandleAudioOutputChangedL |
|
397 // ----------------------------------------------------------- |
|
398 // |
|
399 void CPhoneStateInCall::HandleAudioOutputChangedL() |
|
400 { |
|
401 __LOGMETHODSTARTEND(EPhoneControl, |
|
402 "CPhoneStateInCall::HandleAudioOutputChangedL()" ); |
|
403 // Handle the handsfree mode change |
|
404 CPhoneState::HandleAudioOutputChangedL(); |
|
405 |
|
406 // Update the single call CBA only if the number entry is not |
|
407 // used |
|
408 if ( !IsNumberEntryVisibleL() ) |
|
409 { |
|
410 // Go to current state implementation |
|
411 UpdateInCallCbaL(); |
|
412 } |
|
413 } |
|
414 |
|
415 // ----------------------------------------------------------- |
|
416 // CPhoneStateInCall::HandleAudioVolumeChangedL |
|
417 // ----------------------------------------------------------- |
|
418 // |
|
419 void CPhoneStateInCall::HandleAudioVolumeChangedL() |
|
420 { |
|
421 __LOGMETHODSTARTEND(EPhoneControl, |
|
422 "CPhoneStateInCall::HandleAudioVolumeChangedL()" ); |
|
423 // Update the volume display |
|
424 TInt audioVolume = iStateMachine->PhoneEngineInfo()->AudioVolume(); |
|
425 TPhoneCmdParamInteger volumeParam; |
|
426 volumeParam.SetInteger( audioVolume ); |
|
427 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetNaviPaneAudioVolume, |
|
428 &volumeParam ); |
|
429 } |
|
430 |
|
431 // ----------------------------------------------------------- |
|
432 // CPhoneStateInCall::HandleSendingDTMFL |
|
433 // ----------------------------------------------------------- |
|
434 // |
|
435 void CPhoneStateInCall::HandleSendingDTMFL() |
|
436 { |
|
437 __LOGMETHODSTARTEND(EPhoneControl, |
|
438 "CPhoneStateInCall::HandleSendingDTMFL()" ); |
|
439 TPhoneCmdParamNote noteParam; |
|
440 noteParam.SetType( EPhoneNoteDtmfSending ); |
|
441 noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()-> |
|
442 ResolveResourceID( EPhoneSendingDtmfWaitNote ) ); |
|
443 |
|
444 // Show the "Sending..." Wait Note, and pre-populate it |
|
445 // with the PhoneEngine's current DTMF String. |
|
446 // Set the text for the wait-note. |
|
447 TPEDtmfString dtmfString = iStateMachine->PhoneEngineInfo()->DtmfString(); |
|
448 HBufC* noteText = StringLoader::LoadLC( |
|
449 CPhoneMainResourceResolver::Instance()-> |
|
450 ResolveResourceID( EPhoneSendingDtmfWaitNoteText ), |
|
451 dtmfString ); |
|
452 noteParam.SetText( *noteText ); |
|
453 |
|
454 iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, ¬eParam ); |
|
455 |
|
456 CleanupStack::PopAndDestroy( noteText ); |
|
457 } |
|
458 |
|
459 // ----------------------------------------------------------- |
|
460 // CPhoneStateInCall::HandleStoppedDTMFL |
|
461 // ----------------------------------------------------------- |
|
462 // |
|
463 void CPhoneStateInCall::HandleStoppedDTMFL() |
|
464 { |
|
465 __LOGMETHODSTARTEND(EPhoneControl, |
|
466 "CPhoneStateInCall::HandleStoppedDTMFL()" ); |
|
467 // Remove the Sending... note |
|
468 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote ); |
|
469 |
|
470 // Fetch the remaining (unparsed) portion of the DTMF String |
|
471 // from PhoneEngine |
|
472 TPEDtmfString dtmfString = iStateMachine->PhoneEngineInfo()->DtmfString(); |
|
473 |
|
474 if ( dtmfString.Length() ) |
|
475 { |
|
476 // Show the DTMF Wait Character confirmation query |
|
477 TPhoneCmdParamQuery queryParam; |
|
478 queryParam.SetQueryType( EPhoneQueryDialog ); |
|
479 queryParam.SetQueryResourceId( |
|
480 CPhoneMainResourceResolver::Instance()->ResolveResourceID( |
|
481 EPhoneDtmfWaitCharacterConfirmationQuery ) ); |
|
482 |
|
483 // Append the PhoneEngine's current DTMF String to the query's prompt |
|
484 HBufC* queryPrompt = StringLoader::LoadLC( |
|
485 CPhoneMainResourceResolver::Instance()->ResolveResourceID( |
|
486 EPhoneDtmfWaitCharacterConfirmationQueryText ), |
|
487 dtmfString ); |
|
488 queryParam.SetQueryPrompt( *queryPrompt ); |
|
489 |
|
490 iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery, |
|
491 &queryParam ); |
|
492 |
|
493 CleanupStack::PopAndDestroy( queryPrompt ); |
|
494 } |
|
495 else |
|
496 { |
|
497 // Stop the asynchronous sending operation the |
|
498 // PhoneEngine may be performing. |
|
499 iStateMachine->SendPhoneEngineMessage( |
|
500 MPEPhoneModel::EPEMessageStopDTMFSending ); |
|
501 |
|
502 // Prompt for more characters by showing DTMF query with empty string |
|
503 HBufC* emptyString = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
|
504 TPtr ptr( emptyString->Des() ); |
|
505 |
|
506 ShowDtmfTextQueryL( |
|
507 CPhoneMainResourceResolver::Instance()-> |
|
508 ResolveResourceID( EPhoneDtmfNumberQuery ), |
|
509 CPhoneMainResourceResolver::Instance()-> |
|
510 ResolveResourceID( EPhoneSendDtmfEmptyEditBoxCBA ), |
|
511 CPhoneMainResourceResolver::Instance()-> |
|
512 ResolveResourceID( EPhoneSendDtmfNormalEditBoxCBA ), |
|
513 &ptr ); |
|
514 |
|
515 CleanupStack::PopAndDestroy( emptyString ); |
|
516 } |
|
517 } |
|
518 |
|
519 // ----------------------------------------------------------- |
|
520 // CPhoneStateInCall::CancelDTMFSendingL |
|
521 // ----------------------------------------------------------- |
|
522 // |
|
523 void CPhoneStateInCall::CancelDTMFSendingL() |
|
524 { |
|
525 __LOGMETHODSTARTEND(EPhoneControl, |
|
526 "CPhoneStateInCall::CancelDTMFSendingL()" ); |
|
527 // Remove the Sending... note |
|
528 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveDtmfNote ); |
|
529 } |
|
530 |
|
531 // ----------------------------------------------------------- |
|
532 // CPhoneStateInCall::HandleDtmfPromptSpeedDialL |
|
533 // ----------------------------------------------------------- |
|
534 // |
|
535 void CPhoneStateInCall::HandleDTMFPromptSpeedDialL() |
|
536 { |
|
537 __LOGMETHODSTARTEND(EPhoneControl, |
|
538 "CPhoneStateInCall::HandleDTMFPromptSpeedDialL()" ); |
|
539 // Remove the Sending... note |
|
540 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote ); |
|
541 |
|
542 // Prompt for speed dial number |
|
543 HBufC* emptyString = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
|
544 TPtr ptr( emptyString->Des() ); |
|
545 |
|
546 // If the Search softkey is selected before a speed dial number is entered, |
|
547 // revert back to the DTMF query |
|
548 ShowDtmfTextQueryL( |
|
549 CPhoneMainResourceResolver::Instance()-> |
|
550 ResolveResourceID( EPhoneDtmfSpeedDialNumberQuery ), |
|
551 CPhoneMainResourceResolver::Instance()-> |
|
552 ResolveResourceID( EPhoneSendDtmfEmptyEditBoxCBA ), |
|
553 CPhoneMainResourceResolver::Instance()-> |
|
554 ResolveResourceID( EPhoneDtmfSpeedDialNormalEditBoxCBA ), |
|
555 &ptr ); |
|
556 |
|
557 CleanupStack::PopAndDestroy( emptyString ); |
|
558 } |
|
559 |
|
560 // ----------------------------------------------------------- |
|
561 // CPhoneStateInCall::HandleCommandL |
|
562 // ----------------------------------------------------------- |
|
563 // |
|
564 EXPORT_C TBool CPhoneStateInCall::HandleCommandL( TInt aCommand ) |
|
565 { |
|
566 __LOGMETHODSTARTEND( EPhoneControl, |
|
567 "CPhoneStateInCall::HandleCommandL()" ); |
|
568 __PHONELOG1 ( EBasic, EPhoneControl, |
|
569 "CPhoneStateInCall::HandleCommandL() - aCommand = %d ", aCommand ); |
|
570 TBool commandStatus = ETrue; |
|
571 |
|
572 switch( aCommand ) |
|
573 { |
|
574 case EPhoneInCallCmdDialer: |
|
575 BeginTransEffectLC( ENumberEntryCreate ); |
|
576 if ( !IsNumberEntryUsedL() ) |
|
577 { |
|
578 CreateNumberEntryL(); |
|
579 } |
|
580 SetNumberEntryVisibilityL(ETrue ); |
|
581 EndTransEffect(); |
|
582 break; |
|
583 case EPhoneCmdOptions: |
|
584 OpenMenuBarL(); |
|
585 break; |
|
586 |
|
587 case EPhoneDtmfDialerCancel: |
|
588 { |
|
589 CloseDTMFEditorL(); |
|
590 |
|
591 // Activate DTMF list query when cancel is pressed. |
|
592 // Forwards command to the framework |
|
593 HandleCommandL( EPhoneInCallCmdDtmfListQuery ); |
|
594 } |
|
595 break; |
|
596 case EPhoneDtmfDialerExit: |
|
597 { |
|
598 CloseDTMFEditorL(); |
|
599 } |
|
600 break; |
|
601 |
|
602 case EPhoneInCallCmdEndThisActiveCall: |
|
603 CPhoneState::DisconnectCallL(); |
|
604 break; |
|
605 |
|
606 case EPhoneCallComingCmdReject: // fall through |
|
607 case EPhoneInCallCmdReject: |
|
608 iStateMachine->SendPhoneEngineMessage( |
|
609 MPEPhoneModel::EPEMessageReject ); |
|
610 break; |
|
611 |
|
612 case EPhoneInCallCmdMute: // fall through |
|
613 case EPhoneInCallCmdUnmute: |
|
614 iStateMachine->PhoneEngineInfo()->SetAudioMuteCommand( |
|
615 ( aCommand == EPhoneInCallCmdMute ) ); |
|
616 iStateMachine->SendPhoneEngineMessage( |
|
617 MPEPhoneModel::EPEMessageSetAudioMute ); |
|
618 break; |
|
619 //DTMF list query - dialog |
|
620 case EPhoneInCallCmdDtmfListQuery: |
|
621 LaunchDtmfListQueryL(); |
|
622 break; |
|
623 |
|
624 //DTMF list query - Search |
|
625 case EPhoneInCallCmdDtmfListViewSearch: |
|
626 LaunchDtmfListViewSearchDialogL(); |
|
627 break; |
|
628 |
|
629 //DTMF manual entry |
|
630 case EPhoneInCallCmdDtmfManualQuery: |
|
631 if ( iOnScreenDialer ) |
|
632 { |
|
633 ShowDtmfDialerL(); |
|
634 } |
|
635 else |
|
636 { |
|
637 LaunchDtmfManualQueryL(); |
|
638 } |
|
639 break; |
|
640 |
|
641 // DTMF manual entry - Search |
|
642 case EPhoneCmdDtmfSearch: |
|
643 LaunchDtmfSearchDialogL(); |
|
644 break; |
|
645 |
|
646 // DTMF entry - Ok |
|
647 case EPhoneCmdDtmfOk: |
|
648 SendDtmfL(); |
|
649 break; |
|
650 |
|
651 // DTMF Speed entry - Ok |
|
652 case EPhoneCmdDtmfSpeedDialOk: |
|
653 SendDtmfSpeedDialNumberL(); |
|
654 break; |
|
655 |
|
656 // DTMF sending - Cancel |
|
657 case EPhoneInCallCmdCancelSendingDtmfString: |
|
658 // Stop the asynchronous sending operation the |
|
659 // PhoneEngine may be performing. |
|
660 iStateMachine->SendPhoneEngineMessage( |
|
661 MPEPhoneModel::EPEMessageStopDTMFSending ); |
|
662 // Remove DTMF sending from screen |
|
663 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote ); |
|
664 break; |
|
665 |
|
666 // DTMF wait - Ok |
|
667 case EPhoneInCallCmdContinueSendingDtmfString: |
|
668 // Continue sending the DTMF string |
|
669 if( !iDtmfWaitCharTimer ) |
|
670 { |
|
671 iDtmfWaitCharTimer = CPhoneDtmfWaitCharTimer::NewL( |
|
672 iStateMachine ); |
|
673 } |
|
674 iDtmfWaitCharTimer->ButtonPressedL(); |
|
675 break; |
|
676 |
|
677 case EPhoneDialerCmdHelpDtmf: |
|
678 { |
|
679 if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
|
680 { |
|
681 TPtrC contextName( KDATA_DIALER_HLP_SEND_DTMF ); |
|
682 iViewCommandHandle->ExecuteCommandL( |
|
683 EPhoneViewLaunchHelpApplication, |
|
684 0, |
|
685 contextName ); |
|
686 } |
|
687 } |
|
688 break; |
|
689 |
|
690 // New Call - Search |
|
691 case EPhoneInCallCmdNewCallFind: |
|
692 LaunchNewCallSearchDialogL(); |
|
693 break; |
|
694 |
|
695 // New Call - Dialog |
|
696 case EPhoneInCallCmdNewCall: |
|
697 LaunchNewCallQueryL(); |
|
698 break; |
|
699 |
|
700 case EPhoneViewYesSingleItemFetch: |
|
701 HandleSuccessFetchedNumberL(); |
|
702 break; |
|
703 |
|
704 case EPhoneViewNoSingleItemFetch: |
|
705 if ( !iOnScreenDialer ) |
|
706 { |
|
707 HandleFailedFetchedNumberL(); |
|
708 } |
|
709 break; |
|
710 |
|
711 case EPhoneNumberAcqCmdCall: |
|
712 case EPhoneNumberAcqCmdSendCommand: |
|
713 if ( IsVideoCallActiveL() ) |
|
714 { |
|
715 // Get the number entry contents |
|
716 HBufC *phoneNumber = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
|
717 TPtr ptr( phoneNumber->Des() ); |
|
718 TPhoneCmdParamString stringParam; |
|
719 stringParam.SetString( &ptr ); |
|
720 iViewCommandHandle->ExecuteCommand( |
|
721 EPhoneViewGetNumberFromEntry, |
|
722 &stringParam ); |
|
723 iStateMachine->PhoneEngineInfo()->SetPhoneNumber( ptr ); |
|
724 |
|
725 if ( iStateMachine->PhoneEngineInfo()->PhoneNumberIsServiceCode() || |
|
726 phoneNumber->Des().Length() < KPhoneValidPhoneNumberLength ) |
|
727 { |
|
728 // Send a manual control sequence by providing number |
|
729 // information with dial command |
|
730 CallFromNumberEntryL(); |
|
731 } |
|
732 else |
|
733 { |
|
734 iStateMachine->SendPhoneEngineMessage( |
|
735 MPEPhoneModel::EPEMessageCheckEmergencyNumber ); |
|
736 } |
|
737 CleanupStack::PopAndDestroy( phoneNumber ); |
|
738 } |
|
739 else |
|
740 { |
|
741 // Provide number information with dial command |
|
742 CallFromNumberEntryL(); |
|
743 } |
|
744 break; |
|
745 |
|
746 case EPhoneInCallCmdHelp: |
|
747 if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
|
748 { |
|
749 TPtrC contextName; |
|
750 if ( IsVideoCallActiveL() ) |
|
751 { |
|
752 contextName.Set( KINCAL_HLP_VIDEOCALL() ); |
|
753 } |
|
754 else |
|
755 { |
|
756 contextName.Set( KINCAL_HLP_CALL_HANDLING() ); |
|
757 } |
|
758 iViewCommandHandle->ExecuteCommandL( |
|
759 EPhoneViewLaunchHelpApplication, 0, contextName ); |
|
760 } |
|
761 break; |
|
762 |
|
763 case EPhoneCmdEnd: |
|
764 CloseDtmfQueryL(); |
|
765 CPhoneState::DisconnectCallL(); |
|
766 break; |
|
767 |
|
768 // 'End all calls' from menu |
|
769 case EPhoneInCallCmdEndAllCalls: |
|
770 iStateMachine->SendPhoneEngineMessage( |
|
771 MPEPhoneModel::EPEMessageReleaseAll ); |
|
772 break; |
|
773 |
|
774 case EPhoneInCallCmdEndThisOutgoingCall: |
|
775 DisconnectOutgoingCallL(); |
|
776 break; |
|
777 |
|
778 case EPhoneInCallCmdGoToIdle: |
|
779 { |
|
780 // Bring Idle app to foreground |
|
781 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground ); |
|
782 break; |
|
783 } |
|
784 |
|
785 case EPhoneNumberAcqCmdVideoCall: |
|
786 {// Create normal voice call, if number is emergency number. |
|
787 // Get the number entry contents |
|
788 HBufC* phoneNumber = PhoneNumberFromEntryLC(); |
|
789 iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber ); |
|
790 iStateMachine->SendPhoneEngineMessage( |
|
791 MPEPhoneModel::EPEMessageCheckEmergencyNumber ); |
|
792 CleanupStack::PopAndDestroy( phoneNumber );} |
|
793 break; |
|
794 |
|
795 case EPhoneInCallCmdLockKeypad: |
|
796 case EPhoneInCallCmdLockScreen: |
|
797 LockKeypadL(); |
|
798 break; |
|
799 |
|
800 case EPhoneViewOpenCallHandling: |
|
801 if ( iOnScreenDialer && IsNumberEntryUsedL() ) |
|
802 { |
|
803 // Remove number entry from screen |
|
804 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
805 HandleNumberEntryClearedL(); |
|
806 } |
|
807 commandStatus = CPhoneState::HandleCommandL( aCommand ); |
|
808 break; |
|
809 |
|
810 default: |
|
811 commandStatus = CPhoneState::HandleCommandL( aCommand ); |
|
812 break; |
|
813 } |
|
814 |
|
815 return commandStatus; |
|
816 } |
|
817 |
|
818 // ----------------------------------------------------------- |
|
819 // CPhoneStateInCall::CreateNumberEntryL |
|
820 // ----------------------------------------------------------- |
|
821 // |
|
822 EXPORT_C void CPhoneStateInCall::CreateNumberEntryL() |
|
823 { |
|
824 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneStateInCall::CreateNumberEntryL( ) "); |
|
825 iViewCommandHandle->ExecuteCommandL( EPhoneViewCreateNumberEntry ); |
|
826 } |
|
827 |
|
828 // ----------------------------------------------------------- |
|
829 // CPhoneStateInCall::OpenMenuBarL |
|
830 // ----------------------------------------------------------- |
|
831 // |
|
832 EXPORT_C void CPhoneStateInCall::OpenMenuBarL() |
|
833 { |
|
834 __LOGMETHODSTARTEND(EPhoneControl, |
|
835 "CPhoneStateInCall::OpenMenuBarL()" ); |
|
836 TInt resourceId; |
|
837 |
|
838 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
839 { |
|
840 resourceId = EPhoneDtmfDialerMenubar; |
|
841 } |
|
842 else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() ) |
|
843 { |
|
844 resourceId = CustomizedDialerMenuResourceIdL(); |
|
845 } |
|
846 else if ( IsNumberEntryVisibleL() ) |
|
847 { |
|
848 resourceId = EPhoneCallHandlingMenubarWithNumberEntry; |
|
849 } |
|
850 else |
|
851 { |
|
852 resourceId = EPhoneCallHandlingMenubar; |
|
853 } |
|
854 |
|
855 TPhoneCmdParamInteger integerParam; |
|
856 integerParam.SetInteger( |
|
857 CPhoneMainResourceResolver::Instance()-> |
|
858 ResolveResourceID( resourceId ) ); |
|
859 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, |
|
860 &integerParam ); |
|
861 } |
|
862 |
|
863 // ----------------------------------------------------------- |
|
864 // CPhoneStateInCall::LaunchNewCallQueryL |
|
865 // ----------------------------------------------------------- |
|
866 // |
|
867 EXPORT_C void CPhoneStateInCall::LaunchNewCallQueryL() |
|
868 { |
|
869 __LOGMETHODSTARTEND(EPhoneControl, |
|
870 "CPhoneStateInCall::LaunchNewCallQueryL()" ); |
|
871 |
|
872 if ( iOnScreenDialer ) |
|
873 { |
|
874 //In touch, just activate dialer |
|
875 BeginTransEffectLC( ENumberEntryCreate ); |
|
876 if ( IsNumberEntryUsedL() ) |
|
877 { |
|
878 SetNumberEntryVisibilityL(ETrue); |
|
879 } |
|
880 else |
|
881 { |
|
882 CreateNumberEntryL(); |
|
883 SetNumberEntryVisibilityL(ETrue); |
|
884 } |
|
885 EndTransEffect(); |
|
886 } |
|
887 else |
|
888 { |
|
889 HBufC *text = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
|
890 TPtr ptr( text->Des() ); |
|
891 |
|
892 // Pre-populate the query with the number entry contents, |
|
893 // if it exists |
|
894 if ( IsNumberEntryUsedL() ) |
|
895 { |
|
896 // get the number entry contents |
|
897 TPhoneCmdParamString stringParam; |
|
898 stringParam.SetString( &ptr ); |
|
899 iViewCommandHandle->ExecuteCommandL( |
|
900 EPhoneViewGetLocalizedNumberFromEntry, |
|
901 &stringParam ); |
|
902 } |
|
903 |
|
904 // Show text query with send key enabled |
|
905 const TBool enableSendKey = ETrue; |
|
906 |
|
907 CPhoneState::ShowTextQueryL( |
|
908 CPhoneMainResourceResolver::Instance()-> |
|
909 ResolveResourceID( EPhoneNewCallPhoneNumberEditor ), |
|
910 CPhoneMainResourceResolver::Instance()-> |
|
911 ResolveResourceID( EPhoneCallHandlingNewCallFindCBA ), |
|
912 CPhoneMainResourceResolver::Instance()-> |
|
913 ResolveResourceID( EPhoneCallHandlingNewCallCallCBA ), |
|
914 &ptr, |
|
915 enableSendKey ); |
|
916 |
|
917 CleanupStack::PopAndDestroy( text ); |
|
918 } |
|
919 |
|
920 } |
|
921 |
|
922 // ----------------------------------------------------------- |
|
923 // CPhoneStateInCall::CallFetchedNumberL |
|
924 // ----------------------------------------------------------- |
|
925 // |
|
926 EXPORT_C void CPhoneStateInCall::CallFetchedNumberL( |
|
927 const TDesC& aFetchedNumber ) |
|
928 { |
|
929 __LOGMETHODSTARTEND(EPhoneControl, |
|
930 "CPhoneStateInCall::CallFetchedNumberL()" ); |
|
931 __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), |
|
932 Panic( EPhoneCtrlInvariant ) ); |
|
933 |
|
934 // Store the phone number |
|
935 iStateMachine->PhoneEngineInfo()->SetPhoneNumber( aFetchedNumber ); |
|
936 |
|
937 DialVoiceCallL(); |
|
938 } |
|
939 |
|
940 // ----------------------------------------------------------- |
|
941 // CPhoneStateInCall::SendDtmfL |
|
942 // ----------------------------------------------------------- |
|
943 // |
|
944 void CPhoneStateInCall::SendDtmfL() |
|
945 { |
|
946 __LOGMETHODSTARTEND(EPhoneControl, |
|
947 "CPhoneStateInCall::SendDtmfL()" ); |
|
948 __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), |
|
949 Panic( EPhoneCtrlInvariant ) ); |
|
950 |
|
951 // First get the DTMF sequence from dialog |
|
952 TPhoneCmdParamString dtmfSequence; |
|
953 HBufC *content = HBufC::NewLC( KPEDtmfMaxLength ); |
|
954 TPtr ptr( content->Des() ); |
|
955 dtmfSequence.SetString( &ptr ); |
|
956 |
|
957 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
958 { |
|
959 iViewCommandHandle->ExecuteCommand( |
|
960 EPhoneViewGetNumberFromEntry, |
|
961 &dtmfSequence ); |
|
962 |
|
963 CloseDTMFEditorL(); |
|
964 } |
|
965 else |
|
966 { |
|
967 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetTextQueryContent, |
|
968 &dtmfSequence ); |
|
969 } |
|
970 |
|
971 // Send the DTMF |
|
972 if ( ptr.Length() ) |
|
973 { |
|
974 iStateMachine->PhoneEngineInfo()->SetDtmfStringCommand( ptr ); |
|
975 iStateMachine->SendPhoneEngineMessage( |
|
976 MPEPhoneModel::EPEMessageSendDTMF ); |
|
977 } |
|
978 |
|
979 CleanupStack::PopAndDestroy( content ); |
|
980 } |
|
981 |
|
982 // ----------------------------------------------------------- |
|
983 // CPhoneStateInCall::SendDtmfSpeedDialNumberL |
|
984 // ----------------------------------------------------------- |
|
985 // |
|
986 void CPhoneStateInCall::SendDtmfSpeedDialNumberL() |
|
987 { |
|
988 __LOGMETHODSTARTEND(EPhoneControl, |
|
989 "CPhoneStateInCall::SendDtmfSpeedDialNumberL()" ); |
|
990 // First get the DTMF sequence from dialog |
|
991 TPhoneCmdParamString dtmfSequence; |
|
992 HBufC *content = HBufC::NewLC( KPEDtmfMaxLength ); |
|
993 TPtr ptr( content->Des() ); |
|
994 dtmfSequence.SetString( &ptr ); |
|
995 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetTextQueryContent, |
|
996 &dtmfSequence ); |
|
997 |
|
998 // Prefix the query content string with the speed dial character '+' |
|
999 _LIT( KSpeedDialPrefix, "+" ); |
|
1000 ptr.Insert( 0, KSpeedDialPrefix ); |
|
1001 |
|
1002 // Send the DTMF |
|
1003 iStateMachine->PhoneEngineInfo()->SetDtmfStringCommand( ptr ); |
|
1004 iStateMachine->SendPhoneEngineMessage( |
|
1005 MPEPhoneModel::EPEMessageSendDTMF ); |
|
1006 |
|
1007 CleanupStack::PopAndDestroy( content ); |
|
1008 } |
|
1009 |
|
1010 // ----------------------------------------------------------- |
|
1011 // CPhoneStateInCall::LaunchDtmfManualQueryL |
|
1012 // ----------------------------------------------------------- |
|
1013 // |
|
1014 void CPhoneStateInCall::LaunchDtmfManualQueryL() |
|
1015 { |
|
1016 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateInCall::LaunchDtmfManualQueryL()" ); |
|
1017 |
|
1018 HBufC *text = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
|
1019 TPtr ptr( text->Des() ); |
|
1020 // Pre-populate the query with the number entry contents, if it exists |
|
1021 if ( IsNumberEntryUsedL() ) |
|
1022 { |
|
1023 // get the number entry contents |
|
1024 TPhoneCmdParamString stringParam; |
|
1025 stringParam.SetString( &ptr ); |
|
1026 iViewCommandHandle->ExecuteCommandL( |
|
1027 EPhoneViewGetLocalizedNumberFromEntry, |
|
1028 &stringParam ); |
|
1029 } |
|
1030 |
|
1031 ShowDtmfTextQueryL( |
|
1032 CPhoneMainResourceResolver::Instance()-> |
|
1033 ResolveResourceID( EPhoneDtmfNumberQuery ), |
|
1034 CPhoneMainResourceResolver::Instance()-> |
|
1035 ResolveResourceID( EPhoneSendDtmfEmptyEditBoxCBA ), |
|
1036 CPhoneMainResourceResolver::Instance()-> |
|
1037 ResolveResourceID( EPhoneSendDtmfNormalEditBoxCBA ), |
|
1038 &ptr ); |
|
1039 CleanupStack::PopAndDestroy( text ); |
|
1040 } |
|
1041 |
|
1042 // ----------------------------------------------------------- |
|
1043 // CPhoneStateInCall::LaunchDtmfListQueryL |
|
1044 // ----------------------------------------------------------- |
|
1045 // |
|
1046 void CPhoneStateInCall::LaunchDtmfListQueryL() |
|
1047 { |
|
1048 __LOGMETHODSTARTEND(EPhoneControl, |
|
1049 "CPhoneStateInCall::LaunchDtmfListQueryL()" ); |
|
1050 |
|
1051 // Fetch active call's id from view |
|
1052 TPhoneCmdParamCallStateData callStateData; |
|
1053 callStateData.SetCallState( EPEStateConnected ); |
|
1054 iViewCommandHandle->HandleCommandL( |
|
1055 EPhoneViewGetCallIdByState, &callStateData ); |
|
1056 |
|
1057 if ( callStateData.CallId() == KErrNotFound ) |
|
1058 { |
|
1059 callStateData.SetCallState( EPEStateConnecting ); |
|
1060 iViewCommandHandle->HandleCommandL( |
|
1061 EPhoneViewGetCallIdByState, &callStateData ); |
|
1062 } |
|
1063 |
|
1064 if ( callStateData.CallId() > KErrNotFound ) |
|
1065 { |
|
1066 //Get Array of DTMF strings from PhoneEngine |
|
1067 const CDesCArray& dtmfArray = |
|
1068 iStateMachine->PhoneEngineInfo()-> |
|
1069 RemotePredefinedDtmfStrings( callStateData.CallId() ); |
|
1070 |
|
1071 TInt itemCount = dtmfArray.Count(); |
|
1072 if ( itemCount ) |
|
1073 { |
|
1074 |
|
1075 TPhoneCmdParamString stringParam; |
|
1076 //Go through the array and send each dtmf string |
|
1077 //to view. |
|
1078 for ( TInt i=0; i<itemCount; i++ ) |
|
1079 { |
|
1080 TPtrC16 ptrC16 = dtmfArray.MdcaPoint( i ); |
|
1081 HBufC* string = ptrC16.AllocL(); |
|
1082 CleanupStack::PushL( string ); |
|
1083 TPtr ptr( string->Des() ); |
|
1084 |
|
1085 stringParam.SetString( &ptr ); |
|
1086 iViewCommandHandle->ExecuteCommandL( |
|
1087 EPhoneViewSetListQueryString, |
|
1088 &stringParam ); |
|
1089 CleanupStack::PopAndDestroy( string ); |
|
1090 string = NULL; |
|
1091 } |
|
1092 } |
|
1093 } |
|
1094 else |
|
1095 { |
|
1096 __PHONELOG( EOnlyFatal, EPhoneControl, |
|
1097 "CPhoneStateInCall::LaunchDtmfListQueryL() No found valid call id" ); |
|
1098 } |
|
1099 |
|
1100 // if there is a connected call only then open DtmfListQuery. |
|
1101 if ( IsAnyConnectedCalls() ) |
|
1102 { |
|
1103 TPhoneCmdParamQuery queryDialogParam; |
|
1104 queryDialogParam.SetQueryType( EPhoneDtmfListQueryDialog ); |
|
1105 queryDialogParam.SetQueryResourceId( |
|
1106 CPhoneMainResourceResolver::Instance()-> |
|
1107 ResolveResourceID( EPhoneDtmfNumberListQuery ) ); |
|
1108 |
|
1109 // Display dialog |
|
1110 iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery, |
|
1111 &queryDialogParam ); |
|
1112 } |
|
1113 } |
|
1114 |
|
1115 // ----------------------------------------------------------- |
|
1116 // CPhoneStateInCall::LaunchDtmfSearchDialogL |
|
1117 // ----------------------------------------------------------- |
|
1118 // |
|
1119 void CPhoneStateInCall::LaunchDtmfSearchDialogL() |
|
1120 { |
|
1121 __LOGMETHODSTARTEND(EPhoneControl, |
|
1122 "CPhoneStateInCall::LaunchDtmfSearchDialogL()" ); |
|
1123 |
|
1124 TPhoneCmdParamInteger integerParam; |
|
1125 integerParam.SetInteger( EPhoneDtmfNumberQuery ); |
|
1126 iViewCommandHandle->HandleCommandL( EPhoneViewOpenSingleItemFetchDialog, &integerParam ); |
|
1127 } |
|
1128 |
|
1129 // ----------------------------------------------------------- |
|
1130 // CPhoneStateInCall::LaunchDtmfListViewSearchDialogL |
|
1131 // ----------------------------------------------------------- |
|
1132 // |
|
1133 void CPhoneStateInCall::LaunchDtmfListViewSearchDialogL() |
|
1134 { |
|
1135 __LOGMETHODSTARTEND(EPhoneControl, |
|
1136 "CPhoneStateInCall::LaunchDtmfListViewSearchDialogL()" ); |
|
1137 |
|
1138 TPhoneCmdParamInteger integerParam; |
|
1139 integerParam.SetInteger( EPhoneDtmfFetchTitle ); |
|
1140 iViewCommandHandle->HandleCommandL( EPhoneViewOpenSingleItemFetchDialog, &integerParam ); |
|
1141 } |
|
1142 |
|
1143 // ----------------------------------------------------------- |
|
1144 // CPhoneStateInCall::LaunchNewCallSearchDialogL |
|
1145 // ----------------------------------------------------------- |
|
1146 // |
|
1147 void CPhoneStateInCall::LaunchNewCallSearchDialogL() |
|
1148 { |
|
1149 __LOGMETHODSTARTEND(EPhoneControl, |
|
1150 "CPhoneStateInCall::LaunchNewCallSearchDialogL()" ); |
|
1151 |
|
1152 TPhoneCmdParamBoolean blockingDialogStatus; |
|
1153 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetBlockingDialogStatus, |
|
1154 &blockingDialogStatus ); |
|
1155 // Prevents unlegal use of singleitem fetch |
|
1156 if ( !blockingDialogStatus.Boolean() ) |
|
1157 { |
|
1158 |
|
1159 TPhoneCmdParamInteger integerParam; |
|
1160 integerParam.SetInteger( EPhoneNewCallFetchTitle ); |
|
1161 iViewCommandHandle->HandleCommandL( EPhoneViewOpenSingleItemFetchDialog, &integerParam ); |
|
1162 } |
|
1163 } |
|
1164 |
|
1165 // --------------------------------------------------------- |
|
1166 // CPhoneStateInCall::IsVideoCallActiveL |
|
1167 // --------------------------------------------------------- |
|
1168 // |
|
1169 EXPORT_C TBool CPhoneStateInCall::IsVideoCallActiveL() |
|
1170 { |
|
1171 __LOGMETHODSTARTEND(EPhoneControl, |
|
1172 "CPhoneStateInCall::IsVideoCallActive()" ); |
|
1173 TBool retVal = EFalse; |
|
1174 // Fetch active call's id from view |
|
1175 TPhoneCmdParamCallStateData callStateData; |
|
1176 callStateData.SetCallState( EPEStateConnected ); |
|
1177 iViewCommandHandle->HandleCommandL( |
|
1178 EPhoneViewGetCallIdByState, &callStateData ); |
|
1179 |
|
1180 if ( callStateData.CallId() > KErrNotFound ) |
|
1181 { |
|
1182 retVal = IsVideoCall( callStateData.CallId() ); |
|
1183 } |
|
1184 |
|
1185 return retVal; |
|
1186 } |
|
1187 |
|
1188 // --------------------------------------------------------- |
|
1189 // CPhoneStateInCall::IsVideoCallRingingL |
|
1190 // --------------------------------------------------------- |
|
1191 // |
|
1192 |
|
1193 EXPORT_C TBool CPhoneStateInCall::IsVideoCallRingingL() |
|
1194 { |
|
1195 __LOGMETHODSTARTEND(EPhoneControl, |
|
1196 "CPhoneStateInCall::IsVideoCallRingingL()" ); |
|
1197 TBool retVal = EFalse; |
|
1198 // Fetch ringing call id from view |
|
1199 TPhoneCmdParamCallStateData callStateData; |
|
1200 callStateData.SetCallState( EPEStateRinging ); |
|
1201 iViewCommandHandle->HandleCommandL( |
|
1202 EPhoneViewGetCallIdByState, &callStateData ); |
|
1203 |
|
1204 if ( callStateData.CallId() > KErrNotFound ) |
|
1205 { |
|
1206 retVal = IsVideoCall( callStateData.CallId() ); |
|
1207 } |
|
1208 |
|
1209 return retVal; |
|
1210 } |
|
1211 |
|
1212 // --------------------------------------------------------- |
|
1213 // CPhoneStateInCall::GetRingingCallL |
|
1214 // --------------------------------------------------------- |
|
1215 // |
|
1216 |
|
1217 EXPORT_C TInt CPhoneStateInCall::GetRingingCallL() |
|
1218 { |
|
1219 __LOGMETHODSTARTEND(EPhoneControl, |
|
1220 "CPhoneStateInCall::GetRingingCallL()" ); |
|
1221 |
|
1222 // Fetch ringing call id from view |
|
1223 TPhoneCmdParamCallStateData callStateData; |
|
1224 callStateData.SetCallState( EPEStateRinging ); |
|
1225 iViewCommandHandle->HandleCommandL( |
|
1226 EPhoneViewGetCallIdByState, &callStateData ); |
|
1227 |
|
1228 return callStateData.CallId(); |
|
1229 } |
|
1230 |
|
1231 // ----------------------------------------------------------- |
|
1232 // CPhoneStateInCall::DisconnectOutgoingCallL |
|
1233 // ----------------------------------------------------------- |
|
1234 // |
|
1235 EXPORT_C void CPhoneStateInCall::DisconnectOutgoingCallL() |
|
1236 { |
|
1237 __LOGMETHODSTARTEND(EPhoneControl, |
|
1238 "CPhoneStateInCall::DisconnectOutgoingCallL()"); |
|
1239 // Fetch alerting call's id from view |
|
1240 TPhoneCmdParamCallStateData callStateData; |
|
1241 callStateData.SetCallState( EPEStateConnecting ); |
|
1242 iViewCommandHandle->HandleCommandL( |
|
1243 EPhoneViewGetCallIdByState, &callStateData ); |
|
1244 |
|
1245 if( callStateData.CallId() == KErrNotFound ) |
|
1246 { |
|
1247 // No connecting call, find the dialing call |
|
1248 callStateData.SetCallState( EPEStateDialing ); |
|
1249 iViewCommandHandle->HandleCommandL( |
|
1250 EPhoneViewGetCallIdByState, &callStateData ); |
|
1251 |
|
1252 if( callStateData.CallId() == KErrNotFound ) |
|
1253 { |
|
1254 // No dialing call, find the disconnectinging call |
|
1255 callStateData.SetCallState( EPEStateDisconnecting ); |
|
1256 iViewCommandHandle->HandleCommandL( |
|
1257 EPhoneViewGetCallIdByState, &callStateData ); |
|
1258 } |
|
1259 else |
|
1260 { |
|
1261 if ( IsNumberEntryUsedL() ) |
|
1262 { |
|
1263 SetNumberEntryVisibilityL(ETrue); |
|
1264 } |
|
1265 } |
|
1266 } |
|
1267 |
|
1268 if( callStateData.CallId() > KErrNotFound ) |
|
1269 { |
|
1270 // Release the call |
|
1271 iStateMachine->SetCallId( callStateData.CallId() ); |
|
1272 iStateMachine->SendPhoneEngineMessage( |
|
1273 MPEPhoneModel::EPEMessageRelease ); |
|
1274 } |
|
1275 else |
|
1276 { |
|
1277 __PHONELOG( EOnlyFatal, EPhoneControl, |
|
1278 "CPhoneStateInCall::DisconnectOutgoingCallL() has negative call id!" ); |
|
1279 __ASSERT_DEBUG( EFalse, Panic( EPhoneCtrlIndexOutOfBounds ) ); |
|
1280 } |
|
1281 } |
|
1282 |
|
1283 // ----------------------------------------------------------------------------- |
|
1284 // CPhoneStateInCall::LockKeysL |
|
1285 // ----------------------------------------------------------------------------- |
|
1286 // |
|
1287 void CPhoneStateInCall::LockKeypadL() |
|
1288 { |
|
1289 __LOGMETHODSTARTEND(EPhoneControl, |
|
1290 "CPhoneStateInCall::LockKeypadL()"); |
|
1291 |
|
1292 if ( !FeatureManager::FeatureSupported( KFeatureIdKeypadNoSlider ) ) |
|
1293 { |
|
1294 TInt state = KErrNone; |
|
1295 TInt err = RProperty::Get( |
|
1296 KPSUidHWRM, |
|
1297 KHWRMGripStatus, |
|
1298 state ); |
|
1299 if ( state == EPSHWRMGripOpen ) |
|
1300 { |
|
1301 SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed ); |
|
1302 } |
|
1303 else |
|
1304 { |
|
1305 iViewCommandHandle->ExecuteCommandL( |
|
1306 EPhoneViewEnableKeyLock ); |
|
1307 } |
|
1308 } |
|
1309 else |
|
1310 { |
|
1311 iViewCommandHandle->ExecuteCommandL( |
|
1312 EPhoneViewEnableKeyLock ); |
|
1313 } |
|
1314 } |
|
1315 |
|
1316 // ----------------------------------------------------------------------------- |
|
1317 // CPhoneStateInCall::HandleSuccessFetchedNumberL |
|
1318 // ----------------------------------------------------------------------------- |
|
1319 // |
|
1320 void CPhoneStateInCall::HandleSuccessFetchedNumberL() |
|
1321 { |
|
1322 __LOGMETHODSTARTEND(EPhoneControl, |
|
1323 "CPhoneStateInCall::HandleSuccessFetchedNumberL()"); |
|
1324 TBuf<KPhoneNumberEntryBufferSize> fetchContent; |
|
1325 fetchContent = iViewCommandHandle->FetchContent(); |
|
1326 |
|
1327 TPhoneCmdParamInteger fetchTypeParam; |
|
1328 iViewCommandHandle->ExecuteCommand( EPhoneViewGetSingleItemFetchType, |
|
1329 &fetchTypeParam ); |
|
1330 TInt fetchType( fetchTypeParam.Integer() ); |
|
1331 |
|
1332 if ( fetchType == EPhoneNewCallFetchTitle ) |
|
1333 { |
|
1334 if ( iOnScreenDialer ) |
|
1335 { |
|
1336 iViewCommandHandle->ExecuteCommandL( |
|
1337 EPhoneViewSetNumberEntryContent, |
|
1338 0, |
|
1339 fetchContent ); |
|
1340 } |
|
1341 // Call the fetched number |
|
1342 CallFetchedNumberL( fetchContent ); |
|
1343 } |
|
1344 else if ( fetchType == EPhoneDtmfFetchTitle ) |
|
1345 { |
|
1346 // Send the DTMF |
|
1347 iStateMachine->PhoneEngineInfo()->SetDtmfStringCommand( fetchContent ); |
|
1348 iStateMachine->SendPhoneEngineMessage( |
|
1349 MPEPhoneModel::EPEMessageSendDTMF ); |
|
1350 } |
|
1351 else if( iCustomization && fetchType > EPhoneRssBaseLast ) |
|
1352 { |
|
1353 // Handle unattended transfer contact fetch |
|
1354 iCustomization->HandleCommandL( fetchType ); |
|
1355 } |
|
1356 else // EPhoneCmdDtmfSearch |
|
1357 { |
|
1358 // Send the DTMF |
|
1359 iStateMachine->PhoneEngineInfo()->SetDtmfStringCommand( fetchContent ); |
|
1360 iStateMachine->SendPhoneEngineMessage( |
|
1361 MPEPhoneModel::EPEMessageSendDTMF ); |
|
1362 } |
|
1363 } |
|
1364 |
|
1365 // ----------------------------------------------------------------------------- |
|
1366 // CPhoneStateInCall::HandleFailedFetchedNumberL |
|
1367 // ----------------------------------------------------------------------------- |
|
1368 // |
|
1369 void CPhoneStateInCall::HandleFailedFetchedNumberL() |
|
1370 { |
|
1371 __LOGMETHODSTARTEND(EPhoneControl, |
|
1372 "CPhoneStateInCall::HandleFailedFetchedNumberL()"); |
|
1373 |
|
1374 TPhoneCmdParamInteger fetchTypeParam; |
|
1375 iViewCommandHandle->ExecuteCommand( EPhoneViewGetSingleItemFetchType, |
|
1376 &fetchTypeParam ); |
|
1377 TInt fetchType( fetchTypeParam.Integer() ); |
|
1378 |
|
1379 if ( fetchType == EPhoneNewCallFetchTitle ) |
|
1380 { |
|
1381 HandleCommandL( EPhoneInCallCmdNewCall ); |
|
1382 } |
|
1383 else if ( fetchType == EPhoneDtmfFetchTitle ) |
|
1384 { |
|
1385 HandleCommandL( EPhoneInCallCmdDtmfListQuery ); |
|
1386 } |
|
1387 else // EPhoneCmdDtmfSearch |
|
1388 { |
|
1389 HandleCommandL( EPhoneDtmfFetchTitle ); |
|
1390 } |
|
1391 } |
|
1392 |
|
1393 |
|
1394 // ----------------------------------------------------------------------------- |
|
1395 // CPhoneStateInCall::CloseDtmfQueryL |
|
1396 // ----------------------------------------------------------------------------- |
|
1397 // |
|
1398 EXPORT_C void CPhoneStateInCall::CloseDtmfQueryL() |
|
1399 { |
|
1400 __LOGMETHODSTARTEND(EPhoneControl, |
|
1401 "CPhoneStateInCall::CloseDtmfQueryL()"); |
|
1402 TPhoneCmdParamInteger fetchTypeParam; |
|
1403 iViewCommandHandle->ExecuteCommand( EPhoneViewGetSingleItemFetchType, |
|
1404 &fetchTypeParam ); |
|
1405 TInt fetchType( fetchTypeParam.Integer() ); |
|
1406 |
|
1407 // If DTMF fetch is active then remove numberentry because it is considered |
|
1408 // to be a part of DTMF fetch operation. |
|
1409 if ( fetchType == EPhoneDtmfFetchTitle ) |
|
1410 { |
|
1411 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
1412 iViewCommandHandle->ExecuteCommand( EPhoneViewCloseSingleItemFetchDialog ); |
|
1413 } |
|
1414 |
|
1415 // Close dtmf dialer or dtmf query if exist. |
|
1416 if ( IsDTMFEditorVisibleL() ) |
|
1417 { |
|
1418 CloseDTMFEditorL(); |
|
1419 } |
|
1420 } |
|
1421 |
|
1422 // ----------------------------------------------------------- |
|
1423 // CPhoneStateInCall::PhoneNumberAvailableInPhoneEngineL |
|
1424 // ----------------------------------------------------------- |
|
1425 // |
|
1426 EXPORT_C void CPhoneStateInCall::PhoneNumberAvailableInPhoneEngineL( TInt aCallId ) |
|
1427 { |
|
1428 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneStateInCall::PhoneNumberAvailableInPhoneEngineL() "); |
|
1429 TPhoneCmdParamBoolean phoneNumberAvailable; |
|
1430 |
|
1431 const TBool contactInfoAvailable = |
|
1432 iStateMachine->PhoneEngineInfo()->RemoteName( aCallId ).Length() || |
|
1433 iStateMachine->PhoneEngineInfo()->RemoteCompanyName( aCallId ).Length(); |
|
1434 |
|
1435 if( iStateMachine->PhoneEngineInfo()->RemotePhoneNumber( aCallId ).Length() || |
|
1436 contactInfoAvailable ) |
|
1437 { |
|
1438 // Phone number is available straight or via contact info |
|
1439 // so switch to video/voice call is possible |
|
1440 __PHONELOG( EBasic, EPhoneControl, "CPhoneStateInCall::PhoneNumberAvailableInPhoneEngineL - Phonenumber is available" ); |
|
1441 phoneNumberAvailable.SetBoolean( ETrue ); |
|
1442 } |
|
1443 else |
|
1444 { |
|
1445 __PHONELOG( EBasic, EPhoneControl, "CPhoneStateInCall::PhoneNumberAvailableInPhoneEngineL - Phonenumber is not available" ); |
|
1446 phoneNumberAvailable.SetBoolean( EFalse ); |
|
1447 } |
|
1448 |
|
1449 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetPhoneNumberAvailableInPhoneEngine, |
|
1450 &phoneNumberAvailable ); |
|
1451 } |
|
1452 |
|
1453 |
|
1454 // ----------------------------------------------------------------------------- |
|
1455 // CPhoneStateInCall::HandleEndKeyPressL |
|
1456 // ----------------------------------------------------------------------------- |
|
1457 // |
|
1458 void CPhoneStateInCall::HandleEndKeyPressL( TPhoneKeyEventMessages aMessage ) |
|
1459 { |
|
1460 __LOGMETHODSTARTEND(EPhoneControl, |
|
1461 "CPhoneStateInCall::HandleEndKeyPressL()"); |
|
1462 // handle long press of end key |
|
1463 if ( aMessage == EPhoneKeyLongPress ) |
|
1464 { |
|
1465 // Fetch active call's id from view |
|
1466 TPhoneCmdParamCallStateData callStateData; |
|
1467 callStateData.SetCallState( EPEStateConnected ); |
|
1468 iViewCommandHandle->HandleCommandL( |
|
1469 EPhoneViewGetCallIdByState, &callStateData ); |
|
1470 |
|
1471 if( IsVideoCall( callStateData.CallId() ) ) |
|
1472 { |
|
1473 // Video call can be released only after we get response to VT Shutdown Command |
|
1474 CPhoneMediatorFactory::Instance()->Sender()->IssueCommand( |
|
1475 KMediatorVideoTelephonyDomain, |
|
1476 KCatPhoneToVideotelCommands, |
|
1477 EVtCmdReleaseDataport, |
|
1478 TVersion( KPhoneToVideotelCmdVersionMajor, |
|
1479 KPhoneToVideotelCmdVersionMinor, |
|
1480 KPhoneToVideotelCmdVersionBuild ), |
|
1481 KNullDesC8, |
|
1482 CPhoneTerminateAllConnectionsCommand::NewL( *iStateMachine ) ); |
|
1483 } |
|
1484 else |
|
1485 { |
|
1486 // Close all connections |
|
1487 iStateMachine->SendPhoneEngineMessage( |
|
1488 MPEPhoneModel::EPEMessageTerminateAllConnections ); |
|
1489 |
|
1490 if ( IsNumberEntryContentStored() ) |
|
1491 { |
|
1492 ClearNumberEntryContentCache(); |
|
1493 } |
|
1494 } |
|
1495 |
|
1496 if ( IsNumberEntryUsedL() ) |
|
1497 { |
|
1498 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
1499 { |
|
1500 CloseDTMFEditorL(); |
|
1501 } |
|
1502 else |
|
1503 { |
|
1504 BeginTransEffectLC( ENumberEntryClose ); |
|
1505 // Remove number entry from screen |
|
1506 iViewCommandHandle->ExecuteCommandL( |
|
1507 EPhoneViewRemoveNumberEntry ); |
|
1508 EndTransEffect(); |
|
1509 // Do state-specific operation when number entry is cleared |
|
1510 HandleNumberEntryClearedL(); |
|
1511 } |
|
1512 } |
|
1513 |
|
1514 if ( !TopAppIsDisplayedL() ) |
|
1515 { |
|
1516 // Bring app to foreground |
|
1517 TPhoneCmdParamInteger uidParam; |
|
1518 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
1519 iViewCommandHandle->ExecuteCommandL( |
|
1520 EPhoneViewBringAppToForeground, &uidParam ); |
|
1521 } |
|
1522 } |
|
1523 else |
|
1524 { |
|
1525 if ( IsNumberEntryUsedL() ) |
|
1526 { |
|
1527 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
1528 { |
|
1529 CloseDTMFEditorL(); |
|
1530 } |
|
1531 } |
|
1532 |
|
1533 // handle short end key |
|
1534 CPhoneState::DisconnectCallL(); |
|
1535 } |
|
1536 } |
|
1537 |
|
1538 // ----------------------------------------------------------------------------- |
|
1539 // CPhoneStateInCall::HandleVoiceKeyPressL |
|
1540 // ----------------------------------------------------------------------------- |
|
1541 // |
|
1542 void CPhoneStateInCall::HandleVoiceKeyPressL( TPhoneKeyEventMessages aMessage ) |
|
1543 { |
|
1544 __LOGMETHODSTARTEND(EPhoneControl, |
|
1545 "CPhoneStateInCall::HandleVoiceKeyPressL()"); |
|
1546 if ( aMessage == EPhoneKeyShortPress ) |
|
1547 { |
|
1548 // Toggle the handsfree mode |
|
1549 const TBool handsfreeMode = |
|
1550 iStateMachine->PhoneEngineInfo()->AudioOutput() == |
|
1551 EPELoudspeaker; |
|
1552 SetHandsfreeModeL( !handsfreeMode ); |
|
1553 } |
|
1554 else // aMessage == EPhoneKeyLongPress |
|
1555 { |
|
1556 // Display call in progress information note |
|
1557 SendGlobalInfoNoteL( EPhoneCallInProgress ); |
|
1558 } |
|
1559 } |
|
1560 |
|
1561 // ----------------------------------------------------------- |
|
1562 // CPhoneStateInCall::ShowDtmfTextQueryL |
|
1563 // ----------------------------------------------------------- |
|
1564 // |
|
1565 void CPhoneStateInCall::ShowDtmfTextQueryL( |
|
1566 TInt aDialogResourceId, |
|
1567 TInt aDefaultCbaResourceId, |
|
1568 TInt aContentCbaResourceId, |
|
1569 TDes* aDataText, |
|
1570 TBool aSendKeyEnabled ) |
|
1571 { |
|
1572 __LOGMETHODSTARTEND(EPhoneControl, |
|
1573 "CPhoneStateInCall::ShowDtmfTextQueryL()"); |
|
1574 |
|
1575 __ASSERT_DEBUG( aDialogResourceId && |
|
1576 aDefaultCbaResourceId && |
|
1577 aContentCbaResourceId && |
|
1578 aDataText, |
|
1579 Panic( EPhoneCtrlParameterNotInitialized ) ); |
|
1580 TPhoneCmdParamQuery queryDialogParam; |
|
1581 queryDialogParam.SetQueryType( EPhoneDtmfTextQuery ); |
|
1582 queryDialogParam.SetQueryResourceId( aDialogResourceId ); |
|
1583 queryDialogParam.SetDefaultCba( aDefaultCbaResourceId ); |
|
1584 queryDialogParam.SetContentCba( aContentCbaResourceId ); |
|
1585 queryDialogParam.SetDataText( aDataText ); |
|
1586 queryDialogParam.SetSendKeyEnabled( aSendKeyEnabled ); |
|
1587 |
|
1588 // Display dialog |
|
1589 iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery, |
|
1590 &queryDialogParam ); |
|
1591 } |
|
1592 |
|
1593 // End of File |