menufw/hierarchynavigator/hnutilities/inc/hnmdkeyfactory.h
branchv5backport
changeset 14 1abc632eb502
parent 13 6205fd287e8a
child 20 636d517f67e6
equal deleted inserted replaced
13:6205fd287e8a 14:1abc632eb502
     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 #ifndef HNMDKEYFACTORY_H
       
    20 #define HNMDKEYFACTORY_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <xmlengdom.h>
       
    24 
       
    25 class CHnMdBaseKey;
       
    26 
       
    27 /**
       
    28  * Provides static methods for creating particular key classes.
       
    29  *
       
    30  * @lib hnutilities.lib
       
    31  * @since S60 v3.0
       
    32  * @ingroup group_hnutilities
       
    33  */
       
    34 NONSHARABLE_CLASS( HnMdKeyFactory )
       
    35     {  
       
    36 public:
       
    37 
       
    38     /**
       
    39      * Creates particular key type depending on XML element.
       
    40      * Sets name and value of the key read also from XML. 
       
    41      * 
       
    42      * since S60 v5.0
       
    43      * @param aElement XML DOM Element.
       
    44      * @return Pointer to created key.
       
    45      */
       
    46     IMPORT_C static CHnMdBaseKey* CreateLC( TXmlEngElement aElement );
       
    47     
       
    48     /**
       
    49      * Creates particular key type depending on XML element.
       
    50      * Sets name and value of the key read also from XML. 
       
    51      *
       
    52      * since S60 v5.0
       
    53      * @param aElement XML DOM Element.
       
    54      * @return Pointer to created key.
       
    55      */
       
    56     IMPORT_C static CHnMdBaseKey* CreateL( TXmlEngElement aElement );
       
    57     
       
    58     /**
       
    59      * Creates particular key type depending on passed argument.
       
    60      * Sets name and value of the key. 
       
    61      * 
       
    62      * since S60 v5.0
       
    63      * @param aName Key name.
       
    64      * @param aType Key type.
       
    65      * @param aValue Key value.
       
    66      * @return Pointer to created key.
       
    67      */
       
    68     IMPORT_C static CHnMdBaseKey* CreateL(
       
    69         const TDesC8& aName,
       
    70         const TDesC8& aType,
       
    71         const TDesC8& aValue );
       
    72 
       
    73     /**
       
    74     * Creates particular key type depending on passed argument.
       
    75     * Sets name and value of the key. 
       
    76     * 
       
    77     * since S60 v5.0
       
    78     * @param aName Key name.
       
    79     * @param aType Key type.
       
    80     * @param aValue Key value.
       
    81     * @return Pointer to created key.
       
    82     */
       
    83    IMPORT_C static CHnMdBaseKey* CreateL(
       
    84        const TDesC8& aName,
       
    85        const TDesC8& aType,
       
    86        const TDesC& aValue );    
       
    87     
       
    88  private:
       
    89  
       
    90     /**
       
    91      * Creates particular key type depending on passed argument.
       
    92      *
       
    93      * since S60 v5.0
       
    94      * @param aKeyType Key type.
       
    95      * @return Pointer to created key.
       
    96      */
       
    97     static CHnMdBaseKey* CreateL( const TDesC8& aKeyType );
       
    98     };
       
    99 
       
   100 #endif // HNMDKEYFACTORY_H