ui/uiengine/medialists/src/glxcache.cpp
changeset 52 a3a4c0de738e
parent 23 74c9f037fd5d
equal deleted inserted replaced
50:a0f57508af73 52:a3a4c0de738e
   239 //
   239 //
   240 void CGlxCache::CopyNewAndModifiedL(CGlxMedia& aTarget, const CMPXMedia& aSource, 
   240 void CGlxCache::CopyNewAndModifiedL(CGlxMedia& aTarget, const CMPXMedia& aSource, 
   241         RArray<TMPXAttribute>& aNewAttributes)
   241         RArray<TMPXAttribute>& aNewAttributes)
   242     {
   242     {
   243     TRACER("CGlxCache::CopyNewAndModifiedL");
   243     TRACER("CGlxCache::CopyNewAndModifiedL");
       
   244     CleanupClosePushL(aNewAttributes);
   244     
   245     
   245     /// @todo This is all temporary until global chunk based CMPXMedia is available
   246     /// @todo This is all temporary until global chunk based CMPXMedia is available
   246     TInt count = aSource.Count();
   247     TInt count = aSource.Count();
   247 	GLX_DEBUG2("CGlxCache::CopyNewAndModifiedL() Attribs count=%d", count);
   248 	GLX_DEBUG2("CGlxCache::CopyNewAndModifiedL() Attribs count=%d", count);
   248     aNewAttributes.ReserveL( count );
   249     aNewAttributes.ReserveL( count );
   303                         {
   304                         {
   304                         aTarget.SetTObjectValueL(attrib, aSource.ValueTObjectL<TInt64>(attrib));
   305                         aTarget.SetTObjectValueL(attrib, aSource.ValueTObjectL<TInt64>(attrib));
   305                         }
   306                         }
   306                     else if (attrib == KGlxMediaGeneralLastModifiedDate)
   307                     else if (attrib == KGlxMediaGeneralLastModifiedDate)
   307                         {
   308                         {
   308                         aTarget.SetTObjectValueL(attrib, aSource.ValueTObjectL<TInt64>(attrib));
   309                         TTime modified = aSource.ValueTObjectL<TInt64>(attrib);
       
   310                         TTimeIntervalSeconds utcOffset = User::UTCOffset();
       
   311                         modified += utcOffset;
       
   312                         aTarget.SetTObjectValueL(attrib, modified);
   309                         }
   313                         }
   310                     else if (attrib == KMPXMediaGeneralSize)
   314                     else if (attrib == KMPXMediaGeneralSize)
   311                         {
   315                         {
   312                         aTarget.SetTObjectValueL(attrib, aSource.ValueTObjectL<TInt>(attrib));
   316                         aTarget.SetTObjectValueL(attrib, aSource.ValueTObjectL<TUint>(attrib));
   313                         }
   317                         }
   314                     else if (attrib == KMPXMediaColDetailSpaceId)
   318                     else if (attrib == KMPXMediaColDetailSpaceId)
   315                         {
   319                         {
   316                         aTarget.SetTObjectValueL(attrib, aSource.ValueTObjectL<TGlxIdSpaceId>(attrib));
   320                         aTarget.SetTObjectValueL(attrib, aSource.ValueTObjectL<TGlxIdSpaceId>(attrib));
   317                         }
   321                         }
   371 
   375 
   372                 aNewAttributes.AppendL(attrib);
   376                 aNewAttributes.AppendL(attrib);
   373                 }
   377                 }
   374             }
   378             }
   375         }
   379         }
       
   380     CleanupStack::Pop(&aNewAttributes);
   376     }
   381     }
   377 
   382 
   378 // -----------------------------------------------------------------------------
   383 // -----------------------------------------------------------------------------
   379 // Delete
   384 // Delete
   380 // -----------------------------------------------------------------------------
   385 // -----------------------------------------------------------------------------