xcfw/inc/xcfwentityconverter.h
changeset 0 79c6a41cd166
child 54 666a2952b5b3
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     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 "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:  Class definitions for XCFW Entity Converter
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __XCFWENTITYCONVERTER_H__
       
    20 #define __XCFWENTITYCONVERTER_H__
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <eikenv.h>
       
    24 #include <gmxmlentityconverter.h>
       
    25 
       
    26 // CLASS DECLARATION
       
    27 /**
       
    28 * Entity converter dummy implementation for GMXML parser. XCFW does the
       
    29 * localization related entity conversion during DOM to XCFW tree parsing,
       
    30 * this class is needed only because GMXML would otherwise turn any & character
       
    31 * it finds into a &amp; entity.
       
    32 *
       
    33 * @lib XCFW.lib
       
    34 * @since Series 60 3.1
       
    35 */
       
    36 class CXCFWEntityConverter: public CMDXMLEntityConverter
       
    37 	{
       
    38 public:
       
    39 	/**
       
    40 	 * Constructor
       
    41 	 */
       
    42 	IMPORT_C CXCFWEntityConverter();
       
    43 
       
    44 	/** Destructor. */
       
    45 	IMPORT_C virtual ~CXCFWEntityConverter();
       
    46 
       
    47 	/**
       
    48 	 * From CMDXMLEntityConverter
       
    49 	 * Outputs a block of text to a composer with offending characters replaced by
       
    50 	 * entity references.
       
    51 	 * @param aComposer the composer to be used for output
       
    52 	 * @param aTextToConvert The text to be converted.
       
    53 	 * @return Returns KErrNone if succcessful or a file write error
       
    54 	 * @exception can Leave due to OOM
       
    55 	 */
       
    56 	IMPORT_C TInt OutputComposedTextL( CMDXMLComposer* aComposer, const TDesC& aTextToConvert );
       
    57 
       
    58 protected:
       
    59 	/**
       
    60 	 * From CMDXMLEntityConverter
       
    61 	 * DTD Specific entity to text converter
       
    62 	 * @param aTextToConvert Text to be converted - replacement text goes
       
    63 	 * out in the same
       
    64 	 * @return Returns KErrNone if successful or no entity found
       
    65 	 * @return Returns KErrXMLBadEntity if malformed entity found
       
    66 	 */
       
    67 	TInt DTDEntityToText(TDes& aTextToConvert);
       
    68 
       
    69 	};
       
    70 
       
    71 
       
    72 #endif