os/textandloc/charconvfw/charconvplugins/inc/shiftjis.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2000-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 *
    16 */
    17 
    18 
    19 #if !defined(__SHIFTJIS_H__)
    20 #define __SHIFTJIS_H__
    21 
    22 #if !defined(__E32STD_H__)
    23 #include <e32std.h>
    24 #endif
    25 
    26 #if !defined(__CHARCONV_H__)
    27 #include <charconv.h>
    28 #endif
    29 
    30 #if !defined(__CONVUTILS_H__)
    31 #include <convutils.h>
    32 #endif
    33 
    34 class CnvShiftJis 
    35 /**
    36 only to be used by CHARCONV plug-in DLLs and by locale-DLLs (Locl::FatUtilityFunctions)
    37 @internalComponent
    38 */
    39 	{
    40 public:
    41 	IMPORT_C static const TDesC8& ReplacementForUnconvertibleUnicodeCharacters();
    42 	IMPORT_C static TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    43 	                                        const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, 
    44 	                                        TDes8& aForeign, const TDesC16& aUnicode, 
    45 	                                        CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters);
    46 	                                        
    47 	IMPORT_C static TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    48 	                                        const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, 
    49 	                                        TDes8& aForeign, const TDesC16& aUnicode, 
    50 	                                        CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters,
    51 	                                        const TArray<CnvUtilities::SCharacterSet>& aArrayOfAdditionalCharacterSets);
    52 	                                        
    53 	IMPORT_C static TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    54 	                                      TDes16& aUnicode, const TDesC8& aForeign, 
    55 	                                      TInt& aNumberOfUnconvertibleCharacters, 
    56 	                                      TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter);
    57 	                                      
    58 	IMPORT_C static TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    59 	                                      TDes16& aUnicode, const TDesC8& aForeign, 
    60 	                                      TInt& aNumberOfUnconvertibleCharacters, 
    61 	                                      TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter, 
    62 	                                      const TArray<CnvUtilities::SMethod>& aArrayOfAdditionalMethods);
    63 	
    64 private:
    65 
    66 	static TInt DoConvertToUnicode(TDes16& aUnicode, const TDesC8& aForeign, 
    67 	                               TInt& aNumberOfUnconvertibleCharacters, 
    68 	                               TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter) ;
    69 	                               
    70     static TInt DoConvertFromUnicode(const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, 
    71                                      TDes8& aForeign, const TDesC16& aUnicode, CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters) ;
    72 	};
    73 
    74 
    75 /** 
    76 Returns the single character (as one or more byte values) which is used by 
    77 default as the replacement for unconvertible Unicode characters. These byte 
    78 values are output when converting from Unicode into a foreign character set 
    79 for each Unicode character that has no equivalent in the foreign character 
    80 set.
    81 
    82 @return The single character which is used to replace unconvertible characters. 
    83 @internalComponent
    84 */
    85 GLREF_C const TDesC8& ReplacementForUnconvertibleUnicodeCharacters_internal();
    86 	
    87 #endif
    88