mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplugin.cpp
equal
deleted
inserted
replaced
336 // Remove EVERYthing from the collection |
336 // Remove EVERYthing from the collection |
337 iDbHandler->RemoveEntireCollectionL(); |
337 iDbHandler->RemoveEntireCollectionL(); |
338 break; |
338 break; |
339 } |
339 } |
340 case EMcCmdClose: |
340 case EMcCmdClose: |
|
341 // called before destructing this plug-in: no actions required |
|
342 break; |
341 case EMcCloseCollection: |
343 case EMcCloseCollection: |
342 { |
344 { |
343 MPX_DEBUG1("CMPXDbPlugin::CommandL - EMcCloseCollection"); |
345 MPX_DEBUG2("CMPXDbPlugin::CommandL - EMcCloseCollection %d", aArg); |
344 // Close the specified database |
346 // Close the specified database |
345 TRAP_IGNORE(iDbHandler->PreCloseCollectionL()); |
347 TRAP_IGNORE(iDbHandler->PreCloseCollectionL()); |
346 #ifdef RD_MULTIPLE_DRIVE |
348 #ifdef RD_MULTIPLE_DRIVE |
347 MPX_DEBUG1("Multiple drives closing databases"); |
349 MPX_DEBUG1("Multiple drives closing databases"); |
348 if ( aArg <0) |
350 if ( aArg <0) |
360 } |
362 } |
361 } |
363 } |
362 } |
364 } |
363 else |
365 else |
364 { |
366 { |
365 iDbHandler->CloseDatabaseL(aArg); |
367 TRAP_IGNORE( iDbHandler->CloseDatabaseL(aArg) ); //Closing can fail if physical media has been removed or forced disk dismount has occurred. |
366 } |
368 } |
367 #else |
369 #else |
368 iDbHandler->CloseDatabaseL(aArg); |
370 iDbHandler->CloseDatabaseL(aArg); |
369 #endif // RD_MULTIPLE_DRIVE |
371 #endif // RD_MULTIPLE_DRIVE |
370 iDbHandler->CollectionClosed(); |
|
371 break; |
372 break; |
372 } |
373 } |
373 case EMcReOpenCollection: |
374 case EMcReOpenCollection: |
374 { |
375 { |
375 MPX_DEBUG1("CMPXDbPlugin::CommandL - EMcReOpenCollection"); |
376 MPX_DEBUG1("CMPXDbPlugin::CommandL - EMcReOpenCollection"); |
395 } |
396 } |
396 } |
397 } |
397 #else |
398 #else |
398 iDbHandler->OpenDatabaseL(aArg); |
399 iDbHandler->OpenDatabaseL(aArg); |
399 #endif // RD_MULTIPLE_DRIVE |
400 #endif // RD_MULTIPLE_DRIVE |
400 TRAP_IGNORE(iDbHandler->CollectionOpenedL()); |
|
401 break; |
401 break; |
402 } |
402 } |
403 case EMcRefreshStarted: |
403 case EMcRefreshStarted: |
404 { |
404 { |
405 MPX_DEBUG1("CMPXDbPlugin::CommandL - EMcRefreshStarted"); |
405 MPX_DEBUG1("CMPXDbPlugin::CommandL - EMcRefreshStarted"); |
786 |
786 |
787 TInt err( KErrNone ); |
787 TInt err( KErrNone ); |
788 CMPXMediaArray* array = CMPXMediaArray::NewL(); |
788 CMPXMediaArray* array = CMPXMediaArray::NewL(); |
789 CleanupStack::PushL(array); |
789 CleanupStack::PushL(array); |
790 |
790 |
791 TInt count(0); |
|
792 TInt levels(aPath.Levels()); |
791 TInt levels(aPath.Levels()); |
793 TBool isASong(EFalse); |
792 TBool isASong(EFalse); |
794 |
793 |
795 |
794 |
796 if ( 1 == levels ) |
795 if ( 1 == levels ) |