xcfw/inc/xcfwentityconverter.h
author jake
Wed, 31 Mar 2010 13:30:40 +0300
branchRCL_3
changeset 44 c2817bb2a55c
parent 0 79c6a41cd166
child 54 666a2952b5b3
permissions -rw-r--r--
Merged from FCL, GCC-E compilation error in homescreensrv (2098) fixed by Leo Zhengyh

/*
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Class definitions for XCFW Entity Converter
*
*/


#ifndef __XCFWENTITYCONVERTER_H__
#define __XCFWENTITYCONVERTER_H__

#include <e32std.h>
#include <eikenv.h>
#include <gmxmlentityconverter.h>

// CLASS DECLARATION
/**
* Entity converter dummy implementation for GMXML parser. XCFW does the
* localization related entity conversion during DOM to XCFW tree parsing,
* this class is needed only because GMXML would otherwise turn any & character
* it finds into a &amp; entity.
*
* @lib XCFW.lib
* @since Series 60 3.1
*/
class CXCFWEntityConverter: public CMDXMLEntityConverter
	{
public:
	/**
	 * Constructor
	 */
	IMPORT_C CXCFWEntityConverter();

	/** Destructor. */
	IMPORT_C virtual ~CXCFWEntityConverter();

	/**
	 * From CMDXMLEntityConverter
	 * Outputs a block of text to a composer with offending characters replaced by
	 * entity references.
	 * @param aComposer the composer to be used for output
	 * @param aTextToConvert The text to be converted.
	 * @return Returns KErrNone if succcessful or a file write error
	 * @exception can Leave due to OOM
	 */
	IMPORT_C TInt OutputComposedTextL( CMDXMLComposer* aComposer, const TDesC& aTextToConvert );

protected:
	/**
	 * From CMDXMLEntityConverter
	 * DTD Specific entity to text converter
	 * @param aTextToConvert Text to be converted - replacement text goes
	 * out in the same
	 * @return Returns KErrNone if successful or no entity found
	 * @return Returns KErrXMLBadEntity if malformed entity found
	 */
	TInt DTDEntityToText(TDes& aTextToConvert);

	};


#endif