Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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/. */
6 #ifndef nsMBCSGroupProber_h__
7 #define nsMBCSGroupProber_h__
9 #include "nsSJISProber.h"
10 #include "nsUTF8Prober.h"
11 #include "nsEUCJPProber.h"
12 #include "nsGB2312Prober.h"
13 #include "nsEUCKRProber.h"
14 #include "nsBig5Prober.h"
15 #include "nsEUCTWProber.h"
17 #define NUM_OF_PROBERS 7
19 class nsMBCSGroupProber: public nsCharSetProber {
20 public:
21 nsMBCSGroupProber(uint32_t aLanguageFilter);
22 virtual ~nsMBCSGroupProber();
23 nsProbingState HandleData(const char* aBuf, uint32_t aLen);
24 const char* GetCharSetName();
25 nsProbingState GetState(void) {return mState;}
26 void Reset(void);
27 float GetConfidence(void);
29 #ifdef DEBUG_chardet
30 void DumpStatus();
31 #endif
32 #ifdef DEBUG_jgmyers
33 void GetDetectorState(nsUniversalDetector::DetectorState (&states)[nsUniversalDetector::NumDetectors], uint32_t &offset);
34 #endif
36 protected:
37 nsProbingState mState;
38 nsCharSetProber* mProbers[NUM_OF_PROBERS];
39 bool mIsActive[NUM_OF_PROBERS];
40 int32_t mBestGuess;
41 uint32_t mActiveNum;
42 uint32_t mKeepNext;
43 };
45 #endif /* nsMBCSGroupProber_h__ */