diff -r 4cc1412daed0 -r 560ce2306a17 mpengine/src/mpmpxisolatedcollectionhelper.cpp --- a/mpengine/src/mpmpxisolatedcollectionhelper.cpp Fri Aug 06 16:51:36 2010 -0500 +++ b/mpengine/src/mpmpxisolatedcollectionhelper.cpp Tue Aug 24 03:36:14 2010 -0500 @@ -21,14 +21,10 @@ #include #include "mpmpxisolatedcollectionhelper.h" -#include "mpxlog.h" - - +#include "mptrace.h" -const TInt KIncrementalDelayNone = 0; -const TInt KIncrementalDelayHalfSecond = 1000000; -const TInt KIncrementalFetchBlockSize = 20; - +const TInt KIncrementalDelay = 0; +const TInt KIncrementalFetchBlockSize = 1000; /*! @@ -42,44 +38,45 @@ \internal Two-phased constructor. */ -CMpMpxIsolatedCollectionHelper* CMpMpxIsolatedCollectionHelper::NewL( +CMpMpxIsolatedCollectionHelper* CMpMpxIsolatedCollectionHelper::NewL( MMpMpxIsolatedCollectionHelperObserver* aObserver ) - { +{ CMpMpxIsolatedCollectionHelper* self = NewLC( aObserver ); CleanupStack::Pop( self ); return self; - } +} /*! \internal Two-phased constructor. */ -CMpMpxIsolatedCollectionHelper* CMpMpxIsolatedCollectionHelper::NewLC( +CMpMpxIsolatedCollectionHelper* CMpMpxIsolatedCollectionHelper::NewLC( MMpMpxIsolatedCollectionHelperObserver* aObserver ) - { +{ CMpMpxIsolatedCollectionHelper* self = new ( ELeave ) CMpMpxIsolatedCollectionHelper( aObserver ); CleanupStack::PushL( self ); self->ConstructL(); return self; - } +} /*! \internal Destructor */ CMpMpxIsolatedCollectionHelper::~CMpMpxIsolatedCollectionHelper() - { +{ delete iIncrementalOpenUtil; - } - +} + /*! \internal Opens an isolated collection with the /a path. */ void CMpMpxIsolatedCollectionHelper::OpenCollectionL( CMPXCollectionPath& aPath, TInt aIndex, MpOpenMode aMode ) - { +{ + TX_ENTRY //Using incremental open to open the collection. iOpenMode = aMode; // Cancel any reads @@ -90,12 +87,12 @@ RArray attrs; CleanupClosePushL( attrs ); TArray ary = attrs.Array(); - iIncrementalOpenUtil->SetDelay( KIncrementalDelayNone ); + iIncrementalOpenUtil->SetDelay( KIncrementalDelay ); iIncrementalOpenUtil->StartL( aPath, ary, KIncrementalFetchBlockSize, - aIndex, CMPXCollectionOpenUtility::EFetchNormal ); - iIncrementalOpenUtil->SetDelay( KIncrementalDelayHalfSecond ); + aIndex, CMPXCollectionOpenUtility::EFetchDown ); CleanupStack::PopAndDestroy( &attrs ); - } + TX_EXIT +} /*! \internal @@ -105,79 +102,84 @@ : iObserver( aObserver ), iIncrementalOpenUtil( 0 ), iFirstIncrementalOpen( EFalse ) - { - } +{ +} /*! \internal Leaving constructor */ void CMpMpxIsolatedCollectionHelper::ConstructL() - { +{ iIncrementalOpenUtil = CMPXCollectionOpenUtility::NewL( this, KMcModeIsolated ); - - } +} /*! \internal reimp */ -void CMpMpxIsolatedCollectionHelper::HandleOpenL( +void CMpMpxIsolatedCollectionHelper::HandleOpenL( const CMPXMedia& aEntries, - TInt /*aIndex*/, - TBool /*aComplete*/, + TInt aIndex, + TBool aComplete, TInt aError ) - { - if ( iFirstIncrementalOpen ) - { +{ + Q_UNUSED( aIndex ); + Q_UNUSED( aComplete ); + TX_ENTRY_ARGS( "aError=" << aError << "aComplete=" << aComplete ); + if ( iFirstIncrementalOpen ) { CMPXCollectionPath* cPath = NULL; iFirstIncrementalOpen = EFalse; switch( iOpenMode ) { - case RestorePathMode: - cPath = iIncrementalOpenUtil->PathL(); - CleanupStack::PushL( cPath ); - iObserver->HandleIsolatedOpenRestorePathL( *cPath, aError ); - CleanupStack::PopAndDestroy( cPath ); - - break; - case DefaultMode: - default: - iObserver->HandleIsolatedOpenL( aEntries, aError ); - break; - } - - } + case RestorePathMode: + cPath = iIncrementalOpenUtil->PathL(); + CleanupStack::PushL( cPath ); + iObserver->HandleIsolatedOpenRestorePathL( *cPath, aError ); + CleanupStack::PopAndDestroy( cPath ); + break; + case DefaultMode: + default: + iObserver->HandleIsolatedOpenL( aEntries, aError ); + break; + } } + TX_EXIT +} /*! \internal reimp */ -void CMpMpxIsolatedCollectionHelper::HandleOpenL( - const CMPXCollectionPlaylist& /*aPlaylist*/, - TInt /*aError*/ ) - { - } +void CMpMpxIsolatedCollectionHelper::HandleOpenL( + const CMPXCollectionPlaylist& aPlaylist, + TInt aError ) +{ + Q_UNUSED( aPlaylist ); + Q_UNUSED( aError ); +} /*! \internal reimp */ -void CMpMpxIsolatedCollectionHelper::HandleCollectionMessage( - CMPXMessage* /*aMsg*/, - TInt /*aErr*/ ) - { - } +void CMpMpxIsolatedCollectionHelper::HandleCollectionMessage( + CMPXMessage* aMsg, + TInt aErr ) +{ + Q_UNUSED( aMsg ); + Q_UNUSED( aErr ); +} /*! \internal reimp */ -void CMpMpxIsolatedCollectionHelper::HandleCollectionMediaL( - const CMPXMedia& /*aMedia*/, - TInt /*aError*/ ) - { - } - -//EOF +void CMpMpxIsolatedCollectionHelper::HandleCollectionMediaL( + const CMPXMedia& aMedia, + TInt aError ) +{ + Q_UNUSED( aMedia ); + Q_UNUSED( aError ); +} +