|
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 implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_CMPXUPNPPLAYBACKVIEWIMP_H |
|
21 #define C_CMPXUPNPPLAYBACKVIEWIMP_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <akntoolbarobserver.h> |
|
26 #include "mpxupnpplaybackview.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CMPXUPnPPlaybackViewContainer; |
|
30 class CMPXUPnPPlaybackViewLayout; |
|
31 class CAknToolbar; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * MPX playback view. |
|
37 * |
|
38 * @lib mpxplaybackview.lib |
|
39 * @since S60 v3.0 |
|
40 */ |
|
41 NONSHARABLE_CLASS( CMPXUPnPPlaybackViewImp ) : public CMPXUPnPPlaybackView, |
|
42 public MAknToolbarObserver |
|
43 |
|
44 { |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * |
|
50 * @since 3.0 |
|
51 * @return Pointer to newly created object. |
|
52 */ |
|
53 static CMPXUPnPPlaybackViewImp* NewL(); |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 * |
|
58 * @since 3.0 |
|
59 * @return Pointer to newly created object. |
|
60 */ |
|
61 static CMPXUPnPPlaybackViewImp* NewLC(); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 ~CMPXUPnPPlaybackViewImp(); |
|
67 |
|
68 private: |
|
69 |
|
70 /** |
|
71 * C++ default constructor. |
|
72 */ |
|
73 CMPXUPnPPlaybackViewImp(); |
|
74 |
|
75 /** |
|
76 * By default Symbian 2nd phase constructor is private. |
|
77 */ |
|
78 void ConstructL(); |
|
79 |
|
80 /** |
|
81 * Handle playback message |
|
82 * |
|
83 * @param aMessage playback message |
|
84 */ |
|
85 void DoHandlePlaybackMessageL( |
|
86 const CMPXMessage& aMessage ); |
|
87 |
|
88 /** |
|
89 * Handle playback state changed. |
|
90 * |
|
91 * @param aState New Playback state |
|
92 * @param aData Extra data parameter, used for any extra information |
|
93 * along with the state change message |
|
94 */ |
|
95 void DoHandleStateChangedL( |
|
96 TMPXPlaybackState aState, |
|
97 TInt aData ); |
|
98 |
|
99 /** |
|
100 * Retrieves the current player name and updates the Label |
|
101 */ |
|
102 void UpdateTitlePaneL(); |
|
103 |
|
104 /** |
|
105 * Updates track info field. |
|
106 * |
|
107 * @param aMedia Media's properties. If NULL, default info will |
|
108 * be shown. |
|
109 */ |
|
110 void UpdateTrackInfoL( const CMPXMedia* aMedia ); |
|
111 |
|
112 |
|
113 // from base class MEikMenuObserver |
|
114 |
|
115 /** |
|
116 * From MEikMenuObserver |
|
117 * Dynamically initialises a menu pane. |
|
118 * |
|
119 * @param aResourceId The ID of the menu pane. |
|
120 * @param aMenuPane The menu pane itself. |
|
121 */ |
|
122 void DynInitMenuPaneL( |
|
123 TInt aResourceId, |
|
124 CEikMenuPane* aMenuPane ); |
|
125 |
|
126 |
|
127 // from base class CAknView |
|
128 |
|
129 /** |
|
130 * From CAknView |
|
131 * Returns views id. |
|
132 * |
|
133 * @since 3.0 |
|
134 * @return Views Uid |
|
135 */ |
|
136 TUid Id() const; |
|
137 |
|
138 /** |
|
139 * From CAknView |
|
140 * Command handling function. |
|
141 * |
|
142 * @since 3.0 |
|
143 * @param aCommand Command which is handled |
|
144 */ |
|
145 void HandleCommandL( TInt aCommand ); |
|
146 |
|
147 /** |
|
148 * From CAknView |
|
149 * Processes user commands. |
|
150 * |
|
151 * @since 3.0 |
|
152 * @param aCommand ID of the command to respond to. |
|
153 */ |
|
154 void ProcessCommandL( TInt aCommand ); |
|
155 |
|
156 /** |
|
157 * From CAknView |
|
158 * Handles a view activation. |
|
159 * |
|
160 * @param aPrevViewId Specifies the view previously active. |
|
161 * @param aCustomMessageId Specifies the message type. |
|
162 * @param aCustomMessage The activation message. |
|
163 */ |
|
164 void DoActivateL( |
|
165 const TVwsViewId& aPrevViewId, |
|
166 TUid aCustomMessageId, |
|
167 const TDesC8& aCustomMessage ); |
|
168 |
|
169 /** |
|
170 * Displays a wait note when callback from CIdle |
|
171 */ |
|
172 static TInt LoadingSong( TAny* aPtr ); |
|
173 |
|
174 /** |
|
175 * Displays a wait note |
|
176 */ |
|
177 void LoadingSongL(); |
|
178 |
|
179 /** |
|
180 * Dismisses loading song wait note |
|
181 */ |
|
182 void DismissWaitNoteL(); |
|
183 |
|
184 /** |
|
185 * Displays error notes. |
|
186 * |
|
187 * @param aError Error ID to be handled. |
|
188 */ |
|
189 void HandleErrorL( TInt aError ); |
|
190 |
|
191 // from base class MProgressDialogCallback |
|
192 /** |
|
193 * From MProgressDialogCallback |
|
194 * Callback method |
|
195 * Get's called when a dialog is dismissed. |
|
196 */ |
|
197 void DialogDismissedL( TInt aButtonId ); |
|
198 |
|
199 /** |
|
200 * From MAknToolbarObserver |
|
201 * Processes user commands. |
|
202 * |
|
203 * @since 5.0 |
|
204 * @param aCommand ID of the command to respond to. |
|
205 */ |
|
206 void OfferToolbarEventL( TInt aCommandId ); |
|
207 |
|
208 /** |
|
209 * From MAknToolbarObserver |
|
210 * Used to change toolbar settings before it is made visible |
|
211 * |
|
212 * @since 5.0 |
|
213 * @param aResourceId The ID of the menu pane. |
|
214 * @param aToolBar The ToolBar itself. |
|
215 */ |
|
216 void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolBar ); |
|
217 |
|
218 private: // data |
|
219 CMPXUPnPPlaybackViewLayout* iPlaybackViewLayout; // owned |
|
220 TInt iUpnpResourceOffset; // must be freed |
|
221 |
|
222 CIdle* iLoadingWaitNote; // Owned |
|
223 TBool iUPnPLoadingWaitNoteDisplayed; |
|
224 TBool iPodcastPlayback; |
|
225 CAknToolbar* iToolbar; //owned |
|
226 }; |
|
227 |
|
228 #endif // C_CMPXUPNPPLAYBACKVIEWIMP_H |
|
229 |
|
230 // End of File |