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
17namespace kencodingprober
18{
19class KCODECS_NO_EXPORT nsSBCSGroupProber : public nsCharSetProber
20{
21public:
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
33#ifdef DEBUG_PROBE
34 void DumpStatus() override;
35#endif
36
37protected:
38 nsProbingState mState;
39 nsCharSetProber *mProbers[NUM_OF_SBCS_PROBERS];
40 bool mIsActive[NUM_OF_SBCS_PROBERS];
41 int mBestGuess;
42 unsigned int mActiveNum;
43};
44}
45
46#endif /* nsSBCSGroupProber_h__ */
47

source code of kcodecs/src/probers/nsSBCSGroupProber.h