1 /* |
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
3 * All rights reserved. |
3 // This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
5 * 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 |
5 // which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
7 // |
8 * |
8 // Initial Contributors: |
9 * Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
10 // |
11 * |
11 // Contributors: |
12 * Contributors: |
12 // |
13 * |
13 // Description: |
14 * Description: Interface class describing class that may be used as |
14 // Interface class describing class that may be used as |
15 * output stream for dom tree |
15 // output stream for dom tree |
16 * |
16 // |
17 */ |
|
18 |
17 |
19 |
18 |
20 |
19 |
21 |
20 /** |
22 |
21 @file |
23 |
22 @publishedAll |
24 |
23 @released |
25 #ifndef XMLENGINE_MOUTPUTSTREAM_H_INCLUDED |
24 */ |
26 #define XMLENGINE_MOUTPUTSTREAM_H_INCLUDED |
25 #ifndef XMLENGMOUTPUTSTREAM_H |
|
26 #define XMLENGMOUTPUTSTREAM_H |
27 |
27 |
28 #include <e32base.h> |
28 #include <e32base.h> |
29 |
29 |
30 |
30 |
31 |
31 |
32 /** |
32 /** |
33 * MXmlEngOutputStream is used by XML Engine to write serialized XML data |
33 Provides an interface for writing serialized XML data to a stream. This |
34 * to stream. This interface should be implemented by client application |
34 interface should be implemented by client applications when the |
35 * when RXmlEngDocument::SaveL() method is used to serialize xml data to stream. |
35 RXmlEngDocument::SaveL() method is used to serialize XML data to a stream. |
36 * |
36 |
37 * @lib XmlEngineDOM.lib |
37 No ownership is transferred by RXmlEngDocument::SaveL(), thus an object |
38 * @since S60 v3.1 |
38 of the implementing class should be freed after use. |
39 */ |
39 |
|
40 @see RXmlEngDocument::SaveL() |
|
41 */ |
40 class MXmlEngOutputStream |
42 class MXmlEngOutputStream |
41 { |
43 { |
42 public: |
44 public: |
43 /** |
45 /** |
44 * Callback for writing a buffer with data to output stream |
46 Writes the specified buffer to the output stream. |
45 * |
47 @param aBuffer The data to write |
46 * @since S60 v3.1 |
48 @return The number of bytes written or -1 in the case of an error |
47 * @return number of bytes written or -1 in case of error |
49 */ |
48 */ |
|
49 virtual TInt Write(const TDesC8& aBuffer) = 0; |
50 virtual TInt Write(const TDesC8& aBuffer) = 0; |
50 |
51 |
51 /** |
52 /** |
52 * Callback for closing output stream |
53 Closes the output stream. |
53 * |
54 @return 0 if successful or -1 in the case of an error |
54 * @since S60 v3.1 |
55 */ |
55 * @return |
|
56 * 0 is succeeded, |
|
57 * -1 in case of error |
|
58 */ |
|
59 virtual TInt Close() = 0; |
56 virtual TInt Close() = 0; |
60 }; |
57 }; |
61 |
58 |
|
59 #endif /* XMLENGMOUTPUTSTREAM_H */ |
62 |
60 |
63 |
|
64 #endif /* XMLENGINE_MOUTPUTSTREAM_H_INCLUDED */ |
|