SBSCode.h
Go to the documentation of this file.
1 //
2 // SBSCode.h
3 // BarcodeScanner
4 //
5 // Created by Marco Biasini on 20/05/15.
6 // Copyright (c) 2015 Scandit AG. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import <CoreGraphics/CoreGraphics.h>
11 #import <UIKit/UIKit.h>
12 
13 #import "SBSCommon.h"
14 
20 typedef struct {
24  CGPoint topLeft;
28  CGPoint topRight;
32  CGPoint bottomRight;
36  CGPoint bottomLeft;
38 
48  SBSSymbologyUnknown = 0x0000000,
52  SBSSymbologyEAN13 SBS_SWIFT_NAME(ean13) = 0x0000001,
56  SBSSymbologyUPC12 SBS_SWIFT_NAME(upc12) = 0x0000004,
60  SBSSymbologyUPCE SBS_SWIFT_NAME(upce) = 0x0000008,
64  SBSSymbologyCode39 = 0x0000020,
68  SBSSymbologyPDF417 SBS_SWIFT_NAME(pdf417) = 0x0000400,
76  SBSSymbologyQR SBS_SWIFT_NAME(qr) = 0x0000100,
81  SBSSymbologyITF SBS_SWIFT_NAME(itf) = 0x0000080,
86  SBSSymbologyCode128 = 0x0000010,
90  SBSSymbologyCode93 = 0x0000040,
94  SBSSymbologyMSIPlessey SBS_SWIFT_NAME(msiPlessey) = 0x0000800,
98  SBSSymbologyGS1Databar SBS_SWIFT_NAME(gs1Databar) = 0x0001000,
102  SBSSymbologyGS1DatabarExpanded SBS_SWIFT_NAME(gs1DatabarExpanded) = 0x0002000,
106  SBSSymbologyCodabar = 0x0004000,
110  SBSSymbologyEAN8 SBS_SWIFT_NAME(ean8) = 0x0000002,
114  SBSSymbologyAztec = 0x0008000,
140  SBSSymbologyCode11 = 0x0080000,
146  SBSSymbologyMaxiCode = 0x0040000,
152  SBSSymbologyGS1DatabarLimited SBS_SWIFT_NAME(gs1DatabarLimited) = 0x0100000,
160  SBSSymbologyCode25 = 0x0200000,
172  SBSSymbologyRM4SCC SBS_SWIFT_NAME(rm4scc) = 0x0800000,
178  SBSSymbologyKIX SBS_SWIFT_NAME(kix) = 0x1000000,
184  SBSSymbologyDotCode = 0x2000000,
188  SBSSymbologyMicroQR = 0x4000000,
194  SBSSymbologyCode32 = 0x8000000,
195 
199  SBSSymbologyLAPA4SC SBS_SWIFT_NAME(lapa4sc) = 0x10000000,
201 
211  SBSCompositeFlagNone = 0x0000000,
236 
245 #ifdef __cplusplus
246 extern "C" {
247 #endif
248 SBSSymbology SBSSymbologyFromString(NSString * _Nullable symbologyString);
249 #ifdef __cplusplus
250 }
251 #endif
252 
259 @interface SBSCode : NSObject
260 
268 @property (nonnull, nonatomic, readonly) NSString *symbologyString SBS_DEPRECATED_MSG_ATTRIBUTE("Use symbologyName instead.");
269 
280 @property (nonnull, nonatomic, readonly) NSString *symbologyName;
281 
287 @property (nonatomic, readonly) SBSSymbology symbology;
288 
299 @property (nullable, nonatomic, readonly) NSString *data;
300 
308 @property (nullable, nonatomic, readonly) NSData *rawData;
309 
320 @property (nonatomic, readonly) BOOL isRecognized;
321 
333 @property (nonatomic, readonly) SBSQuadrilateral location;
334 
343 @property (nonatomic, readonly) BOOL isGs1DataCarrier;
344 
352 @property (nonatomic, readonly) int symbolCount;
353 
360 @property (nonatomic, readonly) SBSCompositeFlag compositeFlag;
361 
369 @property (nonatomic, readonly) BOOL isColorInverted;
370 
371 @end
Definition: SBSCode.h:102
BOOL isRecognized
Whether the code was completely recognized.
Definition: SBSCode.h:320
NSString * symbologyName
The symbology name of the barcode as a string.
Definition: SBSCode.h:280
NSData * rawData
The raw byte data contained in the barcode.
Definition: SBSCode.h:308
SBSSymbology symbology
Returns the symbology of a recognized barcode.
Definition: SBSCode.h:287
Definition: SBSCode.h:211
Definition: SBSCode.h:52
BOOL isGs1DataCarrier
Whether the code is a GS1 data carrier.
Definition: SBSCode.h:343
Represents a recognized/localized barcode/2D code.
Definition: SBSCode.h:259
Definition: SBSCode.h:86
int symbolCount
The symbol count of this barcode.
Definition: SBSCode.h:352
NSString * symbologyString
The symbology of the barcode as a string, including GS1 data carrier states.
Definition: SBSCode.h:268
SBSQuadrilateral location
The location of the code in the image.
Definition: SBSCode.h:333
Definition: SBSCode.h:222
SBSSymbology SBSSymbologyFromString(NSString *_Nullable symbologyString)
Helper function to convert a symbology string to its corresponding symbology enum.
Definition: SBSCode.h:64
Definition: SBSCode.h:194
Definition: SBSCode.h:184
Definition: SBSCode.h:68
#define SBS_ENUM_END(name)
Definition: SBSCommon.h:17
Definition: SBSCode.h:152
Definition: SBSCode.h:72
Definition: SBSCode.h:114
Sentinel value to represent an unknown symbology.
Definition: SBSCode.h:48
Definition: SBSCode.h:188
Definition: SBSCode.h:226
SBSSymbology
Enumerates the symbologies supported by Scandit Barcode Scanner.
Definition: SBSCode.h:44
CGPoint topRight
The top-right corner.
Definition: SBSCode.h:28
Definition: SBSCode.h:160
#define SBS_DEPRECATED_MSG_ATTRIBUTE(message)
Definition: SBSCommon.h:21
Definition: SBSCode.h:217
Definition: SBSCode.h:106
Definition: SBSCode.h:172
Definition: SBSCode.h:166
Definition: SBSCode.h:76
SBSCompositeFlag
Flags to hint that two codes form a composite code.
Definition: SBSCode.h:207
Definition: SBSCode.h:124
Definition: SBSCode.h:178
Definition: SBSCode.h:134
Definition: SBSCode.h:110
NSString * data
The data contained in the barcode/2D code, e.g. the 13 digit number of a EAN-13 code.
Definition: SBSCode.h:299
Definition: SBSCode.h:199
CGPoint bottomLeft
The bottom-left corner.
Definition: SBSCode.h:36
Definition: SBSCode.h:56
Definition: SBSCode.h:146
Definition: SBSCode.h:234
BOOL isColorInverted
Whether the scanned code is color inverted.
Definition: SBSCode.h:369
CGPoint topLeft
The top-left corner.
Definition: SBSCode.h:24
SBSCompositeFlag compositeFlag
Flag to hint whether the barcode is part of a composite code.
Definition: SBSCode.h:360
Definition: SBSCode.h:98
Definition: SBSCode.h:81
Definition: SBSCode.h:230
CGPoint bottomRight
The bottom-right corner.
Definition: SBSCode.h:32
Definition: SBSCode.h:140
Definition: SBSCode.h:90
#define SBS_SWIFT_NAME(method)
Definition: SBSCommon.h:20
Definition: SBSCode.h:94
Definition: SBSCode.h:60
Quadrilateral represented by 4 corners.
Definition: SBSCode.h:20
#define SBS_ENUM_BEGIN(name)
Definition: SBSCommon.h:16