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 
272 @interface BXInterface : NSObject {
273 @private
278  BXRuntime *m_runtime;
279 }
280 
287 -(id)init;
288 
295 -(id)initWithLicense :(BXLicense*)inLicense;
296 
302 -(void)StartRecognition;
303 
309 -(void)StopRecognition;
310 
316 -(void)PauseRecognition;
317 
322 -(void)ResumeRecognition;
323 
336 -(void)SetCameraCallback :(id)sender :(SEL)callback;
337 
353 -(void)SetRecognitionCallback :(id)sender :(SEL)callback;
354 
367 -(void)SetProcessingCallback :(id)sender :(SEL)callback;
368 
385 -(enum Status)RecognizeImage :(UIImage*)image result:(BXResult **)result;
386 
406 -(enum Status)RecognizeImage :(void*)image width:(size_t)width height:(size_t)height bpp:(size_t)bpp stride:(size_t)stride result:(BXResult**)result;
407 
423 -(enum Status)RecognizeImage :(UIImage*)image results:(NSMutableArray*)results maxBarcodes:(int)maxBarcodes;
424 
442 -(enum 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;
443 
444 
450 -(const char *)ReportVersion;
451 
459 -(long)SetBarcodeTypes :(long)types;
460 
467 -(CGSize)GetCameraResolution;
468 
474 -(void)ClearNumProcessedFrames;
475 
485 -(long)GetNumProcessedFrames;
486 
495 +(UIImage*)binarizeUIImage:(UIImage*)inImage;
496 
505 +(const char*)BarcodeTypeToString:(enum BarcodeTypes)barcodeType;
506 
513 -(AVCaptureSession*) GetCaptureSession;
514 
515 @end
516 
517 
518 
519 
NSValue * m_P3
Gets the lower-right coordinate of a rectangle surrounding the barcode where it was located in the im...
Definition: BarcodeXpressIOS.h:180
NSNumber * m_valueLength
Gets the length, in bytes, of the decoded value raw data.
Definition: BarcodeXpressIOS.h:163
NSValue * m_P2
Gets the upper-right coordinate of a rectangle surrounding the barcode where it was located in the im...
Definition: BarcodeXpressIOS.h:175
NSNumber * m_decodingTime
Gets 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
Gets the decoded value of the recognized barcode, encoded as a string.
Definition: BarcodeXpressIOS.h:159
NSValue * m_P4
Gets the lower-left coordinate of a rectangle surrounding the barcode where it was located in the ima...
Definition: BarcodeXpressIOS.h:185
Defines a class that handles the interactions between camera hardware, BXInterface (called by user pr...
Definition: BXRuntime.h:26
Manages access to the camera, executes callbacks, and executes Barcode Xpress library functions to pe...
Definition: BarcodeXpressIOS.h:272
NSValue * m_P1
Gets the upper-left coordinate of a rectangle surrounding the barcode where it was located in the ima...
Definition: BarcodeXpressIOS.h:170
NSData * m_valueData
Gets the decoded value of the recognized barcode, saved as raw bytes.
Definition: BarcodeXpressIOS.h:161
NSNumber * m_status
Gets the status value returned by the recognition library.
Definition: BarcodeXpressIOS.h:191
NSNumber * m_type
Gets the type of the recognized barcode.
Definition: BarcodeXpressIOS.h:157
Defines a barcode result returned by the iOS Barcode Xpress SDK.
Definition: BarcodeXpressIOS.h:148
NSNumber * m_confidence
Gets the confidence (0..100) that the value is correct.
Definition: BarcodeXpressIOS.h:165
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:198