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