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