Barcode Xpress Mobile for iOS
 All Classes Functions Variables Properties Pages
BarcodeXpressIOS.h
1 /**************************************************************
2  * Copyright 2011 - Accusoft Corporation, Tampa Florida. *
3  * This sample code is provided to Accusoft licensees "as is" *
4  * with no restrictions on use or modification. No warranty *
5  * for use of this sample code is provided by Accusoft. *
6  **************************************************************/
7 
22 #import <Foundation/Foundation.h>
23 #import <AVFoundation/AVFoundation.h>
24 #import "BXiOSStatus.h"
25 #import "BXLicense.h"
26 
36 enum BarcodeTypes {
38  UnknownBarcodeType = 0x00000000,
40  Industry2of5BarcodeType = 0x00000001,
42  Interleaved2of5BarcodeType = 0x00000002,
44  IATA2of5BarcodeType = 0x00000004,
46  DataLogic2of5BarcodeType = 0x00000008,
48  Invertiert2of5BarcodeType = 0x00000010,
50  BCDMatrixBarcodeType = 0x00000020,
52  Matrix2of5BarcodeType = 0x00000040,
54  Code32BarcodeType = 0x00000080,
56  Code39BarcodeType = 0x00000100,
58  CodabarBarcodeType = 0x00000200,
60  Code93BarcodeType = 0x00000400,
62  Code128BarcodeType = 0x00000800,
64  EAN13BarcodeType = 0x00001000,
66  EAN8BarcodeType = 0x00002000,
68  UPCABarcodeType = 0x00004000,
70  UPCEBarcodeType = 0x00008000,
72  Add5BarcodeType = 0x00010000,
74  Add2BarcodeType = 0x00020000,
76  EAN128BarcodeType = 0x00040000,
78  PatchCodeBarcodeType = 0x00080000,
80  PostNetBarcodeType = 0x00100000,
82  PDF417BarcodeType = 0x00200000,
84  DataMatrixBarcodeType = 0x00400000,
86  Code39ExtendedBarcodeType = 0x00800000,
88  Code93ExtendedBarcodeType = 0x01000000,
89  /* QR Code */
90  QRCodeBarcodeType = 0x02000000,
92  IntelligentMailBarcodeType = 0x04000000,
94  RoyalPost4StateBarcodeType = 0x08000000,
96  AustralianPost4StateBarcodeType = 0x10000000,
98  AztecBarcodeType = 0x20000000,
100  GS1DataBarBarcodeType = 0x40000000,
102  UPU4StateBarcodeType = 0x80000000,
103 
104 
105  TwoWidthBarcodeType = Industry2of5BarcodeType +
106  Interleaved2of5BarcodeType + IATA2of5BarcodeType +
107  DataLogic2of5BarcodeType + Invertiert2of5BarcodeType +
108  BCDMatrixBarcodeType + Matrix2of5BarcodeType +
109  Code32BarcodeType + Code39BarcodeType +
110  CodabarBarcodeType + Code39ExtendedBarcodeType,
111 
112  FourWidthBarcodeType = Code128BarcodeType +
113  Code93BarcodeType + EAN8BarcodeType + EAN13BarcodeType +
114  UPCABarcodeType + UPCEBarcodeType + Add5BarcodeType +
115  Add2BarcodeType + EAN128BarcodeType +
116  Code93ExtendedBarcodeType,
117 
118  All1DBarcodesType = TwoWidthBarcodeType +
119  FourWidthBarcodeType,
120 
122  CommonMobileBarcodeTypes = UPCABarcodeType +
123  UPCEBarcodeType + EAN13BarcodeType + EAN8BarcodeType +
124  Code128BarcodeType + Code39BarcodeType +
125  Code39ExtendedBarcodeType + QRCodeBarcodeType +
126  GS1DataBarBarcodeType,
127 
131  Common1DMobileBarcodeTypes = UPCABarcodeType +
132  UPCEBarcodeType + EAN13BarcodeType +
133  EAN8BarcodeType + Code128BarcodeType +
134  Code39BarcodeType + Code39ExtendedBarcodeType,
135 
137  AllBarcodeTypes = All1DBarcodesType +
138  PatchCodeBarcodeType + PostNetBarcodeType +
139  PDF417BarcodeType + DataMatrixBarcodeType +
140  QRCodeBarcodeType + IntelligentMailBarcodeType +
141  RoyalPost4StateBarcodeType +
142  AustralianPost4StateBarcodeType + AztecBarcodeType +
143  GS1DataBarBarcodeType + UPU4StateBarcodeType
144 };
145 
150 @interface BXResult : NSObject {
151 @public
157  NSNumber *m_decodingTime;
159  NSNumber *m_type;
161  NSString *m_value;
163  NSData *m_valueData;
165  NSNumber *m_valueLength;
167  NSNumber *m_confidence;
172  NSValue *m_P1;
177  NSValue *m_P2;
182  NSValue *m_P3;
187  NSValue *m_P4;
193  NSNumber *m_status;
201 }
202 
204 @property (nonatomic, strong) NSString *m_value;
206 @property (nonatomic, strong) NSData *m_valueData;
208 @property (nonatomic, strong) NSNumber *m_valueLength;
213 @property (nonatomic, strong) NSValue *m_P1;
218 @property (nonatomic, strong) NSValue *m_P2;
223 @property (nonatomic, strong) NSValue *m_P3;
228 @property (nonatomic, strong) NSValue *m_P4;
234 @property (nonatomic, strong) NSNumber *m_decodingTime;
241 @property (nonatomic, strong) NSNumber *m_binarizationTime;
243 @property (nonatomic, strong) NSNumber *m_type;
245 @property (nonatomic, strong) NSNumber *m_confidence;
251 @property (nonatomic, strong) NSNumber *m_status;
252 
263 -(void)getPoints :(CGPoint*)P1 :(CGPoint*)P2 :(CGPoint*)P3 :(CGPoint*)P4;
264 
265 @end
266 
267 @class BXRuntime;
268 
274 @interface BXInterface : NSObject {
275 @private
280  BXRuntime *m_runtime;
281 }
282 
289 -(id)init;
290 
297 -(id)initWithLicense :(BXLicense*)inLicense;
298 
304 -(void)StartRecognition;
305 
311 -(void)StopRecognition;
312 
318 -(void)PauseRecognition;
319 
324 -(void)ResumeRecognition;
325 
338 -(void)SetCameraCallback :(id)sender :(SEL)callback;
339 
355 -(void)SetRecognitionCallback :(id)sender :(SEL)callback;
356 
369 -(void)SetProcessingCallback :(id)sender :(SEL)callback;
370 
387 -(BXiOS_Status)RecognizeImage :(UIImage*)image result:(BXResult **)result;
388 
408 -(BXiOS_Status)RecognizeImage :(void*)image width:(size_t)width height:(size_t)height bpp:(size_t)bpp stride:(size_t)stride result:(BXResult**)result;
409 
425 -(BXiOS_Status)RecognizeImage :(UIImage*)image results:(NSMutableArray*)results maxBarcodes:(int)maxBarcodes;
426 
444 -(BXiOS_Status)RecognizeImage :(void*)image width:(size_t)width height:(size_t)height bpp:(size_t)bpp stride:(size_t)stride results:(NSMutableArray*)results maxBarcodes:(int)maxBarcodes;
445 
446 
452 -(const char *)ReportVersion;
453 
461 -(long)SetBarcodeTypes :(long)types;
462 
469 -(CGSize)GetCameraResolution;
470 
476 -(void)ClearNumProcessedFrames;
477 
487 -(long)GetNumProcessedFrames;
488 
497 +(UIImage*)binarizeUIImage:(UIImage*)inImage;
498 
507 +(const char*)BarcodeTypeToString:(enum BarcodeTypes)barcodeType;
508 
515 -(AVCaptureSession*) GetCaptureSession;
516 
517 @end
518 
519 
520 
521 
NSString * m_value
Gets the decoded value of the recognized barcode, encoded as a string.
Definition: BarcodeXpressIOS.h:161
NSValue * m_P4
Gets the lower-left coordinate of a rectangle surrounding the barcode where it was located in the ima...
Definition: BarcodeXpressIOS.h:187
NSValue * m_P1
Gets the upper-left coordinate of a rectangle surrounding the barcode where it was located in the ima...
Definition: BarcodeXpressIOS.h:172
NSNumber * m_valueLength
Gets the length, in bytes, of the decoded value raw data.
Definition: BarcodeXpressIOS.h:165
Defines a class that handles the interactions between camera hardware, BXInterface (called by user pr...
Definition: BXRuntime.h:26
NSNumber * m_status
Gets the status value returned by the recognition library.
Definition: BarcodeXpressIOS.h:193
NSNumber * m_type
Gets the type of the recognized barcode.
Definition: BarcodeXpressIOS.h:159
NSData * m_valueData
Gets the decoded value of the recognized barcode, saved as raw bytes.
Definition: BarcodeXpressIOS.h:163
NSNumber * m_binarizationTime
Gets the time (in millseconds) spent in the library code while reducing the input image to a black/wh...
Definition: BarcodeXpressIOS.h:200
NSNumber * m_decodingTime
Gets the time (in millseconds) spent in the library code while decoding an image. ...
Definition: BarcodeXpressIOS.h:157
Manages access to the camera, executes callbacks, and executes Barcode Xpress library functions to pe...
Definition: BarcodeXpressIOS.h:274
NSValue * m_P3
Gets the lower-right coordinate of a rectangle surrounding the barcode where it was located in the im...
Definition: BarcodeXpressIOS.h:182
Defines a barcode result returned by the iOS Barcode Xpress SDK.
Definition: BarcodeXpressIOS.h:150
NSNumber * m_confidence
Gets the confidence (0..100) that the value is correct.
Definition: BarcodeXpressIOS.h:167
NSValue * m_P2
Gets the upper-right coordinate of a rectangle surrounding the barcode where it was located in the im...
Definition: BarcodeXpressIOS.h:177