photosgallery/viewframework/medialists/src/glxmedialist.cpp
branchRCL_3
changeset 18 bcb43dc84c44
parent 14 ce1c7ad1f18b
child 32 78ad99c24f08
equal deleted inserted replaced
14:ce1c7ad1f18b 18:bcb43dc84c44
   677     {
   677     {
   678     TRACER("CGlxMediaList::RemoveMediaListObserver");    
   678     TRACER("CGlxMediaList::RemoveMediaListObserver");    
   679     GLX_LOG_INFO1( "CGlxMediaList::RemoveMediaListObserver(0x%x)", aObserver );
   679     GLX_LOG_INFO1( "CGlxMediaList::RemoveMediaListObserver(0x%x)", aObserver );
   680 
   680 
   681     TInt index = iItemListObservers.Find(aObserver);
   681     TInt index = iItemListObservers.Find(aObserver);
   682 
       
   683     // Make sure the observer is in the array
       
   684     // LOG THIS! __ASSERT_DEBUG(index != -1, Panic(EGlxPanicIllegalArgument)); // No such observer
       
   685 
   682 
   686     if (index != KErrNotFound) 
   683     if (index != KErrNotFound) 
   687         {
   684         {
   688         iItemListObservers.Remove(index);	
   685         iItemListObservers.Remove(index);	
   689         }
   686         }
  1736 // -----------------------------------------------------------------------------
  1733 // -----------------------------------------------------------------------------
  1737 //
  1734 //
  1738 inline void CGlxMediaList::UpdateMedia()
  1735 inline void CGlxMediaList::UpdateMedia()
  1739     {
  1736     {
  1740     TRACER("CGlxMediaList::UpdateMedia");
  1737     TRACER("CGlxMediaList::UpdateMedia");
  1741     
  1738 #ifdef _DEBUG
       
  1739     TTime startTime;
       
  1740     startTime.HomeTime();
       
  1741 #endif
  1742     TInt count = iItemList->Count();
  1742     TInt count = iItemList->Count();
       
  1743     GLX_DEBUG2("CGlxMediaList::UpdateMedia() count=%d", count);    
  1743     for (TInt i = 0; i < count; ++i)
  1744     for (TInt i = 0; i < count; ++i)
  1744         {
  1745         {
  1745         TGlxMedia& item = iItemList->Item( i );
  1746         TGlxMedia& item = iItemList->Item( i );
  1746 
  1747 
  1747         // static items should not be updated
  1748         // static items should not be updated
  1749             {
  1750             {
  1750             item.UpdateMedia( *this, i );
  1751             item.UpdateMedia( *this, i );
  1751             UpdateMediaInvalidateAttributesChangedByCounts(item);
  1752             UpdateMediaInvalidateAttributesChangedByCounts(item);
  1752             }
  1753             }
  1753         }
  1754         }
       
  1755 #ifdef _DEBUG
       
  1756     TTime stopTime;
       
  1757     stopTime.HomeTime();
       
  1758     GLX_DEBUG2("=>CGlxMediaList::UpdateMedia() took <%d> us", 
       
  1759                     (TInt)stopTime.MicroSecondsFrom(startTime).Int64());
       
  1760 #endif    
  1754     }
  1761     }
  1755 
  1762 
  1756 // -----------------------------------------------------------------------------
  1763 // -----------------------------------------------------------------------------
  1757 // Updates each media used by this media list with the current index
  1764 // Updates each media used by this media list with the current index
  1758 // -----------------------------------------------------------------------------
  1765 // -----------------------------------------------------------------------------