williamr@2
|
1 |
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
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
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
#ifndef __PARSER_H__
|
williamr@2
|
17 |
#define __PARSER_H__
|
williamr@2
|
18 |
|
williamr@2
|
19 |
/**
|
williamr@2
|
20 |
@file
|
williamr@2
|
21 |
|
williamr@2
|
22 |
XML Framework CParser API header file.
|
williamr@2
|
23 |
|
williamr@2
|
24 |
@publishedAll
|
williamr@2
|
25 |
@released
|
williamr@2
|
26 |
*/
|
williamr@2
|
27 |
|
williamr@2
|
28 |
#include <xml/contentprocessoruids.h> // needed for the typedef
|
williamr@2
|
29 |
#include <xml/plugins/elementstack.h> // needed for the typedef
|
williamr@2
|
30 |
|
williamr@2
|
31 |
class RFs;
|
williamr@2
|
32 |
class RFile;
|
williamr@2
|
33 |
|
williamr@2
|
34 |
namespace Xml
|
williamr@2
|
35 |
{
|
williamr@2
|
36 |
|
williamr@2
|
37 |
class MContentHandler;
|
williamr@2
|
38 |
class RStringDictionaryCollection;
|
williamr@2
|
39 |
class TParserImpl;
|
williamr@2
|
40 |
class CMatchData;
|
williamr@2
|
41 |
|
williamr@2
|
42 |
/**
|
williamr@2
|
43 |
If you need to parse xml this is the class you need to use.
|
williamr@2
|
44 |
|
williamr@2
|
45 |
Default plain-text XML parser plug-in supports following character set encodings:
|
williamr@2
|
46 |
|
williamr@2
|
47 |
ISO_8859_1
|
williamr@2
|
48 |
US_ASCII
|
williamr@2
|
49 |
UTF_8
|
williamr@2
|
50 |
UTF_16
|
williamr@2
|
51 |
UTF_16BE
|
williamr@2
|
52 |
UTF_16LE
|
williamr@2
|
53 |
|
williamr@2
|
54 |
@publishedAll
|
williamr@2
|
55 |
@released
|
williamr@2
|
56 |
*/
|
williamr@2
|
57 |
class CParser : public CBase
|
williamr@2
|
58 |
{
|
williamr@2
|
59 |
public:
|
williamr@2
|
60 |
static IMPORT_C CParser* NewL(const TDesC8& aParserMimeType, MContentHandler& aCallback);
|
williamr@2
|
61 |
static IMPORT_C CParser* NewLC(const TDesC8& aParserMimeType, MContentHandler& aCallback);
|
williamr@2
|
62 |
|
williamr@2
|
63 |
static IMPORT_C CParser* NewL(const CMatchData& aCriteria, MContentHandler& aCallback);
|
williamr@2
|
64 |
static IMPORT_C CParser* NewLC(const CMatchData& aCriteria, MContentHandler& aCallback);
|
williamr@2
|
65 |
|
williamr@2
|
66 |
virtual ~CParser();
|
williamr@2
|
67 |
|
williamr@2
|
68 |
IMPORT_C void ParseBeginL();
|
williamr@2
|
69 |
IMPORT_C void ParseBeginL(const TDesC8& aDocumentMimeType);
|
williamr@2
|
70 |
IMPORT_C void ParseBeginL(const CMatchData& aCriteria);
|
williamr@2
|
71 |
IMPORT_C void ParseL(const TDesC8& aFragment);
|
williamr@2
|
72 |
IMPORT_C void ParseEndL();
|
williamr@2
|
73 |
|
williamr@2
|
74 |
IMPORT_C void SetProcessorChainL(const RContentProcessorUids& aPlugins);
|
williamr@2
|
75 |
|
williamr@2
|
76 |
IMPORT_C TInt EnableFeature(TInt aParserFeature);
|
williamr@2
|
77 |
IMPORT_C TInt DisableFeature(TInt aParserFeature);
|
williamr@2
|
78 |
IMPORT_C TBool IsFeatureEnabled(TInt aParserFeature) const;
|
williamr@2
|
79 |
|
williamr@2
|
80 |
IMPORT_C void AddPreloadedDictionaryL(const TDesC8& aPublicId);
|
williamr@2
|
81 |
|
williamr@2
|
82 |
IMPORT_C RStringPool& StringPool();
|
williamr@2
|
83 |
IMPORT_C RStringDictionaryCollection& StringDictionaryCollection();
|
williamr@2
|
84 |
|
williamr@2
|
85 |
private:
|
williamr@2
|
86 |
CParser();
|
williamr@2
|
87 |
void ConstructL(const TDesC8& aParserMimeType, MContentHandler& aCallback);
|
williamr@2
|
88 |
void ConstructL(const CMatchData& aMatchData, MContentHandler& aCallback);
|
williamr@2
|
89 |
TParserImpl* iImpl;
|
williamr@2
|
90 |
};
|
williamr@2
|
91 |
|
williamr@2
|
92 |
IMPORT_C void ParseL(CParser& aParser, const TDesC8& aDocument);
|
williamr@2
|
93 |
IMPORT_C void ParseL(CParser& aParser, RFs& aFs, const TDesC& aFilename);
|
williamr@2
|
94 |
IMPORT_C void ParseL(CParser& aParser, RFile& aFile);
|
williamr@2
|
95 |
}
|
williamr@2
|
96 |
|
williamr@2
|
97 |
#endif //__PARSER_H__
|