#include <charactersetconverter.h>
class CCharacterSetConverterPluginInterface : public CBase |
Public Member Functions | |
---|---|
virtual | ~CCharacterSetConverterPluginInterface() |
pure virtual TInt | ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness, const TDesC8 &, TDes8 &, const TDesC16 &, CCnvCharacterSetConverter::TArrayOfAscendingIndices &) |
pure virtual TInt | ConvertToUnicode(CCnvCharacterSetConverter::TEndianness, TDes16 &, const TDesC8 &, TInt &, TInt &, TInt &) |
pure virtual TBool | IsInThisCharacterSetL(TBool &, TInt &, const TDesC8 &) |
CCharacterSetConverterPluginInterface * | NewL(TUid) |
pure virtual const TDesC8 & | ReplacementForUnconvertibleUnicodeCharacters() |
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.
~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::SCharacterSets), then call CnvUtilities::ConvertFromUnicode().
Returns: " TInt " The number of unconverted characters left at the end of the input descriptor (e.g. because aForeign was not long enough to hold all the text), or a negative error value, as defined in TError.
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::SMethods or CnvUtilities::SStates, depending on whether the complex character set encoding is modal or not), then call CnvUtilities::ConvertToUnicodeFromHeterogeneousForeign() or CnvUtilities::ConvertToUnicodeFromModalForeign().
Returns: " TInt " The number of unconverted bytes left at the end of the input descriptor (e.g. because the output descriptor is not long enough to hold all the text), or one of the error values defined in TError.
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.
Returns: "TBool" ETrue if it is more probable that the sample text is encoded in this character set than not. EFalse if it is more probable that the sample text is not encoded in this character set. The confidence level applies to this value.
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().
Returns: " const TDesC8& " The single character which is to be used to replace unconvertible characters.