--- a/metadataengine/server/src/mdssqlobjectmanipulate.cpp Tue Aug 31 15:37:30 2010 +0300
+++ b/metadataengine/server/src/mdssqlobjectmanipulate.cpp Wed Sep 01 12:24:24 2010 +0100
@@ -2271,8 +2271,8 @@
TPtrC16 uri = aBuffer.ReceivePtr16L();
objectId = SearchObjectByUriL( uri, flags );
if ( objectId != KNoId &&
- uri != KSystemFavouritesAlbumUri &&
- uri != KSystemCapturedAlbumUri )
+ objectId != KSystemFavouritesAlbumId &&
+ objectId != KSystemCapturedAlbumId )
{
// unlock object, so update is no possible anymore
if ( iLockList.IsLocked( *iNamespaceDef, objectId ) )
@@ -3431,13 +3431,7 @@
// rowDataDel, commonClauseOne
CleanupStack::PopAndDestroy( 7, &commonClauseOne );
-#ifdef MDS_PLAYLIST_HARVESTING_ENABLED
- if( updateResult == 0 )
- {
- updateResult = CleanPlaylistsL();
- }
-#endif
-
+ // When this is reached, all garbage collection steps have been fully executed
return EFalse;
}
@@ -3447,42 +3441,6 @@
db.DoAnalyzeL();
}
-#ifdef MDS_PLAYLIST_HARVESTING_ENABLED
-TInt CMdSSqlObjectManipulate::CleanPlaylistsL()
- {
- _LIT( KDeleteWholePlaylists, "DELETE FROM Object%u WHERE ObjectId IN (SELECT ObjectId FROM AudioPlaylistItem%u WHERE PlaylistID NOT IN (SELECT ObjectId FROM Object%u));" );
-
- RClauseBuffer commonClauseOne(*this, KDeleteWholePlaylists().Length());
- CleanupClosePushL( commonClauseOne );
- CMdsClauseBuffer& buffer = commonClauseOne.BufferL();
-
- RRowData rowDataDel;
- CleanupClosePushL( rowDataDel );
-
- const RPointerArray<CMdsNamespaceDef>& namespaceDefs =
- iSchema.NamespaceDefs();
-
- CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL();
- const TInt updateResult = 0; // once all files to be cleaned are handled, no need to continue
-
- const TInt count = namespaceDefs.Count();
-
- for( TInt i = 0; i < count; ++i )
- {
- const TDefId nmspId = namespaceDefs[i]->GetId();
-
- buffer.BufferL().Format( KDeleteWholePlaylists, nmspId, nmspId, nmspId );
- User::LeaveIfError( connection.ExecuteL(
- buffer.ConstBufferL(), rowDataDel ) );
- }
-
- // rowDataDel, commonClauseOne
- CleanupStack::PopAndDestroy( 2, &commonClauseOne );
-
- return updateResult;
- }
-#endif
-
CMdSSqlObjectManipulate::RClauseBuffer::RClauseBuffer( CMdSSqlObjectManipulate& aSOM, TInt aSize )
: iBuffers( aSOM.iBuffers ), iBuffer( NULL ), iNr( -1 ), iSize( aSize )
{