1.1 --- a/epoc32/include/mw/senparser.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/senparser.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,166 @@
1.4 -senparser.h
1.5 +/*
1.6 +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: This is an abstract interface enabling factory pattern
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +
1.28 +
1.29 +
1.30 +#ifndef SEN_PARSER_H
1.31 +#define SEN_PARSER_H
1.32 +
1.33 +#include <Xml/ContentHandler.h>
1.34 +#include <Xml/Parser.h>
1.35 +
1.36 +using namespace Xml;
1.37 +
1.38 +// FORWARD DECLARATIONS
1.39 +class CSenContentHandler;
1.40 +class CSenFragmentBase;
1.41 +
1.42 +class CSenParser : public CBase
1.43 + {
1.44 + public: // Constructors and destructor
1.45 +
1.46 + /**
1.47 + * Standard 2 phase constructor.
1.48 + * @since Series60 4.0
1.49 + */
1.50 + IMPORT_C static CSenParser* NewL();
1.51 + /**
1.52 + * Standard 2 phase constructor.
1.53 + * @since Series60 4.0
1.54 + */
1.55 + IMPORT_C static CSenParser* NewLC();
1.56 +
1.57 + /**
1.58 + * Standard 2 phase constructor.
1.59 + * @param aParser : where construction
1.60 + * data will be copied from.
1.61 + * @since Series60 4.0
1.62 + */
1.63 + IMPORT_C static CSenParser* NewL(CParser* aParser);
1.64 + /**
1.65 + * Standard 2 phase constructor.
1.66 + * @param aParser : where construction
1.67 + * data will be copied from.
1.68 + * @since Series60 4.0
1.69 + */
1.70 + IMPORT_C static CSenParser* NewLC(CParser* aParser);
1.71 +
1.72 + /**
1.73 + * Standard 2 phase constructor.
1.74 + * @param aParserMimeType : where construction
1.75 + * data will be copied from.
1.76 + * @since Series60 4.0
1.77 + */
1.78 + IMPORT_C static CSenParser* NewL(const TDesC8& aParserMimeType);
1.79 + /**
1.80 + * Standard 2 phase constructor.
1.81 + * @param aParserMimeType : where construction
1.82 + * data will be copied from.
1.83 + * @since Series60 4.0
1.84 + */
1.85 + IMPORT_C static CSenParser* NewLC(const TDesC8& aParserMimeType);
1.86 +
1.87 + /**
1.88 + * Sets the ContentHandler
1.89 + * @param aContentHandler
1.90 + */
1.91 + virtual void SetContentHandler(CSenFragmentBase& aContentHandler) = 0;
1.92 +
1.93 + /**
1.94 + * Parsing Begins
1.95 + */
1.96 + virtual void ParseBeginL() = 0;
1.97 + /**
1.98 + * Parsing Begins
1.99 + * @param aDocumentMimeType This contains the Mime Type
1.100 + */
1.101 + virtual void ParseBeginL(const TDesC8& aDocumentMimeType) = 0;
1.102 +
1.103 + /**
1.104 + * Parsing
1.105 + * @param aFragment
1.106 + * @param aContentHandler
1.107 + */
1.108 + virtual void ParseL(const TDesC8& aFragment,
1.109 + CSenFragmentBase& aContentHandler) = 0;
1.110 + /**
1.111 + * Parsing
1.112 + * @param aFs
1.113 + * @param aFilename
1.114 + * @param aContentHandler
1.115 + */
1.116 + virtual void ParseL(RFs& aFs, const TDesC& aFilename,
1.117 + CSenFragmentBase& aContentHandler) = 0;
1.118 + /**
1.119 + * Parsing
1.120 + * @param aFs
1.121 + * @param aContentHandler
1.122 + */
1.123 + virtual void ParseL(RFile& aFile, CSenFragmentBase& aContentHandler) = 0;
1.124 +
1.125 + /**
1.126 + * Parsing Ends
1.127 + */
1.128 + virtual void ParseEndL() = 0;
1.129 +
1.130 + /**
1.131 + * Sets the Processor Chain
1.132 + */
1.133 + virtual void SetProcessorChainL(const RContentProcessorUids& aPlugins) = 0;
1.134 +
1.135 + /**
1.136 + * Enables the Parsing Feature
1.137 + */
1.138 + virtual TInt EnableFeature(TInt aParserFeature) = 0;
1.139 + /**
1.140 + * Disables the Parsing Feature
1.141 + */
1.142 + virtual TInt DisableFeature(TInt aParserFeature) = 0;
1.143 + /**
1.144 + * @param aParserFeature
1.145 + * @return True if parser feature is enabled
1.146 + * False if parser feature is disabled
1.147 + */
1.148 + virtual TBool IsFeatureEnabled(TInt aParserFeature) const = 0;
1.149 + /**
1.150 + *
1.151 + */
1.152 + virtual void AddPreloadedDictionaryL(const TDesC8& aPublicId) = 0;
1.153 +
1.154 + /**
1.155 + *
1.156 + */
1.157 + virtual RStringPool& StringPool() = 0;
1.158 + /**
1.159 + *
1.160 + */
1.161 + virtual RStringDictionaryCollection& StringDictionaryCollection() = 0;
1.162 +
1.163 + protected:
1.164 + CSenParser();
1.165 + };
1.166 +
1.167 +
1.168 +#endif //SEN_PARSER_H
1.169 +
1.170 +// End of File