mpserviceplugins/mpxsqlitedbhgplugin/inc/mpxdbalbum.h
changeset 34 2c5162224003
parent 22 ecf06a08d4d9
child 29 8192e5b5c935
equal deleted inserted replaced
22:ecf06a08d4d9 34:2c5162224003
    27 // CLASS DECLARATION
    27 // CLASS DECLARATION
    28 
    28 
    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     };
    34     };
    35 /**
    35 /**
    36 * Responsible for managing all music databases
    36 * Responsible for managing all music databases
    37 *
    37 *
    97         *        EFalse otherwise
    97         *        EFalse otherwise
    98 		* @param aArtist: The ID of the artist
    98 		* @param aArtist: The ID of the artist
    99         */
    99         */
   100         void DecrementSongsForCategoryL(TUint32 aId, TInt aDriveId,
   100         void DecrementSongsForCategoryL(TUint32 aId, TInt aDriveId,
   101             CMPXMessageArray* aItemChangedMessages, TBool& aItemExist, const TUint32 aArtist);
   101             CMPXMessageArray* aItemChangedMessages, TBool& aItemExist, const TUint32 aArtist);
   102         
   102 
   103 		/**
   103 		/**
   104 	* Gets the details for all category items.
   104 	* Gets the details for all category items.
   105 	* @param aAttrs attributes to be returned
   105 	* @param aAttrs attributes to be returned
   106 	* @param aMediaArray returns the requested attributes for all items
   106 	* @param aMediaArray returns the requested attributes for all items
   107 	*/
   107 	*/
   108 		void GetAllCategoryItemsL(const TArray<TMPXAttribute>& aAttrs,
   108 		void GetAllCategoryItemsL(const TArray<TMPXAttribute>& aAttrs,
   109 			CMPXMediaArray& aMediaArray);
   109 			CMPXMediaArray& aMediaArray);
   110 
   110 
   111 		/**
   111 		/**
   112 	* Update a category item. 
   112 	* Update a category item.
   113 	* @param aId: The ID of the category to update
   113 	* @param aId: The ID of the category to update
   114 	* @param aMedia: The media data
   114 	* @param aMedia: The media data
   115 	* @param aDriveId: The Drive Id the name (category) belongs
   115 	* @param aDriveId: The Drive Id the name (category) belongs
   116 	* @param aItemChangedMessages: if valid on return contains a updated message if the
   116 	* @param aItemChangedMessages: if valid on return contains a updated message if the
   117     *        category was updated
   117     *        category was updated
   120 
   120 
   121 	public:
   121 	public:
   122 		/**
   122 		/**
   123 	* Get albums count for a specified artist
   123 	* Get albums count for a specified artist
   124 	* @param aId: The ID of the artist
   124 	* @param aId: The ID of the artist
   125 	*/		
   125 	*/
   126 	    TInt GetAlbumsCountForArtistL(TUint32 aArtistId);
   126 	    TInt GetAlbumsCountForArtistL(TUint32 aArtistId);
   127 
   127 
   128 		/**
   128 		/**
   129 	* Get songs count for a specified album and a specified artist
   129 	* Get songs count for a specified album and a specified artist
   130 	* @param aArtistId: The ID of the artist
   130 	* @param aArtistId: The ID of the artist
   131 	* @param aAlbumId: The ID of the album
   131 	* @param aAlbumId: The ID of the album
   132 	*/		
   132 	*/
   133 		TInt GetSongsCountInAlbumMatchingArtistL(TUint32 aArtistId, TUint32 aAlbumId);
   133 		TInt GetSongsCountInAlbumMatchingArtistL(TUint32 aArtistId, TUint32 aAlbumId);
   134 		
   134 
   135     private:	
   135     private:
   136         /**
   136         /**
   137         * Updates the media with information from the table
   137         * Updates the media with information from the table
   138         * @param aRecord record containing the source fields
   138         * @param aRecord record containing the source fields
   139         * @param aAttrs attributes to be returned
   139         * @param aAttrs attributes to be returned
   140         * @param aMedia returns the requested attributes
   140         * @param aMedia returns the requested attributes
   147         * @param aMedia media data
   147         * @param aMedia media data
   148         * @param aFields fields of Album table
   148         * @param aFields fields of Album table
   149         * @param aValues values of each field of Album table
   149         * @param aValues values of each field of Album table
   150         * @return a string containing the selection criteria. The ownership is passed to the caller.
   150         * @return a string containing the selection criteria. The ownership is passed to the caller.
   151         */
   151         */
   152 		void GenerateAlbumFieldsValuesL(const CMPXMedia& aMedia, 
   152 		void GenerateAlbumFieldsValuesL(const CMPXMedia& aMedia,
   153 			CDesCArray& aFields, CDesCArray& aValues);
   153 			CDesCArray& aFields, CDesCArray& aValues);
   154 
   154 
   155 
   155 
   156 		TBool IsUnknownArtistL(TUint32 aId);
   156 		TBool IsUnknownArtistL(TUint32 aId);
   157 		
   157 
   158 		TUint32 ArtistForAlbumL(const TUint32 aId);
   158 		TUint32 ArtistForAlbumL(const TUint32 aId);
   159 
   159 
   160     private:    // from MMPXTable
   160     private:    // from MMPXTable
   161 
   161 
   162         /**
   162         /**