1.1 --- a/epoc32/include/xml/dom/xmlengchunkcontainer.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/xml/dom/xmlengchunkcontainer.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,104 +1,91 @@
1.4 -/*
1.5 -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 -* All rights reserved.
1.7 -* This component and the accompanying materials are made available
1.8 -* 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.9 -* which accompanies this distribution, and is available
1.10 -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 -*
1.12 -* Initial Contributors:
1.13 -* Nokia Corporation - initial contribution.
1.14 -*
1.15 -* Contributors:
1.16 -*
1.17 -* Description: All memory chunk data functions
1.18 -*
1.19 -*/
1.20 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.21 +// All rights reserved.
1.22 +// This component and the accompanying materials are made available
1.23 +// under the terms of "Eclipse Public License v1.0"
1.24 +// which accompanies this distribution, and is available
1.25 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.26 +//
1.27 +// Initial Contributors:
1.28 +// Nokia Corporation - initial contribution.
1.29 +//
1.30 +// Contributors:
1.31 +//
1.32 +// Description:
1.33 +// All memory chunk data functions
1.34 +//
1.35
1.36
1.37
1.38 -
1.39 -
1.40 -
1.41 -
1.42 -#ifndef XMLENGINE_CHUNKCONTAINER_H_INCLUDED
1.43 -#define XMLENGINE_CHUNKCONTAINER_H_INCLUDED
1.44 -
1.45 -#include "xmlengdatacontainer.h"
1.46 -
1.47 -
1.48 /**
1.49 -* Instance of TXmlEngChunkContainer class represents data stored in RChunks in DOM tree
1.50 -*
1.51 -* RChunk data is treated in general as text nodes in DOM tree.
1.52 -* Some of the fields in xmlNode structure are reused in order to save memory.
1.53 -* Data is stored in memory referenced to by RChunk.
1.54 -*
1.55 -* Sample code for creating chunk container:
1.56 -* @code
1.57 -* RXmlEngDOMImplementation domImpl;
1.58 -* domImpl.OpenL(); ///< opening DOM implementation object
1.59 -* RXmlEngDocument iDoc;
1.60 -* ///< create document element
1.61 -* TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc"));
1.62 -* ///< create RChunk object with chunkName name and size
1.63 -* RChunk chunk;
1.64 -* chunk.CreateGlobal(chunkName, size, maxSize);
1.65 -* CleanupClosePushL(chunk);
1.66 -* ///< create chunk container from Rchunk object with offset to the
1.67 -* ///< binary data in chunk and binary data size in chunk (binarySize)
1.68 -* TXmlEngChunkContainer binData = iDoc.CreateChunkContainerL(
1.69 -* cid,chunk,offset,binarySize);
1.70 -* ///< append chunkcontainer to the dom tree
1.71 -* TXmlEngNode ref = iDoc.DocumentElement().AppendChildL(binData);
1.72 -* ///< closing all opened objects
1.73 -* CleanupStack::PopAndDestroy();//chunk
1.74 -* iDoc.Close();
1.75 -* domImpl.Close();
1.76 -* @endcode
1.77 -*
1.78 -* @lib XmlEngineDOM.lib
1.79 -* @since S60 v3.2
1.80 + @file
1.81 + @publishedAll
1.82 + @released
1.83 +*/
1.84 +#ifndef XMLENGCHUNKCONTAINER_H
1.85 +#define XMLENGCHUNKCONTAINER_H
1.86 +
1.87 +#include <xml/dom/xmlengdatacontainer.h>
1.88 +
1.89 +
1.90 +/**
1.91 +This class stores a reference to a RChunk handle within the DOM tree. No
1.92 +ownership is tranferred and the client is expected to close the RChunk when it
1.93 +is no longer required. Multiple chunk containers can refer to the same RChunk,
1.94 +regardless of whether the offsets overlap.
1.95 +
1.96 +This class is most often instantiated by calling
1.97 +RXmlEngDocument::CreateChunkContainerL().
1.98 +
1.99 +Sample code for creating chunk container:
1.100 +@code
1.101 + RXmlEngDOMImplementation domImpl;
1.102 + domImpl.OpenL(); // opening DOM implementation object
1.103 + RXmlEngDocument iDoc;
1.104 + // create document element
1.105 + TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc"));
1.106 + // create RChunk object with chunkName name and size
1.107 + RChunk chunk;
1.108 + chunk.CreateGlobal(chunkName, size, maxSize);
1.109 + CleanupClosePushL(chunk);
1.110 + // create chunk container from Rchunk object with offset to the
1.111 + // binary data in chunk and binary data size in chunk (binarySize)
1.112 + TXmlEngChunkContainer binData = iDoc.CreateChunkContainerL(
1.113 + cid,chunk,offset,binarySize);
1.114 + // append chunkcontainer to the dom tree
1.115 + TXmlEngNode ref = iDoc.DocumentElement().AppendChildL(binData);
1.116 + // closing all opened objects
1.117 + CleanupStack::PopAndDestroy(); //chunk
1.118 + iDoc.Close();
1.119 + domImpl.Close();
1.120 +@endcode
1.121 */
1.122 class TXmlEngChunkContainer : public TXmlEngDataContainer
1.123 {
1.124 public:
1.125 - /**
1.126 - * Get memory chunk reference
1.127 - *
1.128 - * @since S60 v3.2
1.129 - * @return Memory chunk reference
1.130 - *
1.131 - */
1.132 + /** Get memory chunk reference
1.133 + @return Memory chunk reference
1.134 + */
1.135 IMPORT_C RChunk& Chunk() const;
1.136
1.137 - /**
1.138 - * Get offset of binary data in memory chunk
1.139 - *
1.140 - * @since S60 v3.2
1.141 - * @return Offset of binary data in memory chunk
1.142 - */
1.143 + /** Get offset of binary data in memory chunk
1.144 + @return Offset of binary data in memory chunk
1.145 + */
1.146 IMPORT_C TUint ChunkOffset() const;
1.147
1.148 protected:
1.149 - /**
1.150 - * Default constructor
1.151 - *
1.152 - * @since S60 v3.1
1.153 - */
1.154 + /** Default constructor */
1.155 inline TXmlEngChunkContainer();
1.156
1.157 /**
1.158 - * Constructor
1.159 - *
1.160 - * @since S60 v3.1
1.161 - * @param aInternal node pointer
1.162 - */
1.163 + Constructor
1.164 + @param aInternal node pointer
1.165 + */
1.166 inline TXmlEngChunkContainer(void* aInternal);
1.167 };
1.168
1.169
1.170
1.171 -#include "xmlengchunkcontainer.inl"
1.172 +#include <xml/dom/xmlengchunkcontainer.inl>
1.173
1.174 -#endif /* XMLENGINE_CHUNKCONTAINER_H_INCLUDED */
1.175 +#endif /* XMLENGCHUNKCONTAINER_H */
1.176 +