videofeeds/hgvodui/inc/vcxhgvodservicelistimpl.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 service view functionality implementation*
       
    15 */
       
    16 
       
    17 
       
    18 // Version : %version: 5 %
       
    19 
       
    20 #ifndef VCXHGVODSERVICELISTIMPL_H
       
    21 #define VCXHGVODSERVICELISTIMPL_H
       
    22 
       
    23 #include "vcxhgvodlistimplbase.h"
       
    24 #include "vcxhgvodmainviewcontainer.h"
       
    25 
       
    26 class CHgScroller;
       
    27 class CVcxHgVodMainView;
       
    28 class CVcxHgVodMainViewContainer;
       
    29 class CVcxHgVodServiceListModelHandler;
       
    30 class CVcxNsUiEngine;
       
    31 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35  *  Service 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 CVcxHgVodServiceListImpl : 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 CVcxHgVodServiceListImpl* 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 CVcxHgVodServiceListImpl* NewLC( 
       
    70             CHgScroller& aScroller, 
       
    71             CVcxNsUiEngine& aDataProviderIf,
       
    72             CVcxHgVodMainView& aView );
       
    73 
       
    74     /**
       
    75     * Destructor.
       
    76     */
       
    77     virtual ~CVcxHgVodServiceListImpl();
       
    78 
       
    79     /**
       
    80      * Activate menu pane items before displaying menu
       
    81      * 
       
    82      * @param aMenuPane Pointer to menu pane
       
    83      *
       
    84      */
       
    85     void ActivateMenuPaneItemsL( CEikMenuPane* aMenuPane, TInt aResourceId );
       
    86     
       
    87 public: //From CVcxHgVodListImplBase
       
    88     
       
    89     /**
       
    90      * Handle user command
       
    91      * @param aCommand Command to handle
       
    92      */
       
    93     void HandleCommandL( TInt aCommand );
       
    94     
       
    95     /**
       
    96     * Activate model
       
    97     * 
       
    98     */
       
    99     void DoActivateL();
       
   100     
       
   101     /**
       
   102     * Deactivate model
       
   103     * 
       
   104     */
       
   105     void DoDeactivate();
       
   106     
       
   107     /**
       
   108     * HandleKeyEventL 
       
   109     */
       
   110     TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
   111     
       
   112     /**
       
   113      * Handles item opening. 
       
   114      */
       
   115     void HandleOpenL( TInt aIndex );
       
   116     
       
   117     /**
       
   118      * Handles selection changes.
       
   119      */
       
   120     void HandleSelectL( TInt aIndex );
       
   121 
       
   122     /**
       
   123     * CheckSoftkeysL 
       
   124     */
       
   125     void CheckSoftkeysL();
       
   126 
       
   127     /**
       
   128     * Get help context.
       
   129     *
       
   130     * @param aContext context
       
   131     */
       
   132     void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   133 
       
   134     /**
       
   135      * Update title pane text for services view.
       
   136      */
       
   137     void UpdateTitlePaneL();
       
   138 
       
   139 
       
   140 public:
       
   141     
       
   142     /**
       
   143      * Refresh view contents 
       
   144      *
       
   145      */
       
   146     void Refresh();
       
   147     
       
   148 private:    
       
   149     
       
   150     /**
       
   151      * Default constructor
       
   152      * @param aListWidget List widget
       
   153      * @param aView Main view
       
   154      */
       
   155     CVcxHgVodServiceListImpl( CHgScroller& aScroller,
       
   156                               CVcxNsUiEngine& aDataProviderIf,
       
   157                               CVcxHgVodMainView& aView );
       
   158 
       
   159     /**
       
   160      * 
       
   161      * @param aDataProviderIf
       
   162      * @param aAlfEnv
       
   163      */
       
   164     void ConstructL( CVcxNsUiEngine& aDataProviderIf );
       
   165     
       
   166     /**
       
   167      * Check if list item is removable.
       
   168      * @param aIndex
       
   169      * @return ETrue if feed can be removed,
       
   170      * otherwise EFalse
       
   171      */
       
   172     TBool FeedRemovable( TInt aIndex ); 
       
   173     
       
   174     /**
       
   175      * Remove feed if user accepts.
       
   176      * @param aIndex Indexfrom where feed is removed
       
   177      *
       
   178      */
       
   179     void RemoveFeedL( TInt aIndex );
       
   180 
       
   181     /**
       
   182      * Check if some feed has been selected for moving
       
   183      * @return ETrue if move operation is unfinished,
       
   184      *         otherwise EFalse.
       
   185      */
       
   186     TBool IsMoving() const;
       
   187 
       
   188     /**
       
   189      * Start moving feed.
       
   190      */
       
   191     void StartMoveL();
       
   192 
       
   193     /**
       
   194      * Stop moving. Move item to selected index.
       
   195      * @param aSave ETrue if item is moved to new position in list
       
   196      *              EFalse if move operation is cancelled.
       
   197      */
       
   198     void StopMovingL( TBool aSave );
       
   199     
       
   200     /**
       
   201      * Check, is there any video services.
       
   202      * @return Is there any video services,
       
   203      *         ETrue if there's at least one.
       
   204      */
       
   205     TBool HasVideoServicesL();
       
   206 
       
   207 private: // data
       
   208 
       
   209     /**
       
   210      * List widget model handler
       
   211      * Own.
       
   212      */
       
   213     CVcxHgVodServiceListModelHandler* iModelHandler;
       
   214     
       
   215     /**
       
   216      * Flag that indicates is a service being moved.
       
   217      */
       
   218     TBool iMoving;
       
   219 
       
   220     /**
       
   221      * Source item index for move operation.
       
   222      */
       
   223     TInt iSource;
       
   224 
       
   225     /**
       
   226      * Target item index for move operation.
       
   227      */
       
   228     TInt iTarget;
       
   229     
       
   230     };
       
   231 
       
   232 #endif // VCXHGVODSERVICELISTIMPL_H