First public contribution.
2 * Copyright (c) 1257 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
25 #include <convgeneratedcpp.h>
26 #include <ecom/implementationproxy.h>
27 #include <charactersetconverter.h>
28 // New Interface class
29 class CWin1257Implementation : public CCharacterSetConverterPluginInterface
32 virtual const TDesC8& ReplacementForUnconvertibleUnicodeCharacters();
34 virtual TInt ConvertFromUnicode(
35 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
36 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
38 const TDesC16& aUnicode,
39 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters );
41 virtual TInt ConvertToUnicode(
42 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
44 const TDesC8& aForeign,
46 TInt& aNumberOfUnconvertibleCharacters,
47 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter );
49 virtual TBool IsInThisCharacterSetL(
51 TInt& aConfidenceLevel,
54 static CWin1257Implementation* NewL();
56 virtual ~CWin1257Implementation();
58 CWin1257Implementation();
61 const TDesC8& CWin1257Implementation::ReplacementForUnconvertibleUnicodeCharacters()
63 return ReplacementForUnconvertibleUnicodeCharacters_internal();
66 TInt CWin1257Implementation::ConvertFromUnicode(
67 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
68 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
70 const TDesC16& aUnicode,
71 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters )
73 return CCnvCharacterSetConverter::DoConvertFromUnicode(
75 aDefaultEndiannessOfForeignCharacters,
76 aReplacementForUnconvertibleUnicodeCharacters,
79 aIndicesOfUnconvertibleCharacters );
82 TInt CWin1257Implementation::ConvertToUnicode(
83 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
85 const TDesC8& aForeign,
87 TInt& aNumberOfUnconvertibleCharacters,
88 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter )
90 return CCnvCharacterSetConverter::DoConvertToUnicode(
92 aDefaultEndiannessOfForeignCharacters,
95 aNumberOfUnconvertibleCharacters,
96 aIndexOfFirstByteOfFirstUnconvertibleCharacter );
99 TBool CWin1257Implementation::IsInThisCharacterSetL(
101 TInt& aConfidenceLevel,
109 CWin1257Implementation* CWin1257Implementation::NewL()
111 CWin1257Implementation* self = new(ELeave) CWin1257Implementation;
115 CWin1257Implementation::CWin1257Implementation()
117 //default constructor.. do nothing
120 CWin1257Implementation::~CWin1257Implementation()
122 //default destructor .. do nothing
125 // ECOM CREATION FUNCTION
126 const TImplementationProxy ImplementationTable[] =
128 // Note: This is the same UID as defined in old mmp-file
129 // Used also in 12221212.rss ( implementation_uid )
130 IMPLEMENTATION_PROXY_ENTRY( 0x100059DA, CWin1257Implementation::NewL )
133 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
135 aTableCount = sizeof( ImplementationTable ) / sizeof(TImplementationProxy);
136 return ImplementationTable;