videocollection/mpxmyvideoscollection/src/vcxmyvideosopenhandler.cpp
branchRCL_3
changeset 45 baf439b22ddd
parent 26 67eb01668b0e
child 56 839377eedc2b
equal deleted inserted replaced
26:67eb01668b0e 45:baf439b22ddd
   124         {
   124         {
   125         case categoryLevel:
   125         case categoryLevel:
   126             {
   126             {
   127             //we are at root level, return main level items (categories + albums)
   127             //we are at root level, return main level items (categories + albums)
   128 
   128 
   129 #ifndef VIDEO_COLLECTION_PLUGIN_TB92            
   129 #ifdef VCX_ALBUMS             
   130             iCollection.AlbumsL().CreateAlbumListL(); //async
   130             iCollection.AlbumsL().CreateAlbumListL(); //async
   131 #endif
   131 #endif
   132 
   132 
   133             // This is needed to update category counters.
   133             // This is needed to update category counters.
   134             // Goes to queue if CreateAlbumListL command goes to execution
   134             // Goes to queue if CreateAlbumListL command goes to execution
   144             
   144             
   145             itemList->SetTObjectValueL<TBool>( KVcxMediaMyVideosVideoListIsPartial,
   145             itemList->SetTObjectValueL<TBool>( KVcxMediaMyVideosVideoListIsPartial,
   146                 !iCache.IsComplete() );
   146                 !iCache.IsComplete() );
   147                 
   147                 
   148             TVcxMyVideosCollectionUtil::AppendToListL( *itemList, *iCollection.CategoriesL().iList );
   148             TVcxMyVideosCollectionUtil::AppendToListL( *itemList, *iCollection.CategoriesL().iList );
   149 #ifndef VIDEO_COLLECTION_PLUGIN_TB92
   149 #ifdef VCX_ALBUMS
   150             TVcxMyVideosCollectionUtil::AppendToListL( *itemList, *iCollection.AlbumsL().iAlbumList );
   150             TVcxMyVideosCollectionUtil::AppendToListL( *itemList, *iCollection.AlbumsL().iAlbumList );
   151 #endif
   151 #endif
   152             itemList->SetCObjectValueL( KMPXMediaGeneralContainerPath, iPath );
   152             itemList->SetCObjectValueL( KMPXMediaGeneralContainerPath, iPath );
   153             iCollection.iObs->HandleOpen( itemList, KErrNone );
   153             iCollection.iObs->HandleOpen( itemList, KErrNone );
   154             CleanupStack::PopAndDestroy( itemList );
   154             CleanupStack::PopAndDestroy( itemList );
   158 
   158 
   159         case videosLevel:
   159         case videosLevel:
   160             {
   160             {
   161             //we are at second level, return video list from some category or album
   161             //we are at second level, return video list from some category or album
   162 
   162 
   163 #ifndef VIDEO_COLLECTION_PLUGIN_TB92
   163 #ifdef VCX_ALBUMS
   164             iCollection.AlbumsL().CreateAlbumListL(); //async
   164             iCollection.AlbumsL().CreateAlbumListL(); //async
   165 #endif
   165 #endif
   166 
   166 
   167             TMPXItemId categoryId( aPath.Id() );
   167             TMPXItemId categoryId( aPath.Id() );
   168             
   168             
   388         // ownership of the list to client. Video objects will continue to point to the same shared data.
   388         // ownership of the list to client. Video objects will continue to point to the same shared data.
   389         iCache.ReCreateVideoListL();
   389         iCache.ReCreateVideoListL();
   390 
   390 
   391         iCollection.CategoriesL().UpdateCategoriesNewVideoNamesL();
   391         iCollection.CategoriesL().UpdateCategoriesNewVideoNamesL();
   392 
   392 
   393         iCollection.AlbumsL().CalculateAttributesL();
   393         iCollection.AlbumsL().CalculateAttributesL(); // adds events if attributes modified, does not send
   394         
   394         
   395         iCollection.iMessageList->AddEventL( KVcxMessageMyVideosListComplete );
   395         iCollection.iMessageList->AddEventL( KVcxMessageMyVideosListComplete );
   396         }
   396         }
   397     iCollection.iMessageList->SendL();
   397     iCollection.iMessageList->SendL();
   398     }
   398     }
   524         {
   524         {
   525         iCollection.iMessageList->AddEventL( KVcxMessageMyVideosItemsAppended );
   525         iCollection.iMessageList->AddEventL( KVcxMessageMyVideosItemsAppended );
   526 
   526 
   527         MPX_DEBUG3("CVcxMyVideosOpenHandler:: adding modify event for album %d, extra info = %d",
   527         MPX_DEBUG3("CVcxMyVideosOpenHandler:: adding modify event for album %d, extra info = %d",
   528                 aAlbumId, EVcxMyVideosVideoListOrderChanged );
   528                 aAlbumId, EVcxMyVideosVideoListOrderChanged );
   529         iCollection.iMessageList->AddEventL( TMPXItemId( aAlbumId, 2 ), EMPXItemModified,
   529         iCollection.iMessageList->AddEventL( TMPXItemId( aAlbumId, KVcxMvcMediaTypeAlbum ), EMPXItemModified,
   530                 EVcxMyVideosVideoListOrderChanged );
   530                 EVcxMyVideosVideoListOrderChanged );
   531         }
   531         }
   532     else
   532     else
   533         {
   533         {
   534         //TODO: should add album id
   534         //TODO: should add album id
   535         iCollection.AlbumsL().CalculateAttributesL();
   535         iCollection.AlbumsL().CalculateAttributesL(); // adds events if attributes modified, does not send
   536 
   536 
   537         iCollection.iMessageList->AddEventL( KVcxMessageMyVideosListComplete );
   537         iCollection.iMessageList->AddEventL( KVcxMessageMyVideosListComplete );
   538 
   538 
   539         
   539         
   540         delete iAlbumVideoList;
   540         delete iAlbumVideoList;