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.
Public Member Functions | |
---|---|
~CCharacterSetConverterPluginInterface () | |
TInt | ConvertFromUnicode ( CCnvCharacterSetConverter::TEndianness , const TDesC8 &, TDes8 &, const TDesC16 &, CCnvCharacterSetConverter::TArrayOfAscendingIndices &) |
TInt | ConvertToUnicode ( CCnvCharacterSetConverter::TEndianness , TDes16 &, const TDesC8 &, TInt &, TInt &, TInt &) |
TBool | IsInThisCharacterSetL ( TBool &, TInt &, const TDesC8 &) |
CCharacterSetConverterPluginInterface * | NewL ( TUid ) |
const TDesC8 & | ReplacementForUnconvertibleUnicodeCharacters () |
Private Attributes | |
---|---|
TUid | iDtor_ID_Key |
~CCharacterSetConverterPluginInterface | ( | ) | [inline, virtual] |
Destroys the Charconv Plug-in interface implementation specified by iDtor_ID_Key
TInt | ConvertFromUnicode | ( | CCnvCharacterSetConverter::TEndianness | aDefaultEndiannessOfForeignCharacters, |
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::SCharacterSet s), then call CnvUtilities::ConvertFromUnicode() .
CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters | |
const TDesC8 & aReplacementForUnconvertibleUnicodeCharacters | |
TDes8 & aForeign | |
const TDesC16 & aUnicode | |
CCnvCharacterSetConverter::TArrayOfAscendingIndices & aIndicesOfUnconvertibleCharacters |
TInt | ConvertToUnicode | ( | CCnvCharacterSetConverter::TEndianness | aDefaultEndiannessOfForeignCharacters, |
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::SMethod s or CnvUtilities::SState s, depending on whether the complex character set encoding is modal or not), then call CnvUtilities::ConvertToUnicodeFromHeterogeneousForeign() or CnvUtilities::ConvertToUnicodeFromModalForeign() .
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.
CCharacterSetConverterPluginInterface * | NewL | ( | TUid | aInterfaceImplUid | ) | [static, inline] |
TUid aInterfaceImplUid |
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() .
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.