williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@2
|
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
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@2
|
7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description: Interface for SAX Parser Callback events.
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
#ifndef __MSENCONTENTHANDLERCLIENT_H
|
williamr@2
|
19 |
#define __MSENCONTENTHANDLERCLIENT_H
|
williamr@2
|
20 |
|
williamr@2
|
21 |
// INCLUDES
|
williamr@2
|
22 |
#include <stringpool.h>
|
williamr@2
|
23 |
#include <xml/Attribute.h>
|
williamr@2
|
24 |
|
williamr@2
|
25 |
using namespace Xml;
|
williamr@2
|
26 |
|
williamr@2
|
27 |
// CLASS DECLARATION
|
williamr@2
|
28 |
|
williamr@2
|
29 |
/**
|
williamr@2
|
30 |
* Interface for SAX Parser Callback events.
|
williamr@2
|
31 |
* If an application (client) needs to be informed of basic parsing events,
|
williamr@2
|
32 |
* it implements this interface and registers an instance with the SAX parser
|
williamr@2
|
33 |
* using the SetContentHandler() method.
|
williamr@2
|
34 |
* The parser uses the instance to report basic document-related events like
|
williamr@2
|
35 |
* the start and end of elements.*
|
williamr@2
|
36 |
*
|
williamr@2
|
37 |
* @lib SenXML.dll
|
williamr@2
|
38 |
* @since Series60 3.0
|
williamr@2
|
39 |
*/
|
williamr@2
|
40 |
class MSenContentHandlerClient
|
williamr@2
|
41 |
{
|
williamr@2
|
42 |
public: // New functions
|
williamr@2
|
43 |
/**
|
williamr@2
|
44 |
* Receive notification of the beginning of a document.
|
williamr@2
|
45 |
* Called when OnStartDocumentL callback is received from Symbian XML framework.
|
williamr@2
|
46 |
* @return KErrNone or some of the system-wide Symbian error codes.
|
williamr@2
|
47 |
*/
|
williamr@2
|
48 |
virtual TInt StartDocument() = 0;
|
williamr@2
|
49 |
|
williamr@2
|
50 |
/**
|
williamr@2
|
51 |
* Receive notification of the end of a document.
|
williamr@2
|
52 |
* Called when OnEndDocumentL callback is received from Symbian XML framework.
|
williamr@2
|
53 |
* @return KErrNone or some of the system-wide Symbian error codes.
|
williamr@2
|
54 |
*/
|
williamr@2
|
55 |
virtual TInt EndDocument() = 0;
|
williamr@2
|
56 |
|
williamr@2
|
57 |
/**
|
williamr@2
|
58 |
* Receive notification of the beginning of an element.
|
williamr@2
|
59 |
* Called when OnStartElementL callback is received from Symbian XML framework.
|
williamr@2
|
60 |
* @param aURI: The Namespace URI, or the empty string if the element
|
williamr@2
|
61 |
* has no Namespace URI or if Namespace processing is not
|
williamr@2
|
62 |
* being performed.
|
williamr@2
|
63 |
* @param aLocalName: The local name (without prefix)
|
williamr@2
|
64 |
* @param aName: The qualified name
|
williamr@2
|
65 |
* @param apAttrs: The attributes attached to the element.
|
williamr@2
|
66 |
* If there are no attributes, it shall be an empty array.
|
williamr@2
|
67 |
* Namespaces declared in the current element will be
|
williamr@2
|
68 |
* located in the array also.
|
williamr@2
|
69 |
*
|
williamr@2
|
70 |
* @return KErrNotSupported If the class implementing this
|
williamr@2
|
71 |
* interface doesn't override this.
|
williamr@2
|
72 |
* KErrNone or other system-wide Symbian error codes.
|
williamr@2
|
73 |
*/
|
williamr@2
|
74 |
inline virtual TInt StartElement( const TDesC8& /*aURI*/,
|
williamr@2
|
75 |
const TDesC8& /*aLocalName*/,
|
williamr@2
|
76 |
const TDesC8& /*aName*/,
|
williamr@2
|
77 |
const RAttributeArray& /* apAttrs */)
|
williamr@2
|
78 |
{
|
williamr@2
|
79 |
return KErrNotSupported;
|
williamr@2
|
80 |
}
|
williamr@2
|
81 |
|
williamr@2
|
82 |
/**
|
williamr@2
|
83 |
* Receive notification of the end of an element.
|
williamr@2
|
84 |
* Called when OnEndElementL callback is received from Symbian XML framework.
|
williamr@2
|
85 |
* @param aURI: The Namespace URI, or the empty string if the element
|
williamr@2
|
86 |
* has no Namespace URI or if Namespace processing is not
|
williamr@2
|
87 |
* being performed.
|
williamr@2
|
88 |
* @param aLocalName: The local name (without prefix)
|
williamr@2
|
89 |
* @param aName: The qualified name
|
williamr@2
|
90 |
*
|
williamr@2
|
91 |
* @return KErrNotSupported If the class implementing this
|
williamr@2
|
92 |
* interface doesn't override this.
|
williamr@2
|
93 |
* KErrNone or other system-wide Symbian error codes.
|
williamr@2
|
94 |
*/
|
williamr@2
|
95 |
inline virtual TInt EndElement( const TDesC8& /*aURI*/,
|
williamr@2
|
96 |
const TDesC8& /*aLocalName*/,
|
williamr@2
|
97 |
const TDesC8& /*aName*/)
|
williamr@2
|
98 |
{
|
williamr@2
|
99 |
return KErrNotSupported;
|
williamr@2
|
100 |
}
|
williamr@2
|
101 |
|
williamr@2
|
102 |
|
williamr@2
|
103 |
/**
|
williamr@2
|
104 |
* Receive notification of character data inside an element.
|
williamr@2
|
105 |
* Called when OnContentL callback is received from Symbian XML framework.
|
williamr@2
|
106 |
* @param aBuff: The characters.
|
williamr@2
|
107 |
* @param aStart: The start position in the character buffer.
|
williamr@2
|
108 |
* @param aLength: The number of characters to use from the character buffer.
|
williamr@2
|
109 |
* @return KErrNotSupported If the class implementing this
|
williamr@2
|
110 |
* interface doesn't override this.
|
williamr@2
|
111 |
* KErrNone or other system-wide Symbian error codes.
|
williamr@2
|
112 |
*/
|
williamr@2
|
113 |
inline virtual TInt Characters(const TDesC8& /*aBuf*/,
|
williamr@2
|
114 |
const TInt /*aStart*/,
|
williamr@2
|
115 |
const TInt /*aLength*/)
|
williamr@2
|
116 |
{
|
williamr@2
|
117 |
return KErrNotSupported;
|
williamr@2
|
118 |
}
|
williamr@2
|
119 |
|
williamr@2
|
120 |
/**
|
williamr@2
|
121 |
* Receive notification of a processing instruction
|
williamr@2
|
122 |
* Called when OnProcessingInstructionL callback is received from Symbian XML framework.
|
williamr@2
|
123 |
* @deprefaceted This method is currently not in use - inlined.
|
williamr@2
|
124 |
* @param aTarget: The processing instruction target.
|
williamr@2
|
125 |
* @param aData: The processing instruction data,
|
williamr@2
|
126 |
* or null if none is supplied.
|
williamr@2
|
127 |
* @return KErrNotSupported If the class implementing this
|
williamr@2
|
128 |
* interface doesn't override this.
|
williamr@2
|
129 |
* KErrNone or other system-wide Symbian error codes.
|
williamr@2
|
130 |
*/
|
williamr@2
|
131 |
inline virtual TInt ProcessingInstructions(const TDesC8& /*aTarget*/,
|
williamr@2
|
132 |
const TDesC8& /*aData*/)
|
williamr@2
|
133 |
{
|
williamr@2
|
134 |
return KErrNotSupported;
|
williamr@2
|
135 |
}
|
williamr@2
|
136 |
|
williamr@2
|
137 |
/**
|
williamr@2
|
138 |
* Receive notification of a skipped entity.
|
williamr@2
|
139 |
* Called when OnSkippedEntityL callback is received from Symbian XML framework.
|
williamr@2
|
140 |
* @param aName: The name of the skipped entity.
|
williamr@2
|
141 |
* @return KErrNotSupported If the class implementing this
|
williamr@2
|
142 |
* interface doesn't override this.
|
williamr@2
|
143 |
* KErrNone or other system-wide Symbian error codes.
|
williamr@2
|
144 |
*/
|
williamr@2
|
145 |
inline virtual TInt SkippedEntity(const TDesC8& /*aName*/)
|
williamr@2
|
146 |
{
|
williamr@2
|
147 |
return KErrNotSupported;
|
williamr@2
|
148 |
}
|
williamr@2
|
149 |
|
williamr@2
|
150 |
|
williamr@2
|
151 |
/**
|
williamr@2
|
152 |
* Receive notification of error situation during parsing.
|
williamr@2
|
153 |
* Called when OnError callback is received from Symbian XML framework.
|
williamr@2
|
154 |
* Complete list of error codes is listed under <Xml\XmlFrameworkErrors.h>
|
williamr@2
|
155 |
* @param aErrorCode: Error status code.
|
williamr@2
|
156 |
* @param aSeverity: Error Severity.
|
williamr@2
|
157 |
* @return KErrNotSupported If the class implementing this
|
williamr@2
|
158 |
* interface doesn't override this.
|
williamr@2
|
159 |
* KErrNone or other system-wide Symbian error codes.
|
williamr@2
|
160 |
*/
|
williamr@2
|
161 |
inline virtual TInt Error(TInt /*aErrorCode*/)
|
williamr@2
|
162 |
{
|
williamr@2
|
163 |
return KErrNotSupported;
|
williamr@2
|
164 |
}
|
williamr@2
|
165 |
|
williamr@2
|
166 |
/**
|
williamr@2
|
167 |
* Receive notification of prefix mapping start.
|
williamr@2
|
168 |
* Called when OnStartPrefixMappingL callback is received from Symbian XML framework.
|
williamr@2
|
169 |
* @param aPrefix: The prefix
|
williamr@2
|
170 |
* @param aUri: The URI mapped to the prefix.
|
williamr@2
|
171 |
* @return KErrNotSupported If the class implementing this
|
williamr@2
|
172 |
* interface doesn't override this.
|
williamr@2
|
173 |
* KErrNone or other system-wide Symbian error codes.
|
williamr@2
|
174 |
*/
|
williamr@2
|
175 |
inline virtual TInt StartPrefixMappingL( const TDesC8& /* aPrefix */,
|
williamr@2
|
176 |
const TDesC8& /* aUri */)
|
williamr@2
|
177 |
{
|
williamr@2
|
178 |
return KErrNotSupported;
|
williamr@2
|
179 |
}
|
williamr@2
|
180 |
|
williamr@2
|
181 |
/**
|
williamr@2
|
182 |
* Receive notification of prefix mapping end.
|
williamr@2
|
183 |
* Called when OnEndPrefixMappingL callback is received from Symbian XML framework.
|
williamr@2
|
184 |
* @param aPrefix: The prefix
|
williamr@2
|
185 |
* @return KErrNotSupported If the class implementing this
|
williamr@2
|
186 |
* interface doesn't override this.
|
williamr@2
|
187 |
* KErrNone or other system-wide Symbian error codes.
|
williamr@2
|
188 |
*/
|
williamr@2
|
189 |
inline virtual TInt EndPrefixMappingL(const TDesC8& /* aPrefix */)
|
williamr@2
|
190 |
{
|
williamr@2
|
191 |
return KErrNotSupported;
|
williamr@2
|
192 |
}
|
williamr@2
|
193 |
|
williamr@2
|
194 |
/**
|
williamr@2
|
195 |
* Receive notification of ignorable whitespace in element content.
|
williamr@2
|
196 |
* Called when OnIgnorableWhiteSpaceL callback is received from Symbian XML framework.
|
williamr@2
|
197 |
* @param aBytes: The whitespace characters.
|
williamr@2
|
198 |
* @return KErrNotSupported If the class implementing this
|
williamr@2
|
199 |
* interface doesn't override this.
|
williamr@2
|
200 |
* KErrNone or other system-wide Symbian error codes.
|
williamr@2
|
201 |
*/
|
williamr@2
|
202 |
inline virtual TInt OnIgnorableWhiteSpaceL(const TDesC8& /* aBytes */)
|
williamr@2
|
203 |
{
|
williamr@2
|
204 |
return KErrNotSupported;
|
williamr@2
|
205 |
}
|
williamr@2
|
206 |
|
williamr@2
|
207 |
/**
|
williamr@2
|
208 |
* Method obtains the interface matching the specified UID.
|
williamr@2
|
209 |
* @param aUid the UID identifying the required interface.
|
williamr@2
|
210 |
* @return NULL if no interface matching the UID is found or method is not
|
williamr@2
|
211 |
* overridden in the implementing class.
|
williamr@2
|
212 |
* Otherwise, the this pointer cast to that interface.
|
williamr@2
|
213 |
*/
|
williamr@2
|
214 |
inline virtual TAny* GetExtendedInterface(const TInt32 /* aUid */)
|
williamr@2
|
215 |
{
|
williamr@2
|
216 |
return NULL;
|
williamr@2
|
217 |
}
|
williamr@2
|
218 |
};
|
williamr@2
|
219 |
|
williamr@2
|
220 |
#endif // __MSENCONTENTHANDLERCLIENT_H
|
williamr@2
|
221 |
|
williamr@2
|
222 |
// End of File |