|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of CMPXVideoPlaybackControl |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 3 % |
|
19 |
|
20 |
|
21 #ifndef MPXPLAYBACKCONTROL_H_ |
|
22 #define MPXPLAYBACKCONTROL_H_ |
|
23 |
|
24 // INCLUDES |
|
25 #include <coecntrl.h> |
|
26 #include <mpxplaybackframeworkdefs.h> |
|
27 |
|
28 #include "mpxhelixplaybackplugindefs.h" |
|
29 #include "mpxvideoplaybackcontrol.hrh" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CMPXVideoPlaybackControlsController; |
|
33 class CMPXVideoPlaybackViewFileDetails; |
|
34 |
|
35 #ifdef RD_TACTILE_FEEDBACK |
|
36 class MTouchFeedback; |
|
37 #endif //RD_TACTILE_FEEDBACK |
|
38 |
|
39 // DATA TYPES |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 class CMPXVideoPlaybackControl : public CCoeControl |
|
44 { |
|
45 |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 static CMPXVideoPlaybackControl* NewL( CMPXVideoPlaybackControlsController* aController, |
|
52 CCoeControl* aControl, |
|
53 TRect aRect, |
|
54 TMPXVideoPlaybackControls aControlIndex, |
|
55 TUint aProperties ); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CMPXVideoPlaybackControl(); |
|
61 |
|
62 protected: |
|
63 |
|
64 /** |
|
65 * C++ default constructor. |
|
66 */ |
|
67 CMPXVideoPlaybackControl( CMPXVideoPlaybackControlsController* aController, |
|
68 CCoeControl* aControl, |
|
69 TMPXVideoPlaybackControls aControlIndex, |
|
70 TUint aProperties ); |
|
71 |
|
72 /** |
|
73 * Symbian 2nd phase constructor. |
|
74 */ |
|
75 void ConstructL( TRect aRect ); |
|
76 |
|
77 protected: |
|
78 |
|
79 /** |
|
80 * From CCoeControl. |
|
81 * Gets the number of controls contained in a compound control. |
|
82 * |
|
83 * @return The number of component controls contained by this control. |
|
84 */ |
|
85 TInt CountComponentControls() const; |
|
86 |
|
87 /** |
|
88 * From CCoeControl. |
|
89 * Gets an indexed component of a compound control. |
|
90 * |
|
91 * @param aIndex The index of the control. |
|
92 * @return The component control with an index of aIndex. |
|
93 */ |
|
94 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
95 |
|
96 /** |
|
97 * From CCoeControl,Draw. |
|
98 * @param aRect drawable area. |
|
99 */ |
|
100 void Draw(const TRect& aRect) const; |
|
101 |
|
102 /** |
|
103 * From CCoeControl. |
|
104 * Handle events from the touch screen |
|
105 */ |
|
106 void HandlePointerEventL( const TPointerEvent& aPointerEvent); |
|
107 |
|
108 public: |
|
109 |
|
110 /** |
|
111 * Set visibility of each control |
|
112 */ |
|
113 void SetVisibility( TMPXPlaybackState aState ); |
|
114 |
|
115 /** |
|
116 * return control index |
|
117 */ |
|
118 TMPXVideoPlaybackControls ControlIndex(); |
|
119 |
|
120 /** |
|
121 * set changed volume |
|
122 */ |
|
123 TBool VolumeChanged( TInt aVolume ); |
|
124 |
|
125 /** |
|
126 * set changed duration |
|
127 */ |
|
128 TBool DurationChangedL( TInt aDuration ); |
|
129 |
|
130 /** |
|
131 * set changed volume |
|
132 */ |
|
133 TBool PositionChangedL( TInt aPosition ); |
|
134 |
|
135 /** |
|
136 * Set changed position |
|
137 */ |
|
138 TBool AspectRatioChanged( TInt aAspectRatio ); |
|
139 |
|
140 /** |
|
141 * set changed volume |
|
142 */ |
|
143 TBool SetDownloadSize( TInt aSize ); |
|
144 |
|
145 /** |
|
146 * set changed state |
|
147 */ |
|
148 TBool UpdateStateOnButtonBar( TMPXPlaybackState aState ); |
|
149 |
|
150 /* |
|
151 * UpdateDownloadPosition |
|
152 * updates the download ratio on the progress bar |
|
153 */ |
|
154 TBool UpdateDownloadPosition( TInt aSize ); |
|
155 |
|
156 /* |
|
157 * Update the controls with the file details |
|
158 */ |
|
159 void UpdateControlsWithFileDetailsL( CMPXVideoPlaybackViewFileDetails* aDetails ); |
|
160 |
|
161 /** |
|
162 * Set the visibility of the control to false unless it is a PDL control |
|
163 */ |
|
164 void HideControl(); |
|
165 |
|
166 /* |
|
167 * Stop Animation Branding Timer |
|
168 */ |
|
169 TBool StopBrandingAnimationTimer(); |
|
170 |
|
171 IMPORT_C void DoHandlePointerEventL( const TPointerEvent& aPointerEvent ); |
|
172 |
|
173 void ResetControl(); |
|
174 |
|
175 protected: |
|
176 |
|
177 CMPXVideoPlaybackControlsController* iController; |
|
178 CCoeControl* iControl; |
|
179 TMPXVideoPlaybackControls iControlIndex; |
|
180 TUint iProperties; |
|
181 TMPXVideoMode iPlaybackMode; |
|
182 |
|
183 #ifdef RD_TACTILE_FEEDBACK |
|
184 MTouchFeedback* iFeedback; |
|
185 #endif //RD_TACTILE_FEEDBACK |
|
186 |
|
187 }; |
|
188 |
|
189 #endif /*MPXPLAYBACKCONTROL_H_*/ |
|
190 |
|
191 // End of File |