mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbcategory.cpp
branchRCL_3
changeset 13 c8156a91d13c
parent 0 ff3acec5bc43
child 15 a1247965635c
equal deleted inserted replaced
12:171e07ac910f 13:c8156a91d13c
   209                 CleanupStack::PopAndDestroy(2, critStr); // title & critStr
   209                 CleanupStack::PopAndDestroy(2, critStr); // title & critStr
   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
       
   215           else if (criterion == KMPXMediaGeneralUri)
       
   216                  {  
       
   217                  TUint32 itemId(MPXDbCommonUtil::GenerateUniqueIdL(iDbManager.Fs(), iCategory,
       
   218                        aCriteria.ValueText(KMPXMediaGeneralUri), (iCategory != EMPXGenre)));   
       
   219                    HBufC* critStr = PreProcessStringLC(KCriterionCategoryUniqueId);
       
   220                    MPXDbCommonUtil::AddSqlCriterionL(*criteriaArray, *critStr, itemId);
       
   221              CleanupStack::PopAndDestroy(critStr);
       
   222              }
       
   223         else if (criterion == KMPXMediaGeneralDrive)
       
   224             {
       
   225             const TDesC& drive(aCriteria.ValueText(KMPXMediaGeneralDrive));
       
   226             TDriveUnit driveUnit(drive);
       
   227             MPXDbCommonUtil::AddSqlCriterionL(*criteriaArray, KCriterionAbstractAlbumVolumeId,
       
   228                 MPXDbCommonUtil::GetVolIdMatchDriveIdL(iDbManager.Fs(), driveUnit));
       
   229             }
       
   230 #endif // ABSTRACTAUDIOALBUM_INCLUDED
   214         else
   231         else
   215             {
   232             {
   216             // ignore attribute
   233             // ignore attribute
   217             }
   234             }
   218         }
   235         }
   238 //
   255 //
   239 void CMPXDbCategory::DecrementSongsForCategoryL(
   256 void CMPXDbCategory::DecrementSongsForCategoryL(
   240     const TUint32 aId,
   257     const TUint32 aId,
   241     TInt aDriveId,
   258     TInt aDriveId,
   242     CMPXMessageArray* aItemChangedMessages,
   259     CMPXMessageArray* aItemChangedMessages,
   243     TBool& aItemExist)
   260     TBool& aItemExist,
       
   261     TBool /*aMTPInUse*/)
   244     {
   262     {
   245     MPX_FUNC("CMPXDbCategory::DecrementSongsForCategoryL");
   263     MPX_FUNC("CMPXDbCategory::DecrementSongsForCategoryL");
   246 
   264 
   247     // if just one song uses this category. Use <= just in case
   265     // if just one song uses this category. Use <= just in case
   248     if (GetSongsCountL(aDriveId, aId) <= 1)
   266     if (GetSongsCountL(aDriveId, aId) <= 1)