|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 #ifndef nsReplacementToUnicode_h_ |
|
6 #define nsReplacementToUnicode_h_ |
|
7 |
|
8 #include "nsUCSupport.h" |
|
9 |
|
10 #define NS_REPLACEMENTTOUNICODE_CID \ |
|
11 { 0xd24b24da, 0xc607, 0x489a, \ |
|
12 { 0xb5, 0xf0, 0x67, 0x91, 0xf4, 0x45, 0x45, 0x6d } } |
|
13 |
|
14 #define NS_REPLACEMENTTOUNICODE_CONTRACTID \ |
|
15 "@mozilla.org/intl/unicode/decoder;1?charset=replacement" |
|
16 |
|
17 class nsReplacementToUnicode : public nsBasicDecoderSupport |
|
18 { |
|
19 public: |
|
20 nsReplacementToUnicode(); |
|
21 |
|
22 NS_IMETHOD Convert(const char* aSrc, |
|
23 int32_t* aSrcLength, |
|
24 char16_t* aDest, |
|
25 int32_t* aDestLength); |
|
26 |
|
27 NS_IMETHOD GetMaxLength(const char* aSrc, |
|
28 int32_t aSrcLength, |
|
29 int32_t* aDestLength); |
|
30 |
|
31 NS_IMETHOD Reset(); |
|
32 |
|
33 private: |
|
34 bool mSeenByte; |
|
35 }; |
|
36 |
|
37 #endif // nsReplacementToUnicode_h_ |