photosgallery/viewframework/dataprovider/inc/glxmedialistmulmodelprovider.h
branchRCL_3
changeset 26 5b3385a43d68
equal deleted inserted replaced
25:8e5f6eea9c9f 26:5b3385a43d68
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:    Implementation class for Medialist Access for Data
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef _GLXMEDIALISTMULMODELPROVIDER_H_
       
    22 #define _GLXMEDIALISTMULMODELPROVIDER_H_
       
    23 
       
    24 #include <e32base.h>                        // Container Base Class
       
    25 #include <mul/imulwidget.h>
       
    26 
       
    27 // Forward declarations
       
    28 class CAlfEnv;                              // This is the UI Accelerator Toolkit environment object
       
    29 class MGlxMediaList;                        // Interface for reading lists of media items
       
    30 class TGlxMulBindingSetFactory;             // Create binding set
       
    31 class CGlxMediaListMulModelProviderImpl;    // Actual implemntation for providign the data to the clients is done here
       
    32 
       
    33 /**
       
    34 * CGlxMediaListMulModelProvider is the provider class which provides data for 
       
    35 * list view, grid view. 
       
    36 * This doesnt have any implementaiton.
       
    37 * This actual implementaion is provided in CGlxMediaListMulModelProviderImpl
       
    38 */
       
    39 NONSHARABLE_CLASS( CGlxMediaListMulModelProvider ) : public CBase
       
    40     {
       
    41 public:
       
    42 	/**
       
    43 	* The client uses this API to create the provider
       
    44 	* @param aEnv The Alf Environment
       
    45 	* @param aWidget The widget being used by client for which the model has to be set
       
    46 	* @param aMediaList The instance of medialist which provides data for the model
       
    47 	* @param aFactory The instance of the bindingset factory 
       
    48 	* @param aDefaultTemplate The template that is being used for the widget.
       
    49 	*/
       
    50     IMPORT_C static CGlxMediaListMulModelProvider* NewL( CAlfEnv& aEnv, 
       
    51 											Alf::IMulWidget& aWidget, 
       
    52 											MGlxMediaList& aMediaList, 
       
    53 											const TGlxMulBindingSetFactory& aFactory, 
       
    54 											Alf::mulwidget::TLogicalTemplate aDefaultTemplate,
       
    55 											TInt aDataWindowSize );
       
    56     /**
       
    57 	* Destructor
       
    58 	*/            
       
    59     IMPORT_C ~CGlxMediaListMulModelProvider();
       
    60     
       
    61       /**
       
    62       * Requests the data model to update
       
    63       * 
       
    64       * @param aIndex Position from where items have to be updated.
       
    65       * @param aCount Number of items to be updated.
       
    66       */ 
       
    67     IMPORT_C void UpdateItems( TInt aIndex, TInt aCount );
       
    68 
       
    69       /**
       
    70       * Enable/disable animation
       
    71       * @param aAnimate - ETrue to enable the animation; EFalse Otherwise.
       
    72       */ 
       
    73     IMPORT_C void AnimateDRMGifItem( TBool aAnimate );
       
    74 
       
    75 private:
       
    76     CGlxMediaListMulModelProvider();
       
    77     
       
    78     /** ConstructL
       
    79 	* @param aEnv Env variable of ALF
       
    80  	* @param aWidget Alf Widget type
       
    81  	* @param aMediaList medialist from which attributes to be fetched
       
    82  	* @param aDefaultTemplate Template that will be set to model
       
    83  	*/
       
    84     void ConstructL(CAlfEnv& aEnv, 
       
    85 					Alf::IMulWidget& aWidget, 
       
    86 					MGlxMediaList& aMediaList,
       
    87 					const TGlxMulBindingSetFactory& aFactory, 
       
    88 					Alf::mulwidget::TLogicalTemplate aDefaultTemplate,
       
    89 					TInt aDataWindowSize );
       
    90 
       
    91 	// The implementaion APIs of CGlxMediaListMulModelProviderImpl 
       
    92 	// have to be called: owns
       
    93     CGlxMediaListMulModelProviderImpl* iImpl;
       
    94     };
       
    95     
       
    96 #endif // _GLXMEDIALISTMULMODELPROVIDER_H_
       
    97