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