Merge to XFA: Use stdint.h types throughout PDFium.
[pdfium.git] / xfa / src / fxbarcode / qrcode / BC_QRDecodedBitStreamParser.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _BC_QRDECODEDBITSTREAMPARSER_H_\r
8 #define _BC_QRDECODEDBITSTREAMPARSER_H_\r
9 class CBC_CommonDecoderResult;\r
10 class CBC_QRCoderErrorCorrectionLevel;\r
11 class CBC_CommonBitSource;\r
12 class CBC_QRCoderVersion;\r
13 class CBC_CommonCharacterSetECI;\r
14 class CBC_QRDecodedBitStreamParser\r
15 {\r
16 private:\r
17     const static FX_CHAR ALPHANUMERIC_CHARS[45];\r
18     static FX_LPCSTR UTF_8;\r
19     CBC_QRDecodedBitStreamParser();\r
20 public:\r
21     virtual ~CBC_QRDecodedBitStreamParser();\r
22     static CBC_CommonDecoderResult* Decode(CFX_ByteArray *bytes, CBC_QRCoderVersion *version,\r
23                                            CBC_QRCoderErrorCorrectionLevel* ecLevel, int32_t byteModeDecode, int32_t &e);\r
24 \r
25     static const CFX_ByteString GuessEncoding(CFX_ByteArray* bytes);\r
26     static int32_t ParseECIValue(CBC_CommonBitSource* bits, int32_t &e);\r
27     static void DecodeGBKSegment(CBC_CommonBitSource* bits, CFX_ByteString &result, int32_t count, int32_t &e);\r
28     static void DecodeKanjiSegment(CBC_CommonBitSource* bits, CFX_ByteString &result, int32_t count, int32_t &e);\r
29     static void DecodeNumericSegment(CBC_CommonBitSource* bits, CFX_ByteString &result, int32_t count, int32_t &e);\r
30     static void DecodeAlphanumericSegment(CBC_CommonBitSource* bits, CFX_ByteString &result, int32_t count, FX_BOOL fac1InEffect, int32_t &e);\r
31     static void DecodeByteSegment(CBC_CommonBitSource* bits, CFX_ByteString &result, int32_t count, CBC_CommonCharacterSetECI *currentCharacterSetECI,\r
32                                   CFX_Int32Array *byteSegments, int32_t byteModeDecode, int32_t &e);\r
33 };\r
34 #endif\r