epoc32/include/mw/sennamespace.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:        Implementation of XML namespace functionality
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_NAME_SPACE_H
williamr@2
    26
#define SEN_NAME_SPACE_H
williamr@2
    27
williamr@2
    28
//  INCLUDES
williamr@2
    29
#include <e32base.h>
williamr@2
    30
#include <s32mem.h>
williamr@2
    31
williamr@2
    32
// CLASS DECLARATION
williamr@2
    33
williamr@2
    34
/**
williamr@2
    35
* Implementation of XML namespace functionality
williamr@2
    36
* All data is in UTF-8 form.
williamr@2
    37
* @lib SenXML.dll
williamr@2
    38
* @since Series60 3.0
williamr@2
    39
*/
williamr@2
    40
class CSenNamespace :   public CBase
williamr@2
    41
    {
williamr@2
    42
    public:  // Constructors and destructor
williamr@2
    43
        
williamr@2
    44
        /**
williamr@2
    45
         * Basic constructor.
williamr@2
    46
         * @param   aPrefix The prefix for the namespace.
williamr@2
    47
         * @param   aUri    The namespace uri for the namespace.
williamr@2
    48
         */
williamr@2
    49
        IMPORT_C static CSenNamespace* NewL(const TDesC8& aPrefix,
williamr@2
    50
                                            const TDesC8& aUri);
williamr@2
    51
        /**
williamr@2
    52
         * Basic constructor.
williamr@2
    53
         * @param   aPrefix The prefix for the namespace.
williamr@2
    54
         * @param   aUri    The namespace uri for the namespace.
williamr@2
    55
         */
williamr@2
    56
        IMPORT_C static CSenNamespace* NewLC(const TDesC8& aPrefix,
williamr@2
    57
                                             const TDesC8& aUri);
williamr@2
    58
        /**
williamr@2
    59
         * Basic constructor.
williamr@2
    60
         * @param   aUri    The namespace uri for the namespace.
williamr@2
    61
         */
williamr@2
    62
        IMPORT_C static CSenNamespace* NewL(const TDesC8& aUri);
williamr@2
    63
williamr@2
    64
        /**
williamr@2
    65
         * Basic constructor.
williamr@2
    66
         * @param   aUri    The namespace uri for the namespace.
williamr@2
    67
         */
williamr@2
    68
        IMPORT_C static CSenNamespace* NewLC(const TDesC8& aUri);
williamr@2
    69
williamr@2
    70
        /**
williamr@2
    71
        * Destructor.
williamr@2
    72
        */
williamr@2
    73
        IMPORT_C virtual ~CSenNamespace();
williamr@2
    74
        
williamr@2
    75
    public: // New functions
williamr@2
    76
        
williamr@2
    77
        /**
williamr@2
    78
         * Getter for the URI of the namespace object.
williamr@2
    79
         * @return  The URI
williamr@2
    80
         */
williamr@2
    81
        IMPORT_C const TDesC8& URI() const;
williamr@2
    82
williamr@2
    83
        /**
williamr@2
    84
         * Getter for the prefix of the namespace object.
williamr@2
    85
         * @return  The prefix
williamr@2
    86
         */
williamr@2
    87
        IMPORT_C const TDesC8& Prefix() const;
williamr@2
    88
williamr@2
    89
        /**
williamr@2
    90
         * Setter for the URI of the namespace object.
williamr@2
    91
         * @param aUri  The URI.
williamr@2
    92
         */
williamr@2
    93
        IMPORT_C void SetUriL(const TDesC8& aUri);
williamr@2
    94
williamr@2
    95
        /**
williamr@2
    96
         * Setter for the prefix of the namespace object.
williamr@2
    97
         * @param aPrefix   The prefix.
williamr@2
    98
         */
williamr@2
    99
        IMPORT_C void SetPrefixL(const TDesC8& aPrefix);
williamr@2
   100
williamr@2
   101
        /**
williamr@2
   102
         * Method for comparing the namespace object to other prefix 
williamr@2
   103
         * and URI.
williamr@2
   104
         * @param aOtherPrefix  The prefix to be compared to
williamr@2
   105
         * @param aOtherUri     The URI to be compared to.
williamr@2
   106
         * @return ETrue if both of the parameters were matching to the 
williamr@2
   107
         *               object's corresponding ones. EFalse otherwise
williamr@2
   108
         */
williamr@2
   109
        IMPORT_C TBool Compare(const TDesC8& aOtherPrefix,
williamr@2
   110
                               const TDesC8& aOtherUri) const;
williamr@2
   111
williamr@2
   112
        /**
williamr@2
   113
         * Method for comparing the namespace object to other namespace 
williamr@2
   114
         * object.
williamr@2
   115
         * @param aOtherNamespace       The namespace to be compared to.
williamr@2
   116
         * @return ETrue if the given namespace has same URI and prefix as the
williamr@2
   117
         *              current one. EFalse otherwise.
williamr@2
   118
         */
williamr@2
   119
        IMPORT_C TBool Compare(const CSenNamespace& aOtherNamespace) const;
williamr@2
   120
        
williamr@2
   121
        /**
williamr@2
   122
         * Method for comparing the namespace object to other namespace 
williamr@2
   123
         * object. Differs from Compare(...) methods so that this one
williamr@2
   124
         * compares only URIs.
williamr@2
   125
         * @return  ETrue   if the given namespace has the same URI as 
williamr@2
   126
         *                  the current one. EFalse otherwise.
williamr@2
   127
         */
williamr@2
   128
        IMPORT_C TBool MatchesL(const CSenNamespace& aOtherNamespace) const;
williamr@2
   129
williamr@2
   130
        /**
williamr@2
   131
         * Method to ask this namespace object to write itself into a 
williamr@2
   132
         * writestream. Doesn't write anything if no URI has been set.
williamr@2
   133
         * @param aWs   The writestream where object should be written.
williamr@2
   134
         */
williamr@2
   135
        IMPORT_C void InsertL(RBufWriteStream& aWs);
williamr@2
   136
    
williamr@2
   137
    private:
williamr@2
   138
williamr@2
   139
        /**
williamr@2
   140
        * C++ default constructor.
williamr@2
   141
        */
williamr@2
   142
        CSenNamespace();
williamr@2
   143
williamr@2
   144
        /**
williamr@2
   145
        * By default Symbian 2nd phase constructor is private.
williamr@2
   146
        */
williamr@2
   147
        void ConstructL(const TDesC8& aPrefix, const TDesC8& aUri);
williamr@2
   148
williamr@2
   149
    private: // Data
williamr@2
   150
        HBufC8* ipPrefix;
williamr@2
   151
        HBufC8* ipUri;
williamr@2
   152
    };
williamr@2
   153
williamr@2
   154
#endif // SEN_NAME_SPACE_H
williamr@2
   155
williamr@2
   156
// End of File
williamr@2
   157
williamr@2
   158
williamr@2
   159