mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbautoplaylist.cpp
equal
deleted
inserted
replaced
78 MPX_FUNC("CMPXDbAutoPlaylist::~CMPXDbAutoPlaylist"); |
78 MPX_FUNC("CMPXDbAutoPlaylist::~CMPXDbAutoPlaylist"); |
79 |
79 |
80 delete iRecentlyPlayedPlaylist; |
80 delete iRecentlyPlayedPlaylist; |
81 delete iMostPlayedPlaylist; |
81 delete iMostPlayedPlaylist; |
82 delete iRecentlyAddedPlaylist; |
82 delete iRecentlyAddedPlaylist; |
|
83 |
|
84 delete iTitleRecentlyPlayed; |
|
85 delete iTitleMostPlayed; |
|
86 delete iTitleRecentlyAdded; |
|
87 |
83 } |
88 } |
84 |
89 |
85 // ---------------------------------------------------------------------------- |
90 // ---------------------------------------------------------------------------- |
86 // Constructor |
91 // Constructor |
87 // ---------------------------------------------------------------------------- |
92 // ---------------------------------------------------------------------------- |
104 |
109 |
105 iRecentlyPlayedPlaylist = aResource.ReadHBufCL(R_MC_RECENTLY_PLAYED_PLAYLIST); |
110 iRecentlyPlayedPlaylist = aResource.ReadHBufCL(R_MC_RECENTLY_PLAYED_PLAYLIST); |
106 iMostPlayedPlaylist = aResource.ReadHBufCL(R_MC_MOST_PLAYED_PLAYLIST); |
111 iMostPlayedPlaylist = aResource.ReadHBufCL(R_MC_MOST_PLAYED_PLAYLIST); |
107 iRecentlyAddedPlaylist = aResource.ReadHBufCL(R_MC_RECENTLY_ADDED_PLAYLIST); |
112 iRecentlyAddedPlaylist = aResource.ReadHBufCL(R_MC_RECENTLY_ADDED_PLAYLIST); |
108 |
113 |
|
114 iTitleRecentlyPlayed = aResource.ReadHBufCL(R_MC_TITLE_RECENTLY_PLAYED ); |
|
115 iTitleMostPlayed = aResource.ReadHBufCL(R_MC_TITLE_MOST_PLAYED ); |
|
116 iTitleRecentlyAdded = aResource.ReadHBufCL(R_MC_TITLE_RECENTLY_DOWNLOADED ); |
|
117 |
109 iRecentlyPlayedPlaylistId = KMPXRecentlyPlayedPlaylistId; |
118 iRecentlyPlayedPlaylistId = KMPXRecentlyPlayedPlaylistId; |
110 iMostPlayedPlaylistId = KMPXMostPlayedPlaylistId; |
119 iMostPlayedPlaylistId = KMPXMostPlayedPlaylistId; |
111 iRecentlyAddedPlaylistId = KMPXRecentlyAddedPlaylistId; |
120 iRecentlyAddedPlaylistId = KMPXRecentlyAddedPlaylistId; |
112 } |
121 } |
113 |
122 |
158 MPX_FUNC("CMPXDbAutoPlaylist::AutoPlaylistNameL"); |
167 MPX_FUNC("CMPXDbAutoPlaylist::AutoPlaylistNameL"); |
159 |
168 |
160 TPtrC ptr; |
169 TPtrC ptr; |
161 if (aPlaylistId == iRecentlyPlayedPlaylistId) |
170 if (aPlaylistId == iRecentlyPlayedPlaylistId) |
162 { |
171 { |
163 ptr.Set(*iRecentlyPlayedPlaylist); |
172 ptr.Set(*iTitleRecentlyPlayed); |
164 } |
173 } |
165 else if (aPlaylistId == iMostPlayedPlaylistId) |
174 else if (aPlaylistId == iMostPlayedPlaylistId) |
166 { |
175 { |
167 ptr.Set(*iMostPlayedPlaylist); |
176 ptr.Set(*iTitleMostPlayed); |
168 } |
177 } |
169 else if (aPlaylistId == iRecentlyAddedPlaylistId) |
178 else if (aPlaylistId == iRecentlyAddedPlaylistId) |
170 { |
179 { |
171 ptr.Set(*iRecentlyAddedPlaylist); |
180 ptr.Set(*iTitleRecentlyAdded); |
172 } |
181 } |
173 else |
182 else |
174 { |
183 { |
175 User::Leave(KErrNotSupported); |
184 User::Leave(KErrNotSupported); |
176 } |
185 } |