aboutsummaryrefslogtreecommitdiff
path: root/lpg/libqr/qr/code.h
diff options
context:
space:
mode:
Diffstat (limited to 'lpg/libqr/qr/code.h')
-rw-r--r--lpg/libqr/qr/code.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/lpg/libqr/qr/code.h b/lpg/libqr/qr/code.h
new file mode 100644
index 0000000..6ae1aa9
--- /dev/null
+++ b/lpg/libqr/qr/code.h
@@ -0,0 +1,35 @@
+#ifndef QR_CODE_H
+#define QR_CODE_H
+
+#include <stddef.h>
+#include "types.h"
+
+enum qr_ec_level {
+ QR_EC_LEVEL_L,
+ QR_EC_LEVEL_M,
+ QR_EC_LEVEL_Q,
+ QR_EC_LEVEL_H
+};
+
+struct qr_code * qr_code_create(enum qr_ec_level ec,
+ const struct qr_data * data);
+
+void qr_code_destroy(struct qr_code *);
+
+int qr_code_width(const struct qr_code *);
+
+struct qr_code * qr_code_parse(const void * buffer,
+ size_t line_bits,
+ size_t line_stride,
+ size_t line_count);
+
+void qr_code_render(const struct qr_code * code,
+ void * buffer,
+ size_t mod_bits,
+ size_t line_stride,
+ size_t line_repeat,
+ unsigned long mark,
+ unsigned long space);
+
+#endif
+