videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp
branchRCL_3
changeset 70 375929f879c2
parent 64 3eb824b18d67
equal deleted inserted replaced
64:3eb824b18d67 70:375929f879c2
    39 #include "vcxhgmyvideosmainview.h"
    39 #include "vcxhgmyvideosmainview.h"
    40 #include "vcxhgmyvideoscollectionclient.h"
    40 #include "vcxhgmyvideoscollectionclient.h"
    41 #include "vcxhgmyvideosvideomodelhandler.h"
    41 #include "vcxhgmyvideosvideomodelhandler.h"
    42 #include "vcxhgmyvideosvideolistimpl.h"
    42 #include "vcxhgmyvideosvideolistimpl.h"
    43 #include "vcxhgmyvideosvideodataupdater.h"
    43 #include "vcxhgmyvideosvideodataupdater.h"
    44 #include "vcxhgmyvideosthumbnailmanager.h"
       
    45 
    44 
    46 #include "vcxhgmyvideos.hrh"
    45 #include "vcxhgmyvideos.hrh"
    47 #include "vcxhgmyvideoslistbase.h"
    46 #include "vcxhgmyvideoslistbase.h"
    48 #include "vcxhgmyvideosindicatorhelper.h"
    47 #include "vcxhgmyvideosindicatorhelper.h"
    49 #include "vcxhgmyvideosvideodetailsdialog.h"
    48 #include "vcxhgmyvideosvideodetailsdialog.h"
   602         {
   601         {
   603         // Playback should be tried always when single clicking a video in My Videos
   602         // Playback should be tried always when single clicking a video in My Videos
   604         TMPXItemId mpxItemId = media->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId );
   603         TMPXItemId mpxItemId = media->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId );
   605         SetVideoLastWatchedL( *media );
   604         SetVideoLastWatchedL( *media );
   606         ClearNewVideoFlagL( *media );
   605         ClearNewVideoFlagL( *media );
   607         ResetEmptyDrmThumnailL( *media, aIndex );
       
   608 		IPTVLOGSTRING3_LOW_LEVEL( "CVcxHgMyVideosVideoModelHandler::PlayVideoL() aIndex=%d mpxItemId=%d", aIndex, (TInt) mpxItemId );
   606 		IPTVLOGSTRING3_LOW_LEVEL( "CVcxHgMyVideosVideoModelHandler::PlayVideoL() aIndex=%d mpxItemId=%d", aIndex, (TInt) mpxItemId );
   609         iModel.CollectionClient().PlayVideoL( mpxItemId );        
   607         iModel.CollectionClient().PlayVideoL( mpxItemId );        
   610         }
   608         }
   611     }
   609     }
   612 
   610 
  1417         flags &= ~EVcxMyVideosVideoNew;
  1415         flags &= ~EVcxMyVideosVideoNew;
  1418         iModel.CollectionClient().SetFlagsL( 
  1416         iModel.CollectionClient().SetFlagsL( 
  1419 		    aMedia.ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ), flags );   
  1417 		    aMedia.ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ), flags );   
  1420         }    
  1418         }    
  1421     }
  1419     }
  1422 
       
  1423 // -----------------------------------------------------------------------------
       
  1424 // CVcxHgMyVideosVideoModelHandler::ResetEmptyDrmThumnailL()
       
  1425 // -----------------------------------------------------------------------------
       
  1426 //
       
  1427 void CVcxHgMyVideosVideoModelHandler::ResetEmptyDrmThumnailL( CMPXMedia& aMedia, TInt aIndex )
       
  1428     {
       
  1429     CHgItem& item = iScroller.ItemL( aIndex );
       
  1430     
       
  1431     if ( !item.Icon() )
       
  1432         {
       
  1433         if ( aMedia.IsSupported( KMPXMediaGeneralFlags ) && 
       
  1434              aMedia.ValueTObjectL<TUint32>( KMPXMediaGeneralFlags ) 
       
  1435                                                      == EVcxMyVideosVideoDrmProtected );
       
  1436             {
       
  1437             CThumbnailObjectSource* source = 
       
  1438                CThumbnailObjectSource::NewLC( aMedia.ValueText( KMPXMediaGeneralUri ), NULL );
       
  1439             
       
  1440             // We cannot know at this phase, do the user get the license 
       
  1441             // when playing the video, so we have to reset this every time.
       
  1442             iModel.ThumbnailManager().Reset( *source );
       
  1443             
       
  1444             CleanupStack::PopAndDestroy( source );
       
  1445             }
       
  1446         }
       
  1447     }