omaprovisioning/provisioning/ProvisioningEngine/Inc/WPElementFactory.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2002 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:  WPElementFactory can be used to create any CWP* element.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WPELEMENTFACTORY_H
       
    20 #define WPELEMENTFACTORY_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CWPCharacteristic;
       
    27 class CWPParameter;
       
    28 class MWPElement;
       
    29 
       
    30 //  CLASS DEFINITION
       
    31 
       
    32 /**
       
    33 *  Factory class for CWP* elements.
       
    34 *
       
    35 *  @lib ProvisioningEngine
       
    36 *  @since 2.0
       
    37 */
       
    38 class WPElementFactory 
       
    39     {
       
    40     public:
       
    41         /** 
       
    42         * Create a CWPCharacteristic.
       
    43         * @param aType The type of characteristic
       
    44         * @return Characteristic. Ownership is transferred.
       
    45         */
       
    46         IMPORT_C static CWPCharacteristic* CreateCharacteristicL( TInt aType );
       
    47 
       
    48         /** 
       
    49         * Create a CWPCharacteristic.
       
    50         * @param aType The type of characteristic
       
    51         * @return Characteristic. Ownership is transferred.
       
    52         */
       
    53         IMPORT_C static CWPCharacteristic* CreateCharacteristicLC( TInt aType );
       
    54 
       
    55         /** 
       
    56         * Create a CWPCharacteristic.
       
    57         * @param aName The characteristic's name
       
    58         * @return Characteristic. Ownership is transferred.
       
    59         */
       
    60         IMPORT_C static CWPCharacteristic* CreateCharacteristicL( const TDesC& aName );
       
    61 
       
    62         /** 
       
    63         * Create a CWPCharacteristic.
       
    64         * @param aName The characteristic's name
       
    65         * @return Characteristic. Ownership is transferred.
       
    66         */
       
    67         IMPORT_C static CWPCharacteristic* CreateCharacteristicLC( const TDesC& aName );
       
    68 
       
    69         /** 
       
    70         * Create a CWPParameter.
       
    71         * @param aType The parameter id
       
    72         * @param aValue The parameter value
       
    73         * @return Parameter. Ownership is transferred.
       
    74         */
       
    75         IMPORT_C static CWPParameter* CreateParameterL( TInt aID, const TDesC& aValue );
       
    76 
       
    77         /** 
       
    78         * Create a CWPParameter.
       
    79         * @param aType The parameter id 
       
    80         * @param aValue The parameter value
       
    81         * @return Parameter. Ownership is transferred.
       
    82         */
       
    83         IMPORT_C static CWPParameter* CreateParameterLC( TInt aID, const TDesC& aValue );
       
    84 
       
    85         /** 
       
    86         * Create a CWPParameter.
       
    87         * @param aName The parameter name
       
    88         * @param aValue The parameter value
       
    89         * @return Parameter. Ownership is transferred.
       
    90         */
       
    91         IMPORT_C static CWPParameter* CreateParameterL( const TDesC& aName, 
       
    92             const TDesC& aValue );
       
    93 
       
    94         /** 
       
    95         * Create a CWPParameter.
       
    96         * @param aName The parameter name
       
    97         * @param aValue The parameter value
       
    98         * @return Parameter. Ownership is transferred.
       
    99         */
       
   100         IMPORT_C static CWPParameter* CreateParameterLC( const TDesC& aName,
       
   101             const TDesC& aValue );
       
   102 
       
   103         /** 
       
   104         * Create an element.
       
   105         * @param aType The element type
       
   106         * @return Element. Ownership is transferred.
       
   107         */
       
   108         IMPORT_C static MWPElement* CreateL( TInt aType );
       
   109 
       
   110         /** 
       
   111         * Create an element.
       
   112         * @param aType The element type
       
   113         * @return Element. Ownership is transferred.
       
   114         */
       
   115         IMPORT_C static MWPElement* CreateLC( TInt aType );
       
   116         
       
   117     };
       
   118 
       
   119 #endif /* WPELEMENTFACTORY_H */