videoplayback/inc/mpxvideoplaybackmediadetailsviewer.h
branchRCL_3
changeset 70 375929f879c2
parent 57 befca0ec475f
equal deleted inserted replaced
64:3eb824b18d67 70:375929f879c2
    13 *
    13 *
    14 * Description:  Media Details Viewer
    14 * Description:  Media Details Viewer
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 // Version : %version:  e003sa33#6 %
    19 // Version : %version:  7 %
       
    20 
       
    21 
    19 
    22 #ifndef MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
    20 #ifndef MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
    23 #define MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
    21 #define MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
    24 
    22 
    25 //  INCLUDES
    23 //  INCLUDES
    78         /**
    76         /**
    79         * From CCoeControl,Draw.
    77         * From CCoeControl,Draw.
    80         * @param aRect drawable area.
    78         * @param aRect drawable area.
    81         */
    79         */
    82         void Draw( const TRect& aRect ) const;
    80         void Draw( const TRect& aRect ) const;
    83 
    81         
    84         /**
    82         /**
    85         * Creates new skins for the control
    83         * Creates new skins for the control
    86         * @return void
    84         * @return void
    87         */
    85         */
    88         void SkinChangeL();
    86         void SkinChangeL();        
    89 
    87 
    90 
    88 
    91     public: // from CoeControl
    89     public: // from CoeControl
    92 
    90 
    93         /**
    91         /**
   100         /*
    98         /*
   101          *  Bring the button bar to its original state
    99          *  Bring the button bar to its original state
   102          *  @since 5.0
   100          *  @since 5.0
   103          */
   101          */
   104         void Reset();
   102         void Reset();
   105 
   103         
   106         /**
   104         /** 
   107         * Accessor for the dynamically calculated viewer rect
   105         * Accessor for the dynamically calculated viewer rect
   108         * @since 9.2
   106         * @since 9.2 
   109         * @return the viewer rect
   107         * @return the viewer rect
   110         */
   108         */                   
   111         TRect ViewerRect();
   109         TRect ViewerRect();         
   112 
   110               
   113 
   111 
   114     private:
   112     private:
   115 
   113         
   116         void CreateLabelsL();
   114         void CreateLabelsL();
   117 
   115         
   118         void LaunchDRMDetailsL();
   116         void LaunchDRMDetailsL();
   119 
   117         
   120         /**
   118         /**
   121         * Sets label rects and text
   119         * Sets label rects and text
   122         */
   120         */
   123         void FormatLabelsL() const;
   121         void FormatLabelsL() const;   
   124 
   122         
   125         void UpdateBackgroundBitmapL() const;
   123         void UpdateBackgroundBitmapL() const;
   126 
   124         
   127         /**
   125         /** 
   128         * Timer callback for scroll timer
   126         * Timer callback for scroll timer
   129         * @since 9.2
   127         * @since 9.2 
   130         * @param aPtr Pointer to timers callback
   128         * @param aPtr Pointer to timers callback 
   131         * @return KErrNone
   129         * @return KErrNone 
   132         */
   130         */ 
   133         static TInt ScrollTimer( TAny* aPtr );
   131         static TInt ScrollTimer( TAny* aPtr );
   134 
   132 
   135         /**
   133         /** 
   136         * Handle Scroll Timer
   134         * Handle Scroll Timer
   137         * @since 9.2
   135         * @since 9.2 
   138         * @return void
   136         * @return void 
   139         */
   137         */ 
   140         void HandleScrollTimerL();
   138         void HandleScrollTimerL();
   141 
   139         
   142         /**
   140         /** 
   143         * Determine the number of items to be shown in the viewer
   141         * Determine the number of items to be shown in the viewer
   144         * @since 9.2
   142         * @since 9.2 
   145         * @return the number of rows to be created
   143         * @return the number of rows to be created
   146         */
   144         */         
   147         TInt NumOfItemsShownInViewerL();
   145         TInt NumOfItemsShownInViewerL();
   148 
   146         
   149         /**
   147         /** 
   150         * Dynamically calculate determine the viewer rectangle dyanmically
   148         * Dynamically calculate determine the viewer rectangle dyanmically
   151         * @since 9.2
   149         * @since 9.2 
   152         * @return the viewer rect
   150         * @return the viewer rect
   153         */
   151         */                   
   154         TRect CalculateViewerRectL();
   152         TRect CalculateViewerRectL();          
   155 
   153 
   156         /**
   154         /**
   157          * Update the text of filename label
   155          * Update the text of filename label
   158          */
   156          */
   159         void UpdateFilenameL();
   157         void UpdateFilenameL();
   162          * Update the text of title label
   160          * Update the text of title label
   163          */
   161          */
   164         void UpdateTitleL();
   162         void UpdateTitleL();
   165 
   163 
   166     private:
   164     private:
   167 
   165         
   168         /**
   166         /**
   169          * Scroll the too long text for some label
   167          * Scroll the too long text for some label
   170          */
   168          */
   171         class TTextScroller
   169         class TTextScroller
   172         {
   170         {
   173             public:
   171             public:
   174 
   172         
   175                 /**
   173                 /**
   176                  * Constructor
   174                  * Constructor
   177                  */
   175                  */
   178                 TTextScroller();
   176                 TTextScroller();
   179 
   177 
   194                  * @param aDesText to which the scrolled text to be appended
   192                  * @param aDesText to which the scrolled text to be appended
   195                  */
   193                  */
   196                 void ScrollText( const TDesC& aSrcText, TDes& aDesText );
   194                 void ScrollText( const TDesC& aSrcText, TDes& aDesText );
   197 
   195 
   198             private:
   196             private:
   199 
   197                 
   200                 TUint32        iDelayBeginningTick;
   198                 TUint32		iDelayBeginningTick;
   201                 TInt           iTextScrollPos;
   199                 TInt		iTextScrollPos;
   202                 TBool          iDelay;
   200                 TBool		iDelay;
   203                 TBool          iScroll;
   201                 TBool		iScroll;
   204                 TInt           iSrcTextLen;
   202                 TInt		iSrcTextLen;
   205         };
   203         };
   206 
   204 
   207     private:    // Data
   205     private:    // Data
   208 
   206         
   209         CMPXVideoPlaybackControlsController* iController;
   207         CMPXVideoPlaybackControlsController* iController;
   210 
   208         
   211         CEikLabel*                           iClipnameLabel;
   209         CEikLabel*                           iClipnameLabel;
   212         CEikLabel*                           iTitleLabel;
   210         CEikLabel*                           iTitleLabel;
   213         CEikLabel*                           iArtistLabel;
   211         CEikLabel*                           iArtistLabel;        
   214         CEikLabel*                           iFormatLabel;
   212         CEikLabel*                           iFormatLabel;
   215         CEikLabel*                           iResolutionLabel;
   213         CEikLabel*                           iResolutionLabel;
   216         CEikLabel*                           iDurationLabel;
   214         CEikLabel*                           iDurationLabel;
   217         CEikLabel*                           iBitrateLabel;
   215         CEikLabel*                           iBitrateLabel;
   218         CEikLabel*                           iLicenseLabel;
   216         CEikLabel*                           iLicenseLabel;
   219         CEikLabel*                           iAdditionalLabel;
   217         CEikLabel*                           iAdditionalLabel;
   220 
   218         
   221 
   219 
   222         CFbsBitmap*                          iBackgroundBitmap;
   220         CFbsBitmap*                          iBackgroundBitmap;   
   223         CPeriodic*                           iScrollingTextTimer;
   221         CPeriodic*                           iScrollingTextTimer;
   224         TRect                                iViewerRect;
   222         TRect                                iViewerRect;
   225         HBufC*                               iAdditionalString;
   223         HBufC*                               iAdditionalString;
   226         TTextScroller                        iFilenameScroller;
   224         TTextScroller                        iFilenameScroller;
   227         TTextScroller                        iTitleScroller;
   225         TTextScroller                        iTitleScroller;
   228         // after every scrolling label has updated, draw them
   226         // after every scrolling label has updated, draw them
   229         TBool                                iScrolledTextUpdated;
   227         TBool                                iScrolledTextUpdated; 
   230         TBool                                iDrmDetailsLaunched;
       
   231 };
   228 };
   232 
   229 
   233 
   230 
   234 
   231 
   235 #endif /* MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_ */
   232 #endif /* MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_ */