idlefw/plugins/devicestatus/src/aioperatornamepublisher.cpp
branchRCL_3
changeset 9 d0529222e3f0
parent 0 79c6a41cd166
child 51 15e4dd19031c
equal deleted inserted replaced
4:1a2a00e78665 9:d0529222e3f0
    18 
    18 
    19 #include <StringLoader.h>
    19 #include <StringLoader.h>
    20 #include <centralrepository.h>
    20 #include <centralrepository.h>
    21 #include <avkondomainpskeys.h>
    21 #include <avkondomainpskeys.h>
    22 #include <e32property.h>
    22 #include <e32property.h>
       
    23 
    23 #include <aidevstaplgres.rsg>
    24 #include <aidevstaplgres.rsg>
    24 #include "aioperatornamepublisher.h"
    25 #include "aioperatornamepublisher.h"
    25 #include "ainetworkinfolistener.h"
    26 #include "ainetworkinfolistener.h"
    26 #include "aidevicestatuscontentmodel.h"
    27 #include "aidevicestatuscontentmodel.h"
    27 #include "aiprioritizer.h"
    28 #include "aiprioritizer.h"
   111 void CAiOperatorNamePublisher::HandleNetworkInfoChange(
   112 void CAiOperatorNamePublisher::HandleNetworkInfoChange(
   112                 const MNWMessageObserver::TNWMessages& /*aMessage*/,
   113                 const MNWMessageObserver::TNWMessages& /*aMessage*/,
   113                 const TNWInfo& /*aInfo*/,
   114                 const TNWInfo& /*aInfo*/,
   114                 const TBool aShowOpInd )
   115                 const TBool aShowOpInd )
   115     {
   116     {
   116         if( aShowOpInd )
   117     if ( iSuspended )
   117         	{
   118         {
   118         	TRAP_IGNORE  ( RefreshL( ETrue ));
   119         return;
   119         	}
   120         }
   120         else
   121     
   121         	{
   122     if( aShowOpInd )
   122         	TRAP_IGNORE (
   123         {
   123         		iPrioritizer->TryToCleanL( *iBroadcaster,
   124         TRAP_IGNORE  ( RefreshL( ETrue ));
   124             							EAiDeviceStatusContentNetworkIdentity,
   125         }
   125             							iPriority ));
   126     else
   126         	}
   127         {
   127         
   128         TRAP_IGNORE (
       
   129             iPrioritizer->TryToCleanL( *iBroadcaster,
       
   130                                     EAiDeviceStatusContentNetworkIdentity,
       
   131                                     iPriority ));
       
   132         }    
   128     }
   133     }
   129 
   134 
   130 
   135 
   131 void CAiOperatorNamePublisher::Subscribe( MAiContentObserver& /*aObserver*/,
   136 void CAiOperatorNamePublisher::Subscribe( MAiContentObserver& /*aObserver*/,
   132 									                MAiPropertyExtension& aExtension,
   137 									                CHsContentPublisher& aExtension,
   133                                                     MAiPublishPrioritizer& aPrioritizer,
   138                                                     MAiPublishPrioritizer& aPrioritizer,
   134                                                     MAiPublisherBroadcaster& aBroadcaster )
   139                                                     MAiPublisherBroadcaster& aBroadcaster )
   135     {
   140     {
   136     iExtension = &aExtension;
   141     iExtension = &aExtension;
   137     iPrioritizer = &aPrioritizer;
   142     iPrioritizer = &aPrioritizer;
   141 
   146 
   142 void CAiOperatorNamePublisher::RefreshL( TBool aClean )
   147 void CAiOperatorNamePublisher::RefreshL( TBool aClean )
   143     {
   148     {
   144     iSuccess = EFalse;
   149     iSuccess = EFalse;
   145 
   150 
       
   151     if ( iSuspended )
       
   152         {
       
   153         return;
       
   154         }
       
   155     
   146     if( aClean )
   156     if( aClean )
   147         {
   157         {
   148         iPrioritizer->TryToCleanL( *iBroadcaster,
   158         iPrioritizer->TryToCleanL( *iBroadcaster,
   149                                     EAiDeviceStatusContentNetworkIdentity,
   159                                     EAiDeviceStatusContentNetworkIdentity,
   150                                     iPriority );
   160                                     iPriority );
   608     }
   618     }
   609 
   619 
   610 
   620 
   611 TBool CAiOperatorNamePublisher::RefreshL( TInt aContentId, TBool aClean )
   621 TBool CAiOperatorNamePublisher::RefreshL( TInt aContentId, TBool aClean )
   612 	{
   622 	{
   613     if( aContentId == EAiDeviceStatusContentNetworkIdentity )
   623     if ( aContentId == EAiDeviceStatusContentNetworkIdentity )
   614         {
   624         {
       
   625         iSuspended = EFalse;
       
   626         
   615    	    RefreshL( aClean );
   627    	    RefreshL( aClean );
   616    	    if( iSuccess )
   628    	    
       
   629    	    if ( iSuccess )
   617    	        {
   630    	        {
   618    	        return ETrue;
   631    	        return ETrue;
   619    	        }
   632    	        }
   620     	}
   633     	}
   621 
   634 
   622     return EFalse;
   635     return EFalse;
   623 	}
   636 	}
   624 
   637 
       
   638 TBool CAiOperatorNamePublisher::SuspendL( TInt aContentId, TBool /*aClean*/ )
       
   639     {
       
   640     if ( aContentId == EAiDeviceStatusContentNetworkIdentity )
       
   641         {
       
   642         iSuspended = ETrue;
       
   643         
       
   644         return ETrue;
       
   645         }
       
   646 
       
   647     return EFalse;    
       
   648     }
   625 
   649 
   626 TBool CAiOperatorNamePublisher::RefreshContentWithPriorityL(
   650 TBool CAiOperatorNamePublisher::RefreshContentWithPriorityL(
   627                                             TInt aContentId,
   651                                             TInt aContentId,
   628                                             TInt aPriority )
   652                                             TInt aPriority )
   629 	{
   653 	{