Barcode-ZBar
view release on metacpan or search on metacpan
int val;
PPCODE:
if(zbar_parse_config(config_string, &sym, &cfg, &val))
croak("invalid configuration setting: %s", config_string);
EXTEND(SP, 3);
PUSHs(LOOKUP_ENUM(symbol_type, sym));
PUSHs(LOOKUP_ENUM(config, cfg));
mPUSHi(val);
MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Error PREFIX = zbar_
BOOT:
{
HV *stash = gv_stashpv("Barcode::ZBar::Error", TRUE);
LOOKUP_zbar_error_t = newAV();
CONSTANT(error, ERR_, NOMEM, "out of memory");
CONSTANT(error, ERR_, INTERNAL, "internal library error");
CONSTANT(error, ERR_, UNSUPPORTED, "unsupported request");
CONSTANT(error, ERR_, INVALID, "invalid request");
CONSTANT(error, ERR_, SYSTEM, "system error");
CONSTANT(error, ERR_, LOCKING, "locking error");
CONSTANT(error, ERR_, BUSY, "all resources busy");
CONSTANT(error, ERR_, XDISPLAY, "X11 display error");
CONSTANT(error, ERR_, XPROTO, "X11 protocol error");
CONSTANT(error, ERR_, CLOSED, "output window is closed");
CONSTANT(error, ERR_, WINAPI, "windows system error");
}
zbar_error_t
get_error_code(err)
Barcode::ZBar::Error err
CODE:
RETVAL = _zbar_get_error_code(err);
OUTPUT:
RETVAL
const char *
error_string(err)
Barcode::ZBar::Error err
CODE:
RETVAL = _zbar_error_string(err, 1);
OUTPUT:
RETVAL
MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Config PREFIX = zbar_config_
BOOT:
{
HV *stash = gv_stashpv("Barcode::ZBar::Config", TRUE);
LOOKUP_zbar_config_t = newAV();
CONSTANT(config, CFG_, ENABLE, "enable");
CONSTANT(config, CFG_, ADD_CHECK, "add-check");
CONSTANT(config, CFG_, EMIT_CHECK, "emit-check");
CONSTANT(config, CFG_, ASCII, "ascii");
CONSTANT(config, CFG_, MIN_LEN, "min-length");
CONSTANT(config, CFG_, MAX_LEN, "max-length");
CONSTANT(config, CFG_, UNCERTAINTY, "uncertainty");
CONSTANT(config, CFG_, POSITION, "position");
CONSTANT(config, CFG_, X_DENSITY, "x-density");
CONSTANT(config, CFG_, Y_DENSITY, "y-density");
}
MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Modifier PREFIX = zbar_mod_
BOOT:
{
HV *stash = gv_stashpv("Barcode::ZBar::Modifier", TRUE);
LOOKUP_zbar_modifier_t = newAV();
CONSTANT(modifier, MOD_, GS1, "GS1");
CONSTANT(modifier, MOD_, AIM, "AIM");
}
MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Orient PREFIX = zbar_orientation_
BOOT:
{
HV *stash = gv_stashpv("Barcode::ZBar::Orient", TRUE);
LOOKUP_zbar_orientation_t = newAV();
CONSTANT(orientation, ORIENT_, UNKNOWN, "UNKNOWN");
CONSTANT(orientation, ORIENT_, UP, "UP");
CONSTANT(orientation, ORIENT_, RIGHT, "RIGHT");
CONSTANT(orientation, ORIENT_, DOWN, "DOWN");
CONSTANT(orientation, ORIENT_, LEFT, "LEFT");
}
MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Symbol PREFIX = zbar_symbol_
BOOT:
{
HV *stash = gv_stashpv("Barcode::ZBar::Symbol", TRUE);
LOOKUP_zbar_symbol_type_t = newAV();
CONSTANT(symbol_type, , NONE, "None");
CONSTANT(symbol_type, , PARTIAL, "Partial");
CONSTANT(symbol_type, , EAN8, zbar_get_symbol_name(ZBAR_EAN8));
CONSTANT(symbol_type, , UPCE, zbar_get_symbol_name(ZBAR_UPCE));
CONSTANT(symbol_type, , ISBN10, zbar_get_symbol_name(ZBAR_ISBN10));
CONSTANT(symbol_type, , UPCA, zbar_get_symbol_name(ZBAR_UPCA));
CONSTANT(symbol_type, , EAN13, zbar_get_symbol_name(ZBAR_EAN13));
CONSTANT(symbol_type, , ISBN13, zbar_get_symbol_name(ZBAR_ISBN13));
CONSTANT(symbol_type, , DATABAR, zbar_get_symbol_name(ZBAR_DATABAR));
CONSTANT(symbol_type, , DATABAR_EXP,
zbar_get_symbol_name(ZBAR_DATABAR_EXP));
CONSTANT(symbol_type, , I25, zbar_get_symbol_name(ZBAR_I25));
CONSTANT(symbol_type, , CODABAR, zbar_get_symbol_name(ZBAR_CODABAR));
CONSTANT(symbol_type, , CODE39, zbar_get_symbol_name(ZBAR_CODE39));
CONSTANT(symbol_type, , PDF417, zbar_get_symbol_name(ZBAR_PDF417));
CONSTANT(symbol_type, , QRCODE, zbar_get_symbol_name(ZBAR_QRCODE));
CONSTANT(symbol_type, , CODE93, zbar_get_symbol_name(ZBAR_CODE93));
CONSTANT(symbol_type, , CODE128, zbar_get_symbol_name(ZBAR_CODE128));
}
void
DESTROY(symbol)
( run in 2.204 seconds using v1.01-cache-2.11-cpan-7fcb06a456a )