xref: /aosp_15_r20/external/pdfium/fxbarcode/qrcode/BC_QRCoderECBlocks.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2014 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_QRCODERECBLOCKS_H_
8 #define FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_
9 
10 #include <stdint.h>
11 
12 struct CBC_QRCoderECBlockData;
13 
14 class CBC_QRCoderECBlocks {
15  public:
16   explicit CBC_QRCoderECBlocks(const CBC_QRCoderECBlockData& data);
17   ~CBC_QRCoderECBlocks();
18 
19   int32_t GetNumBlocks() const;
20   int32_t GetTotalECCodeWords() const;
21   int32_t GetTotalDataCodeWords() const;
22 
23  private:
24   int32_t GetECCodeWordsPerBlock() const;
25 
26   const CBC_QRCoderECBlockData& m_data;
27 };
28 
29 #endif  // FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_
30