idlefw/plugins/devicestatus/src/aioperatornamepublisher.cpp
branchRCL_3
changeset 19 edd621764147
parent 16 b276298d5729
equal deleted inserted replaced
16:b276298d5729 19:edd621764147
   162     iExtension = &aExtension;
   162     iExtension = &aExtension;
   163     iPrioritizer = &aPrioritizer;
   163     iPrioritizer = &aPrioritizer;
   164     iBroadcaster = &aBroadcaster;
   164     iBroadcaster = &aBroadcaster;
   165     }
   165     }
   166 
   166 
       
   167 void CAiOperatorNamePublisher::RefreshIfActiveL( TBool aClean )
       
   168     {
       
   169     if ( !iSuspended )
       
   170         {
       
   171         RefreshL( aClean );
       
   172         }
       
   173     }
   167 
   174 
   168 void CAiOperatorNamePublisher::RefreshL( TBool aClean )
   175 void CAiOperatorNamePublisher::RefreshL( TBool aClean )
   169     {
   176     {
   170     iSuccess = EFalse;
   177     iSuccess = EFalse;
   171 
   178 
   615 void CAiOperatorNamePublisher::StartDelayedPLMNOperation()
   622 void CAiOperatorNamePublisher::StartDelayedPLMNOperation()
   616     {
   623     {
   617     if( !iPeriodic->IsActive() )
   624     if( !iPeriodic->IsActive() )
   618         {
   625         {
   619         iPeriodic->Start( KCleanOperationDelay,
   626         iPeriodic->Start( KCleanOperationDelay,
   620                           0,
   627                           KCleanOperationDelay,
   621                           TCallBack( CleanAndShowPLMNOperationCallback, this ) );
   628                           TCallBack( CleanAndShowPLMNOperationCallback, this ) );
   622         }
   629         }
   623     }
   630     }
   624 
   631 
   625 
   632 
   628     CAiOperatorNamePublisher* self =
   635     CAiOperatorNamePublisher* self =
   629                     static_cast<CAiOperatorNamePublisher*>( aPtr );
   636                     static_cast<CAiOperatorNamePublisher*>( aPtr );
   630 
   637 
   631     if( self )
   638     if( self )
   632         {
   639         {
   633         TRAP_IGNORE
   640         self->iPeriodic->Cancel();
   634             (
   641 		// check if got suspended while timer was active
   635             //clean
   642         if ( !self->iSuspended )
   636             self->DoCleanOperationL();
   643             {
   637             //show PLMN name
   644             TRAP_IGNORE
   638             self->ShowNetworkIdentityNameL( ETrue );
   645                 (
   639             );
   646                 //clean
       
   647                 self->DoCleanOperationL();
       
   648                 //show PLMN name
       
   649                 self->ShowNetworkIdentityNameL( ETrue );
       
   650                 );
       
   651             }
   640         }
   652         }
   641 
   653 
   642     return KErrNone;
   654     return KErrNone;
   643     }
   655     }
   644 
   656 
   646 void CAiOperatorNamePublisher::DoCleanOperationL()
   658 void CAiOperatorNamePublisher::DoCleanOperationL()
   647     {
   659     {
   648     iPrioritizer->TryToCleanL( *iBroadcaster,
   660     iPrioritizer->TryToCleanL( *iBroadcaster,
   649                                 EAiDeviceStatusContentNetworkIdentity,
   661                                 EAiDeviceStatusContentNetworkIdentity,
   650                                 EAiServiceProviderName );
   662                                 EAiServiceProviderName );
   651     iPeriodic->Cancel();
       
   652     }
   663     }
   653 
   664 
   654 
   665 
   655 TBool CAiOperatorNamePublisher::RefreshL( TInt aContentId, TBool aClean )
   666 TBool CAiOperatorNamePublisher::RefreshL( TInt aContentId, TBool aClean )
   656 	{
   667 	{
   672 TBool CAiOperatorNamePublisher::SuspendL( TInt aContentId, TBool /*aClean*/ )
   683 TBool CAiOperatorNamePublisher::SuspendL( TInt aContentId, TBool /*aClean*/ )
   673     {
   684     {
   674     if ( aContentId == EAiDeviceStatusContentNetworkIdentity )
   685     if ( aContentId == EAiDeviceStatusContentNetworkIdentity )
   675         {
   686         {
   676         iSuspended = ETrue;
   687         iSuspended = ETrue;
   677         
   688         iPeriodic->Cancel();
   678         return ETrue;
   689         return ETrue;
   679         }
   690         }
   680 
   691 
   681     return EFalse;    
   692     return EFalse;    
   682     }
   693     }