|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 /** |
|
26 * DO NOT USE THIS API. DEPRECATED AND REMOVED IN S60 5.0. USE SYMBIAN XML FRAMEWORK INSTEAD. |
|
27 */ |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 #ifndef __RXMLREADER_H |
|
42 #define __RXMLREADER_H |
|
43 |
|
44 // INCLUDES |
|
45 #include <F32File.h> |
|
46 |
|
47 #include <MXMLContentHandler.h> |
|
48 #include <MWBXMLContentHandler.h> |
|
49 #include <XMLUtils.h> |
|
50 |
|
51 |
|
52 // CLASS DECLARATION |
|
53 class CXMLReader; |
|
54 /** |
|
55 * Interface for XML Parser. |
|
56 * |
|
57 * @lib XMLInterface.dll |
|
58 * @since ?Series60_version |
|
59 */ |
|
60 class RXMLReader |
|
61 { |
|
62 public: // New functions |
|
63 |
|
64 inline RXMLReader(); |
|
65 |
|
66 /** |
|
67 * Creates the parser. |
|
68 * This function leaves with an apropriate code if the create failed. |
|
69 * |
|
70 */ |
|
71 IMPORT_C void CreateL(); |
|
72 |
|
73 /** |
|
74 * Destroys the parser. |
|
75 * |
|
76 */ |
|
77 IMPORT_C void Destroy(); |
|
78 |
|
79 /** |
|
80 * Destroys the parser. |
|
81 * |
|
82 */ |
|
83 IMPORT_C void Close(); |
|
84 |
|
85 |
|
86 /** |
|
87 * Enables/Dissables a feature. |
|
88 * @since ?Series60_version |
|
89 * @param aFeature: The feature to Enable/Dissable. |
|
90 * @param aStatus: TRUE Enables the feature, FALSE Dissables. |
|
91 * @return KErrNone if OK, KErrNotSupported if feature not supported. |
|
92 */ |
|
93 IMPORT_C TInt SetFeature(TXMLFeature aFeature, TBool aStatus); |
|
94 |
|
95 /** |
|
96 * Check if a feature is Enabled. |
|
97 * @since ?Series60_version |
|
98 * @param aFeature: The feature to check. |
|
99 * @param aStatus: TRUE if aFeature is Enabled. |
|
100 * @return KErrNone if OK, KErrNotSupported if feature not supported. |
|
101 */ |
|
102 IMPORT_C TInt GetFeature(TXMLFeature aFeature, TBool& aStatus); |
|
103 |
|
104 /** |
|
105 * Allow an application to register a content event handler (for XML). |
|
106 * @since ?Series60_version |
|
107 * @param aContentHandler: The handler. |
|
108 * @return Status, KErrNone if OK. |
|
109 */ |
|
110 IMPORT_C TInt SetContentHandler(MXMLContentHandler* aContentHandler); |
|
111 |
|
112 /** |
|
113 * Allow an application to register a content event handler (for WBXML). |
|
114 * @since ?Series60_version |
|
115 * @param aContentHandler: The handler. |
|
116 * @return Status, KErrNone if OK. |
|
117 */ |
|
118 IMPORT_C TInt SetContentHandler(MWBXMLContentHandler* aContentHandler); |
|
119 |
|
120 /** |
|
121 * Parse an XML document. |
|
122 * @since ?Series60_version |
|
123 * @param aRFs: An open filesession. |
|
124 * @param aFileToParse: Filename of file to parse. |
|
125 * @return |
|
126 */ |
|
127 IMPORT_C void ParseL(RFs &aRFs, const TDesC& aFileToParse); |
|
128 |
|
129 /** |
|
130 * Parse an XML document. |
|
131 * @since ?Series60_version |
|
132 * @param aBuff: Buffer containing document to parse. |
|
133 * @return |
|
134 */ |
|
135 IMPORT_C void ParseL(const TDesC8& aBuff); |
|
136 |
|
137 /** |
|
138 * Parse an XML document. |
|
139 * @since ?Series60_version |
|
140 * @param aOpenedFile: Opened file containing document to parse. |
|
141 * @return |
|
142 */ |
|
143 IMPORT_C void ParseL(RFile& aOpenedFile); |
|
144 |
|
145 private: |
|
146 friend class CXMLReader; |
|
147 |
|
148 CXMLReader* iImplementation; |
|
149 }; |
|
150 |
|
151 inline RXMLReader::RXMLReader() |
|
152 : iImplementation(0) |
|
153 { |
|
154 } |
|
155 |
|
156 #endif // __RXMLREADER_H |
|
157 |
|
158 // End of File |