imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailmdsquerytask.cpp
branchRCL_3
changeset 38 2b4b06654caa
parent 11 dea39715fc05
child 40 6257223ede8a
equal deleted inserted replaced
37:f759b6186ab5 38:2b4b06654caa
    34 // C++ default constructor can NOT contain any code, that might leave.
    34 // C++ default constructor can NOT contain any code, that might leave.
    35 // ---------------------------------------------------------------------------
    35 // ---------------------------------------------------------------------------
    36 //
    36 //
    37 CThumbnailMDSQueryTask::CThumbnailMDSQueryTask(
    37 CThumbnailMDSQueryTask::CThumbnailMDSQueryTask(
    38         CThumbnailTaskProcessor& aProcessor, TInt aPriority, CMdESession* aMdESession, CThumbnailServer& aServer): 
    38         CThumbnailTaskProcessor& aProcessor, TInt aPriority, CMdESession* aMdESession, CThumbnailServer& aServer): 
    39         CThumbnailTask( aProcessor, aPriority ), iMdESession( aMdESession ), iServer(aServer), iUpdateToDb(ETrue)
    39         CThumbnailTask( aProcessor, aPriority ), iMdESession( aMdESession ), iQuery(NULL), iServer(aServer), iUpdateToDb(ETrue)
    40     {
    40     {
    41     TN_DEBUG2( "CThumbnailMDSQueryTask(0x%08x)::CThumbnailMDSQueryTask()", this );
    41     TN_DEBUG2( "CThumbnailMDSQueryTask(0x%08x)::CThumbnailMDSQueryTask()", this );
    42     }
    42     }
    43 
    43 
    44 
    44 
    53            
    53            
    54     if (iQuery)
    54     if (iQuery)
    55         {
    55         {
    56         iQuery->Cancel();
    56         iQuery->Cancel();
    57         delete iQuery;
    57         delete iQuery;
       
    58         iQuery = NULL;
    58         }
    59         }
    59     }
    60     }
    60 
    61 
    61 
    62 
    62 // -----------------------------------------------------------------------------
    63 // -----------------------------------------------------------------------------
   180     iQueryType = EURI;
   181     iQueryType = EURI;
   181     iDelete = aDelete;
   182     iDelete = aDelete;
   182     CMdENamespaceDef* defNamespace = &iMdESession->GetDefaultNamespaceDefL();
   183     CMdENamespaceDef* defNamespace = &iMdESession->GetDefaultNamespaceDefL();
   183     CMdEObjectDef& objDef = defNamespace->GetObjectDefL( MdeConstants::Object::KBaseObject );
   184     CMdEObjectDef& objDef = defNamespace->GetObjectDefL( MdeConstants::Object::KBaseObject );
   184     
   185     
       
   186     delete iQuery;
       
   187     iQuery = NULL;
       
   188     
   185     iQuery = iMdESession->NewObjectQueryL( *defNamespace, objDef, this );
   189     iQuery = iMdESession->NewObjectQueryL( *defNamespace, objDef, this );
   186     iQuery->SetResultMode( EQueryResultModeItem );
   190 	
   187 
   191 	if(iQuery)
   188     CMdELogicCondition& rootCondition = iQuery->Conditions();
   192 		{
   189     rootCondition.SetOperator( ELogicConditionOperatorOr );
   193 	    iQuery->SetResultMode( EQueryResultModeItem );
   190     
   194 
   191     // add ID condition
   195     	CMdELogicCondition& rootCondition = iQuery->Conditions();
   192     rootCondition.AddObjectConditionL( aId );
   196 	    rootCondition.SetOperator( ELogicConditionOperatorOr );
       
   197     
       
   198 	    // add ID condition
       
   199     	rootCondition.AddObjectConditionL( aId );
       
   200 		}
   193     }
   201     }
   194 
   202 
   195 // ---------------------------------------------------------------------------
   203 // ---------------------------------------------------------------------------
   196 // CThumbnailMDSQueryTask::ReturnPath()
   204 // CThumbnailMDSQueryTask::ReturnPath()
   197 // ---------------------------------------------------------------------------
   205 // ---------------------------------------------------------------------------