• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef FXBARCODE_QRCODE_BC_QRCODERECBLOCKSDATA_H_
8 #define FXBARCODE_QRCODE_BC_QRCODERECBLOCKSDATA_H_
9 
10 #include <stdint.h>
11 
12 #include <array>
13 
14 struct CBC_QRCoderECBlockData {
15   int32_t GetNumBlocks() const;
16   int32_t GetTotalECCodeWords() const;
17   int32_t GetTotalDataCodeWords() const;
18 
19   uint8_t ecCodeWordsPerBlock;
20   uint8_t count1;
21   uint8_t dataCodeWords1;
22   uint8_t count2;
23   uint8_t dataCodeWords2;
24 
25  private:
26   int32_t GetECCodeWordsPerBlock() const;
27 };
28 
29 using ECBlockDataRow = std::array<CBC_QRCoderECBlockData, 4>;
30 extern const std::array<const ECBlockDataRow, 40> kQRCoderECBDataTable;
31 
32 #endif  // FXBARCODE_QRCODE_BC_QRCODERECBLOCKSDATA_H_
33