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_QRCODERVERSION_H_ | 7 #ifndef _BC_QRCODERVERSION_H_ |
8 #define _BC_QRCODERVERSION_H_ | 8 #define _BC_QRCODERVERSION_H_ |
9 class CBC_QRCoderECBlocks; | 9 class CBC_QRCoderECBlocks; |
10 class CBC_CommonBitMatrix; | 10 class CBC_CommonBitMatrix; |
11 class CBC_QRCoderErrorCorrectionLevel; | 11 class CBC_QRCoderErrorCorrectionLevel; |
12 class CBC_QRCoderVersion | 12 class CBC_QRCoderVersion |
13 { | 13 { |
14 private: | 14 private: |
15 const static FX_INT32 VERSION_DECODE_INFO[34]; | 15 const static int32_t VERSION_DECODE_INFO[34]; |
16 static CFX_PtrArray *VERSION; | 16 static CFX_PtrArray *VERSION; |
17 FX_INT32 m_versionNumber; | 17 int32_t m_versionNumber; |
18 FX_INT32 m_totalCodeWords; | 18 int32_t m_totalCodeWords; |
19 CFX_Int32Array m_alignmentPatternCenters; | 19 CFX_Int32Array m_alignmentPatternCenters; |
20 CFX_PtrArray m_ecBlocks; | 20 CFX_PtrArray m_ecBlocks; |
21 | 21 |
22 CBC_QRCoderVersion(); | 22 CBC_QRCoderVersion(); |
23 CBC_QRCoderVersion(FX_INT32 versionNumber, CBC_QRCoderECBlocks* ecBlocks1, C
BC_QRCoderECBlocks* ecBlocks2, | 23 CBC_QRCoderVersion(int32_t versionNumber, CBC_QRCoderECBlocks* ecBlocks1, CB
C_QRCoderECBlocks* ecBlocks2, |
24 CBC_QRCoderECBlocks* ecBlocks3, CBC_QRCoderECBlocks* ecBl
ocks4); | 24 CBC_QRCoderECBlocks* ecBlocks3, CBC_QRCoderECBlocks* ecBl
ocks4); |
25 public: | 25 public: |
26 virtual ~CBC_QRCoderVersion(); | 26 virtual ~CBC_QRCoderVersion(); |
27 static void Initialize(); | 27 static void Initialize(); |
28 static void Finalize(); | 28 static void Finalize(); |
29 | 29 |
30 FX_INT32 GetVersionNumber(); | 30 int32_t GetVersionNumber(); |
31 FX_INT32 GetTotalCodeWords(); | 31 int32_t GetTotalCodeWords(); |
32 FX_INT32 GetDimensionForVersion(); | 32 int32_t GetDimensionForVersion(); |
33 CBC_CommonBitMatrix *BuildFunctionPattern(FX_INT32 &e); | 33 CBC_CommonBitMatrix *BuildFunctionPattern(int32_t &e); |
34 CFX_Int32Array* GetAlignmentPatternCenters(); | 34 CFX_Int32Array* GetAlignmentPatternCenters(); |
35 CBC_QRCoderECBlocks* GetECBlocksForLevel(CBC_QRCoderErrorCorrectionLevel *ec
Level); | 35 CBC_QRCoderECBlocks* GetECBlocksForLevel(CBC_QRCoderErrorCorrectionLevel *ec
Level); |
36 static CBC_QRCoderVersion* GetVersionForNumber(FX_INT32 versionNumber, FX_IN
T32 &e); | 36 static CBC_QRCoderVersion* GetVersionForNumber(int32_t versionNumber, int32_
t &e); |
37 static CBC_QRCoderVersion* GetProvisionalVersionForDimension(FX_INT32 dimens
ion, FX_INT32 &e); | 37 static CBC_QRCoderVersion* GetProvisionalVersionForDimension(int32_t dimensi
on, int32_t &e); |
38 static CBC_QRCoderVersion* DecodeVersionInformation(FX_INT32 versionBits, FX
_INT32 &e); | 38 static CBC_QRCoderVersion* DecodeVersionInformation(int32_t versionBits, int
32_t &e); |
39 static void Destroy(); | 39 static void Destroy(); |
40 }; | 40 }; |
41 #endif | 41 #endif |
OLD | NEW |