1 /* |
|
2 * Copyright (c) 2008 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 CallUIEngine. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <e32cmn.h> |
|
23 #include <featmgr.h> |
|
24 #include <stringloader.h> |
|
25 #include <callui.rsg> // Resources. |
|
26 #include <aknmessagequerydialog.h> |
|
27 #include <aknnotewrappers.h> |
|
28 #include <akngloballistquery.h> |
|
29 #include <aknglobalnote.h> |
|
30 #include <mcauireconnectqueryobserver.h> |
|
31 #include "cauidialogs.h" |
|
32 #include "cauilogger.h" |
|
33 #include "cauiquery.h" |
|
34 #include "cauiengine.h" |
|
35 #include "cphcntmatcher.h" |
|
36 #include "cauiactiveobject.h" |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 /** |
|
41 * Container for informatioin needed in Reconnection query. |
|
42 * |
|
43 * @lib CaUiEngine.lib |
|
44 * @since 2.6 |
|
45 */ |
|
46 NONSHARABLE_CLASS( CCaUiReConQueryInformation ) |
|
47 : public CBase |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * C++ constructor. |
|
53 * |
|
54 * @see CCaUiEngApi::LaunchNoteAndReconConfQueryL(). |
|
55 */ |
|
56 CCaUiReConQueryInformation( |
|
57 MCaUiReconnectQueryObserver& aObserver, |
|
58 CPhCntMatcher* aPhCntMatcher, |
|
59 const TPtrC aPhoneNumber, |
|
60 const TBool aIncludeVideoCallOption, |
|
61 const TPtrC aNoteText ); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 ~CCaUiReConQueryInformation(); |
|
67 |
|
68 |
|
69 public: // Data |
|
70 |
|
71 // Observer storage. |
|
72 MCaUiReconnectQueryObserver& iObserver; |
|
73 |
|
74 // Matcher storage. |
|
75 CPhCntMatcher* iPhCntMatcher; |
|
76 |
|
77 // Phone number storage. |
|
78 const TPtrC iPhoneNumber; |
|
79 |
|
80 // Video call option storage. |
|
81 const TBool iIncludeVideoCallOption; |
|
82 |
|
83 // The name corresponding the phone number. |
|
84 const TPtrC iAlias; |
|
85 |
|
86 }; |
|
87 |
|
88 |
|
89 // ----------------------------------------------------------------------------- |
|
90 // CCaUiReConQueryInformation::CCaUiReConQueryInformation |
|
91 // |
|
92 // C++ default constructor can NOT contain any code, that might leave. |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 CCaUiReConQueryInformation::CCaUiReConQueryInformation( |
|
96 MCaUiReconnectQueryObserver& aObserver, |
|
97 CPhCntMatcher* aPhCntMatcher, |
|
98 const TPtrC aPhoneNumber, |
|
99 const TBool aIncludeVideoCallOption, |
|
100 const TPtrC aAlias ) |
|
101 : iObserver( aObserver ), |
|
102 iPhCntMatcher( aPhCntMatcher ), |
|
103 iPhoneNumber( aPhoneNumber ), |
|
104 iIncludeVideoCallOption( aIncludeVideoCallOption ), |
|
105 iAlias( aAlias ) |
|
106 { |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CCaUiReConQueryInformation::~CCaUiReConQueryInformation |
|
111 // |
|
112 // Destructor. |
|
113 // ----------------------------------------------------------------------------- |
|
114 // |
|
115 CCaUiReConQueryInformation::~CCaUiReConQueryInformation() |
|
116 { |
|
117 } |
|
118 |
|
119 |
|
120 // ----------------------------------------------------------------------------- |
|
121 // CCaUiDialogs::CCaUiDialogs |
|
122 // |
|
123 // |
|
124 // ----------------------------------------------------------------------------- |
|
125 // |
|
126 CCaUiDialogs::CCaUiDialogs( CCaUiEngine& aCaUiEngine ) |
|
127 : iCaUiEngine( aCaUiEngine ) |
|
128 { |
|
129 } |
|
130 |
|
131 |
|
132 // ----------------------------------------------------------------------------- |
|
133 // CCaUiDialogs::NewL |
|
134 // |
|
135 // |
|
136 // ----------------------------------------------------------------------------- |
|
137 // |
|
138 CCaUiDialogs* CCaUiDialogs::NewL( CCaUiEngine& aCaUiEngine ) |
|
139 { |
|
140 CCaUiDialogs* self = new( ELeave ) CCaUiDialogs( aCaUiEngine ); |
|
141 |
|
142 CleanupStack::PushL( self ); |
|
143 self->ConstructL(); |
|
144 CleanupStack::Pop( self ); |
|
145 |
|
146 return self; |
|
147 } |
|
148 |
|
149 |
|
150 // ----------------------------------------------------------------------------- |
|
151 // CCaUiDialogs::ConstructL |
|
152 // |
|
153 // |
|
154 // ----------------------------------------------------------------------------- |
|
155 // |
|
156 void CCaUiDialogs::ConstructL() |
|
157 { |
|
158 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::ConstructL() Begin"); |
|
159 // Create reconnect query, not visible yet. |
|
160 iReconListQuery = CAknGlobalListQuery::NewL(); |
|
161 |
|
162 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::ConstructL() End"); |
|
163 } |
|
164 |
|
165 |
|
166 // ----------------------------------------------------------------------------- |
|
167 // CCaUiDialogs::~CCaUiDialogs |
|
168 // |
|
169 // |
|
170 // ----------------------------------------------------------------------------- |
|
171 // |
|
172 CCaUiDialogs::~CCaUiDialogs() |
|
173 { |
|
174 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::~CCaUiDialogs() Begin"); |
|
175 // Cancel confirmation query if exists. |
|
176 CancelReconConfQuery(); |
|
177 delete iReconListQuery; |
|
178 |
|
179 // Delete reconnection query information. |
|
180 delete iReConQueryInformation; |
|
181 |
|
182 // Cancel and delete note timer if exists. |
|
183 if ( iNoteTimer ) |
|
184 { |
|
185 iNoteTimer->Cancel(); |
|
186 delete iNoteTimer; |
|
187 } |
|
188 |
|
189 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::~CCaUiDialogs() End"); |
|
190 } |
|
191 |
|
192 |
|
193 // ----------------------------------------------------------------------------- |
|
194 // CCaUiDialogs::QueryVideoCallDefaultActionL |
|
195 // |
|
196 // |
|
197 // ----------------------------------------------------------------------------- |
|
198 // |
|
199 TInt CCaUiDialogs::QueryVideoCallDefaultActionL() |
|
200 { |
|
201 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::QueryVideoCallDefaultActionL() Begin"); |
|
202 HBufC* vtstring = NULL; |
|
203 HBufC* header = NULL; |
|
204 vtstring = StringLoader::LoadLC( R_CALLUI_VT_SETTING_NOTE ); |
|
205 header = StringLoader::LoadLC( R_CALLUI_POPUP_VT_TITLE_SETTING ); |
|
206 |
|
207 CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( *vtstring ); |
|
208 CleanupStack::PushL( dlg ); |
|
209 dlg->SetHeaderTextL( *header ); |
|
210 CleanupStack::Pop( dlg ); |
|
211 |
|
212 // Show query note to user |
|
213 TInt result = dlg->ExecuteLD( R_CALLUI_VT_SETTING_QUERY ); |
|
214 |
|
215 CleanupStack::PopAndDestroy( 2, vtstring ); // header, vtstring |
|
216 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::QueryVideoCallDefaultActionL() End"); |
|
217 |
|
218 return result; |
|
219 } |
|
220 |
|
221 |
|
222 // ----------------------------------------------------------------------------- |
|
223 // CCaUiDialogs::LaunchCreateListQueryL |
|
224 // |
|
225 // |
|
226 // ----------------------------------------------------------------------------- |
|
227 // |
|
228 TBool CCaUiDialogs::LaunchCreateListQueryL( TPhCltCallType& aCallType ) |
|
229 { |
|
230 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchCreateListQueryL() Begin"); |
|
231 |
|
232 TInt choice = KErrNotFound; |
|
233 |
|
234 CListMappingArray* mappingList = new ( ELeave ) CListMappingArray( 4 ); |
|
235 CleanupStack::PushL( mappingList ); |
|
236 |
|
237 // Create query dialog. |
|
238 CCaUiCreateListQuery* dlg = |
|
239 new ( ELeave ) CCaUiCreateListQuery( &choice ); |
|
240 dlg->PrepareLC( R_CALLUI_CREATE_LIST_QUERY ); |
|
241 |
|
242 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchCreateListQueryL() 1"); |
|
243 |
|
244 // new clean list item array |
|
245 CDesCArray* textArray = new( ELeave ) CDesCArrayFlat( 4 ); |
|
246 CleanupStack::PushL( textArray ); |
|
247 |
|
248 FillListQueryItemsL( *textArray, *mappingList ); |
|
249 |
|
250 CleanupStack::Pop( textArray ); |
|
251 |
|
252 // Dialog takes the ownership of textArray |
|
253 if( textArray ) |
|
254 { |
|
255 dlg->SetOwnershipType( ELbmOwnsItemArray ); |
|
256 dlg->SetItemTextArray( textArray ); |
|
257 } |
|
258 |
|
259 // Highlight preferred item from listbox |
|
260 if( aCallType == EPhCltVideo ) |
|
261 { |
|
262 dlg->ListBox()->SetCurrentItemIndex( KCallUiVideoCall ); |
|
263 } |
|
264 |
|
265 TBool ok = dlg->RunLD(); |
|
266 CAUILOGSTRING2("CALLUI: >>>CCaUiDialogs::LaunchCreateListQueryL() ok = %d", ok ); |
|
267 CAUILOGSTRING2("CALLUI: >>>CCaUiDialogs::LaunchCreateListQueryL() choice = %d", choice ); |
|
268 if ( ok ) |
|
269 { |
|
270 // Check what call type was selected. |
|
271 |
|
272 // Dynamic list made because of voip support |
|
273 // take calltype from mappinglist |
|
274 aCallType = mappingList->At( choice ).iCallType; |
|
275 } |
|
276 |
|
277 CleanupStack::PopAndDestroy( mappingList ); |
|
278 |
|
279 return ok; |
|
280 } |
|
281 |
|
282 |
|
283 // ----------------------------------------------------------------------------- |
|
284 // CCaUiDialogs::FillListQueryItemsL |
|
285 // |
|
286 // |
|
287 // ----------------------------------------------------------------------------- |
|
288 // |
|
289 void CCaUiDialogs::FillListQueryItemsL( |
|
290 CDesCArray& aTextArray, |
|
291 CListMappingArray& aMappingList ) |
|
292 { |
|
293 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::FillListQueryItemsL() Begin"); |
|
294 |
|
295 // Pointer for strings to be loaded. |
|
296 HBufC* bufPtr = NULL; |
|
297 TInt index = 0; |
|
298 TListMappingItem item; |
|
299 |
|
300 // Voice call option. |
|
301 bufPtr = StringLoader::LoadLC( R_CALLUI_CREATE_LIST_VOICE ); |
|
302 aTextArray.AppendL( *bufPtr ); |
|
303 CleanupStack::PopAndDestroy( bufPtr ); |
|
304 bufPtr = NULL; |
|
305 item.iIndex = index; |
|
306 item.iCallType = EPhCltVoice; |
|
307 aMappingList.AppendL( item ); |
|
308 index++; |
|
309 |
|
310 // Video call option. |
|
311 if ( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) ) |
|
312 { |
|
313 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::FillListQueryItemsL() Adding video call option"); |
|
314 bufPtr = StringLoader::LoadLC( R_CALLUI_CREATE_LIST_VIDEO ); |
|
315 aTextArray.AppendL( *bufPtr ); |
|
316 CleanupStack::PopAndDestroy( bufPtr ); |
|
317 bufPtr = NULL; |
|
318 item.iIndex = index; |
|
319 item.iCallType = EPhCltVideo; |
|
320 aMappingList.AppendL( item ); |
|
321 index++; |
|
322 } |
|
323 // Internet call option is shown if dynamic voip is set on |
|
324 // and there are VoIP profiles defined |
|
325 if( iCaUiEngine.IsVoIPProfiles() ) |
|
326 { |
|
327 // Internet call option. |
|
328 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::FillListQueryItemsL() Adding internet call option"); |
|
329 bufPtr = StringLoader::LoadLC( R_CALLUI_CREATE_LIST_INTERNET ); |
|
330 aTextArray.AppendL( *bufPtr ); |
|
331 CleanupStack::PopAndDestroy( bufPtr ); |
|
332 bufPtr = NULL; |
|
333 item.iIndex = index; |
|
334 item.iCallType = EPhCltCallVoIP; |
|
335 aMappingList.AppendL( item ); |
|
336 index++; |
|
337 } |
|
338 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::FillListQueryItemsL() End"); |
|
339 } |
|
340 |
|
341 |
|
342 /** not tested **/ |
|
343 |
|
344 // ----------------------------------------------------------------------------- |
|
345 // CCaUiDialogs::LaunchNoNetSupNoteL |
|
346 // |
|
347 // |
|
348 // ----------------------------------------------------------------------------- |
|
349 // |
|
350 void CCaUiDialogs::LaunchNoNetSupNoteL() |
|
351 { |
|
352 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchNoNetSupNoteL() Begin"); |
|
353 HBufC* string = StringLoader::LoadLC( R_CALLUI_NO_VIDEO_NETWORK ); |
|
354 |
|
355 CAknInformationNote* dlg = new ( ELeave ) CAknInformationNote( EFalse ); |
|
356 dlg->ExecuteLD( *string ); |
|
357 dlg = NULL; |
|
358 |
|
359 CleanupStack::PopAndDestroy( string ); |
|
360 string = NULL; |
|
361 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchNoNetSupNoteL() End"); |
|
362 } |
|
363 |
|
364 |
|
365 |
|
366 // ----------------------------------------------------------------------------- |
|
367 // CCaUiDialogs::LaunchReconConfQueryL |
|
368 // |
|
369 // |
|
370 // ----------------------------------------------------------------------------- |
|
371 // |
|
372 void CCaUiDialogs::LaunchReconConfQueryL( |
|
373 MCaUiReconnectQueryObserver& aObserver, |
|
374 CPhCntMatcher* aPhCntMatcher, |
|
375 const TPtrC aPhoneNumber, |
|
376 const TBool aIncludeVideoCallOption, |
|
377 const TPtrC aAlias ) |
|
378 { |
|
379 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchReconConfQueryL() Begin "); |
|
380 CDesCArray* textArray = new( ELeave ) CDesCArrayFlat( 4 ); |
|
381 CleanupStack::PushL( textArray ); |
|
382 |
|
383 // Delete the old query if exists. |
|
384 CancelReconConfQuery(); |
|
385 |
|
386 // Create new active object to handle query results. |
|
387 iReconActObject = CCaUiGlnActiveObject::NewL( |
|
388 aObserver, |
|
389 aPhCntMatcher, |
|
390 aPhoneNumber, |
|
391 aAlias ); |
|
392 |
|
393 CCaUiTIntArray* objectArray = iReconActObject->ReconQueryOptionsArray(); |
|
394 |
|
395 // Pointer for strings to be loaded. |
|
396 HBufC* bufPtr = NULL; |
|
397 |
|
398 // Voice call option. |
|
399 bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_LIST_ITEM_VOICE ); |
|
400 textArray->AppendL( *bufPtr ); |
|
401 CleanupStack::PopAndDestroy( bufPtr ); |
|
402 bufPtr = NULL; |
|
403 objectArray->AppendL( CCaUiGlnActiveObject::ECaUiVoiceCall ); |
|
404 |
|
405 // Video call option is included only if it is wanted. |
|
406 if ( aIncludeVideoCallOption ) |
|
407 { |
|
408 bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_LIST_ITEM_VIDEO ); |
|
409 textArray->AppendL( *bufPtr ); |
|
410 CleanupStack::PopAndDestroy( bufPtr ); |
|
411 bufPtr = NULL; |
|
412 objectArray->AppendL( CCaUiGlnActiveObject::ECaUiVideoCall ); |
|
413 } |
|
414 |
|
415 #ifndef RD_UNIFIED_EDITOR |
|
416 // MMS option. |
|
417 if (FeatureManager::FeatureSupported(KFeatureIdMMS)) |
|
418 { |
|
419 bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_LIST_ITEM_MMS ); |
|
420 textArray->AppendL( *bufPtr ); |
|
421 CleanupStack::PopAndDestroy( bufPtr ); |
|
422 bufPtr = NULL; |
|
423 objectArray->AppendL( CCaUiGlnActiveObject::ECaUiMms ); |
|
424 } |
|
425 |
|
426 // SMS option. |
|
427 bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_LIST_ITEM_SMS ); |
|
428 textArray->AppendL( *bufPtr ); |
|
429 CleanupStack::PopAndDestroy( bufPtr ); |
|
430 bufPtr = NULL; |
|
431 objectArray->AppendL( CCaUiGlnActiveObject::ECaUiSms ); |
|
432 |
|
433 #else |
|
434 // Send message option. |
|
435 bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_LIST_ITEM_MESSAGE ); |
|
436 textArray->AppendL( *bufPtr ); |
|
437 CleanupStack::PopAndDestroy( bufPtr ); |
|
438 bufPtr = NULL; |
|
439 objectArray->AppendL( CCaUiGlnActiveObject::ECaUiMsg ); |
|
440 #endif // RD_UNIFIED_EDITOR |
|
441 |
|
442 // Load query header. |
|
443 bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_QUERY_HEADER ); |
|
444 iReconListQuery->SetHeadingL( *bufPtr ); // Set query heading. |
|
445 CleanupStack::PopAndDestroy( bufPtr ); |
|
446 bufPtr = NULL; |
|
447 |
|
448 // Show query. |
|
449 iReconActObject->SetActive(); |
|
450 iReconListQuery->ShowListQueryL( textArray, iReconActObject->iStatus ); |
|
451 |
|
452 CleanupStack::PopAndDestroy( textArray ); |
|
453 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchReconConfQueryL() End "); |
|
454 } |
|
455 |
|
456 |
|
457 // ----------------------------------------------------------------------------- |
|
458 // CCaUiDialogs::CancelReconConfQuery |
|
459 // |
|
460 // |
|
461 // ----------------------------------------------------------------------------- |
|
462 // |
|
463 void CCaUiDialogs::CancelReconConfQuery() |
|
464 { |
|
465 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::CancelReconConfQuery() Begin "); |
|
466 // Cancel the earlier query if exists. |
|
467 if( iReconListQuery ) |
|
468 { |
|
469 iReconListQuery->CancelListQuery(); |
|
470 } |
|
471 |
|
472 // Cancel the active object. |
|
473 if( iReconActObject ) |
|
474 { |
|
475 if ( iReconActObject->IsActive() ) |
|
476 { |
|
477 iReconActObject->Cancel(); |
|
478 } |
|
479 } |
|
480 iReconfQueryOngoing = EFalse; |
|
481 delete iReconActObject; |
|
482 iReconActObject = NULL; |
|
483 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::CancelReconConfQuery() End "); |
|
484 } |
|
485 |
|
486 |
|
487 // ----------------------------------------------------------------------------- |
|
488 // CCaUiDialogs::CancelNoteAndReconConfQuery |
|
489 // |
|
490 // |
|
491 // ----------------------------------------------------------------------------- |
|
492 // |
|
493 void CCaUiDialogs::CancelNoteAndReconConfQuery() |
|
494 { |
|
495 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::CancelNoteAndReconConfQuery() Begin "); |
|
496 // Delete reconnection query information. |
|
497 delete iReConQueryInformation; |
|
498 iReConQueryInformation = NULL; |
|
499 |
|
500 // Cancel Note timer if exists. |
|
501 if ( iNoteTimer ) |
|
502 { |
|
503 // Cancel note timer. |
|
504 iNoteTimer->Cancel(); |
|
505 } |
|
506 |
|
507 // Cancel the reconnect query if exists. |
|
508 if( iReconListQuery ) |
|
509 { |
|
510 iReconListQuery->CancelListQuery(); |
|
511 } |
|
512 |
|
513 // Cancel the active object. |
|
514 if( iReconActObject ) |
|
515 { |
|
516 if ( iReconActObject->IsActive() ) |
|
517 { |
|
518 iReconActObject->Cancel(); |
|
519 } |
|
520 } |
|
521 |
|
522 delete iReconActObject; |
|
523 iReconActObject = NULL; |
|
524 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::CancelNoteAndReconConfQuery() End "); |
|
525 } |
|
526 |
|
527 |
|
528 |
|
529 // ----------------------------------------------------------------------------- |
|
530 // CCaUiDialogs::LaunchNoteAndReconConfQueryL |
|
531 // |
|
532 // |
|
533 // ----------------------------------------------------------------------------- |
|
534 // |
|
535 void CCaUiDialogs::LaunchNoteAndReconConfQueryL( |
|
536 MCaUiReconnectQueryObserver& aObserver, |
|
537 CPhCntMatcher* aPhCntMatcher, |
|
538 const TPtrC aPhoneNumber, |
|
539 const TBool aIncludeVideoCallOption, |
|
540 const TPtrC aNoteText, |
|
541 const TPtrC aAlias ) |
|
542 { |
|
543 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchNoteAndReconConfQueryL() Begin "); |
|
544 iReconfQueryOngoing = ETrue; |
|
545 delete iReConQueryInformation; |
|
546 iReConQueryInformation = NULL; |
|
547 iReConQueryInformation = new ( ELeave ) CCaUiReConQueryInformation( |
|
548 aObserver, |
|
549 aPhCntMatcher, |
|
550 aPhoneNumber, |
|
551 aIncludeVideoCallOption, |
|
552 aAlias ); |
|
553 |
|
554 HBufC* string = NULL; |
|
555 TInt noteTextLength = aNoteText.Length(); |
|
556 |
|
557 // Use either given note string or the qtn.tel.no.video.network string. |
|
558 if ( noteTextLength ) |
|
559 { |
|
560 string = HBufC::NewLC( noteTextLength ); |
|
561 string->Des() = aNoteText; |
|
562 } |
|
563 else |
|
564 { |
|
565 string = StringLoader::LoadLC( R_CALLUI_NO_VIDEO_NETWORK ); |
|
566 } |
|
567 |
|
568 if ( !iInfoNote ) |
|
569 { |
|
570 iInfoNote = new ( ELeave ) CAknInformationNote( EFalse ); |
|
571 iInfoNote->SetTimeout( CAknNoteDialog::ELongTimeout ); |
|
572 iInfoNote->ExecuteLD( *string ); |
|
573 } |
|
574 |
|
575 // Start note wait timer. |
|
576 if ( !iNoteTimer ) |
|
577 { |
|
578 iNoteTimer = CPeriodic::NewL( CActive::EPriorityStandard ); |
|
579 } |
|
580 iNoteTimer->Cancel(); |
|
581 iNoteTimer->Start( |
|
582 KCaUiEngNoteTimeout, |
|
583 KCaUiEngNoteTimeout, |
|
584 TCallBack( DoPerformNoteLaunchCallBackL, this ) ); |
|
585 |
|
586 CleanupStack::PopAndDestroy( string ); |
|
587 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchNoteAndReconConfQueryL() End"); |
|
588 } |
|
589 |
|
590 |
|
591 |
|
592 // ----------------------------------------------------------------------------- |
|
593 // CCaUiDialogs::DoPerformNoteLaunchCallBackL |
|
594 // |
|
595 // |
|
596 // ----------------------------------------------------------------------------- |
|
597 // |
|
598 TInt CCaUiDialogs::DoPerformNoteLaunchCallBackL( TAny* aAny ) |
|
599 { |
|
600 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::DPNoteLaunchCallBackL() Begin"); |
|
601 |
|
602 CCaUiDialogs* self = static_cast< CCaUiDialogs* >( aAny ); |
|
603 |
|
604 if ( self ) |
|
605 { |
|
606 if ( self->iNoteTimer ) |
|
607 { |
|
608 // Cancel note timer. |
|
609 self->iNoteTimer->Cancel(); |
|
610 } |
|
611 |
|
612 if ( self->iInfoNote ) |
|
613 { |
|
614 // Information note still displayed |
|
615 return KErrNone; |
|
616 } |
|
617 |
|
618 if ( self->iReConQueryInformation && self->IsReconfQueryOngoing() ) |
|
619 { |
|
620 // Launch reconnect query. |
|
621 self->LaunchReconConfQueryL( |
|
622 self->iReConQueryInformation->iObserver, |
|
623 self->iReConQueryInformation->iPhCntMatcher, |
|
624 self->iReConQueryInformation->iPhoneNumber, |
|
625 self->iReConQueryInformation->iIncludeVideoCallOption, |
|
626 self->iReConQueryInformation->iAlias ); |
|
627 } |
|
628 |
|
629 delete self->iReConQueryInformation; |
|
630 self->iReConQueryInformation = NULL; |
|
631 } |
|
632 CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::DPNoteLaunchCallBackL() end"); |
|
633 return KErrNone; |
|
634 } |
|
635 |
|
636 |
|
637 // ----------------------------------------------------------------------------- |
|
638 // CCaUiEngine::IsReconfQueryOngoing |
|
639 // |
|
640 // |
|
641 // ----------------------------------------------------------------------------- |
|
642 // |
|
643 TBool CCaUiDialogs::IsReconfQueryOngoing() |
|
644 { |
|
645 return iReconfQueryOngoing; |
|
646 } |
|
647 |
|
648 |
|
649 // ----------------------------------------------------------------------------- |
|
650 // CCaUiEngine::IsReconfQueryOngoing |
|
651 // |
|
652 // |
|
653 // ----------------------------------------------------------------------------- |
|
654 // |
|
655 void CCaUiDialogs::SetReconfQueryOngoing( const TBool aOngoing ) |
|
656 { |
|
657 iReconfQueryOngoing = aOngoing; |
|
658 } |
|