aboutsummaryrefslogtreecommitdiff
path: root/lpg/libqr/qr
diff options
context:
space:
mode:
Diffstat (limited to 'lpg/libqr/qr')
-rw-r--r--lpg/libqr/qr/code.h7
-rw-r--r--lpg/libqr/qr/common.h14
-rw-r--r--lpg/libqr/qr/data.h18
-rw-r--r--lpg/libqr/qr/types.h18
4 files changed, 32 insertions, 25 deletions
diff --git a/lpg/libqr/qr/code.h b/lpg/libqr/qr/code.h
index 2392467..e6eb47c 100644
--- a/lpg/libqr/qr/code.h
+++ b/lpg/libqr/qr/code.h
@@ -13,12 +13,5 @@ struct qr_code * qr_code_create(const struct qr_data * data);
void qr_code_destroy(struct qr_code *);
-int qr_code_width(const struct qr_code *);
-
-size_t qr_code_total_capacity(int version);
-
-struct qr_bitmap * qr_mask_apply(const struct qr_bitmap * orig,
- unsigned int mask);
-
#endif
diff --git a/lpg/libqr/qr/common.h b/lpg/libqr/qr/common.h
new file mode 100644
index 0000000..9caf3e0
--- /dev/null
+++ b/lpg/libqr/qr/common.h
@@ -0,0 +1,14 @@
+#ifndef QR_COMMON_H
+#define QR_COMMON_H
+
+#include <qr/types.h>
+
+struct qr_bitmap * qr_mask_apply(const struct qr_bitmap * orig,
+ unsigned int mask);
+
+size_t qr_code_total_capacity(int version);
+
+int qr_code_width(const struct qr_code *);
+
+#endif
+
diff --git a/lpg/libqr/qr/data.h b/lpg/libqr/qr/data.h
index a3bb309..3cc665a 100644
--- a/lpg/libqr/qr/data.h
+++ b/lpg/libqr/qr/data.h
@@ -4,24 +4,6 @@
#include <stddef.h>
#include "types.h"
-enum qr_data_type {
- QR_DATA_INVALID = -1,
- QR_DATA_ECI = 7,
- QR_DATA_NUMERIC = 1,
- QR_DATA_ALPHA = 2,
- QR_DATA_8BIT = 4,
- QR_DATA_KANJI = 8, /* JIS X 0208 */
- QR_DATA_MIXED = 3,
- QR_DATA_FNC1 = 9
-};
-
-enum qr_ec_level {
- QR_EC_LEVEL_L = 0x1,
- QR_EC_LEVEL_M = 0x0,
- QR_EC_LEVEL_Q = 0x3,
- QR_EC_LEVEL_H = 0x2
-};
-
struct qr_data {
int version; /* 1 ~ 40 */
enum qr_ec_level ec;
diff --git a/lpg/libqr/qr/types.h b/lpg/libqr/qr/types.h
index bb44cde..3615e3e 100644
--- a/lpg/libqr/qr/types.h
+++ b/lpg/libqr/qr/types.h
@@ -4,5 +4,23 @@
struct qr_data;
struct qr_code;
+enum qr_data_type {
+ QR_DATA_INVALID = -1,
+ QR_DATA_ECI = 7,
+ QR_DATA_NUMERIC = 1,
+ QR_DATA_ALPHA = 2,
+ QR_DATA_8BIT = 4,
+ QR_DATA_KANJI = 8, /* JIS X 0208 */
+ QR_DATA_MIXED = 3,
+ QR_DATA_FNC1 = 9
+};
+
+enum qr_ec_level {
+ QR_EC_LEVEL_L = 0x1,
+ QR_EC_LEVEL_M = 0x0,
+ QR_EC_LEVEL_Q = 0x3,
+ QR_EC_LEVEL_H = 0x2
+};
+
#endif