1.1 --- a/epoc32/include/mw/sennamespace.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/sennamespace.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,159 @@
1.4 -sennamespace.h
1.5 +/*
1.6 +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Implementation of XML namespace functionality
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +
1.28 +
1.29 +#ifndef SEN_NAME_SPACE_H
1.30 +#define SEN_NAME_SPACE_H
1.31 +
1.32 +// INCLUDES
1.33 +#include <e32base.h>
1.34 +#include <s32mem.h>
1.35 +
1.36 +// CLASS DECLARATION
1.37 +
1.38 +/**
1.39 +* Implementation of XML namespace functionality
1.40 +* All data is in UTF-8 form.
1.41 +* @lib SenXML.dll
1.42 +* @since Series60 3.0
1.43 +*/
1.44 +class CSenNamespace : public CBase
1.45 + {
1.46 + public: // Constructors and destructor
1.47 +
1.48 + /**
1.49 + * Basic constructor.
1.50 + * @param aPrefix The prefix for the namespace.
1.51 + * @param aUri The namespace uri for the namespace.
1.52 + */
1.53 + IMPORT_C static CSenNamespace* NewL(const TDesC8& aPrefix,
1.54 + const TDesC8& aUri);
1.55 + /**
1.56 + * Basic constructor.
1.57 + * @param aPrefix The prefix for the namespace.
1.58 + * @param aUri The namespace uri for the namespace.
1.59 + */
1.60 + IMPORT_C static CSenNamespace* NewLC(const TDesC8& aPrefix,
1.61 + const TDesC8& aUri);
1.62 + /**
1.63 + * Basic constructor.
1.64 + * @param aUri The namespace uri for the namespace.
1.65 + */
1.66 + IMPORT_C static CSenNamespace* NewL(const TDesC8& aUri);
1.67 +
1.68 + /**
1.69 + * Basic constructor.
1.70 + * @param aUri The namespace uri for the namespace.
1.71 + */
1.72 + IMPORT_C static CSenNamespace* NewLC(const TDesC8& aUri);
1.73 +
1.74 + /**
1.75 + * Destructor.
1.76 + */
1.77 + IMPORT_C virtual ~CSenNamespace();
1.78 +
1.79 + public: // New functions
1.80 +
1.81 + /**
1.82 + * Getter for the URI of the namespace object.
1.83 + * @return The URI
1.84 + */
1.85 + IMPORT_C const TDesC8& URI() const;
1.86 +
1.87 + /**
1.88 + * Getter for the prefix of the namespace object.
1.89 + * @return The prefix
1.90 + */
1.91 + IMPORT_C const TDesC8& Prefix() const;
1.92 +
1.93 + /**
1.94 + * Setter for the URI of the namespace object.
1.95 + * @param aUri The URI.
1.96 + */
1.97 + IMPORT_C void SetUriL(const TDesC8& aUri);
1.98 +
1.99 + /**
1.100 + * Setter for the prefix of the namespace object.
1.101 + * @param aPrefix The prefix.
1.102 + */
1.103 + IMPORT_C void SetPrefixL(const TDesC8& aPrefix);
1.104 +
1.105 + /**
1.106 + * Method for comparing the namespace object to other prefix
1.107 + * and URI.
1.108 + * @param aOtherPrefix The prefix to be compared to
1.109 + * @param aOtherUri The URI to be compared to.
1.110 + * @return ETrue if both of the parameters were matching to the
1.111 + * object's corresponding ones. EFalse otherwise
1.112 + */
1.113 + IMPORT_C TBool Compare(const TDesC8& aOtherPrefix,
1.114 + const TDesC8& aOtherUri) const;
1.115 +
1.116 + /**
1.117 + * Method for comparing the namespace object to other namespace
1.118 + * object.
1.119 + * @param aOtherNamespace The namespace to be compared to.
1.120 + * @return ETrue if the given namespace has same URI and prefix as the
1.121 + * current one. EFalse otherwise.
1.122 + */
1.123 + IMPORT_C TBool Compare(const CSenNamespace& aOtherNamespace) const;
1.124 +
1.125 + /**
1.126 + * Method for comparing the namespace object to other namespace
1.127 + * object. Differs from Compare(...) methods so that this one
1.128 + * compares only URIs.
1.129 + * @return ETrue if the given namespace has the same URI as
1.130 + * the current one. EFalse otherwise.
1.131 + */
1.132 + IMPORT_C TBool MatchesL(const CSenNamespace& aOtherNamespace) const;
1.133 +
1.134 + /**
1.135 + * Method to ask this namespace object to write itself into a
1.136 + * writestream. Doesn't write anything if no URI has been set.
1.137 + * @param aWs The writestream where object should be written.
1.138 + */
1.139 + IMPORT_C void InsertL(RBufWriteStream& aWs);
1.140 +
1.141 + private:
1.142 +
1.143 + /**
1.144 + * C++ default constructor.
1.145 + */
1.146 + CSenNamespace();
1.147 +
1.148 + /**
1.149 + * By default Symbian 2nd phase constructor is private.
1.150 + */
1.151 + void ConstructL(const TDesC8& aPrefix, const TDesC8& aUri);
1.152 +
1.153 + private: // Data
1.154 + HBufC8* ipPrefix;
1.155 + HBufC8* ipUri;
1.156 + };
1.157 +
1.158 +#endif // SEN_NAME_SPACE_H
1.159 +
1.160 +// End of File
1.161 +
1.162 +
1.163 +