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