videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h
branchRCL_3
changeset 15 8f0df5c82986
parent 14 55fa1ec415c6
equal deleted inserted replaced
14:55fa1ec415c6 15:8f0df5c82986
    31 class CVcxHgMyVideosVideoListImpl;
    31 class CVcxHgMyVideosVideoListImpl;
    32 class CVcxHgMyVideosModel;
    32 class CVcxHgMyVideosModel;
    33 class CVcxHgMyVideosMainView;
    33 class CVcxHgMyVideosMainView;
    34 class CMPXMedia;
    34 class CMPXMedia;
    35 class CVcxHgMyVideosVideoDataUpdater;
    35 class CVcxHgMyVideosVideoDataUpdater;
    36 class CVcxHgMyVideosDownloadUpdater;
       
    37 class CVcxHgMyVideosVideoDetailsDialog;
    36 class CVcxHgMyVideosVideoDetailsDialog;
    38 class CVcxHgMyVideosVideoList;
    37 class CVcxHgMyVideosVideoList;
    39 class CHgScroller;
    38 class CHgScroller;
    40 class CMyVideosIndicator;
    39 class CMyVideosIndicator;
       
    40 class CRepository;
    41 
    41 
    42 // CLASS DECLARATION
    42 // CLASS DECLARATION
    43 
    43 
    44 /**
    44 /**
    45  * UI level handler for video data.
    45  * UI level handler for video data.
   115          * @return Highlight.
   115          * @return Highlight.
   116          */
   116          */
   117         TInt Highlight();        
   117         TInt Highlight();        
   118         
   118         
   119         /**
   119         /**
   120          * Gets video's download state base on video index.
       
   121          * 
       
   122          * @param aIndex Video's index on UI list.
       
   123          * @return Video's download state as TVcxMyVideosDownloadState structure.
       
   124          */
       
   125         TVcxMyVideosDownloadState VideoDownloadState( TInt aIndex );
       
   126         
       
   127         /**
       
   128          * Checks if progressive play (playback during download) is possible.
       
   129          * 
       
   130          * @param aIndex Video's index on UI list.
       
   131          * @return ETrue if progressive play is possible.
       
   132          */
       
   133         TBool IsProgressivePlayPossible( TInt aIndex );
       
   134 
       
   135         /**
       
   136          * Returns the count of videos in UI list model.
   120          * Returns the count of videos in UI list model.
   137          *
   121          *
   138          * @return Count of videos in UI list model.
   122          * @return Count of videos in UI list model.
   139          */
   123          */
   140         TInt VideoCount();
   124         TInt VideoCount();
   151          * Returns a list of currently marked videos.
   135          * Returns a list of currently marked videos.
   152          * 
   136          * 
   153          * @return List of currently marked video indexes.
   137          * @return List of currently marked video indexes.
   154          */
   138          */
   155         void MarkedVideosL( RArray<TInt>& aMarkedVideos );
   139         void MarkedVideosL( RArray<TInt>& aMarkedVideos );
   156         
   140 
   157         /**
       
   158          * Returns a list of item indexes which download 
       
   159 		 * state is different than EVcxMyVideosDlStateNone. 
       
   160 		 * 
       
   161 		 * @return List of item indexes.
       
   162          */
       
   163         void OngoingDownloads( RArray<TInt>& aDownloads );
       
   164         
       
   165         /**
   141         /**
   166          * Handles mark command to video list.
   142          * Handles mark command to video list.
   167          * 
   143          * 
   168          * @param aMarkCommand Mark command.
   144          * @param aMarkCommand Mark command.
   169          */
   145          */
   224          * 
   200          * 
   225          * @param aIndex Video's index on UI list.
   201          * @param aIndex Video's index on UI list.
   226          */
   202          */
   227         void PlayVideoL( TInt aIndex );
   203         void PlayVideoL( TInt aIndex );
   228         
   204         
   229         /**
       
   230          * Resumes paused or failed download from requested index.
       
   231          * 
       
   232          * @param aIndex Video's index on UI list.
       
   233          */        
       
   234         void ResumeDownloadL( TInt aIndex );
       
   235 
       
   236         /**
       
   237          * Cancels a video download from requested index.
       
   238          * 
       
   239          * @param aIndex Video's index on UI list.
       
   240          */
       
   241         void CancelDownloadL( TInt aIndex );
       
   242 
       
   243         /**
   205         /**
   244          * Returns age profile of a video.
   206          * Returns age profile of a video.
   245          * 
   207          * 
   246          * @param aIndex Video's index on UI list.
   208          * @param aIndex Video's index on UI list.
   247          * @return Age profile, or 0 if not defined.
   209          * @return Age profile, or 0 if not defined.
   321          * @param aVideo Video item.
   283          * @param aVideo Video item.
   322          */
   284          */
   323         void VideoFetchingCompletedL( CMPXMedia* aVideo );
   285         void VideoFetchingCompletedL( CMPXMedia* aVideo );
   324         
   286         
   325         /**
   287         /**
   326          * Called when resume has started from beginning.
       
   327          * @param aMpxId MPX ID of the video object.
       
   328          */
       
   329         void ResumeStartedFromBeginningL( TUint32 aMpxId );
       
   330 
       
   331         /**
       
   332          * Called when multiple video deletion command is completed.
   288          * Called when multiple video deletion command is completed.
   333          * 
   289          * 
   334          * @param aFailedCount Count of failed deletions, if any.
   290          * @param aFailedCount Count of failed deletions, if any.
   335          * @param aFailedMpxId If above 1, MPXItemId of failed deletion.
   291          * @param aFailedMpxId If above 1, MPXItemId of failed deletion.
   336          */
   292          */
   401         void ReplaceVideoArrayL( CMPXMediaArray& aVideoList );
   357         void ReplaceVideoArrayL( CMPXMediaArray& aVideoList );
   402 
   358 
   403         /**
   359         /**
   404          * Formats the second row string for video item.
   360          * Formats the second row string for video item.
   405          * 
   361          * 
   406          * @param aIndex List index of video
       
   407          * @param aMedia MPX Media object (video).
       
   408          * @param aIsDownloading On return, ETrue if video is downloading.
       
   409          * @return Second row string.
       
   410          */
       
   411         HBufC* FormatVideoSecondRowLC(
       
   412                 TInt aIndex,
       
   413                 CMPXMedia& aMedia,
       
   414                 TBool& aIsDownloading );        
       
   415         
       
   416         /**
       
   417          * Formats the second row string for completed video.
       
   418          * 
       
   419          * @param aMedia MPX Media object (video).
   362          * @param aMedia MPX Media object (video).
   420          * @return Second row string.
   363          * @return Second row string.
   421          */
   364          */
   422         HBufC* FormatVideoSecondRowCompletedLC( CMPXMedia& aMedia );
   365         HBufC* FormatVideoSecondRowLC( CMPXMedia& aMedia );
   423 
       
   424         /**
       
   425          * Formats the second row string for downloading video.
       
   426          * 
       
   427          * @param aIndex List index of video
       
   428          * @param aMedia MPX Media object (video).
       
   429          * @return Second row string.
       
   430          */
       
   431         HBufC* FormatVideoSecondRowDownloadingLC( TInt aIndex, CMPXMedia& aMedia );
       
   432 
       
   433         /**
       
   434          * Reads and returns download progress, makes sure that progress value
       
   435          * returned gets a value between 0% and 99%.
       
   436          * 
       
   437          * @param aMpxMedia Reference to MPX Media object.
       
   438          * @return Download progress. 
       
   439          */
       
   440         TInt DownloadProgressL( const CMPXMedia& aMpxMedia );
       
   441         
   366         
   442         /**
   367         /**
   443          * Updates video list item at given list index.
   368          * Updates video list item at given list index.
   444          * @param aListIndex Index.
   369          * @param aListIndex Index.
   445          */
   370          */
   502          * This is faster way to reset scroller than CHgScroller::Reset() and 
   427          * This is faster way to reset scroller than CHgScroller::Reset() and 
   503          * CHgScroller::ResizeL() calls combined
   428          * CHgScroller::ResizeL() calls combined
   504          * @param aNewItemCount New item count
   429          * @param aNewItemCount New item count
   505          */
   430          */
   506         void ResizeScrollerL( TInt aNewItemCount );
   431         void ResizeScrollerL( TInt aNewItemCount );
       
   432 		
       
   433         /**
       
   434          * Sets video as last watched.
       
   435          *    
       
   436          * @param aMedia Media that will be last watched.    
       
   437          */
       
   438         void SetVideoLastWatchedL( CMPXMedia& aMedia );
       
   439         
       
   440         /**
       
   441          * Clears new video tag from the file.
       
   442          * 
       
   443          * @param aMedia Media from which new video tag will be cleared.         
       
   444          */
       
   445         void ClearNewVideoFlagL( CMPXMedia& aMedia );
   507 
   446 
   508         /**
   447         /**
   509          * Saves the marked MPXMedia items to iMarkedMediaList. This is called before
   448          * Saves the marked MPXMedia items to iMarkedMediaList. This is called before
   510          * re-sorting the videos list if marking mode is enabled to preserve the
   449          * re-sorting the videos list if marking mode is enabled to preserve the
   511          * marking status of marked items.
   450          * marking status of marked items.
   555         /**
   494         /**
   556          * Class for updating video data (thumbnail, DRM status) asynchronously.
   495          * Class for updating video data (thumbnail, DRM status) asynchronously.
   557          * Own.
   496          * Own.
   558          */
   497          */
   559         CVcxHgMyVideosVideoDataUpdater* iDataUpdater;
   498         CVcxHgMyVideosVideoDataUpdater* iDataUpdater;
   560         
   499 
   561         /**
       
   562          * Class for polling & updating video download progress asynchrounously.
       
   563          * Own.
       
   564          */
       
   565         CVcxHgMyVideosDownloadUpdater* iDownloadUpdater; 
       
   566         
       
   567         /**
   500         /**
   568          * Hg list component.
   501          * Hg list component.
   569          * Not own.
   502          * Not own.
   570          */
   503          */
   571         CHgScroller& iScroller;
   504         CHgScroller& iScroller;
   585          * MPX id of first (topmost) visible item in a video list.
   518          * MPX id of first (topmost) visible item in a video list.
   586          */
   519          */
   587         TMPXItemId iFirstListItemId;
   520         TMPXItemId iFirstListItemId;
   588 
   521 
   589         /**
   522         /**
   590          * Downloading has been resumed for these MPX IDs. Needed for showing
       
   591 		 * note "Resuming download not possible, download starts from beginning".
       
   592          */
       
   593         RArray<TUint32> iResumeArray;
       
   594 
       
   595         /**
       
   596          * Video indicator gives an overlay icon for video thumbnails.
   523          * Video indicator gives an overlay icon for video thumbnails.
   597          */
   524          */
   598         CMyVideosIndicator* iVideoIndicator;
   525         CMyVideosIndicator* iVideoIndicator;
   599 
   526 
   600         /**
   527         /**
   601          * Array of marked MPXMedia items to temporarily hold a list of marked items in video list.
   528          * Array of marked MPXMedia items to temporarily hold a list of marked items in video list.
   602          * The array is temporarily filled with pointers to marked media items prior to re-sorting
   529          * The array is temporarily filled with pointers to marked media items prior to re-sorting
   603          * the video list and is cleared after sorting.
   530          * the video list and is cleared after sorting.
   604          */
   531          */
   605         RPointerArray<CMPXMedia> iMarkedMediaList;
   532         RPointerArray<CMPXMedia> iMarkedMediaList;
       
   533 		
       
   534         /**
       
   535          * Cenrep session.
       
   536          */
       
   537         CRepository* iRepository;
   606 
   538 
   607     };
   539     };
   608 
   540 
   609 #endif // VCXHGMYVIDEOSVIDEOMODELHANDLER_H
   541 #endif // VCXHGMYVIDEOSVIDEOMODELHANDLER_H