diff -r 4cc1412daed0 -r 560ce2306a17 mpserviceplugins/mpxsqlitedbhgplugin/inc/mpxdbcategory.h --- a/mpserviceplugins/mpxsqlitedbhgplugin/inc/mpxdbcategory.h Fri Aug 06 16:51:36 2010 -0500 +++ b/mpserviceplugins/mpxsqlitedbhgplugin/inc/mpxdbcategory.h Tue Aug 24 03:36:14 2010 -0500 @@ -53,7 +53,8 @@ /** * Add a category item. If the record already exists, its counter will * be incremented. - * @param aName: This is the name to be entered into the row + * @param aCategory category type + * @param aMedia: This is the media object to be entered into the row * @param aDriveId: The Drive Id the name (category) belongs * @param aNewRecord: indicates to the caller if a new record is created. * ETrue if a new row is created in the table; otherwise EFalse. @@ -61,13 +62,8 @@ * into consideration when generating the unique row id * @return The unique id of the row added. */ -#ifdef ABSTRACTAUDIOALBUM_INCLUDED - virtual TUint32 AddItemL(const TDesC& aName, TInt aDriveId, TBool& aNewRecord, + virtual TUint32 AddItemL(TMPXGeneralCategory aCategory, const CMPXMedia& aMedia, TInt aDriveId, TBool& aNewRecord, TBool aCaseSensitive = ETrue); -#else - TUint32 AddItemL(const TDesC& aName, TInt aDriveId, TBool& aNewRecord, - TBool aCaseSensitive = ETrue); -#endif // ABSTRACTAUDIOALBUM_INCLUDED /** * Get the name field for a given ID. @@ -109,7 +105,7 @@ virtual void DecrementSongsForCategoryL(TUint32 aId, TInt aDriveId, CMPXMessageArray* aItemChangedMessages, TBool& aItemExist, TBool aMtpInUse = EFalse); #else - void DecrementSongsForCategoryL(TUint32 aId, TInt aDriveId, + virtual void DecrementSongsForCategoryL(TUint32 aId, TInt aDriveId, CMPXMessageArray* aItemChangedMessages, TBool& aItemExist); #endif // ABSTRACTAUDIOALBUM_INCLUDED /** @@ -157,7 +153,7 @@ * @param aAttrs attributes to be returned * @param aMediaArray returns the requested attributes for all items */ - void GetSubCategoryItemsL(TMPXGeneralCategory aParentCategory, TUint32 aParentId, + virtual void GetSubCategoryItemsL(TMPXGeneralCategory aParentCategory, TUint32 aParentId, const TArray& aAttrs, CMPXMediaArray& aMediaArray); /** @@ -183,8 +179,8 @@ * @param aDriveId: The Drive Id the name (category) belongs * @param aItemChangedMessages: if valid on return contains a updated message if the * category was updated - */ - void UpdateItemL(TUint32 aId, const CMPXMedia& aMedia, TInt aDriveId, CMPXMessageArray* aItemChangedMessages); + */ + virtual void UpdateItemL(TUint32 aId, const CMPXMedia& aMedia, TInt aDriveId, CMPXMessageArray* aItemChangedMessages); protected: @@ -222,6 +218,15 @@ void ProcessRecordsetL(const TArray& aAttrs, RSqlStatement& aRecordset, CMPXMediaArray& aMediaArray); + private: + /** + * Retrieve name from media object based on category + * @param aCategory the category to retrieve name + * @param aMedia media object + * @return name + */ + TPtrC ItemNameL(TMPXGeneralCategory aCategory, const CMPXMedia& aMedia); + private: // from MMPXTable /**