SBSScanSettings.h
Go to the documentation of this file.
1 //
2 // SBSScanSettings.h
3 // BarcodeScanner
4 //
5 // Created by Moritz Hartmeier on 20/05/15.
6 // Copyright (c) 2015 Scandit AG. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 
11 #import "SBSCommon.h"
12 #import "SBSSymbologySettings.h"
13 #import "SBSScanAreaSettings.h"
14 
29 @interface SBSScanSettings : NSObject<NSCopying>
30 
36 + (nonnull instancetype)defaultSettings;
37 
50 + (nonnull instancetype)pre47DefaultSettings SBS_DEPRECATED_MSG_ATTRIBUTE("use defaultSettings and enable the required symbologies by hand instead.");
51 
52 
60 + (nullable instancetype)settingsWithDictionary:(nonnull NSDictionary<NSString *, id> *)dictionary
61  error:(NSError * _Nullable * _Nullable)error;
62 
70 @property (nonatomic, assign) SBSWorkingRange workingRange;
71 
85  - (void)enableSymbologies:(nonnull NSSet<NSNumber *> *)symbologies;
86 
115 - (void)setSymbology:(SBSSymbology)symbology enabled:(BOOL)enabled;
116 
120 - (nonnull NSSet<NSNumber *> *)enabledSymbologies;
121 
130 - (nonnull SBSSymbologySettings *)settingsForSymbology:(SBSSymbology)symbology;
131 
141 @property (nonatomic, assign) BOOL force2dRecognition;
142 
152 @property (nonatomic, assign) NSInteger maxNumberOfCodesPerFrame;
153 
167 @property (nonatomic, assign) NSInteger codeDuplicateFilter;
168 
181 @property (nonatomic, assign) NSInteger codeCachingDuration;
182 
189  @property (nonatomic, assign) float relativeZoom;
190 
202 @property (nonatomic, assign) SBSCameraFacingDirection cameraFacingPreference;
203 
211 @property (nullable, nonatomic, strong) NSString *deviceName;
212 
225 @property (nonatomic, assign) BOOL highDensityModeEnabled;
226 
240 @property (nonatomic, assign) CGRect activeScanningAreaLandscape;
241 
257 @property (nonatomic, assign) CGRect activeScanningAreaPortrait;
258 
266 @property (nonatomic, assign) BOOL restrictedAreaScanningEnabled;
267 
278 @property (nonatomic, assign) CGPoint scanningHotSpot;
279 
288 - (void)setActiveScanningArea:(CGRect)area;
289 
290 
303 @property (nonatomic, assign) BOOL motionCompensationEnabled;
304 
318 - (void)setProperty:(nonnull NSString *)property toValue:(int)value;
319 
329 - (int)valueForProperty:(nonnull NSString *)key;
330 
339 @property (nonatomic, assign) BOOL codeRejectionEnabled;
340 
352 @property (nullable, nonatomic, strong) SBSScanAreaSettings *areaSettingsPortrait;
353 
365 @property (nullable, nonatomic, strong) SBSScanAreaSettings *areaSettingsLandscape;
366 
380 @property (nonatomic, assign, getter=isMatrixScanEnabled) BOOL matrixScanEnabled;
381 
382 @end
CGRect activeScanningAreaPortrait
The active scanning area when the picker is in portrait orientation.
Definition: SBSScanSettings.h:257
CGRect activeScanningAreaLandscape
The active scanning area when the picker is in landscape orientation.
Definition: SBSScanSettings.h:240
SBSScanAreaSettings * areaSettingsLandscape
Landscape area settings, if present.
Definition: SBSScanSettings.h:365
BOOL force2dRecognition
Forces the barcode scanner to always run the 2D decoders (QR Code, Data Matrix, etc.), even when the 2D detector did not detect the presence of a 2D code.
Definition: SBSScanSettings.h:141
BOOL codeRejectionEnabled
Whether code rejection should be enabled.
Definition: SBSScanSettings.h:339
BOOL motionCompensationEnabled
Enable/disable motion compensation.
Definition: SBSScanSettings.h:303
SBSScanAreaSettings * areaSettingsPortrait
Portrait area settings, if present.
Definition: SBSScanSettings.h:352
BOOL matrixScanEnabled
Whether matrix scan should be enabled.
Definition: SBSScanSettings.h:380
Holds settings specific to a single symbology such as checksums and active symbol count...
Definition: SBSSymbologySettings.h:67
SBSCameraFacingDirection
Definition: SBSCommon.h:40
NSInteger maxNumberOfCodesPerFrame
The maximum number of barcodes to be decoded every frame.
Definition: SBSScanSettings.h:152
nonnull instancetype pre47DefaultSettings()
Convenience method to retrieve default settings as they were before ScanditSDK 4.7.
Holds settings that affect the recognition of barcodes, such as enabled barcode symbologies, scanning hot spot etc.
Definition: SBSScanSettings.h:29
nonnull NSSet< NSNumber * > * enabledSymbologies()
Returns the set of enabled symbologies.
SBSSymbology
Enumerates the symbologies supported by Scandit Barcode Scanner.
Definition: SBSCode.h:44
nonnull instancetype defaultSettings()
Settings object with default values.
#define SBS_DEPRECATED_MSG_ATTRIBUTE(message)
Definition: SBSCommon.h:21
float relativeZoom
Definition: SBSScanSettings.h:189
SBSWorkingRange workingRange
The focus working range for the barcode picker.
Definition: SBSScanSettings.h:70
BOOL restrictedAreaScanningEnabled
Definition: SBSScanSettings.h:266
NSInteger codeDuplicateFilter
Specifies the duplicate filter to use for the session.
Definition: SBSScanSettings.h:167
Scanning area settings control where codes are to be searched in images/frames.
Definition: SBSScanAreaSettings.h:93
NSString * deviceName
Definition: SBSScanSettings.h:211
NSInteger codeCachingDuration
Determines how long codes are kept in the session.
Definition: SBSScanSettings.h:181
SBSCameraFacingDirection cameraFacingPreference
The preferred camera direction.
Definition: SBSScanSettings.h:202
BOOL highDensityModeEnabled
Definition: SBSScanSettings.h:225
SBSWorkingRange
Definition: SBSCommon.h:65
CGPoint scanningHotSpot
Defines the point at which barcodes and 2D codes are expected.
Definition: SBSScanSettings.h:278