michael@0: /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #ifndef nsDetetctionConfident_h__ michael@0: #define nsDetetctionConfident_h__ michael@0: michael@0: /* michael@0: This type is used to indicate how confident the detection module about michael@0: the return result. michael@0: michael@0: eNoAnswerYet is used to indicate that the detector have not find out a michael@0: answer yet based on the data it received. michael@0: eBestAnswer is used to indicate that the answer the detector returned michael@0: is the best one within the knowledge of the detector. michael@0: In other words, the test to all other candidcates fail. michael@0: michael@0: For example, the (Shift_JIS/EUC-JP/ISO-2022-JP) detection michael@0: module may return this with answer "Shift_JIS "if it receive michael@0: bytes > 0x80 (which make ISO-2022-JP test failed) and byte michael@0: 0x82 (which may EUC-JP test failed) michael@0: michael@0: eSureAnswer is used to indicate that the detector is 100% sure about the michael@0: answer. michael@0: Exmaple 1; the Shift_JIS/ISO-2022-JP/EUC-JP detector return michael@0: this w/ ISO-2022-JP when it hit one of the following ESC seq michael@0: ESC ( J michael@0: ESC $ @ michael@0: ESC $ B michael@0: Example 2: the detector which can detect UCS2 return w/ UCS2 michael@0: when the first 2 byte are BOM mark. michael@0: Example 3: the Korean detector return ISO-2022-KR when it michael@0: hit ESC $ ) C michael@0: michael@0: */ michael@0: typedef enum { michael@0: eNoAnswerYet = 0, michael@0: eBestAnswer, michael@0: eSureAnswer, michael@0: eNoAnswerMatch michael@0: } nsDetectionConfident; michael@0: michael@0: #endif /* nsDetetctionConfident_h__ */