videocollection/hgmyvideos/src/vcxhgmyvideosvideolistitem.cpp
branchRCL_3
changeset 15 8f0df5c82986
parent 0 96612d01cf9f
equal deleted inserted replaced
14:55fa1ec415c6 15:8f0df5c82986
   149 //
   149 //
   150 CMPXMedia* CVcxHgMyVideosVideoListItem::Media()
   150 CMPXMedia* CVcxHgMyVideosVideoListItem::Media()
   151     {
   151     {
   152     return iMedia;
   152     return iMedia;
   153     }
   153     }
   154 
       
   155 // -----------------------------------------------------------------------------
       
   156 // CVcxHgMyVideosVideoListItem::DownloadState()
       
   157 // -----------------------------------------------------------------------------
       
   158 //
       
   159 TVcxMyVideosDownloadState CVcxHgMyVideosVideoListItem::DownloadState()
       
   160     {
       
   161     TVcxMyVideosDownloadState state( EVcxMyVideosDlStateNone );
       
   162 
       
   163     if ( iMedia && iMedia->IsSupported( KVcxMediaMyVideosDownloadId ) )
       
   164         {
       
   165         // Download ID is non-zero if download status exists.
       
   166         if ( *( iMedia->Value<TUint32>( KVcxMediaMyVideosDownloadId ) ) != 0 )
       
   167             {
       
   168             if ( iMedia->IsSupported( KVcxMediaMyVideosDownloadState ) )
       
   169                 {
       
   170                 state = static_cast<TVcxMyVideosDownloadState>(
       
   171                             *( iMedia->Value<TUint8>( KVcxMediaMyVideosDownloadState ) ) );
       
   172 
       
   173                 if ( state == EVcxMyVideosDlStateDownloaded )
       
   174                     {
       
   175                     state = EVcxMyVideosDlStateNone;
       
   176                     }
       
   177                 }
       
   178             }
       
   179         }
       
   180     return state;
       
   181     }