Merge to XFA: Use stdint.h types throughout PDFium.
[pdfium.git] / xfa / src / fxbarcode / BC_Library.cpp
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 #include "barcode.h"\r
8 #include "BC_Reader.h"\r
9 #include "BC_UtilCodingConvert.h"\r
10 #include "BC_BinaryBitmap.h"\r
11 #include "BC_LuminanceSource.h"\r
12 #include "BC_BufferedImageLuminanceSource.h"\r
13 #include "BC_Binarizer.h"\r
14 #include "BC_Writer.h"\r
15 #include "BC_Dimension.h"\r
16 #include "BC_UtilCodingConvert.h"\r
17 #include "BC_ResultPoint.h"\r
18 #include "BC_BinaryBitmap.h"\r
19 #include "BC_DecoderResult.h"\r
20 #include "BC_TwoDimWriter.h"\r
21 #include "common/BC_GlobalHistogramBinarizer.h"\r
22 #include "common/BC_CommonBitMatrix.h"\r
23 #include "common/reedsolomon/BC_ReedSolomonGF256.h"\r
24 #include "common/BC_CommonByteMatrix.h"\r
25 #include "common/BC_CommonBitMatrix.h"\r
26 #include "common/BC_CommonBitArray.h"\r
27 #include "common/BC_CommonBitMatrix.h"\r
28 #include "common/BC_CommonDecoderResult.h"\r
29 #include "datamatrix/BC_DataMatrixVersion.h"\r
30 #include "datamatrix/BC_DataMatrixReader.h"\r
31 #include "datamatrix/BC_Encoder.h"\r
32 #include "datamatrix/BC_DefaultPlacement.h"\r
33 #include "datamatrix/BC_SymbolShapeHint.h"\r
34 #include "datamatrix/BC_SymbolInfo.h"\r
35 #include "datamatrix/BC_DataMatrixSymbolInfo144.h"\r
36 #include "datamatrix/BC_ErrorCorrection.h"\r
37 #include "datamatrix/BC_EncoderContext.h"\r
38 #include "datamatrix/BC_C40Encoder.h"\r
39 #include "datamatrix/BC_TextEncoder.h"\r
40 #include "datamatrix/BC_X12Encoder.h"\r
41 #include "datamatrix/BC_EdifactEncoder.h"\r
42 #include "datamatrix/BC_Base256Encoder.h"\r
43 #include "datamatrix/BC_ASCIIEncoder.h"\r
44 #include "datamatrix/BC_HighLevelEncoder.h"\r
45 #include "datamatrix/BC_DataMatrixWriter.h"\r
46 #include "oned/BC_OneDReader.h"\r
47 #include "oned/BC_OnedCode128Reader.h"\r
48 #include "oned/BC_OnedCode39Reader.h"\r
49 #include "oned/BC_OneDimReader.h"\r
50 #include "oned/BC_OnedEAN13Reader.h"\r
51 #include "oned/BC_OnedEAN8Reader.h"\r
52 #include "oned/BC_OnedUPCAReader.h"\r
53 #include "oned/BC_OnedCodaBarReader.h"\r
54 #include "oned/BC_OneDimWriter.h"\r
55 #include "oned/BC_OnedCode128Writer.h"\r
56 #include "oned/BC_OnedCode39Writer.h"\r
57 #include "oned/BC_OnedEAN13Writer.h"\r
58 #include "oned/BC_OnedEAN8Writer.h"\r
59 #include "oned/BC_OnedUPCAWriter.h"\r
60 #include "pdf417/BC_PDF417DetectorResult.h"\r
61 #include "pdf417/BC_PDF417Compaction.h"\r
62 #include "pdf417/BC_PDF417HighLevelEncoder.h"\r
63 #include "pdf417/BC_PDF417Detector.h"\r
64 #include "pdf417/BC_PDF417DetectorResult.h"\r
65 #include "pdf417/BC_PDF417Codeword.h"\r
66 #include "pdf417/BC_PDF417Common.h"\r
67 #include "pdf417/BC_PDF417BarcodeValue.h"\r
68 #include "pdf417/BC_PDF417BarcodeMetadata.h"\r
69 #include "pdf417/BC_PDF417BoundingBox.h"\r
70 #include "pdf417/BC_PDF417DetectionResultColumn.h"\r
71 #include "pdf417/BC_PDF417DetectionResultRowIndicatorColumn.h"\r
72 #include "pdf417/BC_PDF417DetectionResult.h"\r
73 #include "pdf417/BC_PDF417DecodedBitStreamParser.h"\r
74 #include "pdf417/BC_PDF417CodewordDecoder.h"\r
75 #include "pdf417/BC_PDF417DecodedBitStreamParser.h"\r
76 #include "pdf417/BC_PDF417ECModulusPoly.h"\r
77 #include "pdf417/BC_PDF417ECModulusGF.h"\r
78 #include "pdf417/BC_PDF417ECErrorCorrection.h"\r
79 #include "pdf417/BC_PDF417DecodedBitStreamParser.h"\r
80 #include "pdf417/BC_PDF417ScanningDecoder.h"\r
81 #include "pdf417/BC_PDF417Reader.h"\r
82 #include "qrcode/BC_QRCodeReader.h"\r
83 #include "qrcode/BC_QRCodeWriter.h"\r
84 #include "qrcode/BC_QRCoderErrorCorrectionLevel.h"\r
85 #include "qrcode/BC_QRCoderMode.h"\r
86 #include "qrcode/BC_QRCoderVersion.h"\r
87 #include "qrcode/BC_QRDataMask.h"\r
88 #include "qrcode/BC_QRDecodedBitStreamParser.h"\r
89 void BC_Library_Init()\r
90 {\r
91     CBC_QRCoderErrorCorrectionLevel::Initialize();\r
92     CBC_QRCoderMode::Initialize();\r
93     CBC_QRCoderVersion::Initialize();\r
94     CBC_QRDataMask::Initialize();\r
95     CBC_ReedSolomonGF256::Initialize();\r
96     CBC_DataMatrixVersion::Initialize();\r
97     CBC_SymbolInfo::Initialize();\r
98     CBC_ErrorCorrection::Initialize();\r
99     CBC_PDF417HighLevelEncoder::Initialize();\r
100     int32_t e = 0;\r
101     CBC_PDF417ECModulusGF::Initialize(e);\r
102     CBC_DecodedBitStreamPaser::Initialize();\r
103     CBC_PDF417CodewordDecoder::Initialize();\r
104     CBC_PDF417ECErrorCorrection::Initialize(e);\r
105     CBC_PDF417ScanningDecoder::Initialize();\r
106 }\r
107 void BC_Library_Destory()\r
108 {\r
109     CBC_QRCoderErrorCorrectionLevel::Finalize();\r
110     CBC_QRCoderMode::Finalize();\r
111     CBC_QRCoderVersion::Finalize();\r
112     CBC_QRDataMask::Finalize();\r
113     CBC_ReedSolomonGF256::Finalize();\r
114     CBC_DataMatrixVersion::Finalize();\r
115     CBC_SymbolInfo::Finalize();\r
116     CBC_ErrorCorrection::Finalize();\r
117     CBC_PDF417HighLevelEncoder::Finalize();\r
118     CBC_DecodedBitStreamPaser::Finalize();\r
119     CBC_PDF417CodewordDecoder::Finalize();\r
120     CBC_PDF417ECErrorCorrection::Finalize();\r
121     CBC_PDF417ECModulusGF::Finalize();\r
122     CBC_PDF417ScanningDecoder::Finalize();\r
123 }\r