videocollection/hgmyvideos/inc/vcxhgmyvideosvideodataupdater.h
branchRCL_3
changeset 11 5294c000a26d
parent 10 ce5ada96ab30
child 53 2d690156cf8f
equal deleted inserted replaced
10:ce5ada96ab30 11:5294c000a26d
   121          * 
   121          * 
   122          * @param aMPXItemId MPX item id of video data.
   122          * @param aMPXItemId MPX item id of video data.
   123          */
   123          */
   124         void ReleaseData( TMPXItemId aMPXItemId );
   124         void ReleaseData( TMPXItemId aMPXItemId );
   125         
   125         
       
   126         /**
       
   127          * Called when user wants to move or delete video from UI. Removes
       
   128          * data item from buffer and cancels ongoing thumbnail generation.
       
   129          * 
       
   130          * @param aMPXItemId MPX item id of video data.         
       
   131          */
       
   132         void PrepareForMoveOrDelete( TMPXItemId aMPXItemId );
       
   133         
   126     public: // From MThumbnailManagerObserver
   134     public: // From MThumbnailManagerObserver
   127         
   135         
   128         /**
   136         /**
   129          * Preview thumbnail generation or loading is complete.
   137          * Preview thumbnail generation or loading is complete.
   130          *
   138          *
   189          */
   197          */
   190         TInt IndexByMPXItemId( TMPXItemId aMpxItemId );
   198         TInt IndexByMPXItemId( TMPXItemId aMpxItemId );
   191         
   199         
   192         /**
   200         /**
   193          * Selects next index to be fetched.
   201          * Selects next index to be fetched.
   194          * @param aSelectForPeekOnly  
   202          * 
   195          */
   203          * @param aSelectForPeekOnly    Select for peek only.
   196         void SelectNextIndexL( TBool aSelectForPeekOnly );
   204          * @return ETrue if selected otherwise EFalse.
       
   205          */
       
   206         TBool SelectNextIndexL( TBool aSelectForPeekOnly );
   197         
   207         
   198         /**
   208         /**
   199          * Removes item from fetch array.
   209          * Removes item from fetch array.
   200          * 
   210          * 
   201          * @param aIndex Index of fetch array.
   211          * @param aIndex Index of fetch array.
   202          */
   212          */
   203         void RemoveItem( TInt aIndex );
   213         void RemoveItem( TInt aIndex );
       
   214         
       
   215         /**
       
   216          * Removes item from fetch array and cancel thumbnail generation.
       
   217          * 
       
   218          * @param aIndex Index of fetch array.         
       
   219          */
       
   220         void RemoveAndCancelThumbnailGeneration( TInt aIndex );
   204                 
   221                 
   205         /**
   222         /**
   206          * Cancels possibly ongoing activities (thumbnail generation, DRM check).
   223          * Cancels possibly ongoing activities (thumbnail generation, DRM check).
   207          *
   224          *
   208          * @param aIndex Index of fetch array.
   225          * @param aIndex Index of fetch array.
   249          */
   266          */
   250         void RefreshScreen();
   267         void RefreshScreen();
   251 
   268 
   252         /**
   269         /**
   253          * Checks DRM properties
   270          * Checks DRM properties
       
   271 		 *
       
   272 		 * @param aVideoData	Reference to video data.
   254          */
   273          */
   255         void CheckDrmL( CVcxHgMyVideosVideoData& aVideoData );
   274         void CheckDrmL( CVcxHgMyVideosVideoData& aVideoData );
   256 
   275 
   257         /**
   276         /**
   258          * Gets active request count
   277          * Gets active request count
   259          */
   278          *
       
   279 		 * @param aPeekRequests	On return number of peek requests.
       
   280 		 * @param aGetRequests	On return number of get requests.
       
   281 		 */
   260         void GetActiveRequestCount( TInt& aPeekRequests, TInt& aGetRequests );
   282         void GetActiveRequestCount( TInt& aPeekRequests, TInt& aGetRequests );
   261 
   283 
   262         /**
   284         /**
   263          * Starts thumbnail fetch
   285          * Starts thumbnail fetch
   264          */
   286          */
   265         void StartThumbnailL( CVcxHgMyVideosVideoData& aItem, TBool aPeek );
   287         void StartThumbnailL( CVcxHgMyVideosVideoData& aItem, TBool aPeek );
       
   288 
       
   289         /**
       
   290          * Tries to select item for fetch.
       
   291 		 * 
       
   292 		 * @param aIndex				Index
       
   293 		 * @param aSelectForPeekOnly	ETrue
       
   294 		 * @return ETrue if selected, otherwise EFalse
       
   295          */
       
   296         TBool TrySelectL( TInt aIndex, TBool aSelectForPeekOnly );
       
   297 
       
   298         /**
       
   299          * Tries to select item for fetch.
       
   300 		 *
       
   301 		 * @param aPos                Scroller position.
       
   302 		 * @param aSelectForPeekOnly  Select for peek only status.
       
   303 		 * @return ETrue if selected, otherwise EFalse.
       
   304          */
       
   305         TBool TrySelectFromScrollerL( TInt aPos, TBool aSelectForPeekOnly );
       
   306 
       
   307         /**
       
   308          * Tries to select item for fetch.
       
   309 		 *
       
   310 		 * @param aStartPos           Start position.
       
   311          * @param aEndPos             End position.
       
   312 		 * @param aSelectForPeekOnly  Select for peek only status.
       
   313 		 * @return ETrue if selected, otherwise EFalse.
       
   314          */
       
   315         TBool TrySelectFromScrollerAreaL( TInt aStartPos, 
       
   316                                           TInt aEndPos,
       
   317                                           TBool aSelectForPeekOnly );
       
   318 
       
   319         /**
       
   320          * Starts final actions for finished thumbnails
       
   321          */
       
   322         void StartFinalActions();
       
   323 
       
   324         /**
       
   325          * Checks if cancellation of activities is needed for item
       
   326 		 *
       
   327 		 * @param aItem		Reference to data item.
       
   328 		 * @return ETrue if cancel is needed, otherwise EFalse.
       
   329          */
       
   330         TBool CancelNeeded( CVcxHgMyVideosVideoData& aItem );
       
   331 
       
   332         /**
       
   333          * Callback method for RetryTimer.  
       
   334          */
       
   335         static TInt RetryTimerCallBack( TAny* aAny );
       
   336 
       
   337         /**
       
   338          * Gets scroller area
       
   339 		 *
       
   340 		 * @param aFirstIndexOnScreen     First index on screen.
       
   341  		 * @param aLastIndexOnScreen      Last index on screen.
       
   342 		 * @param aLastIndex              Last index.
       
   343          */
       
   344         void GetScrollerArea( TInt& aFirstIndexOnScreen, 
       
   345 							  TInt& aLastIndexOnScreen,
       
   346         					  TInt& aLastIndex );
   266 
   347 
   267     protected:
   348     protected:
   268 
   349 
   269         /**
   350         /**
   270          * Reference to component's model.
   351          * Reference to component's model.
   298         
   379         
   299         /**
   380         /**
   300          * Flag for pause state.
   381          * Flag for pause state.
   301          */
   382          */
   302         TBool iPaused;
   383         TBool iPaused;
   303                 
   384 
   304         /**
   385         /**
   305          * Flag indicates that list refresh is delayed. 
   386          * Stores previous first scroller index for checking scroll direction 
   306          */
   387          */
   307         TBool iListRefreshIsDelayed;
   388         TInt iPreviousFirstScrollerIndex;
       
   389 
       
   390         /**
       
   391          * Stores time of previous scroller first index update
       
   392          */
       
   393         TInt64 iPreviousFirstScrollerIndexTime;
       
   394 
       
   395         /** 
       
   396          * Used for restarting thumbnail creation after scroll
       
   397          * Own.
       
   398          */
       
   399         CPeriodic* iRetryTimer;
       
   400 
       
   401         /**
       
   402          * For refresh logic
       
   403          */
       
   404         TBool iPreviousModifiedIndexOnScreen;
       
   405 
   308     };
   406     };
   309 
   407 
   310 #endif // VCXHGMYVIDEOSVIDEODATAUPDATER_H
   408 #endif // VCXHGMYVIDEOSVIDEODATAUPDATER_H