--- a/mpserviceplugins/mpxsqlitedbhgplugin/inc/mpxdbmusic.h Fri Jun 11 16:24:02 2010 +0100
+++ b/mpserviceplugins/mpxsqlitedbhgplugin/inc/mpxdbmusic.h Thu Jul 22 16:32:33 2010 +0100
@@ -80,7 +80,7 @@
#endif // ABSTRACTAUDIOALBUM_INCLUDED
// for Album and Artist table
virtual TUint32 AddCategoryItemL(TMPXGeneralCategory aCategory, const TDesC& aName,
- TUint32 aArtistId, const TDesC& aArt,
+ const TDesC& aArtistName, const TDesC& aArt,
TInt aDrive, CMPXMessageArray* aItemChangedMessages, TBool& aItemExist) = 0;
/**
* Called when the ID of a category item changed for a Music record, for example when
@@ -245,10 +245,11 @@
* @param aComposerId returns the artist ID
* @param aAbstractAlbumId returns the AbstractAlbum ID
* @param aDriveId returns the song drive
+ * @param aArt returns the albumart uri
* @return song URI. The ownership is transferred.
*/
HBufC* GetSongInfoL(TUint32 aSongId, TUint32& aArtistId, TUint32& aAlbumId,
- TUint32& aGenreId, TUint32& aComposerId, TUint32& aAbstractAlbumId, TInt& aDriveId);
+ TUint32& aGenreId, TUint32& aComposerId, TUint32& aAbstractAlbumId, TInt& aDriveId, HBufC*& aArt);
#else
/**
* Get the drive and category IDs for a specified song
@@ -258,10 +259,11 @@
* @param aGenreId returns the artist ID
* @param aComposerId returns the artist ID
* @param aDriveId returns the song drive
+ * @param aArt returns the albumart uri
* @return song URI. The ownership is transferred.
*/
HBufC* GetSongInfoL(TUint32 aSongId, TUint32& aArtistId, TUint32& aAlbumId,
- TUint32& aGenreId, TUint32& aComposerId, TInt& aDriveId);
+ TUint32& aGenreId, TUint32& aComposerId, TInt& aDriveId, HBufC*& aArt);
#endif // ABSTRACTAUDIOALBUM_INCLUDED
/**
* Get the song Id, title, URI, and general flags from the given song Id and/or URI
@@ -526,7 +528,16 @@
* Get the ID of Artist which belongs to the specified Album
* @param aId, the ID of Album
*/
- TUint32 CMPXDbMusic::ArtistForAlbumL(const TUint32 aId);
+ TUint32 ArtistForAlbumL(const TUint32 aId);
+
+ /**
+ * Get the Albumart of song which belongs to the specified Album
+ * @param aId, the ID of Album
+ * @param aArt, AlbumArt uri
+ * @returns alternative albumart retrieved in the specified Album.
+ */
+ HBufC* AlbumartForAlbumL(const TUint32 aAlbumId, TPtrC aArt);
+
/*
* Check the integrity of the music basic table
@@ -677,9 +688,6 @@
const TMPXAttribute& aAttribute, TUint32 aOldId, TInt aDriveId,
CMPXMessageArray* aItemChangedMessages, TUint32& aItemId);
- TBool UpdateCategoryFieldL(TMPXGeneralCategory aCategory, const CMPXMedia& aMedia,
- const TMPXAttribute& aAttribute, TUint32 aOldId, TInt aDriveId,
- CMPXMessageArray* aItemChangedMessages, TUint32& aItemId, TUint32 aArtistId);
/**
* Checks if extra attributes are required. The "standard attribute set includes:
* EMPXMediaGeneralId, EMPXMediaGeneralType, EMPXMediaGeneralCategory,
@@ -696,6 +704,12 @@
* otherwise EFalse.
*/
TBool IsSupported(const CMPXMedia& aMedia);
+
+ /**
+ * Query all songs from the database and add results to the
+ * iAllSongsQueryResult cache array.
+ */
+ void ExecuteQueryAllSongsL(const TArray<TMPXAttribute>& aAttrs);
private: // from MMPXTable
@@ -798,6 +812,7 @@
#ifdef ABSTRACTAUDIOALBUM_INCLUDED
TBool iArtNeedUpdated;
#endif // ABSTRACTAUDIOALBUM_INCLUDED
+ RPointerArray<CMPXMedia> iAllSongsQueryResult;
};
#endif // MPXDBMUSIC_H