mpserviceplugins/mpxsqlitedbhgplugin/inc/mpxdbhandler.h
changeset 51 560ce2306a17
parent 38 b93f525c9244
equal deleted inserted replaced
47:4cc1412daed0 51:560ce2306a17
    63 *  @lib MPXDbPlugin.lib
    63 *  @lib MPXDbPlugin.lib
    64 */
    64 */
    65 class CMPXDbHandler :
    65 class CMPXDbHandler :
    66     public CBase,
    66     public CBase,
    67     public MMPXDbMusicObserver,
    67     public MMPXDbMusicObserver,
    68     public MMPXDbArtistObserver,
       
    69     public MMPXDbAlbumObserver,
    68     public MMPXDbAlbumObserver,
    70 	public MMPXDbPlaylistObserver
    69 	public MMPXDbPlaylistObserver
    71     {
    70     {
    72     public:  // Constructors and destructor
    71     public:  // Constructors and destructor
    73 
    72 
  1015         CDesCArrayFlat* GetMusicFoldersL();
  1014         CDesCArrayFlat* GetMusicFoldersL();
  1016 #endif // RD_MULTIPLE_DRIVE
  1015 #endif // RD_MULTIPLE_DRIVE
  1017 
  1016 
  1018     private:    // From MMPXDbMusicObserver
  1017     private:    // From MMPXDbMusicObserver
  1019 
  1018 
       
  1019         /**
       
  1020         * @see MMPXDbMusicObserver
       
  1021         */
  1020 #ifdef ABSTRACTAUDIOALBUM_INCLUDED
  1022 #ifdef ABSTRACTAUDIOALBUM_INCLUDED
  1021         /**
  1023        virtual TUint32 AddAbstractAlbumItemL(const TDesC& aName, 
  1022         * @see MMPXDbMusicObserver
  1024             TInt aDriveId, CMPXMessageArray* aItemChangedMessages, TBool& aItemExist,
  1023         */
  1025             const TDesC& aUri, const TDesC& aAlbumArtist=KNullDesC);
  1024         virtual TUint32 AddCategoryItemL(TMPXGeneralCategory aCategory,
       
  1025             const TDesC& aName,
       
  1026             TInt aDriveId,
       
  1027             CMPXMessageArray* aItemChangedMessages, TBool& aItemExist,
       
  1028             const TDesC& aUri,
       
  1029             const TDesC& aAlbumArtist=KNullDesC);
       
  1030 #else
       
  1031 
       
  1032         /**
       
  1033         * @see MMPXDbMusicObserver
       
  1034         */
       
  1035         virtual TUint32 AddCategoryItemL(TMPXGeneralCategory aCategory,
       
  1036             const TDesC& aName, TInt aDriveId,
       
  1037             CMPXMessageArray* aItemChangedMessages, TBool& aItemExist);
       
  1038 #endif // ABSTRACTAUDIOALBUM_INCLUDED
  1026 #endif // ABSTRACTAUDIOALBUM_INCLUDED
  1039 
  1027 
  1040        virtual TUint32 AddCategoryItemL(TMPXGeneralCategory aCategory, const TDesC& aName,
  1028        virtual TUint32 AddCategoryItemL(TMPXGeneralCategory aCategory, const CMPXMedia& aMedia,       
  1041            const TDesC& aArtistName, const TDesC& aArt,
       
  1042             TInt aDrive, CMPXMessageArray* aItemChangedMessages, TBool& aItemExist);
  1029             TInt aDrive, CMPXMessageArray* aItemChangedMessages, TBool& aItemExist);
  1043 
  1030        
  1044        virtual void UpdateCategoryItemL(TMPXGeneralCategory aCategory, TUint32 aCategoryId,
  1031        virtual void UpdateCategoryItemL(TMPXGeneralCategory aCategory, TUint32 aCategoryId,
  1045             const CMPXMedia& aMedia, TInt aDrive, CMPXMessageArray* aItemChangedMessages);
  1032             const CMPXMedia& aMedia, TInt aDrive, CMPXMessageArray* aItemChangedMessages);
  1046 
  1033 
       
  1034        virtual TUint32 GenerateUniqueIdForAlbumL(const CMPXMedia& aMedia);
       
  1035        
       
  1036        virtual TBool IsUnknownAlbumL(const TUint32 aId);
       
  1037 
  1047         /**
  1038         /**
  1048         * @see MMPXDbMusicObserver
  1039         * @see MMPXDbMusicObserver
  1049         */
  1040         */
  1050         virtual void DeleteSongForCategoryL(TMPXGeneralCategory aCategory,
  1041         virtual void DeleteSongForCategoryL(TMPXGeneralCategory aCategory, TUint32 aCategoryId,
  1051             TUint32 aCategoryId, TInt aDriveId, CMPXMessageArray* aItemChangedMessages,
  1042             TInt aDrive, CMPXMessageArray* aItemChangedMessages, TBool& aItemExist, const TDesC& aArt = KNullDesC);
  1052             TBool& aItemExist);
       
  1053 
  1043 
  1054         /**
  1044         /**
  1055         * @see MMPXDbMusicObserver
  1045         * @see MMPXDbMusicObserver
  1056         */
  1046         */
  1057         virtual void HandlePlayCountModifiedL(CMPXMessageArray& aItemChangedMessages);
  1047         virtual void HandlePlayCountModifiedL(CMPXMessageArray& aItemChangedMessages);
  1064         /**
  1054         /**
  1065         * @see MMPXDbMusicObserver
  1055         * @see MMPXDbMusicObserver
  1066         */
  1056         */
  1067         virtual HBufC* HandleGetAlbumNameFromIdL(TUint32 aId);
  1057         virtual HBufC* HandleGetAlbumNameFromIdL(TUint32 aId);
  1068 #endif // ABSTRACTAUDIOALBUM_INCLUDED
  1058 #endif // ABSTRACTAUDIOALBUM_INCLUDED
  1069     private:    // From MMPXDbArtistObserver
       
  1070     /**
       
  1071     * @see MMPXDbArtistObser
       
  1072     */
       
  1073         virtual TInt HandleGetAlbumsCountForArtistL(TUint32 aArtistId);
       
  1074 
       
  1075     private:    // From MMPXDbAlbumObserver
       
  1076     /**
       
  1077     * @see MMPXDbAlbumObserver
       
  1078     */
       
  1079     virtual TBool HandleIsUnknownArtistL(TUint32 aArtistId);
       
  1080     /**
       
  1081     * Get the Artistname of song which belongs to the specified Album.     
       
  1082     * @param aId, The Album ID.
       
  1083 	* @returns alternative artistname retrieved in the specified Album.
       
  1084     */
       
  1085     virtual HBufC* HandleArtistForAlbumL(const TUint32 aAlbumId);
       
  1086         
  1059         
  1087     /**
  1060     private:    // From MMPXDbAlbumObserver   
  1088     * Get the Albumart of song which belongs to the specified Album.     
  1061         /**
  1089     * @param aId, The Album ID.
  1062         * Get the Albumart of song which belongs to the specified Album.     
  1090     * @param aArt, the AlbumArt uri.
  1063         * @param aId, The Album ID.
  1091 	* @returns alternative albumart retrieved in the specified Album.
  1064         * @param aArt, the AlbumArt uri.
  1092     */
  1065 	    * @returns alternative albumart retrieved in the specified Album.
  1093     virtual HBufC* HandleAlbumartForAlbumL(const TUint32 aAlbumId, TPtrC aArt);
  1066         */
       
  1067         virtual HBufC* HandleAlbumartForAlbumL(const TUint32 aAlbumId, TPtrC aArt);
       
  1068        
       
  1069         /**
       
  1070         * @see MMPXDbAlbumObserver
       
  1071         */
       
  1072         virtual void DeleteAlbumForArtistL(TUint32 aCategoryId,
       
  1073             TInt aDrive, CMPXMessageArray* aItemChangedMessages);
       
  1074 
       
  1075         /**
       
  1076         * @see MMPXDbAlbumObserver
       
  1077         */
       
  1078         virtual TUint32 AddAlbumArtistL(const TDesC& aName, const TDesC& aArt, TInt aDriveId);       
  1094 
  1079 
  1095     private:	// From MMPXDbPlaylistObserver
  1080     private:	// From MMPXDbPlaylistObserver
  1096 	/**
  1081         /**
  1097 	* @see MMPXDbPlaylistObserver
  1082         * @see MMPXDbPlaylistObserver
  1098 	*/
  1083         */
  1099 		virtual TInt HandlePlaylistDurationL(TUint32 aPlaylistId);
  1084         virtual TInt HandlePlaylistDurationL(TUint32 aPlaylistId);
  1100         virtual void HandlePlaylistInfoL(TUint32 aPlaylistId, TInt& aCount, TInt& aDuration);
  1085         virtual void HandlePlaylistInfoL(TUint32 aPlaylistId, TInt& aCount, TInt& aDuration);
  1101 
  1086 
  1102     private:
  1087     private:
  1103 
  1088 
  1104         /**
  1089         /**