williamr@2: /* williamr@2: * Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * 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 williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Interface class describing class that may be used as williamr@2: * output stream for dom tree williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: #ifndef XMLENGINE_MOUTPUTSTREAM_H_INCLUDED williamr@2: #define XMLENGINE_MOUTPUTSTREAM_H_INCLUDED williamr@2: williamr@2: #include williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: * MXmlEngOutputStream is used by XML Engine to write serialized XML data williamr@2: * to stream. This interface should be implemented by client application williamr@2: * when RXmlEngDocument::SaveL() method is used to serialize xml data to stream. williamr@2: * williamr@2: * @lib XmlEngineDOM.lib williamr@2: * @since S60 v3.1 williamr@2: */ williamr@2: class MXmlEngOutputStream williamr@2: { williamr@2: public: williamr@2: /** williamr@2: * Callback for writing a buffer with data to output stream williamr@2: * williamr@2: * @since S60 v3.1 williamr@2: * @return number of bytes written or -1 in case of error williamr@2: */ williamr@2: virtual TInt Write(const TDesC8& aBuffer) = 0; williamr@2: williamr@2: /** williamr@2: * Callback for closing output stream williamr@2: * williamr@2: * @since S60 v3.1 williamr@2: * @return williamr@2: * 0 is succeeded, williamr@2: * -1 in case of error williamr@2: */ williamr@2: virtual TInt Close() = 0; williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: #endif /* XMLENGINE_MOUTPUTSTREAM_H_INCLUDED */