barkoder-nativescript 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/index.d.ts +9 -0
  2. package/package.json +81 -0
  3. package/platforms/android/README.md +9 -0
  4. package/platforms/android/barkoder.aar +0 -0
  5. package/platforms/android/barkoder_nativescript.aar +0 -0
  6. package/platforms/android/include.gradle +11 -0
  7. package/platforms/ios/Barkoder.xcframework/Info.plist +44 -0
  8. package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Barkoder +0 -0
  9. package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Headers/Barkoder.h +13 -0
  10. package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Headers/iBarkoder.h +494 -0
  11. package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Info.plist +0 -0
  12. package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Modules/module.modulemap +6 -0
  13. package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/default.metallib +0 -0
  14. package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Barkoder +0 -0
  15. package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Headers/Barkoder.h +13 -0
  16. package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Headers/iBarkoder.h +494 -0
  17. package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Info.plist +0 -0
  18. package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Modules/module.modulemap +6 -0
  19. package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/_CodeSignature/CodeResources +146 -0
  20. package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/default.metallib +0 -0
  21. package/platforms/ios/BarkoderSDK.xcframework/Info.plist +44 -0
  22. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/BarkoderSDK +0 -0
  23. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Headers/BarkoderSDK-Swift.h +528 -0
  24. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Headers/BarkoderSDK.h +17 -0
  25. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Info.plist +0 -0
  26. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.abi.json +8416 -0
  27. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +141 -0
  28. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  29. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.swiftinterface +141 -0
  30. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/module.modulemap +11 -0
  31. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/beep.mp3 +0 -0
  32. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/templates.json +671 -0
  33. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/BarkoderSDK +0 -0
  34. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Headers/BarkoderSDK-Swift.h +1052 -0
  35. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Headers/BarkoderSDK.h +17 -0
  36. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Info.plist +0 -0
  37. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +8416 -0
  38. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +141 -0
  39. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  40. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +141 -0
  41. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +8416 -0
  42. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +141 -0
  43. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  44. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +141 -0
  45. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/module.modulemap +11 -0
  46. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/_CodeSignature/CodeResources +327 -0
  47. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/beep.mp3 +0 -0
  48. package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/templates.json +671 -0
  49. package/platforms/ios/Info.plist +7 -0
  50. package/platforms/ios/README.md +9 -0
  51. package/platforms/ios/build.xcconfig +0 -0
  52. package/references.d.ts +2 -0
  53. package/typings/ios/objc!Barkoder.d.ts +662 -0
  54. package/typings/ios/objc!BarkoderSDK.d.ts +185 -0
