videocollection/mpxmyvideoscollection/src/vcxmyvideosalbums.cpp
changeset 46 adbe7d5ba2f5
parent 24 7d93ee07fb27
child 52 e3cecb93e76a
equal deleted inserted replaced
28:c48470be1ba7 46:adbe7d5ba2f5
   262 // CVcxMyVideosAlbums::AddAlbumL
   262 // CVcxMyVideosAlbums::AddAlbumL
   263 // ----------------------------------------------------------------------------
   263 // ----------------------------------------------------------------------------
   264 //
   264 //
   265 void CVcxMyVideosAlbums::AddAlbumL( CMPXMedia& aCmd )
   265 void CVcxMyVideosAlbums::AddAlbumL( CMPXMedia& aCmd )
   266     {
   266     {
   267     if ( TVcxMyVideosCollectionUtil::Title( aCmd ).Length() > 255 )
   267     if ( TVcxMyVideosCollectionUtil::Title( aCmd ).Length() > KVcxMvcMaxTitleLength )
   268         {
   268         {
   269         User::Leave( KErrArgument );
   269         User::Leave( KErrArgument );
   270         }
   270         }
   271     
   271     
   272     iCollection.iMyVideosMdsDb->iAlbums->AddAlbumL( aCmd );
   272     iCollection.iMyVideosMdsDb->iAlbums->AddAlbumL( aCmd );
   349 
   349 
   350 // ----------------------------------------------------------------------------
   350 // ----------------------------------------------------------------------------
   351 // CVcxMyVideosAlbums::CalculateAttributesL
   351 // CVcxMyVideosAlbums::CalculateAttributesL
   352 // ----------------------------------------------------------------------------
   352 // ----------------------------------------------------------------------------
   353 //
   353 //
   354 void CVcxMyVideosAlbums::CalculateAttributesL()
   354 TBool CVcxMyVideosAlbums::CalculateAttributesL()
   355     {
   355     {
       
   356     TBool eventsAdded = EFalse;
       
   357     TBool modified    = EFalse;
   356     TInt count = iAlbums.Count();
   358     TInt count = iAlbums.Count();
   357     for ( TInt i = 0; i < count; i++ )
   359     for ( TInt i = 0; i < count; i++ )
   358         {
   360         {
   359         iAlbums[i]->CalculateAttributesL();
   361         modified = iAlbums[i]->CalculateAttributesL();
   360         }
   362         if ( modified )
       
   363             {
       
   364             iCollection.iMessageList->AddEventL(
       
   365                     TMPXItemId( iAlbums[i]->iMdsId, KVcxMvcMediaTypeAlbum ),
       
   366                     EMPXItemModified, 0 );
       
   367             eventsAdded = ETrue;
       
   368             }     
       
   369         }
       
   370     return eventsAdded;
   361     }
   371     }
   362 
   372 
   363 // ----------------------------------------------------------------------------
   373 // ----------------------------------------------------------------------------
   364 // CVcxMyVideosAlbums::AddAlbumsFromMdsL
   374 // CVcxMyVideosAlbums::AddAlbumsFromMdsL
   365 // From MDS insert event, no need to fetch content since the album was just
   375 // From MDS insert event, no need to fetch content since the album was just