photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemds.cpp
branchRCL_3
changeset 13 bcb43dc84c44
parent 12 ce1c7ad1f18b
child 15 191387a8b767
equal deleted inserted replaced
12:ce1c7ad1f18b 13:bcb43dc84c44
   343 // ----------------------------------------------------------------------------
   343 // ----------------------------------------------------------------------------
   344 //     
   344 //     
   345 void CGlxDataSourceMde::HandleSessionError(CMdESession& /*aSession*/, TInt aError )    
   345 void CGlxDataSourceMde::HandleSessionError(CMdESession& /*aSession*/, TInt aError )    
   346     {
   346     {
   347     TRACER("CGlxDataSourceMde::HandleSessionError(CMdESession& /*aSession*/, TInt aError)")
   347     TRACER("CGlxDataSourceMde::HandleSessionError(CMdESession& /*aSession*/, TInt aError)")
       
   348     delete iSession;
   348     iSession = NULL;
   349     iSession = NULL;
   349     
   350     
   350     GLX_DEBUG2("void CGlxDataSourceMde::HandleSessionError() Session Error = %d", aError);
   351     GLX_DEBUG2("void CGlxDataSourceMde::HandleSessionError() Session Error = %d", aError);
   351 
   352 
   352     iDataSourceReady = EFalse;
   353     iDataSourceReady = EFalse;
   519     {
   520     {
   520     TRACER("CGlxDataSourceMde::AddMdEObserversL()");
   521     TRACER("CGlxDataSourceMde::AddMdEObserversL()");
   521 	iSession->AddRelationObserverL(*this);
   522 	iSession->AddRelationObserverL(*this);
   522 	iSession->AddRelationPresentObserverL(*this);
   523 	iSession->AddRelationPresentObserverL(*this);
   523 	
   524 	
   524 	iSession->AddObjectObserverL(*this);
   525 	//when setting observing conditions,
   525 	iSession->AddObjectPresentObserverL(*this);
   526 	//add filters for all images, videos, Albums & Tags
       
   527 	CMdELogicCondition* addCondition = CMdELogicCondition::NewLC( ELogicConditionOperatorOr );
       
   528 	addCondition->AddObjectConditionL( *iImageDef );
       
   529 	addCondition->AddObjectConditionL( *iVideoDef );
       
   530 	addCondition->AddObjectConditionL( *iAlbumDef );
       
   531 	addCondition->AddObjectConditionL( *iTagDef );
       
   532 	
       
   533 	iSession->AddObjectObserverL(*this, addCondition );
       
   534 	iSession->AddObjectPresentObserverL(*this );
       
   535 		
       
   536 	CleanupStack::PopAndDestroy( addCondition ); 
   526     }
   537     }
   527 
   538 
   528 // ---------------------------------------------------------------------------
   539 // ---------------------------------------------------------------------------
   529 // CGlxDataSourceMde::HandleObjectNotification
   540 // CGlxDataSourceMde::HandleObjectNotification
   530 // ---------------------------------------------------------------------------
   541 // ---------------------------------------------------------------------------