package/index.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ import { Common } from './barkoder-nativescript.common';
2
+ export declare class BarkoderNativescript extends Common {
3
+ // define your typings manually
4
+ // or..
5
+ // take the ios or android .d.ts files and copy/paste them here
6
+ }
7
+ export class BarkoderView extends View {
8
+
9
+ }
package/package.json ADDED
@@ -0,0 +1,81 @@
1
+ {
2
+ "name": "barkoder-nativescript",
3
+ "version": "0.0.1",
4
+ "description": "Nativescript support for Barkoder - a Barcode Scanner SDK for the modern enterprise.",
5
+ "main": "barkoder-nativescript",
6
+ "typings": "index.d.ts",
7
+ "nativescript": {
8
+ "platforms": {
9
+ "android": "6.0.0",
10
+ "ios": "6.0.1"
11
+ }
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/Viktor/barkoder-nativescript.git"
16
+ },
17
+ "scripts": {
18
+ "tsc": "npm i && tsc",
19
+ "build": "npm run tsc && npm run build.native",
20
+ "build.native": "node scripts/build-native.js",
21
+ "tslint": "cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\"",
22
+ "ci.tslint": "npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/platforms/**'",
23
+ "prepack": "npm run build.native",
24
+ "demo.ios": "npm i && cd ../demo && tns run ios",
25
+ "demo.android": "npm i && cd ../demo && tns run android",
26
+ "demo.reset": "cd ../demo && npx rimraf -- hooks node_modules platforms package-lock.json",
27
+ "demo-angular.ios": "npm i && cd ../demo-angular && tns run ios",
28
+ "demo-angular.android": "npm i && cd ../demo-angular && tns run android",
29
+ "demo-angular.reset": "cd ../demo-angular && npx rimraf -- hooks node_modules platforms package-lock.json",
30
+ "plugin.prepare": "npm run build && cd ../demo && tns plugin remove barkoder-nativescript && tns plugin add ../src && cd ../demo-angular && tns plugin remove barkoder-nativescript && tns plugin add ../src",
31
+ "clean": "npm run demo.reset && npm run demo-angular.reset && npx rimraf -- node_modules package-lock.json && npm i"
32
+ },
33
+ "keywords": [
34
+ "NativeScript",
35
+ "android",
36
+ "app",
37
+ "barcode",
38
+ "image processing",
39
+ "ios",
40
+ "mobile",
41
+ "mobile scanner",
42
+ "qr",
43
+ "qrcode recognition",
44
+ "scan",
45
+ "scanning",
46
+ "scanner",
47
+ "barkoder",
48
+ "barkoder-sdk",
49
+ "scanner-sdk",
50
+ "scanning-sdk",
51
+ "sdk",
52
+ "1d-barcode",
53
+ "2d-barcode",
54
+ "ean",
55
+ "upc",
56
+ "data",
57
+ "matrix",
58
+ "pdf-417"
59
+ ],
60
+ "repository": "https://barkoder.com",
61
+ "author": "barkoder <admin@barkoder> (https://barkoder.com)",
62
+ "license": "SEE LICENSE IN LICENSE.txt",
63
+ "bugs": {
64
+ "url": "https://barkoder.com/issues"
65
+ },
66
+ "homepage": "https://barkoder.com",
67
+ "publishConfig": {
68
+ "registry": "https://registry.npmjs.org/"
69
+ },
70
+ "devDependencies": {
71
+ "tns-core-modules": "^6.0.0",
72
+ "tns-platform-declarations": "^6.0.0",
73
+ "typescript": "~3.4.5",
74
+ "prompt": "^1.0.0",
75
+ "rimraf": "^2.6.3",
76
+ "tslint": "^5.12.1",
77
+ "semver": "^5.6.0"
78
+ },
79
+ "dependencies": {},
80
+ "bootstrapper": "nativescript-plugin-seed"
81
+ }
@@ -0,0 +1,9 @@
1
+ # Android permissions and dependencies
2
+
3
+ * (Optional) Use AndroidManifest.xml to describe any permissions, features or other configuration specifics required or used by your plugin for Android.
4
+ NOTE: The NativeScript CLI will not resolve any contradicting or duplicate entries during the merge. After the plugin is installed, you need to manually resolve such issues.
5
+
6
+ * (Optional) Use include.gradle configuration to describe any native dependencies. If there are no such, this file can be removed. For more information, see the [include.gradle Specification](http://docs.nativescript.org/plugins/plugins#includegradle-specification)
7
+
8
+
9
+ [Read more about nativescript plugins](http://docs.nativescript.org/plugins/plugins)
Binary file
@@ -0,0 +1,11 @@
1
+ /* Include.gradle configuration: http://docs.nativescript.org/plugins/plugins#includegradle-specification */
2
+
3
+ android {
4
+
5
+ }
6
+
7
+ dependencies {
8
+ // Describe plugin native Android dependencies like
9
+ // implementation "groupName:pluginName:ver"
10
+ // EXAMPLE: implementation "com.facebook.fresco:fresco:0.9.0+"
11
+ }
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>AvailableLibraries</key>
6
+ <array>
7
+ <dict>
8
+ <key>BinaryPath</key>
9
+ <string>Barkoder.framework/Barkoder</string>
10
+ <key>LibraryIdentifier</key>
11
+ <string>ios-arm64_x86_64-simulator</string>
12
+ <key>LibraryPath</key>
13
+ <string>Barkoder.framework</string>
14
+ <key>SupportedArchitectures</key>
15
+ <array>
16
+ <string>arm64</string>
17
+ <string>x86_64</string>
18
+ </array>
19
+ <key>SupportedPlatform</key>
20
+ <string>ios</string>
21
+ <key>SupportedPlatformVariant</key>
22
+ <string>simulator</string>
23
+ </dict>
24
+ <dict>
25
+ <key>BinaryPath</key>
26
+ <string>Barkoder.framework/Barkoder</string>
27
+ <key>LibraryIdentifier</key>
28
+ <string>ios-arm64</string>
29
+ <key>LibraryPath</key>
30
+ <string>Barkoder.framework</string>
31
+ <key>SupportedArchitectures</key>
32
+ <array>
33
+ <string>arm64</string>
34
+ </array>
35
+ <key>SupportedPlatform</key>
36
+ <string>ios</string>
37
+ </dict>
38
+ </array>
39
+ <key>CFBundlePackageType</key>
40
+ <string>XFWK</string>
41
+ <key>XCFrameworkFormatVersion</key>
42
+ <string>1.0</string>
43
+ </dict>
44
+ </plist>
@@ -0,0 +1,13 @@
1
+
2
+ #import <Foundation/Foundation.h>
3
+
4
+ //! Project version number for Barkoder.
5
+ FOUNDATION_EXPORT double BarkoderVersionNumber;
6
+
7
+ //! Project version string for Barkoder.
8
+ FOUNDATION_EXPORT const unsigned char BarkoderVersionString[];
9
+
10
+ // In this header, you should import all the public headers of your framework using statements like #import <Barkoder/PublicHeader.h>
11
+ #import <Barkoder/iBarkoder.h>
12
+
13
+
@@ -0,0 +1,494 @@
1
+ #ifndef iBarkoder_h
2
+ #define iBarkoder_h
3
+
4
+ #import <Foundation/Foundation.h>
5
+ #import <CoreImage/CoreImage.h>
6
+ #import <CoreMedia/CoreMedia.h>
7
+ #import <UIKit/UIKit.h>
8
+
9
+ typedef enum {
10
+ GlobalOption_SetMaximumThreads = 0,
11
+ GlobalOption_UseGPU,
12
+ GlobalOption_MulticodeCachingEnabled,
13
+ GlobalOption_MulticodeCachingDuration,
14
+ } GlobalOption;
15
+
16
+ typedef enum {
17
+ Fast = 0,
18
+ Normal,
19
+ Slow
20
+ } DecodingSpeed;
21
+
22
+ typedef enum {
23
+ Aztec,
24
+ AztecCompact,
25
+ QR,
26
+ QRMicro,
27
+ Code128,
28
+ Code93,
29
+ Code39,
30
+ Codabar,
31
+ Code11,
32
+ Msi,
33
+ UpcA,
34
+ UpcE,
35
+ UpcE1,
36
+ Ean13,
37
+ Ean8,
38
+ PDF417,
39
+ PDF417Micro,
40
+ Datamatrix,
41
+ Code25,
42
+ Interleaved25,
43
+ ITF14,
44
+ IATA25,
45
+ Matrix25,
46
+ Datalogic25,
47
+ COOP25,
48
+ Code32,
49
+ Telepen,
50
+ Dotcode
51
+ } DecoderType;
52
+
53
+
54
+ typedef enum {
55
+ Disabled = 0,
56
+ Automatic,
57
+ GS1,
58
+ AAMVA
59
+ } Formatting;
60
+
61
+ //==========================================================================
62
+ // BKImage
63
+ //==========================================================================
64
+ @interface Image : NSObject
65
+ - (id)initWithPixels:(uint8_t *)pixels width: (int) width height: (int) height;
66
+
67
+ @property (nonatomic, readwrite) uint8_t* pixels;
68
+ @property (nonatomic, readonly) int width;
69
+ @property (nonatomic, readonly) int height;
70
+ @end
71
+
72
+ //==========================================================================
73
+ // Specific Config
74
+ //==========================================================================
75
+ @interface SpecificConfig : NSObject
76
+ - (id)initWithDecoderType:(DecoderType)decoderType;
77
+ - (int)setLengthRangeWithMinimum:(int)minimumLength maximum: (int) maximumLength;
78
+ - (DecoderType)decoderType;
79
+ - (bool)isLicensed;
80
+ - (NSString *) typeName;
81
+
82
+ @property (nonatomic, readwrite) bool enabled;
83
+ @property (nonatomic, readwrite) int expectedCount;
84
+ @property (nonatomic, readonly) int minimumLength;
85
+ @property (nonatomic, readonly) int maximumLength;
86
+ @end
87
+
88
+ //==========================================================================
89
+ // Code 11 Config
90
+ //==========================================================================
91
+ @interface Code11Config : SpecificConfig
92
+ typedef enum {
93
+ Code11_Checksum_Disabled,
94
+ Code11_Checksum_Single,
95
+ Code11_Checksum_Double
96
+ } Code11Checksum;
97
+
98
+ @property (nonatomic, readwrite) Code11Checksum checksum;
99
+
100
+ - (id)initWithDecoderType:(DecoderType)decoderType;
101
+ @end
102
+
103
+ //==========================================================================
104
+ // Code 25 Config
105
+ //==========================================================================
106
+ @interface Code25Config : SpecificConfig
107
+ typedef enum {
108
+ Code25_Checksum_Disabled,
109
+ Code25_Checksum_Enabled
110
+ } Code25Checksum;
111
+
112
+
113
+ @property (nonatomic, readwrite) Code25Checksum checksum;
114
+
115
+ - (id)initWithDecoderType:(DecoderType)decoderType;
116
+ @end
117
+
118
+ //==========================================================================
119
+ // IATA 25 Config
120
+ //==========================================================================
121
+ @interface IATA25Config : SpecificConfig
122
+ @property (nonatomic, readwrite) Code25Checksum checksum;
123
+ - (id)initWithDecoderType:(DecoderType)decoderType;
124
+ @end
125
+
126
+ //==========================================================================
127
+ // Matrix 25 Config
128
+ //==========================================================================
129
+ @interface Matrix25Config : SpecificConfig
130
+ @property (nonatomic, readwrite) Code25Checksum checksum;
131
+ - (id)initWithDecoderType:(DecoderType)decoderType;
132
+ @end
133
+
134
+ //==========================================================================
135
+ // Datalogic 25 Config
136
+ //==========================================================================
137
+ @interface Datalogic25Config : SpecificConfig
138
+ @property (nonatomic, readwrite) Code25Checksum checksum;
139
+ - (id)initWithDecoderType:(DecoderType)decoderType;
140
+ @end
141
+
142
+ //==========================================================================
143
+ // COOP 25 Config
144
+ //==========================================================================
145
+ @interface COOP25Config : SpecificConfig
146
+ @property (nonatomic, readwrite) Code25Checksum checksum;
147
+ - (id)initWithDecoderType:(DecoderType)decoderType;
148
+ @end
149
+
150
+ //==========================================================================
151
+ // Interleaved 2 of 5 Config
152
+ //==========================================================================
153
+ @interface Interleaved25Config : SpecificConfig
154
+
155
+ @property (nonatomic, readwrite) Code25Checksum checksum;
156
+
157
+ - (id)initWithDecoderType:(DecoderType)decoderType;
158
+ @end
159
+
160
+ //==========================================================================
161
+ // ITF14 Config
162
+ //==========================================================================
163
+ @interface ITF14Config : SpecificConfig
164
+ - (id)initWithDecoderType:(DecoderType)decoderType;
165
+ @end
166
+
167
+ //==========================================================================
168
+ // Code 39 Config
169
+ //==========================================================================
170
+ @interface Code39Config : SpecificConfig
171
+ typedef enum {
172
+ Code39_Checksum_Disabled,
173
+ Code39_Checksum_Enabled
174
+ } Code39Checksum;
175
+
176
+ @property (nonatomic, readwrite) Code39Checksum checksum;
177
+
178
+ - (id)initWithDecoderType:(DecoderType)decoderType;
179
+ @end
180
+
181
+ //==========================================================================
182
+ // Telepen Config
183
+ //==========================================================================
184
+ @interface TelepenConfig : SpecificConfig
185
+ - (id)initWithDecoderType:(DecoderType)decoderType;
186
+ @end
187
+
188
+ //==========================================================================
189
+ // Dotcode Config
190
+ //==========================================================================
191
+ @interface DotcodeConfig : SpecificConfig
192
+ - (id)initWithDecoderType:(DecoderType)decoderType;
193
+ @end
194
+
195
+ //==========================================================================
196
+ // Code32 Config
197
+ //==========================================================================
198
+ @interface Code32Config : SpecificConfig
199
+ - (id)initWithDecoderType:(DecoderType)decoderType;
200
+ @end
201
+
202
+ //==========================================================================
203
+ // Msi Config
204
+ //==========================================================================
205
+ @interface MsiConfig : SpecificConfig
206
+ typedef enum {
207
+ Msi_Checksum_Disabled,
208
+ Msi_Checksum_Mod10,
209
+ Msi_Checksum_Mod11,
210
+ Msi_Checksum_Mod1010,
211
+ Msi_Checksum_Mod1110,
212
+ Msi_Checksum_Mod11IBM,
213
+ Msi_Checksum_Mod1110IBM
214
+ } MsiChecksum;
215
+
216
+ @property (nonatomic, readwrite) MsiChecksum checksum;
217
+
218
+ - (id)initWithDecoderType:(DecoderType)decoderType;
219
+ @end
220
+
221
+ //==========================================================================
222
+ // Aztec Config
223
+ //==========================================================================
224
+ @interface AztecConfig : SpecificConfig
225
+ - (id)initWithDecoderType:(DecoderType)decoderType;
226
+ @end
227
+
228
+ //==========================================================================
229
+ // Datamatrix Config
230
+ //==========================================================================
231
+ @interface DatamatrixConfig : SpecificConfig
232
+ @property (nonatomic, readwrite) int dpmMode;
233
+ - (id)initWithDecoderType:(DecoderType)decoderType;
234
+ @end
235
+
236
+ //==========================================================================
237
+ // AztecCompact Config
238
+ //==========================================================================
239
+ @interface AztecCompactConfig : SpecificConfig
240
+ - (id)initWithDecoderType:(DecoderType)decoderType;
241
+ @end
242
+
243
+ //==========================================================================
244
+ // QR Config
245
+ //==========================================================================
246
+ @interface QRConfig : SpecificConfig
247
+ @property (nonatomic, readwrite) bool multiPartMerge;
248
+ - (id)initWithDecoderType:(DecoderType)decoderType;
249
+ @end
250
+
251
+ //==========================================================================
252
+ // QRMicro Config
253
+ //==========================================================================
254
+ @interface QRMicroConfig : SpecificConfig
255
+ - (id)initWithDecoderType:(DecoderType)decoderType;
256
+ @end
257
+
258
+ //==========================================================================
259
+ // Code128 Config
260
+ //==========================================================================
261
+ @interface Code128Config : SpecificConfig
262
+ - (id)initWithDecoderType:(DecoderType)decoderType;
263
+ @end
264
+
265
+ //==========================================================================
266
+ // Code93 Config
267
+ //==========================================================================
268
+ @interface Code93Config : SpecificConfig
269
+ - (id)initWithDecoderType:(DecoderType)decoderType;
270
+ @end
271
+
272
+ //==========================================================================
273
+ // Codabar Config
274
+ //==========================================================================
275
+ @interface CodabarConfig : SpecificConfig
276
+ - (id)initWithDecoderType:(DecoderType)decoderType;
277
+ @end
278
+
279
+ //==========================================================================
280
+ // UpcA Config
281
+ //==========================================================================
282
+ @interface UpcAConfig : SpecificConfig
283
+ - (id)initWithDecoderType:(DecoderType)decoderType;
284
+ @end
285
+
286
+ //==========================================================================
287
+ // UpcE Config
288
+ //==========================================================================
289
+ @interface UpcEConfig : SpecificConfig
290
+ @property (nonatomic, readwrite) bool expandToUPCA;
291
+ - (id)initWithDecoderType:(DecoderType)decoderType;
292
+ @end
293
+
294
+ //==========================================================================
295
+ // UpcE1 Config
296
+ //==========================================================================
297
+ @interface UpcE1Config : SpecificConfig
298
+ @property (nonatomic, readwrite) bool expandToUPCA;
299
+ - (id)initWithDecoderType:(DecoderType)decoderType;
300
+ @end
301
+
302
+ //==========================================================================
303
+ // Ean13 Config
304
+ //==========================================================================
305
+ @interface Ean13Config : SpecificConfig
306
+ - (id)initWithDecoderType:(DecoderType)decoderType;
307
+ @end
308
+
309
+ //==========================================================================
310
+ // Ean8 Config
311
+ //==========================================================================
312
+ @interface Ean8Config : SpecificConfig
313
+ - (id)initWithDecoderType:(DecoderType)decoderType;
314
+ @end
315
+
316
+ //==========================================================================
317
+ // PDF417 Config
318
+ //==========================================================================
319
+ @interface PDF417Config : SpecificConfig
320
+ - (id)initWithDecoderType:(DecoderType)decoderType;
321
+ @end
322
+
323
+ //==========================================================================
324
+ // PDF417Micro Config
325
+ //==========================================================================
326
+ @interface PDF417MicroConfig : SpecificConfig
327
+ - (id)initWithDecoderType:(DecoderType)decoderType;
328
+ @end
329
+
330
+ //==========================================================================
331
+ // Config
332
+ //==========================================================================
333
+ @class Config;
334
+
335
+ @interface ConfigResponse : NSObject
336
+ typedef enum {
337
+ Result_OK,
338
+ Result_Error,
339
+ Result_Warning,
340
+ } Result;
341
+
342
+ @property (nonatomic, readwrite, retain) Config* config;
343
+ @property (nonatomic, readwrite) Result result;
344
+ @property (nonatomic, readonly, retain) NSString* message;
345
+ @end
346
+
347
+ //==========================================================================
348
+ // LicenseCheckResult
349
+ //==========================================================================
350
+ @interface LicenseCheckResult : NSObject
351
+ typedef enum {
352
+ LC_OK = 0,
353
+ LC_OK_NeedServer,
354
+ LC_Error,
355
+ } LicenseCheckCode;
356
+
357
+ @property (nonatomic, readwrite) LicenseCheckCode code;
358
+ @property (nonatomic, readwrite, retain) NSString* message;
359
+ @end
360
+
361
+ //==========================================================================
362
+ // Config
363
+ //==========================================================================
364
+ @interface Config : NSObject
365
+ +(ConfigResponse*)configWithLicenseKey:(NSString*)key licenseCheckHandler:(void (^_Nullable)(LicenseCheckResult * _Nonnull result))callback;
366
+
367
+ +(int) setGlobalOption: (GlobalOption) option value: (int) value;
368
+ +(int) getGlobalOption: (GlobalOption) option;
369
+
370
+ @property (nonatomic, readonly, retain) AztecConfig* _Nonnull aztec;
371
+ @property (nonatomic, readonly, retain) AztecCompactConfig* _Nonnull aztecCompact;
372
+ @property (nonatomic, readonly, retain) QRConfig* _Nonnull qr;
373
+ @property (nonatomic, readonly, retain) QRMicroConfig* _Nonnull qrMicro;
374
+ @property (nonatomic, readonly, retain) Code128Config* _Nonnull code128;
375
+ @property (nonatomic, readonly, retain) Code93Config* _Nonnull code93;
376
+ @property (nonatomic, readonly, retain) Code39Config* _Nonnull code39;
377
+ @property (nonatomic, readonly, retain) TelepenConfig* _Nonnull telepen;
378
+ @property (nonatomic, readonly, retain) DotcodeConfig* _Nonnull dotcode;
379
+ @property (nonatomic, readonly, retain) Code32Config* _Nonnull code32;
380
+ @property (nonatomic, readonly, retain) CodabarConfig* _Nonnull codabar;
381
+ @property (nonatomic, readonly, retain) Code11Config* _Nonnull code11;
382
+ @property (nonatomic, readonly, retain) MsiConfig* _Nonnull msi;
383
+ @property (nonatomic, readonly, retain) Code25Config* _Nonnull code25;
384
+ @property (nonatomic, readonly, retain) IATA25Config* _Nonnull iata25;
385
+ @property (nonatomic, readonly, retain) Matrix25Config* _Nonnull matrix25;
386
+ @property (nonatomic, readonly, retain) Datalogic25Config* _Nonnull datalogic25;
387
+ @property (nonatomic, readonly, retain) COOP25Config* _Nonnull coop25;
388
+ @property (nonatomic, readonly, retain) Interleaved25Config* _Nonnull interleaved25;
389
+ @property (nonatomic, readonly, retain) ITF14Config* _Nonnull itf14;
390
+ @property (nonatomic, readonly, retain) UpcAConfig* _Nonnull upcA;
391
+ @property (nonatomic, readonly, retain) UpcEConfig* _Nonnull upcE;
392
+ @property (nonatomic, readonly, retain) UpcE1Config* _Nonnull upcE1;
393
+ @property (nonatomic, readonly, retain) Ean13Config* _Nonnull ean13;
394
+ @property (nonatomic, readonly, retain) Ean8Config* _Nonnull ean8;
395
+ @property (nonatomic, readonly, retain) PDF417Config* _Nonnull PDF417;
396
+ @property (nonatomic, readonly, retain) PDF417MicroConfig* _Nonnull PDF417Micro;
397
+ @property (nonatomic, readonly, retain) DatamatrixConfig* _Nonnull datamatrix;
398
+
399
+ @property (nonatomic, readwrite) DecodingSpeed decodingSpeed;
400
+ @property (nonatomic, readwrite) NSString * _Nonnull encodingCharacterSet;
401
+ @property (nonatomic, readwrite) Formatting formatting;
402
+ @property (nonatomic, readwrite) int maximumResultsCount;
403
+ @property (nonatomic, readwrite) int duplicatesDelayMs;
404
+ @property (nonatomic, readwrite) bool upcEanDeblur;
405
+ @property (nonatomic, readwrite) bool enableMisshaped1D;
406
+ @property (nonatomic, readwrite) bool enableVINRestrictions;
407
+
408
+
409
+ -(void)setEnabledDecoders:(NSArray* _Nonnull)decoders;
410
+ -(NSArray<NSNumber*>* _Nonnull)getEnabledDecoders; // returns array of NSNumbers, getIntValue and cast to DecoderType
411
+ -(NSArray<NSNumber*>* _Nonnull)getAvailableDecoders; // returns array of NSNumbers, getIntValue and cast to DecoderType
412
+ -(SpecificConfig* _Nonnull)getConfigForDecoder:(DecoderType)decoderType;
413
+ -(void)setRegionOfInterestWithLeft:(float)left top:(float)top width:(float)width height:(float)height;
414
+ -(CGRect)regionOfInterest;
415
+ -(NSString * _Nonnull )getDeviceId;
416
+ -(NSString * _Nonnull )getLicenseErrorMessage;
417
+ -(int )getcustomOption: (NSString *_Nonnull)option;
418
+ -(void)setcustomOption: (NSString *_Nonnull)option value:(int) value;
419
+
420
+
421
+ @end
422
+
423
+ //==========================================================================
424
+ // DecoderResult
425
+ //==========================================================================
426
+ typedef enum {
427
+ BT_Aztec = 0,
428
+ BT_AztecCompact,
429
+ BT_QR,
430
+ BT_QRMicro,
431
+ BT_Code128,
432
+ BT_Code93,
433
+ BT_Code39,
434
+ BT_Codabar,
435
+ BT_Code11,
436
+ BT_Msi,
437
+ BT_UpcA,
438
+ BT_UpcE,
439
+ BT_UpcE1,
440
+ BT_Ean13,
441
+ BT_Ean8,
442
+ BT_PDF417,
443
+ BT_PDF417Micro,
444
+ BT_Datamatrix,
445
+ BT_Code25,
446
+ BT_Interleaved25,
447
+ BT_ITF14,
448
+ BT_IATA25,
449
+ BT_Matrix25,
450
+ BT_Datalogic25,
451
+ BT_COOP25,
452
+ BT_Code32,
453
+ BT_Telepen,
454
+ BT_Dotcode
455
+ } BarcodeType;
456
+
457
+ @interface DecoderResult : NSObject {
458
+ CGPoint location[4];
459
+ }
460
+
461
+ @property (nonatomic, readwrite) BarcodeType barcodeType;
462
+ @property (nonatomic, readwrite, retain) NSString* barcodeTypeName;
463
+ @property (nonatomic, readwrite, retain) NSData* binaryData;
464
+ @property (nonatomic, readwrite, retain) NSString* textualData;
465
+ @property (nonatomic, readwrite, retain) NSString* characterSet;
466
+ @property (nonatomic, readwrite, retain) NSDictionary* extra;
467
+
468
+ -(int)polygonPointCount;
469
+ -(CGPoint)polygonPointAt:(int)index;
470
+ -(NSString*)getStringForKey:(NSString*)key;
471
+ -(NSArray<NSString*>*)getAllKeys;
472
+ -(CGPoint)locationAt:(int)index;
473
+ -(CGPoint*) getLocationPoints;
474
+
475
+ @end
476
+
477
+
478
+ //==========================================================================
479
+ // iBarkoder
480
+ //==========================================================================
481
+ @interface iBarkoder : NSObject
482
+ +(NSString *) GetLibVersion;
483
+ +(bool) IsDecoderBusy;
484
+ +(NSArray<DecoderResult*>*)decodeImageInMemory:(Config*)config imagePixels:(uint8_t*)pixels imageWidth:(int)width imageHeight:(int) height;
485
+ +(int) decodeImageAsync:(Config*)config image: (Image*) image callback:(void (^)(NSArray<DecoderResult*>*, Image*)) callback;
486
+ +(int) decodeSampleBufferAsync:(Config*)config sampleBuffer:(CMSampleBufferRef)sampleBuffer callback:(void (^)(NSArray<DecoderResult*>*, CMSampleBufferRef)) callback;
487
+ + (unsigned char*)CGImageToPixels:(CGImageRef) image;
488
+ + (CGImageRef) CGImageFromPixels:(const char*)pixels width:(int)width height:(int)height;
489
+ + (UIImage *) UIImageFromPixels:(uint8_t*)pixels width:(int)width height:(int)height;
490
+
491
+ @end
492
+
493
+ #endif /* iBarkoder */
494
+
@@ -0,0 +1,6 @@
1
+ framework module Barkoder {
2
+ umbrella header "Barkoder.h"
3
+ export *
4
+
5
+ module * { export * }
6
+ }