16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 |
19 |
20 #include <etelmm.h> |
20 #include <etelmm.h> |
|
21 #include <MessagingDomainCRKeys.h> |
21 #include "MsgWaitingObserver.h" |
22 #include "MsgWaitingObserver.h" |
22 #include "msgindicatorpluginlog.h" |
23 #include "msgindicatorpluginlog.h" |
23 #include "msgindicatorpluginimplementation.h" |
24 #include "msgindicatorpluginimplementation.h" |
24 |
25 |
25 // --------------------------------------------------------------------------- |
26 // --------------------------------------------------------------------------- |
167 |
168 |
168 MSGPLUGINLOGGER_WRITE_FORMAT( "::UpdateIndicatorStatus: Voice mail line 1 count %d", iMsgWaiting.iVoiceMsgs ); |
169 MSGPLUGINLOGGER_WRITE_FORMAT( "::UpdateIndicatorStatus: Voice mail line 1 count %d", iMsgWaiting.iVoiceMsgs ); |
169 MSGPLUGINLOGGER_WRITE_FORMAT( "::UpdateIndicatorStatus: Fax count %d", iMsgWaiting.iFaxMsgs ); |
170 MSGPLUGINLOGGER_WRITE_FORMAT( "::UpdateIndicatorStatus: Fax count %d", iMsgWaiting.iFaxMsgs ); |
170 |
171 |
171 iMsgWaiting = iMsgWaitingPckg(); |
172 iMsgWaiting = iMsgWaitingPckg(); |
172 |
173 if(!CheckSupressNotificationSettingL()) |
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 } |
185 } |
188 } |
186 if ( iMsgWaiting.iDisplayStatus & RMobilePhone::KDisplayAuxVoicemailActive ) |
189 if ( iMsgWaiting.iDisplayStatus & RMobilePhone::KDisplayAuxVoicemailActive ) |
187 { |
190 { |
188 MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaitingOnLine2 )"); |
191 MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaitingOnLine2 )"); |
189 iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaitingOnLine2 ); |
192 iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaitingOnLine2 ); |
192 { |
195 { |
193 MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorFaxMessage )"); |
196 MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorFaxMessage )"); |
194 iIndicatorPlugin.UpdateL( EAknIndicatorFaxMessage ); |
197 iIndicatorPlugin.UpdateL( EAknIndicatorFaxMessage ); |
195 } |
198 } |
196 } |
199 } |
197 |
200 // ------------------------------------------------------------------- |
|
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 } |
198 // End of File |
225 // End of File |