menufw/hierarchynavigator/hnmetadatamodel/inc/hnmduimapping.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2007-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 "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:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_HNMDUIMAPPING_H
       
    21 #define C_HNMDUIMAPPING_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <xmlengdom.h>
       
    25 #include <e32hashtab.h>
       
    26 
       
    27 #include "hnglobals.h"
       
    28 
       
    29 class CLiwDefaultMap;
       
    30 struct THnMdCommonPointers;
       
    31 class CHnMdUiMappingElement;
       
    32 class CLiwGenericParamList;
       
    33 class CHnItemModel;
       
    34 
       
    35 /**
       
    36  * UI mapping.
       
    37  * 
       
    38  * This class contains the list of CHnMdUiMappingElement objects.
       
    39  * 
       
    40  * @lib hnmetadatamodel
       
    41  * @since S60 5.0
       
    42  * @ingroup group_hnmetadatamodel
       
    43  */
       
    44 NONSHARABLE_CLASS(CHnMdUiMapping) : public CBase
       
    45     {
       
    46 public:
       
    47     
       
    48     /**
       
    49      * Two-phase constructor.
       
    50      *
       
    51      * @param aElement Xml element.
       
    52      * @param aCmnPtrs Common pointers.
       
    53      * @return Fully constructed object.
       
    54      */
       
    55     static CHnMdUiMapping* NewL( TXmlEngElement aElement,
       
    56                                  THnMdCommonPointers* aCmnPtrs );
       
    57 
       
    58     /**
       
    59      * Two-phase constructor.
       
    60      *
       
    61      * @param aElement Xml element.
       
    62      * @param aCmnPtrs Common pointers.
       
    63      * @return Fully constructed object.
       
    64      */
       
    65     static CHnMdUiMapping* NewLC( TXmlEngElement aElement,
       
    66                                   THnMdCommonPointers* aCmnPtrs );
       
    67 
       
    68     /**
       
    69      * Standarc C++ virtual constructor.
       
    70      */
       
    71     virtual ~CHnMdUiMapping();
       
    72     
       
    73     /**
       
    74      * Fills graphical item.
       
    75      *
       
    76      * @param aItemModel Item model.
       
    77      * @param aQueriesResultsList Hash map with query results
       
    78      * @param aPos Current item number
       
    79      * @return True if an item was correctly filled. 
       
    80      */     
       
    81     TBool FillGraphicalItemL( CHnItemModel* aItemModel,
       
    82             const CLiwGenericParamList& aQueriesResultsList, TInt aPos );
       
    83     
       
    84     /**
       
    85      * Adds UI mapping element.
       
    86      *
       
    87      * @param aUiMappingElement UI mapping element.
       
    88      */
       
    89     void AddUiMappingElementL(
       
    90         CHnMdUiMappingElement *aUiMappingElement );
       
    91     
       
    92 private:
       
    93 
       
    94     /**
       
    95      * Standard C++ constructor.
       
    96      */
       
    97     CHnMdUiMapping();
       
    98 
       
    99     /**
       
   100      * Standard symbian 2nd pahse constructor.
       
   101      *
       
   102      * @param aElement Xml element.
       
   103      * @param aCmnPtrs Common pointers.
       
   104      */
       
   105     void ConstructL( TXmlEngElement aElement,
       
   106                      THnMdCommonPointers* aCmnPtrs );
       
   107     
       
   108 private: // data
       
   109 
       
   110     /**
       
   111      * Mappings.
       
   112      */
       
   113     RPointerArray<CHnMdUiMappingElement> iMappings;
       
   114 
       
   115     };
       
   116 
       
   117 #endif // C_HNMMUIMAPPING_H