| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef XFA_SRC_FXBARCODE_QRCODE_BC_QRDECODEDBITSTREAMPARSER_H_ | |
| 8 #define XFA_SRC_FXBARCODE_QRCODE_BC_QRDECODEDBITSTREAMPARSER_H_ | |
| 9 | |
| 10 class CBC_CommonDecoderResult; | |
| 11 class CBC_QRCoderErrorCorrectionLevel; | |
| 12 class CBC_CommonBitSource; | |
| 13 class CBC_QRCoderVersion; | |
| 14 class CBC_CommonCharacterSetECI; | |
| 15 class CBC_QRDecodedBitStreamParser { | |
| 16 private: | |
| 17 static const FX_CHAR ALPHANUMERIC_CHARS[45]; | |
| 18 static const FX_CHAR* UTF_8; | |
| 19 CBC_QRDecodedBitStreamParser(); | |
| 20 | |
| 21 public: | |
| 22 virtual ~CBC_QRDecodedBitStreamParser(); | |
| 23 static CBC_CommonDecoderResult* Decode( | |
| 24 CFX_ByteArray* bytes, | |
| 25 CBC_QRCoderVersion* version, | |
| 26 CBC_QRCoderErrorCorrectionLevel* ecLevel, | |
| 27 int32_t byteModeDecode, | |
| 28 int32_t& e); | |
| 29 | |
| 30 static const CFX_ByteString GuessEncoding(CFX_ByteArray* bytes); | |
| 31 static int32_t ParseECIValue(CBC_CommonBitSource* bits, int32_t& e); | |
| 32 static void DecodeGBKSegment(CBC_CommonBitSource* bits, | |
| 33 CFX_ByteString& result, | |
| 34 int32_t count, | |
| 35 int32_t& e); | |
| 36 static void DecodeKanjiSegment(CBC_CommonBitSource* bits, | |
| 37 CFX_ByteString& result, | |
| 38 int32_t count, | |
| 39 int32_t& e); | |
| 40 static void DecodeNumericSegment(CBC_CommonBitSource* bits, | |
| 41 CFX_ByteString& result, | |
| 42 int32_t count, | |
| 43 int32_t& e); | |
| 44 static void DecodeAlphanumericSegment(CBC_CommonBitSource* bits, | |
| 45 CFX_ByteString& result, | |
| 46 int32_t count, | |
| 47 FX_BOOL fac1InEffect, | |
| 48 int32_t& e); | |
| 49 static void DecodeByteSegment( | |
| 50 CBC_CommonBitSource* bits, | |
| 51 CFX_ByteString& result, | |
| 52 int32_t count, | |
| 53 CBC_CommonCharacterSetECI* currentCharacterSetECI, | |
| 54 CFX_Int32Array* byteSegments, | |
| 55 int32_t byteModeDecode, | |
| 56 int32_t& e); | |
| 57 }; | |
| 58 | |
| 59 #endif // XFA_SRC_FXBARCODE_QRCODE_BC_QRDECODEDBITSTREAMPARSER_H_ | |
| OLD | NEW |