mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplugin.cpp
branchRCL_3
changeset 21 cb96c29156b2
parent 15 a1247965635c
equal deleted inserted replaced
19:a12246c97fcc 21:cb96c29156b2
   410             break;
   410             break;
   411             }
   411             }
   412         case EMcRefreshEnded:
   412         case EMcRefreshEnded:
   413             {
   413             {
   414             MPX_DEBUG1("CMPXDbPlugin::CommandL - EMcRefreshEnded");
   414             MPX_DEBUG1("CMPXDbPlugin::CommandL - EMcRefreshEnded");
   415             iDbHandler->CheckDiskSpaceOnDrivesL();
       
   416             // ask the handler to finalize the transaction
   415             // ask the handler to finalize the transaction
   417             iDbHandler->RefreshEndL();
   416             iDbHandler->RefreshEndL();
   418             iRefreshing=EFalse;
   417             iRefreshing=EFalse;
   419             break;
   418             break;
   420             }
   419             }
   442             iDbHandler->CheckDiskSpaceOnDrivesL();
   441             iDbHandler->CheckDiskSpaceOnDrivesL();
   443             iMtpInUse = ETrue;
   442             iMtpInUse = ETrue;
   444             iDbHandler->MtpStartL();
   443             iDbHandler->MtpStartL();
   445             break;
   444             break;
   446         case EMcCmdMtpEnd:
   445         case EMcCmdMtpEnd:
   447             iDbHandler->CheckDiskSpaceOnDrivesL();
       
   448             iMtpInUse = EFalse;
   446             iMtpInUse = EFalse;
   449             iDbHandler->MtpEndL();
   447             iDbHandler->MtpEndL();
   450             break;
   448             break;
   451          default:
   449          default:
   452             {
   450             {
  4057 
  4055 
  4058     TInt offset = aCmd.ValueTObjectL<TInt>( KMPXCollectionCommandIdIncOpenLOffset );
  4056     TInt offset = aCmd.ValueTObjectL<TInt>( KMPXCollectionCommandIdIncOpenLOffset );
  4059     TInt numItems = aCmd.ValueTObjectL<TInt>( KMPXCollectionCommandIdIncOpenLNumItems );
  4057     TInt numItems = aCmd.ValueTObjectL<TInt>( KMPXCollectionCommandIdIncOpenLNumItems );
  4060 
  4058 
  4061     TReadDirection direction(EReadUnknown);
  4059     TReadDirection direction(EReadUnknown);
       
  4060 /*  Ascending and Decending reads are currently not used. We optimized for offset reads.
  4062     if( aCmd.IsSupported(KMPXCollectionCommandIdIncOpenLAscDsc) &&
  4061     if( aCmd.IsSupported(KMPXCollectionCommandIdIncOpenLAscDsc) &&
  4063         aCmd.IsSupported(KMPXCollectionCommandIdIncOpenLKeyItem) )
  4062         aCmd.IsSupported(KMPXCollectionCommandIdIncOpenLKeyItem) )
  4064         {
  4063         {
  4065         direction = aCmd.ValueTObjectL<TReadDirection>(KMPXCollectionCommandIdIncOpenLAscDsc);
  4064         direction = aCmd.ValueTObjectL<TReadDirection>(KMPXCollectionCommandIdIncOpenLAscDsc);
  4066         }
  4065         }
  4067 
  4066 */
  4068     CMPXCollectionPath* path =  aCmd.ValueCObjectL<CMPXCollectionPath>(KMPXCollectionCommandIdIncOpenLPath);
  4067     CMPXCollectionPath* path =  aCmd.ValueCObjectL<CMPXCollectionPath>(KMPXCollectionCommandIdIncOpenLPath);
  4069     CleanupStack::PushL( path );
  4068     CleanupStack::PushL( path );
  4070     MPX_DEBUG_PATH( *path );
  4069     MPX_DEBUG_PATH( *path );
  4071 
  4070 
  4072     // Switch on level and item selected
  4071     // Switch on level and item selected