messagingappbase/msgavkon/msgindicatorplugin/src/MsgWaitingObserver.cpp
branchRCL_3
changeset 77 da6ac9d688df
parent 60 7fdbb852d323
equal deleted inserted replaced
71:17302fa075e1 77:da6ac9d688df
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 #include <etelmm.h>
    20 #include <etelmm.h>
    21 #include <MessagingDomainCRKeys.h>
       
    22 #include "MsgWaitingObserver.h"
    21 #include "MsgWaitingObserver.h"
    23 #include "msgindicatorpluginlog.h"
    22 #include "msgindicatorpluginlog.h"
    24 #include "msgindicatorpluginimplementation.h"
    23 #include "msgindicatorpluginimplementation.h"
    25 	
    24 	
    26 // ---------------------------------------------------------------------------
    25 // ---------------------------------------------------------------------------
   168 
   167 
   169     MSGPLUGINLOGGER_WRITE_FORMAT( "::UpdateIndicatorStatus: Voice mail line 1 count %d", iMsgWaiting.iVoiceMsgs );
   168     MSGPLUGINLOGGER_WRITE_FORMAT( "::UpdateIndicatorStatus: Voice mail line 1 count %d", iMsgWaiting.iVoiceMsgs );
   170     MSGPLUGINLOGGER_WRITE_FORMAT( "::UpdateIndicatorStatus: Fax count %d", iMsgWaiting.iFaxMsgs );
   169     MSGPLUGINLOGGER_WRITE_FORMAT( "::UpdateIndicatorStatus: Fax count %d", iMsgWaiting.iFaxMsgs );
   171 
   170 
   172     iMsgWaiting = iMsgWaitingPckg();
   171     iMsgWaiting = iMsgWaitingPckg();
   173     if(!CheckSupressNotificationSettingL())
   172 
       
   173     if(iMsgWaiting.iDisplayStatus & RMobilePhone::KDisplayVoicemailActive)
   174         {
   174         {
   175     	if(iMsgWaiting.iDisplayStatus & RMobilePhone::KDisplayVoicemailActive)
   175         if ( !iIndicatorPlugin.IsALSSupported() )
   176         	{
   176             {
   177         	if ( !iIndicatorPlugin.IsALSSupported() )
   177             MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaiting )");
   178             	{
   178             iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaiting );
   179             	MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaiting )");
   179             }
   180             	iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaiting );
   180         else
   181             	}
   181             {
   182         	else
   182             MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaitingOnLine1 )");
   183             	{
   183             iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaitingOnLine1 );
   184             	MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaitingOnLine1 )");
   184             }
   185             	iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaitingOnLine1 );
       
   186             	}
       
   187         	}
       
   188         }
   185         }
   189     if ( iMsgWaiting.iDisplayStatus & RMobilePhone::KDisplayAuxVoicemailActive )
   186     if ( iMsgWaiting.iDisplayStatus & RMobilePhone::KDisplayAuxVoicemailActive )
   190         {
   187         {
   191         MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaitingOnLine2 )");
   188         MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaitingOnLine2 )");
   192     	iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaitingOnLine2 );
   189     	iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaitingOnLine2 );
   195         {
   192         {
   196         MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorFaxMessage )");
   193         MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorFaxMessage )");
   197         iIndicatorPlugin.UpdateL( EAknIndicatorFaxMessage );
   194         iIndicatorPlugin.UpdateL( EAknIndicatorFaxMessage );
   198         }
   195         }
   199 	}	    
   196 	}	    
   200 // -------------------------------------------------------------------
   197 	    
   201 // Check the KMuiuSupressAllNotificationConfiguration value
       
   202 // -------------------------------------------------------------------
       
   203 //
       
   204 TBool CWaitingObserver::CheckSupressNotificationSettingL()
       
   205 {
       
   206     TBool result = EFalse; 
       
   207     TInt value = 0;
       
   208     CRepository* repository = NULL;
       
   209    
       
   210    TRAPD( err, repository = CRepository::NewL( KCRUidMuiuMessagingConfiguration ) );
       
   211    if( err == KErrNone && repository != NULL )
       
   212        {
       
   213        CleanupStack::PushL( repository ); 
       
   214        err = repository->Get( KMuiuSupressAllNotificationConfiguration, value );
       
   215        
       
   216        if(err == KErrNone && (value & KMuiuNotificationSupressedForVoiceMail ))
       
   217            {
       
   218            result = ETrue;
       
   219            }
       
   220         } 
       
   221        MSGPLUGINLOGGER_WRITE_FORMAT( "CWaitingObserver:  SupressNotification %d", result );
       
   222        CleanupStack::PopAndDestroy( repository );
       
   223        return result;
       
   224 }	    
       
   225 //  End of File
   198 //  End of File