imservices/instantmessagingcache/imcacheclient/src/cimcacheaccesseventhandler.cpp
changeset 1 b610b446cb01
parent 0 e6b17d312c8b
child 12 a152385bb39d
equal deleted inserted replaced
0:e6b17d312c8b 1:b610b446cb01
   131 		    break;	
   131 		    break;	
   132 		    }
   132 		    }
   133 		}	
   133 		}	
   134 
   134 
   135 	TRACE( T_LIT("CIMCacheAccessEventHandler::RunL() iContinueObserving iContinueObserving = %d") ,iContinueObserving);
   135 	TRACE( T_LIT("CIMCacheAccessEventHandler::RunL() iContinueObserving iContinueObserving = %d") ,iContinueObserving);
       
   136 		// Comment: cancel operation is changes as synchronous. iContinueObserving from event
       
   137 	// can not really be trusted since complete code might be different if leave has occured 
       
   138 	// for example. Cancel is handled here as generic cancel.
   136 	// check need to continue observing to server
   139 	// check need to continue observing to server
   137 	if( iContinueObserving )
   140 	if( iContinueObserving && KErrCancel != iStatus.Int() )
   138 		{
   141 		{
   139 		iRegistrar.RegisterObserverToServerL( iStatus ,EIMCacheObserveMessageAccessRegister );
   142 		iRegistrar.RegisterObserverToServerL( iStatus ,EIMCacheObserveMessageAccessRegister );
   140 		SetActive();
   143 		SetActive();
   141 		}
   144 		}
   142 	TRACE( T_LIT("CIMCacheAccessEventHandler::RunL() end") );
   145 	TRACE( T_LIT("CIMCacheAccessEventHandler::RunL() end") );
   146 // -----------------------------------------------------------------------------
   149 // -----------------------------------------------------------------------------
   147 //	
   150 //	
   148 void CIMCacheAccessEventHandler::DoCancel()
   151 void CIMCacheAccessEventHandler::DoCancel()
   149 	{
   152 	{
   150 	TRACE( T_LIT("CIMCacheAccessEventHandler::DoCancel() ") );
   153 	TRACE( T_LIT("CIMCacheAccessEventHandler::DoCancel() ") );
       
   154 		// Comment: set to EFalse here since we can not trust other changes. See
       
   155 	// comments in RunL
       
   156 	iContinueObserving = EFalse;
   151 	if( IsActive() )
   157 	if( IsActive() )
   152         {
   158         {
   153         TRAP_IGNORE(iRegistrar.CancelRequestL( iStatus ,EIMCacheCancelRequest ));
   159         TRAP_IGNORE(iRegistrar.CancelRequestL( iStatus ,EIMCacheCancelRequest ));
   154         }
   160         }
   155 	}
   161 	}