sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
#if !defined(__SHIFTJIS_H__)
|
sl@0
|
22 |
#define __SHIFTJIS_H__
|
sl@0
|
23 |
|
sl@0
|
24 |
#if !defined(__E32STD_H__)
|
sl@0
|
25 |
#include <e32std.h>
|
sl@0
|
26 |
#endif
|
sl@0
|
27 |
|
sl@0
|
28 |
#if !defined(__CHARCONV_H__)
|
sl@0
|
29 |
#include <charconv.h>
|
sl@0
|
30 |
#endif
|
sl@0
|
31 |
|
sl@0
|
32 |
#if !defined(__CONVUTILS_H__)
|
sl@0
|
33 |
#include <convutils.h>
|
sl@0
|
34 |
#endif
|
sl@0
|
35 |
|
sl@0
|
36 |
class CnvShiftJis
|
sl@0
|
37 |
/**
|
sl@0
|
38 |
only to be used by CHARCONV plug-in DLLs and by locale-DLLs (Locl::FatUtilityFunctions)
|
sl@0
|
39 |
@internalComponent
|
sl@0
|
40 |
*/
|
sl@0
|
41 |
{
|
sl@0
|
42 |
public:
|
sl@0
|
43 |
IMPORT_C static const TDesC8& ReplacementForUnconvertibleUnicodeCharacters();
|
sl@0
|
44 |
IMPORT_C static TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
|
sl@0
|
45 |
const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
|
sl@0
|
46 |
TDes8& aForeign, const TDesC16& aUnicode,
|
sl@0
|
47 |
CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters);
|
sl@0
|
48 |
|
sl@0
|
49 |
IMPORT_C static TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
|
sl@0
|
50 |
const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
|
sl@0
|
51 |
TDes8& aForeign, const TDesC16& aUnicode,
|
sl@0
|
52 |
CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters,
|
sl@0
|
53 |
const TArray<CnvUtilities::SCharacterSet>& aArrayOfAdditionalCharacterSets);
|
sl@0
|
54 |
|
sl@0
|
55 |
IMPORT_C static TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
|
sl@0
|
56 |
TDes16& aUnicode, const TDesC8& aForeign,
|
sl@0
|
57 |
TInt& aNumberOfUnconvertibleCharacters,
|
sl@0
|
58 |
TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter);
|
sl@0
|
59 |
|
sl@0
|
60 |
IMPORT_C static TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
|
sl@0
|
61 |
TDes16& aUnicode, const TDesC8& aForeign,
|
sl@0
|
62 |
TInt& aNumberOfUnconvertibleCharacters,
|
sl@0
|
63 |
TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter,
|
sl@0
|
64 |
const TArray<CnvUtilities::SMethod>& aArrayOfAdditionalMethods);
|
sl@0
|
65 |
|
sl@0
|
66 |
private:
|
sl@0
|
67 |
//static TInt DoConvertToUnicode(TDes16& aUnicode, const TDesC8& aForeign,
|
sl@0
|
68 |
// TInt& aNumberOfUnconvertibleCharacters,
|
sl@0
|
69 |
// TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter) ;
|
sl@0
|
70 |
//
|
sl@0
|
71 |
//static TInt DoConvertFromUnicode(const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
|
sl@0
|
72 |
// TDes8& aForeign, const TDesC16& aUnicode, CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters) ;
|
sl@0
|
73 |
|
sl@0
|
74 |
static TInt DoConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
|
sl@0
|
75 |
const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
|
sl@0
|
76 |
TDes8& aForeign,
|
sl@0
|
77 |
const TDesC16& aUnicode,
|
sl@0
|
78 |
CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters,
|
sl@0
|
79 |
const TArray<CnvUtilities::SCharacterSet>* aArrayOfAdditionalCharacterSets);
|
sl@0
|
80 |
static TInt DoConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
|
sl@0
|
81 |
TDes16& aUnicode,
|
sl@0
|
82 |
const TDesC8& aForeign,
|
sl@0
|
83 |
TInt& aNumberOfUnconvertibleCharacters,
|
sl@0
|
84 |
TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter,
|
sl@0
|
85 |
const TArray<CnvUtilities::SMethod>* aArrayOfAdditionalMethods);
|
sl@0
|
86 |
static void DummyConvertFromIntermediateBufferInPlace(TInt aStartPositionInDescriptor,
|
sl@0
|
87 |
TDes8& aDescriptor,
|
sl@0
|
88 |
TInt& aNumberOfCharactersThatDroppedOut);
|
sl@0
|
89 |
static void ConvertFromJisX0208ToShiftJisInPlace(TInt aStartPositionInDescriptor,
|
sl@0
|
90 |
TDes8& aDescriptor,
|
sl@0
|
91 |
TInt& aNumberOfCharactersThatDroppedOut);
|
sl@0
|
92 |
static TInt NumberOfBytesAbleToConvertToJisX0201(const TDesC8& aDescriptor);
|
sl@0
|
93 |
static TInt NumberOfBytesAbleToConvertToJisX0208(const TDesC8& aDescriptor);
|
sl@0
|
94 |
static void DummyConvertToIntermediateBufferInPlace(TDes8& aDescriptor);
|
sl@0
|
95 |
static void ConvertToJisX0208FromShiftJisInPlace(TDes8& aDescriptor);
|
sl@0
|
96 |
private:
|
sl@0
|
97 |
friend class TCombinedArrayOfCharacterSets;
|
sl@0
|
98 |
friend class TCombinedArrayOfMethods;
|
sl@0
|
99 |
};
|
sl@0
|
100 |
|
sl@0
|
101 |
#endif
|
sl@0
|
102 |
|