epoc32/include/mw/senparser.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 senparser.h
     1 /*
       
     2 * Copyright (c) 2002-2005 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:        This is an abstract interface enabling factory pattern
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 #ifndef SEN_PARSER_H
       
    27 #define SEN_PARSER_H
       
    28 
       
    29 #include <Xml/ContentHandler.h>
       
    30 #include <Xml/Parser.h>
       
    31 
       
    32 using namespace Xml;
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class CSenContentHandler;
       
    36 class CSenFragmentBase;
       
    37 
       
    38 class CSenParser : public CBase
       
    39     {
       
    40     public: // Constructors and destructor
       
    41 
       
    42         /**
       
    43          *  Standard 2 phase constructor.
       
    44          *  @since Series60 4.0
       
    45          */
       
    46         IMPORT_C static CSenParser* NewL();
       
    47         /**
       
    48          *  Standard 2 phase constructor.
       
    49          *  @since Series60 4.0
       
    50          */       
       
    51         IMPORT_C static CSenParser* NewLC();
       
    52 
       
    53         /**
       
    54          *  Standard 2 phase constructor.
       
    55          *  @param aParser : where construction 
       
    56          *                  data will be copied from.         
       
    57          *  @since Series60 4.0
       
    58          */
       
    59         IMPORT_C static CSenParser* NewL(CParser* aParser);
       
    60         /**
       
    61          *  Standard 2 phase constructor.
       
    62          *  @param aParser : where construction 
       
    63          *                  data will be copied from.         
       
    64          *  @since Series60 4.0
       
    65          */        
       
    66         IMPORT_C static CSenParser* NewLC(CParser* aParser);
       
    67 
       
    68         /**
       
    69          *  Standard 2 phase constructor.
       
    70          *  @param aParserMimeType : where construction 
       
    71          *                  data will be copied from.         
       
    72          *  @since Series60 4.0
       
    73          */
       
    74         IMPORT_C static CSenParser* NewL(const TDesC8& aParserMimeType);
       
    75         /**
       
    76          *  Standard 2 phase constructor.
       
    77          *  @param aParserMimeType : where construction 
       
    78          *                  data will be copied from.         
       
    79          *  @since Series60 4.0
       
    80          */        
       
    81         IMPORT_C static CSenParser* NewLC(const TDesC8& aParserMimeType);
       
    82 
       
    83 		/**
       
    84 		 * Sets the ContentHandler
       
    85 		 * @param aContentHandler
       
    86 		 */	
       
    87         virtual void SetContentHandler(CSenFragmentBase& aContentHandler) = 0;
       
    88 
       
    89 		/**
       
    90 		 * Parsing Begins
       
    91 		 */
       
    92         virtual void ParseBeginL() = 0;
       
    93         /**
       
    94          * Parsing Begins
       
    95          * @param aDocumentMimeType This contains the Mime Type
       
    96          */
       
    97         virtual void ParseBeginL(const TDesC8& aDocumentMimeType) = 0;
       
    98 
       
    99 		/**
       
   100 		 * Parsing
       
   101 		 * @param aFragment
       
   102 		 * @param aContentHandler
       
   103 		 */
       
   104         virtual void ParseL(const TDesC8& aFragment,
       
   105                                 CSenFragmentBase& aContentHandler) = 0;
       
   106 		/**
       
   107 		 * Parsing
       
   108 		 * @param aFs
       
   109 		 * @param aFilename
       
   110 		 * @param aContentHandler
       
   111 		 */                                
       
   112         virtual void ParseL(RFs& aFs, const TDesC& aFilename,
       
   113                                  CSenFragmentBase& aContentHandler) = 0;
       
   114 		/**
       
   115 		 * Parsing
       
   116 		 * @param aFs
       
   117 		 * @param aContentHandler
       
   118 		 */                                                                 
       
   119         virtual void ParseL(RFile& aFile, CSenFragmentBase& aContentHandler) = 0;
       
   120         
       
   121         /**
       
   122          * Parsing Ends
       
   123          */
       
   124         virtual void ParseEndL() = 0;
       
   125 
       
   126 		/**
       
   127 		 * Sets the Processor Chain
       
   128 		 */
       
   129         virtual void SetProcessorChainL(const RContentProcessorUids& aPlugins) = 0;
       
   130 
       
   131 		/**
       
   132 		 * Enables the Parsing Feature 
       
   133 		 */
       
   134         virtual TInt EnableFeature(TInt aParserFeature) = 0;
       
   135    		/**
       
   136 		 * Disables the Parsing Feature 
       
   137 		 */
       
   138         virtual TInt DisableFeature(TInt aParserFeature) = 0;
       
   139         /**
       
   140          * @param aParserFeature
       
   141          * @return True if parser feature is enabled
       
   142          *		   False if parser feature is disabled
       
   143          */
       
   144         virtual TBool IsFeatureEnabled(TInt aParserFeature) const = 0;
       
   145 		/**
       
   146 		 * 
       
   147 		 */
       
   148         virtual void AddPreloadedDictionaryL(const TDesC8& aPublicId) = 0;
       
   149 
       
   150 		/**
       
   151 		 * 
       
   152 		 */
       
   153         virtual RStringPool& StringPool() = 0;
       
   154         /**
       
   155          * 
       
   156          */
       
   157         virtual RStringDictionaryCollection& StringDictionaryCollection() = 0;
       
   158         
       
   159     protected:
       
   160         CSenParser();
       
   161     };
       
   162 
       
   163 
       
   164 #endif //SEN_PARSER_H
       
   165 
       
   166 // End of File