mpxplugins/viewplugins/inc/mpxmetadataeditordialog.h
branchRCL_3
changeset 53 3de6c4cf6b67
child 66 1f1dad4af8f8
equal deleted inserted replaced
52:14979e23cb5e 53:3de6c4cf6b67
       
     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:  Music Player metadata editor dialog implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPXMETADATAEDITORDIALOG_H
       
    20 #define MPXMETADATAEDITORDIALOG_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <AknForm.h>
       
    24 #include <mpxcollectionobserver.h>
       
    25 #include <mpxcollectionuihelper.h>
       
    26 #include <mpxcollectionuihelperobserver.h>
       
    27 #include <mpxattribute.h>
       
    28 #include <AknQueryDialog.h>
       
    29 #include <DRMHelper.h>
       
    30 #include <mpxplaybackobserver.h>
       
    31 // CONSTANTS
       
    32 const TInt KMPXMetadataTextFieldMaxLen = 255;
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class CAknTitlePane;
       
    36 class CAknNavigationControlContainer;
       
    37 class CAknNavigationDecorator;
       
    38 class CAknQueryValueText;
       
    39 class CAknQueryValueTextArray;
       
    40 class MMPXCollectionUtility;
       
    41 class CMPXCommonUiHelper;
       
    42 class CMPXMedia;
       
    43 class MMPXCollectionUiHelper;
       
    44 class CAknPopupField;
       
    45 class CIdle;
       
    46 class MMPXPlaybackUtility;
       
    47 namespace DRM
       
    48     {
       
    49     class CDrmUiHandling;
       
    50     }
       
    51 
       
    52 // CLASS DECLARATION
       
    53 /*
       
    54 * Provides query dialog for changing track's library.
       
    55 */
       
    56 NONSHARABLE_CLASS( CMPXQueryDialog ) : public CAknQueryDialog
       
    57     {
       
    58 public:
       
    59     /**
       
    60      * Two-phased constructor.
       
    61      */
       
    62     static CMPXQueryDialog* NewL();
       
    63 
       
    64      /**
       
    65      * From CAknDialog
       
    66      * Handle key events. When a key event occurs,
       
    67      * until one of them returns EKeyWasConsumed to indicate that it processed the key event.
       
    68      * CONE calls this function for each control on the control stack,
       
    69      * @param aKeyEvent  The key event.
       
    70      * @param aType      The type of the event: EEventKey, EEventKeyUp or EEventKeyDown.
       
    71      * @return           Indicates whether or not the key event was used by this control.
       
    72      */
       
    73     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
       
    74     };
       
    75 
       
    76 /*
       
    77 * Provides factory to create concrete document object.
       
    78 */
       
    79 NONSHARABLE_CLASS( CMPXMetadataEditorDialog ) : public CAknForm,
       
    80                                                 public MMPXCollectionObserver,
       
    81                                                 public MMPXCollectionFindObserver,
       
    82                                                 public MMPXPlaybackCallback,
       
    83                                                 public MMPXCHelperObserver,
       
    84                                                 public MMPXPlaybackObserver
       
    85     {
       
    86 public:
       
    87     // File Details headings
       
    88     enum TMPXSongsFileDetailsHeadings
       
    89         {
       
    90         EMPXSongsFileDetailsHeadingFilename = 0, // Start from index 0
       
    91         EMPXSongsFileDetailsHeadingFormat,
       
    92         EMPXSongsFileDetailsHeadingDuration,
       
    93         EMPXSongsFileDetailsHeadingBitrate,
       
    94         EMPXSongsFileDetailsHeadingSamplingRate,
       
    95         EMPXSongsFileDetailsHeadingSize,
       
    96         EMPXSongsFileDetailsHeadingModified,
       
    97         EMPXSongsFileDetailsHeadingCopyright,
       
    98         EMPXSongsFileDetailsHeadingUrl,
       
    99         EMPXSongsFileDetailsHeadingCount
       
   100         };
       
   101 
       
   102     enum TMPXPodcastsFileDetailsHeadings
       
   103         {
       
   104         EMPXPodcastsFileDetailsHeadingFilename = 0, // Start from index 0
       
   105         EMPXPodcastsFileDetailsHeadingFormat,
       
   106         EMPXPodcastsFileDetailsHeadingDuration,
       
   107         EMPXPodcastsFileDetailsHeadingBitrate,
       
   108         EMPXPodcastsFileDetailsHeadingSamplingRate,
       
   109         EMPXPodcastsFileDetailsHeadingSize,
       
   110         EMPXPodcastsFileDetailsHeadingLastPlaybackPosition,
       
   111         EMPXPodcastsFileDetailsHeadingPublished,
       
   112         EMPXPodcastsFileDetailsHeadingModified,
       
   113         EMPXPodcastsFileDetailsHeadingCopyright,
       
   114         EMPXPodcastsFileDetailsHeadingUrl,
       
   115         EMPXPodcastsFileDetailsHeadingCount
       
   116         };
       
   117 
       
   118 public: // Constructor and destructor
       
   119     /**
       
   120      * Two-phased constructor.
       
   121      */
       
   122     IMPORT_C static CMPXMetadataEditorDialog* NewL();
       
   123 
       
   124     /**
       
   125      * Destructor.
       
   126      */
       
   127     IMPORT_C virtual ~CMPXMetadataEditorDialog();
       
   128 
       
   129     /**
       
   130      * Parameter passed in from viewframework
       
   131      *
       
   132      * @param aParam Parameter pass in from viewframework.
       
   133      */
       
   134     IMPORT_C void SetParamL( const TDesC* aParam );
       
   135 
       
   136     /**
       
   137      * From CAknDialog update member variables of CAknExEditorDialog.
       
   138      * @param aButtonId The ID of the button that was activated.
       
   139      * @return Should return ETrue if the dialog should exit,
       
   140      *    and EFalse if it should not
       
   141      */
       
   142     TBool OkToExitL(TInt aButtonId);
       
   143 
       
   144     /**
       
   145      * From CAknDialog.
       
   146      *
       
   147      * @param aResourceId The resource ID of the dialog to load.
       
   148      * @return Zero, unless it is a waiting dialog. For a waiting dialog,
       
   149      *         the return value is the ID of the button that closed the
       
   150      *         dialog, or zero if it was the cancel button
       
   151      *         (@c EEikBidCancel).
       
   152      */
       
   153     TInt ExecuteLD( TInt aResourceId );
       
   154 
       
   155     /**
       
   156      * Display file details popup window
       
   157      */
       
   158     void ViewFileDetailsPopupL();
       
   159 
       
   160 private: // from base class MMPXCollectionObserver
       
   161 
       
   162     /**
       
   163      * Handle collection message.
       
   164      *
       
   165      * @param aMessage Collection message
       
   166      * @param aErr system error code.
       
   167      */
       
   168     void HandleCollectionMessage(
       
   169         CMPXMessage* aMessage, TInt aError );
       
   170 
       
   171     /**
       
   172      * Handles the collection entries being opened. Typically called
       
   173      * when client has Open()'d a folder
       
   174      *
       
   175      * @param aEntries collection entries opened
       
   176      * @param aIndex focused entry
       
   177      * @param aComplete ETrue no more entries. EFalse more entries
       
   178      *                  expected
       
   179      * @param aError error code
       
   180      */
       
   181     void HandleOpenL(
       
   182         const CMPXMedia& aEntries,
       
   183         TInt aIndex, TBool aComplete, TInt aError);
       
   184 
       
   185     /**
       
   186      * Handles the item being opened. Typically called
       
   187      * when client has Open()'d an item. Client typically responds by
       
   188      * 'playing' the item via the playlist
       
   189      *
       
   190      * @param aPlaylist collection playlist
       
   191      * @param aError error code
       
   192      */
       
   193     void HandleOpenL( const CMPXCollectionPlaylist& aPlaylist, TInt aError );
       
   194 
       
   195     /**
       
   196      * Handle media properties
       
   197      *
       
   198      * @param aMedia media
       
   199      * @param aError error code
       
   200      */
       
   201     void HandleCollectionMediaL(
       
   202         const CMPXMedia& aMedia,
       
   203         TInt aError);
       
   204 
       
   205 private:
       
   206 
       
   207     /**
       
   208      * From MMPXPlaybackObserver
       
   209      * Handle playback message
       
   210      *
       
   211      * @param aMessage playback message
       
   212      * @param aErr system error code.
       
   213      */
       
   214     void HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError );
       
   215   
       
   216     /**
       
   217      *  Handle playback message
       
   218      *
       
   219      *  @param aMessage playback message
       
   220      */
       
   221     void DoHandlePlaybackMessageL( const CMPXMessage& aMessage );
       
   222     
       
   223 private:  // Constructor
       
   224 
       
   225     /**
       
   226      * Default constructor.
       
   227      */
       
   228     CMPXMetadataEditorDialog();
       
   229 
       
   230     /**
       
   231      * Second-phase constructor.
       
   232      */
       
   233     void ConstructL();
       
   234 
       
   235 private: // New functions
       
   236 
       
   237     /**
       
   238      * Clean up function for genre related members.
       
   239      */
       
   240     void CleanUpGenreText();
       
   241 
       
   242     /**
       
   243      * Populates genre popup with genre list for tracks.
       
   244      */
       
   245     void FetchGenreL();
       
   246 
       
   247     /**
       
   248      *  Handle media properties.
       
   249      *
       
   250      *  @param aMedia media properties
       
   251      *  @param aError error code
       
   252      */
       
   253     void DoHandleMediaL(
       
   254         const CMPXMedia& aMedia,
       
   255         TInt aError );
       
   256 
       
   257     /**
       
   258      * Saves media back to collection engine
       
   259      *
       
   260      * @param aMedia media property to save back
       
   261      */
       
   262     void SaveMediaPropertiesL( CMPXMedia* aMedia );
       
   263 
       
   264     /**
       
   265      * Appends the value to the array, if the vaule has zero length,
       
   266      * appends "unavailable"
       
   267      *
       
   268      * @param aArray array to append to
       
   269      * @param aValue value to append
       
   270      */
       
   271     void AppendStringToArrayL( CDesCArrayFlat* aArray, const TDesC& aValue );
       
   272 
       
   273     /**
       
   274      * Sets control text
       
   275      *
       
   276      * @param aControlId The ID of the control
       
   277      * @param aValue value to set
       
   278      * @param aAlternateValue if aValue is zero length,
       
   279      *                        this value will be used instead
       
   280      *
       
   281      */
       
   282     void SetControlTextL( TInt aControlId, const TDesC& aValue,
       
   283         const TDesC& aAlternateValue );
       
   284 
       
   285     /**
       
   286      * Sets control text
       
   287      *
       
   288      * @param aControlId The ID of the control
       
   289      * @param aValue value to set
       
   290      * @param aMinValue minimum value allowed for this control
       
   291      * @param aMaxValue maximum value allowed for this control
       
   292      *
       
   293      */
       
   294     void SetControlNumberL( TInt aControlId, const TDesC& aValue,
       
   295         TInt aMinValue, TInt aMaxValue );
       
   296 
       
   297     /**
       
   298      * prompt user for library change
       
   299      *
       
   300      * @param aMoveToLibrary enum for library to move to
       
   301      * @return ETrue if the user confirms the change, EFalse if cancel
       
   302      */
       
   303     TBool PromptForLibraryChangeL( TInt aMoveToLibrary );
       
   304 
       
   305     /**
       
   306      * Updates media object with current control text, this will also
       
   307      * update iMedia
       
   308      *
       
   309      * @param aControlId the id of the control
       
   310      * @param aMedia media object to update
       
   311      * @param aAttribute attribute to save to
       
   312      *
       
   313      * @return EFalse if the control being checked has not been changed (equal)
       
   314      *         ETrue if the control being checked has been changed
       
   315      */
       
   316     TBool UpdateMediaObjectWithControlL(
       
   317         TInt aControlId, CMPXMedia* aMedia, TMPXAttribute aAttribute );
       
   318 
       
   319     static TInt DeferredExitCallback( TAny* aPtr );
       
   320 
       
   321     static TInt DeferredFileDetailsCallback( TAny* aPtr );
       
   322 
       
   323 #ifdef __ENABLE_MSK
       
   324     /**
       
   325      * Update softkey.
       
   326      */
       
   327     void UpdateSoftkeyL();
       
   328 #endif // __ENABLE_MSK
       
   329 
       
   330 private:  // Functions from base class
       
   331 
       
   332 #ifdef __ENABLE_MSK
       
   333     /**
       
   334      * From CAknForm, handles key-events.
       
   335      * @param aKeyEvent Key event.
       
   336      * @param aType Type of key event(EEventKey, EEventKeyUp or
       
   337      *              EEventKeyDown).
       
   338      * @return If key-event is consumed, EKeyWasConsumed. Else
       
   339      *         EKeyWasNotConsumed.
       
   340      */
       
   341     TKeyResponse OfferKeyEventL(
       
   342         const TKeyEvent& aKeyEvent,
       
   343         TEventCode aType );
       
   344 #endif // __ENABLE_MSK
       
   345 
       
   346     /**
       
   347      * From CAknForm
       
   348      * Save the contents of the form.
       
   349      */
       
   350     TBool SaveFormDataL();
       
   351 
       
   352     /**
       
   353      * From CAknForm
       
   354      * Does not save the contents of the form.
       
   355      */
       
   356     void DoNotSaveFormDataL();
       
   357 
       
   358     /**
       
   359      * Store the old title pane text and set the new one
       
   360      */
       
   361     void SetTitlePaneL();
       
   362 
       
   363     /**
       
   364      * Restore the old title pane text
       
   365      */
       
   366     void RestoreTitlePaneL();
       
   367 
       
   368     /**
       
   369      * Store the old title navi label and set the new one
       
   370      */
       
   371     void SetNaviLabelL();
       
   372 
       
   373     /**
       
   374      * Restore the old navi label text
       
   375      */
       
   376     void RestoreNaviLabelL();
       
   377 
       
   378     /**
       
   379      * From MEikMenuObserver.
       
   380      * Dynamically initialises a menu pane. This function can be overridden
       
   381      * by the derived class for its own purpose.
       
   382      * @param aResourceId Resource ID identifying the menu pane to initialise.
       
   383      * @param aMenuPane The in-memory representation of the menu pane.
       
   384      */
       
   385     void DynInitMenuPaneL( TInt aResourceId,
       
   386                            CEikMenuPane* aMenuPane );
       
   387 
       
   388     /**
       
   389      * Act on the menu selection if menu is showing
       
   390      */
       
   391     void ProcessCommandL(TInt aCommandId);
       
   392 
       
   393     /**
       
   394      * Populates file details window for songs
       
   395      * @param aHeadingsArray array of the headers
       
   396      * @param aDataArray array to populate
       
   397      */
       
   398     void PopulateFileDetailsL(
       
   399         CDesCArrayFlat* aHeadingsArray, CDesCArrayFlat* aDataArray );
       
   400 
       
   401     /**
       
   402      * Populates file details window for podcasts
       
   403      * @param aHeadingsArray array of the headers
       
   404      * @param aDataArray array to populate
       
   405      */
       
   406     void PopulatePodcastFileDetailsL(
       
   407         CDesCArrayFlat* aHeadingsArray, CDesCArrayFlat* aDataArray );
       
   408 
       
   409     /**
       
   410      * Constructs DRM items.
       
   411      * @param aHeadingsArray array of the headers
       
   412      * @param aDataArray array to populate
       
   413      */
       
   414     void MakeDrmItemsL(
       
   415         CDesCArrayFlat* aHeadingsArray, CDesCArrayFlat* aDataArray );
       
   416 
       
   417     /**
       
   418      * Constructs restricted drm items. E.g. count, interval
       
   419      * @param aRights Drm right type "Play"
       
   420      * @param aCurrentIndex current index of the listbox to insert into
       
   421      * @param aHeadingsArray array of the headers
       
   422      * @param aDataArray array to populate
       
   423      */
       
   424     void MakeRestrictedDrmItemsL(
       
   425         HBufC* aRights, TInt& aCurrentIndex,
       
   426         CDesCArrayFlat* aHeadingsArray, CDesCArrayFlat* aDataArray );
       
   427     
       
   428 	
       
   429 	/**
       
   430      * Populates file details window for songs
       
   431      */
       
   432     void PopulateFileDetailsL();
       
   433 
       
   434 
       
   435     /**
       
   436      * Populates file details window for podcasts
       
   437      */
       
   438     void PopulatePodcastFileDetailsL();
       
   439 
       
   440 
       
   441     /**
       
   442      * Launch DRM information popup
       
   443      */
       
   444     void LaunchDrmInfoL();
       
   445 
       
   446 	
       
   447     /**
       
   448      * Add parts Of time.
       
   449      * @param aIntYrs year information
       
   450      * @param aIntMon month information
       
   451      * @param aIntDay day information
       
   452      * @param aIntHrs hour information
       
   453      * @param aIntMin minute information
       
   454      * @param aIntSec second information
       
   455      * @return  Buffer where to add the elements
       
   456      */
       
   457     HBufC* AddPartsOfTimeLC( TInt aIntYrs, TInt aIntMon, TInt aIntDay, 
       
   458                              TInt aIntHrs, TInt aIntMin, TInt aIntSec );
       
   459     
       
   460     /**
       
   461      * Add a single element of time to the string array
       
   462      * @param aNumOfElements         Number of elements of the interval
       
   463      * @param aResourceIdSingle      Resource id to be used in case of
       
   464      *                               single unit
       
   465      * @param aResourceIdOneFinal    Resource id to be used in case of
       
   466      *                               units ending with 1, from 21
       
   467      *                               (requested by Slavic languages)
       
   468      * @param aResourceIdTwoFour     Resource id to be used in case of
       
   469      *                               units included from two to four, except
       
   470      *                               12-14 (requested by Slavic languages)
       
   471      * @param aResourceIdFiveZero    Resource id to be used in case of
       
   472      *                               units ending from 5 to 9, plus range
       
   473      *                               from 11 to 14 (requested by Slavic
       
   474      *                               languages)
       
   475      * @param aStrings               DesCArrayFlat where to add the element
       
   476      */
       
   477     
       
   478     void AddSinglePartOfTimeL( TInt aNumOfElements,
       
   479             TInt aResourceIdSingle,
       
   480             TInt aResourceIdOneFinal, 
       
   481             TInt aResourceIdTwoFour,
       
   482             TInt aResourceIdFiveZero, 
       
   483             CDesCArrayFlat* aStrings );
       
   484      
       
   485      /**
       
   486      * Split TimeIntervalSeconds into  parts Of time.
       
   487      * @param aIntYrs year information
       
   488      * @param aIntMon month information
       
   489      * @param aIntDay day information
       
   490      * @param aIntHrs hour information
       
   491      * @param aIntMin minute information
       
   492      * @param aIntSec second information
       
   493      * @return  void
       
   494      */
       
   495     void SplitTime( const TTimeIntervalSeconds& aInterval,
       
   496             TInt& aIntYrs, TInt& aIntMon, TInt& aIntDay,
       
   497             TInt& aIntHrs, TInt& aIntMin, TInt& aIntSec );
       
   498     /**
       
   499      * Add a single element of time to the string array
       
   500      * @param aNumOfElements         Number of elements of the interval
       
   501      * @param aResourceIdSingle      Resource id to be used in case of
       
   502      *                               single unit
       
   503      * @param aResourceIdOneFinal    Resource id to be used in case of
       
   504      *                               units ending with 1, from 21
       
   505      *                               (requested by Slavic languages)
       
   506      * @param aResourceIdTwoFour     Resource id to be used in case of
       
   507      *                               units included from two to four, except
       
   508      *                               12-14 (requested by Slavic languages)
       
   509      * @param aResourceIdFiveZero    Resource id to be used in case of
       
   510      *                               units ending from 5 to 9, plus range
       
   511      *                               from 11 to 14 (requested by Slavic
       
   512      *                               languages)
       
   513      * @param aStrings               Buffer where to add the element
       
   514      */
       
   515     void AddSinglePartOfTimeL( TInt   aNumOfElements,
       
   516                                TInt   aResourceIdSingle,
       
   517                                TInt   aResourceIdOneFinal,
       
   518                                TInt   aResourceIdTwoFour,
       
   519                                TInt   aResourceIdFiveZero,
       
   520                                HBufC*& aStrings );
       
   521 
       
   522     /**
       
   523      * Converts between arabic-indic digits and european digits.
       
   524      * @param aText numbers to be converted.
       
   525      * @return void
       
   526      */
       
   527     void LanguageSpecificNumberConversion( TDes& aText ) const;
       
   528 
       
   529     /**
       
   530      * Converts the time value to localtime
       
   531      * @param aTime contains the UTC time to be converted, and the converted value on exit
       
   532      */
       
   533     void ConvertToLocalTimeL(TTime& aTime );
       
   534 
       
   535     /**
       
   536      * Adds header and value to list.
       
   537      * @param aHeading Heading
       
   538      * @param aValue Value
       
   539      * @param aItemArray Array where value and header are added.
       
   540      * @return void
       
   541      */
       
   542     void AddItemToListBoxL( const TDesC& aHeading,
       
   543                             const TDesC& aValue,
       
   544                             CDesCArray* aItemArray );
       
   545 
       
   546     /**
       
   547      * This is used to decide when to save changes. If a leave occurs the
       
   548      * framework generates a Symbian Leave code.
       
   549      * @param aControlId. Control id.
       
   550      */
       
   551     void HandleControlStateChangeL( TInt aControlId );
       
   552 
       
   553     /**
       
   554      * Function from @c CEikDialog and thence from c@ MEikDialogPageObserver.
       
   555      * Checks if either year or track control id's are empty, and if so set to 0.
       
   556      */
       
   557     void PrepareForFocusTransitionL();
       
   558 
       
   559     /**
       
   560      * Required for help.
       
   561      */
       
   562     void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   563 
       
   564 // from MMPXCollectionFindObserver
       
   565 
       
   566     /**
       
   567     *  Handle callback for "find" operation
       
   568     *  @param aEntries, CMPXMedia to be returned
       
   569     *  @param aComplete ETrue no more entries. EFalse more entries
       
   570     *                   expected
       
   571     *  @param aError error code
       
   572     */
       
   573     void HandleFindAllL( const CMPXMedia& aResults,
       
   574         TBool aComplete,TInt aError );
       
   575 
       
   576 // from MMPXCHelperObserver
       
   577 
       
   578     /**
       
   579     *  Handle callback for the ui helper
       
   580     *  @param aOperation operation performed
       
   581     *  @param aErr error code
       
   582     *  @param aArgument argument returned
       
   583     */
       
   584     void HandleOperationCompleteL( TCHelperOperation aOperation,
       
   585                                    TInt aErr,
       
   586                                    void* aArgument );
       
   587 
       
   588 private: // From CEikDialog
       
   589     /**
       
   590      * From CEikDialog, PreLayoutDynInitL.
       
   591      * Initialises the dialog's controls before the dialog is sized
       
   592      * and layed out.
       
   593      */
       
   594     void PreLayoutDynInitL();
       
   595 
       
   596     /**
       
   597      * From CEikDialog, PostLayoutDynInitL.
       
   598      * Initialises the dialog's controls after the dialog has been sized
       
   599      * but before it has been activated.
       
   600      */
       
   601     void PostLayoutDynInitL();
       
   602 	
       
   603 private: // from base class MMPXPlaybackCallback
       
   604 
       
   605     /**
       
   606      * From MMPXPlaybackCallback
       
   607      * Handle playback property
       
   608      *
       
   609      * @param aProperty the property
       
   610      * @param aValue the value of the property
       
   611      * @param aError error code
       
   612      */
       
   613     void HandlePropertyL( TMPXPlaybackProperty aProperty, TInt aValue, TInt aError );
       
   614 
       
   615     /**
       
   616      * From MMPXPlaybackCallback
       
   617      * Method is called continously until aComplete=ETrue, signifying that
       
   618      * it is done and there will be no more callbacks
       
   619      * Only new items are passed each time
       
   620      *
       
   621      * @param aPlayer UID of the subplayer
       
   622      * @param aSubPlayers a list of sub players
       
   623      * @param aComplete ETrue no more sub players. EFalse more subplayer
       
   624      *                  expected
       
   625      * @param aError error code
       
   626      */
       
   627     void HandleSubPlayerNamesL(
       
   628             TUid aPlayer,
       
   629             const MDesCArray* aSubPlayers,
       
   630             TBool aComplete,
       
   631             TInt aError );
       
   632 
       
   633     /**
       
   634      * From MMPXPlaybackCallback
       
   635      * Handle media properties
       
   636      *
       
   637      * @param aMedia media
       
   638      * @param aError error code
       
   639      */
       
   640     void HandleMediaL( const CMPXMedia& aMedia, TInt aError );
       
   641 
       
   642 private:
       
   643     enum TMPXMetadataEditorCurrentMediaLOp
       
   644         {
       
   645         EMPXMetadataEditorIdle = 0,
       
   646         EMPXMetadataEditorGetSongInfo,
       
   647         EMPXMetadataEditorGetDrmInfo
       
   648         };
       
   649 
       
   650 private:
       
   651     CAknTitlePane*                          iTitlePane;
       
   652     CAknNavigationControlContainer*         iNaviPane;
       
   653     CAknNavigationDecorator*                iNaviDecorator; // Navi decorator
       
   654     CAknNavigationDecorator*                iEmptyNaviDecorator; // Navi decorator
       
   655     CAknPopupField*                         iPopup;
       
   656     CAknQueryValueText*                     iTextValues;
       
   657     CAknQueryValueTextArray*                iValueTextArray;
       
   658     CDesCArray*                             iGenreArr;
       
   659     CAknQueryValueText*                     iLibraryTextValues;
       
   660     CAknQueryValueTextArray*                iLibraryValueTextArray;
       
   661     CDesCArray*                             iLibraryArr;
       
   662 
       
   663     HBufC*                                  iTitlePaneText;
       
   664     HBufC*                                  iParam;
       
   665 
       
   666     MMPXCollectionUiHelper*                 iCollectionUiHelper;
       
   667     MMPXCollectionUtility*                  iCollectionUtility;
       
   668     CMPXMedia*                              iMedia;  // own
       
   669     CMPXMedia*                              iDrmInfo;
       
   670     CMPXCommonUiHelper*                     iCommonUiHelper;    // own
       
   671 
       
   672     TInt                                    iResourceOffset; // must be freed
       
   673     TInt                                    iDrmResourceOffset; // must be freed
       
   674     TInt                                    iCurrentLibrary;
       
   675     TInt                                    iYear; // special handling needed for year
       
   676     TInt                                    iCurrentMediaLOp;
       
   677     TInt                                    iIsDrmProtected;
       
   678 
       
   679     TBool                                   iUnknownGenre;
       
   680     TBool                                   iDrmDetails; // Flags if DRMRightsManager.rsc was loaded
       
   681     TBool                                   iDisablePodcasting;
       
   682     CIdle*                                  iIdle;
       
   683     TBool                                   iTryingExit;
       
   684     DRM::CDrmUiHandling* iDrmUiHandler;
       
   685 	MMPXPlaybackUtility* iPlaybackUtility;  // not own, but need to close
       
   686     };
       
   687 
       
   688 #endif  // MPXMETADATAEDITORDIALOG_H
       
   689 
       
   690 // End of File