harvester/composerplugins/imagecomposer/src/imagecomposerao.cpp
changeset 1 acef663c1218
parent 0 c53acadfccc6
child 3 6752808b2036
equal deleted inserted replaced
0:c53acadfccc6 1:acef663c1218
   132     
   132     
   133     // check if we should skip some items
   133     // check if we should skip some items
   134     const TInt itemsCount = aItems.Count();
   134     const TInt itemsCount = aItems.Count();
   135     for ( TInt i = 0; i < itemsCount; ++i )
   135     for ( TInt i = 0; i < itemsCount; ++i )
   136         {
   136         {
   137         TInt res = iNextItemsSkip.FindInOrder( aItems[i],
   137         const TInt res = iNextItemsSkip.FindInOrder( aItems[i],
   138         		TLinearOrder<TItemId>( CImageComposerAO::CompareTItemIds ) );
   138         		TLinearOrder<TItemId>( CImageComposerAO::CompareTItemIds ) );
   139         if ( res != KErrNotFound && res >= 0 )
   139         if ( res != KErrNotFound && res >= 0 )
   140             {
   140             {
   141             RArray<TItemId> objectId;
   141             RArray<TItemId> objectId;
   142             objectId.Append( aItems[i] );
   142             objectId.Append( aItems[i] );
   470         {
   470         {
   471         CleanupStack::PushL( modifiedExif );
   471         CleanupStack::PushL( modifiedExif );
   472         
   472         
   473         if ( !iMdeObject->OpenForModifications() )
   473         if ( !iMdeObject->OpenForModifications() )
   474             {
   474             {
   475             // we have get version
       
   476             const TItemId objectId = iMdeObject->Id();
   475             const TItemId objectId = iMdeObject->Id();
   477             delete iMdeObject;
   476             delete iMdeObject;
   478             iMdeObject = NULL;
   477             iMdeObject = NULL;
   479             iMdeObject = iSession->OpenObjectL( objectId, *iImageObjectDef );
   478             iMdeObject = iSession->OpenObjectL( objectId, *iImageObjectDef );
   480             if ( !iMdeObject )
   479             if ( !iMdeObject )
   515                 }
   514                 }
   516             }
   515             }
   517 
   516 
   518         CMdEPropertyDef& lastModDatePropDef = iImageObjectDef->GetPropertyDefL(
   517         CMdEPropertyDef& lastModDatePropDef = iImageObjectDef->GetPropertyDefL(
   519         		Object::KLastModifiedDateProperty );
   518         		Object::KLastModifiedDateProperty );
   520             {
   519         
   521             CMdEProperty* lastModDateProp = NULL;
   520         CMdEProperty* lastModDateProp = NULL;
   522             iMdeObject->Property( lastModDatePropDef, lastModDateProp, 0 );
   521         iMdeObject->Property( lastModDatePropDef, lastModDateProp, 0 );
   523 
   522 
   524             if ( lastModDateProp )
   523         if ( lastModDateProp )
   525                 {
   524             {
   526                 lastModDateProp->SetTimeValueL( fileEntry.iModified );
   525             lastModDateProp->SetTimeValueL( fileEntry.iModified );
   527                 }
   526             }
   528             else
   527         else
   529                 {
   528             {
   530                 iMdeObject->AddTimePropertyL( lastModDatePropDef, fileEntry.iModified );
   529             iMdeObject->AddTimePropertyL( lastModDatePropDef, fileEntry.iModified );
   531                 }
       
   532             }
   530             }
   533         iSession->CommitObjectL( *iMdeObject );
   531         iSession->CommitObjectL( *iMdeObject );
   534         iNextItemsSkip.InsertInOrder( iMdeObject->Id(),
   532         iNextItemsSkip.InsertInOrder( iMdeObject->Id(),
   535         		TLinearOrder<TItemId>( CImageComposerAO::CompareTItemIds ) );
   533         		TLinearOrder<TItemId>( CImageComposerAO::CompareTItemIds ) );
   536         }
   534         }