diff options
author | Leo Howell <leo@lwh.jp> | 2009-11-14 20:24:57 +0900 |
---|---|---|
committer | Leo Howell <leo@lwh.jp> | 2009-11-14 20:24:57 +0900 |
commit | c2e4639d2ebefbeb7f8b7e1826ae2391c6876a5a (patch) | |
tree | 8f208b60816aa1f7390b249c21f0771a8bce7c6e /lpg/libqr/qr/data.h | |
parent | 2a5548351d9814a8a23eff1e43e14008ea4ae1d0 (diff) | |
download | pdf-simple-sign-c2e4639d2ebefbeb7f8b7e1826ae2391c6876a5a.tar.gz pdf-simple-sign-c2e4639d2ebefbeb7f8b7e1826ae2391c6876a5a.tar.xz pdf-simple-sign-c2e4639d2ebefbeb7f8b7e1826ae2391c6876a5a.zip |
Merge some files
Diffstat (limited to 'lpg/libqr/qr/data.h')
-rw-r--r-- | lpg/libqr/qr/data.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lpg/libqr/qr/data.h b/lpg/libqr/qr/data.h index 34b6968..a3bb309 100644 --- a/lpg/libqr/qr/data.h +++ b/lpg/libqr/qr/data.h @@ -22,6 +22,13 @@ enum qr_ec_level { QR_EC_LEVEL_H = 0x2 }; +struct qr_data { + int version; /* 1 ~ 40 */ + enum qr_ec_level ec; + struct qr_bitstream * bits; + size_t offset; +}; + struct qr_data * qr_create_data(int format, /* 1 ~ 40; 0=auto */ enum qr_ec_level ec, enum qr_data_type type, @@ -30,9 +37,11 @@ struct qr_data * qr_create_data(int format, /* 1 ~ 40; 0=auto */ void qr_free_data(struct qr_data *); -enum qr_data_type qr_get_data_type(const struct qr_data *); +enum qr_data_type qr_data_type(const struct qr_data *); -int qr_get_data_length(const struct qr_data *); +size_t qr_data_length(const struct qr_data *); +size_t qr_data_size_field_length(int version, enum qr_data_type); +size_t qr_data_dpart_length(enum qr_data_type type, size_t nchars); enum qr_data_type qr_parse_data(const struct qr_data * input, char ** output, |