2112 // Get the song drive |
2112 // Get the song drive |
2113 TUint32 artistID(0); |
2113 TUint32 artistID(0); |
2114 TUint32 albumID(0); |
2114 TUint32 albumID(0); |
2115 TUint32 genreID(0); |
2115 TUint32 genreID(0); |
2116 TUint32 composerID(0); |
2116 TUint32 composerID(0); |
|
2117 HBufC* art(NULL); |
2117 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
2118 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
2118 TUint32 abstractAlbumID(0); |
2119 TUint32 abstractAlbumID(0); |
2119 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
2120 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
2120 TInt drive(0); |
2121 TInt drive(0); |
2121 |
2122 |
2122 // Get information from the Music table first |
2123 // Get information from the Music table first |
2123 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
2124 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
2124 HBufC* uri = iDbMusic->GetSongInfoL(aSongId, artistID, albumID, genreID, composerID, abstractAlbumID, drive); |
2125 HBufC* uri = iDbMusic->GetSongInfoL(aSongId, artistID, albumID, genreID, composerID, abstractAlbumID, drive, art); |
2125 #else |
2126 #else |
2126 HBufC* uri = iDbMusic->GetSongInfoL(aSongId, artistID, albumID, genreID, composerID, drive); |
2127 HBufC* uri = iDbMusic->GetSongInfoL(aSongId, artistID, albumID, genreID, composerID, drive, art); |
2127 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
2128 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
2128 |
2129 |
|
2130 CleanupStack::PushL(art); |
2129 // add the URI to the return array |
2131 // add the URI to the return array |
2130 CleanupStack::PushL(uri); |
2132 CleanupStack::PushL(uri); |
2131 aUriArray.AppendL(*uri); |
2133 aUriArray.AppendL(*uri); |
2132 CleanupStack::PopAndDestroy(uri); |
2134 CleanupStack::PopAndDestroy(uri); |
2133 |
2135 |
2134 // Update the category records |
2136 // Update the category records |
2135 TBool categoryExist( EFalse ); |
2137 TBool categoryExist( EFalse ); |
2136 iDbArtist->DecrementSongsForCategoryL(artistID, drive, &aItemChangedMessages, categoryExist); |
2138 iDbArtist->DecrementSongsForCategoryL(artistID, drive, &aItemChangedMessages, categoryExist); |
2137 iDbAlbum->DecrementSongsForCategoryL(albumID, drive, &aItemChangedMessages, categoryExist, artistID); |
2139 iDbAlbum->DecrementSongsForCategoryL(albumID, drive, &aItemChangedMessages, categoryExist, artistID, *art); |
2138 iDbGenre->DecrementSongsForCategoryL(genreID, drive, &aItemChangedMessages, categoryExist); |
2140 iDbGenre->DecrementSongsForCategoryL(genreID, drive, &aItemChangedMessages, categoryExist); |
2139 iDbComposer->DecrementSongsForCategoryL(composerID, drive, &aItemChangedMessages, categoryExist); |
2141 iDbComposer->DecrementSongsForCategoryL(composerID, drive, &aItemChangedMessages, categoryExist); |
|
2142 CleanupStack::PopAndDestroy(art); |
2140 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
2143 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
2141 if (abstractAlbumID) |
2144 if (abstractAlbumID) |
2142 { |
2145 { |
2143 iDbAbstractAlbum->DecrementSongsForCategoryL(abstractAlbumID, drive, &aItemChangedMessages, categoryExist, iMtpInUse); |
2146 iDbAbstractAlbum->DecrementSongsForCategoryL(abstractAlbumID, drive, &aItemChangedMessages, categoryExist, iMtpInUse); |
2144 } |
2147 } |
3353 TBool CMPXDbHandler::HandleIsUnknownArtistL(TUint32 aArtistId) |
3356 TBool CMPXDbHandler::HandleIsUnknownArtistL(TUint32 aArtistId) |
3354 { |
3357 { |
3355 return iDbArtist->IsUnknownArtistL(aArtistId); |
3358 return iDbArtist->IsUnknownArtistL(aArtistId); |
3356 } |
3359 } |
3357 |
3360 |
|
3361 // --------------------------------------------------------------------------- |
|
3362 // CMPXDbHandler::HandleArtistForAlbumL |
|
3363 // --------------------------------------------------------------------------- |
|
3364 // |
3358 TUint32 CMPXDbHandler::HandleArtistForAlbumL(const TUint32 aAlbumId) |
3365 TUint32 CMPXDbHandler::HandleArtistForAlbumL(const TUint32 aAlbumId) |
3359 { |
3366 { |
3360 return iDbMusic->ArtistForAlbumL(aAlbumId); |
3367 return iDbMusic->ArtistForAlbumL(aAlbumId); |
|
3368 } |
|
3369 |
|
3370 // --------------------------------------------------------------------------- |
|
3371 // CMPXDbHandler::HandleAlbumartForAlbumL |
|
3372 // --------------------------------------------------------------------------- |
|
3373 // |
|
3374 HBufC* CMPXDbHandler::HandleAlbumartForAlbumL(const TUint32 aAlbumId, TPtrC aArt) |
|
3375 { |
|
3376 return iDbMusic->AlbumartForAlbumL(aAlbumId, aArt); |
3361 } |
3377 } |
3362 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
3378 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
3363 // ---------------------------------------------------------------------------------------------------------- |
3379 // ---------------------------------------------------------------------------------------------------------- |
3364 // CMPXDbHandler::HandleGetAlbumNameForSongL |
3380 // CMPXDbHandler::HandleGetAlbumNameForSongL |
3365 // ---------------------------------------------------------------------------------------------------------- |
3381 // ---------------------------------------------------------------------------------------------------------- |