--- a/harvester/composerplugins/imagecomposer/src/imagecomposerao.cpp Tue Jul 06 14:44:37 2010 +0300
+++ b/harvester/composerplugins/imagecomposer/src/imagecomposerao.cpp Wed Aug 18 10:12:07 2010 +0300
@@ -71,16 +71,20 @@
if ( iMdeObject )
{
delete iMdeObject;
+ iMdeObject = NULL;
}
if ( iExifUtil )
{
delete iExifUtil;
+ iExifUtil = NULL;
}
delete iRelationQuery;
+ iRelationQuery = NULL;
iFs.Close();
delete iMdEHarvesterSession;
+ iMdEHarvesterSession = NULL;
}
// ---------------------------------------------------------------------------
@@ -110,6 +114,7 @@
CActiveScheduler::Add( this );
iExifUtil = CHarvesterExifUtil::NewL();
+ iFastModeEnabled = EFalse;
User::LeaveIfError( iFs.Connect() );
}
@@ -241,6 +246,10 @@
if( iItemQueue.Count() <= 0 )
{
iItemQueue.Compress();
+ if( iFastModeEnabled )
+ {
+ SetPriority( KHarvesterPriorityComposerPlugin );
+ }
SetNextRequest( ERequestReady );
}
else
@@ -250,6 +259,20 @@
if ( err == KErrNone )
{
+ CMdEProperty* prop = NULL;
+ CMdEPropertyDef& originPropDef = iMdeObject->Def().GetPropertyDefL( Object::KOriginProperty );
+ iMdeObject->Property( originPropDef, prop );
+ if( prop && prop->Uint8ValueL() == MdeConstants::Object::ECamera && !iFastModeEnabled )
+ {
+ iFastModeEnabled = ETrue;
+ SetPriority( KHarvesterPriorityMonitorPlugin );
+ }
+ else if( iFastModeEnabled )
+ {
+ iFastModeEnabled = EFalse;
+ SetPriority( KHarvesterPriorityComposerPlugin );
+ }
+
SetNextRequest( ERequestCompose );
}
// if object does not exists, find next
@@ -746,8 +769,13 @@
// Check whether the file is open
TBool isOpen( EFalse );
- iFs.IsFileOpen( uri, isOpen );
- if ( isOpen )
+ const TInt openError = iFs.IsFileOpen( uri, isOpen );
+ if( openError != KErrNone )
+ {
+ WRITELOG( "CImageComposerAO::DoWriteExifL() - check for open file failed!" );
+ User::Leave( openError );
+ }
+ else if ( isOpen )
{
WRITELOG( "CImageComposerAO::DoWriteExifL() - file handle is open!" );
User::Leave( KErrInUse );