|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: XML syncml DTD parser |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __XMLSYNCMLPARSER_H__ |
|
20 #define __XMLSYNCMLPARSER_H__ |
|
21 |
|
22 // ------------------------------------------------------------------------------------------------ |
|
23 // Includes |
|
24 // ------------------------------------------------------------------------------------------------ |
|
25 #include "WBXMLSyncMLParser.h" |
|
26 |
|
27 // ------------------------------------------------------------------------------------------------ |
|
28 // CXMLSyncMLDocHandler |
|
29 // ------------------------------------------------------------------------------------------------ |
|
30 class CXMLSyncMLDocHandler : public CBase, public MWBXMLDocumentHandler, public MWBXMLExtensionHandler |
|
31 { |
|
32 public: |
|
33 IMPORT_C static CXMLSyncMLDocHandler* NewL( MWBXMLSyncMLCallbacks* aCallbacks ); |
|
34 IMPORT_C ~CXMLSyncMLDocHandler(); |
|
35 |
|
36 protected: |
|
37 void StartDocumentL( TUint8 aVersion, TInt32 aPublicId, TUint32 aCharset ); |
|
38 void StartDocumentL( TUint8 aVersion, const TDesC8& aPublicIdStr, TUint32 aCharset ); |
|
39 void EndDocumentL(); |
|
40 void StartElementL( TWBXMLTag aTag, const CWBXMLAttributes& aAttributes ); |
|
41 void EndElementL( TWBXMLTag aTag ); |
|
42 void CodePageSwitchL( TUint8 aPage ); |
|
43 void CharactersL( const TDesC8& aBuffer ); |
|
44 void DocumentChangedL(); |
|
45 |
|
46 void Ext_IL( TWBXMLTag aTag, const TDesC8& aData ); |
|
47 void Ext_TL( TWBXMLTag aTag, TUint32 aData ); |
|
48 void ExtL( TWBXMLTag aTag ); |
|
49 void OpaqueL( const TDesC8& aData ); |
|
50 |
|
51 void AddElementL( CXMLElement* aElement ); |
|
52 |
|
53 private: |
|
54 void ConstructL(); |
|
55 CXMLSyncMLDocHandler( MWBXMLSyncMLCallbacks* aCallbacks ); |
|
56 |
|
57 private: |
|
58 CNSmlStack<CXMLElement>* iCmdStack; |
|
59 CNSmlStack<CXMLElement>* iCleanupStack; |
|
60 MWBXMLSyncMLCallbacks* iCallbacks; |
|
61 }; |
|
62 |
|
63 #endif // __XMLSYNCMLPARSER_H__ |