Location:
charactersetconverter.h
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.
CBase
- Base class for all classes to be instantiated on the heap
CCharacterSetConverterPluginInterface
- This is the base class defining the methods in the CharConv Character Set Conversion plugin interface
Defined in CCharacterSetConverterPluginInterface
:
ConvertFromUnicode()
, ConvertToUnicode()
, IsInThisCharacterSetL()
, NewL()
, ReplacementForUnconvertibleUnicodeCharacters()
, ~CCharacterSetConverterPluginInterface()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
static inline CCharacterSetConverterPluginInterface *NewL(TUid aInterfaceImplUid);
|
|
inline virtual ~CCharacterSetConverterPluginInterface();
Destroys the Charconv Plug-in interface implementation specified by iDtor_ID_Key
virtual const TDesC8 &ReplacementForUnconvertibleUnicodeCharacters()=0;
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()
.
|
virtual TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, const TDesC8
&aReplacementForUnconvertibleUnicodeCharacters, TDes8 &aForeign, const TDesC16 &aUnicode, CCnvCharacterSetConverter::TArrayOfAscendingIndices
&aIndicesOfUnconvertibleCharacters)=0;
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()
.
|
|
virtual TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, TDes16 &aUnicode,
const TDesC8 &aForeign, TInt &aState, TInt &aNumberOfUnconvertibleCharacters, TInt &aIndexOfFirstByteOfFirstUnconvertibleCharacter)=0;
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()
.
|
|
virtual TBool IsInThisCharacterSetL(TBool &aSetToTrue, TInt &aConfidenceLevel, const TDesC8 &aSample)=0;
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.
|
|