photosgallery/viewframework/dataprovider/inc/glxdetailsmulmodelprovider.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     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:    Abstraction for details data provider
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef _GLXDETAILSMULMODELPROVIDER_H_
       
    22 #define _GLXDETAILSMULMODELPROVIDER_H_
       
    23 
       
    24 #include<e32base.h>                     // Container Base Class
       
    25 #include "mglxmedialist.h"              // lib glxmedialists.lib
       
    26 #include <mul/imulwidget.h>
       
    27 
       
    28 // Forward declarations
       
    29 class CAlfEnv;                          // This is the UI Accelerator Toolkit environment object
       
    30 class CEikMenuPane;                     // Menu panes are opened by activating the menu title
       
    31 class CGlxDetailsMulModelProviderImpl;  // mplementation class of details data provider
       
    32 class TGlxMulBindingSetFactory;         // Binding set Factory object
       
    33 /** Error Id EMPY-7MKDHP **/
       
    34 class MGlxMetadataDialogObserver ;		// call back to  details dailog
       
    35 
       
    36 namespace Alf
       
    37 	{
       
    38 	class IMulWidget;                   // An interface for all Multimedia widgets
       
    39 	} 
       
    40 
       
    41 /**
       
    42  * CGlxDetailsMulModelProvider 
       
    43  * This class provides the necessary abstraction of the details provider 
       
    44  * the implementation is provided by CGlxDetailsMulModelProviderImpl class
       
    45  */
       
    46 NONSHARABLE_CLASS( CGlxDetailsMulModelProvider ) : public CBase
       
    47 	{
       
    48 public:
       
    49 
       
    50 	/**
       
    51 	 * Constructor
       
    52 	 * @param aEnv Env variable of ALF
       
    53 	 * @param aWidget Alf Widget type
       
    54 	 * @param aMediaList medialist from which attributes to be fetched
       
    55 	 * @param aDefaultTemplate Template that will be set to model
       
    56 	 */
       
    57 	IMPORT_C static CGlxDetailsMulModelProvider* NewL( CAlfEnv& aEnv,
       
    58 											Alf::IMulWidget& aWidget, 
       
    59 											MGlxMediaList& aMediaList, 
       
    60 											Alf::mulwidget::TLogicalTemplate aDefaultTemplate,
       
    61 											TInt aDataWindowSize );
       
    62 											
       
    63     /** ConstructL
       
    64  	 * @param aEnv Env variable of ALF
       
    65  	 * @param aWidget Alf Widget type
       
    66  	 * @param aMediaList medialist from which attributes to be fetched
       
    67  	 * @param aDefaultTemplate Template that will be set to model
       
    68  	 */
       
    69     void ConstructL(
       
    70         CAlfEnv& aEnv,	
       
    71         Alf::IMulWidget& aWidget, 
       
    72         MGlxMediaList& aMediaList, 
       
    73         Alf::mulwidget::TLogicalTemplate aDefaultTemplate, 
       
    74         TInt aDataWindowSize);
       
    75         
       
    76 	/**
       
    77 	 * Destructor
       
    78 	 */
       
    79 	IMPORT_C ~CGlxDetailsMulModelProvider();	
       
    80   
       
    81 	/**
       
    82 	 * This Api is called from client with the required factory instance
       
    83 	 * This will be called as many number of times as the number of items present in details view
       
    84 	 * @param aFactory factory instance
       
    85 	 */
       
    86 	IMPORT_C void AddEntryL( const TGlxMulBindingSetFactory& aFactory );
       
    87 	
       
    88 	/**
       
    89 	 * OfferCommandL
       
    90 	 * This will be called from view whenever there is an event (for example: navi key pressed )
       
    91 	 * @param aCommandId Id of the command that is about to be executed
       
    92 	 */
       
    93 	IMPORT_C TBool OfferCommandL( TInt aCommandId );
       
    94 	
       
    95 	/**
       
    96 	 * InitMenuL
       
    97 	 * This will determine what options to be present in menu pane
       
    98 	 * @param aMenu The menu pane to edit
       
    99 	 */
       
   100 	IMPORT_C void InitMenuL( CEikMenuPane& aMenu );
       
   101 	
       
   102     /**
       
   103      * HideLocationMenuItem
       
   104      * @param aMenu The menu pane to edit
       
   105      */
       
   106 	IMPORT_C void HideLocationMenuItem( CEikMenuPane& aMenu );
       
   107 	
       
   108 	/**
       
   109 	 * EnableMskL
       
   110 	 * This will determine which Middle softkey has to be displayed
       
   111 	 */
       
   112 	IMPORT_C void EnableMskL();
       
   113 
       
   114     /**
       
   115      * Set Details Dailog Observer
       
   116      * @param aMenu The menu pane to edit
       
   117      */
       
   118      /** Error Id EMPY-7MKDHP **/
       
   119 	IMPORT_C void SetDetailsDailogObserver( MGlxMetadataDialogObserver& aObserver ) ;
       
   120 
       
   121 private:
       
   122 	
       
   123 	// Implemented class instance: owns
       
   124 	CGlxDetailsMulModelProviderImpl* iImpl; 
       
   125 	};
       
   126 	
       
   127 #endif // _GLXDETAILSMULMODELPROVIDER_H_