equal
deleted
inserted
replaced
23 #include <mdeobject.h> |
23 #include <mdeobject.h> |
24 #include <centralrepository.h> |
24 #include <centralrepository.h> |
25 #include <caf/caf.h> |
25 #include <caf/caf.h> |
26 #include <pathinfo.h> |
26 #include <pathinfo.h> |
27 |
27 |
|
28 #include "harvestercommon.h" |
28 #include "harvesteraudioplugin.h" |
29 #include "harvesteraudioplugin.h" |
29 #include "harvesteraudiopluginutils.h" |
30 #include "harvesteraudiopluginutils.h" |
30 #include "mdsutils.h" |
31 #include "mdsutils.h" |
31 #include "mdscommoninternal.h" |
32 #include "mdscommoninternal.h" |
32 |
33 |
116 CHarvesterAudioPlugin::~CHarvesterAudioPlugin() |
117 CHarvesterAudioPlugin::~CHarvesterAudioPlugin() |
117 { |
118 { |
118 WRITELOG( "CHarvesterAudioPlugin::~CHarvesterAudioPlugin()" ); |
119 WRITELOG( "CHarvesterAudioPlugin::~CHarvesterAudioPlugin()" ); |
119 |
120 |
120 delete iAudioParser; |
121 delete iAudioParser; |
|
122 iAudioParser = NULL; |
121 delete iPropDefs; |
123 delete iPropDefs; |
|
124 iPropDefs = NULL; |
122 delete iTNM; |
125 delete iTNM; |
|
126 iTNM = NULL; |
123 |
127 |
124 delete iPhoneSoundsPath; |
128 delete iPhoneSoundsPath; |
|
129 iPhoneSoundsPath = NULL; |
125 delete iMmcSoundsPath; |
130 delete iMmcSoundsPath; |
|
131 iMmcSoundsPath = NULL; |
126 } |
132 } |
127 |
133 |
128 // --------------------------------------------------------------------------- |
134 // --------------------------------------------------------------------------- |
129 // CHarvesterAudioPlugin::ConstructL |
135 // CHarvesterAudioPlugin::ConstructL |
130 // --------------------------------------------------------------------------- |
136 // --------------------------------------------------------------------------- |
143 if( iHarvestAlbumArt ) |
149 if( iHarvestAlbumArt ) |
144 { |
150 { |
145 TRAP_IGNORE( iTNM = CThumbnailManager::NewL( *this ) ); |
151 TRAP_IGNORE( iTNM = CThumbnailManager::NewL( *this ) ); |
146 } |
152 } |
147 |
153 |
|
154 SetPriority( KHarvesterPriorityHarvestingPlugin - 2 ); |
148 |
155 |
149 TFileName sounds = PathInfo::SoundsPath(); |
156 TFileName sounds = PathInfo::SoundsPath(); |
150 |
157 |
151 TFileName phonePath = PathInfo::PhoneMemoryRootPath(); |
158 TFileName phonePath = PathInfo::PhoneMemoryRootPath(); |
152 phonePath.Append( sounds ); |
159 phonePath.Append( sounds ); |
532 CThumbnailObjectSource* tnmSource = CThumbnailObjectSource::NewL( jpegBuf, mimeType, uri ); |
539 CThumbnailObjectSource* tnmSource = CThumbnailObjectSource::NewL( jpegBuf, mimeType, uri ); |
533 // Ownership of buffer is transferred to Thumbnail Manager |
540 // Ownership of buffer is transferred to Thumbnail Manager |
534 CleanupStack::Pop(); // jpegBuf |
541 CleanupStack::Pop(); // jpegBuf |
535 iTNM->CreateThumbnails( *tnmSource ); |
542 iTNM->CreateThumbnails( *tnmSource ); |
536 delete tnmSource; |
543 delete tnmSource; |
|
544 tnmSource = NULL; |
537 TBool thumbnailPresent( ETrue ); |
545 TBool thumbnailPresent( ETrue ); |
538 CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, |
546 CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, |
539 *iPropDefs->iThumbnailPropertyDef, &thumbnailPresent, aIsAdd ); |
547 *iPropDefs->iThumbnailPropertyDef, &thumbnailPresent, aIsAdd ); |
540 } |
548 } |
541 else if( iHarvestAlbumArt && iTNM ) |
549 else if( iHarvestAlbumArt && iTNM ) |