Barcode Xpress Mobile for iOS
BarcodeXpressIOS.h
00001 /**************************************************************
00002  * Copyright 2011 - Accusoft Corporation, Tampa Florida.      *
00003  * This sample code is provided to Accusoft licensees "as is" *
00004  * with no restrictions on use or modification.  No warranty  *
00005  * for use of this sample code is provided by Accusoft.       *
00006  **************************************************************/
00007 
00022 #import <Foundation/Foundation.h>
00023 #import <AVFoundation/AVFoundation.h>
00024 #import "Status.h"
00025 #import "BXLicense.h"
00026 
00031 enum BarcodeTypes {
00033     UnknownBarcodeType                  = 0x00000000,
00035     Industry2of5BarcodeType             = 0x00000001,
00037     Interleaved2of5BarcodeType          = 0x00000002,
00039     IATA2of5BarcodeType                 = 0x00000004,
00041     DataLogic2of5BarcodeType            = 0x00000008,
00043     Invertiert2of5BarcodeType           = 0x00000010,
00045     BCDMatrixBarcodeType                = 0x00000020,
00047     Matrix2of5BarcodeType               = 0x00000040,
00049     Code32BarcodeType                   = 0x00000080,
00051     Code39BarcodeType                   = 0x00000100,
00053     CodabarBarcodeType                  = 0x00000200,
00055     Code93BarcodeType                   = 0x00000400,
00057     Code128BarcodeType                  = 0x00000800,
00059     EAN13BarcodeType                    = 0x00001000,
00061     EAN8BarcodeType                     = 0x00002000,
00063     UPCABarcodeType                     = 0x00004000,
00065     UPCEBarcodeType                     = 0x00008000,
00067     Add5BarcodeType                     = 0x00010000,
00069     Add2BarcodeType                     = 0x00020000,
00071     EAN128BarcodeType                   = 0x00040000,
00073     PatchCodeBarcodeType                = 0x00080000,
00075     PostNetBarcodeType                  = 0x00100000,
00077     PDF417BarcodeType                   = 0x00200000,
00079     DataMatrixBarcodeType               = 0x00400000,
00081     Code39ExtendedBarcodeType           = 0x00800000,
00083     Code93ExtendedBarcodeType           = 0x01000000,
00084     /* QR Code */
00085     QRCodeBarcodeType                   = 0x02000000,
00087     IntelligentMailBarcodeType          = 0x04000000,
00089     RoyalPost4StateBarcodeType          = 0x08000000,
00091     AustralianPost4StateBarcodeType     = 0x10000000,
00093     AztecBarcodeType                    = 0x20000000,
00094 
00095                 TwoWidthBarcodeType = Industry2of5BarcodeType +
00096                                 Interleaved2of5BarcodeType + IATA2of5BarcodeType +
00097                                 DataLogic2of5BarcodeType + Invertiert2of5BarcodeType +
00098                                 BCDMatrixBarcodeType + Matrix2of5BarcodeType +
00099                                 Code32BarcodeType + Code39BarcodeType + 
00100                                 CodabarBarcodeType + Code39ExtendedBarcodeType,
00101 
00102                 FourWidthBarcodeType = Code128BarcodeType + 
00103                                 Code93BarcodeType + EAN8BarcodeType + EAN13BarcodeType +
00104                                 UPCABarcodeType + UPCEBarcodeType + Add5BarcodeType +
00105                                 Add2BarcodeType + EAN128BarcodeType +
00106                                 Code93ExtendedBarcodeType,
00107 
00108                 All1DBarcodesType = TwoWidthBarcodeType + 
00109                                 FourWidthBarcodeType,
00110 
00112     CommonMobileBarcodeTypes = UPCABarcodeType + 
00113                                 UPCEBarcodeType + EAN13BarcodeType + EAN8BarcodeType + 
00114                                 Code128BarcodeType + Code39BarcodeType +
00115                                 Code39ExtendedBarcodeType + QRCodeBarcodeType,
00116 
00120                 Common1DMobileBarcodeTypes = UPCABarcodeType + 
00121                                 UPCEBarcodeType + EAN13BarcodeType +
00122                                 EAN8BarcodeType + Code128BarcodeType + 
00123                                 Code39BarcodeType + Code39ExtendedBarcodeType,
00124 
00126                 AllBarcodeTypes = All1DBarcodesType +
00127                                 PatchCodeBarcodeType + PostNetBarcodeType +
00128                                 PDF417BarcodeType + DataMatrixBarcodeType +
00129                                 QRCodeBarcodeType + IntelligentMailBarcodeType +
00130                                 RoyalPost4StateBarcodeType +
00131                                 AustralianPost4StateBarcodeType + AztecBarcodeType
00132 };
00133 
00138 @interface BXResult : NSObject {
00139 @public
00145     NSNumber *m_decodingTime;
00147                 NSNumber *m_type;
00149                 NSString *m_value;
00151     NSData *m_valueData;
00153     NSNumber *m_valueLength;
00155     NSNumber *m_confidence;
00160                 NSValue *m_P1;
00165                 NSValue *m_P2;
00170                 NSValue *m_P3;
00175                 NSValue *m_P4;
00181     NSNumber *m_status;
00188     NSNumber *m_binarizationTime;
00189 }
00190 
00192 @property (nonatomic, strong) NSString *m_value;
00194 @property (nonatomic, strong) NSData *m_valueData;
00196 @property (nonatomic, strong) NSNumber *m_valueLength;
00201 @property (nonatomic, strong) NSValue *m_P1;
00206 @property (nonatomic, strong) NSValue *m_P2;
00211 @property (nonatomic, strong) NSValue *m_P3;
00216 @property (nonatomic, strong) NSValue *m_P4;
00222 @property (nonatomic, strong) NSNumber *m_decodingTime;
00229 @property (nonatomic, strong) NSNumber *m_binarizationTime;
00231 @property (nonatomic, strong) NSNumber *m_type;
00233 @property (nonatomic, strong) NSNumber *m_confidence;
00239 @property (nonatomic, strong) NSNumber *m_status;
00240 
00251 -(void)getPoints :(CGPoint*)P1 :(CGPoint*)P2 :(CGPoint*)P3 :(CGPoint*)P4;
00252 
00253 @end
00254 
00255 @class BXRuntime;
00256 
00261 @interface BXInterface : NSObject {
00262 @private
00267                 BXRuntime *m_runtime;
00268 }
00269 
00275 -(id)init;
00276 
00284 -(id)initWithLicense :(BXLicense*)inLicense;
00285 
00291 -(void)StartRecognition;
00292 
00298 -(void)StopRecognition;
00299 
00305 -(void)PauseRecognition;
00306 
00311 -(void)ResumeRecognition;
00312 
00325 -(void)SetCameraCallback :(id)sender :(SEL)callback;
00326 
00342 -(void)SetRecognitionCallback :(id)sender :(SEL)callback;
00343 
00356 -(void)SetProcessingCallback :(id)sender :(SEL)callback;
00357 
00374 -(enum Status)RecognizeImage :(UIImage*)image result:(BXResult **)result;
00375 
00395 -(enum Status)RecognizeImage :(void*)image width:(size_t)width height:(size_t)height bpp:(size_t)bpp stride:(size_t)stride result:(BXResult**)result;
00396 
00402 -(const char *)ReportVersion;
00403 
00411 -(long)SetBarcodeTypes :(long)types;
00412 
00419 -(CGSize)GetCameraResolution;
00420 
00426 -(void)ClearNumProcessedFrames;
00427 
00437 -(long)GetNumProcessedFrames;
00438 
00447 +(UIImage*)binarizeUIImage:(UIImage*)inImage;
00448 
00457 +(const char*)BarcodeTypeToString:(enum BarcodeTypes)barcodeType;
00458 
00465 -(AVCaptureSession*) GetCaptureSession;
00466 
00467 @end
00468 
00469 
00470 
00471