homescreensrv_plat/hs_settings_api/inc/propertymap.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:  Encapsulates name and value
       
    15 *
       
    16 */
       
    17 #ifndef C_CPROPERTYMAP_H
       
    18 #define C_CPROPERTYMAP_H
       
    19 
       
    20 #include <e32base.h>
       
    21 
       
    22 namespace HSPluginSettingsIf{
       
    23 
       
    24 /**
       
    25  *  Presents property as name and value pair
       
    26  *
       
    27  *  @code
       
    28  *  @endcode
       
    29  *
       
    30  *  @lib xnlayoutengine.lib
       
    31  *  @since S60 v5.0
       
    32  */
       
    33 class CPropertyMap : public CBase
       
    34     {
       
    35 public:
       
    36     /**
       
    37      * Two-phased constructor.
       
    38      */
       
    39     IMPORT_C static CPropertyMap* NewL();
       
    40 
       
    41     /**
       
    42      * Two-phased constructor.
       
    43      */
       
    44     IMPORT_C static CPropertyMap* NewLC();
       
    45 
       
    46     /**
       
    47     * Destructor.
       
    48     */
       
    49     IMPORT_C virtual ~CPropertyMap();
       
    50 
       
    51     /**
       
    52      * Set property name
       
    53      *
       
    54      * @param aName Property nane
       
    55      * @return Reference to this object
       
    56      */
       
    57     IMPORT_C CPropertyMap& SetNameL( const TDesC8& aName );
       
    58     
       
    59     /**
       
    60      * Get property name
       
    61      *
       
    62     * @return Reference to name or KNullDesC8
       
    63      */
       
    64     IMPORT_C const TDesC8& Name()const;
       
    65     
       
    66     /**
       
    67      * Set property value
       
    68      *
       
    69      * @param aValue Property value
       
    70      * @return Reference to this object
       
    71      */
       
    72     IMPORT_C CPropertyMap& SetValueL( const TDesC8& aValue );
       
    73     
       
    74     /**
       
    75      * Get property value
       
    76      *
       
    77     * @return Reference to value or KNullDesC8
       
    78      */
       
    79     IMPORT_C const TDesC8& Value()const;
       
    80 
       
    81 private:
       
    82     /**
       
    83      * Constructor.
       
    84      */
       
    85     CPropertyMap();
       
    86 
       
    87     /**
       
    88      * Second phase constructor.
       
    89      */
       
    90     void ConstructL();
       
    91 
       
    92 private: // data
       
    93     /**
       
    94      * Own. Property name
       
    95      */
       
    96     HBufC8* iName;
       
    97     /**
       
    98      * Own. Property value
       
    99      */
       
   100     HBufC8* iValue;
       
   101     };
       
   102 }
       
   103 
       
   104 #endif // C_CPROPERTYMAP_H