diff -r 000000000000 -r 1fb32624e06b charconvfw/charconvplugins/src/plugins/TIS_620.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/charconvfw/charconvplugins/src/plugins/TIS_620.cpp Tue Feb 02 02:02:46 2010 +0200 @@ -0,0 +1,128 @@ +/* +* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: (Thai) +* +*/ + + + + + +// INCLUDES +#include +#include +#include +#include +#include "charactersetconverter.h" +// New Interface class +class CTIS620Implementation : public CCharacterSetConverterPluginInterface +{ + public: + virtual const TDesC8& ReplacementForUnconvertibleUnicodeCharacters(); + + virtual TInt ConvertFromUnicode( + CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, + const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, + TDes8& aForeign, + const TDesC16& aUnicode, + CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters ); + + virtual TInt ConvertToUnicode( + CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, + TDes16& aUnicode, + const TDesC8& aForeign, + TInt&, + TInt& aNumberOfUnconvertibleCharacters, + TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter ); + + virtual TBool IsInThisCharacterSetL( + TBool& aSetToTrue, + TInt& aConfidenceLevel, + const TDesC8& ); + + static CTIS620Implementation* NewL(); + + virtual ~CTIS620Implementation(); + private: + CTIS620Implementation(); +}; + +// FUNCTION DEFINITIONS +const TDesC8& CTIS620Implementation::ReplacementForUnconvertibleUnicodeCharacters() + { + return ReplacementForUnconvertibleUnicodeCharacters_internal(); + } + +TInt CTIS620Implementation::ConvertFromUnicode( + CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, + const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, + TDes8& aForeign, + const TDesC16& aUnicode, + CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters) + { + return CCnvCharacterSetConverter::DoConvertFromUnicode(conversionData, aDefaultEndiannessOfForeignCharacters, aReplacementForUnconvertibleUnicodeCharacters, aForeign, aUnicode, aIndicesOfUnconvertibleCharacters); + } + +TInt CTIS620Implementation::ConvertToUnicode( + CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, + TDes16& aUnicode, + const TDesC8& aForeign, + TInt&, + TInt& aNumberOfUnconvertibleCharacters, + TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter) + { + return CCnvCharacterSetConverter::DoConvertToUnicode(conversionData, aDefaultEndiannessOfForeignCharacters, aUnicode, aForeign, aNumberOfUnconvertibleCharacters, aIndexOfFirstByteOfFirstUnconvertibleCharacter); + } + + +TBool CTIS620Implementation::IsInThisCharacterSetL( + TBool& aSetToTrue, + TInt& aConfidenceLevel, + const TDesC8&) + { + aSetToTrue=EFalse; + aConfidenceLevel=0; + return EFalse; + } + +CTIS620Implementation* CTIS620Implementation::NewL() + { + CTIS620Implementation* self = new(ELeave) CTIS620Implementation; + return self; + } + +CTIS620Implementation::CTIS620Implementation() + { + //default constructor.. do nothing + } + +CTIS620Implementation::~CTIS620Implementation() + { + //default destructor .. do nothing + } + +// ECOM CREATION FUNCTION +const TImplementationProxy ImplementationTable[] = + { + // Note: This is the same UID as defined in old mmp-file + // Used also in 12221212.rss ( implementation_uid ) + IMPLEMENTATION_PROXY_ENTRY( 0x101F8549, CTIS620Implementation::NewL ) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) + { + aTableCount = sizeof( ImplementationTable ) / sizeof(TImplementationProxy); + return ImplementationTable; + } +