xmlsrv_plat/xml_parser_api/inc/RXMLReader.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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 /**
       
    26  * DO NOT USE THIS API. DEPRECATED AND REMOVED IN S60 5.0. USE SYMBIAN XML FRAMEWORK INSTEAD.
       
    27  */
       
    28 
       
    29 
       
    30 
       
    31 
       
    32 
       
    33 
       
    34 
       
    35 
       
    36 
       
    37 
       
    38 
       
    39 
       
    40 
       
    41 #ifndef __RXMLREADER_H
       
    42 #define __RXMLREADER_H
       
    43 
       
    44 #warning The XML API will be removed wk25. Please see http://wikis.in.nokia.com/Browser/APIMigration for more information
       
    45 
       
    46 
       
    47 //  INCLUDES
       
    48 #include <F32File.h>
       
    49 
       
    50 #include <xml/MXMLContentHandler.h>
       
    51 #include <xml/MWBXMLContentHandler.h>
       
    52 #include <xml/XMLUtils.h>
       
    53 
       
    54 
       
    55 // CLASS DECLARATION
       
    56 class CXMLReader;
       
    57 /**
       
    58 *  Interface for XML Parser.
       
    59 *  
       
    60 *  @lib XMLInterface.dll
       
    61 *  @since ?Series60_version
       
    62 */
       
    63 class RXMLReader
       
    64 {
       
    65 public: // New functions
       
    66 
       
    67 	inline RXMLReader();
       
    68 
       
    69 /** 
       
    70 * Creates the parser. 
       
    71 * This function leaves with an apropriate code if the create failed.
       
    72 * 
       
    73 */
       
    74 	IMPORT_C void CreateL();
       
    75 
       
    76 /** 
       
    77 * Destroys the parser. 
       
    78 * 
       
    79 */
       
    80 	IMPORT_C void Destroy();
       
    81 
       
    82 /** 
       
    83 * Destroys the parser. 
       
    84 * 
       
    85 */
       
    86 	IMPORT_C void Close();
       
    87 	
       
    88 
       
    89 /**
       
    90 * Enables/Dissables a feature.
       
    91 * @since ?Series60_version
       
    92 * @param aFeature: The feature to Enable/Dissable.
       
    93 * @param aStatus: TRUE Enables the feature, FALSE Dissables.
       
    94 * @return KErrNone if OK, KErrNotSupported if feature not supported.
       
    95 */
       
    96 	IMPORT_C TInt SetFeature(TXMLFeature aFeature, TBool aStatus);
       
    97 
       
    98 /**
       
    99 * Check if a feature is Enabled.
       
   100 * @since ?Series60_version
       
   101 * @param aFeature: The feature to check.
       
   102 * @param aStatus: TRUE if aFeature is Enabled. 
       
   103 * @return KErrNone if OK, KErrNotSupported if feature not supported.
       
   104 */
       
   105 	IMPORT_C TInt GetFeature(TXMLFeature aFeature, TBool& aStatus);
       
   106 
       
   107 /**
       
   108 * Allow an application to register a content event handler (for XML).
       
   109 * @since ?Series60_version
       
   110 * @param aContentHandler: The handler.
       
   111 * @return Status, KErrNone if OK.
       
   112 */
       
   113 	IMPORT_C TInt SetContentHandler(MXMLContentHandler* aContentHandler);
       
   114 
       
   115 /**
       
   116 * Allow an application to register a content event handler (for WBXML).
       
   117 * @since ?Series60_version
       
   118 * @param aContentHandler: The handler.
       
   119 * @return Status, KErrNone if OK.
       
   120 */
       
   121 	IMPORT_C TInt SetContentHandler(MWBXMLContentHandler* aContentHandler);
       
   122 
       
   123 /**
       
   124 * Parse an XML document.
       
   125 * @since ?Series60_version
       
   126 * @param aRFs: An open filesession.
       
   127 * @param aFileToParse: Filename of file to parse.
       
   128 * @return
       
   129 */
       
   130 	IMPORT_C void ParseL(RFs &aRFs, const TDesC& aFileToParse);
       
   131 
       
   132 /**
       
   133 * Parse an XML document.
       
   134 * @since ?Series60_version
       
   135 * @param aBuff: Buffer containing document to parse. 
       
   136 * @return 
       
   137 */
       
   138 	IMPORT_C void ParseL(const TDesC8& aBuff);
       
   139 
       
   140 /**
       
   141 * Parse an XML document.
       
   142 * @since ?Series60_version
       
   143 * @param aOpenedFile: Opened file containing document to parse. 
       
   144 * @return 
       
   145 */
       
   146 	IMPORT_C void ParseL(RFile& aOpenedFile);
       
   147 
       
   148 private:
       
   149 	friend class CXMLReader;
       
   150 
       
   151 	CXMLReader* iImplementation;
       
   152 };
       
   153 
       
   154 inline RXMLReader::RXMLReader()
       
   155 		: iImplementation(0)
       
   156 	{
       
   157 	}
       
   158 
       
   159 #endif      // __RXMLREADER_H   
       
   160             
       
   161 // End of File