Merge to XFA: Use stdint.h types throughout PDFium.
[pdfium.git] / xfa / src / fxbarcode / qrcode / BC_QRCoderVersion.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_QRCODERVERSION_H_\r
8 #define _BC_QRCODERVERSION_H_\r
9 class CBC_QRCoderECBlocks;\r
10 class CBC_CommonBitMatrix;\r
11 class CBC_QRCoderErrorCorrectionLevel;\r
12 class CBC_QRCoderVersion\r
13 {\r
14 private:\r
15     const static int32_t VERSION_DECODE_INFO[34];\r
16     static CFX_PtrArray *VERSION;\r
17     int32_t m_versionNumber;\r
18     int32_t m_totalCodeWords;\r
19     CFX_Int32Array m_alignmentPatternCenters;\r
20     CFX_PtrArray m_ecBlocks;\r
21 \r
22     CBC_QRCoderVersion();\r
23     CBC_QRCoderVersion(int32_t versionNumber, CBC_QRCoderECBlocks* ecBlocks1, CBC_QRCoderECBlocks* ecBlocks2,\r
24                        CBC_QRCoderECBlocks* ecBlocks3, CBC_QRCoderECBlocks* ecBlocks4);\r
25 public:\r
26     virtual ~CBC_QRCoderVersion();\r
27     static void Initialize();\r
28     static void Finalize();\r
29 \r
30     int32_t GetVersionNumber();\r
31     int32_t GetTotalCodeWords();\r
32     int32_t GetDimensionForVersion();\r
33     CBC_CommonBitMatrix *BuildFunctionPattern(int32_t &e);\r
34     CFX_Int32Array* GetAlignmentPatternCenters();\r
35     CBC_QRCoderECBlocks* GetECBlocksForLevel(CBC_QRCoderErrorCorrectionLevel *ecLevel);\r
36     static CBC_QRCoderVersion* GetVersionForNumber(int32_t versionNumber, int32_t &e);\r
37     static CBC_QRCoderVersion* GetProvisionalVersionForDimension(int32_t dimension, int32_t &e);\r
38     static CBC_QRCoderVersion* DecodeVersionInformation(int32_t versionBits, int32_t &e);\r
39     static void Destroy();\r
40 };\r
41 #endif\r