epoc32/include/mw/senbaseattribute.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:        Class offers basic implementation of an XML attribute
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
williamr@2
    20
williamr@2
    21
williamr@2
    22
williamr@2
    23
williamr@2
    24
williamr@2
    25
#ifndef SEN_BASE_ATTRIBUTE_H
williamr@2
    26
#define SEN_BASE_ATTRIBUTE_H
williamr@2
    27
williamr@2
    28
//  INCLUDES
williamr@2
    29
#include <e32base.h>
williamr@2
    30
#include <s32strm.h>
williamr@2
    31
williamr@2
    32
// CLASS DECLARATION
williamr@2
    33
williamr@2
    34
/**
williamr@2
    35
*  Class offers basic implementation of an XML attribute
williamr@2
    36
*  XML attribute is a name-value pair type value object,
williamr@2
    37
*  which may or may not have a namespace prefix. Note 
williamr@2
    38
*  that both name and value may contain a namespace prefix.
williamr@2
    39
*  @lib SenXML.dll
williamr@2
    40
*  @since Series60 3.0
williamr@2
    41
*/
williamr@2
    42
class CSenBaseAttribute : public CBase
williamr@2
    43
    {
williamr@2
    44
    public:  // Constructors and destructor
williamr@2
    45
williamr@2
    46
        /**
williamr@2
    47
         *  Basic two-phased constructor.
williamr@2
    48
         *  @since Series60 3.0
williamr@2
    49
         *  @param aName:   Name of the attribute
williamr@2
    50
         *  @param aValue:  Attribute's value.
williamr@2
    51
         *  Leave codes:    
williamr@2
    52
         *      KErrSenInvalidCharacters if aName contains illegal characters.      
williamr@2
    53
         *      KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length.
williamr@2
    54
         */
williamr@2
    55
        IMPORT_C static CSenBaseAttribute* NewL(const TDesC8& aName,
williamr@2
    56
                                                const TDesC8& aValue);
williamr@2
    57
williamr@2
    58
        /**
williamr@2
    59
         *  Basic constructor.
williamr@2
    60
         *  @since Series60 3.0
williamr@2
    61
         *  @param aQName:  Qualified name of the attribute
williamr@2
    62
         *  @param aName:   Name of the attribute
williamr@2
    63
         *  @param aValue:  Attribute's value.
williamr@2
    64
         *  Leave codes:    
williamr@2
    65
         *      KErrSenInvalidCharacters if aName or aQName contain 
williamr@2
    66
         *      illegal characters.     
williamr@2
    67
         *      KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length.
williamr@2
    68
         */
williamr@2
    69
        IMPORT_C static CSenBaseAttribute* NewL(const TDesC8& aQName,
williamr@2
    70
                                                const TDesC8& aName,
williamr@2
    71
                                                const TDesC8& aValue);
williamr@2
    72
            
williamr@2
    73
        /**
williamr@2
    74
        * Destructor.
williamr@2
    75
        */
williamr@2
    76
        IMPORT_C virtual ~CSenBaseAttribute();
williamr@2
    77
        
williamr@2
    78
        // New functions
williamr@2
    79
        
williamr@2
    80
        /**
williamr@2
    81
         * Getter for the attribute name.
williamr@2
    82
         * @since Series60 3.0
williamr@2
    83
         * @return the attribute name.
williamr@2
    84
         */
williamr@2
    85
        virtual const TDesC8& Name() const;
williamr@2
    86
williamr@2
    87
        /**
williamr@2
    88
         * Getter for the attribute value.
williamr@2
    89
         * @since Series60 3.0
williamr@2
    90
         * @return the attribute value.
williamr@2
    91
         */
williamr@2
    92
        virtual const TDesC8& Value() const;
williamr@2
    93
        
williamr@2
    94
        /**
williamr@2
    95
         * Setter for the attribute value.
williamr@2
    96
         * @since Series60 3.0
williamr@2
    97
         * @param aValue:   value to be set
williamr@2
    98
         * @return the new value.
williamr@2
    99
         */
williamr@2
   100
        virtual const TDesC8& SetValueL(const TDesC8& aValue);
williamr@2
   101
    
williamr@2
   102
    protected:  
williamr@2
   103
    
williamr@2
   104
        /**
williamr@2
   105
        * C++ default constructor
williamr@2
   106
        * @since Series60 3.0
williamr@2
   107
        */
williamr@2
   108
        IMPORT_C CSenBaseAttribute();
williamr@2
   109
    
williamr@2
   110
        /**
williamr@2
   111
         * Following BaseConstructL methods should be called from the deriving
williamr@2
   112
         * classes ConstructL() methods. Parameter info is found in the
williamr@2
   113
         * corresponding NewL-methods.
williamr@2
   114
         * @since Series60 3.0
williamr@2
   115
         * @param aName is the name of this attribute. Cannot contain characters
williamr@2
   116
         *        that are illegal in XML (like basic entities in decoded form)
williamr@2
   117
         * @param aValue is the value of this attribute. Cannot contain characters
williamr@2
   118
         *        that are illegal in XML (like basic entities in decoded form)
williamr@2
   119
         */
williamr@2
   120
        IMPORT_C void BaseConstructL(const TDesC8& aName,
williamr@2
   121
                                    const TDesC8& aValue);
williamr@2
   122
williamr@2
   123
        /**
williamr@2
   124
        * @since Series60 3.0
williamr@2
   125
        * @param aName is the name of this attribute. Cannot contain characters
williamr@2
   126
        *        that are illegal in XML (like basic entities in decoded form)
williamr@2
   127
        * @param aQName is the qualified, prefixed name of this XML attribute.
williamr@2
   128
        *        Cannot contain characters which are illegal in XML.
williamr@2
   129
        * @param aValue is the value of this attribute. Cannot contain characters
williamr@2
   130
        *        that are illegal in XML (like basic entities in decoded form)
williamr@2
   131
        */
williamr@2
   132
        IMPORT_C void BaseConstructL(const TDesC8& aName,
williamr@2
   133
                                     const TDesC8& aQName,
williamr@2
   134
                                     const TDesC8& aValue);
williamr@2
   135
        
williamr@2
   136
    private:    // Data
williamr@2
   137
        HBufC8* ipName;
williamr@2
   138
        HBufC8* ipValue;
williamr@2
   139
    };
williamr@2
   140
williamr@2
   141
#endif // SEN_BASE_ATTRIBUTE_H
williamr@2
   142
williamr@2
   143
// End of File
williamr@2
   144