mpxplugins/viewplugins/views/podcastplaybackview/inc/mpxpodcastplaybackviewimp.h
changeset 0 ff3acec5bc43
child 15 a1247965635c
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 Podcast playback view implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CMPXPODCASTPLAYBACKVIEWIMP_H
       
    21 #define C_CMPXPODCASTPLAYBACKVIEWIMP_H
       
    22 
       
    23 
       
    24 // INCLUDES
       
    25 #include "mpxpodcastplaybackview.h"
       
    26 #include <akntoolbarobserver.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MMPXCollectionUtility;
       
    30 class MMPXCollectionUiHelper;
       
    31 class CMPXPodcastPlaybackViewContainer;
       
    32 class CMPXPodcastPlaybackViewLayout;
       
    33 class CAknToolbar;
       
    34 
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39  *  MPX playback view.
       
    40  *
       
    41  *  @lib mpxplaybackview.lib
       
    42  *  @since S60 v3.0
       
    43  */
       
    44 NONSHARABLE_CLASS( CMPXPodcastPlaybackViewImp ) : public CMPXPodcastPlaybackView
       
    45                                            ,public MAknToolbarObserver
       
    46     {
       
    47 public:
       
    48 
       
    49     /**
       
    50      * Two-phased constructor.
       
    51      *
       
    52      * @since 3.0
       
    53      * @return Pointer to newly created object.
       
    54      */
       
    55     static CMPXPodcastPlaybackViewImp* NewL();
       
    56 
       
    57     /**
       
    58      * Two-phased constructor.
       
    59      *
       
    60      * @since 3.0
       
    61      * @return Pointer to newly created object.
       
    62      */
       
    63     static CMPXPodcastPlaybackViewImp* NewLC();
       
    64 
       
    65     /**
       
    66      * Destructor.
       
    67      */
       
    68     ~CMPXPodcastPlaybackViewImp();
       
    69 
       
    70 private:
       
    71 
       
    72     /**
       
    73      * C++ default constructor.
       
    74      */
       
    75     CMPXPodcastPlaybackViewImp();
       
    76 
       
    77     /**
       
    78      * By default Symbian 2nd phase constructor is private.
       
    79      */
       
    80     void ConstructL();
       
    81 
       
    82 // from base class CMPXCommonPlaybackViewImp
       
    83 
       
    84     /**
       
    85      *  Handle playback property
       
    86      *
       
    87      *  @param aProperty the property
       
    88      *  @param aValue the value of the property
       
    89      *  @param aError error code
       
    90      */
       
    91     virtual void DoHandlePropertyL(
       
    92         TMPXPlaybackProperty aProperty,
       
    93         TInt aValue,
       
    94         TInt aError );
       
    95 
       
    96     /**
       
    97      * Updates track info field.
       
    98      *
       
    99      * @param aMedia Media's properties. If NULL, default info will
       
   100      *                    be shown.
       
   101      */
       
   102     void UpdateTrackInfoL( const CMPXMedia* aMedia );
       
   103 
       
   104     /**
       
   105     * Restore status pane to it's normal state.
       
   106     */
       
   107     void PrepareStatusPaneForExitingViewL();
       
   108 
       
   109 // from base class MEikMenuObserver
       
   110 
       
   111     /**
       
   112      * From MEikMenuObserver
       
   113      * Dynamically initialises a menu pane.
       
   114      *
       
   115      * @param aResourceId The ID of the menu pane.
       
   116      * @param aMenuPane The menu pane itself.
       
   117      */
       
   118     void DynInitMenuPaneL(
       
   119         TInt aResourceId,
       
   120         CEikMenuPane* aMenuPane );
       
   121 
       
   122 
       
   123 // from base class CAknView
       
   124 
       
   125     /**
       
   126      * From CAknView
       
   127      * Returns views id.
       
   128      *
       
   129      * @since 3.0
       
   130      * @return Views Uid
       
   131      */
       
   132     TUid Id() const;
       
   133 
       
   134     /**
       
   135      * From CAknView
       
   136      * Command handling function.
       
   137      *
       
   138      * @since 3.0
       
   139      * @param aCommand Command which is handled
       
   140      */
       
   141     void HandleCommandL( TInt aCommand );
       
   142 
       
   143     /**
       
   144      * From CAknView
       
   145      * Handles a view activation.
       
   146      *
       
   147      * @param aPrevViewId Specifies the view previously active.
       
   148      * @param aCustomMessageId Specifies the message type.
       
   149      * @param aCustomMessage The activation message.
       
   150      */
       
   151     void DoActivateL(
       
   152         const TVwsViewId& aPrevViewId,
       
   153         TUid aCustomMessageId,
       
   154         const TDesC8& aCustomMessage );
       
   155 
       
   156     /**
       
   157      * From MAknToolbarObserver
       
   158      * Processes user commands.
       
   159      *
       
   160      * @since 5.0
       
   161      * @param aCommand ID of the command to respond to.
       
   162      */
       
   163     void OfferToolbarEventL( TInt aCommandId );
       
   164 
       
   165     /**
       
   166      * From MAknToolbarObserver
       
   167      * Used to change toolbar settings before it is made visible
       
   168      *
       
   169      * @since 5.0
       
   170      * @param aCommand ID of the command to respond to.
       
   171      */
       
   172     void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolBar );
       
   173 
       
   174     /**
       
   175      *  Handle playback message
       
   176      *
       
   177      *  @param aMsg playback message
       
   178      */
       
   179     void DoHandlePlaybackMessageL( const CMPXMessage& aMessage );
       
   180 
       
   181     /**
       
   182      * Updates the middle (play/pause) toolbar control key
       
   183      * icon based on playback state
       
   184      */
       
   185     void UpdateToolbar();
       
   186 
       
   187 private:    // data
       
   188 
       
   189     CMPXPodcastPlaybackViewLayout* iPlaybackViewLayout;    // owned
       
   190 
       
   191     TInt  iPodcastResourceOffset;    // must be freed
       
   192     TInt  iPosition;
       
   193     CAknToolbar* iToolbar; //owned
       
   194     };
       
   195 
       
   196 #endif  // C_CMPXPODCASTPLAYBACKVIEWIMP_H
       
   197 
       
   198 // End of File