|
1 /* |
|
2 * Copyright (c) 2007 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: Responsible for interation with the category tables: |
|
15 * Artist, Album, Genre and Composer |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <sqldb.h> |
|
22 |
|
23 #include <mpxlog.h> |
|
24 |
|
25 #include "mpxdbcommonutil.h" |
|
26 #include "mpxdbcommondef.h" |
|
27 #include "mpxdbmanager.h" |
|
28 |
|
29 #include "mpxcollectiondbdef.h" |
|
30 #include "mpxmediamusicdefs.h" |
|
31 #include "mpxdbpluginqueries.h" |
|
32 #include "mpxdbutil.h" |
|
33 #include "mpxdbalbum.h" |
|
34 |
|
35 // CONSTANTS |
|
36 |
|
37 // maximum number of table name entries per query |
|
38 const TInt KMaxTableNameCount = 2; |
|
39 |
|
40 // ============================ MEMBER FUNCTIONS ============================== |
|
41 |
|
42 // ---------------------------------------------------------------------------- |
|
43 // Two-phased constructor. |
|
44 // ---------------------------------------------------------------------------- |
|
45 // |
|
46 CMPXDbAlbum* CMPXDbAlbum::NewL( |
|
47 CMPXDbManager& aDbManager, |
|
48 TMPXGeneralCategory aCategory, |
|
49 MMPXDbAlbumObserver& aObserver) |
|
50 { |
|
51 MPX_FUNC("CMPXDbAlbum::NewL"); |
|
52 |
|
53 CMPXDbAlbum* self = CMPXDbAlbum::NewLC(aDbManager, aCategory, aObserver); |
|
54 CleanupStack::Pop(self); |
|
55 return self; |
|
56 } |
|
57 |
|
58 // ---------------------------------------------------------------------------- |
|
59 // Two-phased constructor. |
|
60 // ---------------------------------------------------------------------------- |
|
61 // |
|
62 CMPXDbAlbum* CMPXDbAlbum::NewLC( |
|
63 CMPXDbManager& aDbManager, |
|
64 TMPXGeneralCategory aCategory, |
|
65 MMPXDbAlbumObserver& aObserver) |
|
66 { |
|
67 MPX_FUNC("CMPXDbAlbum::NewLC"); |
|
68 |
|
69 CMPXDbAlbum* self = new (ELeave) CMPXDbAlbum(aDbManager, aCategory, aObserver); |
|
70 CleanupStack::PushL(self); |
|
71 self->ConstructL(); |
|
72 return self; |
|
73 } |
|
74 |
|
75 // ---------------------------------------------------------------------------- |
|
76 // Destructor |
|
77 // ---------------------------------------------------------------------------- |
|
78 // |
|
79 CMPXDbAlbum::~CMPXDbAlbum() |
|
80 { |
|
81 MPX_FUNC("CMPXDbAlbum::~CMPXDbAlbum"); |
|
82 } |
|
83 |
|
84 // ---------------------------------------------------------------------------- |
|
85 // Constructor |
|
86 // ---------------------------------------------------------------------------- |
|
87 // |
|
88 CMPXDbAlbum::CMPXDbAlbum( |
|
89 CMPXDbManager& aDbManager, |
|
90 TMPXGeneralCategory aCategory, |
|
91 MMPXDbAlbumObserver& aObserver) : |
|
92 CMPXDbCategory(aDbManager, aCategory), |
|
93 iObserver(aObserver) |
|
94 { |
|
95 MPX_FUNC("CMPXDbAlbum::CMPXDbAlbum"); |
|
96 } |
|
97 |
|
98 // ---------------------------------------------------------------------------- |
|
99 // Second phase constructor. |
|
100 // ---------------------------------------------------------------------------- |
|
101 // |
|
102 void CMPXDbAlbum::ConstructL() |
|
103 { |
|
104 MPX_FUNC("CMPXDbAlbum::ConstructL"); |
|
105 |
|
106 BaseConstructL(); |
|
107 } |
|
108 |
|
109 // ---------------------------------------------------------------------------- |
|
110 // CMPXDbAlbum::AddItemL |
|
111 // ---------------------------------------------------------------------------- |
|
112 // |
|
113 TUint32 CMPXDbAlbum::AddItemL( |
|
114 const TDesC& aName, |
|
115 TUint32 aArtist, |
|
116 const TDesC& aArt, |
|
117 TInt aDriveId, |
|
118 TBool& aNewRecord, |
|
119 TBool aCaseSensitive) |
|
120 { |
|
121 MPX_FUNC("CMPXDbAlbum::AddItemL"); |
|
122 |
|
123 // try to find the item first |
|
124 TUint32 rowId(MPXDbCommonUtil::GenerateUniqueIdL(iDbManager.Fs(), iCategory, |
|
125 aName, aCaseSensitive)); |
|
126 aNewRecord = !CategoryItemExistsL(aDriveId, rowId); |
|
127 |
|
128 if (aNewRecord) |
|
129 { |
|
130 // insert new |
|
131 HBufC* query = PreProcessStringLC(KQueryAlbumInsert); |
|
132 HBufC* name = MPXDbCommonUtil::ProcessSingleQuotesLC(aName); |
|
133 HBufC* art = MPXDbCommonUtil::ProcessSingleQuotesLC(aArt); |
|
134 |
|
135 iDbManager.ExecuteQueryL(aDriveId, *query, rowId, name, 1, aArtist, art); |
|
136 |
|
137 CleanupStack::PopAndDestroy(art); |
|
138 CleanupStack::PopAndDestroy(name); |
|
139 CleanupStack::PopAndDestroy(query); |
|
140 } |
|
141 else |
|
142 { |
|
143 // retrieve the existing record |
|
144 HBufC* query = NULL; |
|
145 query = PreProcessStringLC(KQueryCategoryItem); |
|
146 RSqlStatement recordset(iDbManager.ExecuteSelectQueryL(*query, rowId)); |
|
147 CleanupStack::PopAndDestroy(query); |
|
148 |
|
149 CleanupClosePushL(recordset); |
|
150 |
|
151 if (recordset.Next() != KSqlAtRow) |
|
152 { |
|
153 User::Leave(KErrNotFound); |
|
154 } |
|
155 |
|
156 // Artist |
|
157 TUint32 artistId = recordset.ColumnInt64(EAlbumArtist); |
|
158 |
|
159 // the current one is Unknown and the new one is Not Unknown. |
|
160 if ( IsUnknownArtistL( artistId ) && !IsUnknownArtistL( aArtist ) ) |
|
161 { |
|
162 _LIT( KFormatArtistId, "Artist=%d" ); |
|
163 HBufC* setStr = HBufC::NewLC(KFormatArtistId().Length() + KMCIntegerLen); |
|
164 setStr->Des().Format( KFormatArtistId, aArtist ); |
|
165 |
|
166 iDbManager.ExecuteQueryL(aDriveId, KQueryAlbumUpdate, setStr, rowId); |
|
167 CleanupStack::PopAndDestroy(setStr); |
|
168 } |
|
169 |
|
170 // Album Art |
|
171 TPtrC art(KNullDesC); |
|
172 art.Set(MPXDbCommonUtil::GetColumnTextL(recordset, EAlbumArt)); |
|
173 |
|
174 // the current one is Unknown and the new one is Not Unknown |
|
175 if ( art == KNullDesC && aArt != KNullDesC ) |
|
176 { |
|
177 HBufC* artReplaceSingleQuote = |
|
178 MPXDbCommonUtil::ProcessSingleQuotesLC( aArt ); |
|
179 _LIT( KFormatArt, "Art=\'%S\'" ); |
|
180 HBufC* setStr = HBufC::NewLC(256); |
|
181 setStr->Des().Format( KFormatArt, artReplaceSingleQuote ); |
|
182 |
|
183 iDbManager.ExecuteQueryL(aDriveId, KQueryAlbumUpdate, setStr, rowId); |
|
184 CleanupStack::PopAndDestroy(setStr); |
|
185 CleanupStack::PopAndDestroy(artReplaceSingleQuote); |
|
186 } |
|
187 |
|
188 CleanupStack::PopAndDestroy(&recordset); |
|
189 |
|
190 // increment the number of songs for the category |
|
191 query = PreProcessStringLC(KQueryCategoryIncrementSongCount); |
|
192 iDbManager.ExecuteQueryL(aDriveId, *query, rowId); |
|
193 CleanupStack::PopAndDestroy(query); |
|
194 } |
|
195 |
|
196 return rowId; |
|
197 } |
|
198 |
|
199 // ---------------------------------------------------------------------------- |
|
200 // CMPXDbAlbum::DecrementSongsForCategoryL |
|
201 // ---------------------------------------------------------------------------- |
|
202 // |
|
203 void CMPXDbAlbum::DecrementSongsForCategoryL( |
|
204 const TUint32 aId, |
|
205 TInt aDriveId, |
|
206 CMPXMessageArray* aItemChangedMessages, |
|
207 TBool& aItemExist, |
|
208 const TUint32 aArtist) |
|
209 { |
|
210 MPX_FUNC("CMPXDbAlbum::DecrementSongsForCategoryL"); |
|
211 |
|
212 // if just one song uses this category. Use <= just in case |
|
213 if (GetSongsCountL(aDriveId, aId) <= 1) |
|
214 { |
|
215 aItemExist = EFalse; |
|
216 // delete the category |
|
217 DeleteCategoryL(aId, aDriveId); |
|
218 |
|
219 if (aItemChangedMessages) |
|
220 { |
|
221 // add the item changed message |
|
222 MPXDbCommonUtil::AddItemChangedMessageL(*aItemChangedMessages, aId, EMPXItemDeleted, |
|
223 iCategory, KDBPluginUid); |
|
224 } |
|
225 } |
|
226 else |
|
227 { |
|
228 aItemExist = ETrue; |
|
229 |
|
230 // retrieve the existing record |
|
231 HBufC* query = PreProcessStringLC(KQueryCategoryItem); |
|
232 RSqlStatement recordset(iDbManager.ExecuteSelectQueryL(*query, aId)); |
|
233 CleanupStack::PopAndDestroy(query); |
|
234 |
|
235 CleanupClosePushL(recordset); |
|
236 |
|
237 if (recordset.Next() != KSqlAtRow) |
|
238 { |
|
239 User::Leave(KErrNotFound); |
|
240 } |
|
241 |
|
242 TUint32 artistId = recordset.ColumnInt64(EAlbumArtist); |
|
243 |
|
244 CleanupStack::PopAndDestroy(&recordset); |
|
245 |
|
246 // the current artist is equal to deleted song's artist |
|
247 if ( artistId == aArtist ) |
|
248 { |
|
249 TUint32 newArtistId = ArtistForAlbumL(aId); |
|
250 |
|
251 _LIT( KFormatArtistId, "Artist=%d" ); |
|
252 HBufC* setStr = HBufC::NewLC(KFormatArtistId().Length() + KMCIntegerLen); |
|
253 setStr->Des().Format(KFormatArtistId, newArtistId); |
|
254 |
|
255 iDbManager.ExecuteQueryL(aDriveId, KQueryAlbumUpdate, setStr, aId); |
|
256 CleanupStack::PopAndDestroy(setStr); |
|
257 |
|
258 if (aItemChangedMessages) |
|
259 { |
|
260 // add the item changed message |
|
261 MPXDbCommonUtil::AddItemAlbumChangedMessageL(*aItemChangedMessages, aId, EMPXItemModified, |
|
262 EMPXAlbum, KDBPluginUid, ETrue, 0 ); |
|
263 } |
|
264 } |
|
265 |
|
266 // decrement the number of songs for the category |
|
267 query = PreProcessStringLC(KQueryCategoryDecrementSongCount); |
|
268 iDbManager.ExecuteQueryL(aDriveId, *query, aId); |
|
269 CleanupStack::PopAndDestroy(query); |
|
270 } |
|
271 } |
|
272 |
|
273 // ---------------------------------------------------------------------------- |
|
274 // CMPXDbAlbum::GetAllCategoryItemsL |
|
275 // ---------------------------------------------------------------------------- |
|
276 // |
|
277 void CMPXDbAlbum::GetAllCategoryItemsL( |
|
278 const TArray<TMPXAttribute>& aAttrs, |
|
279 CMPXMediaArray& aMediaArray) |
|
280 { |
|
281 MPX_FUNC("CMPXDbAlbum::GetAllCategoryItemsL"); |
|
282 |
|
283 HBufC* query = PreProcessStringLC(KQueryAlbumAll); |
|
284 RSqlStatement recordset(iDbManager.ExecuteSelectQueryL(*query)); |
|
285 CleanupStack::PopAndDestroy(query); |
|
286 |
|
287 CleanupClosePushL(recordset); |
|
288 ProcessRecordsetL(aAttrs, recordset, aMediaArray); |
|
289 CleanupStack::PopAndDestroy(&recordset); |
|
290 } |
|
291 |
|
292 // ---------------------------------------------------------------------------- |
|
293 // CMPXDbAlbum::UpdateItemL |
|
294 // ---------------------------------------------------------------------------- |
|
295 // |
|
296 void CMPXDbAlbum::UpdateItemL( |
|
297 TUint32 aId, |
|
298 const CMPXMedia& aMedia, |
|
299 TInt aDriveId, |
|
300 CMPXMessageArray* aItemChangedMessages) |
|
301 { |
|
302 MPX_FUNC("CMPXDbAlbum::UpdateItemL"); |
|
303 |
|
304 CDesCArrayFlat* fields = new (ELeave) CDesCArrayFlat(EAlbumFieldCount); |
|
305 CleanupStack::PushL(fields); |
|
306 CDesCArrayFlat* values = new (ELeave) CDesCArrayFlat(EAlbumFieldCount); |
|
307 CleanupStack::PushL(values); |
|
308 |
|
309 // process the media parameter and construct the fields and values array |
|
310 GenerateAlbumFieldsValuesL(aMedia, *fields, *values); |
|
311 |
|
312 // construct the SET string |
|
313 HBufC* setStr = MPXDbCommonUtil::StringFromArraysLC(*fields, *values, KMCEqualSign, KMCCommaSign); |
|
314 |
|
315 if (setStr->Length()) |
|
316 { |
|
317 // execute the query |
|
318 iDbManager.ExecuteQueryL(aDriveId, KQueryAlbumUpdate, setStr, aId); |
|
319 MPXDbCommonUtil::AddItemAlbumChangedMessageL(*aItemChangedMessages, aId, EMPXItemModified, |
|
320 EMPXAlbum, KDBPluginUid, ETrue, 0 ); |
|
321 } |
|
322 |
|
323 CleanupStack::PopAndDestroy(setStr); |
|
324 CleanupStack::PopAndDestroy(values); |
|
325 CleanupStack::PopAndDestroy(fields); |
|
326 } |
|
327 |
|
328 // ---------------------------------------------------------------------------- |
|
329 // CMPXDbAlbum::GetAlbumsCountForArtistL |
|
330 // ---------------------------------------------------------------------------- |
|
331 // |
|
332 TInt CMPXDbAlbum::GetAlbumsCountForArtistL(TUint32 aArtistId) |
|
333 { |
|
334 RSqlStatement recordset(iDbManager.ExecuteSelectQueryL(KQueryCategorySubcategoryItems, aArtistId)); |
|
335 |
|
336 TInt prevId(0); |
|
337 TInt count(0); |
|
338 TInt err(KErrNone); |
|
339 |
|
340 while ((err = recordset.Next()) == KSqlAtRow) |
|
341 { |
|
342 TUint32 rowId(recordset.ColumnInt64(EAlbumUniqueId)); |
|
343 if (prevId == rowId) |
|
344 { |
|
345 continue; |
|
346 } |
|
347 |
|
348 count++; |
|
349 prevId = rowId; |
|
350 } |
|
351 |
|
352 if (err != KSqlAtEnd) |
|
353 { |
|
354 User::Leave(err); |
|
355 } |
|
356 |
|
357 return count; |
|
358 |
|
359 } |
|
360 |
|
361 // ---------------------------------------------------------------------------- |
|
362 // CMPXDbAlbum::GetSongsCountInAlbumMatchingArtistL |
|
363 // ---------------------------------------------------------------------------- |
|
364 // |
|
365 TInt CMPXDbAlbum::GetSongsCountInAlbumMatchingArtistL(TUint32 aArtistId, TUint32 aAlbumId) |
|
366 { |
|
367 MPX_FUNC("CMPXDbAlbum::GetSongsCountInAlbumMatchingArtistL"); |
|
368 |
|
369 return ExecuteSumQueryL(KQuerySongsInArtistAlbum, aArtistId, aAlbumId); |
|
370 } |
|
371 |
|
372 // ---------------------------------------------------------------------------- |
|
373 // CMPXDbAlbum::UpdateMediaL |
|
374 // ---------------------------------------------------------------------------- |
|
375 // |
|
376 void CMPXDbAlbum::UpdateMediaL( |
|
377 RSqlStatement& aRecord, |
|
378 const TArray<TMPXAttribute>& aAttrs, |
|
379 CMPXMedia& aMedia) |
|
380 { |
|
381 MPX_FUNC("CMPXDbAlbum::UpdateMediaL"); |
|
382 |
|
383 TInt count(aAttrs.Count()); |
|
384 for (TInt i = 0; i < count; ++i) |
|
385 { |
|
386 TInt contentId(aAttrs[i].ContentId()); |
|
387 TUint attributeId(aAttrs[i].AttributeId()); |
|
388 |
|
389 if (contentId == KMPXMediaIdGeneral) |
|
390 { |
|
391 if (attributeId & EMPXMediaGeneralId) |
|
392 { |
|
393 MPX_DEBUG1(" EMPXMediaGeneralId"); |
|
394 |
|
395 aMedia.SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, |
|
396 aRecord.ColumnInt64(EAlbumUniqueId)); |
|
397 } |
|
398 if (attributeId & EMPXMediaGeneralTitle) |
|
399 { |
|
400 MPX_DEBUG1(" EMPXMediaGeneralTitle"); |
|
401 |
|
402 TPtrC album( MPXDbCommonUtil::GetColumnTextL(aRecord, EAlbumName) ); |
|
403 aMedia.SetTextValueL(KMPXMediaGeneralTitle, |
|
404 MPXDbCommonUtil::GetColumnTextL(aRecord, EAlbumName)); |
|
405 MPX_DEBUG2(" Album[%S]", &album ); |
|
406 } |
|
407 if (attributeId & EMPXMediaGeneralCount) |
|
408 { |
|
409 MPX_DEBUG1(" EMPXMediaGeneralCount"); |
|
410 |
|
411 TInt songCount = GetSongsCountL(KDbManagerAllDrives, |
|
412 aRecord.ColumnInt64(EAlbumUniqueId)); |
|
413 aMedia.SetTObjectValueL<TInt>(KMPXMediaGeneralCount, songCount ); |
|
414 MPX_DEBUG2(" SongCount[%d]", songCount ); |
|
415 } |
|
416 } // end if contentId == KMPXMediaIdGeneral |
|
417 else if ( contentId == KMPXMediaIdMusic ) |
|
418 { |
|
419 if (attributeId & EMPXMediaMusicArtist) |
|
420 { |
|
421 MPX_DEBUG1(" EMPXMediaMusicArtist"); |
|
422 |
|
423 TPtrC artistName(KNullDesC); |
|
424 |
|
425 // if album is unknown, ignore arist name |
|
426 if (MPXDbCommonUtil::GetColumnTextL(aRecord, EAlbumName) != KNullDesC) |
|
427 { |
|
428 artistName.Set(MPXDbCommonUtil::GetColumnTextL(aRecord, EAlbumArtistName)); |
|
429 } |
|
430 |
|
431 aMedia.SetTextValueL(KMPXMediaMusicArtist, artistName); |
|
432 MPX_DEBUG2(" Artist[%S]", &artistName); |
|
433 } |
|
434 if (attributeId & EMPXMediaMusicAlbumArtFileName) |
|
435 { |
|
436 MPX_DEBUG1(" EMPXMediaMusicAlbumArtFileName"); |
|
437 |
|
438 TPtrC art(KNullDesC); |
|
439 |
|
440 // if album is unknown, ignore album art name |
|
441 if (MPXDbCommonUtil::GetColumnTextL(aRecord, EAlbumName) != KNullDesC) |
|
442 { |
|
443 art.Set(MPXDbCommonUtil::GetColumnTextL(aRecord, EAlbumArt)); |
|
444 } |
|
445 |
|
446 aMedia.SetTextValueL(KMPXMediaMusicAlbumArtFileName, art); |
|
447 MPX_DEBUG2(" Art[%S]", &art); |
|
448 } |
|
449 } |
|
450 } // end for |
|
451 |
|
452 aMedia.SetTObjectValueL<TMPXGeneralType>(KMPXMediaGeneralType, EMPXItem); |
|
453 aMedia.SetTObjectValueL<TMPXGeneralCategory>(KMPXMediaGeneralCategory, iCategory); |
|
454 } |
|
455 |
|
456 // ---------------------------------------------------------------------------- |
|
457 // CMPXDbAlbum::GenerateAlbumFieldsValuesL |
|
458 // ---------------------------------------------------------------------------- |
|
459 // |
|
460 void CMPXDbAlbum::GenerateAlbumFieldsValuesL(const CMPXMedia& aMedia, CDesCArray& aFields, CDesCArray& aValues) |
|
461 { |
|
462 if (aMedia.IsSupported(KMPXMediaMusicAlbumArtFileName)) |
|
463 { |
|
464 const TDesC& albumArtFilename = aMedia.ValueText(KMPXMediaMusicAlbumArtFileName).Left(KMCMaxTextLen); |
|
465 MPXDbCommonUtil::AppendValueL(aFields, aValues, KMCMusicArt, albumArtFilename); |
|
466 } |
|
467 |
|
468 if (aMedia.IsSupported(KMPXMediaMusicArtist)) |
|
469 { |
|
470 const TDesC& artistName = aMedia.ValueText(KMPXMediaMusicArtist).Left(KMCMaxTextLen); |
|
471 TUint32 artistId = MPXDbCommonUtil::GenerateUniqueIdL(iDbManager.Fs(), EMPXArtist, |
|
472 artistName, ETrue); |
|
473 MPXDbCommonUtil::AppendValueL(aFields, aValues, KMCMusicArtist, artistId); |
|
474 } |
|
475 } |
|
476 |
|
477 // ---------------------------------------------------------------------------- |
|
478 // CMPXDbAlbum::IsUnknownArtistL |
|
479 // ---------------------------------------------------------------------------- |
|
480 // |
|
481 TBool CMPXDbAlbum::IsUnknownArtistL(TUint32 aId) |
|
482 { |
|
483 return iObserver.HandleIsUnknownArtistL(aId); |
|
484 } |
|
485 |
|
486 // ---------------------------------------------------------------------------- |
|
487 // CMPXDbAlbum::ArtistForAlbumL |
|
488 // ---------------------------------------------------------------------------- |
|
489 // |
|
490 TUint32 CMPXDbAlbum::ArtistForAlbumL(const TUint32 aId) |
|
491 { |
|
492 return iObserver.HandleArtistForAlbumL(aId); |
|
493 } |
|
494 |
|
495 // ---------------------------------------------------------------------------- |
|
496 // CMPXDbAlbum::CreateTableL |
|
497 // ---------------------------------------------------------------------------- |
|
498 // |
|
499 void CMPXDbAlbum::CreateTableL( |
|
500 RSqlDatabase& aDatabase, |
|
501 TBool /* aCorruptTable */) |
|
502 { |
|
503 MPX_FUNC("CMPXDbCategory::CreateTableL"); |
|
504 |
|
505 // create the table |
|
506 HBufC* query = PreProcessStringLC(KAlbumCreateTable); |
|
507 User::LeaveIfError(aDatabase.Exec(*query)); |
|
508 CleanupStack::PopAndDestroy(query); |
|
509 |
|
510 // do not create an index on the Name field |
|
511 // as it only slows down the insert/update queries overall |
|
512 } |
|
513 |
|
514 // ---------------------------------------------------------------------------- |
|
515 // CMPXDbAlbum::CheckTableL |
|
516 // ---------------------------------------------------------------------------- |
|
517 // |
|
518 TBool CMPXDbAlbum::CheckTableL( |
|
519 RSqlDatabase& aDatabase) |
|
520 { |
|
521 MPX_FUNC("CMPXDbCategory::CheckTableL"); |
|
522 |
|
523 HBufC* query = PreProcessStringLC(KAlbumCheckTable); |
|
524 TBool check(DoCheckTable(aDatabase, *query)); |
|
525 CleanupStack::PopAndDestroy(query); |
|
526 |
|
527 return check; |
|
528 } |
|
529 |
|
530 // End of File |