harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp
changeset 1 acef663c1218
parent 0 c53acadfccc6
child 3 b73a2e62868f
equal deleted inserted replaced
0:c53acadfccc6 1:acef663c1218
    23 #include <mdeobject.h>
    23 #include <mdeobject.h>
    24 #include <centralrepository.h>
    24 #include <centralrepository.h>
    25 
    25 
    26 #include "harvesteraudioplugin.h"
    26 #include "harvesteraudioplugin.h"
    27 #include "harvesteraudiopluginutils.h"
    27 #include "harvesteraudiopluginutils.h"
       
    28 #include "mdsutils.h"
    28 
    29 
    29 #include "harvesterlog.h"
    30 #include "harvesterlog.h"
    30 
    31 
    31 const TInt KMimeLength( 10 );
    32 const TInt KMimeLength( 10 );
    32 const TUid KHarvesterRepoUid = { 0x200009FE };
    33 const TUid KHarvesterRepoUid = { 0x200009FE };
   142 //    
   143 //    
   143 void CHarvesterAudioPlugin::HarvestL( CHarvesterData* aHD )
   144 void CHarvesterAudioPlugin::HarvestL( CHarvesterData* aHD )
   144 	{
   145 	{
   145 	WRITELOG( "CHarvesterAudioPlugin::HarvestL()" );
   146 	WRITELOG( "CHarvesterAudioPlugin::HarvestL()" );
   146 	
   147 	
   147 	TInt err = KErrNone;
   148 	TRAPD( error, DoHarvestL( aHD ) );
   148 	
   149 	if ( error != KErrNone )
   149 	TRAP( err, DoHarvestL( aHD ) );
       
   150 	
       
   151 	if ( err != KErrNone )
       
   152 	    {
   150 	    {
   153 	    aHD->SetErrorCode( err );
   151         WRITELOG1( "CHarvesterAudioPlugin::HarvestL() - error: %d", error );
       
   152         TInt convertedError = KErrNone;
       
   153         MdsUtils::ConvertTrapError( error, convertedError );
       
   154         aHD->SetErrorCode( convertedError );
       
   155         WRITELOG1( "CHarvesterAudioPlugin::HarvestL() - returning: %d", convertedError );
       
   156 	    
   154 	    }
   157 	    }
   155 	}
   158 	}
   156 
   159 
   157 // ---------------------------------------------------------------------------
   160 // ---------------------------------------------------------------------------
   158 // CHarvesterAudioPlugin::ThumbnailPreviewReady 
   161 // CHarvesterAudioPlugin::ThumbnailPreviewReady 
   257 	CMdeObjectWrapper::HandleObjectPropertyL(
   260 	CMdeObjectWrapper::HandleObjectPropertyL(
   258              mdeObject, *iPropDefs->iLastModifiedDatePropertyDef, &entry.iModified, aIsAdd );
   261              mdeObject, *iPropDefs->iLastModifiedDatePropertyDef, &entry.iModified, aIsAdd );
   259 
   262 
   260 	CMdeObjectWrapper::HandleObjectPropertyL(
   263 	CMdeObjectWrapper::HandleObjectPropertyL(
   261               mdeObject, *iPropDefs->iSizePropertyDef, &entry.iSize, aIsAdd );
   264               mdeObject, *iPropDefs->iSizePropertyDef, &entry.iSize, aIsAdd );
       
   265 	
       
   266 	mdeObject.SetPlaceholder( EFalse );
   262     }
   267     }
   263 
   268 
   264 // ---------------------------------------------------------------------------
   269 // ---------------------------------------------------------------------------
   265 // CHarvesterAudioPlugin::GetMimeTypePropertyL
   270 // CHarvesterAudioPlugin::GetMimeTypePropertyL
   266 // Get mime type.
   271 // Get mime type.