|
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 #ifndef nsDetetctionConfident_h__ |
|
6 #define nsDetetctionConfident_h__ |
|
7 |
|
8 /* |
|
9 This type is used to indicate how confident the detection module about |
|
10 the return result. |
|
11 |
|
12 eNoAnswerYet is used to indicate that the detector have not find out a |
|
13 answer yet based on the data it received. |
|
14 eBestAnswer is used to indicate that the answer the detector returned |
|
15 is the best one within the knowledge of the detector. |
|
16 In other words, the test to all other candidcates fail. |
|
17 |
|
18 For example, the (Shift_JIS/EUC-JP/ISO-2022-JP) detection |
|
19 module may return this with answer "Shift_JIS "if it receive |
|
20 bytes > 0x80 (which make ISO-2022-JP test failed) and byte |
|
21 0x82 (which may EUC-JP test failed) |
|
22 |
|
23 eSureAnswer is used to indicate that the detector is 100% sure about the |
|
24 answer. |
|
25 Exmaple 1; the Shift_JIS/ISO-2022-JP/EUC-JP detector return |
|
26 this w/ ISO-2022-JP when it hit one of the following ESC seq |
|
27 ESC ( J |
|
28 ESC $ @ |
|
29 ESC $ B |
|
30 Example 2: the detector which can detect UCS2 return w/ UCS2 |
|
31 when the first 2 byte are BOM mark. |
|
32 Example 3: the Korean detector return ISO-2022-KR when it |
|
33 hit ESC $ ) C |
|
34 |
|
35 */ |
|
36 typedef enum { |
|
37 eNoAnswerYet = 0, |
|
38 eBestAnswer, |
|
39 eSureAnswer, |
|
40 eNoAnswerMatch |
|
41 } nsDetectionConfident; |
|
42 |
|
43 #endif /* nsDetetctionConfident_h__ */ |