author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
child 4 | 837f303aceeb |
permissions | -rw-r--r-- |
2
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
1 |
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
2 |
// All rights reserved. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
3 |
// This component and the accompanying materials are made available |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
4 |
// 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 |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
5 |
// which accompanies this distribution, and is available |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
7 |
// |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
8 |
// Initial Contributors: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
9 |
// Nokia Corporation - initial contribution. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
10 |
// |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
11 |
// Contributors: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
12 |
// |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
13 |
// Description: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
14 |
// This file contains the declaration of the generic CMDXMLParser class |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
15 |
// which is responsible for creating a DOM structure |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
16 |
// from a given XML file. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
17 |
// |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
18 |
// |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
19 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
20 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
21 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
22 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
23 |
@file |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
24 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
25 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
26 |
#ifndef __GMXMLPARSER_H__ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
27 |
#define __GMXMLPARSER_H__ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
28 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
29 |
#include <e32std.h> |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
30 |
#include <eikenv.h> |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
31 |
#include <gmxmlconstants.h> |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
32 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
33 |
//forward reference |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
34 |
class CMDXMLDocument; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
35 |
class CMDXMLEntityConverter; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
36 |
class CMDXMLElement; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
37 |
class MXMLDtd; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
38 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
39 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
40 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
41 |
class MMDXMLParserObserver |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
42 |
/** Abstract observer interface for notification when XML parsing is complete. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
43 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
44 |
It should be implemented by users of CMDXMLParser |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
45 |
@publishedAll |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
46 |
@released*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
47 |
{ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
48 |
public: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
49 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
50 |
Call back function used to inform a client of the Parser when a parsing operation completes. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
51 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
52 |
virtual void ParseFileCompleteL() = 0; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
53 |
}; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
54 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
55 |
class MMDXMLParserDataProvider |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
56 |
/** Abstract data source interface for XML data source. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
57 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
58 |
The user of CMDXMLParser must build one of these to encapsulate the data source |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
59 |
that they wish to parse. CMDXMLParser implements a file-based data source to |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
60 |
implement the functionality of the ParseFile function. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
61 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
62 |
@publishedAll |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
63 |
@released*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
64 |
{ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
65 |
public: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
66 |
/** Status codes returned by GetData() implementations. */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
67 |
enum TDataProviderResults |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
68 |
{ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
69 |
KMoreData, ///< Returned by the interface implementation when it is returning more data. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
70 |
KDataStreamError, ///< Returned by the interface when an unrecoverable error prevents obtaining more data. A recoverable error should be represented by KDataNotReady. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
71 |
KDataStreamEnd ///< Returned by the interface when there is no more data to come. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
72 |
}; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
73 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
74 |
public: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
75 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
76 |
The XML Parser calls this on a specific data provider to get more data |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
77 |
when required. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
78 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
79 |
Note that the TPtrC supplied may be used by the parser at any time |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
80 |
between the return of this call and the next call that the parser |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
81 |
makes out. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
82 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
83 |
Your data provider must not move the data pointed to until the |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
84 |
parser has indicated that it's done with that block by asking for |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
85 |
another. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
86 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
87 |
Ownership of the data pointed to remains with the data provider. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
88 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
89 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
90 |
General comments on efficiency |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
91 |
------------------------------ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
92 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
93 |
The parser is designed such that it processes the whole data block |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
94 |
provided in one go. It will automatically become asynchronous when |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
95 |
another block is required - the data provider only needs to supply |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
96 |
data. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
97 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
98 |
Because of this design, it allows the data provider to indirectly |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
99 |
control the amount of processing time that will be needed |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
100 |
in a single block. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
101 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
102 |
It is a good idea to balance the need for the fastest possible |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
103 |
processing with the need for client application responsiveness by |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
104 |
ensuring that the amount of data passed in a single block is not |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
105 |
too large. However, it is worth bearing in mind that the parser |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
106 |
will convert UTF8 data streams in blocks of 32 characters, and |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
107 |
supplying blocks of smaller length than this will result in a |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
108 |
slight loss of efficiency. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
109 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
110 |
@param aPtr On return, the data provided |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
111 |
@param aStatus Asynchronous status to be completed by the function with a |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
112 |
TDataProviderResults value |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
113 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
114 |
virtual void GetData(TPtrC8 &aPtr, TRequestStatus &aStatus) = 0; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
115 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
116 |
Called to indicate that use of the data source is complete. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
117 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
118 |
virtual void Disconnect() = 0; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
119 |
}; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
120 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
121 |
class CMDXMLParserFileDataSource; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
122 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
123 |
class CMDXMLParser: public CActive |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
124 |
/** Creates a DOM structure from a given XML file. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
125 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
126 |
The parsing operation is asynchronous and is initiated by a call to ParseFile(). |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
127 |
On completion, the created DOM document can be retrieved through DetachXMLDoc(). |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
128 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
129 |
Note the following ownership rules for the DOM document: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
130 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
131 |
1. calling DetachXMLDoc() transfers ownership of the document to the client |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
132 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
133 |
2. if the parser is asked to parse a new file while it still owns an existing |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
134 |
DOM document, it will delete the old document. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
135 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
136 |
@publishedAll |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
137 |
@released |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
138 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
139 |
{ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
140 |
public: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
141 |
/** Allocates and constructs a new XML parser, specifying a DTD. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
142 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
143 |
@param aParserObserver XML parser observer |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
144 |
@leave KErrNoMemory Out of memory |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
145 |
@return New XML parser */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
146 |
IMPORT_C static CMDXMLParser* NewL(MMDXMLParserObserver* aParserObserver); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
147 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
148 |
/** Allocates and constructs a new XML parser, specifying a DTD. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
149 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
150 |
@param aParserObserver XML parser observer |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
151 |
@param aDtdRepresentation DTD validator |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
152 |
@leave KErrNoMemory Out of memory |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
153 |
@return New XML parser */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
154 |
IMPORT_C static CMDXMLParser* NewL(MMDXMLParserObserver* aParserObserver, MXMLDtd* aDtdRepresentation); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
155 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
156 |
/** Allocates and constructs a new XML parser, leaving the object on the cleanup |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
157 |
stack. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
158 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
159 |
@param aParserObserver XML parser observer |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
160 |
@leave KErrNoMemory Out of memory |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
161 |
@return New XML parser */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
162 |
IMPORT_C static CMDXMLParser* NewLC(MMDXMLParserObserver* aParserObserver); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
163 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
164 |
/** Allocates and constructs a new XML parser, leaving the object on the cleanup |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
165 |
stack. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
166 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
167 |
@param aParserObserver XML parser observer |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
168 |
@param aDtdRepresentation DTD validator |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
169 |
@leave KErrNoMemory Out of memory |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
170 |
@return New XML parser */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
171 |
IMPORT_C static CMDXMLParser* NewLC(MMDXMLParserObserver* aParserObserver, MXMLDtd* aDtdRepresentation); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
172 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
173 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
174 |
/** Destructor. */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
175 |
IMPORT_C ~CMDXMLParser(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
176 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
177 |
/** Gets the last error found by the parser. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
178 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
179 |
@return Error code |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
180 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
181 |
IMPORT_C TInt Error() const; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
182 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
183 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
184 |
Get the severity of the most severe error found. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
185 |
@return the maximum error severity |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
186 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
187 |
IMPORT_C TXMLErrorCodeSeverity ErrorSeverity() const; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
188 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
189 |
/** Gets the created DOM. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
190 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
191 |
This should be called after the conclusion of the parser process. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
192 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
193 |
Note that the function sets the internal variable pointing to the document |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
194 |
to NULL, so this function can only be called once per file parse. The caller |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
195 |
takes ownership of the document, and must delete it when its use is complete. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
196 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
197 |
@return The created DOM */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
198 |
IMPORT_C CMDXMLDocument* DetachXMLDoc(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
199 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
200 |
/** Parses a specified XML file into a DOM object tree. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
201 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
202 |
@param aRFs File server session |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
203 |
@param aFileToParse The file name to parse |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
204 |
@return KErrNone if success or a file read error code */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
205 |
IMPORT_C TInt ParseFile(RFs aRFs, const TDesC& aFileToParse); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
206 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
207 |
IMPORT_C TInt ParseFile(RFile& aFileHandleToParse); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
208 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
209 |
/** Parses a specified XML Data Source into a DOM object tree. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
210 |
Use ParseSourceL() function in preference to ParseSource() |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
211 |
@param aSource MMDXMLParserDataProvider pointer |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
212 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
213 |
inline void ParseSource(MMDXMLParserDataProvider *aSource) |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
214 |
{ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
215 |
TRAP_IGNORE(ParseSourceL(aSource)); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
216 |
} |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
217 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
218 |
/** Parses a specified XML Data Source into a DOM object tree. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
219 |
@param aSource MMDXMLParserDataProvider pointer |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
220 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
221 |
IMPORT_C void ParseSourceL(MMDXMLParserDataProvider *aSource); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
222 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
223 |
/** Defines input stream character widths. */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
224 |
enum TMDXMLParserInputCharWidth |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
225 |
{ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
226 |
EAscii = 0x01, ///< ASCII |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
227 |
EUnicode = 0x02 ///<Unicode |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
228 |
}; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
229 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
230 |
/** Sets the input stream character width. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
231 |
* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
232 |
* @param aWidth Character width for incoming stream. Possible values are EAscii and EUnicode (representing Ascii/UTF8 and Unicode respectively). |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
233 |
* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
234 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
235 |
IMPORT_C void SetSourceCharacterWidth(TMDXMLParserInputCharWidth aWidth); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
236 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
237 |
//Defect fix for INC036136- Enable the use of custom entity converters in GMXML |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
238 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
239 |
* Sets the entity converter to be used for parsing. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
240 |
* and take ownership of the passed entity converter |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
241 |
* @param aEntityConverter the entity converter to be used. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
242 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
243 |
IMPORT_C void SetEntityConverter(CMDXMLEntityConverter* aEntityConverter); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
244 |
//End Defect fix for INC036136 |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
245 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
246 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
247 |
Controls whether invalid elements and attributes are added to the DOM. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
248 |
@param aStoreInvalid ETrue if invalid content should be stored, EFalse otherwise. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
249 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
250 |
IMPORT_C void SetStoreInvalid(TBool aStoreInvalid); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
251 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
252 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
253 |
Controls whether whitespaces are handled by XML parser or by client. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
254 |
@param aPreserve ETrue if all whitespaces should be preserved (handled by client), EFalse otherwise. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
255 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
256 |
IMPORT_C void SetWhiteSpaceHandlingMode(TBool aPreserve); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
257 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
258 |
public: // public functions used by other classes within the .dll, not for Export. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
259 |
/** Gets the entity converter. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
260 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
261 |
@return The entity converter */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
262 |
CMDXMLEntityConverter* EntityConverter(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
263 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
264 |
private: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
265 |
IMPORT_C virtual void DoCancel(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
266 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
267 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
268 |
* RunL function inherited from CActive base class - carries out the actual parsing. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
269 |
* @leave can Leave due to OOM |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
270 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
271 |
virtual void RunL(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
272 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
273 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
274 |
* Helper function that does the parsing - called from inside RunL |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
275 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
276 |
TBool DoParseLoopL(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
277 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
278 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
279 |
* RunError function inherited from CActive base class - intercepts any Leave from |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
280 |
* the RunL() function, sets an appropriate errorcode and calls ParseFileCompleteL |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
281 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
282 |
IMPORT_C TInt RunError(TInt aError); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
283 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
284 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
285 |
* Constructors |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
286 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
287 |
CMDXMLParser(MMDXMLParserObserver* aParserObserver); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
288 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
289 |
CMDXMLParser(MMDXMLParserObserver* aParserObserver, MXMLDtd* aDtdRepresentation); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
290 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
291 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
292 |
* Called when a character is read in and found to bo outside of an element tag |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
293 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
294 |
virtual void HandleTextL(TDes& aChar); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
295 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
296 |
enum TGetCharReturn |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
297 |
{ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
298 |
KError = 0x00, // GetChar detected an error |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
299 |
KCharReturned, // GetChar returned a character |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
300 |
KWaitForChar // GetChar couldn't return a character this time, but might next time. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
301 |
}; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
302 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
303 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
304 |
* Fetch one character from the input file |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
305 |
* @param aChar the returned character. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
306 |
* @return returns one of the values of TCharReturn |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
307 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
308 |
TGetCharReturn GetChar(TDes& aChar); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
309 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
310 |
/* utility functions, called from GetChar to deal with the |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
311 |
* 2 types of input stream |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
312 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
313 |
TGetCharReturn GetDoubleByteChar(TDes& aChar); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
314 |
TGetCharReturn GetSingleByteChar(TDes& aChar); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
315 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
316 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
317 |
* Fetch some more data from the data provider |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
318 |
* @return returns one of the values of TCharReturn |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
319 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
320 |
void GetMoreData(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
321 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
322 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
323 |
* @return Returns true if the current tag is a doctype tag and sets the |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
324 |
* Document DocType member accordingly on the first pass of this function. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
325 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
326 |
TBool DocTypeL(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
327 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
328 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
329 |
* creates a new processing instruction if necessary and adds to document |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
330 |
* @return Returns true if the current tag is a processing instruction |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
331 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
332 |
TBool ProcessingInstructionL(CMDXMLElement* aParentElement); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
333 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
334 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
335 |
* creates a new CDataSection if necessary and adds to document |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
336 |
* @return Returns true if the current tag is a processing instruction |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
337 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
338 |
TBool CDataSectionL(CMDXMLElement* aParentElement); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
339 |
TBool EndOfCDataSection(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
340 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
341 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
342 |
* @return returns true if the current tag is a version id tag and sets the |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
343 |
* Document Version member accordingly on the first pass of this function. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
344 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
345 |
TBool VersionIDL(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
346 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
347 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
348 |
* creates a new comment if necessary and adds to document |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
349 |
* @return returns true if the current tag is a comment tag |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
350 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
351 |
TBool CommentL(CMDXMLElement* aParentElement); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
352 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
353 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
354 |
* Parse a start of element tag and create an element with attributes set. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
355 |
* @return Returns a pointer to the created element |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
356 |
* @leave can Leave due to OOM |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
357 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
358 |
virtual CMDXMLElement* ParseStartTagL(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
359 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
360 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
361 |
* Detects the type of a file - can be Unicode or UTF-8 |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
362 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
363 |
TBool DetectFileType(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
364 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
365 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
366 |
* Creates a generic or DTD-specific document object |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
367 |
* @leave can Leave due to OOM |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
368 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
369 |
virtual void CreateDocumentL(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
370 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
371 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
372 |
* Sets iError to new errorcode if more serious than any error so far encountered |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
373 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
374 |
IMPORT_C void SetError(const TInt aErrorCode, const TXMLErrorCodeSeverity aSeverity); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
375 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
376 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
377 |
* This function is used to parse the attributes. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
378 |
* @param aElement The element to which the attributes belong |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
379 |
* @param aTagToParse The tag to be parsed |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
380 |
* @return Returns KErrNone if both attribute name & value are valid |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
381 |
* KErrXMLBadAttributeName if attribute name is invalid or KErrXMLBadAttributeValue is invalid |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
382 |
* @leave can Leave due to OOM |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
383 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
384 |
TInt ParseElementAttributesL(CMDXMLElement& aElement, TDes& aTagToParse); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
385 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
386 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
387 |
This function locates the next attribute in the tag. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
388 |
@param aTagToParse the tag to find the attribute in |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
389 |
@return the offset of the next attribute |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
390 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
391 |
TInt LocateNextAttribute(const TDesC& aTagToParse); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
392 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
393 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
394 |
* Parses an end tag. In fact, at this point the end tag must match |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
395 |
* the tag name of the start tag. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
396 |
* @param aTagToParse Text of the end tag. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
397 |
* @return Returns KErrNone if the end tag matches the start tag or KErrNotFound if there is a mismatch. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
398 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
399 |
TInt ParseElementEndTag(CMDXMLElement& aElement, const TDesC& aTagToParse); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
400 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
401 |
TInt CheckForStartCData(const TDesC& aTextToCheck); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
402 |
TInt FindDelimiter(TDesC& aDataToSearch, TDesC& aDelimiterToFind); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
403 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
404 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
405 |
* Second stage constructor |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
406 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
407 |
void ConstructL(MXMLDtd* aDtdRepresentation); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
408 |
void AddTextL(CMDXMLElement* aParentElement); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
409 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
410 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
411 |
* Checks whether the end of this tag is in a CDataSection. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
412 |
* @param aDataToSearch The data to check |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
413 |
* @return Returns ETrue if the tag contains an unclosed CDataSection |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
414 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
415 |
TBool InCDataSection(TDesC& aDataToSearch); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
416 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
417 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
418 |
* Entity converts the sections of one attribute value that are not within a CDataSection. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
419 |
* @param aAttributeValue one attribute value |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
420 |
* @return Returns an error if entity conversion did not successfully complete, otherwise KErrNone |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
421 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
422 |
TInt ParseSingleAttributeL(TDes& aAttributeValue); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
423 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
424 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
425 |
* Prepares this class for use on another file. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
426 |
* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
427 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
428 |
void PrepareForReuseL(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
429 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
430 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
431 |
This should be called when parsing has been completed, before calling ParseFileCompleteL(). |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
432 |
It checks for errors that can only be determined at the end of parsing, eg missing doctype or |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
433 |
incomplete content. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
434 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
435 |
void CheckForErrors(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
436 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
437 |
IMPORT_C void PlaceholderForRemovedExport1(MMDXMLParserObserver* aParserObserver); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
438 |
IMPORT_C void PlaceholderForRemovedExport2(MMDXMLParserObserver* aParserObserver, MXMLDtd* aDtdRepresentation); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
439 |
IMPORT_C void PlaceholderForRemovedExport3(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
440 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
441 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
442 |
private: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
443 |
enum TPanicCode { ENullMemVarDataSource, |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
444 |
ENullMemVarParserObserver, |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
445 |
ENullMemVarXMLDoc, |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
446 |
ENullMemVarElementTag, |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
447 |
ENullParameterParentElement }; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
448 |
void Panic(TPanicCode aReason) const; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
449 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
450 |
private: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
451 |
MMDXMLParserObserver* iParserObserver; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
452 |
MXMLDtd* iDtdRepresentation; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
453 |
TInt iError; // Current error |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
454 |
TXMLErrorCodeSeverity iSeverity; // ErrorCode severity |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
455 |
CMDXMLDocument* iXMLDoc; // Document created by the parser |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
456 |
CMDXMLEntityConverter* iEntityConverter; // Entity converter used by the parser |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
457 |
HBufC* iElementTag; // Currently processed element tag |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
458 |
TBool iDocTypeSet; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
459 |
TBool iVersionSet; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
460 |
TInt iBytesPerChar; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
461 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
462 |
/* member variables dealing with access to source data */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
463 |
TPtrC8 iInputBufferPtr; // set during a call to get more data |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
464 |
TInt iCurrentInputBufferLen; // current length of the data block available |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
465 |
TInt iNextChar; // read position in the data block |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
466 |
TInt iInputBytesRemaining; // number of bytes remaining to read. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
467 |
HBufC8 *iUTF8EdgeBuffer; // buffer to hold up to 6 bytes so that UTF8 parsing can span edges of data blocks |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
468 |
HBufC8 *iBomBuffer; // buffer to hold data at the start of the stream so we may determine charset |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
469 |
TInt iRequiredUTF8Bytes; // number of bytes required to complete the character held in the edge buffer |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
470 |
TBool iUnicodeInputMisaligned; // Set to ETrue if the unicode input stream is not aligned to 16-bit boundaries |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
471 |
MMDXMLParserDataProvider* iDataSource; // XML Data Source being parsed. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
472 |
CMDXMLParserFileDataSource* iFileSource; // We own this, and need to free it when we are done. Only used when we're providing the data source object to wrap a local file. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
473 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
474 |
/* member variables dealing with chunked conversion into unicode output */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
475 |
TBuf<32> iUnicodeConversion; // buffer to temporarily hold the results of conversion from UTF8 to Unicode |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
476 |
TInt iUnicodeConversionLen; // number of characters stored in our intermediate buffer |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
477 |
TInt iUnicodeReadPos; // next character to send from our intermediate buffer |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
478 |
TBuf<1> iSpareChar; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
479 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
480 |
/* member variables used when parsing a local file */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
481 |
TDesC *iFileToParse; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
482 |
RFs iRFs; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
483 |
RFile iFileHandleToParse; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
484 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
485 |
TBool iEndOfTag; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
486 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
487 |
/* member variables used in DoParseLoopL() */ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
488 |
TBool iOpened; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
489 |
TBool iClosed; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
490 |
CMDXMLElement* iNewElement; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
491 |
CMDXMLElement* iParentElement; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
492 |
HBufC* iText; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
493 |
enum EParserStates |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
494 |
{ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
495 |
KInitFromFile, |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
496 |
KDetermineCharset, |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
497 |
KWaitingForData, |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
498 |
KParseData, |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
499 |
KSpanDataGap, |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
500 |
KFinished |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
501 |
}; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
502 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
503 |
EParserStates iState; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
504 |
EParserStates iPreviousState; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
505 |
TInt iSuspiciousCharacter; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
506 |
TBool iStoreInvalid; // controls whether invalid elements and attributes are stored in the DOM. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
507 |
TBool iPreserve; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
508 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
509 |
}; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
510 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
511 |
#endif |