williamr@4: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: // All rights reserved. williamr@4: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@4: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: // williamr@4: // Initial Contributors: williamr@4: // Nokia Corporation - initial contribution. williamr@4: // williamr@4: // Contributors: williamr@4: // williamr@4: // Description: williamr@4: // Interface class describing class that may be used as williamr@4: // output stream for dom tree williamr@4: // williamr@4: williamr@4: williamr@4: williamr@4: /** williamr@4: @file williamr@4: @publishedAll williamr@4: @released williamr@2: */ williamr@4: #ifndef XMLENGMOUTPUTSTREAM_H williamr@4: #define XMLENGMOUTPUTSTREAM_H williamr@2: williamr@2: #include williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@4: Provides an interface for writing serialized XML data to a stream. This williamr@4: interface should be implemented by client applications when the williamr@4: RXmlEngDocument::SaveL() method is used to serialize XML data to a stream. williamr@4: williamr@4: No ownership is transferred by RXmlEngDocument::SaveL(), thus an object williamr@4: of the implementing class should be freed after use. williamr@4: williamr@4: @see RXmlEngDocument::SaveL() williamr@4: */ williamr@2: class MXmlEngOutputStream williamr@2: { williamr@2: public: williamr@2: /** williamr@4: Writes the specified buffer to the output stream. williamr@4: @param aBuffer The data to write williamr@4: @return The number of bytes written or -1 in the case of an error williamr@4: */ williamr@2: virtual TInt Write(const TDesC8& aBuffer) = 0; williamr@2: williamr@2: /** williamr@4: Closes the output stream. williamr@4: @return 0 if successful or -1 in the case of an error williamr@4: */ williamr@2: virtual TInt Close() = 0; williamr@2: }; williamr@2: williamr@4: #endif /* XMLENGMOUTPUTSTREAM_H */ williamr@2: