aboutsummaryrefslogtreecommitdiff
path: root/lpg/libqr/qr
diff options
context:
space:
mode:
authorLeo Uino <leo@norisys.jp>2011-07-14 11:06:47 +0900
committerLeo Uino <leo@norisys.jp>2011-07-14 11:06:47 +0900
commit35baea42d794bec1fd5f2200f1f6f48877c5c26c (patch)
tree835460220763ca90bd17ed2c91999ebd28731ca7 /lpg/libqr/qr
parent44fc0ba93934ea9915fcd4f1902f49de57f2a949 (diff)
downloadpdf-simple-sign-35baea42d794bec1fd5f2200f1f6f48877c5c26c.tar.gz
pdf-simple-sign-35baea42d794bec1fd5f2200f1f6f48877c5c26c.tar.xz
pdf-simple-sign-35baea42d794bec1fd5f2200f1f6f48877c5c26c.zip
First attempt at parsing
Diffstat (limited to 'lpg/libqr/qr')
-rw-r--r--lpg/libqr/qr/bitmap.h2
-rw-r--r--lpg/libqr/qr/code.h5
-rw-r--r--lpg/libqr/qr/parse.h16
3 files changed, 18 insertions, 5 deletions
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
+