mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/inc/mpxdbhandler.h
branchRCL_3
changeset 56 2cbbefa9af78
parent 53 3de6c4cf6b67
child 66 1f1dad4af8f8
equal deleted inserted replaced
53:3de6c4cf6b67 56:2cbbefa9af78
    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 
  1007         CDesCArrayFlat* GetMusicFoldersL();
  1006         CDesCArrayFlat* GetMusicFoldersL();
  1008 #endif // RD_MULTIPLE_DRIVE
  1007 #endif // RD_MULTIPLE_DRIVE
  1009 
  1008 
  1010     private:    // From MMPXDbMusicObserver
  1009     private:    // From MMPXDbMusicObserver
  1011 
  1010 
       
  1011         /**
       
  1012         * @see MMPXDbMusicObserver
       
  1013         */
  1012 #ifdef ABSTRACTAUDIOALBUM_INCLUDED
  1014 #ifdef ABSTRACTAUDIOALBUM_INCLUDED
  1013         /**
  1015        virtual TUint32 AddAbstractAlbumItemL(const TDesC& aName, 
  1014         * @see MMPXDbMusicObserver
  1016             TInt aDriveId, CMPXMessageArray* aItemChangedMessages, TBool& aItemExist,
  1015         */
  1017             const TDesC& aUri, const TDesC& aAlbumArtist=KNullDesC);
  1016         virtual TUint32 AddCategoryItemL(TMPXGeneralCategory aCategory,
       
  1017             const TDesC& aName,
       
  1018             TInt aDriveId,
       
  1019             CMPXMessageArray* aItemChangedMessages, TBool& aItemExist,
       
  1020             const TDesC& aUri,
       
  1021             const TDesC& aAlbumArtist=KNullDesC);
       
  1022 #else
       
  1023 
       
  1024         /**
       
  1025         * @see MMPXDbMusicObserver
       
  1026         */
       
  1027         virtual TUint32 AddCategoryItemL(TMPXGeneralCategory aCategory,
       
  1028             const TDesC& aName, TInt aDriveId,
       
  1029             CMPXMessageArray* aItemChangedMessages, TBool& aItemExist);
       
  1030 #endif // ABSTRACTAUDIOALBUM_INCLUDED
  1018 #endif // ABSTRACTAUDIOALBUM_INCLUDED
  1031 
  1019 
  1032        virtual TUint32 AddCategoryItemL(TMPXGeneralCategory aCategory, const TDesC& aName,
  1020        virtual TUint32 AddCategoryItemL(TMPXGeneralCategory aCategory, const CMPXMedia& aMedia,       
  1033            const TDesC& aArtistName, const TDesC& aArt,
       
  1034             TInt aDrive, CMPXMessageArray* aItemChangedMessages, TBool& aItemExist);
  1021             TInt aDrive, CMPXMessageArray* aItemChangedMessages, TBool& aItemExist);
  1035 
  1022        
  1036        virtual void UpdateCategoryItemL(TMPXGeneralCategory aCategory, TUint32 aCategoryId,
  1023        virtual void UpdateCategoryItemL(TMPXGeneralCategory aCategory, TUint32 aCategoryId,
  1037             const CMPXMedia& aMedia, TInt aDrive, CMPXMessageArray* aItemChangedMessages);
  1024             const CMPXMedia& aMedia, TInt aDrive, CMPXMessageArray* aItemChangedMessages);
  1038 
  1025 
       
  1026        virtual TUint32 GenerateUniqueIdForAlbumL(const CMPXMedia& aMedia);
       
  1027        
       
  1028        virtual TBool IsUnknownAlbumL(const TUint32 aId);
       
  1029 
  1039         /**
  1030         /**
  1040         * @see MMPXDbMusicObserver
  1031         * @see MMPXDbMusicObserver
  1041         */
  1032         */
  1042         virtual void DeleteSongForCategoryL(TMPXGeneralCategory aCategory,
  1033         virtual void DeleteSongForCategoryL(TMPXGeneralCategory aCategory, TUint32 aCategoryId,
  1043             TUint32 aCategoryId, TInt aDriveId, CMPXMessageArray* aItemChangedMessages,
  1034             TInt aDrive, CMPXMessageArray* aItemChangedMessages, TBool& aItemExist, const TDesC& aArt = KNullDesC);
  1044             TBool& aItemExist);
       
  1045 
  1035 
  1046         /**
  1036         /**
  1047         * @see MMPXDbMusicObserver
  1037         * @see MMPXDbMusicObserver
  1048         */
  1038         */
  1049         virtual void HandlePlayCountModifiedL(CMPXMessageArray& aItemChangedMessages);
  1039         virtual void HandlePlayCountModifiedL(CMPXMessageArray& aItemChangedMessages);
  1056         /**
  1046         /**
  1057         * @see MMPXDbMusicObserver
  1047         * @see MMPXDbMusicObserver
  1058         */
  1048         */
  1059         virtual HBufC* HandleGetAlbumNameFromIdL(TUint32 aId);
  1049         virtual HBufC* HandleGetAlbumNameFromIdL(TUint32 aId);
  1060 #endif // ABSTRACTAUDIOALBUM_INCLUDED
  1050 #endif // ABSTRACTAUDIOALBUM_INCLUDED
  1061     private:    // From MMPXDbArtistObserver
       
  1062     /**
       
  1063     * @see MMPXDbArtistObser
       
  1064     */
       
  1065         virtual TInt HandleGetAlbumsCountForArtistL(TUint32 aArtistId);
       
  1066 
       
  1067     private:    // From MMPXDbAlbumObserver
       
  1068     /**
       
  1069     * @see MMPXDbAlbumObserver
       
  1070     */
       
  1071     virtual TBool HandleIsUnknownArtistL(TUint32 aArtistId);
       
  1072     /**
       
  1073     * Get the Artistname of song which belongs to the specified Album.     
       
  1074     * @param aId, The Album ID.
       
  1075 	* @returns alternative artistname retrieved in the specified Album.
       
  1076     */
       
  1077     virtual HBufC* HandleArtistForAlbumL(const TUint32 aAlbumId);
       
  1078         
  1051         
  1079     /**
  1052     private:    // From MMPXDbAlbumObserver   
  1080     * Get the Albumart of song which belongs to the specified Album.     
  1053         /**
  1081     * @param aId, The Album ID.
  1054         * Get the Albumart of song which belongs to the specified Album.     
  1082     * @param aArt, the AlbumArt uri.
  1055         * @param aId, The Album ID.
  1083 	* @returns alternative albumart retrieved in the specified Album.
  1056         * @param aArt, the AlbumArt uri.
  1084     */
  1057 	    * @returns alternative albumart retrieved in the specified Album.
  1085     virtual HBufC* HandleAlbumartForAlbumL(const TUint32 aAlbumId, TPtrC aArt);
  1058         */
       
  1059         virtual HBufC* HandleAlbumartForAlbumL(const TUint32 aAlbumId, TPtrC aArt);
       
  1060        
       
  1061         /**
       
  1062         * @see MMPXDbAlbumObserver
       
  1063         */
       
  1064         virtual void DeleteAlbumForArtistL(TUint32 aCategoryId,
       
  1065             TInt aDrive, CMPXMessageArray* aItemChangedMessages);
       
  1066 
       
  1067         /**
       
  1068         * @see MMPXDbAlbumObserver
       
  1069         */
       
  1070         virtual TUint32 AddAlbumArtistL(const TDesC& aName, const TDesC& aArt, TInt aDriveId);       
  1086 
  1071 
  1087     private:	// From MMPXDbPlaylistObserver
  1072     private:	// From MMPXDbPlaylistObserver
  1088 	/**
  1073 	    /**
  1089 	* @see MMPXDbPlaylistObserver
  1074 	    * @see MMPXDbPlaylistObserver
  1090 	*/
  1075 	    */
  1091 		virtual TInt HandlePlaylistDurationL(TUint32 aPlaylistId);
  1076 		virtual TInt HandlePlaylistDurationL(TUint32 aPlaylistId);
  1092         virtual void HandlePlaylistInfoL(TUint32 aPlaylistId, TInt& aCount, TInt& aDuration);
  1077         virtual void HandlePlaylistInfoL(TUint32 aPlaylistId, TInt& aCount, TInt& aDuration);
  1093 
  1078 
  1094     private:
  1079     private:
  1095 
       
  1096         /**
  1080         /**
  1097         * C++ constructor.
  1081         * C++ constructor.
  1098         * @param file session
  1082         * @param file session
  1099         */
  1083         */
  1100         CMPXDbHandler(RFs& aFs, CMPXResource& aResource);
  1084         CMPXDbHandler(RFs& aFs, CMPXResource& aResource);