112 iLocationObjectDef = NULL; |
112 iLocationObjectDef = NULL; |
113 |
113 |
114 CActiveScheduler::Add( this ); |
114 CActiveScheduler::Add( this ); |
115 |
115 |
116 iExifUtil = CHarvesterExifUtil::NewL(); |
116 iExifUtil = CHarvesterExifUtil::NewL(); |
|
117 iFastModeEnabled = EFalse; |
117 User::LeaveIfError( iFs.Connect() ); |
118 User::LeaveIfError( iFs.Connect() ); |
118 } |
119 } |
119 |
120 |
120 // --------------------------------------------------------------------------- |
121 // --------------------------------------------------------------------------- |
121 // DoCancel |
122 // DoCancel |
243 case ERequestGetObject: |
244 case ERequestGetObject: |
244 { |
245 { |
245 if( iItemQueue.Count() <= 0 ) |
246 if( iItemQueue.Count() <= 0 ) |
246 { |
247 { |
247 iItemQueue.Compress(); |
248 iItemQueue.Compress(); |
|
249 if( iFastModeEnabled ) |
|
250 { |
|
251 SetPriority( KHarvesterPriorityComposerPlugin ); |
|
252 } |
248 SetNextRequest( ERequestReady ); |
253 SetNextRequest( ERequestReady ); |
249 } |
254 } |
250 else |
255 else |
251 { |
256 { |
252 TItemId mdeObjectId = KNoId; |
257 TItemId mdeObjectId = KNoId; |
253 TRAPD( err, GetObjectFromMdeL( mdeObjectId ) ); |
258 TRAPD( err, GetObjectFromMdeL( mdeObjectId ) ); |
254 |
259 |
255 if ( err == KErrNone ) |
260 if ( err == KErrNone ) |
256 { |
261 { |
|
262 CMdEProperty* prop = NULL; |
|
263 CMdEPropertyDef& originPropDef = iMdeObject->Def().GetPropertyDefL( Object::KOriginProperty ); |
|
264 iMdeObject->Property( originPropDef, prop ); |
|
265 if( prop && prop->Uint8ValueL() == MdeConstants::Object::ECamera && !iFastModeEnabled ) |
|
266 { |
|
267 iFastModeEnabled = ETrue; |
|
268 SetPriority( KHarvesterPriorityMonitorPlugin ); |
|
269 } |
|
270 else if( iFastModeEnabled ) |
|
271 { |
|
272 iFastModeEnabled = EFalse; |
|
273 SetPriority( KHarvesterPriorityComposerPlugin ); |
|
274 } |
|
275 |
257 SetNextRequest( ERequestCompose ); |
276 SetNextRequest( ERequestCompose ); |
258 } |
277 } |
259 // if object does not exists, find next |
278 // if object does not exists, find next |
260 else if ( err == KErrNotFound || err == KErrAbort ) |
279 else if ( err == KErrNotFound || err == KErrAbort ) |
261 { |
280 { |
748 User::Leave( KErrNotSupported ); |
767 User::Leave( KErrNotSupported ); |
749 } |
768 } |
750 |
769 |
751 // Check whether the file is open |
770 // Check whether the file is open |
752 TBool isOpen( EFalse ); |
771 TBool isOpen( EFalse ); |
753 iFs.IsFileOpen( uri, isOpen ); |
772 const TInt openError = iFs.IsFileOpen( uri, isOpen ); |
754 if ( isOpen ) |
773 if( openError != KErrNone ) |
|
774 { |
|
775 WRITELOG( "CImageComposerAO::DoWriteExifL() - check for open file failed!" ); |
|
776 User::Leave( openError ); |
|
777 } |
|
778 else if ( isOpen ) |
755 { |
779 { |
756 WRITELOG( "CImageComposerAO::DoWriteExifL() - file handle is open!" ); |
780 WRITELOG( "CImageComposerAO::DoWriteExifL() - file handle is open!" ); |
757 User::Leave( KErrInUse ); |
781 User::Leave( KErrInUse ); |
758 } |
782 } |
759 |
783 |