homescreensrv_plat/hs_settings_api/inc/itemmap.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     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 "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:  Item id, name and properties
       
    15 *
       
    16 */
       
    17 #ifndef C_CITEMMAP_H
       
    18 #define C_CITEMMAP_H
       
    19 
       
    20 #include <e32base.h>
       
    21 
       
    22 namespace HSPluginSettingsIf{
       
    23 
       
    24 class CPropertyMap;
       
    25 
       
    26 /**
       
    27  *  Item id, name and properties
       
    28  *  
       
    29  *
       
    30  *  @code
       
    31  *   
       
    32  *  @endcode
       
    33  *
       
    34  *  @lib xnlayoutengine.lib
       
    35  *  @since S60 v5.0
       
    36  */
       
    37 class CItemMap : public CBase
       
    38     {
       
    39 public:
       
    40 
       
    41     /**
       
    42      * Two-phased constructor.
       
    43      */
       
    44     IMPORT_C static CItemMap* NewL();
       
    45     /**
       
    46      * Two-phased constructor.
       
    47      */
       
    48     IMPORT_C static CItemMap* NewLC();
       
    49 
       
    50     /**
       
    51     * Destructor.
       
    52     */
       
    53     IMPORT_C virtual ~CItemMap();
       
    54 
       
    55     /**
       
    56      * Set item id
       
    57      *
       
    58      * @param aItemId Item id
       
    59      * @return Reference to this object
       
    60      */
       
    61     IMPORT_C CItemMap& SetItemIdL(const TDesC8& aItemId );
       
    62     
       
    63     /**
       
    64      * Get item id
       
    65      *
       
    66      * @return Reference to item id or KNullDesC8
       
    67      */
       
    68     IMPORT_C const TDesC8& ItemId()const;
       
    69     
       
    70     /**
       
    71      * Set item name
       
    72      *
       
    73      * @param aItemName Item name
       
    74      * @return Reference to this object
       
    75      */
       
    76     IMPORT_C CItemMap& SetItemNameL(const TDesC8& aItemName );
       
    77     
       
    78     /**
       
    79      * Get item name
       
    80      *
       
    81      * @return Reference to item name or KNullDesC8
       
    82      */
       
    83     IMPORT_C const TDesC8& ItemName()const;
       
    84     
       
    85     /**
       
    86      * Add item property map into properties array
       
    87      *
       
    88      * @param aPropertyMap Property map. Takes ownership
       
    89      * @return Reference to this object
       
    90      */
       
    91     IMPORT_C CItemMap& AddPropertyMapL(CPropertyMap* aPropertyMap );
       
    92     
       
    93     /**
       
    94      * Get property map array.
       
    95      *
       
    96      * @return Reference to proprty map array
       
    97      */
       
    98     IMPORT_C RPointerArray<CPropertyMap>& Properties()const;
       
    99 
       
   100 private:
       
   101 
       
   102     CItemMap();
       
   103 
       
   104     void ConstructL();
       
   105 
       
   106 
       
   107 private: // data
       
   108     /**
       
   109      * Own. Item id
       
   110      */
       
   111     HBufC8* iItemId;
       
   112     /**
       
   113      * Own. Item name
       
   114      */
       
   115     HBufC8* iItemName;
       
   116     /**
       
   117      * Own. Array of property maps
       
   118      */
       
   119     mutable RPointerArray<CPropertyMap> iProperties;
       
   120     };
       
   121 
       
   122 } // namespace HSPluginSettingsIf
       
   123 
       
   124 
       
   125 #endif // C_CITEMMAP_H