/*------------------------------------------------------------------------
* Copyright 2007-2010 (c) Jeff Brown <spadix@users.sourceforge.net>
*
* This file is part of the ZBar Bar Code Reader.
*
* The ZBar Bar Code Reader is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* The ZBar Bar Code Reader is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser Public License for more details.
*
* You should have received a copy of the GNU Lesser Public License
* along with the ZBar Bar Code Reader; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* http://sourceforge.net/projects/zbar
*------------------------------------------------------------------------*/
#ifndef _ZBAR_H_
#define _ZBAR_H_
/** @file
* ZBar Barcode Reader C API definition
*/
/** @mainpage
*
* interface to the barcode reader is available at several levels.
* most applications will want to use the high-level interfaces:
*
* @section high-level High-Level Interfaces
*
* these interfaces wrap all library functionality into an easy-to-use
* package for a specific toolkit:
* - the "GTK+ 2.x widget" may be used with GTK GUI applications. a
* Python wrapper is included for PyGtk
* - the @ref zbar::QZBar "Qt4 widget" may be used with Qt GUI
* applications
* - the Processor interface (in @ref c-processor "C" or @ref
* zbar::Processor "C++") adds a scanning window to an application
* with no GUI.
*
* @section mid-level Intermediate Interfaces
*
* building blocks used to construct high-level interfaces:
* - the ImageScanner (in @ref c-imagescanner "C" or @ref
* zbar::ImageScanner "C++") looks for barcodes in a library defined
* image object
* - the Window abstraction (in @ref c-window "C" or @ref
* zbar::Window "C++") sinks library images, displaying them on the
* platform display
* - the Video abstraction (in @ref c-video "C" or @ref zbar::Video
* "C++") sources library images from a video device
*
* @section low-level Low-Level Interfaces
*
* direct interaction with barcode scanning and decoding:
* - the Scanner (in @ref c-scanner "C" or @ref zbar::Scanner "C++")
* looks for barcodes in a linear intensity sample stream
* - the Decoder (in @ref c-decoder "C" or @ref zbar::Decoder "C++")
* extracts barcodes from a stream of bar and space widths
*/
#ifdef __cplusplus
/** C++ namespace for library interfaces */
namespace zbar {
extern "C" {
#endif
/** @name Global library interfaces */
/*@{*/
/** "color" of element: bar or space. */
typedef enum zbar_color_e {
ZBAR_SPACE = 0, /**< light area or space between bars */
ZBAR_BAR = 1, /**< dark area or colored bar segment */
} zbar_color_t;
/** decoded symbol type. */
typedef enum zbar_symbol_type_e {
ZBAR_NONE = 0, /**< no symbol decoded */
ZBAR_PARTIAL = 1, /**< intermediate status */
ZBAR_EAN2 = 2, /**< GS1 2-digit add-on */
ZBAR_EAN5 = 5, /**< GS1 5-digit add-on */
ZBAR_EAN8 = 8, /**< EAN-8 */
ZBAR_UPCE = 9, /**< UPC-E */
ZBAR_ISBN10 = 10, /**< ISBN-10 (from EAN-13). @since 0.4 */
ZBAR_UPCA = 12, /**< UPC-A */
ZBAR_EAN13 = 13, /**< EAN-13 */
ZBAR_ISBN13 = 14, /**< ISBN-13 (from EAN-13). @since 0.4 */
ZBAR_COMPOSITE = 15, /**< EAN/UPC composite */
ZBAR_I25 = 25, /**< Interleaved 2 of 5. @since 0.4 */
ZBAR_DATABAR = 34, /**< GS1 DataBar (RSS). @since 0.11 */
ZBAR_DATABAR_EXP = 35, /**< GS1 DataBar Expanded. @since 0.11 */
ZBAR_CODABAR = 38, /**< Codabar. @since 0.11 */
ZBAR_CODE39 = 39, /**< Code 39. @since 0.4 */
ZBAR_PDF417 = 57, /**< PDF417. @since 0.6 */
ZBAR_QRCODE = 64, /**< QR Code. @since 0.10 */
ZBAR_CODE93 = 93, /**< Code 93. @since 0.11 */
ZBAR_CODE128 = 128, /**< Code 128 */
/** mask for base symbol type.
* @deprecated in 0.11, remove this from existing code
*/
ZBAR_SYMBOL = 0x00ff,
/** 2-digit add-on flag.
* @deprecated in 0.11, a ::ZBAR_EAN2 component is used for
* 2-digit GS1 add-ons
*/
ZBAR_ADDON2 = 0x0200,
/** 5-digit add-on flag.
* @deprecated in 0.11, a ::ZBAR_EAN5 component is used for
* 5-digit GS1 add-ons
*/
ZBAR_ADDON5 = 0x0500,
/** add-on flag mask.
* @deprecated in 0.11, GS1 add-ons are represented using composite
* symbols of type ::ZBAR_COMPOSITE; add-on components use ::ZBAR_EAN2
* or ::ZBAR_EAN5
*/
ZBAR_ADDON = 0x0700,
} zbar_symbol_type_t;
/** decoded symbol coarse orientation.
* @since 0.11
*/
typedef enum zbar_orientation_e {
ZBAR_ORIENT_UNKNOWN = -1, /**< unable to determine orientation */
ZBAR_ORIENT_UP, /**< upright, read left to right */
ZBAR_ORIENT_RIGHT, /**< sideways, read top to bottom */
ZBAR_ORIENT_DOWN, /**< upside-down, read right to left */
ZBAR_ORIENT_LEFT, /**< sideways, read bottom to top */
} zbar_orientation_t;
/** error codes. */
typedef enum zbar_error_e {
ZBAR_OK = 0, /**< no error */
ZBAR_ERR_NOMEM, /**< out of memory */
ZBAR_ERR_INTERNAL, /**< internal library error */
ZBAR_ERR_UNSUPPORTED, /**< unsupported request */
ZBAR_ERR_INVALID, /**< invalid request */
ZBAR_ERR_SYSTEM, /**< system error */
ZBAR_ERR_LOCKING, /**< locking error */
ZBAR_ERR_BUSY, /**< all resources busy */
ZBAR_ERR_XDISPLAY, /**< X11 display error */
ZBAR_ERR_XPROTO, /**< X11 protocol error */
ZBAR_ERR_CLOSED, /**< output window is closed */
ZBAR_ERR_WINAPI, /**< windows system error */
ZBAR_ERR_NUM /**< number of error codes */
} zbar_error_t;
/** decoder configuration options.
* @since 0.4
*/
typedef enum zbar_config_e {
ZBAR_CFG_ENABLE = 0, /**< enable symbology/feature */
ZBAR_CFG_ADD_CHECK, /**< enable check digit when optional */
ZBAR_CFG_EMIT_CHECK, /**< return check digit when present */
ZBAR_CFG_ASCII, /**< enable full ASCII character set */
ZBAR_CFG_NUM, /**< number of boolean decoder configs */
ZBAR_CFG_MIN_LEN = 0x20, /**< minimum data length for valid decode */
ZBAR_CFG_MAX_LEN, /**< maximum data length for valid decode */
ZBAR_CFG_UNCERTAINTY = 0x40,/**< required video consistency frames */
ZBAR_CFG_POSITION = 0x80, /**< enable scanner to collect position data */
ZBAR_CFG_X_DENSITY = 0x100, /**< image scanner vertical scan density */
ZBAR_CFG_Y_DENSITY, /**< image scanner horizontal scan density */
} zbar_config_t;
/** decoder symbology modifier flags.
* @since 0.11
*/
typedef enum zbar_modifier_e {
/** barcode tagged as GS1 (EAN.UCC) reserved
* (eg, FNC1 before first data character).
* data may be parsed as a sequence of GS1 AIs
*/
ZBAR_MOD_GS1 = 0,
/** barcode tagged as AIM reserved
* (eg, FNC1 after first character or digit pair)
*/
ZBAR_MOD_AIM,
/** number of modifiers */
ZBAR_MOD_NUM,
} zbar_modifier_t;
/** retrieve runtime library version information.
* @param major set to the running major version (unless NULL)
* @param minor set to the running minor version (unless NULL)
* @returns 0
*/
extern int zbar_version(unsigned *major,
unsigned *minor);
/**
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
zbar-iphone-example-master.zip (56个子文件)
zbar-iphone-example-master
ZBarSDK
ZbarOverlayView.h 388B
ZbarOverlayView.m 6KB
libzbar.a 6.29MB
Resources
zbar-helpicons.png 18KB
zbar-samples.png 1KB
zbar-line@2x.png 6KB
zbar-back.png 319B
zbar-help.html 3KB
.DS_Store 6KB
Headers
ZBarSDK
ZBarImageScanner.h 2KB
ZBarHelpController.h 2KB
ZBarReaderView.h 5KB
ZBarImage.h 2KB
zbar.h 53KB
ZBarSymbol.h 2KB
ZBarCaptureReader.h 4KB
zbar
Symbol.h 12KB
zbargtk.h 6KB
ImageScanner.h 4KB
Window.h 4KB
QZBarImage.h 2KB
Image.h 9KB
QZBar.h 5KB
Exception.h 5KB
Scanner.h 4KB
Processor.h 7KB
Video.h 4KB
Decoder.h 6KB
ZBarCameraSimulator.h 2KB
ZBarReaderController.h 5KB
ZBarReaderViewController.h 6KB
ZBarSDK.h 1KB
.DS_Store 6KB
qr-iphone
main.m 339B
AppDelegate.h 280B
AppDelegate.m 2KB
ViewController.h 509B
Images.xcassets
AppIcon.appiconset
Contents.json 669B
LaunchImage.launchimage
Contents.json 1KB
qr-iphone-Prefix.pch 321B
ViewController.m 3KB
en.lproj
InfoPlist.strings 45B
MainStoryboard.storyboard 5KB
qr-iphone-Info.plist 1KB
README 162B
qr-iphone.xcodeproj
project.xcworkspace
contents.xcworkspacedata 154B
xcuserdata
limi.xcuserdatad
UserInterfaceState.xcuserstate 22KB
a2n.xcuserdatad
WorkspaceSettings.xcsettings 382B
UserInterfaceState.xcuserstate 24KB
project.pbxproj 24KB
xcuserdata
limi.xcuserdatad
xcschemes
qr-iphone.xcscheme 3KB
xcschememanagement.plist 481B
xcdebugger
Breakpoints_v2.xcbkptlist 91B
a2n.xcuserdatad
xcschemes
qr-iphone.xcscheme 3KB
xcschememanagement.plist 481B
xcdebugger
Breakpoints.xcbkptlist 91B
共 56 条
- 1
资源评论
- Aprilyi2017-08-15不错的资源,谢谢分享!
- hhq3162016-08-24不错的资源,谢谢分享!
朝霞弱碱
- 粉丝: 16
- 资源: 29
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功