msenelement.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : MSenElement.h
00004 *  Part of     : Web Services Xml
00005 *  Interface   : 
00006 *  Description : The abstract interface of an XML element
00007 *  Version     : 
00008 *
00009 *  Copyright © 2002-2005 Nokia. All rights reserved.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia. All rights are reserved. Copying, including 
00013 *  reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia.
00018 * ==============================================================================
00019 */
00020 
00021 #ifndef M_SEN_ELEMENT_H
00022 #define M_SEN_ELEMENT_H
00023 
00024 //  INCLUDES
00025 #include <e32base.h>
00026 #include <s32strm.h>
00027 #include <xml\Attribute.h>
00028 
00029 // FORWARD DECLARATIONS
00030 class CSenElement;
00031 class CSenBaseAttribute;
00032 class CSenNamespace;
00033 
00034 using namespace Xml;
00035 
00036 // CLASS DECLARATION
00037 
00043 class MSenElement
00044     {
00045     public: // New functions
00046 
00051                 virtual const TDesC8& LocalName() const = 0;
00052 
00057                 virtual const TDesC8& NamespaceURI() const = 0;
00058 
00063                 virtual void SetNamespaceL(const TDesC8& aNsUri) = 0;
00064 
00070                 virtual void SetNamespaceL(     const TDesC8& aNsPrefix,
00071                                                                         const TDesC8& aNsUri) = 0;
00072 
00079                 virtual const CSenNamespace* AddNamespaceL(     const TDesC8& aPrefix,
00080                                                                                                         const TDesC8& aUri) = 0;
00081 
00091                 virtual const CSenNamespace* AddNamespaceL( CSenNamespace& aNewNamespace,
00092                                                                                                         TBool aCheckInParent) = 0;
00098                 virtual const CSenNamespace* Namespace() = 0;
00099 
00105                 virtual const CSenNamespace* Namespace( const TDesC8& aNsPrefix) = 0;
00106 
00113                 virtual const CSenNamespace* Namespace( const TDesC8& aNsPrefix,
00114                                                                                                 const TDesC8& aUri) = 0;
00115 
00125                 virtual const CSenNamespace* Namespace( const TDesC8& aNsPrefix,
00126                                                                                                 const TBool aCheckInParent) = 0;
00127 
00132                 virtual const TDesC8& NsPrefix() const = 0;
00133 
00138                 virtual void SetPrefixL(const TDesC8& aPrefix) = 0;
00139                 
00144             virtual TBool HasContent() const = 0;
00145 
00150             virtual TPtrC8 Content() const = 0;
00151 
00156                 virtual HBufC* ContentUnicodeL() const = 0;
00157 
00163             virtual TPtrC8 SetContentL(const TDesC8& aContent) = 0;
00164 
00171             virtual RWriteStream& ContentWriteStreamL() = 0;
00172 
00183                 virtual TBool ConsistsOfL(MSenElement& aCandidate) = 0;
00184                 
00191             virtual RPointerArray<CSenElement>& ElementsL() = 0;
00192 
00199                 virtual CSenElement* Child(TInt aIndex) = 0;
00200 
00207             virtual const TDesC8* AttrValue(const TDesC8& aName) = 0;
00208 
00215                 virtual void AddAttrL(const TDesC8& aName, const TDesC8& aValue) = 0;
00216 
00222                 virtual RPointerArray<CSenBaseAttribute>& AttributesL() = 0;
00223 
00229                 virtual RPointerArray<CSenNamespace>& NamespacesL() = 0;
00230 
00236             virtual CSenElement* Parent() = 0;
00237 
00245             virtual CSenElement* SetParent(CSenElement* apParent) = 0;
00246 
00255                 virtual CSenElement* DetachL() = 0;
00256 
00261             virtual MSenElement& Root() = 0;
00262 
00269                 virtual CSenElement* Element(const TDesC8& aLocalName) = 0;
00270 
00276                 virtual CSenElement* Element(   const TDesC8& aNsUri,
00277                                                                                 const TDesC8& aLocalName) = 0;
00278 
00292                 virtual CSenElement* CreateElementL(const TDesC8& aNsPrefix,
00293                                                                                         const TDesC8& aLocalName) = 0;
00294 
00307                 virtual CSenElement& InsertElementL(CSenElement& aInsertedElement,
00308                                                                                         const CSenElement& aBeforeElement) = 0;
00309 
00316             virtual CSenElement& AddElementL(CSenElement& aElement) = 0;
00317 
00328                 virtual CSenElement& AddElementL(const TDesC8& aNsUri,
00329                                                                                  const TDesC8& aLocalName) = 0;
00330 
00343             virtual CSenElement& AddElementL(const TDesC8& aNsUri,
00344                                                                          const TDesC8& aLocalName,
00345                                                                          const TDesC8& aQName) = 0;
00346 
00359             virtual CSenElement& AddElementL(const TDesC8& aLocalName) = 0;
00360 
00368             virtual CSenElement* RemoveElement(CSenElement& aElement) = 0;
00369 
00378             virtual CSenElement* RemoveElement( const TDesC8& aNsUri,
00379                                                                                         const TDesC8& aLocalName) = 0;
00380 
00388                 virtual CSenElement* RemoveElement(const TDesC8& aLocalName) = 0;
00389 
00400             virtual CSenElement* ReplaceElementL(CSenElement& aElement) = 0;
00401 
00406             virtual HBufC8* AsXmlL() = 0;
00407 
00414             virtual HBufC* AsXmlUnicodeL() = 0;
00415 
00421                 virtual void WriteAsXMLToL(RWriteStream& aWriteStream) = 0;
00422 
00428                 virtual void WriteNamespacesToL(RWriteStream& aWriteStream) = 0;
00429 
00436             virtual MSenElement* AsElement() = 0;
00437 
00443                 virtual void CopyFromL(CSenElement& aSource) = 0;
00444 
00455                 virtual void Set(       const TDesC8& aNamespaceURI,
00456                                                         const TDesC8& aLocalName,
00457                                                         const TDesC8& aQName) = 0;
00458 
00463                 virtual void AddAttributesL(const RAttributeArray& aAttrs) = 0;
00464 };
00465 
00466 // M_SEN_ELEMENT_H
00467 #endif
00468 
00469 // End of File
00470 
00471 

Copyright © Nokia Corporation 2001-2008
Back to top