mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbalbum.h
branchRCL_3
changeset 17 70a8526f03f2
parent 0 ff3acec5bc43
child 21 cb96c29156b2
equal deleted inserted replaced
15:a1247965635c 17:70a8526f03f2
    29 class MMPXDbAlbumObserver
    29 class MMPXDbAlbumObserver
    30     {
    30     {
    31     public:
    31     public:
    32         virtual TInt HandleIsUnknownArtistL(TUint32 aId) = 0;
    32         virtual TInt HandleIsUnknownArtistL(TUint32 aId) = 0;
    33         virtual TUint32 HandleArtistForAlbumL( const TUint32 aId ) = 0;
    33         virtual TUint32 HandleArtistForAlbumL( const TUint32 aId ) = 0;
       
    34         /**
       
    35         * HandleAlbumartForAlbumL.
       
    36         * @param aId, The album ID.
       
    37         * @param aArt, The albumart uri.
       
    38         * @returns alternative albumart retrieved in the specified Album.
       
    39         */
       
    40         virtual HBufC* HandleAlbumartForAlbumL( const TUint32 aId, TPtrC aArt ) = 0;
    34     };
    41     };
    35 /**
    42 /**
    36 * Responsible for managing all music databases
    43 * Responsible for managing all music databases
    37 *
    44 *
    38 * @lib MPXDbPlugin.lib
    45 * @lib MPXDbPlugin.lib
    93         *                  number number of songs on that drive with that album/artist.
   100         *                  number number of songs on that drive with that album/artist.
    94         * @param aItemChangedMessages if valid on return contains a deleted message if the
   101         * @param aItemChangedMessages if valid on return contains a deleted message if the
    95         *                  category was deleted
   102         *                  category was deleted
    96         * @param aItemExist Out parameter, ETrue if the category is not deleted after the delete,
   103         * @param aItemExist Out parameter, ETrue if the category is not deleted after the delete,
    97         *        EFalse otherwise
   104         *        EFalse otherwise
    98 		* @param aArtist: The ID of the artist
   105         * @param aArtist: The ID of the artist
       
   106         * @param aArt: The albumart uri
    99         */
   107         */
   100         void DecrementSongsForCategoryL(TUint32 aId, TInt aDriveId,
   108         void DecrementSongsForCategoryL(TUint32 aId, TInt aDriveId,
   101             CMPXMessageArray* aItemChangedMessages, TBool& aItemExist, const TUint32 aArtist);
   109             CMPXMessageArray* aItemChangedMessages, TBool& aItemExist, const TUint32 aArtist, const TDesC& aArt );
   102 
   110 
   103 		/**
   111         /**
   104 	* Gets the details for all category items.
   112     * Gets the details for all category items.
   105 	* @param aAttrs attributes to be returned
   113     * @param aAttrs attributes to be returned
   106 	* @param aMediaArray returns the requested attributes for all items
   114     * @param aMediaArray returns the requested attributes for all items
   107 	*/
   115     */
   108 		void GetAllCategoryItemsL(const TArray<TMPXAttribute>& aAttrs,
   116         void GetAllCategoryItemsL(const TArray<TMPXAttribute>& aAttrs,
   109 			CMPXMediaArray& aMediaArray);
   117             CMPXMediaArray& aMediaArray);
   110 
   118 
   111 		/**
   119     /**
   112 	* Update a category item.
   120     * Update a category item.
   113 	* @param aId: The ID of the category to update
   121     * @param aId: The ID of the category to update
   114 	* @param aMedia: The media data
   122     * @param aMedia: The media data
   115 	* @param aDriveId: The Drive Id the name (category) belongs
   123     * @param aDriveId: The Drive Id the name (category) belongs
   116 	* @param aItemChangedMessages: if valid on return contains a updated message if the
   124     * @param aItemChangedMessages: if valid on return contains a updated message if the
   117     *        category was updated
   125     *        category was updated
   118 	*/
   126     */
   119 		void UpdateItemL(TUint32 aId, const CMPXMedia& aMedia, TInt aDriveId, CMPXMessageArray* aItemChangedMessages);
   127         void UpdateItemL(TUint32 aId, const CMPXMedia& aMedia, TInt aDriveId, CMPXMessageArray* aItemChangedMessages);
   120 
   128 
   121 	public:
   129     public:
   122 		/**
   130         /**
   123 	* Get albums count for a specified artist
   131     * Get albums count for a specified artist
   124 	* @param aId: The ID of the artist
   132     * @param aId: The ID of the artist
   125 	*/
   133     */
   126 	    TInt GetAlbumsCountForArtistL(TUint32 aArtistId);
   134         TInt GetAlbumsCountForArtistL(TUint32 aArtistId);
   127 
   135 
   128 		/**
   136         /**
   129 	* Get songs count for a specified album and a specified artist
   137     * Get songs count for a specified album and a specified artist
   130 	* @param aArtistId: The ID of the artist
   138     * @param aArtistId: The ID of the artist
   131 	* @param aAlbumId: The ID of the album
   139     * @param aAlbumId: The ID of the album
   132 	*/
   140     */
   133 		TInt GetSongsCountInAlbumMatchingArtistL(TUint32 aArtistId, TUint32 aAlbumId);
   141         TInt GetSongsCountInAlbumMatchingArtistL(TUint32 aArtistId, TUint32 aAlbumId);
   134 
   142 
   135     private:
   143     private:
   136         /**
   144         /**
   137         * Updates the media with information from the table
   145         * Updates the media with information from the table
   138         * @param aRecord record containing the source fields
   146         * @param aRecord record containing the source fields
   147         * @param aMedia media data
   155         * @param aMedia media data
   148         * @param aFields fields of Album table
   156         * @param aFields fields of Album table
   149         * @param aValues values of each field of Album table
   157         * @param aValues values of each field of Album table
   150         * @return a string containing the selection criteria. The ownership is passed to the caller.
   158         * @return a string containing the selection criteria. The ownership is passed to the caller.
   151         */
   159         */
   152 		void GenerateAlbumFieldsValuesL(const CMPXMedia& aMedia,
   160         void GenerateAlbumFieldsValuesL(const CMPXMedia& aMedia,
   153 			CDesCArray& aFields, CDesCArray& aValues);
   161             CDesCArray& aFields, CDesCArray& aValues);
   154 
   162 
   155 
   163 
   156 		TBool IsUnknownArtistL(TUint32 aId);
   164         TBool IsUnknownArtistL(TUint32 aId);
   157 
   165 
   158 		TUint32 ArtistForAlbumL(const TUint32 aId);
   166         TUint32 ArtistForAlbumL(const TUint32 aId);
       
   167         /**
       
   168         * Get the Albumart of song which belongs to the specified Album.
       
   169         * @param aId The ID of the album
       
   170         * @param aArt albumart with the song is deleted.
       
   171         * @returns alternative albumart retrieved in the specified Album.
       
   172         */
       
   173         HBufC* AlbumartForAlbumL(const TUint32 aId, TPtrC aArt);
   159 
   174 
   160     private:    // from MMPXTable
   175     private:    // from MMPXTable
   161 
   176 
   162         /**
   177         /**
   163         * @see MMPXTable
   178         * @see MMPXTable