xcfw/inc/xcfwentityconverter.h
author MattD <mattd@symbian.org>
Thu, 01 Apr 2010 14:50:19 +0100
changeset 48 0d4ac38889fc
parent 0 79c6a41cd166
child 54 666a2952b5b3
permissions -rw-r--r--
Merged in kashif's, fdim's and my removal of abld.bat and .cproject files onto the fixed up version of Christian's head.

/*
* 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