1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/chardet/public/nsDetectionConfident.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 +#ifndef nsDetetctionConfident_h__ 1.9 +#define nsDetetctionConfident_h__ 1.10 + 1.11 +/* 1.12 + This type is used to indicate how confident the detection module about 1.13 + the return result. 1.14 + 1.15 + eNoAnswerYet is used to indicate that the detector have not find out a 1.16 + answer yet based on the data it received. 1.17 + eBestAnswer is used to indicate that the answer the detector returned 1.18 + is the best one within the knowledge of the detector. 1.19 + In other words, the test to all other candidcates fail. 1.20 + 1.21 + For example, the (Shift_JIS/EUC-JP/ISO-2022-JP) detection 1.22 + module may return this with answer "Shift_JIS "if it receive 1.23 + bytes > 0x80 (which make ISO-2022-JP test failed) and byte 1.24 + 0x82 (which may EUC-JP test failed) 1.25 + 1.26 + eSureAnswer is used to indicate that the detector is 100% sure about the 1.27 + answer. 1.28 + Exmaple 1; the Shift_JIS/ISO-2022-JP/EUC-JP detector return 1.29 + this w/ ISO-2022-JP when it hit one of the following ESC seq 1.30 + ESC ( J 1.31 + ESC $ @ 1.32 + ESC $ B 1.33 + Example 2: the detector which can detect UCS2 return w/ UCS2 1.34 + when the first 2 byte are BOM mark. 1.35 + Example 3: the Korean detector return ISO-2022-KR when it 1.36 + hit ESC $ ) C 1.37 + 1.38 + */ 1.39 +typedef enum { 1.40 + eNoAnswerYet = 0, 1.41 + eBestAnswer, 1.42 + eSureAnswer, 1.43 + eNoAnswerMatch 1.44 +} nsDetectionConfident; 1.45 + 1.46 +#endif /* nsDetetctionConfident_h__ */