metadataengine/server/src/mdsserversession.cpp
changeset 40 910a23996aa0
parent 28 c461c7fa72c2
child 60 79f826a55db2
equal deleted inserted replaced
38:5210ffae7137 40:910a23996aa0
   599 
   599 
   600     find->FindL( userLevel );
   600     find->FindL( userLevel );
   601 
   601 
   602     CleanupStack::Pop( find );
   602     CleanupStack::Pop( find );
   603     
   603     
   604     iFindEngines.Append( find );
   604     iFindEngines.AppendL( find );
   605     }
   605     }
   606 
   606 
   607 // ---------------------------------------------------------------------------
   607 // ---------------------------------------------------------------------------
   608 // FindAsyncL
   608 // FindAsyncL
   609 // ---------------------------------------------------------------------------
   609 // ---------------------------------------------------------------------------
   639 
   639 
   640     find->FindAsyncL( userLevel );
   640     find->FindAsyncL( userLevel );
   641 
   641 
   642     CleanupStack::Pop( find );
   642     CleanupStack::Pop( find );
   643     
   643     
   644     iFindEngines.Append( find );
   644     iFindEngines.AppendL( find );
   645     }
   645     }
   646 
   646 
   647 // ---------------------------------------------------------------------------
   647 // ---------------------------------------------------------------------------
   648 // FindContinueAsyncL
   648 // FindContinueAsyncL
   649 // ---------------------------------------------------------------------------
   649 // ---------------------------------------------------------------------------
   676     	}
   676     	}
   677     // find engine is already complete
   677     // find engine is already complete
   678     else if( findEngine->IsComplete() )
   678     else if( findEngine->IsComplete() )
   679     	{
   679     	{
   680     	delete findEngine;
   680     	delete findEngine;
       
   681     	findEngine = NULL;
   681 
   682 
   682     	iFindEngines.Remove( feIndex );
   683     	iFindEngines.Remove( feIndex );
   683     	
   684     	
   684     	User::Leave( KErrCompletion );
   685     	User::Leave( KErrCompletion );
   685     	}
   686     	}
   706     	if( queryId == findEngine->QueryId() )
   707     	if( queryId == findEngine->QueryId() )
   707     		{
   708     		{
   708     		findEngine->Cancel( aError );
   709     		findEngine->Cancel( aError );
   709 
   710 
   710     		delete findEngine;
   711     		delete findEngine;
       
   712     		findEngine = NULL;
   711 
   713 
   712     		iFindEngines.Remove( i );
   714     		iFindEngines.Remove( i );
   713 
   715 
   714     		aMsg.Complete( aError );
   716     		aMsg.Complete( aError );
   715     		return;
   717     		return;
   862             aMsg.WriteL( 1, findEngine->ResultsL().Buffer() );
   864             aMsg.WriteL( 1, findEngine->ResultsL().Buffer() );
   863 
   865 
   864             if ( serverRequest != EAsyncFindSetReady )
   866             if ( serverRequest != EAsyncFindSetReady )
   865                 {
   867                 {
   866                 delete findEngine;
   868                 delete findEngine;
       
   869                 findEngine = NULL;
   867                 
   870                 
   868                 iFindEngines.Remove( findEngineIndex );
   871                 iFindEngines.Remove( findEngineIndex );
   869                 iFindEngines.Compress();
   872                 iFindEngines.Compress();
   870                 }
   873                 }
   871             }
   874             }