imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailmdsquerytask.cpp
equal
deleted
inserted
replaced
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 ), iQuery(NULL), iServer(aServer), iUpdateToDb(ETrue) |
39 CThumbnailTask( aProcessor, aPriority ), iMdESession( aMdESession ), 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; |
|
59 } |
58 } |
60 } |
59 } |
61 |
60 |
62 |
61 |
63 // ----------------------------------------------------------------------------- |
62 // ----------------------------------------------------------------------------- |
181 iQueryType = EURI; |
180 iQueryType = EURI; |
182 iDelete = aDelete; |
181 iDelete = aDelete; |
183 CMdENamespaceDef* defNamespace = &iMdESession->GetDefaultNamespaceDefL(); |
182 CMdENamespaceDef* defNamespace = &iMdESession->GetDefaultNamespaceDefL(); |
184 CMdEObjectDef& objDef = defNamespace->GetObjectDefL( MdeConstants::Object::KBaseObject ); |
183 CMdEObjectDef& objDef = defNamespace->GetObjectDefL( MdeConstants::Object::KBaseObject ); |
185 |
184 |
186 delete iQuery; |
|
187 iQuery = NULL; |
|
188 |
|
189 iQuery = iMdESession->NewObjectQueryL( *defNamespace, objDef, this ); |
185 iQuery = iMdESession->NewObjectQueryL( *defNamespace, objDef, this ); |
190 |
186 iQuery->SetResultMode( EQueryResultModeItem ); |
191 if(iQuery) |
187 |
192 { |
188 CMdELogicCondition& rootCondition = iQuery->Conditions(); |
193 iQuery->SetResultMode( EQueryResultModeItem ); |
189 rootCondition.SetOperator( ELogicConditionOperatorOr ); |
194 |
190 |
195 CMdELogicCondition& rootCondition = iQuery->Conditions(); |
191 // add ID condition |
196 rootCondition.SetOperator( ELogicConditionOperatorOr ); |
192 rootCondition.AddObjectConditionL( aId ); |
197 |
|
198 // add ID condition |
|
199 rootCondition.AddObjectConditionL( aId ); |
|
200 } |
|
201 } |
193 } |
202 |
194 |
203 // --------------------------------------------------------------------------- |
195 // --------------------------------------------------------------------------- |
204 // CThumbnailMDSQueryTask::ReturnPath() |
196 // CThumbnailMDSQueryTask::ReturnPath() |
205 // --------------------------------------------------------------------------- |
197 // --------------------------------------------------------------------------- |