videocollection/mpxmyvideoscollection/tsrc/mpxmvcolltest/src/VCXMyVideosCollectionPluginTester.cpp
changeset 41 229f037ce963
parent 36 8aed59de29f9
equal deleted inserted replaced
40:13331705e488 41:229f037ce963
  1642 
  1642 
  1643                        // Update current entries
  1643                        // Update current entries
  1644                         delete iCollectionEntries;
  1644                         delete iCollectionEntries;
  1645                         iCollectionEntries = NULL;
  1645                         iCollectionEntries = NULL;
  1646                         iCollectionEntries = CMPXMedia::NewL( *aMessage );
  1646                         iCollectionEntries = CMPXMedia::NewL( *aMessage );
       
  1647                         iCollectionMediaArray = iCollectionEntries->Value<CMPXMediaArray>( KMPXMediaArrayContents );
  1647 
  1648 
  1648                         UpdateOwnedMediaArrayL();
  1649                         UpdateOwnedMediaArrayL();
  1649 
  1650 
  1650                         SetRefreshStatus( EFalse );
  1651                         SetRefreshStatus( EFalse );
  1651 
  1652 
  2820     CleanupStack::PushL( array );
  2821     CleanupStack::PushL( array );
  2821     CMPXMedia* album;
  2822     CMPXMedia* album;
  2822     
  2823     
  2823     for( TInt i = 0; i < iAlbumIds.Count(); i++ )
  2824     for( TInt i = 0; i < iAlbumIds.Count(); i++ )
  2824         {
  2825         {
  2825         // TODO: removing photos albums causes fails in opening albums.  
  2826         // don't remove photos albums
  2826         if( iAlbumIds[i].iId1 > 2 )
  2827         if( iAlbumIds[i].iId1 > 2 )
  2827             {
  2828             {
  2828             album = CMPXMedia::NewL();
  2829             album = CMPXMedia::NewL();
  2829             CleanupStack::PushL( album );
  2830             CleanupStack::PushL( album );
  2830             album->SetTObjectValueL( KMPXMediaGeneralId, iAlbumIds[i] );
  2831             album->SetTObjectValueL( KMPXMediaGeneralId, iAlbumIds[i] );
  3025                         {
  3026                         {
  3026                         foundIndex = i;
  3027                         foundIndex = i;
  3027                         break;
  3028                         break;
  3028                         }
  3029                         }
  3029                     indexOfMediaWithDrive++;
  3030                     indexOfMediaWithDrive++;
  3030                     }            
  3031                     }
  3031                 }
  3032                 }
  3032             }
  3033             }
  3033         }
  3034         }
  3034     
  3035     
  3035     if( foundIndex == KErrNotFound )
  3036     if( foundIndex == KErrNotFound )