blob: 4ea7a7abd53fd346c2e2c3452fc6064e0694e67f [file] [log] [blame]
Dan Sinclair1770c022016-03-14 14:14:16 -04001// 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 Sinclaire7786682017-03-29 15:18:41 -04007#ifndef FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_
8#define FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_
Dan Sinclair1770c022016-03-14 14:14:16 -04009
Tom Sepez8b6186f2017-03-28 12:06:45 -070010#include <vector>
11
dsinclaira52ab742016-09-29 13:59:29 -070012#include "core/fxcrt/fx_basic.h"
Dan Sinclair1770c022016-03-14 14:14:16 -040013
Lei Zhang8a24b252017-04-06 14:23:26 -070014struct CBC_QRCoderECBlockData;
Dan Sinclair1770c022016-03-14 14:14:16 -040015
16class CBC_QRCoderECBlocks {
Dan Sinclair1770c022016-03-14 14:14:16 -040017 public:
Lei Zhang8a24b252017-04-06 14:23:26 -070018 explicit CBC_QRCoderECBlocks(const CBC_QRCoderECBlockData& data);
tsepezaef780d2016-04-28 14:56:27 -070019 ~CBC_QRCoderECBlocks();
20
tsepezaef780d2016-04-28 14:56:27 -070021 int32_t GetNumBlocks() const;
22 int32_t GetTotalECCodeWords() const;
Lei Zhang8a24b252017-04-06 14:23:26 -070023 int32_t GetTotalDataCodeWords() const;
tsepezaef780d2016-04-28 14:56:27 -070024
25 private:
Lei Zhang8a24b252017-04-06 14:23:26 -070026 int32_t GetECCodeWordsPerBlock() const;
27
28 const CBC_QRCoderECBlockData& m_data;
Dan Sinclair1770c022016-03-14 14:14:16 -040029};
30
Dan Sinclaire7786682017-03-29 15:18:41 -040031#endif // FXBARCODE_QRCODE_BC_QRCODERECBLOCKS_H_