videofeeds/hgvodui/inc/vcxhgvodcontentlistimpl.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2008 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 the License "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:    HG VOD content view functionality implementation*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef VCXHGVODCONTENTLISTIMPL_H
       
    21 #define VCXHGVODCONTENTLISTIMPL_H
       
    22 
       
    23 
       
    24 #include <remconcoreapi.h>
       
    25 #include "vcxhgvodmainviewcontainer.h"
       
    26 #include "vcxhgvodlistimplbase.h"
       
    27 #include "vcxnscontent.h"
       
    28 
       
    29 class CHgScroller;
       
    30 class CVcxHgVodMainViewContainer;
       
    31 class CVcxHgVodContentListModelHandler;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35  *  Content list implementation
       
    36  *  This class handles service view list functionality.
       
    37  *
       
    38  *  @code
       
    39  *   
       
    40  *  @endcode
       
    41  *
       
    42  *  @lib vcxhgvodui.lib
       
    43  *  @since S60 v5.0
       
    44  */
       
    45 class CVcxHgVodContentListImpl : public CVcxHgVodListImplBase
       
    46     {
       
    47 
       
    48 public:
       
    49 
       
    50     /**
       
    51      * Two-phased constructor.
       
    52      * @param aScroller UI component responsible of drawing the information
       
    53      * @param aDataProviderIf Reference to UI engine
       
    54      * @param aView Reference to main view
       
    55      * @return Pointer to newly created instance
       
    56      */
       
    57     static CVcxHgVodContentListImpl* NewL(
       
    58             CHgScroller& aScroller,
       
    59             CVcxNsUiEngine& aDataProviderIf,
       
    60             CVcxHgVodMainView& aView );
       
    61     
       
    62     /**
       
    63      * Two-phased constructor.
       
    64      * @param aScroller UI component responsible of drawing the information
       
    65      * @param aDataProviderIf Reference to UI engine
       
    66      * @param aView Reference to main view
       
    67      * @return Pointer to newly created instance
       
    68      */
       
    69     static CVcxHgVodContentListImpl* NewLC( 
       
    70             CHgScroller& aScroller, 
       
    71             CVcxNsUiEngine& aDataProviderIf,
       
    72             CVcxHgVodMainView& aView );
       
    73 
       
    74     /**
       
    75     * Destructor.
       
    76     */
       
    77     virtual ~CVcxHgVodContentListImpl();
       
    78     
       
    79     /**
       
    80      * Activate service model
       
    81      */
       
    82     void DoActivateL( );
       
    83 
       
    84     /**
       
    85      * Deactivate service model
       
    86      *
       
    87      */
       
    88     void DoDeactivate();
       
    89 
       
    90     /**
       
    91      * Handle user command
       
    92      */
       
    93     void HandleCommandL( TInt aCommand );
       
    94     
       
    95     /**
       
    96      * Activate menu pane items before displaying menu
       
    97      * 
       
    98      * @param aMenuPane Pointer to menu pane
       
    99      *
       
   100      */
       
   101     void ActivateMenuPaneItemsL( CEikMenuPane* aMenuPane, TInt aResourceId );
       
   102 
       
   103     /**
       
   104      * Update title pane text for content view.
       
   105      */
       
   106     void UpdateTitlePaneL();
       
   107     
       
   108     /**
       
   109      * Get content download status and content type data.
       
   110      * @param aDlStatus On return, download status data
       
   111      * @param aContentTypes On return, content types
       
   112      * 
       
   113      */
       
   114     void ContentStatusDataL( 
       
   115         CVcxNsContent::TVcxContentDlStatus &aDlStatus,
       
   116         TUint32 &aContentTypes );
       
   117     
       
   118     /**
       
   119      * Check msk
       
   120      * 
       
   121      */
       
   122     void CheckMskL();
       
   123 
       
   124     /**
       
   125     * Get help context.
       
   126     *
       
   127     * @param aContext context
       
   128     */
       
   129     void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   130     
       
   131     /**
       
   132      * Selection (highlight) changes.
       
   133      * @param aIndex Index of selected item.
       
   134      */
       
   135     void HandleSelectL( TInt /*aIndex*/ );
       
   136     
       
   137     /**
       
   138      * Handles item opening.
       
   139      * @param aIndex Index of item to be opened.
       
   140      */
       
   141     void HandleOpenL( TInt /*aIndex*/ );
       
   142 
       
   143 public: //from MViaPlayerMediaKeyListner
       
   144 
       
   145     /**
       
   146      * Called when media key event happens.
       
   147      *
       
   148      * @since S60 v3.0
       
   149      * @param aOperationId The media key operation (ie. play, rewind, etc)
       
   150      * @param aButtonAct The activity of the button (ie. pressed, released, etc)
       
   151      */
       
   152     void MediaKeyEventL( TRemConCoreApiOperationId aOperationId, 
       
   153         TRemConCoreApiButtonAction aButtonAct );
       
   154     
       
   155 private:    
       
   156     
       
   157     /**
       
   158      * Default constructor
       
   159      * @param aListWidget List widget
       
   160      * @param aDataProviderIf Reference to ui engine interface
       
   161      * @param aView Main view
       
   162      */
       
   163     CVcxHgVodContentListImpl( CHgScroller& aScroller,
       
   164                               CVcxNsUiEngine& aDataProviderIf,
       
   165                               CVcxHgVodMainView& aView );
       
   166 
       
   167     /**
       
   168      * 
       
   169      * @param aDataProviderIf
       
   170      * @param aView Main view
       
   171      */
       
   172     void ConstructL( 
       
   173             CVcxNsUiEngine& aDataProviderIf, 
       
   174             CVcxHgVodMainView& aView  );
       
   175     
       
   176     /**
       
   177      * Start playback of given video item.
       
   178      */
       
   179     void StartPlaybackL();
       
   180     
       
   181     /**
       
   182      * Open selected list items browser link. 
       
   183      * @param aSelected Focused list item index
       
   184      */
       
   185     void OpenBrowserLinkL( TInt aSelected );
       
   186     
       
   187     /**
       
   188      * Send video content link via SMS or Email
       
   189      *
       
   190      * @param aMessageTypeModule MTM service Uid
       
   191      * @param aSelected Selected item index from the list
       
   192      */
       
   193     void ShareLinkL( const TUid aMessageTypeModule, TInt aSelected );
       
   194     
       
   195     /**
       
   196      * Check MSK.
       
   197      * @param aShowDownload
       
   198      * @param aShowPlay
       
   199      * @param aShowResume
       
   200      * 
       
   201      */
       
   202     void CheckMskL( TBool aShowDownload, 
       
   203                     TBool aShowPlay,
       
   204                     TBool aShowResume );   
       
   205     
       
   206     /**
       
   207      * Handle selected item in content list (touch).
       
   208      */
       
   209     void HandleSelectionL();
       
   210 
       
   211 private: // data
       
   212 
       
   213     /**
       
   214      * Flag for email accoun availability.
       
   215      */
       
   216     TBool iEmailAccountEnabled;
       
   217         
       
   218     /**
       
   219      * List widget model handler
       
   220      * Own.
       
   221      */
       
   222     CVcxHgVodContentListModelHandler* iModelHandler;
       
   223     };
       
   224 
       
   225 #endif // VCXHGVODCONTENTLISTIMPL_H