imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailmdsquerytask.cpp
changeset 36 c5df59b4ae2d
parent 15 7197e789b953
child 43 473df7bf149f
equal deleted inserted replaced
30:b67379558a75 36:c5df59b4ae2d
    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), 
       
    40 		iServer(aServer), iUpdateToDb(ETrue)
    40     {
    41     {
    41     TN_DEBUG2( "CThumbnailMDSQueryTask(0x%08x)::CThumbnailMDSQueryTask()", this );
    42     TN_DEBUG2( "CThumbnailMDSQueryTask(0x%08x)::CThumbnailMDSQueryTask()", this );
    42     }
    43     }
    43 
    44 
    44 
    45 
    53            
    54            
    54     if (iQuery)
    55     if (iQuery)
    55         {
    56         {
    56         iQuery->Cancel();
    57         iQuery->Cancel();
    57         delete iQuery;
    58         delete iQuery;
       
    59         iQuery = NULL;
    58         }
    60         }
    59     }
    61     }
    60 
    62 
    61 
    63 
    62 // -----------------------------------------------------------------------------
    64 // -----------------------------------------------------------------------------
   180     iQueryType = EURI;
   182     iQueryType = EURI;
   181     iDelete = aDelete;
   183     iDelete = aDelete;
   182     CMdENamespaceDef* defNamespace = &iMdESession->GetDefaultNamespaceDefL();
   184     CMdENamespaceDef* defNamespace = &iMdESession->GetDefaultNamespaceDefL();
   183     CMdEObjectDef& objDef = defNamespace->GetObjectDefL( MdeConstants::Object::KBaseObject );
   185     CMdEObjectDef& objDef = defNamespace->GetObjectDefL( MdeConstants::Object::KBaseObject );
   184     
   186     
       
   187     delete iQuery;
       
   188     iQuery = NULL;
       
   189     
   185     iQuery = iMdESession->NewObjectQueryL( *defNamespace, objDef, this );
   190     iQuery = iMdESession->NewObjectQueryL( *defNamespace, objDef, this );
   186     iQuery->SetResultMode( EQueryResultModeItem );
   191 	
   187 
   192 	if(iQuery)
   188     CMdELogicCondition& rootCondition = iQuery->Conditions();
   193 		{
   189     rootCondition.SetOperator( ELogicConditionOperatorOr );
   194 	    iQuery->SetResultMode( EQueryResultModeItem );
   190     
   195 
   191     // add ID condition
   196     	CMdELogicCondition& rootCondition = iQuery->Conditions();
   192     rootCondition.AddObjectConditionL( aId );
   197 	    rootCondition.SetOperator( ELogicConditionOperatorOr );
       
   198     
       
   199 	    // add ID condition
       
   200     	rootCondition.AddObjectConditionL( aId );
       
   201 		}
   193     }
   202     }
   194 
   203 
   195 // ---------------------------------------------------------------------------
   204 // ---------------------------------------------------------------------------
   196 // CThumbnailMDSQueryTask::ReturnPath()
   205 // CThumbnailMDSQueryTask::ReturnPath()
   197 // ---------------------------------------------------------------------------
   206 // ---------------------------------------------------------------------------