Logo Search packages:      
Sourcecode: zbar version File versions  Download package

int zbar_decoder_set_config ( zbar_decoder_t decoder,
zbar_symbol_type_t  symbology,
zbar_config_t  config,
int  value 
)

set config for indicated symbology (0 for all) to specified value.

Returns:
0 for success, non-0 for failure (config does not apply to specified symbology, or value out of range)
Since:
0.4

Definition at line 352 of file decoder.c.

References ZBAR_CFG_MAX_LEN, ZBAR_CFG_MIN_LEN, ZBAR_CFG_NUM, ZBAR_CODE128, ZBAR_CODE39, zbar_decoder_set_config(), ZBAR_EAN13, ZBAR_EAN8, ZBAR_I25, ZBAR_ISBN10, ZBAR_ISBN13, ZBAR_NONE, ZBAR_PDF417, ZBAR_QRCODE, ZBAR_UPCA, and ZBAR_UPCE.

Referenced by zbar::Decoder::set_config(), zbar_decoder_parse_config(), zbar_decoder_set_config(), and zbar_image_scanner_set_config().

{
    if(sym == ZBAR_NONE) {
        zbar_decoder_set_config(dcode, ZBAR_EAN13, cfg, val);
        zbar_decoder_set_config(dcode, ZBAR_EAN8, cfg, val);
        zbar_decoder_set_config(dcode, ZBAR_UPCA, cfg, val);
        zbar_decoder_set_config(dcode, ZBAR_UPCE, cfg, val);
        zbar_decoder_set_config(dcode, ZBAR_ISBN10, cfg, val);
        zbar_decoder_set_config(dcode, ZBAR_ISBN13, cfg, val);
        zbar_decoder_set_config(dcode, ZBAR_I25, cfg, val);
        zbar_decoder_set_config(dcode, ZBAR_CODE39, cfg, val);
        zbar_decoder_set_config(dcode, ZBAR_CODE128, cfg, val);
        zbar_decoder_set_config(dcode, ZBAR_PDF417, cfg, val);
        zbar_decoder_set_config(dcode, ZBAR_QRCODE, cfg, val);
        return(0);
    }

    if(cfg >= 0 && cfg < ZBAR_CFG_NUM)
        return(decoder_set_config_bool(dcode, sym, cfg, val));
    else if(cfg >= ZBAR_CFG_MIN_LEN && cfg <= ZBAR_CFG_MAX_LEN)
        return(decoder_set_config_int(dcode, sym, cfg, val));
    else
        return(1);
}


Generated by  Doxygen 1.6.0   Back to index