xml/xmlparser/inc/CXMLReader.h
changeset 34 c7e9f1c97567
parent 25 417699dc19c9
child 36 172b09aa4eb6
equal deleted inserted replaced
25:417699dc19c9 34:c7e9f1c97567
     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 the License "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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CXMLREADER_H
       
    21 #define __CXMLREADER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32std.h>
       
    25 #include <f32file.h>
       
    26 #include <utf.h>
       
    27 #include <xml/cxml/nw_cXML_Parser.h>
       
    28 
       
    29 #include "CXMLAttributes.h"
       
    30 #include <xml/MXMLContentHandler.h>
       
    31 #include <xml/MWBXMLContentHandler.h>
       
    32 #include "CXMLObserver.h"
       
    33 #include <xml/XMLUtils.h>
       
    34 
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  Implementation of RXMLReader interface.
       
    40 *  @lib XMLInterface.dll
       
    41 *  @since ?Series60_version
       
    42 */
       
    43 class CXMLReader : public CBase
       
    44 {
       
    45 public:  // Constructors and destructor
       
    46         
       
    47 /**
       
    48 * Two-phased constructor.
       
    49 */
       
    50 	static CXMLReader* NewL();
       
    51 
       
    52 	static CXMLReader* NewLC();
       
    53         
       
    54 /**
       
    55 * Destructor.
       
    56 */
       
    57 	~CXMLReader();
       
    58 
       
    59 public: // Implementation of RXMLAttributes Functions
       
    60         
       
    61 /**
       
    62 * Implementation of RXMLReader::SetFeature(TXMLFeature aFeature, TBool aStatus)
       
    63 */
       
    64 	TInt SetFeature(TXMLFeature aFeature, TBool aStatus);
       
    65 
       
    66 /**
       
    67 * Implementation of RXMLReader::GetFeature(TXMLFeature aFeature)
       
    68 */
       
    69 	TInt GetFeature(TXMLFeature aFeature, TBool& aStatus);
       
    70 
       
    71 /**
       
    72 * Implementation of RXMLReader::SetContentHandler(MXMLContentHandler& aContentHandler)
       
    73 */
       
    74 	TInt SetContentHandler(MXMLContentHandler* aContentHandler);
       
    75 
       
    76 /**
       
    77 * Implementation of RXMLReader::SetContentHandler(MWBXMLContentHandler& aContentHandler)
       
    78 */
       
    79 	TInt SetContentHandler(MWBXMLContentHandler* aContentHandler);
       
    80 
       
    81 /**
       
    82 * Implementation of RXMLReader::ParseL(RFs& aRFs, const TDesC& aFileToParse)
       
    83 */
       
    84 	void ParseL(RFs& aRFs, const TDesC& aFileToParse);
       
    85 
       
    86 /**
       
    87 * Implementation of RXMLReader::ParseL(const TDesC& aBuff)
       
    88 */
       
    89 	void ParseL(const TDesC8& aBuff);
       
    90 
       
    91 /**
       
    92 * Implementation of RXMLReader::ParseL(RFile& aOpenedFile)
       
    93 */
       
    94 	void ParseL(RFile& aOpenedFile);
       
    95 
       
    96 
       
    97 private:
       
    98 
       
    99 /**
       
   100 * C++ default constructor.
       
   101 */
       
   102 	CXMLReader();
       
   103 
       
   104     void ConstructL();
       
   105 
       
   106 /**
       
   107 * Parse XML document
       
   108 * @since ?Series60_version
       
   109 * @param 
       
   110 * @return status.
       
   111 */
       
   112 	TInt ParseXML(const TDesC& aBuff);
       
   113 
       
   114 /**
       
   115 * Parse WBXML document
       
   116 * @since ?Series60_version
       
   117 * @param 
       
   118 * @return status.
       
   119 */
       
   120 	TInt ParseWBXML(const TDesC8& aBuff);
       
   121 
       
   122 
       
   123 protected:  // Data
       
   124 
       
   125 	// Parser CallBacks
       
   126 	CXMLObserver* iParserObserver;
       
   127 	// wbxml or xml input
       
   128 	TBool iIsBinary;
       
   129 
       
   130 };
       
   131 
       
   132 #endif      // __CXMLREADER_H   
       
   133             
       
   134 // End of File