|
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 collection view implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CMPXCOLLECTIONVIEWHGIMP_H |
|
20 #define C_CMPXCOLLECTIONVIEWHGIMP_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <eikclb.h> |
|
24 #include <AknProgressDialog.h> // MProgressDialogCallback |
|
25 #include <eikprogi.h> |
|
26 #include <mpxmediageneraldefs.h> |
|
27 #include <mpxcollectionobserver.h> |
|
28 #include <mpxplaybackobserver.h> |
|
29 #include <mpxcollectionuihelper.h> |
|
30 #include <mpxcollectionuihelperobserver.h> |
|
31 #include <mpxcollectionhelper.h> |
|
32 #include <mpxcollectionpath.h> // TMPXItemId |
|
33 #include <mpxviewactivationobserver.h> |
|
34 #include "mpxcbahandler.h" |
|
35 |
|
36 #include "mpxcollectionviewhg.h" |
|
37 #include "mpxplaybackframeworkdefs.h" // TMPXPlaybackPlayerType |
|
38 #include "mpxwaitnotedefs.h" |
|
39 |
|
40 // FORWARD DECLARATIONS |
|
41 class CAiwGenericParamList; |
|
42 class CAiwServiceHandler; |
|
43 class CAknNaviLabel; |
|
44 class CAknNavigationControlContainer; |
|
45 class CAknNavigationDecorator; |
|
46 class CAknQueryDialog; |
|
47 class CEikButtonGroupContainer; |
|
48 class CMPXCollectionOpenUtility; |
|
49 class CMPXCollectionPlaylist; |
|
50 class CMPXCollectionViewHgContainer; |
|
51 class CMPXCommonUiHelper; |
|
52 class CMediaRecognizer; |
|
53 class CMediatorCommandInitiator; |
|
54 class CSendUi; |
|
55 class CUpnpCopyCommand; |
|
56 class MMPXBackSteppingUtility; |
|
57 class MMPXCollectionUtility; |
|
58 class MMPXPlaybackUtility; |
|
59 class MMPXPlayerManager; |
|
60 class MMPXViewUtility; |
|
61 class MProfileEngine; |
|
62 // CLASS DECLARATION |
|
63 |
|
64 /** |
|
65 * MPX collection view. |
|
66 * |
|
67 * @lib mpxcollectionview.lib |
|
68 * @since S60 v3.1 |
|
69 */ |
|
70 NONSHARABLE_CLASS( CMPXCollectionViewHgImp ) : public CMPXCollectionViewHg, |
|
71 public MMPXCollectionObserver, |
|
72 public MMPXPlaybackObserver, |
|
73 public MMPXPlaybackCallback, |
|
74 public MEikListBoxObserver, |
|
75 public MProgressDialogCallback, |
|
76 public MMPXCollectionFindObserver, |
|
77 public MMPXCollectionHelperObserver, |
|
78 public MMPXCHelperObserver, |
|
79 public MMPXViewActivationObserver, |
|
80 public MCoeViewDeactivationObserver, |
|
81 public MCoeViewActivationObserver, |
|
82 public MMpxCbaHandler |
|
83 { |
|
84 public: |
|
85 |
|
86 /** |
|
87 * Two-phased constructor. |
|
88 * |
|
89 * @since 3.0 |
|
90 * @return Pointer to newly created object. |
|
91 */ |
|
92 static CMPXCollectionViewHgImp* NewL(); |
|
93 |
|
94 /** |
|
95 * Two-phased constructor. |
|
96 * |
|
97 * @since 3.0 |
|
98 * @return Pointer to newly created object. |
|
99 */ |
|
100 static CMPXCollectionViewHgImp* NewLC(); |
|
101 |
|
102 /** |
|
103 * Destructor. |
|
104 */ |
|
105 virtual ~CMPXCollectionViewHgImp(); |
|
106 |
|
107 /** |
|
108 * Launch music shop application. |
|
109 * |
|
110 * @ since 3.1 |
|
111 */ |
|
112 void LaunchMusicShopL(); |
|
113 |
|
114 |
|
115 private: |
|
116 |
|
117 /** |
|
118 * C++ constructor. |
|
119 */ |
|
120 CMPXCollectionViewHgImp(); |
|
121 |
|
122 /** |
|
123 * By default Symbian 2nd phase constructor is private. |
|
124 */ |
|
125 void ConstructL(); |
|
126 |
|
127 /** |
|
128 * Delete the selected items |
|
129 * @param aCommand the command that triggered the deletion |
|
130 * |
|
131 */ |
|
132 void DeleteSelectedItemsL(TInt aCommand); |
|
133 |
|
134 /** |
|
135 * Updates list box |
|
136 * |
|
137 * @param aEntries collection entries opened |
|
138 * @param aIndex focused entry |
|
139 * @param aComplete ETrue no more entries. EFalse more entries |
|
140 * expected |
|
141 */ |
|
142 void UpdateListBoxL( |
|
143 const CMPXMedia& aEntries, |
|
144 TInt aIndex, |
|
145 TBool aComplete); |
|
146 |
|
147 /** |
|
148 * Displays error notes. |
|
149 * |
|
150 * @param aError Error code to be handled. |
|
151 */ |
|
152 void HandleError( TInt aError ); |
|
153 |
|
154 /** |
|
155 * Updates the navi pane |
|
156 */ |
|
157 void UpdateNaviPaneL(); |
|
158 |
|
159 /** |
|
160 * Updates the title pane |
|
161 */ |
|
162 void UpdateTitlePaneL(); |
|
163 |
|
164 /** |
|
165 * Update navi pane in reorder mode |
|
166 */ |
|
167 void UpdateReorderNaviPaneL(); |
|
168 |
|
169 /** |
|
170 * Updates playback status/indicator |
|
171 * Returns the current selection index of now playing song |
|
172 * if a match is found in current context |
|
173 * |
|
174 * @return Index of the song that is currently playing |
|
175 */ |
|
176 TInt UpdatePlaybackStatusL(); |
|
177 |
|
178 /** |
|
179 * Start either the refresh or scanning note |
|
180 */ |
|
181 void StartWaitNoteL( TWaitNoteType aNoteType ); |
|
182 |
|
183 /** |
|
184 * Start either the delete progress note |
|
185 * |
|
186 */ |
|
187 void StartProgressNoteL(); |
|
188 |
|
189 /** |
|
190 * Updates the progress note text and progress bar |
|
191 * |
|
192 * @param aProgress Indicates the portion of the process completed |
|
193 * @param aProgressText Text to be displayed on the progress note |
|
194 */ |
|
195 void UpdateProcessL( TInt aProgress, const TDesC& aProgressText ); |
|
196 |
|
197 /** |
|
198 * Close a wait note |
|
199 */ |
|
200 void CloseWaitNoteL(); |
|
201 |
|
202 /** |
|
203 * Activates reorder mode |
|
204 */ |
|
205 void ActivateReorderGrabbedModeL(); |
|
206 |
|
207 /** |
|
208 * Deactivates reorder mode |
|
209 * |
|
210 * @param aExit ETrue to exit reorder mode, EFalse otherwise |
|
211 */ |
|
212 void DeactivateReorderGrabbedModeL( TBool aExit ); |
|
213 |
|
214 /** |
|
215 * Change the button group |
|
216 * |
|
217 * @param aResId resource ID |
|
218 */ |
|
219 void SetNewCbaL( TInt aResId ); |
|
220 |
|
221 /** |
|
222 * Display the details dialog |
|
223 * |
|
224 * @param aDataArray Array containing the data to display |
|
225 * @param aDialogResourceId Resource defination for the dialog |
|
226 * @param aTitleResourceId Resource defination for the title of the dialog |
|
227 */ |
|
228 void DisplayDetailsDialogL( MDesC16Array& aDataArray, |
|
229 TInt aDialogResourceId, TInt aTitleResourceId ); |
|
230 |
|
231 /** |
|
232 * Display collection details |
|
233 * |
|
234 * @param aMedia media object containing the library details |
|
235 */ |
|
236 void DoShowCollectionDetailsL( const CMPXMedia& aMedia ); |
|
237 |
|
238 /** |
|
239 * Display playlist details |
|
240 * |
|
241 * @param aMedia media object containing the playlist details |
|
242 */ |
|
243 void DoShowPlaylistDetailsL( const CMPXMedia& aMedia ); |
|
244 |
|
245 /** |
|
246 * Handles Upnp menus from DynInitMenuPaneL() |
|
247 * |
|
248 * @param aResourceId Resource id of the option menu |
|
249 * @param aMenuPane Reference to the menu pane |
|
250 */ |
|
251 void HandleDynInitUpnpL( TInt aResourceId, CEikMenuPane& aMenuPane ); |
|
252 |
|
253 /** |
|
254 * Checks if UPnP AP is defined |
|
255 * |
|
256 * @return ETrue if visible, EFalse otherwise |
|
257 */ |
|
258 TBool IsUpnpVisible(); |
|
259 |
|
260 /** |
|
261 * Displays the available players in the Play via submenu |
|
262 * |
|
263 * @param aMenuPane Menu pane to put the sub menu items |
|
264 */ |
|
265 void AddPlayersNamesToMenuL( CEikMenuPane& aMenuPane ); |
|
266 |
|
267 /** |
|
268 * Adds one player type to the Play via submenu |
|
269 * |
|
270 * @param aMenuPane menu pane to add player name to |
|
271 * @param aCommandId ID of the command |
|
272 * @param aPlayerManager player manager |
|
273 * @param aPlayerType type of the player |
|
274 * @param aMenuText optional menu text |
|
275 */ |
|
276 void AddPlayerNameToMenuL( CEikMenuPane& aMenuPane, |
|
277 TInt aCommandId, |
|
278 MMPXPlayerManager& aPlayerManager, |
|
279 TMPXPlaybackPlayerType& aPlayerType, |
|
280 const TDesC& aMenuText = KNullDesC ); |
|
281 |
|
282 /** |
|
283 * Retrieves the current player name and type |
|
284 */ |
|
285 void GetCurrentPlayerDetails(); |
|
286 |
|
287 /** |
|
288 * Selects a new player for audio playback |
|
289 * |
|
290 * @param aCommand Command Id to identify which player to use |
|
291 */ |
|
292 void SelectNewPlayerL( TInt aCommand ); |
|
293 |
|
294 /** |
|
295 * Copies selected file(s) to remote player |
|
296 */ |
|
297 void CopySelectedItemsToRemoteL(); |
|
298 |
|
299 /** |
|
300 * Handle call back from collectionframework for Copy to Remote command |
|
301 * |
|
302 * @param aMedia media |
|
303 * @param aComplete all selected medias have been found |
|
304 */ |
|
305 void DoHandleCopyToRemoteL( |
|
306 const CMPXMedia& aMedia, TBool aComplete = ETrue ); |
|
307 |
|
308 |
|
309 /** |
|
310 * Create and launch the search URL page to the Service |
|
311 * @param song name, artistname, album name |
|
312 */ |
|
313 void DoFindInMusicShopL(const TDesC& aSongName, |
|
314 const TDesC& aArtistName, |
|
315 const TDesC& aAlbumName ); |
|
316 |
|
317 /** |
|
318 * Parameter passed in from viewframework |
|
319 * |
|
320 * @param aParam Parameter pass in from viewframework. |
|
321 */ |
|
322 void SetParamL( const TDesC* aParam ); |
|
323 |
|
324 /** |
|
325 * Get media property for the current song |
|
326 */ |
|
327 void DoGetSongMediaPropertyL(); |
|
328 |
|
329 /** |
|
330 * Find playlists |
|
331 * |
|
332 * @return the number of playlist in the system |
|
333 */ |
|
334 TInt FindPlaylistsL(); |
|
335 |
|
336 /** |
|
337 * Save the changes to the playlist that is currently displaying |
|
338 */ |
|
339 void SaveCurrentPlaylistL(); |
|
340 |
|
341 /** |
|
342 * Handles rename operation complete |
|
343 */ |
|
344 void HandleRenameOpCompleteL(); |
|
345 |
|
346 /** |
|
347 * Checks if send option should be shown |
|
348 * |
|
349 * @return ETrue if send command should be hiden, EFalse if it should be shown |
|
350 */ |
|
351 TBool SendOptionVisibilityL(); |
|
352 |
|
353 /** |
|
354 * Checks if Set as ringtone option should be shown |
|
355 * |
|
356 * @return ETrue if the command should be hiden, EFalse if it should be shown |
|
357 */ |
|
358 TBool SetAsRingToneOptionVisibilityL(); |
|
359 |
|
360 /** |
|
361 * Checks if file details option should be shown |
|
362 * |
|
363 * @return ETrue if the command should be hiden, EFalse if it should be shown |
|
364 */ |
|
365 TBool FileDetailsOptionVisibilityL(); |
|
366 |
|
367 /** |
|
368 * Handle send command |
|
369 */ |
|
370 void DoSendL(); |
|
371 |
|
372 /** |
|
373 * Handle send playlist command |
|
374 * |
|
375 * @param aItemId playlist id |
|
376 */ |
|
377 void DoSendPlaylistL( TMPXItemId aItemId ); |
|
378 |
|
379 /** |
|
380 * Handle call back from collectionframework for send command |
|
381 * |
|
382 * @param aMedia media |
|
383 */ |
|
384 void DoHandleSendL( const CMPXMedia& aMedia ); |
|
385 |
|
386 /** |
|
387 * Handle rename command |
|
388 */ |
|
389 void DoHandleRenameL(); |
|
390 |
|
391 /** |
|
392 * Prepares media object for selected items |
|
393 * |
|
394 * @param aMedia on return, populates the media object with a media array |
|
395 * containing info for currently selected items used by playlist |
|
396 * does not own this object |
|
397 */ |
|
398 void PrepareMediaForSelectedItemsL( CMPXMedia& aMedia ); |
|
399 |
|
400 /** |
|
401 * Populates media object with information needed for save to |
|
402 * existing playlist |
|
403 * |
|
404 * @param aMedia media object containing the entry |
|
405 * @param aCollectionId Id for collection containing the object |
|
406 * @return Media object needed for save to playlist operation |
|
407 */ |
|
408 CMPXMedia* PopulateMediaLC( const CMPXMedia& aMedia, TMPXItemId aCollectionId ); |
|
409 |
|
410 /** |
|
411 * Handle rename playlist command |
|
412 * @param aMedia media |
|
413 */ |
|
414 void DoHandleRenamePlaylistL( const CMPXMedia& aMedia ); |
|
415 |
|
416 /** |
|
417 * Set/clears the flags for item in database |
|
418 * @param aIndex index of the item in the list box |
|
419 * @param aMedia media object containing at least the following attribute: |
|
420 * TMPXAttribute( KMPXMediaIdGeneral,EMPXMediaGeneralCollectionId ) |
|
421 * @param aFlag flag to set/clear |
|
422 * @param aSet ETrue to set the flag, EFalse to clear the flag |
|
423 * @param aEnableInfoDialog ETrue to enable info dialog display, EFalse to disable |
|
424 */ |
|
425 void UpdateDatabaseFlagL( TInt aIndex, const CMPXMedia& aMedia, |
|
426 TUint aFlag, TBool aSet, TBool aEnableInfoDialog = ETrue ); |
|
427 |
|
428 /** |
|
429 * Get duration of current view |
|
430 */ |
|
431 void GetDurationL(); |
|
432 |
|
433 /** |
|
434 * Handles file check result |
|
435 * |
|
436 * @param aViewToActivate View to activate if the result is ok |
|
437 * @param aMedia Media object containing the information |
|
438 */ |
|
439 void DoHandleFileCheckResultL( TUid aViewToActivate, const CMPXMedia& aMedia ); |
|
440 |
|
441 #ifdef __ENABLE_MSK |
|
442 /** |
|
443 * Updates the middle softkey display to a label or icon depending on |
|
444 * whether there are marked indices |
|
445 * @param aMskId middle softkey command id |
|
446 */ |
|
447 void UpdateMiddleSoftKeyDisplayL( TInt aMskId ); |
|
448 #endif // __ENABLE_MSK |
|
449 |
|
450 /** |
|
451 * Handles the completion of adding a playlist event. |
|
452 * @param aPlaylist, a media object representing the exported |
|
453 * playlist. The content of this object is the same |
|
454 * as what's supplied in AddPlaylistL, except that |
|
455 * URI for the playlist file is added to the object |
|
456 * upon successful processing of AddPlaylistL. Client |
|
457 * should take over the ownership of this object. NULL |
|
458 * if an error has occured while processing AddPlaylistL. |
|
459 * @param aError. the error code for AddPlaylistL processing |
|
460 * error. |
|
461 */ |
|
462 void HandleAddCompletedL( CMPXMedia* aPlaylist, TInt aError ); |
|
463 |
|
464 /** |
|
465 * Handles the completion of setting a media event. |
|
466 * @param aMedia, a media object representing the updated media. |
|
467 * @param aError. the error code for SetL processing error. |
|
468 */ |
|
469 void HandleSetCompletedL( CMPXMedia* aMedia, TInt aError ); |
|
470 |
|
471 /** |
|
472 * Handle playback message |
|
473 * |
|
474 * @param aMessage playback message |
|
475 */ |
|
476 void DoHandlePlaybackMessageL( const CMPXMessage& aMessage ); |
|
477 |
|
478 /** |
|
479 * Handle collection message |
|
480 * |
|
481 * @param aMessage collection message |
|
482 */ |
|
483 void DoHandleCollectionMessageL( const CMPXMessage& aMessage ); |
|
484 |
|
485 /** |
|
486 * Calls to Re-open the collection view |
|
487 * @param aShowWaitDlg show the "opening" dialog or not |
|
488 */ |
|
489 void DoIncrementalOpenL( TBool aShowWaitDlg = ETrue ); |
|
490 |
|
491 /** |
|
492 * Start wait note for delayed action due to the items not ready |
|
493 * (incremental openL change) |
|
494 * |
|
495 * @param aCommand the action to be executed when the items become ready |
|
496 * @param aNote text for wait note |
|
497 * @param aSkipDisplay flag use to determine if waitnote should be displayed or not |
|
498 */ |
|
499 void StartDelayedActionL( TInt aCommand, TDesC& aNote, TBool aSkipDisplay = EFalse ); |
|
500 |
|
501 // from base class MProgressDialogCallback |
|
502 |
|
503 /** |
|
504 * From MProgressDialogCallback |
|
505 * Callback method |
|
506 * Get's called when a dialog is dismissed. |
|
507 * |
|
508 * @param aButtonId Button pressed when the dialog is dismissed |
|
509 */ |
|
510 void DialogDismissedL( TInt aButtonId ); |
|
511 |
|
512 // from base class MMPXCollectionObserver |
|
513 |
|
514 /** |
|
515 * From MMPXCollectionObserver |
|
516 * Handle collection message. |
|
517 * |
|
518 * @param aMessage Collection message |
|
519 * @param aErr system error code. |
|
520 */ |
|
521 void HandleCollectionMessage( |
|
522 CMPXMessage* aMessage, TInt aError ); |
|
523 |
|
524 /** |
|
525 * From MMPXCollectionObserver |
|
526 * Handles the collection entries being opened. Typically called |
|
527 * when client has Open()'d a folder |
|
528 * |
|
529 * @param aEntries collection entries opened |
|
530 * @param aIndex focused entry |
|
531 * @param aComplete ETrue no more entries. EFalse more entries |
|
532 * expected |
|
533 * @param aError error code |
|
534 */ |
|
535 void HandleOpenL( |
|
536 const CMPXMedia& aEntries, |
|
537 TInt aIndex, |
|
538 TBool aComplete, |
|
539 TInt aError ); |
|
540 |
|
541 /** |
|
542 * From MMPXCollectionObserver |
|
543 * Handles the collection entries being opened. Typically called |
|
544 * when client has Open()'d an item. Client typically responds by |
|
545 * 'playing' the item |
|
546 * |
|
547 * @param aPlaylist collection path to item |
|
548 * @param aError error code |
|
549 */ |
|
550 void HandleOpenL( |
|
551 const CMPXCollectionPlaylist& aPlaylist, |
|
552 TInt aError ); |
|
553 |
|
554 /** |
|
555 * From MMPXCollectionObserver |
|
556 * Handle media properties |
|
557 * |
|
558 * @param aMedia media |
|
559 * @param aError error code |
|
560 */ |
|
561 void HandleCollectionMediaL( |
|
562 const CMPXMedia& aMedia, |
|
563 TInt aError ); |
|
564 |
|
565 /** |
|
566 * From MMPXCollectionObserver |
|
567 */ |
|
568 void HandleCommandComplete(CMPXCommand* aCommandResult, |
|
569 TInt aError); |
|
570 |
|
571 // from base class MMPXCollectionHelperObserver |
|
572 |
|
573 /** |
|
574 * From MMPXCollectionHelperObserver |
|
575 * Callback function to signal that adding a file is complete |
|
576 * |
|
577 * @param aError, error of the operation |
|
578 */ |
|
579 void HandleAddFileCompleteL( TInt aErr ); |
|
580 |
|
581 // from base class MMPXCHelperObserver |
|
582 |
|
583 /** |
|
584 * From MMPXCHelperObserver |
|
585 * Handles the completion of any collection helper event. |
|
586 * |
|
587 * @param aOperation, operation completed |
|
588 * @param aErr. the error code |
|
589 * @param aArgument Argument returned from the operation |
|
590 */ |
|
591 void HandleOperationCompleteL( TCHelperOperation aOperation, |
|
592 TInt aErr, |
|
593 void* aArgument ); |
|
594 |
|
595 // from base class MMPXPlaybackObserver |
|
596 |
|
597 /** |
|
598 * From MMPXPlaybackObserver |
|
599 * Handle playback message |
|
600 * |
|
601 * @param aMessage playback message |
|
602 * @param aErr system error code. |
|
603 */ |
|
604 void HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError ); |
|
605 |
|
606 // from base class MMPXPlaybackCallback |
|
607 |
|
608 /** |
|
609 * From MMPXPlaybackCallback |
|
610 * Handle playback property |
|
611 * |
|
612 * @param aProperty the property |
|
613 * @param aValue the value of the property |
|
614 * @param aError error code |
|
615 */ |
|
616 void HandlePropertyL( |
|
617 TMPXPlaybackProperty aProperty, |
|
618 TInt aValue, |
|
619 TInt aError ); |
|
620 |
|
621 /** |
|
622 * From MMPXPlaybackCallback |
|
623 * Method is called continously until aComplete=ETrue, signifying that |
|
624 * it is done and there will be no more callbacks |
|
625 * Only new items are passed each time |
|
626 * |
|
627 * @param aPlayer UID of the player |
|
628 * @param aSubPlayers a list of sub players |
|
629 * @param aComplete ETrue no more sub players. EFalse more subplayer |
|
630 * expected |
|
631 * @param aError error code |
|
632 */ |
|
633 void HandleSubPlayerNamesL( |
|
634 TUid aPlayer, |
|
635 const MDesCArray* aSubPlayers, |
|
636 TBool aComplete, |
|
637 TInt aError ); |
|
638 |
|
639 /** |
|
640 * From MMPXPlaybackCallback |
|
641 * Handle media properties |
|
642 * |
|
643 * @param aMedia media |
|
644 * @param aError error code |
|
645 */ |
|
646 void HandleMediaL( |
|
647 const CMPXMedia& aMedia, |
|
648 TInt aError ); |
|
649 |
|
650 // from base class CAknView |
|
651 |
|
652 /** |
|
653 * From CAknView |
|
654 * Returns views id. |
|
655 * |
|
656 * @return Views Uid |
|
657 */ |
|
658 TUid Id() const; |
|
659 |
|
660 /** |
|
661 * From CAknView |
|
662 * Command handling function. |
|
663 * |
|
664 * @param aCommand Command which is handled |
|
665 */ |
|
666 void HandleCommandL( TInt aCommand ); |
|
667 |
|
668 /** |
|
669 * From CAknView |
|
670 * Called when status pane layout has changed |
|
671 */ |
|
672 void HandleStatusPaneSizeChange(); |
|
673 |
|
674 /** |
|
675 * From CAknView |
|
676 * Handles a view activation. |
|
677 * |
|
678 * @param aPrevViewId Specifies the view previously active. |
|
679 * @param aCustomMessageId Specifies the message type. |
|
680 * @param aCustomMessage The activation message. |
|
681 */ |
|
682 void DoActivateL( |
|
683 const TVwsViewId& aPrevViewId, |
|
684 TUid aCustomMessageId, |
|
685 const TDesC8& aCustomMessage ); |
|
686 |
|
687 /** |
|
688 * From CAknView |
|
689 * View deactivation function. |
|
690 */ |
|
691 void DoDeactivate(); |
|
692 |
|
693 /** |
|
694 * From CAknView |
|
695 * Foreground event handling function. |
|
696 * |
|
697 * @param aForeground Indicates the required focus state of the control. |
|
698 */ |
|
699 void HandleForegroundEventL( TBool aForeground ); |
|
700 |
|
701 // from base class MEikMenuObserver |
|
702 |
|
703 /** |
|
704 * From MEikMenuObserver |
|
705 * Dynamically initialises a menu pane. |
|
706 * |
|
707 * @param aResourceId The ID of the menu pane. |
|
708 * @param aMenuPane The menu pane itself. |
|
709 */ |
|
710 void DynInitMenuPaneL( |
|
711 TInt aResourceId, |
|
712 CEikMenuPane* aMenuPane ); |
|
713 |
|
714 // from MEikListBoxObserver |
|
715 |
|
716 /** |
|
717 * From MEikListBoxObserver |
|
718 * Handles listbox events. |
|
719 * |
|
720 * @param aListBox Listbox where the event occurred. |
|
721 * @param aEventType Event type. |
|
722 */ |
|
723 void HandleListBoxEventL( |
|
724 CEikListBox* aListBox, |
|
725 TListBoxEvent aEventType ); |
|
726 |
|
727 // from MEikCommandObserver |
|
728 |
|
729 /** |
|
730 * From MEikCommandObserver |
|
731 * Processes user commands. |
|
732 * |
|
733 * @param aCommandId ID of the command to respond to. |
|
734 */ |
|
735 virtual void ProcessCommandL(TInt aCommandId); |
|
736 |
|
737 // from MMPXCollectionFindObserver |
|
738 |
|
739 /** |
|
740 * From MMPXCollectionFindObserver |
|
741 * Handle callback for "find" operation |
|
742 * @param aEntries, CMPXMedia to be returned |
|
743 * @param aComplete ETrue no more entries. EFalse more entries |
|
744 * expected |
|
745 * @param aError error code |
|
746 */ |
|
747 virtual void HandleFindAllL(const CMPXMedia& aResults, |
|
748 TBool aComplete,TInt aError); |
|
749 |
|
750 // from MMPXViewActivationObserver |
|
751 |
|
752 /** |
|
753 * From MMPXViewActivationObserver |
|
754 * Handle view activation. |
|
755 * |
|
756 * @param aCurrentViewType Current view type Uid. |
|
757 * @param aPreviousViewType Previous view type Uid. |
|
758 */ |
|
759 void HandleViewActivation( |
|
760 const TUid& aCurrentViewType, |
|
761 const TUid& aPreviousViewType ); |
|
762 /** |
|
763 * @see MMPXViewActivationObserver |
|
764 */ |
|
765 void HandleViewUpdate( |
|
766 TUid aViewUid, |
|
767 MMPXViewActivationObserver::TViewUpdateEvent aUpdateEvent, |
|
768 TBool aLoaded, |
|
769 TInt aData); |
|
770 |
|
771 // from MCoeViewActivationObserver |
|
772 |
|
773 /** |
|
774 * From MCoeViewActivationObserver |
|
775 * Handle view activation. |
|
776 * |
|
777 * @param aNewlyActivatedViewId newly activated view id. |
|
778 * @param aViewIdToBeDeactivated deactivated view id. |
|
779 */ |
|
780 void HandleViewActivation( |
|
781 const TVwsViewId& aNewlyActivatedViewId, |
|
782 const TVwsViewId& aViewIdToBeDeactivated ); |
|
783 |
|
784 // from MCoeViewDeactivationObserver |
|
785 /** |
|
786 * Handles view deactivation notification from view server |
|
787 */ |
|
788 void HandleViewDeactivation(const TVwsViewId& aViewIdToBeDeactivated, |
|
789 const TVwsViewId& aNewlyActivatedViewId); |
|
790 |
|
791 void InitiateWaitDialogL(); |
|
792 void FillAiwParametersL( CAiwGenericParamList& aParamList ); |
|
793 |
|
794 void GetUint32Presentation( TUint32& aResult, const TDesC8& aBuf, TInt aOffset ); |
|
795 /** |
|
796 * Launches Java Midlet Music Store |
|
797 * |
|
798 * @param aUid Uid of the Java app generated dynamically |
|
799 */ |
|
800 void LaunchOperatorJavaMusicShopL(TUid aUid) ; |
|
801 |
|
802 /** |
|
803 * Launches Native Music Shop |
|
804 * |
|
805 * @param aUid Uid of the native app for music Shp |
|
806 */ |
|
807 void LaunchOperatorNativeMusicShopL(); |
|
808 /** |
|
809 * Launches Native URL Music Shop |
|
810 * |
|
811 * @param URl of the native app for music Shp |
|
812 */ |
|
813 void LaunchOperatorURLMusicShopL(); |
|
814 |
|
815 /* |
|
816 * Stores the current list box item index. |
|
817 */ |
|
818 void StoreListboxItemIndexL(); |
|
819 |
|
820 |
|
821 /* |
|
822 * Internal function for registering to BackStepping service. |
|
823 */ |
|
824 void HandleBacksteppingActivation(); |
|
825 |
|
826 void ChangeCbaVisibility( TBool aVisible ); |
|
827 |
|
828 void HandleInitMusicMenuPaneL(CEikMenuPane* aMenuPane ); |
|
829 |
|
830 void OpenAllSongsL(); |
|
831 void OpenArtistAlbumsL(); |
|
832 void OpenPlaylistsL(); |
|
833 void OpenGenreL(); |
|
834 void OpenPodcastsL(); |
|
835 |
|
836 |
|
837 private: // Data |
|
838 |
|
839 MMPXCollectionUtility* iCollectionUtility; |
|
840 CMPXCollectionViewHgContainer* iContainer; |
|
841 MMPXPlaybackUtility* iPlaybackUtility; |
|
842 MMPXViewUtility* iViewUtility; |
|
843 CMPXCommonUiHelper* iCommonUiHelper; |
|
844 MMPXCollectionUiHelper* iCollectionUiHelper; |
|
845 MMPXCollectionHelper* iCollectionHelper; |
|
846 CMPXMedia* iUserPlaylists; |
|
847 |
|
848 CSendUi* iSendUi; |
|
849 HBufC* iTitle; |
|
850 HBufC* iDuration; |
|
851 HBufC* iOriginalTitle; |
|
852 HBufC* iOriginalDuration; |
|
853 HBufC* iNewName; |
|
854 CArrayFix<TInt>* iBottomIndex; |
|
855 |
|
856 TBool iBackOneLevel; |
|
857 TBool iPossibleJump; |
|
858 TBool iIsGrabbed; |
|
859 TBool iIsEmbedded; |
|
860 TBool iAddingSong; |
|
861 TBool iIsDeleting; |
|
862 TBool iIsSavingReorderPlaylist; |
|
863 TBool iIsWaitNoteCanceled; |
|
864 TBool iInvalidFileExist; |
|
865 TBool iHandlingKeyEvent; |
|
866 TBool iAddingToNewPlaylist; |
|
867 TBool iExitOptionHidden; |
|
868 TBool iGoToMusicShopOptionHidden; |
|
869 TBool iIgnoreNextFocusChangedMessage; |
|
870 TBool iCollectionReady; // for incremental open |
|
871 TBool iCollectionCacheReady; //cache ready |
|
872 |
|
873 TInt iCurrentPlaylistOp; |
|
874 TInt iNumSongAddedToPlaylist; |
|
875 TMPXItemId iPlaylistId; |
|
876 |
|
877 TInt iCurrentMediaLOp; // current mediaL operation |
|
878 TInt iCurrentFindAllLOp; // current FindAllL operation |
|
879 TInt iLastDepth; |
|
880 TInt iPlayIndex; |
|
881 TInt iResourceOffset; // must be freed |
|
882 TInt iSetMediaLCount; |
|
883 |
|
884 TInt iCurrentHighlightedIndex; |
|
885 |
|
886 TInt iCachedCommand; // for incremental open |
|
887 CListBoxView::CSelectionIndexArray* iCachedSelectionIndex; |
|
888 |
|
889 CAknNavigationDecorator* iNaviDecorator; |
|
890 CAknNaviLabel* iNaviLabel; |
|
891 CAknNavigationControlContainer* iNaviPane; |
|
892 |
|
893 CEikButtonGroupContainer* iCurrentCba; |
|
894 |
|
895 CAknQueryDialog* iConfirmationDlg; |
|
896 |
|
897 const CArrayFix<TInt>* iSelectionIndexCache; // not owned |
|
898 #ifdef __ENABLE_MSK |
|
899 TInt iCurrentMskId; |
|
900 TBool iShowContextMenu; |
|
901 #endif // __ENABLE_MSK |
|
902 |
|
903 MProfileEngine* iProfileEngine; |
|
904 |
|
905 RArray<TUid> iPlayersList; |
|
906 CAiwServiceHandler* iServiceHandler; |
|
907 TInt iErrorAttachCopyMenu; |
|
908 TMPXPlaybackPlayerType iCurrentPlayerType; |
|
909 HBufC* iSubPlayerName; |
|
910 |
|
911 HBufC* iCurrentSelectedIndex; // current selected item index |
|
912 TBool iUsingNokiaService; |
|
913 |
|
914 CMPXCollectionOpenUtility* iIncrementalOpenUtil; |
|
915 |
|
916 TInt iUpCount; |
|
917 TInt iDownCount; |
|
918 |
|
919 CMediatorCommandInitiator* iCommandInitiator; |
|
920 TPtrC iItemTitle; |
|
921 TInt iWaitNoteId; |
|
922 TBool iCoverDisplay; |
|
923 |
|
924 #ifdef __ENABLE_PODCAST_IN_MUSIC_MENU |
|
925 TBool iPodcast; |
|
926 #endif // __ENABLE_PODCAST_IN_MUSIC_MENU |
|
927 |
|
928 MMPXBackSteppingUtility* iBackSteppingUtility; |
|
929 |
|
930 TBool iUSBOnGoing; |
|
931 TBool iInAlbumArtDialog; |
|
932 TBool iDisablePodcasting; |
|
933 TProcessPriority iPriority; |
|
934 TBool iInSongDetails; |
|
935 |
|
936 TBool iUpnpFrameworkSupport; |
|
937 CMediaRecognizer* iMediaRecognizer; |
|
938 TInt iErrorAttachAssignMenu; |
|
939 TWaitNoteType iNoteType; |
|
940 |
|
941 // Music Store |
|
942 TInt iOperatorMusicStore; |
|
943 TUint32 iMusicStoreUID; |
|
944 TUint32 iOperatorNativeMusicStoreUID; |
|
945 TUid iOperatorMusicStoreUID; |
|
946 HBufC16* iOperatorMusicStoreName; |
|
947 TInt iOperatorMusicStoreType; |
|
948 TInt iMusicStoreWebPage; |
|
949 HBufC16* iOperatorMusicStoreURI; |
|
950 |
|
951 // Progress note for delete |
|
952 CAknProgressDialog* iProgressDialog; |
|
953 CEikProgressInfo* iProgressInfo; |
|
954 TBool iIsAddingToPlaylist; // flag used to handle the return by adding songs incrementally |
|
955 CUpnpCopyCommand* iUpnpCopyCommand; |
|
956 TBool iActivateBackStepping; |
|
957 TBool iOpeningNote; // Waitnote is opening |
|
958 TBool iMarkedAll; |
|
959 TBool iFirstIncrementalBatch; |
|
960 }; |
|
961 |
|
962 #endif // C_CMPXCOLLECTIONVIEWHGIMP_H |
|
963 |
|
964 // End of File |