os/textandloc/charconvfw/charconvplugins/inc/SHIFTJIS_2.H
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 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 
    20 
    21 #if !defined(__SHIFTJIS_H__)
    22 #define __SHIFTJIS_H__
    23 
    24 #if !defined(__E32STD_H__)
    25 #include <e32std.h>
    26 #endif
    27 
    28 #if !defined(__CHARCONV_H__)
    29 #include <charconv.h>
    30 #endif
    31 
    32 #if !defined(__CONVUTILS_H__)
    33 #include <convutils.h>
    34 #endif
    35 
    36 class CnvShiftJis 
    37 /**
    38 only to be used by CHARCONV plug-in DLLs and by locale-DLLs (Locl::FatUtilityFunctions)
    39 @internalComponent
    40 */
    41     {
    42 public:
    43     IMPORT_C static const TDesC8& ReplacementForUnconvertibleUnicodeCharacters();
    44     IMPORT_C static TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    45                                             const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, 
    46                                             TDes8& aForeign, const TDesC16& aUnicode, 
    47                                             CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters);
    48                                             
    49     IMPORT_C static TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    50                                             const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, 
    51                                             TDes8& aForeign, const TDesC16& aUnicode, 
    52                                             CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters,
    53                                             const TArray<CnvUtilities::SCharacterSet>& aArrayOfAdditionalCharacterSets);
    54                                             
    55     IMPORT_C static TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    56                                           TDes16& aUnicode, const TDesC8& aForeign, 
    57                                           TInt& aNumberOfUnconvertibleCharacters, 
    58                                           TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter);
    59                                           
    60     IMPORT_C static TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    61                                           TDes16& aUnicode, const TDesC8& aForeign, 
    62                                           TInt& aNumberOfUnconvertibleCharacters, 
    63                                           TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter, 
    64                                           const TArray<CnvUtilities::SMethod>& aArrayOfAdditionalMethods);
    65     
    66 private:
    67     //static TInt DoConvertToUnicode(TDes16& aUnicode, const TDesC8& aForeign, 
    68     //                               TInt& aNumberOfUnconvertibleCharacters, 
    69     //                               TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter) ;
    70     //                               
    71     //static TInt DoConvertFromUnicode(const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, 
    72     //                                TDes8& aForeign, const TDesC16& aUnicode, CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters) ;
    73 
    74     static TInt DoConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    75                                      const TDesC8& aReplacementForUnconvertibleUnicodeCharacters, 
    76                                      TDes8& aForeign, 
    77                                      const TDesC16& aUnicode, 
    78                                      CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters, 
    79                                      const TArray<CnvUtilities::SCharacterSet>* aArrayOfAdditionalCharacterSets);
    80     static TInt DoConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, 
    81                                    TDes16& aUnicode, 
    82                                    const TDesC8& aForeign, 
    83                                    TInt& aNumberOfUnconvertibleCharacters, 
    84                                    TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter, 
    85                                    const TArray<CnvUtilities::SMethod>* aArrayOfAdditionalMethods);
    86     static void DummyConvertFromIntermediateBufferInPlace(TInt aStartPositionInDescriptor, 
    87                                                           TDes8& aDescriptor, 
    88                                                           TInt& aNumberOfCharactersThatDroppedOut);
    89     static void ConvertFromJisX0208ToShiftJisInPlace(TInt aStartPositionInDescriptor, 
    90                                                      TDes8& aDescriptor, 
    91                                                      TInt& aNumberOfCharactersThatDroppedOut);
    92     static TInt NumberOfBytesAbleToConvertToJisX0201(const TDesC8& aDescriptor);
    93     static TInt NumberOfBytesAbleToConvertToJisX0208(const TDesC8& aDescriptor);
    94     static void DummyConvertToIntermediateBufferInPlace(TDes8& aDescriptor);
    95     static void ConvertToJisX0208FromShiftJisInPlace(TDes8& aDescriptor);
    96 private:
    97     friend class TCombinedArrayOfCharacterSets;
    98     friend class TCombinedArrayOfMethods;
    99     };
   100 
   101 #endif
   102