Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fxbarcode / src / include / BC_ErrorCorrection.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_ERRORCORRECTION_H_\r
8 #define _BC_ERRORCORRECTION_H_\r
9 class CBC_SymbolInfo;\r
10 class CBC_ErrorCorrection;\r
11 class CBC_ErrorCorrection : public CFX_Object\r
12 {\r
13 public:\r
14     CBC_ErrorCorrection();\r
15     virtual ~CBC_ErrorCorrection();\r
16     static void Initialize();\r
17     static void Finalize();\r
18     static CFX_WideString encodeECC200(CFX_WideString codewords, CBC_SymbolInfo* symbolInfo, FX_INT32 &e);\r
19 private:\r
20     static FX_INT32 FACTOR_SETS[];\r
21     static FX_INT32 FACTORS[][100];\r
22     static FX_INT32 MODULO_VALUE;\r
23     static FX_INT32 LOG[256];\r
24     static FX_INT32 ALOG[256];\r
25 private:\r
26     static CFX_WideString createECCBlock(CFX_WideString codewords, FX_INT32 numECWords, FX_INT32 &e);\r
27     static CFX_WideString createECCBlock(CFX_WideString codewords, FX_INT32 start, FX_INT32 len, FX_INT32 numECWords, FX_INT32 &e);\r
28 };\r
29 #endif\r