photosgallery/viewframework/dataprovider/inc/glxattributerequirement.h
changeset 0 4e91876724a2
child 18 bcb43dc84c44
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:    set the required attribute to the medialist
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef _GLXATTRIBUTEREQUIREMENT_H__
       
    22 #define _GLXATTRIBUTEREQUIREMENT_H__
       
    23 
       
    24 #include <glxattributecontext.h>   // Fetch context to retrieve thumbnails
       
    25 #include <glxthumbnailcontext.h>   // Fetch context to retrieve thumbnails
       
    26 #include <glxmedialistiterator.h>  // for Fetch contexts n the list in a non-sequential order
       
    27 
       
    28 #include <mglxmedialist.h>         // Interface for reading lists of media items
       
    29 
       
    30 /**
       
    31  * CGlxAttributeRequirements 
       
    32  * This class will set the required attribute to the medialist
       
    33  */
       
    34 class CGlxAttributeRequirements: public CBase
       
    35     {
       
    36 
       
    37 private:
       
    38      void ConstructL(); 
       
    39 public:
       
    40     
       
    41     /**
       
    42      * NewL 
       
    43      * @param aMediaList the list to which attributes will be set
       
    44      */
       
    45     IMPORT_C static  CGlxAttributeRequirements* NewL( MGlxMediaList& aMediaList ) ;
       
    46 	
       
    47 	/**
       
    48      * NewLC 
       
    49      * @param aMediaList the list to which attributes will be set
       
    50      */
       
    51 	static  CGlxAttributeRequirements*NewLC( MGlxMediaList& aMediaList ) ;
       
    52 	
       
    53 	/**
       
    54      * Default constructor 
       
    55      * @param aMediaList the list to which attributes will be set
       
    56      */
       
    57 	CGlxAttributeRequirements( MGlxMediaList& aMediaList );
       
    58 	
       
    59 	/**
       
    60      * Destructor 
       
    61      */
       
    62 	~CGlxAttributeRequirements();
       
    63 	
       
    64 	/**
       
    65      * AddAttributeL 
       
    66      * @param aAttribute 
       
    67      */
       
    68 	void AddAttributeL( const TMPXAttribute& aAttribute );
       
    69 	
       
    70 	/**
       
    71      * AddThumbnailL 
       
    72      * @todo
       
    73      */
       
    74 	void AddThumbnailL( const TSize& aSize );
       
    75     
       
    76     /**
       
    77      * SetIteratorIndex 
       
    78      * @todo
       
    79      */
       
    80 	void SetIteratorIndex( TInt aIndex );
       
    81 	
       
    82 	
       
    83 private:
       
    84 	
       
    85 	// medialist to which attribute is set
       
    86 	MGlxMediaList& iMediaList;
       
    87 	
       
    88     TGlxFromFocusOutwardIterator iFromFocusOutwardIterator;
       
    89     TGlxFromManualIndexBlockyIterator iBlockyIterator;
       
    90     //RArray<CGlxAttributeContext*> iArributeContext;
       
    91     RPointerArray<CGlxDefaultAttributeContext> iArributeContext;
       
    92     RPointerArray<CGlxThumbnailContext> iThumbnailContext;
       
    93     
       
    94     TGlxFromFocusOutwardIterator iFsFromFocusOutwardIterator;
       
    95 	
       
    96 	//Context variable to keep track of Fullscreenthumbnail requests
       
    97 	//When the context is already created, upon orientation change, only the Default spec 
       
    98 	//will be changed, rather than adding a new context
       
    99 	//This is done to prioritize fetching of current orientation thumbnail
       
   100 	CGlxThumbnailContext* iFsThumbnailContext;
       
   101     };
       
   102 
       
   103 
       
   104 #endif //_GLXATTRIBUTEREQUIREMENT_H__