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: michael@0: #ifndef nsMBCSGroupProber_h__ michael@0: #define nsMBCSGroupProber_h__ michael@0: michael@0: #include "nsSJISProber.h" michael@0: #include "nsUTF8Prober.h" michael@0: #include "nsEUCJPProber.h" michael@0: #include "nsGB2312Prober.h" michael@0: #include "nsEUCKRProber.h" michael@0: #include "nsBig5Prober.h" michael@0: #include "nsEUCTWProber.h" michael@0: michael@0: #define NUM_OF_PROBERS 7 michael@0: michael@0: class nsMBCSGroupProber: public nsCharSetProber { michael@0: public: michael@0: nsMBCSGroupProber(uint32_t aLanguageFilter); michael@0: virtual ~nsMBCSGroupProber(); michael@0: nsProbingState HandleData(const char* aBuf, uint32_t aLen); michael@0: const char* GetCharSetName(); michael@0: nsProbingState GetState(void) {return mState;} michael@0: void Reset(void); michael@0: float GetConfidence(void); michael@0: michael@0: #ifdef DEBUG_chardet michael@0: void DumpStatus(); michael@0: #endif michael@0: #ifdef DEBUG_jgmyers michael@0: void GetDetectorState(nsUniversalDetector::DetectorState (&states)[nsUniversalDetector::NumDetectors], uint32_t &offset); michael@0: #endif michael@0: michael@0: protected: michael@0: nsProbingState mState; michael@0: nsCharSetProber* mProbers[NUM_OF_PROBERS]; michael@0: bool mIsActive[NUM_OF_PROBERS]; michael@0: int32_t mBestGuess; michael@0: uint32_t mActiveNum; michael@0: uint32_t mKeepNext; michael@0: }; michael@0: michael@0: #endif /* nsMBCSGroupProber_h__ */ michael@0: