os/textandloc/charconvfw/charconvplugins/src/plugins/portuguese_locking_gsm7ext.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description: 
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
#include <e32std.h>
sl@0
    21
#include <charconv.h>
sl@0
    22
#include <convgeneratedcpp.h>
sl@0
    23
#include <ecom/implementationproxy.h>
sl@0
    24
#include <charactersetconverter.h>
sl@0
    25
sl@0
    26
class CPortuguese_locking_gsm7extConverterImpl : public CCharacterSetConverterPluginInterface
sl@0
    27
	{
sl@0
    28
sl@0
    29
public:
sl@0
    30
	virtual const TDesC8& ReplacementForUnconvertibleUnicodeCharacters();
sl@0
    31
sl@0
    32
	virtual TInt ConvertFromUnicode(
sl@0
    33
		CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
sl@0
    34
		const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, 
sl@0
    35
		TDes8& aForeign, 
sl@0
    36
		const TDesC16& aUnicode, 
sl@0
    37
		CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters);
sl@0
    38
sl@0
    39
	virtual TInt ConvertToUnicode(
sl@0
    40
		CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
sl@0
    41
		TDes16& aUnicode, 
sl@0
    42
		const TDesC8& aForeign, 
sl@0
    43
		TInt& aState, 
sl@0
    44
		TInt& aNumberOfUnconvertibleCharacters, 
sl@0
    45
		TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter);
sl@0
    46
sl@0
    47
	virtual TBool IsInThisCharacterSetL(
sl@0
    48
		TBool& aSetToTrue, 
sl@0
    49
		TInt& aConfidenceLevel, 
sl@0
    50
		const TDesC8& aSample);
sl@0
    51
sl@0
    52
	static CPortuguese_locking_gsm7extConverterImpl* NewL();
sl@0
    53
	virtual ~CPortuguese_locking_gsm7extConverterImpl();
sl@0
    54
sl@0
    55
private:
sl@0
    56
	CPortuguese_locking_gsm7extConverterImpl();
sl@0
    57
sl@0
    58
	};
sl@0
    59
sl@0
    60
sl@0
    61
const TDesC8& CPortuguese_locking_gsm7extConverterImpl::ReplacementForUnconvertibleUnicodeCharacters()
sl@0
    62
	{
sl@0
    63
	return ReplacementForUnconvertibleUnicodeCharacters_internal();
sl@0
    64
	}
sl@0
    65
sl@0
    66
TInt CPortuguese_locking_gsm7extConverterImpl::ConvertFromUnicode(
sl@0
    67
		CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
sl@0
    68
		const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, 
sl@0
    69
		TDes8& aForeign, 
sl@0
    70
		const TDesC16& aUnicode, 
sl@0
    71
		CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters)
sl@0
    72
	{
sl@0
    73
	return CCnvCharacterSetConverter::DoConvertFromUnicode(conversionData, aDefaultEndiannessOfForeignCharacters, aReplacementForUnconvertibleUnicodeCharacters, aForeign, aUnicode, aIndicesOfUnconvertibleCharacters);
sl@0
    74
	}
sl@0
    75
sl@0
    76
TInt CPortuguese_locking_gsm7extConverterImpl::ConvertToUnicode(
sl@0
    77
		CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
sl@0
    78
		TDes16& aUnicode, 
sl@0
    79
		const TDesC8& aForeign, 
sl@0
    80
		TInt& /*aState*/, 
sl@0
    81
		TInt& aNumberOfUnconvertibleCharacters, 
sl@0
    82
		TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter)
sl@0
    83
	{
sl@0
    84
	return CCnvCharacterSetConverter::DoConvertToUnicode(conversionData, aDefaultEndiannessOfForeignCharacters, aUnicode, aForeign, aNumberOfUnconvertibleCharacters, aIndexOfFirstByteOfFirstUnconvertibleCharacter);
sl@0
    85
	}
sl@0
    86
sl@0
    87
TBool CPortuguese_locking_gsm7extConverterImpl::IsInThisCharacterSetL(
sl@0
    88
		TBool& aSetToTrue, 
sl@0
    89
		TInt& aConfidenceLevel, 
sl@0
    90
		const TDesC8& /*aSample*/)
sl@0
    91
	{
sl@0
    92
	aSetToTrue=ETrue;
sl@0
    93
	aConfidenceLevel=0;
sl@0
    94
	return EFalse;
sl@0
    95
	}
sl@0
    96
sl@0
    97
CPortuguese_locking_gsm7extConverterImpl* CPortuguese_locking_gsm7extConverterImpl::NewL()
sl@0
    98
	{
sl@0
    99
	CPortuguese_locking_gsm7extConverterImpl* self = new(ELeave) CPortuguese_locking_gsm7extConverterImpl();
sl@0
   100
	return self;
sl@0
   101
	}
sl@0
   102
sl@0
   103
CPortuguese_locking_gsm7extConverterImpl::~CPortuguese_locking_gsm7extConverterImpl()
sl@0
   104
	{
sl@0
   105
	}
sl@0
   106
sl@0
   107
CPortuguese_locking_gsm7extConverterImpl::CPortuguese_locking_gsm7extConverterImpl()
sl@0
   108
	{
sl@0
   109
	}
sl@0
   110
sl@0
   111
const TImplementationProxy ImplementationTable[] = 
sl@0
   112
	{
sl@0
   113
		IMPLEMENTATION_PROXY_ENTRY(KCharacterSetIdentifierPortugueseLockingSms7Bit,	CPortuguese_locking_gsm7extConverterImpl::NewL)
sl@0
   114
	};
sl@0
   115
sl@0
   116
EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
sl@0
   117
	{
sl@0
   118
	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
sl@0
   119
sl@0
   120
	return ImplementationTable;
sl@0
   121
	}
sl@0
   122
sl@0
   123