harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp
changeset 23 33ae025ac1e8
parent 3 b73a2e62868f
child 25 8e4539ab1889
child 41 2290317b9ec5
equal deleted inserted replaced
21:50bf9db68373 23:33ae025ac1e8
    29 #include "harvestereventmanager.h"
    29 #include "harvestereventmanager.h"
    30 #include <placeholderdata.h>
    30 #include <placeholderdata.h>
    31 #include <harvesterdata.h>
    31 #include <harvesterdata.h>
    32 #include "harvesterpluginfactory.h"
    32 #include "harvesterpluginfactory.h"
    33 
    33 
       
    34 // for CleanupResetAndDestroyPushL
       
    35 #include <mmf/common/mmfcontrollerpluginresolver.h>
       
    36 
    34 _LIT( KBackslash, "\\");
    37 _LIT( KBackslash, "\\");
    35 
    38 
    36 const TInt KEntryBufferSize = 100;
    39 const TInt KEntryBufferSize = 100;
    37 
    40 
    38 CMmcFileList::CMmcFileList() : iHem( NULL ), iMediaIdUtil( NULL )
    41 CMmcFileList::CMmcFileList() : iHem( NULL ), iMediaIdUtil( NULL )
    85 
    88 
    86 void CMmcFileList::BuildFileListL( RFs& aFs, const TDesC& aDrivePath, 
    89 void CMmcFileList::BuildFileListL( RFs& aFs, const TDesC& aDrivePath, 
    87 		RPointerArray<CPlaceholderData>& aEntryArray )
    90 		RPointerArray<CPlaceholderData>& aEntryArray )
    88 	{
    91 	{
    89 	WRITELOG( "CMmcFileList::BuildFileListL - start" );
    92 	WRITELOG( "CMmcFileList::BuildFileListL - start" );
       
    93 	
       
    94 	CleanupResetAndDestroyPushL( aEntryArray );
       
    95 	
    90 	CDesCArrayFlat* path = new(ELeave) CDesCArrayFlat( 10 );
    96 	CDesCArrayFlat* path = new(ELeave) CDesCArrayFlat( 10 );
    91 	CleanupStack::PushL( path );
    97 	CleanupStack::PushL( path );
    92 	TFileName firstPath;
    98 	TFileName firstPath;
    93 	firstPath.Copy( aDrivePath );
    99 	firstPath.Copy( aDrivePath );
    94 	firstPath.Append( KBackslash );
   100 	firstPath.Append( KBackslash );
   178 		directory = NULL;
   184 		directory = NULL;
   179 		}
   185 		}
   180 	
   186 	
   181 	CleanupStack::PopAndDestroy( path );
   187 	CleanupStack::PopAndDestroy( path );
   182 	
   188 	
       
   189 	CleanupStack::Pop( &aEntryArray );
       
   190 	
   183 	WRITELOG( "CMmcFileList::BuildFileListL - end" );
   191 	WRITELOG( "CMmcFileList::BuildFileListL - end" );
   184 	}
   192 	}
   185 
   193 
   186 void CMmcFileList::HandleFileEntryL( CMdEHarvesterSession& aMdeSession,
   194 void CMmcFileList::HandleFileEntryL( CMdEHarvesterSession& aMdeSession,
   187 		RPointerArray<CPlaceholderData>& aEntryArray, 
   195 		RPointerArray<CPlaceholderData>& aEntryArray,