diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2025-01-10 15:58:57 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2025-01-10 16:02:45 +0100 |
commit | 9319d14566e5d1bfec617c479b8543a9ee3ad4ea (patch) | |
tree | b0130ae9e5ac2932c88ff99b83c83d23126d91bc /lpg/libqr/qr/data.h | |
parent | 147b8805247ca23fb96e51694f78439ab24f93a2 (diff) | |
parent | ab64314222aca47dd7e52eca2d54d2fad0a58f6c (diff) | |
download | pdf-simple-sign-9319d14566e5d1bfec617c479b8543a9ee3ad4ea.tar.gz pdf-simple-sign-9319d14566e5d1bfec617c479b8543a9ee3ad4ea.tar.xz pdf-simple-sign-9319d14566e5d1bfec617c479b8543a9ee3ad4ea.zip |
Merge remote-tracking branch 'libqr/master'
Diffstat (limited to 'lpg/libqr/qr/data.h')
-rw-r--r-- | lpg/libqr/qr/data.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lpg/libqr/qr/data.h b/lpg/libqr/qr/data.h new file mode 100644 index 0000000..06600ab --- /dev/null +++ b/lpg/libqr/qr/data.h @@ -0,0 +1,41 @@ +#ifndef QR_DATA_H +#define QR_DATA_H + +#include <stddef.h> +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct qr_data { + int version; /* 1 ~ 40 */ + enum qr_ec_level ec; + struct qr_bitstream * bits; + size_t offset; +}; + +struct qr_data * qr_data_create(int format, /* 1 ~ 40; 0=auto */ + enum qr_ec_level ec, + enum qr_data_type type, + const char * input, + size_t length); + +void qr_data_destroy(struct qr_data *); + +enum qr_data_type qr_data_type(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, + size_t * length); + +#ifdef __cplusplus +} +#endif + +#endif + |