Update contrib.
2 * Copyright (c) 2008-2009 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.
21 #include <convgeneratedcpp.h>
22 #include <ecom/implementationproxy.h>
23 #include "charactersetconverter.h"
25 class CSMS7BitExtendedPlugin : public CCharacterSetConverterPluginInterface
29 virtual const TDesC8& ReplacementForUnconvertibleUnicodeCharacters();
31 virtual TInt ConvertFromUnicode(
32 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
33 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
35 const TDesC16& aUnicode,
36 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters);
38 virtual TInt ConvertToUnicode(
39 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
41 const TDesC8& aForeign,
43 TInt& aNumberOfUnconvertibleCharacters,
44 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter);
46 virtual TBool IsInThisCharacterSetL(
48 TInt& aConfidenceLevel,
49 const TDesC8& aSample);
51 static CSMS7BitExtendedPlugin* NewL();
52 virtual ~CSMS7BitExtendedPlugin();
55 CSMS7BitExtendedPlugin();
60 const TDesC8& CSMS7BitExtendedPlugin::ReplacementForUnconvertibleUnicodeCharacters()
62 return ReplacementForUnconvertibleUnicodeCharacters_internal();
65 TInt CSMS7BitExtendedPlugin::ConvertFromUnicode(
66 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
67 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
69 const TDesC16& aUnicode,
70 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters)
72 return CCnvCharacterSetConverter::DoConvertFromUnicode(conversionData, aDefaultEndiannessOfForeignCharacters, aReplacementForUnconvertibleUnicodeCharacters, aForeign, aUnicode, aIndicesOfUnconvertibleCharacters);
75 TInt CSMS7BitExtendedPlugin::ConvertToUnicode(
76 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
78 const TDesC8& aForeign,
80 TInt& aNumberOfUnconvertibleCharacters,
81 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter)
83 return CCnvCharacterSetConverter::DoConvertToUnicode(conversionData, aDefaultEndiannessOfForeignCharacters, aUnicode, aForeign, aNumberOfUnconvertibleCharacters, aIndexOfFirstByteOfFirstUnconvertibleCharacter);
86 TBool CSMS7BitExtendedPlugin::IsInThisCharacterSetL(
88 TInt& aConfidenceLevel,
89 const TDesC8& /*aSample*/)
96 CSMS7BitExtendedPlugin* CSMS7BitExtendedPlugin::NewL()
98 CSMS7BitExtendedPlugin* self = new(ELeave) CSMS7BitExtendedPlugin();
102 CSMS7BitExtendedPlugin::CSMS7BitExtendedPlugin()
106 CSMS7BitExtendedPlugin::~CSMS7BitExtendedPlugin()
110 const TImplementationProxy ImplementationTable[] =
112 IMPLEMENTATION_PROXY_ENTRY(KCharacterSetIdentifierExtendedSms7Bit, CSMS7BitExtendedPlugin::NewL)
115 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
117 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
119 return ImplementationTable;