From 35baea42d794bec1fd5f2200f1f6f48877c5c26c Mon Sep 17 00:00:00 2001 From: Leo Uino Date: Thu, 14 Jul 2011 11:06:47 +0900 Subject: First attempt at parsing --- lpg/libqr/qr/bitmap.h | 2 ++ lpg/libqr/qr/code.h | 5 ----- lpg/libqr/qr/parse.h | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 lpg/libqr/qr/parse.h (limited to 'lpg/libqr/qr') diff --git a/lpg/libqr/qr/bitmap.h b/lpg/libqr/qr/bitmap.h index 83e82ab..36c56b3 100644 --- a/lpg/libqr/qr/bitmap.h +++ b/lpg/libqr/qr/bitmap.h @@ -11,6 +11,8 @@ struct qr_bitmap { struct qr_bitmap * qr_bitmap_create(int width, int height, int masked); void qr_bitmap_destroy(struct qr_bitmap *); +int qr_bitmap_add_mask(struct qr_bitmap *); + struct qr_bitmap * qr_bitmap_clone(const struct qr_bitmap *); void qr_bitmap_merge(struct qr_bitmap * dest, const struct qr_bitmap * src); diff --git a/lpg/libqr/qr/code.h b/lpg/libqr/qr/code.h index ac3c363..2392467 100644 --- a/lpg/libqr/qr/code.h +++ b/lpg/libqr/qr/code.h @@ -17,11 +17,6 @@ int qr_code_width(const struct qr_code *); size_t qr_code_total_capacity(int version); -struct qr_code * qr_code_parse(const void * buffer, - size_t line_bits, - size_t line_stride, - size_t line_count); - struct qr_bitmap * qr_mask_apply(const struct qr_bitmap * orig, unsigned int mask); diff --git a/lpg/libqr/qr/parse.h b/lpg/libqr/qr/parse.h new file mode 100644 index 0000000..d7b8c4e --- /dev/null +++ b/lpg/libqr/qr/parse.h @@ -0,0 +1,16 @@ +#ifndef QR_PARSE_H +#define QR_PARSE_H + +#include "data.h" + +int qr_code_parse(const void * buffer, + size_t line_bits, + size_t line_stride, + size_t line_count, + struct qr_data ** data); + +int qr_decode_format(unsigned bits, enum qr_ec_level * ec, int * mask); +int qr_decode_version(unsigned long bits, int * version); + +#endif + -- cgit v1.2.3-70-g09d2