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 "Status.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,
101 
102 
103  TwoWidthBarcodeType = Industry2of5BarcodeType +
104  Interleaved2of5BarcodeType + IATA2of5BarcodeType +
105  DataLogic2of5BarcodeType + Invertiert2of5BarcodeType +
106  BCDMatrixBarcodeType + Matrix2of5BarcodeType +
107  Code32BarcodeType + Code39BarcodeType +
108  CodabarBarcodeType + Code39ExtendedBarcodeType,
109 
110  FourWidthBarcodeType = Code128BarcodeType +
111  Code93BarcodeType + EAN8BarcodeType + EAN13BarcodeType +
112  UPCABarcodeType + UPCEBarcodeType + Add5BarcodeType +
113  Add2BarcodeType + EAN128BarcodeType +
114  Code93ExtendedBarcodeType,
115 
116  All1DBarcodesType = TwoWidthBarcodeType +
117  FourWidthBarcodeType,
118 
120  CommonMobileBarcodeTypes = UPCABarcodeType +
121  UPCEBarcodeType + EAN13BarcodeType + EAN8BarcodeType +
122  Code128BarcodeType + Code39BarcodeType +
123  Code39ExtendedBarcodeType + QRCodeBarcodeType +
124  GS1DataBarBarcodeType,
125 
129  Common1DMobileBarcodeTypes = UPCABarcodeType +
130  UPCEBarcodeType + EAN13BarcodeType +
131  EAN8BarcodeType + Code128BarcodeType +
132  Code39BarcodeType + Code39ExtendedBarcodeType,
133 
135  AllBarcodeTypes = All1DBarcodesType +
136  PatchCodeBarcodeType + PostNetBarcodeType +
137  PDF417BarcodeType + DataMatrixBarcodeType +
138  QRCodeBarcodeType + IntelligentMailBarcodeType +
139  RoyalPost4StateBarcodeType +
140  AustralianPost4StateBarcodeType + AztecBarcodeType +
141  GS1DataBarBarcodeType
142 };
143 
148 @interface BXResult : NSObject {
149 @public
155  NSNumber *m_decodingTime;
157  NSNumber *m_type;
159  NSString *m_value;
161  NSData *m_valueData;
163  NSNumber *m_valueLength;
165  NSNumber *m_confidence;
170  NSValue *m_P1;
175  NSValue *m_P2;
180  NSValue *m_P3;
185  NSValue *m_P4;
191  NSNumber *m_status;
199 }
200 
202 @property (nonatomic, strong) NSString *m_value;
204 @property (nonatomic, strong) NSData *m_valueData;
206 @property (nonatomic, strong) NSNumber *m_valueLength;
211 @property (nonatomic, strong) NSValue *m_P1;
216 @property (nonatomic, strong) NSValue *m_P2;
221 @property (nonatomic, strong) NSValue *m_P3;
226 @property (nonatomic, strong) NSValue *m_P4;
232 @property (nonatomic, strong) NSNumber *m_decodingTime;
239 @property (nonatomic, strong) NSNumber *m_binarizationTime;
241 @property (nonatomic, strong) NSNumber *m_type;
243 @property (nonatomic, strong) NSNumber *m_confidence;
249 @property (nonatomic, strong) NSNumber *m_status;
250 
261 -(void)getPoints :(CGPoint*)P1 :(CGPoint*)P2 :(CGPoint*)P3 :(CGPoint*)P4;
262 
263 @end
264 
265 @class BXRuntime;
266 
271 @interface BXInterface : NSObject {
272 @private
277  BXRuntime *m_runtime;
278 }
279 
285 -(id)init;
286 
294 -(id)initWithLicense :(BXLicense*)inLicense;
295 
301 -(void)StartRecognition;
302 
308 -(void)StopRecognition;
309 
315 -(void)PauseRecognition;
316 
321 -(void)ResumeRecognition;
322 
335 -(void)SetCameraCallback :(id)sender :(SEL)callback;
336 
352 -(void)SetRecognitionCallback :(id)sender :(SEL)callback;
353 
366 -(void)SetProcessingCallback :(id)sender :(SEL)callback;
367 
384 -(enum Status)RecognizeImage :(UIImage*)image result:(BXResult **)result;
385 
405 -(enum Status)RecognizeImage :(void*)image width:(size_t)width height:(size_t)height bpp:(size_t)bpp stride:(size_t)stride result:(BXResult**)result;
406 
412 -(const char *)ReportVersion;
413 
421 -(long)SetBarcodeTypes :(long)types;
422 
429 -(CGSize)GetCameraResolution;
430 
436 -(void)ClearNumProcessedFrames;
437 
447 -(long)GetNumProcessedFrames;
448 
457 +(UIImage*)binarizeUIImage:(UIImage*)inImage;
458 
467 +(const char*)BarcodeTypeToString:(enum BarcodeTypes)barcodeType;
468 
475 -(AVCaptureSession*) GetCaptureSession;
476 
477 @end
478 
479 
480 
481 
NSValue * m_P3
The lower-right coordinate of a rectangle surrounding the barcode where it was located in the image...
Definition: BarcodeXpressIOS.h:180
NSNumber * m_valueLength
The length, in bytes, of the decoded value raw data.
Definition: BarcodeXpressIOS.h:163
NSValue * m_P2
The upper-right coordinate of a rectangle surrounding the barcode where it was located in the image...
Definition: BarcodeXpressIOS.h:175
NSNumber * m_decodingTime
The time (in millseconds) spent in the library code while decoding an image.
Definition: BarcodeXpressIOS.h:155
Defines a class that holds information about an Accusoft license to use the Accusoft Barcode Xpress S...
Definition: BXLicense.h:21
NSString * m_value
The decoded value of the recognized barcode, encoded as a string.
Definition: BarcodeXpressIOS.h:159
NSValue * m_P4
The lower-left coordinate of a rectangle surrounding the barcode where it was located in the image...
Definition: BarcodeXpressIOS.h:185
Defines a class that handles the interactions between camera hardware, BXInterface (called by user pr...
Definition: BXRuntime.h:26
Interface that manages access to the camera, executes callbacks, and executes Barcode Xpress library ...
Definition: BarcodeXpressIOS.h:271
NSValue * m_P1
The upper-left coordinate of a rectangle surrounding the barcode where it was located in the image...
Definition: BarcodeXpressIOS.h:170
NSData * m_valueData
The decoded value of the recognized barcode, saved as raw bytes.
Definition: BarcodeXpressIOS.h:161
NSNumber * m_status
The status value returned by the recognition library.
Definition: BarcodeXpressIOS.h:191
NSNumber * m_type
The type of the recognized barcode.
Definition: BarcodeXpressIOS.h:157
Interface that defines a result returned by the iOS Barcode Xpress SDK.
Definition: BarcodeXpressIOS.h:148
NSNumber * m_confidence
The confidence (0..100) that the value is correct.
Definition: BarcodeXpressIOS.h:165
NSNumber * m_binarizationTime
The time (in millseconds) spent in the library code while reducing the input image to a black/white 1...
Definition: BarcodeXpressIOS.h:198