author | Simon Howkins <simonh@symbian.org> |
Mon, 22 Nov 2010 16:33:08 +0000 | |
branch | RCL_3 |
changeset 69 | 1a9731de4f7b |
parent 66 | 1f1dad4af8f8 |
permissions | -rw-r--r-- |
53 | 1 |
/* |
2 |
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: This class provides the functions to manipulate the podcast collection |
|
15 |
* database. |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
||
20 |
#ifndef MPXPODCASTDBHANDLER_H |
|
21 |
#define MPXPODCASTDBHANDLER_H |
|
22 |
||
23 |
// INCLUDES |
|
24 |
#include <e32base.h> |
|
25 |
#include <f32file.h> |
|
26 |
||
27 |
#include <mpxattribute.h> |
|
28 |
#include <mpxmediageneraldefs.h> |
|
29 |
#include <mpxpodcastdefs.h> |
|
30 |
||
31 |
#include "mpxdbcommonstd.h" |
|
32 |
||
33 |
#include "mpxpodcastcollectiondbstd.h" |
|
34 |
#include "mpxpodcastcollectiondb.hrh" |
|
35 |
#include "mpxdbpodcast.h" // For MMPXDbPodcastObserver |
|
36 |
#include "mpxdbactivetask.h" |
|
37 |
||
38 |
// FORWARD DECLARATIONS |
|
39 |
class CMPXMedia; |
|
40 |
class CMPXMediaArray; |
|
41 |
||
42 |
class CMPXPodcastDbManager; |
|
43 |
class CMPXDbCategory; |
|
44 |
class CMPXDbAuxiliary; |
|
45 |
||
46 |
// CLASS DECLARATION |
|
47 |
||
48 |
/** |
|
49 |
* Podcast collection database handler |
|
50 |
* |
|
51 |
* @lib mpxpodcastdbplugin.lib |
|
52 |
*/ |
|
53 |
class CMPXPodcastDbHandler : |
|
54 |
public CBase, |
|
55 |
public MMPXDbPodcastObserver |
|
56 |
{ |
|
57 |
public: // Constructors and destructor |
|
58 |
||
59 |
/** |
|
60 |
* Two-phased constructor. |
|
61 |
* @param aFs file server session |
|
62 |
* @return New CMPXPodcastDbHandler instance |
|
63 |
*/ |
|
64 |
static CMPXPodcastDbHandler* NewL(RFs& aFs, CMPXResource& aResource); |
|
65 |
||
66 |
/** |
|
67 |
* Two-phased constructor. |
|
68 |
* @param aFs file server session |
|
69 |
* @return New CMPXPodcastDbHandler instance |
|
70 |
*/ |
|
71 |
static CMPXPodcastDbHandler* NewLC(RFs& aFs, CMPXResource& aResource); |
|
72 |
||
73 |
/** |
|
74 |
* Destructor. |
|
75 |
*/ |
|
76 |
virtual ~CMPXPodcastDbHandler(); |
|
77 |
||
78 |
public: |
|
79 |
||
80 |
/** |
|
81 |
* Add a episode to the podcast collection database |
|
82 |
* @param aMedia media object which contains file path, |
|
83 |
* author, name(title), episode no., etc... |
|
84 |
* @return TUint32 id of the item added |
|
85 |
*/ |
|
86 |
TUint32 AddEpisodeL(const CMPXMedia& aMedia); |
|
87 |
||
88 |
/** |
|
89 |
* Update episode info for a episode in the podcast collection database |
|
90 |
* @param aMedia episode details object which contains file path, |
|
91 |
* author, name(title), episode no., etc... |
|
92 |
* @param aMessageArray resulted change events |
|
93 |
* @return ETrue if the change is UI visible |
|
94 |
*/ |
|
95 |
CMPXDbActiveTask::TChangeVisibility UpdateEpisodeL(const CMPXMedia& aMedia, CMPXMessageArray& aMessageArray); |
|
96 |
||
97 |
/** |
|
98 |
* Remove all episodes within podcast collection database |
|
99 |
*/ |
|
100 |
void RemoveEntireCollectionL(); |
|
101 |
||
102 |
/** |
|
103 |
* Remove a episode from the podcast collection database |
|
104 |
* @param aEpisodeId ID of the episode to be removed |
|
105 |
* @param aUriArray a descriptor array to contain the URI of the deleted file |
|
106 |
* @param aMessageArray a list of change events as a result of the |
|
107 |
* episode removal |
|
108 |
* @param aDeleteRecord indicates whether the client has explictly requested |
|
109 |
* to delete the records from the database. If ETrue, records |
|
110 |
* associated with the media will be deleted from the database; |
|
111 |
* if EFalse, whether to mark the records as deleted or to delete |
|
112 |
* the records will be based on other deciding factors. |
|
113 |
*/ |
|
114 |
void RemoveEpisodeL(TUint32 aEpisodeId, CDesCArray& aUriArray, |
|
115 |
CMPXMessageArray& aMessageArray, TBool aDeleteRecord = EFalse); |
|
116 |
||
117 |
/** |
|
118 |
* Removes a category of episodes from the podcast collection, and its |
|
119 |
* corresponding category in the lookup table |
|
120 |
* @param aCategory the category to remove |
|
121 |
* @param aCategoryId ID of the category to remove |
|
122 |
* @param aUriArray a descriptor array to contain the URI of the deleted file(s) |
|
123 |
* @param aMessageArray change events as result of the episode removal |
|
124 |
*/ |
|
125 |
void RemoveEpisodesMatchingCategoryL(TMPXGeneralCategory aCategory, |
|
126 |
TUint32 aCategoryId, CDesCArray& aUriArray, CMPXMessageArray& aMessageArray); |
|
127 |
||
128 |
/** |
|
129 |
* Removes a publish date category of episodes from the podcast collection |
|
130 |
* @param aCategoryId the publish date cateogry to remove |
|
131 |
* @param aUriArray a descriptor array to contain the URI of the deleted file(s) |
|
132 |
* @param aMessageArray change events as result of the episode removal |
|
133 |
*/ |
|
134 |
void RemoveEpisodesMatchingPublishDateCategoryL(TUint32 aCategoryId, |
|
135 |
CDesCArray& aUriArray, CMPXMessageArray& aMessageArray); |
|
136 |
||
137 |
/** |
|
138 |
* Delete records in all databases which have been marked as deleted |
|
139 |
*/ |
|
140 |
void CleanupDeletedRecordsL(); |
|
141 |
||
142 |
/** |
|
143 |
* Get all episodes from the podcast collection databasee |
|
144 |
* @param aAttrs Array of attributes to @return |
|
145 |
* @param aMediaArray Array to place all the episodes' required info |
|
146 |
*/ |
|
147 |
void GetAllEpisodesL(const TArray<TMPXAttribute>& aAttrs, |
|
148 |
CMPXMediaArray& aMediaArray); |
|
149 |
||
150 |
/** |
|
151 |
* Get all the episodes that match the given title ID |
|
152 |
* @param aTitleId ID of the title to match |
|
153 |
* @param aAttrs Array of attributes to return |
|
154 |
* @param aMediaArray Array to place all the matching episodes' required info |
|
155 |
*/ |
|
156 |
void GetEpisodesMatchingTitleL(TUint aTitleId, |
|
157 |
const TArray<TMPXAttribute>& aAttrs, CMPXMediaArray& aMediaArray); |
|
158 |
||
159 |
/** |
|
160 |
* Get all the episodes that match the given playlist ID. |
|
161 |
* Podcast collection only support Recently Added and Not Yet Played |
|
162 |
* auto playlists. |
|
163 |
* @param aPlaylistId ID of the playlist to match |
|
164 |
* @param aAttrs Array of attributes to return |
|
165 |
* @param aMediaArray Array to place all the required episode info |
|
166 |
* @param aIndexOfCurrentlyPlayingItem index of the currently playing |
|
167 |
* episode or KErrNotFound (-1) if no currently playing episode within |
|
168 |
* this playlist |
|
169 |
*/ |
|
170 |
void GetEpisodesMatchingPlaylistL(TUint aPlaylistId, |
|
171 |
const TArray<TMPXAttribute>& aAttrs, CMPXMediaArray& aMediaArray, |
|
172 |
TInt& aIndexOfCurrentlyPlayingItem); |
|
173 |
||
174 |
/** |
|
175 |
* Get the episode info that matches the given episode ID |
|
176 |
* @param aEpisodeId ID of the episode |
|
177 |
* @param aAttrs Array of attributes to return |
|
178 |
* @param aMediaArray Array to place all the required episode info |
|
179 |
*/ |
|
180 |
void GetEpisodeL(TUint32 aEpisodeId, const TArray<TMPXAttribute>& aAttrs, |
|
181 |
CMPXMediaArray& aMediaArray); |
|
182 |
||
183 |
/** |
|
184 |
* Get the episode info that matches the given episode ID |
|
185 |
* @aEpisodeId ID of the episode |
|
186 |
* @param aAttrs Array of attributes to return |
|
187 |
* @param aMedia CMPXMedia instance to place all the required song info |
|
188 |
*/ |
|
189 |
void GetEpisodeL(TUint32 aEpisodeId, const TArray<TMPXAttribute>& aAttrs, |
|
190 |
CMPXMedia& aMedia); |
|
191 |
||
192 |
/** |
|
193 |
* Get the episode ID of the episode that matches the given URI |
|
194 |
* @param aUri URI to match |
|
195 |
* @return Episode ID |
|
196 |
*/ |
|
197 |
TUint32 GetEpisodeIdMatchingUriL(const TDesC& aUri); |
|
198 |
||
199 |
/** |
|
200 |
* Get all the podcast title names from the podcast collection database |
|
201 |
* @param aAttrs Array of attributes to return |
|
202 |
* @param aMediaArray Array to place all the titles required info |
|
203 |
*/ |
|
204 |
void GetAllPodcastTitlesL(const TArray<TMPXAttribute>& aAttrs, |
|
205 |
CMPXMediaArray& aMediaArray); |
|
206 |
||
207 |
/** |
|
208 |
* Get all episodes matching the specified publish date |
|
209 |
* @param aPlaylistId the publish date playlist to retrieve |
|
210 |
* @param aAttrs the attributes to return |
|
211 |
* @param aPendingCategoryDeletionFlag true if the episodes within a publish |
|
212 |
* date category are being retrieved to be deleted |
|
213 |
* @param aMediaArray Array to place all the episode info |
|
214 |
*/ |
|
215 |
TInt GetEpisodesMatchingPublishPlaylistL(TUint aPlaylistId, |
|
216 |
const TArray<TMPXAttribute>& aAttrs, TBool aPendingCategoryDeletionFlag, |
|
217 |
CMPXMediaArray& aMediaArray); |
|
218 |
||
219 |
/** |
|
220 |
* Get title name using the specified ID |
|
221 |
* @param aId the id of the title to retrieve the name of |
|
222 |
* @return the podcast title matching the specified ID, ownership is transferred |
|
223 |
*/ |
|
224 |
HBufC* GetTitleNameMatchingIdL(const TUint32 aId); |
|
225 |
||
226 |
/** |
|
227 |
* Get URI from the Id |
|
228 |
* @param aId to search for |
|
229 |
* @return URI matching the ID, ownership is transferred |
|
230 |
*/ |
|
231 |
HBufC* GetUriMatchingIdL (const TUint32 aId); |
|
232 |
||
233 |
/** |
|
234 |
* Get the duration for all episodes |
|
235 |
* @return duration value |
|
236 |
*/ |
|
237 |
TInt GetAllEpisodesDurationL(); |
|
238 |
||
239 |
/** |
|
240 |
* Get the duration for a specified title |
|
241 |
* @param aTitleId identifies the title |
|
242 |
* @return duration value |
|
243 |
*/ |
|
244 |
TInt GetTitleDurationL(TUint32 aTitleId); |
|
245 |
||
246 |
/** |
|
247 |
* Get the duration for the episodes not yet played |
|
248 |
* @return duration value |
|
249 |
*/ |
|
250 |
TInt GetNotPlayedDurationL(); |
|
251 |
||
252 |
/** |
|
253 |
* Get the duration for recently added episodes |
|
254 |
* @return duration value |
|
255 |
*/ |
|
256 |
TInt GetRecentlyAddedDurationL(); |
|
257 |
||
258 |
/** |
|
259 |
* Fetch the total number of items in the specified category |
|
260 |
* @param aCategory category to be queried |
|
261 |
* @return number of items. |
|
262 |
*/ |
|
263 |
TInt NumberOfItemsL(TMPXPodcastCategory aCategory); |
|
264 |
||
265 |
/** |
|
266 |
* Find media(s) from the collection |
|
267 |
* @param aCriteria selection criteria |
|
268 |
* @param aAttrs attributes for the matching media |
|
269 |
* @return matching media. Ownership is transferred. |
|
270 |
*/ |
|
271 |
CMPXMedia* FindAllLC(const CMPXMedia& aCriteria, |
|
272 |
const TArray<TMPXAttribute>& aAttrs); |
|
273 |
||
274 |
/** |
|
275 |
* Set the last refreshed time |
|
276 |
* @param aTime the updated last refresh time |
|
277 |
*/ |
|
278 |
void SetLastRefreshedTimeL( TTime aTime ); |
|
279 |
||
280 |
/** |
|
281 |
* Get the last refreshed time |
|
282 |
* @return last refreshed time |
|
283 |
*/ |
|
284 |
TTime GetLastRefreshedTimeL(); |
|
285 |
||
286 |
/** |
|
287 |
* Set the db corrupted bit in the aux table for all drives |
|
288 |
* @param aCorrupted flag indicating whether or not the db is corrupted |
|
289 |
*/ |
|
290 |
void SetDBCorruptedL(TBool aCorrupted); |
|
291 |
||
292 |
/** |
|
293 |
* Get the db corrupted flag |
|
294 |
* @return ETrue if database is corrupted, else EFalse |
|
295 |
*/ |
|
296 |
TBool IsDBCorruptedL(); |
|
297 |
||
298 |
/** |
|
299 |
* Checks if the database has been created |
|
300 |
* @return ETrue if file has been created |
|
301 |
*/ |
|
302 |
TBool DatabaseCreated(); |
|
303 |
||
304 |
/** |
|
305 |
* Close and re-open the podcast collection database stored on the specified drive |
|
306 |
* @param aDrive drive containing the podcast collection database to re-open |
|
307 |
*/ |
|
308 |
void OpenDatabaseL(TInt aDrive); |
|
309 |
||
310 |
/** |
|
311 |
* Close a database for a particular drive |
|
312 |
* @param aDrive drive to close |
|
313 |
*/ |
|
314 |
void CloseDatabaseL(TInt aDrive); |
|
315 |
||
316 |
/** |
|
317 |
* Recreate all podcast databases |
|
318 |
*/ |
|
319 |
void ReCreateDatabasesL(); |
|
66
1f1dad4af8f8
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
53
diff
changeset
|
320 |
|
1f1dad4af8f8
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
53
diff
changeset
|
321 |
/** |
1f1dad4af8f8
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
53
diff
changeset
|
322 |
* Recreate a specified database file. |
1f1dad4af8f8
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
53
diff
changeset
|
323 |
*/ |
1f1dad4af8f8
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
53
diff
changeset
|
324 |
void RecreateDatabaseFileL( TInt aDrive ); |
1f1dad4af8f8
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
53
diff
changeset
|
325 |
|
53 | 326 |
/** |
327 |
* Start a refresh operation |
|
328 |
*/ |
|
329 |
void RefreshStartL(); |
|
330 |
||
331 |
/** |
|
332 |
* End a refresh operation |
|
333 |
*/ |
|
334 |
void RefreshEndL(); |
|
335 |
||
336 |
/** |
|
337 |
* Sets the value of the IsPlaying field for a given episode |
|
338 |
* @param aMedia contains episode information |
|
339 |
* @param aIsPlaying value of the IsPlaying field |
|
340 |
*/ |
|
341 |
void SetIsPlayingL(const CMPXMedia& aMedia, TBool aIsPlaying); |
|
342 |
||
343 |
/** |
|
344 |
* Get total record count for podcasts in db |
|
345 |
* @param aDrive, specifies drive number for db selection |
|
346 |
* @return count |
|
347 |
*/ |
|
348 |
TUint GetTotalCountL(TInt aDrive); |
|
349 |
||
350 |
/** |
|
351 |
* Get URIs for all podcasts |
|
352 |
* @param aDrive, specifies drive number for db selection |
|
353 |
* @param aFromID, specifies last record's unique ID |
|
354 |
* @param aRecords, specifies the number of records to get |
|
355 |
* @param aUriArr, will contain all URIs on return |
|
356 |
* @param aLastID, will contain a unique ID of last record in the array |
|
357 |
*/ |
|
358 |
void GetPodcastUriArrayL(TInt aDrive, TInt aFromID, TInt aRecords, |
|
359 |
CDesCArray& aUriArr, TInt& aLastID); |
|
360 |
||
361 |
/** |
|
362 |
* Starts a transaction |
|
363 |
*/ |
|
364 |
void BeginTransactionL(); |
|
365 |
||
366 |
/** |
|
367 |
* Ends a transaction. Depending on the error code either commits or |
|
368 |
* rollsback the transaction. |
|
369 |
* @param aError error code |
|
370 |
*/ |
|
371 |
void EndTransactionL(TInt aError); |
|
372 |
||
373 |
/** |
|
374 |
* Checks if the database is currently in a transaction. |
|
375 |
* @return ETrue if database is currently in a transaction, EFalse otherwise |
|
376 |
*/ |
|
377 |
TBool InTransaction(); |
|
378 |
||
379 |
/** |
|
380 |
* Checks if the spefified drive is a remove drive |
|
381 |
*/ |
|
382 |
TBool IsRemoteDrive(TDriveNumber aDrive); |
|
383 |
||
384 |
private: |
|
385 |
||
386 |
/** |
|
387 |
* Find media entry/entries from the collection |
|
388 |
* @param aCriteria selection criteria |
|
389 |
* @param aAttrs attributes for the matching media |
|
390 |
* @param aMediaArray array of matching media entry/entries |
|
391 |
*/ |
|
392 |
void FindAllL(const CMPXMedia& aCriteria, const TArray<TMPXAttribute>& aAttrs, |
|
393 |
CMPXMediaArray& aMediaArray); |
|
394 |
||
395 |
/** |
|
396 |
* Find episode(s) which match(es) the selection criteria |
|
397 |
* @param aCriteria selection criteria |
|
398 |
* @param aAttrs the attributes to include for the artist(s) matching the |
|
399 |
* selection criteria |
|
400 |
* @param aMediaArray artist(s) matching the selection criteria |
|
401 |
*/ |
|
402 |
void FindEpisodesL(const CMPXMedia& aCriteria, const TArray<TMPXAttribute>& aAttrs, |
|
403 |
CMPXMediaArray& aMediaArray); |
|
404 |
||
405 |
/** |
|
406 |
* Add an episode to the podcast collection database |
|
407 |
* @param aMedia media object which contains file path, author, name, podcast title etc... |
|
408 |
* @return episode Id of the episode that has been added to the database |
|
409 |
*/ |
|
410 |
TUint32 DoAddEpisodeL(const CMPXMedia& aMedia); |
|
411 |
||
412 |
/** |
|
413 |
* Update episode info for a episode in the podcast collection database |
|
414 |
* @param aMedia episode details object which contains file path, |
|
415 |
* author, name(title), podcast title, etc... |
|
416 |
* @param aItemChangedMessages a list of items changed |
|
417 |
* @return ETrue if UI visible change |
|
418 |
*/ |
|
419 |
CMPXDbActiveTask::TChangeVisibility DoUpdateEpisodeL(const CMPXMedia& aMedia, |
|
420 |
CMPXMessageArray& aItemChangedMessages); |
|
421 |
||
422 |
/** |
|
423 |
* Remove a episode from the podcast collection database |
|
424 |
* @param aEpisodeId ID of the episode to be removed |
|
425 |
* @param aUriArray a descriptor array to contain the URI of the deleted file |
|
426 |
* @param aMessageArray change events as result of the episode removal |
|
427 |
* @param aDeleteRecord if ETrue the episode will be deleted, if EFalse |
|
428 |
* it will be marked as deleted |
|
429 |
*/ |
|
430 |
void DoRemoveEpisodeL(TUint32 aEpisodeId, CDesCArray& aUriArray, |
|
431 |
CMPXMessageArray& aMessageArray, TBool aDeleteRecord); |
|
432 |
||
433 |
/** |
|
434 |
* Remove the episodes for a category from the podcast collection database |
|
435 |
* @param aCategory category type |
|
436 |
* @param aCategoryId category item |
|
437 |
* @param aUriArray a descriptor array to contain the URI of the deleted file |
|
438 |
* @param aMessageArray change events as result of the episode removal |
|
439 |
*/ |
|
440 |
void DoRemoveEpisodesMatchingCategoryL(TMPXGeneralCategory aCategory, |
|
441 |
TUint32 aCategoryId, CDesCArray& aUriArray, CMPXMessageArray& aMessageArray); |
|
442 |
||
443 |
/** |
|
444 |
* Remove the episodes for a publish date category |
|
445 |
* @param aCategoryId identifies the publish date category |
|
446 |
* @param aUriArray a descriptor array to contain the URI of the deleted file |
|
447 |
* @param aMessageArray change events as result of the episode removal |
|
448 |
*/ |
|
449 |
void DoRemoveEpisodesMatchingPublishDateCategoryL(TUint32 aCategoryId, |
|
450 |
CDesCArray& aUriArray, CMPXMessageArray& aMessageArray); |
|
451 |
||
452 |
/** |
|
453 |
* Delete records in all databases which have been marked as deleted |
|
454 |
*/ |
|
455 |
void DoCleanupDeletedRecordsL(); |
|
456 |
||
457 |
/** |
|
458 |
* Makes sure all the folders specified in the array parameter are created, |
|
459 |
* otherwise it tries to create them. Updates the iDbDrives member variable |
|
460 |
* with the drives corresponding to the folders. |
|
461 |
* @param aFolders contains all the folders to be processed |
|
462 |
*/ |
|
463 |
void ProcessPodcastFoldersL(const CDesCArray& aFolders); |
|
464 |
||
465 |
/** |
|
466 |
* Returns the CMPXDbCategory instance associated with the specified |
|
467 |
* category type |
|
468 |
* @param aCategory category type |
|
469 |
* @return corresponding CMPXDbCategory instance |
|
470 |
* @leave KErrNotSupported if invalid category |
|
471 |
*/ |
|
472 |
CMPXDbCategory* DbCategoryL(TMPXGeneralCategory aCategory) const; |
|
473 |
||
474 |
/** |
|
475 |
* Verify the volume id for the databases |
|
476 |
*/ |
|
477 |
void VerifyVolumeIdL( TInt aDrive ); |
|
478 |
void VerifyVolumeIdL(); |
|
479 |
||
480 |
/** |
|
481 |
* Checks if there is a drive that has a low disk space |
|
482 |
* @leave KErrDiskFull if the space on one of the drives is below the |
|
483 |
* critical level |
|
484 |
*/ |
|
485 |
void CheckDiskSpaceOnDrivesL(); |
|
486 |
||
487 |
#if defined (__MTP_PROTOCOL_SUPPORT) |
|
488 |
/** |
|
489 |
* Reads the "save deleted records" MTP flag from CenRep and returns |
|
490 |
* the value. |
|
491 |
* @return value of the "save deleted records" MTP flag |
|
492 |
*/ |
|
493 |
TBool SaveDeletedSongs(); |
|
494 |
#endif |
|
495 |
||
496 |
#ifdef RD_MULTIPLE_DRIVE |
|
497 |
/** |
|
498 |
* Retrieve all visible podcast folder locations |
|
499 |
*/ |
|
500 |
CDesCArrayFlat* GetPodcastFoldersL(); |
|
501 |
#endif // RD_MULTIPLE_DRIVE |
|
502 |
||
503 |
private: // From MMPXDbPodcastObserver |
|
504 |
||
505 |
/** |
|
506 |
* @see MMPXDbPodcastObserver |
|
507 |
*/ |
|
508 |
TUint32 AddCategoryItemL(TMPXGeneralCategory aCategory, const TDesC& aName, |
|
509 |
TInt aDriveId, CMPXMessageArray* aItemChangedMessages); |
|
510 |
||
511 |
/** |
|
512 |
* @see MMPXDbPodcastObserver |
|
513 |
*/ |
|
514 |
void DeleteEpisodeForCategoryL(TMPXGeneralCategory aCategory, TUint32 aCategoryId, |
|
515 |
TInt aDriveId, CMPXMessageArray* aItemChangedMessages); |
|
516 |
||
517 |
private: |
|
518 |
/** |
|
519 |
* C++ constructor |
|
520 |
* @param file session |
|
521 |
*/ |
|
522 |
CMPXPodcastDbHandler(RFs& aFs, CMPXResource& aResource); |
|
523 |
||
524 |
/** |
|
525 |
* Symbian 2nd phase constructor.. |
|
526 |
*/ |
|
527 |
void ConstructL(); |
|
528 |
||
529 |
private: // Data |
|
530 |
||
531 |
// owned member variables |
|
532 |
CMPXPodcastDbManager* iDbManager; |
|
533 |
CMPXDbPodcast* iDbPodcast; |
|
534 |
CMPXDbCategory* iDbArtist; |
|
535 |
CMPXDbCategory* iDbAlbum; |
|
536 |
CMPXDbCategory* iDbGenre; |
|
537 |
CMPXDbCategory* iDbComposer; |
|
538 |
CMPXDbAuxiliary* iDbAuxiliary; |
|
539 |
||
540 |
CDesCArrayFlat* iPodcastPublishDateCat; // podcast publish date category |
|
541 |
RArray<TInt> iPodcastPublishDateIds; // podcast publish date ID |
|
542 |
RArray<TInt> iDbDrives; |
|
543 |
||
544 |
// not owned member variables |
|
545 |
RFs& iFs; |
|
546 |
CMPXResource& iResource; |
|
547 |
TBool iOutOfDisk; // Are we in out of disk mode? |
|
548 |
}; |
|
549 |
||
550 |
#endif // MPXPODCASTDBHANDLER_H |
|
551 |
||
552 |
// End of File |