18 // INCLUDES |
18 // INCLUDES |
19 |
19 |
20 #include <ccpdefs.h> |
20 #include <ccpdefs.h> |
21 #include <mpeengineinfo.h> |
21 #include <mpeengineinfo.h> |
22 #include <StringLoader.h> |
22 #include <StringLoader.h> |
23 |
|
24 #include <ccherror.h> |
|
25 |
|
26 #include <spsettings.h> |
23 #include <spsettings.h> |
27 #include <spentry.h> |
24 #include <spentry.h> |
28 |
|
29 #include <telephonydomainpskeys.h> |
25 #include <telephonydomainpskeys.h> |
30 #include <UikonInternalPSKeys.h> |
26 #include <UikonInternalPSKeys.h> |
31 #include <aknnotedialog.h> |
27 #include <aknnotedialog.h> |
32 |
|
33 #include "cphonevoiperrormessageshandler.h" |
28 #include "cphonevoiperrormessageshandler.h" |
34 #include "cphonemainerrormessageshandler.h" |
29 #include "cphonemainerrormessageshandler.h" |
35 #include "cphoneerrormessageshandler.h" |
30 #include "cphoneerrormessageshandler.h" |
36 #include "cphonestatehandle.h" |
31 #include "cphonestatehandle.h" |
37 #include "phonerssvoip.h" |
32 #include "phonerssvoip.h" |
297 CCoeEnv::Static() ); // Load new buffer |
292 CCoeEnv::Static() ); // Load new buffer |
298 |
293 |
299 } |
294 } |
300 |
295 |
301 globalNoteParam.SetText( *text ); |
296 globalNoteParam.SetText( *text ); |
302 globalNoteParam.SetType( EAknGlobalConfirmationNote ); |
297 globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
303 globalNoteParam.SetTone( EAvkonSIDInformationTone ); |
298 |
304 |
299 |
305 iViewCommandHandle->ExecuteCommandL( |
300 iViewCommandHandle->ExecuteCommandL( |
306 EPhoneViewShowGlobalNote, &globalNoteParam ); |
301 EPhoneViewShowGlobalNote, &globalNoteParam ); |
307 |
302 |
308 CleanupStack::PopAndDestroy( text ); |
303 CleanupStack::PopAndDestroy( text ); |
373 // ----------------------------------------------------------- |
368 // ----------------------------------------------------------- |
374 // CPhoneVoIPErrorMessagesHandler::ShowRegistrationErrorNotesL |
369 // CPhoneVoIPErrorMessagesHandler::ShowRegistrationErrorNotesL |
375 // ----------------------------------------------------------- |
370 // ----------------------------------------------------------- |
376 // |
371 // |
377 void CPhoneVoIPErrorMessagesHandler::ShowRegistrationErrorNotesL( |
372 void CPhoneVoIPErrorMessagesHandler::ShowRegistrationErrorNotesL( |
378 TInt aErrorCode ) |
373 TInt /*aErrorCode*/ ) |
379 { |
374 { |
380 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
375 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
381 "CPhoneVoIPErrorMessagesHandler::ShowRegistrationErrorNotesL()" ); |
376 "CPhoneVoIPErrorMessagesHandler::ShowRegistrationErrorNotesL()" ); |
382 // Dismiss service enabling wait note |
377 // Dismiss service enabling wait note |
383 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalWaitNote ); |
378 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalWaitNote ); |
384 |
|
385 switch ( aErrorCode ) |
|
386 { |
|
387 case KCCHErrorAccessPointNotDefined: |
|
388 { |
|
389 TUint32 serviceId = |
|
390 iStateMachine->PhoneEngineInfo()->ServiceIdCommand(); |
|
391 ShowErrorNoteWithServiceNameL( EPhoneVoIPNoConnectionsDefined, |
|
392 serviceId ); |
|
393 break; |
|
394 } |
|
395 case KCCHErrorBandwidthInsufficient: |
|
396 { |
|
397 TUint32 serviceId = |
|
398 iStateMachine->PhoneEngineInfo()->ServiceIdCommand(); |
|
399 ShowErrorNoteWithServiceNameL( EPhoneVoIPCallsNotSupported, |
|
400 serviceId ); |
|
401 break; |
|
402 } |
|
403 case KCCHErrorInvalidSettings: |
|
404 { |
|
405 TUint32 serviceId = |
|
406 iStateMachine->PhoneEngineInfo()->ServiceIdCommand(); |
|
407 ShowErrorNoteWithServiceNameL( EPhoneVoIPDefectiveSettings, |
|
408 serviceId ); |
|
409 break; |
|
410 } |
|
411 case KCCHErrorAuthenticationFailed: |
|
412 { |
|
413 SendGlobalErrorNoteL( EPhoneVoIPAuthenticationFailed ); |
|
414 break; |
|
415 } |
|
416 case KCCHErrorInvalidIap: |
|
417 case KCCHErrorNetworkLost: |
|
418 case KCCHErrorServiceNotResponding: |
|
419 { |
|
420 TUint32 serviceId = |
|
421 iStateMachine->PhoneEngineInfo()->ServiceIdCommand(); |
|
422 ShowErrorNoteWithServiceNameL( EPhoneVoIPNoConnectionsAvailable, |
|
423 serviceId ); |
|
424 break; |
|
425 } |
|
426 case KCCHErrorLoginFailed: |
|
427 default: |
|
428 { |
|
429 TUint32 serviceId = |
|
430 iStateMachine->PhoneEngineInfo()->ServiceIdCommand(); |
|
431 ShowErrorNoteWithServiceNameL( EPhoneVoIPServiceUnavailable, |
|
432 serviceId ); |
|
433 break; |
|
434 } |
|
435 } |
|
436 } |
379 } |
437 |
380 |
438 // --------------------------------------------------------- |
381 // --------------------------------------------------------- |
439 // CPhoneVoIPErrorMessagesHandler::SendGlobalErrorNoteWithTextL |
382 // CPhoneVoIPErrorMessagesHandler::SendGlobalErrorNoteWithTextL |
440 // --------------------------------------------------------- |
383 // --------------------------------------------------------- |
456 iViewCommandHandle->ExecuteCommandL( |
399 iViewCommandHandle->ExecuteCommandL( |
457 EPhoneViewSetGlobalNotifiersDisabled, |
400 EPhoneViewSetGlobalNotifiersDisabled, |
458 &globalNotifierParam ); |
401 &globalNotifierParam ); |
459 |
402 |
460 TPhoneCmdParamGlobalNote globalNoteParam; |
403 TPhoneCmdParamGlobalNote globalNoteParam; |
461 globalNoteParam.SetType( EAknGlobalErrorNote ); |
404 globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
462 globalNoteParam.SetTextResourceId( |
405 globalNoteParam.SetTextResourceId( |
463 CPhoneMainResourceResolver::Instance()-> |
406 CPhoneMainResourceResolver::Instance()-> |
464 ResolveResourceID( aResourceId ) ); |
407 ResolveResourceID( aResourceId ) ); |
465 globalNoteParam.SetText( aText ); |
408 globalNoteParam.SetText( aText ); |
466 globalNoteParam.SetTone( CAknNoteDialog::EErrorTone ); |
|
467 |
409 |
468 iViewCommandHandle->ExecuteCommandL( |
410 iViewCommandHandle->ExecuteCommandL( |
469 EPhoneViewShowGlobalNote, &globalNoteParam ); |
411 EPhoneViewShowGlobalNote, &globalNoteParam ); |
470 } |
412 } |
471 } |
413 } |