CCharacterSetConverterPluginInterface Class Reference

class CCharacterSetConverterPluginInterface : public CBase

This is the base class defining the methods in the CharConv Character Set Conversion plugin interface. CharConv plugin suppliers would define implementation classes inheriting from this interface class to add additional character set support to CharConv.

Inherits from

  • CCharacterSetConverterPluginInterface

Constructor & Destructor Documentation

~CCharacterSetConverterPluginInterface()

~CCharacterSetConverterPluginInterface()[inline, virtual]

Destroys the Charconv Plug-in interface implementation specified by iDtor_ID_Key

Member Functions Documentation

ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness, const TDesC8 &, TDes8 &, const TDesC16 &, CCnvCharacterSetConverter::TArrayOfAscendingIndices &)

TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndiannessaDefaultEndiannessOfForeignCharacters,
const TDesC8 &aReplacementForUnconvertibleUnicodeCharacters,
TDes8 &aForeign,
const TDesC16 &aUnicode,
CCnvCharacterSetConverter::TArrayOfAscendingIndices &aIndicesOfUnconvertibleCharacters
)[pure virtual]

A function prototype which must be implemented by a character conversion plug-in DLL to convert from Unicode into a foreign character set.

This function is exported at ordinal position 2 in the plug-in DLL. It is called by CCnvCharacterSetConverter::ConvertFromUnicode().For many non-complex character sets, the implementation of this function is trivial. Include convgeneratedcpp.h in the .cpp file to get access to the SCnvConversionData object called conversionData. Then call CCnvCharacterSetConverter::DoConvertFromUnicode() specifying conversionData as the first argument and passing in all parameters unchanged.For complex character sets, you need to create an array of character conversion data objects (CnvUtilities::SCharacterSets), then call CnvUtilities::ConvertFromUnicode().

Since
6.0

Parameters

CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters
const TDesC8 & aReplacementForUnconvertibleUnicodeCharacters
TDes8 & aForeign
const TDesC16 & aUnicode
CCnvCharacterSetConverter::TArrayOfAscendingIndices & aIndicesOfUnconvertibleCharacters

ConvertToUnicode(CCnvCharacterSetConverter::TEndianness, TDes16 &, const TDesC8 &, TInt &, TInt &, TInt &)

TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndiannessaDefaultEndiannessOfForeignCharacters,
TDes16 &aUnicode,
const TDesC8 &aForeign,
TInt &aState,
TInt &aNumberOfUnconvertibleCharacters,
TInt &aIndexOfFirstByteOfFirstUnconvertibleCharacter
)[pure virtual]

A function prototype which must be implemented by a character conversion plug-in DLL to convert from a foreign character set into Unicode.

This function is exported at ordinal position 3 in the plug-in DLL. It is called by CCnvCharacterSetConverter::ConvertToUnicode().For many non-complex character sets, the implementation of this function is trivial. Include convgeneratedcpp.h in the .cpp file to get access to the SCnvConversionData object called conversionData. Then call CCnvCharacterSetConverter::DoConvertToUnicode() specifying conversionData as the first argument and passing in all other parameters unchanged.For complex character sets, you need to create an array of character conversion methods (CnvUtilities::SMethods or CnvUtilities::SStates, depending on whether the complex character set encoding is modal or not), then call CnvUtilities::ConvertToUnicodeFromHeterogeneousForeign() or CnvUtilities::ConvertToUnicodeFromModalForeign().

Since
6.0

Parameters

CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters
TDes16 & aUnicode
const TDesC8 & aForeign
TInt & aState
TInt & aNumberOfUnconvertibleCharacters
TInt & aIndexOfFirstByteOfFirstUnconvertibleCharacter

IsInThisCharacterSetL(TBool &, TInt &, const TDesC8 &)

TBool IsInThisCharacterSetL(TBool &aSetToTrue,
TInt &aConfidenceLevel,
const TDesC8 &aSample
)[pure virtual]

A function which must be implemented by a character conversion plug-in DLL to calculate how probable it is that a sample piece of text is encoded in this character set.

This function was added in 6.1 as the 4th-ordinal exported function in the plug-in DLL interface. It is called by CCnvCharacterSetConverter::AutoDetectCharacterSetL() for each character conversion plug-in DLL.

Since
6.1

Parameters

TBool & aSetToTrue
TInt & aConfidenceLevel
const TDesC8 & aSample

NewL(TUid)

CCharacterSetConverterPluginInterface *NewL(TUidaInterfaceImplUid)[static, inline]

Parameters

TUid aInterfaceImplUid

ReplacementForUnconvertibleUnicodeCharacters()

const TDesC8 &ReplacementForUnconvertibleUnicodeCharacters()[pure virtual]

A function prototype which must be implemented by a character conversion plug-in DLL to return the character (represented by one or more byte values) which is used by default as the replacement for unconvertible Unicode characters.

This character is used when converting from Unicode into a foreign character set, if there is no equivalent for the Unicode character in the foreign character set. The default replacement character can be overriden by a call to CCnvCharacterSetConverter::SetReplacemen- tForUnconvertibleUnicodeCharactersL().This function is exported at ordinal position 1 in the plug-in DLL. It is called by CCnvC- haracterSetConverter::PrepareToConvertToOrFromL().To implement this function, you should include convgeneratedcpp.h in the cpp file. This gives access to the ReplacementForUnconvertibleUnicodeCharacters_internal() function. This function can then be implemented by calling ReplacementForUnconvertibleUnicodeCharacters_internal().

Since
6.0

Member Data Documentation

TUid iDtor_ID_Key

TUid iDtor_ID_Key[private]