os/textandloc/charconvfw/charconvplugins/src/plugins/portuguese_locking_single.cpp
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.
22 #include <convgeneratedcpp.h>
23 #include <ecom/implementationproxy.h>
24 #include <charactersetconverter.h>
26 class CPortuguese_locking_singleConverterImpl : public CCharacterSetConverterPluginInterface
30 virtual const TDesC8& ReplacementForUnconvertibleUnicodeCharacters();
32 virtual TInt ConvertFromUnicode(
33 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
34 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
36 const TDesC16& aUnicode,
37 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters);
39 virtual TInt ConvertToUnicode(
40 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
42 const TDesC8& aForeign,
44 TInt& aNumberOfUnconvertibleCharacters,
45 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter);
47 virtual TBool IsInThisCharacterSetL(
49 TInt& aConfidenceLevel,
50 const TDesC8& aSample);
52 static CPortuguese_locking_singleConverterImpl* NewL();
53 virtual ~CPortuguese_locking_singleConverterImpl();
56 CPortuguese_locking_singleConverterImpl();
61 const TDesC8& CPortuguese_locking_singleConverterImpl::ReplacementForUnconvertibleUnicodeCharacters()
63 return ReplacementForUnconvertibleUnicodeCharacters_internal();
66 TInt CPortuguese_locking_singleConverterImpl::ConvertFromUnicode(
67 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
68 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
70 const TDesC16& aUnicode,
71 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters)
73 return CCnvCharacterSetConverter::DoConvertFromUnicode(conversionData, aDefaultEndiannessOfForeignCharacters, aReplacementForUnconvertibleUnicodeCharacters, aForeign, aUnicode, aIndicesOfUnconvertibleCharacters);
76 TInt CPortuguese_locking_singleConverterImpl::ConvertToUnicode(
77 CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
79 const TDesC8& aForeign,
81 TInt& aNumberOfUnconvertibleCharacters,
82 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter)
84 return CCnvCharacterSetConverter::DoConvertToUnicode(conversionData, aDefaultEndiannessOfForeignCharacters, aUnicode, aForeign, aNumberOfUnconvertibleCharacters, aIndexOfFirstByteOfFirstUnconvertibleCharacter);
87 TBool CPortuguese_locking_singleConverterImpl::IsInThisCharacterSetL(
89 TInt& aConfidenceLevel,
90 const TDesC8& /*aSample*/)
97 CPortuguese_locking_singleConverterImpl* CPortuguese_locking_singleConverterImpl::NewL()
99 CPortuguese_locking_singleConverterImpl* self = new(ELeave) CPortuguese_locking_singleConverterImpl();
103 CPortuguese_locking_singleConverterImpl::~CPortuguese_locking_singleConverterImpl()
107 CPortuguese_locking_singleConverterImpl::CPortuguese_locking_singleConverterImpl()
111 const TImplementationProxy ImplementationTable[] =
113 IMPLEMENTATION_PROXY_ENTRY(KCharacterSetIdentifierPortugueseLockingAndSingleSms7Bit, CPortuguese_locking_singleConverterImpl::NewL)
116 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
118 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
120 return ImplementationTable;