439 { |
439 { |
440 TTime releaseDate( date ); |
440 TTime releaseDate( date ); |
441 CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, |
441 CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, |
442 *iPropDefs->iDatePropertyDef, &releaseDate, aIsAdd ); |
442 *iPropDefs->iDatePropertyDef, &releaseDate, aIsAdd ); |
443 } |
443 } |
444 |
444 |
445 if( iHarvestAlbumArt && iTNM && jpeg.Length() > 0 ) |
445 if( iHarvestAlbumArt && iTNM && jpeg.Length() > 0 ) |
446 { |
446 { |
447 HBufC8* jpegBuf = jpeg.AllocLC(); |
447 HBufC8* jpegBuf = jpeg.AllocLC(); |
448 TBuf<KMimeLength> mimeType( KNullDesC ); |
448 _LIT( KAlbumArtMimeType, "image/jpeg" ); |
|
449 TBuf<KMimeLength> mimeType; |
|
450 mimeType.Copy( KAlbumArtMimeType ); |
449 CThumbnailObjectSource* tnmSource = CThumbnailObjectSource::NewL( jpegBuf, mimeType, uri ); |
451 CThumbnailObjectSource* tnmSource = CThumbnailObjectSource::NewL( jpegBuf, mimeType, uri ); |
|
452 // Ownership of buffer is transferred to Thumbnail Manager |
450 CleanupStack::Pop(); // jpegBuf |
453 CleanupStack::Pop(); // jpegBuf |
451 // Ownership of buffer is transferred to Thumbnail Manager |
|
452 iTNM->CreateThumbnails( *tnmSource ); |
454 iTNM->CreateThumbnails( *tnmSource ); |
453 delete tnmSource; |
455 delete tnmSource; |
454 TBool thumbnailPresent( ETrue ); |
456 TBool thumbnailPresent( ETrue ); |
455 CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, |
457 CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, |
456 *iPropDefs->iThumbnailPropertyDef, &thumbnailPresent, aIsAdd ); |
458 *iPropDefs->iThumbnailPropertyDef, &thumbnailPresent, aIsAdd ); |
457 } |
459 } |
458 else if( iHarvestAlbumArt ) |
460 else if( iHarvestAlbumArt && iTNM ) |
459 { |
461 { |
460 TBool thumbnailNotPresent( EFalse ); |
462 TBool thumbnailNotPresent( EFalse ); |
461 CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, |
463 CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, |
462 *iPropDefs->iThumbnailPropertyDef, &thumbnailNotPresent, aIsAdd ); |
464 *iPropDefs->iThumbnailPropertyDef, &thumbnailNotPresent, aIsAdd ); |
463 } |
465 } |
464 |
|
465 |
466 |
466 iAudioParser->ResetL(); |
467 iAudioParser->ResetL(); |
467 |
468 |
468 #ifdef _DEBUG |
469 #ifdef _DEBUG |
469 dStop.UniversalTime(); |
470 dStop.UniversalTime(); |