1 | /* |
2 | The Original Code is Mozilla Universal charset detector code. |
3 | |
4 | SPDX-FileCopyrightText: 2001 Netscape Communications Corporation |
5 | SPDX-FileContributor: Shy Shalom <shooshX@gmail.com> |
6 | |
7 | SPDX-License-Identifier: MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later |
8 | */ |
9 | |
10 | #ifndef nsSBCSGroupProber_h__ |
11 | #define nsSBCSGroupProber_h__ |
12 | |
13 | #include "nsCharSetProber.h" |
14 | |
15 | #define NUM_OF_SBCS_PROBERS 14 |
16 | |
17 | namespace kencodingprober |
18 | { |
19 | class KCODECS_NO_EXPORT nsSBCSGroupProber : public nsCharSetProber |
20 | { |
21 | public: |
22 | nsSBCSGroupProber(); |
23 | ~nsSBCSGroupProber() override; |
24 | nsProbingState HandleData(const char *aBuf, unsigned int aLen) override; |
25 | const char *GetCharSetName() override; |
26 | nsProbingState GetState(void) override |
27 | { |
28 | return mState; |
29 | } |
30 | void Reset(void) override; |
31 | float GetConfidence(void) override; |
32 | void SetOpion() override |
33 | { |
34 | } |
35 | |
36 | #ifdef DEBUG_PROBE |
37 | void DumpStatus() override; |
38 | #endif |
39 | |
40 | protected: |
41 | nsProbingState mState; |
42 | nsCharSetProber *mProbers[NUM_OF_SBCS_PROBERS]; |
43 | bool mIsActive[NUM_OF_SBCS_PROBERS]; |
44 | int mBestGuess; |
45 | unsigned int mActiveNum; |
46 | }; |
47 | } |
48 | |
49 | #endif /* nsSBCSGroupProber_h__ */ |
50 | |