Update contrib.
2 * Copyright (c) 2002 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 CKOI8UImplementation : 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 CKOI8UImplementation* NewL();
56 virtual ~CKOI8UImplementation();
58 CKOI8UImplementation();
61 const TDesC8& CKOI8UImplementation::ReplacementForUnconvertibleUnicodeCharacters()
63 return ReplacementForUnconvertibleUnicodeCharacters_internal();
66 TInt CKOI8UImplementation::ConvertFromUnicode(
67 CCnvCharacterSetConverter::TEndianness
68 aDefaultEndiannessOfForeignCharacters,
69 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
71 const TDesC16& aUnicode,
72 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters )
74 return CCnvCharacterSetConverter::DoConvertFromUnicode(
76 aDefaultEndiannessOfForeignCharacters,
77 aReplacementForUnconvertibleUnicodeCharacters,
80 aIndicesOfUnconvertibleCharacters );
83 TInt CKOI8UImplementation::ConvertToUnicode(
84 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
86 const TDesC8& aForeign,
88 TInt& aNumberOfUnconvertibleCharacters,
89 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter )
91 return CCnvCharacterSetConverter::DoConvertToUnicode(
93 aDefaultEndiannessOfForeignCharacters,
96 aNumberOfUnconvertibleCharacters,
97 aIndexOfFirstByteOfFirstUnconvertibleCharacter );
101 TBool CKOI8UImplementation::IsInThisCharacterSetL(
103 TInt& aConfidenceLevel,
107 aConfidenceLevel = 0;
111 CKOI8UImplementation* CKOI8UImplementation::NewL()
113 CKOI8UImplementation* self = new(ELeave) CKOI8UImplementation;
117 CKOI8UImplementation::CKOI8UImplementation()
119 //default constructor.. do nothing
122 CKOI8UImplementation::~CKOI8UImplementation()
124 //default destructor .. do nothing
127 // ECOM CREATION FUNCTION
128 const TImplementationProxy ImplementationTable[] =
130 // Note: This is the same UID as defined in old mmp-file
131 // Used also in 12221212.rss ( implementation_uid )
132 IMPLEMENTATION_PROXY_ENTRY( 0x101F8761, CKOI8UImplementation::NewL )
135 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
137 aTableCount = sizeof( ImplementationTable ) / sizeof(TImplementationProxy);
138 return ImplementationTable;