harvester/common/src/harvesterpluginfactory.cpp
branchRCL_3
changeset 22 ab88d4a85041
parent 15 3cebc1a84278
child 36 aa5a574040a4
equal deleted inserted replaced
19:82c0024438c8 22:ab88d4a85041
    26 #include "harvesterpluginfactory.h"
    26 #include "harvesterpluginfactory.h"
    27 #include "harvesterplugininfo.h"
    27 #include "harvesterplugininfo.h"
    28 #include "mdsutils.h"
    28 #include "mdsutils.h"
    29 #include "harvesterlog.h"
    29 #include "harvesterlog.h"
    30 
    30 
       
    31 // for CleanupResetAndDestroyPushL
       
    32 #include <mmf/common/mmfcontrollerpluginresolver.h>
       
    33 
    31 const TInt KCacheItemCountForEventCaching = 1;
    34 const TInt KCacheItemCountForEventCaching = 1;
    32 
    35 
    33 // ---------------------------------------------------------------------------
    36 // ---------------------------------------------------------------------------
    34 // Constructor
    37 // Constructor
    35 // ---------------------------------------------------------------------------
    38 // ---------------------------------------------------------------------------
    36 //
    39 //
    37 CHarvesterPluginFactory::CHarvesterPluginFactory() :
    40 CHarvesterPluginFactory::CHarvesterPluginFactory() :
    38     iBlacklist( NULL ),
    41     iBlacklist( NULL ),
    39     iHarvesting( NULL ),
    42     iHarvesting( EFalse ),
    40     iHarvesterEventManager( NULL )
    43     iHarvesterEventManager( NULL )
    41 	{
    44 	{
    42 	WRITELOG( "CHarvesterPluginFactory::CHarvesterPluginFactory()" );
    45 	WRITELOG( "CHarvesterPluginFactory::CHarvesterPluginFactory()" );
    43 	}
    46 	}
    44 
    47 
   336     }
   339     }
   337 
   340 
   338 void CHarvesterPluginFactory::GetSupportedPluginsL(
   341 void CHarvesterPluginFactory::GetSupportedPluginsL(
   339 		RPointerArray<CHarvesterPluginInfo>& aSupportedPlugins, const TDesC& aExt )
   342 		RPointerArray<CHarvesterPluginInfo>& aSupportedPlugins, const TDesC& aExt )
   340 	{
   343 	{
       
   344     CleanupResetAndDestroyPushL( aSupportedPlugins );
       
   345     
   341 	const TInt pluginInfoCount = iHarvesterPluginInfoArray.Count();
   346 	const TInt pluginInfoCount = iHarvesterPluginInfoArray.Count();
   342 	TInt extCount = 0;
   347 	TInt extCount = 0;
   343 	for ( TInt i = pluginInfoCount; --i >= 0; )
   348 	for ( TInt i = pluginInfoCount; --i >= 0; )
   344         {
   349         {
   345         CHarvesterPluginInfo* info = iHarvesterPluginInfoArray[i];
   350         CHarvesterPluginInfo* info = iHarvesterPluginInfoArray[i];
   356                 aSupportedPlugins.AppendL( info );
   361                 aSupportedPlugins.AppendL( info );
   357                 break;
   362                 break;
   358                 }
   363                 }
   359             }
   364             }
   360         }	
   365         }	
       
   366 	
       
   367 	CleanupStack::Pop( &aSupportedPlugins );
   361 	}
   368 	}
   362 
   369 
   363 EXPORT_C TBool CHarvesterPluginFactory::IsSupportedFileExtension( const TDesC& aFileName )
   370 EXPORT_C TBool CHarvesterPluginFactory::IsSupportedFileExtension( const TDesC& aFileName )
   364 	{
   371 	{
   365 	TPtrC extPtr;
   372 	TPtrC extPtr;