|
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 upnp playback view's container implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_CMPXUPNPPLAYBACKVIEWCONTAINER_H |
|
21 #define C_CMPXUPNPPLAYBACKVIEWCONTAINER_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include "mpxcommonplaybackviewcontainer.h" |
|
26 |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class MMPXLayoutSwitchObserver; |
|
30 class MMPXPlaybackViewLayout; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Container class for audio view. |
|
36 * |
|
37 * @lib mpxplaybackview.lib |
|
38 * @since S60 v3.0 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CMPXUPnPPlaybackViewContainer ) : public CMPXCommonPlaybackViewContainer |
|
41 { |
|
42 public: |
|
43 |
|
44 /** |
|
45 * C++ default constructor. |
|
46 * |
|
47 * @param aLayoutObserver Observer to send layout switch events to. |
|
48 * @param aIsEmbedded ETrue if Music Player is in embedded mode. |
|
49 */ |
|
50 CMPXUPnPPlaybackViewContainer( |
|
51 MEikCommandObserver* aCommandObserver, |
|
52 MMPXLayoutSwitchObserver* aLayoutObserver, |
|
53 MMPXPlaybackViewLayout* aLayout ); |
|
54 |
|
55 /** |
|
56 * Symbian 2nd phase constructor. |
|
57 * |
|
58 * @param aRect Frame rectangle for container. |
|
59 */ |
|
60 void ConstructL( const TRect& aRect ); |
|
61 |
|
62 /** |
|
63 * Destructor. |
|
64 */ |
|
65 ~CMPXUPnPPlaybackViewContainer(); |
|
66 |
|
67 /** |
|
68 * Set layout for all elements and set sizes for icons. |
|
69 * |
|
70 * @since S60 3.0 |
|
71 */ |
|
72 void UpdateLayout(); |
|
73 |
|
74 // from base class CoeControl |
|
75 |
|
76 /** |
|
77 * From CoeControl. |
|
78 * Handles key events. |
|
79 * |
|
80 * @param aKeyEvent The key event. |
|
81 * @param aType The type of key event. |
|
82 */ |
|
83 TKeyResponse OfferKeyEventL( |
|
84 const TKeyEvent& aKeyEvent, |
|
85 TEventCode aType ); |
|
86 |
|
87 /** |
|
88 * From CoeControl. |
|
89 * Gets the control's help context. |
|
90 * |
|
91 * @param aContext The control's help context. |
|
92 */ |
|
93 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
94 |
|
95 // from base class MMPXButtonCmdObserver |
|
96 |
|
97 /** |
|
98 * From MMPXButtonCmdObserver |
|
99 * Handle a button command. |
|
100 * @param aCommand Command id, as specified in the button constructor. |
|
101 */ |
|
102 void HandleButtonCommandL( TInt aCommand ); |
|
103 |
|
104 private: // new methods |
|
105 |
|
106 /** |
|
107 * Creates icons. |
|
108 */ |
|
109 void CreateIconsL(); |
|
110 |
|
111 /** |
|
112 * Redraw part of the screen to the bitmap context. |
|
113 * |
|
114 * @param aRect Area to be redrawn. |
|
115 * |
|
116 */ |
|
117 void RedrawRect( |
|
118 const TRect& aRect) const; |
|
119 |
|
120 |
|
121 |
|
122 private: // data |
|
123 |
|
124 CGulIcon* iRemotePlayerIcon; // owned |
|
125 TRect iRemotePlayerIconRect; |
|
126 TBool iRemotePlayerUsed; |
|
127 |
|
128 TKeyEvent iLastKeyEvent; |
|
129 TEventCode iLastKeyType; |
|
130 }; |
|
131 |
|
132 #endif // C_CMPXUPNPPLAYBACKVIEWCONTAINER_H |
|
133 |
|
134 // End of File |