phoneapp/phoneuivoipextension/src/cphonevoiperrormessageshandler.cpp
branchRCL_3
changeset 25 5266b1f337bd
parent 24 41a7f70b3818
--- a/phoneapp/phoneuivoipextension/src/cphonevoiperrormessageshandler.cpp	Tue Aug 31 15:14:29 2010 +0300
+++ b/phoneapp/phoneuivoipextension/src/cphonevoiperrormessageshandler.cpp	Wed Sep 01 12:30:10 2010 +0100
@@ -20,11 +20,16 @@
 #include <ccpdefs.h>
 #include <mpeengineinfo.h>
 #include <StringLoader.h>
+
+#include <ccherror.h>
+
 #include <spsettings.h>
 #include <spentry.h>
+
 #include <telephonydomainpskeys.h>
 #include <UikonInternalPSKeys.h>
 #include <aknnotedialog.h>
+
 #include "cphonevoiperrormessageshandler.h"
 #include "cphonemainerrormessageshandler.h"
 #include "cphoneerrormessageshandler.h"
@@ -294,8 +299,8 @@
         }
      
     globalNoteParam.SetText( *text );
-    globalNoteParam.SetType( EPhoneMessageBoxInformation );
-
+    globalNoteParam.SetType( EAknGlobalConfirmationNote );
+    globalNoteParam.SetTone( EAvkonSIDInformationTone );
             
     iViewCommandHandle->ExecuteCommandL( 
             EPhoneViewShowGlobalNote, &globalNoteParam );
@@ -370,12 +375,64 @@
 // -----------------------------------------------------------
 //
 void CPhoneVoIPErrorMessagesHandler::ShowRegistrationErrorNotesL( 
-    TInt /*aErrorCode*/ )
+    TInt aErrorCode )
     {
     __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
               "CPhoneVoIPErrorMessagesHandler::ShowRegistrationErrorNotesL()" );
     // Dismiss service enabling wait note
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalWaitNote );    
+    iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalWaitNote );
+    
+    switch ( aErrorCode )
+        {
+        case KCCHErrorAccessPointNotDefined:
+            {
+            TUint32 serviceId = 
+                iStateMachine->PhoneEngineInfo()->ServiceIdCommand();
+            ShowErrorNoteWithServiceNameL( EPhoneVoIPNoConnectionsDefined,
+                serviceId );
+            break;
+            }
+        case KCCHErrorBandwidthInsufficient:   
+            {
+            TUint32 serviceId = 
+                iStateMachine->PhoneEngineInfo()->ServiceIdCommand();
+            ShowErrorNoteWithServiceNameL( EPhoneVoIPCallsNotSupported,
+                serviceId );
+            break;
+            }
+        case KCCHErrorInvalidSettings:
+            {
+            TUint32 serviceId = 
+                iStateMachine->PhoneEngineInfo()->ServiceIdCommand();
+            ShowErrorNoteWithServiceNameL( EPhoneVoIPDefectiveSettings,
+                serviceId );
+            break;
+            }
+        case KCCHErrorAuthenticationFailed:
+            {
+            SendGlobalErrorNoteL( EPhoneVoIPAuthenticationFailed );
+            break;
+            }
+        case KCCHErrorInvalidIap:
+        case KCCHErrorNetworkLost:
+        case KCCHErrorServiceNotResponding:
+            {
+            TUint32 serviceId = 
+                iStateMachine->PhoneEngineInfo()->ServiceIdCommand();
+            ShowErrorNoteWithServiceNameL( EPhoneVoIPNoConnectionsAvailable,
+                serviceId );
+            break;
+            }
+        case KCCHErrorLoginFailed: 
+        default:
+            {
+            TUint32 serviceId = 
+               iStateMachine->PhoneEngineInfo()->ServiceIdCommand();
+            ShowErrorNoteWithServiceNameL( EPhoneVoIPServiceUnavailable,
+               serviceId );
+            break;
+            }
+        }
     }
 
 // ---------------------------------------------------------
@@ -401,11 +458,12 @@
             &globalNotifierParam );
             
         TPhoneCmdParamGlobalNote globalNoteParam;
-        globalNoteParam.SetType( EPhoneMessageBoxInformation );
+        globalNoteParam.SetType( EAknGlobalErrorNote );
         globalNoteParam.SetTextResourceId( 
             CPhoneMainResourceResolver::Instance()->
             ResolveResourceID( aResourceId ) );
         globalNoteParam.SetText( aText );
+        globalNoteParam.SetTone( CAknNoteDialog::EErrorTone );
 
         iViewCommandHandle->ExecuteCommandL(  
             EPhoneViewShowGlobalNote, &globalNoteParam );