os/textandloc/charconvfw/charconvplugins/test/rtest/tsrc/plugins/tis1620.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 * Two dummy character set converters
    16 *
    17 */
    18 
    19 
    20 #ifndef __TIS1620_H__
    21 #define __TIS1620_H__
    22 
    23 #include <e32std.h>
    24 #include <charconv.h>
    25 #include <charactersetconverter.h>
    26 
    27 const TInt32 KTIS1620aImplUid = 0xA0001344;
    28 const TInt32 KTIS1620bImplUid = 0xA0001345;
    29 
    30 // A dummy character set converter plugin for testing having
    31 // multiple implementations in a single DLL.
    32 class CTIS1620aImplementation : public CCharacterSetConverterPluginInterface
    33 {
    34 public:
    35 	virtual const TDesC8& ReplacementForUnconvertibleUnicodeCharacters();
    36 
    37 	virtual TInt ConvertFromUnicode(
    38 		CCnvCharacterSetConverter::TEndianness  aDefaultEndiannessOfForeignCharacters, 
    39 		const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, 
    40 		TDes8& aForeign, 
    41 		const TDesC16& aUnicode, 
    42 		CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters);
    43 	
    44 	virtual TInt ConvertToUnicode(
    45 		CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    46 		TDes16& aUnicode, 
    47 		const TDesC8& aForeign, 
    48 		TInt& aState, 
    49 		TInt& aNumberOfUnconvertibleCharacters, 
    50 		TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter);
    51 
    52 	virtual TBool IsInThisCharacterSetL(
    53 		TBool& aSetToTrue, 
    54 		TInt& aConfidenceLevel, 
    55 		const TDesC8& aSample);
    56 
    57 	static CTIS1620aImplementation* NewL();
    58 	virtual ~CTIS1620aImplementation();
    59 
    60 private:
    61 	CTIS1620aImplementation();
    62 
    63 };
    64 
    65 // Another dummy character set converter plugin for testing having
    66 // multiple implementations in one DLL.
    67 class CTIS1620bImplementation : public CCharacterSetConverterPluginInterface
    68 {
    69 public:
    70 	virtual const TDesC8& ReplacementForUnconvertibleUnicodeCharacters();
    71 
    72 	virtual TInt ConvertFromUnicode(
    73 		CCnvCharacterSetConverter::TEndianness  aDefaultEndiannessOfForeignCharacters, 
    74 		const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, 
    75 		TDes8& aForeign, 
    76 		const TDesC16& aUnicode, 
    77 		CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters);
    78 	
    79 	virtual TInt ConvertToUnicode(
    80 		CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    81 		TDes16& aUnicode, 
    82 		const TDesC8& aForeign, 
    83 		TInt& aState, 
    84 		TInt& aNumberOfUnconvertibleCharacters, 
    85 		TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter);
    86 
    87 	virtual TBool IsInThisCharacterSetL(
    88 		TBool& aSetToTrue, 
    89 		TInt& aConfidenceLevel, 
    90 		const TDesC8& aSample);
    91 
    92 	static CTIS1620bImplementation* NewL();
    93 	virtual ~CTIS1620bImplementation();
    94 
    95 private:
    96 	CTIS1620bImplementation();
    97 
    98 };
    99 
   100 #endif