|
1 /* |
|
2 * Copyright (c) 2008-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: Actual notifier implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <eikenv.h> |
|
20 #include <bautils.h> |
|
21 #include <eikclbd.h> |
|
22 #include <eikimage.h> |
|
23 #include <cchuinotif.rsg> |
|
24 #include <StringLoader.h> |
|
25 #include <aknnotewrappers.h> |
|
26 #include <cenrepnotifyhandler.h> |
|
27 #include <ctsydomainpskeys.h> |
|
28 #include <crcseprofileregistry.h> |
|
29 |
|
30 #include "cchuilogger.h" |
|
31 #include "cchuicommon.hrh" |
|
32 #include "cchuinotifierimpl.h" |
|
33 #include "cchuipluginbrandinghandler.h" |
|
34 #include "cchuinotifconnectionhandler.h" |
|
35 #include "cchuicallstatelistener.h" |
|
36 |
|
37 |
|
38 // ======== MEMBER FUNCTIONS ======== |
|
39 |
|
40 CCCHUiNotifierImpl::CCCHUiNotifierImpl() |
|
41 { |
|
42 } |
|
43 |
|
44 CCCHUiNotifierImpl* CCCHUiNotifierImpl::NewL() |
|
45 { |
|
46 CCCHUiNotifierImpl* self = new (ELeave) CCCHUiNotifierImpl(); |
|
47 CleanupStack::PushL( self ); |
|
48 self->ConstructL(); |
|
49 CleanupStack::Pop( self ); |
|
50 return self; |
|
51 } |
|
52 |
|
53 void CCCHUiNotifierImpl::ConstructL() |
|
54 { |
|
55 CCCHUiNotifierBase::ConstructL(); |
|
56 iCallStateListener = CCchUiCallStateListener::NewL( *this ); |
|
57 } |
|
58 |
|
59 CCCHUiNotifierImpl::~CCCHUiNotifierImpl() |
|
60 { |
|
61 CCHUIDEBUG( "CCCHUiNotifierImpl::~CCCHUiNotifierImpl - IN" ); |
|
62 |
|
63 CCCHUiNotifierBase::Cancel(); |
|
64 iListQueryDialog = NULL; |
|
65 delete iBrandingHandler; |
|
66 delete iCallStateListener; |
|
67 |
|
68 CCHUIDEBUG( "CCCHUiNotifierImpl::~CCCHUiNotifierImpl - OUT" ); |
|
69 } |
|
70 |
|
71 // --------------------------------------------------------------------------- |
|
72 // RunL |
|
73 // From CActive. |
|
74 // --------------------------------------------------------------------------- |
|
75 // |
|
76 void CCCHUiNotifierImpl::RunL( ) |
|
77 { |
|
78 CCHUIDEBUG( "CCCHUiNotifierImpl::RunL - IN" ); |
|
79 |
|
80 switch( iDialogMode ) |
|
81 { |
|
82 // Only ECchUiDialogTypeNoConnectionAvailable is launched via RunL |
|
83 // currently. |
|
84 case MCchUiObserver::ECchUiDialogTypeNoConnectionAvailable: |
|
85 { |
|
86 CCHUIDEBUG( "CCCHUiNotifierImpl::RunL - ECchUiDialogTypeNoConnectionAvailable" ); |
|
87 ShowNoConnectionsQueryL( iReplySlot, iMessage, iServiceId, EFalse ); |
|
88 } |
|
89 break; |
|
90 |
|
91 default: |
|
92 { |
|
93 CCHUIDEBUG( "CCCHUiNotifierImpl::RunL - Does nothing" ); |
|
94 } |
|
95 break; |
|
96 } |
|
97 |
|
98 CCHUIDEBUG( " CCCHUiNotifierImpl::RunL - OUT" ); |
|
99 } |
|
100 |
|
101 |
|
102 // --------------------------------------------------------------------------- |
|
103 // From class MEikSrvNotifierBase2. |
|
104 // Cancelling method. |
|
105 // --------------------------------------------------------------------------- |
|
106 // |
|
107 void CCCHUiNotifierImpl::Cancel() |
|
108 { |
|
109 CCHUIDEBUG( "CCCHUiNotifierImpl::Cancel - IN" ); |
|
110 if ( iListQueryDialog ) |
|
111 { |
|
112 delete iListQueryDialog; |
|
113 iListQueryDialog = NULL; |
|
114 CCCHUiNotifierBase::Cancel(); |
|
115 } |
|
116 |
|
117 CCHUIDEBUG( "CCCHUiNotifierImpl::Cancel - OUT" ); |
|
118 } |
|
119 |
|
120 |
|
121 // --------------------------------------------------------------------------- |
|
122 // Shows username & password query. |
|
123 // --------------------------------------------------------------------------- |
|
124 // |
|
125 void CCCHUiNotifierImpl::ShowUsernamePasswordQueryL( |
|
126 TInt aReplySlot, |
|
127 const RMessagePtr2& aMessage, |
|
128 TUint aServiceId, |
|
129 const TDesC& aUserName ) |
|
130 { |
|
131 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowUsernamePasswordQueryL - IN" ); |
|
132 |
|
133 iMessage = aMessage; |
|
134 iReplySlot = aReplySlot; |
|
135 |
|
136 HBufC* userName = HBufC::NewLC( KUserNameLength ); |
|
137 HBufC* passWord = HBufC::NewLC( KPasswordLength ); |
|
138 |
|
139 // Set current username |
|
140 userName->Des().Copy( aUserName ); |
|
141 |
|
142 TPtr ptrUserName( userName->Des() ); |
|
143 TPtr ptrPassWord( passWord->Des() ); |
|
144 |
|
145 CCHUIDEBUG( "ShowUsernamePasswordQueryL - create query"); |
|
146 |
|
147 CAknMultiLineDataQueryDialog* dlg = CAknMultiLineDataQueryDialog::NewL( |
|
148 ptrUserName, ptrPassWord ); |
|
149 |
|
150 if ( dlg->ExecuteLD( R_CCHUINOTIF_USERNAME_PWD_DIALOG ) ) |
|
151 { |
|
152 iResultParams.iDialogMode = |
|
153 MCchUiObserver::ECchUiDialogTypeAuthenticationFailed; |
|
154 iResultParams.iServiceId = aServiceId; |
|
155 iResultParams.iUsername = *userName; |
|
156 iResultParams.iPwd = *passWord; |
|
157 iMessage.WriteL( iReplySlot, |
|
158 TPckgBuf<TCCHUiNotifierParams>( iResultParams ) ); |
|
159 CompleteMessage(KErrNone); |
|
160 } |
|
161 else |
|
162 { |
|
163 CCHUIDEBUG( "ShowUsernamePasswordQueryL - cancelled" ); |
|
164 CompleteMessage( KErrCancel ); |
|
165 } |
|
166 CleanupStack::PopAndDestroy( passWord ); |
|
167 CleanupStack::PopAndDestroy( userName ); |
|
168 |
|
169 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowUsernamePasswordQueryL - OUT" ); |
|
170 } |
|
171 |
|
172 // --------------------------------------------------------------------------- |
|
173 // Shows no connections query. |
|
174 // --------------------------------------------------------------------------- |
|
175 // |
|
176 void CCCHUiNotifierImpl::ShowNoConnectionsQueryL( |
|
177 TInt aReplySlot, |
|
178 const RMessagePtr2& aMessage, |
|
179 TUint aServiceId, |
|
180 TBool aNoConnectionsDefined ) |
|
181 { |
|
182 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowNoConnectionsQueryL - IN" ); |
|
183 |
|
184 iServiceId = aServiceId; |
|
185 iMessage = aMessage; |
|
186 iReplySlot = aReplySlot; |
|
187 |
|
188 CDesCArray* arrayforDialog = new (ELeave) CDesCArrayFlat( 3 ); |
|
189 CleanupStack::PushL( arrayforDialog ); |
|
190 |
|
191 CCHUIDEBUG( "ShowNoConnectionsQueryL - form content" ); |
|
192 |
|
193 RArray<TCchUiOperationCommand> commandArray; |
|
194 CleanupClosePushL( commandArray ); |
|
195 |
|
196 TInt result = KErrNotFound; |
|
197 MCchUiObserver::TCchUiDialogType currentType = |
|
198 MCchUiObserver::ECchUiDialogTypeNotSet; |
|
199 HBufC* string = NULL; |
|
200 if ( aNoConnectionsDefined ) |
|
201 { |
|
202 string = StringLoader::LoadLC( |
|
203 R_QTN_CCHUINOTIF_NO_CONNECTIONS_DEFINED_HEADING ); |
|
204 FillNoConnectionsDefinedListboxL( *arrayforDialog, commandArray ); |
|
205 currentType = MCchUiObserver::ECchUiDialogTypeNoConnectionDefined; |
|
206 } |
|
207 else |
|
208 { |
|
209 string = StringLoader::LoadLC( |
|
210 R_QTN_CCHUINOTIF_NO_CONNECTIONS_HEADING ); |
|
211 FillNoConnectionsAvailableListboxL( |
|
212 *arrayforDialog, commandArray, aServiceId ); |
|
213 currentType = MCchUiObserver::ECchUiDialogTypeNoConnectionAvailable; |
|
214 } |
|
215 |
|
216 iListQueryDialog = new (ELeave) CAknListQueryDialog( &result ); |
|
217 iListQueryDialog->PrepareLC( R_CCHUINOTIF_NO_CONNECTIONS_AVAILABLE ); |
|
218 |
|
219 iListQueryDialog->MessageBox()->SetMessageTextL( string ); |
|
220 |
|
221 CCHUIDEBUG( "ShowNoConnectionsQueryL - form heading" ); |
|
222 |
|
223 // Set heading ie. service name |
|
224 HBufC* serviceName = HBufC::NewLC( KServiceNameLength ); |
|
225 TPtr serviceNamePtr( serviceName->Des() ); |
|
226 GetServiceNameL( aServiceId, serviceNamePtr ); |
|
227 CCHUIDEBUG( "ShowNoConnectionsQueryL - set heading" ); |
|
228 iListQueryDialog->QueryHeading()->SetTextL( serviceNamePtr ); |
|
229 CCHUIDEBUG( "ShowNoConnectionsQueryL - heading set ok" ); |
|
230 CleanupStack::PopAndDestroy(); // serviceName |
|
231 CCHUIDEBUG( "ShowNoConnectionsQueryL - proceed to list items" ); |
|
232 |
|
233 CCHUIDEBUG( "ShowNoConnectionsQueryL - set item array" ); |
|
234 iListQueryDialog->SetItemTextArray( arrayforDialog ); |
|
235 iListQueryDialog->SetOwnershipType( ELbmDoesNotOwnItemArray ); |
|
236 |
|
237 CCHUIDEBUG( "ShowNoConnectionsQueryL - retrieve branded icon" ); |
|
238 CFbsBitmap* myBitmap = NULL; |
|
239 CFbsBitmap* myMask = NULL; |
|
240 TRAPD( err, BrandingHandlerL().RetrieveServiceIconL( |
|
241 aServiceId, myBitmap, myMask ) ); |
|
242 CCHUIDEBUG2( "ShowNoConnectionsQueryL - brand err: %d", err ); |
|
243 |
|
244 if ( !err && iListQueryDialog->QueryHeading() ) |
|
245 { |
|
246 CleanupStack::PushL( myBitmap ); |
|
247 CleanupStack::PushL( myMask ); |
|
248 CEikImage* image = new (ELeave) CEikImage(); |
|
249 image->SetPicture( myBitmap, myMask ); |
|
250 CleanupStack::Pop( myMask ); |
|
251 CleanupStack::Pop( myBitmap ); |
|
252 CleanupStack::PushL( image ); |
|
253 iListQueryDialog->QueryHeading()->SetHeaderImageL( image ); |
|
254 iListQueryDialog->QueryHeading()->ActivateL(); |
|
255 CleanupStack::PopAndDestroy( image ); |
|
256 } |
|
257 else if ( !err ) |
|
258 { |
|
259 delete myMask; |
|
260 delete myBitmap; |
|
261 } |
|
262 else |
|
263 { |
|
264 // Error occurred in RetrieveServiceIconL. Nothing to do. |
|
265 } |
|
266 |
|
267 CCHUIDEBUG( "ShowNoConnectionsQueryL - run dialog" ); |
|
268 iListQueryDialog->RunLD(); |
|
269 CCHUIDEBUG( "ShowNoConnectionsQueryL - run dialog done" ); |
|
270 |
|
271 // write result, result now holds the item number |
|
272 if ( KErrNotFound != result ) |
|
273 { |
|
274 iResultParams.iDialogMode = currentType; |
|
275 iResultParams.iServiceId = aServiceId; |
|
276 iResultParams.iOperationCommand = commandArray[ result ]; |
|
277 |
|
278 if ( ECchUiCommandCopyGprs == commandArray[ result ] ) |
|
279 { |
|
280 ShowGprsSelectionL( aServiceId ); |
|
281 } |
|
282 CCHUIDEBUG( "ShowNoConnectionsQueryL - write and complete" ); |
|
283 iMessage.WriteL( iReplySlot, |
|
284 TPckgBuf<TCCHUiNotifierParams>( iResultParams ) ); |
|
285 CompleteMessage( KErrNone ); |
|
286 } |
|
287 else |
|
288 { |
|
289 CCHUIDEBUG( "ShowNoConnectionsQueryL - complete with cancel" ); |
|
290 CompleteMessage( KErrCancel ); |
|
291 } |
|
292 CleanupStack::PopAndDestroy( string ); |
|
293 CleanupStack::PopAndDestroy( &commandArray ); |
|
294 CleanupStack::PopAndDestroy( arrayforDialog ); |
|
295 |
|
296 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowNoConnectionsQueryL - OUT" ); |
|
297 } |
|
298 |
|
299 // --------------------------------------------------------------------------- |
|
300 // Shows change connection query. |
|
301 // --------------------------------------------------------------------------- |
|
302 // |
|
303 void CCCHUiNotifierImpl::ShowChangeConnectionQueryL( |
|
304 TInt aReplySlot, |
|
305 const RMessagePtr2& aMessage, |
|
306 TUint aServiceId, |
|
307 TInt aIapId ) |
|
308 { |
|
309 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowChangeConnectionQueryL - IN" ); |
|
310 |
|
311 iMessage = aMessage; |
|
312 iReplySlot = aReplySlot; |
|
313 |
|
314 CDesCArray* arrayforDialog = new (ELeave) CDesCArrayFlat( 3 ); |
|
315 CleanupStack::PushL( arrayforDialog ); |
|
316 |
|
317 CCHUIDEBUG( "ShowChangeConnectionQueryL - form content" ); |
|
318 |
|
319 RArray<TCchUiOperationCommand> commandArray; |
|
320 CleanupClosePushL( commandArray ); |
|
321 |
|
322 TInt result = KErrNotFound; |
|
323 MCchUiObserver::TCchUiDialogType type = |
|
324 MCchUiObserver::ECchUiDialogTypeChangeConnection; |
|
325 HBufC* string = NULL; |
|
326 |
|
327 RBuf iapName; |
|
328 CleanupClosePushL( iapName ); |
|
329 |
|
330 // If we have current connection, show it in query heading |
|
331 if ( aIapId ) |
|
332 { |
|
333 CurrentConnectionNameL( |
|
334 aServiceId, |
|
335 aIapId, |
|
336 iapName ); |
|
337 |
|
338 string = StringLoader::LoadLC( |
|
339 R_QTN_CCHUINOTIF_CHANGE_CURRENT_CONNECTION_HEADING, iapName ); |
|
340 |
|
341 FillChangeCurrentConnectionListboxL( *arrayforDialog, commandArray ); |
|
342 } |
|
343 else // otherwise show in heading that we have no current connection |
|
344 { |
|
345 string = StringLoader::LoadLC( |
|
346 R_QTN_CCHUINOTIF_CHANGE_CONNECTION_HEADING ); |
|
347 |
|
348 FillChangeConnectionListboxL( *arrayforDialog, commandArray ); |
|
349 } |
|
350 |
|
351 iListQueryDialog = new (ELeave) CAknListQueryDialog( &result ); |
|
352 iListQueryDialog->PrepareLC( R_CCHUINOTIF_CHANGE_CONNECTION_QUERY ); |
|
353 |
|
354 iListQueryDialog->MessageBox()->SetMessageTextL( string ); |
|
355 |
|
356 CCHUIDEBUG( "ShowChangeConnectionQueryL - form heading" ); |
|
357 // Set heading ie. service name |
|
358 HBufC* serviceName = HBufC::NewLC( KServiceNameLength ); |
|
359 TPtr serviceNamePtr( serviceName->Des() ); |
|
360 GetServiceNameL( aServiceId, serviceNamePtr ); |
|
361 CCHUIDEBUG( "ShowChangeConnectionQueryL - set heading" ); |
|
362 iListQueryDialog->QueryHeading()->SetTextL( serviceNamePtr ); |
|
363 CCHUIDEBUG( "ShowChangeConnectionQueryL - heading set ok" ); |
|
364 CleanupStack::PopAndDestroy(); // serviceName |
|
365 CCHUIDEBUG( "ShowChangeConnectionQueryL - proceed to list items" ); |
|
366 |
|
367 CCHUIDEBUG( "ShowChangeConnectionQueryL - set item array" ); |
|
368 iListQueryDialog->SetItemTextArray( arrayforDialog ); |
|
369 iListQueryDialog->SetOwnershipType( ELbmDoesNotOwnItemArray ); |
|
370 |
|
371 CCHUIDEBUG( "ShowChangeConnectionQueryL - retrieve branded icon" ); |
|
372 |
|
373 CFbsBitmap* myBitmap = NULL; |
|
374 CFbsBitmap* myMask = NULL; |
|
375 TRAPD( err, BrandingHandlerL().RetrieveServiceIconL( |
|
376 aServiceId, myBitmap, myMask ) ); |
|
377 |
|
378 CCHUIDEBUG2( "ShowChangeConnectionQueryL - brand err: %d", err ); |
|
379 |
|
380 if ( !err && iListQueryDialog->QueryHeading() ) |
|
381 { |
|
382 CleanupStack::PushL( myBitmap ); |
|
383 CleanupStack::PushL( myMask ); |
|
384 CEikImage* image = new (ELeave) CEikImage(); |
|
385 image->SetPicture( myBitmap, myMask ); |
|
386 CleanupStack::Pop( myMask ); |
|
387 CleanupStack::Pop( myBitmap ); |
|
388 CleanupStack::PushL( image ); |
|
389 iListQueryDialog->QueryHeading()->SetHeaderImageL( image ); |
|
390 iListQueryDialog->QueryHeading()->ActivateL(); |
|
391 CleanupStack::PopAndDestroy( image ); |
|
392 } |
|
393 else if ( !err ) |
|
394 { |
|
395 delete myMask; |
|
396 delete myBitmap; |
|
397 } |
|
398 else |
|
399 { |
|
400 // Error occurred in RetrieveServiceIconL. Nothing to do. |
|
401 } |
|
402 |
|
403 CCHUIDEBUG( "ShowChangeConnectionQueryL - run dialog" ); |
|
404 |
|
405 // List query dialog is deleted via RunLD except if there is |
|
406 // incoming call at the same time the dialog is shown on screen. |
|
407 // In case of incoming call CallStateChanged() method handles |
|
408 // the deletion |
|
409 iListQueryDialog->RunLD(); |
|
410 |
|
411 if( iListQueryDialog ) |
|
412 { |
|
413 // write result, result now holds the item number |
|
414 if ( KErrNotFound != result ) |
|
415 { |
|
416 iResultParams.iDialogMode = type; |
|
417 iResultParams.iServiceId = aServiceId; |
|
418 iResultParams.iOperationCommand = commandArray[ result ]; |
|
419 |
|
420 if ( ECchUiCommandCopyGprs == commandArray[ result ] ) |
|
421 { |
|
422 ShowGprsSelectionL( aServiceId ); |
|
423 } |
|
424 CCHUIDEBUG( "ShowChangeConnectionQueryL - write and complete" ); |
|
425 iMessage.WriteL( iReplySlot, |
|
426 TPckgBuf<TCCHUiNotifierParams>( iResultParams ) ); |
|
427 CompleteMessage( KErrNone ); |
|
428 } |
|
429 else |
|
430 { |
|
431 CCHUIDEBUG( "ShowChangeConnectionQueryL - complete with cancel" ); |
|
432 CompleteMessage( KErrCancel ); |
|
433 } |
|
434 |
|
435 iListQueryDialog = NULL; |
|
436 } |
|
437 |
|
438 CleanupStack::PopAndDestroy( string ); |
|
439 CleanupStack::PopAndDestroy( &iapName ); |
|
440 CleanupStack::PopAndDestroy( &commandArray ); |
|
441 CleanupStack::PopAndDestroy( arrayforDialog ); |
|
442 |
|
443 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowChangeConnectionQueryL - OUT" ); |
|
444 } |
|
445 |
|
446 // --------------------------------------------------------------------------- |
|
447 // Shows defective settings error note. |
|
448 // --------------------------------------------------------------------------- |
|
449 // |
|
450 void CCCHUiNotifierImpl::ShowDefectiveSettingsL( |
|
451 TInt aReplySlot, |
|
452 const RMessagePtr2& aMessage, |
|
453 TUint aServiceId ) |
|
454 { |
|
455 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowDefectiveSettingsL - IN" ); |
|
456 |
|
457 iMessage = aMessage; |
|
458 iReplySlot = aReplySlot; |
|
459 |
|
460 // Get service name |
|
461 HBufC* serviceName = HBufC::NewLC( KServiceNameLength ); |
|
462 TPtr serviceNamePtr( serviceName->Des() ); |
|
463 GetServiceNameL( aServiceId, serviceNamePtr ); |
|
464 |
|
465 // Show info note about defective settings |
|
466 HBufC* defectiveText = StringLoader::LoadLC( |
|
467 R_QTN_SERVTAB_CONN_ESTABLSH_FAILED_PERMANENTLY_NOTE_TEXT, serviceNamePtr ); |
|
468 CAknInformationNote* note = |
|
469 new( ELeave ) CAknInformationNote( ETrue ); |
|
470 note->SetTimeout(CAknNoteDialog::ELongTimeout); |
|
471 note->ExecuteLD( *defectiveText ); |
|
472 CleanupStack::PopAndDestroy( defectiveText ); |
|
473 CleanupStack::PopAndDestroy( serviceName ); |
|
474 |
|
475 iResultParams.iDialogMode = |
|
476 MCchUiObserver::ECchUiDialogTypeDefectiveSettings; |
|
477 iResultParams.iServiceId = aServiceId; |
|
478 iMessage.WriteL( iReplySlot, |
|
479 TPckgBuf<TCCHUiNotifierParams>( iResultParams ) ); |
|
480 CompleteMessage(KErrNone); |
|
481 |
|
482 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowDefectiveSettingsL - OUT" ); |
|
483 } |
|
484 |
|
485 // --------------------------------------------------------------------------- |
|
486 // Shows error in connection error note. |
|
487 // --------------------------------------------------------------------------- |
|
488 // |
|
489 void CCCHUiNotifierImpl::ShowErrorInConnectionNoteL( |
|
490 TInt aReplySlot, |
|
491 const RMessagePtr2& aMessage, |
|
492 TUint aServiceId ) |
|
493 { |
|
494 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowErrorInConnectionL - IN" ); |
|
495 |
|
496 iMessage = aMessage; |
|
497 iReplySlot = aReplySlot; |
|
498 |
|
499 // Show info note about error in connection |
|
500 //(access point not suitable for internet calls) |
|
501 HBufC* noteText = StringLoader::LoadLC( |
|
502 R_QTN_VOIP_ERROR_IN_CONNECTION_NOTE_TEXT ); |
|
503 CAknInformationNote* note = |
|
504 new( ELeave ) CAknInformationNote( ETrue ); |
|
505 note->SetTimeout(CAknNoteDialog::ELongTimeout); |
|
506 note->ExecuteLD( *noteText ); |
|
507 CleanupStack::PopAndDestroy( noteText ); |
|
508 |
|
509 iResultParams.iDialogMode = |
|
510 MCchUiObserver::ECchUiDialogTypeErrorInConnection; |
|
511 iResultParams.iServiceId = aServiceId; |
|
512 iMessage.WriteL( iReplySlot, |
|
513 TPckgBuf<TCCHUiNotifierParams>( iResultParams ) ); |
|
514 CompleteMessage(KErrNone); |
|
515 |
|
516 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowErrorInConnectionL - OUT" ); |
|
517 } |
|
518 |
|
519 // --------------------------------------------------------------------------- |
|
520 // Shows invalid username/password note. |
|
521 // --------------------------------------------------------------------------- |
|
522 // |
|
523 void CCCHUiNotifierImpl::ShowInvalidUsernamePasswordNoteL( |
|
524 TInt aReplySlot, |
|
525 const RMessagePtr2& aMessage, |
|
526 TUint aServiceId ) |
|
527 { |
|
528 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowInvalidUsernamePasswordNoteL - IN" ); |
|
529 |
|
530 iMessage = aMessage; |
|
531 iReplySlot = aReplySlot; |
|
532 |
|
533 // Show info note about invalid username password |
|
534 HBufC* textForNote = StringLoader::LoadLC( |
|
535 R_QTN_VOIP_WRONG_SIP_AUTH_NOTE_TEXT ); |
|
536 CAknInformationNote* note = |
|
537 new( ELeave ) CAknInformationNote( ETrue ); |
|
538 note->SetTimeout(CAknNoteDialog::ELongTimeout); |
|
539 note->ExecuteLD( *textForNote ); |
|
540 CleanupStack::PopAndDestroy( textForNote ); |
|
541 |
|
542 iResultParams.iDialogMode = |
|
543 MCchUiObserver::ECchUiDialogTypeUsernamePasswordFailed; |
|
544 iResultParams.iServiceId = aServiceId; |
|
545 iMessage.WriteL( iReplySlot, |
|
546 TPckgBuf<TCCHUiNotifierParams>( iResultParams ) ); |
|
547 CompleteMessage(KErrNone); |
|
548 |
|
549 CCHUIDEBUG( |
|
550 "CCCHUiNotifierImpl::ShowInvalidUsernamePasswordNoteL - OUT" ); |
|
551 } |
|
552 |
|
553 // --------------------------------------------------------------------------- |
|
554 // Shows confirmation note to change connection. |
|
555 // --------------------------------------------------------------------------- |
|
556 // |
|
557 void CCCHUiNotifierImpl::ShowConfirmChangeConnectionL( |
|
558 TInt aReplySlot, |
|
559 const RMessagePtr2& aMessage, |
|
560 TUint aServiceId, |
|
561 TInt aIapId ) |
|
562 { |
|
563 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowConfirmChangeConnectionL - IN" ); |
|
564 |
|
565 CCHUIDEBUG2( |
|
566 "ShowConfirmChangeConnectionL - aServiceId: %d", aServiceId ); |
|
567 CCHUIDEBUG2( |
|
568 "ShowConfirmChangeConnectionL - aIapId: %d", aIapId ); |
|
569 |
|
570 iMessage = aMessage; |
|
571 iReplySlot = aReplySlot; |
|
572 |
|
573 // Show confirmation note to change connection |
|
574 RBuf iapName; |
|
575 CleanupClosePushL( iapName ); |
|
576 |
|
577 CurrentConnectionNameL( |
|
578 aServiceId, |
|
579 aIapId, |
|
580 iapName ); |
|
581 |
|
582 HBufC* textForQuery = NULL; |
|
583 CAknQueryDialog* query = |
|
584 new( ELeave ) CAknQueryDialog( CAknQueryDialog::ENoTone ); |
|
585 |
|
586 CleanupStack::PushL( query ); |
|
587 |
|
588 TBool askToRemoveOldConnection( EFalse ); |
|
589 |
|
590 // Check if current connection is used by any other service |
|
591 if ( aIapId && !ConnectionUsedByOthersL( aServiceId, aIapId ) ) |
|
592 { |
|
593 // connection not used by others -> ask to remove old connection |
|
594 askToRemoveOldConnection = ETrue; |
|
595 } |
|
596 |
|
597 if ( askToRemoveOldConnection ) |
|
598 { |
|
599 CCHUIDEBUG( |
|
600 "ShowConfirmChangeConnectionL - ask to remove connection" ); |
|
601 |
|
602 query->PrepareLC( |
|
603 R_CCHUINOTIF_REMOVE_AND_CHANGE_CONNECTION_CONFIRMATION_QUERY ); |
|
604 |
|
605 textForQuery = StringLoader::LoadLC( |
|
606 R_QTN_SERVTAB_AP_VOIP_NOT_SUPPORTED_RECONNECT_QUERY_TEXT, |
|
607 iapName ); |
|
608 } |
|
609 else |
|
610 { |
|
611 CCHUIDEBUG( |
|
612 "ShowConfirmChangeConnectionL - ask to change connection" ); |
|
613 |
|
614 query->PrepareLC( R_CCHUINOTIF_CHANGE_CONNECTION_CONFIRMATION_QUERY ); |
|
615 |
|
616 textForQuery = StringLoader::LoadLC( |
|
617 R_QTN_SERVTAB_AP_VOIP_NOT_SUPPORTED_QUERY_TEXT, iapName ); |
|
618 } |
|
619 |
|
620 CCHUIDEBUG( "ShowConfirmChangeConnectionL - set prompt" ); |
|
621 |
|
622 query->SetPromptL( *textForQuery ); |
|
623 CleanupStack::PopAndDestroy( textForQuery ); |
|
624 CleanupStack::Pop( query ); |
|
625 |
|
626 // Run query |
|
627 if( query->RunLD() ) |
|
628 { |
|
629 iResultParams.iDialogMode = |
|
630 MCchUiObserver::ECchUiDialogTypeConfirmChangeConnection; |
|
631 iResultParams.iServiceId = aServiceId; |
|
632 |
|
633 if ( askToRemoveOldConnection ) |
|
634 { |
|
635 CCHUIDEBUG( |
|
636 "ShowConfirmChangeConnectionL - set remove old connection"); |
|
637 |
|
638 iResultParams.iRemoveOldConnection = ETrue; |
|
639 iResultParams.iCurrentConnectionIapId = aIapId; |
|
640 } |
|
641 else |
|
642 { |
|
643 iResultParams.iRemoveOldConnection = EFalse; |
|
644 } |
|
645 |
|
646 iMessage.WriteL( iReplySlot, |
|
647 TPckgBuf<TCCHUiNotifierParams>( iResultParams ) ); |
|
648 |
|
649 CCHUIDEBUG( "ShowConfirmChangeConnectionL - complete message" ); |
|
650 |
|
651 CompleteMessage( KErrNone ); |
|
652 } |
|
653 else |
|
654 { |
|
655 CCHUIDEBUG( "ShowConfirmChangeConnectionL - canceled" ); |
|
656 |
|
657 CompleteMessage( KErrCancel ); |
|
658 } |
|
659 |
|
660 CleanupStack::PopAndDestroy( &iapName ); |
|
661 |
|
662 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowConfirmChangeConnectionL - OUT" ); |
|
663 } |
|
664 |
|
665 // --------------------------------------------------------------------------- |
|
666 // Shows gprs iap selection. |
|
667 // --------------------------------------------------------------------------- |
|
668 // |
|
669 void CCCHUiNotifierImpl::ShowGprsSelectionL( TUint aServiceId ) |
|
670 { |
|
671 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowGprsSelectionL - IN" ); |
|
672 |
|
673 RArray<TUint32> iapIds; |
|
674 CleanupClosePushL( iapIds ); |
|
675 |
|
676 CDesCArray* arrayforDialog = new (ELeave) CDesCArrayFlat( 3 ); |
|
677 CleanupStack::PushL( arrayforDialog ); |
|
678 CCHUIDEBUG( "ShowGprsSelectionL - form content" ); |
|
679 |
|
680 TInt result = KErrNotFound; |
|
681 HBufC* string = StringLoader::LoadLC( |
|
682 R_QTN_CCHUINOTIF_SELECT_GPRS_ACCESS_POINT_HEADING ); |
|
683 |
|
684 CAknListQueryDialog* dialog = new (ELeave) CAknListQueryDialog( &result ); |
|
685 dialog->PrepareLC( R_CCHUINOTIF_SELECT_GPRS_DIALOG ); |
|
686 |
|
687 CCHUIDEBUG( "ShowGprsSelectionL - form heading" ); |
|
688 dialog->QueryHeading()->SetTextL( *string ); |
|
689 |
|
690 CCHUIDEBUG( "ShowGprsSelectionL - set item array" ); |
|
691 |
|
692 TUint sourceSnap = KErrNone; |
|
693 // Fill array here |
|
694 CCchUiNotifConnectionHandler* connHandler = |
|
695 CCchUiNotifConnectionHandler::NewLC(); |
|
696 sourceSnap = connHandler->GetGprsAccessPointsL( *arrayforDialog, iapIds ); |
|
697 CleanupStack::PopAndDestroy( connHandler ); |
|
698 |
|
699 CCHUIDEBUG( "ShowGprsSelectionL - set item array" ); |
|
700 dialog->SetItemTextArray( arrayforDialog ); |
|
701 dialog->SetOwnershipType( ELbmDoesNotOwnItemArray ); |
|
702 |
|
703 CCHUIDEBUG( "ShowGprsSelectionL - run dialog" ); |
|
704 dialog->RunLD(); |
|
705 |
|
706 // write result, result now holds the item number |
|
707 if ( KErrNotFound != result ) |
|
708 { |
|
709 iResultParams.iServiceId = aServiceId; |
|
710 iResultParams.iGprsSourceSnap = sourceSnap; |
|
711 iResultParams.iGprsIapId = iapIds[ result ]; |
|
712 } |
|
713 else |
|
714 { |
|
715 User::Leave( KErrCancel ); |
|
716 } |
|
717 |
|
718 CleanupStack::PopAndDestroy( string ); |
|
719 CleanupStack::PopAndDestroy( arrayforDialog ); |
|
720 CleanupStack::PopAndDestroy( &iapIds ); |
|
721 |
|
722 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowGprsSelectionL - OUT" ); |
|
723 } |
|
724 |
|
725 // --------------------------------------------------------------------------- |
|
726 // Returns handle to branding handler. |
|
727 // --------------------------------------------------------------------------- |
|
728 // |
|
729 CCchUiPluginBrandingHandler& CCCHUiNotifierImpl::BrandingHandlerL() |
|
730 { |
|
731 if ( !iBrandingHandler ) |
|
732 { |
|
733 iBrandingHandler = |
|
734 CCchUiPluginBrandingHandler::NewL( *iSettings ); |
|
735 } |
|
736 return *iBrandingHandler; |
|
737 } |
|
738 |
|
739 // --------------------------------------------------------------------------- |
|
740 // Fills list items and commands for no connections available dialog |
|
741 // --------------------------------------------------------------------------- |
|
742 // |
|
743 void CCCHUiNotifierImpl::FillNoConnectionsAvailableListboxL( |
|
744 CDesCArray& aListItems, |
|
745 RArray<TCchUiOperationCommand>& aCommandArray, |
|
746 TUint aServiceId ) |
|
747 { |
|
748 CCHUIDEBUG( |
|
749 "CCCHUiNotifierImpl::FillNoConnectionsAvailableListboxL - IN" ); |
|
750 |
|
751 HBufC* connectWhenAv = StringLoader::LoadLC( |
|
752 R_QTN_CCHUINOTIF_CONNECT_WHEN_AV_TEXT ); |
|
753 HBufC* searchWlan = StringLoader::LoadLC( |
|
754 R_QTN_CCHUINOTIF_SEARCH_WLAN_NO_COVERAGE_TEXT ); |
|
755 HBufC* useGprs = StringLoader::LoadLC( |
|
756 R_QTN_CCHUINOTIF_USE_GPRS_NO_COVERAGE_TEXT ); |
|
757 |
|
758 // Item is available only for SIP protocol services. |
|
759 // Check if service supports SIP/VoIP. |
|
760 TBool sipVoip( EFalse ); |
|
761 TRAPD( err, sipVoip = IsSIPVoIPL( aServiceId ) ); |
|
762 |
|
763 if ( !err && sipVoip ) |
|
764 { |
|
765 aListItems.AppendL( *connectWhenAv ); |
|
766 aCommandArray.AppendL( ECchUiCommandConnectWhenAvailable ); |
|
767 } |
|
768 |
|
769 aListItems.AppendL( *searchWlan ); |
|
770 aCommandArray.AppendL( ECchUiCommandSearchWlan ); |
|
771 |
|
772 if ( !IsPhoneOfflineL() && IsGprsIapsAvailableL() |
|
773 && IsVoIPOverWCDMAAllowedL() ) |
|
774 { |
|
775 aListItems.AppendL( *useGprs ); |
|
776 aCommandArray.AppendL( ECchUiCommandCopyGprs ); |
|
777 } |
|
778 |
|
779 CleanupStack::PopAndDestroy( useGprs ); |
|
780 CleanupStack::PopAndDestroy( searchWlan ); |
|
781 CleanupStack::PopAndDestroy( connectWhenAv ); |
|
782 |
|
783 CCHUIDEBUG( |
|
784 "CCCHUiNotifierImpl::FillNoConnectionsAvailableListboxL - OUT" ); |
|
785 } |
|
786 |
|
787 // --------------------------------------------------------------------------- |
|
788 // Fills list items and commands for no connections defined dialog. |
|
789 // --------------------------------------------------------------------------- |
|
790 // |
|
791 void CCCHUiNotifierImpl::FillNoConnectionsDefinedListboxL( |
|
792 CDesCArray& aListItems, RArray<TCchUiOperationCommand>& aCommandArray ) |
|
793 { |
|
794 CCHUIDEBUG( |
|
795 "CCCHUiNotifierImpl::FillNoConnectionsDefinedListboxL - IN" ); |
|
796 |
|
797 HBufC* searchWlan = StringLoader::LoadLC( |
|
798 R_QTN_CCHUINOTIF_SEARCH_WLAN_NOT_DEF_TEXT ); |
|
799 |
|
800 HBufC* useGprs = StringLoader::LoadLC( |
|
801 R_QTN_CCHUINOTIF_USE_GPRS_NOT_DEF_TEXT ); |
|
802 |
|
803 aListItems.AppendL( *searchWlan ); |
|
804 aCommandArray.AppendL( ECchUiCommandSearchWlan ); |
|
805 |
|
806 if ( !IsPhoneOfflineL() && IsGprsIapsAvailableL() |
|
807 && IsVoIPOverWCDMAAllowedL() ) |
|
808 { |
|
809 aListItems.AppendL( *useGprs ); |
|
810 aCommandArray.AppendL( ECchUiCommandCopyGprs ); |
|
811 } |
|
812 |
|
813 CleanupStack::PopAndDestroy( useGprs ); |
|
814 CleanupStack::PopAndDestroy( searchWlan ); |
|
815 |
|
816 CCHUIDEBUG( |
|
817 "CCCHUiNotifierImpl::FillNoConnectionsDefinedListboxL - OUT" ); |
|
818 } |
|
819 |
|
820 // --------------------------------------------------------------------------- |
|
821 // Fills list items and commands for no connections defined dialog |
|
822 // --------------------------------------------------------------------------- |
|
823 // |
|
824 void CCCHUiNotifierImpl::FillNoConnectionsFoundListboxL( |
|
825 CDesCArray& aListItems, RArray<TCchUiOperationCommand>& aCommandArray ) |
|
826 { |
|
827 CCHUIDEBUG( "CCCHUiNotifierImpl::FillNoConnectionsFoundListboxL - IN" ); |
|
828 |
|
829 HBufC* searchWlan = StringLoader::LoadLC( |
|
830 R_QTN_CCHUINOTIF_SEARCH_WLAN_NOT_FOUND_TEXT ); |
|
831 |
|
832 HBufC* useGprs = StringLoader::LoadLC( |
|
833 R_QTN_CCHUINOTIF_USE_GPRS_NOT_FOUND_TEXT ); |
|
834 |
|
835 aListItems.AppendL( *searchWlan ); |
|
836 aCommandArray.AppendL( ECchUiCommandSearchWlan ); |
|
837 |
|
838 if ( !IsPhoneOfflineL() && IsGprsIapsAvailableL() |
|
839 && IsVoIPOverWCDMAAllowedL() ) |
|
840 { |
|
841 aListItems.AppendL( *useGprs ); |
|
842 aCommandArray.AppendL( ECchUiCommandCopyGprs ); |
|
843 } |
|
844 |
|
845 CleanupStack::PopAndDestroy( useGprs ); |
|
846 CleanupStack::PopAndDestroy( searchWlan ); |
|
847 |
|
848 CCHUIDEBUG( "CCCHUiNotifierImpl::FillNoConnectionsFoundListboxL - OUT" ); |
|
849 } |
|
850 |
|
851 // --------------------------------------------------------------------------- |
|
852 // Fills list items and commands for change current connection dialog |
|
853 // --------------------------------------------------------------------------- |
|
854 // |
|
855 void CCCHUiNotifierImpl::FillChangeCurrentConnectionListboxL( |
|
856 CDesCArray& aListItems, RArray<TCchUiOperationCommand>& aCommandArray ) |
|
857 { |
|
858 CCHUIDEBUG( |
|
859 "CCCHUiNotifierImpl::FillChangeCurrentConnectionListboxL - IN" ); |
|
860 |
|
861 HBufC* searchWlan = StringLoader::LoadLC( |
|
862 R_QTN_CCHUINOTIF_SEARCH_WLAN_CHANGE_CURRENT_CONNECTION_TEXT ); |
|
863 |
|
864 HBufC* useGprs = StringLoader::LoadLC( |
|
865 R_QTN_CCHUINOTIF_USE_GPRS_CHANGE_CURRENT_CONNECTION_TEXT ); |
|
866 |
|
867 aListItems.AppendL( *searchWlan ); |
|
868 aCommandArray.AppendL( ECchUiCommandSearchWlan ); |
|
869 |
|
870 if ( !IsPhoneOfflineL() && IsGprsIapsAvailableL() |
|
871 && IsVoIPOverWCDMAAllowedL() ) |
|
872 { |
|
873 aListItems.AppendL( *useGprs ); |
|
874 aCommandArray.AppendL( ECchUiCommandCopyGprs ); |
|
875 } |
|
876 |
|
877 CleanupStack::PopAndDestroy( useGprs ); |
|
878 CleanupStack::PopAndDestroy( searchWlan ); |
|
879 |
|
880 CCHUIDEBUG( |
|
881 "CCCHUiNotifierImpl::FillChangeCurrentConnectionListboxL - OUT" ); |
|
882 } |
|
883 |
|
884 |
|
885 // --------------------------------------------------------------------------- |
|
886 // Fills list items and commands for change connection dialog. |
|
887 // --------------------------------------------------------------------------- |
|
888 // |
|
889 void CCCHUiNotifierImpl::FillChangeConnectionListboxL( |
|
890 CDesCArray& aListItems, RArray<TCchUiOperationCommand>& aCommandArray ) |
|
891 { |
|
892 CCHUIDEBUG( "CCCHUiNotifierImpl::FillChangeConnectionListboxL - IN" ); |
|
893 |
|
894 HBufC* searchWlan = StringLoader::LoadLC( |
|
895 R_QTN_CCHUINOTIF_SEARCH_WLAN_CHANGE_CONNECTION_TEXT ); |
|
896 |
|
897 HBufC* useGprs = StringLoader::LoadLC( |
|
898 R_QTN_CCHUINOTIF_USE_GPRS_CHANGE_CONNECTION_TEXT ); |
|
899 |
|
900 aListItems.AppendL( *searchWlan ); |
|
901 aCommandArray.AppendL( ECchUiCommandSearchWlan ); |
|
902 |
|
903 if ( !IsPhoneOfflineL() && IsGprsIapsAvailableL() |
|
904 && IsVoIPOverWCDMAAllowedL() ) |
|
905 { |
|
906 aListItems.AppendL( *useGprs ); |
|
907 aCommandArray.AppendL( ECchUiCommandCopyGprs ); |
|
908 } |
|
909 |
|
910 CleanupStack::PopAndDestroy( useGprs ); |
|
911 CleanupStack::PopAndDestroy( searchWlan ); |
|
912 |
|
913 CCHUIDEBUG( "CCCHUiNotifierImpl::FillChangeConnectionListboxL - OUT" ); |
|
914 } |
|
915 |
|
916 // --------------------------------------------------------------------------- |
|
917 // Check if VoIP over WCDMA is allowed |
|
918 // --------------------------------------------------------------------------- |
|
919 // |
|
920 TBool CCCHUiNotifierImpl::IsVoIPOverWCDMAAllowedL() |
|
921 { |
|
922 CCHUIDEBUG( "CCCHUiNotifierImpl::IsVoIPOverWCDMAAllowed - IN" ); |
|
923 |
|
924 CRCSEProfileRegistry* cRCSEProfileRegistry; |
|
925 cRCSEProfileRegistry = CRCSEProfileRegistry::NewLC(); |
|
926 TBool ret = EFalse; |
|
927 RPointerArray<CRCSEProfileEntry> entries; |
|
928 cRCSEProfileRegistry->FindByServiceIdL( iServiceId, entries ); |
|
929 if( entries.Count() ) |
|
930 { |
|
931 ret = CRCSEProfileEntry::EOn == entries[ 0 ]->iAllowVoIPoverWCDMA; |
|
932 } |
|
933 |
|
934 entries.ResetAndDestroy(); |
|
935 entries.Close(); |
|
936 CleanupStack::PopAndDestroy(); //cRCSEProfileRegistry |
|
937 |
|
938 return ret; |
|
939 } |
|
940 |
|
941 // --------------------------------------------------------------------------- |
|
942 // From class CCCHUiNotifierBase. |
|
943 // --------------------------------------------------------------------------- |
|
944 // |
|
945 CCCHUiNotifierImpl::TNotifierInfo CCCHUiNotifierImpl::RegisterL() |
|
946 { |
|
947 iInfo.iUid=KCchUiNotifierUid; |
|
948 iInfo.iChannel=KCchUiNotifierChannel; |
|
949 iInfo.iPriority=ENotifierPriorityVHigh; |
|
950 return iInfo; |
|
951 } |
|
952 |
|
953 // --------------------------------------------------------------------------- |
|
954 // From class CCCHUiNotifierBase. |
|
955 // --------------------------------------------------------------------------- |
|
956 // |
|
957 TPtrC8 CCCHUiNotifierImpl::UpdateL( const TDesC8& /*aBuffer*/ ) |
|
958 { |
|
959 TPtrC8 ret( KNullDesC8 ); |
|
960 return ret; |
|
961 } |
|
962 |
|
963 // --------------------------------------------------------------------------- |
|
964 // From class CCCHUiNotifierBase. |
|
965 // --------------------------------------------------------------------------- |
|
966 // |
|
967 void CCCHUiNotifierImpl::StartL( |
|
968 const TDesC8& aBuffer, |
|
969 TInt aReplySlot, |
|
970 const RMessagePtr2& aMessage) |
|
971 { |
|
972 CCHUIDEBUG( "CCCHUiNotifierImpl::StartL - IN" ); |
|
973 |
|
974 __ASSERT_DEBUG( iMessage.IsNull(), User::Leave( KErrAlreadyExists ) ); |
|
975 |
|
976 // Read aBuffer for control information |
|
977 TCCHUiNotifierParams param; |
|
978 TPckgC<TCCHUiNotifierParams> pckg(param); |
|
979 pckg.Set( aBuffer ); |
|
980 |
|
981 CCCHUiNotifierBase::StartL( aBuffer, aReplySlot, aMessage ); |
|
982 iDialogMode = pckg().iDialogMode; |
|
983 iServiceId = pckg().iServiceId; |
|
984 |
|
985 switch( pckg().iDialogMode ) |
|
986 { |
|
987 case MCchUiObserver::ECchUiDialogTypeUsernamePasswordFailed: |
|
988 { |
|
989 CCHUIDEBUG( "StartL - wrong username/password" ); |
|
990 ShowInvalidUsernamePasswordNoteL( |
|
991 aReplySlot, aMessage, pckg().iServiceId ); |
|
992 } |
|
993 break; |
|
994 case MCchUiObserver::ECchUiDialogTypeAuthenticationFailed: |
|
995 { |
|
996 CCHUIDEBUG( "StartL - auth failed" ); |
|
997 ShowUsernamePasswordQueryL( |
|
998 aReplySlot, aMessage, pckg().iServiceId, pckg().iUsername ); |
|
999 } |
|
1000 break; |
|
1001 |
|
1002 case MCchUiObserver::ECchUiDialogTypeNoConnectionAvailable: |
|
1003 { |
|
1004 CCHUIDEBUG( "StartL - no connections" ); |
|
1005 // Do nothing here. Uses RunL to show notifier instead. |
|
1006 // Needed for cancel functionality. |
|
1007 } |
|
1008 break; |
|
1009 case MCchUiObserver::ECchUiDialogTypeNoConnectionDefined: |
|
1010 { |
|
1011 CCHUIDEBUG( "StartL - no conn defined" ); |
|
1012 ShowNoConnectionsQueryL( |
|
1013 aReplySlot, aMessage, pckg().iServiceId, ETrue ); |
|
1014 } |
|
1015 break; |
|
1016 case MCchUiObserver::ECchUiDialogTypeDefectiveSettings: |
|
1017 { |
|
1018 CCHUIDEBUG( "StartL - defective settings" ); |
|
1019 ShowDefectiveSettingsL( |
|
1020 aReplySlot, aMessage, pckg().iServiceId ); |
|
1021 } |
|
1022 break; |
|
1023 case MCchUiObserver::ECchUiDialogTypeErrorInConnection: |
|
1024 { |
|
1025 CCHUIDEBUG( "StartL - error in connection" ); |
|
1026 ShowErrorInConnectionNoteL( |
|
1027 aReplySlot, aMessage, pckg().iServiceId ); |
|
1028 } |
|
1029 break; |
|
1030 case MCchUiObserver::ECchUiDialogTypeConfirmChangeConnection: |
|
1031 { |
|
1032 CCHUIDEBUG( "StartL - confirm change connection" ); |
|
1033 ShowConfirmChangeConnectionL( |
|
1034 aReplySlot, |
|
1035 aMessage, |
|
1036 pckg().iServiceId, |
|
1037 pckg().iCurrentConnectionIapId ); |
|
1038 } |
|
1039 break; |
|
1040 case MCchUiObserver::ECchUiDialogTypeChangeConnection: |
|
1041 { |
|
1042 CCHUIDEBUG( "StartL - change connection" ); |
|
1043 ShowChangeConnectionQueryL( |
|
1044 aReplySlot, |
|
1045 aMessage, |
|
1046 pckg().iServiceId, |
|
1047 pckg().iCurrentConnectionIapId ); |
|
1048 } |
|
1049 break; |
|
1050 default: |
|
1051 { |
|
1052 User::Leave( KErrNotSupported ); |
|
1053 } |
|
1054 break; |
|
1055 } |
|
1056 |
|
1057 CCHUIDEBUG( "CCCHUiNotifierImpl::StartL - OUT" ); |
|
1058 } |
|
1059 |
|
1060 // --------------------------------------------------------------------------- |
|
1061 // From class MCchUiCallStateObserver. |
|
1062 // --------------------------------------------------------------------------- |
|
1063 // |
|
1064 void CCCHUiNotifierImpl::CallStateChanged( TInt aCallState ) |
|
1065 { |
|
1066 CCHUIDEBUG( "CCCHUiNotifierImpl::CallStateChangedL - Start" ); |
|
1067 |
|
1068 switch( aCallState ) |
|
1069 { |
|
1070 case EPSCTsyCallStateRinging: |
|
1071 { |
|
1072 if ( iListQueryDialog ) |
|
1073 { |
|
1074 delete iListQueryDialog; |
|
1075 iListQueryDialog = NULL; |
|
1076 |
|
1077 CompleteMessage( KErrCancel ); |
|
1078 CCCHUiNotifierBase::Cancel(); |
|
1079 } |
|
1080 } |
|
1081 break; |
|
1082 default: |
|
1083 { |
|
1084 // Nothing to do. |
|
1085 } |
|
1086 break; |
|
1087 } |
|
1088 |
|
1089 CCHUIDEBUG( "CCCHUiNotifierImpl::CallStateChangedL - End" ); |
|
1090 } |