1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/textandloc/charconvfw/charconvplugins/inc/SHIFTJIS_2.H Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,102 @@
1.4 +/*
1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +
1.24 +#if !defined(__SHIFTJIS_H__)
1.25 +#define __SHIFTJIS_H__
1.26 +
1.27 +#if !defined(__E32STD_H__)
1.28 +#include <e32std.h>
1.29 +#endif
1.30 +
1.31 +#if !defined(__CHARCONV_H__)
1.32 +#include <charconv.h>
1.33 +#endif
1.34 +
1.35 +#if !defined(__CONVUTILS_H__)
1.36 +#include <convutils.h>
1.37 +#endif
1.38 +
1.39 +class CnvShiftJis
1.40 +/**
1.41 +only to be used by CHARCONV plug-in DLLs and by locale-DLLs (Locl::FatUtilityFunctions)
1.42 +@internalComponent
1.43 +*/
1.44 + {
1.45 +public:
1.46 + IMPORT_C static const TDesC8& ReplacementForUnconvertibleUnicodeCharacters();
1.47 + IMPORT_C static TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
1.48 + const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
1.49 + TDes8& aForeign, const TDesC16& aUnicode,
1.50 + CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters);
1.51 +
1.52 + IMPORT_C static TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
1.53 + const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
1.54 + TDes8& aForeign, const TDesC16& aUnicode,
1.55 + CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters,
1.56 + const TArray<CnvUtilities::SCharacterSet>& aArrayOfAdditionalCharacterSets);
1.57 +
1.58 + IMPORT_C static TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
1.59 + TDes16& aUnicode, const TDesC8& aForeign,
1.60 + TInt& aNumberOfUnconvertibleCharacters,
1.61 + TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter);
1.62 +
1.63 + IMPORT_C static TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
1.64 + TDes16& aUnicode, const TDesC8& aForeign,
1.65 + TInt& aNumberOfUnconvertibleCharacters,
1.66 + TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter,
1.67 + const TArray<CnvUtilities::SMethod>& aArrayOfAdditionalMethods);
1.68 +
1.69 +private:
1.70 + //static TInt DoConvertToUnicode(TDes16& aUnicode, const TDesC8& aForeign,
1.71 + // TInt& aNumberOfUnconvertibleCharacters,
1.72 + // TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter) ;
1.73 + //
1.74 + //static TInt DoConvertFromUnicode(const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
1.75 + // TDes8& aForeign, const TDesC16& aUnicode, CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters) ;
1.76 +
1.77 + static TInt DoConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
1.78 + const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
1.79 + TDes8& aForeign,
1.80 + const TDesC16& aUnicode,
1.81 + CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters,
1.82 + const TArray<CnvUtilities::SCharacterSet>* aArrayOfAdditionalCharacterSets);
1.83 + static TInt DoConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
1.84 + TDes16& aUnicode,
1.85 + const TDesC8& aForeign,
1.86 + TInt& aNumberOfUnconvertibleCharacters,
1.87 + TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter,
1.88 + const TArray<CnvUtilities::SMethod>* aArrayOfAdditionalMethods);
1.89 + static void DummyConvertFromIntermediateBufferInPlace(TInt aStartPositionInDescriptor,
1.90 + TDes8& aDescriptor,
1.91 + TInt& aNumberOfCharactersThatDroppedOut);
1.92 + static void ConvertFromJisX0208ToShiftJisInPlace(TInt aStartPositionInDescriptor,
1.93 + TDes8& aDescriptor,
1.94 + TInt& aNumberOfCharactersThatDroppedOut);
1.95 + static TInt NumberOfBytesAbleToConvertToJisX0201(const TDesC8& aDescriptor);
1.96 + static TInt NumberOfBytesAbleToConvertToJisX0208(const TDesC8& aDescriptor);
1.97 + static void DummyConvertToIntermediateBufferInPlace(TDes8& aDescriptor);
1.98 + static void ConvertToJisX0208FromShiftJisInPlace(TDes8& aDescriptor);
1.99 +private:
1.100 + friend class TCombinedArrayOfCharacterSets;
1.101 + friend class TCombinedArrayOfMethods;
1.102 + };
1.103 +
1.104 +#endif
1.105 +