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 7 #ifndef XFA_FXBARCODE_QRCODE_BC_QRCODEWRITER_H_ 8 #define XFA_FXBARCODE_QRCODE_BC_QRCODEWRITER_H_ 9 10 #include "xfa/fxbarcode/BC_TwoDimWriter.h" 11 12 class CBC_TwoDimWriter; 13 class CBC_QRCodeWriter : public CBC_TwoDimWriter { 14 public: 15 CBC_QRCodeWriter(); 16 ~CBC_QRCodeWriter() override; 17 18 uint8_t* Encode(const CFX_WideString& contents, 19 int32_t ecLevel, 20 int32_t& outWidth, 21 int32_t& outHeight, 22 int32_t& e); 23 uint8_t* Encode(const CFX_ByteString& contents, 24 BCFORMAT format, 25 int32_t& outWidth, 26 int32_t& outHeight, 27 int32_t hints, 28 int32_t& e); 29 uint8_t* Encode(const CFX_ByteString& contents, 30 BCFORMAT format, 31 int32_t& outWidth, 32 int32_t& outHeight, 33 int32_t& e); 34 bool SetVersion(int32_t version); 35 36 // CBC_TwoDimWriter 37 bool SetErrorCorrectionLevel(int32_t level) override; 38 39 static void ReleaseAll(); 40 41 private: 42 int32_t m_iVersion; 43 }; 44 45 #endif // XFA_FXBARCODE_QRCODE_BC_QRCODEWRITER_H_ 46