Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/extensions/universalchardet/src/base/nsMBCSGroupProber.h
Line
Count
Source (jump to first uncovered line)
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/. */
5
6
#ifndef nsMBCSGroupProber_h__
7
#define nsMBCSGroupProber_h__
8
9
#include "nsSJISProber.h"
10
#include "nsUTF8Prober.h"
11
#include "nsEUCJPProber.h"
12
13
0
#define NUM_OF_PROBERS    3
14
15
class nsMBCSGroupProber: public nsCharSetProber {
16
public:
17
  nsMBCSGroupProber();
18
  virtual ~nsMBCSGroupProber();
19
  nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
20
  const char* GetCharSetName() override;
21
0
  nsProbingState GetState(void) override {return mState;}
22
  void      Reset(void) override;
23
  float     GetConfidence(void) override;
24
25
#ifdef DEBUG_chardet
26
  void  DumpStatus();
27
#endif
28
#ifdef DEBUG_jgmyers
29
  void GetDetectorState(nsUniversalDetector::DetectorState (&states)[nsUniversalDetector::NumDetectors], uint32_t &offset);
30
#endif
31
32
protected:
33
  nsProbingState mState;
34
  nsCharSetProber* mProbers[NUM_OF_PROBERS];
35
  bool            mIsActive[NUM_OF_PROBERS];
36
  int32_t mBestGuess;
37
  uint32_t mActiveNum;
38
  uint32_t mKeepNext;
39
};
40
41
#endif /* nsMBCSGroupProber_h__ */