Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 1 | // Copyright 2014 PDFium Authors. All rights reserved. |
| 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 | |
Dan Sinclair | e778668 | 2017-03-29 15:18:41 -0400 | [diff] [blame] | 7 | #ifndef FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_ |
| 8 | #define FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_ |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 9 | |
Tom Sepez | 8b6186f | 2017-03-28 12:06:45 -0700 | [diff] [blame] | 10 | #include <vector> |
| 11 | |
dsinclair | a52ab74 | 2016-09-29 13:59:29 -0700 | [diff] [blame] | 12 | #include "core/fxcrt/fx_basic.h" |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 13 | |
Lei Zhang | 8a24b25 | 2017-04-06 14:23:26 -0700 | [diff] [blame^] | 14 | struct CBC_QRCoderECBlockData; |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 15 | |
| 16 | class CBC_QRCoderECBlocks { |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 17 | public: |
Lei Zhang | 8a24b25 | 2017-04-06 14:23:26 -0700 | [diff] [blame^] | 18 | explicit CBC_QRCoderECBlocks(const CBC_QRCoderECBlockData& data); |
tsepez | aef780d | 2016-04-28 14:56:27 -0700 | [diff] [blame] | 19 | ~CBC_QRCoderECBlocks(); |
| 20 | |
tsepez | aef780d | 2016-04-28 14:56:27 -0700 | [diff] [blame] | 21 | int32_t GetNumBlocks() const; |
| 22 | int32_t GetTotalECCodeWords() const; |
Lei Zhang | 8a24b25 | 2017-04-06 14:23:26 -0700 | [diff] [blame^] | 23 | int32_t GetTotalDataCodeWords() const; |
tsepez | aef780d | 2016-04-28 14:56:27 -0700 | [diff] [blame] | 24 | |
| 25 | private: |
Lei Zhang | 8a24b25 | 2017-04-06 14:23:26 -0700 | [diff] [blame^] | 26 | int32_t GetECCodeWordsPerBlock() const; |
| 27 | |
| 28 | const CBC_QRCoderECBlockData& m_data; |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 29 | }; |
| 30 | |
Dan Sinclair | e778668 | 2017-03-29 15:18:41 -0400 | [diff] [blame] | 31 | #endif // FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_ |