mpengine/src/mpmpxcollectionframeworkwrapper_p.cpp
changeset 51 560ce2306a17
parent 47 4cc1412daed0
child 55 f3930dda3342
equal deleted inserted replaced
47:4cc1412daed0 51:560ce2306a17
    57 #include "mpcommondefs.h"
    57 #include "mpcommondefs.h"
    58 #include "mptrace.h"
    58 #include "mptrace.h"
    59 #include "mpsettingsmanager.h"
    59 #include "mpsettingsmanager.h"
    60 #include "mpsongdata.h"
    60 #include "mpsongdata.h"
    61 
    61 
    62 const TInt KIncrementalDelayNone = 0;
    62 const TInt KIncrementalDelay = 0;
    63 const TInt KIncrementalDelayHalfSecond = 500000;
    63 const TInt KIncrementalFetchBlockSize = 1000;
    64 const TInt KIncrementalFetchBlockSize = 400;
       
    65 
    64 
    66 const TInt KMPXChunkSize = 100;  // number of songs added in each chunk, IncAddL
    65 const TInt KMPXChunkSize = 100;  // number of songs added in each chunk, IncAddL
    67 _LIT( KPlaylistPath, "C:\\Data\\Playlists\\" ); // Todo
    66 _LIT( KPlaylistPath, "C:\\Data\\Playlists\\" ); // Todo
    68 
    67 
    69 /*!
    68 /*!
   450     if ( aError == KErrNone ) {
   449     if ( aError == KErrNone ) {
   451         if ( iFirstIncrementalOpen ) {
   450         if ( iFirstIncrementalOpen ) {
   452             iFirstIncrementalOpen = EFalse;
   451             iFirstIncrementalOpen = EFalse;
   453             if( iShuffleAll ) {
   452             if( iShuffleAll ) {
   454                 iShuffleAll = EFalse;
   453                 iShuffleAll = EFalse;
   455                 TX_ENTRY_ARGS( "Path is ready" );
   454                 TX_LOG_ARGS( "Path is ready" );
   456                 DoPlayAllSongsPlaylistL();
   455                 DoPlayAllSongsPlaylistL();
   457                 
       
   458             }
   456             }
   459             iCollectionData->setMpxMedia( aEntries, iReopen );
   457             iCollectionData->setMpxMedia( aEntries, iReopen );
   460             iReopen = EFalse;
   458             iReopen = EFalse;
       
   459         }
       
   460         else {
       
   461             iCollectionData->incrementalOpenUpdate();
   461         }
   462         }
   462     }
   463     }
   463     else {
   464     else {
   464         TX_LOG_ARGS( "Error: " << aError << "; should never get here." );
   465         TX_LOG_ARGS( "Error: " << aError << "; should never get here." );
   465     }
   466     }
   747     // Start the read
   748     // Start the read
   748     iFirstIncrementalOpen = ETrue;
   749     iFirstIncrementalOpen = ETrue;
   749     RArray<TMPXAttribute> attrs;
   750     RArray<TMPXAttribute> attrs;
   750     CleanupClosePushL( attrs );
   751     CleanupClosePushL( attrs );
   751     TArray<TMPXAttribute> ary = attrs.Array();
   752     TArray<TMPXAttribute> ary = attrs.Array();
   752     iIncrementalOpenUtil->SetDelay( KIncrementalDelayNone );
   753     iIncrementalOpenUtil->SetDelay( KIncrementalDelay );
   753     iIncrementalOpenUtil->StartL( ary, KIncrementalFetchBlockSize,
   754     iIncrementalOpenUtil->StartL( ary, KIncrementalFetchBlockSize,
   754                                   KErrNotFound, CMPXCollectionOpenUtility::EFetchDown );
   755             0, CMPXCollectionOpenUtility::EFetchDown );
   755     iIncrementalOpenUtil->SetDelay( KIncrementalDelayHalfSecond );
       
   756     CleanupStack::PopAndDestroy( &attrs );
   756     CleanupStack::PopAndDestroy( &attrs );
   757     TX_EXIT
   757     TX_EXIT
   758 }
   758 }
   759 
   759 
   760 /*!
   760 /*!