|
1 /* |
|
2 * Copyright (c) 2006 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: MPX Progressive Download playback view's container implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_CMPXPDSBPLAYBACKVIEWCONTAINER_H |
|
21 #define C_CMPXPDSBPLAYBACKVIEWCONTAINER_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <mpxplaybackcommanddefs.h> |
|
26 #include "mpxcommonplaybackviewcontainer.h" |
|
27 |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class MMPXLayoutSwitchObserver; |
|
31 class MMPXPlaybackViewLayout; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Container class for progressive download from browser playback view. |
|
37 * |
|
38 * @lib mpxpdsbplaybackview.lib |
|
39 * @since S60 v3.0 |
|
40 */ |
|
41 NONSHARABLE_CLASS( CMPXPdSbPlaybackViewContainer ) : public CMPXCommonPlaybackViewContainer |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * C++ default constructor. |
|
47 * |
|
48 * @param aLayoutObserver Observer to send layout switch events to. |
|
49 * @param aLayout Layout |
|
50 */ |
|
51 CMPXPdSbPlaybackViewContainer( |
|
52 MEikCommandObserver* aCommandObserver, |
|
53 MMPXLayoutSwitchObserver* aLayoutObserver, |
|
54 MMPXPlaybackViewLayout* aLayout ); |
|
55 |
|
56 /** |
|
57 * Symbian 2nd phase constructor. |
|
58 * |
|
59 * @param aRect Frame rectangle for container. |
|
60 */ |
|
61 void ConstructL( const TRect& aRect ); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 ~CMPXPdSbPlaybackViewContainer(); |
|
67 |
|
68 |
|
69 /** |
|
70 * Handles when the download position has changed |
|
71 */ |
|
72 void HandleDownloadPositionChanged( |
|
73 TInt aDownloadedBytes, |
|
74 TInt aTotalBytes ); |
|
75 |
|
76 // from MPXCommonPlaybackViewContainer |
|
77 /** |
|
78 * Redraw part of the screen to the bitmap context. |
|
79 * |
|
80 * @param aRect Area to be redrawn. |
|
81 * @param aGc Graphics context to draw to. |
|
82 */ |
|
83 void RedrawRect( |
|
84 const TRect& aRect, |
|
85 CBitmapContext& aGc) const; |
|
86 |
|
87 /** |
|
88 * From MPXCommonPlaybackViewContainer and CCoeControl. |
|
89 * Handle events from the touch screen. Overridden from Commonplayback view. |
|
90 * PdSbPlaybackview does not utilise pointer events, since EMC doesn't support |
|
91 * seeking from progressbar during progressive download. |
|
92 */ |
|
93 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
94 |
|
95 /** |
|
96 * Sets main pane mode. |
|
97 * |
|
98 * @since S60 3.0 |
|
99 * @param aMode Playback mode. |
|
100 */ |
|
101 void SetMode( TMPXPbvPlaybackMode aMode ); |
|
102 |
|
103 /** |
|
104 * Set layout for all elements and set sizes for icons. |
|
105 * |
|
106 * @since S60 3.0 |
|
107 */ |
|
108 void UpdateLayout(); |
|
109 |
|
110 // from base class CoeControl |
|
111 |
|
112 /** |
|
113 * From CoeControl. |
|
114 * Handles key events. |
|
115 * |
|
116 * @param aKeyEvent The key event. |
|
117 * @param aType The type of key event. |
|
118 */ |
|
119 TKeyResponse OfferKeyEventL( |
|
120 const TKeyEvent& aKeyEvent, |
|
121 TEventCode aType ); |
|
122 |
|
123 /** |
|
124 * From CoeControl. |
|
125 * Gets the control's help context. |
|
126 * |
|
127 * @param aContext The control's help context. |
|
128 */ |
|
129 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
130 |
|
131 }; |
|
132 |
|
133 #endif // C_CMPXPDSBPLAYBACKVIEWCONTAINER_H |
|
134 |
|
135 // End of File |