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