17 |
17 |
18 |
18 |
19 |
19 |
20 // INCLUDE FILES |
20 // INCLUDE FILES |
21 #include <centralrepository.h> |
21 #include <centralrepository.h> |
22 #include <RSatRefresh.h> |
22 #include <RSatRefresh.h> |
23 #include <BTSapDomainPSKeys.h> // BT SAP Central Repository key. |
23 #include <BTSapDomainPSKeys.h> // bt sap central repository key. |
24 #include <featmgr.h> |
24 #include <featmgr.h> |
25 |
25 |
26 #include "CSSSettingsRefreshHandler.h" |
26 #include "CSSSettingsRefreshHandler.h" |
27 #include "SSSettingsLogger.h" |
27 #include "SSSettingsLogger.h" |
28 #include "CSSSettingsActiveObject.h" |
28 #include "CSSSettingsActiveObject.h" |
29 |
29 |
30 // ============================= LOCAL FUNCTIONS =============================== |
30 // ============================= LOCAL FUNCTIONS =============================== |
31 |
31 |
32 |
32 |
33 // CLASS DECLARATION |
33 // CLASS DECLARATION |
264 iNotifyInfo->iObserver->Refresh( |
264 iNotifyInfo->iObserver->Refresh( |
265 aType, |
265 aType, |
266 ( TSatElementaryFiles ) changedFiles ); |
266 ( TSatElementaryFiles ) changedFiles ); |
267 |
267 |
268 if ( aFiles.Locate( KCsp1Ef ) != KErrNotFound ) |
268 if ( aFiles.Locate( KCsp1Ef ) != KErrNotFound ) |
269 { |
269 { |
270 iRSatRefresh->RefreshEFRead( ETrue ); |
270 iRSatRefresh->RefreshEFRead( ETrue ); |
271 } |
271 } |
272 else if( aFiles.Locate( KCsp2Ef ) != KErrNotFound ) |
272 else if( aFiles.Locate( KCsp2Ef ) != KErrNotFound ) |
273 { |
273 { |
274 iRSatRefresh->RefreshEFRead( ETrue ); |
274 iRSatRefresh->RefreshEFRead( ETrue ); |
275 } |
275 } |
276 else |
276 else |
277 { |
277 { |
278 iRSatRefresh->RefreshEFRead( EFalse ); |
278 iRSatRefresh->RefreshEFRead( EFalse ); |
279 } |
279 } |
280 } |
280 } |
281 else // ESSSettingsAllowRefresh |
281 else // ESSSettingsAllowRefresh |
282 { |
282 { |
283 // Inform the observer about the coming refresh event. |
283 // Inform the observer about the coming refresh event. |
284 allow = iNotifyInfo->iObserver->AllowRefresh( |
284 allow = iNotifyInfo->iObserver->AllowRefresh( |
289 |
289 |
290 // If there is no client listening changed files SSSettings has to |
290 // If there is no client listening changed files SSSettings has to |
291 // check if some CSP file is into the list and send right response |
291 // check if some CSP file is into the list and send right response |
292 // since itself reads CSP files. |
292 // since itself reads CSP files. |
293 if ( !changedFiles ) |
293 if ( !changedFiles ) |
294 { |
294 { |
295 if ( aFiles.Locate( KCsp1Ef ) != KErrNotFound ) |
295 if ( aFiles.Locate( KCsp1Ef ) != KErrNotFound ) |
296 { |
296 { |
297 iRSatRefresh->RefreshEFRead( EFalse ); |
297 iRSatRefresh->RefreshEFRead( EFalse ); |
298 } |
298 } |
299 else if( aFiles.Locate( KCsp2Ef ) != KErrNotFound ) |
299 else if( aFiles.Locate( KCsp2Ef ) != KErrNotFound ) |
300 { |
300 { |
301 iRSatRefresh->RefreshEFRead( EFalse ); |
301 iRSatRefresh->RefreshEFRead( EFalse ); |
302 } |
302 } |
303 else |
303 else |
304 { |
304 { |
305 iRSatRefresh->RefreshEFRead( ETrue ); |
305 iRSatRefresh->RefreshEFRead( ETrue ); |
306 } |
306 } |
307 } |
307 } |
308 __SSSLOGSTRING1("[SSS] DoHandleRefresh: changedFiles: %d", changedFiles); |
308 __SSSLOGSTRING1("[SSS] DoHandleRefresh: changedFiles: %d", changedFiles); |
309 } |
309 } |
310 else |
310 else |
311 { |
311 { |
312 iRSatRefresh->RefreshEFRead( EFalse ); |
312 iRSatRefresh->RefreshEFRead( EFalse ); |
313 } |
313 } |
314 } |
314 } |
315 |
315 |
316 if ( !iNotifyInfo->iObserver && ( aType == EFileChangeNotification |
316 if ( !iNotifyInfo->iObserver && ( aType == EFileChangeNotification |
317 || aType == ESimInitFileChangeNotification |
317 || aType == ESimInitFileChangeNotification |
318 || aType == ESimInit ) ) |
318 || aType == ESimInit ) ) |
319 { |
319 { |
320 if ( aFiles.Locate( KCsp1Ef ) != KErrNotFound ) |
320 if ( aFiles.Locate( KCsp1Ef ) != KErrNotFound ) |
321 { |
321 { |
322 iRSatRefresh->RefreshEFRead( EFalse ); |
322 iRSatRefresh->RefreshEFRead( EFalse ); |
323 } |
323 } |
324 else if( aFiles.Locate( KCsp2Ef ) != KErrNotFound ) |
324 else if( aFiles.Locate( KCsp2Ef ) != KErrNotFound ) |
325 { |
325 { |
326 iRSatRefresh->RefreshEFRead( EFalse ); |
326 iRSatRefresh->RefreshEFRead( EFalse ); |
327 } |
327 } |
328 else |
328 else |
329 { |
329 { |
330 iRSatRefresh->RefreshEFRead( ETrue ); |
330 iRSatRefresh->RefreshEFRead( ETrue ); |
331 } |
331 } |
332 } |
332 } |
333 |
333 |
334 __SSSLOGSTRING("[SSS] <--CSSSettingsRefreshHandler::DoHandleRefresh"); |
334 __SSSLOGSTRING("[SSS] <--CSSSettingsRefreshHandler::DoHandleRefresh"); |
335 return allow; |
335 return allow; |
336 } |
336 } |
337 |
337 |
338 // ----------------------------------------------------------------------------- |
338 // ----------------------------------------------------------------------------- |