First public contribution.
2 * Copyright (c) 1256 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.
14 * Description: (Arabic)
25 #include <convgeneratedcpp.h>
26 #include <ecom/implementationproxy.h>
27 #include <charactersetconverter.h>
28 // New Interface class
29 class CWin1256Implementation : 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 CWin1256Implementation* NewL();
56 virtual ~CWin1256Implementation();
58 CWin1256Implementation();
61 const TDesC8& CWin1256Implementation::ReplacementForUnconvertibleUnicodeCharacters()
63 return ReplacementForUnconvertibleUnicodeCharacters_internal();
66 TInt CWin1256Implementation::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 CWin1256Implementation::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 );
100 TBool CWin1256Implementation::IsInThisCharacterSetL(
102 TInt& aConfidenceLevel,
110 CWin1256Implementation* CWin1256Implementation::NewL()
112 CWin1256Implementation* self = new(ELeave) CWin1256Implementation;
116 CWin1256Implementation::CWin1256Implementation()
118 //default constructor.. do nothing
121 CWin1256Implementation::~CWin1256Implementation()
123 //default destructor .. do nothing
126 // ECOM CREATION FUNCTION
127 const TImplementationProxy ImplementationTable[] =
129 // Note: This is the same UID as defined in old mmp-file
130 // Used also in 12221212.rss ( implementation_uid )
131 IMPLEMENTATION_PROXY_ENTRY( 0x101F8548, CWin1256Implementation::NewL )
134 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
136 aTableCount = sizeof( ImplementationTable ) / sizeof(TImplementationProxy);
137 return ImplementationTable;