diff -r 560ce2306a17 -r f3930dda3342 mpengine/src/mpmpxisolatedcollectionhelper.cpp --- a/mpengine/src/mpmpxisolatedcollectionhelper.cpp Tue Aug 24 03:36:14 2010 -0500 +++ b/mpengine/src/mpmpxisolatedcollectionhelper.cpp Fri Sep 03 19:58:01 2010 -0500 @@ -21,12 +21,15 @@ #include #include "mpmpxisolatedcollectionhelper.h" -#include "mptrace.h" +#include "mpxlog.h" + + const TInt KIncrementalDelay = 0; const TInt KIncrementalFetchBlockSize = 1000; + /*! \class CMpMpxIsolatedCollectionHelper \brief Helper class to open an isolated collection. @@ -38,45 +41,44 @@ \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 @@ -91,8 +93,7 @@ iIncrementalOpenUtil->StartL( aPath, ary, KIncrementalFetchBlockSize, aIndex, CMPXCollectionOpenUtility::EFetchDown ); CleanupStack::PopAndDestroy( &attrs ); - TX_EXIT -} + } /*! \internal @@ -102,84 +103,79 @@ : 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 ) -{ - Q_UNUSED( aIndex ); - Q_UNUSED( aComplete ); - TX_ENTRY_ARGS( "aError=" << aError << "aComplete=" << aComplete ); - if ( iFirstIncrementalOpen ) { + { + 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 ) -{ - Q_UNUSED( aPlaylist ); - Q_UNUSED( aError ); -} +void CMpMpxIsolatedCollectionHelper::HandleOpenL( + const CMPXCollectionPlaylist& /*aPlaylist*/, + TInt /*aError*/ ) + { + } /*! \internal reimp */ -void CMpMpxIsolatedCollectionHelper::HandleCollectionMessage( - CMPXMessage* aMsg, - TInt aErr ) -{ - Q_UNUSED( aMsg ); - Q_UNUSED( aErr ); -} +void CMpMpxIsolatedCollectionHelper::HandleCollectionMessage( + CMPXMessage* /*aMsg*/, + TInt /*aErr*/ ) + { + } /*! \internal reimp */ -void CMpMpxIsolatedCollectionHelper::HandleCollectionMediaL( - const CMPXMedia& aMedia, - TInt aError ) -{ - Q_UNUSED( aMedia ); - Q_UNUSED( aError ); -} - +void CMpMpxIsolatedCollectionHelper::HandleCollectionMediaL( + const CMPXMedia& /*aMedia*/, + TInt /*aError*/ ) + { + } + +//EOF