websrv_pub/web_service_description_api/inc/SenFacet.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:    Parser base element class declaration        
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef SEN_FACET_H
       
    23 #define SEN_FACET_H
       
    24 
       
    25 // INCLUDES
       
    26 #include <SenBaseElement.h>
       
    27 
       
    28 // CONSTANTS
       
    29 _LIT8(KSenFacet,        "Facet");
       
    30 _LIT8(KFacetAttrName,   "name");
       
    31 _LIT8(KFacetAttrType,   "type");
       
    32 
       
    33 // CLASS DECLARATION
       
    34 class CSenFacet : public CSenBaseElement
       
    35     {
       
    36     public:
       
    37         
       
    38         /**
       
    39         * Basic constructor.
       
    40         */
       
    41         IMPORT_C static CSenFacet* NewL();
       
    42 
       
    43         /**
       
    44         * Basic constructor.
       
    45         * @param    aCopiedSource   source to copy facet data from.
       
    46         */
       
    47         IMPORT_C static CSenFacet* NewL(CSenElement& aCopiedSource);
       
    48 
       
    49         /**
       
    50         * Basic constructor.
       
    51         * @param aNsUri     The namespace URI of the new element
       
    52         * @param aLocalName The local name of the new element
       
    53         * @param aQName     The qualified name of the new element
       
    54         * @param aAttributes    The attributes of the new element
       
    55         * Leave codes:  
       
    56         *       KErrSenInvalidCharacters if aLocalName or aQName contains
       
    57         *       illegal characters.     
       
    58         *       KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length.
       
    59         */
       
    60         IMPORT_C static CSenFacet* NewL(const TDesC8& aNsUri,
       
    61                                         const TDesC8& aLocalName,
       
    62                                         const TDesC8& aQName,
       
    63                                         const RAttributeArray& aAttributes);
       
    64 
       
    65         IMPORT_C virtual ~CSenFacet();
       
    66 
       
    67         // New functions
       
    68         
       
    69         /**
       
    70         * Setter for name.
       
    71         * @param aName  the name to be set.
       
    72         */
       
    73         IMPORT_C virtual void SetNameL(const TDesC8& aName);
       
    74 
       
    75         /**
       
    76         * Setter for type.
       
    77         * @param aType  the type to be set.
       
    78         */
       
    79         IMPORT_C virtual void SetTypeL(const TDesC8& aType);
       
    80 
       
    81         /**
       
    82         * Setter for value.
       
    83         * @param aValue the value to be set.
       
    84         */
       
    85         IMPORT_C virtual void SetValueL(const TDesC8& aValue);
       
    86 
       
    87         /**
       
    88         * Getter for name.
       
    89         * @return the name of the facet
       
    90         */
       
    91         IMPORT_C virtual TPtrC8 Name();
       
    92 
       
    93         /**
       
    94         * Getter for type.
       
    95         * @return the type of the facet
       
    96         */
       
    97         IMPORT_C virtual TPtrC8 Type();
       
    98     
       
    99         /**
       
   100         * Getter for value.
       
   101         * @return the value of the facet
       
   102         */
       
   103         IMPORT_C virtual TPtrC8 Value();
       
   104 
       
   105         virtual void CopyFromL(CSenElement& aSource);
       
   106 
       
   107     protected:
       
   108         
       
   109         /**
       
   110         * C++ default constructor.
       
   111         */
       
   112         IMPORT_C CSenFacet();
       
   113         
       
   114         /**
       
   115         * By default Symbian 2nd phase constructors are private.
       
   116         */
       
   117         IMPORT_C void ConstructL(const TDesC8& aLocalName);
       
   118         IMPORT_C void ConstructL(CSenElement& aCopiedSource);
       
   119         IMPORT_C void ConstructL(const TDesC8& aNsUri,
       
   120                                  const TDesC8& aLocalName,
       
   121                                  const TDesC8& aQName,
       
   122                                  const RAttributeArray& aAttributes);
       
   123     };
       
   124 
       
   125 #endif // SEN_FACET_H
       
   126 
       
   127 // End of File