equal
deleted
inserted
replaced
142 |
142 |
143 case EHarvesterGathering: |
143 case EHarvesterGathering: |
144 { |
144 { |
145 if( iQueue->Count() == 0 ) |
145 if( iQueue->Count() == 0 ) |
146 { |
146 { |
147 SetNextRequest( EHarvesterIdle ); |
|
148 if( iHarvesting ) |
147 if( iHarvesting ) |
149 { |
148 { |
150 TRAP_IGNORE( iFactory->SendHarvestingStatusEventL( EFalse ) ); |
149 TRAP_IGNORE( iFactory->SendHarvestingStatusEventL( EFalse ) ); |
151 iHarvesting = EFalse; |
150 iHarvesting = EFalse; |
152 } |
151 } |
153 iQueue->Compress(); |
152 iQueue->Compress(); |
|
153 SetNextRequest( EHarvesterIdle ); |
154 } |
154 } |
155 else |
155 else |
156 { |
156 { |
157 if ( !iHarvesting ) |
157 if ( !iHarvesting ) |
158 { |
158 { |
160 iHarvesting = ETrue; |
160 iHarvesting = ETrue; |
161 } |
161 } |
162 |
162 |
163 CHarvesterData* hd = (*iQueue)[0]; |
163 CHarvesterData* hd = (*iQueue)[0]; |
164 iQueue->Remove( 0 ); |
164 iQueue->Remove( 0 ); |
|
165 if( !hd ) |
|
166 { |
|
167 SetNextRequest( EHarvesterGathering ); |
|
168 break; |
|
169 } |
165 const TDesC& uri = hd->Uri(); |
170 const TDesC& uri = hd->Uri(); |
166 TUint32 mediaId = hd->MdeObject().MediaId(); |
171 TUint32 mediaId = hd->MdeObject().MediaId(); |
167 |
172 |
168 if( hd->ObjectType() == EFastHarvest || hd->Origin() == MdeConstants::Object::ECamera ) |
173 if( hd->ObjectType() == EFastHarvest || hd->Origin() == MdeConstants::Object::ECamera ) |
169 { |
174 { |
192 } |
197 } |
193 |
198 |
194 TRAP_IGNORE( SetDefaultPropertiesL( *hd ) ); |
199 TRAP_IGNORE( SetDefaultPropertiesL( *hd ) ); |
195 |
200 |
196 WRITELOG1("CHarvesterPlugin::RunL - Calling HarvestL for file: %S", &uri); |
201 WRITELOG1("CHarvesterPlugin::RunL - Calling HarvestL for file: %S", &uri); |
197 TRAPD(err, HarvestL( hd ) ); |
202 TRAPD( err, HarvestL( hd ) ); |
198 |
203 |
199 if ( iBlacklist ) |
204 if ( iBlacklist ) |
200 { |
205 { |
201 WRITELOG( "CHarvesterPlugin::RunL - Removing URI from blacklist" ); |
206 WRITELOG( "CHarvesterPlugin::RunL - Removing URI from blacklist" ); |
202 iBlacklist->RemoveFile( uri, mediaId ); |
207 iBlacklist->RemoveFile( uri, mediaId ); |