210 #ifdef RD_MPX_COLLECTION_CACHE |
210 #ifdef RD_MPX_COLLECTION_CACHE |
211 } |
211 } |
212 #endif //RD_MPX_COLLECTION_CACHE |
212 #endif //RD_MPX_COLLECTION_CACHE |
213 } |
213 } |
214 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
214 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
215 else if (criterion == KMPXMediaGeneralUri) |
215 else if (criterion == KMPXMediaGeneralUri) |
216 { |
216 { |
217 TUint32 itemId(MPXDbCommonUtil::GenerateUniqueIdL(iDbManager.Fs(), iCategory, |
217 //only Genre and AbstractAlbum are not case sensitive |
218 aCriteria.ValueText(KMPXMediaGeneralUri), (iCategory != EMPXGenre))); |
218 TBool caseSensitive = ETrue; |
219 HBufC* critStr = PreProcessStringLC(KCriterionCategoryUniqueId); |
219 if ((iCategory == EMPXGenre) || (iCategory == EMPXAbstractAlbum)) |
220 MPXDbCommonUtil::AddSqlCriterionL(*criteriaArray, *critStr, itemId); |
220 caseSensitive = EFalse; |
221 CleanupStack::PopAndDestroy(critStr); |
221 |
222 } |
222 TUint32 itemId(MPXDbCommonUtil::GenerateUniqueIdL(iDbManager.Fs(), iCategory, |
|
223 aCriteria.ValueText(KMPXMediaGeneralUri), caseSensitive)); |
|
224 HBufC* critStr = PreProcessStringLC(KCriterionCategoryUniqueId); |
|
225 MPXDbCommonUtil::AddSqlCriterionL(*criteriaArray, *critStr, itemId); |
|
226 CleanupStack::PopAndDestroy(critStr); |
|
227 } |
223 else if (criterion == KMPXMediaGeneralDrive) |
228 else if (criterion == KMPXMediaGeneralDrive) |
224 { |
229 { |
225 const TDesC& drive(aCriteria.ValueText(KMPXMediaGeneralDrive)); |
230 const TDesC& drive(aCriteria.ValueText(KMPXMediaGeneralDrive)); |
226 TDriveUnit driveUnit(drive); |
231 TDriveUnit driveUnit(drive); |
227 MPXDbCommonUtil::AddSqlCriterionL(*criteriaArray, KCriterionAbstractAlbumVolumeId, |
232 MPXDbCommonUtil::AddSqlCriterionL(*criteriaArray, KCriterionAbstractAlbumVolumeId, |
255 // |
260 // |
256 void CMPXDbCategory::DecrementSongsForCategoryL( |
261 void CMPXDbCategory::DecrementSongsForCategoryL( |
257 const TUint32 aId, |
262 const TUint32 aId, |
258 TInt aDriveId, |
263 TInt aDriveId, |
259 CMPXMessageArray* aItemChangedMessages, |
264 CMPXMessageArray* aItemChangedMessages, |
260 TBool& aItemExist, |
265 TBool& aItemExist |
261 TBool /*aMTPInUse*/) |
266 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
|
267 , |
|
268 TBool /*aMTPInUse*/ |
|
269 #endif //ABSTRACTAUDIOALBUM_INCLUDED |
|
270 ) |
262 { |
271 { |
263 MPX_FUNC("CMPXDbCategory::DecrementSongsForCategoryL"); |
272 MPX_FUNC("CMPXDbCategory::DecrementSongsForCategoryL"); |
264 |
273 |
265 // if just one song uses this category. Use <= just in case |
274 // if just one song uses this category. Use <= just in case |
266 if (GetSongsCountL(aDriveId, aId) <= 1) |
275 if (GetSongsCountL(aDriveId, aId) <= 1) |