| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef _BC_DATAMATRIXDECODEDBITSTREAMPARSER_H_ | 7 #ifndef _BC_DATAMATRIXDECODEDBITSTREAMPARSER_H_ |
| 8 #define _BC_DATAMATRIXDECODEDBITSTREAMPARSER_H_ | 8 #define _BC_DATAMATRIXDECODEDBITSTREAMPARSER_H_ |
| 9 class CBC_CommonDecoderResult; | 9 class CBC_CommonDecoderResult; |
| 10 class CBC_CommonBitSource; | 10 class CBC_CommonBitSource; |
| 11 class CBC_DataMatrixDecodedBitStreamParser | 11 class CBC_DataMatrixDecodedBitStreamParser |
| 12 { | 12 { |
| 13 public: | 13 public: |
| 14 CBC_DataMatrixDecodedBitStreamParser(); | 14 CBC_DataMatrixDecodedBitStreamParser(); |
| 15 virtual ~CBC_DataMatrixDecodedBitStreamParser(); | 15 virtual ~CBC_DataMatrixDecodedBitStreamParser(); |
| 16 static CBC_CommonDecoderResult *Decode(CFX_ByteArray &bytes, FX_INT32 &e); | 16 static CBC_CommonDecoderResult *Decode(CFX_ByteArray &bytes, int32_t &e); |
| 17 | 17 |
| 18 private: | 18 private: |
| 19 static FX_INT32 DecodeAsciiSegment(CBC_CommonBitSource *bits, CFX_ByteString
&result, CFX_ByteString &resultTrailer, FX_INT32 &e); | 19 static int32_t DecodeAsciiSegment(CBC_CommonBitSource *bits, CFX_ByteString
&result, CFX_ByteString &resultTrailer, int32_t &e); |
| 20 static void DecodeC40Segment(CBC_CommonBitSource *bits, CFX_ByteString &resu
lt, FX_INT32 &e); | 20 static void DecodeC40Segment(CBC_CommonBitSource *bits, CFX_ByteString &resu
lt, int32_t &e); |
| 21 static void DecodeTextSegment(CBC_CommonBitSource *bits, CFX_ByteString &res
ult, FX_INT32 &e); | 21 static void DecodeTextSegment(CBC_CommonBitSource *bits, CFX_ByteString &res
ult, int32_t &e); |
| 22 static void DecodeAnsiX12Segment(CBC_CommonBitSource *bits, CFX_ByteString &
result, FX_INT32 &e); | 22 static void DecodeAnsiX12Segment(CBC_CommonBitSource *bits, CFX_ByteString &
result, int32_t &e); |
| 23 static void ParseTwoBytes(FX_INT32 firstByte, FX_INT32 secondByte, CFX_Int32
Array &result); | 23 static void ParseTwoBytes(int32_t firstByte, int32_t secondByte, CFX_Int32Ar
ray &result); |
| 24 static void DecodeEdifactSegment(CBC_CommonBitSource *bits, CFX_ByteString &
result, FX_INT32 &e); | 24 static void DecodeEdifactSegment(CBC_CommonBitSource *bits, CFX_ByteString &
result, int32_t &e); |
| 25 static void DecodeBase256Segment(CBC_CommonBitSource *bits, CFX_ByteString &
result, CFX_Int32Array &byteSegments, FX_INT32 &e); | 25 static void DecodeBase256Segment(CBC_CommonBitSource *bits, CFX_ByteString &
result, CFX_Int32Array &byteSegments, int32_t &e); |
| 26 static FX_BYTE Unrandomize255State(FX_INT32 randomizedBase256Codeword, FX_IN
T32 base256CodewordPosition); | 26 static uint8_t Unrandomize255State(int32_t randomizedBase256Codeword, int32_
t base256CodewordPosition); |
| 27 | 27 |
| 28 const static FX_CHAR C40_BASIC_SET_CHARS[]; | 28 const static FX_CHAR C40_BASIC_SET_CHARS[]; |
| 29 const static FX_CHAR C40_SHIFT2_SET_CHARS[]; | 29 const static FX_CHAR C40_SHIFT2_SET_CHARS[]; |
| 30 | 30 |
| 31 | 31 |
| 32 const static FX_CHAR TEXT_BASIC_SET_CHARS[]; | 32 const static FX_CHAR TEXT_BASIC_SET_CHARS[]; |
| 33 const static FX_CHAR TEXT_SHIFT3_SET_CHARS[]; | 33 const static FX_CHAR TEXT_SHIFT3_SET_CHARS[]; |
| 34 const static FX_INT32 PAD_ENCODE; | 34 const static int32_t PAD_ENCODE; |
| 35 const static FX_INT32 ASCII_ENCODE; | 35 const static int32_t ASCII_ENCODE; |
| 36 const static FX_INT32 C40_ENCODE; | 36 const static int32_t C40_ENCODE; |
| 37 const static FX_INT32 TEXT_ENCODE; | 37 const static int32_t TEXT_ENCODE; |
| 38 const static FX_INT32 ANSIX12_ENCODE; | 38 const static int32_t ANSIX12_ENCODE; |
| 39 const static FX_INT32 EDIFACT_ENCODE; | 39 const static int32_t EDIFACT_ENCODE; |
| 40 const static FX_INT32 BASE256_ENCODE; | 40 const static int32_t BASE256_ENCODE; |
| 41 }; | 41 }; |
| 42 #endif | 42 #endif |
| OLD | NEW |